Rename symbol_substitution_name
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-08-10 Keith Seitz <keiths@redhat.com>
2
3 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4 (c_symbol_substitution_name): ... this.
5 Update all callers.
6
7 2018-08-10 Keith Seitz <keiths@redhat.com>
8
9 * compile/compile-c-support.c (c_compute_program): Use
10 unique_xmalloc_ptr to eliminate cleanup.
11 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12 Return a unique_xmalloc_ptr and eliminate cleanup.
13 * compile/compile-internal.h (generate_c_for_variable_locations):
14 Return unique_xmalloc_ptr and update description.
15
16 2018-08-10 Alan Hayward <alan.hayward@arm.com>
17
18 * corelow.c (core_target::get_core_register_section): Rename
19 min_size to section_min_size.
20
21 2018-08-09 Jim Wilson <jimw@sifive.com>
22
23 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
24 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
25 * NEWS: Mention new GNU/Linux RISC-V target.
26 * configure.host: Add riscv*-*-linux*.
27 * configure.nat: Add riscv*.
28 * configure.tgt: Add riscv*-*-linux*.
29 * riscv-linux-nat.c: New file.
30 * riscv-linux-tdep.c: New file.
31
32 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
33
34 * infrun.c (resume): Make static, add forward declaration.
35 (proceed): Update header comment.
36 * infrun.h (resume): Delete declaration.
37
38 2018-08-09 Tom Tromey <tom@tromey.com>
39
40 * riscv-tdep.h: Minor formatting fixes.
41
42 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
43
44 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
45 * dwarf-index-cache.c (create_dir_and_check): Likewise.
46 (test_mkdir_recursive): Likewise.
47 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
48
49 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
50
51 * valarith.c (value_subscripted_rvalue): If an array is not in
52 memory, and we don't know the upper bound, then we can't know that
53 the requested element exists or not.
54
55 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
56
57 * target.c (str_comma_list_concat_elem): Fix typo in comment.
58 (target_options_to_string): Add comment.
59
60 2018-08-08 Tom Tromey <tom@tromey.com>
61
62 * unittests/scoped_mmap-selftests.c: Check result of "write".
63
64 2018-08-08 Jim Wilson <jimw@sifive.com>
65
66 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
67 (decode_register_index_short): New.
68 (decode_j_type_insn, decode_cj_type_insn): New.
69 (decode_b_type_insn, decode_cb_type_insn): New.
70 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
71 local xlen. Check xlen when decoding ambiguous compressed insns. In
72 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
73 is_c_sw_insn instead of is_sw_insn.
74 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
75 (riscv_software_single_step): New.
76 * riscv-tdep.h (riscv_software_single_step): Declare.
77
78 * riscv-tdep.c (riscv_isa_xlen): Drop static.
79 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
80
81 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
82
83 PR gdb/18050:
84 * target.c (dispose_inferior): Don't dispose of inferiors that are
85 already killed.
86
87 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
88
89 * remote.c (remote_target::download_tracepoint): Change char* to
90 const char*.
91
92 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
93
94 * target.h (target_options_to_string): Return an std::string.
95 * target.c (str_comma_list_concat_elem): Return void, use
96 std::string.
97 (do_option): Likewise.
98 (target_options_to_string): Return an std::string.
99 * linux-nat.c (linux_nat_target::wait): Adjust.
100 * target-debug.h (target_debug_print_options): Adjust.
101
102 2018-08-07 Tom Tromey <tom@tromey.com>
103
104 * Makefile.in (CPPFLAGS): New variable.
105 (INTERNAL_CPPFLAGS): Use it.
106
107 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
108
109 * NEWS: Mention the index cache.
110
111 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
112
113 * common/pathstuff.h (get_standard_cache_dir): New.
114 * common/pathstuff.c (get_standard_cache_dir): New.
115 * build-id.h (build_id_to_string): New.
116 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
117 DEBUG_STR_SUFFIX): Move to here.
118 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
119 DEBUG_STR_SUFFIX): Move from there.
120 (write_psymtabs_to_index): Make non-static, add basename
121 parameter. Write to temporary files, rename when done.
122 (save_gdb_index_command): Adjust call to
123 write_psymtabs_to_index.
124 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
125 field.
126 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
127 (get_gdb_index_contents_from_cache): New.
128 (get_gdb_index_contents_from_cache_dwz): New.
129 (dwarf2_initialize_objfile): Read index from cache.
130 (dwarf2_build_psymtabs): Save to index.
131 * dwarf-index-cache.h: New file.
132 * dwarf-index-cache.c: New file.
133 * dwarf-index-write.h: New file.
134
135 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
136
137 * gnulib/aclocal.m4: Re-generate.
138 * gnulib/config.in: Re-generate.
139 * gnulib/configure: Re-generate.
140 * gnulib/import/Makefile.am: Re-generate.
141 * gnulib/import/Makefile.in: Re-generate.
142 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
143 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
144 * gnulib/import/m4/mkdir.m4: New file.
145 * gnulib/import/mkdir.c: New file.
146 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
147 module.
148
149 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
150
151 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
152 * common/scoped_mmap.c: New file.
153 * common/scoped_mmap.h (destroy): New method.
154 (~scoped_mmap, reset): Use destroy.
155 (scoped_mmap): New move constructor.
156 (mmap_file): New declaration.
157 * unittests/scoped_mmap-selftests.c (test_normal,
158 test_invalid_filename, run_tests): New functions.
159 (_initialize_scoped_mmap_selftests): Register selftest.
160
161 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
162
163 * dwarf2read.c (read_gdb_index_from_section): Rename to...
164 (read_gdb_index_from_buffer): ... this. Remove section
165 parameter, add buffer parameter.
166 (get_gdb_index_contents_ftype,
167 get_gdb_index_contents_dwz_ftype): New typedefs.
168 (dwarf2_read_gdb_index): Add callback parameters to get the
169 index contents.
170 (get_gdb_index_contents_from_section): New.
171 (dwarf2_initialize_objfile): Update call to
172 dwarf2_read_gdb_index.
173
174 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
175
176 * common/filestuff.h (gdb_fopen_cloexec): New overload.
177 (gdb_open_cloexec): Likewise.
178 * nat/linux-osdata.c (command_from_pid): Use string_printf.
179 (commandline_from_pid): Likewise.
180 (linux_xfer_osdata_threads): Likewise.
181 (linux_xfer_osdata_fds): Likewise.
182 * ada-lang.c (is_package_name): Likewise.
183 * auxv.c (procfs_xfer_auxv): Likewise.
184 * breakpoint.c (print_one_breakpoint_location): Use
185 uiout::field_fmt.
186 (print_one_catch_solib): Use string_printf.
187 * coff-pe-read.c (add_pe_exported_sym): Likewise.
188 (add_pe_forwarded_sym): Likewise.
189 * dwarf2read.c (create_type_unit_group): Likewise.
190 (build_error_marker_type): Likewise.
191 * infcall.c (get_function_name): Likewise.
192 * valprint.c (print_converted_chars_to_obstack): Likewise.
193 * xtensa-tdep.c (xtensa_register_type): Likewise.
194
195 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
196
197 * remote.c (remote_target::download_tracepoint): Fix format
198 string errors.
199
200 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
201
202 * tracefile.c: Include common/byte-vector.h.
203 (trace_save): Change type of buf to gdb::byte_vector. Initialize
204 with trace_regblock_size if needed. Update uses of buf.
205
206 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
207
208 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
209 std::vector<unsigned char>.
210 * tracepoint.c (collection_list::collection_list): Remove
211 m_regs_mask initializer from initializer list. Resize
212 m_regs_mask using the largest remote register number.
213 (collection_list::add_remote_register): Remove size check on
214 m_regs_mask. Use at to access element.
215 (collection_list::stringify): Change type of temp_buf to
216 gdb::char_vector. Update uses of temp_buf. Resize if needed to
217 stringify the register mask. Use pack_hex_byte for the register
218 mask.
219
220 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
221
222 * tracepoint.h (class collection_list) <add_register>: Remove.
223 <add_remote_register, add_ax_registers, add_local_register>:
224 Declare.
225 <add_memrange>: Add scope parameter.
226 * tracepoint.c (encode_actions_1): Likewise.
227 (collection_list::add_register): Rename to ...
228 (collection_list::add_remote_register): ... this. Update
229 comment.
230 (collection_list::add_ax_registers, add_local_register): New
231 methods.
232 (collection_list::add_memrange): Add scope parameter. Call
233 add_local_register instead of add_register.
234 (finalize_tracepoint_aexpr): New function.
235 (collection_list::collect_symbol): Update calls to add_memrange.
236 Call add_local_register instead of add_register. Call
237 add_ax_registers. Call finalize_tracepoint_aexpr.
238 (encode_actions_1): Get remote regnos for $reg action. Call
239 add_remote_register, add_ax_registers, and add_local_register.
240 Update call to add_memrange. Call finalize_tracepoint_aexpr.
241 (validate_actionline): Call finalize_tracepoint_aexpr.
242
243 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
244
245 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
246 Replace array buf with gdb::char_vector buf, of size
247 get_remote_packet_size (). Replace references to buf and
248 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
249 and xsnprintf with snprintf. Raise errors if the buffer is too
250 small.
251
252 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
253
254 * remote.c (remote_target::download_tracepoint): Fix the has_more
255 predicate in the QTDP action list iteration.
256
257 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
258
259 * remote.c (remote_target::download_tracepoint): Fix indentation
260 in for block.
261
262 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
263
264 * proc-api.c (_initialize_proc_api): Remove c, unused.
265 * procfs.c (procfs_init_inferior): Remove signals, unused.
266 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
267 unused.
268
269 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
270 Andrew Burgess <andrew.burgess@embecosm.com>
271
272 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
273 'W_STOPCODE (0)' as this could be ambiguous.
274
275 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
276
277 * ser-tcp.c (net_open): Fix thinko when deciding whether to
278 disable TCP's Nagle algorithm (use "ai_protocol" instead of
279 "ai_socktype").
280
281 2018-08-02 Tom Tromey <tom@tromey.com>
282
283 PR symtab/16842.
284 * dwarf2read.c (read_func_scope): Set symtab on template parameter
285 symbols.
286 (process_structure_scope): Likewise.
287
288 2018-08-02 Xavier Roirand <roirand@adacore.com>
289
290 PR gdb/22629:
291 * darwin-nat.c (darwin_kill_inferior): Fix handling of
292 kill inferior.
293
294 2018-08-02 Tom Tromey <tom@tromey.com>
295
296 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
297 (darwin_suspend_inferior, darwin_resume_inferior)
298 (darwin_decode_notify_message, darwin_resume_inferior_threads)
299 (darwin_check_new_threads): Check result of get_darwin_inferior.
300
301 2018-07-31 Joel Brobecker <brobecker@adacore.com>
302
303 GDB 8.1.1 released.
304
305 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
306
307 * varobj.c (varobj_get_path_expr_parent): Report an error if
308 parent is a dynamic varobj.
309
310 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
311
312 * gnulib/aclocal.m4: Re-generate.
313 * gnulib/config.in: Re-generate.
314 * gnulib/configure: Re-generate.
315 * gnulib/import/Makefile.in: Re-generate.
316 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
317 * gnulib/import/m4/onceonly.m4: Re-generate.
318
319 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
320
321 * target-descriptions.c (struct xml_test_tdesc): New.
322 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
323 (record_xml_tdesc): Update.
324 (maintenance_check_xml_descriptions): Update.
325 * target-descriptions.h (record_xml_tdesc): Update comment.
326
327 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
328
329 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
330 checking array bounds are defined.
331
332 2018-07-30 Tom Tromey <tom@tromey.com>
333
334 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
335 irreflexivity violation.
336
337 2018-07-30 Tom Tromey <tom@tromey.com>
338
339 * cli/cli-decode.c (lookup_cmd): Remove lint code.
340 * value.c (unpack_long): Remove lint code.
341 * valops.c (value_ind): Remove lint code.
342 * valarith.c (value_x_binop, value_x_unop, value_equal)
343 (value_pos): Remove lint code.
344
345 2018-07-28 Tom de Vries <tdevries@suse.de>
346
347 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
348 with undefined upper bound as <optimized out>.
349
350 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
351
352 * gcore.in: Rename variable "name" to "prefix". Expand
353 "usage" text.
354
355 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
356
357 * windows-nat.c (windows_nat_target::create_inferior): Update to
358 call close() in global namespace.
359
360 2018-07-26 Tom Tromey <tom@tromey.com>
361
362 * dwarf-index-write.c (add_address_entry): Don't add objfile
363 offsets.
364 * dbxread.c (find_stab_function): Rename from
365 find_stab_function_addr. Return a bound_minimal_symbol.
366 (read_dbx_symtab): Use raw_text_low, raw_text_high.
367 Don't add objfile offsets.
368 (end_psymtab): Use raw_text_low, raw_text_high,
369 MSYMBOL_VALUE_RAW_ADDRESS.
370 (read_ofile_symtab): Update.
371 (process_one_symbol): Update.
372 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
373 offsets.
374 (dw2_relocate): Remove.
375 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
376 searching addrmap.
377 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
378 Update.
379 (process_psymtab_comp_unit_reader, add_partial_symbol)
380 (add_partial_subprogram, dwarf2_ranges_read): Update.
381 (load_partial_dies): Update.
382 (add_address_entry): Don't add objfile offsets.
383 (dwarf2_build_include_psymtabs): Update.
384 (create_addrmap_from_aranges): Don't add objfile offsets.
385 (dw2_find_pc_sect_compunit_symtab): Update.
386 * mdebugread.c (parse_symbol): Don't add objfile offsets.
387 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
388 Update.
389 (parse_partial_symbols): Don't add objfile offsets. Use
390 raw_text_low, raw_text_high. Update.
391 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
392 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
393 or call 'relocate' quick function. Clear psymbol_map.
394 * psympriv.h (struct partial_symbol) <address>: Add section
395 offset.
396 <set_unrelocated_address>: Rename from set_address.
397 <raw_text_low, raw_text_high>: New methods.
398 <text_low, text_high>: Add objfile parameter.
399 (add_psymbol_to_bcache): Add 'section' parameter. Call
400 set_unrelocated_address.
401 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
402 (find_pc_psymbol): Update.
403 (fixup_psymbol_section, relocate_psymtabs): Remove.
404 (dump_psymtab, psym_functions): Update.
405 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
406 parameter.
407 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
408 (start_psymtab_common): Update.
409 * symfile-debug.c (debug_qf_relocate): Remove.
410 (debug_sym_quick_functions): Update.
411 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
412 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
413 Update.
414
415 2018-07-26 Tom Tromey <tromey@redhat.com>
416
417 * dbxread.c (end_psymtab): Use text_high_valid and
418 text_low_valid.
419 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
420 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
421 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
422 Update comment.
423 <text_low_valid, text_high_valid>: New fields.
424 <set_text_low, set_text_high>: Update.
425 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
426
427 2018-07-26 Tom Tromey <tom@tromey.com>
428
429 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
430 Update.
431 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
432 textlow and texthigh fields.
433 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
434 Update.
435 * mdebugread.c (parse_lines, parse_partial_symbols)
436 (psymtab_to_symtab_1): Update.
437 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
438 Rename fields. Update comment. Now private.
439 <text_low, text_high, set_text_low, set_text_high>: New methods.
440 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
441 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
442 (start_psymtab_common, maintenance_info_psymtabs)
443 (maintenance_check_psymtabs): Update.
444 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
445 texthigh fields.
446 (scan_xcoff_symtab): Update.
447
448 2018-07-26 Tom Tromey <tromey@redhat.com>
449
450 * psympriv.h (struct partial_symbol) <unrelocated_address,
451 address, set_address>: New methods.
452 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
453 (fixup_psymbol_section, relocate_psymtabs): Update.
454 (print_partial_symbols): Add 'objfile' parameter. Update.
455 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
456 Update.
457
458 2018-07-26 Tom Tromey <tom@tromey.com>
459
460 * dwarf-index-write.c (write_psymbols, debug_names::insert)
461 (debug_names::write_psymbols): Update.
462 * psympriv.h (struct partial_symbol): Derive from
463 general_symbol_info.
464 <obj_section>: New method.
465 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
466 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
467 (find_pc_sect_psymbol, fixup_psymbol_section)
468 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
469 (print_partial_symbols, recursively_search_psymtabs)
470 (compare_psymbols, psymbol_hash, psymbol_compare)
471 (add_psymbol_to_bcache, maintenance_check_psymtabs)
472 (psymbol_name_matches, psym_fill_psymbol_map): Update.
473
474 2018-07-26 Tom Tromey <tromey@redhat.com>
475
476 * dbxread.c (end_psymtab): Remove dead code.
477
478 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
479
480 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
481 DWARF unwinders are disabled.
482 * dwarf2-frame.c: Add dwarf2read.h include.
483 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
484 disabled.
485 (dwarf2_frame_unwinders_enabled_p): Define.
486 (show_dwarf_unwinders_enabled_p): New function.
487 (_initialize_dwarf2_frame): Register switch to control DWARF
488 unwinder use.
489 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
490 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
491 (show_dwarf_cmdlist): Remove static keyword.
492 * dwarf2read.h (set_dwarf_cmdlist): Declare.
493 (show_dwarf_cmdlist): Declare.
494 * NEWS: Document new feature.
495
496 2018-07-26 Tom de Vries <tdevries@suse.de>
497
498 PR breakpoints/23366
499 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
500
501 2018-07-26 Tom de Vries <tdevries@suse.de>
502
503 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
504 DW_AT_count can't be translated to a dynamic prop.
505
506 2018-07-25 Tom de Vries <tdevries@suse.de>
507
508 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
509 try/catch.
510
511 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
512
513 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
514
515 2018-07-25 Joel Brobecker <brobecker@adacore.com>
516
517 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
518
519 2018-07-24 Keith Seitz <keiths@redhat.comt
520
521 PR symtab/23010
522 * dwarf2read.c (dw2_add_symbol_to_list): New function.
523 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
524 instead of add_symbol_to_list.
525 (read_file_scope): Call prepare_one_comp_unit before reading
526 any other DIEs.
527
528 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
529
530 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
531
532 2018-07-24 Tom Tromey <tom@tromey.com>
533
534 * utils.c (malloc, realloc, free): Don't declare.
535 * configure, config.in: Rebuild.
536 * configure.ac: Don't check for declarations of free, malloc, or
537 realloc.
538
539 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
540
541 * aarch64-linux-nat.c
542 (aarch64_linux_nat_target::stopped_data_address): Remove unused
543 variable.
544 * arm-linux-nat.c (fetch_regs): Likewise.
545 (store_regs): Likewise.
546 (fetch_vfp_regs): Likewise.
547 (store_vfp_regs): Likewise.
548 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
549 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
550 (arm_linux_nat_target::insert_watchpoint): Likewise.
551 (arm_linux_nat_target::remove_watchpoint): Likewise.
552 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
553 Likewise.
554 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
555 Likewise.
556 * ppc-linux-nat.c (fetch_register): Likewise.
557 (fetch_all_gp_regs): Likewise.
558 (fetch_ppc_registers): Likewise.
559 (store_all_gp_regs): Likewise.
560 (store_ppc_registers): Likewise.
561 (hwdebug_insert_point): Likewise.
562 (can_use_watchpoint_cond_accel): Likewise.
563 * remote-sim.c (gdb_os_write_stdout): Likewise.
564
565 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
566 Tom Tromey <tom@tromey.com>
567
568 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
569 test for it.
570 * configure: Rebuild.
571
572 2018-07-22 Tom Tromey <tom@tromey.com>
573
574 * regformats/regdat.sh: Define xmltarget_${name} inside
575 #ifndef IN_PROCESS_AGENT.
576
577 2018-07-22 Tom Tromey <tom@tromey.com>
578
579 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
580
581 2018-07-22 Tom Tromey <tom@tromey.com>
582
583 * symfile.c (reread_symbols): Notify iter, not objfile.
584
585 2018-07-22 Tom Tromey <tom@tromey.com>
586
587 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
588 Use arch_ops.
589 (ravenscar_thread_target::prepare_to_store): Likewise.
590
591 2018-07-22 Tom Tromey <tom@tromey.com>
592
593 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
594 unused variable. Call value_fetch_lazy when needed.
595 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
596 Remove unused variable. Call value_fetch_lazy when needed.
597
598 2018-07-22 Tom Tromey <tom@tromey.com>
599
600 * m32c-tdep.c (mark_dma): Return void.
601 (make_regs): Remove unused declarations.
602
603 2018-07-22 Tom Tromey <tom@tromey.com>
604
605 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
606 cmdscm_get_valid_command_smob_arg_unsafe for effect.
607 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
608 bkscm_get_valid_block_smob_arg_unsafe for effect.
609
610 2018-07-22 Tom Tromey <tom@tromey.com>
611
612 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
613 value_type.
614
615 2018-07-22 Tom Tromey <tom@tromey.com>
616
617 * windows-nat.c (saved_context): Conditionally define.
618 * remote.c (remote_target::remote_btrace_maybe_reopen):
619 Conditionally declare "warned".
620 * inflow.c (sigquit_ours): Conditionally define.
621 (new_tty): Move "tty" declaration inside #if.
622 * guile/guile.c (guile_datadir): Conditionally define.
623 * charset.c (set_be_le_names): Move some declarations inside #if.
624 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
625 #if.
626 (parse_xml_btrace_conf): Likewise.
627
628 2018-07-22 Tom Tromey <tom@tromey.com>
629
630 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
631
632 2018-07-22 Tom Tromey <tom@tromey.com>
633
634 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
635 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
636 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
637 * buildsym-legacy.c (get_macro_table): Remove unused variable.
638 * stack.c (frame_apply_level_command): Remove unused variable.
639 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
640 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
641 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
642 unused variable.
643 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
644 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
645 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
646 variable.
647 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
648 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
649 variable.
650 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
651 Remove unused variable.
652 * cli/cli-script.c (recurse_read_control_structure): Remove unused
653 variable.
654 * common/tdesc.c (print_xml_feature::visit): Remove unused
655 variable.
656 * compile/compile-object-load.c (store_regs): Remove unused
657 variables.
658 * complaints.c (clear_complaints): Remove unused variable.
659 * corelow.c (core_target_open): Remove unused variable.
660 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
661 variable.
662 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
663 variable.
664 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
665 variable.
666 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
667 variable.
668 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
669 variable.
670 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
671 variable.
672 * ia64-tdep.c (examine_prologue): Remove unused variable.
673 * infcall.c (run_inferior_call): Remove unused variable.
674 * inferior.c (exit_inferior): Remove unused variable.
675 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
676 * linespec.c (decode_line_2): Remove unused variable.
677 * linux-nat.c (super_close): Remove.
678 * linux-tdep.c (linux_info_proc): Remove unused variable.
679 * mi/mi-main.c (mi_execute_command): Remove unused variable.
680 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
681 Remove unused variable.
682 * parse.c (find_minsym_type_and_address): Remove unused variable.
683 * printcmd.c (info_symbol_command, printf_floating): Remove unused
684 variable.
685 * python/py-breakpoint.c (bppy_set_commands): Remove unused
686 variable.
687 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
688 variables.
689 * record-btrace.c (record_btrace_target::store_registers): Remove
690 unused variable.
691 (cmd_show_record_btrace_cpu): Remove unused variable.
692 * riscv-tdep.c (riscv_register_reggroup_p)
693 (riscv_push_dummy_call, riscv_return_value): Remove unused
694 variable.
695 * rust-exp.y (literal): Remove unused variable.
696 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
697 unused variable.
698 <STRUCTOP_ANONYMOUS>: Likewise.
699 * s390-linux-tdep.c (s390_linux_init_abi_31)
700 (s390_linux_init_abi_64): Remove unused variable.
701 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
702 (file_select_thread, net_windows_open, _initialize_ser_windows):
703 Remove unused variables.
704 * symtab.c (find_pc_sect_line): Remove unused variable.
705 * target-memory.c (compute_garbled_blocks): Remove unused
706 variable.
707 (target_write_memory_blocks): Remove unused variable.
708 * target.c (target_stack::unpush): Remove unused variables.
709 * tracepoint.c (start_tracing, all_tracepoint_actions)
710 (merge_uploaded_trace_state_variables)
711 (print_one_static_tracepoint_marker): Remove unused variable.
712 * unittests/basic_string_view/element_access/char/1.cc (test01):
713 Remove unused variable.
714 * windows-nat.c (windows_continue, windows_add_all_dlls)
715 (do_initial_windows_stuff, windows_nat_target::create_inferior):
716 Remove unused variables.
717
718 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
719
720 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
721 attr_profile in HAVE_ELF.
722 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
723 HAVE_ELF.
724
725 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
726
727 * frame.c (frame_register_unwind): Change parameter name.
728 (frame_unwind_register): Likewise.
729 (frame_unwind_register_value): Likewise.
730 (frame_unwind_register_signed): Likewise.
731 (frame_unwind_register_unsigned): Likewise.
732 * frame.h (frame_register_unwind): Likewise.
733 (frame_unwind_register): Likewise.
734 (frame_unwind_register_value): Likewise.
735 (frame_unwind_register_signed): Likewise.
736 (frame_unwind_register_unsigned): Likewise.
737 (frame_unwind_arch): Likewise.
738
739 2018-07-20 Maciej W. Rozycki <macro@mips.com>
740
741 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
742 ISA maintenance.
743
744 2018-07-20 Maciej W. Rozycki <macro@mips.com>
745
746 * mips-linux-nat.c (mips_linux_nat_target::read_description):
747 Call `get_ptrace_pid' rather than extracting the ptrace PID by
748 hand.
749
750 2018-07-20 Keith Seitz <keiths@redhat.com>
751
752 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
753 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
754 m_compunit_symtab, m_language>: Add "m_" prefix.
755 Update all uses.
756 * buildsym.c: Update all uses.
757
758 2018-07-20 Tom Tromey <tom@tromey.com>
759
760 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
761 * buildsym.h (record_line_ftype): Remove typedef.
762
763 2018-07-20 Tom Tromey <tom@tromey.com>
764
765 * buildsym-legacy.h (augment_type_symtab): Don't declare.
766 (end_expandable_symtab): Likewise.
767 (end_symtab_get_static_block): Likewise.
768 (end_symtab_from_static_block): Likewise.
769 * buildsym-legacy.c (augment_type_symtab): Remove.
770 (end_expandable_symtab): Remove.
771 (end_symtab_get_static_block): Remove.
772 (end_symtab_from_static_block): Remove.
773
774 2018-07-20 Tom Tromey <tom@tromey.com>
775
776 * dwarf2read.c: Include buildsym.h.
777 (struct dwarf2_cu) <builder>: New method.
778 (fixup_go_packaging): Update.
779 (process_full_comp_unit, process_full_type_unit): Update. Don't
780 use scoped_free_pendings.
781 (using_directives): Add "cu" parameter, remove "language".
782 (read_import_statement, setup_type_unit_groups, )
783 (read_func_scope, read_lexical_block_scope)
784 (dwarf2_record_block_ranges, read_namespace): Update.
785 (lnp_state_machine::lnp_state_machine): Add cu parameter.
786 (lnp_state_machine::handle_end_sequence): Update.
787 (class lnp_state_machine) <m_cu>: New member.
788 <m_record_line_callback>: Remove.
789 <m_currently_recording_lines>: New member.
790 (lnp_state_machine::handle_set_file): Update.
791 (noop_record_line): Remove.
792 (dwarf_record_line_p): Add cu parameter.
793 (dwarf_record_line_1, dwarf_finish_line): Likewise.
794 (lnp_state_machine::record_line)
795 (lnp_state_machine::lnp_state_machine)
796 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
797 (dwarf_decode_lines): Update.
798 (dwarf2_start_subfile): Add cu parameter.
799 (dwarf2_start_symtab, new_symbol): Update.
800 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
801 Remove dwarf2_per_objfile parameter.
802 (dwarf_decode_macros): Update.
803
804 2018-07-20 Tom Tromey <tom@tromey.com>
805
806 * stabsread.c (define_symbol): Update.
807 * buildsym-legacy.h (get_buildsym_compunit): Declare.
808 * dwarf2read.c (new_symbol): Update.
809 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
810 * cp-namespace.c: Include buildsym.h.
811 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
812 * buildsym-legacy.c (get_buildsym_compunit): New function.
813
814 2018-07-20 Tom Tromey <tom@tromey.com>
815
816 * xcoffread.c: Include buildsym-legacy.h.
817 * windows-nat.c: Include buildsym-legacy.h.
818 * stabsread.c: Include buildsym-legacy.h.
819 * mdebugread.c: Include buildsym-legacy.h.
820 * buildsym-legacy.h: New file.
821 * buildsym-legacy.c: New file, from buildsym.c.
822 * go32-nat.c: Include buildsym-legacy.h.
823 * dwarf2read.c: Include buildsym-legacy.h.
824 * dbxread.c: Include buildsym-legacy.h.
825 * cp-namespace.c: Include buildsym-legacy.h.
826 * coffread.c: Include buildsym-legacy.h.
827 * buildsym.h: Move some contents to buildsym-legacy.h.
828 * buildsym.c: Include buildsym-legacy.h. Move many functions to
829 buildsym-legacy.c.
830 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
831
832 2018-07-20 Tom Tromey <tom@tromey.com>
833
834 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
835 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
836 (buildsym_compunit::buildsym_compunit)
837 (buildsym_compunit::~buildsym_compunit)
838 (buildsym_compunit::get_macro_table): Define.
839
840 2018-07-20 Tom Tromey <tom@tromey.com>
841
842 * buildsym.c (reset_symtab_globals): Remove.
843 (buildsym_compunit::end_symtab_from_static_block): Update.
844 (buildsym_compunit::augment_type_symtab): Update.
845 (end_symtab_from_static_block): Call free_buildsym_compunit.
846 (augment_type_symtab, end_symtab, end_expandable_symtab):
847 Likewise.
848
849 2018-07-20 Tom Tromey <tom@tromey.com>
850
851 * arch-utils.c: Do not include buildsym.h.
852 * mipsread.c: Do not include buildsym.h.
853 * machoread.c: Do not include buildsym.h.
854 * elfread.c: Do not include buildsym.h.
855
856 2018-07-20 Tom Tromey <tom@tromey.com>
857
858 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
859 initialization.
860 (buildsym_compunit): Add new constructor.
861 (struct buildsym_compunit) <get_last_source_file, finish_block,
862 record_block_range, start_subfile, patch_subfile_names,
863 push_subfile, pop_subfile, record_line, get_compunit_symtab,
864 set_last_source_start_addr, get_last_source_start_addr,
865 get_local_using_directives, set_local_using_directives,
866 get_global_using_directives, outermost_context_p,
867 get_current_context_stack, get_context_stack_depth,
868 get_current_subfile, get_local_symbols, get_file_symbols,
869 get_global_symbols, record_debugformat, record_producer,
870 push_context, pop_context, end_symtab_get_static_block,
871 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
872 New public methods.
873 <record_pending_block, finish_block_internal, make_blockvector,
874 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
875 private methods.
876 Update all users.
877
878 2018-05-22 Tom Tromey <tom@tromey.com>
879
880 * buildsym.c (record_pending_block): Move earlier. Remove objfile
881 parameter.
882 (finish_block_internal): Update.
883
884 2018-07-20 Tom Tromey <tom@tromey.com>
885
886 * buildsym.c (record_pending_block): Move earlier. Remove objfile
887 parameter.
888 (finish_block_internal): Update.
889
890 2018-07-20 Tom Tromey <tom@tromey.com>
891
892 * buildsym.h (EXTERN): Don't define or undef.
893 * buildsym.c (EXTERN): Don't define.
894
895 2018-07-20 Tom Tromey <tom@tromey.com>
896
897 * buildsym.c: Remove TODO comment.
898
899 2018-07-20 Tom Tromey <tom@tromey.com>
900
901 * coffread.c (coff_symtab_read): Update.
902 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
903 (xcoff_new_init): Update.
904 * mipsread.c (mipscoff_new_init): Update.
905 * mdebugread.c (mdebug_build_psymtabs): Update.
906 * elfread.c (elf_new_init): Update.
907 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
908 Update.
909 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
910 (coffstab_build_psymtabs, elfstab_build_psymtabs)
911 (stabsect_build_psymtabs): Update.
912 * buildsym.h (buildsym_init): Don't declare.
913 * buildsym.c: Update comment.
914 (prepare_for_building): Remove.
915 (start_symtab, restart_symtab): Update.
916 (reset_symtab_globals): Update comment.
917 (buildsym_init): Remove.
918
919 2018-07-20 Tom Tromey <tom@tromey.com>
920
921 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
922 * stabsread.c (patch_block_stabs, define_symbol, read_type)
923 (read_enum_type, common_block_start, common_block_end)
924 (cleanup_undefined_types_1, finish_global_stabs): Update.
925 * mdebugread.c (psymtab_to_symtab_1): Update.
926 * dwarf2read.c (fixup_go_packaging, read_func_scope)
927 (read_lexical_block_scope, new_symbol): Update.
928 * dbxread.c (process_one_symbol): Update.
929 * coffread.c (coff_symtab_read, process_coff_symbol)
930 (coff_read_enum_type): Update.
931 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
932 declare.
933 (get_local_symbols, get_file_symbols, get_global_symbols): New
934 functions.
935 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
936 m_global_symbols.
937 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
938 (~scoped_free_pendings): Update.
939 (finish_block, prepare_for_building, reset_symtab_globals)
940 (end_symtab_get_static_block, end_symtab_with_blockvector)
941 (augment_type_symtab, push_context): Update.
942 (get_local_symbols, get_file_symbols, get_global_symbols): New
943 functions.
944 (buildsym_init): Update.
945
946 2018-07-20 Tom Tromey <tom@tromey.com>
947
948 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
949 (process_full_type_unit): Likewise.
950 (dwarf2_start_symtab): Set list_in_scope.
951
952 2018-07-20 Tom Tromey <tom@tromey.com>
953
954 * dwarf2read.c (process_psymtab_comp_unit_reader)
955 (build_type_psymtabs_reader): Do not set list_in_scope.
956
957 2018-07-20 Tom Tromey <tom@tromey.com>
958
959 * buildsym.c (free_pendings): Remove.
960 (add_symbol_to_list, scoped_free_pendings)
961 (finish_block_internal, buildsym_init): Update.
962
963 2018-07-20 Tom Tromey <tom@tromey.com>
964
965 * xcoffread.c (read_xcoff_symtab): Update.
966 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
967 Update.
968 * dbxread.c (process_one_symbol): Update.
969 * coffread.c (coff_symtab_read): Update.
970 * buildsym.h (finish_block): Update.
971 * buildsym.c (finish_block): Remove "listhead" argument.
972 (end_symtab_get_static_block): Update.
973
974 2018-07-20 Tom Tromey <tom@tromey.com>
975
976 * buildsym.h (class scoped_free_pendings): Remove constructor.
977 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
978 method.
979 <m_pending_block_obstack, m_pending_blocks>: New members.
980 (pending_block_obstack, pending_blocks): Remove.
981 (scoped_free_pendings::scoped_free_pendings): Default.
982 (~scoped_free_pendings): Update.
983 (free_pending_blocks): Remove.
984 (finish_block_internal, record_pending_block, make_blockvector)
985 (end_symtab_get_static_block, augment_type_symtab, push_context)
986 (buildsym_init): Update.
987
988 2018-07-20 Tom Tromey <tom@tromey.com>
989
990 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
991 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
992 members.
993 (pending_addrmap, pending_addrmap_obstack)
994 (pending_addrmap_interesting): Remove.
995 (scoped_free_pendings, record_block_range, make_blockvector)
996 (prepare_for_building, reset_symtab_globals, buildsym_init):
997 Update.
998
999 2018-07-20 Tom Tromey <tom@tromey.com>
1000
1001 * xcoffread.c (process_linenos): Update.
1002 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1003 * mdebugread.c (psymtab_to_symtab_1): Update.
1004 * dwarf2read.c (setup_type_unit_groups)
1005 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1006 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1007 * dbxread.c (process_one_symbol): Update.
1008 * coffread.c (coff_symtab_read, enter_linenos)
1009 (process_coff_symbol): Update.
1010 * buildsym.h (current_subfile): Don't declare.
1011 (get_current_subfile): Declare.
1012 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1013 member.
1014 (start_subfile, free_buildsym_compunit, push_subfile)
1015 (prepare_for_building, start_symtab): Update.
1016 (get_current_subfile): New function.
1017
1018 2018-07-20 Tom Tromey <tom@tromey.com>
1019
1020 * coffread.c (coff_symtab_read): Update.
1021 * xcoffread.c (read_xcoff_symtab): Update.
1022 * dwarf2read.c (new_symbol): Update.
1023 (read_func_scope, read_lexical_block_scope): Update.
1024 * dbxread.c (process_one_symbol): Update.
1025 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1026 (outermost_context_p): Remove macro.
1027 (outermost_context_p, get_current_context_stack)
1028 (get_context_stack_depth): Declare.
1029 (pop_context): Return struct context_stack.
1030 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1031 member.
1032 (context_stack_size): Remove.
1033 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1034 (prepare_for_building, end_symtab_get_static_block)
1035 (augment_type_symtab, push_context): Update.
1036 (pop_context): Return struct context_stack.
1037 (outermost_context_p, get_current_context_stack)
1038 (get_context_stack_depth): New functions.
1039 (buildsym_init): Update.
1040
1041 2018-07-20 Tom Tromey <tom@tromey.com>
1042
1043 * rust-exp.y: Now a pure parser. Update all rules.
1044 (%union): Move earlier.
1045 (current_parser, work_obstack): Remove globals.
1046 (rust_parser, ~rust_parser): Update.
1047 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1048 lex_character, lex_number, lex_string, lex_identifier,
1049 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1050 convert_name, convert_params_to_expression,
1051 convert_ast_to_expression, ast_basic_type, ast_operation,
1052 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1053 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1054 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1055 ast_array_type, ast_slice_type, ast_reference_type,
1056 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1057 (rust_parse): Update.
1058 (rustyyerror, rustyylex): Add parser parameter.
1059 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1060 (rust_lex_stringish_test, rust_lex_test_sequence)
1061 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1062 (rust_lex_test_push_back, rust_lex_tests): Update.
1063
1064 2018-07-19 Pedro Alves <palves@redhat.com>
1065
1066 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1067 gdb::unique_xmalloc_ptr.
1068 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1069 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1070 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1071 copy-initialization.
1072 * guile/scm-pretty-print.c (ppscm_print_children): Use
1073 gdb::unique_xmalloc_ptr instead of cleanups.
1074 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1075 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1076 gdb::unique_xmalloc_ptr.
1077 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1078 Adjust to use gdb::unique_xmalloc_ptr.
1079 * guile/scm-utils.c (extract_arg): Adjust.
1080 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1081 gdb::unique_xmalloc_ptr instead of a cleanup.
1082
1083 2018-07-19 Tom Tromey <tom@tromey.com>
1084
1085 * utils.c (do_value_free_to_mark)
1086 (make_cleanup_value_free_to_mark): Remove.
1087 * utils.h (make_cleanup_value_free_to_mark): Remove.
1088
1089 2018-07-19 Pedro Alves <palves@redhat.com>
1090
1091 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1092 forwarding reference.
1093
1094 2018-07-18 Pedro Alves <palves@redhat.com>
1095
1096 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1097 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1098 cleanup.
1099
1100 2018-07-18 Pedro Alves <palves@redhat.com>
1101
1102 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1103 exceptions.
1104 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1105 (gdbscm_wrap): New.
1106 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1107 directly instead of a cleanup.
1108 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1109 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1110 (vlscm_binop_gdbthrow): New, factored out from ...
1111 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1112 (vlscm_rich_compare): Use gdbscm_wrap.
1113 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1114 instead of a cleanup.
1115 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1116 cleanup.
1117 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1118 Use xfree directly instead of a cleanup.
1119 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1120 Adjust to use gdbscm_wrap and scoped_value_mark.
1121 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1122 (gdbscm_value_address, gdbscm_value_dereference)
1123 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1124 scoped_value_mark.
1125 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1126 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1127 scoped_value_mark.
1128 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1129 gdbscm_wrap and scoped_value_mark.
1130 (gdbscm_value_to_string): Use xfree directly instead of a
1131 cleanup. Move 'buffer' unique_ptr to TRY scope.
1132 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1133 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1134 scoped_value_mark.
1135 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1136 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1137 scoped_value_mark.
1138 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1139 gdbscm_wrap.
1140
1141 2018-07-18 Tom de Vries <tdevries@suse.de>
1142
1143 * findvar.c (default_read_var_value): Also resolve dynamic type for
1144 LOC_OPTIMIZED_OUT vars.
1145
1146 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1147
1148 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1149 decoding.
1150
1151 2018-07-17 Tom Tromey <tom@tromey.com>
1152
1153 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1154 (compute_enum_list, pascm_set_param_value_x)
1155 (gdbscm_parameter_value): Update.
1156 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1157 (gdbscm_scm_to_host_string): Update.
1158 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1159 Update.
1160 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1161 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1162 * guile/scm-string.c (gdbscm_scm_to_string): Return
1163 unique_xmalloc_ptr.
1164 (gdbscm_scm_to_host_string): Likewise.
1165
1166 2018-07-17 Tom Tromey <tom@tromey.com>
1167
1168 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1169 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1170 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1171 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1172 unique_xmalloc_ptr.
1173
1174 2018-07-17 Tom Tromey <tom@tromey.com>
1175
1176 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1177 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1178 Update.
1179 * guile/scm-cmd.c (cmdscm_function): Update.
1180 * guile/scm-pretty-print.c
1181 (ppscm_print_exception_unless_memory_error): Update.
1182 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1183 Return unique_xmalloc_ptr.
1184
1185 2018-07-17 Tom Tromey <tom@tromey.com>
1186
1187 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1188 Use string_printf.
1189
1190 2018-07-17 Jim Wilson <jimw@sifive.com>
1191
1192 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1193 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1194 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1195 unecessary braces after EF_RISCV_RVC test. Delete call to
1196 set_gdbarch_decr_pc_after_break.
1197
1198 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1199 RISCV_LAST_FP_REGNUM + 1.
1200 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1201
1202 2018-07-17 Tom Tromey <tom@tromey.com>
1203
1204 * configure.ac: Remove --disable-gdbcli.
1205 * configure: Rebuild.
1206 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1207 (SUBDIR_CLI_CFLAGS): Remove.
1208 (SFILES): Use SUBDIR_CLI_SRCS.
1209 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1210
1211 2018-07-17 Tom Tromey <tom@tromey.com>
1212
1213 PR gdb/18624:
1214 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1215
1216 2018-07-16 Jim Wilson <jimw@sifive.com>
1217
1218 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1219
1220 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1221
1222 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1223 variable.
1224 (libunwind_frame_sniffer): Likewise.
1225 (libunwind_frame_prev_register): Likewise.
1226 (libunwind_sigtramp_frame_sniffer): Likewise.
1227 * ia64-tdep.c (ia64_access_reg): Likewise.
1228 (ia64_access_rse_reg): Likewise.
1229 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1230 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1231
1232 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1233
1234 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1235
1236 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * remote-sim.c (gdbsim_target::close,
1239 gdbsim_target::mourn_inferior): Remove unused variables.
1240
1241 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1242
1243 * ia64-tdep.c (ktab_buf): New global.
1244 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1245 (get_kernel_table): Adjust.
1246
1247 2018-07-16 Tom Tromey <tom@tromey.com>
1248
1249 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1250 * dwarf2read.c (using_directives, new_symbol): Use
1251 outermost_context_p.
1252 * dbxread.c (process_one_symbol): Use outermost_context_p.
1253 * coffread.c (coff_symtab_read): Use outermost_context_p.
1254
1255 2018-07-16 Tom Tromey <tom@tromey.com>
1256
1257 * dwarf2read.c (using_directives, read_func_scope)
1258 (read_lexical_block_scope): Update.
1259 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1260 * buildsym.h (local_using_directives, global_using_directives):
1261 Don't declare.
1262 (get_local_using_directives, set_local_using_directives)
1263 (get_global_using_directives): Declare.
1264 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1265 m_global_using_directives>: New members.
1266 (finish_block_internal, prepare_for_building)
1267 (reset_symtab_globals, end_symtab_get_static_block)
1268 (push_context): Update.
1269 (get_local_using_directives, set_local_using_directives)
1270 (get_global_using_directives): New functions.
1271 (buildsym_init): Update.
1272
1273 2018-07-16 Tom Tromey <tom@tromey.com>
1274
1275 * xcoffread.c (xcoff_initial_scan): Don't call
1276 free_pending_blocks.
1277 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1278 * buildsym.h (class scoped_free_pendings): Add constructor.
1279 (free_pending_blocks): Don't declare.
1280 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1281 (free_pending_blocks): Now static.
1282
1283 2018-07-16 Tom Tromey <tom@tromey.com>
1284
1285 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1286 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1287 member.
1288 (struct subfile_stack): Remove.
1289 (subfile_stack): Remove.
1290 (push_subfile, pop_subfile, buildsym_init): Update.
1291
1292 2018-07-16 Tom Tromey <tom@tromey.com>
1293
1294 * buildsym.c (push_subfile): Use gdb_assert.
1295 (pop_subfile): Use gdb_assert.
1296
1297 2018-07-16 Tom Tromey <tom@tromey.com>
1298
1299 * buildsym.h (merge_symbol_lists): Remove.
1300 * buildsym.c (merge_symbol_lists): Remove.
1301
1302 2018-07-16 Tom Tromey <tom@tromey.com>
1303
1304 * stabsread.c (scan_file_globals): Update comment.
1305 * stabsread.h (scan_file_globals): Move from buildsym.h.
1306 * buildsym.h (scan_file_globals): Move to stabsread.h.
1307
1308 2018-07-16 Tom Tromey <tom@tromey.com>
1309
1310 * xcoffread.c (xcoff_new_init): Update.
1311 * mipsread.c (mipscoff_new_init): Update.
1312 * mdebugread.c (mdebug_build_psymtabs): Update.
1313 * elfread.c (elf_new_init): Update.
1314 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1315 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1316 * buildsym.h (buildsym_new_init): Don't declare.
1317 * buildsym.c (buildsym_new_init): Remove.
1318
1319 2018-07-16 Tom Tromey <tom@tromey.com>
1320
1321 * stabsread.h (within_function): Move from buildsym.h.
1322 * stabsread.c (start_stabs): Clear within_function.
1323 * coffread.c (coff_start_symtab): Clear within_function.
1324 * buildsym.h (within_function): Move to stabsread.h.
1325 * buildsym.c (prepare_for_building): Update.
1326
1327 2018-07-16 Tom Tromey <tom@tromey.com>
1328
1329 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1330 * dwarf2read.c (dwarf2_start_symtab): Don't set
1331 processing_gcc_compilation.
1332 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1333
1334 2018-07-16 Tom Tromey <tom@tromey.com>
1335
1336 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1337 (next_symbol_text_func): Move from buildsym.h.
1338 * stabsread.c (hashname): Move from buildsym.c.
1339 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1340 (next_symbol_text_func, hashname): Move to stabsread.h.
1341 * buildsym.c: Don't include bcache.h
1342 (hashname): Move to stasbread.c.
1343
1344 2018-07-16 Tom Tromey <tom@tromey.com>
1345
1346 * buildsym.h (context_stack_size): Don't declare.
1347 * buildsym.c (context_stack_size): New global.
1348
1349 2018-07-16 Tom Tromey <tom@tromey.com>
1350
1351 * dbxread.c (processing_acc_compilation): New global.
1352 * buildsym.h (processing_acc_compilation): Don't declare.
1353
1354 2018-07-16 Tom Tromey <tom@tromey.com>
1355
1356 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1357 * dbxread.c (read_ofile_symtab): Update.
1358 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1359 * buildsym.h (last_source_start_addr): Remove.
1360 (set_last_source_start_addr, get_last_source_start_addr):
1361 Declare.
1362 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1363 parameter.
1364 (struct buildsym_compunit) <m_last_source_start_addr>: New
1365 member.
1366 (prepare_for_building): Remove start_addr parameter.
1367 (start_symtab, restart_symtab, end_symtab_get_static_block)
1368 (end_symtab_with_blockvector): Update.
1369 (set_last_source_start_addr, get_last_source_start_addr): New
1370 functions.
1371
1372 2018-07-16 Tom Tromey <tom@tromey.com>
1373
1374 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1375 member.
1376 (have_line_numbers): Remove.
1377 (record_line, prepare_for_building, end_symtab_get_static_block)
1378 (augment_type_symtab): Update.
1379
1380 2018-07-16 Tom Tromey <tom@tromey.com>
1381
1382 * buildsym.c (~buildsym_compunit): Free the macro table.
1383 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1384 methods.
1385 <m_pending_macros>: New member.
1386 (pending_macros): Remove.
1387 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1388 (reset_symtab_globals, end_symtab_get_static_block)
1389 (end_symtab_with_blockvector, augment_type_symtab)
1390 (buildsym_init): Update.
1391
1392 2018-07-16 Tom Tromey <tom@tromey.com>
1393
1394 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1395 parameter.
1396 (buildsym_compunit::set_last_source_file): New method.
1397 <m_last_source_file>: New member.
1398 (prepare_for_building): Remove "name" parameter.
1399 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1400 (last_source_file): Remove.
1401 (set_last_source_file, get_last_source_file): Update.
1402
1403 2018-07-16 Tom Tromey <tom@tromey.com>
1404
1405 * buildsym.c (prepare_for_building): Add assert.
1406
1407 2018-07-16 Tom Tromey <tom@tromey.com>
1408
1409 * buildsym.c (~buildsym_compunit): Update.
1410 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1411 (start_subfile, patch_subfile_names)
1412 (end_symtab_with_blockvector): Update.
1413
1414 2018-07-16 Tom Tromey <tom@tromey.com>
1415
1416 * buildsym.c (struct buildsym_compunit): Add constructor,
1417 destructor, initializers.
1418 (start_buildsym_compunit): Remove.
1419 (free_buildsym_compunit): Use "delete".
1420 (start_symtab, restart_symtab): Use "new".
1421
1422 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1423
1424 * symfile.c (set_objfile_default_section_offset): Remove struct
1425 keyword.
1426
1427 2018-07-14 Stafford Horne <shorne@gmail.com>
1428
1429 * (Responsible Maintainers): Add myself as or1k maintainer.
1430
1431 2018-07-13 Tom Tromey <tom@tromey.com>
1432
1433 * symfile.c (set_objfile_default_section_offset): Use extra braces
1434 around initializer.
1435
1436 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1437
1438 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1439 non-branching basr.
1440
1441 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1442
1443 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1444 unittests/cli-utils-selftests.c
1445 * unittests/cli-utils-selftests.c: New file.
1446
1447 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1448
1449 * NEWS: Mention new commands. Mention change to 'thread apply'.
1450
1451 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1452
1453 * thread.c (thr_try_catch_cmd): New function.
1454 (thread_apply_all_command): Handle qcs flags.
1455 (thread_apply_command): Handle qcs flags.
1456 (taas_command): New function.
1457 (tfaas_command): New function.
1458 (_initialize_thread): Update to setup the new commands 'taas
1459 and 'tfaas'. Change doc string for 'thread apply'.
1460
1461 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1462
1463 * stack.c: (trailing_outermost_frame): New function, mostly
1464 extracted from backtrace_command_1.
1465 (leading_innermost_frame): New function.
1466 (backtrace_command_1): Update to call trailing_outermost_frame.
1467 (frame_apply_command_count): New function.
1468 (frame_apply_level_command): New function.
1469 (frame_apply_all_command): New function.
1470 (frame_apply_command): New function.
1471 (faas_command): New function.
1472 (frame_cmd_list): New variable.
1473 (_initialize_stack): Update to setup the new commands 'frame apply'
1474 and 'faas'.
1475
1476 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1477
1478 * cli-utils.c (number_or_range_parser::get_number): Only handle
1479 numbers or convenience var as numbers.
1480 (parse_flags): New function.
1481 (parse_flags_qcs): New function.
1482 (number_or_range_parser::finished): Ensure parsing end is detected
1483 before end of string.
1484 * cli-utils.h (parse_flags): New function.
1485 (parse_flags_qcs): New function.
1486 (number_or_range_parser): Remove m_finished bool.
1487 (number_or_range_parser::skip_range): Set m_in_range to false.
1488
1489 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1490
1491 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1492 on Windows.
1493
1494 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1495 Jan Kratochvil <jan.kratochvil@redhat.com>
1496 Paul Fertser <fercerpav@gmail.com>
1497 Tsutomu Seki <sekiriki@gmail.com>
1498 Pedro Alves <palves@redhat.com>
1499
1500 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1501 'unittests/parse-connection-spec-selftests.c'.
1502 (COMMON_SFILES): Add 'common/netstuff.c'.
1503 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1504 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1505 * common/netstuff.c: New file.
1506 * common/netstuff.h: New file.
1507 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1508 (wait_for_connect): Update comment. New parameter
1509 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1510 Use 'sock' directly instead of 'scb->fd'.
1511 (try_connect): New function, with code from 'net_open'.
1512 (net_open): Rewrite main loop to deal with multiple
1513 sockets/addresses. Handle IPv6-style hostnames; implement
1514 support for IPv6 connections.
1515 * unittests/parse-connection-spec-selftests.c: New file.
1516
1517 2018-07-11 Pedro Alves <palves@redhat.com>
1518
1519 PR gdb/23377
1520 * remote.c (remote_target::remote_detach_pid): Call
1521 set_current_process.
1522
1523 2018-07-11 Pedro Alves <palves@redhat.com>
1524
1525 * h8300-tdep.c (h8300_gdbarch_init): Remove
1526 set_gdbarch_ecoff_reg_to_regnum calls.
1527
1528 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1529
1530 PR c++/23373
1531 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1532 offsets/sizes for static members of a class/struct.
1533
1534 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1535
1536 * target-descriptions.c (tdesc_register_bitsize): Rename.
1537 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1538 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1539 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1540
1541 2018-07-10 Tom Tromey <tom@tromey.com>
1542
1543 * breakpoint.c (moribund_locations): Now static and a
1544 std::vector.
1545 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1546 (build_bpstat_chain, update_global_location_list)
1547 (breakpoint_retire_moribund): Update.
1548 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1549 VEC.
1550
1551 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1552
1553 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1554 (riscv_register_reggroup_p): Use new function, remove unneeded
1555 parenthesis.
1556 (riscv_push_dummy_call): Extend assert to compare against xlen or
1557 flen based on register type.
1558
1559 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1560
1561 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1562
1563 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1564
1565 * remote.c (show_hardware_watchpoint_limit): New function.
1566 (show_hardware_watchpoint_length_limit): New function.
1567 (show_hardware_breakpoint_limit): New function.
1568 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1569 where appropriate, update help text.
1570
1571 2018-07-09 Tom Tromey <tom@tromey.com>
1572
1573 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1574 (CLIBS): Don't mention NAT_CLIBS.
1575
1576 2018-07-09 Tom Tromey <tom@tromey.com>
1577
1578 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1579 (LIBGDB_OBS, clean mostlyclean): Update.
1580 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1581
1582 2018-07-09 Tom Tromey <tom@tromey.com>
1583
1584 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1585 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1586 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1587
1588 2018-07-09 Tom Tromey <tom@tromey.com>
1589
1590 * Makefile.in (ALLDEPFILES): Remove exec.c.
1591 (COMMON_OBS): Remove exec.o.
1592 (COMMON_SFILES): Add exec.c.
1593
1594 2018-07-09 Tom Tromey <tom@tromey.com>
1595
1596 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1597
1598 2018-07-09 Tom Tromey <tom@tromey.com>
1599
1600 * Makefile.in (clean mostlyclean): Remove stamp-version.
1601 (version.c): Depend on stamp-version.
1602 (stamp-version): New rule, from version.c rule.
1603
1604 2018-07-09 Tom Tromey <tom@tromey.com>
1605
1606 * Makefile.in (init.c): Depend on stamp-init.
1607 (stamp-init): New rule, from init.c rule.
1608 (clean mostlyclean): Remove stamp-init.
1609
1610 2018-07-09 Tom Tromey <tom@tromey.com>
1611
1612 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1613 SUBDIR_GCC_COMPILE_SRCS.
1614
1615 2018-07-09 Tom Tromey <tom@tromey.com>
1616
1617 * Makefile.in (init.c): Remove some unused sed rules.
1618
1619 2018-07-09 Tom Tromey <tom@tromey.com>
1620
1621 * Makefile.in (TSOBS): Remove.
1622 (INIT_FILES): Update.
1623 (LIBGDB_OBS): Update.
1624 (COMMON_SFILES): Add inflow.c.
1625 (SFILES): Remove inflow.c.
1626
1627 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1628
1629 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1630
1631 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1632
1633 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1634 get_saveloc_name, is_signal_frame_name, step_name,
1635 init_remote_name, create_addr_space_name,
1636 destroy_addr_space_name, search_unwind_table_name,
1637 find_dyn_list_name): Constify.
1638
1639 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1640
1641 * darwin-nat.c (darwin_pthread_kill): New function.
1642 (darwin_resume_thread): Use darwin_pthread_kill.
1643
1644 2018-07-05 Tom de Vries <tdevries@suse.de>
1645
1646 * macroexp.c (macro_buffer) <operator=>: New member function.
1647
1648 2018-07-04 Tom Tromey <tom@tromey.com>
1649
1650 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1651
1652 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1653
1654 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1655 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1656 * maint.c: Likewise.
1657 * top.c: Likewise.
1658
1659 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1660
1661 * NEWS: Create a new section for the next release branch.
1662 Rename the section of the current branch, now that it has
1663 been cut.
1664
1665 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1666
1667 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1668 * version.in: Bump version to 8.2.50.DATE-git.
1669
1670 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1671 Pedro Alves <palves@redhat.com>
1672
1673 * linux-nat.c (linux_init_ptrace): Rename to ...
1674 (linux_init_ptrace_procfs): ... this. Call
1675 linux_proc_init_warnings.
1676 (linux_nat_target::post_attach)
1677 (linux_nat_target::post_startup_inferior): Adjust.
1678 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1679 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1680
1681 2018-07-04 Tom de Vries <tdevries@suse.de>
1682
1683 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1684 check ...
1685 (read_comp_unit_head): ... here.
1686
1687 2018-07-03 Tom Tromey <tom@tromey.com>
1688
1689 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1690 (stop_tracing, tstatus_command)
1691 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1692 (print_one_static_tracepoint_marker): Update.
1693 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1694 std::vector.
1695 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1696 VEC.
1697 (all_tracepoints, static_tracepoints_here): Return std::vector.
1698
1699 2018-07-03 Tom Tromey <tom@tromey.com>
1700
1701 * common/ptid.c (ptid_equal): Remove.
1702 * common/ptid.h (ptid_equal): Don't declare.
1703 * ada-tasks.c: Update.
1704 * breakpoint.c: Update.
1705 * common/agent.c: Update.
1706 * corelow.c: Update.
1707 * darwin-nat-info.c: Update.
1708 * darwin-nat.c: Update.
1709 * dcache.c: Update.
1710 * dtrace-probe.c: Update.
1711 * dummy-frame.c: Update.
1712 * fbsd-nat.c: Update.
1713 * frame.c: Update.
1714 * gdbthread.h: Update.
1715 * gnu-nat.c: Update.
1716 * go32-nat.c: Update.
1717 * inf-loop.c: Update.
1718 * inf-ptrace.c: Update.
1719 * infcall.c: Update.
1720 * infcmd.c: Update.
1721 * inflow.c: Update.
1722 * infrun.c: Update.
1723 * linux-fork.c: Update.
1724 * linux-nat.c: Update.
1725 * linux-thread-db.c: Update.
1726 * mi/mi-cmd-var.c: Update.
1727 * mi/mi-interp.c: Update.
1728 * mi/mi-main.c: Update.
1729 * nto-procfs.c: Update.
1730 * ppc-linux-tdep.c: Update.
1731 * procfs.c: Update.
1732 * python/py-inferior.c: Update.
1733 * python/py-record-btrace.c: Update.
1734 * python/py-record.c: Update.
1735 * ravenscar-thread.c: Update.
1736 * regcache.c: Update.
1737 * remote-sim.c: Update.
1738 * remote.c: Update.
1739 * sol-thread.c: Update.
1740 * solib.c: Update.
1741 * target.c: Update.
1742 * tui/tui-stack.c: Update.
1743 * varobj.c: Update.
1744 * windows-nat.c: Update.
1745 * windows-tdep.c: Update.
1746
1747 2018-07-03 Tom Tromey <tom@tromey.com>
1748
1749 * common/ptid.c (ptid_match): Remove.
1750 * common/ptid.h (ptid_match): Don't declare.
1751 * fbsd-nat.c: Update.
1752 * infcmd.c: Update.
1753 * infrun.c: Update.
1754 * linux-nat.c: Update.
1755 * record-btrace.c: Update.
1756 * regcache.c: Update.
1757 * remote.c: Update.
1758
1759 2018-07-03 Tom Tromey <tom@tromey.com>
1760
1761 * common/ptid.c (ptid_tid_p): Remove.
1762 * common/ptid.h (ptid_tid_p): Don't declare.
1763 * sol-thread.c: Update.
1764
1765 2018-07-03 Tom Tromey <tom@tromey.com>
1766
1767 * common/ptid.c (ptid_lwp_p): Remove.
1768 * common/ptid.h (ptid_lwp_p): Don't declare.
1769 * fbsd-nat.c: Update.
1770 * linux-nat.c: Update.
1771 * nat/linux-procfs.c: Update.
1772 * nat/x86-linux-dregs.c: Update.
1773 * sol-thread.c: Update.
1774
1775 2018-07-03 Tom Tromey <tom@tromey.com>
1776
1777 * common/ptid.c (ptid_is_pid): Remove.
1778 * common/ptid.h (ptid_is_pid): Don't declare.
1779 * infrun.c: Update.
1780 * linux-nat.c: Update.
1781 * mi/mi-interp.c: Update.
1782 * remote.c: Update.
1783 * thread.c: Update.
1784
1785 2018-07-03 Tom Tromey <tom@tromey.com>
1786
1787 * common/ptid.c (ptid_get_tid): Remove.
1788 * common/ptid.h (ptid_get_tid): Don't declare.
1789 * ada-tasks.c: Update.
1790 * aix-thread.c: Update.
1791 * bsd-uthread.c: Update.
1792 * darwin-nat.c: Update.
1793 * fbsd-nat.c: Update.
1794 * i386-darwin-nat.c: Update.
1795 * infrun.c: Update.
1796 * linux-tdep.c: Update.
1797 * nto-procfs.c: Update.
1798 * ppc-ravenscar-thread.c: Update.
1799 * python/py-infthread.c: Update.
1800 * ravenscar-thread.c: Update.
1801 * sol-thread.c: Update.
1802 * sparc-ravenscar-thread.c: Update.
1803 * windows-nat.c: Update.
1804
1805 2018-07-03 Tom Tromey <tom@tromey.com>
1806
1807 * common/ptid.c (ptid_get_lwp): Remove.
1808 * common/ptid.h (ptid_get_lwp): Don't declare.
1809 * aarch64-linux-nat.c: Update.
1810 * ada-tasks.c: Update.
1811 * aix-thread.c: Update.
1812 * amd64-linux-nat.c: Update.
1813 * arm-linux-nat.c: Update.
1814 * corelow.c: Update.
1815 * fbsd-nat.c: Update.
1816 * fbsd-tdep.c: Update.
1817 * gnu-nat.c: Update.
1818 * i386-cygwin-tdep.c: Update.
1819 * i386-gnu-nat.c: Update.
1820 * i386-linux-nat.c: Update.
1821 * ia64-linux-nat.c: Update.
1822 * inf-ptrace.c: Update.
1823 * infrun.c: Update.
1824 * linux-fork.c: Update.
1825 * linux-nat.c: Update.
1826 * linux-tdep.c: Update.
1827 * linux-thread-db.c: Update.
1828 * mips-linux-nat.c: Update.
1829 * nat/aarch64-linux-hw-point.c: Update.
1830 * nat/aarch64-linux.c: Update.
1831 * nat/linux-btrace.c: Update.
1832 * nat/linux-osdata.c: Update.
1833 * nat/linux-procfs.c: Update.
1834 * nat/x86-linux-dregs.c: Update.
1835 * obsd-nat.c: Update.
1836 * ppc-fbsd-nat.c: Update.
1837 * ppc-linux-nat.c: Update.
1838 * procfs.c: Update.
1839 * python/py-infthread.c: Update.
1840 * ravenscar-thread.c: Update.
1841 * remote.c: Update.
1842 * s390-linux-nat.c: Update.
1843 * sol-thread.c: Update.
1844 * sol2-tdep.c: Update.
1845 * spu-linux-nat.c: Update.
1846 * x86-linux-nat.c: Update.
1847 * xtensa-linux-nat.c: Update.
1848
1849 2018-07-03 Tom Tromey <tom@tromey.com>
1850
1851 * common/ptid.c (ptid_get_pid): Remove.
1852 * common/ptid.h (ptid_get_pid): Don't declare.
1853 * aarch64-linux-nat.c: Update.
1854 * ada-lang.c: Update.
1855 * aix-thread.c: Update.
1856 * alpha-bsd-nat.c: Update.
1857 * amd64-fbsd-nat.c: Update.
1858 * amd64-linux-nat.c: Update.
1859 * arm-linux-nat.c: Update.
1860 * arm-nbsd-nat.c: Update.
1861 * auxv.c: Update.
1862 * break-catch-syscall.c: Update.
1863 * breakpoint.c: Update.
1864 * bsd-uthread.c: Update.
1865 * corelow.c: Update.
1866 * ctf.c: Update.
1867 * darwin-nat.c: Update.
1868 * fbsd-nat.c: Update.
1869 * fbsd-tdep.c: Update.
1870 * gcore.c: Update.
1871 * gnu-nat.c: Update.
1872 * hppa-nbsd-nat.c: Update.
1873 * hppa-obsd-nat.c: Update.
1874 * i386-fbsd-nat.c: Update.
1875 * ia64-linux-nat.c: Update.
1876 * inf-ptrace.c: Update.
1877 * infcmd.c: Update.
1878 * inferior.c: Update.
1879 * inferior.h: Update.
1880 * inflow.c: Update.
1881 * infrun.c: Update.
1882 * linux-fork.c: Update.
1883 * linux-nat.c: Update.
1884 * linux-tdep.c: Update.
1885 * linux-thread-db.c: Update.
1886 * m68k-bsd-nat.c: Update.
1887 * mi/mi-interp.c: Update.
1888 * mi/mi-main.c: Update.
1889 * mips-linux-nat.c: Update.
1890 * mips-nbsd-nat.c: Update.
1891 * mips64-obsd-nat.c: Update.
1892 * nat/aarch64-linux-hw-point.c: Update.
1893 * nat/aarch64-linux.c: Update.
1894 * nat/linux-btrace.c: Update.
1895 * nat/linux-osdata.c: Update.
1896 * nat/linux-procfs.c: Update.
1897 * nat/x86-linux-dregs.c: Update.
1898 * nto-procfs.c: Update.
1899 * obsd-nat.c: Update.
1900 * ppc-linux-nat.c: Update.
1901 * ppc-nbsd-nat.c: Update.
1902 * ppc-obsd-nat.c: Update.
1903 * proc-service.c: Update.
1904 * procfs.c: Update.
1905 * python/py-inferior.c: Update.
1906 * python/py-infthread.c: Update.
1907 * ravenscar-thread.c: Update.
1908 * record.c: Update.
1909 * remote-sim.c: Update.
1910 * remote.c: Update.
1911 * rs6000-nat.c: Update.
1912 * s390-linux-nat.c: Update.
1913 * sh-nbsd-nat.c: Update.
1914 * sol-thread.c: Update.
1915 * sparc-nat.c: Update.
1916 * sparc64-tdep.c: Update.
1917 * spu-linux-nat.c: Update.
1918 * spu-tdep.c: Update.
1919 * target-debug.h: Update.
1920 * target.c: Update.
1921 * thread.c: Update.
1922 * tid-parse.c: Update.
1923 * tracefile-tfile.c: Update.
1924 * vax-bsd-nat.c: Update.
1925 * windows-nat.c: Update.
1926 * x86-linux-nat.c: Update.
1927 * x86-nat.c: Update.
1928
1929 2018-07-03 Tom Tromey <tom@tromey.com>
1930
1931 * common/ptid.c (pid_to_ptid): Remove.
1932 * common/ptid.h (pid_to_ptid): Don't declare.
1933 * aix-thread.c: Update.
1934 * arm-linux-nat.c: Update.
1935 * common/ptid.c: Update.
1936 * common/ptid.h: Update.
1937 * corelow.c: Update.
1938 * ctf.c: Update.
1939 * darwin-nat.c: Update.
1940 * fbsd-nat.c: Update.
1941 * fork-child.c: Update.
1942 * gnu-nat.c: Update.
1943 * go32-nat.c: Update.
1944 * inf-ptrace.c: Update.
1945 * infcmd.c: Update.
1946 * inferior.c: Update.
1947 * infrun.c: Update.
1948 * linux-fork.c: Update.
1949 * linux-nat.c: Update.
1950 * nat/aarch64-linux-hw-point.c: Update.
1951 * nat/fork-inferior.c: Update.
1952 * nat/x86-linux-dregs.c: Update.
1953 * nto-procfs.c: Update.
1954 * obsd-nat.c: Update.
1955 * procfs.c: Update.
1956 * progspace.c: Update.
1957 * remote.c: Update.
1958 * rs6000-nat.c: Update.
1959 * s390-linux-nat.c: Update.
1960 * sol-thread.c: Update.
1961 * spu-linux-nat.c: Update.
1962 * target.c: Update.
1963 * top.c: Update.
1964 * tracefile-tfile.c: Update.
1965 * windows-nat.c: Update.
1966
1967 2018-07-03 Tom Tromey <tom@tromey.com>
1968
1969 * common/ptid.h (ptid_build): Don't declare.
1970 * common/ptid.c (ptid_build): Remove.
1971 * aix-thread.c: Update.
1972 * bsd-kvm.c: Update.
1973 * bsd-uthread.c: Update.
1974 * common/agent.c: Update.
1975 * common/ptid.c: Update.
1976 * common/ptid.h: Update.
1977 * corelow.c: Update.
1978 * darwin-nat.c: Update.
1979 * fbsd-nat.c: Update.
1980 * gnu-nat.c: Update.
1981 * linux-fork.c: Update.
1982 * linux-nat.c: Update.
1983 * linux-thread-db.c: Update.
1984 * nat/linux-osdata.c: Update.
1985 * nat/linux-procfs.c: Update.
1986 * nto-procfs.c: Update.
1987 * obsd-nat.c: Update.
1988 * proc-service.c: Update.
1989 * procfs.c: Update.
1990 * ravenscar-thread.c: Update.
1991 * remote-sim.c: Update.
1992 * remote.c: Update.
1993 * sol-thread.c: Update.
1994 * target.c: Update.
1995 * windows-nat.c: Update.
1996
1997 2018-07-03 Tom Tromey <tom@tromey.com>
1998
1999 * infrun.c (follow_exec): Use exit_inferior_silent.
2000 * inferior.c (exit_inferior_num_silent): Remove.
2001 * inferior.h (exit_inferior_num_silent): Don't declare.
2002
2003 2018-07-03 Tom Tromey <tom@tromey.com>
2004
2005 PR cli/23340:
2006 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2007 inferior_ptid on error.
2008
2009 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2010 Simon Marchi <simon.marchi@polymtl.ca>
2011
2012 PR tdep/8282
2013 * disasm.h (gdb_disassembler): Add
2014 `m_disassembler_options_holder'. member
2015 * disasm.c (get_all_disassembler_options): New function.
2016 (gdb_disassembler::gdb_disassembler): Use it.
2017 (gdb_buffered_insn_length_init_dis): Likewise.
2018 (gdb_buffered_insn_length): Adjust accordingly.
2019 (set_disassembler_options): Handle options with arguments.
2020 (show_disassembler_options_sfunc): Likewise. Add a leading new
2021 line if showing options with descriptions.
2022 (disassembler_options_completer): Adapt to using the
2023 `disasm_options_and_args_t' structure.
2024 * mips-tdep.c (mips_disassembler_options): New variable.
2025 (mips_disassembler_options_o32): Likewise.
2026 (mips_disassembler_options_n32): Likewise.
2027 (mips_disassembler_options_n64): Likewise.
2028 (gdb_print_insn_mips): Don't set `disassembler_options'.
2029 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2030 functions.
2031 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2032 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2033 `gdbarch_disassembler_options_implicit' and
2034 `gdbarch_valid_disassembler_options'.
2035 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2036 `disasm_options_and_args_t' structure.
2037 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2038 method.
2039 (valid_disassembler_options): Switch from `disasm_options_t' to
2040 the `disasm_options_and_args_t' structure.
2041 * NEWS: Document `set disassembler-options' support for the MIPS
2042 target.
2043 * gdbarch.h: Regenerate.
2044 * gdbarch.c: Regenerate.
2045
2046 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2047
2048 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2049
2050 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2051
2052 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2053 parameter in call to amd64_target_description.
2054 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2055 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2056 (amd64fbsd_init_abi): Likewise.
2057 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2058 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2059 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2060 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2061
2062 2018-06-29 Pedro Alves <palves@redhat.com>
2063
2064 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2065 "segments" parameter.
2066 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2067 (_initialize_amd64_tdep): Update call to
2068 amd64_create_target_description.
2069 (amd64_target_description): Add "segments" parameter. Adjust
2070 the implementation to use it.
2071 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2072 call to amd64_create_target_description.
2073 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2074 * gdb/arch/amd64.h (amd64_create_target_description): Add
2075 "segments" register.
2076 * gdb/arch/amd64.c (amd64_create_target_description): Add
2077 "segments" parameter. Call create_feature_i386_64bit_segments
2078 only if SEGMENTS is true.
2079 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2080 call to amd64_create_target_description.
2081
2082 2018-06-29 Pedro Alves <palves@redhat.com>
2083
2084 * thread.c (thread_target_id_str): New, factored out from ...
2085 (print_thread_info_1): ... here. Use it to compute the max
2086 "Target Id" column width.
2087
2088 2018-06-29 Pedro Alves <palves@redhat.com>
2089
2090 * remote.c (remote_target::extra_thread_info): Delete
2091 'display_buf' and 'n' locals. from the cache, regardless of
2092 packet mechanims is in use. Use cache for qThreadExtra and qP
2093 methods too.
2094
2095 2018-06-29 Pedro Alves <palves@redhat.com>
2096
2097 * blockframe.c (find_pc_sect_containing_function): New function.
2098 * breakpoint.c (print_breakpoint_location): Don't call
2099 find_pc_sect_function.
2100 * linespec.c (create_sals_line_offset): Record the location's
2101 symbol in the sal.
2102 * linespec.c (convert_address_location_to_sals): Fill in sal's
2103 symbol with find_pc_sect_containing_function.
2104 * symtab.c (find_function_start_sal): Rename to ...
2105 (find_function_start_sal_1): ... this.
2106 (find_function_start_sal): Reimplement as wrapper around
2107 find_function_start_sal_1, and use
2108 find_pc_sect_containing_function to fill in the sal's symbol.
2109 (find_function_start_sal(symbol*, bool)): Adjust.
2110 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2111 comments.
2112 (find_pc_sect_containing_function): Declare.
2113
2114 2018-06-29 Pedro Alves <palves@redhat.com>
2115
2116 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2117 true if the the location has no symbol.
2118
2119 2018-06-28 Tom Tromey <tom@tromey.com>
2120
2121 * NEWS: Mention --enable-codesign.
2122 * silent-rules.mk (ECHO_SIGN): New variable.
2123 * configure.ac: Add --enable-codesign.
2124 * configure: Rebuild.
2125 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2126 (gdb$(EXEEXT)): Optionally invoke codesign.
2127
2128 2018-06-28 Pedro Alves <palves@redhat.com>
2129
2130 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2131 comments.
2132 (switch_to_thread_no_regs): Adjust comment.
2133 * infcmd.c (stop_pc): Delete.
2134 (post_create_inferior, info_program_command): Replace references
2135 to stop_pc with references to thread_info->suspend.stop_pc.
2136 * inferior.h (stop_pc): Delete declaration.
2137 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2138 (handle_inferior_event_1, handle_signal_stop)
2139 (process_event_stop_test, keep_going_stepped_thread)
2140 (handle_step_into_function, handle_step_into_function_backward)
2141 (print_stop_location): Replace references to stop_pc with
2142 references to thread_info->suspend.stop_pc.
2143 (struct infcall_suspend_state) <stop_pc>: Delete field.
2144 (save_infcall_suspend_state, restore_infcall_suspend_state):
2145 Remove references to inf_stat->stop_pc.
2146 * linux-fork.c (fork_load_infrun_state): Likewise.
2147 * record-btrace.c (record_btrace_set_replay): Likewise.
2148 * record-full.c (record_full_goto_entry): Likewise.
2149 * remote.c (print_one_stopped_thread): Likewise.
2150 * target.c (target_resume): Extend comment.
2151 * thread.c (set_executing_thread): New.
2152 (set_executing): Use it.
2153 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2154 Remove references to stop_pc.
2155
2156 2018-06-28 Pedro Alves <palves@redhat.com>
2157
2158 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2159 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2160
2161 2018-06-28 Tom Tromey <tom@tromey.com>
2162
2163 * coffread.c (coff_symfile_finish): Update.
2164 * xcoffread.c (xcoff_symfile_finish): Update.
2165 * elfread.c (elf_symfile_finish): Update.
2166 * symfile.h (dwarf2_free_objfile): Don't declare.
2167 * dwarf2read.c (_initialize_dwarf2_read): Use
2168 register_objfile_data_with_cleanup.
2169 (dwarf2_free_objfile): Now static. Change signature.
2170
2171 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2172
2173 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2174 option "-o" to add-symbol-file-load to add an offset to each
2175 section's load address.
2176 * symfile.c (set_objfile_default_section_offset): New function.
2177
2178 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2179
2180 * symfile.c (add_symbol_file_command): Make sure that sections
2181 with the same name are sorted in the same order.
2182
2183 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2184
2185 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2186 require the second argument. If omitted, load sections at the
2187 addresses specified in the file.
2188
2189 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2190
2191 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2192 (_initialize_symfile): Add option "-o" to symbol-file to add an
2193 offset to each section of the symbol file.
2194
2195 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2196
2197 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2198
2199 2018-06-27 Tom Tromey <tom@tromey.com>
2200
2201 * stack.c (_initialize_stack): Update "func" help text.
2202
2203 2018-06-27 Tom Tromey <tom@tromey.com>
2204
2205 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2206 std::vector.
2207 (unwind_infopy_str, pyuw_create_unwind_info)
2208 (unwind_infopy_add_saved_register, pyuw_sniffer)
2209 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2210 Update.
2211 (struct saved_reg): Add constructor.
2212 <value>: Now a gdbpy_ref<>.
2213
2214 2018-06-27 Tom Tromey <tom@tromey.com>
2215
2216 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2217
2218 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2219
2220 * gdb-gdb.py.in: Format using autopep8.
2221
2222 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2223
2224 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2225 (type_lookup_function): Recognize CORE_ADDR values.
2226
2227 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2228
2229 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2230 print tag_name.
2231
2232 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2233
2234 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2235 <__lt__>: Add.
2236
2237 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * gdb-gdb.py: Move to...
2240 * gdb-gdb.py.in: ... here.
2241 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2242 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2243 dependencies.
2244 (distclean): Remove gdb-gdb.py when cleaning.
2245 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2246 * configure: Re-generate.
2247
2248 2018-06-27 Pedro Alves <palves@redhat.com>
2249
2250 * proc-service.c (get_ps_regcache): New.
2251 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2252 (ps_lsetfpregs): Use it.
2253
2254 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2255
2256 PR gdb/21695
2257 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2258 (dwarf_decode_lines_1): Adjust.
2259
2260 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2261
2262 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2263 override.
2264 <info_proc>: Likewise.
2265
2266 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2267
2268 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2269 to windows_fetch_one_register, and only handle the case of
2270 fetching one register. Move the code that reloads the context
2271 and iterates over all registers if R is negative to...
2272 (windows_nat_target::fetch_registers): ... here.
2273 (do_windows_store_inferior_registers): Rename to
2274 windows_store_one_register, and only handle the case of storing
2275 one register. Move the code that handles the case where r is
2276 negative to...
2277 (windows_nat_target::store_registers) ... here.
2278
2279 2018-06-26 Tom Tromey <tom@tromey.com>
2280
2281 PR rust/22574:
2282 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2283 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2284 Update.
2285 (rust_internal_print_type): Add podata parameter.
2286 (rust_print_type): Update.
2287
2288 2018-06-26 Tom Tromey <tom@tromey.com>
2289
2290 * typeprint.h (struct print_offset_data) <update, finish,
2291 maybe_print_hole>: New methods.
2292 <indentation>: New constant.
2293 * typeprint.c (print_offset_data::indentation): Define.
2294 (print_offset_data::maybe_print_hole, print_offset_data::update)
2295 (print_offset_data::finish): Move from c-typeprint.c and rename.
2296 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2297 (print_spaces_filtered_with_print_options): Update.
2298 (c_print_type_union_field_offset, maybe_print_hole)
2299 (c_print_type_struct_field_offset): Move to typeprint.c and
2300 rename.
2301 (c_type_print_base_struct_union): Update.
2302
2303 2018-06-25 Pedro Alves <palves@redhat.com>
2304
2305 * gdbthread.h (thread_info_ref, delete_thread)
2306 (delete_thread_silent, first_thread_of_inferior)
2307 (any_thread_of_inferior, switch_to_thread)
2308 (enable_thread_stack_temporaries)
2309 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2310 (get_last_thread_stack_temporary)
2311 (value_in_thread_stack_temporaries, can_access_registers_thread):
2312 Spell out "struct thread_info" instead of just "thread_info".
2313 * inferior.h (notice_new_inferior): Likewise.
2314
2315 2018-06-25 Pedro Alves <palves@redhat.com>
2316
2317 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2318 pass thread_info pointer to delete_thread.
2319 (windows_nat_target::detach): Pass inferior pointer to
2320 detach_inferior.
2321 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2322 delete_thread.
2323 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2324 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2325 and pass a thread_info pointer to delete_thread.
2326 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2327 pass thread_info pointer to delete_thread.
2328 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2329 delete_thread_silent call.
2330 * procfs.c (procfs_target::detach): Pass inferior pointer to
2331 detach_inferior.
2332 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2333 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2334 delete_thread_silent call.
2335 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2336 pass thread_info pointer to delete_thread.
2337 (windows_nat_target::detach): Pass inferior pointer to
2338 delete_inferior.
2339
2340 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2341
2342 * regcache.c (readable_regcache::read_part): Fix asserts.
2343 (reg_buffer::raw_collect_part): New function.
2344 (regcache::write_part): Fix asserts.
2345 (reg_buffer::raw_supply_part): New function.
2346 (regcache::transfer_regset_register): New helper function.
2347 (regcache::transfer_regset): Call new functions.
2348 (regcache_supply_regset): Use gdb_byte*.
2349 (regcache::supply_regset): Likewise.
2350 (regcache_collect_regset): Likewise.
2351 (regcache::collect_regset): Likewise.
2352 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2353 (reg_buffer::raw_supply_part): Likewise.
2354 (regcache::transfer_regset_register): Likewise.
2355 (regcache::transfer_regset): Use gdb_byte*.
2356
2357 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2358
2359 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2360
2361 2018-06-21 Pedro Alves <palves@redhat.com>
2362
2363 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2364 instead of a ptid_t. All callers adjusted.
2365 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2366 adjusted.
2367 (print_ada_task_info, display_current_task_id, task_command_1):
2368 Adjust.
2369 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2370 inferior_thread.
2371 (breakpoint_kind): Adjust.
2372 (remove_breakpoints_pid): Rename to ...
2373 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2374 pointer. All callers adjusted.
2375 (bpstat_clear_actions): Use inferior_thread.
2376 (get_bpstat_thread): New.
2377 (bpstat_do_actions): Use it.
2378 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2379 to take a thread_info pointer. All callers adjusted.
2380 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2381 (breakpoint_re_set_thread): Use inferior_thread.
2382 * breakpoint.h (struct inferior): Forward declare.
2383 (bpstat_stop_status): Update.
2384 (remove_breakpoints_pid): Delete.
2385 (remove_breakpoints_inf): New.
2386 * bsd-uthread.c (bsd_uthread_target::wait)
2387 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2388 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2389 (maint_btrace_packet_history_cmd)
2390 (maint_btrace_clear_packet_history_cmd): Adjust.
2391 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2392 inferior_thread.
2393 * cli/cli-interp.c: Include "inferior.h".
2394 * common/refcounted-object.h (struct
2395 refcounted_object_ref_policy): New.
2396 * compile/compile-object-load.c: Include gdbthread.h.
2397 (store_regs): Use inferior_thread.
2398 * corelow.c (core_target::close): Use current_inferior.
2399 (core_target_open): Adjust to use first_thread_of_inferior and use
2400 the current inferior.
2401 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2402 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2403 <thread>: ... this new field. All references adjusted.
2404 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2405 Take a thread_info pointer instead of a ptid_t.
2406 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2407 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2408 thread_info pointer instead of a ptid_t.
2409 * elfread.c: Include "inferior.h".
2410 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2411 Use inferior_thread.
2412 * eval.c (evaluate_subexp): Likewise.
2413 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2414 inferior_thread.
2415 * gdb_proc_service.h (struct thread_info): Forward declare.
2416 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2417 <thread>: ... this new field. All references adjusted.
2418 * gdbarch.h, gdbarch.c: Regenerate.
2419 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2420 'thread' parameter. All implementations and callers adjusted.
2421 * gdbthread.h (thread_info) <set_running>: New method.
2422 (delete_thread, delete_thread_silent): Take a thread_info pointer
2423 instead of a ptid.
2424 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2425 (first_thread_of_process): Delete, replaced by ...
2426 (first_thread_of_inferior): ... this new function. All callers
2427 adjusted.
2428 (any_live_thread_of_process): Delete, replaced by ...
2429 (any_live_thread_of_inferior): ... this new function. All callers
2430 adjusted.
2431 (switch_to_thread, switch_to_no_thread): Declare.
2432 (is_executing): Delete.
2433 (enable_thread_stack_temporaries): Update comment.
2434 <enable_thread_stack_temporaries>: Take a thread_info pointer
2435 instead of a ptid_t. Incref the thread.
2436 <~enable_thread_stack_temporaries>: Decref the thread.
2437 <m_ptid>: Delete
2438 <m_thr>: New.
2439 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2440 (get_last_thread_stack_temporary)
2441 (value_in_thread_stack_temporaries, can_access_registers_thread):
2442 Take a thread_info pointer instead of a ptid_t. All callers
2443 adjusted.
2444 * infcall.c (get_call_return_value): Use inferior_thread.
2445 (run_inferior_call): Work with thread pointers instead of ptid_t.
2446 (call_function_by_hand_dummy): Work with thread pointers instead
2447 of ptid_t. Use thread_info_ref.
2448 * infcmd.c (proceed_thread_callback): Access thread's state
2449 directly.
2450 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2451 access thread's state directly.
2452 (continue_command): Use inferior_thread.
2453 (info_program_command): Use find_thread_ptid and access thread
2454 state directly.
2455 (proceed_after_attach_callback): Use thread state directly.
2456 (notice_new_inferior): Take a thread_info pointer instead of a
2457 ptid_t. All callers adjusted.
2458 (exit_inferior): Take an inferior pointer instead of a pid. All
2459 callers adjusted.
2460 (exit_inferior_silent): New.
2461 (detach_inferior): Delete.
2462 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2463 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2464 (detach_inferior_command, kill_inferior_command): Use
2465 find_inferior_id instead of valid_gdb_inferior_id and
2466 gdb_inferior_id_to_pid.
2467 (inferior_command): Use inferior and thread pointers.
2468 * inferior.h (struct thread_info): Forward declare.
2469 (notice_new_inferior): Take a thread_info pointer instead of a
2470 ptid_t. All callers adjusted.
2471 (detach_inferior): Delete declaration.
2472 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2473 instead of a pid. All callers adjusted.
2474 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2475 (valid_gdb_inferior_id): Delete.
2476 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2477 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2478 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2479 ...
2480 <inf>: ... this new field.
2481 <step_ptid>: Delete, replaced by ...
2482 <step_thread>: ... this new field.
2483 (get_displaced_stepping_state): Take an inferior pointer instead
2484 of a pid. All callers adjusted.
2485 (displaced_step_in_progress_any_inferior): Adjust.
2486 (displaced_step_in_progress_thread): Take a thread pointer instead
2487 of a ptid_t. All callers adjusted.
2488 (displaced_step_in_progress, add_displaced_stepping_state): Take
2489 an inferior pointer instead of a pid. All callers adjusted.
2490 (get_displaced_step_closure_by_addr): Adjust.
2491 (remove_displaced_stepping_state): Take an inferior pointer
2492 instead of a pid. All callers adjusted.
2493 (displaced_step_prepare_throw, displaced_step_prepare)
2494 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2495 All callers adjusted.
2496 (start_step_over): Adjust.
2497 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2498 displaced step queue.
2499 (do_target_resume): Adjust.
2500 (fetch_inferior_event): Use inferior_thread.
2501 (context_switch, get_inferior_stop_soon): Take an
2502 execution_control_state pointer instead of a ptid_t. All callers
2503 adjusted.
2504 (switch_to_thread_cleanup): Delete.
2505 (stop_all_threads): Use scoped_restore_current_thread.
2506 * inline-frame.c: Include "gdbthread.h".
2507 (inline_state) <inline_state>: Take a thread pointer instead of a
2508 ptid_t. All callers adjusted.
2509 <ptid>: Delete, replaced by ...
2510 <thread>: ... this new field.
2511 (find_inline_frame_state): Take a thread pointer instead of a
2512 ptid_t. All callers adjusted.
2513 (skip_inline_frames, step_into_inline_frame)
2514 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2515 pointer instead of a ptid_t. All callers adjusted.
2516 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2517 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2518 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2519 pointers directly.
2520 * linux-nat.c (get_detach_signal): Likewise.
2521 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2522 (thread_db_notice_clone): Adjust.
2523 (thread_db_find_new_threads_silently)
2524 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2525 a thread pointer instead of a ptid_t. All callers adjusted.
2526 * mi/mi-cmd-var.c: Include "inferior.h".
2527 (mi_cmd_var_update_iter): Update to use thread pointers.
2528 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2529 inferior directly.
2530 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2531 out to ...
2532 (mi_output_running): ... this new function.
2533 (mi_on_resume_1): Adjust to use it.
2534 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2535 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2536 directly.
2537 (interrupt_thread_callback): : Adjust to use thread and inferior
2538 pointers.
2539 * proc-service.c: Include "gdbthread.h".
2540 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2541 * progspace-and-thread.c: Include "inferior.h".
2542 * progspace.c: Include "inferior.h".
2543 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2544 hold a reference to an inferior_object.
2545 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2546 inferior_thread.
2547 * python/py-inferior.c (struct inferior_object): Give the type a
2548 tag name instead of a typedef.
2549 (python_on_normal_stop): No need to check if the current thread is
2550 listed.
2551 (inferior_to_inferior_object): Change return type to
2552 inferior_object. All callers adjusted.
2553 (find_thread_object): Delete, bits factored out to ...
2554 (thread_to_thread_object): ... this new function.
2555 * python/py-infthread.c (create_thread_object): Use
2556 inferior_to_inferior_object.
2557 (thpy_is_stopped): Use thread pointer directly.
2558 (gdbpy_selected_thread): Use inferior_thread.
2559 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2560 field, replaced with ...
2561 <thread>: ... this new field. All users adjusted.
2562 (btpy_insn_or_gap_new): Drop const.
2563 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2564 callers adjusted.
2565 * python/py-record.c: Include "gdbthread.h".
2566 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2567 a ptid_t. All callers adjusted.
2568 (gdbpy_current_recording): Use inferior_thread.
2569 * python/py-record.h (recpy_record_object) <ptid>: Delete
2570 field, replaced with ...
2571 <thread>: ... this new field. All users adjusted.
2572 (recpy_element_object) <ptid>: Delete
2573 field, replaced with ...
2574 <thread>: ... this new field. All users adjusted.
2575 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2576 a ptid_t. All callers adjusted.
2577 * python/py-threadevent.c: Include "gdbthread.h".
2578 (get_event_thread): Use thread_to_thread_object.
2579 * python/python-internal.h (struct inferior_object): Forward
2580 declare.
2581 (find_thread_object, find_inferior_object): Delete declarations.
2582 (thread_to_thread_object, inferior_to_inferior_object): New
2583 declarations.
2584 * record-btrace.c: Include "inferior.h".
2585 (require_btrace_thread): Use inferior_thread.
2586 (record_btrace_frame_sniffer)
2587 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2588 (get_thread_current_frame): Use scoped_restore_current_thread and
2589 switch_to_thread.
2590 (get_thread_current_frame): Use thread pointer directly.
2591 (record_btrace_replay_at_breakpoint): Use thread's inferior
2592 pointer directly.
2593 * record-full.c: Include "inferior.h".
2594 * regcache.c: Include "gdbthread.h".
2595 (get_thread_arch_regcache): Use the inferior's address space
2596 directly.
2597 (get_thread_regcache, registers_changed_thread): New.
2598 * regcache.h (get_thread_regcache(thread_info *thread)): New
2599 overload.
2600 (registers_changed_thread): New.
2601 (remote_target) <remote_detach_1>: Swap order of parameters.
2602 (remote_add_thread): <remote_add_thread>: Return the new thread.
2603 (get_remote_thread_info(ptid_t)): New overload.
2604 (remote_target::remote_notice_new_inferior): Use thread pointers
2605 directly.
2606 (remote_target::process_initial_stop_replies): Use
2607 thread_info::set_running.
2608 (remote_target::remote_detach_1, remote_target::detach)
2609 (extended_remote_target::detach): Adjust.
2610 * stack.c (frame_show_address): Use inferior_thread.
2611 * target-debug.h (target_debug_print_thread_info_pp): New.
2612 * target-delegates.c: Regenerate.
2613 * target.c (default_thread_address_space): Delete.
2614 (memory_xfer_partial_1): Use current_inferior.
2615 (target_detach): Use current_inferior.
2616 (target_thread_address_space): Delete.
2617 (generic_mourn_inferior): Use current_inferior.
2618 * target.h (struct target_ops) <thread_address_space>: Delete.
2619 (target_thread_address_space): Delete.
2620 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2621 pointers directly.
2622 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2623 thread pointer instead of a ptid_t. Adjust all callers.
2624 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2625 (first_thread_of_process): Delete, replaced by ...
2626 (first_thread_of_inferior): ... this new function. All callers
2627 adjusted.
2628 (any_thread_of_process): Rename to ...
2629 (any_thread_of_inferior): ... this, and take an inferior pointer.
2630 (any_live_thread_of_process): Rename to ...
2631 (any_live_thread_of_inferior): ... this, and take an inferior
2632 pointer.
2633 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2634 (value_in_thread_stack_temporaries)
2635 (get_last_thread_stack_temporary): Take a thread pointer instead
2636 of a ptid_t. Adjust all callers.
2637 (thread_info::set_running): New.
2638 (validate_registers_access): Use inferior_thread.
2639 (can_access_registers_ptid): Rename to ...
2640 (can_access_registers_thread): ... this, and take a thread
2641 pointer.
2642 (print_thread_info_1): Adjust to compare thread pointers instead
2643 of ptids.
2644 (switch_to_no_thread, switch_to_thread): Make extern.
2645 (scoped_restore_current_thread::~scoped_restore_current_thread):
2646 Use m_thread pointer directly.
2647 (scoped_restore_current_thread::scoped_restore_current_thread):
2648 Use inferior_thread.
2649 (thread_command): Use thread pointer directly.
2650 (thread_num_make_value_helper): Use inferior_thread.
2651 * top.c (execute_command): Use inferior_thread.
2652 * tui/tui-interp.c: Include "inferior.h".
2653 * varobj.c (varobj_create): Use inferior_thread.
2654 (value_of_root_1): Use find_thread_global_id instead of
2655 global_thread_id_to_ptid.
2656
2657 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2658
2659 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2660 possible.
2661 (regcache::write_part): Likewise.
2662 (readable_regcache::cooked_read_part): Update comment.
2663 (readable_regcache::cooked_write_part): Likewise.
2664 * regcache.h: (readable_regcache::read_part): Likewise.
2665 (regcache::write_part): Likewise.
2666
2667 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2668 Dirk Schubert <dirk.schubert@arm.com>
2669
2670 * aarch64-linux-nat.c (post_attach): New.
2671 (aarch64_linux_nat_target::post_attach): Override post_attach to
2672 record the number of hardware debug registers.
2673
2674 2018-06-20 Tom Tromey <tom@tromey.com>
2675
2676 * python/py-param.c (add_setshow_generic): Make parameters const.
2677 (parmpy_init): Update.
2678
2679 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2680
2681 * regcache.h (regcache_cooked_read_ftype): Rename to...
2682 (register_read_ftype): ...this, change type to function_view.
2683 (class reg_buffer) <save>: Remove src parameter.
2684 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2685 parameter non-const in first overload. Remove src parameter in
2686 second overload.
2687 * regcache.c (do_cooked_read): Remove.
2688 (readonly_detached_regcache::readonly_detached_regcache): Make
2689 parameter non-const, adjust call to other constructor.
2690 (reg_buffer::save): Remove src parameter.
2691 * frame.c (do_frame_register_read): Remove.
2692 (frame_save_as_regcache): Use lambda function.
2693 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2694 parameter to ppu2spu_data *.
2695 (ppu2spu_sniffer): Use lambda function.
2696
2697 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2698
2699 * record-full.c (record_full_target::insert_breakpoint): Remove
2700 "struct" keyword, add const.
2701
2702 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2703
2704 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2705 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2706 * configure.ac: Remove AC_PREREQ, add missing quoting.
2707 * gnulib/configure.ac: Modernize usage of
2708 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2709 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2710 (AUTOMAKE_VERSION): Bump to 1.15.1.
2711 * configure: Re-generate.
2712 * config.in: Re-generate.
2713 * aclocal.m4: Re-generate.
2714 * gnulib/aclocal.m4: Re-generate.
2715 * gnulib/config.in: Re-generate.
2716 * gnulib/configure: Re-generate.
2717 * gnulib/import/Makefile.in: Re-generate.
2718
2719 2018-06-19 Pedro Alves <palves@redhat.com>
2720
2721 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2722 (lookup_minimal_symbol_by_pc_section): ... here with
2723 gdb_assert_not_reached added.
2724
2725 2018-06-19 Pedro Alves <palves@redhat.com>
2726
2727 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2728 parameter with a block parameter. Compare location's block symbol
2729 with the frame's block instead of addresses.
2730 (skip_inline_frames): Pass the current block instead of the
2731 frame's address. Break out as soon as we determine the frame
2732 should not be skipped.
2733
2734 2018-06-18 Tom Tromey <tom@tromey.com>
2735
2736 * solib-aix.c (solib_aix_get_section_offsets): Return
2737 unique_xmalloc_ptr.
2738 (solib_aix_solib_create_inferior_hook): Update.
2739
2740 2018-06-18 Tom Tromey <tom@tromey.com>
2741
2742 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2743
2744 2018-06-18 Tom Tromey <tom@tromey.com>
2745
2746 * solib-frv.c (frv_relocate_main_executable): Use
2747 unique_xmalloc_ptr.
2748 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2749 unique_xmalloc_ptr.
2750
2751 2018-06-18 Tom Tromey <tom@tromey.com>
2752
2753 * objfiles.h (inhibit_section_map_updates): Update.
2754 (resume_section_map_updates, resume_section_map_updates_cleanup):
2755 Remove.
2756 * solib-svr4.c (svr4_handle_solib_event): Update.
2757 * objfiles.c (inhibit_section_map_updates): Return
2758 scoped_restore_tmpl<int>.
2759 (resume_section_map_updates, resume_section_map_updates_cleanup):
2760 Remove.
2761
2762 2018-06-18 Tom Tromey <tom@tromey.com>
2763
2764 * valprint.h (read_string): Update.
2765 * valprint.c (read_string): Change type of "buffer".
2766 (val_print_string): Update.
2767 * python/py-value.c (valpy_string): Update.
2768 * language.h (struct language_defn) <la_get_string>: Change
2769 type of "buffer".
2770 (default_get_string, c_get_string): Update.
2771 * language.c (default_get_string): Change type of "buffer".
2772 * guile/scm-value.c (gdbscm_value_to_string): Update.
2773 * c-lang.c (c_get_string): Change type of "buffer".
2774
2775 2018-06-18 Tom Tromey <tom@tromey.com>
2776
2777 * ser-mingw.c (struct pipe_state_destroyer): New.
2778 (pipe_state_up): New typedef.
2779 (cleanup_pipe_state): Remove.
2780 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2781
2782 2018-06-18 Tom Tromey <tom@tromey.com>
2783
2784 * rust-lang.h (rust_yyerror): Don't declare.
2785 * rust-lang.c (rust_language_defn): Update.
2786 * rust-exp.y (yyerror): Now static.
2787 * parse.c (parse_exp_in_context_1): Update.
2788 * p-lang.h (p_yyerror): Don't declare.
2789 * p-lang.c (p_language_defn): Update.
2790 * p-exp.y (yyerror): Now static.
2791 * opencl-lang.c (opencl_language_defn): Update.
2792 * objc-lang.c (objc_language_defn): Update.
2793 * m2-lang.h (m2_yyerror): Don't declare.
2794 * m2-lang.c (m2_language_defn): Update.
2795 * m2-exp.y (yyerror): Now static.
2796 * language.h (struct language_defn) <la_error>: Remove.
2797 * language.c (unk_lang_error): Remove.
2798 (unknown_language_defn, auto_language_defn): Remove.
2799 * go-lang.h (go_yyerror): Don't declare.
2800 * go-lang.c (go_language_defn): Update.
2801 * go-exp.y (yyerror): Now static.
2802 * f-lang.h (f_yyerror): Don't declare.
2803 * f-lang.c (f_language_defn): Update.
2804 * f-exp.y (yyerror): Now static.
2805 * d-lang.h (d_yyerror): Don't declare.
2806 * d-lang.c (d_language_defn): Update.
2807 * d-exp.y (yyerror): Now static.
2808 * c-lang.h (c_yyerror): Don't declare.
2809 * c-lang.c (c_language_defn, cplus_language_defn)
2810 (asm_language_defn, minimal_language_defn): Update.
2811 * c-exp.y (yyerror): Now static.
2812 * ada-lang.h (ada_yyerror): Don't declare.
2813 * ada-lang.c (ada_language_defn): Update.
2814 * ada-exp.y (yyerror): Now static.
2815
2816 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2817
2818 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2819 (store_sveregs_to_thread): Likewise.
2820 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2821 (aarch64_linux_store_inferior_registers): Likewise.
2822 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2823 function.
2824 (aarch64_sve_regs_copy_to_regcache): Likewise.
2825 (aarch64_sve_regs_copy_from_regcache): Likewise.
2826 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2827 declaration.
2828 (aarch64_sve_regs_copy_to_regcache): Likewise.
2829 (aarch64_sve_regs_copy_from_regcache): Likewise.
2830 (sve_context): Structure from Linux headers.
2831 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2832 (SVE_SIG_ZREG_SIZE): Likewise.
2833 (SVE_SIG_PREG_SIZE): Likewise.
2834 (SVE_SIG_FFR_SIZE): Likewise.
2835 (SVE_SIG_REGS_OFFSET): Likewise.
2836 (SVE_SIG_ZREGS_OFFSET): Likewise.
2837 (SVE_SIG_ZREG_OFFSET): Likewise.
2838 (SVE_SIG_ZREGS_SIZE): Likewise.
2839 (SVE_SIG_PREGS_OFFSET): Likewise.
2840 (SVE_SIG_PREG_OFFSET): Likewise.
2841 (SVE_SIG_PREGS_SIZE): Likewise.
2842 (SVE_SIG_FFR_OFFSET): Likewise.
2843 (SVE_SIG_REGS_SIZE): Likewise.
2844 (SVE_SIG_CONTEXT_SIZE): Likewise.
2845 (SVE_PT_REGS_MASK): Likewise.
2846 (SVE_PT_REGS_FPSIMD): Likewise.
2847 (SVE_PT_REGS_SVE): Likewise.
2848 (SVE_PT_VL_INHERIT): Likewise.
2849 (SVE_PT_VL_ONEXEC): Likewise.
2850 (SVE_PT_REGS_OFFSET): Likewise.
2851 (SVE_PT_FPSIMD_OFFSET): Likewise.
2852 (SVE_PT_FPSIMD_SIZE): Likewise.
2853 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2854 (SVE_PT_SVE_PREG_SIZE): Likewise.
2855 (SVE_PT_SVE_FFR_SIZE): Likewise.
2856 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2857 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2858 (__SVE_SIG_TO_PT): Likewise.
2859 (SVE_PT_SVE_OFFSET): Likewise.
2860 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2861 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2862 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2863 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2864 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2865 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2866 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2867 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2868 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2869 (SVE_PT_SVE_SIZE): Likewise.
2870 (SVE_PT_SIZE): Likewise.
2871 (HAS_SVE_STATE): New define.
2872
2873 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2874
2875 * nat/aarch64-sve-linux-sigcontext.h: New file.
2876 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2877 new files.
2878 (SVE_VQ_MIN): Likewise.
2879 (SVE_VQ_MAX): Likewise.
2880 (SVE_VL_MIN): Likewise.
2881 (SVE_VL_MAX): Likewise.
2882 (SVE_NUM_ZREGS): Likewise.
2883 (SVE_NUM_PREGS): Likewise.
2884 (sve_vl_valid): Likewise.
2885 (struct user_sve_header): Likewise.
2886
2887 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2888 Richard Bunt <Richard.Bunt@arm.com>
2889
2890 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2891 was requested by GDB.
2892
2893 2018-06-15 Tom de Vries <tdevries@suse.de>
2894
2895 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2896
2897 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2898
2899 * gnulib/update-gnulib.sh: Print expected versions of
2900 autoconf/aclocal.
2901
2902 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2903
2904 * arch-utils.c (default_type_align): Use type_length_units.
2905 * gdbtypes.c (type_align): Use type_length_units.
2906
2907 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2908
2909 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2910 of 'define' command.
2911
2912 2018-06-14 Tom de Vries <tdevries@suse.de>
2913
2914 PR cli/22573
2915 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2916 get_no_prettyformat_print_options.
2917
2918 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2919
2920 * sparc-nat.h: Include target.h.
2921 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2922 <fetch_registers>: Remove this argument in function call.
2923 <store_registers>: Remove this argument in function call, remove
2924 extra semicolon.
2925 <low_forget_process>: Call sparc64_forget_process instead of
2926 sparc_forget_process.
2927
2928 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2929
2930 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2931 (procfs_target::make_corefile_notes): Adjust to new
2932 target_read_alloc return type.
2933
2934 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2935 Stephen Roberts <stephen.roberts@arm.com>
2936
2937 PR gdb/22882
2938 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2939 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2940 Move should_notify_stop local into more inner scope.
2941
2942 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2943 Stephen Roberts <stephen.roberts@arm.com>
2944
2945 PR gdb/22882
2946 * infrun.c (resume_1): Add call to mark_async_event_handler.
2947
2948 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2949
2950 * infrun.c (do_target_wait): Change old version of $pc printed.
2951
2952 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * dwarf2read.c (read_index_from_section): Rename to...
2955 (read_gdb_index_from_section): ... this, update all callers.
2956 (dwarf2_read_index): Rename to...
2957 (dwarf2_read_gdb_index): ... this, update all callers.
2958
2959 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2960
2961 * gdb/hppa-linux-nat.c
2962 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2963 hppa_linux_nat_target::fetch_registers.
2964
2965 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2966
2967 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2968 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2969 (AARCH64_DWARF_SVE_FFR): Likewise.
2970 (AARCH64_DWARF_SVE_P0): Likewise.
2971 (AARCH64_DWARF_SVE_Z0): Likewise.
2972
2973 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2974
2975 * common/common-regcache.h (raw_compare): New function.
2976 * regcache.c (regcache::raw_compare): Likewise.
2977 * regcache.h (regcache::raw_compare): New declaration.
2978
2979 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2980
2981 * common/common-regcache.h (reg_buffer_common): New structure.
2982 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2983 (reg_buffer::raw_supply): Likewise.
2984 (reg_buffer::raw_supply_integer): Likewise.
2985 (reg_buffer::raw_supply_zeroed): Likewise.
2986 (reg_buffer::raw_collect): Likewise.
2987 (reg_buffer::raw_collect_integer): Likewise.
2988 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2989 (reg_buffer::raw_supply): Likewise.
2990 (reg_buffer::raw_supply_integer): Likewise.
2991 (reg_buffer::raw_supply_zeroed): Likewise.
2992 (reg_buffer::raw_collect): Likewise.
2993 (reg_buffer::raw_collect_integer): Likewise.
2994
2995 2018-06-10 Tom Tromey <tom@tromey.com>
2996
2997 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2998 (class remote_state) <stop_reply_queue>: Now std::vector.
2999 (remote_state::~remote_state)
3000 (remote_target::stop_reply_queue_length): Update.
3001 (struct queue_iter_param, remove_child_of_pending_fork)
3002 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3003 (check_pending_event_prevents_wildcard_vcont_callback)
3004 (remove_stop_reply_for_inferior)
3005 (remove_stop_reply_of_remote_state)
3006 (remote_notif_remove_once_on_match)
3007 (stop_reply_match_ptid_and_ws)
3008 (remote_kill_child_of_pending_fork): Remove.
3009 (remote_target::remove_new_fork_children)
3010 (remote_target::check_pending_events_prevent_wildcard_vcont)
3011 (remote_target::discard_pending_stop_replies)
3012 (remote_target::discard_pending_stop_replies_in_queue)
3013 (remote_target::remote_notif_remove_queued_reply)
3014 (remote_target::queued_stop_reply)
3015 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3016 (remote_target::wait, remote_target::kill_new_fork_children)
3017 (remote_target::async): Update.
3018
3019 2018-06-10 Tom Tromey <tom@tromey.com>
3020
3021 * record-full.c (record_full_arch_list_cleanups): Remove.
3022 (record_full_message): Use try/catch.
3023 (record_full_wait_cleanups): Remove.
3024 (record_full_wait_1): Use try/catch.
3025 (record_full_restore): Likewise.
3026
3027 2018-06-10 Tom Tromey <tom@tromey.com>
3028
3029 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3030 declare VEC. Add constructor.
3031 <in_target_beneath>: Now bool.
3032 (record_full_breakpoints): Now a std::vector, static.
3033 (record_full_sync_record_breakpoints)
3034 (record_full_init_record_breakpoints)
3035 (record_full_target::insert_breakpoint)
3036 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3037
3038 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3039
3040 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3041 * serial.c (serial_interface_lookup): Remove struct keyword.
3042
3043 2018-06-10 Tom Tromey <tom@tromey.com>
3044
3045 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3046 method.
3047 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3048 a method.
3049 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3050 method.
3051 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3052 "beneath" as a method.
3053 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3054 Use "beneath" as a method.
3055
3056 2018-06-10 Tom Tromey <tom@tromey.com>
3057
3058 * tracefile.c (struct trace_file_writer_deleter): New.
3059 <operator()>: Rename from trace_file_writer_xfree.
3060 (trace_file_writer_up): New typedef.
3061 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3062
3063 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3064
3065 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3066 <m_registers, m_register_status>: Change type to
3067 std::unique_ptr.
3068 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3069 XCNEWVEC.
3070
3071 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3072
3073 * common/common-regcache.h (enum register_status): Add
3074 underlying type "signed char".
3075 * regcache.h (reg_buffer) <m_register_status>: Change type to
3076 register_status *.
3077 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3078 register_status instead of signed char.
3079 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3080 (reg_buffer::get_register_status): Remove cast.
3081 (readable_regcache::raw_read): Remove cast.
3082 (readable_regcache::cooked_read): Remove cast.
3083
3084 2018-06-09 Tom Tromey <tom@tromey.com>
3085
3086 * source.c (reverse_search_command, forward_search_command): Use
3087 scoped_fd.
3088
3089 2018-06-09 Tom Tromey <tom@tromey.com>
3090
3091 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3092 (serial_ops_list): Now static, std::vector.
3093 (serial_interface_lookup, serial_add_interface): Update.
3094
3095 2018-06-09 Tom Tromey <tom@tromey.com>
3096
3097 * dwarf2read.c (process_cu_includes): Update.
3098 (process_full_comp_unit): Update.
3099 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3100 std::vector.
3101
3102 2018-06-08 Paul Koning <paul_koning@dell.com>
3103
3104 PR gdb/23252
3105
3106 * python/python.c (do_start_initialization):
3107 Avoid call to internal Python API.
3108 (init__gdb_module): New function.
3109
3110 2018-06-08 Gary Benson <gbenson@redhat.com>
3111
3112 * linux-thread-db.c (valprint.h): New include.
3113 (struct check_thread_db_info): New structure.
3114 (check_thread_db_on_load, tdb_testinfo): New static globals.
3115 (check_thread_db, check_thread_db_callback): New functions.
3116 (try_thread_db_load_1): Run integrity checks if requested.
3117 (maintenance_check_libthread_db): New function.
3118 (_initialize_thread_db): Register "maint check libthread-db"
3119 and "maint set/show check-libthread-db".
3120 * NEWS: Mention the above new commands.
3121
3122 2018-06-08 Tom Tromey <tom@tromey.com>
3123
3124 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3125 now a method.
3126
3127 2018-06-08 Tom Tromey <tom@tromey.com>
3128
3129 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3130
3131 2018-06-08 Tom Tromey <tom@tromey.com>
3132
3133 * common/btrace-common.h (struct btrace_data): Add constructor,
3134 destructor, move assignment operator.
3135 <empty, clear, fini>: New methods.
3136 <format>: Initialize.
3137 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3138 (btrace_data_empty): Don't declare.
3139 * common/btrace-common.c (btrace_data_init): Remove.
3140 (btrace_data::fini): Rename from btrace_data_fini.
3141 (btrace_data::empty): Rename from btrace_data_empty.
3142 (btrace_data::clear): Rename from btrace_data_clear. Return
3143 bool.
3144 * btrace.h (make_cleanup_btrace_data): Don't declare.
3145 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3146 (parse_xml_btrace): Update.
3147 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3148 (maint_btrace_clear_packet_history_cmd): Update.
3149
3150 2018-06-07 Pedro Alves <palves@redhat.com>
3151
3152 * target.h (target_ops) <beneath>: Now a method. All references
3153 updated.
3154 (class target_stack): New.
3155 * target.c (g_target_stack): New.
3156 (g_current_top_target): Delete.
3157 (current_top_target): Get the top target out of g_target_stack.
3158 (target_stack::push, target_stack::unpush): New.
3159 (push_target, unpush_target): Reimplement.
3160 (target_is_pushed): Reimplement in terms of g_target_stack.
3161 (target_ops::beneath, target_stack::find_beneath): New.
3162
3163 2018-06-07 Pedro Alves <palves@redhat.com>
3164
3165 * target.h (find_target_beneath): Delete declaration.
3166 * target.c (find_target_beneath): Delete definition.
3167 * aix-thread.c: All callers of find_target_beneath adjusted to
3168 call target_ops::beneath instead.
3169 * bsd-uthread.c: Likewise.
3170 * linux-thread-db.c: Likewise.
3171 * ravenscar-thread.c: Likewise.
3172 * sol-thread.c: Likewise.
3173 * spu-multiarch.c: Likewise.
3174
3175 2018-06-07 Pedro Alves <palves@redhat.com>
3176
3177 * target.h (target_ops) <beneath>: Now a method. All references
3178 updated.
3179 (target_ops) <m_beneath>: New.
3180 * target.c (target_ops::beneath): New.
3181 * corelow.c: Adjust all references to target_ops::beneath.
3182 * linux-thread-db.c: Likewise.
3183 * make-target-delegates: Likewise.
3184 * record-btrace.c: Likewise.
3185 * record-full.c: Likewise.
3186 * remote.c: Likewise.
3187 * target.c: Likewise.
3188 * target-delegates.c: Regenerate.
3189
3190 2018-06-07 Pedro Alves <palves@redhat.com>
3191
3192 * target.h (target_stack): Delete.
3193 (current_top_target): Declare function.
3194 * target.c (target_stack): Delete.
3195 (g_current_top_target): New.
3196 (current_top_target): New function.
3197 * auxv.c: Use current_top_target instead of target_stack
3198 throughout.
3199 * avr-tdep.c: Likewise.
3200 * breakpoint.c: Likewise.
3201 * corefile.c: Likewise.
3202 * elfread.c: Likewise.
3203 * eval.c: Likewise.
3204 * exceptions.c: Likewise.
3205 * frame.c: Likewise.
3206 * gdbarch-selftests.c: Likewise.
3207 * gnu-v3-abi.c: Likewise.
3208 * ia64-tdep.c: Likewise.
3209 * ia64-vms-tdep.c: Likewise.
3210 * infcall.c: Likewise.
3211 * infcmd.c: Likewise.
3212 * infrun.c: Likewise.
3213 * linespec.c: Likewise.
3214 * linux-tdep.c: Likewise.
3215 * minsyms.c: Likewise.
3216 * ppc-linux-nat.c: Likewise.
3217 * ppc-linux-tdep.c: Likewise.
3218 * procfs.c: Likewise.
3219 * regcache.c: Likewise.
3220 * remote.c: Likewise.
3221 * rs6000-tdep.c: Likewise.
3222 * s390-linux-nat.c: Likewise.
3223 * s390-tdep.c: Likewise.
3224 * solib-aix.c: Likewise.
3225 * solib-darwin.c: Likewise.
3226 * solib-dsbt.c: Likewise.
3227 * solib-spu.c: Likewise.
3228 * solib-svr4.c: Likewise.
3229 * solib-target.c: Likewise.
3230 * sparc-tdep.c: Likewise.
3231 * sparc64-tdep.c: Likewise.
3232 * spu-tdep.c: Likewise.
3233 * symfile.c: Likewise.
3234 * symtab.c: Likewise.
3235 * target-descriptions.c: Likewise.
3236 * target-memory.c: Likewise.
3237 * target.c: Likewise.
3238 * target.h: Likewise.
3239 * tracefile-tfile.c: Likewise.
3240 * tracepoint.c: Likewise.
3241 * valops.c: Likewise.
3242 * valprint.c: Likewise.
3243 * value.c: Likewise.
3244 * windows-tdep.c: Likewise.
3245 * mi/mi-main.c: Likewise.
3246
3247 2018-06-07 Tom Tromey <tom@tromey.com>
3248
3249 * valprint.h (build_address_symbolic): Declare.
3250 * printcmd.c (print_address_symbolic): Update.
3251 (build_address_symbolic): Change "name" and "filename" to
3252 std::string.
3253 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3254 Update.
3255 * defs.h (build_address_symbolic): Remove declaration.
3256
3257 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3258
3259 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3260 (aarch64_vnv_type): Add function.
3261 (aarch64_pseudo_register_name): Add V regs for SVE.
3262 (aarch64_pseudo_register_type): Likewise.
3263 (aarch64_pseudo_register_reggroup_p): Likewise.
3264 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3265 (aarch64_pseudo_read_value): Add V regs for SVE.
3266 (aarch64_pseudo_write_2): Use V0 offset for SVE
3267 (aarch64_pseudo_write): Add V regs for SVE.
3268 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3269
3270 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3271
3272 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3273 (sve_vl_from_vq): Likewise.
3274
3275 2018-06-05 Tom Tromey <tom@tromey.com>
3276
3277 * cli/cli-cmds.c (show_version): Update.
3278 * top.c (print_gdb_version): Add "interactive" parameter.
3279 Update.
3280 * main.c (captured_main_1): Update.
3281 * top.h (print_gdb_version): Add "interactive" parameter and a
3282 comment.
3283
3284 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3285
3286 * common/enum-flags.h: Add trailing semicolon to example in
3287 comment.
3288
3289 2018-06-05 Tom Tromey <tom@tromey.com>
3290
3291 PR cli/12326:
3292 * NEWS: Add entry about pager.
3293 * utils.c (pagination_disabled_for_command): New global.
3294 (prompt_for_continue): Allow "c" response to prompt.
3295 (reinitialize_more_filter): Clear
3296 pagination_disabled_for_command.
3297 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3298
3299 2018-06-04 Tom Tromey <tom@tromey.com>
3300
3301 * ada-lang.h (ada_lookup_symbol_list): Update.
3302 * ada-lang.c (resolve_subexp): Update.
3303 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3304 parameter.
3305 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3306 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3307 results parameter to std::vector.
3308 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3309 Update.
3310 * ada-exp.y (block_lookup): Update.
3311 (select_possible_type_sym): Change type of syms. Remove nsyms
3312 parameter.
3313 (write_var_or_type, write_name_assoc): Update.
3314
3315 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3316
3317 * windows-nat.c (windows_nat_target::xfer_partial): Return
3318 TARGET_XFER_E_IO if we need to delegate to the target beneath
3319 but BENEATH is NULL.
3320
3321 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3322
3323 * Makefile.in (config.status): Add configure.nat as a
3324 dependency.
3325
3326 2018-06-04 Tom Tromey <tom@tromey.com>
3327
3328 * cp-name-parser.y (cpname_state): Add method declarations.
3329 (HANDLE_QUAL): Update.
3330 (cpname_state::d_grab, cpname_state::fill_comp)
3331 (cpname_state::make_operator, cpname_state::make_dtor)
3332 (cpname_state::make_builtin_type, cpname_state::make_name)
3333 (cpname_state::d_qualify, cpname_state::d_int_type)
3334 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3335 (%union): Move earlier.
3336
3337 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3338
3339 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3340
3341 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3342
3343 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3344 (aarch64_pseudo_write_1): Likewise.
3345 (aarch64_pseudo_read_value): Use helper.
3346 (aarch64_pseudo_write): Likewise.
3347
3348 2018-06-04 Pedro Alves <palves@redhat.com>
3349
3350 * darwin-nat.c (darwin_ops): Delete.
3351 (darwin_attach_pid): Use get_native_target.
3352
3353 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3354
3355 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3356 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3357
3358 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3359
3360 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3361 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3362 (aarch64_gdbarch_init): Check for SVE.
3363 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3364
3365 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3366
3367 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3368 * aarch64-tdep.h (aarch64_read_description): Likewise.
3369 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3370 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3371 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3372 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3373 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3374
3375 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3376
3377 * value.c (value_fetch_lazy_bitfield): New.
3378 (value_fetch_lazy_memory): New.
3379 (value_fetch_lazy_register): New.
3380 (value_fetch_lazy): Factor out to smaller functions.
3381
3382 2018-06-01 Tom Tromey <tom@tromey.com>
3383
3384 * cp-name-parser.y (backslashable, represented): Now const.
3385
3386 2018-06-01 Tom Tromey <tom@tromey.com>
3387
3388 * cp-name-parser.y: Include parser-defs.h.
3389 (parser_fprintf): Remove declaration.
3390
3391 2018-06-01 Tom Tromey <tom@tromey.com>
3392
3393 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3394 %parse-param.
3395 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3396 (global_result): Remove globals.
3397 (struct cpname_state): New.
3398 (yyparse): Don't declare.
3399 (yylex, yyerror): Move declarations after %union.
3400 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3401 (make_name): Add state parameter.
3402 Update all callers.
3403 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3404 parameter.
3405 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3406 Update.
3407 (yylex): Add lvalp, state parameters.
3408 (yyerror): Add state parameter.
3409 (cp_demangled_name_to_comp): Update.
3410
3411 2018-06-01 Tom Tromey <tom@tromey.com>
3412
3413 * cp-name-parser.y (parser_fprintf): Declare.
3414 (GDB_YY_REMAP_PREFIX): Define.
3415 Include yy-remap.h. Don't redefine yy* identifiers.
3416
3417 2018-06-01 Tom Tromey <tom@tromey.com>
3418
3419 * python/py-type.c (typy_legacy_template_argument): Update.
3420 * cp-support.h (cp_demangled_name_to_comp): Update.
3421 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3422 parameter to be a "std::string *".
3423 (main): Update.
3424
3425 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3426
3427 * ada-lex.l: Include "diagnostics.h" instead of
3428 "common/diagnostics.h".
3429 * unittests/environ-selftests.c: Likewise.
3430 * common/diagnostics.h: Moved to ../include.
3431
3432 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3433
3434 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3435 to language_mode_manual while calling breakpoint_re_set_one.
3436
3437 2018-06-01 Tom Tromey <tom@tromey.com>
3438
3439 * valops.c (value_cast_structs, destructor_name_p): Update.
3440 * symtab.c (gdb_mangle_name): Update.
3441 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3442 Update.
3443 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3444 (pascal_object_print_value_fields, pascal_object_print_value):
3445 Update.
3446 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3447 * linespec.c (find_methods): Update.
3448 * gdbtypes.h (type_name_no_tag): Remove.
3449 (type_name_or_error): Rename from type_name_no_tag_or_error.
3450 * gdbtypes.c (type_name_no_tag): Remove.
3451 (type_name_or_error): Rename from type_name_no_tag_or_error.
3452 (lookup_struct_elt_type, check_typedef): Update.
3453 * expprint.c (print_subexp_standard): Update.
3454 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3455 * d-namespace.c (d_lookup_nested_symbol): Update.
3456 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3457 (cp_print_class_member): Update.
3458 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3459 * completer.c (add_struct_fields): Update.
3460 * c-typeprint.c (cp_type_print_derivation_info)
3461 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3462 Update.
3463 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3464 (ada_prefer_type, ada_is_exception_sym): Update.
3465
3466 2018-06-01 Tom Tromey <tom@tromey.com>
3467
3468 * valops.c (enum_constant_from_type, value_namespace_elt)
3469 (value_maybe_namespace_elt): Update.
3470 * valarith.c (find_size_for_pointer_math): Update.
3471 * target-descriptions.c (make_gdb_type): Update.
3472 * symmisc.c (print_symbol): Update.
3473 * stabsread.c (define_symbol, read_type)
3474 (complain_about_struct_wipeout, add_undefined_type)
3475 (cleanup_undefined_types_1): Update.
3476 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3477 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3478 (rust_internal_print_type, rust_composite_type)
3479 (rust_evaluate_funcall, rust_evaluate_subexp)
3480 (rust_inclusive_range_type_p): Update.
3481 * python/py-type.c (typy_get_tag): Update.
3482 * p-typeprint.c (pascal_type_print_base): Update.
3483 * mdebugread.c (parse_symbol, parse_type): Update.
3484 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3485 Update.
3486 * guile/scm-type.c (gdbscm_type_tag): Update.
3487 * go-lang.c (sixg_string_p): Update.
3488 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3489 Update.
3490 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3491 (TYPE_TAG_NAME): Remove.
3492 * gdbtypes.c (type_name_no_tag): Simplify.
3493 (check_typedef, check_types_equal, recursive_dump_type)
3494 (copy_type_recursive, arch_composite_type): Update.
3495 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3496 in summary mode when needed.
3497 * eval.c (evaluate_funcall): Update.
3498 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3499 (process_structure_scope, read_enumeration_type)
3500 (read_namespace_type, read_module_type, determine_prefix): Update.
3501 * cp-support.c (inspect_type): Update.
3502 * coffread.c (process_coff_symbol, decode_base_type): Update.
3503 * c-varobj.c (c_is_path_expr_parent): Update.
3504 * c-typeprint.c (c_type_print_base_struct_union): Update.
3505 (c_type_print_base_1): Update. Print struct/class/union/enum in
3506 summary when using C language.
3507 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3508 (gen_maybe_namespace_elt): Update.
3509 * ada-lang.c (ada_type_name): Simplify.
3510 (empty_record, ada_template_to_fixed_record_type_1)
3511 (template_to_static_fixed_type)
3512 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3513
3514 2018-06-01 Tom Tromey <tom@tromey.com>
3515
3516 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3517 c_print_type.
3518 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3519 (c_print_type): Update.
3520 (c_print_type): New overload.
3521 (c_type_print_varspec_prefix, c_type_print_args)
3522 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3523 (c_type_print_base_struct_union, c_type_print_base_1)
3524 (cp_type_print_method_args): Add "language" parameter.
3525 (c_type_print_base): Update.
3526 * c-lang.h (c_print_type): Add new overload.
3527
3528 2018-06-01 Tom Tromey <tom@tromey.com>
3529
3530 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3531 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3532
3533 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3534
3535 * aarch64-tdep.c (aarch64_sve_register_names): New const
3536 var.
3537 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3538 (AARCH64_SVE_Z_REGS_NUM): New define.
3539 (AARCH64_SVE_P_REGS_NUM): Likewise.
3540 (AARCH64_SVE_NUM_REGS): Likewise.
3541
3542 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3543
3544 * nat/linux-ptrace.h [__alpha__]
3545 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3546 definitions.
3547
3548 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3549
3550 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3551 the endianness selected.
3552 * NEWS: Document `set endian auto' mode operation update.
3553
3554 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3555
3556 * Makefile.in: Add new header.
3557 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3558 (sve_vl_from_vg): Likewise.
3559 (sve_vq_from_vl): Likewise.
3560 (sve_vl_from_vq): Likewise.
3561 (sve_vq_from_vg): Likewise.
3562 (sve_vg_from_vq): Likewise.
3563 * configure.nat: Add new c file.
3564 * nat/aarch64-sve-linux-ptrace.c: New file.
3565 * nat/aarch64-sve-linux-ptrace.h: New file.
3566
3567 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3568
3569 * aarch64-linux-nat.c (aarch64_linux_read_description):
3570 Add parmeter zero.
3571 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3572 Likewise.
3573 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3574 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3575 (aarch64_gdbarch_init): Add parmeter zero.
3576 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3577 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3578 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3579 parmeter.
3580 * doc/gdb.texinfo: Describe SVE feature
3581 * features/aarch64-sve.c: New file.
3582
3583 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3584
3585 PR gdb/23210
3586 * gdbarch.sh (significant_addr_bit): Default to zero when
3587 not set by target architecture.
3588 * gdbarch.c: Re-generated.
3589 * utils.c (address_significant): Update.
3590
3591 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3592
3593 * stack.c (func_command): Remove trailing newline in call to error.
3594
3595 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3596
3597 * regcache.h (regcache_raw_collect): Remove, update callers to
3598 use regcache::raw_collect.
3599 * regcache.c (regcache_raw_collect): Remove.
3600
3601 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3602
3603 * regcache.h (regcache_raw_supply): Remove, update callers to
3604 use detached_regcache::raw_supply.
3605 * regcache.c (regcache_raw_supply): Remove.
3606
3607 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3608
3609 * regcache.h (regcache_cooked_write_part): Remove, update
3610 callers to use regcache::cooked_write_part.
3611 * regcache.c (regcache_cooked_write_part): Remove.
3612
3613 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3614
3615 * regcache.h (regcache_cooked_read_part): Remove, update callers
3616 to use readable_regcache::cooked_read_part.
3617 * regcache.c (regcache_cooked_read_part): Remove.
3618
3619 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3620
3621 * regcache.h (regcache_cooked_read_value): Remove, update
3622 callers to use readable_regcache::cooked_read_value.
3623 * regcache.c (regcache_cooked_read_value): Remove.
3624
3625 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3626
3627 * regcache.h (regcache_cooked_write): Remove, update callers to
3628 use regcache::cooked_write.
3629 * regcache.c (regcache_cooked_write): Remove.
3630
3631 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3632
3633 * regcache.h (regcache_invalidate): Remove, update callers to
3634 use detached_regcache::invalidate instead.
3635 * regcache.c (regcache_invalidate): Remove.
3636
3637 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3638
3639 * regcache.h (regcache_raw_write_part): Remove, update callers
3640 to use regcache::raw_write_part instead.
3641 * regcache.c (regcache_raw_write_part): Remove.
3642
3643 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3644
3645 * regcache.h (regcache_raw_read_part): Remove, update callers to
3646 use readable_regcache::raw_read_part instead.
3647 * regcache.c (regcache_raw_read_part): Remove.
3648
3649 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3650
3651 * regcache.h (regcache_cooked_read): Remove, update callers to
3652 use readable_regcache::cooked_read instead.
3653 * regcache.c (regcache_cooked_read): Remove.
3654
3655 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3656
3657 * regcache.h (regcache_raw_write): Remove, update callers to use
3658 regcache::raw_write instead.
3659 * regcache.c (regcache_raw_write): Remove.
3660
3661 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3662
3663 * regcache.h (regcache_raw_read): Remove, update callers to use
3664 readable_regcache::raw_read instead.
3665 * regcache.c (regcache_raw_read): Remove.
3666
3667 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3668
3669 * regcache.h (regcache_raw_update): Remove, update callers to
3670 use readable_regcache::raw_update instead.
3671 * regcache.c (regcache_raw_update): Remove.
3672
3673 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3674
3675 * regcache.h (regcache_register_status): Remove, update callers
3676 to use reg_buffer::get_register_status directly instead.
3677 * regcache.c (regcache_register_status): Remove.
3678
3679 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3680
3681 * regcache.h (regcache_get_ptid): Remove, update all callers to
3682 call regcache::ptid instead.
3683 * regcache.c (regcache_get_ptid): Remove.
3684
3685 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3686
3687 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3688
3689 2018-05-30 Pedro Alves <palves@redhat.com>
3690
3691 * common/common-exceptions.h (exception_rethrow): Use
3692 ATTRIBUTE_NORETURN.
3693
3694 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3695
3696 * breakpoint.c (print_solib_event, check_status_catch_solib):
3697 Remove struct keyword in range-based for loops.
3698 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3699 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3700 Likewise.
3701 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3702 Likewise.
3703 * symfile.c (addr_info_make_relative): Likewise.
3704 * thread.c (value_in_thread_stack_temporaries): Likewise.
3705
3706 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3707
3708 PR gdb/16841
3709 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3710 aggregate type to get its real type before accessing it.
3711
3712 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3713
3714 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3715 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3716 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3717 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3718 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3719 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3720 * printcmd.c (info_address_command): Likewise.
3721
3722 2018-05-29 Tom Tromey <tom@tromey.com>
3723
3724 * windows-nat.c (handle_exception): Update fall-through comment.
3725
3726 2018-05-29 Tom Tromey <tom@tromey.com>
3727
3728 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3729 (struct program_space) <added_solibs>: Now a std::vector.
3730 * breakpoint.c (print_solib_event): Update.
3731 (check_status_catch_solib): Update.
3732 * progspace.c (clear_program_space_solib_cache): Update.
3733 * solib.c (update_solib_list): Update.
3734
3735 2018-05-29 Tom Tromey <tom@tromey.com>
3736
3737 * python/py-type.c (typy_richcompare): Update.
3738 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3739 * gdbtypes.h (types_deeply_equal): Return bool.
3740 (types_equal): Likewise.
3741 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3742 declare VEC.
3743 (check_types_equal): Change worklist to std::vector. Return
3744 bool.
3745 (struct type_equality_entry): Add constructor.
3746 (compare_maybe_null_strings): Return bool.
3747 (check_types_worklist): Return bool. Change worklist to
3748 std::vector.
3749 (types_deeply_equal): Use std::vector.
3750 (types_equal): Return bool.
3751 (compare_maybe_null_strings): Simplify.
3752
3753 2018-05-29 Tom Tromey <tom@tromey.com>
3754
3755 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3756
3757 2018-05-29 Tom Tromey <tom@tromey.com>
3758
3759 * objc-lang.h: Don't include cp-support.h.
3760 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3761 declare VEC.
3762
3763 2018-05-27 Tom Tromey <tom@tromey.com>
3764
3765 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3766
3767 2018-05-25 Tom Tromey <tom@tromey.com>
3768
3769 * value.c (value::location): Initialize.
3770
3771 2018-05-25 Tom Tromey <tom@tromey.com>
3772
3773 * dbxread.c (init_bincl_list): Remove.
3774 (bincl_list): Now a std::vector.
3775 (bincls_allocated, next_bincl): Remove.
3776 (free_bincl_list, do_free_bincl_list_cleanup)
3777 (make_cleanup_free_bincl_list): Remove.
3778 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3779 unique_xmalloc_ptr.
3780 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3781 (struct header_file_location): Add constructor.
3782 (add_bincl_to_list): Remove.
3783
3784 2018-05-25 Tom Tromey <tom@tromey.com>
3785
3786 * tui/tui.c (tui_enable): Update.
3787 * mi/mi-interp.c (mi_interp::init): Update.
3788 * interps.h (class interp) <name>: New method.
3789 <m_name>: Rename from name.
3790 (~scoped_restore_interp): Update.
3791 * interps.c (interp::interp): Update.
3792 (interp_add, interp_set, interp_lookup_existing)
3793 (current_interp_named_p): Update.
3794
3795 2018-05-25 Tom Tromey <tom@tromey.com>
3796
3797 * interps.c (interp_name): Remove.
3798 * mi/mi-interp.c (mi_interp::init): Update.
3799 * interps.h (interp_name): Remove.
3800 (~scoped_restore_interp): Update.
3801 * tui/tui.c (tui_enable): Update.
3802
3803 2018-05-25 Tom Tromey <tom@tromey.com>
3804
3805 * utils.c (fputs_maybe_filtered): Update.
3806 * linespec.c (decode_line_full): Update.
3807 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3808 (mi_print_breakpoint_for_event, mi_solib_loaded)
3809 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3810 (mi_user_selected_context_changed): Update.
3811 * mi/mi-main.c (mi_execute_command): Update.
3812 * cli/cli-script.c (execute_control_command): Update.
3813 * python/python.c (execute_gdb_command): Update.
3814 * solib.c (info_sharedlibrary_command): Update.
3815 * interps.c (interp_ui_out): Remove.
3816 * interps.h (interp_ui_out): Remove.
3817
3818 2018-05-25 Tom Tromey <tom@tromey.com>
3819
3820 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3821 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3822 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3823
3824 2018-05-25 Tom Tromey <tom@tromey.com>
3825
3826 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3827 * interps.c (interp_exec): Use scoped_restore.
3828
3829 2018-05-25 Tom Tromey <tom@tromey.com>
3830
3831 * remote.c (remote_target::remote_file_get): Use
3832 gdb::byte_vector.
3833 (remote_target::remote_file_put): Likewise.
3834
3835 2018-05-25 Tom Tromey <tom@tromey.com>
3836
3837 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3838 a std::string.
3839 (get_pe_section_index, add_pe_exported_sym): Update.
3840 (read_pe_exported_syms): Use gdb::def_vector.
3841
3842 2018-05-25 Tom Tromey <tom@tromey.com>
3843
3844 * frame.c (remove_prev_frame): Remove.
3845 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3846
3847 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3848
3849 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3850 Remove prototypes.
3851 * mips-linux-nat.c (supply_fpregset): Always call
3852 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3853 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3854 `mips_fill_fpregset'.
3855 * mips-linux-tdep.c (mips_supply_fpregset)
3856 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3857 (mips_fill_fpregset_wrapper): Remove functions.
3858 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3859 (mips_linux_fpregset): Remove variable.
3860 (mips_linux_iterate_over_regset_sections): Use
3861 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3862 (mips_linux_o32_sigframe_init): Remove comment.
3863
3864 2018-05-25 Pedro Alves <palves@redhat.com>
3865
3866 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3867 (struct readahead_cache, struct packet_reg, struct
3868 remote_arch_state, class remote_state): Move higher up in the
3869 file.
3870 (remote_target::m_remote_state): Now an object instead of a pointer.
3871 (remote_target::get_remote_state): Adjust.
3872
3873 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3874
3875 * stack.c (select_and_print_frame): Delete.
3876 (struct function_bounds): Move struct within function.
3877 (func_command): Most content moved into new function
3878 find_frame_for_function, use new function, print result, add
3879 function comment.
3880 (find_frame_for_function): New function, now returns a result.
3881
3882 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3883
3884 * stack.c (iterate_over_block_arg_vars): Fix comment.
3885 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3886
3887 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3888
3889 PR gdb/23203
3890 * frame.c
3891 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3892 Define.
3893 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3894 Define.
3895 * frame.h (class scoped_restore_selected_frame): New class.
3896 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3897 of any exception, use scoped_restore_selected_frame to restore the
3898 frame instead.
3899
3900 2018-05-24 Pedro Alves <palves@redhat.com>
3901
3902 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3903 override.
3904
3905 2018-05-23 Tom Tromey <tom@tromey.com>
3906
3907 * complaints.c (struct complaints): Remove.
3908 (symfile_complaint_book): Remove.
3909 (series): New global.
3910 (complaint_internal): Update.
3911 (clear_complaints): Update.
3912
3913 2018-05-23 Tom Tromey <tom@tromey.com>
3914
3915 * complaints.c (counters): New global.
3916 (struct complain): Remove.
3917 (struct complaints) <root>: Remove.
3918 (complaint_sentinel): Remove.
3919 (symfile_complaint_book): Update.
3920 (find_complaint) Remove.
3921 (complaint_internal, clear_complaints): Update.
3922
3923 2018-05-23 Tom Tromey <tom@tromey.com>
3924
3925 * complaints.c (struct complain) <file, line>: Remove.
3926 (find_complaint): Remove file, line parameters.
3927 (complaint_internal): Update.
3928
3929 2018-05-23 Tom Tromey <tom@tromey.com>
3930
3931 * complaints.c (vcomplaint): Remove.
3932 (complaint_internal) Merge in contents of vcomplaint.
3933
3934 2018-05-23 Tom Tromey <tom@tromey.com>
3935
3936 * complaints.c (struct complaints) <explanation>: Remove.
3937 (symfile_explanations): Remove.
3938 (symfile_complaint_book): Update.
3939 (vcomplaint): Update.
3940 (struct explanation): Remove.
3941
3942 2018-05-23 Tom Tromey <tom@tromey.com>
3943
3944 * complaints.c (symfile_complaints): Remove.
3945 (complaint_internal): Remove "complaints" parameter.
3946 (clear_complaints, vcomplaint): Remove "c" parameter.
3947 (get_complaints): Remove.
3948 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3949 (dwarf2_debug_line_missing_file_complaint)
3950 (dwarf2_debug_line_missing_end_sequence_complaint)
3951 (dwarf2_complex_location_expr_complaint)
3952 (dwarf2_const_value_length_mismatch_complaint)
3953 (dwarf2_section_buffer_overflow_complaint)
3954 (dwarf2_macro_malformed_definition_complaint)
3955 (dwarf2_invalid_attrib_class_complaint)
3956 (create_addrmap_from_index, dw2_symtab_iter_next)
3957 (dw2_expand_marked_cus)
3958 (dw2_debug_names_iterator::find_vec_in_debug_names)
3959 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3960 (create_debug_type_hash_table, init_cutu_and_read_dies)
3961 (partial_die_parent_scope, add_partial_enumeration)
3962 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3963 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3964 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3965 (create_cus_hash_table, create_dwp_hash_table)
3966 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3967 (dwarf2_rnglists_process, dwarf2_ranges_process)
3968 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3969 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3970 (handle_struct_member_die, process_structure_scope)
3971 (read_array_type, read_common_block, read_module_type)
3972 (read_tag_pointer_type, read_typedef, read_base_type)
3973 (read_subrange_type, load_partial_dies, partial_die_info::read)
3974 (partial_die_info::read, partial_die_info::read)
3975 (partial_die_info::read, read_checked_initial_length_and_offset)
3976 (dwarf2_string_attr, read_formatted_entries)
3977 (dwarf_decode_line_header)
3978 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3979 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3980 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3981 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3982 (get_signatured_type, get_DW_AT_signature_type)
3983 (decode_locdesc, file_file_name, consume_improper_spaces)
3984 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3985 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3986 (dwarf2_symbol_mark_computed, set_die_type)
3987 (read_attribute_value): Update.
3988 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3989 Update.
3990 * dbxread.c (unknown_symtype_complaint)
3991 (lbrac_mismatch_complaint, repeated_header_complaint)
3992 (set_namestring, function_outside_compilation_unit_complaint)
3993 (read_dbx_symtab, process_one_symbol): Update.
3994 * gdbtypes.c (stub_noname_complaint): Update.
3995 * windows-nat.c (handle_unload_dll): Update.
3996 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3997 (decode_base_type): Update.
3998 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3999 (eb_complaint, record_include_begin, record_include_end)
4000 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4001 (process_xcoff_symbol, read_symbol)
4002 (function_outside_compilation_unit_complaint)
4003 (scan_xcoff_symtab): Update.
4004 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4005 * buildsym.c (finish_block_internal, make_blockvector)
4006 (end_symtab_get_static_block, augment_type_symtab): Update.
4007 * dtrace-probe.c (dtrace_process_dof)
4008 (dtrace_static_probe_ops::get_probes): Update.
4009 * complaints.h (struct complaint): Don't declare.
4010 (symfile_complaints): Remove.
4011 (complaint_internal): Remove "complaints" parameter.
4012 (complaint): Likewise.
4013 (clear_complaints): Likewise.
4014 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4015 (reread_symbols): Update.
4016 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4017 (dwarf2_frame_cache, decode_frame_entry): Update.
4018 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4019 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4020 (info_selectors_command): Update.
4021 * macrotab.c (macro_include, check_for_redefinition)
4022 (macro_undef): Update.
4023 * objfiles.c (filter_overlapping_sections): Update.
4024 * stabsread.c (invalid_cpp_abbrev_complaint)
4025 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4026 (define_symbol, error_type, read_type, rs6000_builtin_type)
4027 (stabs_method_name_from_physname, read_member_functions)
4028 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4029 (attach_fields_to_type, complain_about_struct_wipeout)
4030 (read_range_type, read_args, common_block_start)
4031 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4032 Update.
4033 * mdebugread.c (index_complaint, unknown_ext_complaint)
4034 (basic_type_complaint, bad_tag_guess_complaint)
4035 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4036 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4037 (parse_procedure, parse_lines)
4038 (function_outside_compilation_unit_complaint)
4039 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4040 (bad_tag_guess_complaint, reg_value_complaint): Update.
4041 * cp-support.c (demangled_name_complaint): Update.
4042 * macroscope.c (sal_macro_scope): Update.
4043 * dwarf-index-write.c (class debug_names): Update.
4044
4045 2018-05-23 Tom Tromey <tom@tromey.com>
4046
4047 * complaints.c (clear_complaints): Remove "noisy" parameter.
4048 * complaints.h (clear_complaints): Update.
4049 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4050 (reread_symbols): Update.
4051
4052 2018-05-23 Tom Tromey <tom@tromey.com>
4053
4054 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4055 SUBSEQUENT_MESSAGE.
4056 (vcomplaint, clear_complaints): Update.
4057 (symfile_explanations): Remove some messages.
4058
4059 2018-05-23 Tom Tromey <tom@tromey.com>
4060
4061 * complaints.c (internal_complaint): Remove.
4062 * complaints.h (internal_complaint): Remove.
4063
4064 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4065
4066 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4067
4068 2018-05-22 Pedro Alves <palves@redhat.com>
4069
4070 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4071 (remote_fileio_badfd, remote_fileio_return_errno)
4072 (remote_fileio_return_success, remote_fileio_func_open)
4073 (remote_fileio_func_open, remote_fileio_func_close)
4074 (remote_fileio_func_read, remote_fileio_func_write)
4075 (remote_fileio_func_lseek, remote_fileio_func_rename)
4076 (remote_fileio_func_unlink, remote_fileio_func_stat)
4077 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4078 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4079 remote_target parameter.
4080 (remote_fio_func_map) <func>: Add remote_target parameter.
4081 (do_remote_fileio_request, remote_fileio_request):
4082 * remote-fileio.h (remote_fileio_request):
4083 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4084 remote_target parameter.
4085 (remote_notif_process, handle_notification): Adjust to pass down
4086 the remote.
4087 (remote_notif_state_allocate): Add remote_target parameter. Save
4088 it.
4089 * remote-notif.h (struct remote_target): Forward declare.
4090 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4091 remote_target parameter.
4092 (struct remote_notif_state) <remote>: New field.
4093 (remote_notif_ack, remote_notif_parse): Add remote_target
4094 parameter.
4095 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4096 remote_target parameter.
4097 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4098 (threads_listing_context, rmt_thread_action, protocol_feature)
4099 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4100 (packet_result, struct threads_listing_context, remote_state):
4101 Move definitions and declarations higher up.
4102 (remote_target) <~remote_target>: Declare.
4103 (remote_download_command_source, remote_file_put, remote_file_get)
4104 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4105 (remote_hostio_pread_vFile, remote_hostio_send_command)
4106 (remote_hostio_set_filesystem, remote_hostio_open)
4107 (remote_hostio_close, remote_hostio_unlink, remote_state)
4108 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4109 (get_memory_write_packet_size, get_memory_read_packet_size)
4110 (append_pending_thread_resumptions, remote_detach_1)
4111 (append_resumption, remote_resume_with_vcont)
4112 (add_current_inferior_and_thread, wait_ns, wait_as)
4113 (process_stop_reply, remote_notice_new_inferior)
4114 (process_initial_stop_replies, remote_add_thread)
4115 (btrace_sync_conf, remote_btrace_maybe_reopen)
4116 (remove_new_fork_children, kill_new_fork_children)
4117 (discard_pending_stop_replies, stop_reply_queue_length)
4118 (check_pending_events_prevent_wildcard_vcont)
4119 (discard_pending_stop_replies_in_queue, stop_reply)
4120 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4121 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4122 (remote_interrupt_as, remote_interrupt_ns)
4123 (remote_get_noisy_reply, remote_query_attached)
4124 (remote_add_inferior, remote_current_thread, get_current_thread)
4125 (set_thread, set_general_thread, set_continue_thread)
4126 (set_general_process, write_ptid)
4127 (remote_unpack_thread_info_response, remote_get_threadinfo)
4128 (parse_threadlist_response, remote_get_threadlist)
4129 (remote_threadlist_iterator, remote_get_threads_with_ql)
4130 (remote_get_threads_with_qxfer)
4131 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4132 (get_offsets, remote_check_symbols, remote_supported_packet)
4133 (remote_query_supported, remote_packet_size)
4134 (remote_serial_quit_handler, remote_detach_pid)
4135 (remote_vcont_probe, remote_resume_with_hc)
4136 (send_interrupt_sequence, interrupt_query)
4137 (remote_notif_get_pending_events, fetch_register_using_p)
4138 (send_g_packet, process_g_packet, fetch_registers_using_g)
4139 (store_register_using_P, store_registers_using_G)
4140 (set_remote_traceframe, check_binary_download)
4141 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4142 (remote_xfer_live_readonly_partial, remote_read_bytes)
4143 (remote_send_printf, remote_flash_write, readchar)
4144 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4145 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4146 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4147 (extended_remote_disable_randomization, extended_remote_run)
4148 (send_environment_packet, extended_remote_environment_support)
4149 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4150 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4151 (packet_command): Now methods of ...
4152 (remote_target): ... this class.
4153 (m_remote_state) <remote_target>: New field.
4154 (struct remote_state) <stop_reply_queue,
4155 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4156 fields.
4157 (remote_state::remote_state): Allocate stop_reply_queue.
4158 (remote_state): Delete global.
4159 (get_remote_state_raw): Delete.
4160 (remote_target::get_remote_state): Allocate m_remote_state on
4161 demand.
4162 (get_current_remote_target): New.
4163 (remote_ops, extended_remote_ops): Delete.
4164 (wait_forever_enabled_p, remote_async_inferior_event_token):
4165 Delete, moved to struct remote_state.
4166 (remote_target::close): Delete self. Destruction bits split to
4167 ...
4168 (remote_target::~remote_target): ... this.
4169 (show_memory_packet_size): Adjust to use
4170 get_current_remote_target.
4171 (struct protocol_feature) <func>: Add remote_target parameter.
4172 All callers adjusted.
4173 (curr_quit_handler_target): New.
4174 (remote_serial_quit_handler): Reimplement.
4175 (remote_target::open_1): Adjust to use get_current_remote_target.
4176 Heap-allocate remote_target/extended_remote_target instances.
4177 (vcont_builder::vcont_builder): Add remote_target parameter, and
4178 save it in m_remote. All callers adjusted.
4179 (vcont_builder::m_remote): New field.
4180 (vcont_builder::restart, vcont_builder::flush)
4181 (vcont_builder::push_action): Use it.
4182 (remote_target::commit_resume): Use it.
4183 (struct queue_iter_param) <remote>: New field.
4184 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4185 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4186 (check_pending_event_prevents_wildcard_vcont_callback)
4187 (remote_target::check_pending_events_prevent_wildcard_vcont)
4188 (remote_target::discard_pending_stop_replies)
4189 (remote_target::discard_pending_stop_replies_in_queue)
4190 (remote_target::remote_notif_remove_queued_reply): Fill in
4191 'remote' field.
4192 (remote_notif_get_pending_events): New.
4193 (remote_target::readchar, remote_target::remote_serial_write):
4194 Save/restore curr_quit_handler_target.
4195 (putpkt): New.
4196 (kill_new_fork_children): Fill in 'remote' field.
4197 (packet_command): Use get_current_remote_target, defer to
4198 remote_target method of same name.
4199 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4200 parameter, and save it in m_remote. All callers adjusted.
4201 (scoped_remote_fd::release): Use m_remote.
4202 (scoped_remote_fd::m_remote): New field.
4203 (remote_file_put, remote_file_get, remote_file_delete): Use
4204 get_current_remote_target, defer to remote_target method of same
4205 name.
4206 (remote_btrace_reset): Add remote_state paremeter. Update all
4207 callers.
4208 (remote_async_inferior_event_handler). Pass down 'data'.
4209 (remote_new_objfile): Use get_current_remote_target.
4210 (remote_target::vcont_r_supported): New.
4211 (set_range_stepping): Use get_current_remote_target and
4212 remote_target::vcont_r_supported.
4213 (_initialize_remote): Don't allocate 'remote_state' and
4214 'stop_reply_queue' globals.
4215 * remote.h (struct remote_target): Forward declare.
4216 (getpkt, putpkt, remote_notif_get_pending_events): Add
4217 'remote_target' parameter.
4218
4219 2018-05-22 Pedro Alves <palves@redhat.com>
4220
4221 * remote.c (vcont_builder): Now a class. Make all data members
4222 private.
4223 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4224 Declare methods.
4225 (vcont_builder_restart): Rename to ...
4226 (vcont_builder::restart): ... this.
4227 (vcont_builder_flush): Rename to ...
4228 (vcont_builder::flush): ... this.
4229 (vcont_builder_push_action): Rename to ...
4230 (vcont_builder::push_action): ... this.
4231 (remote_target::commit_resume): Adjust.
4232
4233 2018-05-22 Pedro Alves <palves@redhat.com>
4234
4235 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4236 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4237 (get_fixed_memory_packet_size): New.
4238 (get_memory_packet_size): Use it.
4239 (set_memory_packet_size): Don't override the config size with
4240 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4241 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4242 Don't refer to get_memory_packet_size if not connected to a remote
4243 target. Show "(default)" if configured size is 0.
4244
4245 2018-05-22 Pedro Alves <palves@redhat.com>
4246
4247 * remote.c (remote_target::mourn_inferior): Move
4248 discard_pending_stop_replies call here from ...
4249 (_initialize_remote): ... here.
4250
4251 2018-05-22 Pedro Alves <palves@redhat.com>
4252
4253 * remote.c (compare_section_command): Remove set_general_process
4254 call.
4255
4256 2018-05-22 Pedro Alves <palves@redhat.com>
4257
4258 * remote.c (struct packet_reg, struct remote_arch_state):
4259 Move higher up in the file.
4260 (remote_state) <m_arch_states>: Store remote_arch_state values
4261 instead of remote_arch_state pointers.
4262 (remote_state::get_remote_arch_state): Adjust.
4263
4264 2018-05-22 Pedro Alves <palves@redhat.com>
4265
4266 * remote.c: Include <unordered_map>.
4267 (remote_state): Now a class.
4268 (remote_state) <get_remote_arch_state>: Declare method.
4269 <get_remote_arch_state>: New field.
4270 (remote_arch_state) <remote_arch_state>: Declare ctor.
4271 <regs>: Now a unique_ptr.
4272 (remote_gdbarch_data_handle): Delete.
4273 (get_remote_arch_state): Delete.
4274 (remote_state::get_remote_arch_state): New.
4275 (get_remote_state): Adjust to call remote_state's
4276 get_remote_arch_state method.
4277 (init_remote_state): Delete, bits factored out to ...
4278 (remote_arch_state::remote_arch_state): ... this new method.
4279 (get_remote_packet_size, get_memory_packet_size)
4280 (process_g_packet, remote_target::fetch_registers)
4281 (remote_target::prepare_to_store, store_registers_using_G)
4282 (remote_target::store_registers, remote_target::get_trace_status):
4283 Adjust to call remote_state's method.
4284 (_initialize_remote): Remove reference to
4285 remote_gdbarch_data_handle.
4286
4287 2018-05-22 Pedro Alves <palves@redhat.com>
4288
4289 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4290 pread>: New method declarations.
4291 (remote_target::open_1): Adjust.
4292 (readahead_cache_invalidate): Rename to ...
4293 (readahead_cache::invalidate): ... this, and adjust to be a class
4294 method.
4295 (readahead_cache_invalidate_fd): Rename to ...
4296 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4297 class method.
4298 (remote_hostio_pwrite): Adjust.
4299 (remote_hostio_pread_from_cache): Rename to ...
4300 (readahead_cache::pread): ... this, and adjust to be a class
4301 method.
4302 (remote_hostio_close): Adjust.
4303
4304 2018-05-22 Pedro Alves <palves@redhat.com>
4305
4306 * remote.c (remote_hostio_close_cleanup): Delete.
4307 (class scoped_remote_fd): New.
4308 (remote_file_put, remote_file_get): Use it.
4309
4310 2018-05-22 Pedro Alves <palves@redhat.com>
4311
4312 (struct vCont_action_support): Use bool and initialize all fields.
4313 (struct readahead_cache): Initialize all fields.
4314 (remote_state): Use bool and initialize all fields.
4315 (remote_state::remote_state, remote_state::~remote_state): New.
4316 (new_remote_state): Delete.
4317 (_initialize_remote): Use new to allocate remote_state.
4318
4319 2018-05-22 Pedro Alves <palves@redhat.com>
4320 張俊芝 <zjz@zjz.name>
4321
4322 PR gdb/22973
4323 * c-exp.y: Include "c-support.h".
4324 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4325 of tolower. Use c_ident_is_alpha to scan names.
4326 * c-lang.c: Include "c-support.h".
4327 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4328 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4329 * c-support.h: New file, with bits factored out from ...
4330 * cp-name-parser.y: ... this file.
4331 Include "c-support.h".
4332 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4333 c-support.h and renamed.
4334 (symbol_end, yylex): Adjust.
4335
4336 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4337
4338 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4339 parameter type to CORE_ADDR.
4340 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4341 parameter type in declaration to CORE_ADDR.
4342 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4343 target_auxv_search to get AT_HWCAP and use the result to get the
4344 target description.
4345 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4346 to CORE_ADDR. Remove the cast of the return value to unsigned
4347 long. Fix error predicate of target_auxv_search.
4348 (ppc_linux_nat_target::read_description): Change the type of the
4349 hwcap variable to CORE_ADDR.
4350
4351 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4352
4353 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4354 if the size of fpscr is larger than 32 bits.
4355
4356 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4357
4358 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4359 (ppc32_linux_vsxregmap): New global.
4360 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4361 regcache_supply_regset, and regcache_collect_regset.
4362 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4363 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4364 (fetch_vsx_register, store_vsx_register): Remove.
4365 (fetch_vsx_registers): Add regno parameter. Get regset using
4366 ppc_linux_vsxregset. Use regset to supply registers.
4367 (store_vsx_registers): Add regno parameter. Get regset using
4368 ppc_linux_vsxregset. Use regset to collect registers.
4369 (fetch_register): Call fetch_vsx_registers instead of
4370 fetch_vsx_register.
4371 (store_register): Call store_vsx_registers instead of
4372 store_vsx_register.
4373 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4374 new regno parameter.
4375 (store_ppc_registers): Call store_vsx_registers with -1 for the
4376 new regno parameter.
4377 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4378 (ppc_collect_vsxregset): Remove.
4379
4380 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4381
4382 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4383 offset fields.
4384 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4385 for vector register offset fields.
4386 (ppc64_fbsd_reg_offsets): Likewise.
4387 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4388 to vector register offset fields.
4389 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4390 to vector register offset fields.
4391 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4392 vector register offset fields.
4393 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4394 initializers for vector register offset fields.
4395 (rs6000_aix64_reg_offsets): Likewise.
4396 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4397 (ppc_supply_vrregset): Remove.
4398 (ppc_collect_vrregset): Remove.
4399 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4400 (ppc_linux_vrregset) : New function.
4401 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4402 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4403 (ppc32_linux_vrregset): Remove.
4404 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4405 and use result instead of ppc32_linux_vrregset.
4406 (ppc32_linux_reg_offsets): Remove initializers for vector register
4407 offset fields.
4408 (ppc64_linux_reg_offsets): Likewise.
4409 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4410 * ppc-linux-nat.c: Include regset.h.
4411 (gdb_vrregset_t): Adjust comment to account for little-endian
4412 mode.
4413 (supply_vrregset, fill_vrregset): Remove.
4414 (fetch_altivec_register, store_altivec_register): Remove.
4415 (fetch_altivec_registers): Add regno parameter. Get regset using
4416 ppc_linux_vrregset. Use regset to supply registers.
4417 (store_altivec_registers): Add regno parameter. Get regset using
4418 ppc_linux_vrregset. Use regset to collect registers.
4419 (fetch_register): Call fetch_altivec_registers instead of
4420 fetch_altivec_register.
4421 (store_register): Call store_altivec_registers instead of
4422 store_altivec_register.
4423 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4424 the new regno parameter.
4425 (store_ppc_registers): Call store_altivec_registers with -1 for
4426 the new regno parameter.
4427
4428 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4429
4430 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4431 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4432 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4433 (gdb_vrregset_t): Change array type size to
4434 PPC_LINUX_SIZEOF_VRREGSET.
4435 (gdb_vsxregset_t): Change array type size to
4436 PPC_LINUX_SIZEOF_VSXREGSET.
4437 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4438 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4439 PPC_LINUX_SIZEOF_VSXREGSET.
4440
4441 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4442
4443 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4444 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4445 nat/ppc-linux.c.
4446 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4447 ppc_linux_target_wordsize with tid.
4448 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4449 wordsize with tid.
4450 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4451 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4452 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4453 tid parameter. Remove static specifier.
4454 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4455 (ppc_linux_target_wordsize): New declaration.
4456
4457 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4458
4459 * arch/ppc-linux-common.c: New file.
4460 * arch/ppc-linux-common.h: New file.
4461 * arch/ppc-linux-tdesc.h: New file.
4462 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4463 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4464 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4465 arch/ppc-linux-tdesc.h.
4466 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4467 arch/ppc-linux-tdesc.h.
4468 (ppc_linux_nat_target::read_description): Remove target
4469 description matching code. Fill a ppc_linux_features struct and
4470 call ppc_linux_match_description with it. Move comment about ISA
4471 2.05 to ppc-linux-common.c.
4472 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4473 arch/ppc-linux-tdesc.h.
4474 (ppc_linux_core_read_description): Remove target description
4475 matching code. Fill a ppc_linux_features struct and call
4476 ppc_linux_match_description with it.
4477 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4478 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4479 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4480 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4481 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4482 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4483 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4484 (tdesc_powerpc_e500l): Remove.
4485
4486 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4487
4488 * ada-lang.c (catch_assert_command): Pass empty string instead
4489 of NULL for excep_string argument.
4490
4491 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4492
4493 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4494 the width of the requested register exceeds the width of the
4495 `ptrace' data type.
4496
4497 2018-05-21 Tom Tromey <tom@tromey.com>
4498
4499 * printcmd.c (output_command): Remove.
4500 (output_command_const): Rename to output_command.
4501 * valprint.h (output_command): Rename from output_command_const.
4502 * tracepoint.c (trace_dump_actions): Call output_command.
4503
4504 2018-05-21 Tom Tromey <tom@tromey.com>
4505
4506 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4507 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4508 * ada-lang.h (create_ada_exception_catchpoint): Update.
4509 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4510 std::string.
4511 (create_excep_cond_exprs, ~ada_catchpoint)
4512 (should_stop_exception, print_one_exception)
4513 (print_mention_exception, print_recreate_exception): Update.
4514 (ada_get_next_arg): Remove.
4515 (catch_ada_exception_command_split): Use std::string. Change type
4516 of "excep_string", "cond_string".
4517 (catch_ada_exception_command): Update.
4518 (create_ada_exception_catchpoint): Change type of excep_string.
4519 (ada_exception_sal): Remove excep_string parameter.
4520 (~ada_catchpoint): Remove.
4521
4522 2018-05-21 Tom Tromey <tom@tromey.com>
4523
4524 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4525 cleanup.
4526
4527 2018-05-21 Tom Tromey <tom@tromey.com>
4528
4529 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4530 Return unique_xmalloc_ptr.
4531 (print_it_exception): Update.
4532
4533 2018-05-21 Tom Tromey <tom@tromey.com>
4534
4535 * tracepoint.c (trace_dump_actions): Use std::string.
4536
4537 2018-05-21 Tom Tromey <tom@tromey.com>
4538
4539 * symfile.c (reread_symbols): Use std::string for original_name.
4540
4541 2018-05-21 Tom Tromey <tom@tromey.com>
4542
4543 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4544 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4545 constructor.
4546
4547 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4548
4549 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4550 instance to...
4551 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4552 * objfiles.c (get_objfile_bfd_data): Allocate
4553 objfile_per_bfd_storage with obstack_new when allocating on
4554 obstack.
4555
4556 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4557
4558 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4559 OBSTACK_ZALLOC.
4560 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4561 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4562 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4563 (add_pending): Likewise.
4564 (parse_symbol): Likewise.
4565 (parse_partial_symbols): Likewise.
4566 (psymtab_to_symtab_1): Likewise.
4567 (new_psymtab): Likewise.
4568 (elfmdebug_build_psymtabs): Likewise.
4569 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4570 * objfiles.c (get_objfile_bfd_data): Likewise.
4571 (objfile_register_static_link): Likewise.
4572 * psymtab.c (allocate_psymtab): Likewise.
4573 * stabsread.c (read_member_functions): Likewise.
4574 * xcoffread.c (xcoff_end_psymtab): Likewise.
4575
4576 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4577
4578 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4579 compiler supports std::is_trivially_constructible.
4580 * common/poison.h: Include obstack.h.
4581 (IsMallocable): Define to is_trivially_constructible if the
4582 compiler supports it, define to true_type otherwise.
4583 (xobnew): New.
4584 (XOBNEW): Redefine.
4585 (xobnewvec): New.
4586 (XOBNEWVEC): Redefine.
4587 * gdb_obstack.h (obstack_zalloc): New.
4588 (OBSTACK_ZALLOC): Redefine.
4589 (obstack_calloc): New.
4590 (OBSTACK_CALLOC): Redefine.
4591 (obstack_new): New.
4592 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4593 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4594 gdbarch.c.
4595 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4596 obstack_calloc/obstack_zalloc.
4597 (gdbarch_obstack_zalloc): Remove.
4598 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4599
4600 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4601
4602 * stack.c (backtrace_command_1): Remove useless variable int i.
4603
4604 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4605
4606 * stack.c (print_frame_info): Fix comment.
4607
4608 2018-05-18 Tom Tromey <tom@tromey.com>
4609
4610 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4611 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4612 (~dwarf2_per_objfile): Update
4613 (dwarf2_get_dwz_file): Use new.
4614 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4615 unique_ptr.
4616
4617 2018-05-18 Tom Tromey <tom@tromey.com>
4618
4619 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4620 unique_ptr.
4621 * dwarf2read.c (struct dwp_file): Add constructor and
4622 initializers.
4623 (open_and_init_dwp_file): Return a unique_ptr.
4624 (dwarf2_per_objfile, create_dwp_hash_table)
4625 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4626 (lookup_dwo_unit_in_dwp): Update.
4627 (open_and_init_dwp_file, get_dwp_file): Update.
4628
4629 2018-05-18 Tom Tromey <tom@tromey.com>
4630
4631 * dwarf2read.c (dwarf2_per_objfile): Update.
4632 (struct mapped_index): Add initializers.
4633 (dwarf2_read_index): Use new.
4634 (dw2_symtab_iter_init): Update.
4635 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4636 unique_ptr.
4637
4638 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4639
4640 * dwarf2read.c (mapped_index) <total_size>: Remove.
4641
4642 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4643
4644 * unittests/format_pieces-selftests.c (test_format_specifier):
4645 Add ARI comments.
4646
4647 2018-05-18 Tom Tromey <tom@tromey.com>
4648
4649 * c-typeprint.c (maybe_print_hole): New function.
4650 (c_print_type_struct_field_offset): Update.
4651 (c_type_print_base_struct_union): Call maybe_print_hole.
4652
4653 2018-05-17 Keith Seitz <keiths@redhat.com>
4654
4655 * breakpoint.c (build_bpstat_chain): New function, moved from
4656 bpstat_stop_status.
4657 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4658 If no stop chain is passed, call build_bpstat_chain to build it.
4659 * breakpoint.h (build_bpstat_chain): Declare.
4660 (bpstat_stop_status): Move documentation here from breakpoint.c.
4661 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4662 build the stop chain and pass it to skip_inline_frames.
4663 Pass this stop chain to bpstat_stop_status.
4664 * inline-frame.c: Include breakpoint.h.
4665 (stopped_by_user_bp_inline_frame): New function.
4666 (skip_inline_frames): Add parameter `stop_chain'.
4667 Move documention to inline-frame.h.
4668 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4669 whether the frame should be elided.
4670 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4671 Add moved documentation and update for new parameter.
4672
4673 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4674
4675 PR cli/14975
4676 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4677 unittests/format_pieces-selftests.c.
4678 * common/format.h (format_piece) <operator==>: New.
4679 (format_pieces) <operator[]>: Remove.
4680 * common/format.c (format_pieces::format_pieces): Handle \e.
4681 * unittests/format_pieces-selftests.c: New.
4682
4683 2018-05-17 Tom Tromey <tom@tromey.com>
4684
4685 PR symtab/23010:
4686 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4687 (dw2_instantiate_symtab): Add skip_partial parameter.
4688 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4689 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4690 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4691 (dw2_expand_symtabs_matching_one)
4692 (dw2_find_pc_sect_compunit_symtab)
4693 (dw2_debug_names_lookup_symbol)
4694 (dw2_debug_names_expand_symtabs_for_function): Update.
4695 (init_cutu_and_read_dies): Add skip_partial parameter.
4696 (process_psymtab_comp_unit, build_type_psymtabs_1)
4697 (process_skeletonless_type_unit, load_partial_comp_unit)
4698 (psymtab_to_symtab_1): Update.
4699 (load_full_comp_unit): Add skip_partial parameter.
4700 (process_imported_unit_die, dwarf2_read_addr_index)
4701 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4702 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4703 (read_signatured_type): Update.
4704
4705 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4706
4707 * value.c (release_value): Remove unused variable.
4708 (record_latest_value): Likewise.
4709 (access_value_history): Likewise.
4710 (preserve_values): Likewise.
4711
4712 2018-05-17 Tom Tromey <tom@tromey.com>
4713
4714 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4715 Initialize.
4716
4717 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4718
4719 PR gdb/22286
4720 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4721 Also handle registers whose width is not a multiple of
4722 PTRACE_TYPE_RET.
4723 (linux_nat_trad_target::store_register): Likewise.
4724
4725 2018-05-16 Tom Tromey <tom@tromey.com>
4726
4727 * gdbcore.h (core_bfd): Redefine.
4728 * corelow.c (core_target::close): Update.
4729 (core_target_open): Update.
4730 * progspace.h (struct program_space) <cbfd>: Now a
4731 gdb_bfd_ref_ptr.
4732
4733 2018-05-16 Tom Tromey <tom@tromey.com>
4734
4735 PR cli/19551:
4736 * symfile-add-flags.h (enum symfile_add_flags)
4737 <SYMFILE_NOT_FILENAME>: New constant.
4738 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4739 objfile name from BFD.
4740 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4741 * minidebug.c (find_separate_debug_file_in_section): Put
4742 ".gnu_debugdata" into BFD's file name.
4743
4744 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4745
4746 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4747 Remove.
4748
4749 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4750
4751 PR binutils/21446
4752 * aarch64-tdep.c (aarch64_analyze_prologue,
4753 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4754 Indicate not interested in errors.
4755
4756 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4757
4758 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4759 Supply the MIPS_ZERO_REGNUM register.
4760
4761 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4762
4763 * mips-tdep.c (mask_address_var): Make variable static.
4764
4765 2018-05-14 Tom Tromey <tom@tromey.com>
4766
4767 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4768
4769 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4770
4771 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4772 FXSAVE_ADDR for the mxcsr register.
4773
4774 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4775
4776 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4777
4778 2018-05-11 Pedro Alves <palves@redhat.com>
4779
4780 * corelow.c (core_target) <core_target>: No longer inline.
4781 Initialize m_core_gdbarch, m_core_vec and build the section table
4782 here.
4783 <~core_target>: New.
4784 <core_gdbarch, get_core_register_section>: New methods.
4785 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4786 factored out from ...
4787 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4788 (core_ops): Delete.
4789 (sniff_core_bfd): Add gdbarch parameter.
4790 (core_close): Delete, merged into ...
4791 (core_target::close): ... here. Delete self.
4792 (core_close_cleanup): Delete.
4793 (core_target_open): Allocate a core_target on the heap. Use a
4794 unique_ptr instead of a cleanup. Bits moved into the core_target
4795 ctor. Adjust to use core_target methods instead of globals.
4796 (get_core_register_section): Rename to ...
4797 (core_target::get_core_register_section): ... this and adjust.
4798 (struct get_core_registers_cb_data): New.
4799 (get_core_registers_cb): Use it. Use bool.
4800 (core_target::fetch_registers, core_target::files_info)
4801 (core_target::xfer_partial, core_target::read_description)
4802 (core_target::pid_to, core_target::thread_name): Adjust to
4803 reference class fields instead of globals.
4804 * target.h (struct target_ops_deleter, target_ops_up): New.
4805
4806 2018-05-11 Pedro Alves <palves@redhat.com>
4807
4808 * corefile.c (core_file_command): Move to corelow.c.
4809 * corelow.c (the_core_target): Delete.
4810 (core_file_command): Moved from corefile.c. Check exec_bfd
4811 instead of the_core_target. Use target_detach instead of calling
4812 into the_core_target directly.
4813 (maybe_say_no_core_file_now): New.
4814 (core_target::detach): Use it.
4815 (_initialize_corelow): Remove references to the_core_target.
4816 * gdbcore.h (the_core_target): Delete.
4817
4818 2018-05-11 Tom Tromey <tromey@redhat.com>
4819 Pedro Alves <palves@redhat.com>
4820
4821 * corefile.c (core_bfd): Remove.
4822 * gdbcore.h (core_bfd): Now a macro.
4823 * progspace.h (struct program_space) <cbfd>: New field.
4824
4825 2018-05-11 Tom Tromey <tom@tromey.com>
4826
4827 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4828 gdb::def_vector.
4829
4830 2018-05-10 Tom Tromey <tom@tromey.com>
4831
4832 * configure: Rebuild.
4833 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4834
4835 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4836
4837 PR server/23158:
4838 * regformats/regdat.sh: Adjust script, following the addition
4839 of the new expedite_regs parameter to init_target_desc.
4840
4841 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4842
4843 PR gdb/23127
4844 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4845 set_gdbarch_significant_addr_bit.
4846 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4847 set_gdbarch_significant_addr_bit.
4848 * utils.c (address_significant): Update to sign extend addr.
4849
4850 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4851
4852 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4853 (xtensa_linux_init_abi): Limit tdep->num_regs by
4854 tdep->num_nopriv_regs.
4855 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4856 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4857 not initialized.
4858
4859 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4860
4861 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4862
4863 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4864
4865 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4866 (I387_MXCSR_INIT_VAL): New constant.
4867 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4868 buffer if it was supplied by the inferior.
4869 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4870 (i387_xsave_get_clear_bv): New function.
4871 (i387_supply_xsave): Only read x87 control registers from the
4872 xsave buffer if the feature is enabled, and the state will have
4873 been written, otherwise, provide a suitable default.
4874 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4875 including x87 control registers. Update control registers if they
4876 have changed from the default value, and mark features as enabled
4877 as required.
4878 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4879
4880 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4881
4882 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4883
4884 2018-05-07 Tom Tromey <tom@tromey.com>
4885
4886 * configure: Rebuild.
4887 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4888
4889 2018-05-07 Tom Tromey <tom@tromey.com>
4890
4891 PR tdep/20362:
4892 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4893 bit. Use correct value for VDIV.
4894
4895 2018-05-04 Tom Tromey <tom@tromey.com>
4896
4897 * configure: Rebuild.
4898 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4899
4900 2018-05-04 Tom Tromey <tom@tromey.com>
4901
4902 * linux-record.c (record_linux_system_call) <case
4903 RECORD_SYS_RECVFROM>: Add "break".
4904
4905 2018-05-04 Tom Tromey <tom@tromey.com>
4906
4907 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4908 Add missing "break".
4909 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4910 Add missing "break".
4911
4912 2018-05-04 Tom Tromey <tom@tromey.com>
4913
4914 * rs6000-tdep.c (ppc_process_record_op4)
4915 (ppc_process_record_op63): Add fall-through comment.
4916
4917 2018-05-04 Tom Tromey <tom@tromey.com>
4918
4919 * i386-tdep.c (i386_process_record): Add fall-through comment.
4920
4921 2018-05-04 Tom Tromey <tom@tromey.com>
4922
4923 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4924 comment.
4925
4926 2018-05-04 Tom Tromey <tom@tromey.com>
4927
4928 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4929 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4930 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4931 comment.
4932 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4933 comment.
4934 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4935 comment.
4936
4937 2018-05-04 Tom Tromey <tom@tromey.com>
4938
4939 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4940
4941 2018-05-04 Tom Tromey <tom@tromey.com>
4942
4943 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4944 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4945 * symfile.c (section_is_mapped): Fix fall-through comment.
4946 * stabsread.c (define_symbol, read_member_functions): Fix
4947 fall-through comment.
4948 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4949 comment.
4950 * remote.c (remote_wait_as): Fix fall-through comment.
4951 * p-exp.y (yylex): Fix fall-through comment.
4952 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4953 comment.
4954 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4955 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4956 * jv-exp.y (yylex): Fix fall-through comment.
4957 * go-exp.y (lex_one_token): Fix fall-through comment.
4958 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4959 fall-through comment.
4960 * f-exp.y (yylex): Fix fall-through comment.
4961 * dwarf2read.c (process_die): Fix fall-through comments.
4962 * dbxread.c (process_one_symbol): Fix fall-through comment.
4963 * d-exp.y (lex_one_token): Fix fall-through comment.
4964 * cp-name-parser.y (yylex): Fix fall-through comment.
4965 * coffread.c (coff_symtab_read): Fix fall-through comment.
4966 * c-exp.y (lex_one_token): Fix fall-through comment.
4967 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4968 comment.
4969 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4970 comment.
4971
4972 2018-05-04 Tom Tromey <tom@tromey.com>
4973
4974 PR python/22730:
4975 * NEWS: Mention gdb.execute change.
4976 * gdbcmd.h (execute_control_command): Don't declare.
4977 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4978 execute_control_commands, execute_control_commands_to_string.
4979 * cli/cli-script.h (execute_control_commands)
4980 (execute_control_commands_to_string): Declare.
4981 (execute_control_command): Add from_tty parameter.
4982 * cli/cli-script.c (execute_control_commands)
4983 (execute_control_commands_to_string): New functions.
4984 (execute_user_command): Use execute_control_commands.
4985 (execute_control_command_1): Add "from_tty" parameter. Update.
4986 (execute_control_command): Likewise.
4987
4988 2018-05-04 Tom Tromey <tom@tromey.com>
4989
4990 PR python/22731:
4991 * NEWS: Mention that breakpoint commands are writable.
4992 * python/py-breakpoint.c (bppy_set_commands): New function.
4993 (breakpoint_object_getset) <"commands">: Use it.
4994
4995 2018-05-04 Tom Tromey <tom@tromey.com>
4996
4997 * tracepoint.c (actions_command): Update.
4998 * mi/mi-cmd-break.c (mi_command_line_array)
4999 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5000 (mi_read_next_line): Remove.
5001 (mi_cmd_break_commands): Update.
5002 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5003 function_view.
5004 * cli/cli-script.c (get_command_line): Update.
5005 (process_next_line): Use function_view. Constify.
5006 (recurse_read_control_structure, read_command_lines)
5007 (read_command_lines_1): Change argument types to function_view.
5008 (do_define_command, document_command): Update.
5009 * breakpoint.h (check_tracepoint_command): Don't declare.
5010 * breakpoint.c (check_tracepoint_command): Remove.
5011 (commands_command_1, create_tracepoint_from_upload): Update.
5012
5013 2018-05-04 Tom Tromey <tom@tromey.com>
5014
5015 PR gdb/11750:
5016 * cli/cli-script.h (enum command_control_type) <define_control>:
5017 New constant.
5018 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5019 (build_command_line, execute_control_command_1)
5020 (process_next_line): Likewise.
5021 (do_define_command): New function, extracted from define_command.
5022 (define_command): Use it.
5023
5024 2018-05-04 Tom Tromey <tom@tromey.com>
5025
5026 * tracepoint.c (actions_command): Update.
5027 * cli/cli-script.h (read_command_lines): Update.
5028 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5029 (MAX_TMPBUF): Remove define.
5030 (define_command): Use string_printf.
5031 (document_command): Likewise.
5032 * breakpoint.c (commands_command_1): Update.
5033
5034 2018-05-04 Tom Tromey <tom@tromey.com>
5035
5036 * top.c (execute_command): Update.
5037 * cli/cli-script.h (print_command_lines): Now varargs.
5038 * cli/cli-script.c (print_command_lines): Now varargs.
5039 (execute_control_command_1) <case while_control, case if_control>:
5040 Update.
5041
5042 2018-05-04 Tom Tromey <tom@tromey.com>
5043
5044 * tracepoint.c (all_tracepoint_actions): Rename from
5045 all_tracepoint_actions_and_cleanup. Change return type.
5046 (actions_command, encode_actions_1, encode_actions)
5047 (trace_dump_actions, tdump_command): Update.
5048 * remote.c (remote_download_command_source): Update.
5049 * python/python.c (gdbpy_eval_from_control_command)
5050 (python_command, python_interactive_command): Update.
5051 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5052 * guile/guile.c (guile_command)
5053 (gdbscm_eval_from_control_command, guile_command): Update.
5054 * compile/compile.c (compile_code_command)
5055 (compile_print_command, compile_to_object): Update.
5056 * cli/cli-script.h (struct command_lines_deleter): New.
5057 (counted_command_line): New typedef.
5058 (struct command_line): Add constructor, destructor.
5059 <body_list>: Remove.
5060 <body_list_0, body_list_1>: New members.
5061 (command_line_up): Remove typedef.
5062 (read_command_lines, read_command_lines_1, get_command_line):
5063 Update.
5064 (copy_command_lines): Don't declare.
5065 * cli/cli-script.c (build_command_line): Use "new".
5066 (get_command_line): Return counted_command_line.
5067 (print_command_lines, execute_user_command)
5068 (execute_control_command_1, while_command, if_command): Update.
5069 (realloc_body_list): Remove.
5070 (process_next_line, recurse_read_control_structure): Update.
5071 (read_command_lines, read_command_lines_1): Return counted_command_line.
5072 (free_command_lines): Use "delete".
5073 (copy_command_lines): Remove.
5074 (define_command, document_command, show_user_1): Update.
5075 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5076 a counted_command_line.
5077 * breakpoint.h (counted_command_line): Remove typedef.
5078 (breakpoint_set_commands): Update.
5079 * breakpoint.c (check_no_tracepoint_commands)
5080 (validate_commands_for_breakpoint): Update.
5081 (breakpoint_set_commands): Change commands to be a
5082 counted_command_line.
5083 (commands_command_1, update_dprintf_command_list)
5084 (create_tracepoint_from_upload): Update.
5085
5086 2018-05-04 Tom Tromey <tom@tromey.com>
5087
5088 * cli/cli-decode.h (cmd_list_element): New constructor.
5089 (~cmd_list_element): New destructor.
5090 (struct cmd_list_element): Add initializers.
5091 * cli/cli-decode.c (do_add_cmd): Use "new".
5092 (delete_cmd): Use "delete".
5093
5094 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5095 Pedro Alves <palves@redhat.com>
5096
5097 PR breakpoints/19806 and support for PR external/20207.
5098 * NEWS: Mention Aarch64 watchpoint improvements.
5099 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5100 watchpoints and PR external/20207 watchpoints.
5101 * nat/aarch64-linux-hw-point.c
5102 (kernel_supports_any_contiguous_range): New.
5103 (aarch64_watchpoint_offset): New.
5104 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5105 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5106 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5107 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5108 next_addr_orig_p. Support PR external/20207 watchpoints.
5109 (aarch64_downgrade_regs): New.
5110 (aarch64_dr_state_insert_one_point): New parameters offset and
5111 addr_orig.
5112 (aarch64_dr_state_remove_one_point): Likewise.
5113 (aarch64_handle_breakpoint): Update caller.
5114 (aarch64_handle_aligned_watchpoint): Likewise.
5115 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5116 aligned_offset.
5117 (aarch64_linux_set_debug_regs): Remove const from state. Call
5118 aarch64_downgrade_regs.
5119 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5120 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5121 (DR_CONTROL_MASK): ... this.
5122 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5123 (unsigned int aarch64_watchpoint_offset): New prototype.
5124 (aarch64_linux_set_debug_regs): Remove const from state.
5125 * utils.c (align_up, align_down): Move to ...
5126 * common/common-utils.c (align_up, align_down): ... here.
5127 * utils.h (align_up, align_down): Move to ...
5128 * common/common-utils.h (align_up, align_down): ... here.
5129
5130 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5131
5132 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5133 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5134 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5135 Re-implement to match the ABI as summarized in GCC's
5136 gcc/config/sparc/sparc.c. All callers updated.
5137 (sparc32_store_arguments): Remove assertion.
5138
5139 2018-05-04 Tom Tromey <tom@tromey.com>
5140
5141 * printcmd.c: Don't include tui.h.
5142 (decode_format): Use skip_spaces.
5143
5144 2018-05-04 Tom Tromey <tom@tromey.com>
5145
5146 PR gdb/22619:
5147 * printcmd.c (last_count): New global.
5148 (x_command): Use saved count when repeating.
5149
5150 2018-05-04 Tom Tromey <tom@tromey.com>
5151
5152 * nto-procfs.c (do_closedir_cleanup): Remove.
5153 (procfs_pidlist): Use gdb_dir_up.
5154 * procfs.c (do_closedir_cleanup): Remove.
5155 (proc_update_threads): Use gdb_dir_up.
5156 * common/filestuff.h (struct gdb_dir_deleter): New.
5157 (gdb_dir_up): New typedef.
5158
5159 2018-05-04 Tom Tromey <tom@tromey.com>
5160
5161 * ada-lang.c (print_mention_exception): Use std::string.
5162
5163 2018-05-04 Tom Tromey <tom@tromey.com>
5164
5165 * ada-lang.c (create_excep_cond_exprs): Update.
5166 (ada_exception_catchpoint_cond_string): Use std::string.
5167
5168 2018-05-04 Tom Tromey <tom@tromey.com>
5169
5170 * ada-lang.c (xget_renaming_scope): Return std::string.
5171 (old_renaming_is_invisible): Update.
5172
5173 2018-05-04 Tom Tromey <tom@tromey.com>
5174
5175 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5176 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5177
5178 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5179
5180 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5181
5182 2018-05-04 Tom Tromey <tom@tromey.com>
5183
5184 * remote.c (remote_query_supported_append): Change type.
5185 (remote_check_symbols): Update.
5186
5187 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5188
5189 PR gdb/11420
5190 * configure.ac: Prepend libpython.
5191 * python/python-config.py: Likewise.
5192 * configure: Regenerate.
5193
5194 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5195
5196 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5197
5198 2018-05-03 Pedro Alves <palves@redhat.com>
5199
5200 * s390-linux-nat.c
5201 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5202 override. Write 'true' instead of '1'.
5203 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5204 declaration.
5205
5206 2018-05-02 Pedro Alves <palves@redhat.com>
5207
5208 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5209 add_inf_child_target.
5210 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5211 add_inf_child_target.
5212 * aix-thread.c (aix_thread_target_info): New.
5213 (aix_thread_target) <shortname, longname, doc>: Delete.
5214 <info>: New.
5215 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5216 add_inf_child_target.
5217 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5218 add_inf_child_target.
5219 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5220 add_inf_child_target.
5221 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5222 add_inf_child_target.
5223 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5224 add_inf_child_target.
5225 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5226 add_inf_child_target.
5227 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5228 add_inf_child_target.
5229 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5230 add_inf_child_target.
5231 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5232 add_inf_child_target.
5233 * bfd-target.c (target_bfd_target_info): New.
5234 (target_bfd) <shortname, longname, doc>: Delete.
5235 <info>: New.
5236 * bsd-kvm.c (bsd_kvm_target_info): New.
5237 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5238 <info>: New.
5239 (bsd_kvm_target::open): Rename to ...
5240 (bsd_kvm_target_open): ... this. Adjust.
5241 * bsd-uthread.c (bsd_uthread_target_info): New.
5242 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5243 <info>: New.
5244 * corefile.c (core_file_command): Adjust.
5245 * corelow.c (core_target_info): New.
5246 (core_target) <shortname, longname, doc>: Delete.
5247 <info>: New.
5248 (core_target::open): Rename to ...
5249 (core_target_open): ... this. Adjust.
5250 * ctf.c (ctf_target_info): New.
5251 (ctf_target) <shortname, longname, doc>: Delete.
5252 <info>: New.
5253 (ctf_target::open): Rename to ...
5254 (ctf_target_open): ... this.
5255 (_initialize_ctf): Adjust.
5256 * exec.c (exec_target_info): New.
5257 (exec_target) <shortname, longname, doc>: Delete.
5258 <info>: New.
5259 (exec_target::open): Rename to ...
5260 (exec_target_open): ... this.
5261 * gdbcore.h (core_target_open): Declare.
5262 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5263 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5264 add_inf_child_target.
5265 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5266 add_inf_child_target.
5267 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5268 add_inf_child_target.
5269 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5270 add_inf_child_target.
5271 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5272 add_inf_child_target.
5273 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5274 add_inf_child_target.
5275 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5276 add_inf_child_target.
5277 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5278 add_inf_child_target.
5279 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5280 add_inf_child_target.
5281 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5282 add_inf_child_target.
5283 * inf-child.c (inf_child_target_info): New.
5284 (inf_child_target::info): New.
5285 (inf_child_open_target): Remove 'target' parameter. Use
5286 get_native_target instead.
5287 (inf_child_target::open): Delete.
5288 (add_inf_child_target): New.
5289 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5290 Delete.
5291 <info>: New.
5292 (add_inf_child_target): Declare.
5293 (inf_child_open_target): Declare.
5294 * linux-thread-db.c (thread_db_target_info): New.
5295 (thread_db_target) <shortname, longname, doc>: Delete.
5296 <info>: New.
5297 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5298 add_inf_child_target.
5299 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5300 add_inf_child_target.
5301 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5302 add_inf_child_target.
5303 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5304 add_inf_child_target.
5305 * make-target-delegates (print_class): Adjust.
5306 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5307 add_inf_child_target.
5308 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5309 add_inf_child_target.
5310 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5311 add_inf_child_target.
5312 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5313 add_inf_child_target.
5314 * nto-procfs.c (nto_native_target_info): New.
5315 (nto_procfs_target_native) <shortname, longname, doc>:
5316 Delete.
5317 <info>: New.
5318 (nto_procfs_target_info): New.
5319 (nto_procfs_target_procfs) <shortname, longname, doc>:
5320 Delete.
5321 <info>: New.
5322 (init_procfs_targets): Adjust.
5323 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5324 add_inf_child_target.
5325 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5326 add_inf_child_target.
5327 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5328 add_inf_child_target.
5329 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5330 add_inf_child_target.
5331 * ravenscar-thread.c (ravenscar_target_info): New.
5332 (ravenscar_thread_target) <shortname, longname, doc>:
5333 Delete.
5334 <info>: New.
5335 * record-btrace.c (record_btrace_target_info):
5336 (record_btrace_target) <shortname, longname, doc>: Delete.
5337 <info>: New.
5338 (record_btrace_target::open): Rename to ...
5339 (record_btrace_target_open): ... this. Adjust.
5340 * record-full.c (record_longname, record_doc): New.
5341 (record_full_base_target) <shortname, longname, doc>: Delete.
5342 <info>: New.
5343 (record_full_target_info): New.
5344 (record_full_target): <shortname>: Delete.
5345 <info>: New.
5346 (record_full_core_open_1, record_full_open_1): Update comments.
5347 (record_full_base_target::open): Rename to ...
5348 (record_full_open): ... this.
5349 (cmd_record_full_restore): Update.
5350 (_initialize_record_full): Update.
5351 * remote-sim.c (remote_sim_target_info): New.
5352 (gdbsim_target) <shortname, longname, doc>: Delete.
5353 <info>: New.
5354 (gdbsim_target::open): Rename to ...
5355 (gdbsim_target_open): ... this.
5356 (_initialize_remote_sim): Adjust.
5357 * remote.c (remote_doc): New.
5358 (remote_target_info): New.
5359 (remote_target) <shortname, longname, doc>: Delete.
5360 <info>: New.
5361 (extended_remote_target_info): New.
5362 (extended_remote_target) <shortname, longname, doc>: Delete.
5363 <info>: New.
5364 (remote_target::open_1): Make static. Adjust.
5365 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5366 * s390-linux-nat.c (_initialize_s390_nat): Use
5367 add_inf_child_target.
5368 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5369 add_inf_child_target.
5370 * sol-thread.c (thread_db_target_info): New.
5371 (sol_thread_target) <shortname, longname, doc>: Delete.
5372 <info>: New.
5373 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5374 add_inf_child_target.
5375 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5376 add_inf_child_target.
5377 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5378 add_inf_child_target.
5379 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5380 add_inf_child_target.
5381 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5382 add_inf_child_target.
5383 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5384 add_inf_child_target.
5385 * spu-linux-nat.c (_initialize_spu_nat): Use
5386 add_inf_child_target.
5387 * spu-multiarch.c (spu_multiarch_target_info): New.
5388 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5389 <info>: New.
5390 * target-delegates.c: Regenerate.
5391 * target.c: Include <unordered_map>.
5392 (target_ops_p): Delete.
5393 (DEF_VEC_P(target_ops_p)): Delete.
5394 (target_factories): New.
5395 (test_target_info): New.
5396 (test_target_ops::info): New.
5397 (open_target): Adjust to use target_factories.
5398 (add_target_with_completer): Rename to ...
5399 (add_target): ... this. Change prototype. Register target_info
5400 and open callback in target_factories. Register target_info in
5401 command context instead of target_ops.
5402 (add_target): Delete old implementation.
5403 (add_deprecated_target_alias): Change prototype. Adjust.
5404 (the_native_target): New.
5405 (set_native_target, get_native_target): New.
5406 (find_default_run_target): Use the_native_target.
5407 (find_attach_target, find_run_target): Simplify.
5408 (target_ops::open): Delete.
5409 (dummy_target_info): New.
5410 (dummy_target::shortname, dummy_target::longname)
5411 (dummy_target::doc): Delete.
5412 (dummy_target::info): New.
5413 (debug_target::shortname, debug_target::longname)
5414 (debug_target::doc): Delete.
5415 (debug_target::info): New.
5416 * target.h (struct target_info): New.
5417 (target_ops::~target_ops): Add comment.
5418 (target_ops::info): New.
5419 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5420 longer virtual. Implement in terms of target_info.
5421 (set_native_target, get_native_target): Declare.
5422 (target_open_ftype): New.
5423 (add_target, add_target_with_completer)
5424 (add_deprecated_target_alias): Change prototype.
5425 (test_target) <shortname, longname, doc>: Delete.
5426 <info>: New.
5427 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5428 add_inf_child_target.
5429 * tracefile-tfile.c (tfile_target_info): New.
5430 (tfile_target) <shortname, longname, doc>: Delete.
5431 <info>: New.
5432 (tfile_target::open): Rename to ...
5433 (tfile_target_open): ... this.
5434 (_initialize_tracefile_tfile): Adjust.
5435 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5436 add_inf_child_target.
5437 * windows-nat.c (_initialize_windows_nat): Use
5438 add_inf_child_target.
5439 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5440 add_inf_child_target.
5441
5442 2018-05-02 Pedro Alves <palves@redhat.com>
5443
5444 * linux-nat.h (linux_nat_target) <low_new_thread,
5445 low_delete_thread, low_new_fork, low_forget_process,
5446 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5447 New virtual methods.
5448 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5449 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5450 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5451 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5452 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5453 Delete.
5454 * linux-fork.c (delete_fork): Adjust to call low method.
5455 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5456 (linux_nat_new_fork, linux_nat_forget_process_hook)
5457 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5458 (linux_nat_status_is_event):
5459 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5460 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5461 to call low method.
5462 (sigtrap_is_event): Rename to ...
5463 (linux_nat_target::low_status_is_event): ... this.
5464 (linux_nat_set_status_is_event): Delete.
5465 (save_stop_reason, linux_nat_wait_1)
5466 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5467 low methods.
5468 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5469 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5470 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5471 (linux_nat_set_prepare_to_resume): Delete.
5472 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5473 low virtual methods.
5474 * amd64-linux-nat.c: Likewise.
5475 * arm-linux-nat.c: Likewise.
5476 * i386-linux-nat.c: Likewise.
5477 * ia64-linux-nat.c: Likewise.
5478 * mips-linux-nat.c: Likewise.
5479 * ppc-linux-nat.c: Likewise.
5480 * s390-linux-nat.c: Likewise.
5481 * sparc64-linux-nat.c: Likewise.
5482 * x86-linux-nat.c: Likewise.
5483 * x86-linux-nat.h: Include "nat/x86-linux.h".
5484 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5485 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5486 Override methods.
5487
5488 2018-05-02 Pedro Alves <palves@redhat.com>
5489
5490 * target.h (target_ops)
5491 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5492 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5493 stopped_by_watchpoint, have_continuable_watchpoint,
5494 stopped_data_address, watchpoint_addr_within_range,
5495 can_accel_watchpoint_condition, can_run, thread_alive,
5496 has_all_memory, has_memory, has_stack, has_registers,
5497 has_execution, can_async_p, is_async_p, supports_non_stop,
5498 always_non_stop_p, can_execute_reverse, supports_multi_process,
5499 supports_enable_disable_tracepoint,
5500 supports_disable_randomization, supports_string_tracing,
5501 supports_evaluation_of_breakpoint_conditions,
5502 can_run_breakpoint_commands, filesystem_is_local,
5503 can_download_tracepoint, get_trace_state_variable_value,
5504 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5505 record_is_replaying, record_will_replay,
5506 augmented_libraries_svr4_read>: Adjust to return bool.
5507 * aarch64-linux-nat.c: All implementations adjusted.
5508 * aix-thread.c: All implementations adjusted.
5509 * arm-linux-nat.c: All implementations adjusted.
5510 * breakpoint.c: All implementations adjusted.
5511 * bsd-kvm.c: All implementations adjusted.
5512 * bsd-uthread.c: All implementations adjusted.
5513 * corelow.c: All implementations adjusted.
5514 * ctf.c: All implementations adjusted.
5515 * darwin-nat.c: All implementations adjusted.
5516 * darwin-nat.h: All implementations adjusted.
5517 * exec.c: All implementations adjusted.
5518 * fbsd-nat.c: All implementations adjusted.
5519 * fbsd-nat.h: All implementations adjusted.
5520 * gnu-nat.c: All implementations adjusted.
5521 * gnu-nat.h: All implementations adjusted.
5522 * go32-nat.c: All implementations adjusted.
5523 * ia64-linux-nat.c: All implementations adjusted.
5524 * inf-child.c: All implementations adjusted.
5525 * inf-child.h: All implementations adjusted.
5526 * inf-ptrace.c: All implementations adjusted.
5527 * inf-ptrace.h: All implementations adjusted.
5528 * linux-nat.c: All implementations adjusted.
5529 * linux-nat.h: All implementations adjusted.
5530 * mips-linux-nat.c: All implementations adjusted.
5531 * nto-procfs.c: All implementations adjusted.
5532 * ppc-linux-nat.c: All implementations adjusted.
5533 * procfs.c: All implementations adjusted.
5534 * ravenscar-thread.c: All implementations adjusted.
5535 * record-btrace.c: All implementations adjusted.
5536 * record-full.c: All implementations adjusted.
5537 * remote-sim.c: All implementations adjusted.
5538 * remote.c: All implementations adjusted.
5539 * s390-linux-nat.c: All implementations adjusted.
5540 * sol-thread.c: All implementations adjusted.
5541 * spu-multiarch.c: All implementations adjusted.
5542 * target-delegates.c: All implementations adjusted.
5543 * target.c: All implementations adjusted.
5544 * target.h: All implementations adjusted.
5545 * tracefile-tfile.c: All implementations adjusted.
5546 * tracefile.c: All implementations adjusted.
5547 * tracefile.h: All implementations adjusted.
5548 * windows-nat.c: All implementations adjusted.
5549 * x86-linux-nat.h: All implementations adjusted.
5550 * x86-nat.h: All implementations adjusted.
5551
5552 2018-05-02 Pedro Alves <palves@redhat.com>
5553
5554 * make-target-delegates (scan_target_h): Don't trim lines here.
5555 Replace sequences of tabs and/or whitespace with a single
5556 whitespace.
5557 (top level, parsing methods): Trim each line before processing it
5558 here.
5559
5560 2018-05-02 Pedro Alves <palves@redhat.com>
5561 John Baldwin <jhb@freebsd.org>
5562
5563 * target.h (enum strata) <debug_stratum>: New.
5564 (struct target_ops) <all delegation methods>: Replace by C++
5565 virtual methods, and drop "to_" prefix. All references updated
5566 throughout.
5567 <to_shortname, to_longname, to_doc, to_data,
5568 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5569 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5570 virtual methods. All references updated throughout.
5571 <can_attach, supports_terminal_ours, can_create_inferior,
5572 get_thread_control_capabilities, attach_no_wait>: New
5573 virtual methods.
5574 <insert_breakpoint, remove_breakpoint>: Now
5575 TARGET_DEFAULT_NORETURN methods.
5576 <info_proc>: Now returns bool.
5577 <to_magic>: Delete.
5578 (OPS_MAGIC): Delete.
5579 (current_target): Delete. All references replaced by references
5580 to ...
5581 (target_stack): ... this. New.
5582 (target_shortname, target_longname): Adjust.
5583 (target_can_run): Now a function declaration.
5584 (default_child_has_all_memory, default_child_has_memory)
5585 (default_child_has_stack, default_child_has_registers)
5586 (default_child_has_execution): Remove target_ops parameter.
5587 (complete_target_initialization): Delete.
5588 (memory_breakpoint_target): New template class.
5589 (test_target_ops): Refactor as a C++ class with virtual methods.
5590 * make-target-delegates (NAME_PART): Tighten.
5591 (POINTER_PART, CP_SYMBOL): New.
5592 (SIMPLE_RETURN_PART): Reimplement.
5593 (VEC_RETURN_PART): Expect less.
5594 (RETURN_PART, VIRTUAL_PART): New.
5595 (METHOD): Adjust to C++ virtual methods.
5596 (scan_target_h): Remove reference to C99.
5597 (dname): Output "target_ops::" prefix.
5598 (write_function_header): Adjust to output a C++ class method.
5599 (write_declaration): New.
5600 (write_delegator): Adjust to output a C++ class method.
5601 (tdname): Output "dummy_target::" prefix.
5602 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5603 method.
5604 (tdefault_names, debug_names): Delete.
5605 (return_types, tdefaults, styles, argtypes_array): New.
5606 (top level): All methods are delegators.
5607 (print_class): New.
5608 (top level): Print dummy_target and debug_target classes.
5609 * target-delegates.c: Regenerate.
5610 * target-debug.h (target_debug_print_enum_info_proc_what)
5611 (target_debug_print_thread_control_capabilities)
5612 (target_debug_print_thread_info_p): New.
5613 * target.c (dummy_target): Delete.
5614 (the_dummy_target, the_debug_target): New.
5615 (target_stack): Now extern.
5616 (set_targetdebug): Push/unpush debug target.
5617 (default_child_has_all_memory, default_child_has_memory)
5618 (default_child_has_stack, default_child_has_registers)
5619 (default_child_has_execution): Remove target_ops parameter.
5620 (complete_target_initialization): Delete.
5621 (add_target_with_completer): No longer call
5622 complete_target_initialization.
5623 (target_supports_terminal_ours): Use regular delegation.
5624 (update_current_target): Delete.
5625 (push_target): No longer check magic number. Don't call
5626 update_current_target.
5627 (unpush_target): Don't call update_current_target.
5628 (target_is_pushed): No longer check magic number.
5629 (target_require_runnable): Skip for all stratums over
5630 process_stratum.
5631 (target_ops::info_proc): New.
5632 (target_info_proc): Use find_target_at and
5633 find_default_run_target.
5634 (target_supports_disable_randomization): Use regular delegation.
5635 (target_get_osdata): Use find_target_at.
5636 (target_ops::open, target_ops::close, target_ops::can_attach)
5637 (target_ops::attach, target_ops::can_create_inferior)
5638 (target_ops::create_inferior, target_ops::can_run)
5639 (target_can_run): New.
5640 (default_fileio_target): Use regular delegation.
5641 (target_ops::fileio_open, target_ops::fileio_pwrite)
5642 (target_ops::fileio_pread, target_ops::fileio_fstat)
5643 (target_ops::fileio_close, target_ops::fileio_unlink)
5644 (target_ops::fileio_readlink): New.
5645 (target_fileio_open_1, target_fileio_unlink)
5646 (target_fileio_readlink): Always call the target method. Handle
5647 FILEIO_ENOSYS.
5648 (return_zero, return_zero_has_execution): Delete.
5649 (init_dummy_target): Delete.
5650 (dummy_target::dummy_target, dummy_target::shortname)
5651 (dummy_target::longname, dummy_target::doc)
5652 (debug_target::debug_target, debug_target::shortname)
5653 (debug_target::longname, debug_target::doc): New.
5654 (target_supports_delete_record): Use regular delegation.
5655 (setup_target_debug): Delete.
5656 (maintenance_print_target_stack): Skip debug_stratum.
5657 (initialize_targets): Instantiate the_dummy_target and
5658 the_debug_target.
5659 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5660 use target_stack.
5661 (target_auxv_search, fprint_target_auxv): Adjust.
5662 (info_auxv_command): Adjust to use target_stack.
5663 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5664 * exceptions.c (print_flush): Handle a NULL target_stack.
5665 * regcache.c (target_ops_no_register): Refactor as class with
5666 virtual methods.
5667
5668 * exec.c (exec_target): New class.
5669 (exec_ops): Now an exec_target.
5670 (exec_open, exec_close_1, exec_get_section_table)
5671 (exec_xfer_partial, exec_files_info, exec_has_memory)
5672 (exec_make_note_section): Refactor as exec_target methods.
5673 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5674 Delete.
5675 (exec_target::find_memory_regions): New.
5676 (_initialize_exec): Don't call init_exec_ops.
5677 * gdbcore.h (exec_file_clear): Delete.
5678
5679 * corefile.c (core_target): Delete.
5680 (core_file_command): Adjust.
5681 * corelow.c (core_target): New class.
5682 (the_core_target): New.
5683 (core_close): Remove target_ops parameter.
5684 (core_close_cleanup): Adjust.
5685 (core_target::close): New.
5686 (core_open, core_detach, get_core_registers, core_files_info)
5687 (core_xfer_partial, core_thread_alive, core_read_description)
5688 (core_pid_to_str, core_thread_name, core_has_memory)
5689 (core_has_stack, core_has_registers, core_info_proc): Rework as
5690 core_target methods.
5691 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5692 (_initialize_corelow): Initialize the_core_target.
5693 * gdbcore.h (core_target): Delete.
5694 (the_core_target): New.
5695
5696 * ctf.c: (ctf_target): New class.
5697 (ctf_ops): Now a ctf_target.
5698 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5699 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5700 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5701 methods.
5702 (init_ctf_ops): Delete.
5703 (_initialize_ctf): Don't call it.
5704 * tracefile-tfile.c (tfile_target): New class.
5705 (tfile_ops): Now a tfile_target.
5706 (tfile_open, tfile_close, tfile_files_info)
5707 (tfile_get_tracepoint_status, tfile_trace_find)
5708 (tfile_fetch_registers, tfile_xfer_partial)
5709 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5710 Refactor as tfile_target methods.
5711 (tfile_xfer_partial_features): Remove target_ops parameter.
5712 (init_tfile_ops): Delete.
5713 (_initialize_tracefile_tfile): Don't call it.
5714 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5715 (tracefile_has_stack, tracefile_has_registers)
5716 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5717 tracefile_target methods.
5718 (init_tracefile_ops): Delete.
5719 (tracefile_target::tracefile_target): New.
5720 * tracefile.h: Include "target.h".
5721 (tracefile_target): New class.
5722 (init_tracefile_ops): Delete.
5723
5724 * spu-multiarch.c (spu_multiarch_target): New class.
5725 (spu_ops): Now a spu_multiarch_target.
5726 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5727 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5728 (spu_search_memory, spu_mourn_inferior): Refactor as
5729 spu_multiarch_target methods.
5730 (init_spu_ops): Delete.
5731 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5732 complete_target_initialization.
5733
5734 * ravenscar-thread.c (ravenscar_thread_target): New class.
5735 (ravenscar_ops): Now a ravenscar_thread_target.
5736 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5737 (ravenscar_thread_alive, ravenscar_pid_to_str)
5738 (ravenscar_fetch_registers, ravenscar_store_registers)
5739 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5740 (ravenscar_stopped_by_hw_breakpoint)
5741 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5742 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5743 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5744 methods.
5745 (init_ravenscar_thread_ops): Delete.
5746 (_initialize_ravenscar): Remove references to
5747 init_ravenscar_thread_ops and complete_target_initialization.
5748
5749 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5750 (bsd_uthread_target): New class.
5751 (bsd_uthread_ops): Now a bsd_uthread_target.
5752 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5753 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5754 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5755 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5756 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5757 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5758 (bsd_uthread_target): Delete function.
5759 (_initialize_bsd_uthread): Remove reference to
5760 complete_target_initialization.
5761
5762 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5763 (target_bfd): ... this new class.
5764 (target_bfd_xfer_partial, target_bfd_get_section_table)
5765 (target_bfd_close): Refactor as target_bfd methods.
5766 (target_bfd::~target_bfd): New.
5767 (target_bfd_reopen): Adjust.
5768 (target_bfd::close): New.
5769
5770 * record-btrace.c (record_btrace_target): New class.
5771 (record_btrace_ops): Now a record_btrace_target.
5772 (record_btrace_open, record_btrace_stop_recording)
5773 (record_btrace_disconnect, record_btrace_close)
5774 (record_btrace_async, record_btrace_info)
5775 (record_btrace_insn_history, record_btrace_insn_history_range)
5776 (record_btrace_insn_history_from, record_btrace_call_history)
5777 (record_btrace_call_history_range)
5778 (record_btrace_call_history_from, record_btrace_record_method)
5779 (record_btrace_is_replaying, record_btrace_will_replay)
5780 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5781 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5782 (record_btrace_store_registers, record_btrace_prepare_to_store)
5783 (record_btrace_to_get_unwinder)
5784 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5785 (record_btrace_commit_resume, record_btrace_wait)
5786 (record_btrace_stop, record_btrace_can_execute_reverse)
5787 (record_btrace_stopped_by_sw_breakpoint)
5788 (record_btrace_supports_stopped_by_sw_breakpoint)
5789 (record_btrace_stopped_by_hw_breakpoint)
5790 (record_btrace_supports_stopped_by_hw_breakpoint)
5791 (record_btrace_update_thread_list, record_btrace_thread_alive)
5792 (record_btrace_goto_begin, record_btrace_goto_end)
5793 (record_btrace_goto, record_btrace_stop_replaying_all)
5794 (record_btrace_execution_direction)
5795 (record_btrace_prepare_to_generate_core)
5796 (record_btrace_done_generating_core): Refactor as
5797 record_btrace_target methods.
5798 (init_record_btrace_ops): Delete.
5799 (_initialize_record_btrace): Remove reference to
5800 init_record_btrace_ops.
5801 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5802 the execution_direction global.
5803 (record_full_base_target, record_full_target)
5804 (record_full_core_target): New classes.
5805 (record_full_ops): Now a record_full_target.
5806 (record_full_core_ops): Now a record_full_core_target.
5807 (record_full_target::detach, record_full_target::disconnect)
5808 (record_full_core_target::disconnect)
5809 (record_full_target::mourn_inferior, record_full_target::kill):
5810 New.
5811 (record_full_open, record_full_close, record_full_async): Refactor
5812 as methods of the record_full_base_target class.
5813 (record_full_resume, record_full_commit_resume): Refactor
5814 as methods of the record_full_target class.
5815 (record_full_wait, record_full_stopped_by_watchpoint)
5816 (record_full_stopped_data_address)
5817 (record_full_stopped_by_sw_breakpoint)
5818 (record_full_supports_stopped_by_sw_breakpoint)
5819 (record_full_stopped_by_hw_breakpoint)
5820 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5821 methods of the record_full_base_target class.
5822 (record_full_store_registers, record_full_xfer_partial)
5823 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5824 Refactor as methods of the record_full_target class.
5825 (record_full_can_execute_reverse, record_full_get_bookmark)
5826 (record_full_goto_bookmark, record_full_execution_direction)
5827 (record_full_record_method, record_full_info, record_full_delete)
5828 (record_full_is_replaying, record_full_will_replay)
5829 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5830 (record_full_stop_replaying): Refactor as methods of the
5831 record_full_base_target class.
5832 (record_full_core_resume, record_full_core_kill)
5833 (record_full_core_fetch_registers)
5834 (record_full_core_prepare_to_store)
5835 (record_full_core_store_registers, record_full_core_xfer_partial)
5836 (record_full_core_insert_breakpoint)
5837 (record_full_core_remove_breakpoint)
5838 (record_full_core_has_execution): Refactor
5839 as methods of the record_full_core_target class.
5840 (record_full_base_target::supports_delete_record): New.
5841 (init_record_full_ops): Delete.
5842 (init_record_full_core_ops): Delete.
5843 (record_full_save): Refactor as method of the
5844 record_full_base_target class.
5845 (_initialize_record_full): Remove references to
5846 init_record_full_ops and init_record_full_core_ops.
5847
5848 * remote.c (remote_target, extended_remote_target): New classes.
5849 (remote_ops): Now a remote_target.
5850 (extended_remote_ops): Now an extended_remote_target.
5851 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5852 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5853 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5854 (remote_pass_signals, remote_set_syscall_catchpoint)
5855 (remote_program_signals, )
5856 (remote_thread_always_alive): Remove target_ops parameter.
5857 (remote_thread_alive, remote_thread_name)
5858 (remote_update_thread_list, remote_threads_extra_info)
5859 (remote_static_tracepoint_marker_at)
5860 (remote_static_tracepoint_markers_by_strid)
5861 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5862 (remote_open): Refactor as methods of remote_target.
5863 (extended_remote_open, extended_remote_detach)
5864 (extended_remote_attach, extended_remote_post_attach):
5865 (extended_remote_supports_disable_randomization)
5866 (extended_remote_create_inferior): : Refactor as method of
5867 extended_remote_target.
5868 (remote_set_permissions, remote_open_1, remote_detach)
5869 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5870 (remote_resume, remote_commit_resume, remote_stop)
5871 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5872 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5873 (remote_prepare_to_store, remote_store_registers)
5874 (remote_flash_erase, remote_flash_done, remote_files_info)
5875 (remote_kill, remote_mourn, remote_insert_breakpoint)
5876 (remote_remove_breakpoint, remote_insert_watchpoint)
5877 (remote_watchpoint_addr_within_range)
5878 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5879 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5880 (remote_supports_stopped_by_sw_breakpoint)
5881 (remote_stopped_by_hw_breakpoint)
5882 (remote_supports_stopped_by_hw_breakpoint)
5883 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5884 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5885 (remote_verify_memory): Refactor as methods of remote_target.
5886 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5887 parameter.
5888 (remote_xfer_partial, remote_get_memory_xfer_limit)
5889 (remote_search_memory, remote_rcmd, remote_memory_map)
5890 (remote_pid_to_str, remote_get_thread_local_address)
5891 (remote_get_tib_address, remote_read_description): Refactor as
5892 methods of remote_target.
5893 (remote_target::fileio_open, remote_target::fileio_pwrite)
5894 (remote_target::fileio_pread, remote_target::fileio_close): New.
5895 (remote_hostio_readlink, remote_hostio_fstat)
5896 (remote_filesystem_is_local, remote_can_execute_reverse)
5897 (remote_supports_non_stop, remote_supports_disable_randomization)
5898 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5899 (remote_supports_enable_disable_tracepoint)
5900 (remote_supports_string_tracing)
5901 (remote_can_run_breakpoint_commands, remote_trace_init)
5902 (remote_download_tracepoint, remote_can_download_tracepoint)
5903 (remote_download_trace_state_variable, remote_enable_tracepoint)
5904 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5905 (remote_trace_start, remote_get_trace_status)
5906 (remote_get_tracepoint_status, remote_trace_stop)
5907 (remote_trace_find, remote_get_trace_state_variable_value)
5908 (remote_save_trace_data, remote_get_raw_trace_data)
5909 (remote_set_disconnected_tracing, remote_core_of_thread)
5910 (remote_set_circular_trace_buffer, remote_traceframe_info)
5911 (remote_get_min_fast_tracepoint_insn_len)
5912 (remote_set_trace_buffer_size, remote_set_trace_notes)
5913 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5914 (remote_disable_btrace, remote_teardown_btrace)
5915 (remote_read_btrace, remote_btrace_conf)
5916 (remote_augmented_libraries_svr4_read, remote_load)
5917 (remote_pid_to_exec_file, remote_can_do_single_step)
5918 (remote_execution_direction, remote_thread_handle_to_thread_info):
5919 Refactor as methods of remote_target.
5920 (init_remote_ops, init_extended_remote_ops): Delete.
5921 (remote_can_async_p, remote_is_async_p, remote_async)
5922 (remote_thread_events, remote_upload_tracepoints)
5923 (remote_upload_trace_state_variables): Refactor as methods of
5924 remote_target.
5925 (_initialize_remote): Remove references to init_remote_ops and
5926 init_extended_remote_ops.
5927
5928 * remote-sim.c (gdbsim_target): New class.
5929 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5930 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5931 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5932 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5933 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5934 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5935 Refactor as methods of gdbsim_target.
5936 (gdbsim_ops): Now a gdbsim_target.
5937 (init_gdbsim_ops): Delete.
5938 (gdbsim_cntrl_c): Adjust.
5939 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5940
5941 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5942 (the_amd64_linux_nat_target): New.
5943 (amd64_linux_fetch_inferior_registers)
5944 (amd64_linux_store_inferior_registers): Refactor as methods of
5945 amd64_linux_nat_target.
5946 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5947 * i386-linux-nat.c: Don't include "linux-nat.h".
5948 (i386_linux_nat_target): New class.
5949 (the_i386_linux_nat_target): New.
5950 (i386_linux_fetch_inferior_registers)
5951 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5952 as methods of i386_linux_nat_target.
5953 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5954 * inf-child.c (inf_child_ops): Delete.
5955 (inf_child_fetch_inferior_registers)
5956 (inf_child_store_inferior_registers): Delete.
5957 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5958 methods of inf_child_target.
5959 (inf_child_target::supports_terminal_ours)
5960 (inf_child_target::terminal_init)
5961 (inf_child_target::terminal_inferior)
5962 (inf_child_target::terminal_ours_for_output)
5963 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5964 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5965 New.
5966 (inf_child_open, inf_child_disconnect, inf_child_close)
5967 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5968 (inf_child_post_startup_inferior, inf_child_can_run)
5969 (inf_child_pid_to_exec_file): Refactor as methods of
5970 inf_child_target.
5971 (inf_child_follow_fork): Delete.
5972 (inf_child_target::can_create_inferior)
5973 (inf_child_target::can_attach): New.
5974 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5975 (inf_child_target::has_stack, inf_child_target::has_registers)
5976 (inf_child_target::has_execution): New.
5977 (inf_child_fileio_open, inf_child_fileio_pwrite)
5978 (inf_child_fileio_pread, inf_child_fileio_fstat)
5979 (inf_child_fileio_close, inf_child_fileio_unlink)
5980 (inf_child_fileio_readlink, inf_child_use_agent)
5981 (inf_child_can_use_agent): Refactor as methods of
5982 inf_child_target.
5983 (return_zero, inf_child_target): Delete.
5984 (inf_child_target::inf_child_target): New.
5985 * inf-child.h: Include "target.h".
5986 (inf_child_target): Delete function prototype.
5987 (inf_child_target): New class.
5988 (inf_child_open_target, inf_child_mourn_inferior)
5989 (inf_child_maybe_unpush_target): Delete.
5990 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5991 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5992 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5993 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5994 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5995 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5996 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5997 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5998 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5999 methods of inf_ptrace_target.
6000 (inf_ptrace_target): Delete function.
6001 * inf-ptrace.h: Include "inf-child.h".
6002 (inf_ptrace_target): Delete function declaration.
6003 (inf_ptrace_target): New class.
6004 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6005 * linux-nat.c (linux_target): New.
6006 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6007 (linux_nat_target::~linux_nat_target): New.
6008 (linux_child_post_attach, linux_child_post_startup_inferior)
6009 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6010 (linux_child_remove_fork_catchpoint)
6011 (linux_child_insert_vfork_catchpoint)
6012 (linux_child_remove_vfork_catchpoint)
6013 (linux_child_insert_exec_catchpoint)
6014 (linux_child_remove_exec_catchpoint)
6015 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6016 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6017 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6018 (linux_nat_stopped_data_address)
6019 (linux_nat_stopped_by_sw_breakpoint)
6020 (linux_nat_supports_stopped_by_sw_breakpoint)
6021 (linux_nat_stopped_by_hw_breakpoint)
6022 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6023 (linux_nat_kill, linux_nat_mourn_inferior)
6024 (linux_nat_xfer_partial, linux_nat_thread_alive)
6025 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6026 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6027 (linux_child_static_tracepoint_markers_by_strid)
6028 (linux_nat_is_async_p, linux_nat_can_async_p)
6029 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6030 (linux_nat_supports_multi_process)
6031 (linux_nat_supports_disable_randomization, linux_nat_async)
6032 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6033 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6034 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6035 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6036 methods of linux_nat_target.
6037 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6038 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6039 parameter.
6040 (check_stopped_by_watchpoint): Adjust.
6041 (linux_xfer_partial): Delete.
6042 (linux_target_install_ops, linux_target, linux_nat_add_target):
6043 Delete.
6044 (linux_nat_target::linux_nat_target): New.
6045 * linux-nat.h: Include "inf-ptrace.h".
6046 (linux_nat_target): New.
6047 (linux_target, linux_target_install_ops, linux_nat_add_target):
6048 Delete function declarations.
6049 (linux_target): Declare global.
6050 * linux-thread-db.c (thread_db_target): New.
6051 (thread_db_target::thread_db_target): New.
6052 (thread_db_ops): Delete.
6053 (the_thread_db_target): New.
6054 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6055 (thread_db_update_thread_list, thread_db_pid_to_str)
6056 (thread_db_extra_thread_info)
6057 (thread_db_thread_handle_to_thread_info)
6058 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6059 (thread_db_resume): Refactor as methods of thread_db_target.
6060 (init_thread_db_ops): Delete.
6061 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6062 * x86-linux-nat.c: Don't include "linux-nat.h".
6063 (super_post_startup_inferior): Delete.
6064 (x86_linux_nat_target::~x86_linux_nat_target): New.
6065 (x86_linux_child_post_startup_inferior)
6066 (x86_linux_read_description, x86_linux_enable_btrace)
6067 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6068 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6069 methods of x86_linux_nat_target.
6070 (x86_linux_create_target): Delete. Bits folded ...
6071 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6072 pointer.
6073 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6074 (x86_linux_nat_target): New class.
6075 (x86_linux_create_target): Delete.
6076 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6077 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6078 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6079 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6080 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6081 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6082 make extern.
6083 (x86_use_watchpoints): Delete.
6084 * x86-nat.h: Include "breakpoint.h" and "target.h".
6085 (x86_use_watchpoints): Delete.
6086 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6087 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6088 (x86_insert_watchpoint, x86_remove_watchpoint)
6089 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6090 (x86_stopped_by_hw_breakpoint): New declarations.
6091 (x86_nat_target): New template class.
6092
6093 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6094 (the_ppc_linux_nat_target): New.
6095 (ppc_linux_fetch_inferior_registers)
6096 (ppc_linux_can_use_hw_breakpoint)
6097 (ppc_linux_region_ok_for_hw_watchpoint)
6098 (ppc_linux_ranged_break_num_registers)
6099 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6100 (ppc_linux_insert_mask_watchpoint)
6101 (ppc_linux_remove_mask_watchpoint)
6102 (ppc_linux_can_accel_watchpoint_condition)
6103 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6104 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6105 (ppc_linux_watchpoint_addr_within_range)
6106 (ppc_linux_masked_watch_num_registers)
6107 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6108 (ppc_linux_read_description): Refactor as methods of
6109 ppc_linux_nat_target.
6110 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6111
6112 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6113 (procfs_target): New class.
6114 (the_procfs_target): New.
6115 (procfs_target): Delete function.
6116 (procfs_auxv_parse, procfs_attach, procfs_detach)
6117 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6118 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6119 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6120 (procfs_create_inferior, procfs_update_thread_list)
6121 (procfs_thread_alive, procfs_pid_to_str)
6122 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6123 (procfs_stopped_data_address, procfs_insert_watchpoint)
6124 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6125 (proc_find_memory_regions, procfs_info_proc)
6126 (procfs_make_note_section): Refactor as methods of procfs_target.
6127 (_initialize_procfs): Adjust.
6128 * sol-thread.c (sol_thread_target): New class.
6129 (sol_thread_ops): Now a sol_thread_target.
6130 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6131 (sol_thread_fetch_registers, sol_thread_store_registers)
6132 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6133 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6134 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6135 (init_sol_thread_ops): Delete.
6136 (_initialize_sol_thread): Adjust. Remove references to
6137 init_sol_thread_ops and complete_target_initialization.
6138
6139 * windows-nat.c (windows_nat_target): New class.
6140 (windows_fetch_inferior_registers)
6141 (windows_store_inferior_registers, windows_resume, windows_wait)
6142 (windows_attach, windows_detach, windows_pid_to_exec_file)
6143 (windows_files_info, windows_create_inferior)
6144 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6145 (windows_close, windows_pid_to_str, windows_xfer_partial)
6146 (windows_get_tib_address, windows_get_ada_task_ptid)
6147 (windows_thread_name, windows_thread_alive): Refactor as
6148 windows_nat_target methods.
6149 (do_initial_windows_stuff): Adjust.
6150 (windows_target): Delete function.
6151 (_initialize_windows_nat): Adjust.
6152
6153 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6154 (darwin_mourn_inferior, darwin_kill_inferior)
6155 (darwin_create_inferior, darwin_attach, darwin_detach)
6156 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6157 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6158 (darwin_supports_multi_process): Refactor as darwin_nat_target
6159 methods.
6160 (darwin_resume_to, darwin_files_info): Delete.
6161 (_initialize_darwin_inferior): Rename to ...
6162 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6163 * darwin-nat.h: Include "inf-child.h".
6164 (darwin_nat_target): New class.
6165 (darwin_complete_target): Delete.
6166 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6167 (darwin_target): New.
6168 (i386_darwin_fetch_inferior_registers)
6169 (i386_darwin_store_inferior_registers): Refactor as methods of
6170 darwin_nat_target.
6171 (darwin_complete_target): Delete, with ...
6172 (_initialize_i386_darwin_nat): ... bits factored out here.
6173
6174 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6175 (the_alpha_linux_nat_target): New.
6176 (alpha_linux_register_u_offset): Refactor as
6177 alpha_linux_nat_target method.
6178 (_initialize_alpha_linux_nat): Adjust.
6179 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6180 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6181 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6182 methods of linux_nat_trad_target.
6183 (linux_trad_target): Delete.
6184 * linux-nat-trad.h (linux_trad_target): Delete function.
6185 (linux_nat_trad_target): New class.
6186 * mips-linux-nat.c (mips_linux_nat_target): New class.
6187 (super_fetch_registers, super_store_registers, super_close):
6188 Delete.
6189 (the_mips_linux_nat_target): New.
6190 (mips64_linux_regsets_fetch_registers)
6191 (mips64_linux_regsets_store_registers)
6192 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6193 (mips_linux_register_u_offset, mips_linux_read_description)
6194 (mips_linux_can_use_hw_breakpoint)
6195 (mips_linux_stopped_by_watchpoint)
6196 (mips_linux_stopped_data_address)
6197 (mips_linux_region_ok_for_hw_watchpoint)
6198 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6199 (mips_linux_close): Refactor as methods of mips_linux_nat.
6200 (_initialize_mips_linux_nat): Adjust to C++ification.
6201
6202 * aix-thread.c (aix_thread_target): New class.
6203 (aix_thread_ops): Now an aix_thread_target.
6204 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6205 (aix_thread_fetch_registers, aix_thread_store_registers)
6206 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6207 (aix_thread_thread_alive, aix_thread_pid_to_str)
6208 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6209 Refactor as methods of aix_thread_target.
6210 (init_aix_thread_ops): Delete.
6211 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6212 and complete_target_initialization.
6213 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6214 (rs6000_nat_target): New class.
6215 (the_rs6000_nat_target): New.
6216 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6217 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6218 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6219 (super_create_inferior): Delete.
6220 (_initialize_rs6000_nat): Adjust to C++ification.
6221
6222 * arm-linux-nat.c (arm_linux_nat_target): New class.
6223 (the_arm_linux_nat_target): New.
6224 (arm_linux_fetch_inferior_registers)
6225 (arm_linux_store_inferior_registers, arm_linux_read_description)
6226 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6227 (arm_linux_remove_hw_breakpoint)
6228 (arm_linux_region_ok_for_hw_watchpoint)
6229 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6230 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6231 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6232 arm_linux_nat_target.
6233 (_initialize_arm_linux_nat): Adjust to C++ification.
6234
6235 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6236 (the_aarch64_linux_nat_target): New.
6237 (aarch64_linux_fetch_inferior_registers)
6238 (aarch64_linux_store_inferior_registers)
6239 (aarch64_linux_child_post_startup_inferior)
6240 (aarch64_linux_read_description)
6241 (aarch64_linux_can_use_hw_breakpoint)
6242 (aarch64_linux_insert_hw_breakpoint)
6243 (aarch64_linux_remove_hw_breakpoint)
6244 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6245 (aarch64_linux_region_ok_for_hw_watchpoint)
6246 (aarch64_linux_stopped_data_address)
6247 (aarch64_linux_stopped_by_watchpoint)
6248 (aarch64_linux_watchpoint_addr_within_range)
6249 (aarch64_linux_can_do_single_step): Refactor as methods of
6250 aarch64_linux_nat_target.
6251 (super_post_startup_inferior): Delete.
6252 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6253
6254 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6255 (the_hppa_linux_nat_target): New.
6256 (hppa_linux_fetch_inferior_registers)
6257 (hppa_linux_store_inferior_registers): Refactor as methods of
6258 hppa_linux_nat_target.
6259 (_initialize_hppa_linux_nat): Adjust to C++ification.
6260
6261 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6262 (the_ia64_linux_nat_target): New.
6263 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6264 (ia64_linux_stopped_data_address)
6265 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6266 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6267 ia64_linux_nat_target methods.
6268 (super_xfer_partial): Delete.
6269 (_initialize_ia64_linux_nat): Adjust to C++ification.
6270
6271 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6272 (the_m32r_linux_nat_target): New.
6273 (m32r_linux_fetch_inferior_registers)
6274 (m32r_linux_store_inferior_registers): Refactor as
6275 m32r_linux_nat_target methods.
6276 (_initialize_m32r_linux_nat): Adjust to C++ification.
6277
6278 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6279 (the_m68k_linux_nat_target): New.
6280 (m68k_linux_fetch_inferior_registers)
6281 (m68k_linux_store_inferior_registers): Refactor as
6282 m68k_linux_nat_target methods.
6283 (_initialize_m68k_linux_nat): Adjust to C++ification.
6284
6285 * s390-linux-nat.c (s390_linux_nat_target): New class.
6286 (the_s390_linux_nat_target): New.
6287 (s390_linux_fetch_inferior_registers)
6288 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6289 (s390_insert_watchpoint, s390_remove_watchpoint)
6290 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6291 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6292 (s390_auxv_parse, s390_read_description): Refactor as methods of
6293 s390_linux_nat_target.
6294 (_initialize_s390_nat): Adjust to C++ification.
6295
6296 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6297 (the_sparc_linux_nat_target): New.
6298 (_initialize_sparc_linux_nat): Adjust to C++ification.
6299 * sparc-nat.c (sparc_fetch_inferior_registers)
6300 (sparc_store_inferior_registers): Remove target_ops parameter.
6301 * sparc-nat.h (sparc_fetch_inferior_registers)
6302 (sparc_store_inferior_registers): Remove target_ops parameter.
6303 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6304 (the_sparc64_linux_nat_target): New.
6305 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6306
6307 * spu-linux-nat.c (spu_linux_nat_target): New class.
6308 (the_spu_linux_nat_target): New.
6309 (spu_child_post_startup_inferior, spu_child_post_attach)
6310 (spu_child_wait, spu_fetch_inferior_registers)
6311 (spu_store_inferior_registers, spu_xfer_partial)
6312 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6313 methods.
6314 (_initialize_spu_nat): Adjust to C++ification.
6315
6316 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6317 (the_tilegx_linux_nat_target): New.
6318 (fetch_inferior_registers, store_inferior_registers):
6319 Refactor as methods.
6320 (_initialize_tile_linux_nat): Adjust to C++ification.
6321
6322 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6323 (the_xtensa_linux_nat_target): New.
6324 (xtensa_linux_fetch_inferior_registers)
6325 (xtensa_linux_store_inferior_registers): Refactor as
6326 xtensa_linux_nat_target methods.
6327 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6328
6329 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6330 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6331 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6332 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6333 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6334 (fbsd_stopped_by_sw_breakpoint)
6335 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6336 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6337 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6338 (fbsd_post_startup_inferior, fbsd_post_attach)
6339 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6340 (fbsd_set_syscall_catchpoint)
6341 (super_xfer_partial, super_resume, super_wait)
6342 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6343 (fbsd_handle_debug_trap): Remove target_ops parameter.
6344 (fbsd_nat_add_target): Delete.
6345 * fbsd-nat.h: Include "inf-ptrace.h".
6346 (fbsd_nat_add_target): Delete.
6347 (USE_SIGTRAP_SIGINFO): Define.
6348 (fbsd_nat_target): New class.
6349
6350 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6351 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6352 (amd64bsd_target): Delete.
6353 * amd64-bsd-nat.h: New file.
6354 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6355 "x86-bsd-nat.h".
6356 (amd64_fbsd_nat_target): New class.
6357 (the_amd64_fbsd_nat_target): New.
6358 (amd64fbsd_read_description): Refactor as method of
6359 amd64_fbsd_nat_target.
6360 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6361 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6362 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6363 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6364 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6365 (i386bsd_target): Delete.
6366 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6367 (i386bsd_fetch_inferior_registers)
6368 (i386bsd_store_inferior_registers): Declare.
6369 (i386_bsd_nat_target): New class.
6370 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6371 (the_i386_fbsd_nat_target): New.
6372 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6373 i386_fbsd_nat_target methods.
6374 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6375 (_initialize_i386fbsd_nat): Adjust to C++ification.
6376 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6377 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6378 (_initialize_x86_bsd_nat): Adjust to C++ification.
6379 * x86-bsd-nat.h: Include "x86-nat.h".
6380 (x86bsd_target): Delete declaration.
6381 (x86bsd_nat_target): New class.
6382
6383 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6384 (the_aarch64_fbsd_nat_target): New.
6385 (aarch64_fbsd_fetch_inferior_registers)
6386 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6387 aarch64_fbsd_nat_target.
6388 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6389 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6390 (the_alpha_bsd_nat_target): New.
6391 (alphabsd_fetch_inferior_registers)
6392 (alphabsd_store_inferior_registers): Refactor as
6393 alpha_bsd_nat_target methods.
6394 (_initialize_alphabsd_nat): Refactor as methods of
6395 alpha_bsd_nat_target.
6396 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6397 (the_amd64_nbsd_nat_target): New.
6398 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6399 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6400 (the_amd64_obsd_nat_target): New.
6401 (_initialize_amd64obsd_nat): Adjust to C++ification.
6402 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6403 (the_arm_fbsd_nat_target): New.
6404 (arm_fbsd_fetch_inferior_registers)
6405 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6406 (_initialize_arm_fbsd_nat): Refactor as methods of
6407 arm_fbsd_nat_target.
6408 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6409 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6410 (the_arm_netbsd_nat_target): New.
6411 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6412 arm_netbsd_nat_target.
6413 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6414 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6415 (the_hppa_nbsd_nat_target): New.
6416 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6417 hppa_nbsd_nat_target methods.
6418 (_initialize_hppanbsd_nat): Adjust to C++ification.
6419 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6420 (the_hppa_obsd_nat_target): New.
6421 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6422 methods of hppa_obsd_nat_target.
6423 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6424 add_target.
6425 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6426 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6427 add_target.
6428 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6429 (_initialize_i386obsd_nat): Use add_target.
6430 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6431 (the_m68k_bsd_nat_target): New.
6432 (m68kbsd_fetch_inferior_registers)
6433 (m68kbsd_store_inferior_registers): Refactor as methods of
6434 m68k_bsd_nat_target.
6435 (_initialize_m68kbsd_nat): Adjust to C++ification.
6436 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6437 (the_mips_fbsd_nat_target): New.
6438 (mips_fbsd_fetch_inferior_registers)
6439 (mips_fbsd_store_inferior_registers): Refactor as methods of
6440 mips_fbsd_nat_target.
6441 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6442 add_target.
6443 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6444 (the_mips_nbsd_nat_target): New.
6445 (mipsnbsd_fetch_inferior_registers)
6446 (mipsnbsd_store_inferior_registers): Refactor as methods of
6447 mips_nbsd_nat_target.
6448 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6449 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6450 (the_mips64_obsd_nat_target): New.
6451 (mips64obsd_fetch_inferior_registers)
6452 (mips64obsd_store_inferior_registers): Refactor as methods of
6453 mips64_obsd_nat_target.
6454 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6455 add_target.
6456 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6457 nbsd_nat_target.
6458 * nbsd-nat.h: Include "inf-ptrace.h".
6459 (nbsd_nat_target): New class.
6460 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6461 (obsd_wait): Refactor as methods of obsd_nat_target.
6462 (obsd_add_target): Delete.
6463 * obsd-nat.h: Include "inf-ptrace.h".
6464 (obsd_nat_target): New class.
6465 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6466 (the_ppc_fbsd_nat_target): New.
6467 (ppcfbsd_fetch_inferior_registers)
6468 (ppcfbsd_store_inferior_registers): Refactor as methods of
6469 ppc_fbsd_nat_target.
6470 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6471 add_target.
6472 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6473 (the_ppc_nbsd_nat_target): New.
6474 (ppcnbsd_fetch_inferior_registers)
6475 (ppcnbsd_store_inferior_registers): Refactor as methods of
6476 ppc_nbsd_nat_target.
6477 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6478 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6479 (the_ppc_obsd_nat_target): New.
6480 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6481 methods of ppc_obsd_nat_target.
6482 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6483 add_target.
6484 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6485 (the_sh_nbsd_nat_target): New.
6486 (shnbsd_fetch_inferior_registers)
6487 (shnbsd_store_inferior_registers): Refactor as methods of
6488 sh_nbsd_nat_target.
6489 (_initialize_shnbsd_nat): Adjust to C++ification.
6490 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6491 (inf_ptrace_xfer_partial): Delete.
6492 (sparc_xfer_partial, sparc_target): Delete.
6493 * sparc-nat.h (sparc_fetch_inferior_registers)
6494 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6495 (sparc_target): Delete function declaration.
6496 (sparc_target): New template class.
6497 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6498 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6499 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6500 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6501 add_target.
6502 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6503 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6504 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6505 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6506 add_target.
6507 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6508 (the_vax_bsd_nat_target): New.
6509 (vaxbsd_fetch_inferior_registers)
6510 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6511 methods.
6512 (_initialize_vaxbsd_nat): Adjust to C++ification.
6513
6514 * bsd-kvm.c (bsd_kvm_target): New class.
6515 (bsd_kvm_ops): Now a bsd_kvm_target.
6516 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6517 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6518 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6519 bsd_kvm_target.
6520 (bsd_kvm_return_one): Delete.
6521 (bsd_kvm_add_target): Adjust to C++ification.
6522
6523 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6524 (nto_procfs_target_procfs): New classes.
6525 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6526 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6527 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6528 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6529 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6530 (procfs_remove_hw_breakpoint, procfs_resume)
6531 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6532 (procfs_kill_inferior, procfs_store_registers)
6533 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6534 as methods of nto_procfs_target.
6535 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6536 (nto_native_ops): Delete.
6537 (procfs_open, procfs_native_open): Delete.
6538 (nto_native_ops): Now an nto_procfs_target_native.
6539 (init_procfs_targets): Adjust to C++ification.
6540 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6541 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6542 Refactor as methods of nto_procfs_target.
6543
6544 * go32-nat.c (go32_nat_target): New class.
6545 (the_go32_nat_target): New.
6546 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6547 (go32_store_registers, go32_xfer_partial, go32_files_info)
6548 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6549 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6550 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6551 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6552 (go32_target): Delete.
6553 (_initialize_go32_nat): Adjust to C++ification.
6554
6555 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6556 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6557 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6558 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6559 gnu_nat_target.
6560 (gnu_target): Delete.
6561 * gnu-nat.h (gnu_target): Delete.
6562 (gnu_nat_target): New class.
6563 * i386-gnu-nat.c (gnu_base_target): New.
6564 (i386_gnu_nat_target): New class.
6565 (the_i386_gnu_nat_target): New.
6566 (_initialize_i386gnu_nat): Adjust to C++ification.
6567
6568 2018-05-02 Pedro Alves <palves@redhat.com>
6569
6570 * bfd-target.c (target_bfd_xclose): Rename to ...
6571 (target_bfd_close): ... this.
6572 (target_bfd_reopen): Adjust.
6573 * target.c (target_close): Remove references to to_xclose.
6574 * target.h (target_ops::to_xclose): Delete.
6575 (target_ops::to_close): Update comments.
6576
6577 2018-05-02 Pedro Alves <palves@redhat.com>
6578
6579 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6580 "linux-nat.h".
6581 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6582 * inf-ptrace.c (inf_ptrace_register_u_offset)
6583 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6584 (inf_ptrace_store_register, inf_ptrace_store_registers)
6585 (inf_ptrace_trad_target): Move to ...
6586 * linux-nat-trad.c: ... this new file.
6587 * linux-nat-trad.h: New file.
6588 * linux-nat.c (linux_target_install_ops): Make extern.
6589 (linux_trad_target): Delete.
6590 * linux-nat.h (linux_trad_target): Delete declaration.
6591 (linux_target_install_ops): Declare.
6592 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6593 "linux-nat.h".
6594
6595 2018-05-02 Pedro Alves <palves@redhat.com>
6596
6597 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6598 procfs_target/add_target here.
6599 * procfs.c (procfs_target): Make static.
6600 (_initialize_procfs): Call add_target here.
6601 * procfs.h (struct target_ops): Remove forward declaration.
6602 (procfs_target): Remove declaration.
6603 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6604
6605 2018-05-02 Pedro Alves <palves@redhat.com>
6606
6607 * procfs.c (procfs_stopped_by_watchpoint)
6608 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6609 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6610 Forward declare.
6611 (procfs_use_watchpoints): Delete, move contents...
6612 (procfs_target): ... here.
6613 * procfs.h (procfs_use_watchpoints): Delete declaration.
6614 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6615 procfs_use_watchpoints.
6616 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6617 procfs_use_watchpoints.
6618
6619 2018-05-02 Tom Tromey <tom@tromey.com>
6620
6621 PR python/20084:
6622 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6623 and var_zuinteger_unlimited.
6624 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6625 and PARAM_ZUINTEGER_UNLIMITED.
6626 (set_parameter_value): Handle var_zuinteger and
6627 var_zuinteger_unlimited.
6628 (add_setshow_generic): Likewise.
6629 (parmpy_init): Likewise.
6630
6631 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6632
6633 PR rust/23124
6634 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6635 pointer is not null before dereferencing it.
6636
6637 2018-04-30 Tom Tromey <tom@tromey.com>
6638
6639 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6640 is_mi_like_p.
6641
6642 2018-04-30 Tom Tromey <tom@tromey.com>
6643
6644 * breakpoint.c (mention): Remove use of is_mi_like_p.
6645 (print_mention_ranged_breakpoint): Likewise.
6646 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6647 of is_mi_like_p.
6648
6649 2018-04-30 Tom Tromey <tom@tromey.com>
6650
6651 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6652
6653 2018-04-30 Tom Tromey <tom@tromey.com>
6654
6655 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6656 (info_spu_event_command): Remove some uses of is_mi_like_p.
6657
6658 2018-04-30 Tom Tromey <tom@tromey.com>
6659
6660 * python/py-framefilter.c (py_print_single_arg)
6661 (enumerate_locals, py_print_args, py_print_frame): Remove some
6662 uses of is_mi_like_p.
6663
6664 2018-04-30 Tom Tromey <tom@tromey.com>
6665
6666 * ui-out.c: Update.
6667 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6668 * ui-out.h (ui_out::is_mi_like_p): Now const.
6669 (ui_out::do_is_mi_like_p): Now const.
6670 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6671
6672 2018-04-30 Tom Tromey <tom@tromey.com>
6673
6674 * varobj.c (varobj_set_visualizer): Use new_reference.
6675 * python/python.c (gdbpy_decode_line): Use new_reference.
6676 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6677 new_reference.
6678
6679 2018-04-30 Tom Tromey <tom@tromey.com>
6680
6681 * varobj.c (install_new_value): Use new_reference.
6682 * value.h (value_incref): Return void. Swap intro comment with
6683 value_decref.
6684 * value.c (set_value_parent): Use new_reference.
6685 (value_incref): Return void. Update intro comment.
6686 (release_value): Use new_reference.
6687 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6688
6689 2018-04-30 Tom Tromey <tom@tromey.com>
6690
6691 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6692 * gdb_bfd.h (new_bfd_ref): Remove.
6693 (gdb_bfd_open): Update comment.
6694 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6695 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6696 (gdb_bfd_fdopenr): Use new_reference.
6697 * exec.c (exec_file_attach): Use new_reference.
6698
6699 2018-04-30 Tom Tromey <tom@tromey.com>
6700
6701 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6702 method.
6703
6704 2018-04-30 Tom Tromey <tom@tromey.com>
6705
6706 * jit.c (jit_read_code_entry): Use type_align.
6707 * i386-tdep.c (i386_gdbarch_init): Don't call
6708 set_gdbarch_long_long_align_bit.
6709 * gdbarch.sh: Remove long_long_align_bit.
6710 * gdbarch.c, gdbarch.h: Rebuild.
6711 * arc-tdep.c (arc_type_align): New function.
6712 (arc_gdbarch_init): Use arc_type_align. Don't call
6713 set_gdbarch_long_long_align_bit.
6714
6715 2018-04-30 Tom Tromey <tom@tromey.com>
6716
6717 * rust-lang.c (rust_type_alignment): Remove.
6718 (rust_composite_type): Use type_align.
6719
6720 2018-04-30 Tom Tromey <tom@tromey.com>
6721
6722 * NEWS: Mention Type.align.
6723 * python/py-type.c (typy_get_alignof): New function.
6724 (type_object_getset): Add "alignof".
6725
6726 2018-04-30 Tom Tromey <tom@tromey.com>
6727
6728 PR exp/17095:
6729 * NEWS: Update.
6730 * std-operator.def (UNOP_ALIGNOF): New operator.
6731 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6732 New.
6733 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6734 * c-lang.c (c_op_print_tab): Add alignof.
6735 * c-exp.y (ALIGNOF): New token.
6736 (exp): Add "ALIGNOF" production.
6737 (ident_tokens): Add _Alignof and alignof.
6738
6739 2018-04-30 Tom Tromey <tom@tromey.com>
6740
6741 * i386-tdep.c (i386_type_align): New function.
6742 (i386_gdbarch_init): Update.
6743 * gdbarch.sh (type_align): New method.
6744 * gdbarch.c, gdbarch.h: Rebuild.
6745 * arch-utils.h (default_type_align): Declare.
6746 * arch-utils.c (default_type_align): New function.
6747 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6748 (struct type) <align_log2>: New field.
6749 <instance_flags>: Now a bitfield.
6750 (TYPE_RAW_ALIGN): New macro.
6751 (type_align, type_raw_align, set_type_align): Declare.
6752 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6753 functions.
6754 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6755 (get_alignment, maybe_set_alignment): New functions.
6756 (read_structure_type, read_enumeration_type, read_array_type)
6757 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6758 (read_subrange_type, read_base_type): Set type alignment.
6759
6760 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6761
6762 * dwarf2read.c (read_index_from_section): Use bool.
6763
6764 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6765
6766 PR gdb/22950
6767 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6768 with #ifdef.
6769
6770 2018-04-29 John Reiser <jreiser@BitWagon.com>
6771
6772 PR build/22873
6773 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6774 last step, and do it atomically.
6775
6776 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6777
6778 * compile/compile-c-types.c (convert_int, convert_float):
6779 Update for C FE v1.
6780
6781 2018-04-27 Tom Tromey <tom@tromey.com>
6782
6783 PR rust/22545:
6784 * rust-lang.c (rust_inclusive_range_type_p): New function.
6785 (rust_range): Handle inclusive ranges.
6786 (rust_compute_range): Likewise.
6787 * rust-exp.y (struct rust_op) <inclusive>: New field.
6788 (DOTDOTEQ): New constant.
6789 (range_expr): Add "..=" productions.
6790 (operator_tokens): Add "..=" token.
6791 (ast_range): Add "inclusive" parameter.
6792 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6793 ranges.
6794 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6795 bounds values.
6796 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6797 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6798 Update comments.
6799 * expprint.c (print_subexp_standard): Handle new bounds values.
6800 (dump_subexp_body_standard): Likewise.
6801
6802 2018-04-27 Tom Tromey <tom@tromey.com>
6803
6804 * configure: Rebuild.
6805 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6806 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6807 "OVERRIDE".
6808 (class symbol_needs_eval_context): Likewise.
6809 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6810 (mock_mapped_index::symbol_name_at): Use "override". Remove
6811 "virtual".
6812 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6813 "override".
6814 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6815 * aarch64-tdep.c (instruction_reader::read): Use "override".
6816 (instruction_reader_test::read): Likewise.
6817 * arm-tdep.c (instruction_reader::read): Use "override".
6818 (instruction_reader_thumb::read): Likewise.
6819
6820 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6821
6822 PR remote/9665
6823 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6824 instead of remote_send.
6825 (remote_send): Remove.
6826
6827 2018-04-26 Pedro Alves <palves@redhat.com>
6828
6829 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6830 find_function_start_sal instead of find_pc_line.
6831
6832 2018-04-26 Pedro Alves <palves@redhat.com>
6833
6834 * breakpoint.c (set_breakpoint_location_function): Handle
6835 mst_data_gnu_ifunc.
6836 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6837 * elfread.c (elf_symtab_read): Give data symbols with
6838 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6839 (elf_rel_plt_read): Update comment.
6840 * linespec.c (convert_linespec_to_sals): Handle
6841 mst_data_gnu_ifunc.
6842 (minsym_found): Handle mst_data_gnu_ifunc.
6843 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6844 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6845 * parse.c (find_minsym_type_and_address): Handle
6846 mst_data_gnu_ifunc.
6847 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6848 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6849 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6850 comment.
6851 <mst_data_gnu_ifunc>: New enumerator.
6852
6853 2018-04-26 Pedro Alves <palves@redhat.com>
6854
6855 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6856 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6857 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6858 Handle it.
6859 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6860 (lookup_minimal_symbol_by_pc): Adjust.
6861 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6862 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6863 * minsyms.h (lookup_msym_prefer): New enum.
6864 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6865 parameter by a lookup_msym_prefer parameter.
6866
6867 2018-04-26 Pedro Alves <palves@redhat.com>
6868
6869 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6870 ends in "@plt" instead of looking at the symbol's section.
6871
6872 2018-04-26 Pedro Alves <palves@redhat.com>
6873
6874 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6875 all references.
6876 (find_pc_partial_function_gnu_ifunc): Rename to ...
6877 (find_pc_partial_function): ... this, and remove references to
6878 'is_gnu_ifunc_p'.
6879 (find_pc_partial_function): Delete old implementation.
6880 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6881
6882 2018-04-26 Pedro Alves <palves@redhat.com>
6883
6884 * linespec.c (struct bound_minimal_symbol_search_key): New.
6885 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6886 skip first line if we found a GNU ifunc minimal symbol by name.
6887 (compare_msymbols): Change parameters to work with a destructured
6888 lhs minsym.
6889 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6890 functions.
6891
6892 2018-04-26 Pedro Alves <palves@redhat.com>
6893
6894 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6895 ifunc targets here. Instead, if we have an ifunc minsym, use its
6896 address/name.
6897 (add_location_to_breakpoint): Store the minsym and the objfile in
6898 the breakpoint location.
6899 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6900 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6901 Record the minsym in the sal.
6902 * symtab.h (symtab_and_line) <msymbol>: New field.
6903
6904 2018-04-26 Pedro Alves <palves@redhat.com>
6905
6906 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6907 unless we actually resolved the ifunc.
6908
6909 2018-04-26 Pedro Alves <palves@redhat.com>
6910
6911 * c-exp.y (variable production): Prefer ifunc minsyms over
6912 regular function symbols.
6913 * symtab.c (find_gnu_ifunc): New function.
6914 * minsyms.h (lookup_msym_prefer): New enum.
6915 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6916 parameter by a lookup_msym_prefer parameter.
6917 * symtab.h (find_gnu_ifunc): New declaration.
6918
6919 2018-04-26 Pedro Alves <palves@redhat.com>
6920
6921 * blockframe.c (find_gnu_ifunc_target_type): New function.
6922 (find_function_type): New.
6923 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6924 return a value with a memory address.
6925 (eval_call): For calls to GNU ifunc functions, try to find the
6926 type of the target function from the type that the resolver
6927 returns.
6928 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6929 symbols.
6930 * infcall.c (find_function_return_type): Delete.
6931 (find_function_addr): Add 'function_type' parameter. For calls to
6932 GNU ifunc functions, try to find the type of the target function
6933 from the type that the resolver returns, and return it via
6934 FUNCTION_TYPE.
6935 (call_function_by_hand_dummy): Adjust to use the function type
6936 returned by find_function_addr.
6937 (find_function_addr): Add 'function_type' parameter and move
6938 description here.
6939 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6940 declarations.
6941
6942 2018-04-26 Pedro Alves <palves@redhat.com>
6943
6944 * c-exp.y (variable production): Skip finding an alias for ifunc
6945 symbols.
6946
6947 2018-04-26 Pedro Alves <palves@redhat.com>
6948
6949 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6950
6951 2018-04-25 Pedro Alves <palves@redhat.com>
6952
6953 * infcmd.c (kill_command): Print the pid as string, not the whole
6954 thread's ptid. Add comment. s/has been killed/killed/ in output
6955 message.
6956 * remote.c (remote_detach_1): Print the pid as string, not the
6957 whole thread's ptid.
6958
6959 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6960 Sergio Durigan Junior <sergiodj@redhat.com>
6961 Pedro Alves <palves@redhat.com>
6962
6963 * infcmd.c (kill_command): Print message when inferior has
6964 been killed.
6965 * inferior.c (print_inferior_events): Remove 'static'. Set as
6966 '1'.
6967 (add_inferior): Improve message printed when
6968 'print_inferior_events' is on.
6969 (exit_inferior): Remove message printed when
6970 'print_inferior_events' is on.
6971 (detach_inferior): Improve message printed when
6972 'print_inferior_events' is on.
6973 (initialize_inferiors): Use 'add_inferior_silent' to set
6974 'current_inferior_'.
6975 * inferior.h (print_inferior_events): Declare here as
6976 'extern'.
6977 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6978 '[Detaching...]' messages when 'print_inferior_events' is on.
6979 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6980 as prefix/suffix for messages. Remove periods. Fix erroneous
6981 'Detaching after fork from child...', replace it by '... from
6982 parent...'.
6983 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6984 prefix/suffix when printing 'Detaching...' messages. Print
6985 them when 'print_inferior_events' is on.
6986 * remote.c (remote_detach_1): Print message when detaching
6987 from inferior and '!is_fork_parent'.
6988
6989 2018-04-24 Tom Tromey <tom@tromey.com>
6990
6991 * cli-out.h: Reindent.
6992
6993 2018-04-24 Tom Tromey <tom@tromey.com>
6994
6995 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6996 (cli_ui_out::do_field_string): Use fputs_filtered.
6997 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6998
6999 2018-04-23 Tom Tromey <tom@tromey.com>
7000
7001 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7002 gdb::unique_xmalloc_ptr.
7003
7004 2018-04-23 Tom Tromey <tom@tromey.com>
7005
7006 * configure: Rebuild.
7007
7008 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7009
7010 PR gdb/23095
7011 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7012 prepare_for_testing. Set normal_bp to r_debug_state if target
7013 is bsd.
7014
7015 2018-04-21 Pedro Alves <palves@redhat.com>
7016 Rajendra SY <rajendra.sy@gmail.com>
7017
7018 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7019 * remote.c (extended_remote_attach): In all-stop mode, mark the
7020 thread as executing.
7021
7022 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7023
7024 * thread.c (thread_apply_all_command): Fix comment.
7025 (thread_command): Fix comment.
7026
7027 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7028
7029 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7030 parameter.
7031 * features/aarch64-core.c (create_feature_aarch64_core):
7032 Regenerate.
7033 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7034 Likewise.
7035 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7036 Likewise.
7037 * features/i386/32bit-avx512.c
7038 (create_feature_i386_32bit_avx512): Likewise.
7039 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7040 Likewise.
7041 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7042 Likewise.
7043 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7044 Likewise.
7045 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7046 Likewise.
7047 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7048 Likewise.
7049 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7050 Likewise.
7051 * features/i386/64bit-avx512.c
7052 (create_feature_i386_64bit_avx512): Likewise.
7053 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7054 Likewise.
7055 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7056 Likewise.
7057 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7058 Likewise.
7059 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7060 Likewise.
7061 * features/i386/64bit-segments.c
7062 (create_feature_i386_64bit_segments): Likewise.
7063 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7064 Likewise.
7065 * features/i386/x32-core.c
7066 (create_feature_i386_x32_core): Likewise.
7067 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7068 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7069 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7070 * target-descriptions.c: In generated code, don't pass xml
7071 filename.
7072
7073 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7074
7075 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7076 (print_xml_feature::visit_post): Likewise.
7077 (print_xml_feature::visit): Likewise.
7078 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7079 (print_xml_feature): Add new class.
7080 * regformats/regdat.sh: Null xmltarget on feature targets.
7081 * target-descriptions.c (struct target_desc): Add xmltarget.
7082 (maintenance_check_tdesc_xml_convert): Add unittest function.
7083 (tdesc_get_features_xml): Add function to get xml.
7084 (maintenance_check_xml_descriptions): Test xml generation.
7085 * xml-tdesc.c (string_read_description_xml): Add function.
7086 * xml-tdesc.h (string_read_description_xml): Add declaration.
7087
7088 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7089
7090 * features/Makefile: Add feature marker to targets with new style
7091 target descriptions.
7092 * regformats/aarch64.dat: Regenerate.
7093 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7094 * regformats/i386/amd64-avx-linux.dat: Likewise.
7095 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7096 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7097 * regformats/i386/amd64-linux.dat: Likewise.
7098 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7099 * regformats/i386/amd64.dat: Likewise.
7100 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7101 * regformats/i386/i386-avx-linux.dat: Likewise.
7102 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7103 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7104 * regformats/i386/i386-linux.dat: Likewise.
7105 * regformats/i386/i386-mmx-linux.dat: Likewise.
7106 * regformats/i386/i386-mpx-linux.dat: Likewise.
7107 * regformats/i386/i386.dat: Likewise.
7108 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7109 * regformats/i386/x32-avx-linux.dat: Likewise.
7110 * regformats/i386/x32-linux.dat: Likewise.
7111 * regformats/tic6x-c62x-linux.dat: Likewise.
7112 * regformats/tic6x-c64x-linux.dat: Likewise.
7113 * regformats/tic6x-c64xp-linux.dat: Likewise.
7114 * regformats/regdat.sh: Parse feature marker.
7115
7116 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7117
7118 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7119 (tdesc_osabi_name): Likewise.
7120 * target-descriptions.c (tdesc_architecture_name): Add new
7121 function.
7122 (tdesc_osabi_name): Likewise.
7123
7124 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7125
7126 * common/tdesc.c (tdesc_predefined_type): Move to here.
7127 (tdesc_named_type): Likewise.
7128 (tdesc_create_vector): Likewise.
7129 (tdesc_create_struct): Likewise.
7130 (tdesc_set_struct_size): Likewise.
7131 (tdesc_create_union): Likewise.
7132 (tdesc_create_flags): Likewise.
7133 (tdesc_create_enum): Likewise.
7134 (tdesc_add_field): Likewise.
7135 (tdesc_add_typed_bitfield): Likewise.
7136 (tdesc_add_bitfield): Likewise.
7137 (tdesc_add_flag): Likewise.
7138 (tdesc_add_enum_value): Likewise.
7139 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7140 (struct tdesc_type_vector): Likewise.
7141 (struct tdesc_type_field): Likewise.
7142 (struct tdesc_type_with_fields): Likewise.
7143 (tdesc_create_enum): Add declaration.
7144 (tdesc_add_typed_bitfield): Likewise.
7145 (tdesc_add_enum_value): Likewise.
7146 * target-descriptions.c (tdesc_type_field): Move from here.
7147 (tdesc_type_builtin): Likewise.
7148 (tdesc_type_vector): Likewise.
7149 (tdesc_type_with_fields): Likewise.
7150 (tdesc_predefined_types): Likewise.
7151 (tdesc_named_type): Likewise.
7152 (tdesc_create_vector): Likewise.
7153 (tdesc_create_struct): Likewise.
7154 (tdesc_set_struct_size): Likewise.
7155 (tdesc_create_union): Likewise.
7156 (tdesc_create_flags): Likewise.
7157 (tdesc_create_enum): Likewise.
7158 (tdesc_add_field): Likewise.
7159 (tdesc_add_typed_bitfield): Likewise.
7160 (tdesc_add_bitfield): Likewise.
7161 (tdesc_add_flag): Likewise.
7162 (tdesc_add_enum_value): Likewise.
7163 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7164 (tdesc_add_typed_bitfield): Likewise.
7165 (tdesc_add_enum_value): Likewise.
7166
7167 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7168
7169 * common/tdesc.c (tdesc_feature::accept): Move to here.
7170 (tdesc_feature::operator==): Likewise.
7171 (tdesc_create_reg): Likewise.
7172 * common/tdesc.h (tdesc_type_kind): Likewise.
7173 (struct tdesc_type): Likewise.
7174 (struct tdesc_feature): Likewise.
7175 * regformats/regdat.sh: Create a feature.
7176 * target-descriptions.c (tdesc_type_kind): Move from here.
7177 (tdesc_type): Likewise.
7178 (tdesc_type_up): Likewise.
7179 (tdesc_feature): Likewise.
7180 (tdesc_create_reg): Likewise.
7181
7182 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7183
7184 * Makefile.in: Add arch/tdesc.c
7185 * common/tdesc.c: New file.
7186 * common/tdesc.h (tdesc_element_visitor): Move to here.
7187 (tdesc_element): Likewise.
7188 (tdesc_reg): Likewise.
7189 (tdesc_reg_up): Likewise.
7190 * regformats/regdef.h (reg): Add offset to constructors.
7191 * target-descriptions.c (tdesc_element_visitor): Move from here.
7192 (tdesc_element): Likewise.
7193 (tdesc_reg): Likewise.
7194 (tdesc_reg_up): Likewise.
7195
7196 2018-04-17 Tom Tromey <tom@tromey.com>
7197
7198 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7199 discriminant field.
7200
7201 2018-04-17 Tom Tromey <tom@tromey.com>
7202
7203 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7204
7205 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7206
7207 * symtab.c (print_symbol_info): Skip printing filename and line
7208 number when `last' is NULL.
7209 (symtab_symbol_info): Use empty string instead of NULL for first
7210 invocation of print_symbol_info.
7211 (rbreak_command): Pass NULL to `last' parameter of
7212 print_symbol_info.
7213
7214 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7215
7216 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7217 instead of nullptr.
7218
7219 2018-04-16 Pedro Alves <palves@redhat.com>
7220
7221 * MAINTAINERS (sh): Remove.
7222 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7223 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7224 (ALLDEPFILES): Remove sh64-tdep.c.
7225 * NEWS: Mentions that support for SH-5/SH64 is removed.
7226 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7227 (sh*-*-openbsd*): Ditto.
7228 (sh64-*-elf*): Remove.
7229 (sh*): Remove.
7230 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7231 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7232 * sh-tdep.c: No longer include "sh64-tdep.h".
7233 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7234 * sh64-tdep.c, sh64-tdep.h: Remove files.
7235
7236 2018-04-16 Pedro Alves <palves@redhat.com>
7237
7238 * MAINTAINERS: Remove m88k.
7239 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7240 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7241 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7242 * NEWS: Mention that support for m88k was removed.
7243 * configure.host (m88*-*-*): Remove support.
7244 * configure.nat (m88k-*-*): Remove support.
7245 * configure.tgt (m88*-*-openbsd*): Remove.
7246 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7247
7248 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7249
7250 * configure.tgt (x86_tobjs): New variable.
7251 (amd64_tobjs, i386_tobjs): Use it.
7252
7253 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7254
7255 * symtab.c (print_symbol_info): Precede the symbol definition by
7256 the line number when available.
7257 * NEWS: Advertise this enhancement.
7258
7259 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7260
7261 * NEWS (New options): announce set/show record btrace cpu.
7262 * btrace.c: Include record-btrace.h.
7263 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7264 the vendor is unknown.
7265 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7266 Maybe overwrite the btrace configuration's cpu.
7267 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7268 (btrace_fetch): Add cpu parameter. Update callers.
7269 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7270 Maybe overwrite the btrace configuration's cpu. Skip enabling
7271 errata workarounds if the vendor is unknown.
7272 * python/py-record-btrace.c: Include record-btrace.h.
7273 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7274 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7275 * record-btrace.c (record_btrace_cpu_state_kind): New.
7276 (record_btrace_cpu): New.
7277 (set_record_btrace_cpu_cmdlist): New.
7278 (record_btrace_get_cpu): New.
7279 (require_btrace_thread, record_btrace_info)
7280 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7281 (cmd_set_record_btrace_cpu_none): New.
7282 (cmd_set_record_btrace_cpu_auto): New.
7283 (cmd_set_record_btrace_cpu): New.
7284 (cmd_show_record_btrace_cpu): New.
7285 (_initialize_record_btrace): Initialize set/show record btrace cpu
7286 commands.
7287 * record-btrace.h (record_btrace_get_cpu): New.
7288
7289 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7290
7291 * record.c (set_record_command): Fix typo in message.
7292
7293 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7294
7295 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7296
7297 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7298
7299 * infrun.c (process_event_stop_test): Call
7300 gdbarch_in_indirect_branch_thunk.
7301 * gdbarch.sh (in_indirect_branch_thunk): New.
7302 * gdbarch.c: Regenerated.
7303 * gdbarch.h: Regenerated.
7304 * x86-tdep.h: New.
7305 * x86-tdep.c: New.
7306 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7307 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7308 (ALLDEPFILES): Add x86-tdep.c.
7309 * arch-utils.h (default_in_indirect_branch_thunk): New.
7310 * arch-utils.c (default_in_indirect_branch_thunk): New.
7311 * i386-tdep: Include x86-tdep.h.
7312 (i386_in_indirect_branch_thunk): New.
7313 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7314 function.
7315 * amd64-tdep: Include x86-tdep.h.
7316 (amd64_in_indirect_branch_thunk): New.
7317 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7318
7319 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7320
7321 PR gdb/23053
7322 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7323 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7324 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7325 regression.
7326
7327 2018-04-12 Tom Tromey <tom@tromey.com>
7328
7329 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7330 (rust_evaluate_subexp): Likewise.
7331
7332 2018-04-12 Pedro Alves <palves@redhat.com>
7333
7334 * procfs.c (procfs_detach): Make forward declaration's prototype
7335 match definition's protototype.
7336 (proc_get_LDT_entry): Remove stale do_cleanups call.
7337
7338 2018-04-12 Pedro Alves <palves@redhat.com>
7339
7340 * target.h (target_ops::to_has_exited): Delete.
7341 (target_has_exited): Delete.
7342 * target-delegates.c: Regenerate.
7343
7344 2018-04-11 Pedro Alves <palves@redhat.com>
7345
7346 * target.c (fileio_fh_t::t): Add comment.
7347 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7348 (target_fileio_close): Handle a NULL target.
7349 (invalidate_fileio_fh): New.
7350 (target_close): Call it.
7351 * remote.c (remote_hostio_send_command): No longer check whether
7352 remote_desc is open.
7353
7354 2018-04-11 Pedro Alves <palves@redhat.com>
7355
7356 * target.c (fileio_fh_t): Make it a named struct instead of a
7357 typedef.
7358 (fileio_fh_t::is_closed): New method.
7359 (DEF_VEC_O (fileio_fh_t)): Remove.
7360 (fileio_fhandles): Now a std::vector.
7361 (is_closed_fileio_fh): Delete.
7362 (acquire_fileio_fd): Adjust. Rename parameters.
7363 (release_fileio_fd): Adjust.
7364 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7365 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7366 (target_fileio_close): Adjust.
7367
7368 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7369
7370 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7371 index.
7372
7373 2018-04-10 Pedro Alves <palves@redhat.com>
7374
7375 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7376 (scoped_finish_thread_state): New class.
7377 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7378 cleanup.
7379 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7380 (fetch_inferior_event, normal_stop): Likewise.
7381 * thread.c (finish_thread_state_cleanup): Delete.
7382
7383 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7384 Pedro Alves <palves@redhat.com>
7385
7386 * value.c: Include "selftest.h" and "common/array-view.h".
7387 (struct range) <operator ==>: New.
7388 (test_ranges_contain): New.
7389 (check_ranges_vector): New.
7390 (test_insert_into_bit_range_vector): New.
7391 (_initialize_values): Register selftests.
7392 * common/array-view.h (operator==, operator!=): New.
7393
7394 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7395
7396 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7397 an iterator.
7398 * inline-frame.c: Include <algorithm>.
7399 (struct inline_state): Add constructor.
7400 (inline_state_s): Remove.
7401 (DEF_VEC_O(inline_state_s)): Remove.
7402 (inline_states): Change type to std::vector.
7403 (find_inline_frame_state): Adjust to std::vector.
7404 (allocate_inline_frame_state): Remove.
7405 (clear_inline_frame_state): Adjust to std::vector.
7406 (skip_inline_frames): Adjust to std::vector.
7407
7408 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7409
7410 * tracepoint.h (struct trace_state_variable): Add constructor.
7411 <name>: Change type to std::string.
7412 * tracepoint.c (tsv_s): Remove.
7413 (DEF_VEC_O(tsv_s)): Remove.
7414 (tvariables): Change to std::vector.
7415 (create_trace_state_variable): Adjust to std::vector.
7416 (find_trace_state_variable): Likewise.
7417 (find_trace_state_variable_by_number): Likewise.
7418 (delete_trace_state_variable): Likewise.
7419 (trace_variable_command): Adjust to std::string.
7420 (delete_trace_variable_command): Likewise.
7421 (tvariables_info_1): Adjust to std::vector.
7422 (save_trace_state_variables): Likewise.
7423 (start_tracing): Likewise.
7424 (merge_uploaded_trace_state_variables): Adjust to std::vector
7425 and std::string.
7426 * target.h (struct target_ops)
7427 <to_download_trace_state_variable>: Pass reference to
7428 trace_state_variable.
7429 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7430 * target-delegates.c: Re-generate.
7431 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7432 (mi_tsv_deleted): Likewise.
7433 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7434 * remote.c (remote_download_trace_state_variable): Change
7435 pointer to reference and adjust.
7436 * make-target-delegates (parse_argtypes): Handle references.
7437 (write_function_header): Likewise.
7438 (munge_type): Likewise.
7439
7440 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7441
7442 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7443 string_view-selftests.c.
7444 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7445 testsuite.
7446 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7447 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7448 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7449 * unittests/basic_string_view/element_access/char/1.cc:
7450 Likewise.
7451 * unittests/basic_string_view/element_access/char/empty.cc:
7452 Likewise.
7453 * unittests/basic_string_view/element_access/char/front_back.cc:
7454 Likewise.
7455 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7456 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7457 Likewise.
7458 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7459 Likewise.
7460 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7461 Likewise.
7462 * unittests/basic_string_view/operations/compare/char/1.cc:
7463 Likewise.
7464 * unittests/basic_string_view/operations/compare/char/13650.cc:
7465 Likewise.
7466 * unittests/basic_string_view/operations/copy/char/1.cc:
7467 Likewise.
7468 * unittests/basic_string_view/operations/data/char/1.cc:
7469 Likewise.
7470 * unittests/basic_string_view/operations/find/char/1.cc:
7471 Likewise.
7472 * unittests/basic_string_view/operations/find/char/2.cc:
7473 Likewise.
7474 * unittests/basic_string_view/operations/find/char/3.cc:
7475 Likewise.
7476 * unittests/basic_string_view/operations/find/char/4.cc:
7477 Likewise.
7478 * unittests/basic_string_view/operations/rfind/char/1.cc:
7479 Likewise.
7480 * unittests/basic_string_view/operations/rfind/char/2.cc:
7481 Likewise.
7482 * unittests/basic_string_view/operations/rfind/char/3.cc:
7483 Likewise.
7484 * unittests/basic_string_view/operations/substr/char/1.cc:
7485 Likewise.
7486 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7487 * unittests/string_view-selftests.c: New file.
7488
7489 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7490
7491 * unittests/basic_string_view/capacity/1.cc: New file.
7492 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7493 * unittests/basic_string_view/cons/char/1.cc: New file.
7494 * unittests/basic_string_view/cons/char/2.cc: New file.
7495 * unittests/basic_string_view/cons/char/3.cc: New file.
7496 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7497 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7498 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7499 * unittests/basic_string_view/element_access/char/1.cc: New file.
7500 * unittests/basic_string_view/element_access/char/2.cc: New file.
7501 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7502 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7503 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7504 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7505 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7506 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7507 * unittests/basic_string_view/include.cc: New file.
7508 * unittests/basic_string_view/inserters/char/1.cc: New file.
7509 * unittests/basic_string_view/inserters/char/2.cc: New file.
7510 * unittests/basic_string_view/inserters/char/3.cc: New file.
7511 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7512 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7513 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7514 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7515 * unittests/basic_string_view/literals/types.cc: New file.
7516 * unittests/basic_string_view/literals/values.cc: New file.
7517 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7518 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7519 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7520 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7521 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7522 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7523 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7524 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7525 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7526 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7527 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7528 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7529 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7530 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7531 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7532 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7533 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7534 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7535 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7536 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7537 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7538 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7539 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7540 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7541 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7542 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7543 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7544 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7545 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7546 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7547 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7548 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7549 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7550 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7551 * unittests/basic_string_view/operators/char/2.cc: New file.
7552 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7553 * unittests/basic_string_view/range_access/char/1.cc: New file.
7554 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7555 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7556 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7557 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7558 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7559 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7560 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7561 * unittests/basic_string_view/typedefs.cc: New file.
7562 * unittests/basic_string_view/types/1.cc: New file.
7563
7564 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7565
7566 * common/gdb_string_view.h: Remove libstdc++ implementation
7567 details, adjust to gdb reality.
7568 * common/gdb_string_view.tcc: Likewise.
7569 * cli/cli-script.c (struct string_view): Remove.
7570 (user_args) <m_args>: Change element type to gdb::string_view.
7571 (user_args::insert_args): Adjust.
7572
7573 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7574
7575 * common/gdb_string_view.h: New file.
7576 * common/gdb_string_view.tcc: New file.
7577
7578 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7579
7580 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7581 * configure: Re-generate.
7582
7583 2018-04-09 Pedro Alves <palves@redhat.com>
7584
7585 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7586 (set_target_gdbarch): Call
7587 gdb::observers::architecture_changed.notify instead of
7588 observer_notify_architecture_changed.
7589
7590 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7591
7592 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7593 (do_restore_current_traceframe_cleanup): Remove.
7594 (restore_current_traceframe_cleanup_dtor): Remove.
7595 (make_cleanup_restore_current_traceframe): Remove.
7596 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7597 New.
7598 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7599 * infrun.c (fetch_inferior_event): Use
7600 scoped_restore_current_traceframe.
7601
7602 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7603
7604 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7605 Remove.
7606 <n_allocated_type_units>: Remove.
7607 <all_type_units>: Change to std::vector.
7608 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7609 to std::vector change.
7610 (dwarf2_per_objfile::get_cutu): Likewise.
7611 (dwarf2_per_objfile::get_tu): Likewise.
7612 (create_signatured_type_table_from_index): Likewise.
7613 (create_signatured_type_table_from_debug_names): Likewise.
7614 (dw2_symtab_iter_next): Likewise.
7615 (dw2_print_stats): Likewise.
7616 (dw2_expand_all_symtabs): Likewise.
7617 (dw2_expand_marked_cus): Likewise.
7618 (dw2_debug_names_iterator::next): Likewise.
7619 (dwarf2_initialize_objfile): Likewise.
7620 (add_signatured_type_cu_to_table): Likewise.
7621 (create_all_type_units): Likewise.
7622 (add_type_unit): Likewise.
7623 (struct tu_abbrev_offset): Add constructor.
7624 (build_type_psymtabs_1): Adjust to std::vector change.
7625 (print_tu_stats): Likewise.
7626 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7627 (write_debug_names): Likewise.
7628
7629 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7630
7631 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7632 Make an std::vector.
7633 <n_comp_units>: Remove.
7634 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7635 to std::vector change.
7636 (dwarf2_per_objfile::get_cutu): Likewise.
7637 (dwarf2_per_objfile::get_cu): Likewise.
7638 (create_cus_from_index): Likewise.
7639 (create_addrmap_from_index): Likewise.
7640 (create_addrmap_from_aranges): Likewise.
7641 (dwarf2_read_index): Likewise.
7642 (dw2_find_last_source_symtab): Likewise.
7643 (dw2_map_symtabs_matching_filename): Likewise.
7644 (dw2_symtab_iter_next): Likewise.
7645 (dw2_print_stats): Likewise.
7646 (dw2_expand_all_symtabs): Likewise.
7647 (dw2_expand_symtabs_with_fullname): Likewise.
7648 (dw2_expand_marked_cus): Likewise.
7649 (dw2_map_symbol_filenames): Likewise.
7650 (create_cus_from_debug_names): Likewise.
7651 (dwarf2_read_debug_names): Likewise.
7652 (dw2_debug_names_iterator::next): Likewise.
7653 (dwarf2_initialize_objfile): Likewise.
7654 (set_partial_user): Likewise.
7655 (dwarf2_build_psymtabs_hard): Likewise.
7656 (read_comp_units_from_section): Remove arguments, adjust to
7657 std::vector change.
7658 (create_all_comp_units): Adjust to std::vector and
7659 read_comp_units_from_section changes.
7660 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7661 change.
7662 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7663 (psyms_seen_size): Likewise.
7664 (write_gdbindex): Likewise.
7665 (write_debug_names): Likewise.
7666
7667 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7668
7669 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7670 with dwarf2_per_objfile.
7671 (create_cus_from_index): Likewise.
7672 (create_signatured_type_table_from_index): Likewise.
7673 (dwarf2_read_index): Likewise.
7674 (dwarf2_initialize_objfile): Likewise.
7675 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7676 per_cu rather than get_dwarf2_per_objfile.
7677
7678 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7679
7680 * dwarf2read.h (struct signatured_type): Forward declare.
7681 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7682 New methods.
7683 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7684 (dw2_get_cutu): ...this.
7685 (dwarf2_per_objfile::get_cu): Rename from...
7686 (dw2_get_cu): ...this.
7687 (dwarf2_per_objfile::get_tu): New.
7688 (create_addrmap_from_index): Adjust.
7689 (create_addrmap_from_aranges): Adjust.
7690 (dw2_find_last_source_symtab): Adjust.
7691 (dw2_map_symtabs_matching_filename): Adjust.
7692 (dw2_symtab_iter_next): Adjust.
7693 (dw2_print_stats): Adjust.
7694 (dw2_expand_all_symtabs): Adjust.
7695 (dw2_expand_symtabs_with_fullname): Adjust.
7696 (dw2_expand_marked_cus): Adjust.
7697 (dw_expand_symtabs_matching_file_matcher): Adjust.
7698 (dw2_map_symbol_filenames): Adjust.
7699 (dw2_debug_names_iterator::next): Adjust.
7700 (dwarf2_initialize_objfile): Adjust.
7701 (set_partial_user): Adjust.
7702 (dwarf2_build_psymtabs_hard): Adjust.
7703
7704 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7705
7706 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7707 Remove unused variables.
7708 (dw2_map_symtabs_matching_filename): Likewise.
7709 (dwarf2_record_block_ranges): Likewise.
7710 (dwarf2_read_addr_index): Likewise.
7711 (follow_die_offset): Likewise.
7712
7713 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7714
7715 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7716 to symbol_file_add_main.
7717
7718 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7719
7720 PR mi/22299
7721 * mi/mi-console.c (do_fputc_async_safe): New.
7722 (mi_console_file::write_async_safe): New.
7723 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7724 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7725 New.
7726 * ui-file.c (ui_file::putstrn): Adjust call to
7727 fputstrn_unfiltered.
7728 * utils.c (printchar): Replace do_fputs and do_fprintf
7729 parameters by do_fputc.
7730 (fputstr_filtered): Adjust call to printchar.
7731 (fputstr_unfiltered): Likewise.
7732 (fputstrn_filtered): Likewise.
7733 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7734 printchar.
7735 * utils.h (do_fputc_ftype): New typedef.
7736 (fputstrn_unfiltered): Add do_fputc parameter.
7737
7738 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7739
7740 * regformats/i386/i386-avx.dat: Remove.
7741
7742 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7743
7744 PR gdb/22979
7745 * amd64-tdep.c (amd64_none_init_abi): New function.
7746 (amd64_x32_none_init_abi): New function.
7747 (_initialize_amd64_tdep): Register handlers for x86-64 and
7748 x64_32 with GDB_OSABI_NONE.
7749 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7750 GDB_OSABI_NONE osabi.
7751
7752 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7753
7754 PR gdb/22980
7755 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7756 GDB_OSABI_NONE.
7757 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7758 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7759
7760 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7761
7762 * common/byte-vector.h (char_vector): New type.
7763 * target.h (target_read_alloc): Return
7764 gdb::optional<byte_vector>.
7765 (target_read_stralloc): Return gdb::optional<char_vector>.
7766 (target_get_osdata): Return gdb::optional<char_vector>.
7767 * target.c (target_read_alloc_1): Templatize. Replacement
7768 manual memory management with vector.
7769 (target_read_alloc): Change return type, adjust.
7770 (target_read_stralloc): Change return type, adjust.
7771 (target_get_osdata): Change return type, adjust.
7772 * auxv.c (struct auxv_info) <length>: Remove.
7773 <data>: Change type to gdb::optional<byte_vector>.
7774 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7775 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7776 (target_auxv_search): Adjust.
7777 (fprint_target_auxv): Adjust.
7778 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7779 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7780 (linux_make_corefile_notes): Adjust.
7781 * osdata.c (get_osdata): Adjust.
7782 * remote.c (remote_get_threads_with_qxfer): Adjust.
7783 (remote_memory_map): Adjust.
7784 (remote_traceframe_info): Adjust.
7785 (btrace_read_config): Adjust.
7786 (remote_read_btrace): Adjust.
7787 (remote_pid_to_exec_file): Adjust.
7788 * solib-aix.c (solib_aix_get_library_list): Adjust.
7789 * solib-dsbt.c (decode_loadmap): Don't free buf.
7790 (dsbt_get_initial_loadmaps): Adjust.
7791 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7792 * solib-target.c (solib_target_current_sos): Adjust.
7793 * tracepoint.c (sdata_make_value): Adjust.
7794 * xml-support.c (xinclude_start_include): Adjust.
7795 (xml_fetch_content_from_file): Adjust.
7796 * xml-support.h (xml_fetch_another): Change return type.
7797 (xml_fetch_content_from_file): Change return type.
7798 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7799 * xml-tdesc.c (file_read_description_xml): Adjust.
7800 (fetch_available_features_from_target): Change return type.
7801 (target_fetch_description_xml): Adjust.
7802 (target_read_description_xml): Adjust.
7803
7804 2018-04-06 Tom Tromey <tom@tromey.com>
7805
7806 * value.c (~value): Update.
7807 (struct value) <contents>: Now unique_xmalloc_ptr.
7808 (value_contents_bits_eq, allocate_value_contents)
7809 (value_contents_raw, value_contents_all_raw)
7810 (value_contents_for_printing, value_contents_for_printing_const)
7811 (set_value_enclosing_type): Update.
7812
7813 2018-04-06 Tom Tromey <tom@tromey.com>
7814
7815 * value.c (range_s): Remove typedef, VEC.
7816 (struct range): Add operator<.
7817 (range_lessthan): Remove.
7818 (ranges_contain): Change type.
7819 (~value): Update.
7820 (struct value) <unavailable, optimized_out>: Now std::vector.
7821 (value_entirely_available)
7822 (value_entirely_covered_by_range_vector)
7823 (value_entirely_unavailable, value_entirely_optimized_out):
7824 Update.
7825 (insert_into_bit_range_vector): Change argument type.
7826 (find_first_range_overlap): Likewise.
7827 (struct ranges_and_idx, value_contents_bits_eq)
7828 (require_not_optimized_out, require_available): Update.
7829 (ranges_copy_adjusted): Change argument types.
7830 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7831
7832 2018-04-06 Tom Tromey <tom@tromey.com>
7833
7834 * value.c (~value): Update.
7835 (struct value) <parent>: Now a value_ref_ptr.
7836 (value_parent, set_value_parent, value_address, value_copy):
7837 Update.
7838
7839 2018-04-06 Tom Tromey <tom@tromey.com>
7840
7841 * value.c (struct value): Add constructor, destructor, and member
7842 initializers.
7843 (allocate_value_lazy, value_decref): Update.
7844
7845 2018-04-06 Tom Tromey <tom@tromey.com>
7846
7847 * value.c (struct value) <released, next>: Remove.
7848 (all_values): Now a std::vector.
7849 (allocate_value_lazy): Update.
7850 (value_next): Remove.
7851 (value_mark, value_free_to_mark, release_value)
7852 (value_release_to_mark): Update.
7853
7854 2018-04-06 Tom Tromey <tom@tromey.com>
7855
7856 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7857 (free_value_chain): Remove.
7858 * value.c (free_value_chain): Remove.
7859 (value_release_to_mark): Return a std::vector.
7860 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7861 std::vector.
7862 (check_condition): Update.
7863 * eval.c (fetch_subexp_value): Change "val_chain" to a
7864 std::vector.
7865 * breakpoint.c (update_watchpoint): Update.
7866 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7867
7868 2018-04-06 Tom Tromey <tom@tromey.com>
7869
7870 * value.h (free_all_values): Remove.
7871 * value.c (free_all_values): Remove.
7872
7873 2018-04-06 Tom Tromey <tom@tromey.com>
7874
7875 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7876 (value_history_chain, value_history_count): Remove.
7877 (value_history): New global.
7878 (record_latest_value, access_value_history, show_values)
7879 (preserve_values): Update.
7880
7881 2018-04-06 Tom Tromey <tom@tromey.com>
7882
7883 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7884 * varobj.c (varobj_set_display_format, varobj_set_value)
7885 (install_default_visualizer, construct_visualizer)
7886 (install_new_value, ~varobj, varobj_get_value_type)
7887 (my_value_of_variable, varobj_editable_p): Update.
7888 * c-varobj.c (c_describe_child, c_value_of_variable)
7889 (cplus_number_of_children, cplus_describe_child): Update.
7890 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7891 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7892 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7893
7894 2018-04-06 Tom Tromey <tom@tromey.com>
7895
7896 * printcmd.c (last_examine_address): Change type to
7897 value_ref_ptr.
7898 (do_examine, x_command): Update.
7899
7900 2018-04-06 Tom Tromey <tom@tromey.com>
7901
7902 * value.c (release_value): Update.
7903 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7904 (struct bpstats) <val>: Now a value_ref_ptr.
7905 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7906 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7907 (~watchpoint, print_it_watchpoint, watch_command_1)
7908 (invalidate_bp_value_on_memory_change): Update.
7909
7910 2018-04-06 Tom Tromey <tom@tromey.com>
7911
7912 * varobj.c (varobj_clear_saved_item)
7913 (update_dynamic_varobj_children, install_new_value, ~varobj):
7914 Update.
7915 * value.h (value_incref): Move declaration earlier.
7916 (value_decref): Rename from value_free.
7917 (struct value_ref_policy): New.
7918 (value_ref_ptr): New typedef.
7919 (struct value_deleter): Remove.
7920 (gdb_value_up): Remove typedef.
7921 (release_value): Change return type.
7922 (release_value_or_incref): Remove.
7923 * value.c (set_value_parent): Update.
7924 (value_incref): Change return type.
7925 (value_decref): Rename from value_free.
7926 (value_free_to_mark, free_all_values, free_value_chain): Update.
7927 (release_value): Return value_ref_ptr.
7928 (release_value_or_incref): Remove.
7929 (record_latest_value, set_internalvar, clear_internalvar):
7930 Update.
7931 * stack.c (info_frame_command): Don't call value_free.
7932 * python/py-value.c (valpy_dealloc, valpy_new)
7933 (value_to_value_object): Update.
7934 * printcmd.c (do_examine): Update.
7935 * opencl-lang.c (lval_func_free_closure): Update.
7936 * mi/mi-main.c (register_changed_p): Don't call value_free.
7937 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7938 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7939 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7940 value_free.
7941 * guile/scm-value.c (vlscm_free_value_smob)
7942 (vlscm_scm_from_value): Update.
7943 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7944 (frame_unwind_register_unsigned, get_frame_register_bytes)
7945 (put_frame_register_bytes): Don't call value_free.
7946 * findvar.c (address_from_register): Don't call value_free.
7947 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7948 * dwarf2loc.c (entry_data_value_free_closure)
7949 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7950 (dwarf2_evaluate_loc_desc_full): Update.
7951 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7952 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7953 (~watchpoint, watch_command_1)
7954 (invalidate_bp_value_on_memory_change): Update.
7955 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7956
7957 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7958
7959 PR gdb/23022
7960 * warning.m4: Add -Wno-error=deprecated-register.
7961 * configure: Re-generate.
7962
7963 2018-04-05 Tom Tromey <tom@tromey.com>
7964
7965 * linespec.h: Remove include of "vec.h".
7966
7967 2018-04-05 Tom Tromey <tom@tromey.com>
7968
7969 * linespec.c (typep): Remove typedef.
7970 (find_methods, find_superclass_methods): Take a std::vector.
7971 (find_method): Use std::vector.
7972
7973 2018-04-05 Tom Tromey <tom@tromey.com>
7974
7975 * utils.c (compare_strings): Remove.
7976 * utils.h (compare_strings): Remove.
7977 * objc-lang.h (find_imps): Update.
7978 * objc-lang.c (find_methods): Take a std::vector.
7979 (uniquify_strings, find_imps): Likewise.
7980 * linespec.c (find_methods): Take a std::vector.
7981 (decode_objc): Use std::vector.
7982 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7983 a std::vector.
7984 (find_method, find_function_symbols): Use std::vector.
7985
7986 2018-04-05 Tom Tromey <tom@tromey.com>
7987
7988 * completer.c (completion_tracker::completion_tracker): Remove
7989 cast.
7990 (completion_tracker::discard_completions): Likewise.
7991 * breakpoint.c (ambiguous_names_p): Remove cast.
7992 * ada-lang.c (_initialize_ada_language): Remove cast.
7993 * utils.h (streq): Update.
7994 (streq_hash): Add new declaration.
7995 * utils.c (streq): Return bool.
7996 (streq_hash): New function.
7997
7998 2018-04-05 Tom Tromey <tom@tromey.com>
7999
8000 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8001 Remove a string copy.
8002
8003 2018-04-05 Tom Tromey <tom@tromey.com>
8004
8005 * linespec.c (filter_results): Use std::vector.
8006 (decode_line_2, decode_line_full): Update.
8007
8008 2018-04-05 Tom Tromey <tom@tromey.com>
8009
8010 * linespec.c (canonical_to_fullform): Return std::string.
8011 (filter_results): Update.
8012 (struct decode_line_2_item): Add constructor.
8013 <fullform, displayform>: Now std::string.
8014 (decode_line_2_compare_items): Now a std::sort comparator.
8015 (decode_line_2): Update.
8016
8017 2018-04-05 Tom Tromey <tom@tromey.com>
8018
8019 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8020 (unexpected_linespec_error): Update.
8021 (linespec_parse_basic, parse_linespec): Update.
8022
8023 2018-04-05 Tom Tromey <tom@tromey.com>
8024
8025 * linespec.c (linespec_parse_basic): Reindent.
8026
8027 2018-04-05 Tom Tromey <tom@tromey.com>
8028
8029 * minsyms.h (iterate_over_minimal_symbols): Update.
8030 * minsyms.c (iterate_over_minimal_symbols): Take a
8031 gdb::function_view.
8032 * linespec.c (struct collect_minsyms): Remove.
8033 (compare_msyms): Now a std::sort comparator.
8034 (add_minsym): Add parameters.
8035 (search_minsyms_for_name): Update. Use std::vector.
8036
8037 2018-04-03 Tom Tromey <tom@tromey.com>
8038
8039 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8040 gdb::byte_vector.
8041
8042 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8043
8044 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8045
8046 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8047
8048 PR gdb/16959
8049 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8050 printing static type.
8051
8052 2018-04-01 Tom Tromey <tom@tromey.com>
8053
8054 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8055 (rs6000_xfer_shared_libraries): Update.
8056
8057 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8058
8059 * common/gdb_vecs.h (char_ptr): Remove.
8060 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8061
8062 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8063
8064 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8065 with std::vector.
8066 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8067
8068 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8069
8070 * tracepoint.h (struct uploaded_tp): Initialize fields.
8071 <actions, step_actions, cmd_strings>: Change type to
8072 std::vector<char *>.
8073 * tracepoint.c (get_uploaded_tp): Allocate with new.
8074 (free_uploaded_tps): Free with delete.
8075 (parse_tracepoint_definition): Adjust to std::vector change.
8076 * breakpoint.c (read_uploaded_action): Likewise.
8077 (create_tracepoint_from_upload): Likewise.
8078 * ctf.c (ctf_write_uploaded_tp): Likewise.
8079 (SET_ARRAY_FIELD): Likewise.
8080 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8081
8082 2018-03-30 Tom Tromey <tom@tromey.com>
8083
8084 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8085 std::unique_ptr.
8086 (svr4_keep_data_in_core): Update.
8087 (svr4_read_so_list): Update.
8088
8089 2018-03-30 Tom Tromey <tom@tromey.com>
8090
8091 * windows-nat.c (handle_output_debug_string, handle_exception):
8092 Update.
8093 * target.h (target_read_string): Update.
8094 * target.c (target_read_string): Change "string" to
8095 unique_xmalloc_ptr.
8096 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8097 Update.
8098 * solib-frv.c (frv_current_sos): Update.
8099 * solib-dsbt.c (dsbt_current_sos): Update.
8100 * solib-darwin.c (darwin_current_sos): Update.
8101 * linux-thread-db.c (inferior_has_bug): Update.
8102 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8103 Update. Remove alloca.
8104 * ada-lang.c (ada_main_name): Update.
8105
8106 2018-03-30 Tom Tromey <tom@tromey.com>
8107
8108 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8109 (struct dwo_file_deleter): New.
8110 (dwo_file_up): New typedef.
8111 (open_and_init_dwo_file): Use dwo_file_up.
8112 (free_dwo_file_cleanup): Remove.
8113
8114 2018-03-30 Tom Tromey <tom@tromey.com>
8115
8116 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8117 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8118
8119 2018-03-30 Tom Tromey <tom@tromey.com>
8120
8121 * dwarf2read.c (class free_cached_comp_units): New class.
8122 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8123 (free_cached_comp_units): Remove function.
8124
8125 2018-03-30 Tom Tromey <tom@tromey.com>
8126
8127 * utils.h (make_cleanup_unpush_target): Remove.
8128 * inf-ptrace.c (struct target_unpusher): New.
8129 (target_unpush_up) New typedef.
8130 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8131 target_unpush_up.
8132 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8133
8134 2018-03-27 Tom Tromey <tom@tromey.com>
8135
8136 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8137
8138 2018-03-27 Pedro Alves <palves@redhat.com>
8139 Tom Tromey <tom@tromey.com>
8140
8141 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8142 destructor. Now a class.
8143 (gdb_readline_wrapper_cleanup): Remove function.
8144 (gdb_readline_wrapper): Remove cleanups.
8145
8146 2018-03-27 Tom Tromey <tom@tromey.com>
8147
8148 * typeprint.h (struct type_print_options) <local_typedefs,
8149 global_typedefs>: Remove "struct" keyword.
8150 (class typedef_hash_table): New class.
8151 (recursively_update_typedef_hash, add_template_parameters)
8152 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8153 (find_typedef_in_hash): Don't declare.
8154 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8155 (typedef_hash_table::recursively_update): Rename from
8156 recursively_update_typedef_hash. Now a member.
8157 (typedef_hash_table::add_template_parameters): Rename from
8158 add_template_parameters. Now a member.
8159 (typedef_hash_table::typedef_hash_table): Now a constructor;
8160 rename from create_typedef_hash.
8161 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8162 rename from free_typedef_hash.
8163 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8164 (do_free_global_table): Remove.
8165 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8166 from copy_type_recursive.
8167 (create_global_typedef_table): Remove.
8168 (typedef_hash_table::find_global_typedef): Now a member of
8169 typedef_hash_table.
8170 (typedef_hash_table::find_typedef): Rename from
8171 find_typedef_in_hash; now a member.
8172 (whatis_exp): Update.
8173 * extension.h (struct ext_lang_type_printers): Add constructor and
8174 destructor.
8175 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8176 declare.
8177 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8178 Now a constructor; rename from start_ext_lang_type_printers.
8179 (ext_lang_type_printers): Now a destructor; rename from
8180 free_ext_lang_type_printers.
8181 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8182 Update.
8183 (c_type_print_base_struct_union): Update. Remove cleanups.
8184
8185 2018-03-27 Tom Tromey <tom@tromey.com>
8186
8187 * dwarf-index-write.c: Include <cmath>.
8188
8189 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8190
8191 * NEWS: Add entry describing new "set|show varsize-limit" command.
8192 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8193 command.
8194 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8195 "set variable".
8196
8197 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8198
8199 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8200 dwarf-index-write.c
8201 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8202 * dwarf-index-common.c: New file.
8203 * dwarf-index-common.h: New file.
8204 * dwarf-index-write.c: New file.
8205 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8206 (struct dwarf2_section_info): Move from here.
8207 (dwarf2_section_info_def): Likewise.
8208 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8209 (offset_type): Likewise.
8210 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8211 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8212 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8213 (byte_swap): Likewise.
8214 (MAYBE_SWAP): Likewise.
8215 (dwarf2_per_cu_ptr): Likewise.
8216 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8217 (struct tu_stats): Likewise.
8218 (struct dwarf2_per_objfile): Likewise.
8219 (struct dwarf2_per_cu_data): Likewise.
8220 (struct signatured_type): Likewise.
8221 (sig_type_ptr): Likewise.
8222 (DEF_VEC_P (sig_type_ptr)): Likewise.
8223 (INDEX4_SUFFIX): Likewise.
8224 (INDEX5_SUFFIX): Likewise.
8225 (DEBUG_STR_SUFFIX): Likewise.
8226 (dwarf2_read_section): Make non-static.
8227 (mapped_index_string_hash): Move from here.
8228 (dwarf5_djb_hash): Likewise.
8229 (file_write): Likewise.
8230 (class data_buf): Likewise.
8231 (struct symtab_index_entry): Likewise.
8232 (struct mapped_symtab): Likewise.
8233 (find_slot): Likewise.
8234 (hash_expand): Likewise.
8235 (add_index_entry): Likewise.
8236 (uniquify_cu_indices): Likewise.
8237 (class c_str_view): Likewise.
8238 (class c_str_view_hasher): Likewise.
8239 (class vector_hasher): Likewise.
8240 (write_hash_table): Likewise.
8241 (psym_index_map): Likewise.
8242 (struct addrmap_index_data): Likewise.
8243 (add_address_entry): Likewise.
8244 (add_address_entry_worker): Likewise.
8245 (write_address_map): Likewise.
8246 (symbol_kind): Likewise.
8247 (write_psymbols): Likewise.
8248 (struct signatured_type_index_data): Likewise.
8249 (write_one_signatured_type): Likewise.
8250 (recursively_count_psymbols): Likewise.
8251 (recursively_write_psymbols): Likewise.
8252 (class debug_names): Likewise.
8253 (check_dwarf64_offsets): Likewise.
8254 (psyms_seen_size): Likewise.
8255 (write_gdbindex): Likewise.
8256 (write_debug_names): Likewise.
8257 (assert_file_size): Likewise.
8258 (write_psymtabs_to_index): Likewise.
8259 (save_gdb_index_command): Likewise.
8260 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8261 command.
8262 * dwarf2read.h: New file.
8263
8264 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8265
8266 PR gdb/22670
8267 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8268 symbol name if the CU's language stores symbol names in linkage
8269 format.
8270 * language.h (struct language_defn)
8271 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8272 all instances of this struct.
8273
8274 2018-03-26 Tom Tromey <tom@tromey.com>
8275
8276 * stack.c (backtrace_command_1): Remove verbose code.
8277
8278 2018-03-26 Tom Tromey <tom@tromey.com>
8279
8280 * python/py-framefilter.c (py_print_type): Don't catch
8281 exceptions. Return void.
8282 (py_print_value): Likewise.
8283 (py_print_single_arg): Likewise.
8284 (enumerate_args): Don't catch exceptions.
8285 (py_print_args): Likewise.
8286 (py_print_frame): Likewise.
8287 (gdbpy_apply_frame_filter): Catch exceptions here.
8288
8289 2018-03-26 Tom Tromey <tom@tromey.com>
8290
8291 * stack.c (_initialize_stack): Remove trailing newlines from help
8292 text. Add "Usage" line to "backtrace" help.
8293
8294 2018-03-26 Tom Tromey <tom@tromey.com>
8295
8296 PR python/16486:
8297 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8298
8299 2018-03-26 Tom Tromey <tom@tromey.com>
8300
8301 * python/py-framefilter.c (py_print_single_arg): Return
8302 EXT_LANG_BT_ERROR from catch.
8303
8304 2018-03-26 Tom Tromey <tom@tromey.com>
8305
8306 PR backtrace/15584:
8307 * stack.c (backtrace_command_1): Move some code into no-filters
8308 "if".
8309
8310 2018-03-26 Tom Tromey <tom@tromey.com>
8311
8312 * python/py-framefilter.c (throw_quit_or_print_exception): New
8313 function.
8314 (gdbpy_apply_frame_filter): Use it.
8315
8316 2018-03-26 Tom Tromey <tom@tromey.com>
8317
8318 PR cli/17716:
8319 * python/py-framefilter.c (py_print_type, py_print_value)
8320 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8321 RETURN_MASK_ERROR.
8322
8323 2018-03-26 Tom Tromey <tom@tromey.com>
8324
8325 * python/py-framefilter.c (enumerate_args): Use
8326 gdb::unique_xmalloc_ptr.
8327
8328 2018-03-26 Tom Tromey <tom@tromey.com>
8329
8330 * python/py-framefilter.c (py_print_frame): Return
8331 EXT_LANG_BT_OK.
8332 (gdbpy_apply_frame_filter): Update comment.
8333 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8334 Remove.
8335 <EXT_LANG_BT_NO_FILTERS>: Change value.
8336
8337 2018-03-26 Tom Tromey <tom@tromey.com>
8338
8339 PR backtrace/15582:
8340 * stack.c (backtrace_command): Parse "hide" argument.
8341 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8342 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8343 constant.
8344
8345 2018-03-26 Tom Tromey <tom@tromey.com>
8346
8347 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8348 add "flags".
8349 (backtrace_command): Remove "fulltrace", add "flags".
8350
8351 2018-03-26 Tom Tromey <tom@tromey.com>
8352
8353 * stack.c (backtrace_command): Rewrite command line parsing.
8354
8355 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8356
8357 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8358
8359 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8360
8361 * filename-seen-cache.h: Add include guard.
8362
8363 2018-03-26 Keith Seitz <keiths@redhat.com>
8364
8365 * symfile.c (place_section): Remove "struct" from section_addr_info
8366 in comment.
8367 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8368 "struct" keyword from section_addr_info.
8369
8370 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8371
8372 * regformats/regdef.h (reg): Add constructors.
8373
8374 2018-03-25 Pedro Alves <palves@redhat.com>
8375
8376 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8377 if then/else bodies in var_func_name extraction.
8378
8379 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8380
8381 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8382 lookup_minimal_symbol() to find symbol entry.
8383 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8384
8385 2018-03-23 Keith Seitz <keiths@redhat.com>
8386
8387 PR c++/22968
8388 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8389 nested type definitions for C++, too.
8390
8391 2018-03-23 Tom Tromey <tom@tromey.com>
8392
8393 * machoread.c (struct oso_el): Add a constructor. Don't define as
8394 a typedef.
8395 (macho_register_oso): Remove.
8396 (macho_symtab_read): Take a std::vector.
8397 (oso_el_compare_name): Now a std::sort comparator.
8398 (macho_symfile_read_all_oso): Take a std::vector.
8399 (macho_symfile_read): Use std::vector. Remove cleanups.
8400
8401 2018-03-22 Tom Tromey <tom@tromey.com>
8402
8403 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8404 (record_full_goto_bookmark): Use std::string.
8405
8406 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8407
8408 PR tdep/18295
8409 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8410 a single mask.
8411
8412 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8413
8414 * rs6000-tdep.c (store_insn_p): New function.
8415 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8416 and cr_reg to their unshifted values. Use store_insn_p to
8417 match LR saves using either R1 or fdata->alloca_reg. Use
8418 store_insn_p to match CR saves. Set alloca_reg_offset
8419 when alloca_reg and framep are set. Remove lr_reg shift
8420 when assigning to fdata->lr_register.
8421
8422 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8423
8424 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8425 command line args instead of emitting a warning.
8426
8427 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8428
8429 * tracepoint.h (struct static_tracepoint_marker): Initialize
8430 fields, define default constructor, move constructor and move
8431 assignment, disable the rest.
8432 <str_id, extra>: Make std::string.
8433 (release_static_tracepoint_marker): Remove.
8434 (free_current_marker): Remove.
8435 * tracepoint.c (free_current_marker): Remove.
8436 (parse_static_tracepoint_marker_definition): Adjust to
8437 std::string, use new hex2str overload.
8438 (release_static_tracepoint_marker): Remove.
8439 (print_one_static_tracepoint_marker): Get marker by reference
8440 and adjust to std::string.
8441 (info_static_tracepoint_markers_command): Adjust to std::vector
8442 changes
8443 * target.h (static_tracepoint_marker_p): Remove typedef.
8444 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8445 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8446 bool.
8447 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8448 * target-debug.h
8449 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8450 (target_debug_print_std_vector_static_tracepoint_marker): New.
8451 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8452 to...
8453 (target_debug_print_static_tracepoint_marker_p): ... this.
8454 * target-delegates.c: Re-generate.
8455 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8456 Make std::string.
8457 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8458 (decode_static_tracepoint_spec): Adjust to std::vector.
8459 (tracepoint_print_one_detail): Adjust to std::string.
8460 (strace_marker_decode_location): Adjust to std::string.
8461 (update_static_tracepoint): Adjust to std::string, remove call
8462 to release_static_tracepoint_marker.
8463 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8464 Adjust to std::vector.
8465 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8466 (remote_static_tracepoint_markers_by_strid): Adjust to
8467 std::vector.
8468 * common/rsp-low.h (hex2str): New overload with explicit count
8469 of bytes.
8470 * common/rsp-low.c (hex2str): New overload with explicit count
8471 of bytes.
8472 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8473 (_initialize_rsp_low_selftests): Add test_hex2str test.
8474 * unittests/tracepoint-selftests.c
8475 (test_parse_static_tracepoint_marker_definition): Adjust to
8476 std::string.
8477
8478 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8479
8480 * tracepoint.c (parse_static_tracepoint_marker_definition):
8481 Consider case where the definition is followed by more
8482 definitions.
8483 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8484 tracepoint-selftests.c.
8485 * unittests/tracepoint-selftests.c: New.
8486
8487 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8488
8489 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8490 Carvalho.
8491
8492 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8493
8494 * symtab.c (find_pc_sect_line): fixed indentation.
8495
8496 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8497
8498 * symtab.c (find_pc_sect_line): now uses binary search.
8499
8500 2018-03-19 Tom Tromey <tom@tromey.com>
8501
8502 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8503 "IDENT" production.
8504
8505 2018-03-19 Pedro Alves <palves@redhat.com>
8506 Tom Tromey <tom@tromey.com>
8507
8508 * unittests/observable-selftests.c: New file.
8509 * common/observable.h: New file.
8510 * observable.h: New file.
8511 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8512 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8513 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8514 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8515 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8516 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8517 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8518 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8519 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8520 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8521 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8522 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8523 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8524 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8525 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8526 tui/tui-interp.c, valops.c: Update all users.
8527 * tui/tui-hooks.c (tui_bp_created_observer)
8528 (tui_bp_deleted_observer, tui_bp_modified_observer)
8529 (tui_inferior_exit_observer, tui_before_prompt_observer)
8530 (tui_normal_stop_observer, tui_register_changed_observer):
8531 Remove.
8532 (tui_observers_token): New global.
8533 (attach_or_detach, tui_attach_detach_observers): New functions.
8534 (tui_install_hooks, tui_remove_hooks): Use
8535 tui_attach_detach_observers.
8536 * record-btrace.c (record_btrace_thread_observer): Remove.
8537 (record_btrace_thread_observer_token): New global.
8538 * observer.sh: Remove.
8539 * observer.c: Rename to observable.c.
8540 * observable.c (namespace gdb_observers): Define new objects.
8541 (observer_debug): Move into gdb_observers namespace.
8542 (struct observer, struct observer_list, xalloc_observer_list_node)
8543 (xfree_observer_list_node, generic_observer_attach)
8544 (generic_observer_detach, generic_observer_notify): Remove.
8545 (_initialize_observer): Update.
8546 Don't include observer.inc.
8547 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8548 (clean mostlyclean): Likewise.
8549 (observer.h, observer.inc): Remove targets.
8550 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8551 (COMMON_SFILES): Use observable.c, not observer.c.
8552 * .gitignore: Remove observer.h.
8553
8554 2018-03-18 Tom Tromey <tom@tromey.com>
8555
8556 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8557 gdb::def_vector.
8558 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8559
8560 2018-03-17 Tom Tromey <tom@tromey.com>
8561
8562 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8563
8564 2018-03-17 Tom Tromey <tom@tromey.com>
8565
8566 * target.c (class scoped_target_fd): New.
8567 (target_fileio_close_cleanup): Remove.
8568 (target_fileio_read_alloc_1): Use scoped_target_fd.
8569
8570 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8571
8572 * silent-rules.mk: New.
8573 * Makefile.in: Include silent-rules.mk
8574 (srcdir, VPATH, top_srcdir): Move up.
8575 (COMPILE): Add ECHO_CXX.
8576 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8577 (init.c): Add ECHO_INIT_C.
8578 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8579 (version.c): Add ECHO_GEN.
8580 (printcmd.o): Add ECHO_CXX.
8581 (target-float.o): Add ECHO_CXX.
8582 (ada-exp.o): Add ECHO_CXX.
8583 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8584 (insight$(EXEEXT)): Add ECHO_CXXLD.
8585 * gnulib/configure.ac: Add AM_SILENT_RULES.
8586 * gnulib/aclocal.m4: Re-generate.
8587 * gnulib/configure: Re-generate.
8588 * gnulib/import/Makefile.in: Re-generate.
8589
8590 2018-03-16 Tom Tromey <tom@tromey.com>
8591
8592 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8593 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8594 * utils.c (do_free_section_addr_info)
8595 (make_cleanup_free_section_addr_info): Remove.
8596 * symfile.h (struct other_sections): Add constructor.
8597 (struct section_addr_info): Remove.
8598 (section_addr_info): New typedef.
8599 (struct sym_fns) <sym_offsets>: Change type of parameter.
8600 (build_section_addr_info_from_objfile)
8601 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8602 (default_symfile_offsets, symbol_file_add)
8603 (symbol_file_add_from_bfd)
8604 (build_section_addr_info_from_section_table): Update.
8605 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8606 * symfile.c (alloc_section_addr_info): Remove.
8607 (build_section_addr_info_from_section_table): Change return type.
8608 Update.
8609 (build_section_addr_info_from_bfd)
8610 (build_section_addr_info_from_objfile): Likewise.
8611 (free_section_addr_info): Remove.
8612 (relative_addr_info_to_section_offsets): Change type of "addrs".
8613 (addrs_section_compar): Now a std::sort comparator.
8614 (addrs_section_sort): Change return type.
8615 (addr_info_make_relative): Change type of "addrs". Update.
8616 (default_symfile_offsets, syms_from_objfile_1)
8617 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8618 (symbol_file_add_separate): Update.
8619 (symbol_file_add): Change type of "addrs". Update.
8620 (add_symbol_file_command): Update. Remove cleanups.
8621 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8622 cleanups.
8623 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8624 * solib.c (solib_read_symbols): Update.
8625 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8626 * machoread.c (macho_symfile_offsets): Update.
8627 * jit.c (jit_bfd_try_read_symtab): Update.
8628
8629 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8630
8631 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8632 unittests/utils-selftests.c.
8633 * unittests/utils-selftests.c: New file.
8634
8635 2018-03-14 Tom Tromey <tom@tromey.com>
8636
8637 PR cli/14977:
8638 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8639 for NULL.
8640
8641 2018-03-14 Tom Tromey <tom@tromey.com>
8642
8643 PR cli/19918:
8644 * printcmd.c (printf_pointer): Allow "-" in format.
8645
8646 2018-03-14 Tom Tromey <tom@tromey.com>
8647
8648 * printcmd.c (_initialize_printcmd): Add usage to printf.
8649
8650 2018-03-14 Yao Qi <qiyao@sourceware.org>
8651
8652 * MAINTAINERS: Update my email address.
8653
8654 2018-03-13 Tom Tromey <tom@tromey.com>
8655
8656 * machoread.c (macho_check_dsym): Change filenamep to a
8657 std::string*.
8658 (macho_symfile_read): Update.
8659 * symfile.c (load_command): Use std::string.
8660
8661 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8662
8663 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8664 to error message string.
8665 (riscv_register_name): Use xsnprintf instead of sprintf.
8666 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8667 internal_error.
8668 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8669 error.
8670 (riscv_push_dummy_call): Likewise.
8671
8672 2018-03-12 Tom Tromey <tom@tromey.com>
8673
8674 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8675 Use gdb::byte_vector.
8676 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8677
8678 2018-03-12 Yao Qi <yao.qi@linaro.org>
8679
8680 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8681 parameter type to readable_regcache.
8682 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8683 the declaration.
8684
8685 2018-03-11 Tom Tromey <tom@tromey.com>
8686
8687 * dwarf2read.c (struct nextfield): Add initializers.
8688 (struct nextfnfield): Remove.
8689 (struct fnfieldlist): Add initializers. Remove "length" and
8690 "head", use std::vector.
8691 (struct decl_field_list): Remove.
8692 (struct field_info): Add initializers.
8693 <fields, baseclasses>: Now std::vector.
8694 <nbaseclasses, nfnfields, typedef_field_list_count,
8695 nested_types_list_count>: Remove.
8696 (dwarf2_add_field, dwarf2_add_type_defn)
8697 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8698 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8699 (process_structure_scope): Update.
8700
8701 2018-03-11 Tom Tromey <tom@tromey.com>
8702
8703 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8704 for use by std::sort.
8705 (build_type_psymtabs_1): Use std::vector.
8706
8707 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8708
8709 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8710 and LIBMPFR in the printed configuration.
8711
8712 2018-03-08 Tom Tromey <tom@tromey.com>
8713
8714 * source.c (get_filename_and_charpos): Use scoped_fd.
8715 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8716 (procfs_pidlist): Likewise.
8717 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8718 (iterate_over_mappings): Likewise.
8719
8720 2018-03-08 Tom Tromey <tom@tromey.com>
8721
8722 * infcall.c (struct call_return_meta_info)
8723 <stack_temporaries_enabled>: Remove.
8724 (get_call_return_value, call_function_by_hand_dummy): Update.
8725 * thread.c (disable_thread_stack_temporaries): Remove.
8726 (enable_thread_stack_temporaries): Remove.
8727 (thread_stack_temporaries_enabled_p): Return bool.
8728 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8729 (get_last_thread_stack_temporary): Update.
8730 * eval.c (evaluate_subexp): Update.
8731 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8732 class, not a function.
8733 (value_ptr, value_vec): Remove typedefs.
8734 (class thread_info) <stack_temporaries_enabled>: Now bool.
8735 <stack_temporaries>: Now a std::vector.
8736 (thread_stack_temporaries_enabled_p)
8737 (value_in_thread_stack_temporaries): Return bool.
8738
8739 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8740
8741 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8742 (getpkt_or_notif_sane_1): Likewise.
8743
8744 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8745
8746 * build-id.c (build_id_to_debug_bfd): Use std::string.
8747
8748 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8749
8750 * build-id.c (find_separate_debug_file_by_buildid): Return
8751 std::string.
8752 * build-id.h (find_separate_debug_file_by_buildid): Return
8753 std::string.
8754 * coffread.c (coff_symfile_read): Adjust to std::string.
8755 * elfread.c (elf_symfile_read): Adjust to std::string.
8756 * symfile.c (separate_debug_file_exists): Change parameter to
8757 std::string.
8758 (find_separate_debug_file): Return std::string.
8759 (find_separate_debug_file_by_debuglink): Return std::string.
8760 * symfile.h (find_separate_debug_file_by_debuglink): Return
8761 std::string.
8762
8763 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8764
8765 * common/xml-utils.c (xml_escape_text): Move code to...
8766 (xml_escape_text_append): ... this new function.
8767 * common/xml-utils.h (xml_escape_text_append): New declaration.
8768 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8769 New function.
8770 (_initialize_xml_utils): register test_xml_escape_text_append as
8771 a selftest.
8772
8773 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8774
8775 * defs.h: Remove MAX_REGISTER_SIZE.
8776 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8777 asserts.
8778 * python/py-unwind.c (pyuw_sniffer): Likewise.
8779
8780 2018-03-07 Tom Tromey <tom@tromey.com>
8781
8782 * linux-tdep.c (linux_info_proc): Update.
8783 * target.h (struct target_ops) <to_fileio_readlink>: Return
8784 optional<string>.
8785 (target_fileio_readlink): Return optional<string>.
8786 * remote.c (remote_hostio_readlink): Return optional<string>.
8787 * inf-child.c (inf_child_fileio_readlink): Return
8788 optional<string>.
8789 * target.c (target_fileio_readlink): Return optional<string>.
8790
8791 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8792
8793 * regcache.c (cooked_read_test): Add riscv to the list of
8794 architectures that have a save_reggroup.
8795
8796 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8797
8798 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8799 value is not a dynamic class object.
8800
8801 2018-03-06 Tom Tromey <tom@tromey.com>
8802
8803 * rust-exp.y: Formatting fixes.
8804
8805 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8806
8807 * riscv-tdep.c (riscv_register_name): Remove target description
8808 support.
8809 (riscv_gdbarch_init): Remove target description check.
8810
8811 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8812
8813 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8814 comment.
8815 * riscv-tdep.h: Likewise.
8816
8817 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8818
8819 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8820 (riscv_pseudo_register_write): Delete.
8821 (riscv_gdbarch_init): Remove all use of pseudo registers.
8822
8823 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8824
8825 * record-btrace.c (btrace_print_lines): Replace cleanup
8826 parameter with RAII equivalents.
8827 (btrace_insn_history): Replace cleanup with RAII equivalents.
8828 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8829 make_cleanup_ui_out_tuple_begin_end): Remove.
8830 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8831 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8832 make_cleanup_ui_out_list_begin_end): Remove.
8833
8834 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8835
8836 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8837 parameter types to std::vector. Use bool.
8838 (record_btrace_wait): Replace VEC(tp_t) with
8839 std::vector<thread_info *>.
8840 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8841
8842 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8843
8844 * record-btrace.c (record_btrace_disable_callback): Remove.
8845 (struct scoped_btrace_disable): New.
8846 (record_btrace_open): Use scoped_btrace_disable.
8847
8848 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8849
8850 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8851 reading values from registers.
8852
8853 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8854
8855 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8856 where appropriate.
8857
8858 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8859
8860 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8861 change parameter type. Use GDB's print functions, and use
8862 core_addr_to_string where appropriate.
8863 (riscv_push_dummy_call): Use core_addr_to_string where
8864 appropriate, update call to riscv_print_arg_location, and reindent
8865 a few lines.
8866 (riscv_return_value): Update call to riscv_print_arg_location.
8867
8868 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8869 Tim Newsome <tim@sifive.com>
8870 Albert Ou <a0u@eecs.berkeley.edu>
8871 Darius Rad <darius@bluespec.com>
8872
8873 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8874 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8875 (ALLDEPFILES): Add riscv-tdep.c
8876 * configure.tgt: Add riscv support.
8877 * riscv-tdep.c: New file.
8878 * riscv-tdep.h: New file.
8879 * NEWS: Mention new target.
8880 * MAINTAINERS: Add entry for riscv.
8881
8882 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8883
8884 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8885 fields within aggregates.
8886
8887 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8888
8889 * record-btrace.c (btrace_print_lines): Change type of flags to
8890 gdb_disassembly_flags.
8891
8892 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8893
8894 * fbsd-nat.c: Include "inf-ptrace.h".
8895 (USE_SIGTRAP_SIGINFO): Conditionally define.
8896 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8897 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8898 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8899 function.
8900 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8901 Likewise.
8902 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8903 Likewise.
8904 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8905 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8906 "supports_stopped_by_hw_breakpoint" target methods.
8907
8908 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8909
8910 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8911 * fbsd-nat.c (debug_fbsd_nat): New variable.
8912 (show_fbsd_nat_debug): New function.
8913 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8914 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8915
8916 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8917
8918 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8919 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8920 prototype.
8921 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8922 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8923 method.
8924
8925 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8926
8927 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8928 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8929
8930 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8931
8932 * charset.c (struct charset_vector): New.
8933 (charsets): Change type to charset_vector.
8934 (find_charset_names): Adjust.
8935 (add_one): Adjust.
8936 (_initialize_charset): Adjust.
8937
8938 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8939
8940 * progspace.h (struct program_space) <deleted_solibs>: Change
8941 type to std::vector<std::string>.
8942 * progspace.c (clear_program_space_solib_cache): Adjust.
8943 * breakpoint.c (print_solib_event): Adjust.
8944 (check_status_catch_solib): Adjust.
8945 * solib.c (update_solib_list): Adjust.
8946 * ui-out.h (class ui_out) <field_string>: New overload.
8947 * ui-out.c (ui_out::field_string): New overload.
8948
8949 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8950
8951 * progspace.h (struct program_space): Add constructor and
8952 destructor, initialize fields.
8953 (add_program_space): Remove.
8954 * progspace.c (add_program_space): Rename to...
8955 (program_space::program_space): ... this.
8956 (release_program_space): Rename to...
8957 (program_space::~program_space): ... this.
8958 (delete_program_space): Use delete to delete program_space.
8959 (initialize_progspace): Use new to allocate program_space.
8960 * inferior.c (add_inferior_with_spaces): Likewise.
8961 (clone_inferior_command): Likewise.
8962 * infrun.c (follow_fork_inferior): Likewise.
8963 (handle_vfork_child_exec_or_exit): Likewise.
8964
8965 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8966
8967 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8968 (delim_string_to_char_ptr_vec): Return std::vector of
8969 gdb::unique_xmalloc_ptr.
8970 (dirnames_to_char_ptr_vec_append): Take std::vector of
8971 gdb::unique_xmalloc_ptr.
8972 (dirnames_to_char_ptr_vec): Return std::vector of
8973 gdb::unique_xmalloc_ptr.
8974 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8975 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8976 (delim_string_to_char_ptr_vec): Return an std::vector of
8977 gdb::unique_xmalloc_ptr, adjust the code.
8978 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8979 gdb::unique_xmalloc_ptr, adjust the code.
8980 (dirnames_to_char_ptr_vec): Return an std::vector of
8981 gdb::unique_xmalloc_ptr, adjust the code.
8982 * auto-load.c (auto_load_safe_path_vec): Change type to
8983 std::vector of gdb::unique_xmalloc_ptr.
8984 (auto_load_expand_dir_vars): Return an std::vector of
8985 gdb::unique_xmalloc_ptr, adjust the code.
8986 (auto_load_safe_path_vec_update): Adjust.
8987 (filename_is_in_auto_load_safe_path_vec): Adjust.
8988 (auto_load_objfile_script_1): Adjust.
8989 * build-id.c (build_id_to_debug_bfd): Adjust.
8990 * linux-thread-db.c (thread_db_load_search): Adjust.
8991 * source.c (add_path): Adjust.
8992 (openp): Adjust.
8993 * symfile.c (find_separate_debug_file): Adjust.
8994 * utils.c (do_free_char_ptr_vec): Remove.
8995 (make_cleanup_free_char_ptr_vec): Remove.
8996
8997 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8998
8999 PR gdb/22907
9000 * common/pathstuff.c: Conditionally include "<windows.h>".
9001
9002 2018-03-01 Georg Sauthoff <mail@georg.so>
9003
9004 PR gdb/22888
9005 * gcore.in: Quote variables and switch interpreter to bash.
9006
9007 2018-03-01 Tom Tromey <tom@tromey.com>
9008
9009 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9010 assertion. Add assertion for discriminant_index.
9011 (quirk_rust_enum): Use correct base type name in univariant case.
9012
9013 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9014
9015 * record.c (get_call_history_modifiers): Return a
9016 record_print_flags.
9017 (cmd_record_call_history): Adjust.
9018 * record-btrace.c (record_btrace_call_history): Adjust.
9019 (record_btrace_call_history_range): Adjust.
9020 (record_btrace_call_history_from): Adjust.
9021 * target-debug.h (target_debug_print_record_print_flags): New.
9022 * target-delegates.c: Re-generate.
9023 * target.c (target_call_history): Change flags type.
9024 (target_call_history_from): Likewise.
9025 (target_call_history_range): Likewise.
9026 * target.h (struct target_ops) <target_call_history>: Likewise.
9027 (target_call_history_from): Likewise.
9028 (target_call_history_range): Likewise.
9029
9030 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9031 Simon Marchi <simon.marchi@polymtl.ca>
9032
9033 * common/common-utils.c: Include "sys/stat.h".
9034 (is_regular_file): Move here from "source.c"; change return
9035 type to "bool".
9036 * common/common-utils.h (is_regular_file): New prototype.
9037 * common/pathstuff.c (contains_dir_separator): New function.
9038 * common/pathstuff.h (contains_dir_separator): New prototype.
9039 * source.c: Don't include "sys/stat.h".
9040 (is_regular_file): Move to "common/common-utils.c".
9041
9042 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9043
9044 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9045 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9046 * auto-load.c: Include "common/pathstuff.h".
9047 * common/common-def.h (current_directory): Move here.
9048 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9049 function.
9050 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9051 prototype.
9052 * common/pathstuff.c: New file.
9053 * common/pathstuff.h: New file.
9054 * compile/compile.c: Include "common/pathstuff.h".
9055 * defs.h (current_directory): Move to "common/common-defs.h".
9056 * dwarf2read.c: Include "common/pathstuff.h".
9057 * exec.c: Likewise.
9058 * guile/scm-safe-call.c: Likewise.
9059 * linux-thread-db.c: Likewise.
9060 * main.c: Likewise.
9061 * nto-tdep.c: Likewise.
9062 * objfiles.c: Likewise.
9063 * source.c: Likewise.
9064 * symtab.c: Likewise.
9065 * utils.c: Include "common/pathstuff.h".
9066 (gdb_realpath): Move to "common/pathstuff.c".
9067 (gdb_realpath_keepfile): Likewise.
9068 (gdb_abspath): Likewise.
9069 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9070 (gdb_realpath_keepfile): Likewise.
9071 (gdb_abspath): Likewise.
9072
9073 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9074
9075 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9076 wildcard process pid for super_resume for kernels with a
9077 specific bug.
9078
9079 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9080
9081 * compile/compile.c (get_args): Add additional comments
9082 explaining function.
9083
9084 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9085 Tom Tromey <tom@tromey.com>
9086
9087 * target.h (memory_write_request_s): Remove typedef. Don't define
9088 VEC.
9089 (target_write_memory_blocks): Change argument to std::vector.
9090 (struct memory_write_request): Add constructor.
9091 * target-memory.c (compare_block_starting_address): Return bool.
9092 Change argument types.
9093 (claim_memory): Change arguments to use std::vector.
9094 (split_regular_and_flash_blocks, blocks_to_erase)
9095 (compute_garbled_blocks): Likewise.
9096 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9097 (target_write_memory_blocks): Change argument to std::vector.
9098 * symfile.c (struct load_section_data): Add constructor and
9099 destructor. Use std::vector for "requests".
9100 (struct load_progress_data): Add initializers.
9101 (load_section_callback): Update. Use "new".
9102 (clear_memory_write_data): Remove.
9103 (generic_load): Update.
9104
9105 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9106
9107 * arch/aarch64.h: Use common/tdesc.h.
9108
9109 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9110
9111 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9112 architecture with a 64-bit ABI.
9113
9114 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9115
9116 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9117 ahead of target description loading.
9118
9119 2018-02-26 Tom Tromey <tom@tromey.com>
9120
9121 * stack.c (backtrace_command_1): Update.
9122 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9123 of "flags".
9124 * python/py-framefilter.c (py_print_frame)
9125 (gdbpy_apply_frame_filter): Change type of "flags".
9126 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9127 of "flags".
9128 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9129 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9130 * extension.h (enum frame_filter_flag): Rename from
9131 frame_filter_flags.
9132 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9133 (apply_ext_lang_frame_filter): Change type of "flags".
9134 * extension.c (apply_ext_lang_frame_filter): Change type of
9135 "flags".
9136 * extension-priv.h (struct extension_language_ops)
9137 <apply_frame_filter>: Change type of "flags".
9138
9139 2018-02-26 Tom Tromey <tom@tromey.com>
9140
9141 PR python/16497:
9142 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9143 off-by-one in py_end computation.
9144 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9145 PRINT_MORE_FRAMES.
9146 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9147 constant.
9148
9149 2018-02-26 Tom Tromey <tom@tromey.com>
9150
9151 * dwarf2read.c (struct variant_field): New.
9152 (struct nextfield) <variant>: New field.
9153 (dwarf2_add_field): Handle DW_TAG_variant_part.
9154 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9155 discriminated union.
9156 (read_structure_type): Handle DW_TAG_variant_part.
9157 (handle_struct_member_die): New function, extracted from
9158 process_structure_scope. Handle DW_TAG_variant.
9159 (process_structure_scope): Handle discriminated unions. Call
9160 handle_struct_member_die.
9161
9162 2018-02-26 Tom Tromey <tom@tromey.com>
9163
9164 * rust-lang.h (rust_last_path_segment): Declare.
9165 * rust-lang.c (rust_last_path_segment): Now public. Change
9166 contract.
9167 (struct disr_info): Remove.
9168 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9169 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9170 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9171 (rust_enum_p, rust_enum_variant): New function.
9172 (rust_underscore_fields): Remove "offset" parameter.
9173 (rust_print_enum): New function.
9174 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9175 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9176 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9177 enums.
9178 (rust_internal_print_type): New function, from rust_print_type.
9179 Remove enum code.
9180 (rust_print_type): Call rust_internal_print_type.
9181 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9182 Update enum handling.
9183 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9184 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9185 (rust_union_quirks): New functions.
9186 (process_full_comp_unit, process_full_type_unit): Call
9187 rust_union_quirks.
9188 (process_structure_scope): Update rust_unions if necessary.
9189
9190 2018-02-26 Tom Tromey <tom@tromey.com>
9191
9192 * value.h (value_union_variant): Declare.
9193 * valops.c (value_union_variant): New function.
9194 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9195 (struct discriminant_info): New.
9196 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9197 enumerator.
9198 (struct main_type) <flag_discriminated_union>: New field.
9199
9200 2018-02-26 Tom Tromey <tom@tromey.com>
9201
9202 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9203 unittests/unpack-selftests.c.
9204 * unittests/unpack-selftests.c: New file.
9205 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9206
9207 2018-02-26 Yao Qi <yao.qi@linaro.org>
9208
9209 * dwarf2read.c (struct partial_die_info) <read>: New method.
9210 (read_partial_die): Remove the declaration.
9211 (load_partial_dies): Update.
9212 (partial_die_info::partial_die_info):
9213 (read_partial_die): Change it to partial_die_info::read.
9214
9215 2018-02-26 Yao Qi <yao.qi@linaro.org>
9216
9217 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9218 (fixup_partial_die): Remove declaration.
9219 (scan_partial_symbols): Update.
9220 (partial_die_parent_scope): Likewise.
9221 (partial_die_full_name): Likewise.
9222 (fixup_partial_die): Change it to partial_die_info::fixup.
9223
9224 2018-02-26 Yao Qi <yao.qi@linaro.org>
9225
9226 * dwarf2read.c (read_partial_die): Update the declaration.
9227 (load_partial_dies): Caller update.
9228 (read_partial_die): Remove one argument abbrev_len.
9229
9230 2018-02-26 Yao Qi <yao.qi@linaro.org>
9231
9232 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9233 assignment operator.
9234 (load_partial_dies): Use ctor and copy ctor.
9235 (read_partial_die): Update.
9236 (dwarf2_cu::find_partial_die): Use ctor.
9237
9238 2018-02-26 Yao Qi <yao.qi@linaro.org>
9239
9240 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9241 (find_partial_die_in_comp_unit): Change it to
9242 dwarf2_cu::find_partial_die.
9243 (find_partial_die): Update.
9244
9245 2018-02-26 Yao Qi <yao.qi@linaro.org>
9246
9247 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9248 is NULL.
9249
9250 2018-02-26 Yao Qi <yao.qi@linaro.org>
9251
9252 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9253
9254 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9255
9256 * arch/amd64.h: Use common/tdesc.h.
9257 * arch/i386.c: Likewise.
9258 * arch/i386.h: Likewise.
9259 * arch/tic6x.c: Likewise.
9260 * arch/tdesc.h: Move file from here...
9261 * common/tdesc.h: ...to here.
9262 * features/aarch64-core.c: Regenerate.
9263 * features/aarch64-fpu.c: Regenerate.
9264 * features/i386/32bit-avx.c: Regenerate.
9265 * features/i386/32bit-avx512.c: Regenerate.
9266 * features/i386/32bit-core.c: Regenerate.
9267 * features/i386/32bit-linux.c: Regenerate.
9268 * features/i386/32bit-mpx.c: Regenerate.
9269 * features/i386/32bit-pkeys.c: Regenerate.
9270 * features/i386/32bit-sse.c: Regenerate.
9271 * features/i386/64bit-avx.c: Regenerate.
9272 * features/i386/64bit-avx512.c: Regenerate.
9273 * features/i386/64bit-core.c: Regenerate.
9274 * features/i386/64bit-linux.c: Regenerate.
9275 * features/i386/64bit-mpx.c: Regenerate.
9276 * features/i386/64bit-pkeys.c: Regenerate.
9277 * features/i386/64bit-segments.c: Regenerate.
9278 * features/i386/64bit-sse.c: Regenerate.
9279 * features/i386/x32-core.c: Regenerate.
9280 * features/tic6x-c6xp.c: Regenerate.
9281 * features/tic6x-core.c: Regenerate.
9282 * features/tic6x-gp.c: Regenerate.
9283 * target-descriptions.c: Use common/tdesc.h.
9284 * target-descriptions.h: Likewise.
9285
9286 2018-02-24 Tom Tromey <tom@tromey.com>
9287
9288 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9289 (try_thread_db_load_from_dir, thread_db_load_search): Use
9290 std::string.
9291 (info_auto_load_libthread_db_compare): Return bool. Change
9292 argument types.
9293 (info_auto_load_libthread_db): Use std::vector, std::string.
9294 Remove cleanups.
9295
9296 2018-02-24 Tom Tromey <tom@tromey.com>
9297
9298 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9299 std::string.
9300 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9301 std::string*.
9302 * gdbarch.c: Rebuild.
9303 * gdbarch.h: Rebuild.
9304 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9305 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9306 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9307 std::string*.
9308
9309 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9310
9311 * gdbtypes.h (sect_offset): Change type to uint64_t.
9312 (sect_offset_str): New function.
9313 * dwarf2read.c (create_addrmap_from_aranges): Use
9314 sect_offset_str.
9315 (error_check_comp_unit_head): Likewise.
9316 (create_debug_type_hash_table): Likewise.
9317 (read_cutu_die_from_dwo): Likewise.
9318 (init_cutu_and_read_dies): Likewise.
9319 (init_cutu_and_read_dies_no_follow): Likewise.
9320 (process_psymtab_comp_unit_reader): Likewise.
9321 (partial_die_parent_scope): Likewise.
9322 (peek_die_abbrev): Likewise.
9323 (process_queue): Likewise.
9324 (dwarf2_physname): Likewise.
9325 (read_namespace_alias): Likewise.
9326 (read_import_statement): Likewise.
9327 (create_dwo_cu_reader): Likewise.
9328 (create_cus_hash_table): Likewise.
9329 (lookup_dwo_cutu): Likewise.
9330 (inherit_abstract_dies): Likewise.
9331 (read_func_scope): Likewise.
9332 (read_call_site_scope): Likewise.
9333 (dwarf2_add_member_fn): Likewise.
9334 (read_common_block): Likewise.
9335 (read_module_type): Likewise.
9336 (read_typedef): Likewise.
9337 (read_subrange_type): Likewise.
9338 (load_partial_dies): Likewise.
9339 (read_partial_die): Likewise.
9340 (find_partial_die): Likewise.
9341 (read_str_index): Likewise.
9342 (dwarf2_string_attr): Likewise.
9343 (build_error_marker_type): Likewise.
9344 (lookup_die_type): Likewise.
9345 (dump_die_shallow): Likewise.
9346 (follow_die_ref): Likewise.
9347 (dwarf2_fetch_die_loc_sect_off): Likewise.
9348 (dwarf2_fetch_constant_bytes): Likewise.
9349 (follow_die_sig): Likewise.
9350 (get_signatured_type): Likewise.
9351 (get_DW_AT_signature_type): Likewise.
9352 (dwarf2_find_containing_comp_unit): Likewise.
9353 (set_die_type): Likewise.
9354
9355 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9356
9357 * arch/aarch64.c: Include "common-defs.h".
9358 * arch/amd64.c: Likewise.
9359 * arch/i386.c: Likewise.
9360
9361 2018-02-21 Tom Tromey <tom@tromey.com>
9362
9363 * value.h: (extract_field_op): Update.
9364 * eval.c (extract_field_op): Return a const char *.
9365 * expression.h (parse_expression_for_completion): Update.
9366 * completer.c (complete_expression): Update.
9367 (add_struct_fields): Make fieldname const.
9368 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9369 (mark_completion_tag, parse_exp_in_context_1): Update.
9370 (parse_expression_for_completion): Change "name" to
9371 unique_xmalloc_ptr*.
9372
9373 2018-02-21 Tom Tromey <tom@tromey.com>
9374
9375 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9376
9377 2018-02-21 Yao Qi <yao.qi@linaro.org>
9378
9379 * avr-tdep.c (avr_read_pc): Change parameter type to
9380 readable_regcache.
9381 * gdbarch.sh (read_pc): Likewise.
9382 * gdbarch.c: Re-generated.
9383 * gdbarch.h: Re-generated.
9384 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9385 readable_regcache.
9386 * ia64-tdep.c (ia64_read_pc): Likewise.
9387 * mips-tdep.c (mips_read_pc): Likewise.
9388 * spu-tdep.c (spu_read_pc): Likewise.
9389
9390 2018-02-21 Yao Qi <yao.qi@linaro.org>
9391
9392 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9393 * regcache-dump.c: New file.
9394 * regcache.c: Move register_dump to regcache-dump.c.
9395 (maintenance_print_registers): Likewise.
9396 (maintenance_print_raw_registers): Likewise.
9397 (maintenance_print_cooked_registers): Likewise.
9398 (maintenance_print_register_groups): Likewise.
9399 (maintenance_print_remote_registers): Likewise.
9400 (_initialize_regcache): Likewise.
9401 * regcache.h (register_dump): Moved from regcache.c.
9402
9403 2018-02-21 Yao Qi <yao.qi@linaro.org>
9404
9405 * regcache.c (regcache::regcache): Update.
9406 (regcache::invalidate): Move it to detached_regcache::invalidate.
9407 (get_thread_arch_aspace_regcache): Update.
9408 (regcache::raw_update): Update.
9409 (regcache::cooked_read): Remove some code.
9410 (regcache::cooked_read_value): Likewise.
9411 (regcache::raw_write): Remove assert on m_readonly_p.
9412 (regcache::raw_supply_integer): Move it to
9413 detached_regcache::raw_supply_integer.
9414 (regcache::raw_supply_zeroed): Likewise.
9415 * regcache.h (detached_regcache) <raw_supply_integer>: New
9416 declaration.
9417 <raw_supply_zeroed, invalidate>: Likewise.
9418 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9419 <invalidate>: Likewise.
9420 <m_readonly_p>: Removed.
9421
9422 2018-02-21 Yao Qi <yao.qi@linaro.org>
9423
9424 * infcmd.c (get_return_value): Let stop_regs point to
9425 get_current_regcache.
9426 * regcache.c (regcache::regcache): Remove.
9427 (register_dump_reg_buffer): New class.
9428 (regcache_print): Adjust.
9429 * regcache.h (regcache): Remove constructors.
9430
9431 2018-02-21 Yao Qi <yao.qi@linaro.org>
9432
9433 * regcache.c (class register_dump): New class.
9434 (register_dump_regcache, register_dump_none): New class.
9435 (register_dump_remote, register_dump_groups): New class.
9436 (regcache_print): Update.
9437 * regcache.h (regcache_dump_what): Move it to regcache.c.
9438 (regcache) <dump>: Remove.
9439
9440 2018-02-21 Yao Qi <yao.qi@linaro.org>
9441
9442 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9443 reg_buffer_rw *.
9444 (jit_unwind_reg_set_impl): Call raw_supply.
9445 (jit_frame_sniffer): Use reg_buffer_rw.
9446 * record-full.c (record_full_core_regbuf): Change its type.
9447 (record_full_core_open_1): Use reg_buffer_rw.
9448 (record_full_close): Likewise.
9449 (record_full_core_fetch_registers): Use regcache->raw_supply.
9450 (record_full_core_store_registers): Likewise.
9451 * regcache.c (regcache::get_register_status): Move it to
9452 reg_buffer.
9453 (regcache_raw_set_cached_value): Remove.
9454 (regcache::raw_set_cached_value): Remove.
9455 (regcache::raw_write): Call raw_supply.
9456 (regcache::raw_supply): Move it to reg_buffer_rw.
9457 * regcache.h (regcache_raw_set_cached_value): Remove.
9458 (reg_buffer_rw): New class.
9459
9460 2018-02-21 Yao Qi <yao.qi@linaro.org>
9461
9462 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9463 readonly_detached_regcache.
9464 (dummy_frame_prev_register): Use regcache->cooked_read.
9465 * frame.c (frame_save_as_regcache): Change return type.
9466 (frame_pop): Update.
9467 * frame.h (frame_save_as_regcache): Update declaration.
9468 * inferior.h (get_infcall_suspend_state_regcache): Update
9469 declaration.
9470 * infrun.c (infcall_suspend_state) <registers>: use
9471 readonly_detached_regcache.
9472 (save_infcall_suspend_state): Don't use regcache_dup.
9473 (get_infcall_suspend_state_regcache): Change return type.
9474 * linux-fork.c (struct fork_info) <savedregs>: Change to
9475 readonly_detached_regcache.
9476 <pc>: New field.
9477 (fork_save_infrun_state): Don't use regcache_dup.
9478 (info_checkpoints_command): Adjust.
9479 * mi/mi-main.c (register_changed_p): Update declaration.
9480 (mi_cmd_data_list_changed_registers): Use
9481 readonly_detached_regcache.
9482 (register_changed_p): Change parameter type to
9483 readonly_detached_regcache.
9484 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9485 readonly_detached_regcache.
9486 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9487 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9488 New.
9489 (regcache::save): Move it to reg_buffer.
9490 (regcache::restore): Change parameter type.
9491 (regcache_dup): Remove.
9492 * regcache.h (reg_buffer) <save>: New method.
9493 (readonly_detached_regcache): New class.
9494 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9495 readonly_detached_regcache.
9496 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9497
9498 2018-02-21 Yao Qi <yao.qi@linaro.org>
9499
9500 * frame.c (frame_save_as_regcache): Use regcache method save.
9501 (frame_pop): Use regcache method restore.
9502 * infrun.c (restore_infcall_suspend_state): Likewise.
9503 * linux-fork.c (fork_load_infrun_state): Likewise.
9504 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9505 save.
9506 * regcache.c (regcache_save): Remove.
9507 (regcache::restore): More asserts.
9508 (regcache_cpy): Remove.
9509 * regcache.h (regcache_save): Remove the declaration.
9510 (regcache::restore): Move from private to public.
9511 Remove the friend declaration of regcache_cpy.
9512 (regcache_cpy): Remove declaration.
9513
9514 2018-02-21 Yao Qi <yao.qi@linaro.org>
9515
9516 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9517 parameter type to 'readable_regcache *'.
9518 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9519 * arm-tdep.c (arm_neon_quad_read): Likewise.
9520 (arm_pseudo_read): Likewise.
9521 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9522 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9523 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9524 * gdbarch.c: Re-generated.
9525 * gdbarch.h: Re-generated.
9526 * gdbarch.sh (pseudo_register_read): Change parameter type to
9527 'readable_regcache *'.
9528 (pseudo_register_read_value): Likewise.
9529 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9530 (h8300_pseudo_register_read): Likewise.
9531 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9532 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9533 (i386_pseudo_register_read_into_value): Likewise.
9534 (i386_pseudo_register_read_value): Likewise.
9535 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9536 declaration.
9537 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9538 * m32c-tdep.c (m32c_raw_read): Likewise.
9539 (m32c_read_flg): Likewise.
9540 (m32c_banked_register): Likewise.
9541 (m32c_banked_read): Likewise.
9542 (m32c_sb_read): Likewise.
9543 (m32c_part_read): Likewise.
9544 (m32c_cat_read): Likewise.
9545 (m32c_r3r2r1r0_read): Likewise.
9546 (m32c_pseudo_register_read): Likewise.
9547 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9548 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9549 (mep_pseudo_cr64_read): Likewise.
9550 (mep_pseudo_register_read): Likewise.
9551 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9552 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9553 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9554 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9555 (regcache::cooked_read): Likewise.
9556 (regcache::cooked_read_value): Likewise.
9557 (regcache_cooked_read_signed):
9558 (regcache::cooked_read): Likewise.
9559 * regcache.h (readable_regcache): New class.
9560 (regcache): Inherit readable_regcache. Move some methods to
9561 readable_regcache.
9562 * rl78-tdep.c (rl78_pseudo_register_read): Change
9563 parameter type to 'readable_regcache *'.
9564 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9565 (e500_pseudo_register_read): Change parameter type to
9566 'readable_regcache *'.
9567 (dfp_pseudo_register_read): Likewise.
9568 (vsx_pseudo_register_read): Likewise.
9569 (efpr_pseudo_register_read): Likewise.
9570 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9571 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9572 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9573 (sh64_pseudo_register_read): Likewise.
9574 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9575 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9576 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9577 (spu_pseudo_register_read): Likewise.
9578 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9579 (xtensa_pseudo_register_read): Likewise.
9580
9581 2018-02-21 Yao Qi <yao.qi@linaro.org>
9582
9583 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9584 (regcache::arch): Move it to reg_buffer::arch.
9585 (regcache::register_buffer): Likewise.
9586 (regcache::assert_regnum): Likewise.
9587 (regcache::num_raw_registers): Likewise.
9588 * regcache.h (reg_buffer): New class.
9589 (regcache): Inherit reg_buffer.
9590
9591 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9592
9593 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9594 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9595
9596 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9597
9598 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9599
9600 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9601
9602 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9603 (SFILES): Remove common/*.c files.
9604 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9605 * common/common.host: Add common reference.
9606 * configure.ac: Likewise.
9607 * configure: Regenerate.
9608
9609 2018-02-16 Yao Qi <yao.qi@linaro.org>
9610
9611 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9612 (block_initialize_namespace): Use new.
9613 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9614 (dwarf2_free_objfile): Use delete.
9615 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9616 (copy_type_recursive): Use new.
9617 * gdb_obstack.h (allocate_on_obstack): New.
9618
9619 2018-02-15 Yao Qi <yao.qi@linaro.org>
9620
9621 PR gdb/22849
9622 * inferior.c (exit_inferior_1): Reset inf->control.
9623
9624 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9625
9626 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9627 declaration.
9628
9629 2018-02-14 Pedro Alves <palves@redhat.com>
9630
9631 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9632 frame_cleanup_after_sniffer on exception.
9633
9634 2018-02-14 Tom Tromey <tom@tromey.com>
9635
9636 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9637 const.
9638 (solib_bfd_open): Make pathname const.
9639 * solib.c (solib_bfd_open): Make pathname const.
9640 * solib-spu.c (spu_bfd_fopen): Make name const.
9641 (spu_bfd_open): Make pathname const.
9642 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9643 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9644
9645 2018-02-14 Tom Tromey <tom@tromey.com>
9646
9647 * symfile.c (symfile_bfd_open): Update.
9648 * source.h (openp, source_full_path_of, find_and_open_source):
9649 Change argument type to unique_xmalloc_ptr.
9650 * source.c (openp): Take a unique_xmalloc_ptr.
9651 (source_full_path_of, find_and_open_source): Likewise.
9652 (open_source_file, symtab_to_fullname): Update.
9653 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9654 unique_xmalloc_ptr.
9655 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9656 (exec_file_find): Update.
9657 * psymtab.c (psymtab_to_fullname): Update.
9658 * nto-tdep.h (nto_find_and_open_solib): Update.
9659 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9660 unique_xmalloc_ptr.
9661 * exec.c (exec_file_attach): Update.
9662 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9663 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9664
9665 2018-02-14 Tom Tromey <tom@tromey.com>
9666
9667 * solib.c: Include source.h.
9668 * nto-tdep.c: Include source.h.
9669 * mi/mi-cmd-env.c: Include source.h.
9670 * infcmd.c: Include source.h.
9671 * exec.c: Include source.h.
9672 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9673 (add_path, directory_switch, source_path, init_source_path): Move
9674 declarations...
9675 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9676 (add_path, directory_switch, source_path, init_source_path):
9677 ...here.
9678
9679 2018-02-14 Tom Tromey <tom@tromey.com>
9680
9681 * solist.h (exec_file_find, solib_find): Return
9682 unique_xmalloc_ptr.
9683 (solib_bfd_fopen): Take a const char *.
9684 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9685 (exec_file_find, solib_find): Likewise.
9686 (solib_bfd_fopen): Do not take ownership of "pathname".
9687 (solib_bfd_open): Use unique_xmalloc_ptr.
9688 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9689 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9690 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9691 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9692
9693 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9694
9695 * ada-lang.c (name_match_type_from_name): Remove reference to
9696 ada_name_for_lookup in function's documentation.
9697 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9698
9699 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9700
9701 * defs.h (enum openp_flags): New enum.
9702 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9703 Move to enum openp_flags.
9704 (openp_flags): New enum flags.
9705 (openp): Change parameter type to openp_flags.
9706 * source.c (openp): Change parameter type to openp_flags.
9707 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9708 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9709
9710 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9711
9712 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9713 per-command.
9714
9715 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9716
9717 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9718 into...
9719 (class dwarf2_queue_guard): ...the destructor of this new class.
9720 (dw2_do_instantiate_symtab): Create instance of the new class
9721 dwarf2_queue_guard, remove cleanup.
9722
9723 2018-02-09 Tom Tromey <tom@tromey.com>
9724
9725 * source.c (find_source_lines): Don't reference past the end of
9726 the vector.
9727
9728 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9729
9730 * remote.c (remote_btrace_maybe_reopen): Change error message.
9731 * btrace.c (btrace_enable): Likewise.
9732 (parse_xml_btrace): Likewise.
9733 (parse_xml_btrace_conf): Likewise.
9734
9735 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9736
9737 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9738 (linux_enable_pt, linux_enable_bts): Call
9739 diagnose_perf_event_open_fail.
9740
9741 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9742
9743 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9744 Remove parameter and change return type. Update callers. Move it.
9745 (linux_enable_bts, linux_enable_pt): Improve error message.
9746 (linux_enable_pt): Remove zero buffer size check.
9747 (linux_enable_btrace): Improve error messages. Remove NULL return
9748 check.
9749
9750 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9751
9752 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9753 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9754 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9755 (linux_supports_pt, linux_supports_btrace): Remove.
9756 (linux_enable_bts): Call cpu_supports_bts.
9757 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9758 * remote.c (remote_supports_btrace): Remove.
9759 (init_remote_ops): Remove remote_supports_btrace.
9760 * target-delegates.c: Regenerated.
9761 * target.c (target_supports_btrace): Remove.
9762 * target.h (target_ops) <to_supports_btrace>: Remove
9763 (target_supports_btrace): Remove.
9764 * x86-linux-nat.c (x86_linux_create_target): Remove
9765 linux_supports_btrace.
9766
9767 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9768
9769 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9770 btrace failed.
9771 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9772 exception and use message in own exception.
9773
9774 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9775
9776 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9777 (perf_event_pt_event_type): Use gdb_file_up.
9778 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9779 scoped_fd, and scoped_mmap.
9780
9781 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9782
9783 * common/scoped_mmap.h: New.
9784 * unittests/scoped_mmap-selftest.c: New.
9785 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9786 unittests/scoped_mmap-selftest.c.
9787
9788 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9789
9790 * common/scoped_fd.h: New.
9791 * unittests/scoped_fd-selftest.c: New.
9792 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9793 unittests/scoped_fd-selftest.c.
9794
9795 2018-02-09 Tom Tromey <tom@tromey.com>
9796
9797 * auto-load.c (auto_load_section_scripts): Use
9798 gdb::unique_xmalloc_ptr.
9799
9800 2018-02-09 Tom Tromey <tom@tromey.com>
9801
9802 * auto-load.c (execute_script_contents): Use std::string.
9803
9804 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9805
9806 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9807 Python function, rather than a new command.
9808
9809 2018-02-08 Tom Tromey <tom@tromey.com>
9810
9811 * solib.c (solib_find_1): Use std::string.
9812 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9813
9814 2018-02-08 Tom Tromey <tom@tromey.com>
9815
9816 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9817
9818 2018-02-08 Tom Tromey <tom@tromey.com>
9819
9820 * source.c (find_source_lines): Use gdb::def_vector.
9821
9822 2018-02-08 Tom Tromey <tom@tromey.com>
9823
9824 * macrocmd.c (struct temporary_macro_definition): New.
9825 (macro_define_command): Use temporary_macro_definition. Remove
9826 cleanups.
9827 (free_macro_definition_ptr): Remove.
9828
9829 2018-02-08 Tom Tromey <tom@tromey.com>
9830
9831 * macroexp.c (maybe_expand): Use std::string.
9832
9833 2018-02-08 Tom Tromey <tom@tromey.com>
9834
9835 * macroexp.c (struct macro_buffer): Add initializers for some
9836 members.
9837 (init_buffer, init_shared_buffer, free_buffer)
9838 (free_buffer_return_text): Remove.
9839 (macro_buffer): New constructors.
9840 (~macro_buffer): New destructor.
9841 (macro_buffer::set_shared): New method.
9842 (macro_buffer::resize_buffer, macro_buffer::appendc)
9843 (macro_buffer::appendmem): Now methods, not free functions.
9844 (set_token, append_tokens_without_splicing, stringify)
9845 (macro_stringify): Update.
9846 (gather_arguments): Change return type. Remove argc_p argument,
9847 add args_ptr argument. Use std::vector.
9848 (substitute_args): Remove argc argument. Accept std::vector.
9849 (expand): Update. Use std::vector.
9850 (scan, macro_expand, macro_expand_next): Update.
9851
9852 2018-02-08 Tom Tromey <tom@tromey.com>
9853
9854 * symtab.c (default_collect_symbol_completion_matches_break_on):
9855 Use unique_xmalloc_ptr.
9856 * macroscope.h: (sal_macro_scope, user_macro_scope)
9857 (default_macro_scope): Return unique_xmalloc_ptr.
9858 * macroscope.c (sal_macro_scope, user_macro_scope)
9859 (default_macro_scope): Return unique_xmalloc_ptr.
9860 * macroexp.h (macro_expand, macro_expand_once): Return
9861 unique_xmalloc_ptr.
9862 * macroexp.c (macro_expand, macro_expand_once): Return
9863 unique_xmalloc_ptr.
9864 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9865 (info_macro_command, info_macros_command): Use
9866 unique_xmalloc_ptr.
9867 * compile/compile-c-support.c (write_macro_definitions): Use
9868 unique_xmalloc_ptr.
9869 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9870
9871 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9872
9873 * value.c (value_static_field): Assign field type instead of
9874 containing type when returning an optimized out value.
9875
9876 2018-02-06 Yao Qi <yao.qi@linaro.org>
9877
9878 * ft32-tdep.c (ft32_read_pc): Remove.
9879 (ft32_write_pc): Remove.
9880 (ft32_gdbarch_init): Update.
9881 * m32r-tdep.c (m32r_read_pc): Remove.
9882 (m32r_gdbarch_init): Update.
9883 * mep-tdep.c (mep_read_pc): Remove.
9884 (mep_gdbarch_init): Update.
9885 * microblaze-tdep.c (microblaze_write_pc): Remove.
9886 (microblaze_gdbarch_init): Update.
9887 * mn10300-tdep.c (mn10300_read_pc): Remove.
9888 (mn10300_write_pc): Remove.
9889 (mn10300_gdbarch_init): Update.
9890 * moxie-tdep.c (moxie_read_pc): Remove.
9891 (moxie_write_pc): Remove.
9892 (moxie_gdbarch_init): Update.
9893
9894 2018-02-06 Yao Qi <yao.qi@linaro.org>
9895
9896 * expprint.c (print_subexp_standard): Handle
9897 OP_F77_UNDETERMINED_ARGLIST.
9898 (dump_subexp_body_standard): Likewise.
9899
9900 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9901
9902 * target-descriptions.c (tdesc_element_visitor) Add empty
9903 implementations.
9904 (tdesc_type): Move make_gdb_type from here.
9905 (tdesc_type_builtin): Likewise.
9906 (tdesc_type_vector): Likewise.
9907 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9908 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9909 (make_gdb_type_union): Likewise.
9910 (make_gdb_type_flags): Likewise.
9911 (make_gdb_type_enum): Likewise.
9912 (make_gdb_type): New function.
9913 (tdesc_register_type): Use static make_gdb_type.
9914
9915 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9916
9917 * infcmd.c (default_print_one_register_info): Align natural-format
9918 column values consistently one under another.
9919 (pad_to_column): New function.
9920
9921 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9922
9923 * dwarf2read.c (dwarf2_physname): Move commment.
9924
9925 2018-02-01 Leszek Swirski <leszeks@google.com>
9926
9927 * varobj.c (varobj_formatted_print_options): Allow recursive
9928 pretty printing if pretty printing is enabled.
9929
9930 2018-02-01 Leszek Swirski <leszeks@google.com>
9931
9932 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9933 names after a structop as a filename.
9934
9935 2018-02-01 Yao Qi <yao.qi@linaro.org>
9936
9937 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9938 (arm_record_coproc_data_proc): Likewise.
9939
9940 2018-02-01 Yao Qi <yao.qi@linaro.org>
9941
9942 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9943
9944 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9945
9946 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9947 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9948
9949 2018-01-31 Pedro Alves <palves@redhat.com>
9950
9951 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9952 * inflow.c (child_terminal_save_inferior): Wrap reference to
9953 tcgetpgrp in HAVE_TERMIOS_H.
9954 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9955 _WIN32.
9956 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9957 always iterate over all inferiors.
9958 (gdbsim_cntrl_c): Adjust.
9959 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9960
9961 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9962
9963 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9964 index type is objfile-owned if the element type is as well.
9965
9966 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9967
9968 GDB 8.1 released.
9969
9970 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9971
9972 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9973 "features/s390x-linux64.c".
9974 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9975 s390_linux32 and s390x_linux64.
9976 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9977 default tdesc.
9978 * s390-tdep.c: Include "features/s390-linux32.c" and
9979 "features/s390x-linux64.c".
9980 (s390_tdesc_valid): Add check for tdesc_has_registers.
9981 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9982 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9983 tdesc_s390x_linux64.
9984 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9985 tdesc_s390x_linux64 to...
9986 * s390-tdep.h: ...here.
9987
9988 2018-01-30 Pedro Alves <palves@redhat.com>
9989
9990 PR gdb/13211
9991 * config.in, configure: Regenerate.
9992 * configure.ac: Check for getpgid.
9993 * go32-nat.c (go32_pass_ctrlc): New.
9994 (go32_target): Install it.
9995 * inf-child.c (inf_child_target): Install
9996 child_terminal_save_inferior, child_pass_ctrlc and
9997 child_interrupt.
9998 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9999 (inf_ptrace_target): No longer install it.
10000 * infcmd.c (interrupt_target_1): Adjust.
10001 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10002 (child_interrupt): Declare.
10003 (inferior::terminal_state): New.
10004 * inflow.c (struct terminal_info): Update comments.
10005 (inferior_process_group): Delete.
10006 (terminal_is_ours): Delete.
10007 (gdb_tty_state): New.
10008 (child_terminal_init): Adjust.
10009 (is_gdb_terminal, sharing_input_terminal_1)
10010 (sharing_input_terminal): New functions.
10011 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10012 Set the process's actual process group in the foreground if
10013 possible. Handle is_ours_for_output/is_ours distinction. Don't
10014 mark terminal as the inferior's if not sharing GDB's terminal.
10015 Don't check attach_flag.
10016 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10017 pass down a target_terminal_state.
10018 (child_terminal_save_inferior): New, factored out from ...
10019 (child_terminal_ours_1): ... this. Handle
10020 target_terminal_state::is_ours_for_output.
10021 (child_interrupt, child_pass_ctrlc): New.
10022 (inflow_inferior_exit): Clear the inferior's terminal_state.
10023 (copy_terminal_info): Copy the inferior's terminal state.
10024 (_initialize_inflow): Remove reference to terminal_is_ours.
10025 * inflow.h (inferior_process_group): Delete.
10026 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10027 * procfs.c (procfs_target): Don't install procfs_interrupt.
10028 (procfs_interrupt): Delete.
10029 * remote.c (remote_serial_quit_handler): Adjust.
10030 (remote_interrupt): Remove ptid parameter. Adjust.
10031 * target-delegates.c: Regenerate.
10032 * target.c: Include "terminal.h".
10033 (target_terminal::terminal_state): Rename to ...
10034 (target_terminal::m_terminal_state): ... this.
10035 (target_terminal::init): Adjust.
10036 (target_terminal::inferior): Adjust to per-inferior
10037 terminal_state.
10038 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10039 (target_terminal::ours, target_terminal::ours_for_output): Use
10040 target_terminal_is_ours_kind.
10041 (target_interrupt): Remove ptid parameter. Adjust.
10042 (default_target_pass_ctrlc): Adjust.
10043 * target.h (target_ops::to_terminal_save_inferior): New field.
10044 (target_ops::to_interrupt): Remove ptid_t parameter.
10045 (target_interrupt): Remove ptid_t parameter. Update comment.
10046 (target_pass_ctrlc): Update comment.
10047 * target/target.h (target_terminal_state): New scoped enum,
10048 factored out of ...
10049 (target_terminal::terminal_state): ... here.
10050 (target_terminal::inferior): Update comments.
10051 (target_terminal::restore_inferior): New.
10052 (target_terminal::is_inferior, target_terminal::is_ours)
10053 (target_terminal::is_ours_for_output): Adjust.
10054 (target_terminal::scoped_restore_terminal_state): Adjust to
10055 rename, and call restore_inferior() instead of inferior().
10056 (target_terminal::scoped_restore_terminal_state::m_state): Change
10057 type.
10058 (target_terminal::terminal_state): Rename to ...
10059 (target_terminal::m_terminal_state): ... this and change type.
10060
10061 2018-01-30 Pedro Alves <palves@redhat.com>
10062
10063 * linux-nat.c (wait_for_signal): New function.
10064 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10065 directly.
10066 (async_terminal_is_ours)
10067 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10068 (linux_nat_add_target): Don't override
10069 to_terminal_inferior/to_terminal_ours.
10070
10071 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10072
10073 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10074
10075 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10076
10077 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10078 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10079 dwarf2_per_objfile_free here.
10080 (dwarf2_per_objfile_free): Remove.
10081 (_initialize_dwarf2_read): Don't register
10082 dwarf2_per_objfile_free as a registry cleanup.
10083
10084 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10085
10086 Avoid compilation errors in MinGW native builds
10087
10088 The error is triggered by including python-internal.h, and the
10089 error message is:
10090
10091 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10092 from build-gnulib/import/math.h:27,
10093 from d:/usr/Python26/include/pyport.h:235,
10094 from d:/usr/Python26/include/Python.h:58,
10095 from python/python-internal.h:94,
10096 from python/py-arch.c:24:
10097 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10098 using ::hypot;
10099 ^~~~~
10100
10101 This happens because Python headers define 'hypot' to expand t
10102 '_hypot' in the Windows builds.
10103 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10104 'hypoth'. This avoids a compilation error.
10105
10106 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10107
10108 * MAINTAINERS (Write After Approval): Fix ordering.
10109
10110 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10111
10112 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10113
10114 2018-01-26 Alan Modra <amodra@gmail.com>
10115
10116 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10117 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10118 Remove nop. Make const. Comment.
10119 (powerpc32_plt_stub_so_2): New.
10120 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10121 Correct count. Update uses.
10122 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10123 Move common code reading PLT entry word. Correct
10124 powerpc32_plt_stub PLT address calculation.
10125 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10126 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10127 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10128 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10129 (ppc64_standard_linkage8): Likewise.
10130 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10131 Correct insns description.
10132 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10133
10134 2018-01-24 Pedro Alves <palves@redhat.com>
10135
10136 GCC PR libstdc++/83906
10137 * gdbtypes.c (operator==(const dynamic_prop &,
10138 const dynamic_prop &)): New.
10139 (operator==(const range_bounds &, const range_bounds &)): New.
10140 (check_types_equal): Use them instead of memcmp.
10141 * gdbtypes.h (operator==(const dynamic_prop &,
10142 const dynamic_prop &)): Declare.
10143 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10144 (operator==(const range_bounds &, const range_bounds &)): Declare.
10145 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10146
10147 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10148
10149 * s390-linux-tdep.c (s390_record_address_mask)
10150 (s390_record_calc_disp_common, s390_record_calc_disp)
10151 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10152 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10153 (s390_process_record): Move to s390-tdep.c.
10154 (s390_linux_init_abi_any): Adjust.
10155 * s390-tdep.c (s390_record_address_mask)
10156 (s390_record_calc_disp_common, s390_record_calc_disp)
10157 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10158 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10159 (s390_process_record): Moved from s390-linux-tdep.c
10160 (s390_gdbarch_init): Adjust.
10161
10162 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10163
10164 * s390-linux-nat.c (s390-tdep.h): New include.
10165 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10166 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10167 (ALLDEPFILES): Add s390-tdep.c.
10168 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10169 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10170 * s390-tdep.h: ...this. New file.
10171 * s390-linux-tdep.c (s390-tdep.h): New include.
10172 (_initialize_s390_tdep): Rename to...
10173 (_initialize_s390_linux_tdep): ...this and adjust.
10174 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10175 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10176 s390-tdep.h.
10177 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10178 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10179 (s390_is_partial_instruction, s390_software_single_step)
10180 (is_non_branch_ril, s390_displaced_step_copy_insn)
10181 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10182 (s390_prologue_data, s390_addr, s390_store, s390_load)
10183 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10184 (s390_register_call_saved, s390_guess_tracepoint_registers)
10185 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10186 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10187 (s390_pseudo_register_name, s390_pseudo_register_type)
10188 (s390_pseudo_register_read, s390_pseudo_register_write)
10189 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10190 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10191 (s390_addr_bits_remove, s390_address_class_type_flags)
10192 (s390_address_class_type_flags_to_name)
10193 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10194 (s390_function_arg_float, s390_function_arg_vector)
10195 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10196 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10197 (s390_frame_align, s390_register_return_value, s390_return_value)
10198 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10199 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10200 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10201 (s390_trad_frame_prev_register, s390_unwind_cache)
10202 (s390_prologue_frame_unwind_cache)
10203 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10204 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10205 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10206 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10207 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10208 (s390_frame_base_address, s390_local_base_address)
10209 (s390_frame_base, s390_gcc_target_options)
10210 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10211 (s390_validate_reg_range, s390_tdesc_valid)
10212 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10213 * s390-tdep.c: ...this. New file.
10214
10215 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10216
10217 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10218 (s390_process_record, s390_gdbarch_tdep_alloc)
10219 (s390_linux_init_abi_any): Use/set new hook.
10220
10221 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10222
10223 * s390-linux-tdep.c (osabi.h): New include.
10224 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10225 (s390_linux_init_abi_any): New functions.
10226 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10227
10228 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10229
10230 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10231 tdesc_has_registers check
10232
10233 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10234
10235 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10236 (s390_validate_reg_range): New macro.
10237 (s390_gdbarch_init): Adjust.
10238
10239 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10240
10241 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10242 (s390_gdbarch_tdep_alloc): Adjust.
10243 (s390_gdbarch_init): Adjust.
10244
10245 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10246
10247 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10248 <have_tdb>: Change type to bool.
10249 (s390_gdbarch_tdep_alloc): Adjust.
10250 (s390_gdbarch_init): Adjust.
10251
10252 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10253
10254 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10255 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10256 (s390_gdbarch_tdep_alloc): New function.
10257 (s390_gdbarch_init): Allocate tdep at start and use its fields
10258 instead of separate variables.
10259
10260 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10261
10262 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10263 when looking for cached gdbarch and add comment for remaining.
10264
10265 2018-01-22 Pedro Alves <palves@redhat.com>
10266 Sergio Durigan Junior <sergiodj@redhat.com>
10267
10268 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10269 case.
10270
10271 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10272
10273 * MAINTAINERS: Update my company e-mail address.
10274
10275 2018-01-22 Yao Qi <yao.qi@linaro.org>
10276
10277 * regcache.c (cooked_write_test): New function.
10278 (_initialize_regcache): Register the test.
10279
10280 2018-01-22 Yao Qi <yao.qi@linaro.org>
10281
10282 * ia64-tdep.c (ia64_pseudo_register_read): Call
10283 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10284 * m32c-tdep.c (m32c_cat_read): Likewise.
10285 (m32c_r3r2r1r0_read): Likewise.
10286 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10287 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10288
10289 2018-01-22 Yao Qi <yao.qi@linaro.org>
10290
10291 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10292 method raw_read instead of regcache_raw_read.
10293 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10294 * arm-tdep.c (arm_neon_quad_read): Likewise.
10295 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10296 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10297 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10298 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10299 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10300 (i386_pseudo_register_read_into_value): Likewise.
10301 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10302 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10303 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10304 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10305 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10306 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10307 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10308 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10309 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10310
10311 2018-01-22 Yao Qi <yao.qi@linaro.org>
10312
10313 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10314 * configure.tgt: Remove target mt.
10315 * mt-tdep.c: Remove.
10316 * regcache.c (cooked_read_test): Remove the check for mt.
10317
10318 2018-01-22 Yao Qi <yao.qi@linaro.org>
10319
10320 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10321 instead of gdbarch_pseudo_register_read_value.
10322
10323 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10324
10325 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10326 language is Ada.
10327
10328 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10329
10330 * linespec.c (create_sals_line_offset): Remove code that preserved
10331 the symtab_and_line's line number.
10332
10333 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10334
10335 * varobj.c (varobj_create): Don't set valid_block when creating a
10336 floating varobj.
10337
10338 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10339
10340 * varobj.c (varobj_create): Remove out of date comment.
10341
10342 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10343
10344 PR mi/20395
10345 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10346 updating innermost block.
10347 * parse.c (innermost_block_tracker::update): Take extra type
10348 parameter, and check types match before updating innermost block.
10349 (write_dollar_variable): Update innermost block for registers.
10350 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10351 (innermost_block_tracker::innermost_block_tracker): Initialise
10352 m_types member.
10353 (innermost_block_tracker::reset): Take type parameter.
10354 (innermost_block_tracker::update): Take type parameter, and pass
10355 type through as needed.
10356 (innermost_block_tracker::m_types): New member.
10357 * varobj.c (varobj_create): Pass type when reseting innermost
10358 block.
10359
10360 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10361
10362 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10363 * ada-lang.c (resolve_subexp): Likewise.
10364 * breakpoint.c (set_breakpoint_condition) Likewise.
10365 (watch_command_1) Likewise.
10366 * c-exp.y (variable): Likewise.
10367 * d-exp.y (PrimaryExpression): Likewise.
10368 * f-exp.y (variable): Likewise.
10369 * go-exp.y (variable): Likewise.
10370 * m2-exp.y (variable): Likewise.
10371 * objfiles.c (objfile::~objfile): Likewise.
10372 * p-exp.y (variable): Likewise.
10373 * parse.c (innermost_block): Change type.
10374 * parser-defs.h (class innermost_block_tracker): New.
10375 (innermost_block): Change to innermost_block_tracker.
10376 * printcmd.c (display_command): Switch to innermost_block API.
10377 (do_one_display): Likewise.
10378 * rust-exp.y (do_one_display): Likewise.
10379 * symfile.c (clear_symtab_users): Likewise.
10380 * varobj.c (varobj_create): Switch to innermost_block API, replace
10381 use of innermost_block with block stored on varobj object.
10382
10383 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10384
10385 * expression.h (innermost_block): Remove declaration.
10386 * varobj.c: Add 'parser-defs.h' include.
10387
10388 2018-01-19 Tom Tromey <tom@tromey.com>
10389
10390 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10391 symbols in the static and global blocks.
10392
10393 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10394
10395 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10396 gdb_ptrace.h, and move including gdb_wait.h ...
10397 * nat/linux-ptrace.h: ... to here.
10398
10399 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10400
10401 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10402 inf_ptrace_detach_success.
10403 (inf_ptrace_detach_success): Add inferior parameter, use it
10404 instead of inferior_ptid, pass it to detach_inferior.
10405 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10406 parameter.
10407 * inferior.c (detach_inferior): Add overload that takes an
10408 inferior object.
10409 * inferior.h (detach_inferior): Likewise.
10410 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10411 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10412 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10413
10414 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10415
10416 * target.h (struct target_ops) <to_detach>: Add inferior
10417 parameter.
10418 (target_detach): Likewise.
10419 * target.c (dispose_inferior): Pass inferior down.
10420 (target_detach): Pass inferior down. Assert that it is equal to
10421 the current inferior.
10422 * aix-thread.c (aix_thread_detach): Pass inferior down.
10423 * corefile.c (core_file_command): Pass current_inferior() down.
10424 * corelow.c (core_detach): Add inferior parameter.
10425 * darwin-nat.c (darwin_detach): Likewise.
10426 * gnu-nat.c (gnu_detach): Likewise.
10427 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10428 * infcmd.c (detach_command): Pass current_inferior() down to
10429 target_detach.
10430 * infrun.c (follow_fork_inferior): Pass parent_inf to
10431 target_detach.
10432 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10433 target_detach.
10434 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10435 * linux-thread-db.c (thread_db_detach): Likewise.
10436 * nto-procfs.c (procfs_detach): Likewise.
10437 * procfs.c (procfs_detach): Likewise.
10438 * record.c (record_detach): Likewise.
10439 * record.h (struct inferior): Forward-declare.
10440 (record_detach): Add inferior parameter.
10441 * remote-sim.c (gdbsim_detach): Likewise.
10442 * remote.c (remote_detach_1): Likewise.
10443 (remote_detach): Likewise.
10444 (extended_remote_detach): Likewise.
10445 * sol-thread.c (sol_thread_detach): Likewise.
10446 * target-debug.h (target_debug_print_inferior_p): New macro.
10447 * target-delegates.c: Re-generate.
10448 * top.c (kill_or_detach): Pass inferior down to target_detach.
10449 * windows-nat.c (windows_detach): Add inferior parameter.
10450
10451 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10452
10453 * target.h (struct target_ops) <to_detach>: Remove args
10454 parameter.
10455 (target_detach): Likewise.
10456 * target.c (dispose_inferior): Adjust.
10457 (target_detach): Remove args parameter, adjust.
10458 * aix-thread.c (aix_thread_detach): Adjust.
10459 * corefile.c (core_file_command): Adjust.
10460 * corelow.c (core_detach): Adjust.
10461 * darwin-nat.c (darwin_detach): Adjust.
10462 * gnu-nat.c (gnu_detach): Adjust.
10463 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10464 * infcmd.c (detach_command): Adjust
10465 * infrun.c (follow_fork_inferior): Adjust.
10466 (handle_vfork_child_exec_or_exit): Adjust.
10467 * linux-fork.c (linux_fork_detach): Remove args parameter.
10468 * linux-fork.h (linux_fork_detach): Likewise.
10469 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10470 * linux-thread-db.c (thread_db_detach): Likewise.
10471 * nto-procfs.c (procfs_detach): Likewise.
10472 * procfs.c (procfs_detach): Likewise.
10473 (do_detach): Remove signo parameter.
10474 * record.c (record_detach): Remove args parameter.
10475 * record.h (record_detach): Likewise.
10476 * remote-sim.c (gdbsim_detach): Likewise.
10477 * remote.c (remote_detach_1): Likewise.
10478 (remote_detach): Likewise.
10479 (extended_remote_detach): Likewise.
10480 * sol-thread.c (sol_thread_detach): Likewise.
10481 * target-delegates.c: Re-generate.
10482 * top.c (struct qt_args) <args>: Remove field.
10483 (kill_or_detach): Don't pass args.
10484 (quit_force): Don't set args.
10485 * windows-nat.c (windows_detach): Remove args parameter.
10486
10487 2018-01-19 Yao Qi <yao.qi@linaro.org>
10488
10489 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10490 (arm_linux_init_abi): Install it.
10491
10492 2018-01-19 Yao Qi <yao.qi@linaro.org>
10493
10494 * osabi.c (gdb_osabi_names): Extend the regexp for
10495 arm-linux-gnueabihf.
10496
10497 2018-01-18 Yao Qi <yao.qi@linaro.org>
10498
10499 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10500 m_abbrevs.
10501 (abbrev_table::add_abbrev): Update.
10502 (abbrev_table::lookup_abbrev): Update.
10503
10504 2018-01-18 Yao Qi <yao.qi@linaro.org>
10505
10506 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10507
10508 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10509
10510 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10511 to "std::string".
10512
10513 2018-01-17 Tom Tromey <tom@tromey.com>
10514
10515 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10516
10517 2018-01-17 Tom Tromey <tom@tromey.com>
10518
10519 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10520 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10521 (create_array_type_with_stride): Update.
10522 * dwarf2read.c (set_die_type): Update.
10523
10524 2018-01-17 Tom Tromey <tom@tromey.com>
10525
10526 * dwarf2read.c (delayed_method_info): Remove typedef.
10527 (dwarf2_cu::method_info): Now a std::vector.
10528 (add_to_method_list): Update.
10529 (free_delayed_list): Remove.
10530 (compute_delayed_physnames): Update.
10531 (process_full_comp_unit, process_full_type_unit): Clear the method
10532 list. Remove cleanups.
10533 (psymtab_include_file_name): Add name_holder parameter. Use
10534 unique_xmalloc_ptr.
10535 (dwarf_decode_lines): Update.
10536
10537 2018-01-17 Tom Tromey <tom@tromey.com>
10538 Simon Marchi <simon.marchi@ericsson.com>
10539
10540 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10541 (dwarf2_per_objfile::free_cached_comp_units)
10542 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10543 (init_cutu_and_read_dies_no_follow): Update.
10544 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10545 (dwarf2_cu::~dwarf2_cu): New.
10546 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10547 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10548
10549 2018-01-17 Tom Tromey <tom@tromey.com>
10550 Simon Marchi <simon.marchi@ericsson.com>
10551
10552 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10553 (struct die_reader_specs) <abbrev_table>: New member.
10554 (struct abbrev_table): Add constructor.
10555 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10556 <abbrev_obstack>: Now an auto_obstack.
10557 (abbrev_table_up): New typedef.
10558 (init_cu_die_reader): Add abbrev_table parameter.
10559 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10560 Add result_dwo_abbrev_table.
10561 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10562 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10563 Update.
10564 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10565 parameter.
10566 (skip_children): Update.
10567 (abbrev_table::alloc_abbrev): Rename from
10568 abbrev_table_alloc_abbrev.
10569 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10570 (abbrev_table::lookup_abbrev): Rename from
10571 abbrev_table_lookup_abbrev.
10572 (abbrev_table_read_table): Return abbrev_table_up.
10573 (abbrev_table_free, abbrev_table_free_cleanup)
10574 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10575 (load_partial_dies): Update.
10576
10577 2018-01-17 Tom Tromey <tom@tromey.com>
10578
10579 * dwarf2read.c (dwarf2_compute_name): Update comment.
10580 (read_func_scope, read_variable): Update.
10581 (new_symbol): Remove.
10582 (new_symbol_full): Rename to new_symbol.
10583
10584 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10585
10586 PR gdb/16577
10587 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10588 a warning instead of throwing an error, set section size to 0 and return
10589 NULL.
10590 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10591
10592 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10593
10594 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10595 std::string.
10596 (linux_ptrace_attach_fail_reason_string): Likewise.
10597 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10598 Likewise.
10599 (linux_ptrace_attach_fail_reason_string): Likewise.
10600 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10601
10602 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10603
10604 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10605
10606 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10607
10608 PR gdb/21559
10609 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10610 checking for fs_base/gs_base fields in struct user_regs_struct.
10611 * configure: Regenerate.
10612
10613 2018-01-17 Yao Qi <yao.qi@linaro.org>
10614
10615 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10616 function.
10617 (aarch64_linux_init_abi): Install it to gdbarch hook
10618 gcc_target_options.
10619
10620 2018-01-15 Pedro Alves <palves@redhat.com>
10621
10622 * common/signals-state-save-restore.c
10623 (save_original_signals_state): Fix typos.
10624
10625 2017-01-12 Tom Tromey <tom@tromey.com>
10626 Sergio Durigan Junior <sergiodj@redhat.com>
10627
10628 * Makefile.in (install-only): Install gdb-add-index.
10629
10630 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10631
10632 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10633
10634 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10635
10636 * infrun.c (keep_going_pass_signal): Clear step-over info when
10637 insert_breakpoints fails.
10638
10639 2018-01-11 Pedro Alves <palves@redhat.com>
10640
10641 PR gdb/22583
10642 * infrun.c (resume): Rename to ...
10643 (resume_1): ... this.
10644 (resume): Reimplement as wrapper around resume_1.
10645
10646 2018-01-11 Pedro Alves <palves@redhat.com>
10647
10648 PR remote/22597
10649 * remote.c (remote_parse_stop_reply): Default to the last-set
10650 general thread instead of to 'magic_null_ptid'.
10651
10652 2018-01-10 Pedro Alves <palves@redhat.com>
10653
10654 * language.h (language_get_symbol_name_matcher): Rename ...
10655 (get_symbol_name_matcher): ... this.
10656 * language.c (language_get_symbol_name_matcher): Ditto.
10657 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10658 callers adjusted.
10659
10660 2018-01-10 Pedro Alves <palves@redhat.com>
10661
10662 PR gdb/22670
10663 * dwarf2read.c
10664 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10665 Adjust to use language_get_symbol_name_matcher instead of
10666 language_defn::la_get_symbol_name_matcher.
10667 * language.c (language_get_symbol_name_matcher): If in Ada mode
10668 and the lookup name is a verbatim match, return Ada's matcher.
10669 * language.h (language_get_symbol_name_matcher): Adjust comment.
10670 (ada_lookup_name_info::verbatim_p):: New method.
10671
10672 2018-01-10 Pedro Alves <palves@redhat.com>
10673
10674 PR gdb/22670
10675 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10676 minsym's language is language_auto or language_cplus, pass down
10677 language_ada instead.
10678 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10679
10680 2018-01-10 Pedro Alves <palves@redhat.com>
10681
10682 PR gdb/22670
10683 * minsyms.c (linkage_name_str): New function.
10684 (iterate_over_minimal_symbols): Use it.
10685
10686 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10687
10688 * NEWS: Document that 'info proc' now works on FreeBSD.
10689
10690 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10691
10692 * configure.ac: Check for kinfo_getfile in libutil.
10693 * configure: Regenerate.
10694 * config.in: Regenerate.
10695 * fbsd-nat.c: Include "fbsd-tdep.h".
10696 (fbsd_fetch_cmdline): New.
10697 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10698 rather than calling error.
10699 (fbsd_info_proc): New.
10700 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10701 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10702 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10703
10704 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10705
10706 * fbsd-nat.c (struct free_deleter): Remove.
10707 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10708
10709 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10710
10711 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10712 NULL for an empty pathname.
10713
10714 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10715
10716 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10717 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10718 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10719 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10720 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10721 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10722 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10723 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10724 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10725 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10726 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10727 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10728 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10729 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10730 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10731
10732 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10733
10734 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10735 (gnu_xfer_auxv): New function.
10736 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10737 TARGET_OBJECT_AUXV.
10738
10739 2018-01-08 Yao Qi <yao.qi@linaro.org>
10740 Simon Marchi <simon.marchi@ericsson.com>
10741
10742 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10743 common/selftest.c.
10744 (COMMON_OBS): Remove selftest.o.
10745 * configure.ac: Append selftest-arch.c and common/selftest.c to
10746 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10747 * configure: Re-generated.
10748 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10749 GDB_SELF_TEST.
10750 (maintenance_info_selftests): Likewise.
10751
10752 2018-01-08 Xavier Roirand <roirand@adacore.com>
10753
10754 * ada-valprint.c (val_print_packed_array_elements): Use
10755 proper number of elements when printing an array indexed
10756 by an enumeration type.
10757
10758 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10759
10760 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10761 (dw2_get_file_names_reader): Adjust.
10762 (lookup_dwo_signatured_type): Adjust.
10763 (lookup_dwp_signatured_type): Adjust.
10764 (lookup_signatured_type): Adjust.
10765 (create_type_unit_group): Adjust.
10766 (get_type_unit_group): Adjust.
10767 (process_psymtab_comp_unit_reader): Adjust.
10768 (build_type_psymtabs_reader): Adjust.
10769 (scan_partial_symbols): Adjust.
10770 (add_partial_symbol): Adjust.
10771 (add_partial_subprogram): Adjust.
10772 (peek_die_abbrev): Adjust.
10773 (fixup_go_packaging): Adjust.
10774 (process_imported_unit_die): Adjust.
10775 (dwarf2_compute_name): Adjust.
10776 (dwarf2_physname): Adjust.
10777 (read_import_statement): Adjust.
10778 (handle_DW_AT_stmt_list): Adjust.
10779 (read_file_scope): Adjust.
10780 (read_func_scope): Adjust.
10781 (read_lexical_block_scope): Adjust.
10782 (read_call_site_scope): Adjust.
10783 (read_variable): Adjust.
10784 (dwarf2_rnglists_process): Adjust.
10785 (dwarf2_ranges_process): Adjust.
10786 (dwarf2_ranges_read): Adjust.
10787 (dwarf2_get_pc_bounds): Adjust.
10788 (dwarf2_record_block_ranges): Adjust.
10789 (dwarf2_add_field): Adjust.
10790 (dwarf2_add_member_fn): Adjust.
10791 (read_structure_type): Adjust.
10792 (process_structure_scope): Adjust.
10793 (read_enumeration_type): Adjust.
10794 (read_array_type): Adjust.
10795 (mark_common_block_symbol_computed): Adjust.
10796 (read_common_block): Adjust.
10797 (read_namespace_type): Adjust.
10798 (read_namespace): Adjust.
10799 (read_module_type): Adjust.
10800 (read_tag_pointer_type): Adjust.
10801 (read_tag_ptr_to_member_type): Adjust.
10802 (read_tag_string_type): Adjust.
10803 (read_subroutine_type): Adjust.
10804 (read_typedef): Adjust.
10805 (read_base_type): Adjust.
10806 (attr_to_dynamic_prop): Adjust.
10807 (read_subrange_type): Adjust.
10808 (read_unspecified_type): Adjust.
10809 (dwarf2_read_abbrevs): Adjust.
10810 (load_partial_dies): Adjust.
10811 (read_partial_die): Adjust.
10812 (find_partial_die): Adjust.
10813 (guess_partial_die_structure_name): Adjust.
10814 (fixup_partial_die): Adjust.
10815 (read_attribute_value): Adjust.
10816 (read_addr_index): Adjust.
10817 (read_addr_index_from_leb128): Adjust.
10818 (read_str_index): Adjust.
10819 (dwarf2_string_attr): Adjust.
10820 (get_debug_line_section): Adjust.
10821 (dwarf_decode_line_header): Adjust.
10822 (lnp_state_machine::check_line_address): Adjust.
10823 (dwarf_decode_lines_1): Adjust.
10824 (dwarf_decode_lines): Adjust.
10825 (dwarf2_start_symtab): Adjust.
10826 (var_decode_location): Adjust.
10827 (new_symbol_full): Adjust.
10828 (dwarf2_const_value_data): Adjust.
10829 (dwarf2_const_value_attr): Adjust.
10830 (dwarf2_const_value): Adjust.
10831 (die_type): Adjust.
10832 (die_containing_type): Adjust.
10833 (build_error_marker_type): Adjust.
10834 (lookup_die_type): Adjust.
10835 (guess_full_die_structure_name): Adjust.
10836 (anonymous_struct_prefix): Adjust.
10837 (determine_prefix): Adjust.
10838 (dwarf2_name): Adjust.
10839 (follow_die_ref_or_sig): Adjust.
10840 (follow_die_offset): Adjust.
10841 (follow_die_ref): Adjust.
10842 (follow_die_sig_1): Adjust.
10843 (follow_die_sig): Adjust.
10844 (get_signatured_type): Adjust.
10845 (get_DW_AT_signature_type): Adjust.
10846 (decode_locdesc): Adjust.
10847 (dwarf_decode_macros): Adjust.
10848 (cu_debug_loc_section): Adjust.
10849 (fill_in_loclist_baton): Adjust.
10850 (dwarf2_symbol_mark_computed): Adjust.
10851 (init_one_comp_unit): Don't assign
10852 dwarf2_cu::dwarf2_per_objfile.
10853 (set_die_type): Adjust.
10854
10855 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10856
10857 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10858 <dwarf2_per_objfile>: New field.
10859 (dwarf2_per_objfile): Remove global.
10860 (get_dwarf2_per_objfile): New function.
10861 (set_dwarf2_per_objfile): New function.
10862 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10863 dwarf2_per_objfile.
10864 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10865 (read_abbrev_offset): Likewise.
10866 (read_indirect_string): Likewise.
10867 (read_indirect_line_string): Likewise.
10868 (read_indirect_string_at_offset): Likewise.
10869 (read_indirect_string_from_dwz): Likewise.
10870 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10871 dwarf2_per_objfile.
10872 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10873 (create_all_comp_units): Change objfile parameter to
10874 dwarf2_per_objfile.
10875 (create_all_type_units): Likewise.
10876 (process_queue): Add dwarf2_per_objfile parameter.
10877 (read_and_check_comp_unit_head): Likewise.
10878 (lookup_dwo_unit_in_dwp): Likewise.
10879 (get_dwp_file): Likewise.
10880 (process_cu_includes): Likewise.
10881 (struct free_dwo_file_cleanup_data): New struct.
10882 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10883 set_dwarf2_per_objfile.
10884 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10885 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10886 context, adjust calls.
10887 (dw2_instantiate_symtab): Likewise.
10888 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10889 (dw2_get_cu): Likewise.
10890 (create_cu_from_index_list): Change objfile parameter to
10891 dwarf2_per_objfile.
10892 (create_cus_from_index_list): Get dwarf2_per_objfile from
10893 context, adjust calls.
10894 (create_cus_from_index): Likewise.
10895 (create_signatured_type_table_from_index): Change objfile
10896 parameter to dwarf2_per_objfile.
10897 (create_signatured_type_table_from_debug_names): Change objfile
10898 parameter to dwarf2_per_objfile.
10899 (create_addrmap_from_index): Likewise.
10900 (create_addrmap_from_aranges): Likewise.
10901 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10902 (dw2_setup): Remove.
10903 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10904 context.
10905 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10906 get_dwarf2_per_objfile.
10907 (dw2_forget_cached_source_info): Likewise.
10908 (dw2_map_symtabs_matching_filename): Likewise.
10909 (struct dw2_symtab_iterator) <index>: Remove.
10910 <dwarf2_per_objfile>: New field.
10911 (dw2_symtab_iter_init): Replace index parameter with
10912 dwarf2_per_objfile.
10913 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10914 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10915 (dw2_print_stats): Likewise.
10916 (dw2_dump): Likewise.
10917 (dw2_expand_symtabs_for_function): Likewise.
10918 (dw2_expand_all_symtabs): Likewise.
10919 (dw2_expand_symtabs_with_fullname): Likewise.
10920 (dw2_expand_marked_cus): Replace index and objfile parameters
10921 with dwarf2_per_objfile.
10922 (dw_expand_symtabs_matching_file_matcher): Add
10923 dwarf2_per_objfile parameter and adjust calls.
10924 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10925 adjust calls.
10926 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10927 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10928 adjust calls.
10929 (create_cus_from_debug_names_list): Replace objfile parameter
10930 with dwarf2_per_objfile and adjust calls.
10931 (create_cus_from_debug_names): Likewise.
10932 (dwarf2_read_debug_names): Likewise.
10933 (mapped_debug_names::namei_to_name): Adjust call.
10934 (dw2_debug_names_iterator::next): Likewise.
10935 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10936 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10937 (dw2_debug_names_dump): Likewise.
10938 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10939 (dw2_debug_names_expand_symtabs_matching): Likewise.
10940 (dwarf2_initialize_objfile): Likewise.
10941 (dwarf2_build_psymtabs): Likewise.
10942 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10943 this_cu.
10944 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10945 (read_and_check_comp_unit_head): Likewise.
10946 (read_abbrev_offset): Likewise.
10947 (create_debug_type_hash_table): Likewise.
10948 (create_debug_types_hash_table): Likewise.
10949 (create_all_type_units): Replace objfile parameter with
10950 dwarf2_per_objfile.
10951 (add_type_unit): Add dwarf2_per_objfile parameter.
10952 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10953 with dwarf2_per_objfile.
10954 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10955 (lookup_dwp_signatured_type): Likewise.
10956 (lookup_signatured_type): Likewise.
10957 (read_cutu_die_from_dwo): Likewise.
10958 (init_tu_and_read_dwo_dies): Likewise.
10959 (init_cutu_and_read_dies): Likewise.
10960 (init_cutu_and_read_dies_no_follow): Likewise.
10961 (allocate_type_unit_groups_table): Add objfile parameter.
10962 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10963 (get_type_unit_group): Likewise.
10964 (process_psymtab_comp_unit): Update call.
10965 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10966 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10967 (print_tu_stats): Likewise.
10968 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10969 in void* parameter.
10970 (build_type_psymtabs): Change objfile parameter to
10971 dwarf2_per_objfile.
10972 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10973 passed in void* parameter.
10974 (process_skeletonless_type_units): Change objfile parameter to
10975 dwarf2_per_objfile.
10976 (set_partial_user): Likewise.
10977 (dwarf2_build_psymtabs_hard): Likewise.
10978 (read_comp_units_from_section): Likewise.
10979 (create_all_comp_units): Likewise.
10980 (scan_partial_symbols): Update calls.
10981 (add_partial_symbol): Likewise.
10982 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10983 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10984 (process_queue): Add dwarf2_per_objfile parameter.
10985 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10986 (compute_compunit_symtab_includes): Likewise.
10987 (process_cu_includes): Add dwarf2_per_objfile parameter.
10988 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10989 (process_full_type_unit): Likewise.
10990 (process_imported_unit_die): Update call.
10991 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10992 (read_file_scope): Likewise.
10993 (allocate_dwo_file_hash_table): Add objfile parameter.
10994 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10995 (create_cus_hash_table): Likewise.
10996 (create_dwp_hash_table): Likewise.
10997 (create_dwo_unit_in_dwp_v1): Likewise.
10998 (create_dwp_v2_section): Likewise.
10999 (create_dwo_unit_in_dwp_v2): Likewise.
11000 (lookup_dwo_unit_in_dwp): Likewise.
11001 (try_open_dwop_file): Likewise.
11002 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11003 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11004 cleanup to include a reference to dwarf2_per_objfile.
11005 (open_dwp_file): Add dwarf2_per_objfile parameter.
11006 (open_and_init_dwp_file): Likewise.
11007 (get_dwp_file): Likewise.
11008 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11009 (queue_and_load_all_dwo_tus): Update call.
11010 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11011 data.
11012 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11013 (dwarf2_ranges_process): Likewise.
11014 (dwarf2_get_pc_bounds): Likewise.
11015 (mark_common_block_symbol_computed): Likewise.
11016 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11017 (dwarf2_read_abbrevs): Update call.
11018 (read_partial_die): Use dwarf2_per_objfile from cu.
11019 (find_partial_die): Likewise.
11020 (fixup_partial_die): Likewise.
11021 (read_attribute_value): Likewise.
11022 (read_indirect_string_at_offset_from): Add objfile parameter.
11023 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11024 parameter.
11025 (read_indirect_string_from_dwz): Add objfile parameter.
11026 (read_indirect_string): Add objfile parameter.
11027 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11028 (read_addr_index): Use dwarf2_per_objfile from cu.
11029 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11030 call dw2_setup.
11031 (read_str_index): Use dwarf2_per_objfile from cu.
11032 (get_debug_line_section): Likewise.
11033 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11034 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11035 (new_symbol_full): Use dwarf2_per_objfile from cu.
11036 (build_error_marker_type): Likewise.
11037 (lookup_die_type): Likewise.
11038 (determine_prefix): Likewise.
11039 (follow_die_offset): Likewise.
11040 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11041 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11042 (dwarf2_fetch_die_type_sect_off): Likewise.
11043 (dwarf2_get_die_type): Likewise.
11044 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11045 (get_signatured_type): Likewise.
11046 (get_DW_AT_signature_type): Likewise.
11047 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11048 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11049 (cu_debug_loc_section): Likewise.
11050 (fill_in_loclist_baton): Likewise.
11051 (dwarf2_symbol_mark_computed): Likewise.
11052 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11053 dwarf2_per_objfile.
11054 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11055 parameter.
11056 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11057 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11058 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11059 (set_die_type): Use dwarf2_free_objfile from cu.
11060 (get_die_type_at_offset): Likewise.
11061 (dwarf2_per_objfile_free): Don't assign global variable.
11062 (debug_names) <constructor>: Add dwarf2_per_objfile
11063 parameter, update m_debugstrlookup construction.
11064 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11065 parameter.
11066 <m_dwarf2_per_objfile>: New field.
11067 <lookup>: Use m_dwarf2_per_objfile.
11068 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11069 (psyms_seen_size): Likewise.
11070 (write_gdbindex): Replace objfile parameter with
11071 dwarf2_per_objfile.
11072 (write_debug_names): Likewise.
11073 (write_psymtabs_to_index): Likewise.
11074 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11075 calls.
11076
11077 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11078
11079 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11080 <dwarf2_per_objfile>: New field.
11081 (struct dwarf2_per_cu_data) <objfile>: Remove.
11082 <dwarf2_per_objfile>: New field.
11083 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11084 of objfile.
11085 (create_signatured_type_table_from_index): Likewise.
11086 (create_debug_type_hash_table): Likewise.
11087 (fill_in_sig_entry_from_dwo_entry): Likewise.
11088 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11089 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11090 objfile.
11091 (create_partial_symtab): Access objfile through
11092 dwarf2_per_objfile.
11093 (process_psymtab_comp_unit_reader): Likewise.
11094 (read_comp_units_from_section): Likewise.
11095 (scan_partial_symbols): Likewise.
11096 (add_partial_symbol): Likewise.
11097 (add_partial_subprogram): Likewise.
11098 (peek_die_abbrev): Likewise.
11099 (fixup_go_packaging): Likewise.
11100 (process_full_comp_unit): Likewise.
11101 (process_full_type_unit): Likewise.
11102 (process_imported_unit_die): Likewise.
11103 (dwarf2_compute_name): Likewise.
11104 (dwarf2_physname): Likewise.
11105 (read_import_statement): Likewise.
11106 (create_cus_hash_table): Assign dwarf2_physname instead of
11107 objfile.
11108 (read_func_scope): Access objfile through dwarf2_per_objfile.
11109 (read_lexical_block_scope): Likewise.
11110 (read_call_site_scope): Likewise.
11111 (read_variable): Likewise.
11112 (dwarf2_rnglists_process): Likewise.
11113 (dwarf2_ranges_process): Likewise.
11114 (dwarf2_ranges_read): Likewise.
11115 (dwarf2_record_block_ranges): Likewise.
11116 (dwarf2_add_field): Likewise.
11117 (dwarf2_add_member_fn): Likewise.
11118 (read_structure_type): Likewise.
11119 (process_structure_scope): Likewise.
11120 (read_enumeration_type): Likewise.
11121 (read_array_type): Likewise.
11122 (read_common_block): Likewise.
11123 (read_namespace_type): Likewise.
11124 (read_namespace): Likewise.
11125 (read_module_type): Likewise.
11126 (read_tag_pointer_type): Likewise.
11127 (read_tag_ptr_to_member_type): Likewise.
11128 (read_tag_string_type): Likewise.
11129 (read_subroutine_type): Likewise.
11130 (read_typedef): Likewise.
11131 (read_base_type): Likewise.
11132 (attr_to_dynamic_prop): Likewise.
11133 (read_subrange_type): Likewise.
11134 (read_unspecified_type): Likewise.
11135 (load_partial_dies): Likewise.
11136 (read_partial_die): Likewise.
11137 (find_partial_die): Likewise.
11138 (guess_partial_die_structure_name): Likewise.
11139 (fixup_partial_die): Likewise.
11140 (read_attribute_value): Likewise.
11141 (read_addr_index_from_leb128): Likewise.
11142 (dwarf2_read_addr_index): Likewise.
11143 (dwarf2_string_attr): Likewise.
11144 (lnp_state_machine::check_line_address): Likewise.
11145 (dwarf_decode_lines_1): Likewise.
11146 (dwarf_decode_lines): Likewise.
11147 (dwarf2_start_symtab): Likewise.
11148 (var_decode_location): Likewise.
11149 (new_symbol_full): Likewise.
11150 (dwarf2_const_value_data): Likewise.
11151 (dwarf2_const_value_attr): Likewise.
11152 (dwarf2_const_value): Likewise.
11153 (die_type): Likewise.
11154 (die_containing_type): Likewise.
11155 (lookup_die_type): Likewise.
11156 (guess_full_die_structure_name): Likewise.
11157 (anonymous_struct_prefix): Likewise.
11158 (dwarf2_name): Likewise.
11159 (follow_die_ref_or_sig): Likewise.
11160 (follow_die_offset): Likewise.
11161 (follow_die_ref): Likewise.
11162 (dwarf2_fetch_die_loc_sect_off): Likewise.
11163 (dwarf2_fetch_constant_bytes): Likewise.
11164 (dwarf2_fetch_die_type_sect_off): Likewise.
11165 (dwarf2_get_die_type): Likewise.
11166 (follow_die_sig): Likewise.
11167 (decode_locdesc): Likewise.
11168 (dwarf2_per_cu_objfile): Likewise.
11169 (dwarf2_per_cu_text_offset): Likewise.
11170 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11171 objfile.
11172 (set_die_type): Access objfile through
11173 dwarf2_per_objfile.
11174
11175 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11176
11177 * valprint.c (converted_character_d): Remove typedef.
11178 (DEF_VEC_O (converted_character_d)): Remove.
11179 (count_next_character): Use std::vector.
11180 (print_converted_chars_to_obstack): Likewise.
11181 (generic_printstr): Likewise.
11182
11183 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11184
11185 * xml-support.h (struct gdb_xml_value): Add constructor.
11186 <value>: Change type to unique_xmalloc_ptr.
11187 (gdb_xml_value_s): Remove typedef.
11188 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11189 (gdb_xml_element_start_handler): Change parameter type to
11190 std::vector.
11191 (xml_find_attribute): Likewise.
11192 * xml-support.c (xml_find_attribute): Change parameter type to
11193 std::vector and adjust.
11194 (gdb_xml_values_cleanup): Remove.
11195 (gdb_xml_parser::start_element): Adjust to std::vector.
11196 (xinclude_start_include): Change paraeter type to std::vector
11197 and adjust.
11198 * btrace.c (check_xml_btrace_version): Likewise.
11199 (parse_xml_btrace_block): Likewise.
11200 (parse_xml_btrace_pt_config_cpu): Likewise.
11201 (parse_xml_btrace_pt): Likewise.
11202 (parse_xml_btrace_conf_bts): Likewise.
11203 (parse_xml_btrace_conf_pt): Likewise.
11204 * memory-map.c (memory_map_start_memory): Likewise.
11205 (memory_map_start_property): Likewise.
11206 * osdata.c (osdata_start_osdata): Likewise.
11207 (osdata_start_item): Likewise.
11208 (osdata_start_column): Likewise.
11209 * remote.c (start_thread): Likewise.
11210 * solib-aix.c (library_list_start_library): Likewise.
11211 (library_list_start_list): Likewise.
11212 * solib-svr4.c (library_list_start_library): Likewise.
11213 (svr4_library_list_start_list): Likewise.
11214 * solib-target.c (library_list_start_segment): Likewise.
11215 (library_list_start_section): Likewise.
11216 (library_list_start_library): Likewise.
11217 (library_list_start_list): Likewise.
11218 * tracepoint.c (traceframe_info_start_memory): Likewise.
11219 (traceframe_info_start_tvar): Likewise.
11220 * xml-syscall.c (syscall_start_syscall): Likewise.
11221 * xml-tdesc.c (tdesc_start_target): Likewise.
11222 (tdesc_start_feature): Likewise.
11223 (tdesc_start_reg): Likewise.
11224 (tdesc_start_union): Likewise.
11225 (tdesc_start_struct): Likewise.
11226 (tdesc_start_flags): Likewise.
11227 (tdesc_start_enum): Likewise.
11228 (tdesc_start_field): Likewise.
11229 (tdesc_start_enum_value): Likewise.
11230 (tdesc_start_vector): Likewise.
11231
11232 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11233
11234 * extension.h (struct xmethod_worker) <clone>: Remove.
11235 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11236 Remove.
11237 (python_xmethod_worker::clone): Remove.
11238 * valops.c (find_overload_match): Use std::move instead of
11239 clone.
11240
11241 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11242
11243 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11244 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11245 <free_xmethod_worker_data>: Remove.
11246 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11247 <get_xmethod_arg_types>: Remove.
11248 <get_xmethod_result_type>: Remove.
11249 <invoke_xmethod>: Remove.
11250 * extension.c (new_xmethod_worker): Remove.
11251 (clone_xmethod_worker): Remove.
11252 (get_matching_xmethod_workers): Return void, pass std::vector by
11253 pointer.
11254 (get_xmethod_arg_types): Rename to...
11255 (xmethod_worker::get_arg_types): ... this, and adjust.
11256 (get_xmethod_result_type): Rename to...
11257 (xmethod_worker::get_result_type): ... this, and adjust.
11258 (invoke_xmethod): Remove.
11259 (free_xmethod_worker): Remove.
11260 (free_xmethod_worker_vec): Remove.
11261 * extension.h (enum ext_lang_rc): Move here from
11262 extension-priv.h.
11263 (struct xmethod_worker): Add constructor and destructor.
11264 <data>: Remove.
11265 <value>: Remove.
11266 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11267 virtual pure methods.
11268 <get_arg_types, get_result_type>: New methods.
11269 (xmethod_worker_ptr): Remove typedef.
11270 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11271 (xmethod_worker_vec): Remove typedef.
11272 (xmethod_worker_up): New typedef.
11273 (invoke_xmethod): Remove.
11274 (clone_xmethod_worker): Remove.
11275 (free_xmethod_worker): Remove.
11276 (free_xmethod_worker_vec): Remove.
11277 (get_xmethod_arg_types): Remove.
11278 (get_xmethod_result_type): Remove.
11279 * valops.c (find_method_list): Use std::vector, don't use
11280 intermediate vector.
11281 (value_find_oload_method_list): Use std::vector.
11282 (find_overload_match): Use std::vector.
11283 (find_oload_champ): Use std::vector.
11284 * value.c (value_free): Use operator delete.
11285 (value_of_xmethod): Rename to...
11286 (value_from_xmethod): ... this. Don't assign
11287 xmethod_worker::value, take rvalue-reference.
11288 (result_type_of_xmethod): Adjust.
11289 (call_xmethod): Adjust.
11290 * value.h: Include extension.h.
11291 (struct xmethod_worker): Don't forward-declare.
11292 (value_of_xmethod): Rename to...
11293 (value_from_xmethod): ... this, take rvalue-reference.
11294 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11295 (struct python_xmethod_worker): ... this, add constructor and
11296 destructor.
11297 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11298 (gdbpy_free_xmethod_worker_data): Rename to...
11299 (python_xmethod_worker::~python_xmethod_worker): ... this and
11300 adjust.
11301 (gdbpy_clone_xmethod_worker_data): Rename to...
11302 (python_xmethod_worker::clone): ... this and adjust.
11303 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11304 temporary vector.
11305 (gdbpy_get_xmethod_arg_types): Rename to...
11306 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11307 (gdbpy_get_xmethod_result_type): Rename to...
11308 (python_xmethod_worker::do_get_result_type): ... this and
11309 adjust.
11310 (gdbpy_invoke_xmethod): Rename to...
11311 (python_xmethod_worker::invoke): ... this and adjust.
11312 (new_python_xmethod_worker): Rename to...
11313 (python_xmethod_worker::python_xmethod_worker): ... this and
11314 adjust.
11315 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11316 Remove.
11317 (gdbpy_free_xmethod_worker_data): Remove.
11318 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11319 (gdbpy_get_xmethod_arg_types): Remove.
11320 (gdbpy_get_xmethod_result_type): Remove.
11321 (gdbpy_invoke_xmethod): Remove.
11322 * python/python.c (python_extension_ops): Remove obsolete
11323 callbacks.
11324
11325 2018-01-05 Pedro Alves <palves@redhat.com>
11326
11327 PR gdb/18653
11328 * common/signals-state-save-restore.c
11329 (save_original_signals_state): New parameter 'quiet'. Warn if we
11330 find a custom handler preinstalled, instead of internal erroring.
11331 But only warn if !quiet.
11332 * common/signals-state-save-restore.h
11333 (save_original_signals_state): New parameter 'quiet'.
11334 * main.c (captured_main_1): Move save_original_signals_state call
11335 after option handling, and pass QUIET.
11336
11337 2018-01-05 Pedro Alves <palves@redhat.com>
11338
11339 * spu-tdep.c (spu_catch_start): Pass
11340 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11341
11342 2018-01-05 Pedro Alves <palves@redhat.com>
11343
11344 PR gdb/22670
11345 * ada-lang.c (literal_symbol_name_matcher): New function.
11346 (ada_get_symbol_name_matcher): Use it for
11347 symbol_name_match_type::SEARCH_NAME.
11348 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11349 it down instead of assuming symbol_name_match_type::FULL.
11350 * block.h (block_lookup_symbol): New parameter 'match_type'.
11351 * c-valprint.c (print_unpacked_pointer): Use
11352 lookup_symbol_search_name instead of lookup_symbol.
11353 * compile/compile-object-load.c (get_out_value_type): Pass down
11354 symbol_name_match_type::SEARCH_NAME.
11355 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11356 symbol_name_match_type::FULL.
11357 * cp-support.c (cp_get_symbol_name_matcher): Handle
11358 symbol_name_match_type::SEARCH_NAME.
11359 * infrun.c (insert_exception_resume_breakpoint): Use
11360 lookup_symbol_search_name.
11361 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11362 * psymtab.c (maintenance_check_psymtabs): Use
11363 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11364 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11365 SYMBOL_SEARCH_NAME.
11366 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11367 if symbol_name_match_type::SEARCH_NAME.
11368 (lookup_symbol_in_language): Pass down
11369 symbol_name_match_type::FULL.
11370 (lookup_symbol_search_name): New.
11371 (lookup_language_this): Pass down
11372 symbol_name_match_type::SEARCH_NAME.
11373 (lookup_symbol_aux, lookup_local_symbol): New parameter
11374 'match_type'. Pass it down.
11375 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11376 (lookup_symbol_search_name): New declaration.
11377 (lookup_symbol_in_block): New 'match_type' parameter.
11378
11379 2018-01-05 Pedro Alves <palves@redhat.com>
11380
11381 PR gdb/22670
11382 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11383 ada_lookup_symbol.
11384 (ada_lookup_symbol): Reimplement in terms of
11385 ada_lookup_symbol_list, bits factored out from
11386 ada_lookup_encoded_symbol.
11387
11388 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11389
11390 * ada-exp.y (write_object_renaming): When subscripting an array
11391 using a symbol as the index, pass the block in call to
11392 ada_lookup_encoded_symbol when looking that symbol up.
11393
11394 2018-01-05 Jerome Guitton <guitton@adacore.com>
11395
11396 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11397 TYPE_INDEX_TYPE.
11398
11399 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11400
11401 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11402 the case where VALUE_LVAL (val0) is not lval_memory.
11403
11404 2018-01-05 Xavier Roirand <roirand@adacore.com>
11405
11406 * ada-valprint.c (print_optional_low_bound): Handle
11407 character-indexed array printing like boolean-indexed array
11408 printing.
11409
11410 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11411
11412 * NEWS: Create a new section for the next release branch.
11413 Rename the section of the current branch, now that it has
11414 been cut.
11415
11416 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11417
11418 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11419 * version.in: Bump version to 8.1.50.DATE-git.
11420
11421 2018-01-03 Xavier Roirand <roirand@adacore.com>
11422
11423 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11424 Add field.
11425 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11426 Add field.
11427 (default_exception_support_info) <catch_handlers_sym>: Add field.
11428 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11429 (ada_exception_name_addr_1): Add "catch handlers" handling.
11430 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11431 Update all callers.
11432 (create_excep_cond_exprs) <ex>: Add parameter.
11433 (re_set_exception): Update create_excep_cond_exprs call.
11434 (print_it_exception, print_one_exception, print_mention_exception)
11435 (print_recreate_exception): Add "catch handler" handling.
11436 (allocate_location_catch_handlers, re_set_catch_handlers)
11437 (check_status_catch_handlers, print_it_catch_handlers)
11438 (print_one_catch_handlers, print_mention_catch_handlers)
11439 (print_recreate_catch_handlers): New function.
11440 (catch_handlers_breakpoint_ops): New variable.
11441 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11442 Add parameter. Add "catch handler" handling.
11443 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11444 Add "catch handler" handling.
11445 (ada_exception_catchpoint_cond_string): Add "catch handler"
11446 handling.
11447 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11448 call.
11449 (catch_ada_handlers_command): New function.
11450 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11451 operations structure.
11452 (_initialize_ada_language): Add "catch handlers" command entry.
11453 * NEWS: Document "catch handlers" feature.
11454
11455 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11456
11457 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11458 account when creating the array type of the slice.
11459 (ada_value_slice): Likewise.
11460
11461 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11462
11463 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11464 New enum value.
11465 (create_array_type_with_stride): Add byte_stride_prop parameter.
11466 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11467 New parameter. Update all callers in this file.
11468 (array_type_has_dynamic_stride): New function.
11469 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11470 of arrays with dynamic byte strides.
11471 * dwarf2read.c (read_array_type): Add support for dynamic
11472 DW_AT_byte_stride attributes.
11473
11474 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11475
11476 * dwarf2read.c (read_unspecified_type): Treat
11477 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11478
11479 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11480
11481 Update copyright year range in all GDB files.
11482
11483 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11484
11485 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11486 and gdb/testsuite/gdb.base/step-line.c.
11487
11488 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11489
11490 * copyright.py (main): Dump the contents of
11491 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11492 even if BY_HAND is empty.
11493
11494 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11495
11496 * top.c (print_gdb_version): Update Copyright year in version
11497 message.
11498
11499 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11500
11501 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11502
11503 For older changes see ChangeLog-2017.
11504 \f
11505 Local Variables:
11506 mode: change-log
11507 left-margin: 8
11508 fill-column: 74
11509 version-control: never
11510 coding: utf-8
11511 End:
This page took 0.614651 seconds and 5 git commands to generate.