S12Z: Disassembly: Fallback to show the address if the symbol table is empty.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
2
3 * gdbarch.sh (gdbarch_num_cooked_regs): New.
4 * gdbarch.h: Re-generate.
5 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
6 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
7 * eval.c (evaluate_subexp_standard): Likewise.
8 * findvar.c (value_of_register): Likewise.
9 (value_of_register_lazy): Likewise.
10 (address_from_register): Likewise.
11 * frame.c (get_frame_register_bytes): Likewise.
12 * gdbarch-selftests.c (register_to_value_test): Likewise.
13 * h8300-tdep.c (h8300_register_type): Likewise.
14 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
15 (i386_svr4_reg_to_regnum): Likewise.
16 * infcmd.c (default_print_registers_info): Likewise.
17 (registers_info): Likewise.
18 (print_vector_info): Likewise.
19 (default_print_float_info): Likewise.
20 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
21 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
22 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
23 (mi_cmd_data_list_changed_registers): Likewise.
24 (mi_cmd_data_list_register_values): Likewise.
25 (mi_cmd_data_write_register_values): Likewise.
26 (mi_cmd_trace_frame_collected): Likewise.
27 * mips-tdep.c (print_gp_register_row): Likewise.
28 (mips_print_registers_info): Likewise.
29 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
30 * regcache.c (init_regcache_descr): Likewise.
31 (register_size): Likewise.
32 (register_dump::dump): Likewise.
33 (cooked_read_test): Likewise.
34 (cooked_write_test): Likewise.
35 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
36 (rs6000_gdbarch_init): Likewise.
37 * stabsread.c (stab_reg_to_regnum): Likewise.
38 * stack.c (info_frame_command): Likewise.
39 * target-descriptions.c (tdesc_register_name): Likewise.
40 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
41 * tui/tui-regs.c (tui_show_register_group): Likewise.
42 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
43 (user_reg_map_regnum_to_name): Likewise.
44 (value_of_user_reg): Likewise.
45 (maintenance_print_user_registers): Likewise.
46 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
47 (xtensa_register_name): Likewise.
48 (xtensa_register_type): Likewise.
49 (xtensa_reg_to_regnum): Likewise.
50 (xtensa_pseudo_register_read): Likewise.
51 (xtensa_pseudo_register_write): Likewise.
52
53 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
54
55 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
56 correctly-sized buffer with raw_read.
57 (amd64_pseudo_register_write): Use correctly-sized buffer for
58 raw_read/raw_write.
59
60 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
61
62 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
63 in add_prefix_cmd of set print type.
64
65 2018-10-19 Tom Tromey <tom@tromey.com>
66
67 PR tui/18388:
68 * NEWS: Mention tabset deprecation.
69 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
70 (update_tab_width): New function.
71 (tui_set_tab_width, tui_show_tab_width): New functions.
72 (tui_set_tab_width_command): Use update_tab_width.
73 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
74 Add new "set tui tab-width" command.
75 * tui/tui-source.c (tui_set_source_content): Update.
76 * tui/tui-disasm.c (tui_set_disassem_content): Update.
77 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
78 Don't declare.
79 (tui_tab_width): Declare.
80 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
81 (tui_set_default_tab_len): Remove.
82
83 2018-10-19 Tom Tromey <tom@tromey.com>
84
85 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
86 (key_is_backspace, tui_getc): Don't declare.
87 * tui/tui-io.c (key_is_start_sequence): Now static.
88 (key_is_end_sequence, key_is_backspace): Remove.
89 (tui_getc): Now static.
90
91 2018-10-19 Tom Tromey <tom@tromey.com>
92
93 * symfile.c (reread_symbols): Clear "static_links".
94
95 2018-10-19 Alan Hayward <alan.hayward@arm.com>
96
97 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
98 define.
99 (aarch64_linux_sigframe_init): Extra boundary checks.
100
101 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
102
103 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
104 the possibly non-existent tdesc type 'vec128', but the type of raw
105 register v16 instead.
106
107 2018-10-19 Gary Benson <gbenson@redhat.com>
108
109 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
110
111 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
112
113 PR cli/23785
114 * cli/cli-dump.c (restore_binary_file): Check if "file" is
115 NULL.
116
117 2018-10-17 Paul Koning <paul_koning@dell.com>
118
119 * charset.c (convert_between_encodings): Fix unsigned overflow.
120
121 2018-10-17 John Baldwin <jhb@FreeBSD.org>
122
123 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
124 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
125 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
126 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
127 New functions.
128 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
129 and fbsd_info_proc_mappings_header.
130 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
131 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
132 New.
133
134 2018-10-17 Joel Brobecker <brobecker@adacore.com>
135
136 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
137 Solaris Maintainer.
138
139 2018-10-15 Tom Tromey <tom@tromey.com>
140
141 * tui/tui.c (strcat_to_buf): Remove casts.
142 * tui/tui-winsource.c (tui_show_source_line)
143 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
144 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
145 * tui/tui-windata.c (tui_first_data_item_displayed)
146 (tui_delete_data_content_windows, tui_erase_data_content)
147 (tui_display_all_data, tui_display_data_from)
148 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
149 * tui/tui-win.c (tui_set_win_height)
150 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
151 casts.
152 * tui/tui-win.c (tui_resize_all): Remove casts.
153 (tui_scroll_backward_command, tui_set_focus)
154 (tui_set_tab_width_command): Likewise.
155 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
156 * tui/tui-regs.c (tui_show_register_group): Remove cast.
157 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
158 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
159 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
160 Remove casts.
161
162 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
163
164 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
165 AArch64/ARM maintainer.
166
167 2018-10-11 Gary Benson <gbenson@redhat.com>
168
169 * interps.h (interp::m_name): Make private and mutable.
170 * interps.c (interp::~interp): Free m_name.
171
172 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
173 Simon Marchi <simark@simark.ca>
174
175 * README (`configure' options): Add documentation for new
176 "--enable-unit-tests" option.
177 * acinclude.m4: Include "selftest.m4".
178 * configure: Regenerate.
179 * configure.ac: Use "GDB_AC_SELFTEST".
180 * maint.c (maintenance_selftest): Update message informing
181 that selftests have been disabled.
182 (maintenance_info_selftests): Likewise.
183 * selftest.m4: New file.
184
185 2018-10-10 Gary Benson <gbenson@redhat.com>
186
187 * remote.c (remote_target::remote_send_printf): Add
188 missing va_end found by Coverity.
189
190 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
191
192 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
193
194 2018-10-09 Tom Tromey <tom@tromey.com>
195
196 * configure: Rebuild.
197 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
198 * NEWS: Update --enable-ubsan documentation.
199
200 2018-10-09 Gary Benson <gbenson@redhat.com>
201
202 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
203 found by Coverity.
204
205 2018-10-08 Tom Tromey <tom@tromey.com>
206
207 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
208 variable.
209 (riscv_fbsd_init_abi): Likewise.
210
211 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
212 * valops.c (value_struct_elt_for_reference): Rename local variable
213 to work around the shadowing a previous local warning.
214
215 2018-10-08 John Baldwin <jhb@FreeBSD.org>
216
217 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
218 * NEWS: Mention new FreeBSD/riscv native configuration.
219 * configure.host: Add riscv*-*-freebsd*.
220 * configure.nat: Likewise.
221 * riscv-fbsd-nat.c: New file.
222
223 2018-10-08 John Baldwin <jhb@FreeBSD.org>
224
225 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
226 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
227 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
228 * NEWS: Mention new FreeBSD/riscv target.
229 * configure.tgt: Add riscv*-*-freebsd*.
230 * riscv-fbsd-tdep.c: New file.
231 * riscv-fbsd-tdep.h: New file.
232
233 2018-10-08 John Baldwin <jhb@FreeBSD.org>
234
235 * regcache.h (struct regcache_map_entry): Note that this type can
236 be used with traditional frame caches.
237 * trad-frame.c (trad_frame_set_reg_regmap): New.
238 * trad-frame.h (trad_frame_set_reg_regmap): New.
239
240 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
241
242 PR c++/16841
243 * valops.c (get_virtual_base_offset): New function.
244 (value_struct_elt_for_reference): Use it to get virtual base offset
245 and add it in calculating class member address.
246
247 2018-10-08 John Darrington <john@darrington.wattle.id.au>
248
249 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
250 (check_producer): Check if the producer is codewarrior.
251 (producer_is_codewarrior): New function.
252 (lnp_state_machine::record_line): Ignore is_stmt flag for records
253 produced by codewarrior.
254 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
255
256 2018-10-06 Tom Tromey <tom@tromey.com>
257
258 PR python/19399:
259 * python/py-inferior.c: Add "architecture" entry.
260 (infpy_architecture): New function.
261
262 2018-10-06 Tom Tromey <tom@tromey.com>
263
264 PR python/21765:
265 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
266 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
267 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
268 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
269
270 2018-10-06 Tom Tromey <tom@tromey.com>
271
272 PR build/17077:
273 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
274 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
275 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
276 #include.
277
278 2018-10-06 Tom Tromey <tom@tromey.com>
279
280 * python/py-breakpoint.c (bppy_get_location): Handle a
281 bp_breakpoint without a location.
282
283 2018-10-06 Tom Tromey <tom@tromey.com>
284
285 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
286 (_RegEx): Reformat help text.
287 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
288 (AnyCallerIs, AnyCallerMatches): Reformat help text.
289 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
290 text.
291 * python/lib/gdb/command/xmethods.py (InfoXMethod)
292 (EnableXMethod, DisableXMethod): Remove help indentation.
293 Capitalize meta-syntactic variables.
294 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
295 (EnableUnwinder, DisableUnwinder): Remove help indentation.
296 Capitalize meta-syntactic variables.
297 * python/lib/gdb/command/explore.py (ExploreCommand)
298 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
299 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
300 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
301 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
302 Remove help indentation.
303 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
304 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
305 (DisableFrameFilter, SetFrameFilterPriority)
306 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
307
308 2018-10-06 Tom Tromey <tom@tromey.com>
309
310 PR tui/28819:
311 * tui/tui-io.c (gdb_wgetch): New function.
312 (tui_mld_getc, tui_getc): Use it.
313
314 2018-10-05 Tom Tromey <tom@tromey.com>
315
316 * sol-thread.c (sol_thread_target::wait): Rename inner
317 "save_ptid".
318
319 2018-10-04 Tom Tromey <tom@tromey.com>
320
321 * configure: Rebuild.
322 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
323
324 2018-10-04 Tom Tromey <tom@tromey.com>
325
326 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
327 declaration of "block".
328
329 2018-10-04 Tom Tromey <tom@tromey.com>
330
331 * common/filestuff.c (fdwalk): Remove inner declaration of
332 "result".
333
334 2018-10-04 Tom Tromey <tom@tromey.com>
335
336 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
337 "structs_addr" and hoist declaration.
338
339 2018-10-04 Tom Tromey <tom@tromey.com>
340
341 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
342 variable "size".
343
344 2018-10-04 Tom Tromey <tom@tromey.com>
345
346 * mdebugread.c (parse_partial_symbols): Use std::string.
347
348 2018-10-04 Tom Tromey <tom@tromey.com>
349
350 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
351 * p-valprint.c (pascal_val_print): Split inner "i" variable.
352 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
353 header.
354 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
355 more inner scope.
356 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
357 * varobj.c (varobj_update): Rename inner "newobj",
358 "type_changed".
359 * valprint.c (generic_emit_char): Rename inner "buf".
360 * valops.c (find_overload_match): Rename inner "temp".
361 (value_struct_elt_for_reference): Declare "v" in more inner
362 scope.
363 * v850-tdep.c (v850_push_dummy_call): Rename "len".
364 * unittests/array-view-selftests.c (run_tests): Rename inner
365 "vec".
366 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
367 header.
368 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
369 "tsv" in more inner scope.
370 (print_one_static_tracepoint_marker): Rename inner
371 "tuple_emitter".
372 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
373 (tic6x_push_dummy_call): Don't redeclare "addr".
374 * target-float.c: Declare "dto" lower.
375 * symtab.c (lookup_local_symbol): Rename inner "sym".
376 (find_pc_sect_line): Rename inner "pc".
377 * stack.c (print_frame): Don't redeclare "gdbarch".
378 (return_command): Rename inner "gdbarch".
379 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
380 "sp".
381 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
382 header.
383 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
384 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
385 scope.
386 * remote.c (remote_target::update_thread_list): Don't redeclare
387 "tp".
388 (remote_target::process_initial_stop_replies): Rename inner
389 "thread".
390 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
391 (remote_target::wait_as): Don't redeclare "stop_reply".
392 (remote_target::get_thread_local_address): Rename inner
393 "result".
394 (remote_target::get_tib_address): Likewise.
395
396 * regcache.c (cooked_read_test): Rename "regnum".
397 * record-btrace.c (cmd_record_btrace_start): Rename inner
398 "exception".
399 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
400 loop header.
401 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
402 header.
403 (ppu2spu_sniffer): Rename inner "buf".
404 * parse.c (operator_check_standard): Rename inner "type",
405 "objfile".
406 * p-valprint.c (pascal_val_print): Introduce new scope for
407 "low_bound", "high_bound".
408 * p-exp.y (yylex): Declare "i" in loop header.
409 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
410 Lower declaration of "s".
411 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
412 header.
413 (nios2_push_dummy_call): Rename "len".
414 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
415 "buf".
416 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
417 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
418 (linux_xfer_osdata_modules): Likewise.
419 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
420 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
421 (mips_o64_push_dummy_call): Likewise.
422 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
423 "op".
424 * mi/mi-main.c (list_available_thread_groups): Rename inner
425 "tuple_emitter".
426 (mi_cmd_data_read_memory): Rename inner "opts".
427 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
428 "tuple_emitter".
429 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
430 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
431 more inner scope.
432 (parse_partial_symbols): Rename inner "pst", "p", "name"
433 * main.c (captured_main_1): Rename inner "i"s.
434 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
435 "oso2".
436 * linux-tdep.c (linux_info_proc): Rename inner "filename".
437 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
438 * infrun.c (handle_no_resumed): Don't redeclare "thread".
439 (handle_signal_stop): Rename inner "gdbarch".
440 (handle_command): Declare "signum" in loop header.
441 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
442 "status".
443 (examine_prologue): Rename inner "sol" and "sof".
444 (ia64_extract_return_value): Rename inner "val". Declare another
445 "val" in a more inner scope.
446 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
447 inner scope.
448 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
449 "except".
450 * findvar.c (default_read_var_value): Don't redeclare "addr".
451 * f-exp.y (yylex): Declare "i" in loop header.
452 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
453 Rename inner "type", "expect_type".
454 (evaluate_subexp_for_sizeof): Rename inner "pc".
455 * elfread.c (elf_symfile_read): Rename inner "abfd".
456 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
457 "bytes_read".
458 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
459 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
460 (dwarf_decode_line_header): Rename inner "lh".
461 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
462 "offset". Declare "i" in loop header.
463 (disassemble_dwarf_expression): Rename inner "addr_size".
464 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
465 inner "result".
466 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
467 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
468 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
469 "inner_list_emitter".
470 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
471 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
472 declaration in a block.
473 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
474 * cp-valprint.c (cp_print_value_fields): Don't redeclare
475 "obstack_final_size".
476 * cp-support.c (inspect_type): Declare "i" in loop header.
477 * compile/compile.c (compile_instance::insert_symbol_error):
478 Rename inner "e".
479 * common/agent.c (agent_run_command): Remove inner "ret"
480 declaration.
481 * coffread.c (coff_symfile_read): Rename inner "name".
482 (coff_symfile_read): Rename inner "abfd".
483 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
484 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
485 "high".
486 * c-exp.y (lex_one_token): Move "len" declaration lower.
487 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
488 "gdbarch".
489 (create_exception_master_breakpoint): Likewise. Don't redeclare
490 "b".
491 (watch_command_1): Declare "mark" later.
492 (clear_command): Don't shadow "a" or "b".
493 (delete_command): Rename inner "b".
494 (delete_trace_command): Likewise.
495 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
496 "op".
497 (arm_gdbarch_init): Remove inner "e_flags".
498 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
499 "offset" in inner blocks.
500
501 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
502
503 * dwarf-index-write.c (file_write): Don't write if the vector is
504 empty.
505
506 2018-10-05 Tom de Vries <tdevries@suse.de>
507
508 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
509 PyArg_ParseTuple call.
510
511 2018-10-05 Tom de Vries <tdevries@suse.de>
512
513 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
514 PyArg_ParseTuple call.
515
516 2018-10-04 Joel Brobecker <brobecker@adacore.com>
517
518 * psymtab.c (recursively_search_psymtabs): Reformat parameters
519 to avoid exceeding 80 characters per line limit.
520
521 2018-10-04 Tom Tromey <tom@tromey.com>
522
523 * symfile.c (syms_from_objfile_1, finish_new_objfile)
524 (reread_symbols): Update.
525 * complaints.h (clear_complaints): Remove argument.
526 * complaints.c (enum complaint_series): Remove.
527 (series): Remove global.
528 (complaint_internal): Update.
529 (clear_complaints): Remove argument.
530
531 2018-10-04 Tom Tromey <tom@tromey.com>
532
533 * symfile.c (symbol_file_add_with_addrs): Do not print "no
534 debugging symbols" message if there is a separate debug objfile.
535
536 2018-10-04 Tom Tromey <tom@tromey.com>
537
538 PR cli/19551:
539 * symfile.c (symbol_file_add_with_addrs): Update output.
540 * psymtab.c (require_partial_symbols): Update output.
541
542 2018-10-04 Tom Tromey <tom@tromey.com>
543
544 PR cli/22234:
545 * complaints.c: Emit \n.
546
547 2018-10-04 Tom Tromey <tom@tromey.com>
548
549 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
550 (separate_debug_file_exists, find_separate_debug_file)
551 (add_symbol_file_command, reread_symbols, allocate_symtab)
552 (allocate_compunit_symtab): Use filtered printing, not
553 unfiltered.
554 * psymtab.c (require_partial_symbols, dump_psymtab)
555 (allocate_psymtab): Use filtered printing, not unfiltered.
556
557 2018-10-04 Tom Tromey <tom@tromey.com>
558
559 * complaints.c (complaint_internal): Correctly check complaint
560 count.
561
562 2018-10-04 Tom Tromey <tom@tromey.com>
563
564 * complaints.h (struct complaints): Remove declaration.
565 * complaints.c (clear_complaints): Remove an unused variable.
566
567 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
568
569 * MAINTAINERS (Write After Approval): Add self.
570
571 2018-10-03 Tom Tromey <tom@tromey.com>
572
573 * guile/scm-value.c (gdbscm_value_to_string): Initialize
574 "buffer_contents".
575 * coffread.c (coff_symtab_read): Initialize "newobj".
576
577 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
578
579 * dwarf2read.c (read_func_scope): Remove struct keyword in
580 range-based for.
581
582 2018-10-03 Tom Tromey <tom@tromey.com>
583
584 * README: Mention --enable-ubsan.
585 * NEWS: Mention --enable-ubsan.
586 * acinclude.m4: Include sanitize.m4.
587 * configure: Rebuild.
588 * configure.ac: Call AM_GDB_UBSAN.
589 * sanitize.m4: New file.
590
591 2018-10-03 Tom Tromey <tom@tromey.com>
592
593 * expression.h (enum exp_opcode): Use uint8_t as base type.
594 * expprint.c (op_name): Handle invalid opcodes.
595
596 2018-10-03 Tom Tromey <tom@tromey.com>
597
598 * parse.c (prefixify_expression): Add assert.
599 (parse_exp_in_context_1): Throw exception if the expression is
600 empty.
601
602 2018-10-03 Tom Tromey <tom@tromey.com>
603
604 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
605
606 2018-10-03 Tom Tromey <tom@tromey.com>
607
608 * c-exp.y (parse_number): Work in unsigned. Remove casts.
609
610 2018-10-03 Tom Tromey <tom@tromey.com>
611
612 * dwarf2read.c (read_subrange_type): Make "negative_mask"
613 unsigned.
614
615 2018-10-03 Tom Tromey <tom@tromey.com>
616
617 * findvar.c (extract_integer): Do work in an unsigned type.
618
619 2018-10-03 Tom Tromey <tom@tromey.com>
620
621 * common/enum-flags.h (enum_flags::operator~): Add static assert.
622 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
623 base type.
624 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
625 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
626 type.
627 * c-lang.h (enum c_string_type_values): Use unsigned as base
628 type.
629 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
630
631 2018-10-03 Tom Tromey <tom@tromey.com>
632
633 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
634 <~dwarf2_frame_state_reg_info>: Update.
635 <dwarf2_frame_state_reg_info>: Update.
636 <alloc_regs>: Add assertion. Update.
637 <reg>: Now a std::vector.
638 <num_regs>: Remove.
639 <swap>: Update.
640 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
641 (execute_cfa_program_test, dwarf2_frame_cache): Update.
642
643 2018-10-03 Tom Tromey <tom@tromey.com>
644
645 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
646
647 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
648
649 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
650
651 2018-10-02 Tom Tromey <tom@tromey.com>
652
653 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
654
655 2018-10-02 John Darrington <john@darrington.wattle.id.au>
656
657 * NEWS: Mention changed commands.
658 * ser-uds.c: New file.
659 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
660 * configure: Regenerate.
661 * Makefile.in: Add new file.
662 * serial.c (serial_open): Check if filename is a socket
663 and lookup the appropriate interface accordingly.
664
665 2018-10-01 Alan Hayward <alan.hayward@arm.com>
666
667 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
668 define.
669 (AARCH64_EXTRA_MAGIC): Likewise.
670 (AARCH64_FPSIMD_MAGIC): Likewise.
671 (AARCH64_SVE_MAGIC): Likewise.
672 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
673 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
674 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
675 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
676 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
677 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
678 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
679 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
680 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
681 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
682 (read_aarch64_ctx): Add function.
683 (aarch64_linux_sigframe_init): Detect FP registers.
684
685 2018-10-01 Alan Hayward <alan.hayward@arm.com>
686
687 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
688 (AARCH64_D0_REGNUM): Likewise.
689 (AARCH64_S0_REGNUM): Likewise.
690 (AARCH64_H0_REGNUM): Likewise.
691 (AARCH64_B0_REGNUM): Likewise.
692 (AARCH64_SVE_V0_REGNUM): Likewise.
693 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
694 (AARCH64_D0_REGNUM): Likewise.
695 (AARCH64_S0_REGNUM): Likewise.
696 (AARCH64_H0_REGNUM): Likewise.
697 (AARCH64_B0_REGNUM): Likewise.
698 (AARCH64_SVE_V0_REGNUM): Likewise.
699
700 2018-10-01 Gary Benson <gbenson@redhat.com>
701
702 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
703 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
704 prfpregset_t instead of gdb_prfpregset_t.
705 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
706 * configure, config.in: Rebuild.
707
708 2018-10-01 Gary Benson <gbenson@redhat.com>
709
710 * common/gdb_proc_service.h: New file, factored out from...
711 * gdb_proc_service.h: Moved common code to the above file.
712 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
713
714 2018-10-01 Gary Benson <gbenson@redhat.com>
715
716 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
717 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
718
719 2018-10-01 Gary Benson <gbenson@redhat.com>
720
721 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
722 (AC_CHECK_HEADERS): Check for linux/elf.h.
723 * configure, config.in: Rebuild.
724 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
725 doesn't define elf_fpregset_t.
726
727 2018-10-01 Gary Benson <gbenson@redhat.com>
728
729 * gdb_proc_service.h: Whitespace change.
730
731 2018-10-01 Tom Tromey <tom@tromey.com>
732
733 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
734 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
735 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
736
737 2018-10-01 Tom Tromey <tom@tromey.com>
738
739 * README: Minor change.
740
741 2018-09-30 Pedro Alves <palves@redhat.com>
742
743 * darwin-nat-info.c (darwin_debug_regions_recurse)
744 (info_mach_exceptions_command): Remove unused local variables.
745 * darwin-nat.c (darwin_decode_notify_message)
746 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
747 (darwin_stop_inferior, darwin_setup_exceptions)
748 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
749 (darwin_nat_target::attach, darwin_nat_target::detach)
750 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
751 local variables.
752 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
753 variables.
754
755 2018-09-29 Tom Tromey <tom@tromey.com>
756
757 * README: Remove some leftover text.
758
759 2018-09-29 Tom Tromey <tom@tromey.com>
760
761 * PROBLEMS: Rewrite.
762 * README: Update.
763
764 2018-09-28 John Baldwin <jhb@FreeBSD.org>
765
766 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
767 case with explicit breakpoint kind.
768 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
769 'additional_info' and related logic.
770 (riscv_debug_breakpoints): New variable.
771 (riscv_breakpoint_kind_from_pc): Use the length of the existing
772 instruction to determine the breakpoint kind.
773 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
774 flag. Update description of 'set/show riscv
775 use-compressed-breakpoints' flag.
776
777 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
778
779 (NEWS): Mention changes to frame related commands.
780 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
781 (add_prefix_cmd_suppress_notification): New function.
782 (add_com_suppress_notification): Call
783 add_cmd_suppress_notification.
784 * command.h (add_cmd_suppress_notification): Declare.
785 (add_prefix_cmd_suppress_notification): Declare.
786 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
787 (parse_frame_specification): Moved from stack.c, with
788 simplification to handle a single argument.
789 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
790 switch to the selected frame. Add a header comment.
791 * stack.c: Remove 'safe-ctype.h' include.
792 (find_frame_for_function): Add declaration.
793 (find_frame_for_address): New function.
794 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
795 (frame_selection_by_function_completer): New function.
796 (info_frame_command): Rename to...
797 (info_frame_command_core): ...this, and update parameter types.
798 (select_frame_command): Rename to...
799 (select_frame_command_core): ...this, and update parameter types.
800 (frame_command): Rename to...
801 (frame_command_core): ...this, and update parameter types.
802 (class frame_command_helper): New class to wrap implementations of
803 frame related sub-commands.
804 (frame_apply_cmd_list): New static global.
805 (frame_cmd_list): Make static.
806 (select_frame_cmd_list): New global for sub-commands.
807 (info_frame_cmd_list): New global for sub-commands.
808 (_initialize_stack): Register sub-commands for 'frame',
809 'select-frame', and 'info frame'. Update 'frame apply' commands
810 to use frame_apply_cmd_list. Move function local static
811 frame_apply_list to file static frame_apply_cmd_list for
812 consistency.
813 * stack.h (select_frame_command): Delete declarationn.
814 (select_frame_for_mi): Declare new function.
815
816 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
817
818 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
819 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
820 and NOP.
821
822 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
823
824 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
825
826 2018-09-26 Tom Tromey <tom@tromey.com>
827
828 * valops.c (auto_abandon): Remove dead code.
829
830 2018-09-26 Tom Tromey <tom@tromey.com>
831
832 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
833
834 2018-09-24 Tom Tromey <tom@tromey.com>
835
836 * common/pathstuff.c (get_standard_cache_dir): Make
837 "xdg_cache_home" and "home" const.
838 * top.c (init_history): Make "tmpenv" const.
839 * main.c (get_init_files): Make "homedir" const.
840
841 2018-09-23 Tom Tromey <tom@tromey.com>
842
843 PR python/18852:
844 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
845
846 2018-09-23 Tom Tromey <tom@tromey.com>
847
848 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
849 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
850 * python/python-internal.h (gdbpy_handle_exception): Declare.
851 * python/py-utils.c (gdbpy_handle_exception): New function.
852
853 2018-09-23 Tom Tromey <tom@tromey.com>
854
855 PR python/17284:
856 * python/py-type.c (typy_template_argument): Check for negative
857 argument number.
858
859 2018-09-23 Tom Tromey <tom@tromey.com>
860
861 PR python/14062:
862 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
863
864 2018-09-23 Tom Tromey <tom@tromey.com>
865
866 PR python/18170:
867 * python/py-value.c (valpy_int): Allow conversion from pointer
868 type.
869
870 2018-09-23 Tom Tromey <tom@tromey.com>
871
872 PR python/20126:
873 * python/py-value.c (valpy_int): Respect type sign.
874
875 2018-09-23 Tom Tromey <tom@tromey.com>
876
877 PR python/18352;
878 * python/py-value.c (valpy_float): Allow conversions from int or
879 char.
880 (valpy_int, valpy_long): Allow conversions from float.
881
882 2018-09-23 Tom Tromey <tom@tromey.com>
883
884 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
885 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
886
887 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
888
889 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
890 __sighndlr.
891 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
892
893 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
894
895 * windows-nat.c (windows_nat_target::wait): Remove a spurious
896 target_terminal::ours().
897
898 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
899
900 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
901 of vl to ULONGEST.
902
903 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
904
905 * breakpoint.c (update_inserted_breakpoint_locations): Remove
906 redundant condition.
907
908 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
909
910 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
911
912 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
913 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
914 * sol-thread.c (ps_pdmodel): Don't guard definition.
915
916 * procfs.c: Fix formatting.
917
918 * procfs.c (sysset_t_alloc): Remove.
919 (create_procinfo): Use XNEW instead of sysset_t_alloc.
920 (procfs_debug_inferior): Likewise.
921 (procfs_set_exec_trap): Likewise.
922 (proc_set_traced_sysentry): Don't allocate argp dynamically.
923 (proc_set_traced_sysexit): Likewise.
924
925 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
926 (dead_procinfo): Likewise.
927 (proc_warn): Likewise.
928 (proc_error): Likewise.
929 (proc_get_LDT_entry): Likewise.
930 (do_attach): Likewise.
931 (procfs_target::pid_to_str): Likewise.
932 (iterate_over_mappings): Likewise.
933
934 * procfs.c (create_procinfo): Fix ARI warning.
935 (proc_get_status): Likewise.
936 (proc_stop_process): Likewise.
937 (proc_run_process): Likewise.
938 (proc_kill): Likewise.
939 (proc_get_LDT_entry): Likewise.
940 (procfs_find_LDT_entry): Likewise.
941 (proc_update_threads): Likewise.
942 (proc_iterate_over_threads): Likewise.
943 (do_attach): Likewise.
944 (procfs_xfer_memory): Likewise.
945 (invalidate_cache): Likewise.
946 (procfs_target::resume): Likewise.
947 (procfs_init_inferior): Likewise.
948 (procfs_set_exec_trap): Likewise.
949 (procfs_target::thread_alive): Likewise.
950 (procfs_target::pid_to_exec_file): Likewise.
951 (iterate_over_mappings): Likewise.
952 (procfs_target::make_corefile_notes): Likewise.
953 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
954
955 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
956 (procfs_find_LDT_entry): Likewise.
957 * sol-thread.c (ps_lgetLDT): Likewise.
958
959 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
960
961 PR tdep/17903
962 * procfs.c (procfs_target): Declare pid_to_exec_file.
963 (procfs_target::pid_to_exec_file): New.
964
965 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
966
967 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
968 renaming.
969 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
970 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
971
972 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
973
974 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
975 (supply_fpregset, fill_fpregset): Move ...
976 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
977 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
978 Remove references to ioctl-based procfs.
979 Include <sys/reg.h>.
980 Remove PR_MODEL_NATIVE guards.
981 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
982 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
983
984 2018-09-19 Xavier Roirand <roirand@adacore.com>
985
986 PR gdb/20981:
987 * solib-darwin.c (darwin_get_dyld_bfd): New function.
988 (darwin_solib_get_all_image_info_addr_at_init): Update call.
989 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
990
991 2018-09-19 John Baldwin <jhb@FreeBSD.org>
992
993 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
994 (fbsd_print_sockaddr_in6): Likewise.
995
996 2018-09-19 Richard Bunt <richard.bunt@arm.com>
997 Chris January <chris.january@arm.com>
998
999 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1000 (evaluate_subexp_standard): Return a dummy type when
1001 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1002 OP_F77_UNDETERMINED_ARGLIST case.
1003 * expression.h (enum noside): Update comment.
1004
1005 2018-09-19 George Vasick <george.vasick@oracle.com>
1006
1007 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1008
1009 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1010 April Chin <april.chin@oracle.com>
1011 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1012
1013 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1014 uint_t lwpid_t.
1015 (create_procinfo): Print pids in /proc without leading zeros.
1016
1017 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1018
1019 * nios2-tdep.c (nios2_gcc_target_options): New.
1020 (nios2_gdb_arch_init): Install new hook.
1021
1022 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1023
1024 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1025 New file.
1026 * update-gnulib.sh: Apply patch.
1027 * configure: Re-generate.
1028
1029 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1030
1031 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1032 description. Make "info proc" command descriptions more
1033 consistent.
1034
1035 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1036
1037 * NEWS: Mention 'info proc files' command.
1038
1039 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1040
1041 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1042 descriptors for IP_FILES and IP_ALL.
1043
1044 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1045
1046 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1047 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1048 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1049 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1050 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1051 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1052 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1053 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1054 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1055 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1056 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1057 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1058 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1059 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1060 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1061 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1062 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1063 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1064 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1065 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1066 (struct fbsd_sockaddr_un): New types.
1067 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1068 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1069 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1070 (fbsd_core_info_proc_files): New functions.
1071 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1072 IP_ALL.
1073 * fbsd-tdep.h (fbsd_info_proc_files_header)
1074 (fbsd_info_proc_files_entry): New.
1075
1076 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1077
1078 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1079 * infcmd.c (info_proc_cmd_files): New function.
1080 (_initialize_infcmd): Register 'info proc files' command.
1081
1082 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1083
1084 * gnulib/aclocal-m4-deps.mk: Re-generate.
1085 * gnulib/aclocal.m4: Re-generate.
1086 * gnulib/config.in: Re-generate.
1087 * gnulib/configure: Re-generate.
1088 * gnulib/import/Makefile.am: Re-generate.
1089 * gnulib/import/Makefile.in: Re-generate.
1090 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1091 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1092 * gnulib/import/arpa_inet.in.h: New file.
1093 * gnulib/import/inet_ntop.c: New file.
1094 * gnulib/import/m4/arpa_inet_h.m4: New file.
1095 * gnulib/import/m4/inet_ntop.m4: New file.
1096 * gnulib/import/m4/netinet_in_h.m4: New file.
1097 * gnulib/import/m4/socklen.m4: New file.
1098 * gnulib/import/m4/sockpfaf.m4: New file.
1099 * gnulib/import/m4/stdalign.m4: New file.
1100 * gnulib/import/m4/sys_uio_h.m4: New file.
1101 * gnulib/import/netinet_in.in.h: New file.
1102 * gnulib/import/stdalign.in.h: New file.
1103 * gnulib/import/sys_socket.c: New file.
1104 * gnulib/import/sys_socket.in.h: New file.
1105 * gnulib/import/sys_uio.in.h: New file.
1106 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1107 module.
1108
1109 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1110
1111 * gnulib/aclocal-m4-deps.mk: New file.
1112 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1113 deterministically.
1114
1115 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1116
1117 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1118 KVE_PATH.
1119
1120 2018-09-18 Tom Tromey <tom@tromey.com>
1121
1122 * compile/compile-object-load.c (struct
1123 link_hash_table_cleanup_data): Add constructor and destructor.
1124 Use DISABLE_COPY_AND_ASSIGN.
1125 (~link_hash_table_cleanup_data): Rename from
1126 link_hash_table_free. Now a destructor.
1127 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1128
1129 2018-09-18 Tom Tromey <tom@tromey.com>
1130
1131 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1132 * compile/compile-object-load.c (struct munmap_list): Move to
1133 header file.
1134 (munmap_list::add): Rename from munmap_list_add; rewrite.
1135 (munmap_list::~munmap_list): Rename from munmap_list_free.
1136 (munmap_listp_free_cleanup): Remove.
1137 (compile_object_load): Update.
1138 * compile/compile-object-load.h (struct munmap_list): Move from
1139 compile-object-load.c. Rewrite.
1140
1141 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1142
1143 * aarch64-tdep.c (pass_in_v): Use register size.
1144 (aarch64_extract_return_value): Likewise.
1145 (aarch64_store_return_value): Likewise.
1146
1147 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1148
1149 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1150 rlim_t.
1151
1152 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1153
1154 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1155 Fix short help line.
1156
1157 2018-09-17 Tom Tromey <tom@tromey.com>
1158
1159 PR python/20445:
1160 * configure: Rebuild.
1161 * configure.ac: Conditionally use -DNDEBUG for Python.
1162
1163 2018-09-17 Tom Tromey <tom@tromey.com>
1164
1165 * configure: Rebuild.
1166 * configure.ac: Use gmp as a library dependency when checking for
1167 mpfr.
1168
1169 2018-09-17 Pedro Alves <palves@redhat.com>
1170
1171 * python/py-inferior.c (find_inferior_object): Delete.
1172
1173 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1174
1175 * compile/compile-cplus-types.c
1176 (compile_cplus_instance::enter_scope): Don't use new_scope after
1177 std::move.
1178
1179 2018-09-17 Tom Tromey <tom@tromey.com>
1180
1181 * common/pathstuff.c (get_standard_cache_dir): Use
1182 ~/Library/Caches on macOS.
1183 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1184
1185 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1186
1187 PR python/23669
1188 * breakpoint.c (commands_cmd_element): New.
1189 (_initialize_breakpoint): Assign commands_cmd_element.
1190 * breakpoint.h (commands_cmd_element): New.
1191 * cli/cli-script.c (while_cmd_element, if_command,
1192 define_cmd_element): New.
1193 (command_name_equals): Remove.
1194 (process_next_line): Compare commands by pointer, not by name.
1195 (_initialize_cli_script): Assign the various cmd_list_element
1196 variables.
1197 * compile/compile.c (compile_cmd_element): New.
1198 (_initialize_compile): Assign compile_cmd_element.
1199 * compile/compile.h (compile_cmd_element): New.
1200 * guile/guile.c (guile_cmd_element): New.
1201 (install_gdb_commands): Assign guile_cmd_element.
1202 * guile/guile.h (guile_cmd_element): New.
1203 * python/python.c (python_cmd_element): New.
1204 (_initialize_python): Assign python_cmd_element.
1205 * python/python.h (python_cmd_element): New.
1206 * tracepoint.c (while_stepping_cmd_element): New.
1207 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1208 * tracepoint.h (while_stepping_cmd_element): New.
1209
1210 2018-09-17 Tom Tromey <tom@tromey.com>
1211
1212 * infrun.c (save_infcall_suspend_state): Return
1213 infcall_suspend_state_up.
1214 (save_infcall_control_state): Return infcall_control_state_up.
1215 * inferior.h (save_infcall_suspend_state)
1216 (save_infcall_control_state): Declare later. Return unique
1217 pointers.
1218
1219 2018-09-17 Tom Tromey <tom@tromey.com>
1220
1221 * infrun.c (struct stop_context): Declare constructor,
1222 destructor, "changed" method.
1223 (stop_context::stop_context): Rename from save_stop_context.
1224 (stop_context::~stop_context): Rename from
1225 release_stop_context_cleanup.
1226 (normal_stop): Update.
1227 (stop_context::changed): Rename from stop_context_changed. Return
1228 bool.
1229
1230 2018-09-17 Tom Tromey <tom@tromey.com>
1231
1232 * inferior.h (struct infcall_suspend_state_deleter): New.
1233 (infcall_suspend_state_up): New typedef.
1234 (struct infcall_control_state_deleter): New.
1235 (infcall_control_state_up): New typedef.
1236 (make_cleanup_restore_infcall_suspend_state)
1237 (make_cleanup_restore_infcall_control_state): Don't declare.
1238 * infcall.c (call_function_by_hand_dummy): Update.
1239 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1240 (make_cleanup_restore_infcall_suspend_state): Remove.
1241 (do_restore_infcall_control_state_cleanup)
1242 (make_cleanup_restore_infcall_control_state): Remove.
1243
1244 2018-09-17 Tom Tromey <tom@tromey.com>
1245
1246 * gdbthread.h (struct thread_control_state): Add initializer.
1247 (class thread_info) <control>: Remove initializer.
1248 * inferior.h (struct inferior_control_state): Add initializer.
1249 (class inferior) <control>: Remove initializer.
1250 (exit_inferior_1): Update.
1251 * infrun.c (struct infcall_control_state): Add constructors.
1252 (save_infcall_control_state): Use new.
1253 (restore_infcall_control_state, discard_infcall_control_state):
1254 Use delete.
1255
1256 2018-09-17 Tom Tromey <tom@tromey.com>
1257
1258 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1259 unique_ptr.
1260 <siginfo_data>: Now a unique_xmalloc_ptr.
1261 (save_infcall_suspend_state, restore_infcall_suspend_state)
1262 (discard_infcall_suspend_state)
1263 (get_infcall_suspend_state_regcache): Update.
1264
1265 2018-09-17 Tom Tromey <tom@tromey.com>
1266
1267 * gdbthread.h (struct thread_suspend_state): Add initializers.
1268 (class thread_info) <suspend>: Remove initializer.
1269 * infrun.c (struct infcall_suspend_state): Add initializers.
1270 (save_infcall_suspend_state): Use new.
1271 (discard_infcall_suspend_state): Use delete.
1272
1273 2018-09-16 Tom Tromey <tom@tromey.com>
1274
1275 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1276 Remove.
1277 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1278 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1279 (py_varobj_iter_new): Likewise.
1280 (py_varobj_get_iterator): Use gdbpy_ref.
1281
1282 2018-09-16 Tom Tromey <tom@tromey.com>
1283
1284 * python/py-threadevent.c (py_get_event_thread): Simplify.
1285 * python/py-inferior.c (infpy_thread_from_thread_handle):
1286 Return immediately after calling thread_to_thread_object. Use
1287 Py_RETURN_NONE.
1288 (thread_to_thread_object): Set the exception on a NULL return.
1289
1290 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1291
1292 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1293
1294 2018-09-16 Tom Tromey <tom@tromey.com>
1295
1296 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1297 Remove.
1298
1299 2018-09-16 Tom Tromey <tom@tromey.com>
1300
1301 * python/python-internal.h (thread_to_thread_object): Change
1302 return type.
1303 * python/py-inferior.c (thread_to_thread_object): Return a new
1304 reference.
1305 (infpy_thread_from_thread_handle): Update.
1306 * python/py-infthread.c (gdbpy_selected_thread): Update.
1307 * python/py-stopevent.c (create_stop_event_object): Update.
1308 * python/py-threadevent.c (py_get_event_thread): Return a new
1309 reference.
1310 (py_get_event_thread): Update.
1311 * python/py-event.h (py_get_event_thread): Change return type.
1312 * python/py-continueevent.c (create_continue_event_object):
1313 Update.
1314
1315 2018-09-16 Tom Tromey <tom@tromey.com>
1316
1317 * python/py-progspace.c (pspy_get_objfiles): Update.
1318 * python/python-internal.h (objfile_to_objfile_object): Change
1319 return type.
1320 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1321 Update.
1322 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1323 Update.
1324 * python/python.c (gdbpy_get_current_objfile): Update.
1325 (gdbpy_objfiles): Update.
1326 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1327 Update.
1328 (objfile_to_objfile_object): Return a new reference.
1329 * python/py-symtab.c (stpy_get_objfile): Update.
1330 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1331 Update.
1332
1333 2018-09-16 Tom Tromey <tom@tromey.com>
1334
1335 * python/py-inferior.c (infpy_get_progspace): Update.
1336 * python/python-internal.h (pspace_to_pspace_object): Change
1337 return type.
1338 * python/py-newobjfileevent.c
1339 (create_clear_objfiles_event_object): Update.
1340 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1341 Update.
1342 * python/python.c (gdbpy_get_current_progspace): Update.
1343 (gdbpy_progspaces): Update.
1344 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1345 reference.
1346 * python/py-objfile.c (objfpy_get_progspace): Update.
1347 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1348 Update.
1349
1350 2018-09-16 Tom Tromey <tom@tromey.com>
1351
1352 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1353 (solib_name, block_for_pc, find_pc_line): New functions.
1354 (execute_unwinders): Update.
1355 * python/py-block.c (gdbpy_block_for_pc): Remove.
1356 * python/py-inferior.c (infpy_get_progspace): New function.
1357 (inferior_object_getset) <progspace>: Add.
1358 * python/py-progspace.c (pspy_objfiles): Rewrite.
1359 (pspy_solib_name, pspy_block_for_pc)
1360 (pspy_find_pc_line, pspy_is_valid): New functions.
1361 (progspace_object_methods): Add entries for solib_name,
1362 block_for_pc, find_pc_line, is_valid.
1363 * python/python-internal.h (gdbpy_block_for_pc)
1364 (build_objfiles_list): Don't declare.
1365 * python/python.c: Don't include solib.h.
1366 (gdbpy_solib_name, gdbpy_find_pc_line)
1367 (gdbpy_get_current_progspace, build_objfiles_list)
1368 (gdbpy_objfiles): Remove.
1369 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1370 solib_name, find_pc_line>: Remove entries.
1371
1372 2018-09-16 Tom Tromey <tom@tromey.com>
1373
1374 * top.c (new_ui_command): Use GNU style for metasyntactic
1375 variables.
1376 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1377 variables.
1378 * maint.c (maintenance_translate_address): Remove "<>" around
1379 text.
1380 * interps.c (interpreter_exec_cmd): Use GNU style for
1381 metasyntactic variables.
1382 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1383 metasyntactic variables.
1384 * tracepoint.c (tfind_range_command): Use GNU style for
1385 metasyntactic variables.
1386 (tfind_outside_command): Likewise.
1387 (_initialize_tracepoint): Likewise.
1388 * remote.c (extended_remote_target::create_inferior): Use GNU
1389 style for metasyntactic variables.
1390 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1391 metasyntactic variables.
1392 (adi_assign_command): Likewise.
1393
1394 2018-09-16 Tom Tromey <tom@tromey.com>
1395
1396 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1397 metasyntactic variables. Print message if no disassembler options
1398 are available.
1399
1400 2018-09-15 Tom Tromey <tom@tromey.com>
1401
1402 * infcmd.c (get_inferior_args): Return const char *.
1403 * inferior.h (get_inferior_args): Return type now const.
1404 * linux-tdep.c (linux_fill_prpsinfo): Update.
1405 * procfs.c (procfs_target::make_corefile_notes): Update.
1406
1407 2018-09-07 Tom Tromey <tom@tromey.com>
1408
1409 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1410 inside the TRY.
1411
1412 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1413
1414 * nios2-tdep.c (nios2_type_align): New.
1415 (nios2_gdb_arch_init): Install type_align hook.
1416
1417 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1418
1419 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1420 type that is neither object file owned, nor gdbarch owned.
1421 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1422 gdbarch is non-NULL.
1423 (alloc_type_instance): Allocate non-objfile owned types on the
1424 gdbarch obstack.
1425 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1426 using TYPE_ALLOC to ensure memory is allocated on the correct
1427 obstack.
1428 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1429 obstack, or the gdbarch obstack.
1430 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1431
1432 2018-09-14 Tom Tromey <tom@tromey.com>
1433
1434 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1435 block.
1436
1437 2018-09-14 Tom Tromey <tom@tromey.com>
1438
1439 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1440
1441 2018-09-13 Tom Tromey <tom@tromey.com>
1442
1443 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1444 static.
1445
1446 2018-09-13 Tom Tromey <tom@tromey.com>
1447
1448 * exec.c (try_open_exec_file): Use std::string.
1449
1450 2018-09-13 Tom Tromey <tom@tromey.com>
1451
1452 * utils.h (gdb_bfd_errmsg): Return std::string.
1453 * exec.c (exec_file_attach): Update.
1454 * compile/compile-object-load.c (compile_object_load): Update.
1455 * utils.c (gdb_bfd_errmsg): Return std::string.
1456
1457 2018-09-13 Tom Tromey <tom@tromey.com>
1458
1459 * procfs.c (struct procinfo_deleter): New.
1460 (procinfo_up): New typedef.
1461 (do_destroy_procinfo_cleanup): Remove.
1462 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
1463
1464 2018-09-13 Tom Tromey <tom@tromey.com>
1465
1466 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1467
1468 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1469 2018-09-13 Tom Tromey <tom@tromey.com>
1470
1471 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1472 (pspy_get_objfiles): New function.
1473 (progspace_object_methods): New.
1474 (pspace_object_type): Add tp_methods callback.
1475 * python/python-internal.h (build_objfiles_list): New
1476 declaration.
1477 * python/python.c (build_objfiles_list): New function.
1478 (gdbpy_objfiles): Implement using build_objfiles_list.
1479 * NEWS: Mention the Progspace.objfiles method.
1480
1481 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1482
1483 * python/py-inferior.c (infpy_get_progspace): New function.
1484 (inferior_object_getset): Add progspace property.
1485 * NEWS: Mention the new property.
1486
1487 2018-09-13 Tom Tromey <tom@tromey.com>
1488
1489 PR rust/23650:
1490 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1491
1492 2018-09-13 Tom Tromey <tom@tromey.com>
1493
1494 PR rust/23626:
1495 * rust-lang.c (rust_enum_variant): Now static.
1496 (rust_empty_enum_p): New function.
1497 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1498 Handle empty enum.
1499
1500 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
1501
1502 * python/py-inferior.c (infpy_repr): New.
1503 (inferior_object_type): Register infpy_repr.
1504 * python/py-objfile.c (objfpy_repr): New.
1505 (objfile_object_type): Register objfpy_repr.
1506
1507 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1508
1509 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1510
1511 2018-09-12 John Baldwin <jhb@FreeBSD.org>
1512
1513 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1514 typo.
1515
1516 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
1517
1518 * common/common-utils.c: Don't include '<sys/stat.h>'.
1519 (is_regular_file): Move to...
1520 * common/filestuff.c (is_regular_file): ... here.
1521 * common/common-utils.h (is_regular_file): Move to...
1522 * common/filestuff.h (is_regular_file): ... here.
1523
1524 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
1525
1526 * skip.c (debug_skip): New variable.
1527 (skiplist_entry::do_skip_file_p): Add debug output.
1528 (skiplist_entry::do_skip_gfile_p): Likewise.
1529 (skiplist_entry::skip_function_p): Likewise.
1530 (_initialize_step_skip): Create debug command.
1531 * NEWS: Mention set/show debug skip.
1532
1533 2018-09-11 Xavier Roirand <roirand@adacore.com>
1534
1535 * darwin-nat.c (should_disable_startup_with_shell):
1536 New function.
1537 (darwin_nat_target::create_inferior): Add call.
1538
1539 2018-09-11 Xavier Roirand <roirand@adacore.com>
1540
1541 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1542 inf_port, msg_state>: Initialize.
1543 (struct darwin_thread_info) <signaled, single_step>: Change
1544 type and initialize.
1545 (struct darwin_thread_info) <event>: Initialize.
1546
1547 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1548
1549 PR gdb/23555
1550 PR gdb/23558
1551 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1552 guesses.
1553
1554 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1555
1556 Revert:
1557 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
1558
1559 PR gdb/23555
1560 PR gdb/23558
1561 * gnulib/aclocal.m4: Regenerate.
1562 * gnulib/config.in: Regenerate.
1563 * gnulib/configure: Regenerate.
1564 * gnulib/import/Makefile.am: Update.
1565 * gnulib/import/Makefile.in: Update.
1566 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1567 * gnulib/import/_Noreturn.h: ... this.
1568 * gnulib/import/alloca.in.h: Update.
1569 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1570 * gnulib/import/arg-nonnull.h: ... this.
1571 * gnulib/import/assure.h: Update.
1572 * gnulib/import/at-func.c: Update.
1573 * gnulib/import/basename-lgpl.c: Update.
1574 * gnulib/import/extra/snippet/c++defs.h: Rename to...
1575 * gnulib/import/c++defs.h: ... this.
1576 * gnulib/import/canonicalize-lgpl.c: Update.
1577 * gnulib/import/cdefs.h: Update.
1578 * gnulib/import/chdir-long.c: Update.
1579 * gnulib/import/chdir-long.h: Update.
1580 * gnulib/import/cloexec.c: Update.
1581 * gnulib/import/cloexec.h: Update.
1582 * gnulib/import/close.c: Update.
1583 * gnulib/import/closedir.c: Update.
1584 * gnulib/import/config.charset: Update.
1585 * gnulib/import/dirent-private.h: Update.
1586 * gnulib/import/dirent.in.h: Update.
1587 * gnulib/import/dirfd.c: Update.
1588 * gnulib/import/dirname-lgpl.c: Update.
1589 * gnulib/import/dirname.h: Update.
1590 * gnulib/import/dosname.h: Update.
1591 * gnulib/import/dup-safer-flag.c: Update.
1592 * gnulib/import/dup-safer.c: Update.
1593 * gnulib/import/dup.c: Update.
1594 * gnulib/import/dup2.c: Update.
1595 * gnulib/import/errno.in.h: Update.
1596 * gnulib/import/error.c: Update.
1597 * gnulib/import/error.h: Update.
1598 * gnulib/import/exitfail.c: Update.
1599 * gnulib/import/exitfail.h: Update.
1600 * gnulib/import/extra/update-copyright: Update.
1601 * gnulib/import/fchdir.c: Update.
1602 * gnulib/import/fcntl.c: Update.
1603 * gnulib/import/fcntl.in.h: Update.
1604 * gnulib/import/fd-hook.c: Update.
1605 * gnulib/import/fd-hook.h: Update.
1606 * gnulib/import/fd-safer-flag.c: Update.
1607 * gnulib/import/fd-safer.c: Update.
1608 * gnulib/import/fdopendir.c: Update.
1609 * gnulib/import/filename.h: Update.
1610 * gnulib/import/filenamecat-lgpl.c: Update.
1611 * gnulib/import/filenamecat.h: Update.
1612 * gnulib/import/flexmember.h: Update.
1613 * gnulib/import/float+.h: Update.
1614 * gnulib/import/float.c: Update.
1615 * gnulib/import/float.in.h: Update.
1616 * gnulib/import/fnmatch.c: Update.
1617 * gnulib/import/fnmatch.in.h: Update.
1618 * gnulib/import/fnmatch_loop.c: Update.
1619 * gnulib/import/fpucw.h: Update.
1620 * gnulib/import/frexp.c: Update.
1621 * gnulib/import/frexpl.c: Update.
1622 * gnulib/import/fstat.c: Update.
1623 * gnulib/import/fstatat.c: Update.
1624 * gnulib/import/getcwd-lgpl.c: Update.
1625 * gnulib/import/getcwd.c: Update.
1626 * gnulib/import/getdtablesize.c: Update.
1627 * gnulib/import/getlogin_r.c: Update.
1628 * gnulib/import/getprogname.c: Update.
1629 * gnulib/import/getprogname.h: Update.
1630 * gnulib/import/gettext.h: Update.
1631 * gnulib/import/gettimeofday.c: Update.
1632 * gnulib/import/glob-libc.h: Update.
1633 * gnulib/import/glob.c: Update.
1634 * gnulib/import/glob.in.h: Update.
1635 * gnulib/import/glob_internal.h: Update.
1636 * gnulib/import/glob_pattern_p.c: Update.
1637 * gnulib/import/globfree.c: Update.
1638 * gnulib/import/hard-locale.c: Update.
1639 * gnulib/import/hard-locale.h: Update.
1640 * gnulib/import/intprops.h: Update.
1641 * gnulib/import/inttypes.in.h: Update.
1642 * gnulib/import/isnan.c: Update.
1643 * gnulib/import/isnand-nolibm.h: Update.
1644 * gnulib/import/isnand.c: Update.
1645 * gnulib/import/isnanl-nolibm.h: Update.
1646 * gnulib/import/isnanl.c: Update.
1647 * gnulib/import/itold.c: Update.
1648 * gnulib/import/libc-config.h: Update.
1649 * gnulib/import/limits.in.h: Update.
1650 * gnulib/import/localcharset.c: Update.
1651 * gnulib/import/localcharset.h: Update.
1652 * gnulib/import/localtime-buffer.c: Update.
1653 * gnulib/import/localtime-buffer.h: Update.
1654 * gnulib/import/lstat.c: Update.
1655 * gnulib/import/m4/00gnulib.m4: Update.
1656 * gnulib/import/m4/__inline.m4: Update.
1657 * gnulib/import/m4/absolute-header.m4: Update.
1658 * gnulib/import/m4/alloca.m4: Update.
1659 * gnulib/import/m4/builtin-expect.m4: Update.
1660 * gnulib/import/m4/canonicalize.m4: Update.
1661 * gnulib/import/m4/chdir-long.m4: Update.
1662 * gnulib/import/m4/close.m4: Update.
1663 * gnulib/import/m4/closedir.m4: Update.
1664 * gnulib/import/m4/configmake.m4: Update.
1665 * gnulib/import/m4/d-ino.m4: Update.
1666 * gnulib/import/m4/d-type.m4: Update.
1667 * gnulib/import/m4/dirent_h.m4: Update.
1668 * gnulib/import/m4/dirfd.m4: Update.
1669 * gnulib/import/m4/dirname.m4: Update.
1670 * gnulib/import/m4/double-slash-root.m4: Update.
1671 * gnulib/import/m4/dup.m4: Update.
1672 * gnulib/import/m4/dup2.m4: Update.
1673 * gnulib/import/m4/eealloc.m4: Update.
1674 * gnulib/import/m4/environ.m4: Update.
1675 * gnulib/import/m4/errno_h.m4: Update.
1676 * gnulib/import/m4/error.m4: Update.
1677 * gnulib/import/m4/exponentd.m4: Update.
1678 * gnulib/import/m4/exponentl.m4: Update.
1679 * gnulib/import/m4/extensions.m4: Update.
1680 * gnulib/import/m4/extern-inline.m4: Update.
1681 * gnulib/import/m4/fchdir.m4: Update.
1682 * gnulib/import/m4/fcntl-o.m4: Update.
1683 * gnulib/import/m4/fcntl.m4: Update.
1684 * gnulib/import/m4/fcntl_h.m4: Update.
1685 * gnulib/import/m4/fdopendir.m4: Update.
1686 * gnulib/import/m4/filenamecat.m4: Update.
1687 * gnulib/import/m4/flexmember.m4: Update.
1688 * gnulib/import/m4/float_h.m4: Update.
1689 * gnulib/import/m4/fnmatch.m4: Update.
1690 * gnulib/import/m4/fnmatch_h.m4: Update.
1691 * gnulib/import/m4/fpieee.m4: Update.
1692 * gnulib/import/m4/frexp.m4: Update.
1693 * gnulib/import/m4/frexpl.m4: Update.
1694 * gnulib/import/m4/fstat.m4: Update.
1695 * gnulib/import/m4/fstatat.m4: Update.
1696 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1697 * gnulib/import/m4/getcwd-path-max.m4: Update.
1698 * gnulib/import/m4/getcwd.m4: Update.
1699 * gnulib/import/m4/getdtablesize.m4: Update.
1700 * gnulib/import/m4/getlogin.m4: Update.
1701 * gnulib/import/m4/getlogin_r.m4: Update.
1702 * gnulib/import/m4/getpagesize.m4: Update.
1703 * gnulib/import/m4/getprogname.m4: Update.
1704 * gnulib/import/m4/gettimeofday.m4: Update.
1705 * gnulib/import/m4/glibc21.m4: Update.
1706 * gnulib/import/m4/glob.m4: Update.
1707 * gnulib/import/m4/glob_h.m4: Update.
1708 * gnulib/import/m4/gnulib-cache.m4: Update.
1709 * gnulib/import/m4/gnulib-common.m4: Update.
1710 * gnulib/import/m4/gnulib-comp.m4: Update.
1711 * gnulib/import/m4/gnulib-tool.m4: Update.
1712 * gnulib/import/m4/hard-locale.m4: Update.
1713 * gnulib/import/m4/include_next.m4: Update.
1714 * gnulib/import/m4/inttypes-pri.m4: Update.
1715 * gnulib/import/m4/inttypes.m4: Update.
1716 * gnulib/import/m4/isnand.m4: Update.
1717 * gnulib/import/m4/isnanl.m4: Update.
1718 * gnulib/import/m4/largefile.m4: Update.
1719 * gnulib/import/m4/limits-h.m4: Update.
1720 * gnulib/import/m4/localcharset.m4: Update.
1721 * gnulib/import/m4/locale-fr.m4: Update.
1722 * gnulib/import/m4/locale-ja.m4: Update.
1723 * gnulib/import/m4/locale-zh.m4: Update.
1724 * gnulib/import/m4/localtime-buffer.m4: Update.
1725 * gnulib/import/m4/longlong.m4: Update.
1726 * gnulib/import/m4/lstat.m4: Update.
1727 * gnulib/import/m4/malloc.m4: Update.
1728 * gnulib/import/m4/malloca.m4: Update.
1729 * gnulib/import/m4/math_h.m4: Update.
1730 * gnulib/import/m4/mbrtowc.m4: Update.
1731 * gnulib/import/m4/mbsinit.m4: Update.
1732 * gnulib/import/m4/mbsrtowcs.m4: Update.
1733 * gnulib/import/m4/mbstate_t.m4: Update.
1734 * gnulib/import/m4/memchr.m4: Update.
1735 * gnulib/import/m4/memmem.m4: Update.
1736 * gnulib/import/m4/mempcpy.m4: Update.
1737 * gnulib/import/m4/memrchr.m4: Update.
1738 * gnulib/import/m4/mkdir.m4: Update.
1739 * gnulib/import/m4/mkstemp.m4: Update.
1740 * gnulib/import/m4/mmap-anon.m4: Update.
1741 * gnulib/import/m4/mode_t.m4: Update.
1742 * gnulib/import/m4/msvc-inval.m4: Update.
1743 * gnulib/import/m4/msvc-nothrow.m4: Update.
1744 * gnulib/import/m4/multiarch.m4: Update.
1745 * gnulib/import/m4/nocrash.m4: Update.
1746 * gnulib/import/m4/off_t.m4: Update.
1747 * gnulib/import/m4/onceonly.m4: Update.
1748 * gnulib/import/m4/open-cloexec.m4: Update.
1749 * gnulib/import/m4/open.m4: Update.
1750 * gnulib/import/m4/openat.m4: Update.
1751 * gnulib/import/m4/opendir.m4: Update.
1752 * gnulib/import/m4/pathmax.m4: Update.
1753 * gnulib/import/m4/rawmemchr.m4: Update.
1754 * gnulib/import/m4/readdir.m4: Update.
1755 * gnulib/import/m4/readlink.m4: Update.
1756 * gnulib/import/m4/realloc.m4: Update.
1757 * gnulib/import/m4/rename.m4: Update.
1758 * gnulib/import/m4/rewinddir.m4: Update.
1759 * gnulib/import/m4/rmdir.m4: Update.
1760 * gnulib/import/m4/save-cwd.m4: Update.
1761 * gnulib/import/m4/secure_getenv.m4: Update.
1762 * gnulib/import/m4/setenv.m4: Update.
1763 * gnulib/import/m4/signal_h.m4: Update.
1764 * gnulib/import/m4/ssize_t.m4: Update.
1765 * gnulib/import/m4/stat-time.m4: Update.
1766 * gnulib/import/m4/stat.m4: Update.
1767 * gnulib/import/m4/std-gnu11.m4: Update.
1768 * gnulib/import/m4/stdbool.m4: Update.
1769 * gnulib/import/m4/stddef_h.m4: Update.
1770 * gnulib/import/m4/stdint.m4: Update.
1771 * gnulib/import/m4/stdio_h.m4: Update.
1772 * gnulib/import/m4/stdlib_h.m4: Update.
1773 * gnulib/import/m4/strchrnul.m4: Update.
1774 * gnulib/import/m4/strdup.m4: Update.
1775 * gnulib/import/m4/strerror.m4: Update.
1776 * gnulib/import/m4/string_h.m4: Update.
1777 * gnulib/import/m4/strstr.m4: Update.
1778 * gnulib/import/m4/strtok_r.m4: Update.
1779 * gnulib/import/m4/sys_socket_h.m4: Update.
1780 * gnulib/import/m4/sys_stat_h.m4: Update.
1781 * gnulib/import/m4/sys_time_h.m4: Update.
1782 * gnulib/import/m4/sys_types_h.m4: Update.
1783 * gnulib/import/m4/tempname.m4: Update.
1784 * gnulib/import/m4/time_h.m4: Update.
1785 * gnulib/import/m4/unistd-safer.m4: Update.
1786 * gnulib/import/m4/unistd_h.m4: Update.
1787 * gnulib/import/m4/warn-on-use.m4: Update.
1788 * gnulib/import/m4/wchar_h.m4: Update.
1789 * gnulib/import/m4/wchar_t.m4: Update.
1790 * gnulib/import/m4/wctype_h.m4: Update.
1791 * gnulib/import/m4/wint_t.m4: Update.
1792 * gnulib/import/malloc.c: Update.
1793 * gnulib/import/malloc/scratch_buffer.h: Update.
1794 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1795 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1796 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1797 * gnulib/import/malloca.c: Update.
1798 * gnulib/import/malloca.h: Update.
1799 * gnulib/import/malloca.valgrind: Update.
1800 * gnulib/import/math.in.h: Update.
1801 * gnulib/import/mbrtowc.c: Update.
1802 * gnulib/import/mbsinit.c: Update.
1803 * gnulib/import/mbsrtowcs-impl.h: Update.
1804 * gnulib/import/mbsrtowcs-state.c: Update.
1805 * gnulib/import/mbsrtowcs.c: Update.
1806 * gnulib/import/memchr.c: Update.
1807 * gnulib/import/memmem.c: Update.
1808 * gnulib/import/mempcpy.c: Update.
1809 * gnulib/import/memrchr.c: Update.
1810 * gnulib/import/mkdir.c: Update.
1811 * gnulib/import/mkstemp.c: Update.
1812 * gnulib/import/msvc-inval.c: Update.
1813 * gnulib/import/msvc-inval.h: Update.
1814 * gnulib/import/msvc-nothrow.c: Update.
1815 * gnulib/import/msvc-nothrow.h: Update.
1816 * gnulib/import/open.c: Update.
1817 * gnulib/import/openat-die.c: Update.
1818 * gnulib/import/openat-priv.h: Update.
1819 * gnulib/import/openat-proc.c: Update.
1820 * gnulib/import/openat.c: Update.
1821 * gnulib/import/openat.h: Update.
1822 * gnulib/import/opendir.c: Update.
1823 * gnulib/import/pathmax.h: Update.
1824 * gnulib/import/pipe-safer.c: Update.
1825 * gnulib/import/rawmemchr.c: Update.
1826 * gnulib/import/readdir.c: Update.
1827 * gnulib/import/readlink.c: Update.
1828 * gnulib/import/realloc.c: Update.
1829 * gnulib/import/ref-add.sin: Update.
1830 * gnulib/import/ref-del.sin: Update.
1831 * gnulib/import/rename.c: Update.
1832 * gnulib/import/rewinddir.c: Update.
1833 * gnulib/import/rmdir.c: Update.
1834 * gnulib/import/same-inode.h: Update.
1835 * gnulib/import/save-cwd.c: Update.
1836 * gnulib/import/save-cwd.h: Update.
1837 * gnulib/import/scratch_buffer.h: Update.
1838 * gnulib/import/secure_getenv.c: Update.
1839 * gnulib/import/setenv.c: Update.
1840 * gnulib/import/signal.in.h: Update.
1841 * gnulib/import/stat-time.c: Update.
1842 * gnulib/import/stat-time.h: Update.
1843 * gnulib/import/stat-w32.c: Update.
1844 * gnulib/import/stat-w32.h: Update.
1845 * gnulib/import/stat.c: Update.
1846 * gnulib/import/stdbool.in.h: Update.
1847 * gnulib/import/stddef.in.h: Update.
1848 * gnulib/import/stdint.in.h: Update.
1849 * gnulib/import/stdio.in.h: Update.
1850 * gnulib/import/stdlib.in.h: Update.
1851 * gnulib/import/str-two-way.h: Update.
1852 * gnulib/import/strchrnul.c: Update.
1853 * gnulib/import/strdup.c: Update.
1854 * gnulib/import/streq.h: Update.
1855 * gnulib/import/strerror-override.c: Update.
1856 * gnulib/import/strerror-override.h: Update.
1857 * gnulib/import/strerror.c: Update.
1858 * gnulib/import/string.in.h: Update.
1859 * gnulib/import/stripslash.c: Update.
1860 * gnulib/import/strnlen1.c: Update.
1861 * gnulib/import/strnlen1.h: Update.
1862 * gnulib/import/strstr.c: Update.
1863 * gnulib/import/strtok_r.c: Update.
1864 * gnulib/import/sys_stat.in.h: Update.
1865 * gnulib/import/sys_time.in.h: Update.
1866 * gnulib/import/sys_types.in.h: Update.
1867 * gnulib/import/tempname.c: Update.
1868 * gnulib/import/tempname.h: Update.
1869 * gnulib/import/time.in.h: Update.
1870 * gnulib/import/unistd--.h: Update.
1871 * gnulib/import/unistd-safer.h: Update.
1872 * gnulib/import/unistd.in.h: Update.
1873 * gnulib/import/unsetenv.c: Update.
1874 * gnulib/import/verify.h: Update.
1875 * gnulib/import/extra/snippet/warn-on-use.h: Update.
1876 * gnulib/import/wchar.in.h: Update.
1877 * gnulib/import/wctype.in.h: Update.
1878 * gnulib/import/xalloc-oversized.h: Update.
1879 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1880 "53e2c179f26a890fa6685af4b6c1397ee370433b".
1881
1882 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
1883
1884 * record-btrace.c (get_thread_current_frame): Remove
1885 old_inferior_ptid.
1886
1887 2018-09-10 Jerome Guitton <guitton@adacore.com>
1888
1889 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1890 with check_tag to 1 if and only if the type is tagged and the
1891 component being searched cannot been found in the current
1892 view. Otherwise, always call ada_to_fixed_type with
1893 check_tag to 0.
1894
1895 2018-09-10 Xavier Roirand <roirand@adacore.com>
1896
1897 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1898 declaration.
1899 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1900 * ada-varobj.c (ada_varobj_get_number_of_children,
1901 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1902
1903 2018-09-10 Xavier Roirand <roirand@adacore.com>
1904
1905 * ada-valprint.c (ada_value_print): Use type instead of
1906 enclosing type.
1907
1908 2018-09-10 Xavier Roirand <roirand@adacore.com>
1909
1910 * ada-lang.c (ada_value_subscript): Handle case when parameter is
1911 an array of access to unconstrained array.
1912
1913 2018-09-10 Xavier Roirand <roirand@adacore.com>
1914
1915 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1916 (ada_check_typedef): Use it.
1917
1918 2018-09-10 Xavier Roirand <roirand@adacore.com>
1919
1920 * ada-varobj.c (ada_varobj_describe_struct_child)
1921 (ada_varobj_describe_child): Handle union case like struct one.
1922
1923 2018-09-10 Tom Tromey <tom@tromey.com>
1924
1925 PR python/18380:
1926 * python/python.c (_initialize_python): Make example in "python"
1927 help work in Python 3.
1928
1929 2018-09-10 Eli Zaretskii <eliz@gnu.org>
1930
1931 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1932 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
1933 $(EXEEXT) to the script, as it is not a program.
1934
1935 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
1936
1937 * python/py-prettyprint.c (pretty_print_one_value): Return
1938 gdbpy_ref<>.
1939 (print_string_repr): Adjust.
1940 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1941 * python/python-internal.h (apply_varobj_pretty_printer): Return
1942 gdbpy_ref<>.
1943 * varobj.c (varobj_value_get_print_value): Adjust.
1944
1945 2018-09-08 Tom Tromey <tom@tromey.com>
1946
1947 PR python/16047:
1948 * python/py-prettyprint.c (pretty_print_one_value): Check for
1949 to_string method.
1950
1951 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1952
1953 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1954 replace_operator_with_call.
1955
1956 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1957
1958 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1959
1960 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1961
1962 * ada-typeprint.c (print_range): Print the bounds using TYPE
1963 rather than its TYPE_TARGET_TYPE.
1964
1965 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1966
1967 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1968 call to ada_to_fixed_value_create.
1969
1970 2018-09-08 Jerome Guitton <guitton@adacore.com>
1971
1972 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1973
1974 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1975
1976 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1977 by calls to error.
1978
1979 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1980
1981 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1982 Move update of loop variable "fi".
1983
1984 2018-09-08 Joel Brobecker <brobecker@adacore.com>
1985
1986 * ada-lang.c (value_assign_to_component): In the case of
1987 big-endian targets, extract the bits of the given VAL
1988 using an src_offset of zero if container is not a scalar.
1989
1990 2018-09-06 Simon Ser <contact@emersion.fr>
1991
1992 PR gdb/23105
1993 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1994 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1995 * fbsd-tdep.c (fbsd_make_note_desc): New.
1996 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1997 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1998 * target.h (enum target_object) Add FreeBSD-specific
1999 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2000
2001 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2002
2003 * compile/compile-c.h (generate_c_for_variable_locations):
2004 Change reference to pointer.
2005 * compile/compile-c-support.c (compile_program) <compute>:
2006 Likewise.
2007 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2008 (generate_c_for_for_one_variable): Likewise
2009 (generate_c_for_variable_locations): Likewise
2010 * compile/compile-c-types.c (compile_c_instance::convert_type):
2011 Likewise
2012 * compile/compile-cplus-symbols.c (convert_one_symbol):
2013 std::move the scope passed to enter_scope.
2014 * compile/compile-cplus-types.c
2015 (compile_cplus_instance::enter_scope): Make parameter
2016 rvalue-reference.
2017 (compile_cplus_instance::new_scope): Change reference to
2018 pointer.
2019 (compile_cplus_instance::convert_type): Likewise
2020 (compile_cplus_convert_typedef): std::move the scope passed to
2021 enter_scope.
2022 (compile_cplus_convert_struct_or_union): Likewise.
2023 (compile_cplus_convert_enum): Likewise.
2024 (compile_cplus_convert_namespace): Likewise.
2025 * compile/compile-cplus.h (compile_cplus_instance)
2026 <enter_scope>: Make parameter rvalue-reference.
2027 * compile/compile-internal.h (compile_instance)
2028 <get_cached_type>: Likewise
2029 * compile/compile-loc2c.c (push): Likewise
2030 (pushf): Likewise
2031 (unary): Likewise
2032 (binary): Likewise
2033 (print_label): Likewise
2034 (pushf_register_address): Likewise
2035 (pushf_register): Likewise
2036 (do_compile_dwarf_expr_to_c): Likewise
2037 (compile_dwarf_expr_to_c): Likewise
2038 (compile_dwarf_bounds_to_c): Likewise
2039 * compile/compile.c (compile_instance::get_cached_type):
2040 Likewise
2041 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2042 (compile_dwarf_bounds_to_c): Likewise
2043 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2044 (dwarf2_compile_property_to_c): Likewise
2045 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2046 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2047 Likewise
2048
2049 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2050
2051 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2052 * tui/tui-data.c (init_content_element): Don't initialize it.
2053
2054 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2055
2056 * tui/tui-data.h (struct tui_win_info)
2057 <detail::opaque>: Remove.
2058 * tui/tui-data.c (init_win_info): Remove assignment.
2059
2060 2018-09-05 Tom Tromey <tom@tromey.com>
2061
2062 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2063 -Wformat-nonliteral.
2064 * target-float.c (host_float_ops<T>::to_string)
2065 (host_float_ops<T>::from_string): Use
2066 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2067 * configure: Rebuild.
2068
2069 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2070
2071 * printcmd.c (printf_c_string): Use
2072 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2073 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2074
2075 2018-09-05 Tom Tromey <tom@tromey.com>
2076
2077 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2078
2079 2018-09-05 Tom de Vries <tdevries@suse.de>
2080
2081 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2082 with resolve_abstract_p == true.
2083 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2084 defaulting to false. Propagate resolve_abstract_p to
2085 dwarf2_fetch_die_loc_sect_off.
2086 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2087 parameter, defaulting to false.
2088 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2089 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2090 parameter.
2091 * dwarf2read.h (struct die_info): Forward-declare.
2092 (die_info_ptr): New typedef.
2093 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2094
2095 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2096
2097 GDB 8.2 released.
2098
2099 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2100 Pedro Alves <palves@redhat.com>
2101
2102 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2103 "aclocal-m4-deps.mk". Include file here.
2104 $(srcdir)/aclocal.m4: Add "configure.ac".
2105 * gnulib/aclocal-m4-deps.mk: New file.
2106 * gnulib/update-gnulib.sh: Automatically update
2107 "aclocal-m4-deps.mk".
2108
2109 2018-09-04 Tom Tromey <tom@tromey.com>
2110
2111 * configure: Rebuild.
2112 * configure.ac: Remove multi-ice code.
2113
2114 2018-09-04 Tom Tromey <tom@tromey.com>
2115
2116 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2117 (ada-exp.o): Update.
2118
2119 2018-09-04 Tom Tromey <tom@tromey.com>
2120
2121 * Makefile.in (printcmd.o, target-float.o): Remove.
2122 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2123
2124 2018-09-04 Tom Tromey <tom@tromey.com>
2125
2126 * gnulib/Makefile.in: Remove obsolete comment.
2127 * Makefile.in: Remove obsolete comment.
2128
2129 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2130
2131 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2132 line with '+'.
2133
2134 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2135
2136 * riscv-tdep.c: Add 'prologue-value.h' include.
2137 (struct riscv_unwind_cache): New struct.
2138 (riscv_debug_unwinder): New global.
2139 (riscv_scan_prologue): Update arguments, capture register details
2140 from prologue scan.
2141 (riscv_skip_prologue): Reformat arguments line, move end of
2142 prologue calculation into riscv_scan_prologue.
2143 (riscv_frame_cache): Update return type, create
2144 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2145 details.
2146 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2147 (riscv_frame_prev_register): Use the trad_frame within the
2148 riscv_unwind_cache.
2149 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2150 flag.
2151
2152 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2153
2154 * trad-frame.h (trad_frame_set_realreg): Declare.
2155 (trad_frame_set_addr): Declare.
2156 * trad-frame.c (trad_frame_set_realreg): Define new function.
2157 (trad_frame_set_addr): Define new function.
2158 (trad_frame_set_reg_realreg): Use new function.
2159 (trad_frame_set_reg_addr): Use new function.
2160
2161 2018-09-01 Keith Seitz <keiths@redhat.com>
2162
2163 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2164 pulongest instead of "%lld".
2165 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2166 ATTRIBUTE_UNUSED.
2167
2168 2018-08-31 Tom Tromey <tom@tromey.com>
2169
2170 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2171 variant part type.
2172
2173 2018-08-31 Pedro Alves <palves@redhat.com>
2174
2175 * gdbarch.h: Regenerate.
2176
2177 2018-08-31 Pedro Alves <palves@redhat.com>
2178
2179 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2180 * target.h (Hardware watchpoint interfaces): Describe
2181 continuable/steppable/non-steppable watchpoints.
2182 * gdbarch.h, gdbarch.c: Regenerate.
2183
2184 2018-08-31 Pedro Alves <palves@redhat.com>
2185
2186 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2187 Delete.
2188 * s390-linux-nat.c
2189 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2190 * target.h (target_ops::have_continuable_watchpoint): Delete.
2191 (target_have_continuable_watchpoint): Delete.
2192 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2193 * target-delegates.c: Regenerate.
2194
2195 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2196
2197 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2198 the files present in "gnulib/import/m4/".
2199
2200 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2201
2202 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2203 c.sw, c.swsp, and c.sdsp.
2204
2205 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2206
2207 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2208 (riscv_read_misa_reg): Don't cache value read into inferior data.
2209 (riscv_new_inferior_data): Delete.
2210 (riscv_inferior_data_cleanup): Delete.
2211 (riscv_inferior_data): Delete.
2212 (riscv_invalidate_inferior_data): Delete.
2213 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2214
2215 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2216
2217 * compile/compile-cplus-types.c
2218 (compile_cplus_instance::leave_scope): Take the address of scope
2219 object.
2220 (compile_cplus_instance::convert_qualified_base): Compare quals
2221 to 0.
2222
2223 2018-08-30 Keith Seitz <keiths@redhat.com>
2224
2225 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2226 Use "%s" and host_address_to_string instead of "%p" in printf.
2227
2228 2018-08-29 Keith Seitz <keiths@redhat.com>
2229
2230 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2231 and compile-cplus-types.c.
2232 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2233 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2234 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2235 Declare.
2236 * compile/compile-c-support.c: Include compile-cplus.h.
2237 (load_libcompile): Templatize.
2238 (get_compile_context): "New" function.
2239 (c_get_compile_context): Use get_compile_context.
2240 (cplus_get_compile_context): New function.
2241 (cplus_push_user_expression, cplus_pop_user_expression)
2242 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2243 (cplus_compute_program): Define new structs/functions.
2244 * compile/compile-cplus-symmbols.c: New file.
2245 * compile/compile-cplus-types.c: New file.
2246 * compile/compile-cplus.h: New file.
2247 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2248 Declare.
2249 * compile/compile-object-load.c (get_out_value_type): Use
2250 strncmp_iw when comparing symbol names.
2251 (compile_object_load): Add mst_bss and mst_data.
2252 * compile/compile.c (_initialize_compile): Remove
2253 -Wno-implicit-function-declaration from `compile_args'.
2254 * compile/gcc-cp-plugin.h: New file.
2255 * NEWS: Mention C++ compile support and new debug options.
2256
2257 2018-08-29 Keith Seitz <keiths@redhat.com>
2258
2259 * linespec.c (collect_info::add_symbol): Make virtual.
2260 (struct symbol_searcher_collect_info): New struct.
2261 (symbol_searcher::find_all_symbols): New method.
2262 * symtab.h (class symbol_searcher): New class.
2263
2264 2018-08-29 Keith Seitz <keiths@redhat.com>
2265
2266 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2267 Change to vector of block_symbol. Update all users.
2268 (struct collect_info) <symbols>: Likewise.
2269 (collect_info::add_symbol): Take block_symbol as argument.
2270 Update all callers.
2271 (decode_compound_collector) <m_symbols>: Change type to vector
2272 of block_symbol. Update all users.
2273 (decode_compound_collector::operator ()): Change parameter type
2274 to block_symbol.
2275 (find_method, find_function_symbols, find_linespec_symbols)
2276 (find_label_symbols_in_block, find_label_symbols): Change symbol
2277 vectors to block_symbol vectors.
2278 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2279 block_symbol.
2280
2281 2018-08-29 Keith Seitz <keiths@redhat.com>
2282
2283 * linespec.c (symbolp): Remove typedef and VEC definitions.
2284 (bound_minimal_symbol_d): Likewise.
2285
2286 2018-08-29 Keith Seitz <keiths@redhat.com>
2287
2288 * linespec.c (decode_compound_collector::decode_compound_collector):
2289 Remove initialization for `m_symtabs'.
2290 (decode_compound_collector::release_symbols): Change return type
2291 to std::vector. Update all callers.
2292 (class decode_compound_collector) <m_symbols>: Change type to
2293 std::vector.
2294 (lookup_prefix_sym): Change return type to std::vector. Update all
2295 callers.
2296 (compare_symbols): Remove.
2297 (std_compare_symbols): Rename to `compare_symbols'.
2298 (find_method): Change `sym_classes' parameter to std::vector.
2299 Update all callers. Use std::sort to sort sym_classes.
2300 (find_linespec_symbols): Remove cleanup.
2301
2302 2018-08-29 Keith Seitz <keiths@redhat.com>
2303
2304 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2305 std::vector. Update all users.
2306 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2307 (struct collect_info) <minimal_symbols>: Likewise.
2308 (compare_msymbols): Return bool. Change parameters to const
2309 bound_minimal_symbol references.
2310 (find_method, find_function_symbols, find_linespec_symbols): Change
2311 `minsyms' parameter to std::vector. Update all callers.
2312
2313 2018-08-29 Keith Seitz <keiths@redhat.com>
2314
2315 * linespec.c (struct linespec) <label_symbols>: Change type to
2316 std::vector. Update all users.
2317 (find_label_symbols_in_block): Change `result' parameter to
2318 std::vector. Update all callers.
2319 (find_label_symbols): Return std::vector. Update all callers.
2320
2321 2018-08-29 Keith Seitz <keiths@redhat.com>
2322
2323 * linespec.c (struct linespec) <function_symbols>: Change type to
2324 std::vector. Update all users.
2325 (struct collect_info) <function_symbols>: Likewise.
2326 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2327 (std_compare_symbols): New function.
2328 (find_method, find_function_symbols, find_linespec_symbols)
2329 (find_label_symbols_in_block): Change `symbols' parameter to
2330 std::vector. Update all callers.
2331 (find_label_symbols): Likewise for `function_symbols' and
2332 `label_funcs_ret'.
2333
2334 2018-08-29 Keith Seitz <keiths@redhat.com>
2335
2336 * linespec.c (symtab_vector_up): Define.
2337 (struct linespec) <file_symtabs>: Change type to std::vector *.
2338 Update all uses.
2339 (struct collect_info) <file_symtabs>: Likewise.
2340 (collect_symtabs_from_filename): Return symtab_vector_up.
2341 Update all callers.
2342 (decode_objc): Remove cleanup.
2343 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2344 (symtab_collector::release_symtabs): Return symtab_vector_up.
2345 Update all callers.
2346 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2347 Update all users.
2348 (collect_symtabs_from_filename, symtabs_from_filename): Return
2349 symtab_vector_up. Update all callers.
2350
2351 2018-08-29 Tom Tromey <tom@tromey.com>
2352
2353 * csky-tdep.c (csky_analyze_prologue): Use
2354 core_addr_to_string_nz.
2355
2356 2018-08-29 Tom Tromey <tom@tromey.com>
2357
2358 * windows-nat.c (struct xlate_exception) <them>: Change type to
2359 DWORD.
2360 (xlate): Fix formatting. Remove last entry.
2361 (struct xlate_exception, xlate): Comment out.
2362 (windows_nat_target::resume): Use ranged for.
2363
2364 2018-08-29 Jim Wilson <jimw@sifive.com>
2365
2366 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2367 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2368 of NT_PRFPREG.
2369 (riscv_linux_nat_target::store_registers): Likewise.
2370
2371 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2372
2373 PR gdb/23555
2374 PR gdb/23558
2375 * gnulib/aclocal.m4: Regenerate.
2376 * gnulib/config.in: Regenerate.
2377 * gnulib/configure: Regenerate.
2378 * gnulib/import/Makefile.am: Update.
2379 * gnulib/import/Makefile.in: Update.
2380 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2381 * gnulib/import/_Noreturn.h: ... this.
2382 * gnulib/import/alloca.in.h: Update.
2383 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2384 * gnulib/import/arg-nonnull.h: ... this.
2385 * gnulib/import/assure.h: Update.
2386 * gnulib/import/at-func.c: Update.
2387 * gnulib/import/basename-lgpl.c: Update.
2388 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2389 * gnulib/import/c++defs.h: ... this.
2390 * gnulib/import/canonicalize-lgpl.c: Update.
2391 * gnulib/import/cdefs.h: Update.
2392 * gnulib/import/chdir-long.c: Update.
2393 * gnulib/import/chdir-long.h: Update.
2394 * gnulib/import/cloexec.c: Update.
2395 * gnulib/import/cloexec.h: Update.
2396 * gnulib/import/close.c: Update.
2397 * gnulib/import/closedir.c: Update.
2398 * gnulib/import/config.charset: Update.
2399 * gnulib/import/dirent-private.h: Update.
2400 * gnulib/import/dirent.in.h: Update.
2401 * gnulib/import/dirfd.c: Update.
2402 * gnulib/import/dirname-lgpl.c: Update.
2403 * gnulib/import/dirname.h: Update.
2404 * gnulib/import/dosname.h: Update.
2405 * gnulib/import/dup-safer-flag.c: Update.
2406 * gnulib/import/dup-safer.c: Update.
2407 * gnulib/import/dup.c: Update.
2408 * gnulib/import/dup2.c: Update.
2409 * gnulib/import/errno.in.h: Update.
2410 * gnulib/import/error.c: Update.
2411 * gnulib/import/error.h: Update.
2412 * gnulib/import/exitfail.c: Update.
2413 * gnulib/import/exitfail.h: Update.
2414 * gnulib/import/extra/update-copyright: Update.
2415 * gnulib/import/fchdir.c: Update.
2416 * gnulib/import/fcntl.c: Update.
2417 * gnulib/import/fcntl.in.h: Update.
2418 * gnulib/import/fd-hook.c: Update.
2419 * gnulib/import/fd-hook.h: Update.
2420 * gnulib/import/fd-safer-flag.c: Update.
2421 * gnulib/import/fd-safer.c: Update.
2422 * gnulib/import/fdopendir.c: Update.
2423 * gnulib/import/filename.h: Update.
2424 * gnulib/import/filenamecat-lgpl.c: Update.
2425 * gnulib/import/filenamecat.h: Update.
2426 * gnulib/import/flexmember.h: Update.
2427 * gnulib/import/float+.h: Update.
2428 * gnulib/import/float.c: Update.
2429 * gnulib/import/float.in.h: Update.
2430 * gnulib/import/fnmatch.c: Update.
2431 * gnulib/import/fnmatch.in.h: Update.
2432 * gnulib/import/fnmatch_loop.c: Update.
2433 * gnulib/import/fpucw.h: Update.
2434 * gnulib/import/frexp.c: Update.
2435 * gnulib/import/frexpl.c: Update.
2436 * gnulib/import/fstat.c: Update.
2437 * gnulib/import/fstatat.c: Update.
2438 * gnulib/import/getcwd-lgpl.c: Update.
2439 * gnulib/import/getcwd.c: Update.
2440 * gnulib/import/getdtablesize.c: Update.
2441 * gnulib/import/getlogin_r.c: Update.
2442 * gnulib/import/getprogname.c: Update.
2443 * gnulib/import/getprogname.h: Update.
2444 * gnulib/import/gettext.h: Update.
2445 * gnulib/import/gettimeofday.c: Update.
2446 * gnulib/import/glob-libc.h: Update.
2447 * gnulib/import/glob.c: Update.
2448 * gnulib/import/glob.in.h: Update.
2449 * gnulib/import/glob_internal.h: Update.
2450 * gnulib/import/glob_pattern_p.c: Update.
2451 * gnulib/import/globfree.c: Update.
2452 * gnulib/import/hard-locale.c: Update.
2453 * gnulib/import/hard-locale.h: Update.
2454 * gnulib/import/intprops.h: Update.
2455 * gnulib/import/inttypes.in.h: Update.
2456 * gnulib/import/isnan.c: Update.
2457 * gnulib/import/isnand-nolibm.h: Update.
2458 * gnulib/import/isnand.c: Update.
2459 * gnulib/import/isnanl-nolibm.h: Update.
2460 * gnulib/import/isnanl.c: Update.
2461 * gnulib/import/itold.c: Update.
2462 * gnulib/import/libc-config.h: Update.
2463 * gnulib/import/limits.in.h: Update.
2464 * gnulib/import/localcharset.c: Update.
2465 * gnulib/import/localcharset.h: Update.
2466 * gnulib/import/localtime-buffer.c: Update.
2467 * gnulib/import/localtime-buffer.h: Update.
2468 * gnulib/import/lstat.c: Update.
2469 * gnulib/import/m4/00gnulib.m4: Update.
2470 * gnulib/import/m4/__inline.m4: Update.
2471 * gnulib/import/m4/absolute-header.m4: Update.
2472 * gnulib/import/m4/alloca.m4: Update.
2473 * gnulib/import/m4/builtin-expect.m4: Update.
2474 * gnulib/import/m4/canonicalize.m4: Update.
2475 * gnulib/import/m4/chdir-long.m4: Update.
2476 * gnulib/import/m4/close.m4: Update.
2477 * gnulib/import/m4/closedir.m4: Update.
2478 * gnulib/import/m4/configmake.m4: Update.
2479 * gnulib/import/m4/d-ino.m4: Update.
2480 * gnulib/import/m4/d-type.m4: Update.
2481 * gnulib/import/m4/dirent_h.m4: Update.
2482 * gnulib/import/m4/dirfd.m4: Update.
2483 * gnulib/import/m4/dirname.m4: Update.
2484 * gnulib/import/m4/double-slash-root.m4: Update.
2485 * gnulib/import/m4/dup.m4: Update.
2486 * gnulib/import/m4/dup2.m4: Update.
2487 * gnulib/import/m4/eealloc.m4: Update.
2488 * gnulib/import/m4/environ.m4: Update.
2489 * gnulib/import/m4/errno_h.m4: Update.
2490 * gnulib/import/m4/error.m4: Update.
2491 * gnulib/import/m4/exponentd.m4: Update.
2492 * gnulib/import/m4/exponentl.m4: Update.
2493 * gnulib/import/m4/extensions.m4: Update.
2494 * gnulib/import/m4/extern-inline.m4: Update.
2495 * gnulib/import/m4/fchdir.m4: Update.
2496 * gnulib/import/m4/fcntl-o.m4: Update.
2497 * gnulib/import/m4/fcntl.m4: Update.
2498 * gnulib/import/m4/fcntl_h.m4: Update.
2499 * gnulib/import/m4/fdopendir.m4: Update.
2500 * gnulib/import/m4/filenamecat.m4: Update.
2501 * gnulib/import/m4/flexmember.m4: Update.
2502 * gnulib/import/m4/float_h.m4: Update.
2503 * gnulib/import/m4/fnmatch.m4: Update.
2504 * gnulib/import/m4/fnmatch_h.m4: Update.
2505 * gnulib/import/m4/fpieee.m4: Update.
2506 * gnulib/import/m4/frexp.m4: Update.
2507 * gnulib/import/m4/frexpl.m4: Update.
2508 * gnulib/import/m4/fstat.m4: Update.
2509 * gnulib/import/m4/fstatat.m4: Update.
2510 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2511 * gnulib/import/m4/getcwd-path-max.m4: Update.
2512 * gnulib/import/m4/getcwd.m4: Update.
2513 * gnulib/import/m4/getdtablesize.m4: Update.
2514 * gnulib/import/m4/getlogin.m4: Update.
2515 * gnulib/import/m4/getlogin_r.m4: Update.
2516 * gnulib/import/m4/getpagesize.m4: Update.
2517 * gnulib/import/m4/getprogname.m4: Update.
2518 * gnulib/import/m4/gettimeofday.m4: Update.
2519 * gnulib/import/m4/glibc21.m4: Update.
2520 * gnulib/import/m4/glob.m4: Update.
2521 * gnulib/import/m4/glob_h.m4: Update.
2522 * gnulib/import/m4/gnulib-cache.m4: Update.
2523 * gnulib/import/m4/gnulib-common.m4: Update.
2524 * gnulib/import/m4/gnulib-comp.m4: Update.
2525 * gnulib/import/m4/gnulib-tool.m4: Update.
2526 * gnulib/import/m4/hard-locale.m4: Update.
2527 * gnulib/import/m4/include_next.m4: Update.
2528 * gnulib/import/m4/inttypes-pri.m4: Update.
2529 * gnulib/import/m4/inttypes.m4: Update.
2530 * gnulib/import/m4/isnand.m4: Update.
2531 * gnulib/import/m4/isnanl.m4: Update.
2532 * gnulib/import/m4/largefile.m4: Update.
2533 * gnulib/import/m4/limits-h.m4: Update.
2534 * gnulib/import/m4/localcharset.m4: Update.
2535 * gnulib/import/m4/locale-fr.m4: Update.
2536 * gnulib/import/m4/locale-ja.m4: Update.
2537 * gnulib/import/m4/locale-zh.m4: Update.
2538 * gnulib/import/m4/localtime-buffer.m4: Update.
2539 * gnulib/import/m4/longlong.m4: Update.
2540 * gnulib/import/m4/lstat.m4: Update.
2541 * gnulib/import/m4/malloc.m4: Update.
2542 * gnulib/import/m4/malloca.m4: Update.
2543 * gnulib/import/m4/math_h.m4: Update.
2544 * gnulib/import/m4/mbrtowc.m4: Update.
2545 * gnulib/import/m4/mbsinit.m4: Update.
2546 * gnulib/import/m4/mbsrtowcs.m4: Update.
2547 * gnulib/import/m4/mbstate_t.m4: Update.
2548 * gnulib/import/m4/memchr.m4: Update.
2549 * gnulib/import/m4/memmem.m4: Update.
2550 * gnulib/import/m4/mempcpy.m4: Update.
2551 * gnulib/import/m4/memrchr.m4: Update.
2552 * gnulib/import/m4/mkdir.m4: Update.
2553 * gnulib/import/m4/mkstemp.m4: Update.
2554 * gnulib/import/m4/mmap-anon.m4: Update.
2555 * gnulib/import/m4/mode_t.m4: Update.
2556 * gnulib/import/m4/msvc-inval.m4: Update.
2557 * gnulib/import/m4/msvc-nothrow.m4: Update.
2558 * gnulib/import/m4/multiarch.m4: Update.
2559 * gnulib/import/m4/nocrash.m4: Update.
2560 * gnulib/import/m4/off_t.m4: Update.
2561 * gnulib/import/m4/onceonly.m4: Update.
2562 * gnulib/import/m4/open-cloexec.m4: Update.
2563 * gnulib/import/m4/open.m4: Update.
2564 * gnulib/import/m4/openat.m4: Update.
2565 * gnulib/import/m4/opendir.m4: Update.
2566 * gnulib/import/m4/pathmax.m4: Update.
2567 * gnulib/import/m4/rawmemchr.m4: Update.
2568 * gnulib/import/m4/readdir.m4: Update.
2569 * gnulib/import/m4/readlink.m4: Update.
2570 * gnulib/import/m4/realloc.m4: Update.
2571 * gnulib/import/m4/rename.m4: Update.
2572 * gnulib/import/m4/rewinddir.m4: Update.
2573 * gnulib/import/m4/rmdir.m4: Update.
2574 * gnulib/import/m4/save-cwd.m4: Update.
2575 * gnulib/import/m4/secure_getenv.m4: Update.
2576 * gnulib/import/m4/setenv.m4: Update.
2577 * gnulib/import/m4/signal_h.m4: Update.
2578 * gnulib/import/m4/ssize_t.m4: Update.
2579 * gnulib/import/m4/stat-time.m4: Update.
2580 * gnulib/import/m4/stat.m4: Update.
2581 * gnulib/import/m4/std-gnu11.m4: Update.
2582 * gnulib/import/m4/stdbool.m4: Update.
2583 * gnulib/import/m4/stddef_h.m4: Update.
2584 * gnulib/import/m4/stdint.m4: Update.
2585 * gnulib/import/m4/stdio_h.m4: Update.
2586 * gnulib/import/m4/stdlib_h.m4: Update.
2587 * gnulib/import/m4/strchrnul.m4: Update.
2588 * gnulib/import/m4/strdup.m4: Update.
2589 * gnulib/import/m4/strerror.m4: Update.
2590 * gnulib/import/m4/string_h.m4: Update.
2591 * gnulib/import/m4/strstr.m4: Update.
2592 * gnulib/import/m4/strtok_r.m4: Update.
2593 * gnulib/import/m4/sys_socket_h.m4: Update.
2594 * gnulib/import/m4/sys_stat_h.m4: Update.
2595 * gnulib/import/m4/sys_time_h.m4: Update.
2596 * gnulib/import/m4/sys_types_h.m4: Update.
2597 * gnulib/import/m4/tempname.m4: Update.
2598 * gnulib/import/m4/time_h.m4: Update.
2599 * gnulib/import/m4/unistd-safer.m4: Update.
2600 * gnulib/import/m4/unistd_h.m4: Update.
2601 * gnulib/import/m4/warn-on-use.m4: Update.
2602 * gnulib/import/m4/wchar_h.m4: Update.
2603 * gnulib/import/m4/wchar_t.m4: Update.
2604 * gnulib/import/m4/wctype_h.m4: Update.
2605 * gnulib/import/m4/wint_t.m4: Update.
2606 * gnulib/import/malloc.c: Update.
2607 * gnulib/import/malloc/scratch_buffer.h: Update.
2608 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2609 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2610 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2611 * gnulib/import/malloca.c: Update.
2612 * gnulib/import/malloca.h: Update.
2613 * gnulib/import/malloca.valgrind: Update.
2614 * gnulib/import/math.in.h: Update.
2615 * gnulib/import/mbrtowc.c: Update.
2616 * gnulib/import/mbsinit.c: Update.
2617 * gnulib/import/mbsrtowcs-impl.h: Update.
2618 * gnulib/import/mbsrtowcs-state.c: Update.
2619 * gnulib/import/mbsrtowcs.c: Update.
2620 * gnulib/import/memchr.c: Update.
2621 * gnulib/import/memmem.c: Update.
2622 * gnulib/import/mempcpy.c: Update.
2623 * gnulib/import/memrchr.c: Update.
2624 * gnulib/import/mkdir.c: Update.
2625 * gnulib/import/mkstemp.c: Update.
2626 * gnulib/import/msvc-inval.c: Update.
2627 * gnulib/import/msvc-inval.h: Update.
2628 * gnulib/import/msvc-nothrow.c: Update.
2629 * gnulib/import/msvc-nothrow.h: Update.
2630 * gnulib/import/open.c: Update.
2631 * gnulib/import/openat-die.c: Update.
2632 * gnulib/import/openat-priv.h: Update.
2633 * gnulib/import/openat-proc.c: Update.
2634 * gnulib/import/openat.c: Update.
2635 * gnulib/import/openat.h: Update.
2636 * gnulib/import/opendir.c: Update.
2637 * gnulib/import/pathmax.h: Update.
2638 * gnulib/import/pipe-safer.c: Update.
2639 * gnulib/import/rawmemchr.c: Update.
2640 * gnulib/import/readdir.c: Update.
2641 * gnulib/import/readlink.c: Update.
2642 * gnulib/import/realloc.c: Update.
2643 * gnulib/import/ref-add.sin: Update.
2644 * gnulib/import/ref-del.sin: Update.
2645 * gnulib/import/rename.c: Update.
2646 * gnulib/import/rewinddir.c: Update.
2647 * gnulib/import/rmdir.c: Update.
2648 * gnulib/import/same-inode.h: Update.
2649 * gnulib/import/save-cwd.c: Update.
2650 * gnulib/import/save-cwd.h: Update.
2651 * gnulib/import/scratch_buffer.h: Update.
2652 * gnulib/import/secure_getenv.c: Update.
2653 * gnulib/import/setenv.c: Update.
2654 * gnulib/import/signal.in.h: Update.
2655 * gnulib/import/stat-time.c: Update.
2656 * gnulib/import/stat-time.h: Update.
2657 * gnulib/import/stat-w32.c: Update.
2658 * gnulib/import/stat-w32.h: Update.
2659 * gnulib/import/stat.c: Update.
2660 * gnulib/import/stdbool.in.h: Update.
2661 * gnulib/import/stddef.in.h: Update.
2662 * gnulib/import/stdint.in.h: Update.
2663 * gnulib/import/stdio.in.h: Update.
2664 * gnulib/import/stdlib.in.h: Update.
2665 * gnulib/import/str-two-way.h: Update.
2666 * gnulib/import/strchrnul.c: Update.
2667 * gnulib/import/strdup.c: Update.
2668 * gnulib/import/streq.h: Update.
2669 * gnulib/import/strerror-override.c: Update.
2670 * gnulib/import/strerror-override.h: Update.
2671 * gnulib/import/strerror.c: Update.
2672 * gnulib/import/string.in.h: Update.
2673 * gnulib/import/stripslash.c: Update.
2674 * gnulib/import/strnlen1.c: Update.
2675 * gnulib/import/strnlen1.h: Update.
2676 * gnulib/import/strstr.c: Update.
2677 * gnulib/import/strtok_r.c: Update.
2678 * gnulib/import/sys_stat.in.h: Update.
2679 * gnulib/import/sys_time.in.h: Update.
2680 * gnulib/import/sys_types.in.h: Update.
2681 * gnulib/import/tempname.c: Update.
2682 * gnulib/import/tempname.h: Update.
2683 * gnulib/import/time.in.h: Update.
2684 * gnulib/import/unistd--.h: Update.
2685 * gnulib/import/unistd-safer.h: Update.
2686 * gnulib/import/unistd.in.h: Update.
2687 * gnulib/import/unsetenv.c: Update.
2688 * gnulib/import/verify.h: Update.
2689 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2690 * gnulib/import/wchar.in.h: Update.
2691 * gnulib/import/wctype.in.h: Update.
2692 * gnulib/import/xalloc-oversized.h: Update.
2693 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2694 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2695
2696 2018-08-16 Gary Benson <gbenson@redhat.com>
2697
2698 PR gdb/13000:
2699 * gdb/main.c (captured_main_1): Exit with nonzero status
2700 in batch mode if the last command to be executed failed.
2701 * NEWS: Mention the above.
2702
2703 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
2704
2705 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2706 end of warning message.
2707
2708 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2709
2710 PR gdb/22943:
2711 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2712 (aarch64_extract_return_value): Use
2713 aapcs_is_vfp_call_or_return_candidate.
2714 (aarch64_return_in_memory): Likewise.
2715 (aarch64_store_return_value): Likewise.
2716
2717 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2718
2719 * aarch64-tdep.c
2720 (aapcs_is_vfp_call_or_return_candidate): Make static
2721 (pass_in_v_or_stack): Remove function.
2722 (pass_in_v_vfp_candidate): New function.
2723 (aarch64_push_dummy_call): Check for float register candidates.
2724
2725 2018-08-29 Alan Hayward <alan.hayward@arm.com>
2726
2727 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2728 (aapcs_is_vfp_call_or_return_candidate_1): New function.
2729 (aapcs_is_vfp_call_or_return_candidate): Likewise.
2730
2731 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2732
2733 PR build/23399
2734 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2735 (struct ipa_sym_addresses): Rename to...
2736 (struct ipa_sym_addresses_common): ... this.
2737 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2738
2739 2018-08-28 Tom Tromey <tom@tromey.com>
2740
2741 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2742 (token_fifo): Now a std::vector.
2743 (yylex, c_parse): Update.
2744 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2745 (token_fifo): Now a std::vector.
2746 (yylex, d_parse): Update.
2747 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2748 (token_fifo): Now a std::vector.
2749 (yylex, go_parse): Update.
2750
2751 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
2752
2753 * parser-defs.h (struct type_stack) <elements>: Change type to
2754 std::vector<union type_stack_elt>.
2755 <depth, size>: Remove.
2756 * parse.c (parse_exp_in_context_1): Adjust.
2757 (type_stack_reserve): Remove.
2758 (check_type_stack_depth): Remove.
2759 (insert_into_type_stack): Adjust to std::vector.
2760 (insert_type): Likewise.
2761 (push_type): Likewise.
2762 (push_type_int): Likewise.
2763 (insert_type_address_space): Likewise.
2764 (pop_type): Likewise.
2765 (pop_type_int): Likewise.
2766 (pop_typelist): Likewise.
2767 (pop_type_stack): Likewise.
2768 (append_type_stack): Likewise.
2769 (push_type_stack): Likewise.
2770 (get_type_stack): Likewise.
2771 (type_stack_cleanup): Likewise.
2772 (push_typelist): Likewise.
2773 (follow_types): Likewise.
2774 (_initialize_parse): Likewise.
2775
2776 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
2777
2778 * NEWS: Mention csky target.
2779
2780 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2781 Hafiz Abid Qadeer <abidh@codesourcery.com>
2782 Don Breazeal <donb@codesourcery.com>
2783
2784 * csky-linux-tdep.c: New file.
2785 * csky-tdep.c: Likewise.
2786 * csky-tdep.h: Likewise.
2787 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2788 csky-tdep.o.
2789 (HFILES_NO_SRCDIR): Add csky-tdep.h.
2790 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2791 * configure.tgt: Add csky support.
2792
2793 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
2794
2795 * python/py-framefilter.c (py_print_frame): Print frame architecture
2796 when printing on an MI output.
2797
2798 2018-08-27 Tom Tromey <tom@tromey.com>
2799
2800 PR build/23087:
2801 * configure: Rebuild.
2802 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2803
2804 2018-08-27 Tom Tromey <tom@tromey.com>
2805
2806 * aarch64-linux-tdep.c
2807 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2808 casts to int.
2809
2810 2018-08-27 Tom Tromey <tom@tromey.com>
2811
2812 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2813 unsigned.
2814 (ppc64_standard_linkage1, ppc64_standard_linkage2)
2815 (ppc64_standard_linkage3, ppc64_standard_linkage4)
2816 (ppc64_standard_linkage5, ppc64_standard_linkage6)
2817 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2818 unsigned.
2819
2820 2018-08-27 Tom Tromey <tom@tromey.com>
2821
2822 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2823 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2824
2825 2018-08-27 Tom Tromey <tom@tromey.com>
2826
2827 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2828 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2829 ULONGEST_MAX.
2830 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2831 ULONGEST_MAX.
2832 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2833 ULONGEST_MAX.
2834 * sparc-linux-tdep.c (sparc32_linux_sigframe)
2835 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2836 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2837 ULONGEST_MAX.
2838 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2839 (ppc64_linux_sigaction_tramp_frame)
2840 (ppc32_linux_sighandler_tramp_frame)
2841 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2842 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2843 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2844 * mn10300-linux-tdep.c (am33_linux_sigframe)
2845 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2846 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2847 * mips-linux-tdep.c (mips_linux_o32_sigframe)
2848 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2849 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2850 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2851 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2852 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2853 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2854 * microblaze-linux-tdep.c
2855 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2856 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2857 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2858 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2859 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2860 * common/common-types.h (ULONGEST_MAX): New define.
2861 (CORE_ADDR_MAX): Fix formatting.
2862 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2863 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2864 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2865 (arm_linux_rt_sigreturn_tramp_frame)
2866 (arm_eabi_linux_sigreturn_tramp_frame)
2867 (arm_eabi_linux_rt_sigreturn_tramp_frame)
2868 (thumb2_eabi_linux_sigreturn_tramp_frame)
2869 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2870 (arm_linux_restart_syscall_tramp_frame)
2871 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2872 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2873 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2874 ULONGEST_MAX.
2875 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2876
2877 2018-08-27 Tom Tromey <tom@tromey.com>
2878
2879 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2880 CORE_ADDR_MAX.
2881 * mips-tdep.c (mips_deal_with_atomic_sequence)
2882 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2883 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2884 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2885 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2886 CORE_ADDR_MAX.
2887 * aarch64-tdep.c (aarch64_software_single_step): Use
2888 CORE_ADDR_MAX.
2889
2890 2018-08-27 Tom Tromey <tom@tromey.com>
2891
2892 * linespec.c (complete_linespec_component): Add cast to "char".
2893 * completer.c (completion_tracker::build_completion_result): Add
2894 cast to "char".
2895
2896 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2897
2898 * solist.h (struct solist, struct target_so_ops): Fix
2899 indentation.
2900
2901 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2902
2903 * ada-tasks.c (ada_task_info_s): Remove typedef.
2904 (DEF_VEC_O(ada_task_info_s)): Remove.
2905 (struct ada_tasks_inferior_data): Initialize fields.
2906 <task_list>: Make an std::vector.
2907 (get_ada_tasks_inferior_data): Allocate with new.
2908 (ada_get_task_number): Adjust.
2909 (get_task_number_from_id): Likewise.
2910 (valid_task_id): Likewise.
2911 (ada_get_task_info_from_ptid): Likewise.
2912 (iterate_over_live_ada_tasks): Likewise.
2913 (add_ada_task): Likewise.
2914 (read_known_tasks): Likewise.
2915 (ada_build_task_list): Likewise.
2916 (print_ada_task_info): Likewise.
2917 (info_task): Likewise.
2918 (task_command_1): Likewise.
2919
2920 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
2921
2922 * ada-lang.c (add_angle_brackets): Return std::string.
2923
2924 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
2925
2926 * python/py-threadevent.c (py_get_event_thread): Initialize
2927 pythread.
2928
2929 2018-08-24 Pedro Alves <palves@redhat.com>
2930
2931 * python/py-bpevent.c (create_breakpoint_event_object): Use
2932 copy-initialization.
2933 * python/py-continueevent.c (emit_continue_event): Use
2934 copy-initialization.
2935 * python/py-exitedevent.c (create_exited_event_object): Return a
2936 gdbpy_ref<>.
2937 (emit_exited_event): Use copy-initialization.
2938 * python/py-inferior.c (python_new_inferior)
2939 (python_inferior_deleted, add_thread_object): Use
2940 copy-initialization.
2941 * python/py-infevents.c (create_inferior_call_event_object)
2942 (create_register_changed_event_object)
2943 (create_memory_changed_event_object): Return a gdbpy_ref<>.
2944 (emit_inferior_call_event, emit_memory_changed_event)
2945 (emit_register_changed_event): Use copy-initialization.
2946 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2947 Return a gdbpy_ref<>.
2948 (emit_new_objfile_event): Use copy-initialization.
2949 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2950 (emit_clear_objfiles_event): Use copy-initialization.
2951 * python/py-signalevent.c (create_signal_event_object): Use
2952 copy-initialization.
2953 * python/py-threadevent.c (create_thread_event_object): Use
2954 copy-initialization.
2955
2956 2018-08-24 Pedro Alves <palves@redhat.com>
2957 Simon Marchi <simon.marchi@ericsson.com>
2958
2959 PR gdb/23379
2960 * python/py-continueevent.c: Include "gdbthread.h".
2961 (create_continue_event_object): Add intro comment. Add 'ptid'
2962 parameter. Use it to find thread to pass to
2963 create_thread_event_object.
2964 (emit_continue_event): Pass PTID down to
2965 create_continue_event_object.
2966 * python/py-event.h (py_get_event_thread): Declare.
2967 (create_thread_event_object): Remove default from 'thread'
2968 parameter.
2969 * python/py-stopevent.c (create_stop_event_object): Use
2970 py_get_event_thread.
2971 * python/py-threadevent.c (get_event_thread): Rename to ...
2972 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2973 and use it to find the thread.
2974 (create_thread_event_object): Assert that THREAD isn't null.
2975 Don't find the event thread here.
2976
2977 2018-08-23 Kevin Buettner <kevinb@redhat.com>
2978
2979 * block.h (blockrange, blockranges): New struct declarations.
2980 (struct block): Add new field named `ranges'.
2981 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2982 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2983 macros for accessing ranges in struct block.
2984 (make_blockranges): New declaration.
2985 block.c (make_blockranges): New function.
2986 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2987 for block.
2988 * symtab.h (find_pc_partial_function): Add new parameter `block'.
2989 * blockframe.c (cache_pc_function_block): New static global.
2990 (clear_pc_function_cache): Clear cache_pc_function_block.
2991 (find_pc_partial_function): Move comment to symtab.h. Add
2992 support for non-contiguous blocks.
2993 * cli/cli-cmds.c (block.h): Include.
2994 (print_disassembly): Handle printing of non-contiguous blocks.
2995 (disassemble_current_function): Likewise.
2996 (disassemble_command): Likewise.
2997
2998 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2999 BLOCK_START.
3000 * blockframe.c (get_pc_function_start): Likewise.
3001 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3002 (gcc_symbol_address): Likewise.
3003 * compile/compile-object-run.c (compile_object_run): Likewise.
3004 * compile/compile.c (get_expr_block_and_pc): Likewise.
3005 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3006 (func_addr_to_tail_call_list): Likewise.
3007 * findvar.c (default_read_var_value): Likewise.
3008 * inline-frame.c (inline_frame_this_id): Likewise.
3009 (skip-inline_frames): Likewise.
3010 * infcmd.c (until_next_command): Likewise.
3011 * linespec.c (convert_linespec_to_sals): Likewise.
3012 * parse.c (parse_exp_in_context_1): Likewise.
3013 * printcmd.c (build_address_symbolic): likewise.
3014 (info_address_command): Likewise.
3015 symtab.c (find_function_start_sal): Likewise.
3016 (skip_prologue_sal): Likewise.
3017 (find_function_alias_target): Likewise.
3018 (find_gnu_ifunc): Likewise.
3019 * stack.c (find_frame_funname): Likewise.
3020 * symtab.c (fixup_symbol_section): Likewise.
3021 (find_function_start_sal): Likewise.
3022 (skip_prologue_sal): Likewsie.
3023 (find_function_alias_target): Likewise.
3024 (find_gnu_ifunc): Likewise.
3025 * tracepoint.c (info_scope_command): Likewise.
3026 * value.c (value_fn_field): Likewise.
3027
3028 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3029 in place of find_pc_partial_function.
3030 * blockframe.c (find_function_entry_range_from_pc): New function.
3031 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3032 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3033 for each range in a block.
3034
3035
3036 2018-08-23 Xavier Roirand <roirand@adacore.com>
3037
3038 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3039 incrementation.
3040
3041 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3042
3043 * solib-svr4.c (read_program_headers_from_bfd): Return
3044 gdb::optional<gdb::byte_vector>.
3045 (svr4_exec_displacement): Adjust.
3046
3047 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3048
3049 * solib-svr4.c (read_program_header): Return
3050 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3051 (find_program_interpreter): Return
3052 gdb::optional<gdb::byte_vector>.
3053 (scan_dyntag_auxv): Adjust.
3054 (enable_break): Adjust.
3055 (svr4_exec_displacement): Adjust.
3056
3057 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3058
3059 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3060 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3061
3062 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3063
3064 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3065 string_vprintf.
3066 * guile/scm-utils.c (gdbscm_printf): Likewise.
3067 * serial.c (serial_printf): Likewise.
3068 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3069
3070 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3071
3072 * stack.c (print_frame): Print frame architecture when printing on
3073 an MI output.
3074 * NEWS: Mention new "arch" attribute in frame output.
3075
3076 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3077
3078 * arch/aarch64.h (aarch64_regnum): Update comment.
3079
3080 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3081
3082 * NEWS: Add SVE to 8.2 section.
3083
3084 2018-08-21 Pedro Alves <palves@redhat.com>
3085
3086 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3087 out from gdbscm_parse_function_args.
3088 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3089 gdbscm_parse_function_args_1.
3090
3091 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3092
3093 PR gdb/17816
3094 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3095 operator.
3096
3097 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3098
3099 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3100
3101 2018-08-19 Michael Spang <spang@google.com>
3102
3103 PR gdb/11786
3104 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3105 for PT_TLS segments.
3106
3107 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3108
3109 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3110 dwarf_variable_value.
3111 * dwarf2-frame.c (class dwarf_expr_executor):
3112 Add override for dwarf_variable_value.
3113 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3114 (class symbol_needs_eval_context): Likewise.
3115 (indirect_synthetic_pointer): Add forward declaration.
3116 (sect_variable_value): New function.
3117 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3118 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3119 for DW_OP_GNU_variable_value.
3120
3121 2018-08-16 Tom Tromey <tom@tromey.com>
3122
3123 * top.c (read_command_file): Update.
3124 (command_line_input): Remove "repeat" argument.
3125 * ada-lang.c (get_selections): Update.
3126 * linespec.c (decode_line_2): Update.
3127 * defs.h (command_line_input): Remove argument.
3128 * cli/cli-script.c (read_next_line): Update.
3129 * python/py-gdb-readline.c: Update.
3130
3131 2018-08-17 Tom Tromey <tom@tromey.com>
3132
3133 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3134 command_line_input.
3135
3136 2018-08-15 Tom Tromey <tom@tromey.com>
3137
3138 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3139
3140 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3141
3142 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3143 If used, use find_pc_partial_function to find address range
3144 to disassemble.
3145 * mi/mi-main.c (mi_cmd_list_features): Report
3146 "data-disassemble-a-option" feature.
3147 * NEWS: Mention new -data-disassemble option -a.
3148
3149 2018-08-13 Tom Tromey <tom@tromey.com>
3150
3151 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3152
3153 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3154
3155 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3156 (aarch64_linux_collect_sve_regset): Likewise.
3157 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3158 * regcache.h (regcache_map_entry_size): New function.
3159
3160 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3161
3162 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3163 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3164 (SVE_HEADER_VL_LENGTH): Likewise.
3165 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3166 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3167 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3168 (SVE_HEADER_SIZE_OFFSET): Likewise.
3169 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3170 (SVE_HEADER_VL_OFFSET): Likewise.
3171 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3172 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3173 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3174 (SVE_HEADER_SIZE): Likewise.
3175 (aarch64_linux_core_read_vq): Add function.
3176 (aarch64_linux_core_read_description): Check for SVE section.
3177
3178 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3179
3180 * aarch64-fbsd-tdep.c
3181 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3182 collect_size.
3183 * aarch64-linux-tdep.c
3184 (aarch64_linux_iterate_over_regset_sections): Likewise.
3185 * alpha-linux-tdep.c
3186 (alpha_linux_iterate_over_regset_sections):
3187 * alpha-nbsd-tdep.c
3188 (alphanbsd_iterate_over_regset_sections): Likewise.
3189 * amd64-fbsd-tdep.c
3190 (amd64fbsd_iterate_over_regset_sections): Likewise.
3191 * amd64-linux-tdep.c
3192 (amd64_linux_iterate_over_regset_sections): Likewise.
3193 * arm-bsd-tdep.c
3194 (armbsd_iterate_over_regset_sections): Likewise.
3195 * arm-fbsd-tdep.c
3196 (arm_fbsd_iterate_over_regset_sections): Likewise.
3197 * arm-linux-tdep.c
3198 (arm_linux_iterate_over_regset_sections): Likewise.
3199 * corelow.c (get_core_registers_cb): Likewise.
3200 (core_target::fetch_registers): Likewise.
3201 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3202 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3203 * gdbarch.h (void): Regenerate.
3204 * gdbarch.sh: Add supply_size and collect_size.
3205 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3206 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3207 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3208 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3209 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3210 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3211 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3212 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3213 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3214 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3215 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3216 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3217 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3218 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3219 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3220 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3221 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3222 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3223 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3224 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3225 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3226 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3227 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3228 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3229 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3230 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3231 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3232 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3233 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3234 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3235
3236 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3237
3238 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3239 with string_printf.
3240
3241 2018-08-10 Keith Seitz <keiths@redhat.com>
3242
3243 * compile/compile-c-support.c (add_code_header, add_code_footer):
3244 Move into policy class.
3245 (c_push_user_expression, pop_user_expression_nop)
3246 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3247 (compile_program): New host class.
3248 (c_compile_program): New typedef.
3249 (c_compute_porgram): Use c_compile_program.
3250
3251 2018-08-10 Keith Seitz <keiths@redhat.com>
3252
3253 * compile/compile-internal.h (compile_instance::~compile_instance):
3254 Remove calls to htab_delete.
3255 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3256 * compile.c (compile_instance::compile_instance): Initialize
3257 htab unique pointers.
3258 (compile_instance::get_cached_type, compile_instance::insert_type)
3259 (compile_instance::error_symbol_once): Update for unique_ptr.
3260
3261 2018-08-10 Keith Seitz <keiths@redhat.com>
3262
3263 * compile/compile-c-symbols.c (struct symbol_error)
3264 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3265 (compile_instance::insert_symbol_error)
3266 (compile_instance::error_symbol_once): Move to ...
3267 * compile/compile.c: ... here.
3268
3269 2018-08-10 Keith Seitz <keiths@redhat.com>
3270
3271 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3272 instead of `new_compile_instance'.
3273 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3274 Update description.
3275 If the symbol error map is not initialized, create it.
3276 (generate_c_for_for_one_symbol): Do not check/initialize
3277 the symbol error map.
3278 * compile/compile-c-types.c (compile_c_instance): Make a class.
3279 Update all callers.
3280 (compile_instance::compile_instance): Initialize the type cache.
3281 (get_cached_type): New function.
3282 (insert_type): Update description.
3283 (compile_c_instance::m_default_cflags): Define.
3284 (convert_type): Update description. Use get_cached_type.
3285 (delete_instance): Moved to destructor.
3286 (new_compile_instance): Moved to constructor.
3287 * compile/compile-c.h (compile_c_instance): Make class inheriting
3288 from compile_instance.
3289 <base>: Remove field.
3290 <type_map, symbol_err_map>: Move to base class.
3291 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3292 * compile/compile-internal.h (compile_instance): Make class.
3293 <type_map_t, symbol_err_map_t>: Define.
3294 <fe>: Rename to `m_gcc_fe'.
3295 <scope, block, gcc_target_options>: Add `m_' prefix.
3296 <m_type_map, m_symbol_err_map>: New fields, moved from
3297 compile_c_instance.
3298 <destroy>: Remove.
3299 (convert_type, new_compile_instance): Remove.
3300 * compile/compile.c (cleanup_compile_instance): Remove.
3301 (compile_to_object): Use unique_ptr to eliminate cleanups.
3302 (compile_instance::set_print_callback, compile_instance::version)
3303 (compile_instance::set_verbose)
3304 (compile_instance::set_driver_filename)
3305 (compile_instance::set_triplet_regexp)
3306 (compile_instance::set_arguments)
3307 (compile_instance::set_source_file)
3308 (compile_instance::compile): Define.
3309
3310 2018-08-10 Keith Seitz <keiths@redhat.com>
3311
3312 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3313 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3314 gcc-c-fe.def to define C plugin.
3315 (delete_instance): Delete `c_plugin'.
3316 (new_compile_instance): Initialize `c_plugin'.
3317 * compile/compile-c.h: Include gcc_c_plugin.h.
3318 (struct compile_c_instance) <c_plugin>: New member.
3319 * gcc-c-plugin.h: New file.
3320 Update all callers with API change.
3321
3322 2018-08-10 Keith Seitz <keiths@redhat.com>
3323
3324 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3325 (HFILES_NO_SRCDIR): ... to here.
3326 Add compile-internal.h and compile-c.h.
3327 * compile/compile-c-support.c: Include compile-c.h.
3328 * compile/compile-c-symbols.c: Include compile-c.h.
3329 (generate_c_for_variable_locations): Update comment.
3330 * compile/compile-c-types.c: Include compile-c.h.
3331 * compile/compile-c.h: New file -- moved C language declarations
3332 from other files here.
3333 * compile/compile-internal.h: Do not include hashtab.h or
3334 common/enum-flags.h.
3335 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3336 (gcc_convert_symbol, gcc_symbol_address)
3337 (generate_c_for_variable_locations, c_get_mode_for_size)
3338 (c_get_range_decl_name): Definitions moved to compile-c.h.
3339 * compile/compile-loc2c.c: Include compile-c.h.
3340
3341 2018-08-10 Keith Seitz <keiths@redhat.com>
3342
3343 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3344 (c_symbol_substitution_name): ... this.
3345 Update all callers.
3346
3347 2018-08-10 Keith Seitz <keiths@redhat.com>
3348
3349 * compile/compile-c-support.c (c_compute_program): Use
3350 unique_xmalloc_ptr to eliminate cleanup.
3351 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3352 Return a unique_xmalloc_ptr and eliminate cleanup.
3353 * compile/compile-internal.h (generate_c_for_variable_locations):
3354 Return unique_xmalloc_ptr and update description.
3355
3356 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3357
3358 * corelow.c (core_target::get_core_register_section): Rename
3359 min_size to section_min_size.
3360
3361 2018-08-09 Jim Wilson <jimw@sifive.com>
3362
3363 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3364 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3365 * NEWS: Mention new GNU/Linux RISC-V target.
3366 * configure.host: Add riscv*-*-linux*.
3367 * configure.nat: Add riscv*.
3368 * configure.tgt: Add riscv*-*-linux*.
3369 * riscv-linux-nat.c: New file.
3370 * riscv-linux-tdep.c: New file.
3371
3372 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3373
3374 * infrun.c (resume): Make static, add forward declaration.
3375 (proceed): Update header comment.
3376 * infrun.h (resume): Delete declaration.
3377
3378 2018-08-09 Tom Tromey <tom@tromey.com>
3379
3380 * riscv-tdep.h: Minor formatting fixes.
3381
3382 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3383
3384 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3385 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3386 (test_mkdir_recursive): Likewise.
3387 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3388
3389 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3390
3391 * valarith.c (value_subscripted_rvalue): If an array is not in
3392 memory, and we don't know the upper bound, then we can't know that
3393 the requested element exists or not.
3394
3395 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3396
3397 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3398 (target_options_to_string): Add comment.
3399
3400 2018-08-08 Tom Tromey <tom@tromey.com>
3401
3402 * unittests/scoped_mmap-selftests.c: Check result of "write".
3403
3404 2018-08-08 Jim Wilson <jimw@sifive.com>
3405
3406 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3407 (decode_register_index_short): New.
3408 (decode_j_type_insn, decode_cj_type_insn): New.
3409 (decode_b_type_insn, decode_cb_type_insn): New.
3410 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3411 local xlen. Check xlen when decoding ambiguous compressed insns. In
3412 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3413 is_c_sw_insn instead of is_sw_insn.
3414 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3415 (riscv_software_single_step): New.
3416 * riscv-tdep.h (riscv_software_single_step): Declare.
3417
3418 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3419 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3420
3421 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3422
3423 PR gdb/18050:
3424 * target.c (dispose_inferior): Don't dispose of inferiors that are
3425 already killed.
3426
3427 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3428
3429 * remote.c (remote_target::download_tracepoint): Change char* to
3430 const char*.
3431
3432 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3433
3434 * target.h (target_options_to_string): Return an std::string.
3435 * target.c (str_comma_list_concat_elem): Return void, use
3436 std::string.
3437 (do_option): Likewise.
3438 (target_options_to_string): Return an std::string.
3439 * linux-nat.c (linux_nat_target::wait): Adjust.
3440 * target-debug.h (target_debug_print_options): Adjust.
3441
3442 2018-08-07 Tom Tromey <tom@tromey.com>
3443
3444 * Makefile.in (CPPFLAGS): New variable.
3445 (INTERNAL_CPPFLAGS): Use it.
3446
3447 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3448
3449 * NEWS: Mention the index cache.
3450
3451 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3452
3453 * common/pathstuff.h (get_standard_cache_dir): New.
3454 * common/pathstuff.c (get_standard_cache_dir): New.
3455 * build-id.h (build_id_to_string): New.
3456 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3457 DEBUG_STR_SUFFIX): Move to here.
3458 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3459 DEBUG_STR_SUFFIX): Move from there.
3460 (write_psymtabs_to_index): Make non-static, add basename
3461 parameter. Write to temporary files, rename when done.
3462 (save_gdb_index_command): Adjust call to
3463 write_psymtabs_to_index.
3464 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3465 field.
3466 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3467 (get_gdb_index_contents_from_cache): New.
3468 (get_gdb_index_contents_from_cache_dwz): New.
3469 (dwarf2_initialize_objfile): Read index from cache.
3470 (dwarf2_build_psymtabs): Save to index.
3471 * dwarf-index-cache.h: New file.
3472 * dwarf-index-cache.c: New file.
3473 * dwarf-index-write.h: New file.
3474
3475 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3476
3477 * gnulib/aclocal.m4: Re-generate.
3478 * gnulib/config.in: Re-generate.
3479 * gnulib/configure: Re-generate.
3480 * gnulib/import/Makefile.am: Re-generate.
3481 * gnulib/import/Makefile.in: Re-generate.
3482 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3483 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3484 * gnulib/import/m4/mkdir.m4: New file.
3485 * gnulib/import/mkdir.c: New file.
3486 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3487 module.
3488
3489 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3490
3491 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3492 * common/scoped_mmap.c: New file.
3493 * common/scoped_mmap.h (destroy): New method.
3494 (~scoped_mmap, reset): Use destroy.
3495 (scoped_mmap): New move constructor.
3496 (mmap_file): New declaration.
3497 * unittests/scoped_mmap-selftests.c (test_normal,
3498 test_invalid_filename, run_tests): New functions.
3499 (_initialize_scoped_mmap_selftests): Register selftest.
3500
3501 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3502
3503 * dwarf2read.c (read_gdb_index_from_section): Rename to...
3504 (read_gdb_index_from_buffer): ... this. Remove section
3505 parameter, add buffer parameter.
3506 (get_gdb_index_contents_ftype,
3507 get_gdb_index_contents_dwz_ftype): New typedefs.
3508 (dwarf2_read_gdb_index): Add callback parameters to get the
3509 index contents.
3510 (get_gdb_index_contents_from_section): New.
3511 (dwarf2_initialize_objfile): Update call to
3512 dwarf2_read_gdb_index.
3513
3514 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
3515
3516 * common/filestuff.h (gdb_fopen_cloexec): New overload.
3517 (gdb_open_cloexec): Likewise.
3518 * nat/linux-osdata.c (command_from_pid): Use string_printf.
3519 (commandline_from_pid): Likewise.
3520 (linux_xfer_osdata_threads): Likewise.
3521 (linux_xfer_osdata_fds): Likewise.
3522 * ada-lang.c (is_package_name): Likewise.
3523 * auxv.c (procfs_xfer_auxv): Likewise.
3524 * breakpoint.c (print_one_breakpoint_location): Use
3525 uiout::field_fmt.
3526 (print_one_catch_solib): Use string_printf.
3527 * coff-pe-read.c (add_pe_exported_sym): Likewise.
3528 (add_pe_forwarded_sym): Likewise.
3529 * dwarf2read.c (create_type_unit_group): Likewise.
3530 (build_error_marker_type): Likewise.
3531 * infcall.c (get_function_name): Likewise.
3532 * valprint.c (print_converted_chars_to_obstack): Likewise.
3533 * xtensa-tdep.c (xtensa_register_type): Likewise.
3534
3535 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
3536
3537 * remote.c (remote_target::download_tracepoint): Fix format
3538 string errors.
3539
3540 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3541
3542 * tracefile.c: Include common/byte-vector.h.
3543 (trace_save): Change type of buf to gdb::byte_vector. Initialize
3544 with trace_regblock_size if needed. Update uses of buf.
3545
3546 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3547
3548 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3549 std::vector<unsigned char>.
3550 * tracepoint.c (collection_list::collection_list): Remove
3551 m_regs_mask initializer from initializer list. Resize
3552 m_regs_mask using the largest remote register number.
3553 (collection_list::add_remote_register): Remove size check on
3554 m_regs_mask. Use at to access element.
3555 (collection_list::stringify): Change type of temp_buf to
3556 gdb::char_vector. Update uses of temp_buf. Resize if needed to
3557 stringify the register mask. Use pack_hex_byte for the register
3558 mask.
3559
3560 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3561
3562 * tracepoint.h (class collection_list) <add_register>: Remove.
3563 <add_remote_register, add_ax_registers, add_local_register>:
3564 Declare.
3565 <add_memrange>: Add scope parameter.
3566 * tracepoint.c (encode_actions_1): Likewise.
3567 (collection_list::add_register): Rename to ...
3568 (collection_list::add_remote_register): ... this. Update
3569 comment.
3570 (collection_list::add_ax_registers, add_local_register): New
3571 methods.
3572 (collection_list::add_memrange): Add scope parameter. Call
3573 add_local_register instead of add_register.
3574 (finalize_tracepoint_aexpr): New function.
3575 (collection_list::collect_symbol): Update calls to add_memrange.
3576 Call add_local_register instead of add_register. Call
3577 add_ax_registers. Call finalize_tracepoint_aexpr.
3578 (encode_actions_1): Get remote regnos for $reg action. Call
3579 add_remote_register, add_ax_registers, and add_local_register.
3580 Update call to add_memrange. Call finalize_tracepoint_aexpr.
3581 (validate_actionline): Call finalize_tracepoint_aexpr.
3582
3583 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3584
3585 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3586 Replace array buf with gdb::char_vector buf, of size
3587 get_remote_packet_size (). Replace references to buf and
3588 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
3589 and xsnprintf with snprintf. Raise errors if the buffer is too
3590 small.
3591
3592 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3593
3594 * remote.c (remote_target::download_tracepoint): Fix the has_more
3595 predicate in the QTDP action list iteration.
3596
3597 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
3598
3599 * remote.c (remote_target::download_tracepoint): Fix indentation
3600 in for block.
3601
3602 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3603
3604 * proc-api.c (_initialize_proc_api): Remove c, unused.
3605 * procfs.c (procfs_init_inferior): Remove signals, unused.
3606 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3607 unused.
3608
3609 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
3610 Andrew Burgess <andrew.burgess@embecosm.com>
3611
3612 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3613 'W_STOPCODE (0)' as this could be ambiguous.
3614
3615 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
3616
3617 * ser-tcp.c (net_open): Fix thinko when deciding whether to
3618 disable TCP's Nagle algorithm (use "ai_protocol" instead of
3619 "ai_socktype").
3620
3621 2018-08-02 Tom Tromey <tom@tromey.com>
3622
3623 PR symtab/16842.
3624 * dwarf2read.c (read_func_scope): Set symtab on template parameter
3625 symbols.
3626 (process_structure_scope): Likewise.
3627
3628 2018-08-02 Xavier Roirand <roirand@adacore.com>
3629
3630 PR gdb/22629:
3631 * darwin-nat.c (darwin_kill_inferior): Fix handling of
3632 kill inferior.
3633
3634 2018-08-02 Tom Tromey <tom@tromey.com>
3635
3636 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3637 (darwin_suspend_inferior, darwin_resume_inferior)
3638 (darwin_decode_notify_message, darwin_resume_inferior_threads)
3639 (darwin_check_new_threads): Check result of get_darwin_inferior.
3640
3641 2018-07-31 Joel Brobecker <brobecker@adacore.com>
3642
3643 GDB 8.1.1 released.
3644
3645 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
3646
3647 * varobj.c (varobj_get_path_expr_parent): Report an error if
3648 parent is a dynamic varobj.
3649
3650 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3651
3652 * gnulib/aclocal.m4: Re-generate.
3653 * gnulib/config.in: Re-generate.
3654 * gnulib/configure: Re-generate.
3655 * gnulib/import/Makefile.in: Re-generate.
3656 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3657 * gnulib/import/m4/onceonly.m4: Re-generate.
3658
3659 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
3660
3661 * target-descriptions.c (struct xml_test_tdesc): New.
3662 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3663 (record_xml_tdesc): Update.
3664 (maintenance_check_xml_descriptions): Update.
3665 * target-descriptions.h (record_xml_tdesc): Update comment.
3666
3667 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
3668
3669 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3670 checking array bounds are defined.
3671
3672 2018-07-30 Tom Tromey <tom@tromey.com>
3673
3674 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3675 irreflexivity violation.
3676
3677 2018-07-30 Tom Tromey <tom@tromey.com>
3678
3679 * cli/cli-decode.c (lookup_cmd): Remove lint code.
3680 * value.c (unpack_long): Remove lint code.
3681 * valops.c (value_ind): Remove lint code.
3682 * valarith.c (value_x_binop, value_x_unop, value_equal)
3683 (value_pos): Remove lint code.
3684
3685 2018-07-28 Tom de Vries <tdevries@suse.de>
3686
3687 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3688 with undefined upper bound as <optimized out>.
3689
3690 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
3691
3692 * gcore.in: Rename variable "name" to "prefix". Expand
3693 "usage" text.
3694
3695 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
3696
3697 * windows-nat.c (windows_nat_target::create_inferior): Update to
3698 call close() in global namespace.
3699
3700 2018-07-26 Tom Tromey <tom@tromey.com>
3701
3702 * dwarf-index-write.c (add_address_entry): Don't add objfile
3703 offsets.
3704 * dbxread.c (find_stab_function): Rename from
3705 find_stab_function_addr. Return a bound_minimal_symbol.
3706 (read_dbx_symtab): Use raw_text_low, raw_text_high.
3707 Don't add objfile offsets.
3708 (end_psymtab): Use raw_text_low, raw_text_high,
3709 MSYMBOL_VALUE_RAW_ADDRESS.
3710 (read_ofile_symtab): Update.
3711 (process_one_symbol): Update.
3712 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3713 offsets.
3714 (dw2_relocate): Remove.
3715 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3716 searching addrmap.
3717 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3718 Update.
3719 (process_psymtab_comp_unit_reader, add_partial_symbol)
3720 (add_partial_subprogram, dwarf2_ranges_read): Update.
3721 (load_partial_dies): Update.
3722 (add_address_entry): Don't add objfile offsets.
3723 (dwarf2_build_include_psymtabs): Update.
3724 (create_addrmap_from_aranges): Don't add objfile offsets.
3725 (dw2_find_pc_sect_compunit_symtab): Update.
3726 * mdebugread.c (parse_symbol): Don't add objfile offsets.
3727 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3728 Update.
3729 (parse_partial_symbols): Don't add objfile offsets. Use
3730 raw_text_low, raw_text_high. Update.
3731 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3732 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3733 or call 'relocate' quick function. Clear psymbol_map.
3734 * psympriv.h (struct partial_symbol) <address>: Add section
3735 offset.
3736 <set_unrelocated_address>: Rename from set_address.
3737 <raw_text_low, raw_text_high>: New methods.
3738 <text_low, text_high>: Add objfile parameter.
3739 (add_psymbol_to_bcache): Add 'section' parameter. Call
3740 set_unrelocated_address.
3741 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3742 (find_pc_psymbol): Update.
3743 (fixup_psymbol_section, relocate_psymtabs): Remove.
3744 (dump_psymtab, psym_functions): Update.
3745 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3746 parameter.
3747 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3748 (start_psymtab_common): Update.
3749 * symfile-debug.c (debug_qf_relocate): Remove.
3750 (debug_sym_quick_functions): Update.
3751 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3752 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3753 Update.
3754
3755 2018-07-26 Tom Tromey <tromey@redhat.com>
3756
3757 * dbxread.c (end_psymtab): Use text_high_valid and
3758 text_low_valid.
3759 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3760 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3761 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3762 Update comment.
3763 <text_low_valid, text_high_valid>: New fields.
3764 <set_text_low, set_text_high>: Update.
3765 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3766
3767 2018-07-26 Tom Tromey <tom@tromey.com>
3768
3769 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3770 Update.
3771 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3772 textlow and texthigh fields.
3773 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3774 Update.
3775 * mdebugread.c (parse_lines, parse_partial_symbols)
3776 (psymtab_to_symtab_1): Update.
3777 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3778 Rename fields. Update comment. Now private.
3779 <text_low, text_high, set_text_low, set_text_high>: New methods.
3780 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3781 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3782 (start_psymtab_common, maintenance_info_psymtabs)
3783 (maintenance_check_psymtabs): Update.
3784 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3785 texthigh fields.
3786 (scan_xcoff_symtab): Update.
3787
3788 2018-07-26 Tom Tromey <tromey@redhat.com>
3789
3790 * psympriv.h (struct partial_symbol) <unrelocated_address,
3791 address, set_address>: New methods.
3792 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3793 (fixup_psymbol_section, relocate_psymtabs): Update.
3794 (print_partial_symbols): Add 'objfile' parameter. Update.
3795 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3796 Update.
3797
3798 2018-07-26 Tom Tromey <tom@tromey.com>
3799
3800 * dwarf-index-write.c (write_psymbols, debug_names::insert)
3801 (debug_names::write_psymbols): Update.
3802 * psympriv.h (struct partial_symbol): Derive from
3803 general_symbol_info.
3804 <obj_section>: New method.
3805 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3806 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3807 (find_pc_sect_psymbol, fixup_psymbol_section)
3808 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3809 (print_partial_symbols, recursively_search_psymtabs)
3810 (compare_psymbols, psymbol_hash, psymbol_compare)
3811 (add_psymbol_to_bcache, maintenance_check_psymtabs)
3812 (psymbol_name_matches, psym_fill_psymbol_map): Update.
3813
3814 2018-07-26 Tom Tromey <tromey@redhat.com>
3815
3816 * dbxread.c (end_psymtab): Remove dead code.
3817
3818 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
3819
3820 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3821 DWARF unwinders are disabled.
3822 * dwarf2-frame.c: Add dwarf2read.h include.
3823 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3824 disabled.
3825 (dwarf2_frame_unwinders_enabled_p): Define.
3826 (show_dwarf_unwinders_enabled_p): New function.
3827 (_initialize_dwarf2_frame): Register switch to control DWARF
3828 unwinder use.
3829 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3830 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3831 (show_dwarf_cmdlist): Remove static keyword.
3832 * dwarf2read.h (set_dwarf_cmdlist): Declare.
3833 (show_dwarf_cmdlist): Declare.
3834 * NEWS: Document new feature.
3835
3836 2018-07-26 Tom de Vries <tdevries@suse.de>
3837
3838 PR breakpoints/23366
3839 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3840
3841 2018-07-26 Tom de Vries <tdevries@suse.de>
3842
3843 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3844 DW_AT_count can't be translated to a dynamic prop.
3845
3846 2018-07-25 Tom de Vries <tdevries@suse.de>
3847
3848 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3849 try/catch.
3850
3851 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
3852
3853 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3854
3855 2018-07-25 Joel Brobecker <brobecker@adacore.com>
3856
3857 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3858
3859 2018-07-24 Keith Seitz <keiths@redhat.comt
3860
3861 PR symtab/23010
3862 * dwarf2read.c (dw2_add_symbol_to_list): New function.
3863 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3864 instead of add_symbol_to_list.
3865 (read_file_scope): Call prepare_one_comp_unit before reading
3866 any other DIEs.
3867
3868 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
3869
3870 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3871
3872 2018-07-24 Tom Tromey <tom@tromey.com>
3873
3874 * utils.c (malloc, realloc, free): Don't declare.
3875 * configure, config.in: Rebuild.
3876 * configure.ac: Don't check for declarations of free, malloc, or
3877 realloc.
3878
3879 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3880
3881 * aarch64-linux-nat.c
3882 (aarch64_linux_nat_target::stopped_data_address): Remove unused
3883 variable.
3884 * arm-linux-nat.c (fetch_regs): Likewise.
3885 (store_regs): Likewise.
3886 (fetch_vfp_regs): Likewise.
3887 (store_vfp_regs): Likewise.
3888 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3889 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3890 (arm_linux_nat_target::insert_watchpoint): Likewise.
3891 (arm_linux_nat_target::remove_watchpoint): Likewise.
3892 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3893 Likewise.
3894 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3895 Likewise.
3896 * ppc-linux-nat.c (fetch_register): Likewise.
3897 (fetch_all_gp_regs): Likewise.
3898 (fetch_ppc_registers): Likewise.
3899 (store_all_gp_regs): Likewise.
3900 (store_ppc_registers): Likewise.
3901 (hwdebug_insert_point): Likewise.
3902 (can_use_watchpoint_cond_accel): Likewise.
3903 * remote-sim.c (gdb_os_write_stdout): Likewise.
3904
3905 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3906 Tom Tromey <tom@tromey.com>
3907
3908 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3909 test for it.
3910 * configure: Rebuild.
3911
3912 2018-07-22 Tom Tromey <tom@tromey.com>
3913
3914 * regformats/regdat.sh: Define xmltarget_${name} inside
3915 #ifndef IN_PROCESS_AGENT.
3916
3917 2018-07-22 Tom Tromey <tom@tromey.com>
3918
3919 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3920
3921 2018-07-22 Tom Tromey <tom@tromey.com>
3922
3923 * symfile.c (reread_symbols): Notify iter, not objfile.
3924
3925 2018-07-22 Tom Tromey <tom@tromey.com>
3926
3927 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3928 Use arch_ops.
3929 (ravenscar_thread_target::prepare_to_store): Likewise.
3930
3931 2018-07-22 Tom Tromey <tom@tromey.com>
3932
3933 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3934 unused variable. Call value_fetch_lazy when needed.
3935 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3936 Remove unused variable. Call value_fetch_lazy when needed.
3937
3938 2018-07-22 Tom Tromey <tom@tromey.com>
3939
3940 * m32c-tdep.c (mark_dma): Return void.
3941 (make_regs): Remove unused declarations.
3942
3943 2018-07-22 Tom Tromey <tom@tromey.com>
3944
3945 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3946 cmdscm_get_valid_command_smob_arg_unsafe for effect.
3947 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3948 bkscm_get_valid_block_smob_arg_unsafe for effect.
3949
3950 2018-07-22 Tom Tromey <tom@tromey.com>
3951
3952 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3953 value_type.
3954
3955 2018-07-22 Tom Tromey <tom@tromey.com>
3956
3957 * windows-nat.c (saved_context): Conditionally define.
3958 * remote.c (remote_target::remote_btrace_maybe_reopen):
3959 Conditionally declare "warned".
3960 * inflow.c (sigquit_ours): Conditionally define.
3961 (new_tty): Move "tty" declaration inside #if.
3962 * guile/guile.c (guile_datadir): Conditionally define.
3963 * charset.c (set_be_le_names): Move some declarations inside #if.
3964 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3965 #if.
3966 (parse_xml_btrace_conf): Likewise.
3967
3968 2018-07-22 Tom Tromey <tom@tromey.com>
3969
3970 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3971
3972 2018-07-22 Tom Tromey <tom@tromey.com>
3973
3974 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3975 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3976 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3977 * buildsym-legacy.c (get_macro_table): Remove unused variable.
3978 * stack.c (frame_apply_level_command): Remove unused variable.
3979 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3980 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3981 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3982 unused variable.
3983 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3984 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3985 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3986 variable.
3987 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3988 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3989 variable.
3990 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3991 Remove unused variable.
3992 * cli/cli-script.c (recurse_read_control_structure): Remove unused
3993 variable.
3994 * common/tdesc.c (print_xml_feature::visit): Remove unused
3995 variable.
3996 * compile/compile-object-load.c (store_regs): Remove unused
3997 variables.
3998 * complaints.c (clear_complaints): Remove unused variable.
3999 * corelow.c (core_target_open): Remove unused variable.
4000 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4001 variable.
4002 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4003 variable.
4004 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4005 variable.
4006 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4007 variable.
4008 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4009 variable.
4010 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4011 variable.
4012 * ia64-tdep.c (examine_prologue): Remove unused variable.
4013 * infcall.c (run_inferior_call): Remove unused variable.
4014 * inferior.c (exit_inferior): Remove unused variable.
4015 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4016 * linespec.c (decode_line_2): Remove unused variable.
4017 * linux-nat.c (super_close): Remove.
4018 * linux-tdep.c (linux_info_proc): Remove unused variable.
4019 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4020 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4021 Remove unused variable.
4022 * parse.c (find_minsym_type_and_address): Remove unused variable.
4023 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4024 variable.
4025 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4026 variable.
4027 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4028 variables.
4029 * record-btrace.c (record_btrace_target::store_registers): Remove
4030 unused variable.
4031 (cmd_show_record_btrace_cpu): Remove unused variable.
4032 * riscv-tdep.c (riscv_register_reggroup_p)
4033 (riscv_push_dummy_call, riscv_return_value): Remove unused
4034 variable.
4035 * rust-exp.y (literal): Remove unused variable.
4036 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4037 unused variable.
4038 <STRUCTOP_ANONYMOUS>: Likewise.
4039 * s390-linux-tdep.c (s390_linux_init_abi_31)
4040 (s390_linux_init_abi_64): Remove unused variable.
4041 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4042 (file_select_thread, net_windows_open, _initialize_ser_windows):
4043 Remove unused variables.
4044 * symtab.c (find_pc_sect_line): Remove unused variable.
4045 * target-memory.c (compute_garbled_blocks): Remove unused
4046 variable.
4047 (target_write_memory_blocks): Remove unused variable.
4048 * target.c (target_stack::unpush): Remove unused variables.
4049 * tracepoint.c (start_tracing, all_tracepoint_actions)
4050 (merge_uploaded_trace_state_variables)
4051 (print_one_static_tracepoint_marker): Remove unused variable.
4052 * unittests/basic_string_view/element_access/char/1.cc (test01):
4053 Remove unused variable.
4054 * windows-nat.c (windows_continue, windows_add_all_dlls)
4055 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4056 Remove unused variables.
4057
4058 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4059
4060 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4061 attr_profile in HAVE_ELF.
4062 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4063 HAVE_ELF.
4064
4065 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4066
4067 * frame.c (frame_register_unwind): Change parameter name.
4068 (frame_unwind_register): Likewise.
4069 (frame_unwind_register_value): Likewise.
4070 (frame_unwind_register_signed): Likewise.
4071 (frame_unwind_register_unsigned): Likewise.
4072 * frame.h (frame_register_unwind): Likewise.
4073 (frame_unwind_register): Likewise.
4074 (frame_unwind_register_value): Likewise.
4075 (frame_unwind_register_signed): Likewise.
4076 (frame_unwind_register_unsigned): Likewise.
4077 (frame_unwind_arch): Likewise.
4078
4079 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4080
4081 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4082 ISA maintenance.
4083
4084 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4085
4086 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4087 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4088 hand.
4089
4090 2018-07-20 Keith Seitz <keiths@redhat.com>
4091
4092 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4093 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4094 m_compunit_symtab, m_language>: Add "m_" prefix.
4095 Update all uses.
4096 * buildsym.c: Update all uses.
4097
4098 2018-07-20 Tom Tromey <tom@tromey.com>
4099
4100 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4101 * buildsym.h (record_line_ftype): Remove typedef.
4102
4103 2018-07-20 Tom Tromey <tom@tromey.com>
4104
4105 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4106 (end_expandable_symtab): Likewise.
4107 (end_symtab_get_static_block): Likewise.
4108 (end_symtab_from_static_block): Likewise.
4109 * buildsym-legacy.c (augment_type_symtab): Remove.
4110 (end_expandable_symtab): Remove.
4111 (end_symtab_get_static_block): Remove.
4112 (end_symtab_from_static_block): Remove.
4113
4114 2018-07-20 Tom Tromey <tom@tromey.com>
4115
4116 * dwarf2read.c: Include buildsym.h.
4117 (struct dwarf2_cu) <builder>: New method.
4118 (fixup_go_packaging): Update.
4119 (process_full_comp_unit, process_full_type_unit): Update. Don't
4120 use scoped_free_pendings.
4121 (using_directives): Add "cu" parameter, remove "language".
4122 (read_import_statement, setup_type_unit_groups, )
4123 (read_func_scope, read_lexical_block_scope)
4124 (dwarf2_record_block_ranges, read_namespace): Update.
4125 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4126 (lnp_state_machine::handle_end_sequence): Update.
4127 (class lnp_state_machine) <m_cu>: New member.
4128 <m_record_line_callback>: Remove.
4129 <m_currently_recording_lines>: New member.
4130 (lnp_state_machine::handle_set_file): Update.
4131 (noop_record_line): Remove.
4132 (dwarf_record_line_p): Add cu parameter.
4133 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4134 (lnp_state_machine::record_line)
4135 (lnp_state_machine::lnp_state_machine)
4136 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4137 (dwarf_decode_lines): Update.
4138 (dwarf2_start_subfile): Add cu parameter.
4139 (dwarf2_start_symtab, new_symbol): Update.
4140 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4141 Remove dwarf2_per_objfile parameter.
4142 (dwarf_decode_macros): Update.
4143
4144 2018-07-20 Tom Tromey <tom@tromey.com>
4145
4146 * stabsread.c (define_symbol): Update.
4147 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4148 * dwarf2read.c (new_symbol): Update.
4149 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4150 * cp-namespace.c: Include buildsym.h.
4151 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4152 * buildsym-legacy.c (get_buildsym_compunit): New function.
4153
4154 2018-07-20 Tom Tromey <tom@tromey.com>
4155
4156 * xcoffread.c: Include buildsym-legacy.h.
4157 * windows-nat.c: Include buildsym-legacy.h.
4158 * stabsread.c: Include buildsym-legacy.h.
4159 * mdebugread.c: Include buildsym-legacy.h.
4160 * buildsym-legacy.h: New file.
4161 * buildsym-legacy.c: New file, from buildsym.c.
4162 * go32-nat.c: Include buildsym-legacy.h.
4163 * dwarf2read.c: Include buildsym-legacy.h.
4164 * dbxread.c: Include buildsym-legacy.h.
4165 * cp-namespace.c: Include buildsym-legacy.h.
4166 * coffread.c: Include buildsym-legacy.h.
4167 * buildsym.h: Move some contents to buildsym-legacy.h.
4168 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4169 buildsym-legacy.c.
4170 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4171
4172 2018-07-20 Tom Tromey <tom@tromey.com>
4173
4174 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4175 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4176 (buildsym_compunit::buildsym_compunit)
4177 (buildsym_compunit::~buildsym_compunit)
4178 (buildsym_compunit::get_macro_table): Define.
4179
4180 2018-07-20 Tom Tromey <tom@tromey.com>
4181
4182 * buildsym.c (reset_symtab_globals): Remove.
4183 (buildsym_compunit::end_symtab_from_static_block): Update.
4184 (buildsym_compunit::augment_type_symtab): Update.
4185 (end_symtab_from_static_block): Call free_buildsym_compunit.
4186 (augment_type_symtab, end_symtab, end_expandable_symtab):
4187 Likewise.
4188
4189 2018-07-20 Tom Tromey <tom@tromey.com>
4190
4191 * arch-utils.c: Do not include buildsym.h.
4192 * mipsread.c: Do not include buildsym.h.
4193 * machoread.c: Do not include buildsym.h.
4194 * elfread.c: Do not include buildsym.h.
4195
4196 2018-07-20 Tom Tromey <tom@tromey.com>
4197
4198 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4199 initialization.
4200 (buildsym_compunit): Add new constructor.
4201 (struct buildsym_compunit) <get_last_source_file, finish_block,
4202 record_block_range, start_subfile, patch_subfile_names,
4203 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4204 set_last_source_start_addr, get_last_source_start_addr,
4205 get_local_using_directives, set_local_using_directives,
4206 get_global_using_directives, outermost_context_p,
4207 get_current_context_stack, get_context_stack_depth,
4208 get_current_subfile, get_local_symbols, get_file_symbols,
4209 get_global_symbols, record_debugformat, record_producer,
4210 push_context, pop_context, end_symtab_get_static_block,
4211 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4212 New public methods.
4213 <record_pending_block, finish_block_internal, make_blockvector,
4214 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4215 private methods.
4216 Update all users.
4217
4218 2018-05-22 Tom Tromey <tom@tromey.com>
4219
4220 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4221 parameter.
4222 (finish_block_internal): Update.
4223
4224 2018-07-20 Tom Tromey <tom@tromey.com>
4225
4226 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4227 parameter.
4228 (finish_block_internal): Update.
4229
4230 2018-07-20 Tom Tromey <tom@tromey.com>
4231
4232 * buildsym.h (EXTERN): Don't define or undef.
4233 * buildsym.c (EXTERN): Don't define.
4234
4235 2018-07-20 Tom Tromey <tom@tromey.com>
4236
4237 * buildsym.c: Remove TODO comment.
4238
4239 2018-07-20 Tom Tromey <tom@tromey.com>
4240
4241 * coffread.c (coff_symtab_read): Update.
4242 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4243 (xcoff_new_init): Update.
4244 * mipsread.c (mipscoff_new_init): Update.
4245 * mdebugread.c (mdebug_build_psymtabs): Update.
4246 * elfread.c (elf_new_init): Update.
4247 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4248 Update.
4249 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4250 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4251 (stabsect_build_psymtabs): Update.
4252 * buildsym.h (buildsym_init): Don't declare.
4253 * buildsym.c: Update comment.
4254 (prepare_for_building): Remove.
4255 (start_symtab, restart_symtab): Update.
4256 (reset_symtab_globals): Update comment.
4257 (buildsym_init): Remove.
4258
4259 2018-07-20 Tom Tromey <tom@tromey.com>
4260
4261 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4262 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4263 (read_enum_type, common_block_start, common_block_end)
4264 (cleanup_undefined_types_1, finish_global_stabs): Update.
4265 * mdebugread.c (psymtab_to_symtab_1): Update.
4266 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4267 (read_lexical_block_scope, new_symbol): Update.
4268 * dbxread.c (process_one_symbol): Update.
4269 * coffread.c (coff_symtab_read, process_coff_symbol)
4270 (coff_read_enum_type): Update.
4271 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4272 declare.
4273 (get_local_symbols, get_file_symbols, get_global_symbols): New
4274 functions.
4275 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4276 m_global_symbols.
4277 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4278 (~scoped_free_pendings): Update.
4279 (finish_block, prepare_for_building, reset_symtab_globals)
4280 (end_symtab_get_static_block, end_symtab_with_blockvector)
4281 (augment_type_symtab, push_context): Update.
4282 (get_local_symbols, get_file_symbols, get_global_symbols): New
4283 functions.
4284 (buildsym_init): Update.
4285
4286 2018-07-20 Tom Tromey <tom@tromey.com>
4287
4288 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4289 (process_full_type_unit): Likewise.
4290 (dwarf2_start_symtab): Set list_in_scope.
4291
4292 2018-07-20 Tom Tromey <tom@tromey.com>
4293
4294 * dwarf2read.c (process_psymtab_comp_unit_reader)
4295 (build_type_psymtabs_reader): Do not set list_in_scope.
4296
4297 2018-07-20 Tom Tromey <tom@tromey.com>
4298
4299 * buildsym.c (free_pendings): Remove.
4300 (add_symbol_to_list, scoped_free_pendings)
4301 (finish_block_internal, buildsym_init): Update.
4302
4303 2018-07-20 Tom Tromey <tom@tromey.com>
4304
4305 * xcoffread.c (read_xcoff_symtab): Update.
4306 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4307 Update.
4308 * dbxread.c (process_one_symbol): Update.
4309 * coffread.c (coff_symtab_read): Update.
4310 * buildsym.h (finish_block): Update.
4311 * buildsym.c (finish_block): Remove "listhead" argument.
4312 (end_symtab_get_static_block): Update.
4313
4314 2018-07-20 Tom Tromey <tom@tromey.com>
4315
4316 * buildsym.h (class scoped_free_pendings): Remove constructor.
4317 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4318 method.
4319 <m_pending_block_obstack, m_pending_blocks>: New members.
4320 (pending_block_obstack, pending_blocks): Remove.
4321 (scoped_free_pendings::scoped_free_pendings): Default.
4322 (~scoped_free_pendings): Update.
4323 (free_pending_blocks): Remove.
4324 (finish_block_internal, record_pending_block, make_blockvector)
4325 (end_symtab_get_static_block, augment_type_symtab, push_context)
4326 (buildsym_init): Update.
4327
4328 2018-07-20 Tom Tromey <tom@tromey.com>
4329
4330 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4331 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4332 members.
4333 (pending_addrmap, pending_addrmap_obstack)
4334 (pending_addrmap_interesting): Remove.
4335 (scoped_free_pendings, record_block_range, make_blockvector)
4336 (prepare_for_building, reset_symtab_globals, buildsym_init):
4337 Update.
4338
4339 2018-07-20 Tom Tromey <tom@tromey.com>
4340
4341 * xcoffread.c (process_linenos): Update.
4342 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4343 * mdebugread.c (psymtab_to_symtab_1): Update.
4344 * dwarf2read.c (setup_type_unit_groups)
4345 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4346 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4347 * dbxread.c (process_one_symbol): Update.
4348 * coffread.c (coff_symtab_read, enter_linenos)
4349 (process_coff_symbol): Update.
4350 * buildsym.h (current_subfile): Don't declare.
4351 (get_current_subfile): Declare.
4352 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4353 member.
4354 (start_subfile, free_buildsym_compunit, push_subfile)
4355 (prepare_for_building, start_symtab): Update.
4356 (get_current_subfile): New function.
4357
4358 2018-07-20 Tom Tromey <tom@tromey.com>
4359
4360 * coffread.c (coff_symtab_read): Update.
4361 * xcoffread.c (read_xcoff_symtab): Update.
4362 * dwarf2read.c (new_symbol): Update.
4363 (read_func_scope, read_lexical_block_scope): Update.
4364 * dbxread.c (process_one_symbol): Update.
4365 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4366 (outermost_context_p): Remove macro.
4367 (outermost_context_p, get_current_context_stack)
4368 (get_context_stack_depth): Declare.
4369 (pop_context): Return struct context_stack.
4370 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4371 member.
4372 (context_stack_size): Remove.
4373 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4374 (prepare_for_building, end_symtab_get_static_block)
4375 (augment_type_symtab, push_context): Update.
4376 (pop_context): Return struct context_stack.
4377 (outermost_context_p, get_current_context_stack)
4378 (get_context_stack_depth): New functions.
4379 (buildsym_init): Update.
4380
4381 2018-07-20 Tom Tromey <tom@tromey.com>
4382
4383 * rust-exp.y: Now a pure parser. Update all rules.
4384 (%union): Move earlier.
4385 (current_parser, work_obstack): Remove globals.
4386 (rust_parser, ~rust_parser): Update.
4387 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4388 lex_character, lex_number, lex_string, lex_identifier,
4389 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4390 convert_name, convert_params_to_expression,
4391 convert_ast_to_expression, ast_basic_type, ast_operation,
4392 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4393 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4394 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4395 ast_array_type, ast_slice_type, ast_reference_type,
4396 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4397 (rust_parse): Update.
4398 (rustyyerror, rustyylex): Add parser parameter.
4399 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4400 (rust_lex_stringish_test, rust_lex_test_sequence)
4401 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4402 (rust_lex_test_push_back, rust_lex_tests): Update.
4403
4404 2018-07-19 Pedro Alves <palves@redhat.com>
4405
4406 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4407 gdb::unique_xmalloc_ptr.
4408 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4409 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4410 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4411 copy-initialization.
4412 * guile/scm-pretty-print.c (ppscm_print_children): Use
4413 gdb::unique_xmalloc_ptr instead of cleanups.
4414 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4415 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4416 gdb::unique_xmalloc_ptr.
4417 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4418 Adjust to use gdb::unique_xmalloc_ptr.
4419 * guile/scm-utils.c (extract_arg): Adjust.
4420 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4421 gdb::unique_xmalloc_ptr instead of a cleanup.
4422
4423 2018-07-19 Tom Tromey <tom@tromey.com>
4424
4425 * utils.c (do_value_free_to_mark)
4426 (make_cleanup_value_free_to_mark): Remove.
4427 * utils.h (make_cleanup_value_free_to_mark): Remove.
4428
4429 2018-07-19 Pedro Alves <palves@redhat.com>
4430
4431 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4432 forwarding reference.
4433
4434 2018-07-18 Pedro Alves <palves@redhat.com>
4435
4436 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4437 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4438 cleanup.
4439
4440 2018-07-18 Pedro Alves <palves@redhat.com>
4441
4442 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4443 exceptions.
4444 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4445 (gdbscm_wrap): New.
4446 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4447 directly instead of a cleanup.
4448 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4449 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
4450 (vlscm_binop_gdbthrow): New, factored out from ...
4451 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
4452 (vlscm_rich_compare): Use gdbscm_wrap.
4453 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4454 instead of a cleanup.
4455 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4456 cleanup.
4457 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4458 Use xfree directly instead of a cleanup.
4459 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4460 Adjust to use gdbscm_wrap and scoped_value_mark.
4461 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4462 (gdbscm_value_address, gdbscm_value_dereference)
4463 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4464 scoped_value_mark.
4465 (gdbscm_value_dynamic_type): Use scoped_value_mark.
4466 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4467 scoped_value_mark.
4468 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4469 gdbscm_wrap and scoped_value_mark.
4470 (gdbscm_value_to_string): Use xfree directly instead of a
4471 cleanup. Move 'buffer' unique_ptr to TRY scope.
4472 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4473 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
4474 scoped_value_mark.
4475 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4476 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4477 scoped_value_mark.
4478 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4479 gdbscm_wrap.
4480
4481 2018-07-18 Tom de Vries <tdevries@suse.de>
4482
4483 * findvar.c (default_read_var_value): Also resolve dynamic type for
4484 LOC_OPTIMIZED_OUT vars.
4485
4486 2018-07-18 Maciej W. Rozycki <macro@mips.com>
4487
4488 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4489 decoding.
4490
4491 2018-07-17 Tom Tromey <tom@tromey.com>
4492
4493 * guile/scm-param.c (pascm_set_func, pascm_show_func)
4494 (compute_enum_list, pascm_set_param_value_x)
4495 (gdbscm_parameter_value): Update.
4496 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4497 (gdbscm_scm_to_host_string): Update.
4498 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4499 Update.
4500 * guile/scm-cmd.c (cmdscm_add_completion): Update.
4501 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4502 * guile/scm-string.c (gdbscm_scm_to_string): Return
4503 unique_xmalloc_ptr.
4504 (gdbscm_scm_to_host_string): Likewise.
4505
4506 2018-07-17 Tom Tromey <tom@tromey.com>
4507
4508 * guile/guile.c (gdbscm_eval_from_control_command): Update.
4509 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4510 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4511 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4512 unique_xmalloc_ptr.
4513
4514 2018-07-17 Tom Tromey <tom@tromey.com>
4515
4516 * guile/scm-param.c (pascm_signal_setshow_error): Update.
4517 * guile/guile-internal.h (gdbscm_exception_message_to_string):
4518 Update.
4519 * guile/scm-cmd.c (cmdscm_function): Update.
4520 * guile/scm-pretty-print.c
4521 (ppscm_print_exception_unless_memory_error): Update.
4522 * guile/scm-exception.c (gdbscm_exception_message_to_string):
4523 Return unique_xmalloc_ptr.
4524
4525 2018-07-17 Tom Tromey <tom@tromey.com>
4526
4527 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4528 Use string_printf.
4529
4530 2018-07-17 Jim Wilson <jimw@sifive.com>
4531
4532 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4533 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
4534 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
4535 unecessary braces after EF_RISCV_RVC test. Delete call to
4536 set_gdbarch_decr_pc_after_break.
4537
4538 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4539 RISCV_LAST_FP_REGNUM + 1.
4540 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4541
4542 2018-07-17 Tom Tromey <tom@tromey.com>
4543
4544 * configure.ac: Remove --disable-gdbcli.
4545 * configure: Rebuild.
4546 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4547 (SUBDIR_CLI_CFLAGS): Remove.
4548 (SFILES): Use SUBDIR_CLI_SRCS.
4549 (COMMON_OBS): Use SUBDIR_CLI_OBS.
4550
4551 2018-07-17 Tom Tromey <tom@tromey.com>
4552
4553 PR gdb/18624:
4554 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4555
4556 2018-07-16 Jim Wilson <jimw@sifive.com>
4557
4558 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4559
4560 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4561
4562 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4563 variable.
4564 (libunwind_frame_sniffer): Likewise.
4565 (libunwind_frame_prev_register): Likewise.
4566 (libunwind_sigtramp_frame_sniffer): Likewise.
4567 * ia64-tdep.c (ia64_access_reg): Likewise.
4568 (ia64_access_rse_reg): Likewise.
4569 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4570 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4571
4572 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4573
4574 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4575
4576 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
4577
4578 * remote-sim.c (gdbsim_target::close,
4579 gdbsim_target::mourn_inferior): Remove unused variables.
4580
4581 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
4582
4583 * ia64-tdep.c (ktab_buf): New global.
4584 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4585 (get_kernel_table): Adjust.
4586
4587 2018-07-16 Tom Tromey <tom@tromey.com>
4588
4589 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4590 * dwarf2read.c (using_directives, new_symbol): Use
4591 outermost_context_p.
4592 * dbxread.c (process_one_symbol): Use outermost_context_p.
4593 * coffread.c (coff_symtab_read): Use outermost_context_p.
4594
4595 2018-07-16 Tom Tromey <tom@tromey.com>
4596
4597 * dwarf2read.c (using_directives, read_func_scope)
4598 (read_lexical_block_scope): Update.
4599 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4600 * buildsym.h (local_using_directives, global_using_directives):
4601 Don't declare.
4602 (get_local_using_directives, set_local_using_directives)
4603 (get_global_using_directives): Declare.
4604 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4605 m_global_using_directives>: New members.
4606 (finish_block_internal, prepare_for_building)
4607 (reset_symtab_globals, end_symtab_get_static_block)
4608 (push_context): Update.
4609 (get_local_using_directives, set_local_using_directives)
4610 (get_global_using_directives): New functions.
4611 (buildsym_init): Update.
4612
4613 2018-07-16 Tom Tromey <tom@tromey.com>
4614
4615 * xcoffread.c (xcoff_initial_scan): Don't call
4616 free_pending_blocks.
4617 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4618 * buildsym.h (class scoped_free_pendings): Add constructor.
4619 (free_pending_blocks): Don't declare.
4620 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4621 (free_pending_blocks): Now static.
4622
4623 2018-07-16 Tom Tromey <tom@tromey.com>
4624
4625 * buildsym.h (push_subfile, pop_subfile): Update declarations.
4626 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4627 member.
4628 (struct subfile_stack): Remove.
4629 (subfile_stack): Remove.
4630 (push_subfile, pop_subfile, buildsym_init): Update.
4631
4632 2018-07-16 Tom Tromey <tom@tromey.com>
4633
4634 * buildsym.c (push_subfile): Use gdb_assert.
4635 (pop_subfile): Use gdb_assert.
4636
4637 2018-07-16 Tom Tromey <tom@tromey.com>
4638
4639 * buildsym.h (merge_symbol_lists): Remove.
4640 * buildsym.c (merge_symbol_lists): Remove.
4641
4642 2018-07-16 Tom Tromey <tom@tromey.com>
4643
4644 * stabsread.c (scan_file_globals): Update comment.
4645 * stabsread.h (scan_file_globals): Move from buildsym.h.
4646 * buildsym.h (scan_file_globals): Move to stabsread.h.
4647
4648 2018-07-16 Tom Tromey <tom@tromey.com>
4649
4650 * xcoffread.c (xcoff_new_init): Update.
4651 * mipsread.c (mipscoff_new_init): Update.
4652 * mdebugread.c (mdebug_build_psymtabs): Update.
4653 * elfread.c (elf_new_init): Update.
4654 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4655 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4656 * buildsym.h (buildsym_new_init): Don't declare.
4657 * buildsym.c (buildsym_new_init): Remove.
4658
4659 2018-07-16 Tom Tromey <tom@tromey.com>
4660
4661 * stabsread.h (within_function): Move from buildsym.h.
4662 * stabsread.c (start_stabs): Clear within_function.
4663 * coffread.c (coff_start_symtab): Clear within_function.
4664 * buildsym.h (within_function): Move to stabsread.h.
4665 * buildsym.c (prepare_for_building): Update.
4666
4667 2018-07-16 Tom Tromey <tom@tromey.com>
4668
4669 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4670 * dwarf2read.c (dwarf2_start_symtab): Don't set
4671 processing_gcc_compilation.
4672 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4673
4674 2018-07-16 Tom Tromey <tom@tromey.com>
4675
4676 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4677 (next_symbol_text_func): Move from buildsym.h.
4678 * stabsread.c (hashname): Move from buildsym.c.
4679 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4680 (next_symbol_text_func, hashname): Move to stabsread.h.
4681 * buildsym.c: Don't include bcache.h
4682 (hashname): Move to stasbread.c.
4683
4684 2018-07-16 Tom Tromey <tom@tromey.com>
4685
4686 * buildsym.h (context_stack_size): Don't declare.
4687 * buildsym.c (context_stack_size): New global.
4688
4689 2018-07-16 Tom Tromey <tom@tromey.com>
4690
4691 * dbxread.c (processing_acc_compilation): New global.
4692 * buildsym.h (processing_acc_compilation): Don't declare.
4693
4694 2018-07-16 Tom Tromey <tom@tromey.com>
4695
4696 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4697 * dbxread.c (read_ofile_symtab): Update.
4698 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4699 * buildsym.h (last_source_start_addr): Remove.
4700 (set_last_source_start_addr, get_last_source_start_addr):
4701 Declare.
4702 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4703 parameter.
4704 (struct buildsym_compunit) <m_last_source_start_addr>: New
4705 member.
4706 (prepare_for_building): Remove start_addr parameter.
4707 (start_symtab, restart_symtab, end_symtab_get_static_block)
4708 (end_symtab_with_blockvector): Update.
4709 (set_last_source_start_addr, get_last_source_start_addr): New
4710 functions.
4711
4712 2018-07-16 Tom Tromey <tom@tromey.com>
4713
4714 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4715 member.
4716 (have_line_numbers): Remove.
4717 (record_line, prepare_for_building, end_symtab_get_static_block)
4718 (augment_type_symtab): Update.
4719
4720 2018-07-16 Tom Tromey <tom@tromey.com>
4721
4722 * buildsym.c (~buildsym_compunit): Free the macro table.
4723 (struct buildsym_compunit) <get_macro_table, release_macros>: New
4724 methods.
4725 <m_pending_macros>: New member.
4726 (pending_macros): Remove.
4727 (~scoped_free_pendings, get_macro_table, prepare_for_building)
4728 (reset_symtab_globals, end_symtab_get_static_block)
4729 (end_symtab_with_blockvector, augment_type_symtab)
4730 (buildsym_init): Update.
4731
4732 2018-07-16 Tom Tromey <tom@tromey.com>
4733
4734 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4735 parameter.
4736 (buildsym_compunit::set_last_source_file): New method.
4737 <m_last_source_file>: New member.
4738 (prepare_for_building): Remove "name" parameter.
4739 (start_symtab, restart_symtab, reset_symtab_globals): Update.
4740 (last_source_file): Remove.
4741 (set_last_source_file, get_last_source_file): Update.
4742
4743 2018-07-16 Tom Tromey <tom@tromey.com>
4744
4745 * buildsym.c (prepare_for_building): Add assert.
4746
4747 2018-07-16 Tom Tromey <tom@tromey.com>
4748
4749 * buildsym.c (~buildsym_compunit): Update.
4750 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4751 (start_subfile, patch_subfile_names)
4752 (end_symtab_with_blockvector): Update.
4753
4754 2018-07-16 Tom Tromey <tom@tromey.com>
4755
4756 * buildsym.c (struct buildsym_compunit): Add constructor,
4757 destructor, initializers.
4758 (start_buildsym_compunit): Remove.
4759 (free_buildsym_compunit): Use "delete".
4760 (start_symtab, restart_symtab): Use "new".
4761
4762 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
4763
4764 * symfile.c (set_objfile_default_section_offset): Remove struct
4765 keyword.
4766
4767 2018-07-14 Stafford Horne <shorne@gmail.com>
4768
4769 * (Responsible Maintainers): Add myself as or1k maintainer.
4770
4771 2018-07-13 Tom Tromey <tom@tromey.com>
4772
4773 * symfile.c (set_objfile_default_section_offset): Use extra braces
4774 around initializer.
4775
4776 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
4777
4778 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4779 non-branching basr.
4780
4781 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4782
4783 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4784 unittests/cli-utils-selftests.c
4785 * unittests/cli-utils-selftests.c: New file.
4786
4787 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4788
4789 * NEWS: Mention new commands. Mention change to 'thread apply'.
4790
4791 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4792
4793 * thread.c (thr_try_catch_cmd): New function.
4794 (thread_apply_all_command): Handle qcs flags.
4795 (thread_apply_command): Handle qcs flags.
4796 (taas_command): New function.
4797 (tfaas_command): New function.
4798 (_initialize_thread): Update to setup the new commands 'taas
4799 and 'tfaas'. Change doc string for 'thread apply'.
4800
4801 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4802
4803 * stack.c: (trailing_outermost_frame): New function, mostly
4804 extracted from backtrace_command_1.
4805 (leading_innermost_frame): New function.
4806 (backtrace_command_1): Update to call trailing_outermost_frame.
4807 (frame_apply_command_count): New function.
4808 (frame_apply_level_command): New function.
4809 (frame_apply_all_command): New function.
4810 (frame_apply_command): New function.
4811 (faas_command): New function.
4812 (frame_cmd_list): New variable.
4813 (_initialize_stack): Update to setup the new commands 'frame apply'
4814 and 'faas'.
4815
4816 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4817
4818 * cli-utils.c (number_or_range_parser::get_number): Only handle
4819 numbers or convenience var as numbers.
4820 (parse_flags): New function.
4821 (parse_flags_qcs): New function.
4822 (number_or_range_parser::finished): Ensure parsing end is detected
4823 before end of string.
4824 * cli-utils.h (parse_flags): New function.
4825 (parse_flags_qcs): New function.
4826 (number_or_range_parser): Remove m_finished bool.
4827 (number_or_range_parser::skip_range): Set m_in_range to false.
4828
4829 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
4830
4831 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4832 on Windows.
4833
4834 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4835 Jan Kratochvil <jan.kratochvil@redhat.com>
4836 Paul Fertser <fercerpav@gmail.com>
4837 Tsutomu Seki <sekiriki@gmail.com>
4838 Pedro Alves <palves@redhat.com>
4839
4840 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4841 'unittests/parse-connection-spec-selftests.c'.
4842 (COMMON_SFILES): Add 'common/netstuff.c'.
4843 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4844 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4845 * common/netstuff.c: New file.
4846 * common/netstuff.h: New file.
4847 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4848 (wait_for_connect): Update comment. New parameter
4849 'gdb::optional<int> sock' instead of 'struct serial *scb'.
4850 Use 'sock' directly instead of 'scb->fd'.
4851 (try_connect): New function, with code from 'net_open'.
4852 (net_open): Rewrite main loop to deal with multiple
4853 sockets/addresses. Handle IPv6-style hostnames; implement
4854 support for IPv6 connections.
4855 * unittests/parse-connection-spec-selftests.c: New file.
4856
4857 2018-07-11 Pedro Alves <palves@redhat.com>
4858
4859 PR gdb/23377
4860 * remote.c (remote_target::remote_detach_pid): Call
4861 set_current_process.
4862
4863 2018-07-11 Pedro Alves <palves@redhat.com>
4864
4865 * h8300-tdep.c (h8300_gdbarch_init): Remove
4866 set_gdbarch_ecoff_reg_to_regnum calls.
4867
4868 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
4869
4870 PR c++/23373
4871 * c-typeprint.c (c_type_print_base_struct_union): Don't print
4872 offsets/sizes for static members of a class/struct.
4873
4874 2018-07-11 Alan Hayward <alan.hayward@arm.com>
4875
4876 * target-descriptions.c (tdesc_register_bitsize): Rename.
4877 * target-descriptions.h (tdesc_register_bitsize): Likewise.
4878 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4879 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4880
4881 2018-07-10 Tom Tromey <tom@tromey.com>
4882
4883 * breakpoint.c (moribund_locations): Now static and a
4884 std::vector.
4885 (breakpoint_init_inferior, moribund_breakpoint_here_p)
4886 (build_bpstat_chain, update_global_location_list)
4887 (breakpoint_retire_moribund): Update.
4888 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
4889 VEC.
4890
4891 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4892
4893 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4894 (riscv_register_reggroup_p): Use new function, remove unneeded
4895 parenthesis.
4896 (riscv_push_dummy_call): Extend assert to compare against xlen or
4897 flen based on register type.
4898
4899 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
4900
4901 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4902
4903 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
4904
4905 * remote.c (show_hardware_watchpoint_limit): New function.
4906 (show_hardware_watchpoint_length_limit): New function.
4907 (show_hardware_breakpoint_limit): New function.
4908 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4909 where appropriate, update help text.
4910
4911 2018-07-09 Tom Tromey <tom@tromey.com>
4912
4913 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4914 (CLIBS): Don't mention NAT_CLIBS.
4915
4916 2018-07-09 Tom Tromey <tom@tromey.com>
4917
4918 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4919 (LIBGDB_OBS, clean mostlyclean): Update.
4920 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4921
4922 2018-07-09 Tom Tromey <tom@tromey.com>
4923
4924 * Makefile.in (%.c: %.y): Use ECHO_YACC.
4925 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
4926 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4927
4928 2018-07-09 Tom Tromey <tom@tromey.com>
4929
4930 * Makefile.in (ALLDEPFILES): Remove exec.c.
4931 (COMMON_OBS): Remove exec.o.
4932 (COMMON_SFILES): Add exec.c.
4933
4934 2018-07-09 Tom Tromey <tom@tromey.com>
4935
4936 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4937
4938 2018-07-09 Tom Tromey <tom@tromey.com>
4939
4940 * Makefile.in (clean mostlyclean): Remove stamp-version.
4941 (version.c): Depend on stamp-version.
4942 (stamp-version): New rule, from version.c rule.
4943
4944 2018-07-09 Tom Tromey <tom@tromey.com>
4945
4946 * Makefile.in (init.c): Depend on stamp-init.
4947 (stamp-init): New rule, from init.c rule.
4948 (clean mostlyclean): Remove stamp-init.
4949
4950 2018-07-09 Tom Tromey <tom@tromey.com>
4951
4952 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4953 SUBDIR_GCC_COMPILE_SRCS.
4954
4955 2018-07-09 Tom Tromey <tom@tromey.com>
4956
4957 * Makefile.in (init.c): Remove some unused sed rules.
4958
4959 2018-07-09 Tom Tromey <tom@tromey.com>
4960
4961 * Makefile.in (TSOBS): Remove.
4962 (INIT_FILES): Update.
4963 (LIBGDB_OBS): Update.
4964 (COMMON_SFILES): Add inflow.c.
4965 (SFILES): Remove inflow.c.
4966
4967 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4968
4969 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4970
4971 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
4972
4973 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4974 get_saveloc_name, is_signal_frame_name, step_name,
4975 init_remote_name, create_addr_space_name,
4976 destroy_addr_space_name, search_unwind_table_name,
4977 find_dyn_list_name): Constify.
4978
4979 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
4980
4981 * darwin-nat.c (darwin_pthread_kill): New function.
4982 (darwin_resume_thread): Use darwin_pthread_kill.
4983
4984 2018-07-05 Tom de Vries <tdevries@suse.de>
4985
4986 * macroexp.c (macro_buffer) <operator=>: New member function.
4987
4988 2018-07-04 Tom Tromey <tom@tromey.com>
4989
4990 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4991
4992 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
4993
4994 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4995 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4996 * maint.c: Likewise.
4997 * top.c: Likewise.
4998
4999 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5000
5001 * NEWS: Create a new section for the next release branch.
5002 Rename the section of the current branch, now that it has
5003 been cut.
5004
5005 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5006
5007 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5008 * version.in: Bump version to 8.2.50.DATE-git.
5009
5010 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5011 Pedro Alves <palves@redhat.com>
5012
5013 * linux-nat.c (linux_init_ptrace): Rename to ...
5014 (linux_init_ptrace_procfs): ... this. Call
5015 linux_proc_init_warnings.
5016 (linux_nat_target::post_attach)
5017 (linux_nat_target::post_startup_inferior): Adjust.
5018 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5019 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5020
5021 2018-07-04 Tom de Vries <tdevries@suse.de>
5022
5023 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5024 check ...
5025 (read_comp_unit_head): ... here.
5026
5027 2018-07-03 Tom Tromey <tom@tromey.com>
5028
5029 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5030 (stop_tracing, tstatus_command)
5031 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5032 (print_one_static_tracepoint_marker): Update.
5033 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5034 std::vector.
5035 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5036 VEC.
5037 (all_tracepoints, static_tracepoints_here): Return std::vector.
5038
5039 2018-07-03 Tom Tromey <tom@tromey.com>
5040
5041 * common/ptid.c (ptid_equal): Remove.
5042 * common/ptid.h (ptid_equal): Don't declare.
5043 * ada-tasks.c: Update.
5044 * breakpoint.c: Update.
5045 * common/agent.c: Update.
5046 * corelow.c: Update.
5047 * darwin-nat-info.c: Update.
5048 * darwin-nat.c: Update.
5049 * dcache.c: Update.
5050 * dtrace-probe.c: Update.
5051 * dummy-frame.c: Update.
5052 * fbsd-nat.c: Update.
5053 * frame.c: Update.
5054 * gdbthread.h: Update.
5055 * gnu-nat.c: Update.
5056 * go32-nat.c: Update.
5057 * inf-loop.c: Update.
5058 * inf-ptrace.c: Update.
5059 * infcall.c: Update.
5060 * infcmd.c: Update.
5061 * inflow.c: Update.
5062 * infrun.c: Update.
5063 * linux-fork.c: Update.
5064 * linux-nat.c: Update.
5065 * linux-thread-db.c: Update.
5066 * mi/mi-cmd-var.c: Update.
5067 * mi/mi-interp.c: Update.
5068 * mi/mi-main.c: Update.
5069 * nto-procfs.c: Update.
5070 * ppc-linux-tdep.c: Update.
5071 * procfs.c: Update.
5072 * python/py-inferior.c: Update.
5073 * python/py-record-btrace.c: Update.
5074 * python/py-record.c: Update.
5075 * ravenscar-thread.c: Update.
5076 * regcache.c: Update.
5077 * remote-sim.c: Update.
5078 * remote.c: Update.
5079 * sol-thread.c: Update.
5080 * solib.c: Update.
5081 * target.c: Update.
5082 * tui/tui-stack.c: Update.
5083 * varobj.c: Update.
5084 * windows-nat.c: Update.
5085 * windows-tdep.c: Update.
5086
5087 2018-07-03 Tom Tromey <tom@tromey.com>
5088
5089 * common/ptid.c (ptid_match): Remove.
5090 * common/ptid.h (ptid_match): Don't declare.
5091 * fbsd-nat.c: Update.
5092 * infcmd.c: Update.
5093 * infrun.c: Update.
5094 * linux-nat.c: Update.
5095 * record-btrace.c: Update.
5096 * regcache.c: Update.
5097 * remote.c: Update.
5098
5099 2018-07-03 Tom Tromey <tom@tromey.com>
5100
5101 * common/ptid.c (ptid_tid_p): Remove.
5102 * common/ptid.h (ptid_tid_p): Don't declare.
5103 * sol-thread.c: Update.
5104
5105 2018-07-03 Tom Tromey <tom@tromey.com>
5106
5107 * common/ptid.c (ptid_lwp_p): Remove.
5108 * common/ptid.h (ptid_lwp_p): Don't declare.
5109 * fbsd-nat.c: Update.
5110 * linux-nat.c: Update.
5111 * nat/linux-procfs.c: Update.
5112 * nat/x86-linux-dregs.c: Update.
5113 * sol-thread.c: Update.
5114
5115 2018-07-03 Tom Tromey <tom@tromey.com>
5116
5117 * common/ptid.c (ptid_is_pid): Remove.
5118 * common/ptid.h (ptid_is_pid): Don't declare.
5119 * infrun.c: Update.
5120 * linux-nat.c: Update.
5121 * mi/mi-interp.c: Update.
5122 * remote.c: Update.
5123 * thread.c: Update.
5124
5125 2018-07-03 Tom Tromey <tom@tromey.com>
5126
5127 * common/ptid.c (ptid_get_tid): Remove.
5128 * common/ptid.h (ptid_get_tid): Don't declare.
5129 * ada-tasks.c: Update.
5130 * aix-thread.c: Update.
5131 * bsd-uthread.c: Update.
5132 * darwin-nat.c: Update.
5133 * fbsd-nat.c: Update.
5134 * i386-darwin-nat.c: Update.
5135 * infrun.c: Update.
5136 * linux-tdep.c: Update.
5137 * nto-procfs.c: Update.
5138 * ppc-ravenscar-thread.c: Update.
5139 * python/py-infthread.c: Update.
5140 * ravenscar-thread.c: Update.
5141 * sol-thread.c: Update.
5142 * sparc-ravenscar-thread.c: Update.
5143 * windows-nat.c: Update.
5144
5145 2018-07-03 Tom Tromey <tom@tromey.com>
5146
5147 * common/ptid.c (ptid_get_lwp): Remove.
5148 * common/ptid.h (ptid_get_lwp): Don't declare.
5149 * aarch64-linux-nat.c: Update.
5150 * ada-tasks.c: Update.
5151 * aix-thread.c: Update.
5152 * amd64-linux-nat.c: Update.
5153 * arm-linux-nat.c: Update.
5154 * corelow.c: Update.
5155 * fbsd-nat.c: Update.
5156 * fbsd-tdep.c: Update.
5157 * gnu-nat.c: Update.
5158 * i386-cygwin-tdep.c: Update.
5159 * i386-gnu-nat.c: Update.
5160 * i386-linux-nat.c: Update.
5161 * ia64-linux-nat.c: Update.
5162 * inf-ptrace.c: Update.
5163 * infrun.c: Update.
5164 * linux-fork.c: Update.
5165 * linux-nat.c: Update.
5166 * linux-tdep.c: Update.
5167 * linux-thread-db.c: Update.
5168 * mips-linux-nat.c: Update.
5169 * nat/aarch64-linux-hw-point.c: Update.
5170 * nat/aarch64-linux.c: Update.
5171 * nat/linux-btrace.c: Update.
5172 * nat/linux-osdata.c: Update.
5173 * nat/linux-procfs.c: Update.
5174 * nat/x86-linux-dregs.c: Update.
5175 * obsd-nat.c: Update.
5176 * ppc-fbsd-nat.c: Update.
5177 * ppc-linux-nat.c: Update.
5178 * procfs.c: Update.
5179 * python/py-infthread.c: Update.
5180 * ravenscar-thread.c: Update.
5181 * remote.c: Update.
5182 * s390-linux-nat.c: Update.
5183 * sol-thread.c: Update.
5184 * sol2-tdep.c: Update.
5185 * spu-linux-nat.c: Update.
5186 * x86-linux-nat.c: Update.
5187 * xtensa-linux-nat.c: Update.
5188
5189 2018-07-03 Tom Tromey <tom@tromey.com>
5190
5191 * common/ptid.c (ptid_get_pid): Remove.
5192 * common/ptid.h (ptid_get_pid): Don't declare.
5193 * aarch64-linux-nat.c: Update.
5194 * ada-lang.c: Update.
5195 * aix-thread.c: Update.
5196 * alpha-bsd-nat.c: Update.
5197 * amd64-fbsd-nat.c: Update.
5198 * amd64-linux-nat.c: Update.
5199 * arm-linux-nat.c: Update.
5200 * arm-nbsd-nat.c: Update.
5201 * auxv.c: Update.
5202 * break-catch-syscall.c: Update.
5203 * breakpoint.c: Update.
5204 * bsd-uthread.c: Update.
5205 * corelow.c: Update.
5206 * ctf.c: Update.
5207 * darwin-nat.c: Update.
5208 * fbsd-nat.c: Update.
5209 * fbsd-tdep.c: Update.
5210 * gcore.c: Update.
5211 * gnu-nat.c: Update.
5212 * hppa-nbsd-nat.c: Update.
5213 * hppa-obsd-nat.c: Update.
5214 * i386-fbsd-nat.c: Update.
5215 * ia64-linux-nat.c: Update.
5216 * inf-ptrace.c: Update.
5217 * infcmd.c: Update.
5218 * inferior.c: Update.
5219 * inferior.h: Update.
5220 * inflow.c: Update.
5221 * infrun.c: Update.
5222 * linux-fork.c: Update.
5223 * linux-nat.c: Update.
5224 * linux-tdep.c: Update.
5225 * linux-thread-db.c: Update.
5226 * m68k-bsd-nat.c: Update.
5227 * mi/mi-interp.c: Update.
5228 * mi/mi-main.c: Update.
5229 * mips-linux-nat.c: Update.
5230 * mips-nbsd-nat.c: Update.
5231 * mips64-obsd-nat.c: Update.
5232 * nat/aarch64-linux-hw-point.c: Update.
5233 * nat/aarch64-linux.c: Update.
5234 * nat/linux-btrace.c: Update.
5235 * nat/linux-osdata.c: Update.
5236 * nat/linux-procfs.c: Update.
5237 * nat/x86-linux-dregs.c: Update.
5238 * nto-procfs.c: Update.
5239 * obsd-nat.c: Update.
5240 * ppc-linux-nat.c: Update.
5241 * ppc-nbsd-nat.c: Update.
5242 * ppc-obsd-nat.c: Update.
5243 * proc-service.c: Update.
5244 * procfs.c: Update.
5245 * python/py-inferior.c: Update.
5246 * python/py-infthread.c: Update.
5247 * ravenscar-thread.c: Update.
5248 * record.c: Update.
5249 * remote-sim.c: Update.
5250 * remote.c: Update.
5251 * rs6000-nat.c: Update.
5252 * s390-linux-nat.c: Update.
5253 * sh-nbsd-nat.c: Update.
5254 * sol-thread.c: Update.
5255 * sparc-nat.c: Update.
5256 * sparc64-tdep.c: Update.
5257 * spu-linux-nat.c: Update.
5258 * spu-tdep.c: Update.
5259 * target-debug.h: Update.
5260 * target.c: Update.
5261 * thread.c: Update.
5262 * tid-parse.c: Update.
5263 * tracefile-tfile.c: Update.
5264 * vax-bsd-nat.c: Update.
5265 * windows-nat.c: Update.
5266 * x86-linux-nat.c: Update.
5267 * x86-nat.c: Update.
5268
5269 2018-07-03 Tom Tromey <tom@tromey.com>
5270
5271 * common/ptid.c (pid_to_ptid): Remove.
5272 * common/ptid.h (pid_to_ptid): Don't declare.
5273 * aix-thread.c: Update.
5274 * arm-linux-nat.c: Update.
5275 * common/ptid.c: Update.
5276 * common/ptid.h: Update.
5277 * corelow.c: Update.
5278 * ctf.c: Update.
5279 * darwin-nat.c: Update.
5280 * fbsd-nat.c: Update.
5281 * fork-child.c: Update.
5282 * gnu-nat.c: Update.
5283 * go32-nat.c: Update.
5284 * inf-ptrace.c: Update.
5285 * infcmd.c: Update.
5286 * inferior.c: Update.
5287 * infrun.c: Update.
5288 * linux-fork.c: Update.
5289 * linux-nat.c: Update.
5290 * nat/aarch64-linux-hw-point.c: Update.
5291 * nat/fork-inferior.c: Update.
5292 * nat/x86-linux-dregs.c: Update.
5293 * nto-procfs.c: Update.
5294 * obsd-nat.c: Update.
5295 * procfs.c: Update.
5296 * progspace.c: Update.
5297 * remote.c: Update.
5298 * rs6000-nat.c: Update.
5299 * s390-linux-nat.c: Update.
5300 * sol-thread.c: Update.
5301 * spu-linux-nat.c: Update.
5302 * target.c: Update.
5303 * top.c: Update.
5304 * tracefile-tfile.c: Update.
5305 * windows-nat.c: Update.
5306
5307 2018-07-03 Tom Tromey <tom@tromey.com>
5308
5309 * common/ptid.h (ptid_build): Don't declare.
5310 * common/ptid.c (ptid_build): Remove.
5311 * aix-thread.c: Update.
5312 * bsd-kvm.c: Update.
5313 * bsd-uthread.c: Update.
5314 * common/agent.c: Update.
5315 * common/ptid.c: Update.
5316 * common/ptid.h: Update.
5317 * corelow.c: Update.
5318 * darwin-nat.c: Update.
5319 * fbsd-nat.c: Update.
5320 * gnu-nat.c: Update.
5321 * linux-fork.c: Update.
5322 * linux-nat.c: Update.
5323 * linux-thread-db.c: Update.
5324 * nat/linux-osdata.c: Update.
5325 * nat/linux-procfs.c: Update.
5326 * nto-procfs.c: Update.
5327 * obsd-nat.c: Update.
5328 * proc-service.c: Update.
5329 * procfs.c: Update.
5330 * ravenscar-thread.c: Update.
5331 * remote-sim.c: Update.
5332 * remote.c: Update.
5333 * sol-thread.c: Update.
5334 * target.c: Update.
5335 * windows-nat.c: Update.
5336
5337 2018-07-03 Tom Tromey <tom@tromey.com>
5338
5339 * infrun.c (follow_exec): Use exit_inferior_silent.
5340 * inferior.c (exit_inferior_num_silent): Remove.
5341 * inferior.h (exit_inferior_num_silent): Don't declare.
5342
5343 2018-07-03 Tom Tromey <tom@tromey.com>
5344
5345 PR cli/23340:
5346 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5347 inferior_ptid on error.
5348
5349 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5350 Simon Marchi <simon.marchi@polymtl.ca>
5351
5352 PR tdep/8282
5353 * disasm.h (gdb_disassembler): Add
5354 `m_disassembler_options_holder'. member
5355 * disasm.c (get_all_disassembler_options): New function.
5356 (gdb_disassembler::gdb_disassembler): Use it.
5357 (gdb_buffered_insn_length_init_dis): Likewise.
5358 (gdb_buffered_insn_length): Adjust accordingly.
5359 (set_disassembler_options): Handle options with arguments.
5360 (show_disassembler_options_sfunc): Likewise. Add a leading new
5361 line if showing options with descriptions.
5362 (disassembler_options_completer): Adapt to using the
5363 `disasm_options_and_args_t' structure.
5364 * mips-tdep.c (mips_disassembler_options): New variable.
5365 (mips_disassembler_options_o32): Likewise.
5366 (mips_disassembler_options_n32): Likewise.
5367 (mips_disassembler_options_n64): Likewise.
5368 (gdb_print_insn_mips): Don't set `disassembler_options'.
5369 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5370 functions.
5371 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5372 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5373 `gdbarch_disassembler_options_implicit' and
5374 `gdbarch_valid_disassembler_options'.
5375 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5376 `disasm_options_and_args_t' structure.
5377 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5378 method.
5379 (valid_disassembler_options): Switch from `disasm_options_t' to
5380 the `disasm_options_and_args_t' structure.
5381 * NEWS: Document `set disassembler-options' support for the MIPS
5382 target.
5383 * gdbarch.h: Regenerate.
5384 * gdbarch.c: Regenerate.
5385
5386 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5387
5388 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5389
5390 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5391
5392 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5393 parameter in call to amd64_target_description.
5394 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5395 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5396 (amd64fbsd_init_abi): Likewise.
5397 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5398 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5399 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5400 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5401
5402 2018-06-29 Pedro Alves <palves@redhat.com>
5403
5404 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5405 "segments" parameter.
5406 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5407 (_initialize_amd64_tdep): Update call to
5408 amd64_create_target_description.
5409 (amd64_target_description): Add "segments" parameter. Adjust
5410 the implementation to use it.
5411 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5412 call to amd64_create_target_description.
5413 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5414 * gdb/arch/amd64.h (amd64_create_target_description): Add
5415 "segments" register.
5416 * gdb/arch/amd64.c (amd64_create_target_description): Add
5417 "segments" parameter. Call create_feature_i386_64bit_segments
5418 only if SEGMENTS is true.
5419 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5420 call to amd64_create_target_description.
5421
5422 2018-06-29 Pedro Alves <palves@redhat.com>
5423
5424 * thread.c (thread_target_id_str): New, factored out from ...
5425 (print_thread_info_1): ... here. Use it to compute the max
5426 "Target Id" column width.
5427
5428 2018-06-29 Pedro Alves <palves@redhat.com>
5429
5430 * remote.c (remote_target::extra_thread_info): Delete
5431 'display_buf' and 'n' locals. from the cache, regardless of
5432 packet mechanims is in use. Use cache for qThreadExtra and qP
5433 methods too.
5434
5435 2018-06-29 Pedro Alves <palves@redhat.com>
5436
5437 * blockframe.c (find_pc_sect_containing_function): New function.
5438 * breakpoint.c (print_breakpoint_location): Don't call
5439 find_pc_sect_function.
5440 * linespec.c (create_sals_line_offset): Record the location's
5441 symbol in the sal.
5442 * linespec.c (convert_address_location_to_sals): Fill in sal's
5443 symbol with find_pc_sect_containing_function.
5444 * symtab.c (find_function_start_sal): Rename to ...
5445 (find_function_start_sal_1): ... this.
5446 (find_function_start_sal): Reimplement as wrapper around
5447 find_function_start_sal_1, and use
5448 find_pc_sect_containing_function to fill in the sal's symbol.
5449 (find_function_start_sal(symbol*, bool)): Adjust.
5450 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5451 comments.
5452 (find_pc_sect_containing_function): Declare.
5453
5454 2018-06-29 Pedro Alves <palves@redhat.com>
5455
5456 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5457 true if the the location has no symbol.
5458
5459 2018-06-28 Tom Tromey <tom@tromey.com>
5460
5461 * NEWS: Mention --enable-codesign.
5462 * silent-rules.mk (ECHO_SIGN): New variable.
5463 * configure.ac: Add --enable-codesign.
5464 * configure: Rebuild.
5465 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5466 (gdb$(EXEEXT)): Optionally invoke codesign.
5467
5468 2018-06-28 Pedro Alves <palves@redhat.com>
5469
5470 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5471 comments.
5472 (switch_to_thread_no_regs): Adjust comment.
5473 * infcmd.c (stop_pc): Delete.
5474 (post_create_inferior, info_program_command): Replace references
5475 to stop_pc with references to thread_info->suspend.stop_pc.
5476 * inferior.h (stop_pc): Delete declaration.
5477 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5478 (handle_inferior_event_1, handle_signal_stop)
5479 (process_event_stop_test, keep_going_stepped_thread)
5480 (handle_step_into_function, handle_step_into_function_backward)
5481 (print_stop_location): Replace references to stop_pc with
5482 references to thread_info->suspend.stop_pc.
5483 (struct infcall_suspend_state) <stop_pc>: Delete field.
5484 (save_infcall_suspend_state, restore_infcall_suspend_state):
5485 Remove references to inf_stat->stop_pc.
5486 * linux-fork.c (fork_load_infrun_state): Likewise.
5487 * record-btrace.c (record_btrace_set_replay): Likewise.
5488 * record-full.c (record_full_goto_entry): Likewise.
5489 * remote.c (print_one_stopped_thread): Likewise.
5490 * target.c (target_resume): Extend comment.
5491 * thread.c (set_executing_thread): New.
5492 (set_executing): Use it.
5493 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5494 Remove references to stop_pc.
5495
5496 2018-06-28 Pedro Alves <palves@redhat.com>
5497
5498 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5499 Moving fetching stop_pc until after ecs->event_thread is refreshed.
5500
5501 2018-06-28 Tom Tromey <tom@tromey.com>
5502
5503 * coffread.c (coff_symfile_finish): Update.
5504 * xcoffread.c (xcoff_symfile_finish): Update.
5505 * elfread.c (elf_symfile_finish): Update.
5506 * symfile.h (dwarf2_free_objfile): Don't declare.
5507 * dwarf2read.c (_initialize_dwarf2_read): Use
5508 register_objfile_data_with_cleanup.
5509 (dwarf2_free_objfile): Now static. Change signature.
5510
5511 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5512
5513 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5514 option "-o" to add-symbol-file-load to add an offset to each
5515 section's load address.
5516 * symfile.c (set_objfile_default_section_offset): New function.
5517
5518 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5519
5520 * symfile.c (add_symbol_file_command): Make sure that sections
5521 with the same name are sorted in the same order.
5522
5523 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5524
5525 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5526 require the second argument. If omitted, load sections at the
5527 addresses specified in the file.
5528
5529 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5530
5531 * symfile.c (symbol_file_command, symbol_file_add_main_1)
5532 (_initialize_symfile): Add option "-o" to symbol-file to add an
5533 offset to each section of the symbol file.
5534
5535 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
5536
5537 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5538
5539 2018-06-27 Tom Tromey <tom@tromey.com>
5540
5541 * stack.c (_initialize_stack): Update "func" help text.
5542
5543 2018-06-27 Tom Tromey <tom@tromey.com>
5544
5545 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5546 std::vector.
5547 (unwind_infopy_str, pyuw_create_unwind_info)
5548 (unwind_infopy_add_saved_register, pyuw_sniffer)
5549 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5550 Update.
5551 (struct saved_reg): Add constructor.
5552 <value>: Now a gdbpy_ref<>.
5553
5554 2018-06-27 Tom Tromey <tom@tromey.com>
5555
5556 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5557
5558 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5559
5560 * gdb-gdb.py.in: Format using autopep8.
5561
5562 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5563
5564 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5565 (type_lookup_function): Recognize CORE_ADDR values.
5566
5567 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5568
5569 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5570 print tag_name.
5571
5572 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5573
5574 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5575 <__lt__>: Add.
5576
5577 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5578
5579 * gdb-gdb.py: Move to...
5580 * gdb-gdb.py.in: ... here.
5581 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5582 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5583 dependencies.
5584 (distclean): Remove gdb-gdb.py when cleaning.
5585 (gdb-gdb.py, gdb-gdb.gdb): New rules.
5586 * configure: Re-generate.
5587
5588 2018-06-27 Pedro Alves <palves@redhat.com>
5589
5590 * proc-service.c (get_ps_regcache): New.
5591 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5592 (ps_lsetfpregs): Use it.
5593
5594 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
5595
5596 PR gdb/21695
5597 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5598 (dwarf_decode_lines_1): Adjust.
5599
5600 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
5601
5602 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5603 override.
5604 <info_proc>: Likewise.
5605
5606 2018-06-26 Joel Brobecker <brobecker@adacore.com>
5607
5608 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5609 to windows_fetch_one_register, and only handle the case of
5610 fetching one register. Move the code that reloads the context
5611 and iterates over all registers if R is negative to...
5612 (windows_nat_target::fetch_registers): ... here.
5613 (do_windows_store_inferior_registers): Rename to
5614 windows_store_one_register, and only handle the case of storing
5615 one register. Move the code that handles the case where r is
5616 negative to...
5617 (windows_nat_target::store_registers) ... here.
5618
5619 2018-06-26 Tom Tromey <tom@tromey.com>
5620
5621 PR rust/22574:
5622 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5623 * rust-lang.c (rust_print_struct_def): Add podata parameter.
5624 Update.
5625 (rust_internal_print_type): Add podata parameter.
5626 (rust_print_type): Update.
5627
5628 2018-06-26 Tom Tromey <tom@tromey.com>
5629
5630 * typeprint.h (struct print_offset_data) <update, finish,
5631 maybe_print_hole>: New methods.
5632 <indentation>: New constant.
5633 * typeprint.c (print_offset_data::indentation): Define.
5634 (print_offset_data::maybe_print_hole, print_offset_data::update)
5635 (print_offset_data::finish): Move from c-typeprint.c and rename.
5636 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5637 (print_spaces_filtered_with_print_options): Update.
5638 (c_print_type_union_field_offset, maybe_print_hole)
5639 (c_print_type_struct_field_offset): Move to typeprint.c and
5640 rename.
5641 (c_type_print_base_struct_union): Update.
5642
5643 2018-06-25 Pedro Alves <palves@redhat.com>
5644
5645 * gdbthread.h (thread_info_ref, delete_thread)
5646 (delete_thread_silent, first_thread_of_inferior)
5647 (any_thread_of_inferior, switch_to_thread)
5648 (enable_thread_stack_temporaries)
5649 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5650 (get_last_thread_stack_temporary)
5651 (value_in_thread_stack_temporaries, can_access_registers_thread):
5652 Spell out "struct thread_info" instead of just "thread_info".
5653 * inferior.h (notice_new_inferior): Likewise.
5654
5655 2018-06-25 Pedro Alves <palves@redhat.com>
5656
5657 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5658 pass thread_info pointer to delete_thread.
5659 (windows_nat_target::detach): Pass inferior pointer to
5660 detach_inferior.
5661 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5662 delete_thread.
5663 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5664 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5665 and pass a thread_info pointer to delete_thread.
5666 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5667 pass thread_info pointer to delete_thread.
5668 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5669 delete_thread_silent call.
5670 * procfs.c (procfs_target::detach): Pass inferior pointer to
5671 detach_inferior.
5672 (procfs_target::wait): Pass thread_info pointer to delete_thread.
5673 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5674 delete_thread_silent call.
5675 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5676 pass thread_info pointer to delete_thread.
5677 (windows_nat_target::detach): Pass inferior pointer to
5678 delete_inferior.
5679
5680 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5681
5682 * regcache.c (readable_regcache::read_part): Fix asserts.
5683 (reg_buffer::raw_collect_part): New function.
5684 (regcache::write_part): Fix asserts.
5685 (reg_buffer::raw_supply_part): New function.
5686 (regcache::transfer_regset_register): New helper function.
5687 (regcache::transfer_regset): Call new functions.
5688 (regcache_supply_regset): Use gdb_byte*.
5689 (regcache::supply_regset): Likewise.
5690 (regcache_collect_regset): Likewise.
5691 (regcache::collect_regset): Likewise.
5692 * regcache.h (reg_buffer::raw_collect_part): New declaration.
5693 (reg_buffer::raw_supply_part): Likewise.
5694 (regcache::transfer_regset_register): Likewise.
5695 (regcache::transfer_regset): Use gdb_byte*.
5696
5697 2018-06-22 Alan Hayward <alan.hayward@arm.com>
5698
5699 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5700
5701 2018-06-21 Pedro Alves <palves@redhat.com>
5702
5703 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5704 instead of a ptid_t. All callers adjusted.
5705 * ada-tasks.c (ada_get_task_number): Likewise. All callers
5706 adjusted.
5707 (print_ada_task_info, display_current_task_id, task_command_1):
5708 Adjust.
5709 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5710 inferior_thread.
5711 (breakpoint_kind): Adjust.
5712 (remove_breakpoints_pid): Rename to ...
5713 (remove_breakpoints_inf): ... this. Adjust to take an inferior
5714 pointer. All callers adjusted.
5715 (bpstat_clear_actions): Use inferior_thread.
5716 (get_bpstat_thread): New.
5717 (bpstat_do_actions): Use it.
5718 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5719 to take a thread_info pointer. All callers adjusted.
5720 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5721 (breakpoint_re_set_thread): Use inferior_thread.
5722 * breakpoint.h (struct inferior): Forward declare.
5723 (bpstat_stop_status): Update.
5724 (remove_breakpoints_pid): Delete.
5725 (remove_breakpoints_inf): New.
5726 * bsd-uthread.c (bsd_uthread_target::wait)
5727 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5728 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5729 (maint_btrace_packet_history_cmd)
5730 (maint_btrace_clear_packet_history_cmd): Adjust.
5731 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5732 inferior_thread.
5733 * cli/cli-interp.c: Include "inferior.h".
5734 * common/refcounted-object.h (struct
5735 refcounted_object_ref_policy): New.
5736 * compile/compile-object-load.c: Include gdbthread.h.
5737 (store_regs): Use inferior_thread.
5738 * corelow.c (core_target::close): Use current_inferior.
5739 (core_target_open): Adjust to use first_thread_of_inferior and use
5740 the current inferior.
5741 * ctf.c (ctf_target::close): Adjust to use current_inferior.
5742 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5743 <thread>: ... this new field. All references adjusted.
5744 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5745 Take a thread_info pointer instead of a ptid_t.
5746 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5747 (dummy_frame_discard, register_dummy_frame_dtor): Take a
5748 thread_info pointer instead of a ptid_t.
5749 * elfread.c: Include "inferior.h".
5750 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5751 Use inferior_thread.
5752 * eval.c (evaluate_subexp): Likewise.
5753 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5754 inferior_thread.
5755 * gdb_proc_service.h (struct thread_info): Forward declare.
5756 (struct ps_prochandle) <ptid>: Delete, replaced by ...
5757 <thread>: ... this new field. All references adjusted.
5758 * gdbarch.h, gdbarch.c: Regenerate.
5759 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5760 'thread' parameter. All implementations and callers adjusted.
5761 * gdbthread.h (thread_info) <set_running>: New method.
5762 (delete_thread, delete_thread_silent): Take a thread_info pointer
5763 instead of a ptid.
5764 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5765 (first_thread_of_process): Delete, replaced by ...
5766 (first_thread_of_inferior): ... this new function. All callers
5767 adjusted.
5768 (any_live_thread_of_process): Delete, replaced by ...
5769 (any_live_thread_of_inferior): ... this new function. All callers
5770 adjusted.
5771 (switch_to_thread, switch_to_no_thread): Declare.
5772 (is_executing): Delete.
5773 (enable_thread_stack_temporaries): Update comment.
5774 <enable_thread_stack_temporaries>: Take a thread_info pointer
5775 instead of a ptid_t. Incref the thread.
5776 <~enable_thread_stack_temporaries>: Decref the thread.
5777 <m_ptid>: Delete
5778 <m_thr>: New.
5779 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5780 (get_last_thread_stack_temporary)
5781 (value_in_thread_stack_temporaries, can_access_registers_thread):
5782 Take a thread_info pointer instead of a ptid_t. All callers
5783 adjusted.
5784 * infcall.c (get_call_return_value): Use inferior_thread.
5785 (run_inferior_call): Work with thread pointers instead of ptid_t.
5786 (call_function_by_hand_dummy): Work with thread pointers instead
5787 of ptid_t. Use thread_info_ref.
5788 * infcmd.c (proceed_thread_callback): Access thread's state
5789 directly.
5790 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5791 access thread's state directly.
5792 (continue_command): Use inferior_thread.
5793 (info_program_command): Use find_thread_ptid and access thread
5794 state directly.
5795 (proceed_after_attach_callback): Use thread state directly.
5796 (notice_new_inferior): Take a thread_info pointer instead of a
5797 ptid_t. All callers adjusted.
5798 (exit_inferior): Take an inferior pointer instead of a pid. All
5799 callers adjusted.
5800 (exit_inferior_silent): New.
5801 (detach_inferior): Delete.
5802 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5803 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5804 (detach_inferior_command, kill_inferior_command): Use
5805 find_inferior_id instead of valid_gdb_inferior_id and
5806 gdb_inferior_id_to_pid.
5807 (inferior_command): Use inferior and thread pointers.
5808 * inferior.h (struct thread_info): Forward declare.
5809 (notice_new_inferior): Take a thread_info pointer instead of a
5810 ptid_t. All callers adjusted.
5811 (detach_inferior): Delete declaration.
5812 (exit_inferior, exit_inferior_silent): Take an inferior pointer
5813 instead of a pid. All callers adjusted.
5814 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5815 (valid_gdb_inferior_id): Delete.
5816 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5817 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5818 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5819 ...
5820 <inf>: ... this new field.
5821 <step_ptid>: Delete, replaced by ...
5822 <step_thread>: ... this new field.
5823 (get_displaced_stepping_state): Take an inferior pointer instead
5824 of a pid. All callers adjusted.
5825 (displaced_step_in_progress_any_inferior): Adjust.
5826 (displaced_step_in_progress_thread): Take a thread pointer instead
5827 of a ptid_t. All callers adjusted.
5828 (displaced_step_in_progress, add_displaced_stepping_state): Take
5829 an inferior pointer instead of a pid. All callers adjusted.
5830 (get_displaced_step_closure_by_addr): Adjust.
5831 (remove_displaced_stepping_state): Take an inferior pointer
5832 instead of a pid. All callers adjusted.
5833 (displaced_step_prepare_throw, displaced_step_prepare)
5834 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5835 All callers adjusted.
5836 (start_step_over): Adjust.
5837 (infrun_thread_ptid_changed): Remove bit updating ptids in the
5838 displaced step queue.
5839 (do_target_resume): Adjust.
5840 (fetch_inferior_event): Use inferior_thread.
5841 (context_switch, get_inferior_stop_soon): Take an
5842 execution_control_state pointer instead of a ptid_t. All callers
5843 adjusted.
5844 (switch_to_thread_cleanup): Delete.
5845 (stop_all_threads): Use scoped_restore_current_thread.
5846 * inline-frame.c: Include "gdbthread.h".
5847 (inline_state) <inline_state>: Take a thread pointer instead of a
5848 ptid_t. All callers adjusted.
5849 <ptid>: Delete, replaced by ...
5850 <thread>: ... this new field.
5851 (find_inline_frame_state): Take a thread pointer instead of a
5852 ptid_t. All callers adjusted.
5853 (skip_inline_frames, step_into_inline_frame)
5854 (inline_skipped_frames, inline_skipped_symbol): Take a thread
5855 pointer instead of a ptid_t. All callers adjusted.
5856 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5857 (inline_skipped_frames, inline_skipped_symbol): Likewise.
5858 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5859 pointers directly.
5860 * linux-nat.c (get_detach_signal): Likewise.
5861 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5862 (thread_db_notice_clone): Adjust.
5863 (thread_db_find_new_threads_silently)
5864 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5865 a thread pointer instead of a ptid_t. All callers adjusted.
5866 * mi/mi-cmd-var.c: Include "inferior.h".
5867 (mi_cmd_var_update_iter): Update to use thread pointers.
5868 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5869 inferior directly.
5870 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5871 out to ...
5872 (mi_output_running): ... this new function.
5873 (mi_on_resume_1): Adjust to use it.
5874 (mi_user_selected_context_changed): Adjust to use inferior_thread.
5875 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5876 directly.
5877 (interrupt_thread_callback): : Adjust to use thread and inferior
5878 pointers.
5879 * proc-service.c: Include "gdbthread.h".
5880 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5881 * progspace-and-thread.c: Include "inferior.h".
5882 * progspace.c: Include "inferior.h".
5883 * python/py-exitedevent.c (create_exited_event_object): Adjust to
5884 hold a reference to an inferior_object.
5885 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5886 inferior_thread.
5887 * python/py-inferior.c (struct inferior_object): Give the type a
5888 tag name instead of a typedef.
5889 (python_on_normal_stop): No need to check if the current thread is
5890 listed.
5891 (inferior_to_inferior_object): Change return type to
5892 inferior_object. All callers adjusted.
5893 (find_thread_object): Delete, bits factored out to ...
5894 (thread_to_thread_object): ... this new function.
5895 * python/py-infthread.c (create_thread_object): Use
5896 inferior_to_inferior_object.
5897 (thpy_is_stopped): Use thread pointer directly.
5898 (gdbpy_selected_thread): Use inferior_thread.
5899 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5900 field, replaced with ...
5901 <thread>: ... this new field. All users adjusted.
5902 (btpy_insn_or_gap_new): Drop const.
5903 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
5904 callers adjusted.
5905 * python/py-record.c: Include "gdbthread.h".
5906 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5907 a ptid_t. All callers adjusted.
5908 (gdbpy_current_recording): Use inferior_thread.
5909 * python/py-record.h (recpy_record_object) <ptid>: Delete
5910 field, replaced with ...
5911 <thread>: ... this new field. All users adjusted.
5912 (recpy_element_object) <ptid>: Delete
5913 field, replaced with ...
5914 <thread>: ... this new field. All users adjusted.
5915 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5916 a ptid_t. All callers adjusted.
5917 * python/py-threadevent.c: Include "gdbthread.h".
5918 (get_event_thread): Use thread_to_thread_object.
5919 * python/python-internal.h (struct inferior_object): Forward
5920 declare.
5921 (find_thread_object, find_inferior_object): Delete declarations.
5922 (thread_to_thread_object, inferior_to_inferior_object): New
5923 declarations.
5924 * record-btrace.c: Include "inferior.h".
5925 (require_btrace_thread): Use inferior_thread.
5926 (record_btrace_frame_sniffer)
5927 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5928 (get_thread_current_frame): Use scoped_restore_current_thread and
5929 switch_to_thread.
5930 (get_thread_current_frame): Use thread pointer directly.
5931 (record_btrace_replay_at_breakpoint): Use thread's inferior
5932 pointer directly.
5933 * record-full.c: Include "inferior.h".
5934 * regcache.c: Include "gdbthread.h".
5935 (get_thread_arch_regcache): Use the inferior's address space
5936 directly.
5937 (get_thread_regcache, registers_changed_thread): New.
5938 * regcache.h (get_thread_regcache(thread_info *thread)): New
5939 overload.
5940 (registers_changed_thread): New.
5941 (remote_target) <remote_detach_1>: Swap order of parameters.
5942 (remote_add_thread): <remote_add_thread>: Return the new thread.
5943 (get_remote_thread_info(ptid_t)): New overload.
5944 (remote_target::remote_notice_new_inferior): Use thread pointers
5945 directly.
5946 (remote_target::process_initial_stop_replies): Use
5947 thread_info::set_running.
5948 (remote_target::remote_detach_1, remote_target::detach)
5949 (extended_remote_target::detach): Adjust.
5950 * stack.c (frame_show_address): Use inferior_thread.
5951 * target-debug.h (target_debug_print_thread_info_pp): New.
5952 * target-delegates.c: Regenerate.
5953 * target.c (default_thread_address_space): Delete.
5954 (memory_xfer_partial_1): Use current_inferior.
5955 (target_detach): Use current_inferior.
5956 (target_thread_address_space): Delete.
5957 (generic_mourn_inferior): Use current_inferior.
5958 * target.h (struct target_ops) <thread_address_space>: Delete.
5959 (target_thread_address_space): Delete.
5960 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
5961 pointers directly.
5962 (delete_thread_1, delete_thread, delete_thread_silent): Take a
5963 thread pointer instead of a ptid_t. Adjust all callers.
5964 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5965 (first_thread_of_process): Delete, replaced by ...
5966 (first_thread_of_inferior): ... this new function. All callers
5967 adjusted.
5968 (any_thread_of_process): Rename to ...
5969 (any_thread_of_inferior): ... this, and take an inferior pointer.
5970 (any_live_thread_of_process): Rename to ...
5971 (any_live_thread_of_inferior): ... this, and take an inferior
5972 pointer.
5973 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5974 (value_in_thread_stack_temporaries)
5975 (get_last_thread_stack_temporary): Take a thread pointer instead
5976 of a ptid_t. Adjust all callers.
5977 (thread_info::set_running): New.
5978 (validate_registers_access): Use inferior_thread.
5979 (can_access_registers_ptid): Rename to ...
5980 (can_access_registers_thread): ... this, and take a thread
5981 pointer.
5982 (print_thread_info_1): Adjust to compare thread pointers instead
5983 of ptids.
5984 (switch_to_no_thread, switch_to_thread): Make extern.
5985 (scoped_restore_current_thread::~scoped_restore_current_thread):
5986 Use m_thread pointer directly.
5987 (scoped_restore_current_thread::scoped_restore_current_thread):
5988 Use inferior_thread.
5989 (thread_command): Use thread pointer directly.
5990 (thread_num_make_value_helper): Use inferior_thread.
5991 * top.c (execute_command): Use inferior_thread.
5992 * tui/tui-interp.c: Include "inferior.h".
5993 * varobj.c (varobj_create): Use inferior_thread.
5994 (value_of_root_1): Use find_thread_global_id instead of
5995 global_thread_id_to_ptid.
5996
5997 2018-06-21 Alan Hayward <alan.hayward@arm.com>
5998
5999 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6000 possible.
6001 (regcache::write_part): Likewise.
6002 (readable_regcache::cooked_read_part): Update comment.
6003 (readable_regcache::cooked_write_part): Likewise.
6004 * regcache.h: (readable_regcache::read_part): Likewise.
6005 (regcache::write_part): Likewise.
6006
6007 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6008 Dirk Schubert <dirk.schubert@arm.com>
6009
6010 * aarch64-linux-nat.c (post_attach): New.
6011 (aarch64_linux_nat_target::post_attach): Override post_attach to
6012 record the number of hardware debug registers.
6013
6014 2018-06-20 Tom Tromey <tom@tromey.com>
6015
6016 * python/py-param.c (add_setshow_generic): Make parameters const.
6017 (parmpy_init): Update.
6018
6019 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6020
6021 * regcache.h (regcache_cooked_read_ftype): Rename to...
6022 (register_read_ftype): ...this, change type to function_view.
6023 (class reg_buffer) <save>: Remove src parameter.
6024 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6025 parameter non-const in first overload. Remove src parameter in
6026 second overload.
6027 * regcache.c (do_cooked_read): Remove.
6028 (readonly_detached_regcache::readonly_detached_regcache): Make
6029 parameter non-const, adjust call to other constructor.
6030 (reg_buffer::save): Remove src parameter.
6031 * frame.c (do_frame_register_read): Remove.
6032 (frame_save_as_regcache): Use lambda function.
6033 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6034 parameter to ppu2spu_data *.
6035 (ppu2spu_sniffer): Use lambda function.
6036
6037 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6038
6039 * record-full.c (record_full_target::insert_breakpoint): Remove
6040 "struct" keyword, add const.
6041
6042 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6043
6044 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6045 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6046 * configure.ac: Remove AC_PREREQ, add missing quoting.
6047 * gnulib/configure.ac: Modernize usage of
6048 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6049 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6050 (AUTOMAKE_VERSION): Bump to 1.15.1.
6051 * configure: Re-generate.
6052 * config.in: Re-generate.
6053 * aclocal.m4: Re-generate.
6054 * gnulib/aclocal.m4: Re-generate.
6055 * gnulib/config.in: Re-generate.
6056 * gnulib/configure: Re-generate.
6057 * gnulib/import/Makefile.in: Re-generate.
6058
6059 2018-06-19 Pedro Alves <palves@redhat.com>
6060
6061 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6062 (lookup_minimal_symbol_by_pc_section): ... here with
6063 gdb_assert_not_reached added.
6064
6065 2018-06-19 Pedro Alves <palves@redhat.com>
6066
6067 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6068 parameter with a block parameter. Compare location's block symbol
6069 with the frame's block instead of addresses.
6070 (skip_inline_frames): Pass the current block instead of the
6071 frame's address. Break out as soon as we determine the frame
6072 should not be skipped.
6073
6074 2018-06-18 Tom Tromey <tom@tromey.com>
6075
6076 * solib-aix.c (solib_aix_get_section_offsets): Return
6077 unique_xmalloc_ptr.
6078 (solib_aix_solib_create_inferior_hook): Update.
6079
6080 2018-06-18 Tom Tromey <tom@tromey.com>
6081
6082 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6083
6084 2018-06-18 Tom Tromey <tom@tromey.com>
6085
6086 * solib-frv.c (frv_relocate_main_executable): Use
6087 unique_xmalloc_ptr.
6088 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6089 unique_xmalloc_ptr.
6090
6091 2018-06-18 Tom Tromey <tom@tromey.com>
6092
6093 * objfiles.h (inhibit_section_map_updates): Update.
6094 (resume_section_map_updates, resume_section_map_updates_cleanup):
6095 Remove.
6096 * solib-svr4.c (svr4_handle_solib_event): Update.
6097 * objfiles.c (inhibit_section_map_updates): Return
6098 scoped_restore_tmpl<int>.
6099 (resume_section_map_updates, resume_section_map_updates_cleanup):
6100 Remove.
6101
6102 2018-06-18 Tom Tromey <tom@tromey.com>
6103
6104 * valprint.h (read_string): Update.
6105 * valprint.c (read_string): Change type of "buffer".
6106 (val_print_string): Update.
6107 * python/py-value.c (valpy_string): Update.
6108 * language.h (struct language_defn) <la_get_string>: Change
6109 type of "buffer".
6110 (default_get_string, c_get_string): Update.
6111 * language.c (default_get_string): Change type of "buffer".
6112 * guile/scm-value.c (gdbscm_value_to_string): Update.
6113 * c-lang.c (c_get_string): Change type of "buffer".
6114
6115 2018-06-18 Tom Tromey <tom@tromey.com>
6116
6117 * ser-mingw.c (struct pipe_state_destroyer): New.
6118 (pipe_state_up): New typedef.
6119 (cleanup_pipe_state): Remove.
6120 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6121
6122 2018-06-18 Tom Tromey <tom@tromey.com>
6123
6124 * rust-lang.h (rust_yyerror): Don't declare.
6125 * rust-lang.c (rust_language_defn): Update.
6126 * rust-exp.y (yyerror): Now static.
6127 * parse.c (parse_exp_in_context_1): Update.
6128 * p-lang.h (p_yyerror): Don't declare.
6129 * p-lang.c (p_language_defn): Update.
6130 * p-exp.y (yyerror): Now static.
6131 * opencl-lang.c (opencl_language_defn): Update.
6132 * objc-lang.c (objc_language_defn): Update.
6133 * m2-lang.h (m2_yyerror): Don't declare.
6134 * m2-lang.c (m2_language_defn): Update.
6135 * m2-exp.y (yyerror): Now static.
6136 * language.h (struct language_defn) <la_error>: Remove.
6137 * language.c (unk_lang_error): Remove.
6138 (unknown_language_defn, auto_language_defn): Remove.
6139 * go-lang.h (go_yyerror): Don't declare.
6140 * go-lang.c (go_language_defn): Update.
6141 * go-exp.y (yyerror): Now static.
6142 * f-lang.h (f_yyerror): Don't declare.
6143 * f-lang.c (f_language_defn): Update.
6144 * f-exp.y (yyerror): Now static.
6145 * d-lang.h (d_yyerror): Don't declare.
6146 * d-lang.c (d_language_defn): Update.
6147 * d-exp.y (yyerror): Now static.
6148 * c-lang.h (c_yyerror): Don't declare.
6149 * c-lang.c (c_language_defn, cplus_language_defn)
6150 (asm_language_defn, minimal_language_defn): Update.
6151 * c-exp.y (yyerror): Now static.
6152 * ada-lang.h (ada_yyerror): Don't declare.
6153 * ada-lang.c (ada_language_defn): Update.
6154 * ada-exp.y (yyerror): Now static.
6155
6156 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6157
6158 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6159 (store_sveregs_to_thread): Likewise.
6160 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6161 (aarch64_linux_store_inferior_registers): Likewise.
6162 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6163 function.
6164 (aarch64_sve_regs_copy_to_regcache): Likewise.
6165 (aarch64_sve_regs_copy_from_regcache): Likewise.
6166 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6167 declaration.
6168 (aarch64_sve_regs_copy_to_regcache): Likewise.
6169 (aarch64_sve_regs_copy_from_regcache): Likewise.
6170 (sve_context): Structure from Linux headers.
6171 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6172 (SVE_SIG_ZREG_SIZE): Likewise.
6173 (SVE_SIG_PREG_SIZE): Likewise.
6174 (SVE_SIG_FFR_SIZE): Likewise.
6175 (SVE_SIG_REGS_OFFSET): Likewise.
6176 (SVE_SIG_ZREGS_OFFSET): Likewise.
6177 (SVE_SIG_ZREG_OFFSET): Likewise.
6178 (SVE_SIG_ZREGS_SIZE): Likewise.
6179 (SVE_SIG_PREGS_OFFSET): Likewise.
6180 (SVE_SIG_PREG_OFFSET): Likewise.
6181 (SVE_SIG_PREGS_SIZE): Likewise.
6182 (SVE_SIG_FFR_OFFSET): Likewise.
6183 (SVE_SIG_REGS_SIZE): Likewise.
6184 (SVE_SIG_CONTEXT_SIZE): Likewise.
6185 (SVE_PT_REGS_MASK): Likewise.
6186 (SVE_PT_REGS_FPSIMD): Likewise.
6187 (SVE_PT_REGS_SVE): Likewise.
6188 (SVE_PT_VL_INHERIT): Likewise.
6189 (SVE_PT_VL_ONEXEC): Likewise.
6190 (SVE_PT_REGS_OFFSET): Likewise.
6191 (SVE_PT_FPSIMD_OFFSET): Likewise.
6192 (SVE_PT_FPSIMD_SIZE): Likewise.
6193 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6194 (SVE_PT_SVE_PREG_SIZE): Likewise.
6195 (SVE_PT_SVE_FFR_SIZE): Likewise.
6196 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6197 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6198 (__SVE_SIG_TO_PT): Likewise.
6199 (SVE_PT_SVE_OFFSET): Likewise.
6200 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6201 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6202 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6203 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6204 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6205 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6206 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6207 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6208 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6209 (SVE_PT_SVE_SIZE): Likewise.
6210 (SVE_PT_SIZE): Likewise.
6211 (HAS_SVE_STATE): New define.
6212
6213 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6214
6215 * nat/aarch64-sve-linux-sigcontext.h: New file.
6216 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6217 new files.
6218 (SVE_VQ_MIN): Likewise.
6219 (SVE_VQ_MAX): Likewise.
6220 (SVE_VL_MIN): Likewise.
6221 (SVE_VL_MAX): Likewise.
6222 (SVE_NUM_ZREGS): Likewise.
6223 (SVE_NUM_PREGS): Likewise.
6224 (sve_vl_valid): Likewise.
6225 (struct user_sve_header): Likewise.
6226
6227 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6228 Richard Bunt <Richard.Bunt@arm.com>
6229
6230 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6231 was requested by GDB.
6232
6233 2018-06-15 Tom de Vries <tdevries@suse.de>
6234
6235 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6236
6237 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6238
6239 * gnulib/update-gnulib.sh: Print expected versions of
6240 autoconf/aclocal.
6241
6242 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6243
6244 * arch-utils.c (default_type_align): Use type_length_units.
6245 * gdbtypes.c (type_align): Use type_length_units.
6246
6247 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6248
6249 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6250 of 'define' command.
6251
6252 2018-06-14 Tom de Vries <tdevries@suse.de>
6253
6254 PR cli/22573
6255 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6256 get_no_prettyformat_print_options.
6257
6258 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6259
6260 * sparc-nat.h: Include target.h.
6261 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6262 <fetch_registers>: Remove this argument in function call.
6263 <store_registers>: Remove this argument in function call, remove
6264 extra semicolon.
6265 <low_forget_process>: Call sparc64_forget_process instead of
6266 sparc_forget_process.
6267
6268 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6269
6270 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6271 (procfs_target::make_corefile_notes): Adjust to new
6272 target_read_alloc return type.
6273
6274 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6275 Stephen Roberts <stephen.roberts@arm.com>
6276
6277 PR gdb/22882
6278 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6279 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6280 Move should_notify_stop local into more inner scope.
6281
6282 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6283 Stephen Roberts <stephen.roberts@arm.com>
6284
6285 PR gdb/22882
6286 * infrun.c (resume_1): Add call to mark_async_event_handler.
6287
6288 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6289
6290 * infrun.c (do_target_wait): Change old version of $pc printed.
6291
6292 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6293
6294 * dwarf2read.c (read_index_from_section): Rename to...
6295 (read_gdb_index_from_section): ... this, update all callers.
6296 (dwarf2_read_index): Rename to...
6297 (dwarf2_read_gdb_index): ... this, update all callers.
6298
6299 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6300
6301 * gdb/hppa-linux-nat.c
6302 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6303 hppa_linux_nat_target::fetch_registers.
6304
6305 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6306
6307 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6308 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6309 (AARCH64_DWARF_SVE_FFR): Likewise.
6310 (AARCH64_DWARF_SVE_P0): Likewise.
6311 (AARCH64_DWARF_SVE_Z0): Likewise.
6312
6313 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6314
6315 * common/common-regcache.h (raw_compare): New function.
6316 * regcache.c (regcache::raw_compare): Likewise.
6317 * regcache.h (regcache::raw_compare): New declaration.
6318
6319 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6320
6321 * common/common-regcache.h (reg_buffer_common): New structure.
6322 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6323 (reg_buffer::raw_supply): Likewise.
6324 (reg_buffer::raw_supply_integer): Likewise.
6325 (reg_buffer::raw_supply_zeroed): Likewise.
6326 (reg_buffer::raw_collect): Likewise.
6327 (reg_buffer::raw_collect_integer): Likewise.
6328 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6329 (reg_buffer::raw_supply): Likewise.
6330 (reg_buffer::raw_supply_integer): Likewise.
6331 (reg_buffer::raw_supply_zeroed): Likewise.
6332 (reg_buffer::raw_collect): Likewise.
6333 (reg_buffer::raw_collect_integer): Likewise.
6334
6335 2018-06-10 Tom Tromey <tom@tromey.com>
6336
6337 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6338 (class remote_state) <stop_reply_queue>: Now std::vector.
6339 (remote_state::~remote_state)
6340 (remote_target::stop_reply_queue_length): Update.
6341 (struct queue_iter_param, remove_child_of_pending_fork)
6342 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6343 (check_pending_event_prevents_wildcard_vcont_callback)
6344 (remove_stop_reply_for_inferior)
6345 (remove_stop_reply_of_remote_state)
6346 (remote_notif_remove_once_on_match)
6347 (stop_reply_match_ptid_and_ws)
6348 (remote_kill_child_of_pending_fork): Remove.
6349 (remote_target::remove_new_fork_children)
6350 (remote_target::check_pending_events_prevent_wildcard_vcont)
6351 (remote_target::discard_pending_stop_replies)
6352 (remote_target::discard_pending_stop_replies_in_queue)
6353 (remote_target::remote_notif_remove_queued_reply)
6354 (remote_target::queued_stop_reply)
6355 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6356 (remote_target::wait, remote_target::kill_new_fork_children)
6357 (remote_target::async): Update.
6358
6359 2018-06-10 Tom Tromey <tom@tromey.com>
6360
6361 * record-full.c (record_full_arch_list_cleanups): Remove.
6362 (record_full_message): Use try/catch.
6363 (record_full_wait_cleanups): Remove.
6364 (record_full_wait_1): Use try/catch.
6365 (record_full_restore): Likewise.
6366
6367 2018-06-10 Tom Tromey <tom@tromey.com>
6368
6369 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6370 declare VEC. Add constructor.
6371 <in_target_beneath>: Now bool.
6372 (record_full_breakpoints): Now a std::vector, static.
6373 (record_full_sync_record_breakpoints)
6374 (record_full_init_record_breakpoints)
6375 (record_full_target::insert_breakpoint)
6376 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6377
6378 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6379
6380 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6381 * serial.c (serial_interface_lookup): Remove struct keyword.
6382
6383 2018-06-10 Tom Tromey <tom@tromey.com>
6384
6385 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6386 method.
6387 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6388 a method.
6389 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6390 method.
6391 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6392 "beneath" as a method.
6393 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6394 Use "beneath" as a method.
6395
6396 2018-06-10 Tom Tromey <tom@tromey.com>
6397
6398 * tracefile.c (struct trace_file_writer_deleter): New.
6399 <operator()>: Rename from trace_file_writer_xfree.
6400 (trace_file_writer_up): New typedef.
6401 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6402
6403 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6404
6405 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6406 <m_registers, m_register_status>: Change type to
6407 std::unique_ptr.
6408 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6409 XCNEWVEC.
6410
6411 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6412
6413 * common/common-regcache.h (enum register_status): Add
6414 underlying type "signed char".
6415 * regcache.h (reg_buffer) <m_register_status>: Change type to
6416 register_status *.
6417 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6418 register_status instead of signed char.
6419 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6420 (reg_buffer::get_register_status): Remove cast.
6421 (readable_regcache::raw_read): Remove cast.
6422 (readable_regcache::cooked_read): Remove cast.
6423
6424 2018-06-09 Tom Tromey <tom@tromey.com>
6425
6426 * source.c (reverse_search_command, forward_search_command): Use
6427 scoped_fd.
6428
6429 2018-06-09 Tom Tromey <tom@tromey.com>
6430
6431 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6432 (serial_ops_list): Now static, std::vector.
6433 (serial_interface_lookup, serial_add_interface): Update.
6434
6435 2018-06-09 Tom Tromey <tom@tromey.com>
6436
6437 * dwarf2read.c (process_cu_includes): Update.
6438 (process_full_comp_unit): Update.
6439 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6440 std::vector.
6441
6442 2018-06-08 Paul Koning <paul_koning@dell.com>
6443
6444 PR gdb/23252
6445
6446 * python/python.c (do_start_initialization):
6447 Avoid call to internal Python API.
6448 (init__gdb_module): New function.
6449
6450 2018-06-08 Gary Benson <gbenson@redhat.com>
6451
6452 * linux-thread-db.c (valprint.h): New include.
6453 (struct check_thread_db_info): New structure.
6454 (check_thread_db_on_load, tdb_testinfo): New static globals.
6455 (check_thread_db, check_thread_db_callback): New functions.
6456 (try_thread_db_load_1): Run integrity checks if requested.
6457 (maintenance_check_libthread_db): New function.
6458 (_initialize_thread_db): Register "maint check libthread-db"
6459 and "maint set/show check-libthread-db".
6460 * NEWS: Mention the above new commands.
6461
6462 2018-06-08 Tom Tromey <tom@tromey.com>
6463
6464 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6465 now a method.
6466
6467 2018-06-08 Tom Tromey <tom@tromey.com>
6468
6469 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6470
6471 2018-06-08 Tom Tromey <tom@tromey.com>
6472
6473 * common/btrace-common.h (struct btrace_data): Add constructor,
6474 destructor, move assignment operator.
6475 <empty, clear, fini>: New methods.
6476 <format>: Initialize.
6477 (btrace_data_init, btrace_data_fini, btrace_data_clear)
6478 (btrace_data_empty): Don't declare.
6479 * common/btrace-common.c (btrace_data_init): Remove.
6480 (btrace_data::fini): Rename from btrace_data_fini.
6481 (btrace_data::empty): Rename from btrace_data_empty.
6482 (btrace_data::clear): Rename from btrace_data_clear. Return
6483 bool.
6484 * btrace.h (make_cleanup_btrace_data): Don't declare.
6485 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6486 (parse_xml_btrace): Update.
6487 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6488 (maint_btrace_clear_packet_history_cmd): Update.
6489
6490 2018-06-07 Pedro Alves <palves@redhat.com>
6491
6492 * target.h (target_ops) <beneath>: Now a method. All references
6493 updated.
6494 (class target_stack): New.
6495 * target.c (g_target_stack): New.
6496 (g_current_top_target): Delete.
6497 (current_top_target): Get the top target out of g_target_stack.
6498 (target_stack::push, target_stack::unpush): New.
6499 (push_target, unpush_target): Reimplement.
6500 (target_is_pushed): Reimplement in terms of g_target_stack.
6501 (target_ops::beneath, target_stack::find_beneath): New.
6502
6503 2018-06-07 Pedro Alves <palves@redhat.com>
6504
6505 * target.h (find_target_beneath): Delete declaration.
6506 * target.c (find_target_beneath): Delete definition.
6507 * aix-thread.c: All callers of find_target_beneath adjusted to
6508 call target_ops::beneath instead.
6509 * bsd-uthread.c: Likewise.
6510 * linux-thread-db.c: Likewise.
6511 * ravenscar-thread.c: Likewise.
6512 * sol-thread.c: Likewise.
6513 * spu-multiarch.c: Likewise.
6514
6515 2018-06-07 Pedro Alves <palves@redhat.com>
6516
6517 * target.h (target_ops) <beneath>: Now a method. All references
6518 updated.
6519 (target_ops) <m_beneath>: New.
6520 * target.c (target_ops::beneath): New.
6521 * corelow.c: Adjust all references to target_ops::beneath.
6522 * linux-thread-db.c: Likewise.
6523 * make-target-delegates: Likewise.
6524 * record-btrace.c: Likewise.
6525 * record-full.c: Likewise.
6526 * remote.c: Likewise.
6527 * target.c: Likewise.
6528 * target-delegates.c: Regenerate.
6529
6530 2018-06-07 Pedro Alves <palves@redhat.com>
6531
6532 * target.h (target_stack): Delete.
6533 (current_top_target): Declare function.
6534 * target.c (target_stack): Delete.
6535 (g_current_top_target): New.
6536 (current_top_target): New function.
6537 * auxv.c: Use current_top_target instead of target_stack
6538 throughout.
6539 * avr-tdep.c: Likewise.
6540 * breakpoint.c: Likewise.
6541 * corefile.c: Likewise.
6542 * elfread.c: Likewise.
6543 * eval.c: Likewise.
6544 * exceptions.c: Likewise.
6545 * frame.c: Likewise.
6546 * gdbarch-selftests.c: Likewise.
6547 * gnu-v3-abi.c: Likewise.
6548 * ia64-tdep.c: Likewise.
6549 * ia64-vms-tdep.c: Likewise.
6550 * infcall.c: Likewise.
6551 * infcmd.c: Likewise.
6552 * infrun.c: Likewise.
6553 * linespec.c: Likewise.
6554 * linux-tdep.c: Likewise.
6555 * minsyms.c: Likewise.
6556 * ppc-linux-nat.c: Likewise.
6557 * ppc-linux-tdep.c: Likewise.
6558 * procfs.c: Likewise.
6559 * regcache.c: Likewise.
6560 * remote.c: Likewise.
6561 * rs6000-tdep.c: Likewise.
6562 * s390-linux-nat.c: Likewise.
6563 * s390-tdep.c: Likewise.
6564 * solib-aix.c: Likewise.
6565 * solib-darwin.c: Likewise.
6566 * solib-dsbt.c: Likewise.
6567 * solib-spu.c: Likewise.
6568 * solib-svr4.c: Likewise.
6569 * solib-target.c: Likewise.
6570 * sparc-tdep.c: Likewise.
6571 * sparc64-tdep.c: Likewise.
6572 * spu-tdep.c: Likewise.
6573 * symfile.c: Likewise.
6574 * symtab.c: Likewise.
6575 * target-descriptions.c: Likewise.
6576 * target-memory.c: Likewise.
6577 * target.c: Likewise.
6578 * target.h: Likewise.
6579 * tracefile-tfile.c: Likewise.
6580 * tracepoint.c: Likewise.
6581 * valops.c: Likewise.
6582 * valprint.c: Likewise.
6583 * value.c: Likewise.
6584 * windows-tdep.c: Likewise.
6585 * mi/mi-main.c: Likewise.
6586
6587 2018-06-07 Tom Tromey <tom@tromey.com>
6588
6589 * valprint.h (build_address_symbolic): Declare.
6590 * printcmd.c (print_address_symbolic): Update.
6591 (build_address_symbolic): Change "name" and "filename" to
6592 std::string.
6593 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6594 Update.
6595 * defs.h (build_address_symbolic): Remove declaration.
6596
6597 2018-06-07 Alan Hayward <alan.hayward@arm.com>
6598
6599 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6600 (aarch64_vnv_type): Add function.
6601 (aarch64_pseudo_register_name): Add V regs for SVE.
6602 (aarch64_pseudo_register_type): Likewise.
6603 (aarch64_pseudo_register_reggroup_p): Likewise.
6604 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6605 (aarch64_pseudo_read_value): Add V regs for SVE.
6606 (aarch64_pseudo_write_2): Use V0 offset for SVE
6607 (aarch64_pseudo_write): Add V regs for SVE.
6608 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6609
6610 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
6611
6612 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6613 (sve_vl_from_vq): Likewise.
6614
6615 2018-06-05 Tom Tromey <tom@tromey.com>
6616
6617 * cli/cli-cmds.c (show_version): Update.
6618 * top.c (print_gdb_version): Add "interactive" parameter.
6619 Update.
6620 * main.c (captured_main_1): Update.
6621 * top.h (print_gdb_version): Add "interactive" parameter and a
6622 comment.
6623
6624 2018-06-05 David Malcolm <dmalcolm@redhat.com>
6625
6626 * common/enum-flags.h: Add trailing semicolon to example in
6627 comment.
6628
6629 2018-06-05 Tom Tromey <tom@tromey.com>
6630
6631 PR cli/12326:
6632 * NEWS: Add entry about pager.
6633 * utils.c (pagination_disabled_for_command): New global.
6634 (prompt_for_continue): Allow "c" response to prompt.
6635 (reinitialize_more_filter): Clear
6636 pagination_disabled_for_command.
6637 (fputs_maybe_filtered): Check pagination_disabled_for_command.
6638
6639 2018-06-04 Tom Tromey <tom@tromey.com>
6640
6641 * ada-lang.h (ada_lookup_symbol_list): Update.
6642 * ada-lang.c (resolve_subexp): Update.
6643 (symbols_are_identical_enums): Change type of syms. Remove nsyms
6644 parameter.
6645 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6646 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6647 results parameter to std::vector.
6648 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6649 Update.
6650 * ada-exp.y (block_lookup): Update.
6651 (select_possible_type_sym): Change type of syms. Remove nsyms
6652 parameter.
6653 (write_var_or_type, write_name_assoc): Update.
6654
6655 2018-06-04 Joel Brobecker <brobecker@adacore.com>
6656
6657 * windows-nat.c (windows_nat_target::xfer_partial): Return
6658 TARGET_XFER_E_IO if we need to delegate to the target beneath
6659 but BENEATH is NULL.
6660
6661 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
6662
6663 * Makefile.in (config.status): Add configure.nat as a
6664 dependency.
6665
6666 2018-06-04 Tom Tromey <tom@tromey.com>
6667
6668 * cp-name-parser.y (cpname_state): Add method declarations.
6669 (HANDLE_QUAL): Update.
6670 (cpname_state::d_grab, cpname_state::fill_comp)
6671 (cpname_state::make_operator, cpname_state::make_dtor)
6672 (cpname_state::make_builtin_type, cpname_state::make_name)
6673 (cpname_state::d_qualify, cpname_state::d_int_type)
6674 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6675 (%union): Move earlier.
6676
6677 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6678
6679 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6680
6681 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6682
6683 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6684 (aarch64_pseudo_write_1): Likewise.
6685 (aarch64_pseudo_read_value): Use helper.
6686 (aarch64_pseudo_write): Likewise.
6687
6688 2018-06-04 Pedro Alves <palves@redhat.com>
6689
6690 * darwin-nat.c (darwin_ops): Delete.
6691 (darwin_attach_pid): Use get_native_target.
6692
6693 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6694
6695 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6696 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6697
6698 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6699
6700 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6701 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6702 (aarch64_gdbarch_init): Check for SVE.
6703 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6704
6705 2018-06-04 Alan Hayward <alan.hayward@arm.com>
6706
6707 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6708 * aarch64-tdep.h (aarch64_read_description): Likewise.
6709 * arch/aarch64.c (aarch64_create_target_description): Likewise.
6710 * arch/aarch64.h (aarch64_create_target_description): Likewise.
6711 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6712 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6713 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6714
6715 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
6716
6717 * value.c (value_fetch_lazy_bitfield): New.
6718 (value_fetch_lazy_memory): New.
6719 (value_fetch_lazy_register): New.
6720 (value_fetch_lazy): Factor out to smaller functions.
6721
6722 2018-06-01 Tom Tromey <tom@tromey.com>
6723
6724 * cp-name-parser.y (backslashable, represented): Now const.
6725
6726 2018-06-01 Tom Tromey <tom@tromey.com>
6727
6728 * cp-name-parser.y: Include parser-defs.h.
6729 (parser_fprintf): Remove declaration.
6730
6731 2018-06-01 Tom Tromey <tom@tromey.com>
6732
6733 * cp-name-parser.y: Use %pure-parser, %lex-param, and
6734 %parse-param.
6735 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6736 (global_result): Remove globals.
6737 (struct cpname_state): New.
6738 (yyparse): Don't declare.
6739 (yylex, yyerror): Move declarations after %union.
6740 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6741 (make_name): Add state parameter.
6742 Update all callers.
6743 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6744 parameter.
6745 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6746 Update.
6747 (yylex): Add lvalp, state parameters.
6748 (yyerror): Add state parameter.
6749 (cp_demangled_name_to_comp): Update.
6750
6751 2018-06-01 Tom Tromey <tom@tromey.com>
6752
6753 * cp-name-parser.y (parser_fprintf): Declare.
6754 (GDB_YY_REMAP_PREFIX): Define.
6755 Include yy-remap.h. Don't redefine yy* identifiers.
6756
6757 2018-06-01 Tom Tromey <tom@tromey.com>
6758
6759 * python/py-type.c (typy_legacy_template_argument): Update.
6760 * cp-support.h (cp_demangled_name_to_comp): Update.
6761 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6762 parameter to be a "std::string *".
6763 (main): Update.
6764
6765 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
6766
6767 * ada-lex.l: Include "diagnostics.h" instead of
6768 "common/diagnostics.h".
6769 * unittests/environ-selftests.c: Likewise.
6770 * common/diagnostics.h: Moved to ../include.
6771
6772 2018-06-01 Joel Brobecker <brobecker@adacore.com>
6773
6774 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6775 to language_mode_manual while calling breakpoint_re_set_one.
6776
6777 2018-06-01 Tom Tromey <tom@tromey.com>
6778
6779 * valops.c (value_cast_structs, destructor_name_p): Update.
6780 * symtab.c (gdb_mangle_name): Update.
6781 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6782 Update.
6783 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6784 (pascal_object_print_value_fields, pascal_object_print_value):
6785 Update.
6786 * p-typeprint.c (pascal_type_print_derivation_info): Update.
6787 * linespec.c (find_methods): Update.
6788 * gdbtypes.h (type_name_no_tag): Remove.
6789 (type_name_or_error): Rename from type_name_no_tag_or_error.
6790 * gdbtypes.c (type_name_no_tag): Remove.
6791 (type_name_or_error): Rename from type_name_no_tag_or_error.
6792 (lookup_struct_elt_type, check_typedef): Update.
6793 * expprint.c (print_subexp_standard): Update.
6794 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6795 * d-namespace.c (d_lookup_nested_symbol): Update.
6796 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6797 (cp_print_class_member): Update.
6798 * cp-namespace.c (cp_lookup_nested_symbol): Update.
6799 * completer.c (add_struct_fields): Update.
6800 * c-typeprint.c (cp_type_print_derivation_info)
6801 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6802 Update.
6803 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6804 (ada_prefer_type, ada_is_exception_sym): Update.
6805
6806 2018-06-01 Tom Tromey <tom@tromey.com>
6807
6808 * valops.c (enum_constant_from_type, value_namespace_elt)
6809 (value_maybe_namespace_elt): Update.
6810 * valarith.c (find_size_for_pointer_math): Update.
6811 * target-descriptions.c (make_gdb_type): Update.
6812 * symmisc.c (print_symbol): Update.
6813 * stabsread.c (define_symbol, read_type)
6814 (complain_about_struct_wipeout, add_undefined_type)
6815 (cleanup_undefined_types_1): Update.
6816 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6817 (rust_range_type_p, val_print_struct, rust_print_struct_def)
6818 (rust_internal_print_type, rust_composite_type)
6819 (rust_evaluate_funcall, rust_evaluate_subexp)
6820 (rust_inclusive_range_type_p): Update.
6821 * python/py-type.c (typy_get_tag): Update.
6822 * p-typeprint.c (pascal_type_print_base): Update.
6823 * mdebugread.c (parse_symbol, parse_type): Update.
6824 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6825 Update.
6826 * guile/scm-type.c (gdbscm_type_tag): Update.
6827 * go-lang.c (sixg_string_p): Update.
6828 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6829 Update.
6830 * gdbtypes.h (struct main_type) <tag_name>: Remove.
6831 (TYPE_TAG_NAME): Remove.
6832 * gdbtypes.c (type_name_no_tag): Simplify.
6833 (check_typedef, check_types_equal, recursive_dump_type)
6834 (copy_type_recursive, arch_composite_type): Update.
6835 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
6836 in summary mode when needed.
6837 * eval.c (evaluate_funcall): Update.
6838 * dwarf2read.c (fixup_go_packaging, read_structure_type)
6839 (process_structure_scope, read_enumeration_type)
6840 (read_namespace_type, read_module_type, determine_prefix): Update.
6841 * cp-support.c (inspect_type): Update.
6842 * coffread.c (process_coff_symbol, decode_base_type): Update.
6843 * c-varobj.c (c_is_path_expr_parent): Update.
6844 * c-typeprint.c (c_type_print_base_struct_union): Update.
6845 (c_type_print_base_1): Update. Print struct/class/union/enum in
6846 summary when using C language.
6847 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6848 (gen_maybe_namespace_elt): Update.
6849 * ada-lang.c (ada_type_name): Simplify.
6850 (empty_record, ada_template_to_fixed_record_type_1)
6851 (template_to_static_fixed_type)
6852 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6853
6854 2018-06-01 Tom Tromey <tom@tromey.com>
6855
6856 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6857 c_print_type.
6858 * c-typeprint.c (c_print_type_1): Add "language" parameter.
6859 (c_print_type): Update.
6860 (c_print_type): New overload.
6861 (c_type_print_varspec_prefix, c_type_print_args)
6862 (c_type_print_varspec_suffix, c_print_type_no_offsets)
6863 (c_type_print_base_struct_union, c_type_print_base_1)
6864 (cp_type_print_method_args): Add "language" parameter.
6865 (c_type_print_base): Update.
6866 * c-lang.h (c_print_type): Add new overload.
6867
6868 2018-06-01 Tom Tromey <tom@tromey.com>
6869
6870 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6871 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6872
6873 2018-06-01 Alan Hayward <alan.hayward@arm.com>
6874
6875 * aarch64-tdep.c (aarch64_sve_register_names): New const
6876 var.
6877 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6878 (AARCH64_SVE_Z_REGS_NUM): New define.
6879 (AARCH64_SVE_P_REGS_NUM): Likewise.
6880 (AARCH64_SVE_NUM_REGS): Likewise.
6881
6882 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6883
6884 * nat/linux-ptrace.h [__alpha__]
6885 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6886 definitions.
6887
6888 2018-05-31 Maciej W. Rozycki <macro@mips.com>
6889
6890 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6891 the endianness selected.
6892 * NEWS: Document `set endian auto' mode operation update.
6893
6894 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6895
6896 * Makefile.in: Add new header.
6897 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6898 (sve_vl_from_vg): Likewise.
6899 (sve_vq_from_vl): Likewise.
6900 (sve_vl_from_vq): Likewise.
6901 (sve_vq_from_vg): Likewise.
6902 (sve_vg_from_vq): Likewise.
6903 * configure.nat: Add new c file.
6904 * nat/aarch64-sve-linux-ptrace.c: New file.
6905 * nat/aarch64-sve-linux-ptrace.h: New file.
6906
6907 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6908
6909 * aarch64-linux-nat.c (aarch64_linux_read_description):
6910 Add parmeter zero.
6911 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6912 Likewise.
6913 * aarch64-tdep.c (tdesc_aarch64_list): Add.
6914 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6915 (aarch64_gdbarch_init): Add parmeter zero.
6916 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6917 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6918 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6919 parmeter.
6920 * doc/gdb.texinfo: Describe SVE feature
6921 * features/aarch64-sve.c: New file.
6922
6923 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
6924
6925 PR gdb/23210
6926 * gdbarch.sh (significant_addr_bit): Default to zero when
6927 not set by target architecture.
6928 * gdbarch.c: Re-generated.
6929 * utils.c (address_significant): Update.
6930
6931 2018-05-30 Joel Brobecker <brobecker@adacore.com>
6932
6933 * stack.c (func_command): Remove trailing newline in call to error.
6934
6935 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6936
6937 * regcache.h (regcache_raw_collect): Remove, update callers to
6938 use regcache::raw_collect.
6939 * regcache.c (regcache_raw_collect): Remove.
6940
6941 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6942
6943 * regcache.h (regcache_raw_supply): Remove, update callers to
6944 use detached_regcache::raw_supply.
6945 * regcache.c (regcache_raw_supply): Remove.
6946
6947 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6948
6949 * regcache.h (regcache_cooked_write_part): Remove, update
6950 callers to use regcache::cooked_write_part.
6951 * regcache.c (regcache_cooked_write_part): Remove.
6952
6953 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6954
6955 * regcache.h (regcache_cooked_read_part): Remove, update callers
6956 to use readable_regcache::cooked_read_part.
6957 * regcache.c (regcache_cooked_read_part): Remove.
6958
6959 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6960
6961 * regcache.h (regcache_cooked_read_value): Remove, update
6962 callers to use readable_regcache::cooked_read_value.
6963 * regcache.c (regcache_cooked_read_value): Remove.
6964
6965 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6966
6967 * regcache.h (regcache_cooked_write): Remove, update callers to
6968 use regcache::cooked_write.
6969 * regcache.c (regcache_cooked_write): Remove.
6970
6971 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6972
6973 * regcache.h (regcache_invalidate): Remove, update callers to
6974 use detached_regcache::invalidate instead.
6975 * regcache.c (regcache_invalidate): Remove.
6976
6977 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6978
6979 * regcache.h (regcache_raw_write_part): Remove, update callers
6980 to use regcache::raw_write_part instead.
6981 * regcache.c (regcache_raw_write_part): Remove.
6982
6983 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6984
6985 * regcache.h (regcache_raw_read_part): Remove, update callers to
6986 use readable_regcache::raw_read_part instead.
6987 * regcache.c (regcache_raw_read_part): Remove.
6988
6989 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6990
6991 * regcache.h (regcache_cooked_read): Remove, update callers to
6992 use readable_regcache::cooked_read instead.
6993 * regcache.c (regcache_cooked_read): Remove.
6994
6995 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
6996
6997 * regcache.h (regcache_raw_write): Remove, update callers to use
6998 regcache::raw_write instead.
6999 * regcache.c (regcache_raw_write): Remove.
7000
7001 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7002
7003 * regcache.h (regcache_raw_read): Remove, update callers to use
7004 readable_regcache::raw_read instead.
7005 * regcache.c (regcache_raw_read): Remove.
7006
7007 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7008
7009 * regcache.h (regcache_raw_update): Remove, update callers to
7010 use readable_regcache::raw_update instead.
7011 * regcache.c (regcache_raw_update): Remove.
7012
7013 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7014
7015 * regcache.h (regcache_register_status): Remove, update callers
7016 to use reg_buffer::get_register_status directly instead.
7017 * regcache.c (regcache_register_status): Remove.
7018
7019 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7020
7021 * regcache.h (regcache_get_ptid): Remove, update all callers to
7022 call regcache::ptid instead.
7023 * regcache.c (regcache_get_ptid): Remove.
7024
7025 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7026
7027 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7028
7029 2018-05-30 Pedro Alves <palves@redhat.com>
7030
7031 * common/common-exceptions.h (exception_rethrow): Use
7032 ATTRIBUTE_NORETURN.
7033
7034 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7035
7036 * breakpoint.c (print_solib_event, check_status_catch_solib):
7037 Remove struct keyword in range-based for loops.
7038 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7039 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7040 Likewise.
7041 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7042 Likewise.
7043 * symfile.c (addr_info_make_relative): Likewise.
7044 * thread.c (value_in_thread_stack_temporaries): Likewise.
7045
7046 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7047
7048 PR gdb/16841
7049 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7050 aggregate type to get its real type before accessing it.
7051
7052 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7053
7054 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7055 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7056 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7057 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7058 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7059 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7060 * printcmd.c (info_address_command): Likewise.
7061
7062 2018-05-29 Tom Tromey <tom@tromey.com>
7063
7064 * windows-nat.c (handle_exception): Update fall-through comment.
7065
7066 2018-05-29 Tom Tromey <tom@tromey.com>
7067
7068 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7069 (struct program_space) <added_solibs>: Now a std::vector.
7070 * breakpoint.c (print_solib_event): Update.
7071 (check_status_catch_solib): Update.
7072 * progspace.c (clear_program_space_solib_cache): Update.
7073 * solib.c (update_solib_list): Update.
7074
7075 2018-05-29 Tom Tromey <tom@tromey.com>
7076
7077 * python/py-type.c (typy_richcompare): Update.
7078 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7079 * gdbtypes.h (types_deeply_equal): Return bool.
7080 (types_equal): Likewise.
7081 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7082 declare VEC.
7083 (check_types_equal): Change worklist to std::vector. Return
7084 bool.
7085 (struct type_equality_entry): Add constructor.
7086 (compare_maybe_null_strings): Return bool.
7087 (check_types_worklist): Return bool. Change worklist to
7088 std::vector.
7089 (types_deeply_equal): Use std::vector.
7090 (types_equal): Return bool.
7091 (compare_maybe_null_strings): Simplify.
7092
7093 2018-05-29 Tom Tromey <tom@tromey.com>
7094
7095 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7096
7097 2018-05-29 Tom Tromey <tom@tromey.com>
7098
7099 * objc-lang.h: Don't include cp-support.h.
7100 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7101 declare VEC.
7102
7103 2018-05-27 Tom Tromey <tom@tromey.com>
7104
7105 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7106
7107 2018-05-25 Tom Tromey <tom@tromey.com>
7108
7109 * value.c (value::location): Initialize.
7110
7111 2018-05-25 Tom Tromey <tom@tromey.com>
7112
7113 * dbxread.c (init_bincl_list): Remove.
7114 (bincl_list): Now a std::vector.
7115 (bincls_allocated, next_bincl): Remove.
7116 (free_bincl_list, do_free_bincl_list_cleanup)
7117 (make_cleanup_free_bincl_list): Remove.
7118 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7119 unique_xmalloc_ptr.
7120 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7121 (struct header_file_location): Add constructor.
7122 (add_bincl_to_list): Remove.
7123
7124 2018-05-25 Tom Tromey <tom@tromey.com>
7125
7126 * tui/tui.c (tui_enable): Update.
7127 * mi/mi-interp.c (mi_interp::init): Update.
7128 * interps.h (class interp) <name>: New method.
7129 <m_name>: Rename from name.
7130 (~scoped_restore_interp): Update.
7131 * interps.c (interp::interp): Update.
7132 (interp_add, interp_set, interp_lookup_existing)
7133 (current_interp_named_p): Update.
7134
7135 2018-05-25 Tom Tromey <tom@tromey.com>
7136
7137 * interps.c (interp_name): Remove.
7138 * mi/mi-interp.c (mi_interp::init): Update.
7139 * interps.h (interp_name): Remove.
7140 (~scoped_restore_interp): Update.
7141 * tui/tui.c (tui_enable): Update.
7142
7143 2018-05-25 Tom Tromey <tom@tromey.com>
7144
7145 * utils.c (fputs_maybe_filtered): Update.
7146 * linespec.c (decode_line_full): Update.
7147 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7148 (mi_print_breakpoint_for_event, mi_solib_loaded)
7149 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7150 (mi_user_selected_context_changed): Update.
7151 * mi/mi-main.c (mi_execute_command): Update.
7152 * cli/cli-script.c (execute_control_command): Update.
7153 * python/python.c (execute_gdb_command): Update.
7154 * solib.c (info_sharedlibrary_command): Update.
7155 * interps.c (interp_ui_out): Remove.
7156 * interps.h (interp_ui_out): Remove.
7157
7158 2018-05-25 Tom Tromey <tom@tromey.com>
7159
7160 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7161 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7162 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7163
7164 2018-05-25 Tom Tromey <tom@tromey.com>
7165
7166 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7167 * interps.c (interp_exec): Use scoped_restore.
7168
7169 2018-05-25 Tom Tromey <tom@tromey.com>
7170
7171 * remote.c (remote_target::remote_file_get): Use
7172 gdb::byte_vector.
7173 (remote_target::remote_file_put): Likewise.
7174
7175 2018-05-25 Tom Tromey <tom@tromey.com>
7176
7177 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7178 a std::string.
7179 (get_pe_section_index, add_pe_exported_sym): Update.
7180 (read_pe_exported_syms): Use gdb::def_vector.
7181
7182 2018-05-25 Tom Tromey <tom@tromey.com>
7183
7184 * frame.c (remove_prev_frame): Remove.
7185 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7186
7187 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7188
7189 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7190 Remove prototypes.
7191 * mips-linux-nat.c (supply_fpregset): Always call
7192 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7193 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7194 `mips_fill_fpregset'.
7195 * mips-linux-tdep.c (mips_supply_fpregset)
7196 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7197 (mips_fill_fpregset_wrapper): Remove functions.
7198 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7199 (mips_linux_fpregset): Remove variable.
7200 (mips_linux_iterate_over_regset_sections): Use
7201 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7202 (mips_linux_o32_sigframe_init): Remove comment.
7203
7204 2018-05-25 Pedro Alves <palves@redhat.com>
7205
7206 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7207 (struct readahead_cache, struct packet_reg, struct
7208 remote_arch_state, class remote_state): Move higher up in the
7209 file.
7210 (remote_target::m_remote_state): Now an object instead of a pointer.
7211 (remote_target::get_remote_state): Adjust.
7212
7213 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7214
7215 * stack.c (select_and_print_frame): Delete.
7216 (struct function_bounds): Move struct within function.
7217 (func_command): Most content moved into new function
7218 find_frame_for_function, use new function, print result, add
7219 function comment.
7220 (find_frame_for_function): New function, now returns a result.
7221
7222 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7223
7224 * stack.c (iterate_over_block_arg_vars): Fix comment.
7225 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7226
7227 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7228
7229 PR gdb/23203
7230 * frame.c
7231 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7232 Define.
7233 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7234 Define.
7235 * frame.h (class scoped_restore_selected_frame): New class.
7236 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7237 of any exception, use scoped_restore_selected_frame to restore the
7238 frame instead.
7239
7240 2018-05-24 Pedro Alves <palves@redhat.com>
7241
7242 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7243 override.
7244
7245 2018-05-23 Tom Tromey <tom@tromey.com>
7246
7247 * complaints.c (struct complaints): Remove.
7248 (symfile_complaint_book): Remove.
7249 (series): New global.
7250 (complaint_internal): Update.
7251 (clear_complaints): Update.
7252
7253 2018-05-23 Tom Tromey <tom@tromey.com>
7254
7255 * complaints.c (counters): New global.
7256 (struct complain): Remove.
7257 (struct complaints) <root>: Remove.
7258 (complaint_sentinel): Remove.
7259 (symfile_complaint_book): Update.
7260 (find_complaint) Remove.
7261 (complaint_internal, clear_complaints): Update.
7262
7263 2018-05-23 Tom Tromey <tom@tromey.com>
7264
7265 * complaints.c (struct complain) <file, line>: Remove.
7266 (find_complaint): Remove file, line parameters.
7267 (complaint_internal): Update.
7268
7269 2018-05-23 Tom Tromey <tom@tromey.com>
7270
7271 * complaints.c (vcomplaint): Remove.
7272 (complaint_internal) Merge in contents of vcomplaint.
7273
7274 2018-05-23 Tom Tromey <tom@tromey.com>
7275
7276 * complaints.c (struct complaints) <explanation>: Remove.
7277 (symfile_explanations): Remove.
7278 (symfile_complaint_book): Update.
7279 (vcomplaint): Update.
7280 (struct explanation): Remove.
7281
7282 2018-05-23 Tom Tromey <tom@tromey.com>
7283
7284 * complaints.c (symfile_complaints): Remove.
7285 (complaint_internal): Remove "complaints" parameter.
7286 (clear_complaints, vcomplaint): Remove "c" parameter.
7287 (get_complaints): Remove.
7288 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7289 (dwarf2_debug_line_missing_file_complaint)
7290 (dwarf2_debug_line_missing_end_sequence_complaint)
7291 (dwarf2_complex_location_expr_complaint)
7292 (dwarf2_const_value_length_mismatch_complaint)
7293 (dwarf2_section_buffer_overflow_complaint)
7294 (dwarf2_macro_malformed_definition_complaint)
7295 (dwarf2_invalid_attrib_class_complaint)
7296 (create_addrmap_from_index, dw2_symtab_iter_next)
7297 (dw2_expand_marked_cus)
7298 (dw2_debug_names_iterator::find_vec_in_debug_names)
7299 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7300 (create_debug_type_hash_table, init_cutu_and_read_dies)
7301 (partial_die_parent_scope, add_partial_enumeration)
7302 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7303 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7304 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7305 (create_cus_hash_table, create_dwp_hash_table)
7306 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7307 (dwarf2_rnglists_process, dwarf2_ranges_process)
7308 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7309 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7310 (handle_struct_member_die, process_structure_scope)
7311 (read_array_type, read_common_block, read_module_type)
7312 (read_tag_pointer_type, read_typedef, read_base_type)
7313 (read_subrange_type, load_partial_dies, partial_die_info::read)
7314 (partial_die_info::read, partial_die_info::read)
7315 (partial_die_info::read, read_checked_initial_length_and_offset)
7316 (dwarf2_string_attr, read_formatted_entries)
7317 (dwarf_decode_line_header)
7318 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7319 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7320 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7321 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7322 (get_signatured_type, get_DW_AT_signature_type)
7323 (decode_locdesc, file_file_name, consume_improper_spaces)
7324 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7325 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7326 (dwarf2_symbol_mark_computed, set_die_type)
7327 (read_attribute_value): Update.
7328 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7329 Update.
7330 * dbxread.c (unknown_symtype_complaint)
7331 (lbrac_mismatch_complaint, repeated_header_complaint)
7332 (set_namestring, function_outside_compilation_unit_complaint)
7333 (read_dbx_symtab, process_one_symbol): Update.
7334 * gdbtypes.c (stub_noname_complaint): Update.
7335 * windows-nat.c (handle_unload_dll): Update.
7336 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7337 (decode_base_type): Update.
7338 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7339 (eb_complaint, record_include_begin, record_include_end)
7340 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7341 (process_xcoff_symbol, read_symbol)
7342 (function_outside_compilation_unit_complaint)
7343 (scan_xcoff_symtab): Update.
7344 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7345 * buildsym.c (finish_block_internal, make_blockvector)
7346 (end_symtab_get_static_block, augment_type_symtab): Update.
7347 * dtrace-probe.c (dtrace_process_dof)
7348 (dtrace_static_probe_ops::get_probes): Update.
7349 * complaints.h (struct complaint): Don't declare.
7350 (symfile_complaints): Remove.
7351 (complaint_internal): Remove "complaints" parameter.
7352 (complaint): Likewise.
7353 (clear_complaints): Likewise.
7354 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7355 (reread_symbols): Update.
7356 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7357 (dwarf2_frame_cache, decode_frame_entry): Update.
7358 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7359 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7360 (info_selectors_command): Update.
7361 * macrotab.c (macro_include, check_for_redefinition)
7362 (macro_undef): Update.
7363 * objfiles.c (filter_overlapping_sections): Update.
7364 * stabsread.c (invalid_cpp_abbrev_complaint)
7365 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7366 (define_symbol, error_type, read_type, rs6000_builtin_type)
7367 (stabs_method_name_from_physname, read_member_functions)
7368 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7369 (attach_fields_to_type, complain_about_struct_wipeout)
7370 (read_range_type, read_args, common_block_start)
7371 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7372 Update.
7373 * mdebugread.c (index_complaint, unknown_ext_complaint)
7374 (basic_type_complaint, bad_tag_guess_complaint)
7375 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7376 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7377 (parse_procedure, parse_lines)
7378 (function_outside_compilation_unit_complaint)
7379 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7380 (bad_tag_guess_complaint, reg_value_complaint): Update.
7381 * cp-support.c (demangled_name_complaint): Update.
7382 * macroscope.c (sal_macro_scope): Update.
7383 * dwarf-index-write.c (class debug_names): Update.
7384
7385 2018-05-23 Tom Tromey <tom@tromey.com>
7386
7387 * complaints.c (clear_complaints): Remove "noisy" parameter.
7388 * complaints.h (clear_complaints): Update.
7389 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7390 (reread_symbols): Update.
7391
7392 2018-05-23 Tom Tromey <tom@tromey.com>
7393
7394 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7395 SUBSEQUENT_MESSAGE.
7396 (vcomplaint, clear_complaints): Update.
7397 (symfile_explanations): Remove some messages.
7398
7399 2018-05-23 Tom Tromey <tom@tromey.com>
7400
7401 * complaints.c (internal_complaint): Remove.
7402 * complaints.h (internal_complaint): Remove.
7403
7404 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7405
7406 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7407
7408 2018-05-22 Pedro Alves <palves@redhat.com>
7409
7410 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7411 (remote_fileio_badfd, remote_fileio_return_errno)
7412 (remote_fileio_return_success, remote_fileio_func_open)
7413 (remote_fileio_func_open, remote_fileio_func_close)
7414 (remote_fileio_func_read, remote_fileio_func_write)
7415 (remote_fileio_func_lseek, remote_fileio_func_rename)
7416 (remote_fileio_func_unlink, remote_fileio_func_stat)
7417 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7418 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7419 remote_target parameter.
7420 (remote_fio_func_map) <func>: Add remote_target parameter.
7421 (do_remote_fileio_request, remote_fileio_request):
7422 * remote-fileio.h (remote_fileio_request):
7423 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7424 remote_target parameter.
7425 (remote_notif_process, handle_notification): Adjust to pass down
7426 the remote.
7427 (remote_notif_state_allocate): Add remote_target parameter. Save
7428 it.
7429 * remote-notif.h (struct remote_target): Forward declare.
7430 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7431 remote_target parameter.
7432 (struct remote_notif_state) <remote>: New field.
7433 (remote_notif_ack, remote_notif_parse): Add remote_target
7434 parameter.
7435 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7436 remote_target parameter.
7437 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7438 (threads_listing_context, rmt_thread_action, protocol_feature)
7439 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7440 (packet_result, struct threads_listing_context, remote_state):
7441 Move definitions and declarations higher up.
7442 (remote_target) <~remote_target>: Declare.
7443 (remote_download_command_source, remote_file_put, remote_file_get)
7444 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7445 (remote_hostio_pread_vFile, remote_hostio_send_command)
7446 (remote_hostio_set_filesystem, remote_hostio_open)
7447 (remote_hostio_close, remote_hostio_unlink, remote_state)
7448 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7449 (get_memory_write_packet_size, get_memory_read_packet_size)
7450 (append_pending_thread_resumptions, remote_detach_1)
7451 (append_resumption, remote_resume_with_vcont)
7452 (add_current_inferior_and_thread, wait_ns, wait_as)
7453 (process_stop_reply, remote_notice_new_inferior)
7454 (process_initial_stop_replies, remote_add_thread)
7455 (btrace_sync_conf, remote_btrace_maybe_reopen)
7456 (remove_new_fork_children, kill_new_fork_children)
7457 (discard_pending_stop_replies, stop_reply_queue_length)
7458 (check_pending_events_prevent_wildcard_vcont)
7459 (discard_pending_stop_replies_in_queue, stop_reply)
7460 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7461 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7462 (remote_interrupt_as, remote_interrupt_ns)
7463 (remote_get_noisy_reply, remote_query_attached)
7464 (remote_add_inferior, remote_current_thread, get_current_thread)
7465 (set_thread, set_general_thread, set_continue_thread)
7466 (set_general_process, write_ptid)
7467 (remote_unpack_thread_info_response, remote_get_threadinfo)
7468 (parse_threadlist_response, remote_get_threadlist)
7469 (remote_threadlist_iterator, remote_get_threads_with_ql)
7470 (remote_get_threads_with_qxfer)
7471 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7472 (get_offsets, remote_check_symbols, remote_supported_packet)
7473 (remote_query_supported, remote_packet_size)
7474 (remote_serial_quit_handler, remote_detach_pid)
7475 (remote_vcont_probe, remote_resume_with_hc)
7476 (send_interrupt_sequence, interrupt_query)
7477 (remote_notif_get_pending_events, fetch_register_using_p)
7478 (send_g_packet, process_g_packet, fetch_registers_using_g)
7479 (store_register_using_P, store_registers_using_G)
7480 (set_remote_traceframe, check_binary_download)
7481 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7482 (remote_xfer_live_readonly_partial, remote_read_bytes)
7483 (remote_send_printf, remote_flash_write, readchar)
7484 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7485 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7486 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7487 (extended_remote_disable_randomization, extended_remote_run)
7488 (send_environment_packet, extended_remote_environment_support)
7489 (extended_remote_set_inferior_cwd, remote_write_qxfer)
7490 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7491 (packet_command): Now methods of ...
7492 (remote_target): ... this class.
7493 (m_remote_state) <remote_target>: New field.
7494 (struct remote_state) <stop_reply_queue,
7495 remote_async_inferior_event_token, wait_forever_enabled_p>: New
7496 fields.
7497 (remote_state::remote_state): Allocate stop_reply_queue.
7498 (remote_state): Delete global.
7499 (get_remote_state_raw): Delete.
7500 (remote_target::get_remote_state): Allocate m_remote_state on
7501 demand.
7502 (get_current_remote_target): New.
7503 (remote_ops, extended_remote_ops): Delete.
7504 (wait_forever_enabled_p, remote_async_inferior_event_token):
7505 Delete, moved to struct remote_state.
7506 (remote_target::close): Delete self. Destruction bits split to
7507 ...
7508 (remote_target::~remote_target): ... this.
7509 (show_memory_packet_size): Adjust to use
7510 get_current_remote_target.
7511 (struct protocol_feature) <func>: Add remote_target parameter.
7512 All callers adjusted.
7513 (curr_quit_handler_target): New.
7514 (remote_serial_quit_handler): Reimplement.
7515 (remote_target::open_1): Adjust to use get_current_remote_target.
7516 Heap-allocate remote_target/extended_remote_target instances.
7517 (vcont_builder::vcont_builder): Add remote_target parameter, and
7518 save it in m_remote. All callers adjusted.
7519 (vcont_builder::m_remote): New field.
7520 (vcont_builder::restart, vcont_builder::flush)
7521 (vcont_builder::push_action): Use it.
7522 (remote_target::commit_resume): Use it.
7523 (struct queue_iter_param) <remote>: New field.
7524 (remote_target::remove_new_fork_children): Fill in 'remote' field.
7525 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7526 (check_pending_event_prevents_wildcard_vcont_callback)
7527 (remote_target::check_pending_events_prevent_wildcard_vcont)
7528 (remote_target::discard_pending_stop_replies)
7529 (remote_target::discard_pending_stop_replies_in_queue)
7530 (remote_target::remote_notif_remove_queued_reply): Fill in
7531 'remote' field.
7532 (remote_notif_get_pending_events): New.
7533 (remote_target::readchar, remote_target::remote_serial_write):
7534 Save/restore curr_quit_handler_target.
7535 (putpkt): New.
7536 (kill_new_fork_children): Fill in 'remote' field.
7537 (packet_command): Use get_current_remote_target, defer to
7538 remote_target method of same name.
7539 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7540 parameter, and save it in m_remote. All callers adjusted.
7541 (scoped_remote_fd::release): Use m_remote.
7542 (scoped_remote_fd::m_remote): New field.
7543 (remote_file_put, remote_file_get, remote_file_delete): Use
7544 get_current_remote_target, defer to remote_target method of same
7545 name.
7546 (remote_btrace_reset): Add remote_state paremeter. Update all
7547 callers.
7548 (remote_async_inferior_event_handler). Pass down 'data'.
7549 (remote_new_objfile): Use get_current_remote_target.
7550 (remote_target::vcont_r_supported): New.
7551 (set_range_stepping): Use get_current_remote_target and
7552 remote_target::vcont_r_supported.
7553 (_initialize_remote): Don't allocate 'remote_state' and
7554 'stop_reply_queue' globals.
7555 * remote.h (struct remote_target): Forward declare.
7556 (getpkt, putpkt, remote_notif_get_pending_events): Add
7557 'remote_target' parameter.
7558
7559 2018-05-22 Pedro Alves <palves@redhat.com>
7560
7561 * remote.c (vcont_builder): Now a class. Make all data members
7562 private.
7563 (vcont_builder) <vcont_builder, restart, flush, push_action>:
7564 Declare methods.
7565 (vcont_builder_restart): Rename to ...
7566 (vcont_builder::restart): ... this.
7567 (vcont_builder_flush): Rename to ...
7568 (vcont_builder::flush): ... this.
7569 (vcont_builder_push_action): Rename to ...
7570 (vcont_builder::push_action): ... this.
7571 (remote_target::commit_resume): Adjust.
7572
7573 2018-05-22 Pedro Alves <palves@redhat.com>
7574
7575 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7576 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7577 (get_fixed_memory_packet_size): New.
7578 (get_memory_packet_size): Use it.
7579 (set_memory_packet_size): Don't override the config size with
7580 DEFAULT_MAX_MEMORY_PACKET_SIZE.
7581 (show_memory_packet_size): Use get_fixed_memory_packet_size.
7582 Don't refer to get_memory_packet_size if not connected to a remote
7583 target. Show "(default)" if configured size is 0.
7584
7585 2018-05-22 Pedro Alves <palves@redhat.com>
7586
7587 * remote.c (remote_target::mourn_inferior): Move
7588 discard_pending_stop_replies call here from ...
7589 (_initialize_remote): ... here.
7590
7591 2018-05-22 Pedro Alves <palves@redhat.com>
7592
7593 * remote.c (compare_section_command): Remove set_general_process
7594 call.
7595
7596 2018-05-22 Pedro Alves <palves@redhat.com>
7597
7598 * remote.c (struct packet_reg, struct remote_arch_state):
7599 Move higher up in the file.
7600 (remote_state) <m_arch_states>: Store remote_arch_state values
7601 instead of remote_arch_state pointers.
7602 (remote_state::get_remote_arch_state): Adjust.
7603
7604 2018-05-22 Pedro Alves <palves@redhat.com>
7605
7606 * remote.c: Include <unordered_map>.
7607 (remote_state): Now a class.
7608 (remote_state) <get_remote_arch_state>: Declare method.
7609 <get_remote_arch_state>: New field.
7610 (remote_arch_state) <remote_arch_state>: Declare ctor.
7611 <regs>: Now a unique_ptr.
7612 (remote_gdbarch_data_handle): Delete.
7613 (get_remote_arch_state): Delete.
7614 (remote_state::get_remote_arch_state): New.
7615 (get_remote_state): Adjust to call remote_state's
7616 get_remote_arch_state method.
7617 (init_remote_state): Delete, bits factored out to ...
7618 (remote_arch_state::remote_arch_state): ... this new method.
7619 (get_remote_packet_size, get_memory_packet_size)
7620 (process_g_packet, remote_target::fetch_registers)
7621 (remote_target::prepare_to_store, store_registers_using_G)
7622 (remote_target::store_registers, remote_target::get_trace_status):
7623 Adjust to call remote_state's method.
7624 (_initialize_remote): Remove reference to
7625 remote_gdbarch_data_handle.
7626
7627 2018-05-22 Pedro Alves <palves@redhat.com>
7628
7629 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7630 pread>: New method declarations.
7631 (remote_target::open_1): Adjust.
7632 (readahead_cache_invalidate): Rename to ...
7633 (readahead_cache::invalidate): ... this, and adjust to be a class
7634 method.
7635 (readahead_cache_invalidate_fd): Rename to ...
7636 (readahead_cache::invalidate_fd): ... this, and adjust to be a
7637 class method.
7638 (remote_hostio_pwrite): Adjust.
7639 (remote_hostio_pread_from_cache): Rename to ...
7640 (readahead_cache::pread): ... this, and adjust to be a class
7641 method.
7642 (remote_hostio_close): Adjust.
7643
7644 2018-05-22 Pedro Alves <palves@redhat.com>
7645
7646 * remote.c (remote_hostio_close_cleanup): Delete.
7647 (class scoped_remote_fd): New.
7648 (remote_file_put, remote_file_get): Use it.
7649
7650 2018-05-22 Pedro Alves <palves@redhat.com>
7651
7652 (struct vCont_action_support): Use bool and initialize all fields.
7653 (struct readahead_cache): Initialize all fields.
7654 (remote_state): Use bool and initialize all fields.
7655 (remote_state::remote_state, remote_state::~remote_state): New.
7656 (new_remote_state): Delete.
7657 (_initialize_remote): Use new to allocate remote_state.
7658
7659 2018-05-22 Pedro Alves <palves@redhat.com>
7660 張俊芝 <zjz@zjz.name>
7661
7662 PR gdb/22973
7663 * c-exp.y: Include "c-support.h".
7664 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7665 of tolower. Use c_ident_is_alpha to scan names.
7666 * c-lang.c: Include "c-support.h".
7667 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7668 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7669 * c-support.h: New file, with bits factored out from ...
7670 * cp-name-parser.y: ... this file.
7671 Include "c-support.h".
7672 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7673 c-support.h and renamed.
7674 (symbol_end, yylex): Adjust.
7675
7676 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7677
7678 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7679 parameter type to CORE_ADDR.
7680 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7681 parameter type in declaration to CORE_ADDR.
7682 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7683 target_auxv_search to get AT_HWCAP and use the result to get the
7684 target description.
7685 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7686 to CORE_ADDR. Remove the cast of the return value to unsigned
7687 long. Fix error predicate of target_auxv_search.
7688 (ppc_linux_nat_target::read_description): Change the type of the
7689 hwcap variable to CORE_ADDR.
7690
7691 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7692
7693 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7694 if the size of fpscr is larger than 32 bits.
7695
7696 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7697
7698 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7699 (ppc32_linux_vsxregmap): New global.
7700 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7701 regcache_supply_regset, and regcache_collect_regset.
7702 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7703 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7704 (fetch_vsx_register, store_vsx_register): Remove.
7705 (fetch_vsx_registers): Add regno parameter. Get regset using
7706 ppc_linux_vsxregset. Use regset to supply registers.
7707 (store_vsx_registers): Add regno parameter. Get regset using
7708 ppc_linux_vsxregset. Use regset to collect registers.
7709 (fetch_register): Call fetch_vsx_registers instead of
7710 fetch_vsx_register.
7711 (store_register): Call store_vsx_registers instead of
7712 store_vsx_register.
7713 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7714 new regno parameter.
7715 (store_ppc_registers): Call store_vsx_registers with -1 for the
7716 new regno parameter.
7717 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7718 (ppc_collect_vsxregset): Remove.
7719
7720 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7721
7722 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7723 offset fields.
7724 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7725 for vector register offset fields.
7726 (ppc64_fbsd_reg_offsets): Likewise.
7727 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7728 to vector register offset fields.
7729 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7730 to vector register offset fields.
7731 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7732 vector register offset fields.
7733 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7734 initializers for vector register offset fields.
7735 (rs6000_aix64_reg_offsets): Likewise.
7736 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7737 (ppc_supply_vrregset): Remove.
7738 (ppc_collect_vrregset): Remove.
7739 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7740 (ppc_linux_vrregset) : New function.
7741 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7742 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7743 (ppc32_linux_vrregset): Remove.
7744 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7745 and use result instead of ppc32_linux_vrregset.
7746 (ppc32_linux_reg_offsets): Remove initializers for vector register
7747 offset fields.
7748 (ppc64_linux_reg_offsets): Likewise.
7749 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7750 * ppc-linux-nat.c: Include regset.h.
7751 (gdb_vrregset_t): Adjust comment to account for little-endian
7752 mode.
7753 (supply_vrregset, fill_vrregset): Remove.
7754 (fetch_altivec_register, store_altivec_register): Remove.
7755 (fetch_altivec_registers): Add regno parameter. Get regset using
7756 ppc_linux_vrregset. Use regset to supply registers.
7757 (store_altivec_registers): Add regno parameter. Get regset using
7758 ppc_linux_vrregset. Use regset to collect registers.
7759 (fetch_register): Call fetch_altivec_registers instead of
7760 fetch_altivec_register.
7761 (store_register): Call store_altivec_registers instead of
7762 store_altivec_register.
7763 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7764 the new regno parameter.
7765 (store_ppc_registers): Call store_altivec_registers with -1 for
7766 the new regno parameter.
7767
7768 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7769
7770 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7771 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7772 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7773 (gdb_vrregset_t): Change array type size to
7774 PPC_LINUX_SIZEOF_VRREGSET.
7775 (gdb_vsxregset_t): Change array type size to
7776 PPC_LINUX_SIZEOF_VSXREGSET.
7777 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7778 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7779 PPC_LINUX_SIZEOF_VSXREGSET.
7780
7781 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7782
7783 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7784 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7785 nat/ppc-linux.c.
7786 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7787 ppc_linux_target_wordsize with tid.
7788 (ppc_linux_nat_target::read_description): Call ppc_linux_target
7789 wordsize with tid.
7790 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7791 (ppc64_64bit_inferior_p): Add static and inline specifiers.
7792 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7793 tid parameter. Remove static specifier.
7794 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7795 (ppc_linux_target_wordsize): New declaration.
7796
7797 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7798
7799 * arch/ppc-linux-common.c: New file.
7800 * arch/ppc-linux-common.h: New file.
7801 * arch/ppc-linux-tdesc.h: New file.
7802 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7803 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7804 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7805 arch/ppc-linux-tdesc.h.
7806 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7807 arch/ppc-linux-tdesc.h.
7808 (ppc_linux_nat_target::read_description): Remove target
7809 description matching code. Fill a ppc_linux_features struct and
7810 call ppc_linux_match_description with it. Move comment about ISA
7811 2.05 to ppc-linux-common.c.
7812 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7813 arch/ppc-linux-tdesc.h.
7814 (ppc_linux_core_read_description): Remove target description
7815 matching code. Fill a ppc_linux_features struct and call
7816 ppc_linux_match_description with it.
7817 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7818 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7819 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7820 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7821 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7822 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7823 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7824 (tdesc_powerpc_e500l): Remove.
7825
7826 2018-05-22 Joel Brobecker <brobecker@adacore.com>
7827
7828 * ada-lang.c (catch_assert_command): Pass empty string instead
7829 of NULL for excep_string argument.
7830
7831 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7832
7833 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7834 the width of the requested register exceeds the width of the
7835 `ptrace' data type.
7836
7837 2018-05-21 Tom Tromey <tom@tromey.com>
7838
7839 * printcmd.c (output_command): Remove.
7840 (output_command_const): Rename to output_command.
7841 * valprint.h (output_command): Rename from output_command_const.
7842 * tracepoint.c (trace_dump_actions): Call output_command.
7843
7844 2018-05-21 Tom Tromey <tom@tromey.com>
7845
7846 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7847 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7848 * ada-lang.h (create_ada_exception_catchpoint): Update.
7849 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7850 std::string.
7851 (create_excep_cond_exprs, ~ada_catchpoint)
7852 (should_stop_exception, print_one_exception)
7853 (print_mention_exception, print_recreate_exception): Update.
7854 (ada_get_next_arg): Remove.
7855 (catch_ada_exception_command_split): Use std::string. Change type
7856 of "excep_string", "cond_string".
7857 (catch_ada_exception_command): Update.
7858 (create_ada_exception_catchpoint): Change type of excep_string.
7859 (ada_exception_sal): Remove excep_string parameter.
7860 (~ada_catchpoint): Remove.
7861
7862 2018-05-21 Tom Tromey <tom@tromey.com>
7863
7864 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7865 cleanup.
7866
7867 2018-05-21 Tom Tromey <tom@tromey.com>
7868
7869 * ada-lang.c (ada_exception_message_1, ada_exception_message):
7870 Return unique_xmalloc_ptr.
7871 (print_it_exception): Update.
7872
7873 2018-05-21 Tom Tromey <tom@tromey.com>
7874
7875 * tracepoint.c (trace_dump_actions): Use std::string.
7876
7877 2018-05-21 Tom Tromey <tom@tromey.com>
7878
7879 * symfile.c (reread_symbols): Use std::string for original_name.
7880
7881 2018-05-21 Tom Tromey <tom@tromey.com>
7882
7883 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7884 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
7885 constructor.
7886
7887 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
7888
7889 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7890 instance to...
7891 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7892 * objfiles.c (get_objfile_bfd_data): Allocate
7893 objfile_per_bfd_storage with obstack_new when allocating on
7894 obstack.
7895
7896 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7897
7898 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7899 OBSTACK_ZALLOC.
7900 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7901 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7902 * mdebugread.c (mdebug_build_psymtabs): Likewise.
7903 (add_pending): Likewise.
7904 (parse_symbol): Likewise.
7905 (parse_partial_symbols): Likewise.
7906 (psymtab_to_symtab_1): Likewise.
7907 (new_psymtab): Likewise.
7908 (elfmdebug_build_psymtabs): Likewise.
7909 * minsyms.c (terminate_minimal_symbol_table): Likewise.
7910 * objfiles.c (get_objfile_bfd_data): Likewise.
7911 (objfile_register_static_link): Likewise.
7912 * psymtab.c (allocate_psymtab): Likewise.
7913 * stabsread.c (read_member_functions): Likewise.
7914 * xcoffread.c (xcoff_end_psymtab): Likewise.
7915
7916 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
7917
7918 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7919 compiler supports std::is_trivially_constructible.
7920 * common/poison.h: Include obstack.h.
7921 (IsMallocable): Define to is_trivially_constructible if the
7922 compiler supports it, define to true_type otherwise.
7923 (xobnew): New.
7924 (XOBNEW): Redefine.
7925 (xobnewvec): New.
7926 (XOBNEWVEC): Redefine.
7927 * gdb_obstack.h (obstack_zalloc): New.
7928 (OBSTACK_ZALLOC): Redefine.
7929 (obstack_calloc): New.
7930 (OBSTACK_CALLOC): Redefine.
7931 (obstack_new): New.
7932 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7933 (gdbarch_obstack): New declaration in gdbarch.h, definition in
7934 gdbarch.c.
7935 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7936 obstack_calloc/obstack_zalloc.
7937 (gdbarch_obstack_zalloc): Remove.
7938 * target-descriptions.c (tdesc_data_init): Use obstack_new.
7939
7940 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7941
7942 * stack.c (backtrace_command_1): Remove useless variable int i.
7943
7944 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7945
7946 * stack.c (print_frame_info): Fix comment.
7947
7948 2018-05-18 Tom Tromey <tom@tromey.com>
7949
7950 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7951 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7952 (~dwarf2_per_objfile): Update
7953 (dwarf2_get_dwz_file): Use new.
7954 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7955 unique_ptr.
7956
7957 2018-05-18 Tom Tromey <tom@tromey.com>
7958
7959 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7960 unique_ptr.
7961 * dwarf2read.c (struct dwp_file): Add constructor and
7962 initializers.
7963 (open_and_init_dwp_file): Return a unique_ptr.
7964 (dwarf2_per_objfile, create_dwp_hash_table)
7965 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7966 (lookup_dwo_unit_in_dwp): Update.
7967 (open_and_init_dwp_file, get_dwp_file): Update.
7968
7969 2018-05-18 Tom Tromey <tom@tromey.com>
7970
7971 * dwarf2read.c (dwarf2_per_objfile): Update.
7972 (struct mapped_index): Add initializers.
7973 (dwarf2_read_index): Use new.
7974 (dw2_symtab_iter_init): Update.
7975 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7976 unique_ptr.
7977
7978 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7979
7980 * dwarf2read.c (mapped_index) <total_size>: Remove.
7981
7982 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
7983
7984 * unittests/format_pieces-selftests.c (test_format_specifier):
7985 Add ARI comments.
7986
7987 2018-05-18 Tom Tromey <tom@tromey.com>
7988
7989 * c-typeprint.c (maybe_print_hole): New function.
7990 (c_print_type_struct_field_offset): Update.
7991 (c_type_print_base_struct_union): Call maybe_print_hole.
7992
7993 2018-05-17 Keith Seitz <keiths@redhat.com>
7994
7995 * breakpoint.c (build_bpstat_chain): New function, moved from
7996 bpstat_stop_status.
7997 (bpstat_stop_status): Add optional parameter, `stop_chain'.
7998 If no stop chain is passed, call build_bpstat_chain to build it.
7999 * breakpoint.h (build_bpstat_chain): Declare.
8000 (bpstat_stop_status): Move documentation here from breakpoint.c.
8001 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8002 build the stop chain and pass it to skip_inline_frames.
8003 Pass this stop chain to bpstat_stop_status.
8004 * inline-frame.c: Include breakpoint.h.
8005 (stopped_by_user_bp_inline_frame): New function.
8006 (skip_inline_frames): Add parameter `stop_chain'.
8007 Move documention to inline-frame.h.
8008 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8009 whether the frame should be elided.
8010 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8011 Add moved documentation and update for new parameter.
8012
8013 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8014
8015 PR cli/14975
8016 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8017 unittests/format_pieces-selftests.c.
8018 * common/format.h (format_piece) <operator==>: New.
8019 (format_pieces) <operator[]>: Remove.
8020 * common/format.c (format_pieces::format_pieces): Handle \e.
8021 * unittests/format_pieces-selftests.c: New.
8022
8023 2018-05-17 Tom Tromey <tom@tromey.com>
8024
8025 PR symtab/23010:
8026 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8027 (dw2_instantiate_symtab): Add skip_partial parameter.
8028 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8029 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8030 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8031 (dw2_expand_symtabs_matching_one)
8032 (dw2_find_pc_sect_compunit_symtab)
8033 (dw2_debug_names_lookup_symbol)
8034 (dw2_debug_names_expand_symtabs_for_function): Update.
8035 (init_cutu_and_read_dies): Add skip_partial parameter.
8036 (process_psymtab_comp_unit, build_type_psymtabs_1)
8037 (process_skeletonless_type_unit, load_partial_comp_unit)
8038 (psymtab_to_symtab_1): Update.
8039 (load_full_comp_unit): Add skip_partial parameter.
8040 (process_imported_unit_die, dwarf2_read_addr_index)
8041 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8042 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8043 (read_signatured_type): Update.
8044
8045 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8046
8047 * value.c (release_value): Remove unused variable.
8048 (record_latest_value): Likewise.
8049 (access_value_history): Likewise.
8050 (preserve_values): Likewise.
8051
8052 2018-05-17 Tom Tromey <tom@tromey.com>
8053
8054 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8055 Initialize.
8056
8057 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8058
8059 PR gdb/22286
8060 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8061 Also handle registers whose width is not a multiple of
8062 PTRACE_TYPE_RET.
8063 (linux_nat_trad_target::store_register): Likewise.
8064
8065 2018-05-16 Tom Tromey <tom@tromey.com>
8066
8067 * gdbcore.h (core_bfd): Redefine.
8068 * corelow.c (core_target::close): Update.
8069 (core_target_open): Update.
8070 * progspace.h (struct program_space) <cbfd>: Now a
8071 gdb_bfd_ref_ptr.
8072
8073 2018-05-16 Tom Tromey <tom@tromey.com>
8074
8075 PR cli/19551:
8076 * symfile-add-flags.h (enum symfile_add_flags)
8077 <SYMFILE_NOT_FILENAME>: New constant.
8078 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8079 objfile name from BFD.
8080 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8081 * minidebug.c (find_separate_debug_file_in_section): Put
8082 ".gnu_debugdata" into BFD's file name.
8083
8084 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8085
8086 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8087 Remove.
8088
8089 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8090
8091 PR binutils/21446
8092 * aarch64-tdep.c (aarch64_analyze_prologue,
8093 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8094 Indicate not interested in errors.
8095
8096 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8097
8098 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8099 Supply the MIPS_ZERO_REGNUM register.
8100
8101 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8102
8103 * mips-tdep.c (mask_address_var): Make variable static.
8104
8105 2018-05-14 Tom Tromey <tom@tromey.com>
8106
8107 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8108
8109 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8110
8111 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8112 FXSAVE_ADDR for the mxcsr register.
8113
8114 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8115
8116 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8117
8118 2018-05-11 Pedro Alves <palves@redhat.com>
8119
8120 * corelow.c (core_target) <core_target>: No longer inline.
8121 Initialize m_core_gdbarch, m_core_vec and build the section table
8122 here.
8123 <~core_target>: New.
8124 <core_gdbarch, get_core_register_section>: New methods.
8125 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8126 factored out from ...
8127 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8128 (core_ops): Delete.
8129 (sniff_core_bfd): Add gdbarch parameter.
8130 (core_close): Delete, merged into ...
8131 (core_target::close): ... here. Delete self.
8132 (core_close_cleanup): Delete.
8133 (core_target_open): Allocate a core_target on the heap. Use a
8134 unique_ptr instead of a cleanup. Bits moved into the core_target
8135 ctor. Adjust to use core_target methods instead of globals.
8136 (get_core_register_section): Rename to ...
8137 (core_target::get_core_register_section): ... this and adjust.
8138 (struct get_core_registers_cb_data): New.
8139 (get_core_registers_cb): Use it. Use bool.
8140 (core_target::fetch_registers, core_target::files_info)
8141 (core_target::xfer_partial, core_target::read_description)
8142 (core_target::pid_to, core_target::thread_name): Adjust to
8143 reference class fields instead of globals.
8144 * target.h (struct target_ops_deleter, target_ops_up): New.
8145
8146 2018-05-11 Pedro Alves <palves@redhat.com>
8147
8148 * corefile.c (core_file_command): Move to corelow.c.
8149 * corelow.c (the_core_target): Delete.
8150 (core_file_command): Moved from corefile.c. Check exec_bfd
8151 instead of the_core_target. Use target_detach instead of calling
8152 into the_core_target directly.
8153 (maybe_say_no_core_file_now): New.
8154 (core_target::detach): Use it.
8155 (_initialize_corelow): Remove references to the_core_target.
8156 * gdbcore.h (the_core_target): Delete.
8157
8158 2018-05-11 Tom Tromey <tromey@redhat.com>
8159 Pedro Alves <palves@redhat.com>
8160
8161 * corefile.c (core_bfd): Remove.
8162 * gdbcore.h (core_bfd): Now a macro.
8163 * progspace.h (struct program_space) <cbfd>: New field.
8164
8165 2018-05-11 Tom Tromey <tom@tromey.com>
8166
8167 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8168 gdb::def_vector.
8169
8170 2018-05-10 Tom Tromey <tom@tromey.com>
8171
8172 * configure: Rebuild.
8173 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8174
8175 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8176
8177 PR server/23158:
8178 * regformats/regdat.sh: Adjust script, following the addition
8179 of the new expedite_regs parameter to init_target_desc.
8180
8181 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8182
8183 PR gdb/23127
8184 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8185 set_gdbarch_significant_addr_bit.
8186 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8187 set_gdbarch_significant_addr_bit.
8188 * utils.c (address_significant): Update to sign extend addr.
8189
8190 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8191
8192 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8193 (xtensa_linux_init_abi): Limit tdep->num_regs by
8194 tdep->num_nopriv_regs.
8195 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8196 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8197 not initialized.
8198
8199 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8200
8201 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8202
8203 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8204
8205 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8206 (I387_MXCSR_INIT_VAL): New constant.
8207 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8208 buffer if it was supplied by the inferior.
8209 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8210 (i387_xsave_get_clear_bv): New function.
8211 (i387_supply_xsave): Only read x87 control registers from the
8212 xsave buffer if the feature is enabled, and the state will have
8213 been written, otherwise, provide a suitable default.
8214 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8215 including x87 control registers. Update control registers if they
8216 have changed from the default value, and mark features as enabled
8217 as required.
8218 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8219
8220 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8221
8222 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8223
8224 2018-05-07 Tom Tromey <tom@tromey.com>
8225
8226 * configure: Rebuild.
8227 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8228
8229 2018-05-07 Tom Tromey <tom@tromey.com>
8230
8231 PR tdep/20362:
8232 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8233 bit. Use correct value for VDIV.
8234
8235 2018-05-04 Tom Tromey <tom@tromey.com>
8236
8237 * configure: Rebuild.
8238 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8239
8240 2018-05-04 Tom Tromey <tom@tromey.com>
8241
8242 * linux-record.c (record_linux_system_call) <case
8243 RECORD_SYS_RECVFROM>: Add "break".
8244
8245 2018-05-04 Tom Tromey <tom@tromey.com>
8246
8247 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8248 Add missing "break".
8249 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8250 Add missing "break".
8251
8252 2018-05-04 Tom Tromey <tom@tromey.com>
8253
8254 * rs6000-tdep.c (ppc_process_record_op4)
8255 (ppc_process_record_op63): Add fall-through comment.
8256
8257 2018-05-04 Tom Tromey <tom@tromey.com>
8258
8259 * i386-tdep.c (i386_process_record): Add fall-through comment.
8260
8261 2018-05-04 Tom Tromey <tom@tromey.com>
8262
8263 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8264 comment.
8265
8266 2018-05-04 Tom Tromey <tom@tromey.com>
8267
8268 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8269 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8270 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8271 comment.
8272 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8273 comment.
8274 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8275 comment.
8276
8277 2018-05-04 Tom Tromey <tom@tromey.com>
8278
8279 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8280
8281 2018-05-04 Tom Tromey <tom@tromey.com>
8282
8283 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8284 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8285 * symfile.c (section_is_mapped): Fix fall-through comment.
8286 * stabsread.c (define_symbol, read_member_functions): Fix
8287 fall-through comment.
8288 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8289 comment.
8290 * remote.c (remote_wait_as): Fix fall-through comment.
8291 * p-exp.y (yylex): Fix fall-through comment.
8292 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8293 comment.
8294 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8295 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8296 * jv-exp.y (yylex): Fix fall-through comment.
8297 * go-exp.y (lex_one_token): Fix fall-through comment.
8298 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8299 fall-through comment.
8300 * f-exp.y (yylex): Fix fall-through comment.
8301 * dwarf2read.c (process_die): Fix fall-through comments.
8302 * dbxread.c (process_one_symbol): Fix fall-through comment.
8303 * d-exp.y (lex_one_token): Fix fall-through comment.
8304 * cp-name-parser.y (yylex): Fix fall-through comment.
8305 * coffread.c (coff_symtab_read): Fix fall-through comment.
8306 * c-exp.y (lex_one_token): Fix fall-through comment.
8307 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8308 comment.
8309 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8310 comment.
8311
8312 2018-05-04 Tom Tromey <tom@tromey.com>
8313
8314 PR python/22730:
8315 * NEWS: Mention gdb.execute change.
8316 * gdbcmd.h (execute_control_command): Don't declare.
8317 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8318 execute_control_commands, execute_control_commands_to_string.
8319 * cli/cli-script.h (execute_control_commands)
8320 (execute_control_commands_to_string): Declare.
8321 (execute_control_command): Add from_tty parameter.
8322 * cli/cli-script.c (execute_control_commands)
8323 (execute_control_commands_to_string): New functions.
8324 (execute_user_command): Use execute_control_commands.
8325 (execute_control_command_1): Add "from_tty" parameter. Update.
8326 (execute_control_command): Likewise.
8327
8328 2018-05-04 Tom Tromey <tom@tromey.com>
8329
8330 PR python/22731:
8331 * NEWS: Mention that breakpoint commands are writable.
8332 * python/py-breakpoint.c (bppy_set_commands): New function.
8333 (breakpoint_object_getset) <"commands">: Use it.
8334
8335 2018-05-04 Tom Tromey <tom@tromey.com>
8336
8337 * tracepoint.c (actions_command): Update.
8338 * mi/mi-cmd-break.c (mi_command_line_array)
8339 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8340 (mi_read_next_line): Remove.
8341 (mi_cmd_break_commands): Update.
8342 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8343 function_view.
8344 * cli/cli-script.c (get_command_line): Update.
8345 (process_next_line): Use function_view. Constify.
8346 (recurse_read_control_structure, read_command_lines)
8347 (read_command_lines_1): Change argument types to function_view.
8348 (do_define_command, document_command): Update.
8349 * breakpoint.h (check_tracepoint_command): Don't declare.
8350 * breakpoint.c (check_tracepoint_command): Remove.
8351 (commands_command_1, create_tracepoint_from_upload): Update.
8352
8353 2018-05-04 Tom Tromey <tom@tromey.com>
8354
8355 PR gdb/11750:
8356 * cli/cli-script.h (enum command_control_type) <define_control>:
8357 New constant.
8358 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8359 (build_command_line, execute_control_command_1)
8360 (process_next_line): Likewise.
8361 (do_define_command): New function, extracted from define_command.
8362 (define_command): Use it.
8363
8364 2018-05-04 Tom Tromey <tom@tromey.com>
8365
8366 * tracepoint.c (actions_command): Update.
8367 * cli/cli-script.h (read_command_lines): Update.
8368 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8369 (MAX_TMPBUF): Remove define.
8370 (define_command): Use string_printf.
8371 (document_command): Likewise.
8372 * breakpoint.c (commands_command_1): Update.
8373
8374 2018-05-04 Tom Tromey <tom@tromey.com>
8375
8376 * top.c (execute_command): Update.
8377 * cli/cli-script.h (print_command_lines): Now varargs.
8378 * cli/cli-script.c (print_command_lines): Now varargs.
8379 (execute_control_command_1) <case while_control, case if_control>:
8380 Update.
8381
8382 2018-05-04 Tom Tromey <tom@tromey.com>
8383
8384 * tracepoint.c (all_tracepoint_actions): Rename from
8385 all_tracepoint_actions_and_cleanup. Change return type.
8386 (actions_command, encode_actions_1, encode_actions)
8387 (trace_dump_actions, tdump_command): Update.
8388 * remote.c (remote_download_command_source): Update.
8389 * python/python.c (gdbpy_eval_from_control_command)
8390 (python_command, python_interactive_command): Update.
8391 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8392 * guile/guile.c (guile_command)
8393 (gdbscm_eval_from_control_command, guile_command): Update.
8394 * compile/compile.c (compile_code_command)
8395 (compile_print_command, compile_to_object): Update.
8396 * cli/cli-script.h (struct command_lines_deleter): New.
8397 (counted_command_line): New typedef.
8398 (struct command_line): Add constructor, destructor.
8399 <body_list>: Remove.
8400 <body_list_0, body_list_1>: New members.
8401 (command_line_up): Remove typedef.
8402 (read_command_lines, read_command_lines_1, get_command_line):
8403 Update.
8404 (copy_command_lines): Don't declare.
8405 * cli/cli-script.c (build_command_line): Use "new".
8406 (get_command_line): Return counted_command_line.
8407 (print_command_lines, execute_user_command)
8408 (execute_control_command_1, while_command, if_command): Update.
8409 (realloc_body_list): Remove.
8410 (process_next_line, recurse_read_control_structure): Update.
8411 (read_command_lines, read_command_lines_1): Return counted_command_line.
8412 (free_command_lines): Use "delete".
8413 (copy_command_lines): Remove.
8414 (define_command, document_command, show_user_1): Update.
8415 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8416 a counted_command_line.
8417 * breakpoint.h (counted_command_line): Remove typedef.
8418 (breakpoint_set_commands): Update.
8419 * breakpoint.c (check_no_tracepoint_commands)
8420 (validate_commands_for_breakpoint): Update.
8421 (breakpoint_set_commands): Change commands to be a
8422 counted_command_line.
8423 (commands_command_1, update_dprintf_command_list)
8424 (create_tracepoint_from_upload): Update.
8425
8426 2018-05-04 Tom Tromey <tom@tromey.com>
8427
8428 * cli/cli-decode.h (cmd_list_element): New constructor.
8429 (~cmd_list_element): New destructor.
8430 (struct cmd_list_element): Add initializers.
8431 * cli/cli-decode.c (do_add_cmd): Use "new".
8432 (delete_cmd): Use "delete".
8433
8434 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8435 Pedro Alves <palves@redhat.com>
8436
8437 PR breakpoints/19806 and support for PR external/20207.
8438 * NEWS: Mention Aarch64 watchpoint improvements.
8439 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8440 watchpoints and PR external/20207 watchpoints.
8441 * nat/aarch64-linux-hw-point.c
8442 (kernel_supports_any_contiguous_range): New.
8443 (aarch64_watchpoint_offset): New.
8444 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8445 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8446 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8447 (aarch64_align_watchpoint): New parameters aligned_offset_p and
8448 next_addr_orig_p. Support PR external/20207 watchpoints.
8449 (aarch64_downgrade_regs): New.
8450 (aarch64_dr_state_insert_one_point): New parameters offset and
8451 addr_orig.
8452 (aarch64_dr_state_remove_one_point): Likewise.
8453 (aarch64_handle_breakpoint): Update caller.
8454 (aarch64_handle_aligned_watchpoint): Likewise.
8455 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8456 aligned_offset.
8457 (aarch64_linux_set_debug_regs): Remove const from state. Call
8458 aarch64_downgrade_regs.
8459 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8460 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8461 (DR_CONTROL_MASK): ... this.
8462 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8463 (unsigned int aarch64_watchpoint_offset): New prototype.
8464 (aarch64_linux_set_debug_regs): Remove const from state.
8465 * utils.c (align_up, align_down): Move to ...
8466 * common/common-utils.c (align_up, align_down): ... here.
8467 * utils.h (align_up, align_down): Move to ...
8468 * common/common-utils.h (align_up, align_down): ... here.
8469
8470 2018-05-04 Joel Brobecker <brobecker@adacore.com>
8471
8472 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8473 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8474 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8475 Re-implement to match the ABI as summarized in GCC's
8476 gcc/config/sparc/sparc.c. All callers updated.
8477 (sparc32_store_arguments): Remove assertion.
8478
8479 2018-05-04 Tom Tromey <tom@tromey.com>
8480
8481 * printcmd.c: Don't include tui.h.
8482 (decode_format): Use skip_spaces.
8483
8484 2018-05-04 Tom Tromey <tom@tromey.com>
8485
8486 PR gdb/22619:
8487 * printcmd.c (last_count): New global.
8488 (x_command): Use saved count when repeating.
8489
8490 2018-05-04 Tom Tromey <tom@tromey.com>
8491
8492 * nto-procfs.c (do_closedir_cleanup): Remove.
8493 (procfs_pidlist): Use gdb_dir_up.
8494 * procfs.c (do_closedir_cleanup): Remove.
8495 (proc_update_threads): Use gdb_dir_up.
8496 * common/filestuff.h (struct gdb_dir_deleter): New.
8497 (gdb_dir_up): New typedef.
8498
8499 2018-05-04 Tom Tromey <tom@tromey.com>
8500
8501 * ada-lang.c (print_mention_exception): Use std::string.
8502
8503 2018-05-04 Tom Tromey <tom@tromey.com>
8504
8505 * ada-lang.c (create_excep_cond_exprs): Update.
8506 (ada_exception_catchpoint_cond_string): Use std::string.
8507
8508 2018-05-04 Tom Tromey <tom@tromey.com>
8509
8510 * ada-lang.c (xget_renaming_scope): Return std::string.
8511 (old_renaming_is_invisible): Update.
8512
8513 2018-05-04 Tom Tromey <tom@tromey.com>
8514
8515 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8516 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8517
8518 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
8519
8520 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8521
8522 2018-05-04 Tom Tromey <tom@tromey.com>
8523
8524 * remote.c (remote_query_supported_append): Change type.
8525 (remote_check_symbols): Update.
8526
8527 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
8528
8529 PR gdb/11420
8530 * configure.ac: Prepend libpython.
8531 * python/python-config.py: Likewise.
8532 * configure: Regenerate.
8533
8534 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
8535
8536 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8537
8538 2018-05-03 Pedro Alves <palves@redhat.com>
8539
8540 * s390-linux-nat.c
8541 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8542 override. Write 'true' instead of '1'.
8543 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8544 declaration.
8545
8546 2018-05-02 Pedro Alves <palves@redhat.com>
8547
8548 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8549 add_inf_child_target.
8550 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8551 add_inf_child_target.
8552 * aix-thread.c (aix_thread_target_info): New.
8553 (aix_thread_target) <shortname, longname, doc>: Delete.
8554 <info>: New.
8555 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8556 add_inf_child_target.
8557 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8558 add_inf_child_target.
8559 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8560 add_inf_child_target.
8561 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8562 add_inf_child_target.
8563 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8564 add_inf_child_target.
8565 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8566 add_inf_child_target.
8567 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8568 add_inf_child_target.
8569 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8570 add_inf_child_target.
8571 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8572 add_inf_child_target.
8573 * bfd-target.c (target_bfd_target_info): New.
8574 (target_bfd) <shortname, longname, doc>: Delete.
8575 <info>: New.
8576 * bsd-kvm.c (bsd_kvm_target_info): New.
8577 (bsd_kvm_target) <shortname, longname, doc>: Delete.
8578 <info>: New.
8579 (bsd_kvm_target::open): Rename to ...
8580 (bsd_kvm_target_open): ... this. Adjust.
8581 * bsd-uthread.c (bsd_uthread_target_info): New.
8582 (bsd_uthread_target) <shortname, longname, doc>: Delete.
8583 <info>: New.
8584 * corefile.c (core_file_command): Adjust.
8585 * corelow.c (core_target_info): New.
8586 (core_target) <shortname, longname, doc>: Delete.
8587 <info>: New.
8588 (core_target::open): Rename to ...
8589 (core_target_open): ... this. Adjust.
8590 * ctf.c (ctf_target_info): New.
8591 (ctf_target) <shortname, longname, doc>: Delete.
8592 <info>: New.
8593 (ctf_target::open): Rename to ...
8594 (ctf_target_open): ... this.
8595 (_initialize_ctf): Adjust.
8596 * exec.c (exec_target_info): New.
8597 (exec_target) <shortname, longname, doc>: Delete.
8598 <info>: New.
8599 (exec_target::open): Rename to ...
8600 (exec_target_open): ... this.
8601 * gdbcore.h (core_target_open): Declare.
8602 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8603 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8604 add_inf_child_target.
8605 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8606 add_inf_child_target.
8607 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8608 add_inf_child_target.
8609 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8610 add_inf_child_target.
8611 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8612 add_inf_child_target.
8613 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8614 add_inf_child_target.
8615 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8616 add_inf_child_target.
8617 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8618 add_inf_child_target.
8619 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8620 add_inf_child_target.
8621 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8622 add_inf_child_target.
8623 * inf-child.c (inf_child_target_info): New.
8624 (inf_child_target::info): New.
8625 (inf_child_open_target): Remove 'target' parameter. Use
8626 get_native_target instead.
8627 (inf_child_target::open): Delete.
8628 (add_inf_child_target): New.
8629 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8630 Delete.
8631 <info>: New.
8632 (add_inf_child_target): Declare.
8633 (inf_child_open_target): Declare.
8634 * linux-thread-db.c (thread_db_target_info): New.
8635 (thread_db_target) <shortname, longname, doc>: Delete.
8636 <info>: New.
8637 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8638 add_inf_child_target.
8639 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8640 add_inf_child_target.
8641 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8642 add_inf_child_target.
8643 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8644 add_inf_child_target.
8645 * make-target-delegates (print_class): Adjust.
8646 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8647 add_inf_child_target.
8648 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8649 add_inf_child_target.
8650 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8651 add_inf_child_target.
8652 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8653 add_inf_child_target.
8654 * nto-procfs.c (nto_native_target_info): New.
8655 (nto_procfs_target_native) <shortname, longname, doc>:
8656 Delete.
8657 <info>: New.
8658 (nto_procfs_target_info): New.
8659 (nto_procfs_target_procfs) <shortname, longname, doc>:
8660 Delete.
8661 <info>: New.
8662 (init_procfs_targets): Adjust.
8663 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8664 add_inf_child_target.
8665 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8666 add_inf_child_target.
8667 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8668 add_inf_child_target.
8669 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8670 add_inf_child_target.
8671 * ravenscar-thread.c (ravenscar_target_info): New.
8672 (ravenscar_thread_target) <shortname, longname, doc>:
8673 Delete.
8674 <info>: New.
8675 * record-btrace.c (record_btrace_target_info):
8676 (record_btrace_target) <shortname, longname, doc>: Delete.
8677 <info>: New.
8678 (record_btrace_target::open): Rename to ...
8679 (record_btrace_target_open): ... this. Adjust.
8680 * record-full.c (record_longname, record_doc): New.
8681 (record_full_base_target) <shortname, longname, doc>: Delete.
8682 <info>: New.
8683 (record_full_target_info): New.
8684 (record_full_target): <shortname>: Delete.
8685 <info>: New.
8686 (record_full_core_open_1, record_full_open_1): Update comments.
8687 (record_full_base_target::open): Rename to ...
8688 (record_full_open): ... this.
8689 (cmd_record_full_restore): Update.
8690 (_initialize_record_full): Update.
8691 * remote-sim.c (remote_sim_target_info): New.
8692 (gdbsim_target) <shortname, longname, doc>: Delete.
8693 <info>: New.
8694 (gdbsim_target::open): Rename to ...
8695 (gdbsim_target_open): ... this.
8696 (_initialize_remote_sim): Adjust.
8697 * remote.c (remote_doc): New.
8698 (remote_target_info): New.
8699 (remote_target) <shortname, longname, doc>: Delete.
8700 <info>: New.
8701 (extended_remote_target_info): New.
8702 (extended_remote_target) <shortname, longname, doc>: Delete.
8703 <info>: New.
8704 (remote_target::open_1): Make static. Adjust.
8705 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8706 * s390-linux-nat.c (_initialize_s390_nat): Use
8707 add_inf_child_target.
8708 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8709 add_inf_child_target.
8710 * sol-thread.c (thread_db_target_info): New.
8711 (sol_thread_target) <shortname, longname, doc>: Delete.
8712 <info>: New.
8713 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8714 add_inf_child_target.
8715 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8716 add_inf_child_target.
8717 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8718 add_inf_child_target.
8719 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8720 add_inf_child_target.
8721 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8722 add_inf_child_target.
8723 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8724 add_inf_child_target.
8725 * spu-linux-nat.c (_initialize_spu_nat): Use
8726 add_inf_child_target.
8727 * spu-multiarch.c (spu_multiarch_target_info): New.
8728 (spu_multiarch_target) <shortname, longname, doc>: Delete.
8729 <info>: New.
8730 * target-delegates.c: Regenerate.
8731 * target.c: Include <unordered_map>.
8732 (target_ops_p): Delete.
8733 (DEF_VEC_P(target_ops_p)): Delete.
8734 (target_factories): New.
8735 (test_target_info): New.
8736 (test_target_ops::info): New.
8737 (open_target): Adjust to use target_factories.
8738 (add_target_with_completer): Rename to ...
8739 (add_target): ... this. Change prototype. Register target_info
8740 and open callback in target_factories. Register target_info in
8741 command context instead of target_ops.
8742 (add_target): Delete old implementation.
8743 (add_deprecated_target_alias): Change prototype. Adjust.
8744 (the_native_target): New.
8745 (set_native_target, get_native_target): New.
8746 (find_default_run_target): Use the_native_target.
8747 (find_attach_target, find_run_target): Simplify.
8748 (target_ops::open): Delete.
8749 (dummy_target_info): New.
8750 (dummy_target::shortname, dummy_target::longname)
8751 (dummy_target::doc): Delete.
8752 (dummy_target::info): New.
8753 (debug_target::shortname, debug_target::longname)
8754 (debug_target::doc): Delete.
8755 (debug_target::info): New.
8756 * target.h (struct target_info): New.
8757 (target_ops::~target_ops): Add comment.
8758 (target_ops::info): New.
8759 (target_ops::shortname, target_ops::longname, target_ops::doc): No
8760 longer virtual. Implement in terms of target_info.
8761 (set_native_target, get_native_target): Declare.
8762 (target_open_ftype): New.
8763 (add_target, add_target_with_completer)
8764 (add_deprecated_target_alias): Change prototype.
8765 (test_target) <shortname, longname, doc>: Delete.
8766 <info>: New.
8767 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8768 add_inf_child_target.
8769 * tracefile-tfile.c (tfile_target_info): New.
8770 (tfile_target) <shortname, longname, doc>: Delete.
8771 <info>: New.
8772 (tfile_target::open): Rename to ...
8773 (tfile_target_open): ... this.
8774 (_initialize_tracefile_tfile): Adjust.
8775 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8776 add_inf_child_target.
8777 * windows-nat.c (_initialize_windows_nat): Use
8778 add_inf_child_target.
8779 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8780 add_inf_child_target.
8781
8782 2018-05-02 Pedro Alves <palves@redhat.com>
8783
8784 * linux-nat.h (linux_nat_target) <low_new_thread,
8785 low_delete_thread, low_new_fork, low_forget_process,
8786 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8787 New virtual methods.
8788 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8789 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8790 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8791 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8792 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8793 Delete.
8794 * linux-fork.c (delete_fork): Adjust to call low method.
8795 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8796 (linux_nat_new_fork, linux_nat_forget_process_hook)
8797 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8798 (linux_nat_status_is_event):
8799 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8800 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8801 to call low method.
8802 (sigtrap_is_event): Rename to ...
8803 (linux_nat_target::low_status_is_event): ... this.
8804 (linux_nat_set_status_is_event): Delete.
8805 (save_stop_reason, linux_nat_wait_1)
8806 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8807 low methods.
8808 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8809 (linux_nat_set_new_fork, linux_nat_set_forget_process)
8810 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8811 (linux_nat_set_prepare_to_resume): Delete.
8812 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8813 low virtual methods.
8814 * amd64-linux-nat.c: Likewise.
8815 * arm-linux-nat.c: Likewise.
8816 * i386-linux-nat.c: Likewise.
8817 * ia64-linux-nat.c: Likewise.
8818 * mips-linux-nat.c: Likewise.
8819 * ppc-linux-nat.c: Likewise.
8820 * s390-linux-nat.c: Likewise.
8821 * sparc64-linux-nat.c: Likewise.
8822 * x86-linux-nat.c: Likewise.
8823 * x86-linux-nat.h: Include "nat/x86-linux.h".
8824 (x86_linux_nat_target) <low_new_fork, low_forget_process,
8825 low_prepare_to_resume, low_new_thread, low_delete_thread>:
8826 Override methods.
8827
8828 2018-05-02 Pedro Alves <palves@redhat.com>
8829
8830 * target.h (target_ops)
8831 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8832 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8833 stopped_by_watchpoint, have_continuable_watchpoint,
8834 stopped_data_address, watchpoint_addr_within_range,
8835 can_accel_watchpoint_condition, can_run, thread_alive,
8836 has_all_memory, has_memory, has_stack, has_registers,
8837 has_execution, can_async_p, is_async_p, supports_non_stop,
8838 always_non_stop_p, can_execute_reverse, supports_multi_process,
8839 supports_enable_disable_tracepoint,
8840 supports_disable_randomization, supports_string_tracing,
8841 supports_evaluation_of_breakpoint_conditions,
8842 can_run_breakpoint_commands, filesystem_is_local,
8843 can_download_tracepoint, get_trace_state_variable_value,
8844 set_trace_notes, get_tib_address, use_agent, can_use_agent,
8845 record_is_replaying, record_will_replay,
8846 augmented_libraries_svr4_read>: Adjust to return bool.
8847 * aarch64-linux-nat.c: All implementations adjusted.
8848 * aix-thread.c: All implementations adjusted.
8849 * arm-linux-nat.c: All implementations adjusted.
8850 * breakpoint.c: All implementations adjusted.
8851 * bsd-kvm.c: All implementations adjusted.
8852 * bsd-uthread.c: All implementations adjusted.
8853 * corelow.c: All implementations adjusted.
8854 * ctf.c: All implementations adjusted.
8855 * darwin-nat.c: All implementations adjusted.
8856 * darwin-nat.h: All implementations adjusted.
8857 * exec.c: All implementations adjusted.
8858 * fbsd-nat.c: All implementations adjusted.
8859 * fbsd-nat.h: All implementations adjusted.
8860 * gnu-nat.c: All implementations adjusted.
8861 * gnu-nat.h: All implementations adjusted.
8862 * go32-nat.c: All implementations adjusted.
8863 * ia64-linux-nat.c: All implementations adjusted.
8864 * inf-child.c: All implementations adjusted.
8865 * inf-child.h: All implementations adjusted.
8866 * inf-ptrace.c: All implementations adjusted.
8867 * inf-ptrace.h: All implementations adjusted.
8868 * linux-nat.c: All implementations adjusted.
8869 * linux-nat.h: All implementations adjusted.
8870 * mips-linux-nat.c: All implementations adjusted.
8871 * nto-procfs.c: All implementations adjusted.
8872 * ppc-linux-nat.c: All implementations adjusted.
8873 * procfs.c: All implementations adjusted.
8874 * ravenscar-thread.c: All implementations adjusted.
8875 * record-btrace.c: All implementations adjusted.
8876 * record-full.c: All implementations adjusted.
8877 * remote-sim.c: All implementations adjusted.
8878 * remote.c: All implementations adjusted.
8879 * s390-linux-nat.c: All implementations adjusted.
8880 * sol-thread.c: All implementations adjusted.
8881 * spu-multiarch.c: All implementations adjusted.
8882 * target-delegates.c: All implementations adjusted.
8883 * target.c: All implementations adjusted.
8884 * target.h: All implementations adjusted.
8885 * tracefile-tfile.c: All implementations adjusted.
8886 * tracefile.c: All implementations adjusted.
8887 * tracefile.h: All implementations adjusted.
8888 * windows-nat.c: All implementations adjusted.
8889 * x86-linux-nat.h: All implementations adjusted.
8890 * x86-nat.h: All implementations adjusted.
8891
8892 2018-05-02 Pedro Alves <palves@redhat.com>
8893
8894 * make-target-delegates (scan_target_h): Don't trim lines here.
8895 Replace sequences of tabs and/or whitespace with a single
8896 whitespace.
8897 (top level, parsing methods): Trim each line before processing it
8898 here.
8899
8900 2018-05-02 Pedro Alves <palves@redhat.com>
8901 John Baldwin <jhb@freebsd.org>
8902
8903 * target.h (enum strata) <debug_stratum>: New.
8904 (struct target_ops) <all delegation methods>: Replace by C++
8905 virtual methods, and drop "to_" prefix. All references updated
8906 throughout.
8907 <to_shortname, to_longname, to_doc, to_data,
8908 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8909 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8910 virtual methods. All references updated throughout.
8911 <can_attach, supports_terminal_ours, can_create_inferior,
8912 get_thread_control_capabilities, attach_no_wait>: New
8913 virtual methods.
8914 <insert_breakpoint, remove_breakpoint>: Now
8915 TARGET_DEFAULT_NORETURN methods.
8916 <info_proc>: Now returns bool.
8917 <to_magic>: Delete.
8918 (OPS_MAGIC): Delete.
8919 (current_target): Delete. All references replaced by references
8920 to ...
8921 (target_stack): ... this. New.
8922 (target_shortname, target_longname): Adjust.
8923 (target_can_run): Now a function declaration.
8924 (default_child_has_all_memory, default_child_has_memory)
8925 (default_child_has_stack, default_child_has_registers)
8926 (default_child_has_execution): Remove target_ops parameter.
8927 (complete_target_initialization): Delete.
8928 (memory_breakpoint_target): New template class.
8929 (test_target_ops): Refactor as a C++ class with virtual methods.
8930 * make-target-delegates (NAME_PART): Tighten.
8931 (POINTER_PART, CP_SYMBOL): New.
8932 (SIMPLE_RETURN_PART): Reimplement.
8933 (VEC_RETURN_PART): Expect less.
8934 (RETURN_PART, VIRTUAL_PART): New.
8935 (METHOD): Adjust to C++ virtual methods.
8936 (scan_target_h): Remove reference to C99.
8937 (dname): Output "target_ops::" prefix.
8938 (write_function_header): Adjust to output a C++ class method.
8939 (write_declaration): New.
8940 (write_delegator): Adjust to output a C++ class method.
8941 (tdname): Output "dummy_target::" prefix.
8942 (write_tdefault, write_debugmethod): Adjust to output a C++ class
8943 method.
8944 (tdefault_names, debug_names): Delete.
8945 (return_types, tdefaults, styles, argtypes_array): New.
8946 (top level): All methods are delegators.
8947 (print_class): New.
8948 (top level): Print dummy_target and debug_target classes.
8949 * target-delegates.c: Regenerate.
8950 * target-debug.h (target_debug_print_enum_info_proc_what)
8951 (target_debug_print_thread_control_capabilities)
8952 (target_debug_print_thread_info_p): New.
8953 * target.c (dummy_target): Delete.
8954 (the_dummy_target, the_debug_target): New.
8955 (target_stack): Now extern.
8956 (set_targetdebug): Push/unpush debug target.
8957 (default_child_has_all_memory, default_child_has_memory)
8958 (default_child_has_stack, default_child_has_registers)
8959 (default_child_has_execution): Remove target_ops parameter.
8960 (complete_target_initialization): Delete.
8961 (add_target_with_completer): No longer call
8962 complete_target_initialization.
8963 (target_supports_terminal_ours): Use regular delegation.
8964 (update_current_target): Delete.
8965 (push_target): No longer check magic number. Don't call
8966 update_current_target.
8967 (unpush_target): Don't call update_current_target.
8968 (target_is_pushed): No longer check magic number.
8969 (target_require_runnable): Skip for all stratums over
8970 process_stratum.
8971 (target_ops::info_proc): New.
8972 (target_info_proc): Use find_target_at and
8973 find_default_run_target.
8974 (target_supports_disable_randomization): Use regular delegation.
8975 (target_get_osdata): Use find_target_at.
8976 (target_ops::open, target_ops::close, target_ops::can_attach)
8977 (target_ops::attach, target_ops::can_create_inferior)
8978 (target_ops::create_inferior, target_ops::can_run)
8979 (target_can_run): New.
8980 (default_fileio_target): Use regular delegation.
8981 (target_ops::fileio_open, target_ops::fileio_pwrite)
8982 (target_ops::fileio_pread, target_ops::fileio_fstat)
8983 (target_ops::fileio_close, target_ops::fileio_unlink)
8984 (target_ops::fileio_readlink): New.
8985 (target_fileio_open_1, target_fileio_unlink)
8986 (target_fileio_readlink): Always call the target method. Handle
8987 FILEIO_ENOSYS.
8988 (return_zero, return_zero_has_execution): Delete.
8989 (init_dummy_target): Delete.
8990 (dummy_target::dummy_target, dummy_target::shortname)
8991 (dummy_target::longname, dummy_target::doc)
8992 (debug_target::debug_target, debug_target::shortname)
8993 (debug_target::longname, debug_target::doc): New.
8994 (target_supports_delete_record): Use regular delegation.
8995 (setup_target_debug): Delete.
8996 (maintenance_print_target_stack): Skip debug_stratum.
8997 (initialize_targets): Instantiate the_dummy_target and
8998 the_debug_target.
8999 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9000 use target_stack.
9001 (target_auxv_search, fprint_target_auxv): Adjust.
9002 (info_auxv_command): Adjust to use target_stack.
9003 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9004 * exceptions.c (print_flush): Handle a NULL target_stack.
9005 * regcache.c (target_ops_no_register): Refactor as class with
9006 virtual methods.
9007
9008 * exec.c (exec_target): New class.
9009 (exec_ops): Now an exec_target.
9010 (exec_open, exec_close_1, exec_get_section_table)
9011 (exec_xfer_partial, exec_files_info, exec_has_memory)
9012 (exec_make_note_section): Refactor as exec_target methods.
9013 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9014 Delete.
9015 (exec_target::find_memory_regions): New.
9016 (_initialize_exec): Don't call init_exec_ops.
9017 * gdbcore.h (exec_file_clear): Delete.
9018
9019 * corefile.c (core_target): Delete.
9020 (core_file_command): Adjust.
9021 * corelow.c (core_target): New class.
9022 (the_core_target): New.
9023 (core_close): Remove target_ops parameter.
9024 (core_close_cleanup): Adjust.
9025 (core_target::close): New.
9026 (core_open, core_detach, get_core_registers, core_files_info)
9027 (core_xfer_partial, core_thread_alive, core_read_description)
9028 (core_pid_to_str, core_thread_name, core_has_memory)
9029 (core_has_stack, core_has_registers, core_info_proc): Rework as
9030 core_target methods.
9031 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9032 (_initialize_corelow): Initialize the_core_target.
9033 * gdbcore.h (core_target): Delete.
9034 (the_core_target): New.
9035
9036 * ctf.c: (ctf_target): New class.
9037 (ctf_ops): Now a ctf_target.
9038 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9039 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9040 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9041 methods.
9042 (init_ctf_ops): Delete.
9043 (_initialize_ctf): Don't call it.
9044 * tracefile-tfile.c (tfile_target): New class.
9045 (tfile_ops): Now a tfile_target.
9046 (tfile_open, tfile_close, tfile_files_info)
9047 (tfile_get_tracepoint_status, tfile_trace_find)
9048 (tfile_fetch_registers, tfile_xfer_partial)
9049 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9050 Refactor as tfile_target methods.
9051 (tfile_xfer_partial_features): Remove target_ops parameter.
9052 (init_tfile_ops): Delete.
9053 (_initialize_tracefile_tfile): Don't call it.
9054 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9055 (tracefile_has_stack, tracefile_has_registers)
9056 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9057 tracefile_target methods.
9058 (init_tracefile_ops): Delete.
9059 (tracefile_target::tracefile_target): New.
9060 * tracefile.h: Include "target.h".
9061 (tracefile_target): New class.
9062 (init_tracefile_ops): Delete.
9063
9064 * spu-multiarch.c (spu_multiarch_target): New class.
9065 (spu_ops): Now a spu_multiarch_target.
9066 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9067 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9068 (spu_search_memory, spu_mourn_inferior): Refactor as
9069 spu_multiarch_target methods.
9070 (init_spu_ops): Delete.
9071 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9072 complete_target_initialization.
9073
9074 * ravenscar-thread.c (ravenscar_thread_target): New class.
9075 (ravenscar_ops): Now a ravenscar_thread_target.
9076 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9077 (ravenscar_thread_alive, ravenscar_pid_to_str)
9078 (ravenscar_fetch_registers, ravenscar_store_registers)
9079 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9080 (ravenscar_stopped_by_hw_breakpoint)
9081 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9082 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9083 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9084 methods.
9085 (init_ravenscar_thread_ops): Delete.
9086 (_initialize_ravenscar): Remove references to
9087 init_ravenscar_thread_ops and complete_target_initialization.
9088
9089 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9090 (bsd_uthread_target): New class.
9091 (bsd_uthread_ops): Now a bsd_uthread_target.
9092 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9093 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9094 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9095 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9096 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9097 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9098 (bsd_uthread_target): Delete function.
9099 (_initialize_bsd_uthread): Remove reference to
9100 complete_target_initialization.
9101
9102 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9103 (target_bfd): ... this new class.
9104 (target_bfd_xfer_partial, target_bfd_get_section_table)
9105 (target_bfd_close): Refactor as target_bfd methods.
9106 (target_bfd::~target_bfd): New.
9107 (target_bfd_reopen): Adjust.
9108 (target_bfd::close): New.
9109
9110 * record-btrace.c (record_btrace_target): New class.
9111 (record_btrace_ops): Now a record_btrace_target.
9112 (record_btrace_open, record_btrace_stop_recording)
9113 (record_btrace_disconnect, record_btrace_close)
9114 (record_btrace_async, record_btrace_info)
9115 (record_btrace_insn_history, record_btrace_insn_history_range)
9116 (record_btrace_insn_history_from, record_btrace_call_history)
9117 (record_btrace_call_history_range)
9118 (record_btrace_call_history_from, record_btrace_record_method)
9119 (record_btrace_is_replaying, record_btrace_will_replay)
9120 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9121 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9122 (record_btrace_store_registers, record_btrace_prepare_to_store)
9123 (record_btrace_to_get_unwinder)
9124 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9125 (record_btrace_commit_resume, record_btrace_wait)
9126 (record_btrace_stop, record_btrace_can_execute_reverse)
9127 (record_btrace_stopped_by_sw_breakpoint)
9128 (record_btrace_supports_stopped_by_sw_breakpoint)
9129 (record_btrace_stopped_by_hw_breakpoint)
9130 (record_btrace_supports_stopped_by_hw_breakpoint)
9131 (record_btrace_update_thread_list, record_btrace_thread_alive)
9132 (record_btrace_goto_begin, record_btrace_goto_end)
9133 (record_btrace_goto, record_btrace_stop_replaying_all)
9134 (record_btrace_execution_direction)
9135 (record_btrace_prepare_to_generate_core)
9136 (record_btrace_done_generating_core): Refactor as
9137 record_btrace_target methods.
9138 (init_record_btrace_ops): Delete.
9139 (_initialize_record_btrace): Remove reference to
9140 init_record_btrace_ops.
9141 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9142 the execution_direction global.
9143 (record_full_base_target, record_full_target)
9144 (record_full_core_target): New classes.
9145 (record_full_ops): Now a record_full_target.
9146 (record_full_core_ops): Now a record_full_core_target.
9147 (record_full_target::detach, record_full_target::disconnect)
9148 (record_full_core_target::disconnect)
9149 (record_full_target::mourn_inferior, record_full_target::kill):
9150 New.
9151 (record_full_open, record_full_close, record_full_async): Refactor
9152 as methods of the record_full_base_target class.
9153 (record_full_resume, record_full_commit_resume): Refactor
9154 as methods of the record_full_target class.
9155 (record_full_wait, record_full_stopped_by_watchpoint)
9156 (record_full_stopped_data_address)
9157 (record_full_stopped_by_sw_breakpoint)
9158 (record_full_supports_stopped_by_sw_breakpoint)
9159 (record_full_stopped_by_hw_breakpoint)
9160 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9161 methods of the record_full_base_target class.
9162 (record_full_store_registers, record_full_xfer_partial)
9163 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9164 Refactor as methods of the record_full_target class.
9165 (record_full_can_execute_reverse, record_full_get_bookmark)
9166 (record_full_goto_bookmark, record_full_execution_direction)
9167 (record_full_record_method, record_full_info, record_full_delete)
9168 (record_full_is_replaying, record_full_will_replay)
9169 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9170 (record_full_stop_replaying): Refactor as methods of the
9171 record_full_base_target class.
9172 (record_full_core_resume, record_full_core_kill)
9173 (record_full_core_fetch_registers)
9174 (record_full_core_prepare_to_store)
9175 (record_full_core_store_registers, record_full_core_xfer_partial)
9176 (record_full_core_insert_breakpoint)
9177 (record_full_core_remove_breakpoint)
9178 (record_full_core_has_execution): Refactor
9179 as methods of the record_full_core_target class.
9180 (record_full_base_target::supports_delete_record): New.
9181 (init_record_full_ops): Delete.
9182 (init_record_full_core_ops): Delete.
9183 (record_full_save): Refactor as method of the
9184 record_full_base_target class.
9185 (_initialize_record_full): Remove references to
9186 init_record_full_ops and init_record_full_core_ops.
9187
9188 * remote.c (remote_target, extended_remote_target): New classes.
9189 (remote_ops): Now a remote_target.
9190 (extended_remote_ops): Now an extended_remote_target.
9191 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9192 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9193 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9194 (remote_pass_signals, remote_set_syscall_catchpoint)
9195 (remote_program_signals, )
9196 (remote_thread_always_alive): Remove target_ops parameter.
9197 (remote_thread_alive, remote_thread_name)
9198 (remote_update_thread_list, remote_threads_extra_info)
9199 (remote_static_tracepoint_marker_at)
9200 (remote_static_tracepoint_markers_by_strid)
9201 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9202 (remote_open): Refactor as methods of remote_target.
9203 (extended_remote_open, extended_remote_detach)
9204 (extended_remote_attach, extended_remote_post_attach):
9205 (extended_remote_supports_disable_randomization)
9206 (extended_remote_create_inferior): : Refactor as method of
9207 extended_remote_target.
9208 (remote_set_permissions, remote_open_1, remote_detach)
9209 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9210 (remote_resume, remote_commit_resume, remote_stop)
9211 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9212 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9213 (remote_prepare_to_store, remote_store_registers)
9214 (remote_flash_erase, remote_flash_done, remote_files_info)
9215 (remote_kill, remote_mourn, remote_insert_breakpoint)
9216 (remote_remove_breakpoint, remote_insert_watchpoint)
9217 (remote_watchpoint_addr_within_range)
9218 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9219 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9220 (remote_supports_stopped_by_sw_breakpoint)
9221 (remote_stopped_by_hw_breakpoint)
9222 (remote_supports_stopped_by_hw_breakpoint)
9223 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9224 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9225 (remote_verify_memory): Refactor as methods of remote_target.
9226 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9227 parameter.
9228 (remote_xfer_partial, remote_get_memory_xfer_limit)
9229 (remote_search_memory, remote_rcmd, remote_memory_map)
9230 (remote_pid_to_str, remote_get_thread_local_address)
9231 (remote_get_tib_address, remote_read_description): Refactor as
9232 methods of remote_target.
9233 (remote_target::fileio_open, remote_target::fileio_pwrite)
9234 (remote_target::fileio_pread, remote_target::fileio_close): New.
9235 (remote_hostio_readlink, remote_hostio_fstat)
9236 (remote_filesystem_is_local, remote_can_execute_reverse)
9237 (remote_supports_non_stop, remote_supports_disable_randomization)
9238 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9239 (remote_supports_enable_disable_tracepoint)
9240 (remote_supports_string_tracing)
9241 (remote_can_run_breakpoint_commands, remote_trace_init)
9242 (remote_download_tracepoint, remote_can_download_tracepoint)
9243 (remote_download_trace_state_variable, remote_enable_tracepoint)
9244 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9245 (remote_trace_start, remote_get_trace_status)
9246 (remote_get_tracepoint_status, remote_trace_stop)
9247 (remote_trace_find, remote_get_trace_state_variable_value)
9248 (remote_save_trace_data, remote_get_raw_trace_data)
9249 (remote_set_disconnected_tracing, remote_core_of_thread)
9250 (remote_set_circular_trace_buffer, remote_traceframe_info)
9251 (remote_get_min_fast_tracepoint_insn_len)
9252 (remote_set_trace_buffer_size, remote_set_trace_notes)
9253 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9254 (remote_disable_btrace, remote_teardown_btrace)
9255 (remote_read_btrace, remote_btrace_conf)
9256 (remote_augmented_libraries_svr4_read, remote_load)
9257 (remote_pid_to_exec_file, remote_can_do_single_step)
9258 (remote_execution_direction, remote_thread_handle_to_thread_info):
9259 Refactor as methods of remote_target.
9260 (init_remote_ops, init_extended_remote_ops): Delete.
9261 (remote_can_async_p, remote_is_async_p, remote_async)
9262 (remote_thread_events, remote_upload_tracepoints)
9263 (remote_upload_trace_state_variables): Refactor as methods of
9264 remote_target.
9265 (_initialize_remote): Remove references to init_remote_ops and
9266 init_extended_remote_ops.
9267
9268 * remote-sim.c (gdbsim_target): New class.
9269 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9270 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9271 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9272 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9273 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9274 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9275 Refactor as methods of gdbsim_target.
9276 (gdbsim_ops): Now a gdbsim_target.
9277 (init_gdbsim_ops): Delete.
9278 (gdbsim_cntrl_c): Adjust.
9279 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9280
9281 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9282 (the_amd64_linux_nat_target): New.
9283 (amd64_linux_fetch_inferior_registers)
9284 (amd64_linux_store_inferior_registers): Refactor as methods of
9285 amd64_linux_nat_target.
9286 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9287 * i386-linux-nat.c: Don't include "linux-nat.h".
9288 (i386_linux_nat_target): New class.
9289 (the_i386_linux_nat_target): New.
9290 (i386_linux_fetch_inferior_registers)
9291 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9292 as methods of i386_linux_nat_target.
9293 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9294 * inf-child.c (inf_child_ops): Delete.
9295 (inf_child_fetch_inferior_registers)
9296 (inf_child_store_inferior_registers): Delete.
9297 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9298 methods of inf_child_target.
9299 (inf_child_target::supports_terminal_ours)
9300 (inf_child_target::terminal_init)
9301 (inf_child_target::terminal_inferior)
9302 (inf_child_target::terminal_ours_for_output)
9303 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9304 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9305 New.
9306 (inf_child_open, inf_child_disconnect, inf_child_close)
9307 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9308 (inf_child_post_startup_inferior, inf_child_can_run)
9309 (inf_child_pid_to_exec_file): Refactor as methods of
9310 inf_child_target.
9311 (inf_child_follow_fork): Delete.
9312 (inf_child_target::can_create_inferior)
9313 (inf_child_target::can_attach): New.
9314 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9315 (inf_child_target::has_stack, inf_child_target::has_registers)
9316 (inf_child_target::has_execution): New.
9317 (inf_child_fileio_open, inf_child_fileio_pwrite)
9318 (inf_child_fileio_pread, inf_child_fileio_fstat)
9319 (inf_child_fileio_close, inf_child_fileio_unlink)
9320 (inf_child_fileio_readlink, inf_child_use_agent)
9321 (inf_child_can_use_agent): Refactor as methods of
9322 inf_child_target.
9323 (return_zero, inf_child_target): Delete.
9324 (inf_child_target::inf_child_target): New.
9325 * inf-child.h: Include "target.h".
9326 (inf_child_target): Delete function prototype.
9327 (inf_child_target): New class.
9328 (inf_child_open_target, inf_child_mourn_inferior)
9329 (inf_child_maybe_unpush_target): Delete.
9330 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9331 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9332 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9333 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9334 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9335 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9336 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9337 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9338 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9339 methods of inf_ptrace_target.
9340 (inf_ptrace_target): Delete function.
9341 * inf-ptrace.h: Include "inf-child.h".
9342 (inf_ptrace_target): Delete function declaration.
9343 (inf_ptrace_target): New class.
9344 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9345 * linux-nat.c (linux_target): New.
9346 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9347 (linux_nat_target::~linux_nat_target): New.
9348 (linux_child_post_attach, linux_child_post_startup_inferior)
9349 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9350 (linux_child_remove_fork_catchpoint)
9351 (linux_child_insert_vfork_catchpoint)
9352 (linux_child_remove_vfork_catchpoint)
9353 (linux_child_insert_exec_catchpoint)
9354 (linux_child_remove_exec_catchpoint)
9355 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9356 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9357 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9358 (linux_nat_stopped_data_address)
9359 (linux_nat_stopped_by_sw_breakpoint)
9360 (linux_nat_supports_stopped_by_sw_breakpoint)
9361 (linux_nat_stopped_by_hw_breakpoint)
9362 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9363 (linux_nat_kill, linux_nat_mourn_inferior)
9364 (linux_nat_xfer_partial, linux_nat_thread_alive)
9365 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9366 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9367 (linux_child_static_tracepoint_markers_by_strid)
9368 (linux_nat_is_async_p, linux_nat_can_async_p)
9369 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9370 (linux_nat_supports_multi_process)
9371 (linux_nat_supports_disable_randomization, linux_nat_async)
9372 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9373 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9374 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9375 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9376 methods of linux_nat_target.
9377 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9378 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9379 parameter.
9380 (check_stopped_by_watchpoint): Adjust.
9381 (linux_xfer_partial): Delete.
9382 (linux_target_install_ops, linux_target, linux_nat_add_target):
9383 Delete.
9384 (linux_nat_target::linux_nat_target): New.
9385 * linux-nat.h: Include "inf-ptrace.h".
9386 (linux_nat_target): New.
9387 (linux_target, linux_target_install_ops, linux_nat_add_target):
9388 Delete function declarations.
9389 (linux_target): Declare global.
9390 * linux-thread-db.c (thread_db_target): New.
9391 (thread_db_target::thread_db_target): New.
9392 (thread_db_ops): Delete.
9393 (the_thread_db_target): New.
9394 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9395 (thread_db_update_thread_list, thread_db_pid_to_str)
9396 (thread_db_extra_thread_info)
9397 (thread_db_thread_handle_to_thread_info)
9398 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9399 (thread_db_resume): Refactor as methods of thread_db_target.
9400 (init_thread_db_ops): Delete.
9401 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9402 * x86-linux-nat.c: Don't include "linux-nat.h".
9403 (super_post_startup_inferior): Delete.
9404 (x86_linux_nat_target::~x86_linux_nat_target): New.
9405 (x86_linux_child_post_startup_inferior)
9406 (x86_linux_read_description, x86_linux_enable_btrace)
9407 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9408 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9409 methods of x86_linux_nat_target.
9410 (x86_linux_create_target): Delete. Bits folded ...
9411 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9412 pointer.
9413 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9414 (x86_linux_nat_target): New class.
9415 (x86_linux_create_target): Delete.
9416 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9417 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9418 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9419 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9420 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9421 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9422 make extern.
9423 (x86_use_watchpoints): Delete.
9424 * x86-nat.h: Include "breakpoint.h" and "target.h".
9425 (x86_use_watchpoints): Delete.
9426 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9427 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9428 (x86_insert_watchpoint, x86_remove_watchpoint)
9429 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9430 (x86_stopped_by_hw_breakpoint): New declarations.
9431 (x86_nat_target): New template class.
9432
9433 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9434 (the_ppc_linux_nat_target): New.
9435 (ppc_linux_fetch_inferior_registers)
9436 (ppc_linux_can_use_hw_breakpoint)
9437 (ppc_linux_region_ok_for_hw_watchpoint)
9438 (ppc_linux_ranged_break_num_registers)
9439 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9440 (ppc_linux_insert_mask_watchpoint)
9441 (ppc_linux_remove_mask_watchpoint)
9442 (ppc_linux_can_accel_watchpoint_condition)
9443 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9444 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9445 (ppc_linux_watchpoint_addr_within_range)
9446 (ppc_linux_masked_watch_num_registers)
9447 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9448 (ppc_linux_read_description): Refactor as methods of
9449 ppc_linux_nat_target.
9450 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
9451
9452 * procfs.c (procfs_xfer_partial): Delete forward declaration.
9453 (procfs_target): New class.
9454 (the_procfs_target): New.
9455 (procfs_target): Delete function.
9456 (procfs_auxv_parse, procfs_attach, procfs_detach)
9457 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9458 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9459 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9460 (procfs_create_inferior, procfs_update_thread_list)
9461 (procfs_thread_alive, procfs_pid_to_str)
9462 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9463 (procfs_stopped_data_address, procfs_insert_watchpoint)
9464 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9465 (proc_find_memory_regions, procfs_info_proc)
9466 (procfs_make_note_section): Refactor as methods of procfs_target.
9467 (_initialize_procfs): Adjust.
9468 * sol-thread.c (sol_thread_target): New class.
9469 (sol_thread_ops): Now a sol_thread_target.
9470 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9471 (sol_thread_fetch_registers, sol_thread_store_registers)
9472 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9473 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9474 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9475 (init_sol_thread_ops): Delete.
9476 (_initialize_sol_thread): Adjust. Remove references to
9477 init_sol_thread_ops and complete_target_initialization.
9478
9479 * windows-nat.c (windows_nat_target): New class.
9480 (windows_fetch_inferior_registers)
9481 (windows_store_inferior_registers, windows_resume, windows_wait)
9482 (windows_attach, windows_detach, windows_pid_to_exec_file)
9483 (windows_files_info, windows_create_inferior)
9484 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9485 (windows_close, windows_pid_to_str, windows_xfer_partial)
9486 (windows_get_tib_address, windows_get_ada_task_ptid)
9487 (windows_thread_name, windows_thread_alive): Refactor as
9488 windows_nat_target methods.
9489 (do_initial_windows_stuff): Adjust.
9490 (windows_target): Delete function.
9491 (_initialize_windows_nat): Adjust.
9492
9493 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9494 (darwin_mourn_inferior, darwin_kill_inferior)
9495 (darwin_create_inferior, darwin_attach, darwin_detach)
9496 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9497 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9498 (darwin_supports_multi_process): Refactor as darwin_nat_target
9499 methods.
9500 (darwin_resume_to, darwin_files_info): Delete.
9501 (_initialize_darwin_inferior): Rename to ...
9502 (_initialize_darwin_nat): ... this. Adjust to C++ification.
9503 * darwin-nat.h: Include "inf-child.h".
9504 (darwin_nat_target): New class.
9505 (darwin_complete_target): Delete.
9506 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9507 (darwin_target): New.
9508 (i386_darwin_fetch_inferior_registers)
9509 (i386_darwin_store_inferior_registers): Refactor as methods of
9510 darwin_nat_target.
9511 (darwin_complete_target): Delete, with ...
9512 (_initialize_i386_darwin_nat): ... bits factored out here.
9513
9514 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9515 (the_alpha_linux_nat_target): New.
9516 (alpha_linux_register_u_offset): Refactor as
9517 alpha_linux_nat_target method.
9518 (_initialize_alpha_linux_nat): Adjust.
9519 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9520 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9521 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9522 methods of linux_nat_trad_target.
9523 (linux_trad_target): Delete.
9524 * linux-nat-trad.h (linux_trad_target): Delete function.
9525 (linux_nat_trad_target): New class.
9526 * mips-linux-nat.c (mips_linux_nat_target): New class.
9527 (super_fetch_registers, super_store_registers, super_close):
9528 Delete.
9529 (the_mips_linux_nat_target): New.
9530 (mips64_linux_regsets_fetch_registers)
9531 (mips64_linux_regsets_store_registers)
9532 (mips64_linux_fetch_registers, mips64_linux_store_registers)
9533 (mips_linux_register_u_offset, mips_linux_read_description)
9534 (mips_linux_can_use_hw_breakpoint)
9535 (mips_linux_stopped_by_watchpoint)
9536 (mips_linux_stopped_data_address)
9537 (mips_linux_region_ok_for_hw_watchpoint)
9538 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9539 (mips_linux_close): Refactor as methods of mips_linux_nat.
9540 (_initialize_mips_linux_nat): Adjust to C++ification.
9541
9542 * aix-thread.c (aix_thread_target): New class.
9543 (aix_thread_ops): Now an aix_thread_target.
9544 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9545 (aix_thread_fetch_registers, aix_thread_store_registers)
9546 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9547 (aix_thread_thread_alive, aix_thread_pid_to_str)
9548 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9549 Refactor as methods of aix_thread_target.
9550 (init_aix_thread_ops): Delete.
9551 (_initialize_aix_thread): Remove references to init_aix_thread_ops
9552 and complete_target_initialization.
9553 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9554 (rs6000_nat_target): New class.
9555 (the_rs6000_nat_target): New.
9556 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9557 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9558 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9559 (super_create_inferior): Delete.
9560 (_initialize_rs6000_nat): Adjust to C++ification.
9561
9562 * arm-linux-nat.c (arm_linux_nat_target): New class.
9563 (the_arm_linux_nat_target): New.
9564 (arm_linux_fetch_inferior_registers)
9565 (arm_linux_store_inferior_registers, arm_linux_read_description)
9566 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9567 (arm_linux_remove_hw_breakpoint)
9568 (arm_linux_region_ok_for_hw_watchpoint)
9569 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9570 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9571 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9572 arm_linux_nat_target.
9573 (_initialize_arm_linux_nat): Adjust to C++ification.
9574
9575 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9576 (the_aarch64_linux_nat_target): New.
9577 (aarch64_linux_fetch_inferior_registers)
9578 (aarch64_linux_store_inferior_registers)
9579 (aarch64_linux_child_post_startup_inferior)
9580 (aarch64_linux_read_description)
9581 (aarch64_linux_can_use_hw_breakpoint)
9582 (aarch64_linux_insert_hw_breakpoint)
9583 (aarch64_linux_remove_hw_breakpoint)
9584 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9585 (aarch64_linux_region_ok_for_hw_watchpoint)
9586 (aarch64_linux_stopped_data_address)
9587 (aarch64_linux_stopped_by_watchpoint)
9588 (aarch64_linux_watchpoint_addr_within_range)
9589 (aarch64_linux_can_do_single_step): Refactor as methods of
9590 aarch64_linux_nat_target.
9591 (super_post_startup_inferior): Delete.
9592 (_initialize_aarch64_linux_nat): Adjust to C++ification.
9593
9594 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9595 (the_hppa_linux_nat_target): New.
9596 (hppa_linux_fetch_inferior_registers)
9597 (hppa_linux_store_inferior_registers): Refactor as methods of
9598 hppa_linux_nat_target.
9599 (_initialize_hppa_linux_nat): Adjust to C++ification.
9600
9601 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9602 (the_ia64_linux_nat_target): New.
9603 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9604 (ia64_linux_stopped_data_address)
9605 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9606 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9607 ia64_linux_nat_target methods.
9608 (super_xfer_partial): Delete.
9609 (_initialize_ia64_linux_nat): Adjust to C++ification.
9610
9611 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9612 (the_m32r_linux_nat_target): New.
9613 (m32r_linux_fetch_inferior_registers)
9614 (m32r_linux_store_inferior_registers): Refactor as
9615 m32r_linux_nat_target methods.
9616 (_initialize_m32r_linux_nat): Adjust to C++ification.
9617
9618 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9619 (the_m68k_linux_nat_target): New.
9620 (m68k_linux_fetch_inferior_registers)
9621 (m68k_linux_store_inferior_registers): Refactor as
9622 m68k_linux_nat_target methods.
9623 (_initialize_m68k_linux_nat): Adjust to C++ification.
9624
9625 * s390-linux-nat.c (s390_linux_nat_target): New class.
9626 (the_s390_linux_nat_target): New.
9627 (s390_linux_fetch_inferior_registers)
9628 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9629 (s390_insert_watchpoint, s390_remove_watchpoint)
9630 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9631 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9632 (s390_auxv_parse, s390_read_description): Refactor as methods of
9633 s390_linux_nat_target.
9634 (_initialize_s390_nat): Adjust to C++ification.
9635
9636 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9637 (the_sparc_linux_nat_target): New.
9638 (_initialize_sparc_linux_nat): Adjust to C++ification.
9639 * sparc-nat.c (sparc_fetch_inferior_registers)
9640 (sparc_store_inferior_registers): Remove target_ops parameter.
9641 * sparc-nat.h (sparc_fetch_inferior_registers)
9642 (sparc_store_inferior_registers): Remove target_ops parameter.
9643 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9644 (the_sparc64_linux_nat_target): New.
9645 (_initialize_sparc64_linux_nat): Adjust to C++ification.
9646
9647 * spu-linux-nat.c (spu_linux_nat_target): New class.
9648 (the_spu_linux_nat_target): New.
9649 (spu_child_post_startup_inferior, spu_child_post_attach)
9650 (spu_child_wait, spu_fetch_inferior_registers)
9651 (spu_store_inferior_registers, spu_xfer_partial)
9652 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9653 methods.
9654 (_initialize_spu_nat): Adjust to C++ification.
9655
9656 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9657 (the_tilegx_linux_nat_target): New.
9658 (fetch_inferior_registers, store_inferior_registers):
9659 Refactor as methods.
9660 (_initialize_tile_linux_nat): Adjust to C++ification.
9661
9662 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9663 (the_xtensa_linux_nat_target): New.
9664 (xtensa_linux_fetch_inferior_registers)
9665 (xtensa_linux_store_inferior_registers): Refactor as
9666 xtensa_linux_nat_target methods.
9667 (_initialize_xtensa_linux_nat): Adjust to C++ification.
9668
9669 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9670 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9671 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9672 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9673 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9674 (fbsd_stopped_by_sw_breakpoint)
9675 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9676 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9677 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9678 (fbsd_post_startup_inferior, fbsd_post_attach)
9679 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9680 (fbsd_set_syscall_catchpoint)
9681 (super_xfer_partial, super_resume, super_wait)
9682 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9683 (fbsd_handle_debug_trap): Remove target_ops parameter.
9684 (fbsd_nat_add_target): Delete.
9685 * fbsd-nat.h: Include "inf-ptrace.h".
9686 (fbsd_nat_add_target): Delete.
9687 (USE_SIGTRAP_SIGINFO): Define.
9688 (fbsd_nat_target): New class.
9689
9690 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9691 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9692 (amd64bsd_target): Delete.
9693 * amd64-bsd-nat.h: New file.
9694 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9695 "x86-bsd-nat.h".
9696 (amd64_fbsd_nat_target): New class.
9697 (the_amd64_fbsd_nat_target): New.
9698 (amd64fbsd_read_description): Refactor as method of
9699 amd64_fbsd_nat_target.
9700 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9701 (_initialize_amd64fbsd_nat): Adjust to C++ification.
9702 * amd64-nat.h (amd64bsd_target): Delete function declaration.
9703 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9704 (i386bsd_store_inferior_registers): Remove target_ops parameter.
9705 (i386bsd_target): Delete.
9706 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9707 (i386bsd_fetch_inferior_registers)
9708 (i386bsd_store_inferior_registers): Declare.
9709 (i386_bsd_nat_target): New class.
9710 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9711 (the_i386_fbsd_nat_target): New.
9712 (i386fbsd_resume, i386fbsd_read_description): Refactor as
9713 i386_fbsd_nat_target methods.
9714 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9715 (_initialize_i386fbsd_nat): Adjust to C++ification.
9716 * x86-bsd-nat.c (super_mourn_inferior): Delete.
9717 (x86bsd_mourn_inferior, x86bsd_target): Delete.
9718 (_initialize_x86_bsd_nat): Adjust to C++ification.
9719 * x86-bsd-nat.h: Include "x86-nat.h".
9720 (x86bsd_target): Delete declaration.
9721 (x86bsd_nat_target): New class.
9722
9723 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9724 (the_aarch64_fbsd_nat_target): New.
9725 (aarch64_fbsd_fetch_inferior_registers)
9726 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9727 aarch64_fbsd_nat_target.
9728 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9729 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9730 (the_alpha_bsd_nat_target): New.
9731 (alphabsd_fetch_inferior_registers)
9732 (alphabsd_store_inferior_registers): Refactor as
9733 alpha_bsd_nat_target methods.
9734 (_initialize_alphabsd_nat): Refactor as methods of
9735 alpha_bsd_nat_target.
9736 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9737 (the_amd64_nbsd_nat_target): New.
9738 (_initialize_amd64nbsd_nat): Adjust to C++ification.
9739 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9740 (the_amd64_obsd_nat_target): New.
9741 (_initialize_amd64obsd_nat): Adjust to C++ification.
9742 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9743 (the_arm_fbsd_nat_target): New.
9744 (arm_fbsd_fetch_inferior_registers)
9745 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9746 (_initialize_arm_fbsd_nat): Refactor as methods of
9747 arm_fbsd_nat_target.
9748 (_initialize_arm_fbsd_nat): Adjust to C++ification.
9749 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9750 (the_arm_netbsd_nat_target): New.
9751 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9752 arm_netbsd_nat_target.
9753 (_initialize_arm_netbsd_nat): Adjust to C++ification.
9754 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9755 (the_hppa_nbsd_nat_target): New.
9756 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9757 hppa_nbsd_nat_target methods.
9758 (_initialize_hppanbsd_nat): Adjust to C++ification.
9759 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9760 (the_hppa_obsd_nat_target): New.
9761 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9762 methods of hppa_obsd_nat_target.
9763 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
9764 add_target.
9765 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9766 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
9767 add_target.
9768 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9769 (_initialize_i386obsd_nat): Use add_target.
9770 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9771 (the_m68k_bsd_nat_target): New.
9772 (m68kbsd_fetch_inferior_registers)
9773 (m68kbsd_store_inferior_registers): Refactor as methods of
9774 m68k_bsd_nat_target.
9775 (_initialize_m68kbsd_nat): Adjust to C++ification.
9776 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9777 (the_mips_fbsd_nat_target): New.
9778 (mips_fbsd_fetch_inferior_registers)
9779 (mips_fbsd_store_inferior_registers): Refactor as methods of
9780 mips_fbsd_nat_target.
9781 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
9782 add_target.
9783 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9784 (the_mips_nbsd_nat_target): New.
9785 (mipsnbsd_fetch_inferior_registers)
9786 (mipsnbsd_store_inferior_registers): Refactor as methods of
9787 mips_nbsd_nat_target.
9788 (_initialize_mipsnbsd_nat): Adjust to C++ification.
9789 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9790 (the_mips64_obsd_nat_target): New.
9791 (mips64obsd_fetch_inferior_registers)
9792 (mips64obsd_store_inferior_registers): Refactor as methods of
9793 mips64_obsd_nat_target.
9794 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
9795 add_target.
9796 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9797 nbsd_nat_target.
9798 * nbsd-nat.h: Include "inf-ptrace.h".
9799 (nbsd_nat_target): New class.
9800 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9801 (obsd_wait): Refactor as methods of obsd_nat_target.
9802 (obsd_add_target): Delete.
9803 * obsd-nat.h: Include "inf-ptrace.h".
9804 (obsd_nat_target): New class.
9805 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9806 (the_ppc_fbsd_nat_target): New.
9807 (ppcfbsd_fetch_inferior_registers)
9808 (ppcfbsd_store_inferior_registers): Refactor as methods of
9809 ppc_fbsd_nat_target.
9810 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
9811 add_target.
9812 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9813 (the_ppc_nbsd_nat_target): New.
9814 (ppcnbsd_fetch_inferior_registers)
9815 (ppcnbsd_store_inferior_registers): Refactor as methods of
9816 ppc_nbsd_nat_target.
9817 (_initialize_ppcnbsd_nat): Adjust to C++ification.
9818 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9819 (the_ppc_obsd_nat_target): New.
9820 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9821 methods of ppc_obsd_nat_target.
9822 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
9823 add_target.
9824 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9825 (the_sh_nbsd_nat_target): New.
9826 (shnbsd_fetch_inferior_registers)
9827 (shnbsd_store_inferior_registers): Refactor as methods of
9828 sh_nbsd_nat_target.
9829 (_initialize_shnbsd_nat): Adjust to C++ification.
9830 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9831 (inf_ptrace_xfer_partial): Delete.
9832 (sparc_xfer_partial, sparc_target): Delete.
9833 * sparc-nat.h (sparc_fetch_inferior_registers)
9834 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9835 (sparc_target): Delete function declaration.
9836 (sparc_target): New template class.
9837 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9838 (_initialize_sparcnbsd_nat): Adjust to C++ification.
9839 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9840 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
9841 add_target.
9842 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9843 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9844 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9845 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
9846 add_target.
9847 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9848 (the_vax_bsd_nat_target): New.
9849 (vaxbsd_fetch_inferior_registers)
9850 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9851 methods.
9852 (_initialize_vaxbsd_nat): Adjust to C++ification.
9853
9854 * bsd-kvm.c (bsd_kvm_target): New class.
9855 (bsd_kvm_ops): Now a bsd_kvm_target.
9856 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9857 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9858 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9859 bsd_kvm_target.
9860 (bsd_kvm_return_one): Delete.
9861 (bsd_kvm_add_target): Adjust to C++ification.
9862
9863 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9864 (nto_procfs_target_procfs): New classes.
9865 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9866 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9867 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9868 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9869 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9870 (procfs_remove_hw_breakpoint, procfs_resume)
9871 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9872 (procfs_kill_inferior, procfs_store_registers)
9873 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9874 as methods of nto_procfs_target.
9875 (nto_procfs_ops): Now an nto_procfs_target_procfs.
9876 (nto_native_ops): Delete.
9877 (procfs_open, procfs_native_open): Delete.
9878 (nto_native_ops): Now an nto_procfs_target_native.
9879 (init_procfs_targets): Adjust to C++ification.
9880 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9881 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9882 Refactor as methods of nto_procfs_target.
9883
9884 * go32-nat.c (go32_nat_target): New class.
9885 (the_go32_nat_target): New.
9886 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9887 (go32_store_registers, go32_xfer_partial, go32_files_info)
9888 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9889 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9890 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9891 (go32_pid_to_str): Refactor as methods of go32_nat_target.
9892 (go32_target): Delete.
9893 (_initialize_go32_nat): Adjust to C++ification.
9894
9895 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9896 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9897 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9898 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9899 gnu_nat_target.
9900 (gnu_target): Delete.
9901 * gnu-nat.h (gnu_target): Delete.
9902 (gnu_nat_target): New class.
9903 * i386-gnu-nat.c (gnu_base_target): New.
9904 (i386_gnu_nat_target): New class.
9905 (the_i386_gnu_nat_target): New.
9906 (_initialize_i386gnu_nat): Adjust to C++ification.
9907
9908 2018-05-02 Pedro Alves <palves@redhat.com>
9909
9910 * bfd-target.c (target_bfd_xclose): Rename to ...
9911 (target_bfd_close): ... this.
9912 (target_bfd_reopen): Adjust.
9913 * target.c (target_close): Remove references to to_xclose.
9914 * target.h (target_ops::to_xclose): Delete.
9915 (target_ops::to_close): Update comments.
9916
9917 2018-05-02 Pedro Alves <palves@redhat.com>
9918
9919 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9920 "linux-nat.h".
9921 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9922 * inf-ptrace.c (inf_ptrace_register_u_offset)
9923 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9924 (inf_ptrace_store_register, inf_ptrace_store_registers)
9925 (inf_ptrace_trad_target): Move to ...
9926 * linux-nat-trad.c: ... this new file.
9927 * linux-nat-trad.h: New file.
9928 * linux-nat.c (linux_target_install_ops): Make extern.
9929 (linux_trad_target): Delete.
9930 * linux-nat.h (linux_trad_target): Delete declaration.
9931 (linux_target_install_ops): Declare.
9932 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9933 "linux-nat.h".
9934
9935 2018-05-02 Pedro Alves <palves@redhat.com>
9936
9937 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9938 procfs_target/add_target here.
9939 * procfs.c (procfs_target): Make static.
9940 (_initialize_procfs): Call add_target here.
9941 * procfs.h (struct target_ops): Remove forward declaration.
9942 (procfs_target): Remove declaration.
9943 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9944
9945 2018-05-02 Pedro Alves <palves@redhat.com>
9946
9947 * procfs.c (procfs_stopped_by_watchpoint)
9948 (procfs_insert_watchpoint, procfs_remove_watchpoint)
9949 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9950 Forward declare.
9951 (procfs_use_watchpoints): Delete, move contents...
9952 (procfs_target): ... here.
9953 * procfs.h (procfs_use_watchpoints): Delete declaration.
9954 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9955 procfs_use_watchpoints.
9956 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9957 procfs_use_watchpoints.
9958
9959 2018-05-02 Tom Tromey <tom@tromey.com>
9960
9961 PR python/20084:
9962 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9963 and var_zuinteger_unlimited.
9964 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9965 and PARAM_ZUINTEGER_UNLIMITED.
9966 (set_parameter_value): Handle var_zuinteger and
9967 var_zuinteger_unlimited.
9968 (add_setshow_generic): Likewise.
9969 (parmpy_init): Likewise.
9970
9971 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
9972
9973 PR rust/23124
9974 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9975 pointer is not null before dereferencing it.
9976
9977 2018-04-30 Tom Tromey <tom@tromey.com>
9978
9979 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9980 is_mi_like_p.
9981
9982 2018-04-30 Tom Tromey <tom@tromey.com>
9983
9984 * breakpoint.c (mention): Remove use of is_mi_like_p.
9985 (print_mention_ranged_breakpoint): Likewise.
9986 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9987 of is_mi_like_p.
9988
9989 2018-04-30 Tom Tromey <tom@tromey.com>
9990
9991 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9992
9993 2018-04-30 Tom Tromey <tom@tromey.com>
9994
9995 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9996 (info_spu_event_command): Remove some uses of is_mi_like_p.
9997
9998 2018-04-30 Tom Tromey <tom@tromey.com>
9999
10000 * python/py-framefilter.c (py_print_single_arg)
10001 (enumerate_locals, py_print_args, py_print_frame): Remove some
10002 uses of is_mi_like_p.
10003
10004 2018-04-30 Tom Tromey <tom@tromey.com>
10005
10006 * ui-out.c: Update.
10007 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10008 * ui-out.h (ui_out::is_mi_like_p): Now const.
10009 (ui_out::do_is_mi_like_p): Now const.
10010 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10011
10012 2018-04-30 Tom Tromey <tom@tromey.com>
10013
10014 * varobj.c (varobj_set_visualizer): Use new_reference.
10015 * python/python.c (gdbpy_decode_line): Use new_reference.
10016 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10017 new_reference.
10018
10019 2018-04-30 Tom Tromey <tom@tromey.com>
10020
10021 * varobj.c (install_new_value): Use new_reference.
10022 * value.h (value_incref): Return void. Swap intro comment with
10023 value_decref.
10024 * value.c (set_value_parent): Use new_reference.
10025 (value_incref): Return void. Update intro comment.
10026 (release_value): Use new_reference.
10027 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10028
10029 2018-04-30 Tom Tromey <tom@tromey.com>
10030
10031 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10032 * gdb_bfd.h (new_bfd_ref): Remove.
10033 (gdb_bfd_open): Update comment.
10034 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10035 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10036 (gdb_bfd_fdopenr): Use new_reference.
10037 * exec.c (exec_file_attach): Use new_reference.
10038
10039 2018-04-30 Tom Tromey <tom@tromey.com>
10040
10041 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10042 method.
10043
10044 2018-04-30 Tom Tromey <tom@tromey.com>
10045
10046 * jit.c (jit_read_code_entry): Use type_align.
10047 * i386-tdep.c (i386_gdbarch_init): Don't call
10048 set_gdbarch_long_long_align_bit.
10049 * gdbarch.sh: Remove long_long_align_bit.
10050 * gdbarch.c, gdbarch.h: Rebuild.
10051 * arc-tdep.c (arc_type_align): New function.
10052 (arc_gdbarch_init): Use arc_type_align. Don't call
10053 set_gdbarch_long_long_align_bit.
10054
10055 2018-04-30 Tom Tromey <tom@tromey.com>
10056
10057 * rust-lang.c (rust_type_alignment): Remove.
10058 (rust_composite_type): Use type_align.
10059
10060 2018-04-30 Tom Tromey <tom@tromey.com>
10061
10062 * NEWS: Mention Type.align.
10063 * python/py-type.c (typy_get_alignof): New function.
10064 (type_object_getset): Add "alignof".
10065
10066 2018-04-30 Tom Tromey <tom@tromey.com>
10067
10068 PR exp/17095:
10069 * NEWS: Update.
10070 * std-operator.def (UNOP_ALIGNOF): New operator.
10071 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10072 New.
10073 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10074 * c-lang.c (c_op_print_tab): Add alignof.
10075 * c-exp.y (ALIGNOF): New token.
10076 (exp): Add "ALIGNOF" production.
10077 (ident_tokens): Add _Alignof and alignof.
10078
10079 2018-04-30 Tom Tromey <tom@tromey.com>
10080
10081 * i386-tdep.c (i386_type_align): New function.
10082 (i386_gdbarch_init): Update.
10083 * gdbarch.sh (type_align): New method.
10084 * gdbarch.c, gdbarch.h: Rebuild.
10085 * arch-utils.h (default_type_align): Declare.
10086 * arch-utils.c (default_type_align): New function.
10087 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10088 (struct type) <align_log2>: New field.
10089 <instance_flags>: Now a bitfield.
10090 (TYPE_RAW_ALIGN): New macro.
10091 (type_align, type_raw_align, set_type_align): Declare.
10092 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10093 functions.
10094 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10095 (get_alignment, maybe_set_alignment): New functions.
10096 (read_structure_type, read_enumeration_type, read_array_type)
10097 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10098 (read_subrange_type, read_base_type): Set type alignment.
10099
10100 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10101
10102 * dwarf2read.c (read_index_from_section): Use bool.
10103
10104 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10105
10106 PR gdb/22950
10107 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10108 with #ifdef.
10109
10110 2018-04-29 John Reiser <jreiser@BitWagon.com>
10111
10112 PR build/22873
10113 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10114 last step, and do it atomically.
10115
10116 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10117
10118 * compile/compile-c-types.c (convert_int, convert_float):
10119 Update for C FE v1.
10120
10121 2018-04-27 Tom Tromey <tom@tromey.com>
10122
10123 PR rust/22545:
10124 * rust-lang.c (rust_inclusive_range_type_p): New function.
10125 (rust_range): Handle inclusive ranges.
10126 (rust_compute_range): Likewise.
10127 * rust-exp.y (struct rust_op) <inclusive>: New field.
10128 (DOTDOTEQ): New constant.
10129 (range_expr): Add "..=" productions.
10130 (operator_tokens): Add "..=" token.
10131 (ast_range): Add "inclusive" parameter.
10132 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10133 ranges.
10134 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10135 bounds values.
10136 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10137 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10138 Update comments.
10139 * expprint.c (print_subexp_standard): Handle new bounds values.
10140 (dump_subexp_body_standard): Likewise.
10141
10142 2018-04-27 Tom Tromey <tom@tromey.com>
10143
10144 * configure: Rebuild.
10145 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10146 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10147 "OVERRIDE".
10148 (class symbol_needs_eval_context): Likewise.
10149 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10150 (mock_mapped_index::symbol_name_at): Use "override". Remove
10151 "virtual".
10152 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10153 "override".
10154 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10155 * aarch64-tdep.c (instruction_reader::read): Use "override".
10156 (instruction_reader_test::read): Likewise.
10157 * arm-tdep.c (instruction_reader::read): Use "override".
10158 (instruction_reader_thumb::read): Likewise.
10159
10160 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10161
10162 PR remote/9665
10163 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10164 instead of remote_send.
10165 (remote_send): Remove.
10166
10167 2018-04-26 Pedro Alves <palves@redhat.com>
10168
10169 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10170 find_function_start_sal instead of find_pc_line.
10171
10172 2018-04-26 Pedro Alves <palves@redhat.com>
10173
10174 * breakpoint.c (set_breakpoint_location_function): Handle
10175 mst_data_gnu_ifunc.
10176 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10177 * elfread.c (elf_symtab_read): Give data symbols with
10178 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10179 (elf_rel_plt_read): Update comment.
10180 * linespec.c (convert_linespec_to_sals): Handle
10181 mst_data_gnu_ifunc.
10182 (minsym_found): Handle mst_data_gnu_ifunc.
10183 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10184 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10185 * parse.c (find_minsym_type_and_address): Handle
10186 mst_data_gnu_ifunc.
10187 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10188 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10189 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10190 comment.
10191 <mst_data_gnu_ifunc>: New enumerator.
10192
10193 2018-04-26 Pedro Alves <palves@redhat.com>
10194
10195 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10196 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10197 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10198 Handle it.
10199 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10200 (lookup_minimal_symbol_by_pc): Adjust.
10201 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10202 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10203 * minsyms.h (lookup_msym_prefer): New enum.
10204 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10205 parameter by a lookup_msym_prefer parameter.
10206
10207 2018-04-26 Pedro Alves <palves@redhat.com>
10208
10209 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10210 ends in "@plt" instead of looking at the symbol's section.
10211
10212 2018-04-26 Pedro Alves <palves@redhat.com>
10213
10214 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10215 all references.
10216 (find_pc_partial_function_gnu_ifunc): Rename to ...
10217 (find_pc_partial_function): ... this, and remove references to
10218 'is_gnu_ifunc_p'.
10219 (find_pc_partial_function): Delete old implementation.
10220 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10221
10222 2018-04-26 Pedro Alves <palves@redhat.com>
10223
10224 * linespec.c (struct bound_minimal_symbol_search_key): New.
10225 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10226 skip first line if we found a GNU ifunc minimal symbol by name.
10227 (compare_msymbols): Change parameters to work with a destructured
10228 lhs minsym.
10229 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10230 functions.
10231
10232 2018-04-26 Pedro Alves <palves@redhat.com>
10233
10234 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10235 ifunc targets here. Instead, if we have an ifunc minsym, use its
10236 address/name.
10237 (add_location_to_breakpoint): Store the minsym and the objfile in
10238 the breakpoint location.
10239 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10240 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10241 Record the minsym in the sal.
10242 * symtab.h (symtab_and_line) <msymbol>: New field.
10243
10244 2018-04-26 Pedro Alves <palves@redhat.com>
10245
10246 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10247 unless we actually resolved the ifunc.
10248
10249 2018-04-26 Pedro Alves <palves@redhat.com>
10250
10251 * c-exp.y (variable production): Prefer ifunc minsyms over
10252 regular function symbols.
10253 * symtab.c (find_gnu_ifunc): New function.
10254 * minsyms.h (lookup_msym_prefer): New enum.
10255 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10256 parameter by a lookup_msym_prefer parameter.
10257 * symtab.h (find_gnu_ifunc): New declaration.
10258
10259 2018-04-26 Pedro Alves <palves@redhat.com>
10260
10261 * blockframe.c (find_gnu_ifunc_target_type): New function.
10262 (find_function_type): New.
10263 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10264 return a value with a memory address.
10265 (eval_call): For calls to GNU ifunc functions, try to find the
10266 type of the target function from the type that the resolver
10267 returns.
10268 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10269 symbols.
10270 * infcall.c (find_function_return_type): Delete.
10271 (find_function_addr): Add 'function_type' parameter. For calls to
10272 GNU ifunc functions, try to find the type of the target function
10273 from the type that the resolver returns, and return it via
10274 FUNCTION_TYPE.
10275 (call_function_by_hand_dummy): Adjust to use the function type
10276 returned by find_function_addr.
10277 (find_function_addr): Add 'function_type' parameter and move
10278 description here.
10279 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10280 declarations.
10281
10282 2018-04-26 Pedro Alves <palves@redhat.com>
10283
10284 * c-exp.y (variable production): Skip finding an alias for ifunc
10285 symbols.
10286
10287 2018-04-26 Pedro Alves <palves@redhat.com>
10288
10289 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10290
10291 2018-04-25 Pedro Alves <palves@redhat.com>
10292
10293 * infcmd.c (kill_command): Print the pid as string, not the whole
10294 thread's ptid. Add comment. s/has been killed/killed/ in output
10295 message.
10296 * remote.c (remote_detach_1): Print the pid as string, not the
10297 whole thread's ptid.
10298
10299 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10300 Sergio Durigan Junior <sergiodj@redhat.com>
10301 Pedro Alves <palves@redhat.com>
10302
10303 * infcmd.c (kill_command): Print message when inferior has
10304 been killed.
10305 * inferior.c (print_inferior_events): Remove 'static'. Set as
10306 '1'.
10307 (add_inferior): Improve message printed when
10308 'print_inferior_events' is on.
10309 (exit_inferior): Remove message printed when
10310 'print_inferior_events' is on.
10311 (detach_inferior): Improve message printed when
10312 'print_inferior_events' is on.
10313 (initialize_inferiors): Use 'add_inferior_silent' to set
10314 'current_inferior_'.
10315 * inferior.h (print_inferior_events): Declare here as
10316 'extern'.
10317 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10318 '[Detaching...]' messages when 'print_inferior_events' is on.
10319 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10320 as prefix/suffix for messages. Remove periods. Fix erroneous
10321 'Detaching after fork from child...', replace it by '... from
10322 parent...'.
10323 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10324 prefix/suffix when printing 'Detaching...' messages. Print
10325 them when 'print_inferior_events' is on.
10326 * remote.c (remote_detach_1): Print message when detaching
10327 from inferior and '!is_fork_parent'.
10328
10329 2018-04-24 Tom Tromey <tom@tromey.com>
10330
10331 * cli-out.h: Reindent.
10332
10333 2018-04-24 Tom Tromey <tom@tromey.com>
10334
10335 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10336 (cli_ui_out::do_field_string): Use fputs_filtered.
10337 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10338
10339 2018-04-23 Tom Tromey <tom@tromey.com>
10340
10341 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10342 gdb::unique_xmalloc_ptr.
10343
10344 2018-04-23 Tom Tromey <tom@tromey.com>
10345
10346 * configure: Rebuild.
10347
10348 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10349
10350 PR gdb/23095
10351 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10352 prepare_for_testing. Set normal_bp to r_debug_state if target
10353 is bsd.
10354
10355 2018-04-21 Pedro Alves <palves@redhat.com>
10356 Rajendra SY <rajendra.sy@gmail.com>
10357
10358 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10359 * remote.c (extended_remote_attach): In all-stop mode, mark the
10360 thread as executing.
10361
10362 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10363
10364 * thread.c (thread_apply_all_command): Fix comment.
10365 (thread_command): Fix comment.
10366
10367 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10368
10369 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10370 parameter.
10371 * features/aarch64-core.c (create_feature_aarch64_core):
10372 Regenerate.
10373 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10374 Likewise.
10375 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10376 Likewise.
10377 * features/i386/32bit-avx512.c
10378 (create_feature_i386_32bit_avx512): Likewise.
10379 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10380 Likewise.
10381 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10382 Likewise.
10383 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10384 Likewise.
10385 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10386 Likewise.
10387 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10388 Likewise.
10389 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10390 Likewise.
10391 * features/i386/64bit-avx512.c
10392 (create_feature_i386_64bit_avx512): Likewise.
10393 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10394 Likewise.
10395 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10396 Likewise.
10397 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10398 Likewise.
10399 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10400 Likewise.
10401 * features/i386/64bit-segments.c
10402 (create_feature_i386_64bit_segments): Likewise.
10403 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10404 Likewise.
10405 * features/i386/x32-core.c
10406 (create_feature_i386_x32_core): Likewise.
10407 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10408 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10409 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10410 * target-descriptions.c: In generated code, don't pass xml
10411 filename.
10412
10413 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10414
10415 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10416 (print_xml_feature::visit_post): Likewise.
10417 (print_xml_feature::visit): Likewise.
10418 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10419 (print_xml_feature): Add new class.
10420 * regformats/regdat.sh: Null xmltarget on feature targets.
10421 * target-descriptions.c (struct target_desc): Add xmltarget.
10422 (maintenance_check_tdesc_xml_convert): Add unittest function.
10423 (tdesc_get_features_xml): Add function to get xml.
10424 (maintenance_check_xml_descriptions): Test xml generation.
10425 * xml-tdesc.c (string_read_description_xml): Add function.
10426 * xml-tdesc.h (string_read_description_xml): Add declaration.
10427
10428 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10429
10430 * features/Makefile: Add feature marker to targets with new style
10431 target descriptions.
10432 * regformats/aarch64.dat: Regenerate.
10433 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10434 * regformats/i386/amd64-avx-linux.dat: Likewise.
10435 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10436 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10437 * regformats/i386/amd64-linux.dat: Likewise.
10438 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10439 * regformats/i386/amd64.dat: Likewise.
10440 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10441 * regformats/i386/i386-avx-linux.dat: Likewise.
10442 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10443 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10444 * regformats/i386/i386-linux.dat: Likewise.
10445 * regformats/i386/i386-mmx-linux.dat: Likewise.
10446 * regformats/i386/i386-mpx-linux.dat: Likewise.
10447 * regformats/i386/i386.dat: Likewise.
10448 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10449 * regformats/i386/x32-avx-linux.dat: Likewise.
10450 * regformats/i386/x32-linux.dat: Likewise.
10451 * regformats/tic6x-c62x-linux.dat: Likewise.
10452 * regformats/tic6x-c64x-linux.dat: Likewise.
10453 * regformats/tic6x-c64xp-linux.dat: Likewise.
10454 * regformats/regdat.sh: Parse feature marker.
10455
10456 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10457
10458 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10459 (tdesc_osabi_name): Likewise.
10460 * target-descriptions.c (tdesc_architecture_name): Add new
10461 function.
10462 (tdesc_osabi_name): Likewise.
10463
10464 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10465
10466 * common/tdesc.c (tdesc_predefined_type): Move to here.
10467 (tdesc_named_type): Likewise.
10468 (tdesc_create_vector): Likewise.
10469 (tdesc_create_struct): Likewise.
10470 (tdesc_set_struct_size): Likewise.
10471 (tdesc_create_union): Likewise.
10472 (tdesc_create_flags): Likewise.
10473 (tdesc_create_enum): Likewise.
10474 (tdesc_add_field): Likewise.
10475 (tdesc_add_typed_bitfield): Likewise.
10476 (tdesc_add_bitfield): Likewise.
10477 (tdesc_add_flag): Likewise.
10478 (tdesc_add_enum_value): Likewise.
10479 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10480 (struct tdesc_type_vector): Likewise.
10481 (struct tdesc_type_field): Likewise.
10482 (struct tdesc_type_with_fields): Likewise.
10483 (tdesc_create_enum): Add declaration.
10484 (tdesc_add_typed_bitfield): Likewise.
10485 (tdesc_add_enum_value): Likewise.
10486 * target-descriptions.c (tdesc_type_field): Move from here.
10487 (tdesc_type_builtin): Likewise.
10488 (tdesc_type_vector): Likewise.
10489 (tdesc_type_with_fields): Likewise.
10490 (tdesc_predefined_types): Likewise.
10491 (tdesc_named_type): Likewise.
10492 (tdesc_create_vector): Likewise.
10493 (tdesc_create_struct): Likewise.
10494 (tdesc_set_struct_size): Likewise.
10495 (tdesc_create_union): Likewise.
10496 (tdesc_create_flags): Likewise.
10497 (tdesc_create_enum): Likewise.
10498 (tdesc_add_field): Likewise.
10499 (tdesc_add_typed_bitfield): Likewise.
10500 (tdesc_add_bitfield): Likewise.
10501 (tdesc_add_flag): Likewise.
10502 (tdesc_add_enum_value): Likewise.
10503 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10504 (tdesc_add_typed_bitfield): Likewise.
10505 (tdesc_add_enum_value): Likewise.
10506
10507 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10508
10509 * common/tdesc.c (tdesc_feature::accept): Move to here.
10510 (tdesc_feature::operator==): Likewise.
10511 (tdesc_create_reg): Likewise.
10512 * common/tdesc.h (tdesc_type_kind): Likewise.
10513 (struct tdesc_type): Likewise.
10514 (struct tdesc_feature): Likewise.
10515 * regformats/regdat.sh: Create a feature.
10516 * target-descriptions.c (tdesc_type_kind): Move from here.
10517 (tdesc_type): Likewise.
10518 (tdesc_type_up): Likewise.
10519 (tdesc_feature): Likewise.
10520 (tdesc_create_reg): Likewise.
10521
10522 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10523
10524 * Makefile.in: Add arch/tdesc.c
10525 * common/tdesc.c: New file.
10526 * common/tdesc.h (tdesc_element_visitor): Move to here.
10527 (tdesc_element): Likewise.
10528 (tdesc_reg): Likewise.
10529 (tdesc_reg_up): Likewise.
10530 * regformats/regdef.h (reg): Add offset to constructors.
10531 * target-descriptions.c (tdesc_element_visitor): Move from here.
10532 (tdesc_element): Likewise.
10533 (tdesc_reg): Likewise.
10534 (tdesc_reg_up): Likewise.
10535
10536 2018-04-17 Tom Tromey <tom@tromey.com>
10537
10538 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10539 discriminant field.
10540
10541 2018-04-17 Tom Tromey <tom@tromey.com>
10542
10543 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10544
10545 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
10546
10547 * symtab.c (print_symbol_info): Skip printing filename and line
10548 number when `last' is NULL.
10549 (symtab_symbol_info): Use empty string instead of NULL for first
10550 invocation of print_symbol_info.
10551 (rbreak_command): Pass NULL to `last' parameter of
10552 print_symbol_info.
10553
10554 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
10555
10556 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10557 instead of nullptr.
10558
10559 2018-04-16 Pedro Alves <palves@redhat.com>
10560
10561 * MAINTAINERS (sh): Remove.
10562 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10563 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10564 (ALLDEPFILES): Remove sh64-tdep.c.
10565 * NEWS: Mentions that support for SH-5/SH64 is removed.
10566 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10567 (sh*-*-openbsd*): Ditto.
10568 (sh64-*-elf*): Remove.
10569 (sh*): Remove.
10570 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10571 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10572 * sh-tdep.c: No longer include "sh64-tdep.h".
10573 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10574 * sh64-tdep.c, sh64-tdep.h: Remove files.
10575
10576 2018-04-16 Pedro Alves <palves@redhat.com>
10577
10578 * MAINTAINERS: Remove m88k.
10579 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10580 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10581 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10582 * NEWS: Mention that support for m88k was removed.
10583 * configure.host (m88*-*-*): Remove support.
10584 * configure.nat (m88k-*-*): Remove support.
10585 * configure.tgt (m88*-*-openbsd*): Remove.
10586 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10587
10588 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
10589
10590 * configure.tgt (x86_tobjs): New variable.
10591 (amd64_tobjs, i386_tobjs): Use it.
10592
10593 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10594
10595 * symtab.c (print_symbol_info): Precede the symbol definition by
10596 the line number when available.
10597 * NEWS: Advertise this enhancement.
10598
10599 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10600
10601 * NEWS (New options): announce set/show record btrace cpu.
10602 * btrace.c: Include record-btrace.h.
10603 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10604 the vendor is unknown.
10605 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
10606 Maybe overwrite the btrace configuration's cpu.
10607 (btrace_compute_ftrace): Add cpu parameter. Update callers.
10608 (btrace_fetch): Add cpu parameter. Update callers.
10609 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10610 Maybe overwrite the btrace configuration's cpu. Skip enabling
10611 errata workarounds if the vendor is unknown.
10612 * python/py-record-btrace.c: Include record-btrace.h.
10613 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10614 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10615 * record-btrace.c (record_btrace_cpu_state_kind): New.
10616 (record_btrace_cpu): New.
10617 (set_record_btrace_cpu_cmdlist): New.
10618 (record_btrace_get_cpu): New.
10619 (require_btrace_thread, record_btrace_info)
10620 (record_btrace_resume_thread): Call record_btrace_get_cpu.
10621 (cmd_set_record_btrace_cpu_none): New.
10622 (cmd_set_record_btrace_cpu_auto): New.
10623 (cmd_set_record_btrace_cpu): New.
10624 (cmd_show_record_btrace_cpu): New.
10625 (_initialize_record_btrace): Initialize set/show record btrace cpu
10626 commands.
10627 * record-btrace.h (record_btrace_get_cpu): New.
10628
10629 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10630
10631 * record.c (set_record_command): Fix typo in message.
10632
10633 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10634
10635 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10636
10637 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
10638
10639 * infrun.c (process_event_stop_test): Call
10640 gdbarch_in_indirect_branch_thunk.
10641 * gdbarch.sh (in_indirect_branch_thunk): New.
10642 * gdbarch.c: Regenerated.
10643 * gdbarch.h: Regenerated.
10644 * x86-tdep.h: New.
10645 * x86-tdep.c: New.
10646 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10647 (HFILES_NO_SRCDIR): Add x86-tdep.h.
10648 (ALLDEPFILES): Add x86-tdep.c.
10649 * arch-utils.h (default_in_indirect_branch_thunk): New.
10650 * arch-utils.c (default_in_indirect_branch_thunk): New.
10651 * i386-tdep: Include x86-tdep.h.
10652 (i386_in_indirect_branch_thunk): New.
10653 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10654 function.
10655 * amd64-tdep: Include x86-tdep.h.
10656 (amd64_in_indirect_branch_thunk): New.
10657 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10658
10659 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10660
10661 PR gdb/23053
10662 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10663 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10664 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10665 regression.
10666
10667 2018-04-12 Tom Tromey <tom@tromey.com>
10668
10669 * rust-lang.c (rust_print_struct_def): Remove univariant code.
10670 (rust_evaluate_subexp): Likewise.
10671
10672 2018-04-12 Pedro Alves <palves@redhat.com>
10673
10674 * procfs.c (procfs_detach): Make forward declaration's prototype
10675 match definition's protototype.
10676 (proc_get_LDT_entry): Remove stale do_cleanups call.
10677
10678 2018-04-12 Pedro Alves <palves@redhat.com>
10679
10680 * target.h (target_ops::to_has_exited): Delete.
10681 (target_has_exited): Delete.
10682 * target-delegates.c: Regenerate.
10683
10684 2018-04-11 Pedro Alves <palves@redhat.com>
10685
10686 * target.c (fileio_fh_t::t): Add comment.
10687 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10688 (target_fileio_close): Handle a NULL target.
10689 (invalidate_fileio_fh): New.
10690 (target_close): Call it.
10691 * remote.c (remote_hostio_send_command): No longer check whether
10692 remote_desc is open.
10693
10694 2018-04-11 Pedro Alves <palves@redhat.com>
10695
10696 * target.c (fileio_fh_t): Make it a named struct instead of a
10697 typedef.
10698 (fileio_fh_t::is_closed): New method.
10699 (DEF_VEC_O (fileio_fh_t)): Remove.
10700 (fileio_fhandles): Now a std::vector.
10701 (is_closed_fileio_fh): Delete.
10702 (acquire_fileio_fd): Adjust. Rename parameters.
10703 (release_fileio_fd): Adjust.
10704 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10705 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10706 (target_fileio_close): Adjust.
10707
10708 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
10709
10710 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10711 index.
10712
10713 2018-04-10 Pedro Alves <palves@redhat.com>
10714
10715 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10716 (scoped_finish_thread_state): New class.
10717 * infcmd.c (run_command_1): Use it instead of finish_thread_state
10718 cleanup.
10719 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10720 (fetch_inferior_event, normal_stop): Likewise.
10721 * thread.c (finish_thread_state_cleanup): Delete.
10722
10723 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10724 Pedro Alves <palves@redhat.com>
10725
10726 * value.c: Include "selftest.h" and "common/array-view.h".
10727 (struct range) <operator ==>: New.
10728 (test_ranges_contain): New.
10729 (check_ranges_vector): New.
10730 (test_insert_into_bit_range_vector): New.
10731 (_initialize_values): Register selftests.
10732 * common/array-view.h (operator==, operator!=): New.
10733
10734 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10735
10736 * common/gdb_vecs.h (unordered_remove): Add overload that takes
10737 an iterator.
10738 * inline-frame.c: Include <algorithm>.
10739 (struct inline_state): Add constructor.
10740 (inline_state_s): Remove.
10741 (DEF_VEC_O(inline_state_s)): Remove.
10742 (inline_states): Change type to std::vector.
10743 (find_inline_frame_state): Adjust to std::vector.
10744 (allocate_inline_frame_state): Remove.
10745 (clear_inline_frame_state): Adjust to std::vector.
10746 (skip_inline_frames): Adjust to std::vector.
10747
10748 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10749
10750 * tracepoint.h (struct trace_state_variable): Add constructor.
10751 <name>: Change type to std::string.
10752 * tracepoint.c (tsv_s): Remove.
10753 (DEF_VEC_O(tsv_s)): Remove.
10754 (tvariables): Change to std::vector.
10755 (create_trace_state_variable): Adjust to std::vector.
10756 (find_trace_state_variable): Likewise.
10757 (find_trace_state_variable_by_number): Likewise.
10758 (delete_trace_state_variable): Likewise.
10759 (trace_variable_command): Adjust to std::string.
10760 (delete_trace_variable_command): Likewise.
10761 (tvariables_info_1): Adjust to std::vector.
10762 (save_trace_state_variables): Likewise.
10763 (start_tracing): Likewise.
10764 (merge_uploaded_trace_state_variables): Adjust to std::vector
10765 and std::string.
10766 * target.h (struct target_ops)
10767 <to_download_trace_state_variable>: Pass reference to
10768 trace_state_variable.
10769 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10770 * target-delegates.c: Re-generate.
10771 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10772 (mi_tsv_deleted): Likewise.
10773 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10774 * remote.c (remote_download_trace_state_variable): Change
10775 pointer to reference and adjust.
10776 * make-target-delegates (parse_argtypes): Handle references.
10777 (write_function_header): Likewise.
10778 (munge_type): Likewise.
10779
10780 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10781
10782 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10783 string_view-selftests.c.
10784 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10785 testsuite.
10786 * unittests/basic_string_view/cons/char/1.cc: Likewise.
10787 * unittests/basic_string_view/cons/char/2.cc: Likewise.
10788 * unittests/basic_string_view/cons/char/3.cc: Likewise.
10789 * unittests/basic_string_view/element_access/char/1.cc:
10790 Likewise.
10791 * unittests/basic_string_view/element_access/char/empty.cc:
10792 Likewise.
10793 * unittests/basic_string_view/element_access/char/front_back.cc:
10794 Likewise.
10795 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10796 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10797 Likewise.
10798 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10799 Likewise.
10800 * unittests/basic_string_view/modifiers/swap/char/1.cc:
10801 Likewise.
10802 * unittests/basic_string_view/operations/compare/char/1.cc:
10803 Likewise.
10804 * unittests/basic_string_view/operations/compare/char/13650.cc:
10805 Likewise.
10806 * unittests/basic_string_view/operations/copy/char/1.cc:
10807 Likewise.
10808 * unittests/basic_string_view/operations/data/char/1.cc:
10809 Likewise.
10810 * unittests/basic_string_view/operations/find/char/1.cc:
10811 Likewise.
10812 * unittests/basic_string_view/operations/find/char/2.cc:
10813 Likewise.
10814 * unittests/basic_string_view/operations/find/char/3.cc:
10815 Likewise.
10816 * unittests/basic_string_view/operations/find/char/4.cc:
10817 Likewise.
10818 * unittests/basic_string_view/operations/rfind/char/1.cc:
10819 Likewise.
10820 * unittests/basic_string_view/operations/rfind/char/2.cc:
10821 Likewise.
10822 * unittests/basic_string_view/operations/rfind/char/3.cc:
10823 Likewise.
10824 * unittests/basic_string_view/operations/substr/char/1.cc:
10825 Likewise.
10826 * unittests/basic_string_view/operators/char/2.cc: Likewise.
10827 * unittests/string_view-selftests.c: New file.
10828
10829 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10830
10831 * unittests/basic_string_view/capacity/1.cc: New file.
10832 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10833 * unittests/basic_string_view/cons/char/1.cc: New file.
10834 * unittests/basic_string_view/cons/char/2.cc: New file.
10835 * unittests/basic_string_view/cons/char/3.cc: New file.
10836 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10837 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10838 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10839 * unittests/basic_string_view/element_access/char/1.cc: New file.
10840 * unittests/basic_string_view/element_access/char/2.cc: New file.
10841 * unittests/basic_string_view/element_access/char/empty.cc: New file.
10842 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10843 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10844 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10845 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10846 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10847 * unittests/basic_string_view/include.cc: New file.
10848 * unittests/basic_string_view/inserters/char/1.cc: New file.
10849 * unittests/basic_string_view/inserters/char/2.cc: New file.
10850 * unittests/basic_string_view/inserters/char/3.cc: New file.
10851 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10852 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10853 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10854 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10855 * unittests/basic_string_view/literals/types.cc: New file.
10856 * unittests/basic_string_view/literals/values.cc: New file.
10857 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10858 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10859 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10860 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10861 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10862 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10863 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10864 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10865 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10866 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10867 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10868 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10869 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10870 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10871 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10872 * unittests/basic_string_view/operations/data/char/1.cc: New file.
10873 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10874 * unittests/basic_string_view/operations/find/char/1.cc: New file.
10875 * unittests/basic_string_view/operations/find/char/2.cc: New file.
10876 * unittests/basic_string_view/operations/find/char/3.cc: New file.
10877 * unittests/basic_string_view/operations/find/char/4.cc: New file.
10878 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10879 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10880 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10881 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10882 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10883 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10884 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10885 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10886 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10887 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10888 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10889 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10890 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10891 * unittests/basic_string_view/operators/char/2.cc: New file.
10892 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10893 * unittests/basic_string_view/range_access/char/1.cc: New file.
10894 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10895 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10896 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10897 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10898 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10899 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10900 * unittests/basic_string_view/requirements/typedefs.cc: New file.
10901 * unittests/basic_string_view/typedefs.cc: New file.
10902 * unittests/basic_string_view/types/1.cc: New file.
10903
10904 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10905
10906 * common/gdb_string_view.h: Remove libstdc++ implementation
10907 details, adjust to gdb reality.
10908 * common/gdb_string_view.tcc: Likewise.
10909 * cli/cli-script.c (struct string_view): Remove.
10910 (user_args) <m_args>: Change element type to gdb::string_view.
10911 (user_args::insert_args): Adjust.
10912
10913 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10914
10915 * common/gdb_string_view.h: New file.
10916 * common/gdb_string_view.tcc: New file.
10917
10918 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10919
10920 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10921 * configure: Re-generate.
10922
10923 2018-04-09 Pedro Alves <palves@redhat.com>
10924
10925 * gdbarch.sh: Include "observable.h" instead of "observer.h".
10926 (set_target_gdbarch): Call
10927 gdb::observers::architecture_changed.notify instead of
10928 observer_notify_architecture_changed.
10929
10930 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10931
10932 * tracepoint.c (struct current_traceframe_cleanup): Remove.
10933 (do_restore_current_traceframe_cleanup): Remove.
10934 (restore_current_traceframe_cleanup_dtor): Remove.
10935 (make_cleanup_restore_current_traceframe): Remove.
10936 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10937 New.
10938 * tracepoint.h (struct scoped_restore_current_traceframe): New.
10939 * infrun.c (fetch_inferior_event): Use
10940 scoped_restore_current_traceframe.
10941
10942 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10943
10944 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10945 Remove.
10946 <n_allocated_type_units>: Remove.
10947 <all_type_units>: Change to std::vector.
10948 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10949 to std::vector change.
10950 (dwarf2_per_objfile::get_cutu): Likewise.
10951 (dwarf2_per_objfile::get_tu): Likewise.
10952 (create_signatured_type_table_from_index): Likewise.
10953 (create_signatured_type_table_from_debug_names): Likewise.
10954 (dw2_symtab_iter_next): Likewise.
10955 (dw2_print_stats): Likewise.
10956 (dw2_expand_all_symtabs): Likewise.
10957 (dw2_expand_marked_cus): Likewise.
10958 (dw2_debug_names_iterator::next): Likewise.
10959 (dwarf2_initialize_objfile): Likewise.
10960 (add_signatured_type_cu_to_table): Likewise.
10961 (create_all_type_units): Likewise.
10962 (add_type_unit): Likewise.
10963 (struct tu_abbrev_offset): Add constructor.
10964 (build_type_psymtabs_1): Adjust to std::vector change.
10965 (print_tu_stats): Likewise.
10966 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10967 (write_debug_names): Likewise.
10968
10969 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
10970
10971 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10972 Make an std::vector.
10973 <n_comp_units>: Remove.
10974 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10975 to std::vector change.
10976 (dwarf2_per_objfile::get_cutu): Likewise.
10977 (dwarf2_per_objfile::get_cu): Likewise.
10978 (create_cus_from_index): Likewise.
10979 (create_addrmap_from_index): Likewise.
10980 (create_addrmap_from_aranges): Likewise.
10981 (dwarf2_read_index): Likewise.
10982 (dw2_find_last_source_symtab): Likewise.
10983 (dw2_map_symtabs_matching_filename): Likewise.
10984 (dw2_symtab_iter_next): Likewise.
10985 (dw2_print_stats): Likewise.
10986 (dw2_expand_all_symtabs): Likewise.
10987 (dw2_expand_symtabs_with_fullname): Likewise.
10988 (dw2_expand_marked_cus): Likewise.
10989 (dw2_map_symbol_filenames): Likewise.
10990 (create_cus_from_debug_names): Likewise.
10991 (dwarf2_read_debug_names): Likewise.
10992 (dw2_debug_names_iterator::next): Likewise.
10993 (dwarf2_initialize_objfile): Likewise.
10994 (set_partial_user): Likewise.
10995 (dwarf2_build_psymtabs_hard): Likewise.
10996 (read_comp_units_from_section): Remove arguments, adjust to
10997 std::vector change.
10998 (create_all_comp_units): Adjust to std::vector and
10999 read_comp_units_from_section changes.
11000 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11001 change.
11002 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11003 (psyms_seen_size): Likewise.
11004 (write_gdbindex): Likewise.
11005 (write_debug_names): Likewise.
11006
11007 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11008
11009 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11010 with dwarf2_per_objfile.
11011 (create_cus_from_index): Likewise.
11012 (create_signatured_type_table_from_index): Likewise.
11013 (dwarf2_read_index): Likewise.
11014 (dwarf2_initialize_objfile): Likewise.
11015 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11016 per_cu rather than get_dwarf2_per_objfile.
11017
11018 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11019
11020 * dwarf2read.h (struct signatured_type): Forward declare.
11021 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11022 New methods.
11023 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11024 (dw2_get_cutu): ...this.
11025 (dwarf2_per_objfile::get_cu): Rename from...
11026 (dw2_get_cu): ...this.
11027 (dwarf2_per_objfile::get_tu): New.
11028 (create_addrmap_from_index): Adjust.
11029 (create_addrmap_from_aranges): Adjust.
11030 (dw2_find_last_source_symtab): Adjust.
11031 (dw2_map_symtabs_matching_filename): Adjust.
11032 (dw2_symtab_iter_next): Adjust.
11033 (dw2_print_stats): Adjust.
11034 (dw2_expand_all_symtabs): Adjust.
11035 (dw2_expand_symtabs_with_fullname): Adjust.
11036 (dw2_expand_marked_cus): Adjust.
11037 (dw_expand_symtabs_matching_file_matcher): Adjust.
11038 (dw2_map_symbol_filenames): Adjust.
11039 (dw2_debug_names_iterator::next): Adjust.
11040 (dwarf2_initialize_objfile): Adjust.
11041 (set_partial_user): Adjust.
11042 (dwarf2_build_psymtabs_hard): Adjust.
11043
11044 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11045
11046 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11047 Remove unused variables.
11048 (dw2_map_symtabs_matching_filename): Likewise.
11049 (dwarf2_record_block_ranges): Likewise.
11050 (dwarf2_read_addr_index): Likewise.
11051 (follow_die_offset): Likewise.
11052
11053 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11054
11055 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11056 to symbol_file_add_main.
11057
11058 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11059
11060 PR mi/22299
11061 * mi/mi-console.c (do_fputc_async_safe): New.
11062 (mi_console_file::write_async_safe): New.
11063 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11064 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11065 New.
11066 * ui-file.c (ui_file::putstrn): Adjust call to
11067 fputstrn_unfiltered.
11068 * utils.c (printchar): Replace do_fputs and do_fprintf
11069 parameters by do_fputc.
11070 (fputstr_filtered): Adjust call to printchar.
11071 (fputstr_unfiltered): Likewise.
11072 (fputstrn_filtered): Likewise.
11073 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11074 printchar.
11075 * utils.h (do_fputc_ftype): New typedef.
11076 (fputstrn_unfiltered): Add do_fputc parameter.
11077
11078 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11079
11080 * regformats/i386/i386-avx.dat: Remove.
11081
11082 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11083
11084 PR gdb/22979
11085 * amd64-tdep.c (amd64_none_init_abi): New function.
11086 (amd64_x32_none_init_abi): New function.
11087 (_initialize_amd64_tdep): Register handlers for x86-64 and
11088 x64_32 with GDB_OSABI_NONE.
11089 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11090 GDB_OSABI_NONE osabi.
11091
11092 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11093
11094 PR gdb/22980
11095 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11096 GDB_OSABI_NONE.
11097 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11098 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11099
11100 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11101
11102 * common/byte-vector.h (char_vector): New type.
11103 * target.h (target_read_alloc): Return
11104 gdb::optional<byte_vector>.
11105 (target_read_stralloc): Return gdb::optional<char_vector>.
11106 (target_get_osdata): Return gdb::optional<char_vector>.
11107 * target.c (target_read_alloc_1): Templatize. Replacement
11108 manual memory management with vector.
11109 (target_read_alloc): Change return type, adjust.
11110 (target_read_stralloc): Change return type, adjust.
11111 (target_get_osdata): Change return type, adjust.
11112 * auxv.c (struct auxv_info) <length>: Remove.
11113 <data>: Change type to gdb::optional<byte_vector>.
11114 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11115 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11116 (target_auxv_search): Adjust.
11117 (fprint_target_auxv): Adjust.
11118 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11119 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11120 (linux_make_corefile_notes): Adjust.
11121 * osdata.c (get_osdata): Adjust.
11122 * remote.c (remote_get_threads_with_qxfer): Adjust.
11123 (remote_memory_map): Adjust.
11124 (remote_traceframe_info): Adjust.
11125 (btrace_read_config): Adjust.
11126 (remote_read_btrace): Adjust.
11127 (remote_pid_to_exec_file): Adjust.
11128 * solib-aix.c (solib_aix_get_library_list): Adjust.
11129 * solib-dsbt.c (decode_loadmap): Don't free buf.
11130 (dsbt_get_initial_loadmaps): Adjust.
11131 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11132 * solib-target.c (solib_target_current_sos): Adjust.
11133 * tracepoint.c (sdata_make_value): Adjust.
11134 * xml-support.c (xinclude_start_include): Adjust.
11135 (xml_fetch_content_from_file): Adjust.
11136 * xml-support.h (xml_fetch_another): Change return type.
11137 (xml_fetch_content_from_file): Change return type.
11138 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11139 * xml-tdesc.c (file_read_description_xml): Adjust.
11140 (fetch_available_features_from_target): Change return type.
11141 (target_fetch_description_xml): Adjust.
11142 (target_read_description_xml): Adjust.
11143
11144 2018-04-06 Tom Tromey <tom@tromey.com>
11145
11146 * value.c (~value): Update.
11147 (struct value) <contents>: Now unique_xmalloc_ptr.
11148 (value_contents_bits_eq, allocate_value_contents)
11149 (value_contents_raw, value_contents_all_raw)
11150 (value_contents_for_printing, value_contents_for_printing_const)
11151 (set_value_enclosing_type): Update.
11152
11153 2018-04-06 Tom Tromey <tom@tromey.com>
11154
11155 * value.c (range_s): Remove typedef, VEC.
11156 (struct range): Add operator<.
11157 (range_lessthan): Remove.
11158 (ranges_contain): Change type.
11159 (~value): Update.
11160 (struct value) <unavailable, optimized_out>: Now std::vector.
11161 (value_entirely_available)
11162 (value_entirely_covered_by_range_vector)
11163 (value_entirely_unavailable, value_entirely_optimized_out):
11164 Update.
11165 (insert_into_bit_range_vector): Change argument type.
11166 (find_first_range_overlap): Likewise.
11167 (struct ranges_and_idx, value_contents_bits_eq)
11168 (require_not_optimized_out, require_available): Update.
11169 (ranges_copy_adjusted): Change argument types.
11170 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11171
11172 2018-04-06 Tom Tromey <tom@tromey.com>
11173
11174 * value.c (~value): Update.
11175 (struct value) <parent>: Now a value_ref_ptr.
11176 (value_parent, set_value_parent, value_address, value_copy):
11177 Update.
11178
11179 2018-04-06 Tom Tromey <tom@tromey.com>
11180
11181 * value.c (struct value): Add constructor, destructor, and member
11182 initializers.
11183 (allocate_value_lazy, value_decref): Update.
11184
11185 2018-04-06 Tom Tromey <tom@tromey.com>
11186
11187 * value.c (struct value) <released, next>: Remove.
11188 (all_values): Now a std::vector.
11189 (allocate_value_lazy): Update.
11190 (value_next): Remove.
11191 (value_mark, value_free_to_mark, release_value)
11192 (value_release_to_mark): Update.
11193
11194 2018-04-06 Tom Tromey <tom@tromey.com>
11195
11196 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11197 (free_value_chain): Remove.
11198 * value.c (free_value_chain): Remove.
11199 (value_release_to_mark): Return a std::vector.
11200 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11201 std::vector.
11202 (check_condition): Update.
11203 * eval.c (fetch_subexp_value): Change "val_chain" to a
11204 std::vector.
11205 * breakpoint.c (update_watchpoint): Update.
11206 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11207
11208 2018-04-06 Tom Tromey <tom@tromey.com>
11209
11210 * value.h (free_all_values): Remove.
11211 * value.c (free_all_values): Remove.
11212
11213 2018-04-06 Tom Tromey <tom@tromey.com>
11214
11215 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11216 (value_history_chain, value_history_count): Remove.
11217 (value_history): New global.
11218 (record_latest_value, access_value_history, show_values)
11219 (preserve_values): Update.
11220
11221 2018-04-06 Tom Tromey <tom@tromey.com>
11222
11223 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11224 * varobj.c (varobj_set_display_format, varobj_set_value)
11225 (install_default_visualizer, construct_visualizer)
11226 (install_new_value, ~varobj, varobj_get_value_type)
11227 (my_value_of_variable, varobj_editable_p): Update.
11228 * c-varobj.c (c_describe_child, c_value_of_variable)
11229 (cplus_number_of_children, cplus_describe_child): Update.
11230 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11231 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11232 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11233
11234 2018-04-06 Tom Tromey <tom@tromey.com>
11235
11236 * printcmd.c (last_examine_address): Change type to
11237 value_ref_ptr.
11238 (do_examine, x_command): Update.
11239
11240 2018-04-06 Tom Tromey <tom@tromey.com>
11241
11242 * value.c (release_value): Update.
11243 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11244 (struct bpstats) <val>: Now a value_ref_ptr.
11245 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11246 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11247 (~watchpoint, print_it_watchpoint, watch_command_1)
11248 (invalidate_bp_value_on_memory_change): Update.
11249
11250 2018-04-06 Tom Tromey <tom@tromey.com>
11251
11252 * varobj.c (varobj_clear_saved_item)
11253 (update_dynamic_varobj_children, install_new_value, ~varobj):
11254 Update.
11255 * value.h (value_incref): Move declaration earlier.
11256 (value_decref): Rename from value_free.
11257 (struct value_ref_policy): New.
11258 (value_ref_ptr): New typedef.
11259 (struct value_deleter): Remove.
11260 (gdb_value_up): Remove typedef.
11261 (release_value): Change return type.
11262 (release_value_or_incref): Remove.
11263 * value.c (set_value_parent): Update.
11264 (value_incref): Change return type.
11265 (value_decref): Rename from value_free.
11266 (value_free_to_mark, free_all_values, free_value_chain): Update.
11267 (release_value): Return value_ref_ptr.
11268 (release_value_or_incref): Remove.
11269 (record_latest_value, set_internalvar, clear_internalvar):
11270 Update.
11271 * stack.c (info_frame_command): Don't call value_free.
11272 * python/py-value.c (valpy_dealloc, valpy_new)
11273 (value_to_value_object): Update.
11274 * printcmd.c (do_examine): Update.
11275 * opencl-lang.c (lval_func_free_closure): Update.
11276 * mi/mi-main.c (register_changed_p): Don't call value_free.
11277 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11278 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11279 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11280 value_free.
11281 * guile/scm-value.c (vlscm_free_value_smob)
11282 (vlscm_scm_from_value): Update.
11283 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11284 (frame_unwind_register_unsigned, get_frame_register_bytes)
11285 (put_frame_register_bytes): Don't call value_free.
11286 * findvar.c (address_from_register): Don't call value_free.
11287 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11288 * dwarf2loc.c (entry_data_value_free_closure)
11289 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11290 (dwarf2_evaluate_loc_desc_full): Update.
11291 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11292 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11293 (~watchpoint, watch_command_1)
11294 (invalidate_bp_value_on_memory_change): Update.
11295 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11296
11297 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11298
11299 PR gdb/23022
11300 * warning.m4: Add -Wno-error=deprecated-register.
11301 * configure: Re-generate.
11302
11303 2018-04-05 Tom Tromey <tom@tromey.com>
11304
11305 * linespec.h: Remove include of "vec.h".
11306
11307 2018-04-05 Tom Tromey <tom@tromey.com>
11308
11309 * linespec.c (typep): Remove typedef.
11310 (find_methods, find_superclass_methods): Take a std::vector.
11311 (find_method): Use std::vector.
11312
11313 2018-04-05 Tom Tromey <tom@tromey.com>
11314
11315 * utils.c (compare_strings): Remove.
11316 * utils.h (compare_strings): Remove.
11317 * objc-lang.h (find_imps): Update.
11318 * objc-lang.c (find_methods): Take a std::vector.
11319 (uniquify_strings, find_imps): Likewise.
11320 * linespec.c (find_methods): Take a std::vector.
11321 (decode_objc): Use std::vector.
11322 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11323 a std::vector.
11324 (find_method, find_function_symbols): Use std::vector.
11325
11326 2018-04-05 Tom Tromey <tom@tromey.com>
11327
11328 * completer.c (completion_tracker::completion_tracker): Remove
11329 cast.
11330 (completion_tracker::discard_completions): Likewise.
11331 * breakpoint.c (ambiguous_names_p): Remove cast.
11332 * ada-lang.c (_initialize_ada_language): Remove cast.
11333 * utils.h (streq): Update.
11334 (streq_hash): Add new declaration.
11335 * utils.c (streq): Return bool.
11336 (streq_hash): New function.
11337
11338 2018-04-05 Tom Tromey <tom@tromey.com>
11339
11340 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11341 Remove a string copy.
11342
11343 2018-04-05 Tom Tromey <tom@tromey.com>
11344
11345 * linespec.c (filter_results): Use std::vector.
11346 (decode_line_2, decode_line_full): Update.
11347
11348 2018-04-05 Tom Tromey <tom@tromey.com>
11349
11350 * linespec.c (canonical_to_fullform): Return std::string.
11351 (filter_results): Update.
11352 (struct decode_line_2_item): Add constructor.
11353 <fullform, displayform>: Now std::string.
11354 (decode_line_2_compare_items): Now a std::sort comparator.
11355 (decode_line_2): Update.
11356
11357 2018-04-05 Tom Tromey <tom@tromey.com>
11358
11359 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11360 (unexpected_linespec_error): Update.
11361 (linespec_parse_basic, parse_linespec): Update.
11362
11363 2018-04-05 Tom Tromey <tom@tromey.com>
11364
11365 * linespec.c (linespec_parse_basic): Reindent.
11366
11367 2018-04-05 Tom Tromey <tom@tromey.com>
11368
11369 * minsyms.h (iterate_over_minimal_symbols): Update.
11370 * minsyms.c (iterate_over_minimal_symbols): Take a
11371 gdb::function_view.
11372 * linespec.c (struct collect_minsyms): Remove.
11373 (compare_msyms): Now a std::sort comparator.
11374 (add_minsym): Add parameters.
11375 (search_minsyms_for_name): Update. Use std::vector.
11376
11377 2018-04-03 Tom Tromey <tom@tromey.com>
11378
11379 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11380 gdb::byte_vector.
11381
11382 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11383
11384 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11385
11386 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11387
11388 PR gdb/16959
11389 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11390 printing static type.
11391
11392 2018-04-01 Tom Tromey <tom@tromey.com>
11393
11394 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11395 (rs6000_xfer_shared_libraries): Update.
11396
11397 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11398
11399 * common/gdb_vecs.h (char_ptr): Remove.
11400 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11401
11402 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11403
11404 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11405 with std::vector.
11406 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11407
11408 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11409
11410 * tracepoint.h (struct uploaded_tp): Initialize fields.
11411 <actions, step_actions, cmd_strings>: Change type to
11412 std::vector<char *>.
11413 * tracepoint.c (get_uploaded_tp): Allocate with new.
11414 (free_uploaded_tps): Free with delete.
11415 (parse_tracepoint_definition): Adjust to std::vector change.
11416 * breakpoint.c (read_uploaded_action): Likewise.
11417 (create_tracepoint_from_upload): Likewise.
11418 * ctf.c (ctf_write_uploaded_tp): Likewise.
11419 (SET_ARRAY_FIELD): Likewise.
11420 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11421
11422 2018-03-30 Tom Tromey <tom@tromey.com>
11423
11424 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11425 std::unique_ptr.
11426 (svr4_keep_data_in_core): Update.
11427 (svr4_read_so_list): Update.
11428
11429 2018-03-30 Tom Tromey <tom@tromey.com>
11430
11431 * windows-nat.c (handle_output_debug_string, handle_exception):
11432 Update.
11433 * target.h (target_read_string): Update.
11434 * target.c (target_read_string): Change "string" to
11435 unique_xmalloc_ptr.
11436 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11437 Update.
11438 * solib-frv.c (frv_current_sos): Update.
11439 * solib-dsbt.c (dsbt_current_sos): Update.
11440 * solib-darwin.c (darwin_current_sos): Update.
11441 * linux-thread-db.c (inferior_has_bug): Update.
11442 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11443 Update. Remove alloca.
11444 * ada-lang.c (ada_main_name): Update.
11445
11446 2018-03-30 Tom Tromey <tom@tromey.com>
11447
11448 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11449 (struct dwo_file_deleter): New.
11450 (dwo_file_up): New typedef.
11451 (open_and_init_dwo_file): Use dwo_file_up.
11452 (free_dwo_file_cleanup): Remove.
11453
11454 2018-03-30 Tom Tromey <tom@tromey.com>
11455
11456 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11457 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11458
11459 2018-03-30 Tom Tromey <tom@tromey.com>
11460
11461 * dwarf2read.c (class free_cached_comp_units): New class.
11462 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11463 (free_cached_comp_units): Remove function.
11464
11465 2018-03-30 Tom Tromey <tom@tromey.com>
11466
11467 * utils.h (make_cleanup_unpush_target): Remove.
11468 * inf-ptrace.c (struct target_unpusher): New.
11469 (target_unpush_up) New typedef.
11470 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11471 target_unpush_up.
11472 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11473
11474 2018-03-27 Tom Tromey <tom@tromey.com>
11475
11476 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11477
11478 2018-03-27 Pedro Alves <palves@redhat.com>
11479 Tom Tromey <tom@tromey.com>
11480
11481 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11482 destructor. Now a class.
11483 (gdb_readline_wrapper_cleanup): Remove function.
11484 (gdb_readline_wrapper): Remove cleanups.
11485
11486 2018-03-27 Tom Tromey <tom@tromey.com>
11487
11488 * typeprint.h (struct type_print_options) <local_typedefs,
11489 global_typedefs>: Remove "struct" keyword.
11490 (class typedef_hash_table): New class.
11491 (recursively_update_typedef_hash, add_template_parameters)
11492 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11493 (find_typedef_in_hash): Don't declare.
11494 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11495 (typedef_hash_table::recursively_update): Rename from
11496 recursively_update_typedef_hash. Now a member.
11497 (typedef_hash_table::add_template_parameters): Rename from
11498 add_template_parameters. Now a member.
11499 (typedef_hash_table::typedef_hash_table): Now a constructor;
11500 rename from create_typedef_hash.
11501 (typedef_hash_table::~typedef_hash_table): Now a destructor;
11502 rename from free_typedef_hash.
11503 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11504 (do_free_global_table): Remove.
11505 (typedef_hash_table::typedef_hash_table): New constructor; renamed
11506 from copy_type_recursive.
11507 (create_global_typedef_table): Remove.
11508 (typedef_hash_table::find_global_typedef): Now a member of
11509 typedef_hash_table.
11510 (typedef_hash_table::find_typedef): Rename from
11511 find_typedef_in_hash; now a member.
11512 (whatis_exp): Update.
11513 * extension.h (struct ext_lang_type_printers): Add constructor and
11514 destructor.
11515 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11516 declare.
11517 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11518 Now a constructor; rename from start_ext_lang_type_printers.
11519 (ext_lang_type_printers): Now a destructor; rename from
11520 free_ext_lang_type_printers.
11521 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11522 Update.
11523 (c_type_print_base_struct_union): Update. Remove cleanups.
11524
11525 2018-03-27 Tom Tromey <tom@tromey.com>
11526
11527 * dwarf-index-write.c: Include <cmath>.
11528
11529 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11530
11531 * NEWS: Add entry describing new "set|show varsize-limit" command.
11532 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11533 command.
11534 * printcmd.c (_initialize_printcmd): Add "set var" alias of
11535 "set variable".
11536
11537 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
11538
11539 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11540 dwarf-index-write.c
11541 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11542 * dwarf-index-common.c: New file.
11543 * dwarf-index-common.h: New file.
11544 * dwarf-index-write.c: New file.
11545 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11546 (struct dwarf2_section_info): Move from here.
11547 (dwarf2_section_info_def): Likewise.
11548 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11549 (offset_type): Likewise.
11550 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11551 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11552 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11553 (byte_swap): Likewise.
11554 (MAYBE_SWAP): Likewise.
11555 (dwarf2_per_cu_ptr): Likewise.
11556 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11557 (struct tu_stats): Likewise.
11558 (struct dwarf2_per_objfile): Likewise.
11559 (struct dwarf2_per_cu_data): Likewise.
11560 (struct signatured_type): Likewise.
11561 (sig_type_ptr): Likewise.
11562 (DEF_VEC_P (sig_type_ptr)): Likewise.
11563 (INDEX4_SUFFIX): Likewise.
11564 (INDEX5_SUFFIX): Likewise.
11565 (DEBUG_STR_SUFFIX): Likewise.
11566 (dwarf2_read_section): Make non-static.
11567 (mapped_index_string_hash): Move from here.
11568 (dwarf5_djb_hash): Likewise.
11569 (file_write): Likewise.
11570 (class data_buf): Likewise.
11571 (struct symtab_index_entry): Likewise.
11572 (struct mapped_symtab): Likewise.
11573 (find_slot): Likewise.
11574 (hash_expand): Likewise.
11575 (add_index_entry): Likewise.
11576 (uniquify_cu_indices): Likewise.
11577 (class c_str_view): Likewise.
11578 (class c_str_view_hasher): Likewise.
11579 (class vector_hasher): Likewise.
11580 (write_hash_table): Likewise.
11581 (psym_index_map): Likewise.
11582 (struct addrmap_index_data): Likewise.
11583 (add_address_entry): Likewise.
11584 (add_address_entry_worker): Likewise.
11585 (write_address_map): Likewise.
11586 (symbol_kind): Likewise.
11587 (write_psymbols): Likewise.
11588 (struct signatured_type_index_data): Likewise.
11589 (write_one_signatured_type): Likewise.
11590 (recursively_count_psymbols): Likewise.
11591 (recursively_write_psymbols): Likewise.
11592 (class debug_names): Likewise.
11593 (check_dwarf64_offsets): Likewise.
11594 (psyms_seen_size): Likewise.
11595 (write_gdbindex): Likewise.
11596 (write_debug_names): Likewise.
11597 (assert_file_size): Likewise.
11598 (write_psymtabs_to_index): Likewise.
11599 (save_gdb_index_command): Likewise.
11600 (_initialize_dwarf2_read): Don't register the "save gdb-index"
11601 command.
11602 * dwarf2read.h: New file.
11603
11604 2018-03-27 Joel Brobecker <brobecker@adacore.com>
11605
11606 PR gdb/22670
11607 * dwarf2read.c (dwarf2_physname): Do not return the demangled
11608 symbol name if the CU's language stores symbol names in linkage
11609 format.
11610 * language.h (struct language_defn)
11611 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
11612 all instances of this struct.
11613
11614 2018-03-26 Tom Tromey <tom@tromey.com>
11615
11616 * stack.c (backtrace_command_1): Remove verbose code.
11617
11618 2018-03-26 Tom Tromey <tom@tromey.com>
11619
11620 * python/py-framefilter.c (py_print_type): Don't catch
11621 exceptions. Return void.
11622 (py_print_value): Likewise.
11623 (py_print_single_arg): Likewise.
11624 (enumerate_args): Don't catch exceptions.
11625 (py_print_args): Likewise.
11626 (py_print_frame): Likewise.
11627 (gdbpy_apply_frame_filter): Catch exceptions here.
11628
11629 2018-03-26 Tom Tromey <tom@tromey.com>
11630
11631 * stack.c (_initialize_stack): Remove trailing newlines from help
11632 text. Add "Usage" line to "backtrace" help.
11633
11634 2018-03-26 Tom Tromey <tom@tromey.com>
11635
11636 PR python/16486:
11637 * python/py-framefilter.c (py_print_args): Call wrap_hint.
11638
11639 2018-03-26 Tom Tromey <tom@tromey.com>
11640
11641 * python/py-framefilter.c (py_print_single_arg): Return
11642 EXT_LANG_BT_ERROR from catch.
11643
11644 2018-03-26 Tom Tromey <tom@tromey.com>
11645
11646 PR backtrace/15584:
11647 * stack.c (backtrace_command_1): Move some code into no-filters
11648 "if".
11649
11650 2018-03-26 Tom Tromey <tom@tromey.com>
11651
11652 * python/py-framefilter.c (throw_quit_or_print_exception): New
11653 function.
11654 (gdbpy_apply_frame_filter): Use it.
11655
11656 2018-03-26 Tom Tromey <tom@tromey.com>
11657
11658 PR cli/17716:
11659 * python/py-framefilter.c (py_print_type, py_print_value)
11660 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11661 RETURN_MASK_ERROR.
11662
11663 2018-03-26 Tom Tromey <tom@tromey.com>
11664
11665 * python/py-framefilter.c (enumerate_args): Use
11666 gdb::unique_xmalloc_ptr.
11667
11668 2018-03-26 Tom Tromey <tom@tromey.com>
11669
11670 * python/py-framefilter.c (py_print_frame): Return
11671 EXT_LANG_BT_OK.
11672 (gdbpy_apply_frame_filter): Update comment.
11673 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11674 Remove.
11675 <EXT_LANG_BT_NO_FILTERS>: Change value.
11676
11677 2018-03-26 Tom Tromey <tom@tromey.com>
11678
11679 PR backtrace/15582:
11680 * stack.c (backtrace_command): Parse "hide" argument.
11681 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11682 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11683 constant.
11684
11685 2018-03-26 Tom Tromey <tom@tromey.com>
11686
11687 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11688 add "flags".
11689 (backtrace_command): Remove "fulltrace", add "flags".
11690
11691 2018-03-26 Tom Tromey <tom@tromey.com>
11692
11693 * stack.c (backtrace_command): Rewrite command line parsing.
11694
11695 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11696
11697 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11698
11699 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
11700
11701 * filename-seen-cache.h: Add include guard.
11702
11703 2018-03-26 Keith Seitz <keiths@redhat.com>
11704
11705 * symfile.c (place_section): Remove "struct" from section_addr_info
11706 in comment.
11707 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11708 "struct" keyword from section_addr_info.
11709
11710 2018-03-26 Alan Hayward <alan.hayward@arm.com>
11711
11712 * regformats/regdef.h (reg): Add constructors.
11713
11714 2018-03-25 Pedro Alves <palves@redhat.com>
11715
11716 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11717 if then/else bodies in var_func_name extraction.
11718
11719 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
11720
11721 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11722 lookup_minimal_symbol() to find symbol entry.
11723 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11724
11725 2018-03-23 Keith Seitz <keiths@redhat.com>
11726
11727 PR c++/22968
11728 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11729 nested type definitions for C++, too.
11730
11731 2018-03-23 Tom Tromey <tom@tromey.com>
11732
11733 * machoread.c (struct oso_el): Add a constructor. Don't define as
11734 a typedef.
11735 (macho_register_oso): Remove.
11736 (macho_symtab_read): Take a std::vector.
11737 (oso_el_compare_name): Now a std::sort comparator.
11738 (macho_symfile_read_all_oso): Take a std::vector.
11739 (macho_symfile_read): Use std::vector. Remove cleanups.
11740
11741 2018-03-22 Tom Tromey <tom@tromey.com>
11742
11743 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11744 (record_full_goto_bookmark): Use std::string.
11745
11746 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11747
11748 PR tdep/18295
11749 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11750 a single mask.
11751
11752 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11753
11754 * rs6000-tdep.c (store_insn_p): New function.
11755 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11756 and cr_reg to their unshifted values. Use store_insn_p to
11757 match LR saves using either R1 or fdata->alloca_reg. Use
11758 store_insn_p to match CR saves. Set alloca_reg_offset
11759 when alloca_reg and framep are set. Remove lr_reg shift
11760 when assigning to fdata->lr_register.
11761
11762 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
11763
11764 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11765 command line args instead of emitting a warning.
11766
11767 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11768
11769 * tracepoint.h (struct static_tracepoint_marker): Initialize
11770 fields, define default constructor, move constructor and move
11771 assignment, disable the rest.
11772 <str_id, extra>: Make std::string.
11773 (release_static_tracepoint_marker): Remove.
11774 (free_current_marker): Remove.
11775 * tracepoint.c (free_current_marker): Remove.
11776 (parse_static_tracepoint_marker_definition): Adjust to
11777 std::string, use new hex2str overload.
11778 (release_static_tracepoint_marker): Remove.
11779 (print_one_static_tracepoint_marker): Get marker by reference
11780 and adjust to std::string.
11781 (info_static_tracepoint_markers_command): Adjust to std::vector
11782 changes
11783 * target.h (static_tracepoint_marker_p): Remove typedef.
11784 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11785 (struct target_ops) <to_static_tracepoint_marker_at>: Return
11786 bool.
11787 <to_static_tracepoint_markers_by_strid>: Return std::vector.
11788 * target-debug.h
11789 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11790 (target_debug_print_std_vector_static_tracepoint_marker): New.
11791 (target_debug_print_struct_static_tracepoint_marker_p): Rename
11792 to...
11793 (target_debug_print_static_tracepoint_marker_p): ... this.
11794 * target-delegates.c: Re-generate.
11795 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11796 Make std::string.
11797 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11798 (decode_static_tracepoint_spec): Adjust to std::vector.
11799 (tracepoint_print_one_detail): Adjust to std::string.
11800 (strace_marker_decode_location): Adjust to std::string.
11801 (update_static_tracepoint): Adjust to std::string, remove call
11802 to release_static_tracepoint_marker.
11803 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11804 Adjust to std::vector.
11805 * remote.c (remote_static_tracepoint_marker_at): Return bool.
11806 (remote_static_tracepoint_markers_by_strid): Adjust to
11807 std::vector.
11808 * common/rsp-low.h (hex2str): New overload with explicit count
11809 of bytes.
11810 * common/rsp-low.c (hex2str): New overload with explicit count
11811 of bytes.
11812 * unittests/rsp-low-selftests.c (test_hex2str): New function.
11813 (_initialize_rsp_low_selftests): Add test_hex2str test.
11814 * unittests/tracepoint-selftests.c
11815 (test_parse_static_tracepoint_marker_definition): Adjust to
11816 std::string.
11817
11818 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11819
11820 * tracepoint.c (parse_static_tracepoint_marker_definition):
11821 Consider case where the definition is followed by more
11822 definitions.
11823 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11824 tracepoint-selftests.c.
11825 * unittests/tracepoint-selftests.c: New.
11826
11827 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
11828
11829 * MAINTAINERS (Write After Approval): Add Pedro Franco de
11830 Carvalho.
11831
11832 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11833
11834 * symtab.c (find_pc_sect_line): fixed indentation.
11835
11836 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
11837
11838 * symtab.c (find_pc_sect_line): now uses binary search.
11839
11840 2018-03-19 Tom Tromey <tom@tromey.com>
11841
11842 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11843 "IDENT" production.
11844
11845 2018-03-19 Pedro Alves <palves@redhat.com>
11846 Tom Tromey <tom@tromey.com>
11847
11848 * unittests/observable-selftests.c: New file.
11849 * common/observable.h: New file.
11850 * observable.h: New file.
11851 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11852 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11853 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11854 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11855 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11856 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11857 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11858 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11859 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11860 python/py-breakpoint.c, python/py-finishbreakpoint.c,
11861 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11862 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11863 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11864 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11865 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11866 tui/tui-interp.c, valops.c: Update all users.
11867 * tui/tui-hooks.c (tui_bp_created_observer)
11868 (tui_bp_deleted_observer, tui_bp_modified_observer)
11869 (tui_inferior_exit_observer, tui_before_prompt_observer)
11870 (tui_normal_stop_observer, tui_register_changed_observer):
11871 Remove.
11872 (tui_observers_token): New global.
11873 (attach_or_detach, tui_attach_detach_observers): New functions.
11874 (tui_install_hooks, tui_remove_hooks): Use
11875 tui_attach_detach_observers.
11876 * record-btrace.c (record_btrace_thread_observer): Remove.
11877 (record_btrace_thread_observer_token): New global.
11878 * observer.sh: Remove.
11879 * observer.c: Rename to observable.c.
11880 * observable.c (namespace gdb_observers): Define new objects.
11881 (observer_debug): Move into gdb_observers namespace.
11882 (struct observer, struct observer_list, xalloc_observer_list_node)
11883 (xfree_observer_list_node, generic_observer_attach)
11884 (generic_observer_detach, generic_observer_notify): Remove.
11885 (_initialize_observer): Update.
11886 Don't include observer.inc.
11887 * Makefile.in (generated_files): Remove observer.h, observer.inc.
11888 (clean mostlyclean): Likewise.
11889 (observer.h, observer.inc): Remove targets.
11890 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11891 (COMMON_SFILES): Use observable.c, not observer.c.
11892 * .gitignore: Remove observer.h.
11893
11894 2018-03-18 Tom Tromey <tom@tromey.com>
11895
11896 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11897 gdb::def_vector.
11898 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11899
11900 2018-03-17 Tom Tromey <tom@tromey.com>
11901
11902 * auto-load.c (auto_load_objfile_script_1): Use std::string.
11903
11904 2018-03-17 Tom Tromey <tom@tromey.com>
11905
11906 * target.c (class scoped_target_fd): New.
11907 (target_fileio_close_cleanup): Remove.
11908 (target_fileio_read_alloc_1): Use scoped_target_fd.
11909
11910 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
11911
11912 * silent-rules.mk: New.
11913 * Makefile.in: Include silent-rules.mk
11914 (srcdir, VPATH, top_srcdir): Move up.
11915 (COMPILE): Add ECHO_CXX.
11916 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11917 (init.c): Add ECHO_INIT_C.
11918 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11919 (version.c): Add ECHO_GEN.
11920 (printcmd.o): Add ECHO_CXX.
11921 (target-float.o): Add ECHO_CXX.
11922 (ada-exp.o): Add ECHO_CXX.
11923 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11924 (insight$(EXEEXT)): Add ECHO_CXXLD.
11925 * gnulib/configure.ac: Add AM_SILENT_RULES.
11926 * gnulib/aclocal.m4: Re-generate.
11927 * gnulib/configure: Re-generate.
11928 * gnulib/import/Makefile.in: Re-generate.
11929
11930 2018-03-16 Tom Tromey <tom@tromey.com>
11931
11932 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11933 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11934 * utils.c (do_free_section_addr_info)
11935 (make_cleanup_free_section_addr_info): Remove.
11936 * symfile.h (struct other_sections): Add constructor.
11937 (struct section_addr_info): Remove.
11938 (section_addr_info): New typedef.
11939 (struct sym_fns) <sym_offsets>: Change type of parameter.
11940 (build_section_addr_info_from_objfile)
11941 (relative_addr_info_to_section_offsets, addr_info_make_relative)
11942 (default_symfile_offsets, symbol_file_add)
11943 (symbol_file_add_from_bfd)
11944 (build_section_addr_info_from_section_table): Update.
11945 (alloc_section_addr_info, free_section_addr_info): Don't declare.
11946 * symfile.c (alloc_section_addr_info): Remove.
11947 (build_section_addr_info_from_section_table): Change return type.
11948 Update.
11949 (build_section_addr_info_from_bfd)
11950 (build_section_addr_info_from_objfile): Likewise.
11951 (free_section_addr_info): Remove.
11952 (relative_addr_info_to_section_offsets): Change type of "addrs".
11953 (addrs_section_compar): Now a std::sort comparator.
11954 (addrs_section_sort): Change return type.
11955 (addr_info_make_relative): Change type of "addrs". Update.
11956 (default_symfile_offsets, syms_from_objfile_1)
11957 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11958 (symbol_file_add_separate): Update.
11959 (symbol_file_add): Change type of "addrs". Update.
11960 (add_symbol_file_command): Update. Remove cleanups.
11961 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
11962 cleanups.
11963 * symfile-debug.c (debug_sym_offsets): Change type of "info".
11964 * solib.c (solib_read_symbols): Update.
11965 * objfiles.c (objfile_relocate): Update. Remove cleanups.
11966 * machoread.c (macho_symfile_offsets): Update.
11967 * jit.c (jit_bfd_try_read_symtab): Update.
11968
11969 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
11970
11971 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11972 unittests/utils-selftests.c.
11973 * unittests/utils-selftests.c: New file.
11974
11975 2018-03-14 Tom Tromey <tom@tromey.com>
11976
11977 PR cli/14977:
11978 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11979 for NULL.
11980
11981 2018-03-14 Tom Tromey <tom@tromey.com>
11982
11983 PR cli/19918:
11984 * printcmd.c (printf_pointer): Allow "-" in format.
11985
11986 2018-03-14 Tom Tromey <tom@tromey.com>
11987
11988 * printcmd.c (_initialize_printcmd): Add usage to printf.
11989
11990 2018-03-14 Yao Qi <qiyao@sourceware.org>
11991
11992 * MAINTAINERS: Update my email address.
11993
11994 2018-03-13 Tom Tromey <tom@tromey.com>
11995
11996 * machoread.c (macho_check_dsym): Change filenamep to a
11997 std::string*.
11998 (macho_symfile_read): Update.
11999 * symfile.c (load_command): Use std::string.
12000
12001 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12002
12003 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12004 to error message string.
12005 (riscv_register_name): Use xsnprintf instead of sprintf.
12006 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12007 internal_error.
12008 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12009 error.
12010 (riscv_push_dummy_call): Likewise.
12011
12012 2018-03-12 Tom Tromey <tom@tromey.com>
12013
12014 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12015 Use gdb::byte_vector.
12016 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12017
12018 2018-03-12 Yao Qi <yao.qi@linaro.org>
12019
12020 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12021 parameter type to readable_regcache.
12022 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12023 the declaration.
12024
12025 2018-03-11 Tom Tromey <tom@tromey.com>
12026
12027 * dwarf2read.c (struct nextfield): Add initializers.
12028 (struct nextfnfield): Remove.
12029 (struct fnfieldlist): Add initializers. Remove "length" and
12030 "head", use std::vector.
12031 (struct decl_field_list): Remove.
12032 (struct field_info): Add initializers.
12033 <fields, baseclasses>: Now std::vector.
12034 <nbaseclasses, nfnfields, typedef_field_list_count,
12035 nested_types_list_count>: Remove.
12036 (dwarf2_add_field, dwarf2_add_type_defn)
12037 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12038 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12039 (process_structure_scope): Update.
12040
12041 2018-03-11 Tom Tromey <tom@tromey.com>
12042
12043 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12044 for use by std::sort.
12045 (build_type_psymtabs_1): Use std::vector.
12046
12047 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12048
12049 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12050 and LIBMPFR in the printed configuration.
12051
12052 2018-03-08 Tom Tromey <tom@tromey.com>
12053
12054 * source.c (get_filename_and_charpos): Use scoped_fd.
12055 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12056 (procfs_pidlist): Likewise.
12057 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12058 (iterate_over_mappings): Likewise.
12059
12060 2018-03-08 Tom Tromey <tom@tromey.com>
12061
12062 * infcall.c (struct call_return_meta_info)
12063 <stack_temporaries_enabled>: Remove.
12064 (get_call_return_value, call_function_by_hand_dummy): Update.
12065 * thread.c (disable_thread_stack_temporaries): Remove.
12066 (enable_thread_stack_temporaries): Remove.
12067 (thread_stack_temporaries_enabled_p): Return bool.
12068 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12069 (get_last_thread_stack_temporary): Update.
12070 * eval.c (evaluate_subexp): Update.
12071 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12072 class, not a function.
12073 (value_ptr, value_vec): Remove typedefs.
12074 (class thread_info) <stack_temporaries_enabled>: Now bool.
12075 <stack_temporaries>: Now a std::vector.
12076 (thread_stack_temporaries_enabled_p)
12077 (value_in_thread_stack_temporaries): Return bool.
12078
12079 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12080
12081 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12082 (getpkt_or_notif_sane_1): Likewise.
12083
12084 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12085
12086 * build-id.c (build_id_to_debug_bfd): Use std::string.
12087
12088 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12089
12090 * build-id.c (find_separate_debug_file_by_buildid): Return
12091 std::string.
12092 * build-id.h (find_separate_debug_file_by_buildid): Return
12093 std::string.
12094 * coffread.c (coff_symfile_read): Adjust to std::string.
12095 * elfread.c (elf_symfile_read): Adjust to std::string.
12096 * symfile.c (separate_debug_file_exists): Change parameter to
12097 std::string.
12098 (find_separate_debug_file): Return std::string.
12099 (find_separate_debug_file_by_debuglink): Return std::string.
12100 * symfile.h (find_separate_debug_file_by_debuglink): Return
12101 std::string.
12102
12103 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12104
12105 * common/xml-utils.c (xml_escape_text): Move code to...
12106 (xml_escape_text_append): ... this new function.
12107 * common/xml-utils.h (xml_escape_text_append): New declaration.
12108 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12109 New function.
12110 (_initialize_xml_utils): register test_xml_escape_text_append as
12111 a selftest.
12112
12113 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12114
12115 * defs.h: Remove MAX_REGISTER_SIZE.
12116 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12117 asserts.
12118 * python/py-unwind.c (pyuw_sniffer): Likewise.
12119
12120 2018-03-07 Tom Tromey <tom@tromey.com>
12121
12122 * linux-tdep.c (linux_info_proc): Update.
12123 * target.h (struct target_ops) <to_fileio_readlink>: Return
12124 optional<string>.
12125 (target_fileio_readlink): Return optional<string>.
12126 * remote.c (remote_hostio_readlink): Return optional<string>.
12127 * inf-child.c (inf_child_fileio_readlink): Return
12128 optional<string>.
12129 * target.c (target_fileio_readlink): Return optional<string>.
12130
12131 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12132
12133 * regcache.c (cooked_read_test): Add riscv to the list of
12134 architectures that have a save_reggroup.
12135
12136 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12137
12138 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12139 value is not a dynamic class object.
12140
12141 2018-03-06 Tom Tromey <tom@tromey.com>
12142
12143 * rust-exp.y: Formatting fixes.
12144
12145 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12146
12147 * riscv-tdep.c (riscv_register_name): Remove target description
12148 support.
12149 (riscv_gdbarch_init): Remove target description check.
12150
12151 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12152
12153 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12154 comment.
12155 * riscv-tdep.h: Likewise.
12156
12157 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12158
12159 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12160 (riscv_pseudo_register_write): Delete.
12161 (riscv_gdbarch_init): Remove all use of pseudo registers.
12162
12163 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12164
12165 * record-btrace.c (btrace_print_lines): Replace cleanup
12166 parameter with RAII equivalents.
12167 (btrace_insn_history): Replace cleanup with RAII equivalents.
12168 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12169 make_cleanup_ui_out_tuple_begin_end): Remove.
12170 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12171 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12172 make_cleanup_ui_out_list_begin_end): Remove.
12173
12174 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12175
12176 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12177 parameter types to std::vector. Use bool.
12178 (record_btrace_wait): Replace VEC(tp_t) with
12179 std::vector<thread_info *>.
12180 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12181
12182 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12183
12184 * record-btrace.c (record_btrace_disable_callback): Remove.
12185 (struct scoped_btrace_disable): New.
12186 (record_btrace_open): Use scoped_btrace_disable.
12187
12188 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12189
12190 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12191 reading values from registers.
12192
12193 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12194
12195 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12196 where appropriate.
12197
12198 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12199
12200 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12201 change parameter type. Use GDB's print functions, and use
12202 core_addr_to_string where appropriate.
12203 (riscv_push_dummy_call): Use core_addr_to_string where
12204 appropriate, update call to riscv_print_arg_location, and reindent
12205 a few lines.
12206 (riscv_return_value): Update call to riscv_print_arg_location.
12207
12208 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12209 Tim Newsome <tim@sifive.com>
12210 Albert Ou <a0u@eecs.berkeley.edu>
12211 Darius Rad <darius@bluespec.com>
12212
12213 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12214 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12215 (ALLDEPFILES): Add riscv-tdep.c
12216 * configure.tgt: Add riscv support.
12217 * riscv-tdep.c: New file.
12218 * riscv-tdep.h: New file.
12219 * NEWS: Mention new target.
12220 * MAINTAINERS: Add entry for riscv.
12221
12222 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12223
12224 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12225 fields within aggregates.
12226
12227 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12228
12229 * record-btrace.c (btrace_print_lines): Change type of flags to
12230 gdb_disassembly_flags.
12231
12232 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12233
12234 * fbsd-nat.c: Include "inf-ptrace.h".
12235 (USE_SIGTRAP_SIGINFO): Conditionally define.
12236 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12237 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12238 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12239 function.
12240 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12241 Likewise.
12242 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12243 Likewise.
12244 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12245 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12246 "supports_stopped_by_hw_breakpoint" target methods.
12247
12248 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12249
12250 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12251 * fbsd-nat.c (debug_fbsd_nat): New variable.
12252 (show_fbsd_nat_debug): New function.
12253 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12254 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12255
12256 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12257
12258 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12259 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12260 prototype.
12261 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12262 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12263 method.
12264
12265 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12266
12267 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12268 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12269
12270 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12271
12272 * charset.c (struct charset_vector): New.
12273 (charsets): Change type to charset_vector.
12274 (find_charset_names): Adjust.
12275 (add_one): Adjust.
12276 (_initialize_charset): Adjust.
12277
12278 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12279
12280 * progspace.h (struct program_space) <deleted_solibs>: Change
12281 type to std::vector<std::string>.
12282 * progspace.c (clear_program_space_solib_cache): Adjust.
12283 * breakpoint.c (print_solib_event): Adjust.
12284 (check_status_catch_solib): Adjust.
12285 * solib.c (update_solib_list): Adjust.
12286 * ui-out.h (class ui_out) <field_string>: New overload.
12287 * ui-out.c (ui_out::field_string): New overload.
12288
12289 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12290
12291 * progspace.h (struct program_space): Add constructor and
12292 destructor, initialize fields.
12293 (add_program_space): Remove.
12294 * progspace.c (add_program_space): Rename to...
12295 (program_space::program_space): ... this.
12296 (release_program_space): Rename to...
12297 (program_space::~program_space): ... this.
12298 (delete_program_space): Use delete to delete program_space.
12299 (initialize_progspace): Use new to allocate program_space.
12300 * inferior.c (add_inferior_with_spaces): Likewise.
12301 (clone_inferior_command): Likewise.
12302 * infrun.c (follow_fork_inferior): Likewise.
12303 (handle_vfork_child_exec_or_exit): Likewise.
12304
12305 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12306
12307 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12308 (delim_string_to_char_ptr_vec): Return std::vector of
12309 gdb::unique_xmalloc_ptr.
12310 (dirnames_to_char_ptr_vec_append): Take std::vector of
12311 gdb::unique_xmalloc_ptr.
12312 (dirnames_to_char_ptr_vec): Return std::vector of
12313 gdb::unique_xmalloc_ptr.
12314 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12315 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12316 (delim_string_to_char_ptr_vec): Return an std::vector of
12317 gdb::unique_xmalloc_ptr, adjust the code.
12318 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12319 gdb::unique_xmalloc_ptr, adjust the code.
12320 (dirnames_to_char_ptr_vec): Return an std::vector of
12321 gdb::unique_xmalloc_ptr, adjust the code.
12322 * auto-load.c (auto_load_safe_path_vec): Change type to
12323 std::vector of gdb::unique_xmalloc_ptr.
12324 (auto_load_expand_dir_vars): Return an std::vector of
12325 gdb::unique_xmalloc_ptr, adjust the code.
12326 (auto_load_safe_path_vec_update): Adjust.
12327 (filename_is_in_auto_load_safe_path_vec): Adjust.
12328 (auto_load_objfile_script_1): Adjust.
12329 * build-id.c (build_id_to_debug_bfd): Adjust.
12330 * linux-thread-db.c (thread_db_load_search): Adjust.
12331 * source.c (add_path): Adjust.
12332 (openp): Adjust.
12333 * symfile.c (find_separate_debug_file): Adjust.
12334 * utils.c (do_free_char_ptr_vec): Remove.
12335 (make_cleanup_free_char_ptr_vec): Remove.
12336
12337 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12338
12339 PR gdb/22907
12340 * common/pathstuff.c: Conditionally include "<windows.h>".
12341
12342 2018-03-01 Georg Sauthoff <mail@georg.so>
12343
12344 PR gdb/22888
12345 * gcore.in: Quote variables and switch interpreter to bash.
12346
12347 2018-03-01 Tom Tromey <tom@tromey.com>
12348
12349 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12350 assertion. Add assertion for discriminant_index.
12351 (quirk_rust_enum): Use correct base type name in univariant case.
12352
12353 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12354
12355 * record.c (get_call_history_modifiers): Return a
12356 record_print_flags.
12357 (cmd_record_call_history): Adjust.
12358 * record-btrace.c (record_btrace_call_history): Adjust.
12359 (record_btrace_call_history_range): Adjust.
12360 (record_btrace_call_history_from): Adjust.
12361 * target-debug.h (target_debug_print_record_print_flags): New.
12362 * target-delegates.c: Re-generate.
12363 * target.c (target_call_history): Change flags type.
12364 (target_call_history_from): Likewise.
12365 (target_call_history_range): Likewise.
12366 * target.h (struct target_ops) <target_call_history>: Likewise.
12367 (target_call_history_from): Likewise.
12368 (target_call_history_range): Likewise.
12369
12370 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12371 Simon Marchi <simon.marchi@polymtl.ca>
12372
12373 * common/common-utils.c: Include "sys/stat.h".
12374 (is_regular_file): Move here from "source.c"; change return
12375 type to "bool".
12376 * common/common-utils.h (is_regular_file): New prototype.
12377 * common/pathstuff.c (contains_dir_separator): New function.
12378 * common/pathstuff.h (contains_dir_separator): New prototype.
12379 * source.c: Don't include "sys/stat.h".
12380 (is_regular_file): Move to "common/common-utils.c".
12381
12382 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12383
12384 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12385 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12386 * auto-load.c: Include "common/pathstuff.h".
12387 * common/common-def.h (current_directory): Move here.
12388 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12389 function.
12390 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12391 prototype.
12392 * common/pathstuff.c: New file.
12393 * common/pathstuff.h: New file.
12394 * compile/compile.c: Include "common/pathstuff.h".
12395 * defs.h (current_directory): Move to "common/common-defs.h".
12396 * dwarf2read.c: Include "common/pathstuff.h".
12397 * exec.c: Likewise.
12398 * guile/scm-safe-call.c: Likewise.
12399 * linux-thread-db.c: Likewise.
12400 * main.c: Likewise.
12401 * nto-tdep.c: Likewise.
12402 * objfiles.c: Likewise.
12403 * source.c: Likewise.
12404 * symtab.c: Likewise.
12405 * utils.c: Include "common/pathstuff.h".
12406 (gdb_realpath): Move to "common/pathstuff.c".
12407 (gdb_realpath_keepfile): Likewise.
12408 (gdb_abspath): Likewise.
12409 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12410 (gdb_realpath_keepfile): Likewise.
12411 (gdb_abspath): Likewise.
12412
12413 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12414
12415 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12416 wildcard process pid for super_resume for kernels with a
12417 specific bug.
12418
12419 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12420
12421 * compile/compile.c (get_args): Add additional comments
12422 explaining function.
12423
12424 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12425 Tom Tromey <tom@tromey.com>
12426
12427 * target.h (memory_write_request_s): Remove typedef. Don't define
12428 VEC.
12429 (target_write_memory_blocks): Change argument to std::vector.
12430 (struct memory_write_request): Add constructor.
12431 * target-memory.c (compare_block_starting_address): Return bool.
12432 Change argument types.
12433 (claim_memory): Change arguments to use std::vector.
12434 (split_regular_and_flash_blocks, blocks_to_erase)
12435 (compute_garbled_blocks): Likewise.
12436 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12437 (target_write_memory_blocks): Change argument to std::vector.
12438 * symfile.c (struct load_section_data): Add constructor and
12439 destructor. Use std::vector for "requests".
12440 (struct load_progress_data): Add initializers.
12441 (load_section_callback): Update. Use "new".
12442 (clear_memory_write_data): Remove.
12443 (generic_load): Update.
12444
12445 2018-02-27 Alan Hayward <alan.hayward@arm.com>
12446
12447 * arch/aarch64.h: Use common/tdesc.h.
12448
12449 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12450
12451 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12452 architecture with a 64-bit ABI.
12453
12454 2018-02-26 Maciej W. Rozycki <macro@mips.com>
12455
12456 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12457 ahead of target description loading.
12458
12459 2018-02-26 Tom Tromey <tom@tromey.com>
12460
12461 * stack.c (backtrace_command_1): Update.
12462 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12463 of "flags".
12464 * python/py-framefilter.c (py_print_frame)
12465 (gdbpy_apply_frame_filter): Change type of "flags".
12466 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12467 of "flags".
12468 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12469 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12470 * extension.h (enum frame_filter_flag): Rename from
12471 frame_filter_flags.
12472 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12473 (apply_ext_lang_frame_filter): Change type of "flags".
12474 * extension.c (apply_ext_lang_frame_filter): Change type of
12475 "flags".
12476 * extension-priv.h (struct extension_language_ops)
12477 <apply_frame_filter>: Change type of "flags".
12478
12479 2018-02-26 Tom Tromey <tom@tromey.com>
12480
12481 PR python/16497:
12482 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
12483 off-by-one in py_end computation.
12484 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12485 PRINT_MORE_FRAMES.
12486 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12487 constant.
12488
12489 2018-02-26 Tom Tromey <tom@tromey.com>
12490
12491 * dwarf2read.c (struct variant_field): New.
12492 (struct nextfield) <variant>: New field.
12493 (dwarf2_add_field): Handle DW_TAG_variant_part.
12494 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12495 discriminated union.
12496 (read_structure_type): Handle DW_TAG_variant_part.
12497 (handle_struct_member_die): New function, extracted from
12498 process_structure_scope. Handle DW_TAG_variant.
12499 (process_structure_scope): Handle discriminated unions. Call
12500 handle_struct_member_die.
12501
12502 2018-02-26 Tom Tromey <tom@tromey.com>
12503
12504 * rust-lang.h (rust_last_path_segment): Declare.
12505 * rust-lang.c (rust_last_path_segment): Now public. Change
12506 contract.
12507 (struct disr_info): Remove.
12508 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12509 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12510 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12511 (rust_enum_p, rust_enum_variant): New function.
12512 (rust_underscore_fields): Remove "offset" parameter.
12513 (rust_print_enum): New function.
12514 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12515 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12516 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
12517 enums.
12518 (rust_internal_print_type): New function, from rust_print_type.
12519 Remove enum code.
12520 (rust_print_type): Call rust_internal_print_type.
12521 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12522 Update enum handling.
12523 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12524 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12525 (rust_union_quirks): New functions.
12526 (process_full_comp_unit, process_full_type_unit): Call
12527 rust_union_quirks.
12528 (process_structure_scope): Update rust_unions if necessary.
12529
12530 2018-02-26 Tom Tromey <tom@tromey.com>
12531
12532 * value.h (value_union_variant): Declare.
12533 * valops.c (value_union_variant): New function.
12534 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12535 (struct discriminant_info): New.
12536 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12537 enumerator.
12538 (struct main_type) <flag_discriminated_union>: New field.
12539
12540 2018-02-26 Tom Tromey <tom@tromey.com>
12541
12542 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12543 unittests/unpack-selftests.c.
12544 * unittests/unpack-selftests.c: New file.
12545 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12546
12547 2018-02-26 Yao Qi <yao.qi@linaro.org>
12548
12549 * dwarf2read.c (struct partial_die_info) <read>: New method.
12550 (read_partial_die): Remove the declaration.
12551 (load_partial_dies): Update.
12552 (partial_die_info::partial_die_info):
12553 (read_partial_die): Change it to partial_die_info::read.
12554
12555 2018-02-26 Yao Qi <yao.qi@linaro.org>
12556
12557 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12558 (fixup_partial_die): Remove declaration.
12559 (scan_partial_symbols): Update.
12560 (partial_die_parent_scope): Likewise.
12561 (partial_die_full_name): Likewise.
12562 (fixup_partial_die): Change it to partial_die_info::fixup.
12563
12564 2018-02-26 Yao Qi <yao.qi@linaro.org>
12565
12566 * dwarf2read.c (read_partial_die): Update the declaration.
12567 (load_partial_dies): Caller update.
12568 (read_partial_die): Remove one argument abbrev_len.
12569
12570 2018-02-26 Yao Qi <yao.qi@linaro.org>
12571
12572 * dwarf2read.c (struct partial_die_info): Add ctor, delete
12573 assignment operator.
12574 (load_partial_dies): Use ctor and copy ctor.
12575 (read_partial_die): Update.
12576 (dwarf2_cu::find_partial_die): Use ctor.
12577
12578 2018-02-26 Yao Qi <yao.qi@linaro.org>
12579
12580 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12581 (find_partial_die_in_comp_unit): Change it to
12582 dwarf2_cu::find_partial_die.
12583 (find_partial_die): Update.
12584
12585 2018-02-26 Yao Qi <yao.qi@linaro.org>
12586
12587 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12588 is NULL.
12589
12590 2018-02-26 Yao Qi <yao.qi@linaro.org>
12591
12592 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12593
12594 2018-02-26 Alan Hayward <alan.hayward@arm.com>
12595
12596 * arch/amd64.h: Use common/tdesc.h.
12597 * arch/i386.c: Likewise.
12598 * arch/i386.h: Likewise.
12599 * arch/tic6x.c: Likewise.
12600 * arch/tdesc.h: Move file from here...
12601 * common/tdesc.h: ...to here.
12602 * features/aarch64-core.c: Regenerate.
12603 * features/aarch64-fpu.c: Regenerate.
12604 * features/i386/32bit-avx.c: Regenerate.
12605 * features/i386/32bit-avx512.c: Regenerate.
12606 * features/i386/32bit-core.c: Regenerate.
12607 * features/i386/32bit-linux.c: Regenerate.
12608 * features/i386/32bit-mpx.c: Regenerate.
12609 * features/i386/32bit-pkeys.c: Regenerate.
12610 * features/i386/32bit-sse.c: Regenerate.
12611 * features/i386/64bit-avx.c: Regenerate.
12612 * features/i386/64bit-avx512.c: Regenerate.
12613 * features/i386/64bit-core.c: Regenerate.
12614 * features/i386/64bit-linux.c: Regenerate.
12615 * features/i386/64bit-mpx.c: Regenerate.
12616 * features/i386/64bit-pkeys.c: Regenerate.
12617 * features/i386/64bit-segments.c: Regenerate.
12618 * features/i386/64bit-sse.c: Regenerate.
12619 * features/i386/x32-core.c: Regenerate.
12620 * features/tic6x-c6xp.c: Regenerate.
12621 * features/tic6x-core.c: Regenerate.
12622 * features/tic6x-gp.c: Regenerate.
12623 * target-descriptions.c: Use common/tdesc.h.
12624 * target-descriptions.h: Likewise.
12625
12626 2018-02-24 Tom Tromey <tom@tromey.com>
12627
12628 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12629 (try_thread_db_load_from_dir, thread_db_load_search): Use
12630 std::string.
12631 (info_auto_load_libthread_db_compare): Return bool. Change
12632 argument types.
12633 (info_auto_load_libthread_db): Use std::vector, std::string.
12634 Remove cleanups.
12635
12636 2018-02-24 Tom Tromey <tom@tromey.com>
12637
12638 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12639 std::string.
12640 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12641 std::string*.
12642 * gdbarch.c: Rebuild.
12643 * gdbarch.h: Rebuild.
12644 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12645 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12646 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12647 std::string*.
12648
12649 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
12650
12651 * gdbtypes.h (sect_offset): Change type to uint64_t.
12652 (sect_offset_str): New function.
12653 * dwarf2read.c (create_addrmap_from_aranges): Use
12654 sect_offset_str.
12655 (error_check_comp_unit_head): Likewise.
12656 (create_debug_type_hash_table): Likewise.
12657 (read_cutu_die_from_dwo): Likewise.
12658 (init_cutu_and_read_dies): Likewise.
12659 (init_cutu_and_read_dies_no_follow): Likewise.
12660 (process_psymtab_comp_unit_reader): Likewise.
12661 (partial_die_parent_scope): Likewise.
12662 (peek_die_abbrev): Likewise.
12663 (process_queue): Likewise.
12664 (dwarf2_physname): Likewise.
12665 (read_namespace_alias): Likewise.
12666 (read_import_statement): Likewise.
12667 (create_dwo_cu_reader): Likewise.
12668 (create_cus_hash_table): Likewise.
12669 (lookup_dwo_cutu): Likewise.
12670 (inherit_abstract_dies): Likewise.
12671 (read_func_scope): Likewise.
12672 (read_call_site_scope): Likewise.
12673 (dwarf2_add_member_fn): Likewise.
12674 (read_common_block): Likewise.
12675 (read_module_type): Likewise.
12676 (read_typedef): Likewise.
12677 (read_subrange_type): Likewise.
12678 (load_partial_dies): Likewise.
12679 (read_partial_die): Likewise.
12680 (find_partial_die): Likewise.
12681 (read_str_index): Likewise.
12682 (dwarf2_string_attr): Likewise.
12683 (build_error_marker_type): Likewise.
12684 (lookup_die_type): Likewise.
12685 (dump_die_shallow): Likewise.
12686 (follow_die_ref): Likewise.
12687 (dwarf2_fetch_die_loc_sect_off): Likewise.
12688 (dwarf2_fetch_constant_bytes): Likewise.
12689 (follow_die_sig): Likewise.
12690 (get_signatured_type): Likewise.
12691 (get_DW_AT_signature_type): Likewise.
12692 (dwarf2_find_containing_comp_unit): Likewise.
12693 (set_die_type): Likewise.
12694
12695 2018-02-21 John Baldwin <jhb@FreeBSD.org>
12696
12697 * arch/aarch64.c: Include "common-defs.h".
12698 * arch/amd64.c: Likewise.
12699 * arch/i386.c: Likewise.
12700
12701 2018-02-21 Tom Tromey <tom@tromey.com>
12702
12703 * value.h: (extract_field_op): Update.
12704 * eval.c (extract_field_op): Return a const char *.
12705 * expression.h (parse_expression_for_completion): Update.
12706 * completer.c (complete_expression): Update.
12707 (add_struct_fields): Make fieldname const.
12708 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12709 (mark_completion_tag, parse_exp_in_context_1): Update.
12710 (parse_expression_for_completion): Change "name" to
12711 unique_xmalloc_ptr*.
12712
12713 2018-02-21 Tom Tromey <tom@tromey.com>
12714
12715 * infcall.c (call_function_by_hand_dummy): Use std::vector.
12716
12717 2018-02-21 Yao Qi <yao.qi@linaro.org>
12718
12719 * avr-tdep.c (avr_read_pc): Change parameter type to
12720 readable_regcache.
12721 * gdbarch.sh (read_pc): Likewise.
12722 * gdbarch.c: Re-generated.
12723 * gdbarch.h: Re-generated.
12724 * hppa-tdep.c (hppa_read_pc): Change parameter type to
12725 readable_regcache.
12726 * ia64-tdep.c (ia64_read_pc): Likewise.
12727 * mips-tdep.c (mips_read_pc): Likewise.
12728 * spu-tdep.c (spu_read_pc): Likewise.
12729
12730 2018-02-21 Yao Qi <yao.qi@linaro.org>
12731
12732 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12733 * regcache-dump.c: New file.
12734 * regcache.c: Move register_dump to regcache-dump.c.
12735 (maintenance_print_registers): Likewise.
12736 (maintenance_print_raw_registers): Likewise.
12737 (maintenance_print_cooked_registers): Likewise.
12738 (maintenance_print_register_groups): Likewise.
12739 (maintenance_print_remote_registers): Likewise.
12740 (_initialize_regcache): Likewise.
12741 * regcache.h (register_dump): Moved from regcache.c.
12742
12743 2018-02-21 Yao Qi <yao.qi@linaro.org>
12744
12745 * regcache.c (regcache::regcache): Update.
12746 (regcache::invalidate): Move it to detached_regcache::invalidate.
12747 (get_thread_arch_aspace_regcache): Update.
12748 (regcache::raw_update): Update.
12749 (regcache::cooked_read): Remove some code.
12750 (regcache::cooked_read_value): Likewise.
12751 (regcache::raw_write): Remove assert on m_readonly_p.
12752 (regcache::raw_supply_integer): Move it to
12753 detached_regcache::raw_supply_integer.
12754 (regcache::raw_supply_zeroed): Likewise.
12755 * regcache.h (detached_regcache) <raw_supply_integer>: New
12756 declaration.
12757 <raw_supply_zeroed, invalidate>: Likewise.
12758 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12759 <invalidate>: Likewise.
12760 <m_readonly_p>: Removed.
12761
12762 2018-02-21 Yao Qi <yao.qi@linaro.org>
12763
12764 * infcmd.c (get_return_value): Let stop_regs point to
12765 get_current_regcache.
12766 * regcache.c (regcache::regcache): Remove.
12767 (register_dump_reg_buffer): New class.
12768 (regcache_print): Adjust.
12769 * regcache.h (regcache): Remove constructors.
12770
12771 2018-02-21 Yao Qi <yao.qi@linaro.org>
12772
12773 * regcache.c (class register_dump): New class.
12774 (register_dump_regcache, register_dump_none): New class.
12775 (register_dump_remote, register_dump_groups): New class.
12776 (regcache_print): Update.
12777 * regcache.h (regcache_dump_what): Move it to regcache.c.
12778 (regcache) <dump>: Remove.
12779
12780 2018-02-21 Yao Qi <yao.qi@linaro.org>
12781
12782 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12783 reg_buffer_rw *.
12784 (jit_unwind_reg_set_impl): Call raw_supply.
12785 (jit_frame_sniffer): Use reg_buffer_rw.
12786 * record-full.c (record_full_core_regbuf): Change its type.
12787 (record_full_core_open_1): Use reg_buffer_rw.
12788 (record_full_close): Likewise.
12789 (record_full_core_fetch_registers): Use regcache->raw_supply.
12790 (record_full_core_store_registers): Likewise.
12791 * regcache.c (regcache::get_register_status): Move it to
12792 reg_buffer.
12793 (regcache_raw_set_cached_value): Remove.
12794 (regcache::raw_set_cached_value): Remove.
12795 (regcache::raw_write): Call raw_supply.
12796 (regcache::raw_supply): Move it to reg_buffer_rw.
12797 * regcache.h (regcache_raw_set_cached_value): Remove.
12798 (reg_buffer_rw): New class.
12799
12800 2018-02-21 Yao Qi <yao.qi@linaro.org>
12801
12802 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12803 readonly_detached_regcache.
12804 (dummy_frame_prev_register): Use regcache->cooked_read.
12805 * frame.c (frame_save_as_regcache): Change return type.
12806 (frame_pop): Update.
12807 * frame.h (frame_save_as_regcache): Update declaration.
12808 * inferior.h (get_infcall_suspend_state_regcache): Update
12809 declaration.
12810 * infrun.c (infcall_suspend_state) <registers>: use
12811 readonly_detached_regcache.
12812 (save_infcall_suspend_state): Don't use regcache_dup.
12813 (get_infcall_suspend_state_regcache): Change return type.
12814 * linux-fork.c (struct fork_info) <savedregs>: Change to
12815 readonly_detached_regcache.
12816 <pc>: New field.
12817 (fork_save_infrun_state): Don't use regcache_dup.
12818 (info_checkpoints_command): Adjust.
12819 * mi/mi-main.c (register_changed_p): Update declaration.
12820 (mi_cmd_data_list_changed_registers): Use
12821 readonly_detached_regcache.
12822 (register_changed_p): Change parameter type to
12823 readonly_detached_regcache.
12824 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12825 readonly_detached_regcache.
12826 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12827 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12828 New.
12829 (regcache::save): Move it to reg_buffer.
12830 (regcache::restore): Change parameter type.
12831 (regcache_dup): Remove.
12832 * regcache.h (reg_buffer) <save>: New method.
12833 (readonly_detached_regcache): New class.
12834 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12835 readonly_detached_regcache.
12836 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12837
12838 2018-02-21 Yao Qi <yao.qi@linaro.org>
12839
12840 * frame.c (frame_save_as_regcache): Use regcache method save.
12841 (frame_pop): Use regcache method restore.
12842 * infrun.c (restore_infcall_suspend_state): Likewise.
12843 * linux-fork.c (fork_load_infrun_state): Likewise.
12844 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12845 save.
12846 * regcache.c (regcache_save): Remove.
12847 (regcache::restore): More asserts.
12848 (regcache_cpy): Remove.
12849 * regcache.h (regcache_save): Remove the declaration.
12850 (regcache::restore): Move from private to public.
12851 Remove the friend declaration of regcache_cpy.
12852 (regcache_cpy): Remove declaration.
12853
12854 2018-02-21 Yao Qi <yao.qi@linaro.org>
12855
12856 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12857 parameter type to 'readable_regcache *'.
12858 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12859 * arm-tdep.c (arm_neon_quad_read): Likewise.
12860 (arm_pseudo_read): Likewise.
12861 * avr-tdep.c (avr_pseudo_register_read): Likewise.
12862 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12863 * frv-tdep.c (frv_pseudo_register_read): Likewise.
12864 * gdbarch.c: Re-generated.
12865 * gdbarch.h: Re-generated.
12866 * gdbarch.sh (pseudo_register_read): Change parameter type to
12867 'readable_regcache *'.
12868 (pseudo_register_read_value): Likewise.
12869 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12870 (h8300_pseudo_register_read): Likewise.
12871 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12872 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12873 (i386_pseudo_register_read_into_value): Likewise.
12874 (i386_pseudo_register_read_value): Likewise.
12875 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12876 declaration.
12877 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12878 * m32c-tdep.c (m32c_raw_read): Likewise.
12879 (m32c_read_flg): Likewise.
12880 (m32c_banked_register): Likewise.
12881 (m32c_banked_read): Likewise.
12882 (m32c_sb_read): Likewise.
12883 (m32c_part_read): Likewise.
12884 (m32c_cat_read): Likewise.
12885 (m32c_r3r2r1r0_read): Likewise.
12886 (m32c_pseudo_register_read): Likewise.
12887 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12888 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12889 (mep_pseudo_cr64_read): Likewise.
12890 (mep_pseudo_register_read): Likewise.
12891 * mips-tdep.c (mips_pseudo_register_read): Likewise.
12892 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12893 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12894 * regcache.c (regcache::raw_read): Move it to readable_regcache.
12895 (regcache::cooked_read): Likewise.
12896 (regcache::cooked_read_value): Likewise.
12897 (regcache_cooked_read_signed):
12898 (regcache::cooked_read): Likewise.
12899 * regcache.h (readable_regcache): New class.
12900 (regcache): Inherit readable_regcache. Move some methods to
12901 readable_regcache.
12902 * rl78-tdep.c (rl78_pseudo_register_read): Change
12903 parameter type to 'readable_regcache *'.
12904 * rs6000-tdep.c (do_regcache_raw_read): Remove.
12905 (e500_pseudo_register_read): Change parameter type to
12906 'readable_regcache *'.
12907 (dfp_pseudo_register_read): Likewise.
12908 (vsx_pseudo_register_read): Likewise.
12909 (efpr_pseudo_register_read): Likewise.
12910 * s390-tdep.c (s390_pseudo_register_read): Likewise.
12911 * sh-tdep.c (sh_pseudo_register_read): Likewise.
12912 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12913 (sh64_pseudo_register_read): Likewise.
12914 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12915 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12916 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12917 (spu_pseudo_register_read): Likewise.
12918 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12919 (xtensa_pseudo_register_read): Likewise.
12920
12921 2018-02-21 Yao Qi <yao.qi@linaro.org>
12922
12923 * regcache.c (regcache::regcache): Call reg_buffer ctor.
12924 (regcache::arch): Move it to reg_buffer::arch.
12925 (regcache::register_buffer): Likewise.
12926 (regcache::assert_regnum): Likewise.
12927 (regcache::num_raw_registers): Likewise.
12928 * regcache.h (reg_buffer): New class.
12929 (regcache): Inherit reg_buffer.
12930
12931 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
12932
12933 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12934 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12935
12936 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
12937
12938 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12939
12940 2018-02-19 Alan Hayward <alan.hayward@arm.com>
12941
12942 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12943 (SFILES): Remove common/*.c files.
12944 (COMMON_OBS): Remove some *.o files built from common/*.c files.
12945 * common/common.host: Add common reference.
12946 * configure.ac: Likewise.
12947 * configure: Regenerate.
12948
12949 2018-02-16 Yao Qi <yao.qi@linaro.org>
12950
12951 * block.c (block_namespace_info): Inherit allocate_on_obstack.
12952 (block_initialize_namespace): Use new.
12953 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12954 (dwarf2_free_objfile): Use delete.
12955 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12956 (copy_type_recursive): Use new.
12957 * gdb_obstack.h (allocate_on_obstack): New.
12958
12959 2018-02-15 Yao Qi <yao.qi@linaro.org>
12960
12961 PR gdb/22849
12962 * inferior.c (exit_inferior_1): Reset inf->control.
12963
12964 2018-02-15 Joel Brobecker <brobecker@adacore.com>
12965
12966 * ada-lang.c (ada_to_fixed_value_create): Delete advance
12967 declaration.
12968
12969 2018-02-14 Pedro Alves <palves@redhat.com>
12970
12971 * frame-unwind.c (frame_unwind_try_unwinder): Always call
12972 frame_cleanup_after_sniffer on exception.
12973
12974 2018-02-14 Tom Tromey <tom@tromey.com>
12975
12976 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12977 const.
12978 (solib_bfd_open): Make pathname const.
12979 * solib.c (solib_bfd_open): Make pathname const.
12980 * solib-spu.c (spu_bfd_fopen): Make name const.
12981 (spu_bfd_open): Make pathname const.
12982 * solib-darwin.c (darwin_bfd_open): Make pathname const.
12983 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12984
12985 2018-02-14 Tom Tromey <tom@tromey.com>
12986
12987 * symfile.c (symfile_bfd_open): Update.
12988 * source.h (openp, source_full_path_of, find_and_open_source):
12989 Change argument type to unique_xmalloc_ptr.
12990 * source.c (openp): Take a unique_xmalloc_ptr.
12991 (source_full_path_of, find_and_open_source): Likewise.
12992 (open_source_file, symtab_to_fullname): Update.
12993 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12994 unique_xmalloc_ptr.
12995 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12996 (exec_file_find): Update.
12997 * psymtab.c (psymtab_to_fullname): Update.
12998 * nto-tdep.h (nto_find_and_open_solib): Update.
12999 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13000 unique_xmalloc_ptr.
13001 * exec.c (exec_file_attach): Update.
13002 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13003 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13004
13005 2018-02-14 Tom Tromey <tom@tromey.com>
13006
13007 * solib.c: Include source.h.
13008 * nto-tdep.c: Include source.h.
13009 * mi/mi-cmd-env.c: Include source.h.
13010 * infcmd.c: Include source.h.
13011 * exec.c: Include source.h.
13012 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13013 (add_path, directory_switch, source_path, init_source_path): Move
13014 declarations...
13015 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13016 (add_path, directory_switch, source_path, init_source_path):
13017 ...here.
13018
13019 2018-02-14 Tom Tromey <tom@tromey.com>
13020
13021 * solist.h (exec_file_find, solib_find): Return
13022 unique_xmalloc_ptr.
13023 (solib_bfd_fopen): Take a const char *.
13024 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13025 (exec_file_find, solib_find): Likewise.
13026 (solib_bfd_fopen): Do not take ownership of "pathname".
13027 (solib_bfd_open): Use unique_xmalloc_ptr.
13028 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13029 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13030 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13031 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13032
13033 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13034
13035 * ada-lang.c (name_match_type_from_name): Remove reference to
13036 ada_name_for_lookup in function's documentation.
13037 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13038
13039 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13040
13041 * defs.h (enum openp_flags): New enum.
13042 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13043 Move to enum openp_flags.
13044 (openp_flags): New enum flags.
13045 (openp): Change parameter type to openp_flags.
13046 * source.c (openp): Change parameter type to openp_flags.
13047 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13048 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13049
13050 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13051
13052 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13053 per-command.
13054
13055 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13056
13057 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13058 into...
13059 (class dwarf2_queue_guard): ...the destructor of this new class.
13060 (dw2_do_instantiate_symtab): Create instance of the new class
13061 dwarf2_queue_guard, remove cleanup.
13062
13063 2018-02-09 Tom Tromey <tom@tromey.com>
13064
13065 * source.c (find_source_lines): Don't reference past the end of
13066 the vector.
13067
13068 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13069
13070 * remote.c (remote_btrace_maybe_reopen): Change error message.
13071 * btrace.c (btrace_enable): Likewise.
13072 (parse_xml_btrace): Likewise.
13073 (parse_xml_btrace_conf): Likewise.
13074
13075 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13076
13077 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13078 (linux_enable_pt, linux_enable_bts): Call
13079 diagnose_perf_event_open_fail.
13080
13081 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13082
13083 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13084 Remove parameter and change return type. Update callers. Move it.
13085 (linux_enable_bts, linux_enable_pt): Improve error message.
13086 (linux_enable_pt): Remove zero buffer size check.
13087 (linux_enable_btrace): Improve error messages. Remove NULL return
13088 check.
13089
13090 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13091
13092 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13093 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13094 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13095 (linux_supports_pt, linux_supports_btrace): Remove.
13096 (linux_enable_bts): Call cpu_supports_bts.
13097 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13098 * remote.c (remote_supports_btrace): Remove.
13099 (init_remote_ops): Remove remote_supports_btrace.
13100 * target-delegates.c: Regenerated.
13101 * target.c (target_supports_btrace): Remove.
13102 * target.h (target_ops) <to_supports_btrace>: Remove
13103 (target_supports_btrace): Remove.
13104 * x86-linux-nat.c (x86_linux_create_target): Remove
13105 linux_supports_btrace.
13106
13107 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13108
13109 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13110 btrace failed.
13111 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13112 exception and use message in own exception.
13113
13114 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13115
13116 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13117 (perf_event_pt_event_type): Use gdb_file_up.
13118 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13119 scoped_fd, and scoped_mmap.
13120
13121 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13122
13123 * common/scoped_mmap.h: New.
13124 * unittests/scoped_mmap-selftest.c: New.
13125 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13126 unittests/scoped_mmap-selftest.c.
13127
13128 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13129
13130 * common/scoped_fd.h: New.
13131 * unittests/scoped_fd-selftest.c: New.
13132 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13133 unittests/scoped_fd-selftest.c.
13134
13135 2018-02-09 Tom Tromey <tom@tromey.com>
13136
13137 * auto-load.c (auto_load_section_scripts): Use
13138 gdb::unique_xmalloc_ptr.
13139
13140 2018-02-09 Tom Tromey <tom@tromey.com>
13141
13142 * auto-load.c (execute_script_contents): Use std::string.
13143
13144 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13145
13146 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13147 Python function, rather than a new command.
13148
13149 2018-02-08 Tom Tromey <tom@tromey.com>
13150
13151 * solib.c (solib_find_1): Use std::string.
13152 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13153
13154 2018-02-08 Tom Tromey <tom@tromey.com>
13155
13156 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13157
13158 2018-02-08 Tom Tromey <tom@tromey.com>
13159
13160 * source.c (find_source_lines): Use gdb::def_vector.
13161
13162 2018-02-08 Tom Tromey <tom@tromey.com>
13163
13164 * macrocmd.c (struct temporary_macro_definition): New.
13165 (macro_define_command): Use temporary_macro_definition. Remove
13166 cleanups.
13167 (free_macro_definition_ptr): Remove.
13168
13169 2018-02-08 Tom Tromey <tom@tromey.com>
13170
13171 * macroexp.c (maybe_expand): Use std::string.
13172
13173 2018-02-08 Tom Tromey <tom@tromey.com>
13174
13175 * macroexp.c (struct macro_buffer): Add initializers for some
13176 members.
13177 (init_buffer, init_shared_buffer, free_buffer)
13178 (free_buffer_return_text): Remove.
13179 (macro_buffer): New constructors.
13180 (~macro_buffer): New destructor.
13181 (macro_buffer::set_shared): New method.
13182 (macro_buffer::resize_buffer, macro_buffer::appendc)
13183 (macro_buffer::appendmem): Now methods, not free functions.
13184 (set_token, append_tokens_without_splicing, stringify)
13185 (macro_stringify): Update.
13186 (gather_arguments): Change return type. Remove argc_p argument,
13187 add args_ptr argument. Use std::vector.
13188 (substitute_args): Remove argc argument. Accept std::vector.
13189 (expand): Update. Use std::vector.
13190 (scan, macro_expand, macro_expand_next): Update.
13191
13192 2018-02-08 Tom Tromey <tom@tromey.com>
13193
13194 * symtab.c (default_collect_symbol_completion_matches_break_on):
13195 Use unique_xmalloc_ptr.
13196 * macroscope.h: (sal_macro_scope, user_macro_scope)
13197 (default_macro_scope): Return unique_xmalloc_ptr.
13198 * macroscope.c (sal_macro_scope, user_macro_scope)
13199 (default_macro_scope): Return unique_xmalloc_ptr.
13200 * macroexp.h (macro_expand, macro_expand_once): Return
13201 unique_xmalloc_ptr.
13202 * macroexp.c (macro_expand, macro_expand_once): Return
13203 unique_xmalloc_ptr.
13204 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13205 (info_macro_command, info_macros_command): Use
13206 unique_xmalloc_ptr.
13207 * compile/compile-c-support.c (write_macro_definitions): Use
13208 unique_xmalloc_ptr.
13209 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13210
13211 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13212
13213 * value.c (value_static_field): Assign field type instead of
13214 containing type when returning an optimized out value.
13215
13216 2018-02-06 Yao Qi <yao.qi@linaro.org>
13217
13218 * ft32-tdep.c (ft32_read_pc): Remove.
13219 (ft32_write_pc): Remove.
13220 (ft32_gdbarch_init): Update.
13221 * m32r-tdep.c (m32r_read_pc): Remove.
13222 (m32r_gdbarch_init): Update.
13223 * mep-tdep.c (mep_read_pc): Remove.
13224 (mep_gdbarch_init): Update.
13225 * microblaze-tdep.c (microblaze_write_pc): Remove.
13226 (microblaze_gdbarch_init): Update.
13227 * mn10300-tdep.c (mn10300_read_pc): Remove.
13228 (mn10300_write_pc): Remove.
13229 (mn10300_gdbarch_init): Update.
13230 * moxie-tdep.c (moxie_read_pc): Remove.
13231 (moxie_write_pc): Remove.
13232 (moxie_gdbarch_init): Update.
13233
13234 2018-02-06 Yao Qi <yao.qi@linaro.org>
13235
13236 * expprint.c (print_subexp_standard): Handle
13237 OP_F77_UNDETERMINED_ARGLIST.
13238 (dump_subexp_body_standard): Likewise.
13239
13240 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13241
13242 * target-descriptions.c (tdesc_element_visitor) Add empty
13243 implementations.
13244 (tdesc_type): Move make_gdb_type from here.
13245 (tdesc_type_builtin): Likewise.
13246 (tdesc_type_vector): Likewise.
13247 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13248 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13249 (make_gdb_type_union): Likewise.
13250 (make_gdb_type_flags): Likewise.
13251 (make_gdb_type_enum): Likewise.
13252 (make_gdb_type): New function.
13253 (tdesc_register_type): Use static make_gdb_type.
13254
13255 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13256
13257 * infcmd.c (default_print_one_register_info): Align natural-format
13258 column values consistently one under another.
13259 (pad_to_column): New function.
13260
13261 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13262
13263 * dwarf2read.c (dwarf2_physname): Move commment.
13264
13265 2018-02-01 Leszek Swirski <leszeks@google.com>
13266
13267 * varobj.c (varobj_formatted_print_options): Allow recursive
13268 pretty printing if pretty printing is enabled.
13269
13270 2018-02-01 Leszek Swirski <leszeks@google.com>
13271
13272 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13273 names after a structop as a filename.
13274
13275 2018-02-01 Yao Qi <yao.qi@linaro.org>
13276
13277 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13278 (arm_record_coproc_data_proc): Likewise.
13279
13280 2018-02-01 Yao Qi <yao.qi@linaro.org>
13281
13282 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13283
13284 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13285
13286 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13287 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13288
13289 2018-01-31 Pedro Alves <palves@redhat.com>
13290
13291 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13292 * inflow.c (child_terminal_save_inferior): Wrap reference to
13293 tcgetpgrp in HAVE_TERMIOS_H.
13294 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13295 _WIN32.
13296 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13297 always iterate over all inferiors.
13298 (gdbsim_cntrl_c): Adjust.
13299 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13300
13301 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13302
13303 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13304 index type is objfile-owned if the element type is as well.
13305
13306 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13307
13308 GDB 8.1 released.
13309
13310 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13311
13312 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13313 "features/s390x-linux64.c".
13314 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13315 s390_linux32 and s390x_linux64.
13316 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13317 default tdesc.
13318 * s390-tdep.c: Include "features/s390-linux32.c" and
13319 "features/s390x-linux64.c".
13320 (s390_tdesc_valid): Add check for tdesc_has_registers.
13321 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13322 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13323 tdesc_s390x_linux64.
13324 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13325 tdesc_s390x_linux64 to...
13326 * s390-tdep.h: ...here.
13327
13328 2018-01-30 Pedro Alves <palves@redhat.com>
13329
13330 PR gdb/13211
13331 * config.in, configure: Regenerate.
13332 * configure.ac: Check for getpgid.
13333 * go32-nat.c (go32_pass_ctrlc): New.
13334 (go32_target): Install it.
13335 * inf-child.c (inf_child_target): Install
13336 child_terminal_save_inferior, child_pass_ctrlc and
13337 child_interrupt.
13338 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13339 (inf_ptrace_target): No longer install it.
13340 * infcmd.c (interrupt_target_1): Adjust.
13341 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13342 (child_interrupt): Declare.
13343 (inferior::terminal_state): New.
13344 * inflow.c (struct terminal_info): Update comments.
13345 (inferior_process_group): Delete.
13346 (terminal_is_ours): Delete.
13347 (gdb_tty_state): New.
13348 (child_terminal_init): Adjust.
13349 (is_gdb_terminal, sharing_input_terminal_1)
13350 (sharing_input_terminal): New functions.
13351 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13352 Set the process's actual process group in the foreground if
13353 possible. Handle is_ours_for_output/is_ours distinction. Don't
13354 mark terminal as the inferior's if not sharing GDB's terminal.
13355 Don't check attach_flag.
13356 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13357 pass down a target_terminal_state.
13358 (child_terminal_save_inferior): New, factored out from ...
13359 (child_terminal_ours_1): ... this. Handle
13360 target_terminal_state::is_ours_for_output.
13361 (child_interrupt, child_pass_ctrlc): New.
13362 (inflow_inferior_exit): Clear the inferior's terminal_state.
13363 (copy_terminal_info): Copy the inferior's terminal state.
13364 (_initialize_inflow): Remove reference to terminal_is_ours.
13365 * inflow.h (inferior_process_group): Delete.
13366 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13367 * procfs.c (procfs_target): Don't install procfs_interrupt.
13368 (procfs_interrupt): Delete.
13369 * remote.c (remote_serial_quit_handler): Adjust.
13370 (remote_interrupt): Remove ptid parameter. Adjust.
13371 * target-delegates.c: Regenerate.
13372 * target.c: Include "terminal.h".
13373 (target_terminal::terminal_state): Rename to ...
13374 (target_terminal::m_terminal_state): ... this.
13375 (target_terminal::init): Adjust.
13376 (target_terminal::inferior): Adjust to per-inferior
13377 terminal_state.
13378 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13379 (target_terminal::ours, target_terminal::ours_for_output): Use
13380 target_terminal_is_ours_kind.
13381 (target_interrupt): Remove ptid parameter. Adjust.
13382 (default_target_pass_ctrlc): Adjust.
13383 * target.h (target_ops::to_terminal_save_inferior): New field.
13384 (target_ops::to_interrupt): Remove ptid_t parameter.
13385 (target_interrupt): Remove ptid_t parameter. Update comment.
13386 (target_pass_ctrlc): Update comment.
13387 * target/target.h (target_terminal_state): New scoped enum,
13388 factored out of ...
13389 (target_terminal::terminal_state): ... here.
13390 (target_terminal::inferior): Update comments.
13391 (target_terminal::restore_inferior): New.
13392 (target_terminal::is_inferior, target_terminal::is_ours)
13393 (target_terminal::is_ours_for_output): Adjust.
13394 (target_terminal::scoped_restore_terminal_state): Adjust to
13395 rename, and call restore_inferior() instead of inferior().
13396 (target_terminal::scoped_restore_terminal_state::m_state): Change
13397 type.
13398 (target_terminal::terminal_state): Rename to ...
13399 (target_terminal::m_terminal_state): ... this and change type.
13400
13401 2018-01-30 Pedro Alves <palves@redhat.com>
13402
13403 * linux-nat.c (wait_for_signal): New function.
13404 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13405 directly.
13406 (async_terminal_is_ours)
13407 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13408 (linux_nat_add_target): Don't override
13409 to_terminal_inferior/to_terminal_ours.
13410
13411 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13412
13413 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13414
13415 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13416
13417 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13418 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13419 dwarf2_per_objfile_free here.
13420 (dwarf2_per_objfile_free): Remove.
13421 (_initialize_dwarf2_read): Don't register
13422 dwarf2_per_objfile_free as a registry cleanup.
13423
13424 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13425
13426 Avoid compilation errors in MinGW native builds
13427
13428 The error is triggered by including python-internal.h, and the
13429 error message is:
13430
13431 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13432 from build-gnulib/import/math.h:27,
13433 from d:/usr/Python26/include/pyport.h:235,
13434 from d:/usr/Python26/include/Python.h:58,
13435 from python/python-internal.h:94,
13436 from python/py-arch.c:24:
13437 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13438 using ::hypot;
13439 ^~~~~
13440
13441 This happens because Python headers define 'hypot' to expand t
13442 '_hypot' in the Windows builds.
13443 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13444 'hypoth'. This avoids a compilation error.
13445
13446 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13447
13448 * MAINTAINERS (Write After Approval): Fix ordering.
13449
13450 2018-01-26 Alan Hayward <alan.hayward@arm.com>
13451
13452 * MAINTAINERS (Write After Approval): Add Alan Hayward.
13453
13454 2018-01-26 Alan Modra <amodra@gmail.com>
13455
13456 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13457 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13458 Remove nop. Make const. Comment.
13459 (powerpc32_plt_stub_so_2): New.
13460 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13461 Correct count. Update uses.
13462 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13463 Move common code reading PLT entry word. Correct
13464 powerpc32_plt_stub PLT address calculation.
13465 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13466 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13467 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13468 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13469 (ppc64_standard_linkage8): Likewise.
13470 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13471 Correct insns description.
13472 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13473
13474 2018-01-24 Pedro Alves <palves@redhat.com>
13475
13476 GCC PR libstdc++/83906
13477 * gdbtypes.c (operator==(const dynamic_prop &,
13478 const dynamic_prop &)): New.
13479 (operator==(const range_bounds &, const range_bounds &)): New.
13480 (check_types_equal): Use them instead of memcmp.
13481 * gdbtypes.h (operator==(const dynamic_prop &,
13482 const dynamic_prop &)): Declare.
13483 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13484 (operator==(const range_bounds &, const range_bounds &)): Declare.
13485 (operator!=(const range_bounds &, const range_bounds &)): Declare.
13486
13487 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13488
13489 * s390-linux-tdep.c (s390_record_address_mask)
13490 (s390_record_calc_disp_common, s390_record_calc_disp)
13491 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13492 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13493 (s390_process_record): Move to s390-tdep.c.
13494 (s390_linux_init_abi_any): Adjust.
13495 * s390-tdep.c (s390_record_address_mask)
13496 (s390_record_calc_disp_common, s390_record_calc_disp)
13497 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13498 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13499 (s390_process_record): Moved from s390-linux-tdep.c
13500 (s390_gdbarch_init): Adjust.
13501
13502 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13503
13504 * s390-linux-nat.c (s390-tdep.h): New include.
13505 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13506 (HFILES_NO_SRCDIR): Add s390-tdep.h.
13507 (ALLDEPFILES): Add s390-tdep.c.
13508 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13509 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13510 * s390-tdep.h: ...this. New file.
13511 * s390-linux-tdep.c (s390-tdep.h): New include.
13512 (_initialize_s390_tdep): Rename to...
13513 (_initialize_s390_linux_tdep): ...this and adjust.
13514 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13515 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13516 s390-tdep.h.
13517 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13518 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13519 (s390_is_partial_instruction, s390_software_single_step)
13520 (is_non_branch_ril, s390_displaced_step_copy_insn)
13521 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13522 (s390_prologue_data, s390_addr, s390_store, s390_load)
13523 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13524 (s390_register_call_saved, s390_guess_tracepoint_registers)
13525 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13526 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13527 (s390_pseudo_register_name, s390_pseudo_register_type)
13528 (s390_pseudo_register_read, s390_pseudo_register_write)
13529 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13530 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13531 (s390_addr_bits_remove, s390_address_class_type_flags)
13532 (s390_address_class_type_flags_to_name)
13533 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13534 (s390_function_arg_float, s390_function_arg_vector)
13535 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13536 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13537 (s390_frame_align, s390_register_return_value, s390_return_value)
13538 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13539 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13540 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13541 (s390_trad_frame_prev_register, s390_unwind_cache)
13542 (s390_prologue_frame_unwind_cache)
13543 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13544 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13545 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13546 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13547 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13548 (s390_frame_base_address, s390_local_base_address)
13549 (s390_frame_base, s390_gcc_target_options)
13550 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13551 (s390_validate_reg_range, s390_tdesc_valid)
13552 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13553 * s390-tdep.c: ...this. New file.
13554
13555 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13556
13557 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13558 (s390_process_record, s390_gdbarch_tdep_alloc)
13559 (s390_linux_init_abi_any): Use/set new hook.
13560
13561 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13562
13563 * s390-linux-tdep.c (osabi.h): New include.
13564 (s390_linux_init_abi_31, s390_linux_init_abi_64)
13565 (s390_linux_init_abi_any): New functions.
13566 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13567
13568 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13569
13570 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13571 tdesc_has_registers check
13572
13573 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13574
13575 * s390-linux-tdep.c (s390_tdesc_valid): New function.
13576 (s390_validate_reg_range): New macro.
13577 (s390_gdbarch_init): Adjust.
13578
13579 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13580
13581 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13582 (s390_gdbarch_tdep_alloc): Adjust.
13583 (s390_gdbarch_init): Adjust.
13584
13585 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13586
13587 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13588 <have_tdb>: Change type to bool.
13589 (s390_gdbarch_tdep_alloc): Adjust.
13590 (s390_gdbarch_init): Adjust.
13591
13592 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13593
13594 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13595 (gdbarch_tdep) <have_upper, have_vx>: New fields.
13596 (s390_gdbarch_tdep_alloc): New function.
13597 (s390_gdbarch_init): Allocate tdep at start and use its fields
13598 instead of separate variables.
13599
13600 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13601
13602 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13603 when looking for cached gdbarch and add comment for remaining.
13604
13605 2018-01-22 Pedro Alves <palves@redhat.com>
13606 Sergio Durigan Junior <sergiodj@redhat.com>
13607
13608 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13609 case.
13610
13611 2018-01-22 Maciej W. Rozycki <macro@mips.com>
13612
13613 * MAINTAINERS: Update my company e-mail address.
13614
13615 2018-01-22 Yao Qi <yao.qi@linaro.org>
13616
13617 * regcache.c (cooked_write_test): New function.
13618 (_initialize_regcache): Register the test.
13619
13620 2018-01-22 Yao Qi <yao.qi@linaro.org>
13621
13622 * ia64-tdep.c (ia64_pseudo_register_read): Call
13623 regcache->cooked_read instead of regcache_cooked_read_unsigned.
13624 * m32c-tdep.c (m32c_cat_read): Likewise.
13625 (m32c_r3r2r1r0_read): Likewise.
13626 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13627 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13628
13629 2018-01-22 Yao Qi <yao.qi@linaro.org>
13630
13631 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13632 method raw_read instead of regcache_raw_read.
13633 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13634 * arm-tdep.c (arm_neon_quad_read): Likewise.
13635 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13636 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13637 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13638 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13639 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13640 (i386_pseudo_register_read_into_value): Likewise.
13641 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13642 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13643 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13644 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13645 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13646 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13647 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13648 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13649 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13650
13651 2018-01-22 Yao Qi <yao.qi@linaro.org>
13652
13653 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13654 * configure.tgt: Remove target mt.
13655 * mt-tdep.c: Remove.
13656 * regcache.c (cooked_read_test): Remove the check for mt.
13657
13658 2018-01-22 Yao Qi <yao.qi@linaro.org>
13659
13660 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13661 instead of gdbarch_pseudo_register_read_value.
13662
13663 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13664
13665 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13666 language is Ada.
13667
13668 2018-01-22 Joel Brobecker <brobecker@adacore.com>
13669
13670 * linespec.c (create_sals_line_offset): Remove code that preserved
13671 the symtab_and_line's line number.
13672
13673 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13674
13675 * varobj.c (varobj_create): Don't set valid_block when creating a
13676 floating varobj.
13677
13678 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13679
13680 * varobj.c (varobj_create): Remove out of date comment.
13681
13682 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13683
13684 PR mi/20395
13685 * ada-exp.y (write_var_from_sym): Pass extra parameter when
13686 updating innermost block.
13687 * parse.c (innermost_block_tracker::update): Take extra type
13688 parameter, and check types match before updating innermost block.
13689 (write_dollar_variable): Update innermost block for registers.
13690 * parser-defs.h (enum innermost_block_tracker_type): New enum.
13691 (innermost_block_tracker::innermost_block_tracker): Initialise
13692 m_types member.
13693 (innermost_block_tracker::reset): Take type parameter.
13694 (innermost_block_tracker::update): Take type parameter, and pass
13695 type through as needed.
13696 (innermost_block_tracker::m_types): New member.
13697 * varobj.c (varobj_create): Pass type when reseting innermost
13698 block.
13699
13700 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13701
13702 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13703 * ada-lang.c (resolve_subexp): Likewise.
13704 * breakpoint.c (set_breakpoint_condition) Likewise.
13705 (watch_command_1) Likewise.
13706 * c-exp.y (variable): Likewise.
13707 * d-exp.y (PrimaryExpression): Likewise.
13708 * f-exp.y (variable): Likewise.
13709 * go-exp.y (variable): Likewise.
13710 * m2-exp.y (variable): Likewise.
13711 * objfiles.c (objfile::~objfile): Likewise.
13712 * p-exp.y (variable): Likewise.
13713 * parse.c (innermost_block): Change type.
13714 * parser-defs.h (class innermost_block_tracker): New.
13715 (innermost_block): Change to innermost_block_tracker.
13716 * printcmd.c (display_command): Switch to innermost_block API.
13717 (do_one_display): Likewise.
13718 * rust-exp.y (do_one_display): Likewise.
13719 * symfile.c (clear_symtab_users): Likewise.
13720 * varobj.c (varobj_create): Switch to innermost_block API, replace
13721 use of innermost_block with block stored on varobj object.
13722
13723 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
13724
13725 * expression.h (innermost_block): Remove declaration.
13726 * varobj.c: Add 'parser-defs.h' include.
13727
13728 2018-01-19 Tom Tromey <tom@tromey.com>
13729
13730 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13731 symbols in the static and global blocks.
13732
13733 2018-01-19 James Clarke <jrtc27@jrtc27.com>
13734
13735 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13736 gdb_ptrace.h, and move including gdb_wait.h ...
13737 * nat/linux-ptrace.h: ... to here.
13738
13739 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13740
13741 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13742 inf_ptrace_detach_success.
13743 (inf_ptrace_detach_success): Add inferior parameter, use it
13744 instead of inferior_ptid, pass it to detach_inferior.
13745 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13746 parameter.
13747 * inferior.c (detach_inferior): Add overload that takes an
13748 inferior object.
13749 * inferior.h (detach_inferior): Likewise.
13750 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13751 use inferior_ptid, adjust call to inf_ptrace_detach_success.
13752 * linux-thread-db.c (thread_db_detach): Use inf parameter.
13753
13754 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13755
13756 * target.h (struct target_ops) <to_detach>: Add inferior
13757 parameter.
13758 (target_detach): Likewise.
13759 * target.c (dispose_inferior): Pass inferior down.
13760 (target_detach): Pass inferior down. Assert that it is equal to
13761 the current inferior.
13762 * aix-thread.c (aix_thread_detach): Pass inferior down.
13763 * corefile.c (core_file_command): Pass current_inferior() down.
13764 * corelow.c (core_detach): Add inferior parameter.
13765 * darwin-nat.c (darwin_detach): Likewise.
13766 * gnu-nat.c (gnu_detach): Likewise.
13767 * inf-ptrace.c (inf_ptrace_detach): Likewise.
13768 * infcmd.c (detach_command): Pass current_inferior() down to
13769 target_detach.
13770 * infrun.c (follow_fork_inferior): Pass parent_inf to
13771 target_detach.
13772 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13773 target_detach.
13774 * linux-nat.c (linux_nat_detach): Add inferior parameter.
13775 * linux-thread-db.c (thread_db_detach): Likewise.
13776 * nto-procfs.c (procfs_detach): Likewise.
13777 * procfs.c (procfs_detach): Likewise.
13778 * record.c (record_detach): Likewise.
13779 * record.h (struct inferior): Forward-declare.
13780 (record_detach): Add inferior parameter.
13781 * remote-sim.c (gdbsim_detach): Likewise.
13782 * remote.c (remote_detach_1): Likewise.
13783 (remote_detach): Likewise.
13784 (extended_remote_detach): Likewise.
13785 * sol-thread.c (sol_thread_detach): Likewise.
13786 * target-debug.h (target_debug_print_inferior_p): New macro.
13787 * target-delegates.c: Re-generate.
13788 * top.c (kill_or_detach): Pass inferior down to target_detach.
13789 * windows-nat.c (windows_detach): Add inferior parameter.
13790
13791 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
13792
13793 * target.h (struct target_ops) <to_detach>: Remove args
13794 parameter.
13795 (target_detach): Likewise.
13796 * target.c (dispose_inferior): Adjust.
13797 (target_detach): Remove args parameter, adjust.
13798 * aix-thread.c (aix_thread_detach): Adjust.
13799 * corefile.c (core_file_command): Adjust.
13800 * corelow.c (core_detach): Adjust.
13801 * darwin-nat.c (darwin_detach): Adjust.
13802 * gnu-nat.c (gnu_detach): Adjust.
13803 * inf-ptrace.c (inf_ptrace_detach): Adjust.
13804 * infcmd.c (detach_command): Adjust
13805 * infrun.c (follow_fork_inferior): Adjust.
13806 (handle_vfork_child_exec_or_exit): Adjust.
13807 * linux-fork.c (linux_fork_detach): Remove args parameter.
13808 * linux-fork.h (linux_fork_detach): Likewise.
13809 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13810 * linux-thread-db.c (thread_db_detach): Likewise.
13811 * nto-procfs.c (procfs_detach): Likewise.
13812 * procfs.c (procfs_detach): Likewise.
13813 (do_detach): Remove signo parameter.
13814 * record.c (record_detach): Remove args parameter.
13815 * record.h (record_detach): Likewise.
13816 * remote-sim.c (gdbsim_detach): Likewise.
13817 * remote.c (remote_detach_1): Likewise.
13818 (remote_detach): Likewise.
13819 (extended_remote_detach): Likewise.
13820 * sol-thread.c (sol_thread_detach): Likewise.
13821 * target-delegates.c: Re-generate.
13822 * top.c (struct qt_args) <args>: Remove field.
13823 (kill_or_detach): Don't pass args.
13824 (quit_force): Don't set args.
13825 * windows-nat.c (windows_detach): Remove args parameter.
13826
13827 2018-01-19 Yao Qi <yao.qi@linaro.org>
13828
13829 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13830 (arm_linux_init_abi): Install it.
13831
13832 2018-01-19 Yao Qi <yao.qi@linaro.org>
13833
13834 * osabi.c (gdb_osabi_names): Extend the regexp for
13835 arm-linux-gnueabihf.
13836
13837 2018-01-18 Yao Qi <yao.qi@linaro.org>
13838
13839 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13840 m_abbrevs.
13841 (abbrev_table::add_abbrev): Update.
13842 (abbrev_table::lookup_abbrev): Update.
13843
13844 2018-01-18 Yao Qi <yao.qi@linaro.org>
13845
13846 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13847
13848 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
13849
13850 * compile/compile.c (compile_to_object): Convert "triplet_rx"
13851 to "std::string".
13852
13853 2018-01-17 Tom Tromey <tom@tromey.com>
13854
13855 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
13856
13857 2018-01-17 Tom Tromey <tom@tromey.com>
13858
13859 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13860 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13861 (create_array_type_with_stride): Update.
13862 * dwarf2read.c (set_die_type): Update.
13863
13864 2018-01-17 Tom Tromey <tom@tromey.com>
13865
13866 * dwarf2read.c (delayed_method_info): Remove typedef.
13867 (dwarf2_cu::method_info): Now a std::vector.
13868 (add_to_method_list): Update.
13869 (free_delayed_list): Remove.
13870 (compute_delayed_physnames): Update.
13871 (process_full_comp_unit, process_full_type_unit): Clear the method
13872 list. Remove cleanups.
13873 (psymtab_include_file_name): Add name_holder parameter. Use
13874 unique_xmalloc_ptr.
13875 (dwarf_decode_lines): Update.
13876
13877 2018-01-17 Tom Tromey <tom@tromey.com>
13878 Simon Marchi <simon.marchi@ericsson.com>
13879
13880 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13881 (dwarf2_per_objfile::free_cached_comp_units)
13882 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13883 (init_cutu_and_read_dies_no_follow): Update.
13884 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13885 (dwarf2_cu::~dwarf2_cu): New.
13886 (free_heap_comp_unit, free_stack_comp_unit): Remove.
13887 (age_cached_comp_units, free_one_cached_comp_unit): Update.
13888
13889 2018-01-17 Tom Tromey <tom@tromey.com>
13890 Simon Marchi <simon.marchi@ericsson.com>
13891
13892 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13893 (struct die_reader_specs) <abbrev_table>: New member.
13894 (struct abbrev_table): Add constructor.
13895 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13896 <abbrev_obstack>: Now an auto_obstack.
13897 (abbrev_table_up): New typedef.
13898 (init_cu_die_reader): Add abbrev_table parameter.
13899 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13900 Add result_dwo_abbrev_table.
13901 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13902 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13903 Update.
13904 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13905 parameter.
13906 (skip_children): Update.
13907 (abbrev_table::alloc_abbrev): Rename from
13908 abbrev_table_alloc_abbrev.
13909 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13910 (abbrev_table::lookup_abbrev): Rename from
13911 abbrev_table_lookup_abbrev.
13912 (abbrev_table_read_table): Return abbrev_table_up.
13913 (abbrev_table_free, abbrev_table_free_cleanup)
13914 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13915 (load_partial_dies): Update.
13916
13917 2018-01-17 Tom Tromey <tom@tromey.com>
13918
13919 * dwarf2read.c (dwarf2_compute_name): Update comment.
13920 (read_func_scope, read_variable): Update.
13921 (new_symbol): Remove.
13922 (new_symbol_full): Rename to new_symbol.
13923
13924 2018-01-17 Mike Gulick <mgulick@mathworks.com>
13925
13926 PR gdb/16577
13927 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13928 a warning instead of throwing an error, set section size to 0 and return
13929 NULL.
13930 * gdb_bfd.h (gdb_bfd_map_section): Update description.
13931
13932 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13933
13934 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13935 std::string.
13936 (linux_ptrace_attach_fail_reason_string): Likewise.
13937 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13938 Likewise.
13939 (linux_ptrace_attach_fail_reason_string): Likewise.
13940 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13941
13942 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
13943
13944 * linux-nat.c (linux_nat_attach): Remove xstrdup.
13945
13946 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
13947
13948 PR gdb/21559
13949 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13950 checking for fs_base/gs_base fields in struct user_regs_struct.
13951 * configure: Regenerate.
13952
13953 2018-01-17 Yao Qi <yao.qi@linaro.org>
13954
13955 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13956 function.
13957 (aarch64_linux_init_abi): Install it to gdbarch hook
13958 gcc_target_options.
13959
13960 2018-01-15 Pedro Alves <palves@redhat.com>
13961
13962 * common/signals-state-save-restore.c
13963 (save_original_signals_state): Fix typos.
13964
13965 2017-01-12 Tom Tromey <tom@tromey.com>
13966 Sergio Durigan Junior <sergiodj@redhat.com>
13967
13968 * Makefile.in (install-only): Install gdb-add-index.
13969
13970 2018-01-12 John Baldwin <jhb@FreeBSD.org>
13971
13972 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13973
13974 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13975
13976 * infrun.c (keep_going_pass_signal): Clear step-over info when
13977 insert_breakpoints fails.
13978
13979 2018-01-11 Pedro Alves <palves@redhat.com>
13980
13981 PR gdb/22583
13982 * infrun.c (resume): Rename to ...
13983 (resume_1): ... this.
13984 (resume): Reimplement as wrapper around resume_1.
13985
13986 2018-01-11 Pedro Alves <palves@redhat.com>
13987
13988 PR remote/22597
13989 * remote.c (remote_parse_stop_reply): Default to the last-set
13990 general thread instead of to 'magic_null_ptid'.
13991
13992 2018-01-10 Pedro Alves <palves@redhat.com>
13993
13994 * language.h (language_get_symbol_name_matcher): Rename ...
13995 (get_symbol_name_matcher): ... this.
13996 * language.c (language_get_symbol_name_matcher): Ditto.
13997 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13998 callers adjusted.
13999
14000 2018-01-10 Pedro Alves <palves@redhat.com>
14001
14002 PR gdb/22670
14003 * dwarf2read.c
14004 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14005 Adjust to use language_get_symbol_name_matcher instead of
14006 language_defn::la_get_symbol_name_matcher.
14007 * language.c (language_get_symbol_name_matcher): If in Ada mode
14008 and the lookup name is a verbatim match, return Ada's matcher.
14009 * language.h (language_get_symbol_name_matcher): Adjust comment.
14010 (ada_lookup_name_info::verbatim_p):: New method.
14011
14012 2018-01-10 Pedro Alves <palves@redhat.com>
14013
14014 PR gdb/22670
14015 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14016 minsym's language is language_auto or language_cplus, pass down
14017 language_ada instead.
14018 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14019
14020 2018-01-10 Pedro Alves <palves@redhat.com>
14021
14022 PR gdb/22670
14023 * minsyms.c (linkage_name_str): New function.
14024 (iterate_over_minimal_symbols): Use it.
14025
14026 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14027
14028 * NEWS: Document that 'info proc' now works on FreeBSD.
14029
14030 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14031
14032 * configure.ac: Check for kinfo_getfile in libutil.
14033 * configure: Regenerate.
14034 * config.in: Regenerate.
14035 * fbsd-nat.c: Include "fbsd-tdep.h".
14036 (fbsd_fetch_cmdline): New.
14037 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14038 rather than calling error.
14039 (fbsd_info_proc): New.
14040 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14041 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14042 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14043
14044 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14045
14046 * fbsd-nat.c (struct free_deleter): Remove.
14047 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14048
14049 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14050
14051 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14052 NULL for an empty pathname.
14053
14054 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14055
14056 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14057 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14058 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14059 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14060 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14061 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14062 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14063 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14064 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14065 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14066 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14067 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14068 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14069 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14070 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14071
14072 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14073
14074 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14075 (gnu_xfer_auxv): New function.
14076 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14077 TARGET_OBJECT_AUXV.
14078
14079 2018-01-08 Yao Qi <yao.qi@linaro.org>
14080 Simon Marchi <simon.marchi@ericsson.com>
14081
14082 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14083 common/selftest.c.
14084 (COMMON_OBS): Remove selftest.o.
14085 * configure.ac: Append selftest-arch.c and common/selftest.c to
14086 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14087 * configure: Re-generated.
14088 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14089 GDB_SELF_TEST.
14090 (maintenance_info_selftests): Likewise.
14091
14092 2018-01-08 Xavier Roirand <roirand@adacore.com>
14093
14094 * ada-valprint.c (val_print_packed_array_elements): Use
14095 proper number of elements when printing an array indexed
14096 by an enumeration type.
14097
14098 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14099
14100 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14101 (dw2_get_file_names_reader): Adjust.
14102 (lookup_dwo_signatured_type): Adjust.
14103 (lookup_dwp_signatured_type): Adjust.
14104 (lookup_signatured_type): Adjust.
14105 (create_type_unit_group): Adjust.
14106 (get_type_unit_group): Adjust.
14107 (process_psymtab_comp_unit_reader): Adjust.
14108 (build_type_psymtabs_reader): Adjust.
14109 (scan_partial_symbols): Adjust.
14110 (add_partial_symbol): Adjust.
14111 (add_partial_subprogram): Adjust.
14112 (peek_die_abbrev): Adjust.
14113 (fixup_go_packaging): Adjust.
14114 (process_imported_unit_die): Adjust.
14115 (dwarf2_compute_name): Adjust.
14116 (dwarf2_physname): Adjust.
14117 (read_import_statement): Adjust.
14118 (handle_DW_AT_stmt_list): Adjust.
14119 (read_file_scope): Adjust.
14120 (read_func_scope): Adjust.
14121 (read_lexical_block_scope): Adjust.
14122 (read_call_site_scope): Adjust.
14123 (read_variable): Adjust.
14124 (dwarf2_rnglists_process): Adjust.
14125 (dwarf2_ranges_process): Adjust.
14126 (dwarf2_ranges_read): Adjust.
14127 (dwarf2_get_pc_bounds): Adjust.
14128 (dwarf2_record_block_ranges): Adjust.
14129 (dwarf2_add_field): Adjust.
14130 (dwarf2_add_member_fn): Adjust.
14131 (read_structure_type): Adjust.
14132 (process_structure_scope): Adjust.
14133 (read_enumeration_type): Adjust.
14134 (read_array_type): Adjust.
14135 (mark_common_block_symbol_computed): Adjust.
14136 (read_common_block): Adjust.
14137 (read_namespace_type): Adjust.
14138 (read_namespace): Adjust.
14139 (read_module_type): Adjust.
14140 (read_tag_pointer_type): Adjust.
14141 (read_tag_ptr_to_member_type): Adjust.
14142 (read_tag_string_type): Adjust.
14143 (read_subroutine_type): Adjust.
14144 (read_typedef): Adjust.
14145 (read_base_type): Adjust.
14146 (attr_to_dynamic_prop): Adjust.
14147 (read_subrange_type): Adjust.
14148 (read_unspecified_type): Adjust.
14149 (dwarf2_read_abbrevs): Adjust.
14150 (load_partial_dies): Adjust.
14151 (read_partial_die): Adjust.
14152 (find_partial_die): Adjust.
14153 (guess_partial_die_structure_name): Adjust.
14154 (fixup_partial_die): Adjust.
14155 (read_attribute_value): Adjust.
14156 (read_addr_index): Adjust.
14157 (read_addr_index_from_leb128): Adjust.
14158 (read_str_index): Adjust.
14159 (dwarf2_string_attr): Adjust.
14160 (get_debug_line_section): Adjust.
14161 (dwarf_decode_line_header): Adjust.
14162 (lnp_state_machine::check_line_address): Adjust.
14163 (dwarf_decode_lines_1): Adjust.
14164 (dwarf_decode_lines): Adjust.
14165 (dwarf2_start_symtab): Adjust.
14166 (var_decode_location): Adjust.
14167 (new_symbol_full): Adjust.
14168 (dwarf2_const_value_data): Adjust.
14169 (dwarf2_const_value_attr): Adjust.
14170 (dwarf2_const_value): Adjust.
14171 (die_type): Adjust.
14172 (die_containing_type): Adjust.
14173 (build_error_marker_type): Adjust.
14174 (lookup_die_type): Adjust.
14175 (guess_full_die_structure_name): Adjust.
14176 (anonymous_struct_prefix): Adjust.
14177 (determine_prefix): Adjust.
14178 (dwarf2_name): Adjust.
14179 (follow_die_ref_or_sig): Adjust.
14180 (follow_die_offset): Adjust.
14181 (follow_die_ref): Adjust.
14182 (follow_die_sig_1): Adjust.
14183 (follow_die_sig): Adjust.
14184 (get_signatured_type): Adjust.
14185 (get_DW_AT_signature_type): Adjust.
14186 (decode_locdesc): Adjust.
14187 (dwarf_decode_macros): Adjust.
14188 (cu_debug_loc_section): Adjust.
14189 (fill_in_loclist_baton): Adjust.
14190 (dwarf2_symbol_mark_computed): Adjust.
14191 (init_one_comp_unit): Don't assign
14192 dwarf2_cu::dwarf2_per_objfile.
14193 (set_die_type): Adjust.
14194
14195 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14196
14197 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14198 <dwarf2_per_objfile>: New field.
14199 (dwarf2_per_objfile): Remove global.
14200 (get_dwarf2_per_objfile): New function.
14201 (set_dwarf2_per_objfile): New function.
14202 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14203 dwarf2_per_objfile.
14204 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14205 (read_abbrev_offset): Likewise.
14206 (read_indirect_string): Likewise.
14207 (read_indirect_line_string): Likewise.
14208 (read_indirect_string_at_offset): Likewise.
14209 (read_indirect_string_from_dwz): Likewise.
14210 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14211 dwarf2_per_objfile.
14212 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14213 (create_all_comp_units): Change objfile parameter to
14214 dwarf2_per_objfile.
14215 (create_all_type_units): Likewise.
14216 (process_queue): Add dwarf2_per_objfile parameter.
14217 (read_and_check_comp_unit_head): Likewise.
14218 (lookup_dwo_unit_in_dwp): Likewise.
14219 (get_dwp_file): Likewise.
14220 (process_cu_includes): Likewise.
14221 (struct free_dwo_file_cleanup_data): New struct.
14222 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14223 set_dwarf2_per_objfile.
14224 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14225 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14226 context, adjust calls.
14227 (dw2_instantiate_symtab): Likewise.
14228 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14229 (dw2_get_cu): Likewise.
14230 (create_cu_from_index_list): Change objfile parameter to
14231 dwarf2_per_objfile.
14232 (create_cus_from_index_list): Get dwarf2_per_objfile from
14233 context, adjust calls.
14234 (create_cus_from_index): Likewise.
14235 (create_signatured_type_table_from_index): Change objfile
14236 parameter to dwarf2_per_objfile.
14237 (create_signatured_type_table_from_debug_names): Change objfile
14238 parameter to dwarf2_per_objfile.
14239 (create_addrmap_from_index): Likewise.
14240 (create_addrmap_from_aranges): Likewise.
14241 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14242 (dw2_setup): Remove.
14243 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14244 context.
14245 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14246 get_dwarf2_per_objfile.
14247 (dw2_forget_cached_source_info): Likewise.
14248 (dw2_map_symtabs_matching_filename): Likewise.
14249 (struct dw2_symtab_iterator) <index>: Remove.
14250 <dwarf2_per_objfile>: New field.
14251 (dw2_symtab_iter_init): Replace index parameter with
14252 dwarf2_per_objfile.
14253 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14254 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14255 (dw2_print_stats): Likewise.
14256 (dw2_dump): Likewise.
14257 (dw2_expand_symtabs_for_function): Likewise.
14258 (dw2_expand_all_symtabs): Likewise.
14259 (dw2_expand_symtabs_with_fullname): Likewise.
14260 (dw2_expand_marked_cus): Replace index and objfile parameters
14261 with dwarf2_per_objfile.
14262 (dw_expand_symtabs_matching_file_matcher): Add
14263 dwarf2_per_objfile parameter and adjust calls.
14264 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14265 adjust calls.
14266 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14267 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14268 adjust calls.
14269 (create_cus_from_debug_names_list): Replace objfile parameter
14270 with dwarf2_per_objfile and adjust calls.
14271 (create_cus_from_debug_names): Likewise.
14272 (dwarf2_read_debug_names): Likewise.
14273 (mapped_debug_names::namei_to_name): Adjust call.
14274 (dw2_debug_names_iterator::next): Likewise.
14275 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14276 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14277 (dw2_debug_names_dump): Likewise.
14278 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14279 (dw2_debug_names_expand_symtabs_matching): Likewise.
14280 (dwarf2_initialize_objfile): Likewise.
14281 (dwarf2_build_psymtabs): Likewise.
14282 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14283 this_cu.
14284 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14285 (read_and_check_comp_unit_head): Likewise.
14286 (read_abbrev_offset): Likewise.
14287 (create_debug_type_hash_table): Likewise.
14288 (create_debug_types_hash_table): Likewise.
14289 (create_all_type_units): Replace objfile parameter with
14290 dwarf2_per_objfile.
14291 (add_type_unit): Add dwarf2_per_objfile parameter.
14292 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14293 with dwarf2_per_objfile.
14294 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14295 (lookup_dwp_signatured_type): Likewise.
14296 (lookup_signatured_type): Likewise.
14297 (read_cutu_die_from_dwo): Likewise.
14298 (init_tu_and_read_dwo_dies): Likewise.
14299 (init_cutu_and_read_dies): Likewise.
14300 (init_cutu_and_read_dies_no_follow): Likewise.
14301 (allocate_type_unit_groups_table): Add objfile parameter.
14302 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14303 (get_type_unit_group): Likewise.
14304 (process_psymtab_comp_unit): Update call.
14305 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14306 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14307 (print_tu_stats): Likewise.
14308 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14309 in void* parameter.
14310 (build_type_psymtabs): Change objfile parameter to
14311 dwarf2_per_objfile.
14312 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14313 passed in void* parameter.
14314 (process_skeletonless_type_units): Change objfile parameter to
14315 dwarf2_per_objfile.
14316 (set_partial_user): Likewise.
14317 (dwarf2_build_psymtabs_hard): Likewise.
14318 (read_comp_units_from_section): Likewise.
14319 (create_all_comp_units): Likewise.
14320 (scan_partial_symbols): Update calls.
14321 (add_partial_symbol): Likewise.
14322 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14323 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14324 (process_queue): Add dwarf2_per_objfile parameter.
14325 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14326 (compute_compunit_symtab_includes): Likewise.
14327 (process_cu_includes): Add dwarf2_per_objfile parameter.
14328 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14329 (process_full_type_unit): Likewise.
14330 (process_imported_unit_die): Update call.
14331 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14332 (read_file_scope): Likewise.
14333 (allocate_dwo_file_hash_table): Add objfile parameter.
14334 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14335 (create_cus_hash_table): Likewise.
14336 (create_dwp_hash_table): Likewise.
14337 (create_dwo_unit_in_dwp_v1): Likewise.
14338 (create_dwp_v2_section): Likewise.
14339 (create_dwo_unit_in_dwp_v2): Likewise.
14340 (lookup_dwo_unit_in_dwp): Likewise.
14341 (try_open_dwop_file): Likewise.
14342 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14343 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14344 cleanup to include a reference to dwarf2_per_objfile.
14345 (open_dwp_file): Add dwarf2_per_objfile parameter.
14346 (open_and_init_dwp_file): Likewise.
14347 (get_dwp_file): Likewise.
14348 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14349 (queue_and_load_all_dwo_tus): Update call.
14350 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14351 data.
14352 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14353 (dwarf2_ranges_process): Likewise.
14354 (dwarf2_get_pc_bounds): Likewise.
14355 (mark_common_block_symbol_computed): Likewise.
14356 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14357 (dwarf2_read_abbrevs): Update call.
14358 (read_partial_die): Use dwarf2_per_objfile from cu.
14359 (find_partial_die): Likewise.
14360 (fixup_partial_die): Likewise.
14361 (read_attribute_value): Likewise.
14362 (read_indirect_string_at_offset_from): Add objfile parameter.
14363 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14364 parameter.
14365 (read_indirect_string_from_dwz): Add objfile parameter.
14366 (read_indirect_string): Add objfile parameter.
14367 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14368 (read_addr_index): Use dwarf2_per_objfile from cu.
14369 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14370 call dw2_setup.
14371 (read_str_index): Use dwarf2_per_objfile from cu.
14372 (get_debug_line_section): Likewise.
14373 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14374 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14375 (new_symbol_full): Use dwarf2_per_objfile from cu.
14376 (build_error_marker_type): Likewise.
14377 (lookup_die_type): Likewise.
14378 (determine_prefix): Likewise.
14379 (follow_die_offset): Likewise.
14380 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14381 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14382 (dwarf2_fetch_die_type_sect_off): Likewise.
14383 (dwarf2_get_die_type): Likewise.
14384 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14385 (get_signatured_type): Likewise.
14386 (get_DW_AT_signature_type): Likewise.
14387 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14388 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14389 (cu_debug_loc_section): Likewise.
14390 (fill_in_loclist_baton): Likewise.
14391 (dwarf2_symbol_mark_computed): Likewise.
14392 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14393 dwarf2_per_objfile.
14394 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14395 parameter.
14396 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14397 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14398 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14399 (set_die_type): Use dwarf2_free_objfile from cu.
14400 (get_die_type_at_offset): Likewise.
14401 (dwarf2_per_objfile_free): Don't assign global variable.
14402 (debug_names) <constructor>: Add dwarf2_per_objfile
14403 parameter, update m_debugstrlookup construction.
14404 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14405 parameter.
14406 <m_dwarf2_per_objfile>: New field.
14407 <lookup>: Use m_dwarf2_per_objfile.
14408 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14409 (psyms_seen_size): Likewise.
14410 (write_gdbindex): Replace objfile parameter with
14411 dwarf2_per_objfile.
14412 (write_debug_names): Likewise.
14413 (write_psymtabs_to_index): Likewise.
14414 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14415 calls.
14416
14417 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14418
14419 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14420 <dwarf2_per_objfile>: New field.
14421 (struct dwarf2_per_cu_data) <objfile>: Remove.
14422 <dwarf2_per_objfile>: New field.
14423 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14424 of objfile.
14425 (create_signatured_type_table_from_index): Likewise.
14426 (create_debug_type_hash_table): Likewise.
14427 (fill_in_sig_entry_from_dwo_entry): Likewise.
14428 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14429 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14430 objfile.
14431 (create_partial_symtab): Access objfile through
14432 dwarf2_per_objfile.
14433 (process_psymtab_comp_unit_reader): Likewise.
14434 (read_comp_units_from_section): Likewise.
14435 (scan_partial_symbols): Likewise.
14436 (add_partial_symbol): Likewise.
14437 (add_partial_subprogram): Likewise.
14438 (peek_die_abbrev): Likewise.
14439 (fixup_go_packaging): Likewise.
14440 (process_full_comp_unit): Likewise.
14441 (process_full_type_unit): Likewise.
14442 (process_imported_unit_die): Likewise.
14443 (dwarf2_compute_name): Likewise.
14444 (dwarf2_physname): Likewise.
14445 (read_import_statement): Likewise.
14446 (create_cus_hash_table): Assign dwarf2_physname instead of
14447 objfile.
14448 (read_func_scope): Access objfile through dwarf2_per_objfile.
14449 (read_lexical_block_scope): Likewise.
14450 (read_call_site_scope): Likewise.
14451 (read_variable): Likewise.
14452 (dwarf2_rnglists_process): Likewise.
14453 (dwarf2_ranges_process): Likewise.
14454 (dwarf2_ranges_read): Likewise.
14455 (dwarf2_record_block_ranges): Likewise.
14456 (dwarf2_add_field): Likewise.
14457 (dwarf2_add_member_fn): Likewise.
14458 (read_structure_type): Likewise.
14459 (process_structure_scope): Likewise.
14460 (read_enumeration_type): Likewise.
14461 (read_array_type): Likewise.
14462 (read_common_block): Likewise.
14463 (read_namespace_type): Likewise.
14464 (read_namespace): Likewise.
14465 (read_module_type): Likewise.
14466 (read_tag_pointer_type): Likewise.
14467 (read_tag_ptr_to_member_type): Likewise.
14468 (read_tag_string_type): Likewise.
14469 (read_subroutine_type): Likewise.
14470 (read_typedef): Likewise.
14471 (read_base_type): Likewise.
14472 (attr_to_dynamic_prop): Likewise.
14473 (read_subrange_type): Likewise.
14474 (read_unspecified_type): Likewise.
14475 (load_partial_dies): Likewise.
14476 (read_partial_die): Likewise.
14477 (find_partial_die): Likewise.
14478 (guess_partial_die_structure_name): Likewise.
14479 (fixup_partial_die): Likewise.
14480 (read_attribute_value): Likewise.
14481 (read_addr_index_from_leb128): Likewise.
14482 (dwarf2_read_addr_index): Likewise.
14483 (dwarf2_string_attr): Likewise.
14484 (lnp_state_machine::check_line_address): Likewise.
14485 (dwarf_decode_lines_1): Likewise.
14486 (dwarf_decode_lines): Likewise.
14487 (dwarf2_start_symtab): Likewise.
14488 (var_decode_location): Likewise.
14489 (new_symbol_full): Likewise.
14490 (dwarf2_const_value_data): Likewise.
14491 (dwarf2_const_value_attr): Likewise.
14492 (dwarf2_const_value): Likewise.
14493 (die_type): Likewise.
14494 (die_containing_type): Likewise.
14495 (lookup_die_type): Likewise.
14496 (guess_full_die_structure_name): Likewise.
14497 (anonymous_struct_prefix): Likewise.
14498 (dwarf2_name): Likewise.
14499 (follow_die_ref_or_sig): Likewise.
14500 (follow_die_offset): Likewise.
14501 (follow_die_ref): Likewise.
14502 (dwarf2_fetch_die_loc_sect_off): Likewise.
14503 (dwarf2_fetch_constant_bytes): Likewise.
14504 (dwarf2_fetch_die_type_sect_off): Likewise.
14505 (dwarf2_get_die_type): Likewise.
14506 (follow_die_sig): Likewise.
14507 (decode_locdesc): Likewise.
14508 (dwarf2_per_cu_objfile): Likewise.
14509 (dwarf2_per_cu_text_offset): Likewise.
14510 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14511 objfile.
14512 (set_die_type): Access objfile through
14513 dwarf2_per_objfile.
14514
14515 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14516
14517 * valprint.c (converted_character_d): Remove typedef.
14518 (DEF_VEC_O (converted_character_d)): Remove.
14519 (count_next_character): Use std::vector.
14520 (print_converted_chars_to_obstack): Likewise.
14521 (generic_printstr): Likewise.
14522
14523 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14524
14525 * xml-support.h (struct gdb_xml_value): Add constructor.
14526 <value>: Change type to unique_xmalloc_ptr.
14527 (gdb_xml_value_s): Remove typedef.
14528 (DEF_VEC_O (gdb_xml_value_s)): Remove.
14529 (gdb_xml_element_start_handler): Change parameter type to
14530 std::vector.
14531 (xml_find_attribute): Likewise.
14532 * xml-support.c (xml_find_attribute): Change parameter type to
14533 std::vector and adjust.
14534 (gdb_xml_values_cleanup): Remove.
14535 (gdb_xml_parser::start_element): Adjust to std::vector.
14536 (xinclude_start_include): Change paraeter type to std::vector
14537 and adjust.
14538 * btrace.c (check_xml_btrace_version): Likewise.
14539 (parse_xml_btrace_block): Likewise.
14540 (parse_xml_btrace_pt_config_cpu): Likewise.
14541 (parse_xml_btrace_pt): Likewise.
14542 (parse_xml_btrace_conf_bts): Likewise.
14543 (parse_xml_btrace_conf_pt): Likewise.
14544 * memory-map.c (memory_map_start_memory): Likewise.
14545 (memory_map_start_property): Likewise.
14546 * osdata.c (osdata_start_osdata): Likewise.
14547 (osdata_start_item): Likewise.
14548 (osdata_start_column): Likewise.
14549 * remote.c (start_thread): Likewise.
14550 * solib-aix.c (library_list_start_library): Likewise.
14551 (library_list_start_list): Likewise.
14552 * solib-svr4.c (library_list_start_library): Likewise.
14553 (svr4_library_list_start_list): Likewise.
14554 * solib-target.c (library_list_start_segment): Likewise.
14555 (library_list_start_section): Likewise.
14556 (library_list_start_library): Likewise.
14557 (library_list_start_list): Likewise.
14558 * tracepoint.c (traceframe_info_start_memory): Likewise.
14559 (traceframe_info_start_tvar): Likewise.
14560 * xml-syscall.c (syscall_start_syscall): Likewise.
14561 * xml-tdesc.c (tdesc_start_target): Likewise.
14562 (tdesc_start_feature): Likewise.
14563 (tdesc_start_reg): Likewise.
14564 (tdesc_start_union): Likewise.
14565 (tdesc_start_struct): Likewise.
14566 (tdesc_start_flags): Likewise.
14567 (tdesc_start_enum): Likewise.
14568 (tdesc_start_field): Likewise.
14569 (tdesc_start_enum_value): Likewise.
14570 (tdesc_start_vector): Likewise.
14571
14572 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14573
14574 * extension.h (struct xmethod_worker) <clone>: Remove.
14575 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14576 Remove.
14577 (python_xmethod_worker::clone): Remove.
14578 * valops.c (find_overload_match): Use std::move instead of
14579 clone.
14580
14581 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14582
14583 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14584 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14585 <free_xmethod_worker_data>: Remove.
14586 <get_matching_xmethod_workers>: Chance VEC to std::vector.
14587 <get_xmethod_arg_types>: Remove.
14588 <get_xmethod_result_type>: Remove.
14589 <invoke_xmethod>: Remove.
14590 * extension.c (new_xmethod_worker): Remove.
14591 (clone_xmethod_worker): Remove.
14592 (get_matching_xmethod_workers): Return void, pass std::vector by
14593 pointer.
14594 (get_xmethod_arg_types): Rename to...
14595 (xmethod_worker::get_arg_types): ... this, and adjust.
14596 (get_xmethod_result_type): Rename to...
14597 (xmethod_worker::get_result_type): ... this, and adjust.
14598 (invoke_xmethod): Remove.
14599 (free_xmethod_worker): Remove.
14600 (free_xmethod_worker_vec): Remove.
14601 * extension.h (enum ext_lang_rc): Move here from
14602 extension-priv.h.
14603 (struct xmethod_worker): Add constructor and destructor.
14604 <data>: Remove.
14605 <value>: Remove.
14606 <invoke, clone, do_get_result_type, do_get_arg_types>: New
14607 virtual pure methods.
14608 <get_arg_types, get_result_type>: New methods.
14609 (xmethod_worker_ptr): Remove typedef.
14610 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14611 (xmethod_worker_vec): Remove typedef.
14612 (xmethod_worker_up): New typedef.
14613 (invoke_xmethod): Remove.
14614 (clone_xmethod_worker): Remove.
14615 (free_xmethod_worker): Remove.
14616 (free_xmethod_worker_vec): Remove.
14617 (get_xmethod_arg_types): Remove.
14618 (get_xmethod_result_type): Remove.
14619 * valops.c (find_method_list): Use std::vector, don't use
14620 intermediate vector.
14621 (value_find_oload_method_list): Use std::vector.
14622 (find_overload_match): Use std::vector.
14623 (find_oload_champ): Use std::vector.
14624 * value.c (value_free): Use operator delete.
14625 (value_of_xmethod): Rename to...
14626 (value_from_xmethod): ... this. Don't assign
14627 xmethod_worker::value, take rvalue-reference.
14628 (result_type_of_xmethod): Adjust.
14629 (call_xmethod): Adjust.
14630 * value.h: Include extension.h.
14631 (struct xmethod_worker): Don't forward-declare.
14632 (value_of_xmethod): Rename to...
14633 (value_from_xmethod): ... this, take rvalue-reference.
14634 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14635 (struct python_xmethod_worker): ... this, add constructor and
14636 destructor.
14637 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14638 (gdbpy_free_xmethod_worker_data): Rename to...
14639 (python_xmethod_worker::~python_xmethod_worker): ... this and
14640 adjust.
14641 (gdbpy_clone_xmethod_worker_data): Rename to...
14642 (python_xmethod_worker::clone): ... this and adjust.
14643 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14644 temporary vector.
14645 (gdbpy_get_xmethod_arg_types): Rename to...
14646 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14647 (gdbpy_get_xmethod_result_type): Rename to...
14648 (python_xmethod_worker::do_get_result_type): ... this and
14649 adjust.
14650 (gdbpy_invoke_xmethod): Rename to...
14651 (python_xmethod_worker::invoke): ... this and adjust.
14652 (new_python_xmethod_worker): Rename to...
14653 (python_xmethod_worker::python_xmethod_worker): ... this and
14654 adjust.
14655 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14656 Remove.
14657 (gdbpy_free_xmethod_worker_data): Remove.
14658 (gdbpy_get_matching_xmethod_workers): Use std::vector.
14659 (gdbpy_get_xmethod_arg_types): Remove.
14660 (gdbpy_get_xmethod_result_type): Remove.
14661 (gdbpy_invoke_xmethod): Remove.
14662 * python/python.c (python_extension_ops): Remove obsolete
14663 callbacks.
14664
14665 2018-01-05 Pedro Alves <palves@redhat.com>
14666
14667 PR gdb/18653
14668 * common/signals-state-save-restore.c
14669 (save_original_signals_state): New parameter 'quiet'. Warn if we
14670 find a custom handler preinstalled, instead of internal erroring.
14671 But only warn if !quiet.
14672 * common/signals-state-save-restore.h
14673 (save_original_signals_state): New parameter 'quiet'.
14674 * main.c (captured_main_1): Move save_original_signals_state call
14675 after option handling, and pass QUIET.
14676
14677 2018-01-05 Pedro Alves <palves@redhat.com>
14678
14679 * spu-tdep.c (spu_catch_start): Pass
14680 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14681
14682 2018-01-05 Pedro Alves <palves@redhat.com>
14683
14684 PR gdb/22670
14685 * ada-lang.c (literal_symbol_name_matcher): New function.
14686 (ada_get_symbol_name_matcher): Use it for
14687 symbol_name_match_type::SEARCH_NAME.
14688 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
14689 it down instead of assuming symbol_name_match_type::FULL.
14690 * block.h (block_lookup_symbol): New parameter 'match_type'.
14691 * c-valprint.c (print_unpacked_pointer): Use
14692 lookup_symbol_search_name instead of lookup_symbol.
14693 * compile/compile-object-load.c (get_out_value_type): Pass down
14694 symbol_name_match_type::SEARCH_NAME.
14695 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14696 symbol_name_match_type::FULL.
14697 * cp-support.c (cp_get_symbol_name_matcher): Handle
14698 symbol_name_match_type::SEARCH_NAME.
14699 * infrun.c (insert_exception_resume_breakpoint): Use
14700 lookup_symbol_search_name.
14701 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14702 * psymtab.c (maintenance_check_psymtabs): Use
14703 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14704 * stack.c (print_frame_args): Use lookup_symbol_search_name and
14705 SYMBOL_SEARCH_NAME.
14706 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14707 if symbol_name_match_type::SEARCH_NAME.
14708 (lookup_symbol_in_language): Pass down
14709 symbol_name_match_type::FULL.
14710 (lookup_symbol_search_name): New.
14711 (lookup_language_this): Pass down
14712 symbol_name_match_type::SEARCH_NAME.
14713 (lookup_symbol_aux, lookup_local_symbol): New parameter
14714 'match_type'. Pass it down.
14715 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14716 (lookup_symbol_search_name): New declaration.
14717 (lookup_symbol_in_block): New 'match_type' parameter.
14718
14719 2018-01-05 Pedro Alves <palves@redhat.com>
14720
14721 PR gdb/22670
14722 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14723 ada_lookup_symbol.
14724 (ada_lookup_symbol): Reimplement in terms of
14725 ada_lookup_symbol_list, bits factored out from
14726 ada_lookup_encoded_symbol.
14727
14728 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14729
14730 * ada-exp.y (write_object_renaming): When subscripting an array
14731 using a symbol as the index, pass the block in call to
14732 ada_lookup_encoded_symbol when looking that symbol up.
14733
14734 2018-01-05 Jerome Guitton <guitton@adacore.com>
14735
14736 * ada-lang.c (ada_array_length): Use ada_index_type instead of
14737 TYPE_INDEX_TYPE.
14738
14739 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14740
14741 * ada-lang.c (ada_to_fixed_value_create): Add handling of
14742 the case where VALUE_LVAL (val0) is not lval_memory.
14743
14744 2018-01-05 Xavier Roirand <roirand@adacore.com>
14745
14746 * ada-valprint.c (print_optional_low_bound): Handle
14747 character-indexed array printing like boolean-indexed array
14748 printing.
14749
14750 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14751
14752 * NEWS: Create a new section for the next release branch.
14753 Rename the section of the current branch, now that it has
14754 been cut.
14755
14756 2018-01-05 Joel Brobecker <brobecker@adacore.com>
14757
14758 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14759 * version.in: Bump version to 8.1.50.DATE-git.
14760
14761 2018-01-03 Xavier Roirand <roirand@adacore.com>
14762
14763 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14764 Add field.
14765 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14766 Add field.
14767 (default_exception_support_info) <catch_handlers_sym>: Add field.
14768 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14769 (ada_exception_name_addr_1): Add "catch handlers" handling.
14770 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14771 Update all callers.
14772 (create_excep_cond_exprs) <ex>: Add parameter.
14773 (re_set_exception): Update create_excep_cond_exprs call.
14774 (print_it_exception, print_one_exception, print_mention_exception)
14775 (print_recreate_exception): Add "catch handler" handling.
14776 (allocate_location_catch_handlers, re_set_catch_handlers)
14777 (check_status_catch_handlers, print_it_catch_handlers)
14778 (print_one_catch_handlers, print_mention_catch_handlers)
14779 (print_recreate_catch_handlers): New function.
14780 (catch_handlers_breakpoint_ops): New variable.
14781 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14782 Add parameter. Add "catch handler" handling.
14783 (ada_exception_sym_name, ada_exception_breakpoint_ops):
14784 Add "catch handler" handling.
14785 (ada_exception_catchpoint_cond_string): Add "catch handler"
14786 handling.
14787 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14788 call.
14789 (catch_ada_handlers_command): New function.
14790 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14791 operations structure.
14792 (_initialize_ada_language): Add "catch handlers" command entry.
14793 * NEWS: Document "catch handlers" feature.
14794
14795 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14796
14797 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14798 account when creating the array type of the slice.
14799 (ada_value_slice): Likewise.
14800
14801 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14802
14803 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14804 New enum value.
14805 (create_array_type_with_stride): Add byte_stride_prop parameter.
14806 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14807 New parameter. Update all callers in this file.
14808 (array_type_has_dynamic_stride): New function.
14809 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14810 of arrays with dynamic byte strides.
14811 * dwarf2read.c (read_array_type): Add support for dynamic
14812 DW_AT_byte_stride attributes.
14813
14814 2018-01-02 Joel Brobecker <brobecker@adacore.com>
14815
14816 * dwarf2read.c (read_unspecified_type): Treat
14817 DW_TAG_enumeration_type DIEs from Ada units as stubs.
14818
14819 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14820
14821 Update copyright year range in all GDB files.
14822
14823 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
14824
14825 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14826 and gdb/testsuite/gdb.base/step-line.c.
14827
14828 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14829
14830 * copyright.py (main): Dump the contents of
14831 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14832 even if BY_HAND is empty.
14833
14834 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14835
14836 * top.c (print_gdb_version): Update Copyright year in version
14837 message.
14838
14839 2018-01-01 Joel Brobecker <brobecker@adacore.com>
14840
14841 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14842
14843 For older changes see ChangeLog-2017.
14844 \f
14845 Local Variables:
14846 mode: change-log
14847 left-margin: 8
14848 fill-column: 74
14849 version-control: never
14850 coding: utf-8
14851 End:
This page took 0.340091 seconds and 5 git commands to generate.