Minor formatting fixes in riscv-tdep.h
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-08-09 Tom Tromey <tom@tromey.com>
2
3 * riscv-tdep.h: Minor formatting fixes.
4
5 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
6
7 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
8 * dwarf-index-cache.c (create_dir_and_check): Likewise.
9 (test_mkdir_recursive): Likewise.
10 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
11
12 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
13
14 * valarith.c (value_subscripted_rvalue): If an array is not in
15 memory, and we don't know the upper bound, then we can't know that
16 the requested element exists or not.
17
18 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
19
20 * target.c (str_comma_list_concat_elem): Fix typo in comment.
21 (target_options_to_string): Add comment.
22
23 2018-08-08 Tom Tromey <tom@tromey.com>
24
25 * unittests/scoped_mmap-selftests.c: Check result of "write".
26
27 2018-08-08 Jim Wilson <jimw@sifive.com>
28
29 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
30 (decode_register_index_short): New.
31 (decode_j_type_insn, decode_cj_type_insn): New.
32 (decode_b_type_insn, decode_cb_type_insn): New.
33 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
34 local xlen. Check xlen when decoding ambiguous compressed insns. In
35 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
36 is_c_sw_insn instead of is_sw_insn.
37 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
38 (riscv_software_single_step): New.
39 * riscv-tdep.h (riscv_software_single_step): Declare.
40
41 * riscv-tdep.c (riscv_isa_xlen): Drop static.
42 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
43
44 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
45
46 PR gdb/18050:
47 * target.c (dispose_inferior): Don't dispose of inferiors that are
48 already killed.
49
50 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
51
52 * remote.c (remote_target::download_tracepoint): Change char* to
53 const char*.
54
55 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
56
57 * target.h (target_options_to_string): Return an std::string.
58 * target.c (str_comma_list_concat_elem): Return void, use
59 std::string.
60 (do_option): Likewise.
61 (target_options_to_string): Return an std::string.
62 * linux-nat.c (linux_nat_target::wait): Adjust.
63 * target-debug.h (target_debug_print_options): Adjust.
64
65 2018-08-07 Tom Tromey <tom@tromey.com>
66
67 * Makefile.in (CPPFLAGS): New variable.
68 (INTERNAL_CPPFLAGS): Use it.
69
70 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
71
72 * NEWS: Mention the index cache.
73
74 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
75
76 * common/pathstuff.h (get_standard_cache_dir): New.
77 * common/pathstuff.c (get_standard_cache_dir): New.
78 * build-id.h (build_id_to_string): New.
79 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
80 DEBUG_STR_SUFFIX): Move to here.
81 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
82 DEBUG_STR_SUFFIX): Move from there.
83 (write_psymtabs_to_index): Make non-static, add basename
84 parameter. Write to temporary files, rename when done.
85 (save_gdb_index_command): Adjust call to
86 write_psymtabs_to_index.
87 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
88 field.
89 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
90 (get_gdb_index_contents_from_cache): New.
91 (get_gdb_index_contents_from_cache_dwz): New.
92 (dwarf2_initialize_objfile): Read index from cache.
93 (dwarf2_build_psymtabs): Save to index.
94 * dwarf-index-cache.h: New file.
95 * dwarf-index-cache.c: New file.
96 * dwarf-index-write.h: New file.
97
98 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
99
100 * gnulib/aclocal.m4: Re-generate.
101 * gnulib/config.in: Re-generate.
102 * gnulib/configure: Re-generate.
103 * gnulib/import/Makefile.am: Re-generate.
104 * gnulib/import/Makefile.in: Re-generate.
105 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
106 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
107 * gnulib/import/m4/mkdir.m4: New file.
108 * gnulib/import/mkdir.c: New file.
109 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
110 module.
111
112 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
113
114 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
115 * common/scoped_mmap.c: New file.
116 * common/scoped_mmap.h (destroy): New method.
117 (~scoped_mmap, reset): Use destroy.
118 (scoped_mmap): New move constructor.
119 (mmap_file): New declaration.
120 * unittests/scoped_mmap-selftests.c (test_normal,
121 test_invalid_filename, run_tests): New functions.
122 (_initialize_scoped_mmap_selftests): Register selftest.
123
124 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
125
126 * dwarf2read.c (read_gdb_index_from_section): Rename to...
127 (read_gdb_index_from_buffer): ... this. Remove section
128 parameter, add buffer parameter.
129 (get_gdb_index_contents_ftype,
130 get_gdb_index_contents_dwz_ftype): New typedefs.
131 (dwarf2_read_gdb_index): Add callback parameters to get the
132 index contents.
133 (get_gdb_index_contents_from_section): New.
134 (dwarf2_initialize_objfile): Update call to
135 dwarf2_read_gdb_index.
136
137 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
138
139 * common/filestuff.h (gdb_fopen_cloexec): New overload.
140 (gdb_open_cloexec): Likewise.
141 * nat/linux-osdata.c (command_from_pid): Use string_printf.
142 (commandline_from_pid): Likewise.
143 (linux_xfer_osdata_threads): Likewise.
144 (linux_xfer_osdata_fds): Likewise.
145 * ada-lang.c (is_package_name): Likewise.
146 * auxv.c (procfs_xfer_auxv): Likewise.
147 * breakpoint.c (print_one_breakpoint_location): Use
148 uiout::field_fmt.
149 (print_one_catch_solib): Use string_printf.
150 * coff-pe-read.c (add_pe_exported_sym): Likewise.
151 (add_pe_forwarded_sym): Likewise.
152 * dwarf2read.c (create_type_unit_group): Likewise.
153 (build_error_marker_type): Likewise.
154 * infcall.c (get_function_name): Likewise.
155 * valprint.c (print_converted_chars_to_obstack): Likewise.
156 * xtensa-tdep.c (xtensa_register_type): Likewise.
157
158 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
159
160 * remote.c (remote_target::download_tracepoint): Fix format
161 string errors.
162
163 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
164
165 * tracefile.c: Include common/byte-vector.h.
166 (trace_save): Change type of buf to gdb::byte_vector. Initialize
167 with trace_regblock_size if needed. Update uses of buf.
168
169 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
170
171 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
172 std::vector<unsigned char>.
173 * tracepoint.c (collection_list::collection_list): Remove
174 m_regs_mask initializer from initializer list. Resize
175 m_regs_mask using the largest remote register number.
176 (collection_list::add_remote_register): Remove size check on
177 m_regs_mask. Use at to access element.
178 (collection_list::stringify): Change type of temp_buf to
179 gdb::char_vector. Update uses of temp_buf. Resize if needed to
180 stringify the register mask. Use pack_hex_byte for the register
181 mask.
182
183 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
184
185 * tracepoint.h (class collection_list) <add_register>: Remove.
186 <add_remote_register, add_ax_registers, add_local_register>:
187 Declare.
188 <add_memrange>: Add scope parameter.
189 * tracepoint.c (encode_actions_1): Likewise.
190 (collection_list::add_register): Rename to ...
191 (collection_list::add_remote_register): ... this. Update
192 comment.
193 (collection_list::add_ax_registers, add_local_register): New
194 methods.
195 (collection_list::add_memrange): Add scope parameter. Call
196 add_local_register instead of add_register.
197 (finalize_tracepoint_aexpr): New function.
198 (collection_list::collect_symbol): Update calls to add_memrange.
199 Call add_local_register instead of add_register. Call
200 add_ax_registers. Call finalize_tracepoint_aexpr.
201 (encode_actions_1): Get remote regnos for $reg action. Call
202 add_remote_register, add_ax_registers, and add_local_register.
203 Update call to add_memrange. Call finalize_tracepoint_aexpr.
204 (validate_actionline): Call finalize_tracepoint_aexpr.
205
206 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
207
208 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
209 Replace array buf with gdb::char_vector buf, of size
210 get_remote_packet_size (). Replace references to buf and
211 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
212 and xsnprintf with snprintf. Raise errors if the buffer is too
213 small.
214
215 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
216
217 * remote.c (remote_target::download_tracepoint): Fix the has_more
218 predicate in the QTDP action list iteration.
219
220 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
221
222 * remote.c (remote_target::download_tracepoint): Fix indentation
223 in for block.
224
225 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
226
227 * proc-api.c (_initialize_proc_api): Remove c, unused.
228 * procfs.c (procfs_init_inferior): Remove signals, unused.
229 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
230 unused.
231
232 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
233 Andrew Burgess <andrew.burgess@embecosm.com>
234
235 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
236 'W_STOPCODE (0)' as this could be ambiguous.
237
238 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
239
240 * ser-tcp.c (net_open): Fix thinko when deciding whether to
241 disable TCP's Nagle algorithm (use "ai_protocol" instead of
242 "ai_socktype").
243
244 2018-08-02 Tom Tromey <tom@tromey.com>
245
246 PR symtab/16842.
247 * dwarf2read.c (read_func_scope): Set symtab on template parameter
248 symbols.
249 (process_structure_scope): Likewise.
250
251 2018-08-02 Xavier Roirand <roirand@adacore.com>
252
253 PR gdb/22629:
254 * darwin-nat.c (darwin_kill_inferior): Fix handling of
255 kill inferior.
256
257 2018-08-02 Tom Tromey <tom@tromey.com>
258
259 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
260 (darwin_suspend_inferior, darwin_resume_inferior)
261 (darwin_decode_notify_message, darwin_resume_inferior_threads)
262 (darwin_check_new_threads): Check result of get_darwin_inferior.
263
264 2018-07-31 Joel Brobecker <brobecker@adacore.com>
265
266 GDB 8.1.1 released.
267
268 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
269
270 * varobj.c (varobj_get_path_expr_parent): Report an error if
271 parent is a dynamic varobj.
272
273 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
274
275 * gnulib/aclocal.m4: Re-generate.
276 * gnulib/config.in: Re-generate.
277 * gnulib/configure: Re-generate.
278 * gnulib/import/Makefile.in: Re-generate.
279 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
280 * gnulib/import/m4/onceonly.m4: Re-generate.
281
282 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
283
284 * target-descriptions.c (struct xml_test_tdesc): New.
285 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
286 (record_xml_tdesc): Update.
287 (maintenance_check_xml_descriptions): Update.
288 * target-descriptions.h (record_xml_tdesc): Update comment.
289
290 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
291
292 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
293 checking array bounds are defined.
294
295 2018-07-30 Tom Tromey <tom@tromey.com>
296
297 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
298 irreflexivity violation.
299
300 2018-07-30 Tom Tromey <tom@tromey.com>
301
302 * cli/cli-decode.c (lookup_cmd): Remove lint code.
303 * value.c (unpack_long): Remove lint code.
304 * valops.c (value_ind): Remove lint code.
305 * valarith.c (value_x_binop, value_x_unop, value_equal)
306 (value_pos): Remove lint code.
307
308 2018-07-28 Tom de Vries <tdevries@suse.de>
309
310 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
311 with undefined upper bound as <optimized out>.
312
313 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
314
315 * gcore.in: Rename variable "name" to "prefix". Expand
316 "usage" text.
317
318 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
319
320 * windows-nat.c (windows_nat_target::create_inferior): Update to
321 call close() in global namespace.
322
323 2018-07-26 Tom Tromey <tom@tromey.com>
324
325 * dwarf-index-write.c (add_address_entry): Don't add objfile
326 offsets.
327 * dbxread.c (find_stab_function): Rename from
328 find_stab_function_addr. Return a bound_minimal_symbol.
329 (read_dbx_symtab): Use raw_text_low, raw_text_high.
330 Don't add objfile offsets.
331 (end_psymtab): Use raw_text_low, raw_text_high,
332 MSYMBOL_VALUE_RAW_ADDRESS.
333 (read_ofile_symtab): Update.
334 (process_one_symbol): Update.
335 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
336 offsets.
337 (dw2_relocate): Remove.
338 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
339 searching addrmap.
340 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
341 Update.
342 (process_psymtab_comp_unit_reader, add_partial_symbol)
343 (add_partial_subprogram, dwarf2_ranges_read): Update.
344 (load_partial_dies): Update.
345 (add_address_entry): Don't add objfile offsets.
346 (dwarf2_build_include_psymtabs): Update.
347 (create_addrmap_from_aranges): Don't add objfile offsets.
348 (dw2_find_pc_sect_compunit_symtab): Update.
349 * mdebugread.c (parse_symbol): Don't add objfile offsets.
350 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
351 Update.
352 (parse_partial_symbols): Don't add objfile offsets. Use
353 raw_text_low, raw_text_high. Update.
354 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
355 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
356 or call 'relocate' quick function. Clear psymbol_map.
357 * psympriv.h (struct partial_symbol) <address>: Add section
358 offset.
359 <set_unrelocated_address>: Rename from set_address.
360 <raw_text_low, raw_text_high>: New methods.
361 <text_low, text_high>: Add objfile parameter.
362 (add_psymbol_to_bcache): Add 'section' parameter. Call
363 set_unrelocated_address.
364 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
365 (find_pc_psymbol): Update.
366 (fixup_psymbol_section, relocate_psymtabs): Remove.
367 (dump_psymtab, psym_functions): Update.
368 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
369 parameter.
370 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
371 (start_psymtab_common): Update.
372 * symfile-debug.c (debug_qf_relocate): Remove.
373 (debug_sym_quick_functions): Update.
374 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
375 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
376 Update.
377
378 2018-07-26 Tom Tromey <tromey@redhat.com>
379
380 * dbxread.c (end_psymtab): Use text_high_valid and
381 text_low_valid.
382 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
383 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
384 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
385 Update comment.
386 <text_low_valid, text_high_valid>: New fields.
387 <set_text_low, set_text_high>: Update.
388 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
389
390 2018-07-26 Tom Tromey <tom@tromey.com>
391
392 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
393 Update.
394 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
395 textlow and texthigh fields.
396 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
397 Update.
398 * mdebugread.c (parse_lines, parse_partial_symbols)
399 (psymtab_to_symtab_1): Update.
400 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
401 Rename fields. Update comment. Now private.
402 <text_low, text_high, set_text_low, set_text_high>: New methods.
403 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
404 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
405 (start_psymtab_common, maintenance_info_psymtabs)
406 (maintenance_check_psymtabs): Update.
407 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
408 texthigh fields.
409 (scan_xcoff_symtab): Update.
410
411 2018-07-26 Tom Tromey <tromey@redhat.com>
412
413 * psympriv.h (struct partial_symbol) <unrelocated_address,
414 address, set_address>: New methods.
415 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
416 (fixup_psymbol_section, relocate_psymtabs): Update.
417 (print_partial_symbols): Add 'objfile' parameter. Update.
418 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
419 Update.
420
421 2018-07-26 Tom Tromey <tom@tromey.com>
422
423 * dwarf-index-write.c (write_psymbols, debug_names::insert)
424 (debug_names::write_psymbols): Update.
425 * psympriv.h (struct partial_symbol): Derive from
426 general_symbol_info.
427 <obj_section>: New method.
428 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
429 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
430 (find_pc_sect_psymbol, fixup_psymbol_section)
431 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
432 (print_partial_symbols, recursively_search_psymtabs)
433 (compare_psymbols, psymbol_hash, psymbol_compare)
434 (add_psymbol_to_bcache, maintenance_check_psymtabs)
435 (psymbol_name_matches, psym_fill_psymbol_map): Update.
436
437 2018-07-26 Tom Tromey <tromey@redhat.com>
438
439 * dbxread.c (end_psymtab): Remove dead code.
440
441 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
442
443 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
444 DWARF unwinders are disabled.
445 * dwarf2-frame.c: Add dwarf2read.h include.
446 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
447 disabled.
448 (dwarf2_frame_unwinders_enabled_p): Define.
449 (show_dwarf_unwinders_enabled_p): New function.
450 (_initialize_dwarf2_frame): Register switch to control DWARF
451 unwinder use.
452 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
453 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
454 (show_dwarf_cmdlist): Remove static keyword.
455 * dwarf2read.h (set_dwarf_cmdlist): Declare.
456 (show_dwarf_cmdlist): Declare.
457 * NEWS: Document new feature.
458
459 2018-07-26 Tom de Vries <tdevries@suse.de>
460
461 PR breakpoints/23366
462 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
463
464 2018-07-26 Tom de Vries <tdevries@suse.de>
465
466 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
467 DW_AT_count can't be translated to a dynamic prop.
468
469 2018-07-25 Tom de Vries <tdevries@suse.de>
470
471 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
472 try/catch.
473
474 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
475
476 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
477
478 2018-07-25 Joel Brobecker <brobecker@adacore.com>
479
480 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
481
482 2018-07-24 Keith Seitz <keiths@redhat.comt
483
484 PR symtab/23010
485 * dwarf2read.c (dw2_add_symbol_to_list): New function.
486 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
487 instead of add_symbol_to_list.
488 (read_file_scope): Call prepare_one_comp_unit before reading
489 any other DIEs.
490
491 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
492
493 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
494
495 2018-07-24 Tom Tromey <tom@tromey.com>
496
497 * utils.c (malloc, realloc, free): Don't declare.
498 * configure, config.in: Rebuild.
499 * configure.ac: Don't check for declarations of free, malloc, or
500 realloc.
501
502 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
503
504 * aarch64-linux-nat.c
505 (aarch64_linux_nat_target::stopped_data_address): Remove unused
506 variable.
507 * arm-linux-nat.c (fetch_regs): Likewise.
508 (store_regs): Likewise.
509 (fetch_vfp_regs): Likewise.
510 (store_vfp_regs): Likewise.
511 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
512 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
513 (arm_linux_nat_target::insert_watchpoint): Likewise.
514 (arm_linux_nat_target::remove_watchpoint): Likewise.
515 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
516 Likewise.
517 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
518 Likewise.
519 * ppc-linux-nat.c (fetch_register): Likewise.
520 (fetch_all_gp_regs): Likewise.
521 (fetch_ppc_registers): Likewise.
522 (store_all_gp_regs): Likewise.
523 (store_ppc_registers): Likewise.
524 (hwdebug_insert_point): Likewise.
525 (can_use_watchpoint_cond_accel): Likewise.
526 * remote-sim.c (gdb_os_write_stdout): Likewise.
527
528 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
529 Tom Tromey <tom@tromey.com>
530
531 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
532 test for it.
533 * configure: Rebuild.
534
535 2018-07-22 Tom Tromey <tom@tromey.com>
536
537 * regformats/regdat.sh: Define xmltarget_${name} inside
538 #ifndef IN_PROCESS_AGENT.
539
540 2018-07-22 Tom Tromey <tom@tromey.com>
541
542 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
543
544 2018-07-22 Tom Tromey <tom@tromey.com>
545
546 * symfile.c (reread_symbols): Notify iter, not objfile.
547
548 2018-07-22 Tom Tromey <tom@tromey.com>
549
550 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
551 Use arch_ops.
552 (ravenscar_thread_target::prepare_to_store): Likewise.
553
554 2018-07-22 Tom Tromey <tom@tromey.com>
555
556 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
557 unused variable. Call value_fetch_lazy when needed.
558 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
559 Remove unused variable. Call value_fetch_lazy when needed.
560
561 2018-07-22 Tom Tromey <tom@tromey.com>
562
563 * m32c-tdep.c (mark_dma): Return void.
564 (make_regs): Remove unused declarations.
565
566 2018-07-22 Tom Tromey <tom@tromey.com>
567
568 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
569 cmdscm_get_valid_command_smob_arg_unsafe for effect.
570 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
571 bkscm_get_valid_block_smob_arg_unsafe for effect.
572
573 2018-07-22 Tom Tromey <tom@tromey.com>
574
575 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
576 value_type.
577
578 2018-07-22 Tom Tromey <tom@tromey.com>
579
580 * windows-nat.c (saved_context): Conditionally define.
581 * remote.c (remote_target::remote_btrace_maybe_reopen):
582 Conditionally declare "warned".
583 * inflow.c (sigquit_ours): Conditionally define.
584 (new_tty): Move "tty" declaration inside #if.
585 * guile/guile.c (guile_datadir): Conditionally define.
586 * charset.c (set_be_le_names): Move some declarations inside #if.
587 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
588 #if.
589 (parse_xml_btrace_conf): Likewise.
590
591 2018-07-22 Tom Tromey <tom@tromey.com>
592
593 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
594
595 2018-07-22 Tom Tromey <tom@tromey.com>
596
597 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
598 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
599 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
600 * buildsym-legacy.c (get_macro_table): Remove unused variable.
601 * stack.c (frame_apply_level_command): Remove unused variable.
602 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
603 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
604 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
605 unused variable.
606 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
607 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
608 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
609 variable.
610 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
611 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
612 variable.
613 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
614 Remove unused variable.
615 * cli/cli-script.c (recurse_read_control_structure): Remove unused
616 variable.
617 * common/tdesc.c (print_xml_feature::visit): Remove unused
618 variable.
619 * compile/compile-object-load.c (store_regs): Remove unused
620 variables.
621 * complaints.c (clear_complaints): Remove unused variable.
622 * corelow.c (core_target_open): Remove unused variable.
623 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
624 variable.
625 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
626 variable.
627 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
628 variable.
629 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
630 variable.
631 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
632 variable.
633 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
634 variable.
635 * ia64-tdep.c (examine_prologue): Remove unused variable.
636 * infcall.c (run_inferior_call): Remove unused variable.
637 * inferior.c (exit_inferior): Remove unused variable.
638 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
639 * linespec.c (decode_line_2): Remove unused variable.
640 * linux-nat.c (super_close): Remove.
641 * linux-tdep.c (linux_info_proc): Remove unused variable.
642 * mi/mi-main.c (mi_execute_command): Remove unused variable.
643 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
644 Remove unused variable.
645 * parse.c (find_minsym_type_and_address): Remove unused variable.
646 * printcmd.c (info_symbol_command, printf_floating): Remove unused
647 variable.
648 * python/py-breakpoint.c (bppy_set_commands): Remove unused
649 variable.
650 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
651 variables.
652 * record-btrace.c (record_btrace_target::store_registers): Remove
653 unused variable.
654 (cmd_show_record_btrace_cpu): Remove unused variable.
655 * riscv-tdep.c (riscv_register_reggroup_p)
656 (riscv_push_dummy_call, riscv_return_value): Remove unused
657 variable.
658 * rust-exp.y (literal): Remove unused variable.
659 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
660 unused variable.
661 <STRUCTOP_ANONYMOUS>: Likewise.
662 * s390-linux-tdep.c (s390_linux_init_abi_31)
663 (s390_linux_init_abi_64): Remove unused variable.
664 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
665 (file_select_thread, net_windows_open, _initialize_ser_windows):
666 Remove unused variables.
667 * symtab.c (find_pc_sect_line): Remove unused variable.
668 * target-memory.c (compute_garbled_blocks): Remove unused
669 variable.
670 (target_write_memory_blocks): Remove unused variable.
671 * target.c (target_stack::unpush): Remove unused variables.
672 * tracepoint.c (start_tracing, all_tracepoint_actions)
673 (merge_uploaded_trace_state_variables)
674 (print_one_static_tracepoint_marker): Remove unused variable.
675 * unittests/basic_string_view/element_access/char/1.cc (test01):
676 Remove unused variable.
677 * windows-nat.c (windows_continue, windows_add_all_dlls)
678 (do_initial_windows_stuff, windows_nat_target::create_inferior):
679 Remove unused variables.
680
681 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
682
683 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
684 attr_profile in HAVE_ELF.
685 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
686 HAVE_ELF.
687
688 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
689
690 * frame.c (frame_register_unwind): Change parameter name.
691 (frame_unwind_register): Likewise.
692 (frame_unwind_register_value): Likewise.
693 (frame_unwind_register_signed): Likewise.
694 (frame_unwind_register_unsigned): Likewise.
695 * frame.h (frame_register_unwind): Likewise.
696 (frame_unwind_register): Likewise.
697 (frame_unwind_register_value): Likewise.
698 (frame_unwind_register_signed): Likewise.
699 (frame_unwind_register_unsigned): Likewise.
700 (frame_unwind_arch): Likewise.
701
702 2018-07-20 Maciej W. Rozycki <macro@mips.com>
703
704 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
705 ISA maintenance.
706
707 2018-07-20 Maciej W. Rozycki <macro@mips.com>
708
709 * mips-linux-nat.c (mips_linux_nat_target::read_description):
710 Call `get_ptrace_pid' rather than extracting the ptrace PID by
711 hand.
712
713 2018-07-20 Keith Seitz <keiths@redhat.com>
714
715 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
716 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
717 m_compunit_symtab, m_language>: Add "m_" prefix.
718 Update all uses.
719 * buildsym.c: Update all uses.
720
721 2018-07-20 Tom Tromey <tom@tromey.com>
722
723 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
724 * buildsym.h (record_line_ftype): Remove typedef.
725
726 2018-07-20 Tom Tromey <tom@tromey.com>
727
728 * buildsym-legacy.h (augment_type_symtab): Don't declare.
729 (end_expandable_symtab): Likewise.
730 (end_symtab_get_static_block): Likewise.
731 (end_symtab_from_static_block): Likewise.
732 * buildsym-legacy.c (augment_type_symtab): Remove.
733 (end_expandable_symtab): Remove.
734 (end_symtab_get_static_block): Remove.
735 (end_symtab_from_static_block): Remove.
736
737 2018-07-20 Tom Tromey <tom@tromey.com>
738
739 * dwarf2read.c: Include buildsym.h.
740 (struct dwarf2_cu) <builder>: New method.
741 (fixup_go_packaging): Update.
742 (process_full_comp_unit, process_full_type_unit): Update. Don't
743 use scoped_free_pendings.
744 (using_directives): Add "cu" parameter, remove "language".
745 (read_import_statement, setup_type_unit_groups, )
746 (read_func_scope, read_lexical_block_scope)
747 (dwarf2_record_block_ranges, read_namespace): Update.
748 (lnp_state_machine::lnp_state_machine): Add cu parameter.
749 (lnp_state_machine::handle_end_sequence): Update.
750 (class lnp_state_machine) <m_cu>: New member.
751 <m_record_line_callback>: Remove.
752 <m_currently_recording_lines>: New member.
753 (lnp_state_machine::handle_set_file): Update.
754 (noop_record_line): Remove.
755 (dwarf_record_line_p): Add cu parameter.
756 (dwarf_record_line_1, dwarf_finish_line): Likewise.
757 (lnp_state_machine::record_line)
758 (lnp_state_machine::lnp_state_machine)
759 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
760 (dwarf_decode_lines): Update.
761 (dwarf2_start_subfile): Add cu parameter.
762 (dwarf2_start_symtab, new_symbol): Update.
763 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
764 Remove dwarf2_per_objfile parameter.
765 (dwarf_decode_macros): Update.
766
767 2018-07-20 Tom Tromey <tom@tromey.com>
768
769 * stabsread.c (define_symbol): Update.
770 * buildsym-legacy.h (get_buildsym_compunit): Declare.
771 * dwarf2read.c (new_symbol): Update.
772 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
773 * cp-namespace.c: Include buildsym.h.
774 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
775 * buildsym-legacy.c (get_buildsym_compunit): New function.
776
777 2018-07-20 Tom Tromey <tom@tromey.com>
778
779 * xcoffread.c: Include buildsym-legacy.h.
780 * windows-nat.c: Include buildsym-legacy.h.
781 * stabsread.c: Include buildsym-legacy.h.
782 * mdebugread.c: Include buildsym-legacy.h.
783 * buildsym-legacy.h: New file.
784 * buildsym-legacy.c: New file, from buildsym.c.
785 * go32-nat.c: Include buildsym-legacy.h.
786 * dwarf2read.c: Include buildsym-legacy.h.
787 * dbxread.c: Include buildsym-legacy.h.
788 * cp-namespace.c: Include buildsym-legacy.h.
789 * coffread.c: Include buildsym-legacy.h.
790 * buildsym.h: Move some contents to buildsym-legacy.h.
791 * buildsym.c: Include buildsym-legacy.h. Move many functions to
792 buildsym-legacy.c.
793 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
794
795 2018-07-20 Tom Tromey <tom@tromey.com>
796
797 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
798 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
799 (buildsym_compunit::buildsym_compunit)
800 (buildsym_compunit::~buildsym_compunit)
801 (buildsym_compunit::get_macro_table): Define.
802
803 2018-07-20 Tom Tromey <tom@tromey.com>
804
805 * buildsym.c (reset_symtab_globals): Remove.
806 (buildsym_compunit::end_symtab_from_static_block): Update.
807 (buildsym_compunit::augment_type_symtab): Update.
808 (end_symtab_from_static_block): Call free_buildsym_compunit.
809 (augment_type_symtab, end_symtab, end_expandable_symtab):
810 Likewise.
811
812 2018-07-20 Tom Tromey <tom@tromey.com>
813
814 * arch-utils.c: Do not include buildsym.h.
815 * mipsread.c: Do not include buildsym.h.
816 * machoread.c: Do not include buildsym.h.
817 * elfread.c: Do not include buildsym.h.
818
819 2018-07-20 Tom Tromey <tom@tromey.com>
820
821 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
822 initialization.
823 (buildsym_compunit): Add new constructor.
824 (struct buildsym_compunit) <get_last_source_file, finish_block,
825 record_block_range, start_subfile, patch_subfile_names,
826 push_subfile, pop_subfile, record_line, get_compunit_symtab,
827 set_last_source_start_addr, get_last_source_start_addr,
828 get_local_using_directives, set_local_using_directives,
829 get_global_using_directives, outermost_context_p,
830 get_current_context_stack, get_context_stack_depth,
831 get_current_subfile, get_local_symbols, get_file_symbols,
832 get_global_symbols, record_debugformat, record_producer,
833 push_context, pop_context, end_symtab_get_static_block,
834 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
835 New public methods.
836 <record_pending_block, finish_block_internal, make_blockvector,
837 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
838 private methods.
839 Update all users.
840
841 2018-05-22 Tom Tromey <tom@tromey.com>
842
843 * buildsym.c (record_pending_block): Move earlier. Remove objfile
844 parameter.
845 (finish_block_internal): Update.
846
847 2018-07-20 Tom Tromey <tom@tromey.com>
848
849 * buildsym.c (record_pending_block): Move earlier. Remove objfile
850 parameter.
851 (finish_block_internal): Update.
852
853 2018-07-20 Tom Tromey <tom@tromey.com>
854
855 * buildsym.h (EXTERN): Don't define or undef.
856 * buildsym.c (EXTERN): Don't define.
857
858 2018-07-20 Tom Tromey <tom@tromey.com>
859
860 * buildsym.c: Remove TODO comment.
861
862 2018-07-20 Tom Tromey <tom@tromey.com>
863
864 * coffread.c (coff_symtab_read): Update.
865 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
866 (xcoff_new_init): Update.
867 * mipsread.c (mipscoff_new_init): Update.
868 * mdebugread.c (mdebug_build_psymtabs): Update.
869 * elfread.c (elf_new_init): Update.
870 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
871 Update.
872 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
873 (coffstab_build_psymtabs, elfstab_build_psymtabs)
874 (stabsect_build_psymtabs): Update.
875 * buildsym.h (buildsym_init): Don't declare.
876 * buildsym.c: Update comment.
877 (prepare_for_building): Remove.
878 (start_symtab, restart_symtab): Update.
879 (reset_symtab_globals): Update comment.
880 (buildsym_init): Remove.
881
882 2018-07-20 Tom Tromey <tom@tromey.com>
883
884 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
885 * stabsread.c (patch_block_stabs, define_symbol, read_type)
886 (read_enum_type, common_block_start, common_block_end)
887 (cleanup_undefined_types_1, finish_global_stabs): Update.
888 * mdebugread.c (psymtab_to_symtab_1): Update.
889 * dwarf2read.c (fixup_go_packaging, read_func_scope)
890 (read_lexical_block_scope, new_symbol): Update.
891 * dbxread.c (process_one_symbol): Update.
892 * coffread.c (coff_symtab_read, process_coff_symbol)
893 (coff_read_enum_type): Update.
894 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
895 declare.
896 (get_local_symbols, get_file_symbols, get_global_symbols): New
897 functions.
898 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
899 m_global_symbols.
900 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
901 (~scoped_free_pendings): Update.
902 (finish_block, prepare_for_building, reset_symtab_globals)
903 (end_symtab_get_static_block, end_symtab_with_blockvector)
904 (augment_type_symtab, push_context): Update.
905 (get_local_symbols, get_file_symbols, get_global_symbols): New
906 functions.
907 (buildsym_init): Update.
908
909 2018-07-20 Tom Tromey <tom@tromey.com>
910
911 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
912 (process_full_type_unit): Likewise.
913 (dwarf2_start_symtab): Set list_in_scope.
914
915 2018-07-20 Tom Tromey <tom@tromey.com>
916
917 * dwarf2read.c (process_psymtab_comp_unit_reader)
918 (build_type_psymtabs_reader): Do not set list_in_scope.
919
920 2018-07-20 Tom Tromey <tom@tromey.com>
921
922 * buildsym.c (free_pendings): Remove.
923 (add_symbol_to_list, scoped_free_pendings)
924 (finish_block_internal, buildsym_init): Update.
925
926 2018-07-20 Tom Tromey <tom@tromey.com>
927
928 * xcoffread.c (read_xcoff_symtab): Update.
929 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
930 Update.
931 * dbxread.c (process_one_symbol): Update.
932 * coffread.c (coff_symtab_read): Update.
933 * buildsym.h (finish_block): Update.
934 * buildsym.c (finish_block): Remove "listhead" argument.
935 (end_symtab_get_static_block): Update.
936
937 2018-07-20 Tom Tromey <tom@tromey.com>
938
939 * buildsym.h (class scoped_free_pendings): Remove constructor.
940 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
941 method.
942 <m_pending_block_obstack, m_pending_blocks>: New members.
943 (pending_block_obstack, pending_blocks): Remove.
944 (scoped_free_pendings::scoped_free_pendings): Default.
945 (~scoped_free_pendings): Update.
946 (free_pending_blocks): Remove.
947 (finish_block_internal, record_pending_block, make_blockvector)
948 (end_symtab_get_static_block, augment_type_symtab, push_context)
949 (buildsym_init): Update.
950
951 2018-07-20 Tom Tromey <tom@tromey.com>
952
953 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
954 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
955 members.
956 (pending_addrmap, pending_addrmap_obstack)
957 (pending_addrmap_interesting): Remove.
958 (scoped_free_pendings, record_block_range, make_blockvector)
959 (prepare_for_building, reset_symtab_globals, buildsym_init):
960 Update.
961
962 2018-07-20 Tom Tromey <tom@tromey.com>
963
964 * xcoffread.c (process_linenos): Update.
965 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
966 * mdebugread.c (psymtab_to_symtab_1): Update.
967 * dwarf2read.c (setup_type_unit_groups)
968 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
969 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
970 * dbxread.c (process_one_symbol): Update.
971 * coffread.c (coff_symtab_read, enter_linenos)
972 (process_coff_symbol): Update.
973 * buildsym.h (current_subfile): Don't declare.
974 (get_current_subfile): Declare.
975 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
976 member.
977 (start_subfile, free_buildsym_compunit, push_subfile)
978 (prepare_for_building, start_symtab): Update.
979 (get_current_subfile): New function.
980
981 2018-07-20 Tom Tromey <tom@tromey.com>
982
983 * coffread.c (coff_symtab_read): Update.
984 * xcoffread.c (read_xcoff_symtab): Update.
985 * dwarf2read.c (new_symbol): Update.
986 (read_func_scope, read_lexical_block_scope): Update.
987 * dbxread.c (process_one_symbol): Update.
988 * buildsym.h (context_stack, context_stack_depth): Don't declare.
989 (outermost_context_p): Remove macro.
990 (outermost_context_p, get_current_context_stack)
991 (get_context_stack_depth): Declare.
992 (pop_context): Return struct context_stack.
993 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
994 member.
995 (context_stack_size): Remove.
996 (INITIAL_CONTEXT_STACK_SIZE): Remove.
997 (prepare_for_building, end_symtab_get_static_block)
998 (augment_type_symtab, push_context): Update.
999 (pop_context): Return struct context_stack.
1000 (outermost_context_p, get_current_context_stack)
1001 (get_context_stack_depth): New functions.
1002 (buildsym_init): Update.
1003
1004 2018-07-20 Tom Tromey <tom@tromey.com>
1005
1006 * rust-exp.y: Now a pure parser. Update all rules.
1007 (%union): Move earlier.
1008 (current_parser, work_obstack): Remove globals.
1009 (rust_parser, ~rust_parser): Update.
1010 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1011 lex_character, lex_number, lex_string, lex_identifier,
1012 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1013 convert_name, convert_params_to_expression,
1014 convert_ast_to_expression, ast_basic_type, ast_operation,
1015 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1016 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1017 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1018 ast_array_type, ast_slice_type, ast_reference_type,
1019 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1020 (rust_parse): Update.
1021 (rustyyerror, rustyylex): Add parser parameter.
1022 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1023 (rust_lex_stringish_test, rust_lex_test_sequence)
1024 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1025 (rust_lex_test_push_back, rust_lex_tests): Update.
1026
1027 2018-07-19 Pedro Alves <palves@redhat.com>
1028
1029 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1030 gdb::unique_xmalloc_ptr.
1031 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1032 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1033 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1034 copy-initialization.
1035 * guile/scm-pretty-print.c (ppscm_print_children): Use
1036 gdb::unique_xmalloc_ptr instead of cleanups.
1037 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1038 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1039 gdb::unique_xmalloc_ptr.
1040 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1041 Adjust to use gdb::unique_xmalloc_ptr.
1042 * guile/scm-utils.c (extract_arg): Adjust.
1043 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1044 gdb::unique_xmalloc_ptr instead of a cleanup.
1045
1046 2018-07-19 Tom Tromey <tom@tromey.com>
1047
1048 * utils.c (do_value_free_to_mark)
1049 (make_cleanup_value_free_to_mark): Remove.
1050 * utils.h (make_cleanup_value_free_to_mark): Remove.
1051
1052 2018-07-19 Pedro Alves <palves@redhat.com>
1053
1054 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1055 forwarding reference.
1056
1057 2018-07-18 Pedro Alves <palves@redhat.com>
1058
1059 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1060 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1061 cleanup.
1062
1063 2018-07-18 Pedro Alves <palves@redhat.com>
1064
1065 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1066 exceptions.
1067 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1068 (gdbscm_wrap): New.
1069 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1070 directly instead of a cleanup.
1071 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1072 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1073 (vlscm_binop_gdbthrow): New, factored out from ...
1074 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1075 (vlscm_rich_compare): Use gdbscm_wrap.
1076 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1077 instead of a cleanup.
1078 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1079 cleanup.
1080 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1081 Use xfree directly instead of a cleanup.
1082 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1083 Adjust to use gdbscm_wrap and scoped_value_mark.
1084 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1085 (gdbscm_value_address, gdbscm_value_dereference)
1086 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1087 scoped_value_mark.
1088 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1089 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1090 scoped_value_mark.
1091 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1092 gdbscm_wrap and scoped_value_mark.
1093 (gdbscm_value_to_string): Use xfree directly instead of a
1094 cleanup. Move 'buffer' unique_ptr to TRY scope.
1095 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1096 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1097 scoped_value_mark.
1098 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1099 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1100 scoped_value_mark.
1101 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1102 gdbscm_wrap.
1103
1104 2018-07-18 Tom de Vries <tdevries@suse.de>
1105
1106 * findvar.c (default_read_var_value): Also resolve dynamic type for
1107 LOC_OPTIMIZED_OUT vars.
1108
1109 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1110
1111 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1112 decoding.
1113
1114 2018-07-17 Tom Tromey <tom@tromey.com>
1115
1116 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1117 (compute_enum_list, pascm_set_param_value_x)
1118 (gdbscm_parameter_value): Update.
1119 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1120 (gdbscm_scm_to_host_string): Update.
1121 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1122 Update.
1123 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1124 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1125 * guile/scm-string.c (gdbscm_scm_to_string): Return
1126 unique_xmalloc_ptr.
1127 (gdbscm_scm_to_host_string): Likewise.
1128
1129 2018-07-17 Tom Tromey <tom@tromey.com>
1130
1131 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1132 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1133 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1134 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1135 unique_xmalloc_ptr.
1136
1137 2018-07-17 Tom Tromey <tom@tromey.com>
1138
1139 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1140 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1141 Update.
1142 * guile/scm-cmd.c (cmdscm_function): Update.
1143 * guile/scm-pretty-print.c
1144 (ppscm_print_exception_unless_memory_error): Update.
1145 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1146 Return unique_xmalloc_ptr.
1147
1148 2018-07-17 Tom Tromey <tom@tromey.com>
1149
1150 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1151 Use string_printf.
1152
1153 2018-07-17 Jim Wilson <jimw@sifive.com>
1154
1155 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1156 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1157 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1158 unecessary braces after EF_RISCV_RVC test. Delete call to
1159 set_gdbarch_decr_pc_after_break.
1160
1161 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1162 RISCV_LAST_FP_REGNUM + 1.
1163 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1164
1165 2018-07-17 Tom Tromey <tom@tromey.com>
1166
1167 * configure.ac: Remove --disable-gdbcli.
1168 * configure: Rebuild.
1169 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1170 (SUBDIR_CLI_CFLAGS): Remove.
1171 (SFILES): Use SUBDIR_CLI_SRCS.
1172 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1173
1174 2018-07-17 Tom Tromey <tom@tromey.com>
1175
1176 PR gdb/18624:
1177 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1178
1179 2018-07-16 Jim Wilson <jimw@sifive.com>
1180
1181 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1182
1183 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1184
1185 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1186 variable.
1187 (libunwind_frame_sniffer): Likewise.
1188 (libunwind_frame_prev_register): Likewise.
1189 (libunwind_sigtramp_frame_sniffer): Likewise.
1190 * ia64-tdep.c (ia64_access_reg): Likewise.
1191 (ia64_access_rse_reg): Likewise.
1192 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1193 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1194
1195 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1196
1197 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1198
1199 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * remote-sim.c (gdbsim_target::close,
1202 gdbsim_target::mourn_inferior): Remove unused variables.
1203
1204 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1205
1206 * ia64-tdep.c (ktab_buf): New global.
1207 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1208 (get_kernel_table): Adjust.
1209
1210 2018-07-16 Tom Tromey <tom@tromey.com>
1211
1212 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1213 * dwarf2read.c (using_directives, new_symbol): Use
1214 outermost_context_p.
1215 * dbxread.c (process_one_symbol): Use outermost_context_p.
1216 * coffread.c (coff_symtab_read): Use outermost_context_p.
1217
1218 2018-07-16 Tom Tromey <tom@tromey.com>
1219
1220 * dwarf2read.c (using_directives, read_func_scope)
1221 (read_lexical_block_scope): Update.
1222 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1223 * buildsym.h (local_using_directives, global_using_directives):
1224 Don't declare.
1225 (get_local_using_directives, set_local_using_directives)
1226 (get_global_using_directives): Declare.
1227 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1228 m_global_using_directives>: New members.
1229 (finish_block_internal, prepare_for_building)
1230 (reset_symtab_globals, end_symtab_get_static_block)
1231 (push_context): Update.
1232 (get_local_using_directives, set_local_using_directives)
1233 (get_global_using_directives): New functions.
1234 (buildsym_init): Update.
1235
1236 2018-07-16 Tom Tromey <tom@tromey.com>
1237
1238 * xcoffread.c (xcoff_initial_scan): Don't call
1239 free_pending_blocks.
1240 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1241 * buildsym.h (class scoped_free_pendings): Add constructor.
1242 (free_pending_blocks): Don't declare.
1243 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1244 (free_pending_blocks): Now static.
1245
1246 2018-07-16 Tom Tromey <tom@tromey.com>
1247
1248 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1249 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1250 member.
1251 (struct subfile_stack): Remove.
1252 (subfile_stack): Remove.
1253 (push_subfile, pop_subfile, buildsym_init): Update.
1254
1255 2018-07-16 Tom Tromey <tom@tromey.com>
1256
1257 * buildsym.c (push_subfile): Use gdb_assert.
1258 (pop_subfile): Use gdb_assert.
1259
1260 2018-07-16 Tom Tromey <tom@tromey.com>
1261
1262 * buildsym.h (merge_symbol_lists): Remove.
1263 * buildsym.c (merge_symbol_lists): Remove.
1264
1265 2018-07-16 Tom Tromey <tom@tromey.com>
1266
1267 * stabsread.c (scan_file_globals): Update comment.
1268 * stabsread.h (scan_file_globals): Move from buildsym.h.
1269 * buildsym.h (scan_file_globals): Move to stabsread.h.
1270
1271 2018-07-16 Tom Tromey <tom@tromey.com>
1272
1273 * xcoffread.c (xcoff_new_init): Update.
1274 * mipsread.c (mipscoff_new_init): Update.
1275 * mdebugread.c (mdebug_build_psymtabs): Update.
1276 * elfread.c (elf_new_init): Update.
1277 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1278 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1279 * buildsym.h (buildsym_new_init): Don't declare.
1280 * buildsym.c (buildsym_new_init): Remove.
1281
1282 2018-07-16 Tom Tromey <tom@tromey.com>
1283
1284 * stabsread.h (within_function): Move from buildsym.h.
1285 * stabsread.c (start_stabs): Clear within_function.
1286 * coffread.c (coff_start_symtab): Clear within_function.
1287 * buildsym.h (within_function): Move to stabsread.h.
1288 * buildsym.c (prepare_for_building): Update.
1289
1290 2018-07-16 Tom Tromey <tom@tromey.com>
1291
1292 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1293 * dwarf2read.c (dwarf2_start_symtab): Don't set
1294 processing_gcc_compilation.
1295 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1296
1297 2018-07-16 Tom Tromey <tom@tromey.com>
1298
1299 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1300 (next_symbol_text_func): Move from buildsym.h.
1301 * stabsread.c (hashname): Move from buildsym.c.
1302 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1303 (next_symbol_text_func, hashname): Move to stabsread.h.
1304 * buildsym.c: Don't include bcache.h
1305 (hashname): Move to stasbread.c.
1306
1307 2018-07-16 Tom Tromey <tom@tromey.com>
1308
1309 * buildsym.h (context_stack_size): Don't declare.
1310 * buildsym.c (context_stack_size): New global.
1311
1312 2018-07-16 Tom Tromey <tom@tromey.com>
1313
1314 * dbxread.c (processing_acc_compilation): New global.
1315 * buildsym.h (processing_acc_compilation): Don't declare.
1316
1317 2018-07-16 Tom Tromey <tom@tromey.com>
1318
1319 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1320 * dbxread.c (read_ofile_symtab): Update.
1321 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1322 * buildsym.h (last_source_start_addr): Remove.
1323 (set_last_source_start_addr, get_last_source_start_addr):
1324 Declare.
1325 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1326 parameter.
1327 (struct buildsym_compunit) <m_last_source_start_addr>: New
1328 member.
1329 (prepare_for_building): Remove start_addr parameter.
1330 (start_symtab, restart_symtab, end_symtab_get_static_block)
1331 (end_symtab_with_blockvector): Update.
1332 (set_last_source_start_addr, get_last_source_start_addr): New
1333 functions.
1334
1335 2018-07-16 Tom Tromey <tom@tromey.com>
1336
1337 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1338 member.
1339 (have_line_numbers): Remove.
1340 (record_line, prepare_for_building, end_symtab_get_static_block)
1341 (augment_type_symtab): Update.
1342
1343 2018-07-16 Tom Tromey <tom@tromey.com>
1344
1345 * buildsym.c (~buildsym_compunit): Free the macro table.
1346 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1347 methods.
1348 <m_pending_macros>: New member.
1349 (pending_macros): Remove.
1350 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1351 (reset_symtab_globals, end_symtab_get_static_block)
1352 (end_symtab_with_blockvector, augment_type_symtab)
1353 (buildsym_init): Update.
1354
1355 2018-07-16 Tom Tromey <tom@tromey.com>
1356
1357 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1358 parameter.
1359 (buildsym_compunit::set_last_source_file): New method.
1360 <m_last_source_file>: New member.
1361 (prepare_for_building): Remove "name" parameter.
1362 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1363 (last_source_file): Remove.
1364 (set_last_source_file, get_last_source_file): Update.
1365
1366 2018-07-16 Tom Tromey <tom@tromey.com>
1367
1368 * buildsym.c (prepare_for_building): Add assert.
1369
1370 2018-07-16 Tom Tromey <tom@tromey.com>
1371
1372 * buildsym.c (~buildsym_compunit): Update.
1373 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1374 (start_subfile, patch_subfile_names)
1375 (end_symtab_with_blockvector): Update.
1376
1377 2018-07-16 Tom Tromey <tom@tromey.com>
1378
1379 * buildsym.c (struct buildsym_compunit): Add constructor,
1380 destructor, initializers.
1381 (start_buildsym_compunit): Remove.
1382 (free_buildsym_compunit): Use "delete".
1383 (start_symtab, restart_symtab): Use "new".
1384
1385 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1386
1387 * symfile.c (set_objfile_default_section_offset): Remove struct
1388 keyword.
1389
1390 2018-07-14 Stafford Horne <shorne@gmail.com>
1391
1392 * (Responsible Maintainers): Add myself as or1k maintainer.
1393
1394 2018-07-13 Tom Tromey <tom@tromey.com>
1395
1396 * symfile.c (set_objfile_default_section_offset): Use extra braces
1397 around initializer.
1398
1399 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1400
1401 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1402 non-branching basr.
1403
1404 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1405
1406 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1407 unittests/cli-utils-selftests.c
1408 * unittests/cli-utils-selftests.c: New file.
1409
1410 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1411
1412 * NEWS: Mention new commands. Mention change to 'thread apply'.
1413
1414 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1415
1416 * thread.c (thr_try_catch_cmd): New function.
1417 (thread_apply_all_command): Handle qcs flags.
1418 (thread_apply_command): Handle qcs flags.
1419 (taas_command): New function.
1420 (tfaas_command): New function.
1421 (_initialize_thread): Update to setup the new commands 'taas
1422 and 'tfaas'. Change doc string for 'thread apply'.
1423
1424 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1425
1426 * stack.c: (trailing_outermost_frame): New function, mostly
1427 extracted from backtrace_command_1.
1428 (leading_innermost_frame): New function.
1429 (backtrace_command_1): Update to call trailing_outermost_frame.
1430 (frame_apply_command_count): New function.
1431 (frame_apply_level_command): New function.
1432 (frame_apply_all_command): New function.
1433 (frame_apply_command): New function.
1434 (faas_command): New function.
1435 (frame_cmd_list): New variable.
1436 (_initialize_stack): Update to setup the new commands 'frame apply'
1437 and 'faas'.
1438
1439 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1440
1441 * cli-utils.c (number_or_range_parser::get_number): Only handle
1442 numbers or convenience var as numbers.
1443 (parse_flags): New function.
1444 (parse_flags_qcs): New function.
1445 (number_or_range_parser::finished): Ensure parsing end is detected
1446 before end of string.
1447 * cli-utils.h (parse_flags): New function.
1448 (parse_flags_qcs): New function.
1449 (number_or_range_parser): Remove m_finished bool.
1450 (number_or_range_parser::skip_range): Set m_in_range to false.
1451
1452 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1453
1454 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1455 on Windows.
1456
1457 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1458 Jan Kratochvil <jan.kratochvil@redhat.com>
1459 Paul Fertser <fercerpav@gmail.com>
1460 Tsutomu Seki <sekiriki@gmail.com>
1461 Pedro Alves <palves@redhat.com>
1462
1463 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1464 'unittests/parse-connection-spec-selftests.c'.
1465 (COMMON_SFILES): Add 'common/netstuff.c'.
1466 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1467 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1468 * common/netstuff.c: New file.
1469 * common/netstuff.h: New file.
1470 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1471 (wait_for_connect): Update comment. New parameter
1472 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1473 Use 'sock' directly instead of 'scb->fd'.
1474 (try_connect): New function, with code from 'net_open'.
1475 (net_open): Rewrite main loop to deal with multiple
1476 sockets/addresses. Handle IPv6-style hostnames; implement
1477 support for IPv6 connections.
1478 * unittests/parse-connection-spec-selftests.c: New file.
1479
1480 2018-07-11 Pedro Alves <palves@redhat.com>
1481
1482 PR gdb/23377
1483 * remote.c (remote_target::remote_detach_pid): Call
1484 set_current_process.
1485
1486 2018-07-11 Pedro Alves <palves@redhat.com>
1487
1488 * h8300-tdep.c (h8300_gdbarch_init): Remove
1489 set_gdbarch_ecoff_reg_to_regnum calls.
1490
1491 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1492
1493 PR c++/23373
1494 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1495 offsets/sizes for static members of a class/struct.
1496
1497 2018-07-11 Alan Hayward <alan.hayward@arm.com>
1498
1499 * target-descriptions.c (tdesc_register_bitsize): Rename.
1500 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1501 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1502 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1503
1504 2018-07-10 Tom Tromey <tom@tromey.com>
1505
1506 * breakpoint.c (moribund_locations): Now static and a
1507 std::vector.
1508 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1509 (build_bpstat_chain, update_global_location_list)
1510 (breakpoint_retire_moribund): Update.
1511 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1512 VEC.
1513
1514 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1515
1516 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1517 (riscv_register_reggroup_p): Use new function, remove unneeded
1518 parenthesis.
1519 (riscv_push_dummy_call): Extend assert to compare against xlen or
1520 flen based on register type.
1521
1522 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1523
1524 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1525
1526 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1527
1528 * remote.c (show_hardware_watchpoint_limit): New function.
1529 (show_hardware_watchpoint_length_limit): New function.
1530 (show_hardware_breakpoint_limit): New function.
1531 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1532 where appropriate, update help text.
1533
1534 2018-07-09 Tom Tromey <tom@tromey.com>
1535
1536 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1537 (CLIBS): Don't mention NAT_CLIBS.
1538
1539 2018-07-09 Tom Tromey <tom@tromey.com>
1540
1541 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1542 (LIBGDB_OBS, clean mostlyclean): Update.
1543 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1544
1545 2018-07-09 Tom Tromey <tom@tromey.com>
1546
1547 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1548 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1549 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1550
1551 2018-07-09 Tom Tromey <tom@tromey.com>
1552
1553 * Makefile.in (ALLDEPFILES): Remove exec.c.
1554 (COMMON_OBS): Remove exec.o.
1555 (COMMON_SFILES): Add exec.c.
1556
1557 2018-07-09 Tom Tromey <tom@tromey.com>
1558
1559 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1560
1561 2018-07-09 Tom Tromey <tom@tromey.com>
1562
1563 * Makefile.in (clean mostlyclean): Remove stamp-version.
1564 (version.c): Depend on stamp-version.
1565 (stamp-version): New rule, from version.c rule.
1566
1567 2018-07-09 Tom Tromey <tom@tromey.com>
1568
1569 * Makefile.in (init.c): Depend on stamp-init.
1570 (stamp-init): New rule, from init.c rule.
1571 (clean mostlyclean): Remove stamp-init.
1572
1573 2018-07-09 Tom Tromey <tom@tromey.com>
1574
1575 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1576 SUBDIR_GCC_COMPILE_SRCS.
1577
1578 2018-07-09 Tom Tromey <tom@tromey.com>
1579
1580 * Makefile.in (init.c): Remove some unused sed rules.
1581
1582 2018-07-09 Tom Tromey <tom@tromey.com>
1583
1584 * Makefile.in (TSOBS): Remove.
1585 (INIT_FILES): Update.
1586 (LIBGDB_OBS): Update.
1587 (COMMON_SFILES): Add inflow.c.
1588 (SFILES): Remove inflow.c.
1589
1590 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1591
1592 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1593
1594 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1597 get_saveloc_name, is_signal_frame_name, step_name,
1598 init_remote_name, create_addr_space_name,
1599 destroy_addr_space_name, search_unwind_table_name,
1600 find_dyn_list_name): Constify.
1601
1602 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1603
1604 * darwin-nat.c (darwin_pthread_kill): New function.
1605 (darwin_resume_thread): Use darwin_pthread_kill.
1606
1607 2018-07-05 Tom de Vries <tdevries@suse.de>
1608
1609 * macroexp.c (macro_buffer) <operator=>: New member function.
1610
1611 2018-07-04 Tom Tromey <tom@tromey.com>
1612
1613 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1614
1615 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1616
1617 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1618 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1619 * maint.c: Likewise.
1620 * top.c: Likewise.
1621
1622 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1623
1624 * NEWS: Create a new section for the next release branch.
1625 Rename the section of the current branch, now that it has
1626 been cut.
1627
1628 2018-07-04 Joel Brobecker <brobecker@adacore.com>
1629
1630 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1631 * version.in: Bump version to 8.2.50.DATE-git.
1632
1633 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1634 Pedro Alves <palves@redhat.com>
1635
1636 * linux-nat.c (linux_init_ptrace): Rename to ...
1637 (linux_init_ptrace_procfs): ... this. Call
1638 linux_proc_init_warnings.
1639 (linux_nat_target::post_attach)
1640 (linux_nat_target::post_startup_inferior): Adjust.
1641 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1642 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1643
1644 2018-07-04 Tom de Vries <tdevries@suse.de>
1645
1646 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1647 check ...
1648 (read_comp_unit_head): ... here.
1649
1650 2018-07-03 Tom Tromey <tom@tromey.com>
1651
1652 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1653 (stop_tracing, tstatus_command)
1654 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1655 (print_one_static_tracepoint_marker): Update.
1656 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1657 std::vector.
1658 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1659 VEC.
1660 (all_tracepoints, static_tracepoints_here): Return std::vector.
1661
1662 2018-07-03 Tom Tromey <tom@tromey.com>
1663
1664 * common/ptid.c (ptid_equal): Remove.
1665 * common/ptid.h (ptid_equal): Don't declare.
1666 * ada-tasks.c: Update.
1667 * breakpoint.c: Update.
1668 * common/agent.c: Update.
1669 * corelow.c: Update.
1670 * darwin-nat-info.c: Update.
1671 * darwin-nat.c: Update.
1672 * dcache.c: Update.
1673 * dtrace-probe.c: Update.
1674 * dummy-frame.c: Update.
1675 * fbsd-nat.c: Update.
1676 * frame.c: Update.
1677 * gdbthread.h: Update.
1678 * gnu-nat.c: Update.
1679 * go32-nat.c: Update.
1680 * inf-loop.c: Update.
1681 * inf-ptrace.c: Update.
1682 * infcall.c: Update.
1683 * infcmd.c: Update.
1684 * inflow.c: Update.
1685 * infrun.c: Update.
1686 * linux-fork.c: Update.
1687 * linux-nat.c: Update.
1688 * linux-thread-db.c: Update.
1689 * mi/mi-cmd-var.c: Update.
1690 * mi/mi-interp.c: Update.
1691 * mi/mi-main.c: Update.
1692 * nto-procfs.c: Update.
1693 * ppc-linux-tdep.c: Update.
1694 * procfs.c: Update.
1695 * python/py-inferior.c: Update.
1696 * python/py-record-btrace.c: Update.
1697 * python/py-record.c: Update.
1698 * ravenscar-thread.c: Update.
1699 * regcache.c: Update.
1700 * remote-sim.c: Update.
1701 * remote.c: Update.
1702 * sol-thread.c: Update.
1703 * solib.c: Update.
1704 * target.c: Update.
1705 * tui/tui-stack.c: Update.
1706 * varobj.c: Update.
1707 * windows-nat.c: Update.
1708 * windows-tdep.c: Update.
1709
1710 2018-07-03 Tom Tromey <tom@tromey.com>
1711
1712 * common/ptid.c (ptid_match): Remove.
1713 * common/ptid.h (ptid_match): Don't declare.
1714 * fbsd-nat.c: Update.
1715 * infcmd.c: Update.
1716 * infrun.c: Update.
1717 * linux-nat.c: Update.
1718 * record-btrace.c: Update.
1719 * regcache.c: Update.
1720 * remote.c: Update.
1721
1722 2018-07-03 Tom Tromey <tom@tromey.com>
1723
1724 * common/ptid.c (ptid_tid_p): Remove.
1725 * common/ptid.h (ptid_tid_p): Don't declare.
1726 * sol-thread.c: Update.
1727
1728 2018-07-03 Tom Tromey <tom@tromey.com>
1729
1730 * common/ptid.c (ptid_lwp_p): Remove.
1731 * common/ptid.h (ptid_lwp_p): Don't declare.
1732 * fbsd-nat.c: Update.
1733 * linux-nat.c: Update.
1734 * nat/linux-procfs.c: Update.
1735 * nat/x86-linux-dregs.c: Update.
1736 * sol-thread.c: Update.
1737
1738 2018-07-03 Tom Tromey <tom@tromey.com>
1739
1740 * common/ptid.c (ptid_is_pid): Remove.
1741 * common/ptid.h (ptid_is_pid): Don't declare.
1742 * infrun.c: Update.
1743 * linux-nat.c: Update.
1744 * mi/mi-interp.c: Update.
1745 * remote.c: Update.
1746 * thread.c: Update.
1747
1748 2018-07-03 Tom Tromey <tom@tromey.com>
1749
1750 * common/ptid.c (ptid_get_tid): Remove.
1751 * common/ptid.h (ptid_get_tid): Don't declare.
1752 * ada-tasks.c: Update.
1753 * aix-thread.c: Update.
1754 * bsd-uthread.c: Update.
1755 * darwin-nat.c: Update.
1756 * fbsd-nat.c: Update.
1757 * i386-darwin-nat.c: Update.
1758 * infrun.c: Update.
1759 * linux-tdep.c: Update.
1760 * nto-procfs.c: Update.
1761 * ppc-ravenscar-thread.c: Update.
1762 * python/py-infthread.c: Update.
1763 * ravenscar-thread.c: Update.
1764 * sol-thread.c: Update.
1765 * sparc-ravenscar-thread.c: Update.
1766 * windows-nat.c: Update.
1767
1768 2018-07-03 Tom Tromey <tom@tromey.com>
1769
1770 * common/ptid.c (ptid_get_lwp): Remove.
1771 * common/ptid.h (ptid_get_lwp): Don't declare.
1772 * aarch64-linux-nat.c: Update.
1773 * ada-tasks.c: Update.
1774 * aix-thread.c: Update.
1775 * amd64-linux-nat.c: Update.
1776 * arm-linux-nat.c: Update.
1777 * corelow.c: Update.
1778 * fbsd-nat.c: Update.
1779 * fbsd-tdep.c: Update.
1780 * gnu-nat.c: Update.
1781 * i386-cygwin-tdep.c: Update.
1782 * i386-gnu-nat.c: Update.
1783 * i386-linux-nat.c: Update.
1784 * ia64-linux-nat.c: Update.
1785 * inf-ptrace.c: Update.
1786 * infrun.c: Update.
1787 * linux-fork.c: Update.
1788 * linux-nat.c: Update.
1789 * linux-tdep.c: Update.
1790 * linux-thread-db.c: Update.
1791 * mips-linux-nat.c: Update.
1792 * nat/aarch64-linux-hw-point.c: Update.
1793 * nat/aarch64-linux.c: Update.
1794 * nat/linux-btrace.c: Update.
1795 * nat/linux-osdata.c: Update.
1796 * nat/linux-procfs.c: Update.
1797 * nat/x86-linux-dregs.c: Update.
1798 * obsd-nat.c: Update.
1799 * ppc-fbsd-nat.c: Update.
1800 * ppc-linux-nat.c: Update.
1801 * procfs.c: Update.
1802 * python/py-infthread.c: Update.
1803 * ravenscar-thread.c: Update.
1804 * remote.c: Update.
1805 * s390-linux-nat.c: Update.
1806 * sol-thread.c: Update.
1807 * sol2-tdep.c: Update.
1808 * spu-linux-nat.c: Update.
1809 * x86-linux-nat.c: Update.
1810 * xtensa-linux-nat.c: Update.
1811
1812 2018-07-03 Tom Tromey <tom@tromey.com>
1813
1814 * common/ptid.c (ptid_get_pid): Remove.
1815 * common/ptid.h (ptid_get_pid): Don't declare.
1816 * aarch64-linux-nat.c: Update.
1817 * ada-lang.c: Update.
1818 * aix-thread.c: Update.
1819 * alpha-bsd-nat.c: Update.
1820 * amd64-fbsd-nat.c: Update.
1821 * amd64-linux-nat.c: Update.
1822 * arm-linux-nat.c: Update.
1823 * arm-nbsd-nat.c: Update.
1824 * auxv.c: Update.
1825 * break-catch-syscall.c: Update.
1826 * breakpoint.c: Update.
1827 * bsd-uthread.c: Update.
1828 * corelow.c: Update.
1829 * ctf.c: Update.
1830 * darwin-nat.c: Update.
1831 * fbsd-nat.c: Update.
1832 * fbsd-tdep.c: Update.
1833 * gcore.c: Update.
1834 * gnu-nat.c: Update.
1835 * hppa-nbsd-nat.c: Update.
1836 * hppa-obsd-nat.c: Update.
1837 * i386-fbsd-nat.c: Update.
1838 * ia64-linux-nat.c: Update.
1839 * inf-ptrace.c: Update.
1840 * infcmd.c: Update.
1841 * inferior.c: Update.
1842 * inferior.h: Update.
1843 * inflow.c: Update.
1844 * infrun.c: Update.
1845 * linux-fork.c: Update.
1846 * linux-nat.c: Update.
1847 * linux-tdep.c: Update.
1848 * linux-thread-db.c: Update.
1849 * m68k-bsd-nat.c: Update.
1850 * mi/mi-interp.c: Update.
1851 * mi/mi-main.c: Update.
1852 * mips-linux-nat.c: Update.
1853 * mips-nbsd-nat.c: Update.
1854 * mips64-obsd-nat.c: Update.
1855 * nat/aarch64-linux-hw-point.c: Update.
1856 * nat/aarch64-linux.c: Update.
1857 * nat/linux-btrace.c: Update.
1858 * nat/linux-osdata.c: Update.
1859 * nat/linux-procfs.c: Update.
1860 * nat/x86-linux-dregs.c: Update.
1861 * nto-procfs.c: Update.
1862 * obsd-nat.c: Update.
1863 * ppc-linux-nat.c: Update.
1864 * ppc-nbsd-nat.c: Update.
1865 * ppc-obsd-nat.c: Update.
1866 * proc-service.c: Update.
1867 * procfs.c: Update.
1868 * python/py-inferior.c: Update.
1869 * python/py-infthread.c: Update.
1870 * ravenscar-thread.c: Update.
1871 * record.c: Update.
1872 * remote-sim.c: Update.
1873 * remote.c: Update.
1874 * rs6000-nat.c: Update.
1875 * s390-linux-nat.c: Update.
1876 * sh-nbsd-nat.c: Update.
1877 * sol-thread.c: Update.
1878 * sparc-nat.c: Update.
1879 * sparc64-tdep.c: Update.
1880 * spu-linux-nat.c: Update.
1881 * spu-tdep.c: Update.
1882 * target-debug.h: Update.
1883 * target.c: Update.
1884 * thread.c: Update.
1885 * tid-parse.c: Update.
1886 * tracefile-tfile.c: Update.
1887 * vax-bsd-nat.c: Update.
1888 * windows-nat.c: Update.
1889 * x86-linux-nat.c: Update.
1890 * x86-nat.c: Update.
1891
1892 2018-07-03 Tom Tromey <tom@tromey.com>
1893
1894 * common/ptid.c (pid_to_ptid): Remove.
1895 * common/ptid.h (pid_to_ptid): Don't declare.
1896 * aix-thread.c: Update.
1897 * arm-linux-nat.c: Update.
1898 * common/ptid.c: Update.
1899 * common/ptid.h: Update.
1900 * corelow.c: Update.
1901 * ctf.c: Update.
1902 * darwin-nat.c: Update.
1903 * fbsd-nat.c: Update.
1904 * fork-child.c: Update.
1905 * gnu-nat.c: Update.
1906 * go32-nat.c: Update.
1907 * inf-ptrace.c: Update.
1908 * infcmd.c: Update.
1909 * inferior.c: Update.
1910 * infrun.c: Update.
1911 * linux-fork.c: Update.
1912 * linux-nat.c: Update.
1913 * nat/aarch64-linux-hw-point.c: Update.
1914 * nat/fork-inferior.c: Update.
1915 * nat/x86-linux-dregs.c: Update.
1916 * nto-procfs.c: Update.
1917 * obsd-nat.c: Update.
1918 * procfs.c: Update.
1919 * progspace.c: Update.
1920 * remote.c: Update.
1921 * rs6000-nat.c: Update.
1922 * s390-linux-nat.c: Update.
1923 * sol-thread.c: Update.
1924 * spu-linux-nat.c: Update.
1925 * target.c: Update.
1926 * top.c: Update.
1927 * tracefile-tfile.c: Update.
1928 * windows-nat.c: Update.
1929
1930 2018-07-03 Tom Tromey <tom@tromey.com>
1931
1932 * common/ptid.h (ptid_build): Don't declare.
1933 * common/ptid.c (ptid_build): Remove.
1934 * aix-thread.c: Update.
1935 * bsd-kvm.c: Update.
1936 * bsd-uthread.c: Update.
1937 * common/agent.c: Update.
1938 * common/ptid.c: Update.
1939 * common/ptid.h: Update.
1940 * corelow.c: Update.
1941 * darwin-nat.c: Update.
1942 * fbsd-nat.c: Update.
1943 * gnu-nat.c: Update.
1944 * linux-fork.c: Update.
1945 * linux-nat.c: Update.
1946 * linux-thread-db.c: Update.
1947 * nat/linux-osdata.c: Update.
1948 * nat/linux-procfs.c: Update.
1949 * nto-procfs.c: Update.
1950 * obsd-nat.c: Update.
1951 * proc-service.c: Update.
1952 * procfs.c: Update.
1953 * ravenscar-thread.c: Update.
1954 * remote-sim.c: Update.
1955 * remote.c: Update.
1956 * sol-thread.c: Update.
1957 * target.c: Update.
1958 * windows-nat.c: Update.
1959
1960 2018-07-03 Tom Tromey <tom@tromey.com>
1961
1962 * infrun.c (follow_exec): Use exit_inferior_silent.
1963 * inferior.c (exit_inferior_num_silent): Remove.
1964 * inferior.h (exit_inferior_num_silent): Don't declare.
1965
1966 2018-07-03 Tom Tromey <tom@tromey.com>
1967
1968 PR cli/23340:
1969 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1970 inferior_ptid on error.
1971
1972 2018-07-02 Maciej W. Rozycki <macro@mips.com>
1973 Simon Marchi <simon.marchi@polymtl.ca>
1974
1975 PR tdep/8282
1976 * disasm.h (gdb_disassembler): Add
1977 `m_disassembler_options_holder'. member
1978 * disasm.c (get_all_disassembler_options): New function.
1979 (gdb_disassembler::gdb_disassembler): Use it.
1980 (gdb_buffered_insn_length_init_dis): Likewise.
1981 (gdb_buffered_insn_length): Adjust accordingly.
1982 (set_disassembler_options): Handle options with arguments.
1983 (show_disassembler_options_sfunc): Likewise. Add a leading new
1984 line if showing options with descriptions.
1985 (disassembler_options_completer): Adapt to using the
1986 `disasm_options_and_args_t' structure.
1987 * mips-tdep.c (mips_disassembler_options): New variable.
1988 (mips_disassembler_options_o32): Likewise.
1989 (mips_disassembler_options_n32): Likewise.
1990 (mips_disassembler_options_n64): Likewise.
1991 (gdb_print_insn_mips): Don't set `disassembler_options'.
1992 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
1993 functions.
1994 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
1995 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
1996 `gdbarch_disassembler_options_implicit' and
1997 `gdbarch_valid_disassembler_options'.
1998 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
1999 `disasm_options_and_args_t' structure.
2000 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2001 method.
2002 (valid_disassembler_options): Switch from `disasm_options_t' to
2003 the `disasm_options_and_args_t' structure.
2004 * NEWS: Document `set disassembler-options' support for the MIPS
2005 target.
2006 * gdbarch.h: Regenerate.
2007 * gdbarch.c: Regenerate.
2008
2009 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2010
2011 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2012
2013 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2014
2015 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2016 parameter in call to amd64_target_description.
2017 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2018 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2019 (amd64fbsd_init_abi): Likewise.
2020 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2021 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2022 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2023 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2024
2025 2018-06-29 Pedro Alves <palves@redhat.com>
2026
2027 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2028 "segments" parameter.
2029 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2030 (_initialize_amd64_tdep): Update call to
2031 amd64_create_target_description.
2032 (amd64_target_description): Add "segments" parameter. Adjust
2033 the implementation to use it.
2034 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2035 call to amd64_create_target_description.
2036 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2037 * gdb/arch/amd64.h (amd64_create_target_description): Add
2038 "segments" register.
2039 * gdb/arch/amd64.c (amd64_create_target_description): Add
2040 "segments" parameter. Call create_feature_i386_64bit_segments
2041 only if SEGMENTS is true.
2042 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2043 call to amd64_create_target_description.
2044
2045 2018-06-29 Pedro Alves <palves@redhat.com>
2046
2047 * thread.c (thread_target_id_str): New, factored out from ...
2048 (print_thread_info_1): ... here. Use it to compute the max
2049 "Target Id" column width.
2050
2051 2018-06-29 Pedro Alves <palves@redhat.com>
2052
2053 * remote.c (remote_target::extra_thread_info): Delete
2054 'display_buf' and 'n' locals. from the cache, regardless of
2055 packet mechanims is in use. Use cache for qThreadExtra and qP
2056 methods too.
2057
2058 2018-06-29 Pedro Alves <palves@redhat.com>
2059
2060 * blockframe.c (find_pc_sect_containing_function): New function.
2061 * breakpoint.c (print_breakpoint_location): Don't call
2062 find_pc_sect_function.
2063 * linespec.c (create_sals_line_offset): Record the location's
2064 symbol in the sal.
2065 * linespec.c (convert_address_location_to_sals): Fill in sal's
2066 symbol with find_pc_sect_containing_function.
2067 * symtab.c (find_function_start_sal): Rename to ...
2068 (find_function_start_sal_1): ... this.
2069 (find_function_start_sal): Reimplement as wrapper around
2070 find_function_start_sal_1, and use
2071 find_pc_sect_containing_function to fill in the sal's symbol.
2072 (find_function_start_sal(symbol*, bool)): Adjust.
2073 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2074 comments.
2075 (find_pc_sect_containing_function): Declare.
2076
2077 2018-06-29 Pedro Alves <palves@redhat.com>
2078
2079 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2080 true if the the location has no symbol.
2081
2082 2018-06-28 Tom Tromey <tom@tromey.com>
2083
2084 * NEWS: Mention --enable-codesign.
2085 * silent-rules.mk (ECHO_SIGN): New variable.
2086 * configure.ac: Add --enable-codesign.
2087 * configure: Rebuild.
2088 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2089 (gdb$(EXEEXT)): Optionally invoke codesign.
2090
2091 2018-06-28 Pedro Alves <palves@redhat.com>
2092
2093 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2094 comments.
2095 (switch_to_thread_no_regs): Adjust comment.
2096 * infcmd.c (stop_pc): Delete.
2097 (post_create_inferior, info_program_command): Replace references
2098 to stop_pc with references to thread_info->suspend.stop_pc.
2099 * inferior.h (stop_pc): Delete declaration.
2100 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2101 (handle_inferior_event_1, handle_signal_stop)
2102 (process_event_stop_test, keep_going_stepped_thread)
2103 (handle_step_into_function, handle_step_into_function_backward)
2104 (print_stop_location): Replace references to stop_pc with
2105 references to thread_info->suspend.stop_pc.
2106 (struct infcall_suspend_state) <stop_pc>: Delete field.
2107 (save_infcall_suspend_state, restore_infcall_suspend_state):
2108 Remove references to inf_stat->stop_pc.
2109 * linux-fork.c (fork_load_infrun_state): Likewise.
2110 * record-btrace.c (record_btrace_set_replay): Likewise.
2111 * record-full.c (record_full_goto_entry): Likewise.
2112 * remote.c (print_one_stopped_thread): Likewise.
2113 * target.c (target_resume): Extend comment.
2114 * thread.c (set_executing_thread): New.
2115 (set_executing): Use it.
2116 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2117 Remove references to stop_pc.
2118
2119 2018-06-28 Pedro Alves <palves@redhat.com>
2120
2121 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2122 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2123
2124 2018-06-28 Tom Tromey <tom@tromey.com>
2125
2126 * coffread.c (coff_symfile_finish): Update.
2127 * xcoffread.c (xcoff_symfile_finish): Update.
2128 * elfread.c (elf_symfile_finish): Update.
2129 * symfile.h (dwarf2_free_objfile): Don't declare.
2130 * dwarf2read.c (_initialize_dwarf2_read): Use
2131 register_objfile_data_with_cleanup.
2132 (dwarf2_free_objfile): Now static. Change signature.
2133
2134 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2135
2136 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2137 option "-o" to add-symbol-file-load to add an offset to each
2138 section's load address.
2139 * symfile.c (set_objfile_default_section_offset): New function.
2140
2141 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2142
2143 * symfile.c (add_symbol_file_command): Make sure that sections
2144 with the same name are sorted in the same order.
2145
2146 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2147
2148 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2149 require the second argument. If omitted, load sections at the
2150 addresses specified in the file.
2151
2152 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2153
2154 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2155 (_initialize_symfile): Add option "-o" to symbol-file to add an
2156 offset to each section of the symbol file.
2157
2158 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2159
2160 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2161
2162 2018-06-27 Tom Tromey <tom@tromey.com>
2163
2164 * stack.c (_initialize_stack): Update "func" help text.
2165
2166 2018-06-27 Tom Tromey <tom@tromey.com>
2167
2168 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2169 std::vector.
2170 (unwind_infopy_str, pyuw_create_unwind_info)
2171 (unwind_infopy_add_saved_register, pyuw_sniffer)
2172 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2173 Update.
2174 (struct saved_reg): Add constructor.
2175 <value>: Now a gdbpy_ref<>.
2176
2177 2018-06-27 Tom Tromey <tom@tromey.com>
2178
2179 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2180
2181 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2182
2183 * gdb-gdb.py.in: Format using autopep8.
2184
2185 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2186
2187 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2188 (type_lookup_function): Recognize CORE_ADDR values.
2189
2190 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2191
2192 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2193 print tag_name.
2194
2195 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2196
2197 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2198 <__lt__>: Add.
2199
2200 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2201
2202 * gdb-gdb.py: Move to...
2203 * gdb-gdb.py.in: ... here.
2204 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2205 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2206 dependencies.
2207 (distclean): Remove gdb-gdb.py when cleaning.
2208 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2209 * configure: Re-generate.
2210
2211 2018-06-27 Pedro Alves <palves@redhat.com>
2212
2213 * proc-service.c (get_ps_regcache): New.
2214 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2215 (ps_lsetfpregs): Use it.
2216
2217 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2218
2219 PR gdb/21695
2220 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2221 (dwarf_decode_lines_1): Adjust.
2222
2223 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2224
2225 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2226 override.
2227 <info_proc>: Likewise.
2228
2229 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2230
2231 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2232 to windows_fetch_one_register, and only handle the case of
2233 fetching one register. Move the code that reloads the context
2234 and iterates over all registers if R is negative to...
2235 (windows_nat_target::fetch_registers): ... here.
2236 (do_windows_store_inferior_registers): Rename to
2237 windows_store_one_register, and only handle the case of storing
2238 one register. Move the code that handles the case where r is
2239 negative to...
2240 (windows_nat_target::store_registers) ... here.
2241
2242 2018-06-26 Tom Tromey <tom@tromey.com>
2243
2244 PR rust/22574:
2245 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2246 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2247 Update.
2248 (rust_internal_print_type): Add podata parameter.
2249 (rust_print_type): Update.
2250
2251 2018-06-26 Tom Tromey <tom@tromey.com>
2252
2253 * typeprint.h (struct print_offset_data) <update, finish,
2254 maybe_print_hole>: New methods.
2255 <indentation>: New constant.
2256 * typeprint.c (print_offset_data::indentation): Define.
2257 (print_offset_data::maybe_print_hole, print_offset_data::update)
2258 (print_offset_data::finish): Move from c-typeprint.c and rename.
2259 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2260 (print_spaces_filtered_with_print_options): Update.
2261 (c_print_type_union_field_offset, maybe_print_hole)
2262 (c_print_type_struct_field_offset): Move to typeprint.c and
2263 rename.
2264 (c_type_print_base_struct_union): Update.
2265
2266 2018-06-25 Pedro Alves <palves@redhat.com>
2267
2268 * gdbthread.h (thread_info_ref, delete_thread)
2269 (delete_thread_silent, first_thread_of_inferior)
2270 (any_thread_of_inferior, switch_to_thread)
2271 (enable_thread_stack_temporaries)
2272 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2273 (get_last_thread_stack_temporary)
2274 (value_in_thread_stack_temporaries, can_access_registers_thread):
2275 Spell out "struct thread_info" instead of just "thread_info".
2276 * inferior.h (notice_new_inferior): Likewise.
2277
2278 2018-06-25 Pedro Alves <palves@redhat.com>
2279
2280 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2281 pass thread_info pointer to delete_thread.
2282 (windows_nat_target::detach): Pass inferior pointer to
2283 detach_inferior.
2284 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2285 delete_thread.
2286 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2287 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2288 and pass a thread_info pointer to delete_thread.
2289 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2290 pass thread_info pointer to delete_thread.
2291 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2292 delete_thread_silent call.
2293 * procfs.c (procfs_target::detach): Pass inferior pointer to
2294 detach_inferior.
2295 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2296 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2297 delete_thread_silent call.
2298 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2299 pass thread_info pointer to delete_thread.
2300 (windows_nat_target::detach): Pass inferior pointer to
2301 delete_inferior.
2302
2303 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2304
2305 * regcache.c (readable_regcache::read_part): Fix asserts.
2306 (reg_buffer::raw_collect_part): New function.
2307 (regcache::write_part): Fix asserts.
2308 (reg_buffer::raw_supply_part): New function.
2309 (regcache::transfer_regset_register): New helper function.
2310 (regcache::transfer_regset): Call new functions.
2311 (regcache_supply_regset): Use gdb_byte*.
2312 (regcache::supply_regset): Likewise.
2313 (regcache_collect_regset): Likewise.
2314 (regcache::collect_regset): Likewise.
2315 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2316 (reg_buffer::raw_supply_part): Likewise.
2317 (regcache::transfer_regset_register): Likewise.
2318 (regcache::transfer_regset): Use gdb_byte*.
2319
2320 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2321
2322 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2323
2324 2018-06-21 Pedro Alves <palves@redhat.com>
2325
2326 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2327 instead of a ptid_t. All callers adjusted.
2328 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2329 adjusted.
2330 (print_ada_task_info, display_current_task_id, task_command_1):
2331 Adjust.
2332 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2333 inferior_thread.
2334 (breakpoint_kind): Adjust.
2335 (remove_breakpoints_pid): Rename to ...
2336 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2337 pointer. All callers adjusted.
2338 (bpstat_clear_actions): Use inferior_thread.
2339 (get_bpstat_thread): New.
2340 (bpstat_do_actions): Use it.
2341 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2342 to take a thread_info pointer. All callers adjusted.
2343 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2344 (breakpoint_re_set_thread): Use inferior_thread.
2345 * breakpoint.h (struct inferior): Forward declare.
2346 (bpstat_stop_status): Update.
2347 (remove_breakpoints_pid): Delete.
2348 (remove_breakpoints_inf): New.
2349 * bsd-uthread.c (bsd_uthread_target::wait)
2350 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2351 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2352 (maint_btrace_packet_history_cmd)
2353 (maint_btrace_clear_packet_history_cmd): Adjust.
2354 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2355 inferior_thread.
2356 * cli/cli-interp.c: Include "inferior.h".
2357 * common/refcounted-object.h (struct
2358 refcounted_object_ref_policy): New.
2359 * compile/compile-object-load.c: Include gdbthread.h.
2360 (store_regs): Use inferior_thread.
2361 * corelow.c (core_target::close): Use current_inferior.
2362 (core_target_open): Adjust to use first_thread_of_inferior and use
2363 the current inferior.
2364 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2365 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2366 <thread>: ... this new field. All references adjusted.
2367 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2368 Take a thread_info pointer instead of a ptid_t.
2369 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2370 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2371 thread_info pointer instead of a ptid_t.
2372 * elfread.c: Include "inferior.h".
2373 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2374 Use inferior_thread.
2375 * eval.c (evaluate_subexp): Likewise.
2376 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2377 inferior_thread.
2378 * gdb_proc_service.h (struct thread_info): Forward declare.
2379 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2380 <thread>: ... this new field. All references adjusted.
2381 * gdbarch.h, gdbarch.c: Regenerate.
2382 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2383 'thread' parameter. All implementations and callers adjusted.
2384 * gdbthread.h (thread_info) <set_running>: New method.
2385 (delete_thread, delete_thread_silent): Take a thread_info pointer
2386 instead of a ptid.
2387 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2388 (first_thread_of_process): Delete, replaced by ...
2389 (first_thread_of_inferior): ... this new function. All callers
2390 adjusted.
2391 (any_live_thread_of_process): Delete, replaced by ...
2392 (any_live_thread_of_inferior): ... this new function. All callers
2393 adjusted.
2394 (switch_to_thread, switch_to_no_thread): Declare.
2395 (is_executing): Delete.
2396 (enable_thread_stack_temporaries): Update comment.
2397 <enable_thread_stack_temporaries>: Take a thread_info pointer
2398 instead of a ptid_t. Incref the thread.
2399 <~enable_thread_stack_temporaries>: Decref the thread.
2400 <m_ptid>: Delete
2401 <m_thr>: New.
2402 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2403 (get_last_thread_stack_temporary)
2404 (value_in_thread_stack_temporaries, can_access_registers_thread):
2405 Take a thread_info pointer instead of a ptid_t. All callers
2406 adjusted.
2407 * infcall.c (get_call_return_value): Use inferior_thread.
2408 (run_inferior_call): Work with thread pointers instead of ptid_t.
2409 (call_function_by_hand_dummy): Work with thread pointers instead
2410 of ptid_t. Use thread_info_ref.
2411 * infcmd.c (proceed_thread_callback): Access thread's state
2412 directly.
2413 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2414 access thread's state directly.
2415 (continue_command): Use inferior_thread.
2416 (info_program_command): Use find_thread_ptid and access thread
2417 state directly.
2418 (proceed_after_attach_callback): Use thread state directly.
2419 (notice_new_inferior): Take a thread_info pointer instead of a
2420 ptid_t. All callers adjusted.
2421 (exit_inferior): Take an inferior pointer instead of a pid. All
2422 callers adjusted.
2423 (exit_inferior_silent): New.
2424 (detach_inferior): Delete.
2425 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2426 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2427 (detach_inferior_command, kill_inferior_command): Use
2428 find_inferior_id instead of valid_gdb_inferior_id and
2429 gdb_inferior_id_to_pid.
2430 (inferior_command): Use inferior and thread pointers.
2431 * inferior.h (struct thread_info): Forward declare.
2432 (notice_new_inferior): Take a thread_info pointer instead of a
2433 ptid_t. All callers adjusted.
2434 (detach_inferior): Delete declaration.
2435 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2436 instead of a pid. All callers adjusted.
2437 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2438 (valid_gdb_inferior_id): Delete.
2439 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2440 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2441 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2442 ...
2443 <inf>: ... this new field.
2444 <step_ptid>: Delete, replaced by ...
2445 <step_thread>: ... this new field.
2446 (get_displaced_stepping_state): Take an inferior pointer instead
2447 of a pid. All callers adjusted.
2448 (displaced_step_in_progress_any_inferior): Adjust.
2449 (displaced_step_in_progress_thread): Take a thread pointer instead
2450 of a ptid_t. All callers adjusted.
2451 (displaced_step_in_progress, add_displaced_stepping_state): Take
2452 an inferior pointer instead of a pid. All callers adjusted.
2453 (get_displaced_step_closure_by_addr): Adjust.
2454 (remove_displaced_stepping_state): Take an inferior pointer
2455 instead of a pid. All callers adjusted.
2456 (displaced_step_prepare_throw, displaced_step_prepare)
2457 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2458 All callers adjusted.
2459 (start_step_over): Adjust.
2460 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2461 displaced step queue.
2462 (do_target_resume): Adjust.
2463 (fetch_inferior_event): Use inferior_thread.
2464 (context_switch, get_inferior_stop_soon): Take an
2465 execution_control_state pointer instead of a ptid_t. All callers
2466 adjusted.
2467 (switch_to_thread_cleanup): Delete.
2468 (stop_all_threads): Use scoped_restore_current_thread.
2469 * inline-frame.c: Include "gdbthread.h".
2470 (inline_state) <inline_state>: Take a thread pointer instead of a
2471 ptid_t. All callers adjusted.
2472 <ptid>: Delete, replaced by ...
2473 <thread>: ... this new field.
2474 (find_inline_frame_state): Take a thread pointer instead of a
2475 ptid_t. All callers adjusted.
2476 (skip_inline_frames, step_into_inline_frame)
2477 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2478 pointer instead of a ptid_t. All callers adjusted.
2479 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2480 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2481 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2482 pointers directly.
2483 * linux-nat.c (get_detach_signal): Likewise.
2484 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2485 (thread_db_notice_clone): Adjust.
2486 (thread_db_find_new_threads_silently)
2487 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2488 a thread pointer instead of a ptid_t. All callers adjusted.
2489 * mi/mi-cmd-var.c: Include "inferior.h".
2490 (mi_cmd_var_update_iter): Update to use thread pointers.
2491 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2492 inferior directly.
2493 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2494 out to ...
2495 (mi_output_running): ... this new function.
2496 (mi_on_resume_1): Adjust to use it.
2497 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2498 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2499 directly.
2500 (interrupt_thread_callback): : Adjust to use thread and inferior
2501 pointers.
2502 * proc-service.c: Include "gdbthread.h".
2503 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2504 * progspace-and-thread.c: Include "inferior.h".
2505 * progspace.c: Include "inferior.h".
2506 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2507 hold a reference to an inferior_object.
2508 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2509 inferior_thread.
2510 * python/py-inferior.c (struct inferior_object): Give the type a
2511 tag name instead of a typedef.
2512 (python_on_normal_stop): No need to check if the current thread is
2513 listed.
2514 (inferior_to_inferior_object): Change return type to
2515 inferior_object. All callers adjusted.
2516 (find_thread_object): Delete, bits factored out to ...
2517 (thread_to_thread_object): ... this new function.
2518 * python/py-infthread.c (create_thread_object): Use
2519 inferior_to_inferior_object.
2520 (thpy_is_stopped): Use thread pointer directly.
2521 (gdbpy_selected_thread): Use inferior_thread.
2522 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2523 field, replaced with ...
2524 <thread>: ... this new field. All users adjusted.
2525 (btpy_insn_or_gap_new): Drop const.
2526 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2527 callers adjusted.
2528 * python/py-record.c: Include "gdbthread.h".
2529 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2530 a ptid_t. All callers adjusted.
2531 (gdbpy_current_recording): Use inferior_thread.
2532 * python/py-record.h (recpy_record_object) <ptid>: Delete
2533 field, replaced with ...
2534 <thread>: ... this new field. All users adjusted.
2535 (recpy_element_object) <ptid>: Delete
2536 field, replaced with ...
2537 <thread>: ... this new field. All users adjusted.
2538 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2539 a ptid_t. All callers adjusted.
2540 * python/py-threadevent.c: Include "gdbthread.h".
2541 (get_event_thread): Use thread_to_thread_object.
2542 * python/python-internal.h (struct inferior_object): Forward
2543 declare.
2544 (find_thread_object, find_inferior_object): Delete declarations.
2545 (thread_to_thread_object, inferior_to_inferior_object): New
2546 declarations.
2547 * record-btrace.c: Include "inferior.h".
2548 (require_btrace_thread): Use inferior_thread.
2549 (record_btrace_frame_sniffer)
2550 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2551 (get_thread_current_frame): Use scoped_restore_current_thread and
2552 switch_to_thread.
2553 (get_thread_current_frame): Use thread pointer directly.
2554 (record_btrace_replay_at_breakpoint): Use thread's inferior
2555 pointer directly.
2556 * record-full.c: Include "inferior.h".
2557 * regcache.c: Include "gdbthread.h".
2558 (get_thread_arch_regcache): Use the inferior's address space
2559 directly.
2560 (get_thread_regcache, registers_changed_thread): New.
2561 * regcache.h (get_thread_regcache(thread_info *thread)): New
2562 overload.
2563 (registers_changed_thread): New.
2564 (remote_target) <remote_detach_1>: Swap order of parameters.
2565 (remote_add_thread): <remote_add_thread>: Return the new thread.
2566 (get_remote_thread_info(ptid_t)): New overload.
2567 (remote_target::remote_notice_new_inferior): Use thread pointers
2568 directly.
2569 (remote_target::process_initial_stop_replies): Use
2570 thread_info::set_running.
2571 (remote_target::remote_detach_1, remote_target::detach)
2572 (extended_remote_target::detach): Adjust.
2573 * stack.c (frame_show_address): Use inferior_thread.
2574 * target-debug.h (target_debug_print_thread_info_pp): New.
2575 * target-delegates.c: Regenerate.
2576 * target.c (default_thread_address_space): Delete.
2577 (memory_xfer_partial_1): Use current_inferior.
2578 (target_detach): Use current_inferior.
2579 (target_thread_address_space): Delete.
2580 (generic_mourn_inferior): Use current_inferior.
2581 * target.h (struct target_ops) <thread_address_space>: Delete.
2582 (target_thread_address_space): Delete.
2583 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2584 pointers directly.
2585 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2586 thread pointer instead of a ptid_t. Adjust all callers.
2587 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2588 (first_thread_of_process): Delete, replaced by ...
2589 (first_thread_of_inferior): ... this new function. All callers
2590 adjusted.
2591 (any_thread_of_process): Rename to ...
2592 (any_thread_of_inferior): ... this, and take an inferior pointer.
2593 (any_live_thread_of_process): Rename to ...
2594 (any_live_thread_of_inferior): ... this, and take an inferior
2595 pointer.
2596 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2597 (value_in_thread_stack_temporaries)
2598 (get_last_thread_stack_temporary): Take a thread pointer instead
2599 of a ptid_t. Adjust all callers.
2600 (thread_info::set_running): New.
2601 (validate_registers_access): Use inferior_thread.
2602 (can_access_registers_ptid): Rename to ...
2603 (can_access_registers_thread): ... this, and take a thread
2604 pointer.
2605 (print_thread_info_1): Adjust to compare thread pointers instead
2606 of ptids.
2607 (switch_to_no_thread, switch_to_thread): Make extern.
2608 (scoped_restore_current_thread::~scoped_restore_current_thread):
2609 Use m_thread pointer directly.
2610 (scoped_restore_current_thread::scoped_restore_current_thread):
2611 Use inferior_thread.
2612 (thread_command): Use thread pointer directly.
2613 (thread_num_make_value_helper): Use inferior_thread.
2614 * top.c (execute_command): Use inferior_thread.
2615 * tui/tui-interp.c: Include "inferior.h".
2616 * varobj.c (varobj_create): Use inferior_thread.
2617 (value_of_root_1): Use find_thread_global_id instead of
2618 global_thread_id_to_ptid.
2619
2620 2018-06-21 Alan Hayward <alan.hayward@arm.com>
2621
2622 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2623 possible.
2624 (regcache::write_part): Likewise.
2625 (readable_regcache::cooked_read_part): Update comment.
2626 (readable_regcache::cooked_write_part): Likewise.
2627 * regcache.h: (readable_regcache::read_part): Likewise.
2628 (regcache::write_part): Likewise.
2629
2630 2018-06-21 Richard Bunt <richard.bunt@arm.com>
2631 Dirk Schubert <dirk.schubert@arm.com>
2632
2633 * aarch64-linux-nat.c (post_attach): New.
2634 (aarch64_linux_nat_target::post_attach): Override post_attach to
2635 record the number of hardware debug registers.
2636
2637 2018-06-20 Tom Tromey <tom@tromey.com>
2638
2639 * python/py-param.c (add_setshow_generic): Make parameters const.
2640 (parmpy_init): Update.
2641
2642 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2643
2644 * regcache.h (regcache_cooked_read_ftype): Rename to...
2645 (register_read_ftype): ...this, change type to function_view.
2646 (class reg_buffer) <save>: Remove src parameter.
2647 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2648 parameter non-const in first overload. Remove src parameter in
2649 second overload.
2650 * regcache.c (do_cooked_read): Remove.
2651 (readonly_detached_regcache::readonly_detached_regcache): Make
2652 parameter non-const, adjust call to other constructor.
2653 (reg_buffer::save): Remove src parameter.
2654 * frame.c (do_frame_register_read): Remove.
2655 (frame_save_as_regcache): Use lambda function.
2656 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2657 parameter to ppu2spu_data *.
2658 (ppu2spu_sniffer): Use lambda function.
2659
2660 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2661
2662 * record-full.c (record_full_target::insert_breakpoint): Remove
2663 "struct" keyword, add const.
2664
2665 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2666
2667 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2668 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2669 * configure.ac: Remove AC_PREREQ, add missing quoting.
2670 * gnulib/configure.ac: Modernize usage of
2671 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2672 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2673 (AUTOMAKE_VERSION): Bump to 1.15.1.
2674 * configure: Re-generate.
2675 * config.in: Re-generate.
2676 * aclocal.m4: Re-generate.
2677 * gnulib/aclocal.m4: Re-generate.
2678 * gnulib/config.in: Re-generate.
2679 * gnulib/configure: Re-generate.
2680 * gnulib/import/Makefile.in: Re-generate.
2681
2682 2018-06-19 Pedro Alves <palves@redhat.com>
2683
2684 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2685 (lookup_minimal_symbol_by_pc_section): ... here with
2686 gdb_assert_not_reached added.
2687
2688 2018-06-19 Pedro Alves <palves@redhat.com>
2689
2690 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2691 parameter with a block parameter. Compare location's block symbol
2692 with the frame's block instead of addresses.
2693 (skip_inline_frames): Pass the current block instead of the
2694 frame's address. Break out as soon as we determine the frame
2695 should not be skipped.
2696
2697 2018-06-18 Tom Tromey <tom@tromey.com>
2698
2699 * solib-aix.c (solib_aix_get_section_offsets): Return
2700 unique_xmalloc_ptr.
2701 (solib_aix_solib_create_inferior_hook): Update.
2702
2703 2018-06-18 Tom Tromey <tom@tromey.com>
2704
2705 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2706
2707 2018-06-18 Tom Tromey <tom@tromey.com>
2708
2709 * solib-frv.c (frv_relocate_main_executable): Use
2710 unique_xmalloc_ptr.
2711 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2712 unique_xmalloc_ptr.
2713
2714 2018-06-18 Tom Tromey <tom@tromey.com>
2715
2716 * objfiles.h (inhibit_section_map_updates): Update.
2717 (resume_section_map_updates, resume_section_map_updates_cleanup):
2718 Remove.
2719 * solib-svr4.c (svr4_handle_solib_event): Update.
2720 * objfiles.c (inhibit_section_map_updates): Return
2721 scoped_restore_tmpl<int>.
2722 (resume_section_map_updates, resume_section_map_updates_cleanup):
2723 Remove.
2724
2725 2018-06-18 Tom Tromey <tom@tromey.com>
2726
2727 * valprint.h (read_string): Update.
2728 * valprint.c (read_string): Change type of "buffer".
2729 (val_print_string): Update.
2730 * python/py-value.c (valpy_string): Update.
2731 * language.h (struct language_defn) <la_get_string>: Change
2732 type of "buffer".
2733 (default_get_string, c_get_string): Update.
2734 * language.c (default_get_string): Change type of "buffer".
2735 * guile/scm-value.c (gdbscm_value_to_string): Update.
2736 * c-lang.c (c_get_string): Change type of "buffer".
2737
2738 2018-06-18 Tom Tromey <tom@tromey.com>
2739
2740 * ser-mingw.c (struct pipe_state_destroyer): New.
2741 (pipe_state_up): New typedef.
2742 (cleanup_pipe_state): Remove.
2743 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2744
2745 2018-06-18 Tom Tromey <tom@tromey.com>
2746
2747 * rust-lang.h (rust_yyerror): Don't declare.
2748 * rust-lang.c (rust_language_defn): Update.
2749 * rust-exp.y (yyerror): Now static.
2750 * parse.c (parse_exp_in_context_1): Update.
2751 * p-lang.h (p_yyerror): Don't declare.
2752 * p-lang.c (p_language_defn): Update.
2753 * p-exp.y (yyerror): Now static.
2754 * opencl-lang.c (opencl_language_defn): Update.
2755 * objc-lang.c (objc_language_defn): Update.
2756 * m2-lang.h (m2_yyerror): Don't declare.
2757 * m2-lang.c (m2_language_defn): Update.
2758 * m2-exp.y (yyerror): Now static.
2759 * language.h (struct language_defn) <la_error>: Remove.
2760 * language.c (unk_lang_error): Remove.
2761 (unknown_language_defn, auto_language_defn): Remove.
2762 * go-lang.h (go_yyerror): Don't declare.
2763 * go-lang.c (go_language_defn): Update.
2764 * go-exp.y (yyerror): Now static.
2765 * f-lang.h (f_yyerror): Don't declare.
2766 * f-lang.c (f_language_defn): Update.
2767 * f-exp.y (yyerror): Now static.
2768 * d-lang.h (d_yyerror): Don't declare.
2769 * d-lang.c (d_language_defn): Update.
2770 * d-exp.y (yyerror): Now static.
2771 * c-lang.h (c_yyerror): Don't declare.
2772 * c-lang.c (c_language_defn, cplus_language_defn)
2773 (asm_language_defn, minimal_language_defn): Update.
2774 * c-exp.y (yyerror): Now static.
2775 * ada-lang.h (ada_yyerror): Don't declare.
2776 * ada-lang.c (ada_language_defn): Update.
2777 * ada-exp.y (yyerror): Now static.
2778
2779 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2780
2781 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2782 (store_sveregs_to_thread): Likewise.
2783 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2784 (aarch64_linux_store_inferior_registers): Likewise.
2785 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2786 function.
2787 (aarch64_sve_regs_copy_to_regcache): Likewise.
2788 (aarch64_sve_regs_copy_from_regcache): Likewise.
2789 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2790 declaration.
2791 (aarch64_sve_regs_copy_to_regcache): Likewise.
2792 (aarch64_sve_regs_copy_from_regcache): Likewise.
2793 (sve_context): Structure from Linux headers.
2794 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2795 (SVE_SIG_ZREG_SIZE): Likewise.
2796 (SVE_SIG_PREG_SIZE): Likewise.
2797 (SVE_SIG_FFR_SIZE): Likewise.
2798 (SVE_SIG_REGS_OFFSET): Likewise.
2799 (SVE_SIG_ZREGS_OFFSET): Likewise.
2800 (SVE_SIG_ZREG_OFFSET): Likewise.
2801 (SVE_SIG_ZREGS_SIZE): Likewise.
2802 (SVE_SIG_PREGS_OFFSET): Likewise.
2803 (SVE_SIG_PREG_OFFSET): Likewise.
2804 (SVE_SIG_PREGS_SIZE): Likewise.
2805 (SVE_SIG_FFR_OFFSET): Likewise.
2806 (SVE_SIG_REGS_SIZE): Likewise.
2807 (SVE_SIG_CONTEXT_SIZE): Likewise.
2808 (SVE_PT_REGS_MASK): Likewise.
2809 (SVE_PT_REGS_FPSIMD): Likewise.
2810 (SVE_PT_REGS_SVE): Likewise.
2811 (SVE_PT_VL_INHERIT): Likewise.
2812 (SVE_PT_VL_ONEXEC): Likewise.
2813 (SVE_PT_REGS_OFFSET): Likewise.
2814 (SVE_PT_FPSIMD_OFFSET): Likewise.
2815 (SVE_PT_FPSIMD_SIZE): Likewise.
2816 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2817 (SVE_PT_SVE_PREG_SIZE): Likewise.
2818 (SVE_PT_SVE_FFR_SIZE): Likewise.
2819 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2820 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2821 (__SVE_SIG_TO_PT): Likewise.
2822 (SVE_PT_SVE_OFFSET): Likewise.
2823 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2824 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2825 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2826 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2827 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2828 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2829 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2830 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2831 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2832 (SVE_PT_SVE_SIZE): Likewise.
2833 (SVE_PT_SIZE): Likewise.
2834 (HAS_SVE_STATE): New define.
2835
2836 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2837
2838 * nat/aarch64-sve-linux-sigcontext.h: New file.
2839 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2840 new files.
2841 (SVE_VQ_MIN): Likewise.
2842 (SVE_VQ_MAX): Likewise.
2843 (SVE_VL_MIN): Likewise.
2844 (SVE_VL_MAX): Likewise.
2845 (SVE_NUM_ZREGS): Likewise.
2846 (SVE_NUM_PREGS): Likewise.
2847 (sve_vl_valid): Likewise.
2848 (struct user_sve_header): Likewise.
2849
2850 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2851 Richard Bunt <Richard.Bunt@arm.com>
2852
2853 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2854 was requested by GDB.
2855
2856 2018-06-15 Tom de Vries <tdevries@suse.de>
2857
2858 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2859
2860 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2861
2862 * gnulib/update-gnulib.sh: Print expected versions of
2863 autoconf/aclocal.
2864
2865 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2866
2867 * arch-utils.c (default_type_align): Use type_length_units.
2868 * gdbtypes.c (type_align): Use type_length_units.
2869
2870 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2871
2872 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2873 of 'define' command.
2874
2875 2018-06-14 Tom de Vries <tdevries@suse.de>
2876
2877 PR cli/22573
2878 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2879 get_no_prettyformat_print_options.
2880
2881 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2882
2883 * sparc-nat.h: Include target.h.
2884 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2885 <fetch_registers>: Remove this argument in function call.
2886 <store_registers>: Remove this argument in function call, remove
2887 extra semicolon.
2888 <low_forget_process>: Call sparc64_forget_process instead of
2889 sparc_forget_process.
2890
2891 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2892
2893 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2894 (procfs_target::make_corefile_notes): Adjust to new
2895 target_read_alloc return type.
2896
2897 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2898 Stephen Roberts <stephen.roberts@arm.com>
2899
2900 PR gdb/22882
2901 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2902 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2903 Move should_notify_stop local into more inner scope.
2904
2905 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2906 Stephen Roberts <stephen.roberts@arm.com>
2907
2908 PR gdb/22882
2909 * infrun.c (resume_1): Add call to mark_async_event_handler.
2910
2911 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2912
2913 * infrun.c (do_target_wait): Change old version of $pc printed.
2914
2915 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2916
2917 * dwarf2read.c (read_index_from_section): Rename to...
2918 (read_gdb_index_from_section): ... this, update all callers.
2919 (dwarf2_read_index): Rename to...
2920 (dwarf2_read_gdb_index): ... this, update all callers.
2921
2922 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
2923
2924 * gdb/hppa-linux-nat.c
2925 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2926 hppa_linux_nat_target::fetch_registers.
2927
2928 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2929
2930 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2931 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2932 (AARCH64_DWARF_SVE_FFR): Likewise.
2933 (AARCH64_DWARF_SVE_P0): Likewise.
2934 (AARCH64_DWARF_SVE_Z0): Likewise.
2935
2936 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2937
2938 * common/common-regcache.h (raw_compare): New function.
2939 * regcache.c (regcache::raw_compare): Likewise.
2940 * regcache.h (regcache::raw_compare): New declaration.
2941
2942 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2943
2944 * common/common-regcache.h (reg_buffer_common): New structure.
2945 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2946 (reg_buffer::raw_supply): Likewise.
2947 (reg_buffer::raw_supply_integer): Likewise.
2948 (reg_buffer::raw_supply_zeroed): Likewise.
2949 (reg_buffer::raw_collect): Likewise.
2950 (reg_buffer::raw_collect_integer): Likewise.
2951 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2952 (reg_buffer::raw_supply): Likewise.
2953 (reg_buffer::raw_supply_integer): Likewise.
2954 (reg_buffer::raw_supply_zeroed): Likewise.
2955 (reg_buffer::raw_collect): Likewise.
2956 (reg_buffer::raw_collect_integer): Likewise.
2957
2958 2018-06-10 Tom Tromey <tom@tromey.com>
2959
2960 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2961 (class remote_state) <stop_reply_queue>: Now std::vector.
2962 (remote_state::~remote_state)
2963 (remote_target::stop_reply_queue_length): Update.
2964 (struct queue_iter_param, remove_child_of_pending_fork)
2965 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2966 (check_pending_event_prevents_wildcard_vcont_callback)
2967 (remove_stop_reply_for_inferior)
2968 (remove_stop_reply_of_remote_state)
2969 (remote_notif_remove_once_on_match)
2970 (stop_reply_match_ptid_and_ws)
2971 (remote_kill_child_of_pending_fork): Remove.
2972 (remote_target::remove_new_fork_children)
2973 (remote_target::check_pending_events_prevent_wildcard_vcont)
2974 (remote_target::discard_pending_stop_replies)
2975 (remote_target::discard_pending_stop_replies_in_queue)
2976 (remote_target::remote_notif_remove_queued_reply)
2977 (remote_target::queued_stop_reply)
2978 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2979 (remote_target::wait, remote_target::kill_new_fork_children)
2980 (remote_target::async): Update.
2981
2982 2018-06-10 Tom Tromey <tom@tromey.com>
2983
2984 * record-full.c (record_full_arch_list_cleanups): Remove.
2985 (record_full_message): Use try/catch.
2986 (record_full_wait_cleanups): Remove.
2987 (record_full_wait_1): Use try/catch.
2988 (record_full_restore): Likewise.
2989
2990 2018-06-10 Tom Tromey <tom@tromey.com>
2991
2992 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
2993 declare VEC. Add constructor.
2994 <in_target_beneath>: Now bool.
2995 (record_full_breakpoints): Now a std::vector, static.
2996 (record_full_sync_record_breakpoints)
2997 (record_full_init_record_breakpoints)
2998 (record_full_target::insert_breakpoint)
2999 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3000
3001 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3002
3003 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3004 * serial.c (serial_interface_lookup): Remove struct keyword.
3005
3006 2018-06-10 Tom Tromey <tom@tromey.com>
3007
3008 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3009 method.
3010 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3011 a method.
3012 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3013 method.
3014 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3015 "beneath" as a method.
3016 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3017 Use "beneath" as a method.
3018
3019 2018-06-10 Tom Tromey <tom@tromey.com>
3020
3021 * tracefile.c (struct trace_file_writer_deleter): New.
3022 <operator()>: Rename from trace_file_writer_xfree.
3023 (trace_file_writer_up): New typedef.
3024 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3025
3026 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3027
3028 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3029 <m_registers, m_register_status>: Change type to
3030 std::unique_ptr.
3031 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3032 XCNEWVEC.
3033
3034 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3035
3036 * common/common-regcache.h (enum register_status): Add
3037 underlying type "signed char".
3038 * regcache.h (reg_buffer) <m_register_status>: Change type to
3039 register_status *.
3040 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3041 register_status instead of signed char.
3042 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3043 (reg_buffer::get_register_status): Remove cast.
3044 (readable_regcache::raw_read): Remove cast.
3045 (readable_regcache::cooked_read): Remove cast.
3046
3047 2018-06-09 Tom Tromey <tom@tromey.com>
3048
3049 * source.c (reverse_search_command, forward_search_command): Use
3050 scoped_fd.
3051
3052 2018-06-09 Tom Tromey <tom@tromey.com>
3053
3054 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3055 (serial_ops_list): Now static, std::vector.
3056 (serial_interface_lookup, serial_add_interface): Update.
3057
3058 2018-06-09 Tom Tromey <tom@tromey.com>
3059
3060 * dwarf2read.c (process_cu_includes): Update.
3061 (process_full_comp_unit): Update.
3062 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3063 std::vector.
3064
3065 2018-06-08 Paul Koning <paul_koning@dell.com>
3066
3067 PR gdb/23252
3068
3069 * python/python.c (do_start_initialization):
3070 Avoid call to internal Python API.
3071 (init__gdb_module): New function.
3072
3073 2018-06-08 Gary Benson <gbenson@redhat.com>
3074
3075 * linux-thread-db.c (valprint.h): New include.
3076 (struct check_thread_db_info): New structure.
3077 (check_thread_db_on_load, tdb_testinfo): New static globals.
3078 (check_thread_db, check_thread_db_callback): New functions.
3079 (try_thread_db_load_1): Run integrity checks if requested.
3080 (maintenance_check_libthread_db): New function.
3081 (_initialize_thread_db): Register "maint check libthread-db"
3082 and "maint set/show check-libthread-db".
3083 * NEWS: Mention the above new commands.
3084
3085 2018-06-08 Tom Tromey <tom@tromey.com>
3086
3087 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3088 now a method.
3089
3090 2018-06-08 Tom Tromey <tom@tromey.com>
3091
3092 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3093
3094 2018-06-08 Tom Tromey <tom@tromey.com>
3095
3096 * common/btrace-common.h (struct btrace_data): Add constructor,
3097 destructor, move assignment operator.
3098 <empty, clear, fini>: New methods.
3099 <format>: Initialize.
3100 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3101 (btrace_data_empty): Don't declare.
3102 * common/btrace-common.c (btrace_data_init): Remove.
3103 (btrace_data::fini): Rename from btrace_data_fini.
3104 (btrace_data::empty): Rename from btrace_data_empty.
3105 (btrace_data::clear): Rename from btrace_data_clear. Return
3106 bool.
3107 * btrace.h (make_cleanup_btrace_data): Don't declare.
3108 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3109 (parse_xml_btrace): Update.
3110 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3111 (maint_btrace_clear_packet_history_cmd): Update.
3112
3113 2018-06-07 Pedro Alves <palves@redhat.com>
3114
3115 * target.h (target_ops) <beneath>: Now a method. All references
3116 updated.
3117 (class target_stack): New.
3118 * target.c (g_target_stack): New.
3119 (g_current_top_target): Delete.
3120 (current_top_target): Get the top target out of g_target_stack.
3121 (target_stack::push, target_stack::unpush): New.
3122 (push_target, unpush_target): Reimplement.
3123 (target_is_pushed): Reimplement in terms of g_target_stack.
3124 (target_ops::beneath, target_stack::find_beneath): New.
3125
3126 2018-06-07 Pedro Alves <palves@redhat.com>
3127
3128 * target.h (find_target_beneath): Delete declaration.
3129 * target.c (find_target_beneath): Delete definition.
3130 * aix-thread.c: All callers of find_target_beneath adjusted to
3131 call target_ops::beneath instead.
3132 * bsd-uthread.c: Likewise.
3133 * linux-thread-db.c: Likewise.
3134 * ravenscar-thread.c: Likewise.
3135 * sol-thread.c: Likewise.
3136 * spu-multiarch.c: Likewise.
3137
3138 2018-06-07 Pedro Alves <palves@redhat.com>
3139
3140 * target.h (target_ops) <beneath>: Now a method. All references
3141 updated.
3142 (target_ops) <m_beneath>: New.
3143 * target.c (target_ops::beneath): New.
3144 * corelow.c: Adjust all references to target_ops::beneath.
3145 * linux-thread-db.c: Likewise.
3146 * make-target-delegates: Likewise.
3147 * record-btrace.c: Likewise.
3148 * record-full.c: Likewise.
3149 * remote.c: Likewise.
3150 * target.c: Likewise.
3151 * target-delegates.c: Regenerate.
3152
3153 2018-06-07 Pedro Alves <palves@redhat.com>
3154
3155 * target.h (target_stack): Delete.
3156 (current_top_target): Declare function.
3157 * target.c (target_stack): Delete.
3158 (g_current_top_target): New.
3159 (current_top_target): New function.
3160 * auxv.c: Use current_top_target instead of target_stack
3161 throughout.
3162 * avr-tdep.c: Likewise.
3163 * breakpoint.c: Likewise.
3164 * corefile.c: Likewise.
3165 * elfread.c: Likewise.
3166 * eval.c: Likewise.
3167 * exceptions.c: Likewise.
3168 * frame.c: Likewise.
3169 * gdbarch-selftests.c: Likewise.
3170 * gnu-v3-abi.c: Likewise.
3171 * ia64-tdep.c: Likewise.
3172 * ia64-vms-tdep.c: Likewise.
3173 * infcall.c: Likewise.
3174 * infcmd.c: Likewise.
3175 * infrun.c: Likewise.
3176 * linespec.c: Likewise.
3177 * linux-tdep.c: Likewise.
3178 * minsyms.c: Likewise.
3179 * ppc-linux-nat.c: Likewise.
3180 * ppc-linux-tdep.c: Likewise.
3181 * procfs.c: Likewise.
3182 * regcache.c: Likewise.
3183 * remote.c: Likewise.
3184 * rs6000-tdep.c: Likewise.
3185 * s390-linux-nat.c: Likewise.
3186 * s390-tdep.c: Likewise.
3187 * solib-aix.c: Likewise.
3188 * solib-darwin.c: Likewise.
3189 * solib-dsbt.c: Likewise.
3190 * solib-spu.c: Likewise.
3191 * solib-svr4.c: Likewise.
3192 * solib-target.c: Likewise.
3193 * sparc-tdep.c: Likewise.
3194 * sparc64-tdep.c: Likewise.
3195 * spu-tdep.c: Likewise.
3196 * symfile.c: Likewise.
3197 * symtab.c: Likewise.
3198 * target-descriptions.c: Likewise.
3199 * target-memory.c: Likewise.
3200 * target.c: Likewise.
3201 * target.h: Likewise.
3202 * tracefile-tfile.c: Likewise.
3203 * tracepoint.c: Likewise.
3204 * valops.c: Likewise.
3205 * valprint.c: Likewise.
3206 * value.c: Likewise.
3207 * windows-tdep.c: Likewise.
3208 * mi/mi-main.c: Likewise.
3209
3210 2018-06-07 Tom Tromey <tom@tromey.com>
3211
3212 * valprint.h (build_address_symbolic): Declare.
3213 * printcmd.c (print_address_symbolic): Update.
3214 (build_address_symbolic): Change "name" and "filename" to
3215 std::string.
3216 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3217 Update.
3218 * defs.h (build_address_symbolic): Remove declaration.
3219
3220 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3221
3222 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3223 (aarch64_vnv_type): Add function.
3224 (aarch64_pseudo_register_name): Add V regs for SVE.
3225 (aarch64_pseudo_register_type): Likewise.
3226 (aarch64_pseudo_register_reggroup_p): Likewise.
3227 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3228 (aarch64_pseudo_read_value): Add V regs for SVE.
3229 (aarch64_pseudo_write_2): Use V0 offset for SVE
3230 (aarch64_pseudo_write): Add V regs for SVE.
3231 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3232
3233 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3234
3235 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3236 (sve_vl_from_vq): Likewise.
3237
3238 2018-06-05 Tom Tromey <tom@tromey.com>
3239
3240 * cli/cli-cmds.c (show_version): Update.
3241 * top.c (print_gdb_version): Add "interactive" parameter.
3242 Update.
3243 * main.c (captured_main_1): Update.
3244 * top.h (print_gdb_version): Add "interactive" parameter and a
3245 comment.
3246
3247 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3248
3249 * common/enum-flags.h: Add trailing semicolon to example in
3250 comment.
3251
3252 2018-06-05 Tom Tromey <tom@tromey.com>
3253
3254 PR cli/12326:
3255 * NEWS: Add entry about pager.
3256 * utils.c (pagination_disabled_for_command): New global.
3257 (prompt_for_continue): Allow "c" response to prompt.
3258 (reinitialize_more_filter): Clear
3259 pagination_disabled_for_command.
3260 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3261
3262 2018-06-04 Tom Tromey <tom@tromey.com>
3263
3264 * ada-lang.h (ada_lookup_symbol_list): Update.
3265 * ada-lang.c (resolve_subexp): Update.
3266 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3267 parameter.
3268 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3269 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3270 results parameter to std::vector.
3271 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3272 Update.
3273 * ada-exp.y (block_lookup): Update.
3274 (select_possible_type_sym): Change type of syms. Remove nsyms
3275 parameter.
3276 (write_var_or_type, write_name_assoc): Update.
3277
3278 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3279
3280 * windows-nat.c (windows_nat_target::xfer_partial): Return
3281 TARGET_XFER_E_IO if we need to delegate to the target beneath
3282 but BENEATH is NULL.
3283
3284 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3285
3286 * Makefile.in (config.status): Add configure.nat as a
3287 dependency.
3288
3289 2018-06-04 Tom Tromey <tom@tromey.com>
3290
3291 * cp-name-parser.y (cpname_state): Add method declarations.
3292 (HANDLE_QUAL): Update.
3293 (cpname_state::d_grab, cpname_state::fill_comp)
3294 (cpname_state::make_operator, cpname_state::make_dtor)
3295 (cpname_state::make_builtin_type, cpname_state::make_name)
3296 (cpname_state::d_qualify, cpname_state::d_int_type)
3297 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3298 (%union): Move earlier.
3299
3300 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3301
3302 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3303
3304 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3305
3306 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3307 (aarch64_pseudo_write_1): Likewise.
3308 (aarch64_pseudo_read_value): Use helper.
3309 (aarch64_pseudo_write): Likewise.
3310
3311 2018-06-04 Pedro Alves <palves@redhat.com>
3312
3313 * darwin-nat.c (darwin_ops): Delete.
3314 (darwin_attach_pid): Use get_native_target.
3315
3316 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3317
3318 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3319 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3320
3321 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3322
3323 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3324 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3325 (aarch64_gdbarch_init): Check for SVE.
3326 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3327
3328 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3329
3330 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3331 * aarch64-tdep.h (aarch64_read_description): Likewise.
3332 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3333 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3334 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3335 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3336 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3337
3338 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3339
3340 * value.c (value_fetch_lazy_bitfield): New.
3341 (value_fetch_lazy_memory): New.
3342 (value_fetch_lazy_register): New.
3343 (value_fetch_lazy): Factor out to smaller functions.
3344
3345 2018-06-01 Tom Tromey <tom@tromey.com>
3346
3347 * cp-name-parser.y (backslashable, represented): Now const.
3348
3349 2018-06-01 Tom Tromey <tom@tromey.com>
3350
3351 * cp-name-parser.y: Include parser-defs.h.
3352 (parser_fprintf): Remove declaration.
3353
3354 2018-06-01 Tom Tromey <tom@tromey.com>
3355
3356 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3357 %parse-param.
3358 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3359 (global_result): Remove globals.
3360 (struct cpname_state): New.
3361 (yyparse): Don't declare.
3362 (yylex, yyerror): Move declarations after %union.
3363 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3364 (make_name): Add state parameter.
3365 Update all callers.
3366 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3367 parameter.
3368 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3369 Update.
3370 (yylex): Add lvalp, state parameters.
3371 (yyerror): Add state parameter.
3372 (cp_demangled_name_to_comp): Update.
3373
3374 2018-06-01 Tom Tromey <tom@tromey.com>
3375
3376 * cp-name-parser.y (parser_fprintf): Declare.
3377 (GDB_YY_REMAP_PREFIX): Define.
3378 Include yy-remap.h. Don't redefine yy* identifiers.
3379
3380 2018-06-01 Tom Tromey <tom@tromey.com>
3381
3382 * python/py-type.c (typy_legacy_template_argument): Update.
3383 * cp-support.h (cp_demangled_name_to_comp): Update.
3384 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3385 parameter to be a "std::string *".
3386 (main): Update.
3387
3388 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3389
3390 * ada-lex.l: Include "diagnostics.h" instead of
3391 "common/diagnostics.h".
3392 * unittests/environ-selftests.c: Likewise.
3393 * common/diagnostics.h: Moved to ../include.
3394
3395 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3396
3397 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3398 to language_mode_manual while calling breakpoint_re_set_one.
3399
3400 2018-06-01 Tom Tromey <tom@tromey.com>
3401
3402 * valops.c (value_cast_structs, destructor_name_p): Update.
3403 * symtab.c (gdb_mangle_name): Update.
3404 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3405 Update.
3406 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3407 (pascal_object_print_value_fields, pascal_object_print_value):
3408 Update.
3409 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3410 * linespec.c (find_methods): Update.
3411 * gdbtypes.h (type_name_no_tag): Remove.
3412 (type_name_or_error): Rename from type_name_no_tag_or_error.
3413 * gdbtypes.c (type_name_no_tag): Remove.
3414 (type_name_or_error): Rename from type_name_no_tag_or_error.
3415 (lookup_struct_elt_type, check_typedef): Update.
3416 * expprint.c (print_subexp_standard): Update.
3417 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3418 * d-namespace.c (d_lookup_nested_symbol): Update.
3419 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3420 (cp_print_class_member): Update.
3421 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3422 * completer.c (add_struct_fields): Update.
3423 * c-typeprint.c (cp_type_print_derivation_info)
3424 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3425 Update.
3426 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3427 (ada_prefer_type, ada_is_exception_sym): Update.
3428
3429 2018-06-01 Tom Tromey <tom@tromey.com>
3430
3431 * valops.c (enum_constant_from_type, value_namespace_elt)
3432 (value_maybe_namespace_elt): Update.
3433 * valarith.c (find_size_for_pointer_math): Update.
3434 * target-descriptions.c (make_gdb_type): Update.
3435 * symmisc.c (print_symbol): Update.
3436 * stabsread.c (define_symbol, read_type)
3437 (complain_about_struct_wipeout, add_undefined_type)
3438 (cleanup_undefined_types_1): Update.
3439 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3440 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3441 (rust_internal_print_type, rust_composite_type)
3442 (rust_evaluate_funcall, rust_evaluate_subexp)
3443 (rust_inclusive_range_type_p): Update.
3444 * python/py-type.c (typy_get_tag): Update.
3445 * p-typeprint.c (pascal_type_print_base): Update.
3446 * mdebugread.c (parse_symbol, parse_type): Update.
3447 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3448 Update.
3449 * guile/scm-type.c (gdbscm_type_tag): Update.
3450 * go-lang.c (sixg_string_p): Update.
3451 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3452 Update.
3453 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3454 (TYPE_TAG_NAME): Remove.
3455 * gdbtypes.c (type_name_no_tag): Simplify.
3456 (check_typedef, check_types_equal, recursive_dump_type)
3457 (copy_type_recursive, arch_composite_type): Update.
3458 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3459 in summary mode when needed.
3460 * eval.c (evaluate_funcall): Update.
3461 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3462 (process_structure_scope, read_enumeration_type)
3463 (read_namespace_type, read_module_type, determine_prefix): Update.
3464 * cp-support.c (inspect_type): Update.
3465 * coffread.c (process_coff_symbol, decode_base_type): Update.
3466 * c-varobj.c (c_is_path_expr_parent): Update.
3467 * c-typeprint.c (c_type_print_base_struct_union): Update.
3468 (c_type_print_base_1): Update. Print struct/class/union/enum in
3469 summary when using C language.
3470 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3471 (gen_maybe_namespace_elt): Update.
3472 * ada-lang.c (ada_type_name): Simplify.
3473 (empty_record, ada_template_to_fixed_record_type_1)
3474 (template_to_static_fixed_type)
3475 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3476
3477 2018-06-01 Tom Tromey <tom@tromey.com>
3478
3479 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3480 c_print_type.
3481 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3482 (c_print_type): Update.
3483 (c_print_type): New overload.
3484 (c_type_print_varspec_prefix, c_type_print_args)
3485 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3486 (c_type_print_base_struct_union, c_type_print_base_1)
3487 (cp_type_print_method_args): Add "language" parameter.
3488 (c_type_print_base): Update.
3489 * c-lang.h (c_print_type): Add new overload.
3490
3491 2018-06-01 Tom Tromey <tom@tromey.com>
3492
3493 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3494 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3495
3496 2018-06-01 Alan Hayward <alan.hayward@arm.com>
3497
3498 * aarch64-tdep.c (aarch64_sve_register_names): New const
3499 var.
3500 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3501 (AARCH64_SVE_Z_REGS_NUM): New define.
3502 (AARCH64_SVE_P_REGS_NUM): Likewise.
3503 (AARCH64_SVE_NUM_REGS): Likewise.
3504
3505 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3506
3507 * nat/linux-ptrace.h [__alpha__]
3508 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3509 definitions.
3510
3511 2018-05-31 Maciej W. Rozycki <macro@mips.com>
3512
3513 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3514 the endianness selected.
3515 * NEWS: Document `set endian auto' mode operation update.
3516
3517 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3518
3519 * Makefile.in: Add new header.
3520 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3521 (sve_vl_from_vg): Likewise.
3522 (sve_vq_from_vl): Likewise.
3523 (sve_vl_from_vq): Likewise.
3524 (sve_vq_from_vg): Likewise.
3525 (sve_vg_from_vq): Likewise.
3526 * configure.nat: Add new c file.
3527 * nat/aarch64-sve-linux-ptrace.c: New file.
3528 * nat/aarch64-sve-linux-ptrace.h: New file.
3529
3530 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3531
3532 * aarch64-linux-nat.c (aarch64_linux_read_description):
3533 Add parmeter zero.
3534 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3535 Likewise.
3536 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3537 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3538 (aarch64_gdbarch_init): Add parmeter zero.
3539 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3540 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3541 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3542 parmeter.
3543 * doc/gdb.texinfo: Describe SVE feature
3544 * features/aarch64-sve.c: New file.
3545
3546 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
3547
3548 PR gdb/23210
3549 * gdbarch.sh (significant_addr_bit): Default to zero when
3550 not set by target architecture.
3551 * gdbarch.c: Re-generated.
3552 * utils.c (address_significant): Update.
3553
3554 2018-05-30 Joel Brobecker <brobecker@adacore.com>
3555
3556 * stack.c (func_command): Remove trailing newline in call to error.
3557
3558 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3559
3560 * regcache.h (regcache_raw_collect): Remove, update callers to
3561 use regcache::raw_collect.
3562 * regcache.c (regcache_raw_collect): Remove.
3563
3564 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3565
3566 * regcache.h (regcache_raw_supply): Remove, update callers to
3567 use detached_regcache::raw_supply.
3568 * regcache.c (regcache_raw_supply): Remove.
3569
3570 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3571
3572 * regcache.h (regcache_cooked_write_part): Remove, update
3573 callers to use regcache::cooked_write_part.
3574 * regcache.c (regcache_cooked_write_part): Remove.
3575
3576 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3577
3578 * regcache.h (regcache_cooked_read_part): Remove, update callers
3579 to use readable_regcache::cooked_read_part.
3580 * regcache.c (regcache_cooked_read_part): Remove.
3581
3582 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3583
3584 * regcache.h (regcache_cooked_read_value): Remove, update
3585 callers to use readable_regcache::cooked_read_value.
3586 * regcache.c (regcache_cooked_read_value): Remove.
3587
3588 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3589
3590 * regcache.h (regcache_cooked_write): Remove, update callers to
3591 use regcache::cooked_write.
3592 * regcache.c (regcache_cooked_write): Remove.
3593
3594 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3595
3596 * regcache.h (regcache_invalidate): Remove, update callers to
3597 use detached_regcache::invalidate instead.
3598 * regcache.c (regcache_invalidate): Remove.
3599
3600 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3601
3602 * regcache.h (regcache_raw_write_part): Remove, update callers
3603 to use regcache::raw_write_part instead.
3604 * regcache.c (regcache_raw_write_part): Remove.
3605
3606 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3607
3608 * regcache.h (regcache_raw_read_part): Remove, update callers to
3609 use readable_regcache::raw_read_part instead.
3610 * regcache.c (regcache_raw_read_part): Remove.
3611
3612 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3613
3614 * regcache.h (regcache_cooked_read): Remove, update callers to
3615 use readable_regcache::cooked_read instead.
3616 * regcache.c (regcache_cooked_read): Remove.
3617
3618 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3619
3620 * regcache.h (regcache_raw_write): Remove, update callers to use
3621 regcache::raw_write instead.
3622 * regcache.c (regcache_raw_write): Remove.
3623
3624 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3625
3626 * regcache.h (regcache_raw_read): Remove, update callers to use
3627 readable_regcache::raw_read instead.
3628 * regcache.c (regcache_raw_read): Remove.
3629
3630 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3631
3632 * regcache.h (regcache_raw_update): Remove, update callers to
3633 use readable_regcache::raw_update instead.
3634 * regcache.c (regcache_raw_update): Remove.
3635
3636 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3637
3638 * regcache.h (regcache_register_status): Remove, update callers
3639 to use reg_buffer::get_register_status directly instead.
3640 * regcache.c (regcache_register_status): Remove.
3641
3642 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3643
3644 * regcache.h (regcache_get_ptid): Remove, update all callers to
3645 call regcache::ptid instead.
3646 * regcache.c (regcache_get_ptid): Remove.
3647
3648 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3649
3650 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3651
3652 2018-05-30 Pedro Alves <palves@redhat.com>
3653
3654 * common/common-exceptions.h (exception_rethrow): Use
3655 ATTRIBUTE_NORETURN.
3656
3657 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3658
3659 * breakpoint.c (print_solib_event, check_status_catch_solib):
3660 Remove struct keyword in range-based for loops.
3661 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3662 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3663 Likewise.
3664 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3665 Likewise.
3666 * symfile.c (addr_info_make_relative): Likewise.
3667 * thread.c (value_in_thread_stack_temporaries): Likewise.
3668
3669 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
3670
3671 PR gdb/16841
3672 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3673 aggregate type to get its real type before accessing it.
3674
3675 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
3676
3677 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3678 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3679 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3680 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3681 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3682 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3683 * printcmd.c (info_address_command): Likewise.
3684
3685 2018-05-29 Tom Tromey <tom@tromey.com>
3686
3687 * windows-nat.c (handle_exception): Update fall-through comment.
3688
3689 2018-05-29 Tom Tromey <tom@tromey.com>
3690
3691 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3692 (struct program_space) <added_solibs>: Now a std::vector.
3693 * breakpoint.c (print_solib_event): Update.
3694 (check_status_catch_solib): Update.
3695 * progspace.c (clear_program_space_solib_cache): Update.
3696 * solib.c (update_solib_list): Update.
3697
3698 2018-05-29 Tom Tromey <tom@tromey.com>
3699
3700 * python/py-type.c (typy_richcompare): Update.
3701 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3702 * gdbtypes.h (types_deeply_equal): Return bool.
3703 (types_equal): Likewise.
3704 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3705 declare VEC.
3706 (check_types_equal): Change worklist to std::vector. Return
3707 bool.
3708 (struct type_equality_entry): Add constructor.
3709 (compare_maybe_null_strings): Return bool.
3710 (check_types_worklist): Return bool. Change worklist to
3711 std::vector.
3712 (types_deeply_equal): Use std::vector.
3713 (types_equal): Return bool.
3714 (compare_maybe_null_strings): Simplify.
3715
3716 2018-05-29 Tom Tromey <tom@tromey.com>
3717
3718 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3719
3720 2018-05-29 Tom Tromey <tom@tromey.com>
3721
3722 * objc-lang.h: Don't include cp-support.h.
3723 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3724 declare VEC.
3725
3726 2018-05-27 Tom Tromey <tom@tromey.com>
3727
3728 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3729
3730 2018-05-25 Tom Tromey <tom@tromey.com>
3731
3732 * value.c (value::location): Initialize.
3733
3734 2018-05-25 Tom Tromey <tom@tromey.com>
3735
3736 * dbxread.c (init_bincl_list): Remove.
3737 (bincl_list): Now a std::vector.
3738 (bincls_allocated, next_bincl): Remove.
3739 (free_bincl_list, do_free_bincl_list_cleanup)
3740 (make_cleanup_free_bincl_list): Remove.
3741 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3742 unique_xmalloc_ptr.
3743 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3744 (struct header_file_location): Add constructor.
3745 (add_bincl_to_list): Remove.
3746
3747 2018-05-25 Tom Tromey <tom@tromey.com>
3748
3749 * tui/tui.c (tui_enable): Update.
3750 * mi/mi-interp.c (mi_interp::init): Update.
3751 * interps.h (class interp) <name>: New method.
3752 <m_name>: Rename from name.
3753 (~scoped_restore_interp): Update.
3754 * interps.c (interp::interp): Update.
3755 (interp_add, interp_set, interp_lookup_existing)
3756 (current_interp_named_p): Update.
3757
3758 2018-05-25 Tom Tromey <tom@tromey.com>
3759
3760 * interps.c (interp_name): Remove.
3761 * mi/mi-interp.c (mi_interp::init): Update.
3762 * interps.h (interp_name): Remove.
3763 (~scoped_restore_interp): Update.
3764 * tui/tui.c (tui_enable): Update.
3765
3766 2018-05-25 Tom Tromey <tom@tromey.com>
3767
3768 * utils.c (fputs_maybe_filtered): Update.
3769 * linespec.c (decode_line_full): Update.
3770 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3771 (mi_print_breakpoint_for_event, mi_solib_loaded)
3772 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3773 (mi_user_selected_context_changed): Update.
3774 * mi/mi-main.c (mi_execute_command): Update.
3775 * cli/cli-script.c (execute_control_command): Update.
3776 * python/python.c (execute_gdb_command): Update.
3777 * solib.c (info_sharedlibrary_command): Update.
3778 * interps.c (interp_ui_out): Remove.
3779 * interps.h (interp_ui_out): Remove.
3780
3781 2018-05-25 Tom Tromey <tom@tromey.com>
3782
3783 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3784 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3785 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3786
3787 2018-05-25 Tom Tromey <tom@tromey.com>
3788
3789 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3790 * interps.c (interp_exec): Use scoped_restore.
3791
3792 2018-05-25 Tom Tromey <tom@tromey.com>
3793
3794 * remote.c (remote_target::remote_file_get): Use
3795 gdb::byte_vector.
3796 (remote_target::remote_file_put): Likewise.
3797
3798 2018-05-25 Tom Tromey <tom@tromey.com>
3799
3800 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3801 a std::string.
3802 (get_pe_section_index, add_pe_exported_sym): Update.
3803 (read_pe_exported_syms): Use gdb::def_vector.
3804
3805 2018-05-25 Tom Tromey <tom@tromey.com>
3806
3807 * frame.c (remove_prev_frame): Remove.
3808 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3809
3810 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3811
3812 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3813 Remove prototypes.
3814 * mips-linux-nat.c (supply_fpregset): Always call
3815 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3816 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3817 `mips_fill_fpregset'.
3818 * mips-linux-tdep.c (mips_supply_fpregset)
3819 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3820 (mips_fill_fpregset_wrapper): Remove functions.
3821 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3822 (mips_linux_fpregset): Remove variable.
3823 (mips_linux_iterate_over_regset_sections): Use
3824 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3825 (mips_linux_o32_sigframe_init): Remove comment.
3826
3827 2018-05-25 Pedro Alves <palves@redhat.com>
3828
3829 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3830 (struct readahead_cache, struct packet_reg, struct
3831 remote_arch_state, class remote_state): Move higher up in the
3832 file.
3833 (remote_target::m_remote_state): Now an object instead of a pointer.
3834 (remote_target::get_remote_state): Adjust.
3835
3836 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3837
3838 * stack.c (select_and_print_frame): Delete.
3839 (struct function_bounds): Move struct within function.
3840 (func_command): Most content moved into new function
3841 find_frame_for_function, use new function, print result, add
3842 function comment.
3843 (find_frame_for_function): New function, now returns a result.
3844
3845 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3846
3847 * stack.c (iterate_over_block_arg_vars): Fix comment.
3848 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3849
3850 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3851
3852 PR gdb/23203
3853 * frame.c
3854 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3855 Define.
3856 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3857 Define.
3858 * frame.h (class scoped_restore_selected_frame): New class.
3859 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3860 of any exception, use scoped_restore_selected_frame to restore the
3861 frame instead.
3862
3863 2018-05-24 Pedro Alves <palves@redhat.com>
3864
3865 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3866 override.
3867
3868 2018-05-23 Tom Tromey <tom@tromey.com>
3869
3870 * complaints.c (struct complaints): Remove.
3871 (symfile_complaint_book): Remove.
3872 (series): New global.
3873 (complaint_internal): Update.
3874 (clear_complaints): Update.
3875
3876 2018-05-23 Tom Tromey <tom@tromey.com>
3877
3878 * complaints.c (counters): New global.
3879 (struct complain): Remove.
3880 (struct complaints) <root>: Remove.
3881 (complaint_sentinel): Remove.
3882 (symfile_complaint_book): Update.
3883 (find_complaint) Remove.
3884 (complaint_internal, clear_complaints): Update.
3885
3886 2018-05-23 Tom Tromey <tom@tromey.com>
3887
3888 * complaints.c (struct complain) <file, line>: Remove.
3889 (find_complaint): Remove file, line parameters.
3890 (complaint_internal): Update.
3891
3892 2018-05-23 Tom Tromey <tom@tromey.com>
3893
3894 * complaints.c (vcomplaint): Remove.
3895 (complaint_internal) Merge in contents of vcomplaint.
3896
3897 2018-05-23 Tom Tromey <tom@tromey.com>
3898
3899 * complaints.c (struct complaints) <explanation>: Remove.
3900 (symfile_explanations): Remove.
3901 (symfile_complaint_book): Update.
3902 (vcomplaint): Update.
3903 (struct explanation): Remove.
3904
3905 2018-05-23 Tom Tromey <tom@tromey.com>
3906
3907 * complaints.c (symfile_complaints): Remove.
3908 (complaint_internal): Remove "complaints" parameter.
3909 (clear_complaints, vcomplaint): Remove "c" parameter.
3910 (get_complaints): Remove.
3911 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3912 (dwarf2_debug_line_missing_file_complaint)
3913 (dwarf2_debug_line_missing_end_sequence_complaint)
3914 (dwarf2_complex_location_expr_complaint)
3915 (dwarf2_const_value_length_mismatch_complaint)
3916 (dwarf2_section_buffer_overflow_complaint)
3917 (dwarf2_macro_malformed_definition_complaint)
3918 (dwarf2_invalid_attrib_class_complaint)
3919 (create_addrmap_from_index, dw2_symtab_iter_next)
3920 (dw2_expand_marked_cus)
3921 (dw2_debug_names_iterator::find_vec_in_debug_names)
3922 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3923 (create_debug_type_hash_table, init_cutu_and_read_dies)
3924 (partial_die_parent_scope, add_partial_enumeration)
3925 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3926 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3927 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3928 (create_cus_hash_table, create_dwp_hash_table)
3929 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3930 (dwarf2_rnglists_process, dwarf2_ranges_process)
3931 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3932 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3933 (handle_struct_member_die, process_structure_scope)
3934 (read_array_type, read_common_block, read_module_type)
3935 (read_tag_pointer_type, read_typedef, read_base_type)
3936 (read_subrange_type, load_partial_dies, partial_die_info::read)
3937 (partial_die_info::read, partial_die_info::read)
3938 (partial_die_info::read, read_checked_initial_length_and_offset)
3939 (dwarf2_string_attr, read_formatted_entries)
3940 (dwarf_decode_line_header)
3941 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3942 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3943 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3944 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3945 (get_signatured_type, get_DW_AT_signature_type)
3946 (decode_locdesc, file_file_name, consume_improper_spaces)
3947 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3948 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3949 (dwarf2_symbol_mark_computed, set_die_type)
3950 (read_attribute_value): Update.
3951 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3952 Update.
3953 * dbxread.c (unknown_symtype_complaint)
3954 (lbrac_mismatch_complaint, repeated_header_complaint)
3955 (set_namestring, function_outside_compilation_unit_complaint)
3956 (read_dbx_symtab, process_one_symbol): Update.
3957 * gdbtypes.c (stub_noname_complaint): Update.
3958 * windows-nat.c (handle_unload_dll): Update.
3959 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3960 (decode_base_type): Update.
3961 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3962 (eb_complaint, record_include_begin, record_include_end)
3963 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3964 (process_xcoff_symbol, read_symbol)
3965 (function_outside_compilation_unit_complaint)
3966 (scan_xcoff_symtab): Update.
3967 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3968 * buildsym.c (finish_block_internal, make_blockvector)
3969 (end_symtab_get_static_block, augment_type_symtab): Update.
3970 * dtrace-probe.c (dtrace_process_dof)
3971 (dtrace_static_probe_ops::get_probes): Update.
3972 * complaints.h (struct complaint): Don't declare.
3973 (symfile_complaints): Remove.
3974 (complaint_internal): Remove "complaints" parameter.
3975 (complaint): Likewise.
3976 (clear_complaints): Likewise.
3977 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3978 (reread_symbols): Update.
3979 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3980 (dwarf2_frame_cache, decode_frame_entry): Update.
3981 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3982 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3983 (info_selectors_command): Update.
3984 * macrotab.c (macro_include, check_for_redefinition)
3985 (macro_undef): Update.
3986 * objfiles.c (filter_overlapping_sections): Update.
3987 * stabsread.c (invalid_cpp_abbrev_complaint)
3988 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
3989 (define_symbol, error_type, read_type, rs6000_builtin_type)
3990 (stabs_method_name_from_physname, read_member_functions)
3991 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
3992 (attach_fields_to_type, complain_about_struct_wipeout)
3993 (read_range_type, read_args, common_block_start)
3994 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
3995 Update.
3996 * mdebugread.c (index_complaint, unknown_ext_complaint)
3997 (basic_type_complaint, bad_tag_guess_complaint)
3998 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
3999 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4000 (parse_procedure, parse_lines)
4001 (function_outside_compilation_unit_complaint)
4002 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4003 (bad_tag_guess_complaint, reg_value_complaint): Update.
4004 * cp-support.c (demangled_name_complaint): Update.
4005 * macroscope.c (sal_macro_scope): Update.
4006 * dwarf-index-write.c (class debug_names): Update.
4007
4008 2018-05-23 Tom Tromey <tom@tromey.com>
4009
4010 * complaints.c (clear_complaints): Remove "noisy" parameter.
4011 * complaints.h (clear_complaints): Update.
4012 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4013 (reread_symbols): Update.
4014
4015 2018-05-23 Tom Tromey <tom@tromey.com>
4016
4017 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4018 SUBSEQUENT_MESSAGE.
4019 (vcomplaint, clear_complaints): Update.
4020 (symfile_explanations): Remove some messages.
4021
4022 2018-05-23 Tom Tromey <tom@tromey.com>
4023
4024 * complaints.c (internal_complaint): Remove.
4025 * complaints.h (internal_complaint): Remove.
4026
4027 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4028
4029 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4030
4031 2018-05-22 Pedro Alves <palves@redhat.com>
4032
4033 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4034 (remote_fileio_badfd, remote_fileio_return_errno)
4035 (remote_fileio_return_success, remote_fileio_func_open)
4036 (remote_fileio_func_open, remote_fileio_func_close)
4037 (remote_fileio_func_read, remote_fileio_func_write)
4038 (remote_fileio_func_lseek, remote_fileio_func_rename)
4039 (remote_fileio_func_unlink, remote_fileio_func_stat)
4040 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4041 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4042 remote_target parameter.
4043 (remote_fio_func_map) <func>: Add remote_target parameter.
4044 (do_remote_fileio_request, remote_fileio_request):
4045 * remote-fileio.h (remote_fileio_request):
4046 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4047 remote_target parameter.
4048 (remote_notif_process, handle_notification): Adjust to pass down
4049 the remote.
4050 (remote_notif_state_allocate): Add remote_target parameter. Save
4051 it.
4052 * remote-notif.h (struct remote_target): Forward declare.
4053 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4054 remote_target parameter.
4055 (struct remote_notif_state) <remote>: New field.
4056 (remote_notif_ack, remote_notif_parse): Add remote_target
4057 parameter.
4058 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4059 remote_target parameter.
4060 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4061 (threads_listing_context, rmt_thread_action, protocol_feature)
4062 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4063 (packet_result, struct threads_listing_context, remote_state):
4064 Move definitions and declarations higher up.
4065 (remote_target) <~remote_target>: Declare.
4066 (remote_download_command_source, remote_file_put, remote_file_get)
4067 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4068 (remote_hostio_pread_vFile, remote_hostio_send_command)
4069 (remote_hostio_set_filesystem, remote_hostio_open)
4070 (remote_hostio_close, remote_hostio_unlink, remote_state)
4071 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4072 (get_memory_write_packet_size, get_memory_read_packet_size)
4073 (append_pending_thread_resumptions, remote_detach_1)
4074 (append_resumption, remote_resume_with_vcont)
4075 (add_current_inferior_and_thread, wait_ns, wait_as)
4076 (process_stop_reply, remote_notice_new_inferior)
4077 (process_initial_stop_replies, remote_add_thread)
4078 (btrace_sync_conf, remote_btrace_maybe_reopen)
4079 (remove_new_fork_children, kill_new_fork_children)
4080 (discard_pending_stop_replies, stop_reply_queue_length)
4081 (check_pending_events_prevent_wildcard_vcont)
4082 (discard_pending_stop_replies_in_queue, stop_reply)
4083 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4084 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4085 (remote_interrupt_as, remote_interrupt_ns)
4086 (remote_get_noisy_reply, remote_query_attached)
4087 (remote_add_inferior, remote_current_thread, get_current_thread)
4088 (set_thread, set_general_thread, set_continue_thread)
4089 (set_general_process, write_ptid)
4090 (remote_unpack_thread_info_response, remote_get_threadinfo)
4091 (parse_threadlist_response, remote_get_threadlist)
4092 (remote_threadlist_iterator, remote_get_threads_with_ql)
4093 (remote_get_threads_with_qxfer)
4094 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4095 (get_offsets, remote_check_symbols, remote_supported_packet)
4096 (remote_query_supported, remote_packet_size)
4097 (remote_serial_quit_handler, remote_detach_pid)
4098 (remote_vcont_probe, remote_resume_with_hc)
4099 (send_interrupt_sequence, interrupt_query)
4100 (remote_notif_get_pending_events, fetch_register_using_p)
4101 (send_g_packet, process_g_packet, fetch_registers_using_g)
4102 (store_register_using_P, store_registers_using_G)
4103 (set_remote_traceframe, check_binary_download)
4104 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4105 (remote_xfer_live_readonly_partial, remote_read_bytes)
4106 (remote_send_printf, remote_flash_write, readchar)
4107 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4108 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4109 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4110 (extended_remote_disable_randomization, extended_remote_run)
4111 (send_environment_packet, extended_remote_environment_support)
4112 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4113 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4114 (packet_command): Now methods of ...
4115 (remote_target): ... this class.
4116 (m_remote_state) <remote_target>: New field.
4117 (struct remote_state) <stop_reply_queue,
4118 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4119 fields.
4120 (remote_state::remote_state): Allocate stop_reply_queue.
4121 (remote_state): Delete global.
4122 (get_remote_state_raw): Delete.
4123 (remote_target::get_remote_state): Allocate m_remote_state on
4124 demand.
4125 (get_current_remote_target): New.
4126 (remote_ops, extended_remote_ops): Delete.
4127 (wait_forever_enabled_p, remote_async_inferior_event_token):
4128 Delete, moved to struct remote_state.
4129 (remote_target::close): Delete self. Destruction bits split to
4130 ...
4131 (remote_target::~remote_target): ... this.
4132 (show_memory_packet_size): Adjust to use
4133 get_current_remote_target.
4134 (struct protocol_feature) <func>: Add remote_target parameter.
4135 All callers adjusted.
4136 (curr_quit_handler_target): New.
4137 (remote_serial_quit_handler): Reimplement.
4138 (remote_target::open_1): Adjust to use get_current_remote_target.
4139 Heap-allocate remote_target/extended_remote_target instances.
4140 (vcont_builder::vcont_builder): Add remote_target parameter, and
4141 save it in m_remote. All callers adjusted.
4142 (vcont_builder::m_remote): New field.
4143 (vcont_builder::restart, vcont_builder::flush)
4144 (vcont_builder::push_action): Use it.
4145 (remote_target::commit_resume): Use it.
4146 (struct queue_iter_param) <remote>: New field.
4147 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4148 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4149 (check_pending_event_prevents_wildcard_vcont_callback)
4150 (remote_target::check_pending_events_prevent_wildcard_vcont)
4151 (remote_target::discard_pending_stop_replies)
4152 (remote_target::discard_pending_stop_replies_in_queue)
4153 (remote_target::remote_notif_remove_queued_reply): Fill in
4154 'remote' field.
4155 (remote_notif_get_pending_events): New.
4156 (remote_target::readchar, remote_target::remote_serial_write):
4157 Save/restore curr_quit_handler_target.
4158 (putpkt): New.
4159 (kill_new_fork_children): Fill in 'remote' field.
4160 (packet_command): Use get_current_remote_target, defer to
4161 remote_target method of same name.
4162 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4163 parameter, and save it in m_remote. All callers adjusted.
4164 (scoped_remote_fd::release): Use m_remote.
4165 (scoped_remote_fd::m_remote): New field.
4166 (remote_file_put, remote_file_get, remote_file_delete): Use
4167 get_current_remote_target, defer to remote_target method of same
4168 name.
4169 (remote_btrace_reset): Add remote_state paremeter. Update all
4170 callers.
4171 (remote_async_inferior_event_handler). Pass down 'data'.
4172 (remote_new_objfile): Use get_current_remote_target.
4173 (remote_target::vcont_r_supported): New.
4174 (set_range_stepping): Use get_current_remote_target and
4175 remote_target::vcont_r_supported.
4176 (_initialize_remote): Don't allocate 'remote_state' and
4177 'stop_reply_queue' globals.
4178 * remote.h (struct remote_target): Forward declare.
4179 (getpkt, putpkt, remote_notif_get_pending_events): Add
4180 'remote_target' parameter.
4181
4182 2018-05-22 Pedro Alves <palves@redhat.com>
4183
4184 * remote.c (vcont_builder): Now a class. Make all data members
4185 private.
4186 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4187 Declare methods.
4188 (vcont_builder_restart): Rename to ...
4189 (vcont_builder::restart): ... this.
4190 (vcont_builder_flush): Rename to ...
4191 (vcont_builder::flush): ... this.
4192 (vcont_builder_push_action): Rename to ...
4193 (vcont_builder::push_action): ... this.
4194 (remote_target::commit_resume): Adjust.
4195
4196 2018-05-22 Pedro Alves <palves@redhat.com>
4197
4198 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4199 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4200 (get_fixed_memory_packet_size): New.
4201 (get_memory_packet_size): Use it.
4202 (set_memory_packet_size): Don't override the config size with
4203 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4204 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4205 Don't refer to get_memory_packet_size if not connected to a remote
4206 target. Show "(default)" if configured size is 0.
4207
4208 2018-05-22 Pedro Alves <palves@redhat.com>
4209
4210 * remote.c (remote_target::mourn_inferior): Move
4211 discard_pending_stop_replies call here from ...
4212 (_initialize_remote): ... here.
4213
4214 2018-05-22 Pedro Alves <palves@redhat.com>
4215
4216 * remote.c (compare_section_command): Remove set_general_process
4217 call.
4218
4219 2018-05-22 Pedro Alves <palves@redhat.com>
4220
4221 * remote.c (struct packet_reg, struct remote_arch_state):
4222 Move higher up in the file.
4223 (remote_state) <m_arch_states>: Store remote_arch_state values
4224 instead of remote_arch_state pointers.
4225 (remote_state::get_remote_arch_state): Adjust.
4226
4227 2018-05-22 Pedro Alves <palves@redhat.com>
4228
4229 * remote.c: Include <unordered_map>.
4230 (remote_state): Now a class.
4231 (remote_state) <get_remote_arch_state>: Declare method.
4232 <get_remote_arch_state>: New field.
4233 (remote_arch_state) <remote_arch_state>: Declare ctor.
4234 <regs>: Now a unique_ptr.
4235 (remote_gdbarch_data_handle): Delete.
4236 (get_remote_arch_state): Delete.
4237 (remote_state::get_remote_arch_state): New.
4238 (get_remote_state): Adjust to call remote_state's
4239 get_remote_arch_state method.
4240 (init_remote_state): Delete, bits factored out to ...
4241 (remote_arch_state::remote_arch_state): ... this new method.
4242 (get_remote_packet_size, get_memory_packet_size)
4243 (process_g_packet, remote_target::fetch_registers)
4244 (remote_target::prepare_to_store, store_registers_using_G)
4245 (remote_target::store_registers, remote_target::get_trace_status):
4246 Adjust to call remote_state's method.
4247 (_initialize_remote): Remove reference to
4248 remote_gdbarch_data_handle.
4249
4250 2018-05-22 Pedro Alves <palves@redhat.com>
4251
4252 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4253 pread>: New method declarations.
4254 (remote_target::open_1): Adjust.
4255 (readahead_cache_invalidate): Rename to ...
4256 (readahead_cache::invalidate): ... this, and adjust to be a class
4257 method.
4258 (readahead_cache_invalidate_fd): Rename to ...
4259 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4260 class method.
4261 (remote_hostio_pwrite): Adjust.
4262 (remote_hostio_pread_from_cache): Rename to ...
4263 (readahead_cache::pread): ... this, and adjust to be a class
4264 method.
4265 (remote_hostio_close): Adjust.
4266
4267 2018-05-22 Pedro Alves <palves@redhat.com>
4268
4269 * remote.c (remote_hostio_close_cleanup): Delete.
4270 (class scoped_remote_fd): New.
4271 (remote_file_put, remote_file_get): Use it.
4272
4273 2018-05-22 Pedro Alves <palves@redhat.com>
4274
4275 (struct vCont_action_support): Use bool and initialize all fields.
4276 (struct readahead_cache): Initialize all fields.
4277 (remote_state): Use bool and initialize all fields.
4278 (remote_state::remote_state, remote_state::~remote_state): New.
4279 (new_remote_state): Delete.
4280 (_initialize_remote): Use new to allocate remote_state.
4281
4282 2018-05-22 Pedro Alves <palves@redhat.com>
4283 張俊芝 <zjz@zjz.name>
4284
4285 PR gdb/22973
4286 * c-exp.y: Include "c-support.h".
4287 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4288 of tolower. Use c_ident_is_alpha to scan names.
4289 * c-lang.c: Include "c-support.h".
4290 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4291 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4292 * c-support.h: New file, with bits factored out from ...
4293 * cp-name-parser.y: ... this file.
4294 Include "c-support.h".
4295 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4296 c-support.h and renamed.
4297 (symbol_end, yylex): Adjust.
4298
4299 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4300
4301 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4302 parameter type to CORE_ADDR.
4303 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4304 parameter type in declaration to CORE_ADDR.
4305 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4306 target_auxv_search to get AT_HWCAP and use the result to get the
4307 target description.
4308 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4309 to CORE_ADDR. Remove the cast of the return value to unsigned
4310 long. Fix error predicate of target_auxv_search.
4311 (ppc_linux_nat_target::read_description): Change the type of the
4312 hwcap variable to CORE_ADDR.
4313
4314 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4315
4316 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4317 if the size of fpscr is larger than 32 bits.
4318
4319 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4320
4321 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4322 (ppc32_linux_vsxregmap): New global.
4323 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4324 regcache_supply_regset, and regcache_collect_regset.
4325 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4326 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4327 (fetch_vsx_register, store_vsx_register): Remove.
4328 (fetch_vsx_registers): Add regno parameter. Get regset using
4329 ppc_linux_vsxregset. Use regset to supply registers.
4330 (store_vsx_registers): Add regno parameter. Get regset using
4331 ppc_linux_vsxregset. Use regset to collect registers.
4332 (fetch_register): Call fetch_vsx_registers instead of
4333 fetch_vsx_register.
4334 (store_register): Call store_vsx_registers instead of
4335 store_vsx_register.
4336 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4337 new regno parameter.
4338 (store_ppc_registers): Call store_vsx_registers with -1 for the
4339 new regno parameter.
4340 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4341 (ppc_collect_vsxregset): Remove.
4342
4343 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4344
4345 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4346 offset fields.
4347 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4348 for vector register offset fields.
4349 (ppc64_fbsd_reg_offsets): Likewise.
4350 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4351 to vector register offset fields.
4352 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4353 to vector register offset fields.
4354 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4355 vector register offset fields.
4356 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4357 initializers for vector register offset fields.
4358 (rs6000_aix64_reg_offsets): Likewise.
4359 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4360 (ppc_supply_vrregset): Remove.
4361 (ppc_collect_vrregset): Remove.
4362 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4363 (ppc_linux_vrregset) : New function.
4364 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4365 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4366 (ppc32_linux_vrregset): Remove.
4367 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4368 and use result instead of ppc32_linux_vrregset.
4369 (ppc32_linux_reg_offsets): Remove initializers for vector register
4370 offset fields.
4371 (ppc64_linux_reg_offsets): Likewise.
4372 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4373 * ppc-linux-nat.c: Include regset.h.
4374 (gdb_vrregset_t): Adjust comment to account for little-endian
4375 mode.
4376 (supply_vrregset, fill_vrregset): Remove.
4377 (fetch_altivec_register, store_altivec_register): Remove.
4378 (fetch_altivec_registers): Add regno parameter. Get regset using
4379 ppc_linux_vrregset. Use regset to supply registers.
4380 (store_altivec_registers): Add regno parameter. Get regset using
4381 ppc_linux_vrregset. Use regset to collect registers.
4382 (fetch_register): Call fetch_altivec_registers instead of
4383 fetch_altivec_register.
4384 (store_register): Call store_altivec_registers instead of
4385 store_altivec_register.
4386 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4387 the new regno parameter.
4388 (store_ppc_registers): Call store_altivec_registers with -1 for
4389 the new regno parameter.
4390
4391 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4392
4393 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4394 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4395 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4396 (gdb_vrregset_t): Change array type size to
4397 PPC_LINUX_SIZEOF_VRREGSET.
4398 (gdb_vsxregset_t): Change array type size to
4399 PPC_LINUX_SIZEOF_VSXREGSET.
4400 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4401 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4402 PPC_LINUX_SIZEOF_VSXREGSET.
4403
4404 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4405
4406 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4407 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4408 nat/ppc-linux.c.
4409 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4410 ppc_linux_target_wordsize with tid.
4411 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4412 wordsize with tid.
4413 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4414 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4415 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4416 tid parameter. Remove static specifier.
4417 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4418 (ppc_linux_target_wordsize): New declaration.
4419
4420 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4421
4422 * arch/ppc-linux-common.c: New file.
4423 * arch/ppc-linux-common.h: New file.
4424 * arch/ppc-linux-tdesc.h: New file.
4425 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4426 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4427 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4428 arch/ppc-linux-tdesc.h.
4429 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4430 arch/ppc-linux-tdesc.h.
4431 (ppc_linux_nat_target::read_description): Remove target
4432 description matching code. Fill a ppc_linux_features struct and
4433 call ppc_linux_match_description with it. Move comment about ISA
4434 2.05 to ppc-linux-common.c.
4435 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4436 arch/ppc-linux-tdesc.h.
4437 (ppc_linux_core_read_description): Remove target description
4438 matching code. Fill a ppc_linux_features struct and call
4439 ppc_linux_match_description with it.
4440 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4441 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4442 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4443 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4444 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4445 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4446 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4447 (tdesc_powerpc_e500l): Remove.
4448
4449 2018-05-22 Joel Brobecker <brobecker@adacore.com>
4450
4451 * ada-lang.c (catch_assert_command): Pass empty string instead
4452 of NULL for excep_string argument.
4453
4454 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4455
4456 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4457 the width of the requested register exceeds the width of the
4458 `ptrace' data type.
4459
4460 2018-05-21 Tom Tromey <tom@tromey.com>
4461
4462 * printcmd.c (output_command): Remove.
4463 (output_command_const): Rename to output_command.
4464 * valprint.h (output_command): Rename from output_command_const.
4465 * tracepoint.c (trace_dump_actions): Call output_command.
4466
4467 2018-05-21 Tom Tromey <tom@tromey.com>
4468
4469 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4470 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4471 * ada-lang.h (create_ada_exception_catchpoint): Update.
4472 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4473 std::string.
4474 (create_excep_cond_exprs, ~ada_catchpoint)
4475 (should_stop_exception, print_one_exception)
4476 (print_mention_exception, print_recreate_exception): Update.
4477 (ada_get_next_arg): Remove.
4478 (catch_ada_exception_command_split): Use std::string. Change type
4479 of "excep_string", "cond_string".
4480 (catch_ada_exception_command): Update.
4481 (create_ada_exception_catchpoint): Change type of excep_string.
4482 (ada_exception_sal): Remove excep_string parameter.
4483 (~ada_catchpoint): Remove.
4484
4485 2018-05-21 Tom Tromey <tom@tromey.com>
4486
4487 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4488 cleanup.
4489
4490 2018-05-21 Tom Tromey <tom@tromey.com>
4491
4492 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4493 Return unique_xmalloc_ptr.
4494 (print_it_exception): Update.
4495
4496 2018-05-21 Tom Tromey <tom@tromey.com>
4497
4498 * tracepoint.c (trace_dump_actions): Use std::string.
4499
4500 2018-05-21 Tom Tromey <tom@tromey.com>
4501
4502 * symfile.c (reread_symbols): Use std::string for original_name.
4503
4504 2018-05-21 Tom Tromey <tom@tromey.com>
4505
4506 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4507 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4508 constructor.
4509
4510 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4511
4512 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4513 instance to...
4514 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4515 * objfiles.c (get_objfile_bfd_data): Allocate
4516 objfile_per_bfd_storage with obstack_new when allocating on
4517 obstack.
4518
4519 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4520
4521 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4522 OBSTACK_ZALLOC.
4523 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4524 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4525 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4526 (add_pending): Likewise.
4527 (parse_symbol): Likewise.
4528 (parse_partial_symbols): Likewise.
4529 (psymtab_to_symtab_1): Likewise.
4530 (new_psymtab): Likewise.
4531 (elfmdebug_build_psymtabs): Likewise.
4532 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4533 * objfiles.c (get_objfile_bfd_data): Likewise.
4534 (objfile_register_static_link): Likewise.
4535 * psymtab.c (allocate_psymtab): Likewise.
4536 * stabsread.c (read_member_functions): Likewise.
4537 * xcoffread.c (xcoff_end_psymtab): Likewise.
4538
4539 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4540
4541 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4542 compiler supports std::is_trivially_constructible.
4543 * common/poison.h: Include obstack.h.
4544 (IsMallocable): Define to is_trivially_constructible if the
4545 compiler supports it, define to true_type otherwise.
4546 (xobnew): New.
4547 (XOBNEW): Redefine.
4548 (xobnewvec): New.
4549 (XOBNEWVEC): Redefine.
4550 * gdb_obstack.h (obstack_zalloc): New.
4551 (OBSTACK_ZALLOC): Redefine.
4552 (obstack_calloc): New.
4553 (OBSTACK_CALLOC): Redefine.
4554 (obstack_new): New.
4555 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4556 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4557 gdbarch.c.
4558 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4559 obstack_calloc/obstack_zalloc.
4560 (gdbarch_obstack_zalloc): Remove.
4561 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4562
4563 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4564
4565 * stack.c (backtrace_command_1): Remove useless variable int i.
4566
4567 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4568
4569 * stack.c (print_frame_info): Fix comment.
4570
4571 2018-05-18 Tom Tromey <tom@tromey.com>
4572
4573 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4574 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4575 (~dwarf2_per_objfile): Update
4576 (dwarf2_get_dwz_file): Use new.
4577 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4578 unique_ptr.
4579
4580 2018-05-18 Tom Tromey <tom@tromey.com>
4581
4582 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4583 unique_ptr.
4584 * dwarf2read.c (struct dwp_file): Add constructor and
4585 initializers.
4586 (open_and_init_dwp_file): Return a unique_ptr.
4587 (dwarf2_per_objfile, create_dwp_hash_table)
4588 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4589 (lookup_dwo_unit_in_dwp): Update.
4590 (open_and_init_dwp_file, get_dwp_file): Update.
4591
4592 2018-05-18 Tom Tromey <tom@tromey.com>
4593
4594 * dwarf2read.c (dwarf2_per_objfile): Update.
4595 (struct mapped_index): Add initializers.
4596 (dwarf2_read_index): Use new.
4597 (dw2_symtab_iter_init): Update.
4598 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4599 unique_ptr.
4600
4601 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4602
4603 * dwarf2read.c (mapped_index) <total_size>: Remove.
4604
4605 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4606
4607 * unittests/format_pieces-selftests.c (test_format_specifier):
4608 Add ARI comments.
4609
4610 2018-05-18 Tom Tromey <tom@tromey.com>
4611
4612 * c-typeprint.c (maybe_print_hole): New function.
4613 (c_print_type_struct_field_offset): Update.
4614 (c_type_print_base_struct_union): Call maybe_print_hole.
4615
4616 2018-05-17 Keith Seitz <keiths@redhat.com>
4617
4618 * breakpoint.c (build_bpstat_chain): New function, moved from
4619 bpstat_stop_status.
4620 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4621 If no stop chain is passed, call build_bpstat_chain to build it.
4622 * breakpoint.h (build_bpstat_chain): Declare.
4623 (bpstat_stop_status): Move documentation here from breakpoint.c.
4624 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4625 build the stop chain and pass it to skip_inline_frames.
4626 Pass this stop chain to bpstat_stop_status.
4627 * inline-frame.c: Include breakpoint.h.
4628 (stopped_by_user_bp_inline_frame): New function.
4629 (skip_inline_frames): Add parameter `stop_chain'.
4630 Move documention to inline-frame.h.
4631 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4632 whether the frame should be elided.
4633 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4634 Add moved documentation and update for new parameter.
4635
4636 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4637
4638 PR cli/14975
4639 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4640 unittests/format_pieces-selftests.c.
4641 * common/format.h (format_piece) <operator==>: New.
4642 (format_pieces) <operator[]>: Remove.
4643 * common/format.c (format_pieces::format_pieces): Handle \e.
4644 * unittests/format_pieces-selftests.c: New.
4645
4646 2018-05-17 Tom Tromey <tom@tromey.com>
4647
4648 PR symtab/23010:
4649 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4650 (dw2_instantiate_symtab): Add skip_partial parameter.
4651 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4652 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4653 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4654 (dw2_expand_symtabs_matching_one)
4655 (dw2_find_pc_sect_compunit_symtab)
4656 (dw2_debug_names_lookup_symbol)
4657 (dw2_debug_names_expand_symtabs_for_function): Update.
4658 (init_cutu_and_read_dies): Add skip_partial parameter.
4659 (process_psymtab_comp_unit, build_type_psymtabs_1)
4660 (process_skeletonless_type_unit, load_partial_comp_unit)
4661 (psymtab_to_symtab_1): Update.
4662 (load_full_comp_unit): Add skip_partial parameter.
4663 (process_imported_unit_die, dwarf2_read_addr_index)
4664 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4665 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4666 (read_signatured_type): Update.
4667
4668 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4669
4670 * value.c (release_value): Remove unused variable.
4671 (record_latest_value): Likewise.
4672 (access_value_history): Likewise.
4673 (preserve_values): Likewise.
4674
4675 2018-05-17 Tom Tromey <tom@tromey.com>
4676
4677 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4678 Initialize.
4679
4680 2018-05-16 Maciej W. Rozycki <macro@mips.com>
4681
4682 PR gdb/22286
4683 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4684 Also handle registers whose width is not a multiple of
4685 PTRACE_TYPE_RET.
4686 (linux_nat_trad_target::store_register): Likewise.
4687
4688 2018-05-16 Tom Tromey <tom@tromey.com>
4689
4690 * gdbcore.h (core_bfd): Redefine.
4691 * corelow.c (core_target::close): Update.
4692 (core_target_open): Update.
4693 * progspace.h (struct program_space) <cbfd>: Now a
4694 gdb_bfd_ref_ptr.
4695
4696 2018-05-16 Tom Tromey <tom@tromey.com>
4697
4698 PR cli/19551:
4699 * symfile-add-flags.h (enum symfile_add_flags)
4700 <SYMFILE_NOT_FILENAME>: New constant.
4701 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4702 objfile name from BFD.
4703 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4704 * minidebug.c (find_separate_debug_file_in_section): Put
4705 ".gnu_debugdata" into BFD's file name.
4706
4707 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4708
4709 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4710 Remove.
4711
4712 2018-05-15 Tamar Christina <tamar.christina@arm.com>
4713
4714 PR binutils/21446
4715 * aarch64-tdep.c (aarch64_analyze_prologue,
4716 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4717 Indicate not interested in errors.
4718
4719 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4720
4721 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4722 Supply the MIPS_ZERO_REGNUM register.
4723
4724 2018-05-15 Maciej W. Rozycki <macro@mips.com>
4725
4726 * mips-tdep.c (mask_address_var): Make variable static.
4727
4728 2018-05-14 Tom Tromey <tom@tromey.com>
4729
4730 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4731
4732 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4733
4734 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4735 FXSAVE_ADDR for the mxcsr register.
4736
4737 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4738
4739 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4740
4741 2018-05-11 Pedro Alves <palves@redhat.com>
4742
4743 * corelow.c (core_target) <core_target>: No longer inline.
4744 Initialize m_core_gdbarch, m_core_vec and build the section table
4745 here.
4746 <~core_target>: New.
4747 <core_gdbarch, get_core_register_section>: New methods.
4748 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4749 factored out from ...
4750 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4751 (core_ops): Delete.
4752 (sniff_core_bfd): Add gdbarch parameter.
4753 (core_close): Delete, merged into ...
4754 (core_target::close): ... here. Delete self.
4755 (core_close_cleanup): Delete.
4756 (core_target_open): Allocate a core_target on the heap. Use a
4757 unique_ptr instead of a cleanup. Bits moved into the core_target
4758 ctor. Adjust to use core_target methods instead of globals.
4759 (get_core_register_section): Rename to ...
4760 (core_target::get_core_register_section): ... this and adjust.
4761 (struct get_core_registers_cb_data): New.
4762 (get_core_registers_cb): Use it. Use bool.
4763 (core_target::fetch_registers, core_target::files_info)
4764 (core_target::xfer_partial, core_target::read_description)
4765 (core_target::pid_to, core_target::thread_name): Adjust to
4766 reference class fields instead of globals.
4767 * target.h (struct target_ops_deleter, target_ops_up): New.
4768
4769 2018-05-11 Pedro Alves <palves@redhat.com>
4770
4771 * corefile.c (core_file_command): Move to corelow.c.
4772 * corelow.c (the_core_target): Delete.
4773 (core_file_command): Moved from corefile.c. Check exec_bfd
4774 instead of the_core_target. Use target_detach instead of calling
4775 into the_core_target directly.
4776 (maybe_say_no_core_file_now): New.
4777 (core_target::detach): Use it.
4778 (_initialize_corelow): Remove references to the_core_target.
4779 * gdbcore.h (the_core_target): Delete.
4780
4781 2018-05-11 Tom Tromey <tromey@redhat.com>
4782 Pedro Alves <palves@redhat.com>
4783
4784 * corefile.c (core_bfd): Remove.
4785 * gdbcore.h (core_bfd): Now a macro.
4786 * progspace.h (struct program_space) <cbfd>: New field.
4787
4788 2018-05-11 Tom Tromey <tom@tromey.com>
4789
4790 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4791 gdb::def_vector.
4792
4793 2018-05-10 Tom Tromey <tom@tromey.com>
4794
4795 * configure: Rebuild.
4796 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4797
4798 2018-05-10 Joel Brobecker <brobecker@adacore.com>
4799
4800 PR server/23158:
4801 * regformats/regdat.sh: Adjust script, following the addition
4802 of the new expedite_regs parameter to init_target_desc.
4803
4804 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
4805
4806 PR gdb/23127
4807 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4808 set_gdbarch_significant_addr_bit.
4809 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4810 set_gdbarch_significant_addr_bit.
4811 * utils.c (address_significant): Update to sign extend addr.
4812
4813 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4814
4815 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4816 (xtensa_linux_init_abi): Limit tdep->num_regs by
4817 tdep->num_nopriv_regs.
4818 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4819 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4820 not initialized.
4821
4822 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4823
4824 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4825
4826 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4827
4828 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4829 (I387_MXCSR_INIT_VAL): New constant.
4830 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4831 buffer if it was supplied by the inferior.
4832 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4833 (i387_xsave_get_clear_bv): New function.
4834 (i387_supply_xsave): Only read x87 control registers from the
4835 xsave buffer if the feature is enabled, and the state will have
4836 been written, otherwise, provide a suitable default.
4837 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4838 including x87 control registers. Update control registers if they
4839 have changed from the default value, and mark features as enabled
4840 as required.
4841 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4842
4843 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4844
4845 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4846
4847 2018-05-07 Tom Tromey <tom@tromey.com>
4848
4849 * configure: Rebuild.
4850 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4851
4852 2018-05-07 Tom Tromey <tom@tromey.com>
4853
4854 PR tdep/20362:
4855 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4856 bit. Use correct value for VDIV.
4857
4858 2018-05-04 Tom Tromey <tom@tromey.com>
4859
4860 * configure: Rebuild.
4861 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4862
4863 2018-05-04 Tom Tromey <tom@tromey.com>
4864
4865 * linux-record.c (record_linux_system_call) <case
4866 RECORD_SYS_RECVFROM>: Add "break".
4867
4868 2018-05-04 Tom Tromey <tom@tromey.com>
4869
4870 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4871 Add missing "break".
4872 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4873 Add missing "break".
4874
4875 2018-05-04 Tom Tromey <tom@tromey.com>
4876
4877 * rs6000-tdep.c (ppc_process_record_op4)
4878 (ppc_process_record_op63): Add fall-through comment.
4879
4880 2018-05-04 Tom Tromey <tom@tromey.com>
4881
4882 * i386-tdep.c (i386_process_record): Add fall-through comment.
4883
4884 2018-05-04 Tom Tromey <tom@tromey.com>
4885
4886 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4887 comment.
4888
4889 2018-05-04 Tom Tromey <tom@tromey.com>
4890
4891 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4892 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4893 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4894 comment.
4895 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4896 comment.
4897 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4898 comment.
4899
4900 2018-05-04 Tom Tromey <tom@tromey.com>
4901
4902 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4903
4904 2018-05-04 Tom Tromey <tom@tromey.com>
4905
4906 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4907 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4908 * symfile.c (section_is_mapped): Fix fall-through comment.
4909 * stabsread.c (define_symbol, read_member_functions): Fix
4910 fall-through comment.
4911 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4912 comment.
4913 * remote.c (remote_wait_as): Fix fall-through comment.
4914 * p-exp.y (yylex): Fix fall-through comment.
4915 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4916 comment.
4917 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4918 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4919 * jv-exp.y (yylex): Fix fall-through comment.
4920 * go-exp.y (lex_one_token): Fix fall-through comment.
4921 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4922 fall-through comment.
4923 * f-exp.y (yylex): Fix fall-through comment.
4924 * dwarf2read.c (process_die): Fix fall-through comments.
4925 * dbxread.c (process_one_symbol): Fix fall-through comment.
4926 * d-exp.y (lex_one_token): Fix fall-through comment.
4927 * cp-name-parser.y (yylex): Fix fall-through comment.
4928 * coffread.c (coff_symtab_read): Fix fall-through comment.
4929 * c-exp.y (lex_one_token): Fix fall-through comment.
4930 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4931 comment.
4932 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4933 comment.
4934
4935 2018-05-04 Tom Tromey <tom@tromey.com>
4936
4937 PR python/22730:
4938 * NEWS: Mention gdb.execute change.
4939 * gdbcmd.h (execute_control_command): Don't declare.
4940 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4941 execute_control_commands, execute_control_commands_to_string.
4942 * cli/cli-script.h (execute_control_commands)
4943 (execute_control_commands_to_string): Declare.
4944 (execute_control_command): Add from_tty parameter.
4945 * cli/cli-script.c (execute_control_commands)
4946 (execute_control_commands_to_string): New functions.
4947 (execute_user_command): Use execute_control_commands.
4948 (execute_control_command_1): Add "from_tty" parameter. Update.
4949 (execute_control_command): Likewise.
4950
4951 2018-05-04 Tom Tromey <tom@tromey.com>
4952
4953 PR python/22731:
4954 * NEWS: Mention that breakpoint commands are writable.
4955 * python/py-breakpoint.c (bppy_set_commands): New function.
4956 (breakpoint_object_getset) <"commands">: Use it.
4957
4958 2018-05-04 Tom Tromey <tom@tromey.com>
4959
4960 * tracepoint.c (actions_command): Update.
4961 * mi/mi-cmd-break.c (mi_command_line_array)
4962 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4963 (mi_read_next_line): Remove.
4964 (mi_cmd_break_commands): Update.
4965 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4966 function_view.
4967 * cli/cli-script.c (get_command_line): Update.
4968 (process_next_line): Use function_view. Constify.
4969 (recurse_read_control_structure, read_command_lines)
4970 (read_command_lines_1): Change argument types to function_view.
4971 (do_define_command, document_command): Update.
4972 * breakpoint.h (check_tracepoint_command): Don't declare.
4973 * breakpoint.c (check_tracepoint_command): Remove.
4974 (commands_command_1, create_tracepoint_from_upload): Update.
4975
4976 2018-05-04 Tom Tromey <tom@tromey.com>
4977
4978 PR gdb/11750:
4979 * cli/cli-script.h (enum command_control_type) <define_control>:
4980 New constant.
4981 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4982 (build_command_line, execute_control_command_1)
4983 (process_next_line): Likewise.
4984 (do_define_command): New function, extracted from define_command.
4985 (define_command): Use it.
4986
4987 2018-05-04 Tom Tromey <tom@tromey.com>
4988
4989 * tracepoint.c (actions_command): Update.
4990 * cli/cli-script.h (read_command_lines): Update.
4991 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
4992 (MAX_TMPBUF): Remove define.
4993 (define_command): Use string_printf.
4994 (document_command): Likewise.
4995 * breakpoint.c (commands_command_1): Update.
4996
4997 2018-05-04 Tom Tromey <tom@tromey.com>
4998
4999 * top.c (execute_command): Update.
5000 * cli/cli-script.h (print_command_lines): Now varargs.
5001 * cli/cli-script.c (print_command_lines): Now varargs.
5002 (execute_control_command_1) <case while_control, case if_control>:
5003 Update.
5004
5005 2018-05-04 Tom Tromey <tom@tromey.com>
5006
5007 * tracepoint.c (all_tracepoint_actions): Rename from
5008 all_tracepoint_actions_and_cleanup. Change return type.
5009 (actions_command, encode_actions_1, encode_actions)
5010 (trace_dump_actions, tdump_command): Update.
5011 * remote.c (remote_download_command_source): Update.
5012 * python/python.c (gdbpy_eval_from_control_command)
5013 (python_command, python_interactive_command): Update.
5014 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5015 * guile/guile.c (guile_command)
5016 (gdbscm_eval_from_control_command, guile_command): Update.
5017 * compile/compile.c (compile_code_command)
5018 (compile_print_command, compile_to_object): Update.
5019 * cli/cli-script.h (struct command_lines_deleter): New.
5020 (counted_command_line): New typedef.
5021 (struct command_line): Add constructor, destructor.
5022 <body_list>: Remove.
5023 <body_list_0, body_list_1>: New members.
5024 (command_line_up): Remove typedef.
5025 (read_command_lines, read_command_lines_1, get_command_line):
5026 Update.
5027 (copy_command_lines): Don't declare.
5028 * cli/cli-script.c (build_command_line): Use "new".
5029 (get_command_line): Return counted_command_line.
5030 (print_command_lines, execute_user_command)
5031 (execute_control_command_1, while_command, if_command): Update.
5032 (realloc_body_list): Remove.
5033 (process_next_line, recurse_read_control_structure): Update.
5034 (read_command_lines, read_command_lines_1): Return counted_command_line.
5035 (free_command_lines): Use "delete".
5036 (copy_command_lines): Remove.
5037 (define_command, document_command, show_user_1): Update.
5038 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5039 a counted_command_line.
5040 * breakpoint.h (counted_command_line): Remove typedef.
5041 (breakpoint_set_commands): Update.
5042 * breakpoint.c (check_no_tracepoint_commands)
5043 (validate_commands_for_breakpoint): Update.
5044 (breakpoint_set_commands): Change commands to be a
5045 counted_command_line.
5046 (commands_command_1, update_dprintf_command_list)
5047 (create_tracepoint_from_upload): Update.
5048
5049 2018-05-04 Tom Tromey <tom@tromey.com>
5050
5051 * cli/cli-decode.h (cmd_list_element): New constructor.
5052 (~cmd_list_element): New destructor.
5053 (struct cmd_list_element): Add initializers.
5054 * cli/cli-decode.c (do_add_cmd): Use "new".
5055 (delete_cmd): Use "delete".
5056
5057 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5058 Pedro Alves <palves@redhat.com>
5059
5060 PR breakpoints/19806 and support for PR external/20207.
5061 * NEWS: Mention Aarch64 watchpoint improvements.
5062 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5063 watchpoints and PR external/20207 watchpoints.
5064 * nat/aarch64-linux-hw-point.c
5065 (kernel_supports_any_contiguous_range): New.
5066 (aarch64_watchpoint_offset): New.
5067 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5068 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5069 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5070 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5071 next_addr_orig_p. Support PR external/20207 watchpoints.
5072 (aarch64_downgrade_regs): New.
5073 (aarch64_dr_state_insert_one_point): New parameters offset and
5074 addr_orig.
5075 (aarch64_dr_state_remove_one_point): Likewise.
5076 (aarch64_handle_breakpoint): Update caller.
5077 (aarch64_handle_aligned_watchpoint): Likewise.
5078 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5079 aligned_offset.
5080 (aarch64_linux_set_debug_regs): Remove const from state. Call
5081 aarch64_downgrade_regs.
5082 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5083 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5084 (DR_CONTROL_MASK): ... this.
5085 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5086 (unsigned int aarch64_watchpoint_offset): New prototype.
5087 (aarch64_linux_set_debug_regs): Remove const from state.
5088 * utils.c (align_up, align_down): Move to ...
5089 * common/common-utils.c (align_up, align_down): ... here.
5090 * utils.h (align_up, align_down): Move to ...
5091 * common/common-utils.h (align_up, align_down): ... here.
5092
5093 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5094
5095 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5096 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5097 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5098 Re-implement to match the ABI as summarized in GCC's
5099 gcc/config/sparc/sparc.c. All callers updated.
5100 (sparc32_store_arguments): Remove assertion.
5101
5102 2018-05-04 Tom Tromey <tom@tromey.com>
5103
5104 * printcmd.c: Don't include tui.h.
5105 (decode_format): Use skip_spaces.
5106
5107 2018-05-04 Tom Tromey <tom@tromey.com>
5108
5109 PR gdb/22619:
5110 * printcmd.c (last_count): New global.
5111 (x_command): Use saved count when repeating.
5112
5113 2018-05-04 Tom Tromey <tom@tromey.com>
5114
5115 * nto-procfs.c (do_closedir_cleanup): Remove.
5116 (procfs_pidlist): Use gdb_dir_up.
5117 * procfs.c (do_closedir_cleanup): Remove.
5118 (proc_update_threads): Use gdb_dir_up.
5119 * common/filestuff.h (struct gdb_dir_deleter): New.
5120 (gdb_dir_up): New typedef.
5121
5122 2018-05-04 Tom Tromey <tom@tromey.com>
5123
5124 * ada-lang.c (print_mention_exception): Use std::string.
5125
5126 2018-05-04 Tom Tromey <tom@tromey.com>
5127
5128 * ada-lang.c (create_excep_cond_exprs): Update.
5129 (ada_exception_catchpoint_cond_string): Use std::string.
5130
5131 2018-05-04 Tom Tromey <tom@tromey.com>
5132
5133 * ada-lang.c (xget_renaming_scope): Return std::string.
5134 (old_renaming_is_invisible): Update.
5135
5136 2018-05-04 Tom Tromey <tom@tromey.com>
5137
5138 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5139 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5140
5141 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5142
5143 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5144
5145 2018-05-04 Tom Tromey <tom@tromey.com>
5146
5147 * remote.c (remote_query_supported_append): Change type.
5148 (remote_check_symbols): Update.
5149
5150 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5151
5152 PR gdb/11420
5153 * configure.ac: Prepend libpython.
5154 * python/python-config.py: Likewise.
5155 * configure: Regenerate.
5156
5157 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5158
5159 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5160
5161 2018-05-03 Pedro Alves <palves@redhat.com>
5162
5163 * s390-linux-nat.c
5164 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5165 override. Write 'true' instead of '1'.
5166 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5167 declaration.
5168
5169 2018-05-02 Pedro Alves <palves@redhat.com>
5170
5171 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5172 add_inf_child_target.
5173 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5174 add_inf_child_target.
5175 * aix-thread.c (aix_thread_target_info): New.
5176 (aix_thread_target) <shortname, longname, doc>: Delete.
5177 <info>: New.
5178 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5179 add_inf_child_target.
5180 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5181 add_inf_child_target.
5182 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5183 add_inf_child_target.
5184 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5185 add_inf_child_target.
5186 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5187 add_inf_child_target.
5188 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5189 add_inf_child_target.
5190 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5191 add_inf_child_target.
5192 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5193 add_inf_child_target.
5194 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5195 add_inf_child_target.
5196 * bfd-target.c (target_bfd_target_info): New.
5197 (target_bfd) <shortname, longname, doc>: Delete.
5198 <info>: New.
5199 * bsd-kvm.c (bsd_kvm_target_info): New.
5200 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5201 <info>: New.
5202 (bsd_kvm_target::open): Rename to ...
5203 (bsd_kvm_target_open): ... this. Adjust.
5204 * bsd-uthread.c (bsd_uthread_target_info): New.
5205 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5206 <info>: New.
5207 * corefile.c (core_file_command): Adjust.
5208 * corelow.c (core_target_info): New.
5209 (core_target) <shortname, longname, doc>: Delete.
5210 <info>: New.
5211 (core_target::open): Rename to ...
5212 (core_target_open): ... this. Adjust.
5213 * ctf.c (ctf_target_info): New.
5214 (ctf_target) <shortname, longname, doc>: Delete.
5215 <info>: New.
5216 (ctf_target::open): Rename to ...
5217 (ctf_target_open): ... this.
5218 (_initialize_ctf): Adjust.
5219 * exec.c (exec_target_info): New.
5220 (exec_target) <shortname, longname, doc>: Delete.
5221 <info>: New.
5222 (exec_target::open): Rename to ...
5223 (exec_target_open): ... this.
5224 * gdbcore.h (core_target_open): Declare.
5225 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5226 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5227 add_inf_child_target.
5228 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5229 add_inf_child_target.
5230 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5231 add_inf_child_target.
5232 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5233 add_inf_child_target.
5234 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5235 add_inf_child_target.
5236 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5237 add_inf_child_target.
5238 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5239 add_inf_child_target.
5240 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5241 add_inf_child_target.
5242 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5243 add_inf_child_target.
5244 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5245 add_inf_child_target.
5246 * inf-child.c (inf_child_target_info): New.
5247 (inf_child_target::info): New.
5248 (inf_child_open_target): Remove 'target' parameter. Use
5249 get_native_target instead.
5250 (inf_child_target::open): Delete.
5251 (add_inf_child_target): New.
5252 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5253 Delete.
5254 <info>: New.
5255 (add_inf_child_target): Declare.
5256 (inf_child_open_target): Declare.
5257 * linux-thread-db.c (thread_db_target_info): New.
5258 (thread_db_target) <shortname, longname, doc>: Delete.
5259 <info>: New.
5260 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5261 add_inf_child_target.
5262 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5263 add_inf_child_target.
5264 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5265 add_inf_child_target.
5266 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5267 add_inf_child_target.
5268 * make-target-delegates (print_class): Adjust.
5269 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5270 add_inf_child_target.
5271 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5272 add_inf_child_target.
5273 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5274 add_inf_child_target.
5275 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5276 add_inf_child_target.
5277 * nto-procfs.c (nto_native_target_info): New.
5278 (nto_procfs_target_native) <shortname, longname, doc>:
5279 Delete.
5280 <info>: New.
5281 (nto_procfs_target_info): New.
5282 (nto_procfs_target_procfs) <shortname, longname, doc>:
5283 Delete.
5284 <info>: New.
5285 (init_procfs_targets): Adjust.
5286 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5287 add_inf_child_target.
5288 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5289 add_inf_child_target.
5290 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5291 add_inf_child_target.
5292 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5293 add_inf_child_target.
5294 * ravenscar-thread.c (ravenscar_target_info): New.
5295 (ravenscar_thread_target) <shortname, longname, doc>:
5296 Delete.
5297 <info>: New.
5298 * record-btrace.c (record_btrace_target_info):
5299 (record_btrace_target) <shortname, longname, doc>: Delete.
5300 <info>: New.
5301 (record_btrace_target::open): Rename to ...
5302 (record_btrace_target_open): ... this. Adjust.
5303 * record-full.c (record_longname, record_doc): New.
5304 (record_full_base_target) <shortname, longname, doc>: Delete.
5305 <info>: New.
5306 (record_full_target_info): New.
5307 (record_full_target): <shortname>: Delete.
5308 <info>: New.
5309 (record_full_core_open_1, record_full_open_1): Update comments.
5310 (record_full_base_target::open): Rename to ...
5311 (record_full_open): ... this.
5312 (cmd_record_full_restore): Update.
5313 (_initialize_record_full): Update.
5314 * remote-sim.c (remote_sim_target_info): New.
5315 (gdbsim_target) <shortname, longname, doc>: Delete.
5316 <info>: New.
5317 (gdbsim_target::open): Rename to ...
5318 (gdbsim_target_open): ... this.
5319 (_initialize_remote_sim): Adjust.
5320 * remote.c (remote_doc): New.
5321 (remote_target_info): New.
5322 (remote_target) <shortname, longname, doc>: Delete.
5323 <info>: New.
5324 (extended_remote_target_info): New.
5325 (extended_remote_target) <shortname, longname, doc>: Delete.
5326 <info>: New.
5327 (remote_target::open_1): Make static. Adjust.
5328 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5329 * s390-linux-nat.c (_initialize_s390_nat): Use
5330 add_inf_child_target.
5331 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5332 add_inf_child_target.
5333 * sol-thread.c (thread_db_target_info): New.
5334 (sol_thread_target) <shortname, longname, doc>: Delete.
5335 <info>: New.
5336 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5337 add_inf_child_target.
5338 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5339 add_inf_child_target.
5340 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5341 add_inf_child_target.
5342 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5343 add_inf_child_target.
5344 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5345 add_inf_child_target.
5346 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5347 add_inf_child_target.
5348 * spu-linux-nat.c (_initialize_spu_nat): Use
5349 add_inf_child_target.
5350 * spu-multiarch.c (spu_multiarch_target_info): New.
5351 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5352 <info>: New.
5353 * target-delegates.c: Regenerate.
5354 * target.c: Include <unordered_map>.
5355 (target_ops_p): Delete.
5356 (DEF_VEC_P(target_ops_p)): Delete.
5357 (target_factories): New.
5358 (test_target_info): New.
5359 (test_target_ops::info): New.
5360 (open_target): Adjust to use target_factories.
5361 (add_target_with_completer): Rename to ...
5362 (add_target): ... this. Change prototype. Register target_info
5363 and open callback in target_factories. Register target_info in
5364 command context instead of target_ops.
5365 (add_target): Delete old implementation.
5366 (add_deprecated_target_alias): Change prototype. Adjust.
5367 (the_native_target): New.
5368 (set_native_target, get_native_target): New.
5369 (find_default_run_target): Use the_native_target.
5370 (find_attach_target, find_run_target): Simplify.
5371 (target_ops::open): Delete.
5372 (dummy_target_info): New.
5373 (dummy_target::shortname, dummy_target::longname)
5374 (dummy_target::doc): Delete.
5375 (dummy_target::info): New.
5376 (debug_target::shortname, debug_target::longname)
5377 (debug_target::doc): Delete.
5378 (debug_target::info): New.
5379 * target.h (struct target_info): New.
5380 (target_ops::~target_ops): Add comment.
5381 (target_ops::info): New.
5382 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5383 longer virtual. Implement in terms of target_info.
5384 (set_native_target, get_native_target): Declare.
5385 (target_open_ftype): New.
5386 (add_target, add_target_with_completer)
5387 (add_deprecated_target_alias): Change prototype.
5388 (test_target) <shortname, longname, doc>: Delete.
5389 <info>: New.
5390 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5391 add_inf_child_target.
5392 * tracefile-tfile.c (tfile_target_info): New.
5393 (tfile_target) <shortname, longname, doc>: Delete.
5394 <info>: New.
5395 (tfile_target::open): Rename to ...
5396 (tfile_target_open): ... this.
5397 (_initialize_tracefile_tfile): Adjust.
5398 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5399 add_inf_child_target.
5400 * windows-nat.c (_initialize_windows_nat): Use
5401 add_inf_child_target.
5402 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5403 add_inf_child_target.
5404
5405 2018-05-02 Pedro Alves <palves@redhat.com>
5406
5407 * linux-nat.h (linux_nat_target) <low_new_thread,
5408 low_delete_thread, low_new_fork, low_forget_process,
5409 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5410 New virtual methods.
5411 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5412 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5413 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5414 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5415 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5416 Delete.
5417 * linux-fork.c (delete_fork): Adjust to call low method.
5418 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5419 (linux_nat_new_fork, linux_nat_forget_process_hook)
5420 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5421 (linux_nat_status_is_event):
5422 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5423 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5424 to call low method.
5425 (sigtrap_is_event): Rename to ...
5426 (linux_nat_target::low_status_is_event): ... this.
5427 (linux_nat_set_status_is_event): Delete.
5428 (save_stop_reason, linux_nat_wait_1)
5429 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5430 low methods.
5431 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5432 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5433 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5434 (linux_nat_set_prepare_to_resume): Delete.
5435 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5436 low virtual methods.
5437 * amd64-linux-nat.c: Likewise.
5438 * arm-linux-nat.c: Likewise.
5439 * i386-linux-nat.c: Likewise.
5440 * ia64-linux-nat.c: Likewise.
5441 * mips-linux-nat.c: Likewise.
5442 * ppc-linux-nat.c: Likewise.
5443 * s390-linux-nat.c: Likewise.
5444 * sparc64-linux-nat.c: Likewise.
5445 * x86-linux-nat.c: Likewise.
5446 * x86-linux-nat.h: Include "nat/x86-linux.h".
5447 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5448 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5449 Override methods.
5450
5451 2018-05-02 Pedro Alves <palves@redhat.com>
5452
5453 * target.h (target_ops)
5454 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5455 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5456 stopped_by_watchpoint, have_continuable_watchpoint,
5457 stopped_data_address, watchpoint_addr_within_range,
5458 can_accel_watchpoint_condition, can_run, thread_alive,
5459 has_all_memory, has_memory, has_stack, has_registers,
5460 has_execution, can_async_p, is_async_p, supports_non_stop,
5461 always_non_stop_p, can_execute_reverse, supports_multi_process,
5462 supports_enable_disable_tracepoint,
5463 supports_disable_randomization, supports_string_tracing,
5464 supports_evaluation_of_breakpoint_conditions,
5465 can_run_breakpoint_commands, filesystem_is_local,
5466 can_download_tracepoint, get_trace_state_variable_value,
5467 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5468 record_is_replaying, record_will_replay,
5469 augmented_libraries_svr4_read>: Adjust to return bool.
5470 * aarch64-linux-nat.c: All implementations adjusted.
5471 * aix-thread.c: All implementations adjusted.
5472 * arm-linux-nat.c: All implementations adjusted.
5473 * breakpoint.c: All implementations adjusted.
5474 * bsd-kvm.c: All implementations adjusted.
5475 * bsd-uthread.c: All implementations adjusted.
5476 * corelow.c: All implementations adjusted.
5477 * ctf.c: All implementations adjusted.
5478 * darwin-nat.c: All implementations adjusted.
5479 * darwin-nat.h: All implementations adjusted.
5480 * exec.c: All implementations adjusted.
5481 * fbsd-nat.c: All implementations adjusted.
5482 * fbsd-nat.h: All implementations adjusted.
5483 * gnu-nat.c: All implementations adjusted.
5484 * gnu-nat.h: All implementations adjusted.
5485 * go32-nat.c: All implementations adjusted.
5486 * ia64-linux-nat.c: All implementations adjusted.
5487 * inf-child.c: All implementations adjusted.
5488 * inf-child.h: All implementations adjusted.
5489 * inf-ptrace.c: All implementations adjusted.
5490 * inf-ptrace.h: All implementations adjusted.
5491 * linux-nat.c: All implementations adjusted.
5492 * linux-nat.h: All implementations adjusted.
5493 * mips-linux-nat.c: All implementations adjusted.
5494 * nto-procfs.c: All implementations adjusted.
5495 * ppc-linux-nat.c: All implementations adjusted.
5496 * procfs.c: All implementations adjusted.
5497 * ravenscar-thread.c: All implementations adjusted.
5498 * record-btrace.c: All implementations adjusted.
5499 * record-full.c: All implementations adjusted.
5500 * remote-sim.c: All implementations adjusted.
5501 * remote.c: All implementations adjusted.
5502 * s390-linux-nat.c: All implementations adjusted.
5503 * sol-thread.c: All implementations adjusted.
5504 * spu-multiarch.c: All implementations adjusted.
5505 * target-delegates.c: All implementations adjusted.
5506 * target.c: All implementations adjusted.
5507 * target.h: All implementations adjusted.
5508 * tracefile-tfile.c: All implementations adjusted.
5509 * tracefile.c: All implementations adjusted.
5510 * tracefile.h: All implementations adjusted.
5511 * windows-nat.c: All implementations adjusted.
5512 * x86-linux-nat.h: All implementations adjusted.
5513 * x86-nat.h: All implementations adjusted.
5514
5515 2018-05-02 Pedro Alves <palves@redhat.com>
5516
5517 * make-target-delegates (scan_target_h): Don't trim lines here.
5518 Replace sequences of tabs and/or whitespace with a single
5519 whitespace.
5520 (top level, parsing methods): Trim each line before processing it
5521 here.
5522
5523 2018-05-02 Pedro Alves <palves@redhat.com>
5524 John Baldwin <jhb@freebsd.org>
5525
5526 * target.h (enum strata) <debug_stratum>: New.
5527 (struct target_ops) <all delegation methods>: Replace by C++
5528 virtual methods, and drop "to_" prefix. All references updated
5529 throughout.
5530 <to_shortname, to_longname, to_doc, to_data,
5531 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5532 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5533 virtual methods. All references updated throughout.
5534 <can_attach, supports_terminal_ours, can_create_inferior,
5535 get_thread_control_capabilities, attach_no_wait>: New
5536 virtual methods.
5537 <insert_breakpoint, remove_breakpoint>: Now
5538 TARGET_DEFAULT_NORETURN methods.
5539 <info_proc>: Now returns bool.
5540 <to_magic>: Delete.
5541 (OPS_MAGIC): Delete.
5542 (current_target): Delete. All references replaced by references
5543 to ...
5544 (target_stack): ... this. New.
5545 (target_shortname, target_longname): Adjust.
5546 (target_can_run): Now a function declaration.
5547 (default_child_has_all_memory, default_child_has_memory)
5548 (default_child_has_stack, default_child_has_registers)
5549 (default_child_has_execution): Remove target_ops parameter.
5550 (complete_target_initialization): Delete.
5551 (memory_breakpoint_target): New template class.
5552 (test_target_ops): Refactor as a C++ class with virtual methods.
5553 * make-target-delegates (NAME_PART): Tighten.
5554 (POINTER_PART, CP_SYMBOL): New.
5555 (SIMPLE_RETURN_PART): Reimplement.
5556 (VEC_RETURN_PART): Expect less.
5557 (RETURN_PART, VIRTUAL_PART): New.
5558 (METHOD): Adjust to C++ virtual methods.
5559 (scan_target_h): Remove reference to C99.
5560 (dname): Output "target_ops::" prefix.
5561 (write_function_header): Adjust to output a C++ class method.
5562 (write_declaration): New.
5563 (write_delegator): Adjust to output a C++ class method.
5564 (tdname): Output "dummy_target::" prefix.
5565 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5566 method.
5567 (tdefault_names, debug_names): Delete.
5568 (return_types, tdefaults, styles, argtypes_array): New.
5569 (top level): All methods are delegators.
5570 (print_class): New.
5571 (top level): Print dummy_target and debug_target classes.
5572 * target-delegates.c: Regenerate.
5573 * target-debug.h (target_debug_print_enum_info_proc_what)
5574 (target_debug_print_thread_control_capabilities)
5575 (target_debug_print_thread_info_p): New.
5576 * target.c (dummy_target): Delete.
5577 (the_dummy_target, the_debug_target): New.
5578 (target_stack): Now extern.
5579 (set_targetdebug): Push/unpush debug target.
5580 (default_child_has_all_memory, default_child_has_memory)
5581 (default_child_has_stack, default_child_has_registers)
5582 (default_child_has_execution): Remove target_ops parameter.
5583 (complete_target_initialization): Delete.
5584 (add_target_with_completer): No longer call
5585 complete_target_initialization.
5586 (target_supports_terminal_ours): Use regular delegation.
5587 (update_current_target): Delete.
5588 (push_target): No longer check magic number. Don't call
5589 update_current_target.
5590 (unpush_target): Don't call update_current_target.
5591 (target_is_pushed): No longer check magic number.
5592 (target_require_runnable): Skip for all stratums over
5593 process_stratum.
5594 (target_ops::info_proc): New.
5595 (target_info_proc): Use find_target_at and
5596 find_default_run_target.
5597 (target_supports_disable_randomization): Use regular delegation.
5598 (target_get_osdata): Use find_target_at.
5599 (target_ops::open, target_ops::close, target_ops::can_attach)
5600 (target_ops::attach, target_ops::can_create_inferior)
5601 (target_ops::create_inferior, target_ops::can_run)
5602 (target_can_run): New.
5603 (default_fileio_target): Use regular delegation.
5604 (target_ops::fileio_open, target_ops::fileio_pwrite)
5605 (target_ops::fileio_pread, target_ops::fileio_fstat)
5606 (target_ops::fileio_close, target_ops::fileio_unlink)
5607 (target_ops::fileio_readlink): New.
5608 (target_fileio_open_1, target_fileio_unlink)
5609 (target_fileio_readlink): Always call the target method. Handle
5610 FILEIO_ENOSYS.
5611 (return_zero, return_zero_has_execution): Delete.
5612 (init_dummy_target): Delete.
5613 (dummy_target::dummy_target, dummy_target::shortname)
5614 (dummy_target::longname, dummy_target::doc)
5615 (debug_target::debug_target, debug_target::shortname)
5616 (debug_target::longname, debug_target::doc): New.
5617 (target_supports_delete_record): Use regular delegation.
5618 (setup_target_debug): Delete.
5619 (maintenance_print_target_stack): Skip debug_stratum.
5620 (initialize_targets): Instantiate the_dummy_target and
5621 the_debug_target.
5622 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5623 use target_stack.
5624 (target_auxv_search, fprint_target_auxv): Adjust.
5625 (info_auxv_command): Adjust to use target_stack.
5626 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5627 * exceptions.c (print_flush): Handle a NULL target_stack.
5628 * regcache.c (target_ops_no_register): Refactor as class with
5629 virtual methods.
5630
5631 * exec.c (exec_target): New class.
5632 (exec_ops): Now an exec_target.
5633 (exec_open, exec_close_1, exec_get_section_table)
5634 (exec_xfer_partial, exec_files_info, exec_has_memory)
5635 (exec_make_note_section): Refactor as exec_target methods.
5636 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5637 Delete.
5638 (exec_target::find_memory_regions): New.
5639 (_initialize_exec): Don't call init_exec_ops.
5640 * gdbcore.h (exec_file_clear): Delete.
5641
5642 * corefile.c (core_target): Delete.
5643 (core_file_command): Adjust.
5644 * corelow.c (core_target): New class.
5645 (the_core_target): New.
5646 (core_close): Remove target_ops parameter.
5647 (core_close_cleanup): Adjust.
5648 (core_target::close): New.
5649 (core_open, core_detach, get_core_registers, core_files_info)
5650 (core_xfer_partial, core_thread_alive, core_read_description)
5651 (core_pid_to_str, core_thread_name, core_has_memory)
5652 (core_has_stack, core_has_registers, core_info_proc): Rework as
5653 core_target methods.
5654 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5655 (_initialize_corelow): Initialize the_core_target.
5656 * gdbcore.h (core_target): Delete.
5657 (the_core_target): New.
5658
5659 * ctf.c: (ctf_target): New class.
5660 (ctf_ops): Now a ctf_target.
5661 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5662 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5663 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5664 methods.
5665 (init_ctf_ops): Delete.
5666 (_initialize_ctf): Don't call it.
5667 * tracefile-tfile.c (tfile_target): New class.
5668 (tfile_ops): Now a tfile_target.
5669 (tfile_open, tfile_close, tfile_files_info)
5670 (tfile_get_tracepoint_status, tfile_trace_find)
5671 (tfile_fetch_registers, tfile_xfer_partial)
5672 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5673 Refactor as tfile_target methods.
5674 (tfile_xfer_partial_features): Remove target_ops parameter.
5675 (init_tfile_ops): Delete.
5676 (_initialize_tracefile_tfile): Don't call it.
5677 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5678 (tracefile_has_stack, tracefile_has_registers)
5679 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5680 tracefile_target methods.
5681 (init_tracefile_ops): Delete.
5682 (tracefile_target::tracefile_target): New.
5683 * tracefile.h: Include "target.h".
5684 (tracefile_target): New class.
5685 (init_tracefile_ops): Delete.
5686
5687 * spu-multiarch.c (spu_multiarch_target): New class.
5688 (spu_ops): Now a spu_multiarch_target.
5689 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5690 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5691 (spu_search_memory, spu_mourn_inferior): Refactor as
5692 spu_multiarch_target methods.
5693 (init_spu_ops): Delete.
5694 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5695 complete_target_initialization.
5696
5697 * ravenscar-thread.c (ravenscar_thread_target): New class.
5698 (ravenscar_ops): Now a ravenscar_thread_target.
5699 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5700 (ravenscar_thread_alive, ravenscar_pid_to_str)
5701 (ravenscar_fetch_registers, ravenscar_store_registers)
5702 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5703 (ravenscar_stopped_by_hw_breakpoint)
5704 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5705 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5706 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5707 methods.
5708 (init_ravenscar_thread_ops): Delete.
5709 (_initialize_ravenscar): Remove references to
5710 init_ravenscar_thread_ops and complete_target_initialization.
5711
5712 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5713 (bsd_uthread_target): New class.
5714 (bsd_uthread_ops): Now a bsd_uthread_target.
5715 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5716 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5717 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5718 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5719 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5720 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5721 (bsd_uthread_target): Delete function.
5722 (_initialize_bsd_uthread): Remove reference to
5723 complete_target_initialization.
5724
5725 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5726 (target_bfd): ... this new class.
5727 (target_bfd_xfer_partial, target_bfd_get_section_table)
5728 (target_bfd_close): Refactor as target_bfd methods.
5729 (target_bfd::~target_bfd): New.
5730 (target_bfd_reopen): Adjust.
5731 (target_bfd::close): New.
5732
5733 * record-btrace.c (record_btrace_target): New class.
5734 (record_btrace_ops): Now a record_btrace_target.
5735 (record_btrace_open, record_btrace_stop_recording)
5736 (record_btrace_disconnect, record_btrace_close)
5737 (record_btrace_async, record_btrace_info)
5738 (record_btrace_insn_history, record_btrace_insn_history_range)
5739 (record_btrace_insn_history_from, record_btrace_call_history)
5740 (record_btrace_call_history_range)
5741 (record_btrace_call_history_from, record_btrace_record_method)
5742 (record_btrace_is_replaying, record_btrace_will_replay)
5743 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5744 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5745 (record_btrace_store_registers, record_btrace_prepare_to_store)
5746 (record_btrace_to_get_unwinder)
5747 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5748 (record_btrace_commit_resume, record_btrace_wait)
5749 (record_btrace_stop, record_btrace_can_execute_reverse)
5750 (record_btrace_stopped_by_sw_breakpoint)
5751 (record_btrace_supports_stopped_by_sw_breakpoint)
5752 (record_btrace_stopped_by_hw_breakpoint)
5753 (record_btrace_supports_stopped_by_hw_breakpoint)
5754 (record_btrace_update_thread_list, record_btrace_thread_alive)
5755 (record_btrace_goto_begin, record_btrace_goto_end)
5756 (record_btrace_goto, record_btrace_stop_replaying_all)
5757 (record_btrace_execution_direction)
5758 (record_btrace_prepare_to_generate_core)
5759 (record_btrace_done_generating_core): Refactor as
5760 record_btrace_target methods.
5761 (init_record_btrace_ops): Delete.
5762 (_initialize_record_btrace): Remove reference to
5763 init_record_btrace_ops.
5764 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5765 the execution_direction global.
5766 (record_full_base_target, record_full_target)
5767 (record_full_core_target): New classes.
5768 (record_full_ops): Now a record_full_target.
5769 (record_full_core_ops): Now a record_full_core_target.
5770 (record_full_target::detach, record_full_target::disconnect)
5771 (record_full_core_target::disconnect)
5772 (record_full_target::mourn_inferior, record_full_target::kill):
5773 New.
5774 (record_full_open, record_full_close, record_full_async): Refactor
5775 as methods of the record_full_base_target class.
5776 (record_full_resume, record_full_commit_resume): Refactor
5777 as methods of the record_full_target class.
5778 (record_full_wait, record_full_stopped_by_watchpoint)
5779 (record_full_stopped_data_address)
5780 (record_full_stopped_by_sw_breakpoint)
5781 (record_full_supports_stopped_by_sw_breakpoint)
5782 (record_full_stopped_by_hw_breakpoint)
5783 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5784 methods of the record_full_base_target class.
5785 (record_full_store_registers, record_full_xfer_partial)
5786 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5787 Refactor as methods of the record_full_target class.
5788 (record_full_can_execute_reverse, record_full_get_bookmark)
5789 (record_full_goto_bookmark, record_full_execution_direction)
5790 (record_full_record_method, record_full_info, record_full_delete)
5791 (record_full_is_replaying, record_full_will_replay)
5792 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5793 (record_full_stop_replaying): Refactor as methods of the
5794 record_full_base_target class.
5795 (record_full_core_resume, record_full_core_kill)
5796 (record_full_core_fetch_registers)
5797 (record_full_core_prepare_to_store)
5798 (record_full_core_store_registers, record_full_core_xfer_partial)
5799 (record_full_core_insert_breakpoint)
5800 (record_full_core_remove_breakpoint)
5801 (record_full_core_has_execution): Refactor
5802 as methods of the record_full_core_target class.
5803 (record_full_base_target::supports_delete_record): New.
5804 (init_record_full_ops): Delete.
5805 (init_record_full_core_ops): Delete.
5806 (record_full_save): Refactor as method of the
5807 record_full_base_target class.
5808 (_initialize_record_full): Remove references to
5809 init_record_full_ops and init_record_full_core_ops.
5810
5811 * remote.c (remote_target, extended_remote_target): New classes.
5812 (remote_ops): Now a remote_target.
5813 (extended_remote_ops): Now an extended_remote_target.
5814 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5815 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5816 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5817 (remote_pass_signals, remote_set_syscall_catchpoint)
5818 (remote_program_signals, )
5819 (remote_thread_always_alive): Remove target_ops parameter.
5820 (remote_thread_alive, remote_thread_name)
5821 (remote_update_thread_list, remote_threads_extra_info)
5822 (remote_static_tracepoint_marker_at)
5823 (remote_static_tracepoint_markers_by_strid)
5824 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5825 (remote_open): Refactor as methods of remote_target.
5826 (extended_remote_open, extended_remote_detach)
5827 (extended_remote_attach, extended_remote_post_attach):
5828 (extended_remote_supports_disable_randomization)
5829 (extended_remote_create_inferior): : Refactor as method of
5830 extended_remote_target.
5831 (remote_set_permissions, remote_open_1, remote_detach)
5832 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5833 (remote_resume, remote_commit_resume, remote_stop)
5834 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5835 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5836 (remote_prepare_to_store, remote_store_registers)
5837 (remote_flash_erase, remote_flash_done, remote_files_info)
5838 (remote_kill, remote_mourn, remote_insert_breakpoint)
5839 (remote_remove_breakpoint, remote_insert_watchpoint)
5840 (remote_watchpoint_addr_within_range)
5841 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5842 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5843 (remote_supports_stopped_by_sw_breakpoint)
5844 (remote_stopped_by_hw_breakpoint)
5845 (remote_supports_stopped_by_hw_breakpoint)
5846 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5847 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5848 (remote_verify_memory): Refactor as methods of remote_target.
5849 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5850 parameter.
5851 (remote_xfer_partial, remote_get_memory_xfer_limit)
5852 (remote_search_memory, remote_rcmd, remote_memory_map)
5853 (remote_pid_to_str, remote_get_thread_local_address)
5854 (remote_get_tib_address, remote_read_description): Refactor as
5855 methods of remote_target.
5856 (remote_target::fileio_open, remote_target::fileio_pwrite)
5857 (remote_target::fileio_pread, remote_target::fileio_close): New.
5858 (remote_hostio_readlink, remote_hostio_fstat)
5859 (remote_filesystem_is_local, remote_can_execute_reverse)
5860 (remote_supports_non_stop, remote_supports_disable_randomization)
5861 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5862 (remote_supports_enable_disable_tracepoint)
5863 (remote_supports_string_tracing)
5864 (remote_can_run_breakpoint_commands, remote_trace_init)
5865 (remote_download_tracepoint, remote_can_download_tracepoint)
5866 (remote_download_trace_state_variable, remote_enable_tracepoint)
5867 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5868 (remote_trace_start, remote_get_trace_status)
5869 (remote_get_tracepoint_status, remote_trace_stop)
5870 (remote_trace_find, remote_get_trace_state_variable_value)
5871 (remote_save_trace_data, remote_get_raw_trace_data)
5872 (remote_set_disconnected_tracing, remote_core_of_thread)
5873 (remote_set_circular_trace_buffer, remote_traceframe_info)
5874 (remote_get_min_fast_tracepoint_insn_len)
5875 (remote_set_trace_buffer_size, remote_set_trace_notes)
5876 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5877 (remote_disable_btrace, remote_teardown_btrace)
5878 (remote_read_btrace, remote_btrace_conf)
5879 (remote_augmented_libraries_svr4_read, remote_load)
5880 (remote_pid_to_exec_file, remote_can_do_single_step)
5881 (remote_execution_direction, remote_thread_handle_to_thread_info):
5882 Refactor as methods of remote_target.
5883 (init_remote_ops, init_extended_remote_ops): Delete.
5884 (remote_can_async_p, remote_is_async_p, remote_async)
5885 (remote_thread_events, remote_upload_tracepoints)
5886 (remote_upload_trace_state_variables): Refactor as methods of
5887 remote_target.
5888 (_initialize_remote): Remove references to init_remote_ops and
5889 init_extended_remote_ops.
5890
5891 * remote-sim.c (gdbsim_target): New class.
5892 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5893 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5894 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5895 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5896 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5897 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5898 Refactor as methods of gdbsim_target.
5899 (gdbsim_ops): Now a gdbsim_target.
5900 (init_gdbsim_ops): Delete.
5901 (gdbsim_cntrl_c): Adjust.
5902 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5903
5904 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5905 (the_amd64_linux_nat_target): New.
5906 (amd64_linux_fetch_inferior_registers)
5907 (amd64_linux_store_inferior_registers): Refactor as methods of
5908 amd64_linux_nat_target.
5909 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5910 * i386-linux-nat.c: Don't include "linux-nat.h".
5911 (i386_linux_nat_target): New class.
5912 (the_i386_linux_nat_target): New.
5913 (i386_linux_fetch_inferior_registers)
5914 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5915 as methods of i386_linux_nat_target.
5916 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5917 * inf-child.c (inf_child_ops): Delete.
5918 (inf_child_fetch_inferior_registers)
5919 (inf_child_store_inferior_registers): Delete.
5920 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5921 methods of inf_child_target.
5922 (inf_child_target::supports_terminal_ours)
5923 (inf_child_target::terminal_init)
5924 (inf_child_target::terminal_inferior)
5925 (inf_child_target::terminal_ours_for_output)
5926 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5927 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5928 New.
5929 (inf_child_open, inf_child_disconnect, inf_child_close)
5930 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5931 (inf_child_post_startup_inferior, inf_child_can_run)
5932 (inf_child_pid_to_exec_file): Refactor as methods of
5933 inf_child_target.
5934 (inf_child_follow_fork): Delete.
5935 (inf_child_target::can_create_inferior)
5936 (inf_child_target::can_attach): New.
5937 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5938 (inf_child_target::has_stack, inf_child_target::has_registers)
5939 (inf_child_target::has_execution): New.
5940 (inf_child_fileio_open, inf_child_fileio_pwrite)
5941 (inf_child_fileio_pread, inf_child_fileio_fstat)
5942 (inf_child_fileio_close, inf_child_fileio_unlink)
5943 (inf_child_fileio_readlink, inf_child_use_agent)
5944 (inf_child_can_use_agent): Refactor as methods of
5945 inf_child_target.
5946 (return_zero, inf_child_target): Delete.
5947 (inf_child_target::inf_child_target): New.
5948 * inf-child.h: Include "target.h".
5949 (inf_child_target): Delete function prototype.
5950 (inf_child_target): New class.
5951 (inf_child_open_target, inf_child_mourn_inferior)
5952 (inf_child_maybe_unpush_target): Delete.
5953 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5954 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5955 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5956 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5957 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5958 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5959 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5960 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5961 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5962 methods of inf_ptrace_target.
5963 (inf_ptrace_target): Delete function.
5964 * inf-ptrace.h: Include "inf-child.h".
5965 (inf_ptrace_target): Delete function declaration.
5966 (inf_ptrace_target): New class.
5967 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5968 * linux-nat.c (linux_target): New.
5969 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5970 (linux_nat_target::~linux_nat_target): New.
5971 (linux_child_post_attach, linux_child_post_startup_inferior)
5972 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5973 (linux_child_remove_fork_catchpoint)
5974 (linux_child_insert_vfork_catchpoint)
5975 (linux_child_remove_vfork_catchpoint)
5976 (linux_child_insert_exec_catchpoint)
5977 (linux_child_remove_exec_catchpoint)
5978 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5979 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5980 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5981 (linux_nat_stopped_data_address)
5982 (linux_nat_stopped_by_sw_breakpoint)
5983 (linux_nat_supports_stopped_by_sw_breakpoint)
5984 (linux_nat_stopped_by_hw_breakpoint)
5985 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5986 (linux_nat_kill, linux_nat_mourn_inferior)
5987 (linux_nat_xfer_partial, linux_nat_thread_alive)
5988 (linux_nat_update_thread_list, linux_nat_pid_to_str)
5989 (linux_nat_thread_name, linux_child_pid_to_exec_file)
5990 (linux_child_static_tracepoint_markers_by_strid)
5991 (linux_nat_is_async_p, linux_nat_can_async_p)
5992 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
5993 (linux_nat_supports_multi_process)
5994 (linux_nat_supports_disable_randomization, linux_nat_async)
5995 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
5996 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
5997 (linux_nat_fileio_open, linux_nat_fileio_readlink)
5998 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
5999 methods of linux_nat_target.
6000 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6001 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6002 parameter.
6003 (check_stopped_by_watchpoint): Adjust.
6004 (linux_xfer_partial): Delete.
6005 (linux_target_install_ops, linux_target, linux_nat_add_target):
6006 Delete.
6007 (linux_nat_target::linux_nat_target): New.
6008 * linux-nat.h: Include "inf-ptrace.h".
6009 (linux_nat_target): New.
6010 (linux_target, linux_target_install_ops, linux_nat_add_target):
6011 Delete function declarations.
6012 (linux_target): Declare global.
6013 * linux-thread-db.c (thread_db_target): New.
6014 (thread_db_target::thread_db_target): New.
6015 (thread_db_ops): Delete.
6016 (the_thread_db_target): New.
6017 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6018 (thread_db_update_thread_list, thread_db_pid_to_str)
6019 (thread_db_extra_thread_info)
6020 (thread_db_thread_handle_to_thread_info)
6021 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6022 (thread_db_resume): Refactor as methods of thread_db_target.
6023 (init_thread_db_ops): Delete.
6024 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6025 * x86-linux-nat.c: Don't include "linux-nat.h".
6026 (super_post_startup_inferior): Delete.
6027 (x86_linux_nat_target::~x86_linux_nat_target): New.
6028 (x86_linux_child_post_startup_inferior)
6029 (x86_linux_read_description, x86_linux_enable_btrace)
6030 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6031 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6032 methods of x86_linux_nat_target.
6033 (x86_linux_create_target): Delete. Bits folded ...
6034 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6035 pointer.
6036 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6037 (x86_linux_nat_target): New class.
6038 (x86_linux_create_target): Delete.
6039 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6040 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6041 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6042 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6043 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6044 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6045 make extern.
6046 (x86_use_watchpoints): Delete.
6047 * x86-nat.h: Include "breakpoint.h" and "target.h".
6048 (x86_use_watchpoints): Delete.
6049 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6050 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6051 (x86_insert_watchpoint, x86_remove_watchpoint)
6052 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6053 (x86_stopped_by_hw_breakpoint): New declarations.
6054 (x86_nat_target): New template class.
6055
6056 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6057 (the_ppc_linux_nat_target): New.
6058 (ppc_linux_fetch_inferior_registers)
6059 (ppc_linux_can_use_hw_breakpoint)
6060 (ppc_linux_region_ok_for_hw_watchpoint)
6061 (ppc_linux_ranged_break_num_registers)
6062 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6063 (ppc_linux_insert_mask_watchpoint)
6064 (ppc_linux_remove_mask_watchpoint)
6065 (ppc_linux_can_accel_watchpoint_condition)
6066 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6067 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6068 (ppc_linux_watchpoint_addr_within_range)
6069 (ppc_linux_masked_watch_num_registers)
6070 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6071 (ppc_linux_read_description): Refactor as methods of
6072 ppc_linux_nat_target.
6073 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6074
6075 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6076 (procfs_target): New class.
6077 (the_procfs_target): New.
6078 (procfs_target): Delete function.
6079 (procfs_auxv_parse, procfs_attach, procfs_detach)
6080 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6081 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6082 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6083 (procfs_create_inferior, procfs_update_thread_list)
6084 (procfs_thread_alive, procfs_pid_to_str)
6085 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6086 (procfs_stopped_data_address, procfs_insert_watchpoint)
6087 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6088 (proc_find_memory_regions, procfs_info_proc)
6089 (procfs_make_note_section): Refactor as methods of procfs_target.
6090 (_initialize_procfs): Adjust.
6091 * sol-thread.c (sol_thread_target): New class.
6092 (sol_thread_ops): Now a sol_thread_target.
6093 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6094 (sol_thread_fetch_registers, sol_thread_store_registers)
6095 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6096 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6097 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6098 (init_sol_thread_ops): Delete.
6099 (_initialize_sol_thread): Adjust. Remove references to
6100 init_sol_thread_ops and complete_target_initialization.
6101
6102 * windows-nat.c (windows_nat_target): New class.
6103 (windows_fetch_inferior_registers)
6104 (windows_store_inferior_registers, windows_resume, windows_wait)
6105 (windows_attach, windows_detach, windows_pid_to_exec_file)
6106 (windows_files_info, windows_create_inferior)
6107 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6108 (windows_close, windows_pid_to_str, windows_xfer_partial)
6109 (windows_get_tib_address, windows_get_ada_task_ptid)
6110 (windows_thread_name, windows_thread_alive): Refactor as
6111 windows_nat_target methods.
6112 (do_initial_windows_stuff): Adjust.
6113 (windows_target): Delete function.
6114 (_initialize_windows_nat): Adjust.
6115
6116 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6117 (darwin_mourn_inferior, darwin_kill_inferior)
6118 (darwin_create_inferior, darwin_attach, darwin_detach)
6119 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6120 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6121 (darwin_supports_multi_process): Refactor as darwin_nat_target
6122 methods.
6123 (darwin_resume_to, darwin_files_info): Delete.
6124 (_initialize_darwin_inferior): Rename to ...
6125 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6126 * darwin-nat.h: Include "inf-child.h".
6127 (darwin_nat_target): New class.
6128 (darwin_complete_target): Delete.
6129 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6130 (darwin_target): New.
6131 (i386_darwin_fetch_inferior_registers)
6132 (i386_darwin_store_inferior_registers): Refactor as methods of
6133 darwin_nat_target.
6134 (darwin_complete_target): Delete, with ...
6135 (_initialize_i386_darwin_nat): ... bits factored out here.
6136
6137 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6138 (the_alpha_linux_nat_target): New.
6139 (alpha_linux_register_u_offset): Refactor as
6140 alpha_linux_nat_target method.
6141 (_initialize_alpha_linux_nat): Adjust.
6142 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6143 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6144 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6145 methods of linux_nat_trad_target.
6146 (linux_trad_target): Delete.
6147 * linux-nat-trad.h (linux_trad_target): Delete function.
6148 (linux_nat_trad_target): New class.
6149 * mips-linux-nat.c (mips_linux_nat_target): New class.
6150 (super_fetch_registers, super_store_registers, super_close):
6151 Delete.
6152 (the_mips_linux_nat_target): New.
6153 (mips64_linux_regsets_fetch_registers)
6154 (mips64_linux_regsets_store_registers)
6155 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6156 (mips_linux_register_u_offset, mips_linux_read_description)
6157 (mips_linux_can_use_hw_breakpoint)
6158 (mips_linux_stopped_by_watchpoint)
6159 (mips_linux_stopped_data_address)
6160 (mips_linux_region_ok_for_hw_watchpoint)
6161 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6162 (mips_linux_close): Refactor as methods of mips_linux_nat.
6163 (_initialize_mips_linux_nat): Adjust to C++ification.
6164
6165 * aix-thread.c (aix_thread_target): New class.
6166 (aix_thread_ops): Now an aix_thread_target.
6167 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6168 (aix_thread_fetch_registers, aix_thread_store_registers)
6169 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6170 (aix_thread_thread_alive, aix_thread_pid_to_str)
6171 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6172 Refactor as methods of aix_thread_target.
6173 (init_aix_thread_ops): Delete.
6174 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6175 and complete_target_initialization.
6176 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6177 (rs6000_nat_target): New class.
6178 (the_rs6000_nat_target): New.
6179 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6180 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6181 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6182 (super_create_inferior): Delete.
6183 (_initialize_rs6000_nat): Adjust to C++ification.
6184
6185 * arm-linux-nat.c (arm_linux_nat_target): New class.
6186 (the_arm_linux_nat_target): New.
6187 (arm_linux_fetch_inferior_registers)
6188 (arm_linux_store_inferior_registers, arm_linux_read_description)
6189 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6190 (arm_linux_remove_hw_breakpoint)
6191 (arm_linux_region_ok_for_hw_watchpoint)
6192 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6193 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6194 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6195 arm_linux_nat_target.
6196 (_initialize_arm_linux_nat): Adjust to C++ification.
6197
6198 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6199 (the_aarch64_linux_nat_target): New.
6200 (aarch64_linux_fetch_inferior_registers)
6201 (aarch64_linux_store_inferior_registers)
6202 (aarch64_linux_child_post_startup_inferior)
6203 (aarch64_linux_read_description)
6204 (aarch64_linux_can_use_hw_breakpoint)
6205 (aarch64_linux_insert_hw_breakpoint)
6206 (aarch64_linux_remove_hw_breakpoint)
6207 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6208 (aarch64_linux_region_ok_for_hw_watchpoint)
6209 (aarch64_linux_stopped_data_address)
6210 (aarch64_linux_stopped_by_watchpoint)
6211 (aarch64_linux_watchpoint_addr_within_range)
6212 (aarch64_linux_can_do_single_step): Refactor as methods of
6213 aarch64_linux_nat_target.
6214 (super_post_startup_inferior): Delete.
6215 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6216
6217 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6218 (the_hppa_linux_nat_target): New.
6219 (hppa_linux_fetch_inferior_registers)
6220 (hppa_linux_store_inferior_registers): Refactor as methods of
6221 hppa_linux_nat_target.
6222 (_initialize_hppa_linux_nat): Adjust to C++ification.
6223
6224 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6225 (the_ia64_linux_nat_target): New.
6226 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6227 (ia64_linux_stopped_data_address)
6228 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6229 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6230 ia64_linux_nat_target methods.
6231 (super_xfer_partial): Delete.
6232 (_initialize_ia64_linux_nat): Adjust to C++ification.
6233
6234 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6235 (the_m32r_linux_nat_target): New.
6236 (m32r_linux_fetch_inferior_registers)
6237 (m32r_linux_store_inferior_registers): Refactor as
6238 m32r_linux_nat_target methods.
6239 (_initialize_m32r_linux_nat): Adjust to C++ification.
6240
6241 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6242 (the_m68k_linux_nat_target): New.
6243 (m68k_linux_fetch_inferior_registers)
6244 (m68k_linux_store_inferior_registers): Refactor as
6245 m68k_linux_nat_target methods.
6246 (_initialize_m68k_linux_nat): Adjust to C++ification.
6247
6248 * s390-linux-nat.c (s390_linux_nat_target): New class.
6249 (the_s390_linux_nat_target): New.
6250 (s390_linux_fetch_inferior_registers)
6251 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6252 (s390_insert_watchpoint, s390_remove_watchpoint)
6253 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6254 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6255 (s390_auxv_parse, s390_read_description): Refactor as methods of
6256 s390_linux_nat_target.
6257 (_initialize_s390_nat): Adjust to C++ification.
6258
6259 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6260 (the_sparc_linux_nat_target): New.
6261 (_initialize_sparc_linux_nat): Adjust to C++ification.
6262 * sparc-nat.c (sparc_fetch_inferior_registers)
6263 (sparc_store_inferior_registers): Remove target_ops parameter.
6264 * sparc-nat.h (sparc_fetch_inferior_registers)
6265 (sparc_store_inferior_registers): Remove target_ops parameter.
6266 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6267 (the_sparc64_linux_nat_target): New.
6268 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6269
6270 * spu-linux-nat.c (spu_linux_nat_target): New class.
6271 (the_spu_linux_nat_target): New.
6272 (spu_child_post_startup_inferior, spu_child_post_attach)
6273 (spu_child_wait, spu_fetch_inferior_registers)
6274 (spu_store_inferior_registers, spu_xfer_partial)
6275 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6276 methods.
6277 (_initialize_spu_nat): Adjust to C++ification.
6278
6279 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6280 (the_tilegx_linux_nat_target): New.
6281 (fetch_inferior_registers, store_inferior_registers):
6282 Refactor as methods.
6283 (_initialize_tile_linux_nat): Adjust to C++ification.
6284
6285 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6286 (the_xtensa_linux_nat_target): New.
6287 (xtensa_linux_fetch_inferior_registers)
6288 (xtensa_linux_store_inferior_registers): Refactor as
6289 xtensa_linux_nat_target methods.
6290 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6291
6292 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6293 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6294 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6295 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6296 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6297 (fbsd_stopped_by_sw_breakpoint)
6298 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6299 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6300 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6301 (fbsd_post_startup_inferior, fbsd_post_attach)
6302 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6303 (fbsd_set_syscall_catchpoint)
6304 (super_xfer_partial, super_resume, super_wait)
6305 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6306 (fbsd_handle_debug_trap): Remove target_ops parameter.
6307 (fbsd_nat_add_target): Delete.
6308 * fbsd-nat.h: Include "inf-ptrace.h".
6309 (fbsd_nat_add_target): Delete.
6310 (USE_SIGTRAP_SIGINFO): Define.
6311 (fbsd_nat_target): New class.
6312
6313 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6314 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6315 (amd64bsd_target): Delete.
6316 * amd64-bsd-nat.h: New file.
6317 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6318 "x86-bsd-nat.h".
6319 (amd64_fbsd_nat_target): New class.
6320 (the_amd64_fbsd_nat_target): New.
6321 (amd64fbsd_read_description): Refactor as method of
6322 amd64_fbsd_nat_target.
6323 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6324 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6325 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6326 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6327 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6328 (i386bsd_target): Delete.
6329 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6330 (i386bsd_fetch_inferior_registers)
6331 (i386bsd_store_inferior_registers): Declare.
6332 (i386_bsd_nat_target): New class.
6333 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6334 (the_i386_fbsd_nat_target): New.
6335 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6336 i386_fbsd_nat_target methods.
6337 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6338 (_initialize_i386fbsd_nat): Adjust to C++ification.
6339 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6340 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6341 (_initialize_x86_bsd_nat): Adjust to C++ification.
6342 * x86-bsd-nat.h: Include "x86-nat.h".
6343 (x86bsd_target): Delete declaration.
6344 (x86bsd_nat_target): New class.
6345
6346 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6347 (the_aarch64_fbsd_nat_target): New.
6348 (aarch64_fbsd_fetch_inferior_registers)
6349 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6350 aarch64_fbsd_nat_target.
6351 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6352 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6353 (the_alpha_bsd_nat_target): New.
6354 (alphabsd_fetch_inferior_registers)
6355 (alphabsd_store_inferior_registers): Refactor as
6356 alpha_bsd_nat_target methods.
6357 (_initialize_alphabsd_nat): Refactor as methods of
6358 alpha_bsd_nat_target.
6359 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6360 (the_amd64_nbsd_nat_target): New.
6361 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6362 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6363 (the_amd64_obsd_nat_target): New.
6364 (_initialize_amd64obsd_nat): Adjust to C++ification.
6365 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6366 (the_arm_fbsd_nat_target): New.
6367 (arm_fbsd_fetch_inferior_registers)
6368 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6369 (_initialize_arm_fbsd_nat): Refactor as methods of
6370 arm_fbsd_nat_target.
6371 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6372 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6373 (the_arm_netbsd_nat_target): New.
6374 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6375 arm_netbsd_nat_target.
6376 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6377 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6378 (the_hppa_nbsd_nat_target): New.
6379 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6380 hppa_nbsd_nat_target methods.
6381 (_initialize_hppanbsd_nat): Adjust to C++ification.
6382 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6383 (the_hppa_obsd_nat_target): New.
6384 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6385 methods of hppa_obsd_nat_target.
6386 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6387 add_target.
6388 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6389 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6390 add_target.
6391 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6392 (_initialize_i386obsd_nat): Use add_target.
6393 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6394 (the_m68k_bsd_nat_target): New.
6395 (m68kbsd_fetch_inferior_registers)
6396 (m68kbsd_store_inferior_registers): Refactor as methods of
6397 m68k_bsd_nat_target.
6398 (_initialize_m68kbsd_nat): Adjust to C++ification.
6399 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6400 (the_mips_fbsd_nat_target): New.
6401 (mips_fbsd_fetch_inferior_registers)
6402 (mips_fbsd_store_inferior_registers): Refactor as methods of
6403 mips_fbsd_nat_target.
6404 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6405 add_target.
6406 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6407 (the_mips_nbsd_nat_target): New.
6408 (mipsnbsd_fetch_inferior_registers)
6409 (mipsnbsd_store_inferior_registers): Refactor as methods of
6410 mips_nbsd_nat_target.
6411 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6412 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6413 (the_mips64_obsd_nat_target): New.
6414 (mips64obsd_fetch_inferior_registers)
6415 (mips64obsd_store_inferior_registers): Refactor as methods of
6416 mips64_obsd_nat_target.
6417 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6418 add_target.
6419 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6420 nbsd_nat_target.
6421 * nbsd-nat.h: Include "inf-ptrace.h".
6422 (nbsd_nat_target): New class.
6423 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6424 (obsd_wait): Refactor as methods of obsd_nat_target.
6425 (obsd_add_target): Delete.
6426 * obsd-nat.h: Include "inf-ptrace.h".
6427 (obsd_nat_target): New class.
6428 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6429 (the_ppc_fbsd_nat_target): New.
6430 (ppcfbsd_fetch_inferior_registers)
6431 (ppcfbsd_store_inferior_registers): Refactor as methods of
6432 ppc_fbsd_nat_target.
6433 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6434 add_target.
6435 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6436 (the_ppc_nbsd_nat_target): New.
6437 (ppcnbsd_fetch_inferior_registers)
6438 (ppcnbsd_store_inferior_registers): Refactor as methods of
6439 ppc_nbsd_nat_target.
6440 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6441 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6442 (the_ppc_obsd_nat_target): New.
6443 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6444 methods of ppc_obsd_nat_target.
6445 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6446 add_target.
6447 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6448 (the_sh_nbsd_nat_target): New.
6449 (shnbsd_fetch_inferior_registers)
6450 (shnbsd_store_inferior_registers): Refactor as methods of
6451 sh_nbsd_nat_target.
6452 (_initialize_shnbsd_nat): Adjust to C++ification.
6453 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6454 (inf_ptrace_xfer_partial): Delete.
6455 (sparc_xfer_partial, sparc_target): Delete.
6456 * sparc-nat.h (sparc_fetch_inferior_registers)
6457 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6458 (sparc_target): Delete function declaration.
6459 (sparc_target): New template class.
6460 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6461 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6462 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6463 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6464 add_target.
6465 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6466 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6467 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6468 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6469 add_target.
6470 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6471 (the_vax_bsd_nat_target): New.
6472 (vaxbsd_fetch_inferior_registers)
6473 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6474 methods.
6475 (_initialize_vaxbsd_nat): Adjust to C++ification.
6476
6477 * bsd-kvm.c (bsd_kvm_target): New class.
6478 (bsd_kvm_ops): Now a bsd_kvm_target.
6479 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6480 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6481 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6482 bsd_kvm_target.
6483 (bsd_kvm_return_one): Delete.
6484 (bsd_kvm_add_target): Adjust to C++ification.
6485
6486 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6487 (nto_procfs_target_procfs): New classes.
6488 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6489 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6490 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6491 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6492 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6493 (procfs_remove_hw_breakpoint, procfs_resume)
6494 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6495 (procfs_kill_inferior, procfs_store_registers)
6496 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6497 as methods of nto_procfs_target.
6498 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6499 (nto_native_ops): Delete.
6500 (procfs_open, procfs_native_open): Delete.
6501 (nto_native_ops): Now an nto_procfs_target_native.
6502 (init_procfs_targets): Adjust to C++ification.
6503 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6504 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6505 Refactor as methods of nto_procfs_target.
6506
6507 * go32-nat.c (go32_nat_target): New class.
6508 (the_go32_nat_target): New.
6509 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6510 (go32_store_registers, go32_xfer_partial, go32_files_info)
6511 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6512 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6513 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6514 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6515 (go32_target): Delete.
6516 (_initialize_go32_nat): Adjust to C++ification.
6517
6518 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6519 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6520 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6521 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6522 gnu_nat_target.
6523 (gnu_target): Delete.
6524 * gnu-nat.h (gnu_target): Delete.
6525 (gnu_nat_target): New class.
6526 * i386-gnu-nat.c (gnu_base_target): New.
6527 (i386_gnu_nat_target): New class.
6528 (the_i386_gnu_nat_target): New.
6529 (_initialize_i386gnu_nat): Adjust to C++ification.
6530
6531 2018-05-02 Pedro Alves <palves@redhat.com>
6532
6533 * bfd-target.c (target_bfd_xclose): Rename to ...
6534 (target_bfd_close): ... this.
6535 (target_bfd_reopen): Adjust.
6536 * target.c (target_close): Remove references to to_xclose.
6537 * target.h (target_ops::to_xclose): Delete.
6538 (target_ops::to_close): Update comments.
6539
6540 2018-05-02 Pedro Alves <palves@redhat.com>
6541
6542 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6543 "linux-nat.h".
6544 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6545 * inf-ptrace.c (inf_ptrace_register_u_offset)
6546 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6547 (inf_ptrace_store_register, inf_ptrace_store_registers)
6548 (inf_ptrace_trad_target): Move to ...
6549 * linux-nat-trad.c: ... this new file.
6550 * linux-nat-trad.h: New file.
6551 * linux-nat.c (linux_target_install_ops): Make extern.
6552 (linux_trad_target): Delete.
6553 * linux-nat.h (linux_trad_target): Delete declaration.
6554 (linux_target_install_ops): Declare.
6555 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6556 "linux-nat.h".
6557
6558 2018-05-02 Pedro Alves <palves@redhat.com>
6559
6560 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6561 procfs_target/add_target here.
6562 * procfs.c (procfs_target): Make static.
6563 (_initialize_procfs): Call add_target here.
6564 * procfs.h (struct target_ops): Remove forward declaration.
6565 (procfs_target): Remove declaration.
6566 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6567
6568 2018-05-02 Pedro Alves <palves@redhat.com>
6569
6570 * procfs.c (procfs_stopped_by_watchpoint)
6571 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6572 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6573 Forward declare.
6574 (procfs_use_watchpoints): Delete, move contents...
6575 (procfs_target): ... here.
6576 * procfs.h (procfs_use_watchpoints): Delete declaration.
6577 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6578 procfs_use_watchpoints.
6579 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6580 procfs_use_watchpoints.
6581
6582 2018-05-02 Tom Tromey <tom@tromey.com>
6583
6584 PR python/20084:
6585 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6586 and var_zuinteger_unlimited.
6587 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6588 and PARAM_ZUINTEGER_UNLIMITED.
6589 (set_parameter_value): Handle var_zuinteger and
6590 var_zuinteger_unlimited.
6591 (add_setshow_generic): Likewise.
6592 (parmpy_init): Likewise.
6593
6594 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6595
6596 PR rust/23124
6597 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6598 pointer is not null before dereferencing it.
6599
6600 2018-04-30 Tom Tromey <tom@tromey.com>
6601
6602 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6603 is_mi_like_p.
6604
6605 2018-04-30 Tom Tromey <tom@tromey.com>
6606
6607 * breakpoint.c (mention): Remove use of is_mi_like_p.
6608 (print_mention_ranged_breakpoint): Likewise.
6609 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6610 of is_mi_like_p.
6611
6612 2018-04-30 Tom Tromey <tom@tromey.com>
6613
6614 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6615
6616 2018-04-30 Tom Tromey <tom@tromey.com>
6617
6618 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6619 (info_spu_event_command): Remove some uses of is_mi_like_p.
6620
6621 2018-04-30 Tom Tromey <tom@tromey.com>
6622
6623 * python/py-framefilter.c (py_print_single_arg)
6624 (enumerate_locals, py_print_args, py_print_frame): Remove some
6625 uses of is_mi_like_p.
6626
6627 2018-04-30 Tom Tromey <tom@tromey.com>
6628
6629 * ui-out.c: Update.
6630 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6631 * ui-out.h (ui_out::is_mi_like_p): Now const.
6632 (ui_out::do_is_mi_like_p): Now const.
6633 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6634
6635 2018-04-30 Tom Tromey <tom@tromey.com>
6636
6637 * varobj.c (varobj_set_visualizer): Use new_reference.
6638 * python/python.c (gdbpy_decode_line): Use new_reference.
6639 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6640 new_reference.
6641
6642 2018-04-30 Tom Tromey <tom@tromey.com>
6643
6644 * varobj.c (install_new_value): Use new_reference.
6645 * value.h (value_incref): Return void. Swap intro comment with
6646 value_decref.
6647 * value.c (set_value_parent): Use new_reference.
6648 (value_incref): Return void. Update intro comment.
6649 (release_value): Use new_reference.
6650 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6651
6652 2018-04-30 Tom Tromey <tom@tromey.com>
6653
6654 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6655 * gdb_bfd.h (new_bfd_ref): Remove.
6656 (gdb_bfd_open): Update comment.
6657 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6658 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6659 (gdb_bfd_fdopenr): Use new_reference.
6660 * exec.c (exec_file_attach): Use new_reference.
6661
6662 2018-04-30 Tom Tromey <tom@tromey.com>
6663
6664 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6665 method.
6666
6667 2018-04-30 Tom Tromey <tom@tromey.com>
6668
6669 * jit.c (jit_read_code_entry): Use type_align.
6670 * i386-tdep.c (i386_gdbarch_init): Don't call
6671 set_gdbarch_long_long_align_bit.
6672 * gdbarch.sh: Remove long_long_align_bit.
6673 * gdbarch.c, gdbarch.h: Rebuild.
6674 * arc-tdep.c (arc_type_align): New function.
6675 (arc_gdbarch_init): Use arc_type_align. Don't call
6676 set_gdbarch_long_long_align_bit.
6677
6678 2018-04-30 Tom Tromey <tom@tromey.com>
6679
6680 * rust-lang.c (rust_type_alignment): Remove.
6681 (rust_composite_type): Use type_align.
6682
6683 2018-04-30 Tom Tromey <tom@tromey.com>
6684
6685 * NEWS: Mention Type.align.
6686 * python/py-type.c (typy_get_alignof): New function.
6687 (type_object_getset): Add "alignof".
6688
6689 2018-04-30 Tom Tromey <tom@tromey.com>
6690
6691 PR exp/17095:
6692 * NEWS: Update.
6693 * std-operator.def (UNOP_ALIGNOF): New operator.
6694 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6695 New.
6696 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6697 * c-lang.c (c_op_print_tab): Add alignof.
6698 * c-exp.y (ALIGNOF): New token.
6699 (exp): Add "ALIGNOF" production.
6700 (ident_tokens): Add _Alignof and alignof.
6701
6702 2018-04-30 Tom Tromey <tom@tromey.com>
6703
6704 * i386-tdep.c (i386_type_align): New function.
6705 (i386_gdbarch_init): Update.
6706 * gdbarch.sh (type_align): New method.
6707 * gdbarch.c, gdbarch.h: Rebuild.
6708 * arch-utils.h (default_type_align): Declare.
6709 * arch-utils.c (default_type_align): New function.
6710 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6711 (struct type) <align_log2>: New field.
6712 <instance_flags>: Now a bitfield.
6713 (TYPE_RAW_ALIGN): New macro.
6714 (type_align, type_raw_align, set_type_align): Declare.
6715 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6716 functions.
6717 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6718 (get_alignment, maybe_set_alignment): New functions.
6719 (read_structure_type, read_enumeration_type, read_array_type)
6720 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6721 (read_subrange_type, read_base_type): Set type alignment.
6722
6723 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6724
6725 * dwarf2read.c (read_index_from_section): Use bool.
6726
6727 2018-04-29 Fabian Groffen <grobian@gentoo.org>
6728
6729 PR gdb/22950
6730 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6731 with #ifdef.
6732
6733 2018-04-29 John Reiser <jreiser@BitWagon.com>
6734
6735 PR build/22873
6736 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6737 last step, and do it atomically.
6738
6739 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
6740
6741 * compile/compile-c-types.c (convert_int, convert_float):
6742 Update for C FE v1.
6743
6744 2018-04-27 Tom Tromey <tom@tromey.com>
6745
6746 PR rust/22545:
6747 * rust-lang.c (rust_inclusive_range_type_p): New function.
6748 (rust_range): Handle inclusive ranges.
6749 (rust_compute_range): Likewise.
6750 * rust-exp.y (struct rust_op) <inclusive>: New field.
6751 (DOTDOTEQ): New constant.
6752 (range_expr): Add "..=" productions.
6753 (operator_tokens): Add "..=" token.
6754 (ast_range): Add "inclusive" parameter.
6755 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6756 ranges.
6757 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6758 bounds values.
6759 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6760 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6761 Update comments.
6762 * expprint.c (print_subexp_standard): Handle new bounds values.
6763 (dump_subexp_body_standard): Likewise.
6764
6765 2018-04-27 Tom Tromey <tom@tromey.com>
6766
6767 * configure: Rebuild.
6768 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6769 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6770 "OVERRIDE".
6771 (class symbol_needs_eval_context): Likewise.
6772 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6773 (mock_mapped_index::symbol_name_at): Use "override". Remove
6774 "virtual".
6775 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6776 "override".
6777 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6778 * aarch64-tdep.c (instruction_reader::read): Use "override".
6779 (instruction_reader_test::read): Likewise.
6780 * arm-tdep.c (instruction_reader::read): Use "override".
6781 (instruction_reader_thumb::read): Likewise.
6782
6783 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6784
6785 PR remote/9665
6786 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6787 instead of remote_send.
6788 (remote_send): Remove.
6789
6790 2018-04-26 Pedro Alves <palves@redhat.com>
6791
6792 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6793 find_function_start_sal instead of find_pc_line.
6794
6795 2018-04-26 Pedro Alves <palves@redhat.com>
6796
6797 * breakpoint.c (set_breakpoint_location_function): Handle
6798 mst_data_gnu_ifunc.
6799 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6800 * elfread.c (elf_symtab_read): Give data symbols with
6801 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6802 (elf_rel_plt_read): Update comment.
6803 * linespec.c (convert_linespec_to_sals): Handle
6804 mst_data_gnu_ifunc.
6805 (minsym_found): Handle mst_data_gnu_ifunc.
6806 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6807 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6808 * parse.c (find_minsym_type_and_address): Handle
6809 mst_data_gnu_ifunc.
6810 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6811 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6812 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6813 comment.
6814 <mst_data_gnu_ifunc>: New enumerator.
6815
6816 2018-04-26 Pedro Alves <palves@redhat.com>
6817
6818 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6819 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6820 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6821 Handle it.
6822 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6823 (lookup_minimal_symbol_by_pc): Adjust.
6824 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6825 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6826 * minsyms.h (lookup_msym_prefer): New enum.
6827 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6828 parameter by a lookup_msym_prefer parameter.
6829
6830 2018-04-26 Pedro Alves <palves@redhat.com>
6831
6832 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6833 ends in "@plt" instead of looking at the symbol's section.
6834
6835 2018-04-26 Pedro Alves <palves@redhat.com>
6836
6837 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6838 all references.
6839 (find_pc_partial_function_gnu_ifunc): Rename to ...
6840 (find_pc_partial_function): ... this, and remove references to
6841 'is_gnu_ifunc_p'.
6842 (find_pc_partial_function): Delete old implementation.
6843 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6844
6845 2018-04-26 Pedro Alves <palves@redhat.com>
6846
6847 * linespec.c (struct bound_minimal_symbol_search_key): New.
6848 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6849 skip first line if we found a GNU ifunc minimal symbol by name.
6850 (compare_msymbols): Change parameters to work with a destructured
6851 lhs minsym.
6852 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6853 functions.
6854
6855 2018-04-26 Pedro Alves <palves@redhat.com>
6856
6857 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6858 ifunc targets here. Instead, if we have an ifunc minsym, use its
6859 address/name.
6860 (add_location_to_breakpoint): Store the minsym and the objfile in
6861 the breakpoint location.
6862 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6863 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6864 Record the minsym in the sal.
6865 * symtab.h (symtab_and_line) <msymbol>: New field.
6866
6867 2018-04-26 Pedro Alves <palves@redhat.com>
6868
6869 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6870 unless we actually resolved the ifunc.
6871
6872 2018-04-26 Pedro Alves <palves@redhat.com>
6873
6874 * c-exp.y (variable production): Prefer ifunc minsyms over
6875 regular function symbols.
6876 * symtab.c (find_gnu_ifunc): New function.
6877 * minsyms.h (lookup_msym_prefer): New enum.
6878 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6879 parameter by a lookup_msym_prefer parameter.
6880 * symtab.h (find_gnu_ifunc): New declaration.
6881
6882 2018-04-26 Pedro Alves <palves@redhat.com>
6883
6884 * blockframe.c (find_gnu_ifunc_target_type): New function.
6885 (find_function_type): New.
6886 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6887 return a value with a memory address.
6888 (eval_call): For calls to GNU ifunc functions, try to find the
6889 type of the target function from the type that the resolver
6890 returns.
6891 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6892 symbols.
6893 * infcall.c (find_function_return_type): Delete.
6894 (find_function_addr): Add 'function_type' parameter. For calls to
6895 GNU ifunc functions, try to find the type of the target function
6896 from the type that the resolver returns, and return it via
6897 FUNCTION_TYPE.
6898 (call_function_by_hand_dummy): Adjust to use the function type
6899 returned by find_function_addr.
6900 (find_function_addr): Add 'function_type' parameter and move
6901 description here.
6902 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6903 declarations.
6904
6905 2018-04-26 Pedro Alves <palves@redhat.com>
6906
6907 * c-exp.y (variable production): Skip finding an alias for ifunc
6908 symbols.
6909
6910 2018-04-26 Pedro Alves <palves@redhat.com>
6911
6912 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6913
6914 2018-04-25 Pedro Alves <palves@redhat.com>
6915
6916 * infcmd.c (kill_command): Print the pid as string, not the whole
6917 thread's ptid. Add comment. s/has been killed/killed/ in output
6918 message.
6919 * remote.c (remote_detach_1): Print the pid as string, not the
6920 whole thread's ptid.
6921
6922 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6923 Sergio Durigan Junior <sergiodj@redhat.com>
6924 Pedro Alves <palves@redhat.com>
6925
6926 * infcmd.c (kill_command): Print message when inferior has
6927 been killed.
6928 * inferior.c (print_inferior_events): Remove 'static'. Set as
6929 '1'.
6930 (add_inferior): Improve message printed when
6931 'print_inferior_events' is on.
6932 (exit_inferior): Remove message printed when
6933 'print_inferior_events' is on.
6934 (detach_inferior): Improve message printed when
6935 'print_inferior_events' is on.
6936 (initialize_inferiors): Use 'add_inferior_silent' to set
6937 'current_inferior_'.
6938 * inferior.h (print_inferior_events): Declare here as
6939 'extern'.
6940 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6941 '[Detaching...]' messages when 'print_inferior_events' is on.
6942 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6943 as prefix/suffix for messages. Remove periods. Fix erroneous
6944 'Detaching after fork from child...', replace it by '... from
6945 parent...'.
6946 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6947 prefix/suffix when printing 'Detaching...' messages. Print
6948 them when 'print_inferior_events' is on.
6949 * remote.c (remote_detach_1): Print message when detaching
6950 from inferior and '!is_fork_parent'.
6951
6952 2018-04-24 Tom Tromey <tom@tromey.com>
6953
6954 * cli-out.h: Reindent.
6955
6956 2018-04-24 Tom Tromey <tom@tromey.com>
6957
6958 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6959 (cli_ui_out::do_field_string): Use fputs_filtered.
6960 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6961
6962 2018-04-23 Tom Tromey <tom@tromey.com>
6963
6964 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6965 gdb::unique_xmalloc_ptr.
6966
6967 2018-04-23 Tom Tromey <tom@tromey.com>
6968
6969 * configure: Rebuild.
6970
6971 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6972
6973 PR gdb/23095
6974 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6975 prepare_for_testing. Set normal_bp to r_debug_state if target
6976 is bsd.
6977
6978 2018-04-21 Pedro Alves <palves@redhat.com>
6979 Rajendra SY <rajendra.sy@gmail.com>
6980
6981 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6982 * remote.c (extended_remote_attach): In all-stop mode, mark the
6983 thread as executing.
6984
6985 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6986
6987 * thread.c (thread_apply_all_command): Fix comment.
6988 (thread_command): Fix comment.
6989
6990 2018-04-10 Alan Hayward <alan.hayward@arm.com>
6991
6992 * common/tdesc.h (tdesc_create_feature): Remove xml filename
6993 parameter.
6994 * features/aarch64-core.c (create_feature_aarch64_core):
6995 Regenerate.
6996 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
6997 Likewise.
6998 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
6999 Likewise.
7000 * features/i386/32bit-avx512.c
7001 (create_feature_i386_32bit_avx512): Likewise.
7002 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7003 Likewise.
7004 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7005 Likewise.
7006 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7007 Likewise.
7008 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7009 Likewise.
7010 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7011 Likewise.
7012 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7013 Likewise.
7014 * features/i386/64bit-avx512.c
7015 (create_feature_i386_64bit_avx512): Likewise.
7016 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7017 Likewise.
7018 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7019 Likewise.
7020 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7021 Likewise.
7022 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7023 Likewise.
7024 * features/i386/64bit-segments.c
7025 (create_feature_i386_64bit_segments): Likewise.
7026 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7027 Likewise.
7028 * features/i386/x32-core.c
7029 (create_feature_i386_x32_core): Likewise.
7030 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7031 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7032 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7033 * target-descriptions.c: In generated code, don't pass xml
7034 filename.
7035
7036 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7037
7038 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7039 (print_xml_feature::visit_post): Likewise.
7040 (print_xml_feature::visit): Likewise.
7041 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7042 (print_xml_feature): Add new class.
7043 * regformats/regdat.sh: Null xmltarget on feature targets.
7044 * target-descriptions.c (struct target_desc): Add xmltarget.
7045 (maintenance_check_tdesc_xml_convert): Add unittest function.
7046 (tdesc_get_features_xml): Add function to get xml.
7047 (maintenance_check_xml_descriptions): Test xml generation.
7048 * xml-tdesc.c (string_read_description_xml): Add function.
7049 * xml-tdesc.h (string_read_description_xml): Add declaration.
7050
7051 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7052
7053 * features/Makefile: Add feature marker to targets with new style
7054 target descriptions.
7055 * regformats/aarch64.dat: Regenerate.
7056 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7057 * regformats/i386/amd64-avx-linux.dat: Likewise.
7058 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7059 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7060 * regformats/i386/amd64-linux.dat: Likewise.
7061 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7062 * regformats/i386/amd64.dat: Likewise.
7063 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7064 * regformats/i386/i386-avx-linux.dat: Likewise.
7065 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7066 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7067 * regformats/i386/i386-linux.dat: Likewise.
7068 * regformats/i386/i386-mmx-linux.dat: Likewise.
7069 * regformats/i386/i386-mpx-linux.dat: Likewise.
7070 * regformats/i386/i386.dat: Likewise.
7071 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7072 * regformats/i386/x32-avx-linux.dat: Likewise.
7073 * regformats/i386/x32-linux.dat: Likewise.
7074 * regformats/tic6x-c62x-linux.dat: Likewise.
7075 * regformats/tic6x-c64x-linux.dat: Likewise.
7076 * regformats/tic6x-c64xp-linux.dat: Likewise.
7077 * regformats/regdat.sh: Parse feature marker.
7078
7079 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7080
7081 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7082 (tdesc_osabi_name): Likewise.
7083 * target-descriptions.c (tdesc_architecture_name): Add new
7084 function.
7085 (tdesc_osabi_name): Likewise.
7086
7087 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7088
7089 * common/tdesc.c (tdesc_predefined_type): Move to here.
7090 (tdesc_named_type): Likewise.
7091 (tdesc_create_vector): Likewise.
7092 (tdesc_create_struct): Likewise.
7093 (tdesc_set_struct_size): Likewise.
7094 (tdesc_create_union): Likewise.
7095 (tdesc_create_flags): Likewise.
7096 (tdesc_create_enum): Likewise.
7097 (tdesc_add_field): Likewise.
7098 (tdesc_add_typed_bitfield): Likewise.
7099 (tdesc_add_bitfield): Likewise.
7100 (tdesc_add_flag): Likewise.
7101 (tdesc_add_enum_value): Likewise.
7102 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7103 (struct tdesc_type_vector): Likewise.
7104 (struct tdesc_type_field): Likewise.
7105 (struct tdesc_type_with_fields): Likewise.
7106 (tdesc_create_enum): Add declaration.
7107 (tdesc_add_typed_bitfield): Likewise.
7108 (tdesc_add_enum_value): Likewise.
7109 * target-descriptions.c (tdesc_type_field): Move from here.
7110 (tdesc_type_builtin): Likewise.
7111 (tdesc_type_vector): Likewise.
7112 (tdesc_type_with_fields): Likewise.
7113 (tdesc_predefined_types): Likewise.
7114 (tdesc_named_type): Likewise.
7115 (tdesc_create_vector): Likewise.
7116 (tdesc_create_struct): Likewise.
7117 (tdesc_set_struct_size): Likewise.
7118 (tdesc_create_union): Likewise.
7119 (tdesc_create_flags): Likewise.
7120 (tdesc_create_enum): Likewise.
7121 (tdesc_add_field): Likewise.
7122 (tdesc_add_typed_bitfield): Likewise.
7123 (tdesc_add_bitfield): Likewise.
7124 (tdesc_add_flag): Likewise.
7125 (tdesc_add_enum_value): Likewise.
7126 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7127 (tdesc_add_typed_bitfield): Likewise.
7128 (tdesc_add_enum_value): Likewise.
7129
7130 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7131
7132 * common/tdesc.c (tdesc_feature::accept): Move to here.
7133 (tdesc_feature::operator==): Likewise.
7134 (tdesc_create_reg): Likewise.
7135 * common/tdesc.h (tdesc_type_kind): Likewise.
7136 (struct tdesc_type): Likewise.
7137 (struct tdesc_feature): Likewise.
7138 * regformats/regdat.sh: Create a feature.
7139 * target-descriptions.c (tdesc_type_kind): Move from here.
7140 (tdesc_type): Likewise.
7141 (tdesc_type_up): Likewise.
7142 (tdesc_feature): Likewise.
7143 (tdesc_create_reg): Likewise.
7144
7145 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7146
7147 * Makefile.in: Add arch/tdesc.c
7148 * common/tdesc.c: New file.
7149 * common/tdesc.h (tdesc_element_visitor): Move to here.
7150 (tdesc_element): Likewise.
7151 (tdesc_reg): Likewise.
7152 (tdesc_reg_up): Likewise.
7153 * regformats/regdef.h (reg): Add offset to constructors.
7154 * target-descriptions.c (tdesc_element_visitor): Move from here.
7155 (tdesc_element): Likewise.
7156 (tdesc_reg): Likewise.
7157 (tdesc_reg_up): Likewise.
7158
7159 2018-04-17 Tom Tromey <tom@tromey.com>
7160
7161 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7162 discriminant field.
7163
7164 2018-04-17 Tom Tromey <tom@tromey.com>
7165
7166 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7167
7168 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7169
7170 * symtab.c (print_symbol_info): Skip printing filename and line
7171 number when `last' is NULL.
7172 (symtab_symbol_info): Use empty string instead of NULL for first
7173 invocation of print_symbol_info.
7174 (rbreak_command): Pass NULL to `last' parameter of
7175 print_symbol_info.
7176
7177 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7178
7179 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7180 instead of nullptr.
7181
7182 2018-04-16 Pedro Alves <palves@redhat.com>
7183
7184 * MAINTAINERS (sh): Remove.
7185 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7186 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7187 (ALLDEPFILES): Remove sh64-tdep.c.
7188 * NEWS: Mentions that support for SH-5/SH64 is removed.
7189 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7190 (sh*-*-openbsd*): Ditto.
7191 (sh64-*-elf*): Remove.
7192 (sh*): Remove.
7193 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7194 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7195 * sh-tdep.c: No longer include "sh64-tdep.h".
7196 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7197 * sh64-tdep.c, sh64-tdep.h: Remove files.
7198
7199 2018-04-16 Pedro Alves <palves@redhat.com>
7200
7201 * MAINTAINERS: Remove m88k.
7202 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7203 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7204 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7205 * NEWS: Mention that support for m88k was removed.
7206 * configure.host (m88*-*-*): Remove support.
7207 * configure.nat (m88k-*-*): Remove support.
7208 * configure.tgt (m88*-*-openbsd*): Remove.
7209 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7210
7211 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7212
7213 * configure.tgt (x86_tobjs): New variable.
7214 (amd64_tobjs, i386_tobjs): Use it.
7215
7216 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7217
7218 * symtab.c (print_symbol_info): Precede the symbol definition by
7219 the line number when available.
7220 * NEWS: Advertise this enhancement.
7221
7222 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7223
7224 * NEWS (New options): announce set/show record btrace cpu.
7225 * btrace.c: Include record-btrace.h.
7226 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7227 the vendor is unknown.
7228 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7229 Maybe overwrite the btrace configuration's cpu.
7230 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7231 (btrace_fetch): Add cpu parameter. Update callers.
7232 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7233 Maybe overwrite the btrace configuration's cpu. Skip enabling
7234 errata workarounds if the vendor is unknown.
7235 * python/py-record-btrace.c: Include record-btrace.h.
7236 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7237 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7238 * record-btrace.c (record_btrace_cpu_state_kind): New.
7239 (record_btrace_cpu): New.
7240 (set_record_btrace_cpu_cmdlist): New.
7241 (record_btrace_get_cpu): New.
7242 (require_btrace_thread, record_btrace_info)
7243 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7244 (cmd_set_record_btrace_cpu_none): New.
7245 (cmd_set_record_btrace_cpu_auto): New.
7246 (cmd_set_record_btrace_cpu): New.
7247 (cmd_show_record_btrace_cpu): New.
7248 (_initialize_record_btrace): Initialize set/show record btrace cpu
7249 commands.
7250 * record-btrace.h (record_btrace_get_cpu): New.
7251
7252 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7253
7254 * record.c (set_record_command): Fix typo in message.
7255
7256 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7257
7258 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7259
7260 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7261
7262 * infrun.c (process_event_stop_test): Call
7263 gdbarch_in_indirect_branch_thunk.
7264 * gdbarch.sh (in_indirect_branch_thunk): New.
7265 * gdbarch.c: Regenerated.
7266 * gdbarch.h: Regenerated.
7267 * x86-tdep.h: New.
7268 * x86-tdep.c: New.
7269 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7270 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7271 (ALLDEPFILES): Add x86-tdep.c.
7272 * arch-utils.h (default_in_indirect_branch_thunk): New.
7273 * arch-utils.c (default_in_indirect_branch_thunk): New.
7274 * i386-tdep: Include x86-tdep.h.
7275 (i386_in_indirect_branch_thunk): New.
7276 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7277 function.
7278 * amd64-tdep: Include x86-tdep.h.
7279 (amd64_in_indirect_branch_thunk): New.
7280 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7281
7282 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7283
7284 PR gdb/23053
7285 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7286 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7287 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7288 regression.
7289
7290 2018-04-12 Tom Tromey <tom@tromey.com>
7291
7292 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7293 (rust_evaluate_subexp): Likewise.
7294
7295 2018-04-12 Pedro Alves <palves@redhat.com>
7296
7297 * procfs.c (procfs_detach): Make forward declaration's prototype
7298 match definition's protototype.
7299 (proc_get_LDT_entry): Remove stale do_cleanups call.
7300
7301 2018-04-12 Pedro Alves <palves@redhat.com>
7302
7303 * target.h (target_ops::to_has_exited): Delete.
7304 (target_has_exited): Delete.
7305 * target-delegates.c: Regenerate.
7306
7307 2018-04-11 Pedro Alves <palves@redhat.com>
7308
7309 * target.c (fileio_fh_t::t): Add comment.
7310 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7311 (target_fileio_close): Handle a NULL target.
7312 (invalidate_fileio_fh): New.
7313 (target_close): Call it.
7314 * remote.c (remote_hostio_send_command): No longer check whether
7315 remote_desc is open.
7316
7317 2018-04-11 Pedro Alves <palves@redhat.com>
7318
7319 * target.c (fileio_fh_t): Make it a named struct instead of a
7320 typedef.
7321 (fileio_fh_t::is_closed): New method.
7322 (DEF_VEC_O (fileio_fh_t)): Remove.
7323 (fileio_fhandles): Now a std::vector.
7324 (is_closed_fileio_fh): Delete.
7325 (acquire_fileio_fd): Adjust. Rename parameters.
7326 (release_fileio_fd): Adjust.
7327 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7328 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7329 (target_fileio_close): Adjust.
7330
7331 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7332
7333 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7334 index.
7335
7336 2018-04-10 Pedro Alves <palves@redhat.com>
7337
7338 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7339 (scoped_finish_thread_state): New class.
7340 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7341 cleanup.
7342 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7343 (fetch_inferior_event, normal_stop): Likewise.
7344 * thread.c (finish_thread_state_cleanup): Delete.
7345
7346 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7347 Pedro Alves <palves@redhat.com>
7348
7349 * value.c: Include "selftest.h" and "common/array-view.h".
7350 (struct range) <operator ==>: New.
7351 (test_ranges_contain): New.
7352 (check_ranges_vector): New.
7353 (test_insert_into_bit_range_vector): New.
7354 (_initialize_values): Register selftests.
7355 * common/array-view.h (operator==, operator!=): New.
7356
7357 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7358
7359 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7360 an iterator.
7361 * inline-frame.c: Include <algorithm>.
7362 (struct inline_state): Add constructor.
7363 (inline_state_s): Remove.
7364 (DEF_VEC_O(inline_state_s)): Remove.
7365 (inline_states): Change type to std::vector.
7366 (find_inline_frame_state): Adjust to std::vector.
7367 (allocate_inline_frame_state): Remove.
7368 (clear_inline_frame_state): Adjust to std::vector.
7369 (skip_inline_frames): Adjust to std::vector.
7370
7371 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7372
7373 * tracepoint.h (struct trace_state_variable): Add constructor.
7374 <name>: Change type to std::string.
7375 * tracepoint.c (tsv_s): Remove.
7376 (DEF_VEC_O(tsv_s)): Remove.
7377 (tvariables): Change to std::vector.
7378 (create_trace_state_variable): Adjust to std::vector.
7379 (find_trace_state_variable): Likewise.
7380 (find_trace_state_variable_by_number): Likewise.
7381 (delete_trace_state_variable): Likewise.
7382 (trace_variable_command): Adjust to std::string.
7383 (delete_trace_variable_command): Likewise.
7384 (tvariables_info_1): Adjust to std::vector.
7385 (save_trace_state_variables): Likewise.
7386 (start_tracing): Likewise.
7387 (merge_uploaded_trace_state_variables): Adjust to std::vector
7388 and std::string.
7389 * target.h (struct target_ops)
7390 <to_download_trace_state_variable>: Pass reference to
7391 trace_state_variable.
7392 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7393 * target-delegates.c: Re-generate.
7394 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7395 (mi_tsv_deleted): Likewise.
7396 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7397 * remote.c (remote_download_trace_state_variable): Change
7398 pointer to reference and adjust.
7399 * make-target-delegates (parse_argtypes): Handle references.
7400 (write_function_header): Likewise.
7401 (munge_type): Likewise.
7402
7403 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7404
7405 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7406 string_view-selftests.c.
7407 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7408 testsuite.
7409 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7410 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7411 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7412 * unittests/basic_string_view/element_access/char/1.cc:
7413 Likewise.
7414 * unittests/basic_string_view/element_access/char/empty.cc:
7415 Likewise.
7416 * unittests/basic_string_view/element_access/char/front_back.cc:
7417 Likewise.
7418 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7419 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7420 Likewise.
7421 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7422 Likewise.
7423 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7424 Likewise.
7425 * unittests/basic_string_view/operations/compare/char/1.cc:
7426 Likewise.
7427 * unittests/basic_string_view/operations/compare/char/13650.cc:
7428 Likewise.
7429 * unittests/basic_string_view/operations/copy/char/1.cc:
7430 Likewise.
7431 * unittests/basic_string_view/operations/data/char/1.cc:
7432 Likewise.
7433 * unittests/basic_string_view/operations/find/char/1.cc:
7434 Likewise.
7435 * unittests/basic_string_view/operations/find/char/2.cc:
7436 Likewise.
7437 * unittests/basic_string_view/operations/find/char/3.cc:
7438 Likewise.
7439 * unittests/basic_string_view/operations/find/char/4.cc:
7440 Likewise.
7441 * unittests/basic_string_view/operations/rfind/char/1.cc:
7442 Likewise.
7443 * unittests/basic_string_view/operations/rfind/char/2.cc:
7444 Likewise.
7445 * unittests/basic_string_view/operations/rfind/char/3.cc:
7446 Likewise.
7447 * unittests/basic_string_view/operations/substr/char/1.cc:
7448 Likewise.
7449 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7450 * unittests/string_view-selftests.c: New file.
7451
7452 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7453
7454 * unittests/basic_string_view/capacity/1.cc: New file.
7455 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7456 * unittests/basic_string_view/cons/char/1.cc: New file.
7457 * unittests/basic_string_view/cons/char/2.cc: New file.
7458 * unittests/basic_string_view/cons/char/3.cc: New file.
7459 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7460 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7461 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7462 * unittests/basic_string_view/element_access/char/1.cc: New file.
7463 * unittests/basic_string_view/element_access/char/2.cc: New file.
7464 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7465 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7466 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7467 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7468 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7469 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7470 * unittests/basic_string_view/include.cc: New file.
7471 * unittests/basic_string_view/inserters/char/1.cc: New file.
7472 * unittests/basic_string_view/inserters/char/2.cc: New file.
7473 * unittests/basic_string_view/inserters/char/3.cc: New file.
7474 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7475 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7476 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7477 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7478 * unittests/basic_string_view/literals/types.cc: New file.
7479 * unittests/basic_string_view/literals/values.cc: New file.
7480 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7481 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7482 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7483 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7484 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7485 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7486 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7487 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7488 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7489 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7490 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7491 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7492 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7493 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7494 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7495 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7496 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7497 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7498 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7499 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7500 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7501 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7502 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7503 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7504 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7505 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7506 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7507 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7508 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7509 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7510 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7511 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7512 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7513 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7514 * unittests/basic_string_view/operators/char/2.cc: New file.
7515 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7516 * unittests/basic_string_view/range_access/char/1.cc: New file.
7517 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7518 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7519 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7520 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7521 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7522 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7523 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7524 * unittests/basic_string_view/typedefs.cc: New file.
7525 * unittests/basic_string_view/types/1.cc: New file.
7526
7527 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7528
7529 * common/gdb_string_view.h: Remove libstdc++ implementation
7530 details, adjust to gdb reality.
7531 * common/gdb_string_view.tcc: Likewise.
7532 * cli/cli-script.c (struct string_view): Remove.
7533 (user_args) <m_args>: Change element type to gdb::string_view.
7534 (user_args::insert_args): Adjust.
7535
7536 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7537
7538 * common/gdb_string_view.h: New file.
7539 * common/gdb_string_view.tcc: New file.
7540
7541 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7542
7543 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7544 * configure: Re-generate.
7545
7546 2018-04-09 Pedro Alves <palves@redhat.com>
7547
7548 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7549 (set_target_gdbarch): Call
7550 gdb::observers::architecture_changed.notify instead of
7551 observer_notify_architecture_changed.
7552
7553 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7554
7555 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7556 (do_restore_current_traceframe_cleanup): Remove.
7557 (restore_current_traceframe_cleanup_dtor): Remove.
7558 (make_cleanup_restore_current_traceframe): Remove.
7559 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7560 New.
7561 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7562 * infrun.c (fetch_inferior_event): Use
7563 scoped_restore_current_traceframe.
7564
7565 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7566
7567 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7568 Remove.
7569 <n_allocated_type_units>: Remove.
7570 <all_type_units>: Change to std::vector.
7571 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7572 to std::vector change.
7573 (dwarf2_per_objfile::get_cutu): Likewise.
7574 (dwarf2_per_objfile::get_tu): Likewise.
7575 (create_signatured_type_table_from_index): Likewise.
7576 (create_signatured_type_table_from_debug_names): Likewise.
7577 (dw2_symtab_iter_next): Likewise.
7578 (dw2_print_stats): Likewise.
7579 (dw2_expand_all_symtabs): Likewise.
7580 (dw2_expand_marked_cus): Likewise.
7581 (dw2_debug_names_iterator::next): Likewise.
7582 (dwarf2_initialize_objfile): Likewise.
7583 (add_signatured_type_cu_to_table): Likewise.
7584 (create_all_type_units): Likewise.
7585 (add_type_unit): Likewise.
7586 (struct tu_abbrev_offset): Add constructor.
7587 (build_type_psymtabs_1): Adjust to std::vector change.
7588 (print_tu_stats): Likewise.
7589 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7590 (write_debug_names): Likewise.
7591
7592 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7593
7594 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7595 Make an std::vector.
7596 <n_comp_units>: Remove.
7597 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7598 to std::vector change.
7599 (dwarf2_per_objfile::get_cutu): Likewise.
7600 (dwarf2_per_objfile::get_cu): Likewise.
7601 (create_cus_from_index): Likewise.
7602 (create_addrmap_from_index): Likewise.
7603 (create_addrmap_from_aranges): Likewise.
7604 (dwarf2_read_index): Likewise.
7605 (dw2_find_last_source_symtab): Likewise.
7606 (dw2_map_symtabs_matching_filename): Likewise.
7607 (dw2_symtab_iter_next): Likewise.
7608 (dw2_print_stats): Likewise.
7609 (dw2_expand_all_symtabs): Likewise.
7610 (dw2_expand_symtabs_with_fullname): Likewise.
7611 (dw2_expand_marked_cus): Likewise.
7612 (dw2_map_symbol_filenames): Likewise.
7613 (create_cus_from_debug_names): Likewise.
7614 (dwarf2_read_debug_names): Likewise.
7615 (dw2_debug_names_iterator::next): Likewise.
7616 (dwarf2_initialize_objfile): Likewise.
7617 (set_partial_user): Likewise.
7618 (dwarf2_build_psymtabs_hard): Likewise.
7619 (read_comp_units_from_section): Remove arguments, adjust to
7620 std::vector change.
7621 (create_all_comp_units): Adjust to std::vector and
7622 read_comp_units_from_section changes.
7623 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7624 change.
7625 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7626 (psyms_seen_size): Likewise.
7627 (write_gdbindex): Likewise.
7628 (write_debug_names): Likewise.
7629
7630 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7631
7632 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7633 with dwarf2_per_objfile.
7634 (create_cus_from_index): Likewise.
7635 (create_signatured_type_table_from_index): Likewise.
7636 (dwarf2_read_index): Likewise.
7637 (dwarf2_initialize_objfile): Likewise.
7638 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7639 per_cu rather than get_dwarf2_per_objfile.
7640
7641 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7642
7643 * dwarf2read.h (struct signatured_type): Forward declare.
7644 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7645 New methods.
7646 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7647 (dw2_get_cutu): ...this.
7648 (dwarf2_per_objfile::get_cu): Rename from...
7649 (dw2_get_cu): ...this.
7650 (dwarf2_per_objfile::get_tu): New.
7651 (create_addrmap_from_index): Adjust.
7652 (create_addrmap_from_aranges): Adjust.
7653 (dw2_find_last_source_symtab): Adjust.
7654 (dw2_map_symtabs_matching_filename): Adjust.
7655 (dw2_symtab_iter_next): Adjust.
7656 (dw2_print_stats): Adjust.
7657 (dw2_expand_all_symtabs): Adjust.
7658 (dw2_expand_symtabs_with_fullname): Adjust.
7659 (dw2_expand_marked_cus): Adjust.
7660 (dw_expand_symtabs_matching_file_matcher): Adjust.
7661 (dw2_map_symbol_filenames): Adjust.
7662 (dw2_debug_names_iterator::next): Adjust.
7663 (dwarf2_initialize_objfile): Adjust.
7664 (set_partial_user): Adjust.
7665 (dwarf2_build_psymtabs_hard): Adjust.
7666
7667 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7668
7669 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7670 Remove unused variables.
7671 (dw2_map_symtabs_matching_filename): Likewise.
7672 (dwarf2_record_block_ranges): Likewise.
7673 (dwarf2_read_addr_index): Likewise.
7674 (follow_die_offset): Likewise.
7675
7676 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7677
7678 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7679 to symbol_file_add_main.
7680
7681 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7682
7683 PR mi/22299
7684 * mi/mi-console.c (do_fputc_async_safe): New.
7685 (mi_console_file::write_async_safe): New.
7686 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7687 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7688 New.
7689 * ui-file.c (ui_file::putstrn): Adjust call to
7690 fputstrn_unfiltered.
7691 * utils.c (printchar): Replace do_fputs and do_fprintf
7692 parameters by do_fputc.
7693 (fputstr_filtered): Adjust call to printchar.
7694 (fputstr_unfiltered): Likewise.
7695 (fputstrn_filtered): Likewise.
7696 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7697 printchar.
7698 * utils.h (do_fputc_ftype): New typedef.
7699 (fputstrn_unfiltered): Add do_fputc parameter.
7700
7701 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7702
7703 * regformats/i386/i386-avx.dat: Remove.
7704
7705 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7706
7707 PR gdb/22979
7708 * amd64-tdep.c (amd64_none_init_abi): New function.
7709 (amd64_x32_none_init_abi): New function.
7710 (_initialize_amd64_tdep): Register handlers for x86-64 and
7711 x64_32 with GDB_OSABI_NONE.
7712 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7713 GDB_OSABI_NONE osabi.
7714
7715 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7716
7717 PR gdb/22980
7718 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7719 GDB_OSABI_NONE.
7720 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7721 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7722
7723 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7724
7725 * common/byte-vector.h (char_vector): New type.
7726 * target.h (target_read_alloc): Return
7727 gdb::optional<byte_vector>.
7728 (target_read_stralloc): Return gdb::optional<char_vector>.
7729 (target_get_osdata): Return gdb::optional<char_vector>.
7730 * target.c (target_read_alloc_1): Templatize. Replacement
7731 manual memory management with vector.
7732 (target_read_alloc): Change return type, adjust.
7733 (target_read_stralloc): Change return type, adjust.
7734 (target_get_osdata): Change return type, adjust.
7735 * auxv.c (struct auxv_info) <length>: Remove.
7736 <data>: Change type to gdb::optional<byte_vector>.
7737 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7738 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7739 (target_auxv_search): Adjust.
7740 (fprint_target_auxv): Adjust.
7741 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7742 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7743 (linux_make_corefile_notes): Adjust.
7744 * osdata.c (get_osdata): Adjust.
7745 * remote.c (remote_get_threads_with_qxfer): Adjust.
7746 (remote_memory_map): Adjust.
7747 (remote_traceframe_info): Adjust.
7748 (btrace_read_config): Adjust.
7749 (remote_read_btrace): Adjust.
7750 (remote_pid_to_exec_file): Adjust.
7751 * solib-aix.c (solib_aix_get_library_list): Adjust.
7752 * solib-dsbt.c (decode_loadmap): Don't free buf.
7753 (dsbt_get_initial_loadmaps): Adjust.
7754 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7755 * solib-target.c (solib_target_current_sos): Adjust.
7756 * tracepoint.c (sdata_make_value): Adjust.
7757 * xml-support.c (xinclude_start_include): Adjust.
7758 (xml_fetch_content_from_file): Adjust.
7759 * xml-support.h (xml_fetch_another): Change return type.
7760 (xml_fetch_content_from_file): Change return type.
7761 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7762 * xml-tdesc.c (file_read_description_xml): Adjust.
7763 (fetch_available_features_from_target): Change return type.
7764 (target_fetch_description_xml): Adjust.
7765 (target_read_description_xml): Adjust.
7766
7767 2018-04-06 Tom Tromey <tom@tromey.com>
7768
7769 * value.c (~value): Update.
7770 (struct value) <contents>: Now unique_xmalloc_ptr.
7771 (value_contents_bits_eq, allocate_value_contents)
7772 (value_contents_raw, value_contents_all_raw)
7773 (value_contents_for_printing, value_contents_for_printing_const)
7774 (set_value_enclosing_type): Update.
7775
7776 2018-04-06 Tom Tromey <tom@tromey.com>
7777
7778 * value.c (range_s): Remove typedef, VEC.
7779 (struct range): Add operator<.
7780 (range_lessthan): Remove.
7781 (ranges_contain): Change type.
7782 (~value): Update.
7783 (struct value) <unavailable, optimized_out>: Now std::vector.
7784 (value_entirely_available)
7785 (value_entirely_covered_by_range_vector)
7786 (value_entirely_unavailable, value_entirely_optimized_out):
7787 Update.
7788 (insert_into_bit_range_vector): Change argument type.
7789 (find_first_range_overlap): Likewise.
7790 (struct ranges_and_idx, value_contents_bits_eq)
7791 (require_not_optimized_out, require_available): Update.
7792 (ranges_copy_adjusted): Change argument types.
7793 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7794
7795 2018-04-06 Tom Tromey <tom@tromey.com>
7796
7797 * value.c (~value): Update.
7798 (struct value) <parent>: Now a value_ref_ptr.
7799 (value_parent, set_value_parent, value_address, value_copy):
7800 Update.
7801
7802 2018-04-06 Tom Tromey <tom@tromey.com>
7803
7804 * value.c (struct value): Add constructor, destructor, and member
7805 initializers.
7806 (allocate_value_lazy, value_decref): Update.
7807
7808 2018-04-06 Tom Tromey <tom@tromey.com>
7809
7810 * value.c (struct value) <released, next>: Remove.
7811 (all_values): Now a std::vector.
7812 (allocate_value_lazy): Update.
7813 (value_next): Remove.
7814 (value_mark, value_free_to_mark, release_value)
7815 (value_release_to_mark): Update.
7816
7817 2018-04-06 Tom Tromey <tom@tromey.com>
7818
7819 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7820 (free_value_chain): Remove.
7821 * value.c (free_value_chain): Remove.
7822 (value_release_to_mark): Return a std::vector.
7823 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7824 std::vector.
7825 (check_condition): Update.
7826 * eval.c (fetch_subexp_value): Change "val_chain" to a
7827 std::vector.
7828 * breakpoint.c (update_watchpoint): Update.
7829 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7830
7831 2018-04-06 Tom Tromey <tom@tromey.com>
7832
7833 * value.h (free_all_values): Remove.
7834 * value.c (free_all_values): Remove.
7835
7836 2018-04-06 Tom Tromey <tom@tromey.com>
7837
7838 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7839 (value_history_chain, value_history_count): Remove.
7840 (value_history): New global.
7841 (record_latest_value, access_value_history, show_values)
7842 (preserve_values): Update.
7843
7844 2018-04-06 Tom Tromey <tom@tromey.com>
7845
7846 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7847 * varobj.c (varobj_set_display_format, varobj_set_value)
7848 (install_default_visualizer, construct_visualizer)
7849 (install_new_value, ~varobj, varobj_get_value_type)
7850 (my_value_of_variable, varobj_editable_p): Update.
7851 * c-varobj.c (c_describe_child, c_value_of_variable)
7852 (cplus_number_of_children, cplus_describe_child): Update.
7853 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7854 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7855 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7856
7857 2018-04-06 Tom Tromey <tom@tromey.com>
7858
7859 * printcmd.c (last_examine_address): Change type to
7860 value_ref_ptr.
7861 (do_examine, x_command): Update.
7862
7863 2018-04-06 Tom Tromey <tom@tromey.com>
7864
7865 * value.c (release_value): Update.
7866 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7867 (struct bpstats) <val>: Now a value_ref_ptr.
7868 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7869 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7870 (~watchpoint, print_it_watchpoint, watch_command_1)
7871 (invalidate_bp_value_on_memory_change): Update.
7872
7873 2018-04-06 Tom Tromey <tom@tromey.com>
7874
7875 * varobj.c (varobj_clear_saved_item)
7876 (update_dynamic_varobj_children, install_new_value, ~varobj):
7877 Update.
7878 * value.h (value_incref): Move declaration earlier.
7879 (value_decref): Rename from value_free.
7880 (struct value_ref_policy): New.
7881 (value_ref_ptr): New typedef.
7882 (struct value_deleter): Remove.
7883 (gdb_value_up): Remove typedef.
7884 (release_value): Change return type.
7885 (release_value_or_incref): Remove.
7886 * value.c (set_value_parent): Update.
7887 (value_incref): Change return type.
7888 (value_decref): Rename from value_free.
7889 (value_free_to_mark, free_all_values, free_value_chain): Update.
7890 (release_value): Return value_ref_ptr.
7891 (release_value_or_incref): Remove.
7892 (record_latest_value, set_internalvar, clear_internalvar):
7893 Update.
7894 * stack.c (info_frame_command): Don't call value_free.
7895 * python/py-value.c (valpy_dealloc, valpy_new)
7896 (value_to_value_object): Update.
7897 * printcmd.c (do_examine): Update.
7898 * opencl-lang.c (lval_func_free_closure): Update.
7899 * mi/mi-main.c (register_changed_p): Don't call value_free.
7900 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7901 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7902 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7903 value_free.
7904 * guile/scm-value.c (vlscm_free_value_smob)
7905 (vlscm_scm_from_value): Update.
7906 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7907 (frame_unwind_register_unsigned, get_frame_register_bytes)
7908 (put_frame_register_bytes): Don't call value_free.
7909 * findvar.c (address_from_register): Don't call value_free.
7910 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7911 * dwarf2loc.c (entry_data_value_free_closure)
7912 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7913 (dwarf2_evaluate_loc_desc_full): Update.
7914 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7915 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7916 (~watchpoint, watch_command_1)
7917 (invalidate_bp_value_on_memory_change): Update.
7918 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7919
7920 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7921
7922 PR gdb/23022
7923 * warning.m4: Add -Wno-error=deprecated-register.
7924 * configure: Re-generate.
7925
7926 2018-04-05 Tom Tromey <tom@tromey.com>
7927
7928 * linespec.h: Remove include of "vec.h".
7929
7930 2018-04-05 Tom Tromey <tom@tromey.com>
7931
7932 * linespec.c (typep): Remove typedef.
7933 (find_methods, find_superclass_methods): Take a std::vector.
7934 (find_method): Use std::vector.
7935
7936 2018-04-05 Tom Tromey <tom@tromey.com>
7937
7938 * utils.c (compare_strings): Remove.
7939 * utils.h (compare_strings): Remove.
7940 * objc-lang.h (find_imps): Update.
7941 * objc-lang.c (find_methods): Take a std::vector.
7942 (uniquify_strings, find_imps): Likewise.
7943 * linespec.c (find_methods): Take a std::vector.
7944 (decode_objc): Use std::vector.
7945 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7946 a std::vector.
7947 (find_method, find_function_symbols): Use std::vector.
7948
7949 2018-04-05 Tom Tromey <tom@tromey.com>
7950
7951 * completer.c (completion_tracker::completion_tracker): Remove
7952 cast.
7953 (completion_tracker::discard_completions): Likewise.
7954 * breakpoint.c (ambiguous_names_p): Remove cast.
7955 * ada-lang.c (_initialize_ada_language): Remove cast.
7956 * utils.h (streq): Update.
7957 (streq_hash): Add new declaration.
7958 * utils.c (streq): Return bool.
7959 (streq_hash): New function.
7960
7961 2018-04-05 Tom Tromey <tom@tromey.com>
7962
7963 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7964 Remove a string copy.
7965
7966 2018-04-05 Tom Tromey <tom@tromey.com>
7967
7968 * linespec.c (filter_results): Use std::vector.
7969 (decode_line_2, decode_line_full): Update.
7970
7971 2018-04-05 Tom Tromey <tom@tromey.com>
7972
7973 * linespec.c (canonical_to_fullform): Return std::string.
7974 (filter_results): Update.
7975 (struct decode_line_2_item): Add constructor.
7976 <fullform, displayform>: Now std::string.
7977 (decode_line_2_compare_items): Now a std::sort comparator.
7978 (decode_line_2): Update.
7979
7980 2018-04-05 Tom Tromey <tom@tromey.com>
7981
7982 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7983 (unexpected_linespec_error): Update.
7984 (linespec_parse_basic, parse_linespec): Update.
7985
7986 2018-04-05 Tom Tromey <tom@tromey.com>
7987
7988 * linespec.c (linespec_parse_basic): Reindent.
7989
7990 2018-04-05 Tom Tromey <tom@tromey.com>
7991
7992 * minsyms.h (iterate_over_minimal_symbols): Update.
7993 * minsyms.c (iterate_over_minimal_symbols): Take a
7994 gdb::function_view.
7995 * linespec.c (struct collect_minsyms): Remove.
7996 (compare_msyms): Now a std::sort comparator.
7997 (add_minsym): Add parameters.
7998 (search_minsyms_for_name): Update. Use std::vector.
7999
8000 2018-04-03 Tom Tromey <tom@tromey.com>
8001
8002 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8003 gdb::byte_vector.
8004
8005 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8006
8007 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8008
8009 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8010
8011 PR gdb/16959
8012 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8013 printing static type.
8014
8015 2018-04-01 Tom Tromey <tom@tromey.com>
8016
8017 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8018 (rs6000_xfer_shared_libraries): Update.
8019
8020 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8021
8022 * common/gdb_vecs.h (char_ptr): Remove.
8023 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8024
8025 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8026
8027 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8028 with std::vector.
8029 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8030
8031 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8032
8033 * tracepoint.h (struct uploaded_tp): Initialize fields.
8034 <actions, step_actions, cmd_strings>: Change type to
8035 std::vector<char *>.
8036 * tracepoint.c (get_uploaded_tp): Allocate with new.
8037 (free_uploaded_tps): Free with delete.
8038 (parse_tracepoint_definition): Adjust to std::vector change.
8039 * breakpoint.c (read_uploaded_action): Likewise.
8040 (create_tracepoint_from_upload): Likewise.
8041 * ctf.c (ctf_write_uploaded_tp): Likewise.
8042 (SET_ARRAY_FIELD): Likewise.
8043 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8044
8045 2018-03-30 Tom Tromey <tom@tromey.com>
8046
8047 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8048 std::unique_ptr.
8049 (svr4_keep_data_in_core): Update.
8050 (svr4_read_so_list): Update.
8051
8052 2018-03-30 Tom Tromey <tom@tromey.com>
8053
8054 * windows-nat.c (handle_output_debug_string, handle_exception):
8055 Update.
8056 * target.h (target_read_string): Update.
8057 * target.c (target_read_string): Change "string" to
8058 unique_xmalloc_ptr.
8059 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8060 Update.
8061 * solib-frv.c (frv_current_sos): Update.
8062 * solib-dsbt.c (dsbt_current_sos): Update.
8063 * solib-darwin.c (darwin_current_sos): Update.
8064 * linux-thread-db.c (inferior_has_bug): Update.
8065 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8066 Update. Remove alloca.
8067 * ada-lang.c (ada_main_name): Update.
8068
8069 2018-03-30 Tom Tromey <tom@tromey.com>
8070
8071 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8072 (struct dwo_file_deleter): New.
8073 (dwo_file_up): New typedef.
8074 (open_and_init_dwo_file): Use dwo_file_up.
8075 (free_dwo_file_cleanup): Remove.
8076
8077 2018-03-30 Tom Tromey <tom@tromey.com>
8078
8079 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8080 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8081
8082 2018-03-30 Tom Tromey <tom@tromey.com>
8083
8084 * dwarf2read.c (class free_cached_comp_units): New class.
8085 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8086 (free_cached_comp_units): Remove function.
8087
8088 2018-03-30 Tom Tromey <tom@tromey.com>
8089
8090 * utils.h (make_cleanup_unpush_target): Remove.
8091 * inf-ptrace.c (struct target_unpusher): New.
8092 (target_unpush_up) New typedef.
8093 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8094 target_unpush_up.
8095 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8096
8097 2018-03-27 Tom Tromey <tom@tromey.com>
8098
8099 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8100
8101 2018-03-27 Pedro Alves <palves@redhat.com>
8102 Tom Tromey <tom@tromey.com>
8103
8104 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8105 destructor. Now a class.
8106 (gdb_readline_wrapper_cleanup): Remove function.
8107 (gdb_readline_wrapper): Remove cleanups.
8108
8109 2018-03-27 Tom Tromey <tom@tromey.com>
8110
8111 * typeprint.h (struct type_print_options) <local_typedefs,
8112 global_typedefs>: Remove "struct" keyword.
8113 (class typedef_hash_table): New class.
8114 (recursively_update_typedef_hash, add_template_parameters)
8115 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8116 (find_typedef_in_hash): Don't declare.
8117 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8118 (typedef_hash_table::recursively_update): Rename from
8119 recursively_update_typedef_hash. Now a member.
8120 (typedef_hash_table::add_template_parameters): Rename from
8121 add_template_parameters. Now a member.
8122 (typedef_hash_table::typedef_hash_table): Now a constructor;
8123 rename from create_typedef_hash.
8124 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8125 rename from free_typedef_hash.
8126 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8127 (do_free_global_table): Remove.
8128 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8129 from copy_type_recursive.
8130 (create_global_typedef_table): Remove.
8131 (typedef_hash_table::find_global_typedef): Now a member of
8132 typedef_hash_table.
8133 (typedef_hash_table::find_typedef): Rename from
8134 find_typedef_in_hash; now a member.
8135 (whatis_exp): Update.
8136 * extension.h (struct ext_lang_type_printers): Add constructor and
8137 destructor.
8138 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8139 declare.
8140 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8141 Now a constructor; rename from start_ext_lang_type_printers.
8142 (ext_lang_type_printers): Now a destructor; rename from
8143 free_ext_lang_type_printers.
8144 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8145 Update.
8146 (c_type_print_base_struct_union): Update. Remove cleanups.
8147
8148 2018-03-27 Tom Tromey <tom@tromey.com>
8149
8150 * dwarf-index-write.c: Include <cmath>.
8151
8152 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8153
8154 * NEWS: Add entry describing new "set|show varsize-limit" command.
8155 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8156 command.
8157 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8158 "set variable".
8159
8160 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8161
8162 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8163 dwarf-index-write.c
8164 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8165 * dwarf-index-common.c: New file.
8166 * dwarf-index-common.h: New file.
8167 * dwarf-index-write.c: New file.
8168 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8169 (struct dwarf2_section_info): Move from here.
8170 (dwarf2_section_info_def): Likewise.
8171 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8172 (offset_type): Likewise.
8173 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8174 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8175 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8176 (byte_swap): Likewise.
8177 (MAYBE_SWAP): Likewise.
8178 (dwarf2_per_cu_ptr): Likewise.
8179 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8180 (struct tu_stats): Likewise.
8181 (struct dwarf2_per_objfile): Likewise.
8182 (struct dwarf2_per_cu_data): Likewise.
8183 (struct signatured_type): Likewise.
8184 (sig_type_ptr): Likewise.
8185 (DEF_VEC_P (sig_type_ptr)): Likewise.
8186 (INDEX4_SUFFIX): Likewise.
8187 (INDEX5_SUFFIX): Likewise.
8188 (DEBUG_STR_SUFFIX): Likewise.
8189 (dwarf2_read_section): Make non-static.
8190 (mapped_index_string_hash): Move from here.
8191 (dwarf5_djb_hash): Likewise.
8192 (file_write): Likewise.
8193 (class data_buf): Likewise.
8194 (struct symtab_index_entry): Likewise.
8195 (struct mapped_symtab): Likewise.
8196 (find_slot): Likewise.
8197 (hash_expand): Likewise.
8198 (add_index_entry): Likewise.
8199 (uniquify_cu_indices): Likewise.
8200 (class c_str_view): Likewise.
8201 (class c_str_view_hasher): Likewise.
8202 (class vector_hasher): Likewise.
8203 (write_hash_table): Likewise.
8204 (psym_index_map): Likewise.
8205 (struct addrmap_index_data): Likewise.
8206 (add_address_entry): Likewise.
8207 (add_address_entry_worker): Likewise.
8208 (write_address_map): Likewise.
8209 (symbol_kind): Likewise.
8210 (write_psymbols): Likewise.
8211 (struct signatured_type_index_data): Likewise.
8212 (write_one_signatured_type): Likewise.
8213 (recursively_count_psymbols): Likewise.
8214 (recursively_write_psymbols): Likewise.
8215 (class debug_names): Likewise.
8216 (check_dwarf64_offsets): Likewise.
8217 (psyms_seen_size): Likewise.
8218 (write_gdbindex): Likewise.
8219 (write_debug_names): Likewise.
8220 (assert_file_size): Likewise.
8221 (write_psymtabs_to_index): Likewise.
8222 (save_gdb_index_command): Likewise.
8223 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8224 command.
8225 * dwarf2read.h: New file.
8226
8227 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8228
8229 PR gdb/22670
8230 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8231 symbol name if the CU's language stores symbol names in linkage
8232 format.
8233 * language.h (struct language_defn)
8234 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8235 all instances of this struct.
8236
8237 2018-03-26 Tom Tromey <tom@tromey.com>
8238
8239 * stack.c (backtrace_command_1): Remove verbose code.
8240
8241 2018-03-26 Tom Tromey <tom@tromey.com>
8242
8243 * python/py-framefilter.c (py_print_type): Don't catch
8244 exceptions. Return void.
8245 (py_print_value): Likewise.
8246 (py_print_single_arg): Likewise.
8247 (enumerate_args): Don't catch exceptions.
8248 (py_print_args): Likewise.
8249 (py_print_frame): Likewise.
8250 (gdbpy_apply_frame_filter): Catch exceptions here.
8251
8252 2018-03-26 Tom Tromey <tom@tromey.com>
8253
8254 * stack.c (_initialize_stack): Remove trailing newlines from help
8255 text. Add "Usage" line to "backtrace" help.
8256
8257 2018-03-26 Tom Tromey <tom@tromey.com>
8258
8259 PR python/16486:
8260 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8261
8262 2018-03-26 Tom Tromey <tom@tromey.com>
8263
8264 * python/py-framefilter.c (py_print_single_arg): Return
8265 EXT_LANG_BT_ERROR from catch.
8266
8267 2018-03-26 Tom Tromey <tom@tromey.com>
8268
8269 PR backtrace/15584:
8270 * stack.c (backtrace_command_1): Move some code into no-filters
8271 "if".
8272
8273 2018-03-26 Tom Tromey <tom@tromey.com>
8274
8275 * python/py-framefilter.c (throw_quit_or_print_exception): New
8276 function.
8277 (gdbpy_apply_frame_filter): Use it.
8278
8279 2018-03-26 Tom Tromey <tom@tromey.com>
8280
8281 PR cli/17716:
8282 * python/py-framefilter.c (py_print_type, py_print_value)
8283 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8284 RETURN_MASK_ERROR.
8285
8286 2018-03-26 Tom Tromey <tom@tromey.com>
8287
8288 * python/py-framefilter.c (enumerate_args): Use
8289 gdb::unique_xmalloc_ptr.
8290
8291 2018-03-26 Tom Tromey <tom@tromey.com>
8292
8293 * python/py-framefilter.c (py_print_frame): Return
8294 EXT_LANG_BT_OK.
8295 (gdbpy_apply_frame_filter): Update comment.
8296 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8297 Remove.
8298 <EXT_LANG_BT_NO_FILTERS>: Change value.
8299
8300 2018-03-26 Tom Tromey <tom@tromey.com>
8301
8302 PR backtrace/15582:
8303 * stack.c (backtrace_command): Parse "hide" argument.
8304 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8305 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8306 constant.
8307
8308 2018-03-26 Tom Tromey <tom@tromey.com>
8309
8310 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8311 add "flags".
8312 (backtrace_command): Remove "fulltrace", add "flags".
8313
8314 2018-03-26 Tom Tromey <tom@tromey.com>
8315
8316 * stack.c (backtrace_command): Rewrite command line parsing.
8317
8318 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8319
8320 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8321
8322 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8323
8324 * filename-seen-cache.h: Add include guard.
8325
8326 2018-03-26 Keith Seitz <keiths@redhat.com>
8327
8328 * symfile.c (place_section): Remove "struct" from section_addr_info
8329 in comment.
8330 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8331 "struct" keyword from section_addr_info.
8332
8333 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8334
8335 * regformats/regdef.h (reg): Add constructors.
8336
8337 2018-03-25 Pedro Alves <palves@redhat.com>
8338
8339 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8340 if then/else bodies in var_func_name extraction.
8341
8342 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8343
8344 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8345 lookup_minimal_symbol() to find symbol entry.
8346 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8347
8348 2018-03-23 Keith Seitz <keiths@redhat.com>
8349
8350 PR c++/22968
8351 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8352 nested type definitions for C++, too.
8353
8354 2018-03-23 Tom Tromey <tom@tromey.com>
8355
8356 * machoread.c (struct oso_el): Add a constructor. Don't define as
8357 a typedef.
8358 (macho_register_oso): Remove.
8359 (macho_symtab_read): Take a std::vector.
8360 (oso_el_compare_name): Now a std::sort comparator.
8361 (macho_symfile_read_all_oso): Take a std::vector.
8362 (macho_symfile_read): Use std::vector. Remove cleanups.
8363
8364 2018-03-22 Tom Tromey <tom@tromey.com>
8365
8366 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8367 (record_full_goto_bookmark): Use std::string.
8368
8369 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8370
8371 PR tdep/18295
8372 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8373 a single mask.
8374
8375 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8376
8377 * rs6000-tdep.c (store_insn_p): New function.
8378 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8379 and cr_reg to their unshifted values. Use store_insn_p to
8380 match LR saves using either R1 or fdata->alloca_reg. Use
8381 store_insn_p to match CR saves. Set alloca_reg_offset
8382 when alloca_reg and framep are set. Remove lr_reg shift
8383 when assigning to fdata->lr_register.
8384
8385 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8386
8387 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8388 command line args instead of emitting a warning.
8389
8390 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8391
8392 * tracepoint.h (struct static_tracepoint_marker): Initialize
8393 fields, define default constructor, move constructor and move
8394 assignment, disable the rest.
8395 <str_id, extra>: Make std::string.
8396 (release_static_tracepoint_marker): Remove.
8397 (free_current_marker): Remove.
8398 * tracepoint.c (free_current_marker): Remove.
8399 (parse_static_tracepoint_marker_definition): Adjust to
8400 std::string, use new hex2str overload.
8401 (release_static_tracepoint_marker): Remove.
8402 (print_one_static_tracepoint_marker): Get marker by reference
8403 and adjust to std::string.
8404 (info_static_tracepoint_markers_command): Adjust to std::vector
8405 changes
8406 * target.h (static_tracepoint_marker_p): Remove typedef.
8407 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8408 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8409 bool.
8410 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8411 * target-debug.h
8412 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8413 (target_debug_print_std_vector_static_tracepoint_marker): New.
8414 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8415 to...
8416 (target_debug_print_static_tracepoint_marker_p): ... this.
8417 * target-delegates.c: Re-generate.
8418 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8419 Make std::string.
8420 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8421 (decode_static_tracepoint_spec): Adjust to std::vector.
8422 (tracepoint_print_one_detail): Adjust to std::string.
8423 (strace_marker_decode_location): Adjust to std::string.
8424 (update_static_tracepoint): Adjust to std::string, remove call
8425 to release_static_tracepoint_marker.
8426 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8427 Adjust to std::vector.
8428 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8429 (remote_static_tracepoint_markers_by_strid): Adjust to
8430 std::vector.
8431 * common/rsp-low.h (hex2str): New overload with explicit count
8432 of bytes.
8433 * common/rsp-low.c (hex2str): New overload with explicit count
8434 of bytes.
8435 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8436 (_initialize_rsp_low_selftests): Add test_hex2str test.
8437 * unittests/tracepoint-selftests.c
8438 (test_parse_static_tracepoint_marker_definition): Adjust to
8439 std::string.
8440
8441 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8442
8443 * tracepoint.c (parse_static_tracepoint_marker_definition):
8444 Consider case where the definition is followed by more
8445 definitions.
8446 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8447 tracepoint-selftests.c.
8448 * unittests/tracepoint-selftests.c: New.
8449
8450 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8451
8452 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8453 Carvalho.
8454
8455 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8456
8457 * symtab.c (find_pc_sect_line): fixed indentation.
8458
8459 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8460
8461 * symtab.c (find_pc_sect_line): now uses binary search.
8462
8463 2018-03-19 Tom Tromey <tom@tromey.com>
8464
8465 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8466 "IDENT" production.
8467
8468 2018-03-19 Pedro Alves <palves@redhat.com>
8469 Tom Tromey <tom@tromey.com>
8470
8471 * unittests/observable-selftests.c: New file.
8472 * common/observable.h: New file.
8473 * observable.h: New file.
8474 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8475 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8476 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8477 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8478 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8479 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8480 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8481 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8482 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8483 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8484 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8485 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8486 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8487 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8488 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8489 tui/tui-interp.c, valops.c: Update all users.
8490 * tui/tui-hooks.c (tui_bp_created_observer)
8491 (tui_bp_deleted_observer, tui_bp_modified_observer)
8492 (tui_inferior_exit_observer, tui_before_prompt_observer)
8493 (tui_normal_stop_observer, tui_register_changed_observer):
8494 Remove.
8495 (tui_observers_token): New global.
8496 (attach_or_detach, tui_attach_detach_observers): New functions.
8497 (tui_install_hooks, tui_remove_hooks): Use
8498 tui_attach_detach_observers.
8499 * record-btrace.c (record_btrace_thread_observer): Remove.
8500 (record_btrace_thread_observer_token): New global.
8501 * observer.sh: Remove.
8502 * observer.c: Rename to observable.c.
8503 * observable.c (namespace gdb_observers): Define new objects.
8504 (observer_debug): Move into gdb_observers namespace.
8505 (struct observer, struct observer_list, xalloc_observer_list_node)
8506 (xfree_observer_list_node, generic_observer_attach)
8507 (generic_observer_detach, generic_observer_notify): Remove.
8508 (_initialize_observer): Update.
8509 Don't include observer.inc.
8510 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8511 (clean mostlyclean): Likewise.
8512 (observer.h, observer.inc): Remove targets.
8513 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8514 (COMMON_SFILES): Use observable.c, not observer.c.
8515 * .gitignore: Remove observer.h.
8516
8517 2018-03-18 Tom Tromey <tom@tromey.com>
8518
8519 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8520 gdb::def_vector.
8521 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8522
8523 2018-03-17 Tom Tromey <tom@tromey.com>
8524
8525 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8526
8527 2018-03-17 Tom Tromey <tom@tromey.com>
8528
8529 * target.c (class scoped_target_fd): New.
8530 (target_fileio_close_cleanup): Remove.
8531 (target_fileio_read_alloc_1): Use scoped_target_fd.
8532
8533 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8534
8535 * silent-rules.mk: New.
8536 * Makefile.in: Include silent-rules.mk
8537 (srcdir, VPATH, top_srcdir): Move up.
8538 (COMPILE): Add ECHO_CXX.
8539 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8540 (init.c): Add ECHO_INIT_C.
8541 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8542 (version.c): Add ECHO_GEN.
8543 (printcmd.o): Add ECHO_CXX.
8544 (target-float.o): Add ECHO_CXX.
8545 (ada-exp.o): Add ECHO_CXX.
8546 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8547 (insight$(EXEEXT)): Add ECHO_CXXLD.
8548 * gnulib/configure.ac: Add AM_SILENT_RULES.
8549 * gnulib/aclocal.m4: Re-generate.
8550 * gnulib/configure: Re-generate.
8551 * gnulib/import/Makefile.in: Re-generate.
8552
8553 2018-03-16 Tom Tromey <tom@tromey.com>
8554
8555 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8556 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8557 * utils.c (do_free_section_addr_info)
8558 (make_cleanup_free_section_addr_info): Remove.
8559 * symfile.h (struct other_sections): Add constructor.
8560 (struct section_addr_info): Remove.
8561 (section_addr_info): New typedef.
8562 (struct sym_fns) <sym_offsets>: Change type of parameter.
8563 (build_section_addr_info_from_objfile)
8564 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8565 (default_symfile_offsets, symbol_file_add)
8566 (symbol_file_add_from_bfd)
8567 (build_section_addr_info_from_section_table): Update.
8568 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8569 * symfile.c (alloc_section_addr_info): Remove.
8570 (build_section_addr_info_from_section_table): Change return type.
8571 Update.
8572 (build_section_addr_info_from_bfd)
8573 (build_section_addr_info_from_objfile): Likewise.
8574 (free_section_addr_info): Remove.
8575 (relative_addr_info_to_section_offsets): Change type of "addrs".
8576 (addrs_section_compar): Now a std::sort comparator.
8577 (addrs_section_sort): Change return type.
8578 (addr_info_make_relative): Change type of "addrs". Update.
8579 (default_symfile_offsets, syms_from_objfile_1)
8580 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8581 (symbol_file_add_separate): Update.
8582 (symbol_file_add): Change type of "addrs". Update.
8583 (add_symbol_file_command): Update. Remove cleanups.
8584 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8585 cleanups.
8586 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8587 * solib.c (solib_read_symbols): Update.
8588 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8589 * machoread.c (macho_symfile_offsets): Update.
8590 * jit.c (jit_bfd_try_read_symtab): Update.
8591
8592 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8593
8594 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8595 unittests/utils-selftests.c.
8596 * unittests/utils-selftests.c: New file.
8597
8598 2018-03-14 Tom Tromey <tom@tromey.com>
8599
8600 PR cli/14977:
8601 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8602 for NULL.
8603
8604 2018-03-14 Tom Tromey <tom@tromey.com>
8605
8606 PR cli/19918:
8607 * printcmd.c (printf_pointer): Allow "-" in format.
8608
8609 2018-03-14 Tom Tromey <tom@tromey.com>
8610
8611 * printcmd.c (_initialize_printcmd): Add usage to printf.
8612
8613 2018-03-14 Yao Qi <qiyao@sourceware.org>
8614
8615 * MAINTAINERS: Update my email address.
8616
8617 2018-03-13 Tom Tromey <tom@tromey.com>
8618
8619 * machoread.c (macho_check_dsym): Change filenamep to a
8620 std::string*.
8621 (macho_symfile_read): Update.
8622 * symfile.c (load_command): Use std::string.
8623
8624 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8625
8626 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8627 to error message string.
8628 (riscv_register_name): Use xsnprintf instead of sprintf.
8629 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8630 internal_error.
8631 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8632 error.
8633 (riscv_push_dummy_call): Likewise.
8634
8635 2018-03-12 Tom Tromey <tom@tromey.com>
8636
8637 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8638 Use gdb::byte_vector.
8639 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8640
8641 2018-03-12 Yao Qi <yao.qi@linaro.org>
8642
8643 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8644 parameter type to readable_regcache.
8645 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8646 the declaration.
8647
8648 2018-03-11 Tom Tromey <tom@tromey.com>
8649
8650 * dwarf2read.c (struct nextfield): Add initializers.
8651 (struct nextfnfield): Remove.
8652 (struct fnfieldlist): Add initializers. Remove "length" and
8653 "head", use std::vector.
8654 (struct decl_field_list): Remove.
8655 (struct field_info): Add initializers.
8656 <fields, baseclasses>: Now std::vector.
8657 <nbaseclasses, nfnfields, typedef_field_list_count,
8658 nested_types_list_count>: Remove.
8659 (dwarf2_add_field, dwarf2_add_type_defn)
8660 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8661 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8662 (process_structure_scope): Update.
8663
8664 2018-03-11 Tom Tromey <tom@tromey.com>
8665
8666 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8667 for use by std::sort.
8668 (build_type_psymtabs_1): Use std::vector.
8669
8670 2018-03-09 Eli Zaretskii <eliz@gnu.org>
8671
8672 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8673 and LIBMPFR in the printed configuration.
8674
8675 2018-03-08 Tom Tromey <tom@tromey.com>
8676
8677 * source.c (get_filename_and_charpos): Use scoped_fd.
8678 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8679 (procfs_pidlist): Likewise.
8680 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8681 (iterate_over_mappings): Likewise.
8682
8683 2018-03-08 Tom Tromey <tom@tromey.com>
8684
8685 * infcall.c (struct call_return_meta_info)
8686 <stack_temporaries_enabled>: Remove.
8687 (get_call_return_value, call_function_by_hand_dummy): Update.
8688 * thread.c (disable_thread_stack_temporaries): Remove.
8689 (enable_thread_stack_temporaries): Remove.
8690 (thread_stack_temporaries_enabled_p): Return bool.
8691 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8692 (get_last_thread_stack_temporary): Update.
8693 * eval.c (evaluate_subexp): Update.
8694 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8695 class, not a function.
8696 (value_ptr, value_vec): Remove typedefs.
8697 (class thread_info) <stack_temporaries_enabled>: Now bool.
8698 <stack_temporaries>: Now a std::vector.
8699 (thread_stack_temporaries_enabled_p)
8700 (value_in_thread_stack_temporaries): Return bool.
8701
8702 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8703
8704 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8705 (getpkt_or_notif_sane_1): Likewise.
8706
8707 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8708
8709 * build-id.c (build_id_to_debug_bfd): Use std::string.
8710
8711 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8712
8713 * build-id.c (find_separate_debug_file_by_buildid): Return
8714 std::string.
8715 * build-id.h (find_separate_debug_file_by_buildid): Return
8716 std::string.
8717 * coffread.c (coff_symfile_read): Adjust to std::string.
8718 * elfread.c (elf_symfile_read): Adjust to std::string.
8719 * symfile.c (separate_debug_file_exists): Change parameter to
8720 std::string.
8721 (find_separate_debug_file): Return std::string.
8722 (find_separate_debug_file_by_debuglink): Return std::string.
8723 * symfile.h (find_separate_debug_file_by_debuglink): Return
8724 std::string.
8725
8726 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8727
8728 * common/xml-utils.c (xml_escape_text): Move code to...
8729 (xml_escape_text_append): ... this new function.
8730 * common/xml-utils.h (xml_escape_text_append): New declaration.
8731 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8732 New function.
8733 (_initialize_xml_utils): register test_xml_escape_text_append as
8734 a selftest.
8735
8736 2018-03-07 Alan Hayward <alan.hayward@arm.com>
8737
8738 * defs.h: Remove MAX_REGISTER_SIZE.
8739 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8740 asserts.
8741 * python/py-unwind.c (pyuw_sniffer): Likewise.
8742
8743 2018-03-07 Tom Tromey <tom@tromey.com>
8744
8745 * linux-tdep.c (linux_info_proc): Update.
8746 * target.h (struct target_ops) <to_fileio_readlink>: Return
8747 optional<string>.
8748 (target_fileio_readlink): Return optional<string>.
8749 * remote.c (remote_hostio_readlink): Return optional<string>.
8750 * inf-child.c (inf_child_fileio_readlink): Return
8751 optional<string>.
8752 * target.c (target_fileio_readlink): Return optional<string>.
8753
8754 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8755
8756 * regcache.c (cooked_read_test): Add riscv to the list of
8757 architectures that have a save_reggroup.
8758
8759 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8760
8761 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8762 value is not a dynamic class object.
8763
8764 2018-03-06 Tom Tromey <tom@tromey.com>
8765
8766 * rust-exp.y: Formatting fixes.
8767
8768 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8769
8770 * riscv-tdep.c (riscv_register_name): Remove target description
8771 support.
8772 (riscv_gdbarch_init): Remove target description check.
8773
8774 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8775
8776 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8777 comment.
8778 * riscv-tdep.h: Likewise.
8779
8780 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8781
8782 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8783 (riscv_pseudo_register_write): Delete.
8784 (riscv_gdbarch_init): Remove all use of pseudo registers.
8785
8786 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8787
8788 * record-btrace.c (btrace_print_lines): Replace cleanup
8789 parameter with RAII equivalents.
8790 (btrace_insn_history): Replace cleanup with RAII equivalents.
8791 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8792 make_cleanup_ui_out_tuple_begin_end): Remove.
8793 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8794 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8795 make_cleanup_ui_out_list_begin_end): Remove.
8796
8797 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8798
8799 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8800 parameter types to std::vector. Use bool.
8801 (record_btrace_wait): Replace VEC(tp_t) with
8802 std::vector<thread_info *>.
8803 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8804
8805 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8806
8807 * record-btrace.c (record_btrace_disable_callback): Remove.
8808 (struct scoped_btrace_disable): New.
8809 (record_btrace_open): Use scoped_btrace_disable.
8810
8811 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8812
8813 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8814 reading values from registers.
8815
8816 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8817
8818 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8819 where appropriate.
8820
8821 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8822
8823 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8824 change parameter type. Use GDB's print functions, and use
8825 core_addr_to_string where appropriate.
8826 (riscv_push_dummy_call): Use core_addr_to_string where
8827 appropriate, update call to riscv_print_arg_location, and reindent
8828 a few lines.
8829 (riscv_return_value): Update call to riscv_print_arg_location.
8830
8831 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8832 Tim Newsome <tim@sifive.com>
8833 Albert Ou <a0u@eecs.berkeley.edu>
8834 Darius Rad <darius@bluespec.com>
8835
8836 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8837 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8838 (ALLDEPFILES): Add riscv-tdep.c
8839 * configure.tgt: Add riscv support.
8840 * riscv-tdep.c: New file.
8841 * riscv-tdep.h: New file.
8842 * NEWS: Mention new target.
8843 * MAINTAINERS: Add entry for riscv.
8844
8845 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8846
8847 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8848 fields within aggregates.
8849
8850 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8851
8852 * record-btrace.c (btrace_print_lines): Change type of flags to
8853 gdb_disassembly_flags.
8854
8855 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8856
8857 * fbsd-nat.c: Include "inf-ptrace.h".
8858 (USE_SIGTRAP_SIGINFO): Conditionally define.
8859 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8860 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8861 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8862 function.
8863 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8864 Likewise.
8865 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8866 Likewise.
8867 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8868 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8869 "supports_stopped_by_hw_breakpoint" target methods.
8870
8871 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8872
8873 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8874 * fbsd-nat.c (debug_fbsd_nat): New variable.
8875 (show_fbsd_nat_debug): New function.
8876 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8877 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8878
8879 2018-03-04 John Baldwin <jhb@FreeBSD.org>
8880
8881 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8882 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8883 prototype.
8884 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8885 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8886 method.
8887
8888 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8889
8890 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8891 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8892
8893 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8894
8895 * charset.c (struct charset_vector): New.
8896 (charsets): Change type to charset_vector.
8897 (find_charset_names): Adjust.
8898 (add_one): Adjust.
8899 (_initialize_charset): Adjust.
8900
8901 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8902
8903 * progspace.h (struct program_space) <deleted_solibs>: Change
8904 type to std::vector<std::string>.
8905 * progspace.c (clear_program_space_solib_cache): Adjust.
8906 * breakpoint.c (print_solib_event): Adjust.
8907 (check_status_catch_solib): Adjust.
8908 * solib.c (update_solib_list): Adjust.
8909 * ui-out.h (class ui_out) <field_string>: New overload.
8910 * ui-out.c (ui_out::field_string): New overload.
8911
8912 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8913
8914 * progspace.h (struct program_space): Add constructor and
8915 destructor, initialize fields.
8916 (add_program_space): Remove.
8917 * progspace.c (add_program_space): Rename to...
8918 (program_space::program_space): ... this.
8919 (release_program_space): Rename to...
8920 (program_space::~program_space): ... this.
8921 (delete_program_space): Use delete to delete program_space.
8922 (initialize_progspace): Use new to allocate program_space.
8923 * inferior.c (add_inferior_with_spaces): Likewise.
8924 (clone_inferior_command): Likewise.
8925 * infrun.c (follow_fork_inferior): Likewise.
8926 (handle_vfork_child_exec_or_exit): Likewise.
8927
8928 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8929
8930 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8931 (delim_string_to_char_ptr_vec): Return std::vector of
8932 gdb::unique_xmalloc_ptr.
8933 (dirnames_to_char_ptr_vec_append): Take std::vector of
8934 gdb::unique_xmalloc_ptr.
8935 (dirnames_to_char_ptr_vec): Return std::vector of
8936 gdb::unique_xmalloc_ptr.
8937 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8938 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8939 (delim_string_to_char_ptr_vec): Return an std::vector of
8940 gdb::unique_xmalloc_ptr, adjust the code.
8941 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8942 gdb::unique_xmalloc_ptr, adjust the code.
8943 (dirnames_to_char_ptr_vec): Return an std::vector of
8944 gdb::unique_xmalloc_ptr, adjust the code.
8945 * auto-load.c (auto_load_safe_path_vec): Change type to
8946 std::vector of gdb::unique_xmalloc_ptr.
8947 (auto_load_expand_dir_vars): Return an std::vector of
8948 gdb::unique_xmalloc_ptr, adjust the code.
8949 (auto_load_safe_path_vec_update): Adjust.
8950 (filename_is_in_auto_load_safe_path_vec): Adjust.
8951 (auto_load_objfile_script_1): Adjust.
8952 * build-id.c (build_id_to_debug_bfd): Adjust.
8953 * linux-thread-db.c (thread_db_load_search): Adjust.
8954 * source.c (add_path): Adjust.
8955 (openp): Adjust.
8956 * symfile.c (find_separate_debug_file): Adjust.
8957 * utils.c (do_free_char_ptr_vec): Remove.
8958 (make_cleanup_free_char_ptr_vec): Remove.
8959
8960 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8961
8962 PR gdb/22907
8963 * common/pathstuff.c: Conditionally include "<windows.h>".
8964
8965 2018-03-01 Georg Sauthoff <mail@georg.so>
8966
8967 PR gdb/22888
8968 * gcore.in: Quote variables and switch interpreter to bash.
8969
8970 2018-03-01 Tom Tromey <tom@tromey.com>
8971
8972 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8973 assertion. Add assertion for discriminant_index.
8974 (quirk_rust_enum): Use correct base type name in univariant case.
8975
8976 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8977
8978 * record.c (get_call_history_modifiers): Return a
8979 record_print_flags.
8980 (cmd_record_call_history): Adjust.
8981 * record-btrace.c (record_btrace_call_history): Adjust.
8982 (record_btrace_call_history_range): Adjust.
8983 (record_btrace_call_history_from): Adjust.
8984 * target-debug.h (target_debug_print_record_print_flags): New.
8985 * target-delegates.c: Re-generate.
8986 * target.c (target_call_history): Change flags type.
8987 (target_call_history_from): Likewise.
8988 (target_call_history_range): Likewise.
8989 * target.h (struct target_ops) <target_call_history>: Likewise.
8990 (target_call_history_from): Likewise.
8991 (target_call_history_range): Likewise.
8992
8993 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
8994 Simon Marchi <simon.marchi@polymtl.ca>
8995
8996 * common/common-utils.c: Include "sys/stat.h".
8997 (is_regular_file): Move here from "source.c"; change return
8998 type to "bool".
8999 * common/common-utils.h (is_regular_file): New prototype.
9000 * common/pathstuff.c (contains_dir_separator): New function.
9001 * common/pathstuff.h (contains_dir_separator): New prototype.
9002 * source.c: Don't include "sys/stat.h".
9003 (is_regular_file): Move to "common/common-utils.c".
9004
9005 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9006
9007 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9008 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9009 * auto-load.c: Include "common/pathstuff.h".
9010 * common/common-def.h (current_directory): Move here.
9011 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9012 function.
9013 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9014 prototype.
9015 * common/pathstuff.c: New file.
9016 * common/pathstuff.h: New file.
9017 * compile/compile.c: Include "common/pathstuff.h".
9018 * defs.h (current_directory): Move to "common/common-defs.h".
9019 * dwarf2read.c: Include "common/pathstuff.h".
9020 * exec.c: Likewise.
9021 * guile/scm-safe-call.c: Likewise.
9022 * linux-thread-db.c: Likewise.
9023 * main.c: Likewise.
9024 * nto-tdep.c: Likewise.
9025 * objfiles.c: Likewise.
9026 * source.c: Likewise.
9027 * symtab.c: Likewise.
9028 * utils.c: Include "common/pathstuff.h".
9029 (gdb_realpath): Move to "common/pathstuff.c".
9030 (gdb_realpath_keepfile): Likewise.
9031 (gdb_abspath): Likewise.
9032 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9033 (gdb_realpath_keepfile): Likewise.
9034 (gdb_abspath): Likewise.
9035
9036 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9037
9038 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9039 wildcard process pid for super_resume for kernels with a
9040 specific bug.
9041
9042 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9043
9044 * compile/compile.c (get_args): Add additional comments
9045 explaining function.
9046
9047 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9048 Tom Tromey <tom@tromey.com>
9049
9050 * target.h (memory_write_request_s): Remove typedef. Don't define
9051 VEC.
9052 (target_write_memory_blocks): Change argument to std::vector.
9053 (struct memory_write_request): Add constructor.
9054 * target-memory.c (compare_block_starting_address): Return bool.
9055 Change argument types.
9056 (claim_memory): Change arguments to use std::vector.
9057 (split_regular_and_flash_blocks, blocks_to_erase)
9058 (compute_garbled_blocks): Likewise.
9059 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9060 (target_write_memory_blocks): Change argument to std::vector.
9061 * symfile.c (struct load_section_data): Add constructor and
9062 destructor. Use std::vector for "requests".
9063 (struct load_progress_data): Add initializers.
9064 (load_section_callback): Update. Use "new".
9065 (clear_memory_write_data): Remove.
9066 (generic_load): Update.
9067
9068 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9069
9070 * arch/aarch64.h: Use common/tdesc.h.
9071
9072 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9073
9074 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9075 architecture with a 64-bit ABI.
9076
9077 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9078
9079 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9080 ahead of target description loading.
9081
9082 2018-02-26 Tom Tromey <tom@tromey.com>
9083
9084 * stack.c (backtrace_command_1): Update.
9085 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9086 of "flags".
9087 * python/py-framefilter.c (py_print_frame)
9088 (gdbpy_apply_frame_filter): Change type of "flags".
9089 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9090 of "flags".
9091 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9092 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9093 * extension.h (enum frame_filter_flag): Rename from
9094 frame_filter_flags.
9095 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9096 (apply_ext_lang_frame_filter): Change type of "flags".
9097 * extension.c (apply_ext_lang_frame_filter): Change type of
9098 "flags".
9099 * extension-priv.h (struct extension_language_ops)
9100 <apply_frame_filter>: Change type of "flags".
9101
9102 2018-02-26 Tom Tromey <tom@tromey.com>
9103
9104 PR python/16497:
9105 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9106 off-by-one in py_end computation.
9107 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9108 PRINT_MORE_FRAMES.
9109 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9110 constant.
9111
9112 2018-02-26 Tom Tromey <tom@tromey.com>
9113
9114 * dwarf2read.c (struct variant_field): New.
9115 (struct nextfield) <variant>: New field.
9116 (dwarf2_add_field): Handle DW_TAG_variant_part.
9117 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9118 discriminated union.
9119 (read_structure_type): Handle DW_TAG_variant_part.
9120 (handle_struct_member_die): New function, extracted from
9121 process_structure_scope. Handle DW_TAG_variant.
9122 (process_structure_scope): Handle discriminated unions. Call
9123 handle_struct_member_die.
9124
9125 2018-02-26 Tom Tromey <tom@tromey.com>
9126
9127 * rust-lang.h (rust_last_path_segment): Declare.
9128 * rust-lang.c (rust_last_path_segment): Now public. Change
9129 contract.
9130 (struct disr_info): Remove.
9131 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9132 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9133 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9134 (rust_enum_p, rust_enum_variant): New function.
9135 (rust_underscore_fields): Remove "offset" parameter.
9136 (rust_print_enum): New function.
9137 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9138 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9139 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9140 enums.
9141 (rust_internal_print_type): New function, from rust_print_type.
9142 Remove enum code.
9143 (rust_print_type): Call rust_internal_print_type.
9144 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9145 Update enum handling.
9146 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9147 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9148 (rust_union_quirks): New functions.
9149 (process_full_comp_unit, process_full_type_unit): Call
9150 rust_union_quirks.
9151 (process_structure_scope): Update rust_unions if necessary.
9152
9153 2018-02-26 Tom Tromey <tom@tromey.com>
9154
9155 * value.h (value_union_variant): Declare.
9156 * valops.c (value_union_variant): New function.
9157 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9158 (struct discriminant_info): New.
9159 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9160 enumerator.
9161 (struct main_type) <flag_discriminated_union>: New field.
9162
9163 2018-02-26 Tom Tromey <tom@tromey.com>
9164
9165 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9166 unittests/unpack-selftests.c.
9167 * unittests/unpack-selftests.c: New file.
9168 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9169
9170 2018-02-26 Yao Qi <yao.qi@linaro.org>
9171
9172 * dwarf2read.c (struct partial_die_info) <read>: New method.
9173 (read_partial_die): Remove the declaration.
9174 (load_partial_dies): Update.
9175 (partial_die_info::partial_die_info):
9176 (read_partial_die): Change it to partial_die_info::read.
9177
9178 2018-02-26 Yao Qi <yao.qi@linaro.org>
9179
9180 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9181 (fixup_partial_die): Remove declaration.
9182 (scan_partial_symbols): Update.
9183 (partial_die_parent_scope): Likewise.
9184 (partial_die_full_name): Likewise.
9185 (fixup_partial_die): Change it to partial_die_info::fixup.
9186
9187 2018-02-26 Yao Qi <yao.qi@linaro.org>
9188
9189 * dwarf2read.c (read_partial_die): Update the declaration.
9190 (load_partial_dies): Caller update.
9191 (read_partial_die): Remove one argument abbrev_len.
9192
9193 2018-02-26 Yao Qi <yao.qi@linaro.org>
9194
9195 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9196 assignment operator.
9197 (load_partial_dies): Use ctor and copy ctor.
9198 (read_partial_die): Update.
9199 (dwarf2_cu::find_partial_die): Use ctor.
9200
9201 2018-02-26 Yao Qi <yao.qi@linaro.org>
9202
9203 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9204 (find_partial_die_in_comp_unit): Change it to
9205 dwarf2_cu::find_partial_die.
9206 (find_partial_die): Update.
9207
9208 2018-02-26 Yao Qi <yao.qi@linaro.org>
9209
9210 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9211 is NULL.
9212
9213 2018-02-26 Yao Qi <yao.qi@linaro.org>
9214
9215 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9216
9217 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9218
9219 * arch/amd64.h: Use common/tdesc.h.
9220 * arch/i386.c: Likewise.
9221 * arch/i386.h: Likewise.
9222 * arch/tic6x.c: Likewise.
9223 * arch/tdesc.h: Move file from here...
9224 * common/tdesc.h: ...to here.
9225 * features/aarch64-core.c: Regenerate.
9226 * features/aarch64-fpu.c: Regenerate.
9227 * features/i386/32bit-avx.c: Regenerate.
9228 * features/i386/32bit-avx512.c: Regenerate.
9229 * features/i386/32bit-core.c: Regenerate.
9230 * features/i386/32bit-linux.c: Regenerate.
9231 * features/i386/32bit-mpx.c: Regenerate.
9232 * features/i386/32bit-pkeys.c: Regenerate.
9233 * features/i386/32bit-sse.c: Regenerate.
9234 * features/i386/64bit-avx.c: Regenerate.
9235 * features/i386/64bit-avx512.c: Regenerate.
9236 * features/i386/64bit-core.c: Regenerate.
9237 * features/i386/64bit-linux.c: Regenerate.
9238 * features/i386/64bit-mpx.c: Regenerate.
9239 * features/i386/64bit-pkeys.c: Regenerate.
9240 * features/i386/64bit-segments.c: Regenerate.
9241 * features/i386/64bit-sse.c: Regenerate.
9242 * features/i386/x32-core.c: Regenerate.
9243 * features/tic6x-c6xp.c: Regenerate.
9244 * features/tic6x-core.c: Regenerate.
9245 * features/tic6x-gp.c: Regenerate.
9246 * target-descriptions.c: Use common/tdesc.h.
9247 * target-descriptions.h: Likewise.
9248
9249 2018-02-24 Tom Tromey <tom@tromey.com>
9250
9251 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9252 (try_thread_db_load_from_dir, thread_db_load_search): Use
9253 std::string.
9254 (info_auto_load_libthread_db_compare): Return bool. Change
9255 argument types.
9256 (info_auto_load_libthread_db): Use std::vector, std::string.
9257 Remove cleanups.
9258
9259 2018-02-24 Tom Tromey <tom@tromey.com>
9260
9261 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9262 std::string.
9263 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9264 std::string*.
9265 * gdbarch.c: Rebuild.
9266 * gdbarch.h: Rebuild.
9267 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9268 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9269 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9270 std::string*.
9271
9272 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9273
9274 * gdbtypes.h (sect_offset): Change type to uint64_t.
9275 (sect_offset_str): New function.
9276 * dwarf2read.c (create_addrmap_from_aranges): Use
9277 sect_offset_str.
9278 (error_check_comp_unit_head): Likewise.
9279 (create_debug_type_hash_table): Likewise.
9280 (read_cutu_die_from_dwo): Likewise.
9281 (init_cutu_and_read_dies): Likewise.
9282 (init_cutu_and_read_dies_no_follow): Likewise.
9283 (process_psymtab_comp_unit_reader): Likewise.
9284 (partial_die_parent_scope): Likewise.
9285 (peek_die_abbrev): Likewise.
9286 (process_queue): Likewise.
9287 (dwarf2_physname): Likewise.
9288 (read_namespace_alias): Likewise.
9289 (read_import_statement): Likewise.
9290 (create_dwo_cu_reader): Likewise.
9291 (create_cus_hash_table): Likewise.
9292 (lookup_dwo_cutu): Likewise.
9293 (inherit_abstract_dies): Likewise.
9294 (read_func_scope): Likewise.
9295 (read_call_site_scope): Likewise.
9296 (dwarf2_add_member_fn): Likewise.
9297 (read_common_block): Likewise.
9298 (read_module_type): Likewise.
9299 (read_typedef): Likewise.
9300 (read_subrange_type): Likewise.
9301 (load_partial_dies): Likewise.
9302 (read_partial_die): Likewise.
9303 (find_partial_die): Likewise.
9304 (read_str_index): Likewise.
9305 (dwarf2_string_attr): Likewise.
9306 (build_error_marker_type): Likewise.
9307 (lookup_die_type): Likewise.
9308 (dump_die_shallow): Likewise.
9309 (follow_die_ref): Likewise.
9310 (dwarf2_fetch_die_loc_sect_off): Likewise.
9311 (dwarf2_fetch_constant_bytes): Likewise.
9312 (follow_die_sig): Likewise.
9313 (get_signatured_type): Likewise.
9314 (get_DW_AT_signature_type): Likewise.
9315 (dwarf2_find_containing_comp_unit): Likewise.
9316 (set_die_type): Likewise.
9317
9318 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9319
9320 * arch/aarch64.c: Include "common-defs.h".
9321 * arch/amd64.c: Likewise.
9322 * arch/i386.c: Likewise.
9323
9324 2018-02-21 Tom Tromey <tom@tromey.com>
9325
9326 * value.h: (extract_field_op): Update.
9327 * eval.c (extract_field_op): Return a const char *.
9328 * expression.h (parse_expression_for_completion): Update.
9329 * completer.c (complete_expression): Update.
9330 (add_struct_fields): Make fieldname const.
9331 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9332 (mark_completion_tag, parse_exp_in_context_1): Update.
9333 (parse_expression_for_completion): Change "name" to
9334 unique_xmalloc_ptr*.
9335
9336 2018-02-21 Tom Tromey <tom@tromey.com>
9337
9338 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9339
9340 2018-02-21 Yao Qi <yao.qi@linaro.org>
9341
9342 * avr-tdep.c (avr_read_pc): Change parameter type to
9343 readable_regcache.
9344 * gdbarch.sh (read_pc): Likewise.
9345 * gdbarch.c: Re-generated.
9346 * gdbarch.h: Re-generated.
9347 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9348 readable_regcache.
9349 * ia64-tdep.c (ia64_read_pc): Likewise.
9350 * mips-tdep.c (mips_read_pc): Likewise.
9351 * spu-tdep.c (spu_read_pc): Likewise.
9352
9353 2018-02-21 Yao Qi <yao.qi@linaro.org>
9354
9355 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9356 * regcache-dump.c: New file.
9357 * regcache.c: Move register_dump to regcache-dump.c.
9358 (maintenance_print_registers): Likewise.
9359 (maintenance_print_raw_registers): Likewise.
9360 (maintenance_print_cooked_registers): Likewise.
9361 (maintenance_print_register_groups): Likewise.
9362 (maintenance_print_remote_registers): Likewise.
9363 (_initialize_regcache): Likewise.
9364 * regcache.h (register_dump): Moved from regcache.c.
9365
9366 2018-02-21 Yao Qi <yao.qi@linaro.org>
9367
9368 * regcache.c (regcache::regcache): Update.
9369 (regcache::invalidate): Move it to detached_regcache::invalidate.
9370 (get_thread_arch_aspace_regcache): Update.
9371 (regcache::raw_update): Update.
9372 (regcache::cooked_read): Remove some code.
9373 (regcache::cooked_read_value): Likewise.
9374 (regcache::raw_write): Remove assert on m_readonly_p.
9375 (regcache::raw_supply_integer): Move it to
9376 detached_regcache::raw_supply_integer.
9377 (regcache::raw_supply_zeroed): Likewise.
9378 * regcache.h (detached_regcache) <raw_supply_integer>: New
9379 declaration.
9380 <raw_supply_zeroed, invalidate>: Likewise.
9381 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9382 <invalidate>: Likewise.
9383 <m_readonly_p>: Removed.
9384
9385 2018-02-21 Yao Qi <yao.qi@linaro.org>
9386
9387 * infcmd.c (get_return_value): Let stop_regs point to
9388 get_current_regcache.
9389 * regcache.c (regcache::regcache): Remove.
9390 (register_dump_reg_buffer): New class.
9391 (regcache_print): Adjust.
9392 * regcache.h (regcache): Remove constructors.
9393
9394 2018-02-21 Yao Qi <yao.qi@linaro.org>
9395
9396 * regcache.c (class register_dump): New class.
9397 (register_dump_regcache, register_dump_none): New class.
9398 (register_dump_remote, register_dump_groups): New class.
9399 (regcache_print): Update.
9400 * regcache.h (regcache_dump_what): Move it to regcache.c.
9401 (regcache) <dump>: Remove.
9402
9403 2018-02-21 Yao Qi <yao.qi@linaro.org>
9404
9405 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9406 reg_buffer_rw *.
9407 (jit_unwind_reg_set_impl): Call raw_supply.
9408 (jit_frame_sniffer): Use reg_buffer_rw.
9409 * record-full.c (record_full_core_regbuf): Change its type.
9410 (record_full_core_open_1): Use reg_buffer_rw.
9411 (record_full_close): Likewise.
9412 (record_full_core_fetch_registers): Use regcache->raw_supply.
9413 (record_full_core_store_registers): Likewise.
9414 * regcache.c (regcache::get_register_status): Move it to
9415 reg_buffer.
9416 (regcache_raw_set_cached_value): Remove.
9417 (regcache::raw_set_cached_value): Remove.
9418 (regcache::raw_write): Call raw_supply.
9419 (regcache::raw_supply): Move it to reg_buffer_rw.
9420 * regcache.h (regcache_raw_set_cached_value): Remove.
9421 (reg_buffer_rw): New class.
9422
9423 2018-02-21 Yao Qi <yao.qi@linaro.org>
9424
9425 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9426 readonly_detached_regcache.
9427 (dummy_frame_prev_register): Use regcache->cooked_read.
9428 * frame.c (frame_save_as_regcache): Change return type.
9429 (frame_pop): Update.
9430 * frame.h (frame_save_as_regcache): Update declaration.
9431 * inferior.h (get_infcall_suspend_state_regcache): Update
9432 declaration.
9433 * infrun.c (infcall_suspend_state) <registers>: use
9434 readonly_detached_regcache.
9435 (save_infcall_suspend_state): Don't use regcache_dup.
9436 (get_infcall_suspend_state_regcache): Change return type.
9437 * linux-fork.c (struct fork_info) <savedregs>: Change to
9438 readonly_detached_regcache.
9439 <pc>: New field.
9440 (fork_save_infrun_state): Don't use regcache_dup.
9441 (info_checkpoints_command): Adjust.
9442 * mi/mi-main.c (register_changed_p): Update declaration.
9443 (mi_cmd_data_list_changed_registers): Use
9444 readonly_detached_regcache.
9445 (register_changed_p): Change parameter type to
9446 readonly_detached_regcache.
9447 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9448 readonly_detached_regcache.
9449 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9450 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9451 New.
9452 (regcache::save): Move it to reg_buffer.
9453 (regcache::restore): Change parameter type.
9454 (regcache_dup): Remove.
9455 * regcache.h (reg_buffer) <save>: New method.
9456 (readonly_detached_regcache): New class.
9457 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9458 readonly_detached_regcache.
9459 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9460
9461 2018-02-21 Yao Qi <yao.qi@linaro.org>
9462
9463 * frame.c (frame_save_as_regcache): Use regcache method save.
9464 (frame_pop): Use regcache method restore.
9465 * infrun.c (restore_infcall_suspend_state): Likewise.
9466 * linux-fork.c (fork_load_infrun_state): Likewise.
9467 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9468 save.
9469 * regcache.c (regcache_save): Remove.
9470 (regcache::restore): More asserts.
9471 (regcache_cpy): Remove.
9472 * regcache.h (regcache_save): Remove the declaration.
9473 (regcache::restore): Move from private to public.
9474 Remove the friend declaration of regcache_cpy.
9475 (regcache_cpy): Remove declaration.
9476
9477 2018-02-21 Yao Qi <yao.qi@linaro.org>
9478
9479 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9480 parameter type to 'readable_regcache *'.
9481 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9482 * arm-tdep.c (arm_neon_quad_read): Likewise.
9483 (arm_pseudo_read): Likewise.
9484 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9485 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9486 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9487 * gdbarch.c: Re-generated.
9488 * gdbarch.h: Re-generated.
9489 * gdbarch.sh (pseudo_register_read): Change parameter type to
9490 'readable_regcache *'.
9491 (pseudo_register_read_value): Likewise.
9492 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9493 (h8300_pseudo_register_read): Likewise.
9494 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9495 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9496 (i386_pseudo_register_read_into_value): Likewise.
9497 (i386_pseudo_register_read_value): Likewise.
9498 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9499 declaration.
9500 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9501 * m32c-tdep.c (m32c_raw_read): Likewise.
9502 (m32c_read_flg): Likewise.
9503 (m32c_banked_register): Likewise.
9504 (m32c_banked_read): Likewise.
9505 (m32c_sb_read): Likewise.
9506 (m32c_part_read): Likewise.
9507 (m32c_cat_read): Likewise.
9508 (m32c_r3r2r1r0_read): Likewise.
9509 (m32c_pseudo_register_read): Likewise.
9510 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9511 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9512 (mep_pseudo_cr64_read): Likewise.
9513 (mep_pseudo_register_read): Likewise.
9514 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9515 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9516 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9517 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9518 (regcache::cooked_read): Likewise.
9519 (regcache::cooked_read_value): Likewise.
9520 (regcache_cooked_read_signed):
9521 (regcache::cooked_read): Likewise.
9522 * regcache.h (readable_regcache): New class.
9523 (regcache): Inherit readable_regcache. Move some methods to
9524 readable_regcache.
9525 * rl78-tdep.c (rl78_pseudo_register_read): Change
9526 parameter type to 'readable_regcache *'.
9527 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9528 (e500_pseudo_register_read): Change parameter type to
9529 'readable_regcache *'.
9530 (dfp_pseudo_register_read): Likewise.
9531 (vsx_pseudo_register_read): Likewise.
9532 (efpr_pseudo_register_read): Likewise.
9533 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9534 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9535 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9536 (sh64_pseudo_register_read): Likewise.
9537 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9538 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9539 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9540 (spu_pseudo_register_read): Likewise.
9541 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9542 (xtensa_pseudo_register_read): Likewise.
9543
9544 2018-02-21 Yao Qi <yao.qi@linaro.org>
9545
9546 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9547 (regcache::arch): Move it to reg_buffer::arch.
9548 (regcache::register_buffer): Likewise.
9549 (regcache::assert_regnum): Likewise.
9550 (regcache::num_raw_registers): Likewise.
9551 * regcache.h (reg_buffer): New class.
9552 (regcache): Inherit reg_buffer.
9553
9554 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9555
9556 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9557 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9558
9559 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9560
9561 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9562
9563 2018-02-19 Alan Hayward <alan.hayward@arm.com>
9564
9565 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9566 (SFILES): Remove common/*.c files.
9567 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9568 * common/common.host: Add common reference.
9569 * configure.ac: Likewise.
9570 * configure: Regenerate.
9571
9572 2018-02-16 Yao Qi <yao.qi@linaro.org>
9573
9574 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9575 (block_initialize_namespace): Use new.
9576 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9577 (dwarf2_free_objfile): Use delete.
9578 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9579 (copy_type_recursive): Use new.
9580 * gdb_obstack.h (allocate_on_obstack): New.
9581
9582 2018-02-15 Yao Qi <yao.qi@linaro.org>
9583
9584 PR gdb/22849
9585 * inferior.c (exit_inferior_1): Reset inf->control.
9586
9587 2018-02-15 Joel Brobecker <brobecker@adacore.com>
9588
9589 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9590 declaration.
9591
9592 2018-02-14 Pedro Alves <palves@redhat.com>
9593
9594 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9595 frame_cleanup_after_sniffer on exception.
9596
9597 2018-02-14 Tom Tromey <tom@tromey.com>
9598
9599 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9600 const.
9601 (solib_bfd_open): Make pathname const.
9602 * solib.c (solib_bfd_open): Make pathname const.
9603 * solib-spu.c (spu_bfd_fopen): Make name const.
9604 (spu_bfd_open): Make pathname const.
9605 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9606 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9607
9608 2018-02-14 Tom Tromey <tom@tromey.com>
9609
9610 * symfile.c (symfile_bfd_open): Update.
9611 * source.h (openp, source_full_path_of, find_and_open_source):
9612 Change argument type to unique_xmalloc_ptr.
9613 * source.c (openp): Take a unique_xmalloc_ptr.
9614 (source_full_path_of, find_and_open_source): Likewise.
9615 (open_source_file, symtab_to_fullname): Update.
9616 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9617 unique_xmalloc_ptr.
9618 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9619 (exec_file_find): Update.
9620 * psymtab.c (psymtab_to_fullname): Update.
9621 * nto-tdep.h (nto_find_and_open_solib): Update.
9622 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9623 unique_xmalloc_ptr.
9624 * exec.c (exec_file_attach): Update.
9625 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9626 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9627
9628 2018-02-14 Tom Tromey <tom@tromey.com>
9629
9630 * solib.c: Include source.h.
9631 * nto-tdep.c: Include source.h.
9632 * mi/mi-cmd-env.c: Include source.h.
9633 * infcmd.c: Include source.h.
9634 * exec.c: Include source.h.
9635 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9636 (add_path, directory_switch, source_path, init_source_path): Move
9637 declarations...
9638 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9639 (add_path, directory_switch, source_path, init_source_path):
9640 ...here.
9641
9642 2018-02-14 Tom Tromey <tom@tromey.com>
9643
9644 * solist.h (exec_file_find, solib_find): Return
9645 unique_xmalloc_ptr.
9646 (solib_bfd_fopen): Take a const char *.
9647 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9648 (exec_file_find, solib_find): Likewise.
9649 (solib_bfd_fopen): Do not take ownership of "pathname".
9650 (solib_bfd_open): Use unique_xmalloc_ptr.
9651 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9652 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9653 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9654 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9655
9656 2018-02-14 Joel Brobecker <brobecker@adacore.com>
9657
9658 * ada-lang.c (name_match_type_from_name): Remove reference to
9659 ada_name_for_lookup in function's documentation.
9660 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9661
9662 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9663
9664 * defs.h (enum openp_flags): New enum.
9665 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9666 Move to enum openp_flags.
9667 (openp_flags): New enum flags.
9668 (openp): Change parameter type to openp_flags.
9669 * source.c (openp): Change parameter type to openp_flags.
9670 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9671 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9672
9673 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9674
9675 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9676 per-command.
9677
9678 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9679
9680 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9681 into...
9682 (class dwarf2_queue_guard): ...the destructor of this new class.
9683 (dw2_do_instantiate_symtab): Create instance of the new class
9684 dwarf2_queue_guard, remove cleanup.
9685
9686 2018-02-09 Tom Tromey <tom@tromey.com>
9687
9688 * source.c (find_source_lines): Don't reference past the end of
9689 the vector.
9690
9691 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9692
9693 * remote.c (remote_btrace_maybe_reopen): Change error message.
9694 * btrace.c (btrace_enable): Likewise.
9695 (parse_xml_btrace): Likewise.
9696 (parse_xml_btrace_conf): Likewise.
9697
9698 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9699
9700 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9701 (linux_enable_pt, linux_enable_bts): Call
9702 diagnose_perf_event_open_fail.
9703
9704 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9705
9706 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9707 Remove parameter and change return type. Update callers. Move it.
9708 (linux_enable_bts, linux_enable_pt): Improve error message.
9709 (linux_enable_pt): Remove zero buffer size check.
9710 (linux_enable_btrace): Improve error messages. Remove NULL return
9711 check.
9712
9713 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9714
9715 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9716 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9717 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9718 (linux_supports_pt, linux_supports_btrace): Remove.
9719 (linux_enable_bts): Call cpu_supports_bts.
9720 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9721 * remote.c (remote_supports_btrace): Remove.
9722 (init_remote_ops): Remove remote_supports_btrace.
9723 * target-delegates.c: Regenerated.
9724 * target.c (target_supports_btrace): Remove.
9725 * target.h (target_ops) <to_supports_btrace>: Remove
9726 (target_supports_btrace): Remove.
9727 * x86-linux-nat.c (x86_linux_create_target): Remove
9728 linux_supports_btrace.
9729
9730 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9731
9732 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9733 btrace failed.
9734 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9735 exception and use message in own exception.
9736
9737 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9738
9739 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9740 (perf_event_pt_event_type): Use gdb_file_up.
9741 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9742 scoped_fd, and scoped_mmap.
9743
9744 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9745
9746 * common/scoped_mmap.h: New.
9747 * unittests/scoped_mmap-selftest.c: New.
9748 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9749 unittests/scoped_mmap-selftest.c.
9750
9751 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9752
9753 * common/scoped_fd.h: New.
9754 * unittests/scoped_fd-selftest.c: New.
9755 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9756 unittests/scoped_fd-selftest.c.
9757
9758 2018-02-09 Tom Tromey <tom@tromey.com>
9759
9760 * auto-load.c (auto_load_section_scripts): Use
9761 gdb::unique_xmalloc_ptr.
9762
9763 2018-02-09 Tom Tromey <tom@tromey.com>
9764
9765 * auto-load.c (execute_script_contents): Use std::string.
9766
9767 2018-02-09 Joel Brobecker <brobecker@adacore.com>
9768
9769 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9770 Python function, rather than a new command.
9771
9772 2018-02-08 Tom Tromey <tom@tromey.com>
9773
9774 * solib.c (solib_find_1): Use std::string.
9775 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9776
9777 2018-02-08 Tom Tromey <tom@tromey.com>
9778
9779 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9780
9781 2018-02-08 Tom Tromey <tom@tromey.com>
9782
9783 * source.c (find_source_lines): Use gdb::def_vector.
9784
9785 2018-02-08 Tom Tromey <tom@tromey.com>
9786
9787 * macrocmd.c (struct temporary_macro_definition): New.
9788 (macro_define_command): Use temporary_macro_definition. Remove
9789 cleanups.
9790 (free_macro_definition_ptr): Remove.
9791
9792 2018-02-08 Tom Tromey <tom@tromey.com>
9793
9794 * macroexp.c (maybe_expand): Use std::string.
9795
9796 2018-02-08 Tom Tromey <tom@tromey.com>
9797
9798 * macroexp.c (struct macro_buffer): Add initializers for some
9799 members.
9800 (init_buffer, init_shared_buffer, free_buffer)
9801 (free_buffer_return_text): Remove.
9802 (macro_buffer): New constructors.
9803 (~macro_buffer): New destructor.
9804 (macro_buffer::set_shared): New method.
9805 (macro_buffer::resize_buffer, macro_buffer::appendc)
9806 (macro_buffer::appendmem): Now methods, not free functions.
9807 (set_token, append_tokens_without_splicing, stringify)
9808 (macro_stringify): Update.
9809 (gather_arguments): Change return type. Remove argc_p argument,
9810 add args_ptr argument. Use std::vector.
9811 (substitute_args): Remove argc argument. Accept std::vector.
9812 (expand): Update. Use std::vector.
9813 (scan, macro_expand, macro_expand_next): Update.
9814
9815 2018-02-08 Tom Tromey <tom@tromey.com>
9816
9817 * symtab.c (default_collect_symbol_completion_matches_break_on):
9818 Use unique_xmalloc_ptr.
9819 * macroscope.h: (sal_macro_scope, user_macro_scope)
9820 (default_macro_scope): Return unique_xmalloc_ptr.
9821 * macroscope.c (sal_macro_scope, user_macro_scope)
9822 (default_macro_scope): Return unique_xmalloc_ptr.
9823 * macroexp.h (macro_expand, macro_expand_once): Return
9824 unique_xmalloc_ptr.
9825 * macroexp.c (macro_expand, macro_expand_once): Return
9826 unique_xmalloc_ptr.
9827 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9828 (info_macro_command, info_macros_command): Use
9829 unique_xmalloc_ptr.
9830 * compile/compile-c-support.c (write_macro_definitions): Use
9831 unique_xmalloc_ptr.
9832 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9833
9834 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9835
9836 * value.c (value_static_field): Assign field type instead of
9837 containing type when returning an optimized out value.
9838
9839 2018-02-06 Yao Qi <yao.qi@linaro.org>
9840
9841 * ft32-tdep.c (ft32_read_pc): Remove.
9842 (ft32_write_pc): Remove.
9843 (ft32_gdbarch_init): Update.
9844 * m32r-tdep.c (m32r_read_pc): Remove.
9845 (m32r_gdbarch_init): Update.
9846 * mep-tdep.c (mep_read_pc): Remove.
9847 (mep_gdbarch_init): Update.
9848 * microblaze-tdep.c (microblaze_write_pc): Remove.
9849 (microblaze_gdbarch_init): Update.
9850 * mn10300-tdep.c (mn10300_read_pc): Remove.
9851 (mn10300_write_pc): Remove.
9852 (mn10300_gdbarch_init): Update.
9853 * moxie-tdep.c (moxie_read_pc): Remove.
9854 (moxie_write_pc): Remove.
9855 (moxie_gdbarch_init): Update.
9856
9857 2018-02-06 Yao Qi <yao.qi@linaro.org>
9858
9859 * expprint.c (print_subexp_standard): Handle
9860 OP_F77_UNDETERMINED_ARGLIST.
9861 (dump_subexp_body_standard): Likewise.
9862
9863 2018-02-05 Alan Hayward <alan.hayward@arm.com>
9864
9865 * target-descriptions.c (tdesc_element_visitor) Add empty
9866 implementations.
9867 (tdesc_type): Move make_gdb_type from here.
9868 (tdesc_type_builtin): Likewise.
9869 (tdesc_type_vector): Likewise.
9870 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9871 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9872 (make_gdb_type_union): Likewise.
9873 (make_gdb_type_flags): Likewise.
9874 (make_gdb_type_enum): Likewise.
9875 (make_gdb_type): New function.
9876 (tdesc_register_type): Use static make_gdb_type.
9877
9878 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9879
9880 * infcmd.c (default_print_one_register_info): Align natural-format
9881 column values consistently one under another.
9882 (pad_to_column): New function.
9883
9884 2018-02-05 Joel Brobecker <brobecker@adacore.com>
9885
9886 * dwarf2read.c (dwarf2_physname): Move commment.
9887
9888 2018-02-01 Leszek Swirski <leszeks@google.com>
9889
9890 * varobj.c (varobj_formatted_print_options): Allow recursive
9891 pretty printing if pretty printing is enabled.
9892
9893 2018-02-01 Leszek Swirski <leszeks@google.com>
9894
9895 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9896 names after a structop as a filename.
9897
9898 2018-02-01 Yao Qi <yao.qi@linaro.org>
9899
9900 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9901 (arm_record_coproc_data_proc): Likewise.
9902
9903 2018-02-01 Yao Qi <yao.qi@linaro.org>
9904
9905 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9906
9907 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9908
9909 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9910 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9911
9912 2018-01-31 Pedro Alves <palves@redhat.com>
9913
9914 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9915 * inflow.c (child_terminal_save_inferior): Wrap reference to
9916 tcgetpgrp in HAVE_TERMIOS_H.
9917 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9918 _WIN32.
9919 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9920 always iterate over all inferiors.
9921 (gdbsim_cntrl_c): Adjust.
9922 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9923
9924 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9925
9926 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9927 index type is objfile-owned if the element type is as well.
9928
9929 2018-01-31 Joel Brobecker <brobecker@adacore.com>
9930
9931 GDB 8.1 released.
9932
9933 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9934
9935 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9936 "features/s390x-linux64.c".
9937 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9938 s390_linux32 and s390x_linux64.
9939 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9940 default tdesc.
9941 * s390-tdep.c: Include "features/s390-linux32.c" and
9942 "features/s390x-linux64.c".
9943 (s390_tdesc_valid): Add check for tdesc_has_registers.
9944 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9945 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9946 tdesc_s390x_linux64.
9947 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9948 tdesc_s390x_linux64 to...
9949 * s390-tdep.h: ...here.
9950
9951 2018-01-30 Pedro Alves <palves@redhat.com>
9952
9953 PR gdb/13211
9954 * config.in, configure: Regenerate.
9955 * configure.ac: Check for getpgid.
9956 * go32-nat.c (go32_pass_ctrlc): New.
9957 (go32_target): Install it.
9958 * inf-child.c (inf_child_target): Install
9959 child_terminal_save_inferior, child_pass_ctrlc and
9960 child_interrupt.
9961 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9962 (inf_ptrace_target): No longer install it.
9963 * infcmd.c (interrupt_target_1): Adjust.
9964 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9965 (child_interrupt): Declare.
9966 (inferior::terminal_state): New.
9967 * inflow.c (struct terminal_info): Update comments.
9968 (inferior_process_group): Delete.
9969 (terminal_is_ours): Delete.
9970 (gdb_tty_state): New.
9971 (child_terminal_init): Adjust.
9972 (is_gdb_terminal, sharing_input_terminal_1)
9973 (sharing_input_terminal): New functions.
9974 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9975 Set the process's actual process group in the foreground if
9976 possible. Handle is_ours_for_output/is_ours distinction. Don't
9977 mark terminal as the inferior's if not sharing GDB's terminal.
9978 Don't check attach_flag.
9979 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9980 pass down a target_terminal_state.
9981 (child_terminal_save_inferior): New, factored out from ...
9982 (child_terminal_ours_1): ... this. Handle
9983 target_terminal_state::is_ours_for_output.
9984 (child_interrupt, child_pass_ctrlc): New.
9985 (inflow_inferior_exit): Clear the inferior's terminal_state.
9986 (copy_terminal_info): Copy the inferior's terminal state.
9987 (_initialize_inflow): Remove reference to terminal_is_ours.
9988 * inflow.h (inferior_process_group): Delete.
9989 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
9990 * procfs.c (procfs_target): Don't install procfs_interrupt.
9991 (procfs_interrupt): Delete.
9992 * remote.c (remote_serial_quit_handler): Adjust.
9993 (remote_interrupt): Remove ptid parameter. Adjust.
9994 * target-delegates.c: Regenerate.
9995 * target.c: Include "terminal.h".
9996 (target_terminal::terminal_state): Rename to ...
9997 (target_terminal::m_terminal_state): ... this.
9998 (target_terminal::init): Adjust.
9999 (target_terminal::inferior): Adjust to per-inferior
10000 terminal_state.
10001 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10002 (target_terminal::ours, target_terminal::ours_for_output): Use
10003 target_terminal_is_ours_kind.
10004 (target_interrupt): Remove ptid parameter. Adjust.
10005 (default_target_pass_ctrlc): Adjust.
10006 * target.h (target_ops::to_terminal_save_inferior): New field.
10007 (target_ops::to_interrupt): Remove ptid_t parameter.
10008 (target_interrupt): Remove ptid_t parameter. Update comment.
10009 (target_pass_ctrlc): Update comment.
10010 * target/target.h (target_terminal_state): New scoped enum,
10011 factored out of ...
10012 (target_terminal::terminal_state): ... here.
10013 (target_terminal::inferior): Update comments.
10014 (target_terminal::restore_inferior): New.
10015 (target_terminal::is_inferior, target_terminal::is_ours)
10016 (target_terminal::is_ours_for_output): Adjust.
10017 (target_terminal::scoped_restore_terminal_state): Adjust to
10018 rename, and call restore_inferior() instead of inferior().
10019 (target_terminal::scoped_restore_terminal_state::m_state): Change
10020 type.
10021 (target_terminal::terminal_state): Rename to ...
10022 (target_terminal::m_terminal_state): ... this and change type.
10023
10024 2018-01-30 Pedro Alves <palves@redhat.com>
10025
10026 * linux-nat.c (wait_for_signal): New function.
10027 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10028 directly.
10029 (async_terminal_is_ours)
10030 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10031 (linux_nat_add_target): Don't override
10032 to_terminal_inferior/to_terminal_ours.
10033
10034 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10035
10036 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10037
10038 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10039
10040 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10041 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10042 dwarf2_per_objfile_free here.
10043 (dwarf2_per_objfile_free): Remove.
10044 (_initialize_dwarf2_read): Don't register
10045 dwarf2_per_objfile_free as a registry cleanup.
10046
10047 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10048
10049 Avoid compilation errors in MinGW native builds
10050
10051 The error is triggered by including python-internal.h, and the
10052 error message is:
10053
10054 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10055 from build-gnulib/import/math.h:27,
10056 from d:/usr/Python26/include/pyport.h:235,
10057 from d:/usr/Python26/include/Python.h:58,
10058 from python/python-internal.h:94,
10059 from python/py-arch.c:24:
10060 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10061 using ::hypot;
10062 ^~~~~
10063
10064 This happens because Python headers define 'hypot' to expand t
10065 '_hypot' in the Windows builds.
10066 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10067 'hypoth'. This avoids a compilation error.
10068
10069 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10070
10071 * MAINTAINERS (Write After Approval): Fix ordering.
10072
10073 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10074
10075 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10076
10077 2018-01-26 Alan Modra <amodra@gmail.com>
10078
10079 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10080 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10081 Remove nop. Make const. Comment.
10082 (powerpc32_plt_stub_so_2): New.
10083 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10084 Correct count. Update uses.
10085 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10086 Move common code reading PLT entry word. Correct
10087 powerpc32_plt_stub PLT address calculation.
10088 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10089 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10090 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10091 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10092 (ppc64_standard_linkage8): Likewise.
10093 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10094 Correct insns description.
10095 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10096
10097 2018-01-24 Pedro Alves <palves@redhat.com>
10098
10099 GCC PR libstdc++/83906
10100 * gdbtypes.c (operator==(const dynamic_prop &,
10101 const dynamic_prop &)): New.
10102 (operator==(const range_bounds &, const range_bounds &)): New.
10103 (check_types_equal): Use them instead of memcmp.
10104 * gdbtypes.h (operator==(const dynamic_prop &,
10105 const dynamic_prop &)): Declare.
10106 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10107 (operator==(const range_bounds &, const range_bounds &)): Declare.
10108 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10109
10110 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10111
10112 * s390-linux-tdep.c (s390_record_address_mask)
10113 (s390_record_calc_disp_common, s390_record_calc_disp)
10114 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10115 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10116 (s390_process_record): Move to s390-tdep.c.
10117 (s390_linux_init_abi_any): Adjust.
10118 * s390-tdep.c (s390_record_address_mask)
10119 (s390_record_calc_disp_common, s390_record_calc_disp)
10120 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10121 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10122 (s390_process_record): Moved from s390-linux-tdep.c
10123 (s390_gdbarch_init): Adjust.
10124
10125 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10126
10127 * s390-linux-nat.c (s390-tdep.h): New include.
10128 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10129 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10130 (ALLDEPFILES): Add s390-tdep.c.
10131 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10132 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10133 * s390-tdep.h: ...this. New file.
10134 * s390-linux-tdep.c (s390-tdep.h): New include.
10135 (_initialize_s390_tdep): Rename to...
10136 (_initialize_s390_linux_tdep): ...this and adjust.
10137 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10138 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10139 s390-tdep.h.
10140 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10141 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10142 (s390_is_partial_instruction, s390_software_single_step)
10143 (is_non_branch_ril, s390_displaced_step_copy_insn)
10144 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10145 (s390_prologue_data, s390_addr, s390_store, s390_load)
10146 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10147 (s390_register_call_saved, s390_guess_tracepoint_registers)
10148 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10149 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10150 (s390_pseudo_register_name, s390_pseudo_register_type)
10151 (s390_pseudo_register_read, s390_pseudo_register_write)
10152 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10153 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10154 (s390_addr_bits_remove, s390_address_class_type_flags)
10155 (s390_address_class_type_flags_to_name)
10156 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10157 (s390_function_arg_float, s390_function_arg_vector)
10158 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10159 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10160 (s390_frame_align, s390_register_return_value, s390_return_value)
10161 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10162 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10163 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10164 (s390_trad_frame_prev_register, s390_unwind_cache)
10165 (s390_prologue_frame_unwind_cache)
10166 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10167 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10168 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10169 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10170 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10171 (s390_frame_base_address, s390_local_base_address)
10172 (s390_frame_base, s390_gcc_target_options)
10173 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10174 (s390_validate_reg_range, s390_tdesc_valid)
10175 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10176 * s390-tdep.c: ...this. New file.
10177
10178 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10179
10180 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10181 (s390_process_record, s390_gdbarch_tdep_alloc)
10182 (s390_linux_init_abi_any): Use/set new hook.
10183
10184 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10185
10186 * s390-linux-tdep.c (osabi.h): New include.
10187 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10188 (s390_linux_init_abi_any): New functions.
10189 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10190
10191 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10192
10193 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10194 tdesc_has_registers check
10195
10196 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10197
10198 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10199 (s390_validate_reg_range): New macro.
10200 (s390_gdbarch_init): Adjust.
10201
10202 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10203
10204 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10205 (s390_gdbarch_tdep_alloc): Adjust.
10206 (s390_gdbarch_init): Adjust.
10207
10208 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10209
10210 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10211 <have_tdb>: Change type to bool.
10212 (s390_gdbarch_tdep_alloc): Adjust.
10213 (s390_gdbarch_init): Adjust.
10214
10215 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10216
10217 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10218 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10219 (s390_gdbarch_tdep_alloc): New function.
10220 (s390_gdbarch_init): Allocate tdep at start and use its fields
10221 instead of separate variables.
10222
10223 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10224
10225 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10226 when looking for cached gdbarch and add comment for remaining.
10227
10228 2018-01-22 Pedro Alves <palves@redhat.com>
10229 Sergio Durigan Junior <sergiodj@redhat.com>
10230
10231 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10232 case.
10233
10234 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10235
10236 * MAINTAINERS: Update my company e-mail address.
10237
10238 2018-01-22 Yao Qi <yao.qi@linaro.org>
10239
10240 * regcache.c (cooked_write_test): New function.
10241 (_initialize_regcache): Register the test.
10242
10243 2018-01-22 Yao Qi <yao.qi@linaro.org>
10244
10245 * ia64-tdep.c (ia64_pseudo_register_read): Call
10246 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10247 * m32c-tdep.c (m32c_cat_read): Likewise.
10248 (m32c_r3r2r1r0_read): Likewise.
10249 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10250 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10251
10252 2018-01-22 Yao Qi <yao.qi@linaro.org>
10253
10254 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10255 method raw_read instead of regcache_raw_read.
10256 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10257 * arm-tdep.c (arm_neon_quad_read): Likewise.
10258 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10259 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10260 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10261 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10262 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10263 (i386_pseudo_register_read_into_value): Likewise.
10264 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10265 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10266 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10267 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10268 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10269 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10270 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10271 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10272 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10273
10274 2018-01-22 Yao Qi <yao.qi@linaro.org>
10275
10276 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10277 * configure.tgt: Remove target mt.
10278 * mt-tdep.c: Remove.
10279 * regcache.c (cooked_read_test): Remove the check for mt.
10280
10281 2018-01-22 Yao Qi <yao.qi@linaro.org>
10282
10283 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10284 instead of gdbarch_pseudo_register_read_value.
10285
10286 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10287
10288 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10289 language is Ada.
10290
10291 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10292
10293 * linespec.c (create_sals_line_offset): Remove code that preserved
10294 the symtab_and_line's line number.
10295
10296 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10297
10298 * varobj.c (varobj_create): Don't set valid_block when creating a
10299 floating varobj.
10300
10301 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10302
10303 * varobj.c (varobj_create): Remove out of date comment.
10304
10305 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10306
10307 PR mi/20395
10308 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10309 updating innermost block.
10310 * parse.c (innermost_block_tracker::update): Take extra type
10311 parameter, and check types match before updating innermost block.
10312 (write_dollar_variable): Update innermost block for registers.
10313 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10314 (innermost_block_tracker::innermost_block_tracker): Initialise
10315 m_types member.
10316 (innermost_block_tracker::reset): Take type parameter.
10317 (innermost_block_tracker::update): Take type parameter, and pass
10318 type through as needed.
10319 (innermost_block_tracker::m_types): New member.
10320 * varobj.c (varobj_create): Pass type when reseting innermost
10321 block.
10322
10323 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10324
10325 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10326 * ada-lang.c (resolve_subexp): Likewise.
10327 * breakpoint.c (set_breakpoint_condition) Likewise.
10328 (watch_command_1) Likewise.
10329 * c-exp.y (variable): Likewise.
10330 * d-exp.y (PrimaryExpression): Likewise.
10331 * f-exp.y (variable): Likewise.
10332 * go-exp.y (variable): Likewise.
10333 * m2-exp.y (variable): Likewise.
10334 * objfiles.c (objfile::~objfile): Likewise.
10335 * p-exp.y (variable): Likewise.
10336 * parse.c (innermost_block): Change type.
10337 * parser-defs.h (class innermost_block_tracker): New.
10338 (innermost_block): Change to innermost_block_tracker.
10339 * printcmd.c (display_command): Switch to innermost_block API.
10340 (do_one_display): Likewise.
10341 * rust-exp.y (do_one_display): Likewise.
10342 * symfile.c (clear_symtab_users): Likewise.
10343 * varobj.c (varobj_create): Switch to innermost_block API, replace
10344 use of innermost_block with block stored on varobj object.
10345
10346 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10347
10348 * expression.h (innermost_block): Remove declaration.
10349 * varobj.c: Add 'parser-defs.h' include.
10350
10351 2018-01-19 Tom Tromey <tom@tromey.com>
10352
10353 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10354 symbols in the static and global blocks.
10355
10356 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10357
10358 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10359 gdb_ptrace.h, and move including gdb_wait.h ...
10360 * nat/linux-ptrace.h: ... to here.
10361
10362 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10363
10364 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10365 inf_ptrace_detach_success.
10366 (inf_ptrace_detach_success): Add inferior parameter, use it
10367 instead of inferior_ptid, pass it to detach_inferior.
10368 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10369 parameter.
10370 * inferior.c (detach_inferior): Add overload that takes an
10371 inferior object.
10372 * inferior.h (detach_inferior): Likewise.
10373 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10374 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10375 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10376
10377 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10378
10379 * target.h (struct target_ops) <to_detach>: Add inferior
10380 parameter.
10381 (target_detach): Likewise.
10382 * target.c (dispose_inferior): Pass inferior down.
10383 (target_detach): Pass inferior down. Assert that it is equal to
10384 the current inferior.
10385 * aix-thread.c (aix_thread_detach): Pass inferior down.
10386 * corefile.c (core_file_command): Pass current_inferior() down.
10387 * corelow.c (core_detach): Add inferior parameter.
10388 * darwin-nat.c (darwin_detach): Likewise.
10389 * gnu-nat.c (gnu_detach): Likewise.
10390 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10391 * infcmd.c (detach_command): Pass current_inferior() down to
10392 target_detach.
10393 * infrun.c (follow_fork_inferior): Pass parent_inf to
10394 target_detach.
10395 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10396 target_detach.
10397 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10398 * linux-thread-db.c (thread_db_detach): Likewise.
10399 * nto-procfs.c (procfs_detach): Likewise.
10400 * procfs.c (procfs_detach): Likewise.
10401 * record.c (record_detach): Likewise.
10402 * record.h (struct inferior): Forward-declare.
10403 (record_detach): Add inferior parameter.
10404 * remote-sim.c (gdbsim_detach): Likewise.
10405 * remote.c (remote_detach_1): Likewise.
10406 (remote_detach): Likewise.
10407 (extended_remote_detach): Likewise.
10408 * sol-thread.c (sol_thread_detach): Likewise.
10409 * target-debug.h (target_debug_print_inferior_p): New macro.
10410 * target-delegates.c: Re-generate.
10411 * top.c (kill_or_detach): Pass inferior down to target_detach.
10412 * windows-nat.c (windows_detach): Add inferior parameter.
10413
10414 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10415
10416 * target.h (struct target_ops) <to_detach>: Remove args
10417 parameter.
10418 (target_detach): Likewise.
10419 * target.c (dispose_inferior): Adjust.
10420 (target_detach): Remove args parameter, adjust.
10421 * aix-thread.c (aix_thread_detach): Adjust.
10422 * corefile.c (core_file_command): Adjust.
10423 * corelow.c (core_detach): Adjust.
10424 * darwin-nat.c (darwin_detach): Adjust.
10425 * gnu-nat.c (gnu_detach): Adjust.
10426 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10427 * infcmd.c (detach_command): Adjust
10428 * infrun.c (follow_fork_inferior): Adjust.
10429 (handle_vfork_child_exec_or_exit): Adjust.
10430 * linux-fork.c (linux_fork_detach): Remove args parameter.
10431 * linux-fork.h (linux_fork_detach): Likewise.
10432 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10433 * linux-thread-db.c (thread_db_detach): Likewise.
10434 * nto-procfs.c (procfs_detach): Likewise.
10435 * procfs.c (procfs_detach): Likewise.
10436 (do_detach): Remove signo parameter.
10437 * record.c (record_detach): Remove args parameter.
10438 * record.h (record_detach): Likewise.
10439 * remote-sim.c (gdbsim_detach): Likewise.
10440 * remote.c (remote_detach_1): Likewise.
10441 (remote_detach): Likewise.
10442 (extended_remote_detach): Likewise.
10443 * sol-thread.c (sol_thread_detach): Likewise.
10444 * target-delegates.c: Re-generate.
10445 * top.c (struct qt_args) <args>: Remove field.
10446 (kill_or_detach): Don't pass args.
10447 (quit_force): Don't set args.
10448 * windows-nat.c (windows_detach): Remove args parameter.
10449
10450 2018-01-19 Yao Qi <yao.qi@linaro.org>
10451
10452 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10453 (arm_linux_init_abi): Install it.
10454
10455 2018-01-19 Yao Qi <yao.qi@linaro.org>
10456
10457 * osabi.c (gdb_osabi_names): Extend the regexp for
10458 arm-linux-gnueabihf.
10459
10460 2018-01-18 Yao Qi <yao.qi@linaro.org>
10461
10462 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10463 m_abbrevs.
10464 (abbrev_table::add_abbrev): Update.
10465 (abbrev_table::lookup_abbrev): Update.
10466
10467 2018-01-18 Yao Qi <yao.qi@linaro.org>
10468
10469 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10470
10471 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10472
10473 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10474 to "std::string".
10475
10476 2018-01-17 Tom Tromey <tom@tromey.com>
10477
10478 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10479
10480 2018-01-17 Tom Tromey <tom@tromey.com>
10481
10482 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10483 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10484 (create_array_type_with_stride): Update.
10485 * dwarf2read.c (set_die_type): Update.
10486
10487 2018-01-17 Tom Tromey <tom@tromey.com>
10488
10489 * dwarf2read.c (delayed_method_info): Remove typedef.
10490 (dwarf2_cu::method_info): Now a std::vector.
10491 (add_to_method_list): Update.
10492 (free_delayed_list): Remove.
10493 (compute_delayed_physnames): Update.
10494 (process_full_comp_unit, process_full_type_unit): Clear the method
10495 list. Remove cleanups.
10496 (psymtab_include_file_name): Add name_holder parameter. Use
10497 unique_xmalloc_ptr.
10498 (dwarf_decode_lines): Update.
10499
10500 2018-01-17 Tom Tromey <tom@tromey.com>
10501 Simon Marchi <simon.marchi@ericsson.com>
10502
10503 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10504 (dwarf2_per_objfile::free_cached_comp_units)
10505 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10506 (init_cutu_and_read_dies_no_follow): Update.
10507 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10508 (dwarf2_cu::~dwarf2_cu): New.
10509 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10510 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10511
10512 2018-01-17 Tom Tromey <tom@tromey.com>
10513 Simon Marchi <simon.marchi@ericsson.com>
10514
10515 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10516 (struct die_reader_specs) <abbrev_table>: New member.
10517 (struct abbrev_table): Add constructor.
10518 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10519 <abbrev_obstack>: Now an auto_obstack.
10520 (abbrev_table_up): New typedef.
10521 (init_cu_die_reader): Add abbrev_table parameter.
10522 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10523 Add result_dwo_abbrev_table.
10524 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10525 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10526 Update.
10527 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10528 parameter.
10529 (skip_children): Update.
10530 (abbrev_table::alloc_abbrev): Rename from
10531 abbrev_table_alloc_abbrev.
10532 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10533 (abbrev_table::lookup_abbrev): Rename from
10534 abbrev_table_lookup_abbrev.
10535 (abbrev_table_read_table): Return abbrev_table_up.
10536 (abbrev_table_free, abbrev_table_free_cleanup)
10537 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10538 (load_partial_dies): Update.
10539
10540 2018-01-17 Tom Tromey <tom@tromey.com>
10541
10542 * dwarf2read.c (dwarf2_compute_name): Update comment.
10543 (read_func_scope, read_variable): Update.
10544 (new_symbol): Remove.
10545 (new_symbol_full): Rename to new_symbol.
10546
10547 2018-01-17 Mike Gulick <mgulick@mathworks.com>
10548
10549 PR gdb/16577
10550 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10551 a warning instead of throwing an error, set section size to 0 and return
10552 NULL.
10553 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10554
10555 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10556
10557 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10558 std::string.
10559 (linux_ptrace_attach_fail_reason_string): Likewise.
10560 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10561 Likewise.
10562 (linux_ptrace_attach_fail_reason_string): Likewise.
10563 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10564
10565 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10566
10567 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10568
10569 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10570
10571 PR gdb/21559
10572 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10573 checking for fs_base/gs_base fields in struct user_regs_struct.
10574 * configure: Regenerate.
10575
10576 2018-01-17 Yao Qi <yao.qi@linaro.org>
10577
10578 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10579 function.
10580 (aarch64_linux_init_abi): Install it to gdbarch hook
10581 gcc_target_options.
10582
10583 2018-01-15 Pedro Alves <palves@redhat.com>
10584
10585 * common/signals-state-save-restore.c
10586 (save_original_signals_state): Fix typos.
10587
10588 2017-01-12 Tom Tromey <tom@tromey.com>
10589 Sergio Durigan Junior <sergiodj@redhat.com>
10590
10591 * Makefile.in (install-only): Install gdb-add-index.
10592
10593 2018-01-12 John Baldwin <jhb@FreeBSD.org>
10594
10595 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10596
10597 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10598
10599 * infrun.c (keep_going_pass_signal): Clear step-over info when
10600 insert_breakpoints fails.
10601
10602 2018-01-11 Pedro Alves <palves@redhat.com>
10603
10604 PR gdb/22583
10605 * infrun.c (resume): Rename to ...
10606 (resume_1): ... this.
10607 (resume): Reimplement as wrapper around resume_1.
10608
10609 2018-01-11 Pedro Alves <palves@redhat.com>
10610
10611 PR remote/22597
10612 * remote.c (remote_parse_stop_reply): Default to the last-set
10613 general thread instead of to 'magic_null_ptid'.
10614
10615 2018-01-10 Pedro Alves <palves@redhat.com>
10616
10617 * language.h (language_get_symbol_name_matcher): Rename ...
10618 (get_symbol_name_matcher): ... this.
10619 * language.c (language_get_symbol_name_matcher): Ditto.
10620 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10621 callers adjusted.
10622
10623 2018-01-10 Pedro Alves <palves@redhat.com>
10624
10625 PR gdb/22670
10626 * dwarf2read.c
10627 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10628 Adjust to use language_get_symbol_name_matcher instead of
10629 language_defn::la_get_symbol_name_matcher.
10630 * language.c (language_get_symbol_name_matcher): If in Ada mode
10631 and the lookup name is a verbatim match, return Ada's matcher.
10632 * language.h (language_get_symbol_name_matcher): Adjust comment.
10633 (ada_lookup_name_info::verbatim_p):: New method.
10634
10635 2018-01-10 Pedro Alves <palves@redhat.com>
10636
10637 PR gdb/22670
10638 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10639 minsym's language is language_auto or language_cplus, pass down
10640 language_ada instead.
10641 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10642
10643 2018-01-10 Pedro Alves <palves@redhat.com>
10644
10645 PR gdb/22670
10646 * minsyms.c (linkage_name_str): New function.
10647 (iterate_over_minimal_symbols): Use it.
10648
10649 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10650
10651 * NEWS: Document that 'info proc' now works on FreeBSD.
10652
10653 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10654
10655 * configure.ac: Check for kinfo_getfile in libutil.
10656 * configure: Regenerate.
10657 * config.in: Regenerate.
10658 * fbsd-nat.c: Include "fbsd-tdep.h".
10659 (fbsd_fetch_cmdline): New.
10660 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10661 rather than calling error.
10662 (fbsd_info_proc): New.
10663 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10664 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10665 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10666
10667 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10668
10669 * fbsd-nat.c (struct free_deleter): Remove.
10670 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10671
10672 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10673
10674 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10675 NULL for an empty pathname.
10676
10677 2018-01-09 John Baldwin <jhb@FreeBSD.org>
10678
10679 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10680 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10681 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10682 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10683 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10684 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10685 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10686 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10687 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10688 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10689 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10690 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10691 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10692 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10693 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10694
10695 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10696
10697 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10698 (gnu_xfer_auxv): New function.
10699 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10700 TARGET_OBJECT_AUXV.
10701
10702 2018-01-08 Yao Qi <yao.qi@linaro.org>
10703 Simon Marchi <simon.marchi@ericsson.com>
10704
10705 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10706 common/selftest.c.
10707 (COMMON_OBS): Remove selftest.o.
10708 * configure.ac: Append selftest-arch.c and common/selftest.c to
10709 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10710 * configure: Re-generated.
10711 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10712 GDB_SELF_TEST.
10713 (maintenance_info_selftests): Likewise.
10714
10715 2018-01-08 Xavier Roirand <roirand@adacore.com>
10716
10717 * ada-valprint.c (val_print_packed_array_elements): Use
10718 proper number of elements when printing an array indexed
10719 by an enumeration type.
10720
10721 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10722
10723 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10724 (dw2_get_file_names_reader): Adjust.
10725 (lookup_dwo_signatured_type): Adjust.
10726 (lookup_dwp_signatured_type): Adjust.
10727 (lookup_signatured_type): Adjust.
10728 (create_type_unit_group): Adjust.
10729 (get_type_unit_group): Adjust.
10730 (process_psymtab_comp_unit_reader): Adjust.
10731 (build_type_psymtabs_reader): Adjust.
10732 (scan_partial_symbols): Adjust.
10733 (add_partial_symbol): Adjust.
10734 (add_partial_subprogram): Adjust.
10735 (peek_die_abbrev): Adjust.
10736 (fixup_go_packaging): Adjust.
10737 (process_imported_unit_die): Adjust.
10738 (dwarf2_compute_name): Adjust.
10739 (dwarf2_physname): Adjust.
10740 (read_import_statement): Adjust.
10741 (handle_DW_AT_stmt_list): Adjust.
10742 (read_file_scope): Adjust.
10743 (read_func_scope): Adjust.
10744 (read_lexical_block_scope): Adjust.
10745 (read_call_site_scope): Adjust.
10746 (read_variable): Adjust.
10747 (dwarf2_rnglists_process): Adjust.
10748 (dwarf2_ranges_process): Adjust.
10749 (dwarf2_ranges_read): Adjust.
10750 (dwarf2_get_pc_bounds): Adjust.
10751 (dwarf2_record_block_ranges): Adjust.
10752 (dwarf2_add_field): Adjust.
10753 (dwarf2_add_member_fn): Adjust.
10754 (read_structure_type): Adjust.
10755 (process_structure_scope): Adjust.
10756 (read_enumeration_type): Adjust.
10757 (read_array_type): Adjust.
10758 (mark_common_block_symbol_computed): Adjust.
10759 (read_common_block): Adjust.
10760 (read_namespace_type): Adjust.
10761 (read_namespace): Adjust.
10762 (read_module_type): Adjust.
10763 (read_tag_pointer_type): Adjust.
10764 (read_tag_ptr_to_member_type): Adjust.
10765 (read_tag_string_type): Adjust.
10766 (read_subroutine_type): Adjust.
10767 (read_typedef): Adjust.
10768 (read_base_type): Adjust.
10769 (attr_to_dynamic_prop): Adjust.
10770 (read_subrange_type): Adjust.
10771 (read_unspecified_type): Adjust.
10772 (dwarf2_read_abbrevs): Adjust.
10773 (load_partial_dies): Adjust.
10774 (read_partial_die): Adjust.
10775 (find_partial_die): Adjust.
10776 (guess_partial_die_structure_name): Adjust.
10777 (fixup_partial_die): Adjust.
10778 (read_attribute_value): Adjust.
10779 (read_addr_index): Adjust.
10780 (read_addr_index_from_leb128): Adjust.
10781 (read_str_index): Adjust.
10782 (dwarf2_string_attr): Adjust.
10783 (get_debug_line_section): Adjust.
10784 (dwarf_decode_line_header): Adjust.
10785 (lnp_state_machine::check_line_address): Adjust.
10786 (dwarf_decode_lines_1): Adjust.
10787 (dwarf_decode_lines): Adjust.
10788 (dwarf2_start_symtab): Adjust.
10789 (var_decode_location): Adjust.
10790 (new_symbol_full): Adjust.
10791 (dwarf2_const_value_data): Adjust.
10792 (dwarf2_const_value_attr): Adjust.
10793 (dwarf2_const_value): Adjust.
10794 (die_type): Adjust.
10795 (die_containing_type): Adjust.
10796 (build_error_marker_type): Adjust.
10797 (lookup_die_type): Adjust.
10798 (guess_full_die_structure_name): Adjust.
10799 (anonymous_struct_prefix): Adjust.
10800 (determine_prefix): Adjust.
10801 (dwarf2_name): Adjust.
10802 (follow_die_ref_or_sig): Adjust.
10803 (follow_die_offset): Adjust.
10804 (follow_die_ref): Adjust.
10805 (follow_die_sig_1): Adjust.
10806 (follow_die_sig): Adjust.
10807 (get_signatured_type): Adjust.
10808 (get_DW_AT_signature_type): Adjust.
10809 (decode_locdesc): Adjust.
10810 (dwarf_decode_macros): Adjust.
10811 (cu_debug_loc_section): Adjust.
10812 (fill_in_loclist_baton): Adjust.
10813 (dwarf2_symbol_mark_computed): Adjust.
10814 (init_one_comp_unit): Don't assign
10815 dwarf2_cu::dwarf2_per_objfile.
10816 (set_die_type): Adjust.
10817
10818 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10819
10820 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10821 <dwarf2_per_objfile>: New field.
10822 (dwarf2_per_objfile): Remove global.
10823 (get_dwarf2_per_objfile): New function.
10824 (set_dwarf2_per_objfile): New function.
10825 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10826 dwarf2_per_objfile.
10827 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10828 (read_abbrev_offset): Likewise.
10829 (read_indirect_string): Likewise.
10830 (read_indirect_line_string): Likewise.
10831 (read_indirect_string_at_offset): Likewise.
10832 (read_indirect_string_from_dwz): Likewise.
10833 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10834 dwarf2_per_objfile.
10835 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10836 (create_all_comp_units): Change objfile parameter to
10837 dwarf2_per_objfile.
10838 (create_all_type_units): Likewise.
10839 (process_queue): Add dwarf2_per_objfile parameter.
10840 (read_and_check_comp_unit_head): Likewise.
10841 (lookup_dwo_unit_in_dwp): Likewise.
10842 (get_dwp_file): Likewise.
10843 (process_cu_includes): Likewise.
10844 (struct free_dwo_file_cleanup_data): New struct.
10845 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10846 set_dwarf2_per_objfile.
10847 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10848 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10849 context, adjust calls.
10850 (dw2_instantiate_symtab): Likewise.
10851 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10852 (dw2_get_cu): Likewise.
10853 (create_cu_from_index_list): Change objfile parameter to
10854 dwarf2_per_objfile.
10855 (create_cus_from_index_list): Get dwarf2_per_objfile from
10856 context, adjust calls.
10857 (create_cus_from_index): Likewise.
10858 (create_signatured_type_table_from_index): Change objfile
10859 parameter to dwarf2_per_objfile.
10860 (create_signatured_type_table_from_debug_names): Change objfile
10861 parameter to dwarf2_per_objfile.
10862 (create_addrmap_from_index): Likewise.
10863 (create_addrmap_from_aranges): Likewise.
10864 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10865 (dw2_setup): Remove.
10866 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10867 context.
10868 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10869 get_dwarf2_per_objfile.
10870 (dw2_forget_cached_source_info): Likewise.
10871 (dw2_map_symtabs_matching_filename): Likewise.
10872 (struct dw2_symtab_iterator) <index>: Remove.
10873 <dwarf2_per_objfile>: New field.
10874 (dw2_symtab_iter_init): Replace index parameter with
10875 dwarf2_per_objfile.
10876 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10877 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10878 (dw2_print_stats): Likewise.
10879 (dw2_dump): Likewise.
10880 (dw2_expand_symtabs_for_function): Likewise.
10881 (dw2_expand_all_symtabs): Likewise.
10882 (dw2_expand_symtabs_with_fullname): Likewise.
10883 (dw2_expand_marked_cus): Replace index and objfile parameters
10884 with dwarf2_per_objfile.
10885 (dw_expand_symtabs_matching_file_matcher): Add
10886 dwarf2_per_objfile parameter and adjust calls.
10887 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10888 adjust calls.
10889 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10890 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10891 adjust calls.
10892 (create_cus_from_debug_names_list): Replace objfile parameter
10893 with dwarf2_per_objfile and adjust calls.
10894 (create_cus_from_debug_names): Likewise.
10895 (dwarf2_read_debug_names): Likewise.
10896 (mapped_debug_names::namei_to_name): Adjust call.
10897 (dw2_debug_names_iterator::next): Likewise.
10898 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10899 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10900 (dw2_debug_names_dump): Likewise.
10901 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10902 (dw2_debug_names_expand_symtabs_matching): Likewise.
10903 (dwarf2_initialize_objfile): Likewise.
10904 (dwarf2_build_psymtabs): Likewise.
10905 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10906 this_cu.
10907 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10908 (read_and_check_comp_unit_head): Likewise.
10909 (read_abbrev_offset): Likewise.
10910 (create_debug_type_hash_table): Likewise.
10911 (create_debug_types_hash_table): Likewise.
10912 (create_all_type_units): Replace objfile parameter with
10913 dwarf2_per_objfile.
10914 (add_type_unit): Add dwarf2_per_objfile parameter.
10915 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10916 with dwarf2_per_objfile.
10917 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10918 (lookup_dwp_signatured_type): Likewise.
10919 (lookup_signatured_type): Likewise.
10920 (read_cutu_die_from_dwo): Likewise.
10921 (init_tu_and_read_dwo_dies): Likewise.
10922 (init_cutu_and_read_dies): Likewise.
10923 (init_cutu_and_read_dies_no_follow): Likewise.
10924 (allocate_type_unit_groups_table): Add objfile parameter.
10925 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10926 (get_type_unit_group): Likewise.
10927 (process_psymtab_comp_unit): Update call.
10928 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10929 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10930 (print_tu_stats): Likewise.
10931 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10932 in void* parameter.
10933 (build_type_psymtabs): Change objfile parameter to
10934 dwarf2_per_objfile.
10935 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10936 passed in void* parameter.
10937 (process_skeletonless_type_units): Change objfile parameter to
10938 dwarf2_per_objfile.
10939 (set_partial_user): Likewise.
10940 (dwarf2_build_psymtabs_hard): Likewise.
10941 (read_comp_units_from_section): Likewise.
10942 (create_all_comp_units): Likewise.
10943 (scan_partial_symbols): Update calls.
10944 (add_partial_symbol): Likewise.
10945 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10946 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10947 (process_queue): Add dwarf2_per_objfile parameter.
10948 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10949 (compute_compunit_symtab_includes): Likewise.
10950 (process_cu_includes): Add dwarf2_per_objfile parameter.
10951 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10952 (process_full_type_unit): Likewise.
10953 (process_imported_unit_die): Update call.
10954 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10955 (read_file_scope): Likewise.
10956 (allocate_dwo_file_hash_table): Add objfile parameter.
10957 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10958 (create_cus_hash_table): Likewise.
10959 (create_dwp_hash_table): Likewise.
10960 (create_dwo_unit_in_dwp_v1): Likewise.
10961 (create_dwp_v2_section): Likewise.
10962 (create_dwo_unit_in_dwp_v2): Likewise.
10963 (lookup_dwo_unit_in_dwp): Likewise.
10964 (try_open_dwop_file): Likewise.
10965 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10966 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10967 cleanup to include a reference to dwarf2_per_objfile.
10968 (open_dwp_file): Add dwarf2_per_objfile parameter.
10969 (open_and_init_dwp_file): Likewise.
10970 (get_dwp_file): Likewise.
10971 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10972 (queue_and_load_all_dwo_tus): Update call.
10973 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10974 data.
10975 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10976 (dwarf2_ranges_process): Likewise.
10977 (dwarf2_get_pc_bounds): Likewise.
10978 (mark_common_block_symbol_computed): Likewise.
10979 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10980 (dwarf2_read_abbrevs): Update call.
10981 (read_partial_die): Use dwarf2_per_objfile from cu.
10982 (find_partial_die): Likewise.
10983 (fixup_partial_die): Likewise.
10984 (read_attribute_value): Likewise.
10985 (read_indirect_string_at_offset_from): Add objfile parameter.
10986 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10987 parameter.
10988 (read_indirect_string_from_dwz): Add objfile parameter.
10989 (read_indirect_string): Add objfile parameter.
10990 (read_addr_index_1): Add dwarf2_per_objfile parameter.
10991 (read_addr_index): Use dwarf2_per_objfile from cu.
10992 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
10993 call dw2_setup.
10994 (read_str_index): Use dwarf2_per_objfile from cu.
10995 (get_debug_line_section): Likewise.
10996 (read_formatted_entries): Add dwarf2_per_objfile parameter.
10997 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
10998 (new_symbol_full): Use dwarf2_per_objfile from cu.
10999 (build_error_marker_type): Likewise.
11000 (lookup_die_type): Likewise.
11001 (determine_prefix): Likewise.
11002 (follow_die_offset): Likewise.
11003 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11004 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11005 (dwarf2_fetch_die_type_sect_off): Likewise.
11006 (dwarf2_get_die_type): Likewise.
11007 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11008 (get_signatured_type): Likewise.
11009 (get_DW_AT_signature_type): Likewise.
11010 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11011 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11012 (cu_debug_loc_section): Likewise.
11013 (fill_in_loclist_baton): Likewise.
11014 (dwarf2_symbol_mark_computed): Likewise.
11015 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11016 dwarf2_per_objfile.
11017 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11018 parameter.
11019 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11020 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11021 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11022 (set_die_type): Use dwarf2_free_objfile from cu.
11023 (get_die_type_at_offset): Likewise.
11024 (dwarf2_per_objfile_free): Don't assign global variable.
11025 (debug_names) <constructor>: Add dwarf2_per_objfile
11026 parameter, update m_debugstrlookup construction.
11027 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11028 parameter.
11029 <m_dwarf2_per_objfile>: New field.
11030 <lookup>: Use m_dwarf2_per_objfile.
11031 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11032 (psyms_seen_size): Likewise.
11033 (write_gdbindex): Replace objfile parameter with
11034 dwarf2_per_objfile.
11035 (write_debug_names): Likewise.
11036 (write_psymtabs_to_index): Likewise.
11037 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11038 calls.
11039
11040 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11041
11042 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11043 <dwarf2_per_objfile>: New field.
11044 (struct dwarf2_per_cu_data) <objfile>: Remove.
11045 <dwarf2_per_objfile>: New field.
11046 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11047 of objfile.
11048 (create_signatured_type_table_from_index): Likewise.
11049 (create_debug_type_hash_table): Likewise.
11050 (fill_in_sig_entry_from_dwo_entry): Likewise.
11051 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11052 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11053 objfile.
11054 (create_partial_symtab): Access objfile through
11055 dwarf2_per_objfile.
11056 (process_psymtab_comp_unit_reader): Likewise.
11057 (read_comp_units_from_section): Likewise.
11058 (scan_partial_symbols): Likewise.
11059 (add_partial_symbol): Likewise.
11060 (add_partial_subprogram): Likewise.
11061 (peek_die_abbrev): Likewise.
11062 (fixup_go_packaging): Likewise.
11063 (process_full_comp_unit): Likewise.
11064 (process_full_type_unit): Likewise.
11065 (process_imported_unit_die): Likewise.
11066 (dwarf2_compute_name): Likewise.
11067 (dwarf2_physname): Likewise.
11068 (read_import_statement): Likewise.
11069 (create_cus_hash_table): Assign dwarf2_physname instead of
11070 objfile.
11071 (read_func_scope): Access objfile through dwarf2_per_objfile.
11072 (read_lexical_block_scope): Likewise.
11073 (read_call_site_scope): Likewise.
11074 (read_variable): Likewise.
11075 (dwarf2_rnglists_process): Likewise.
11076 (dwarf2_ranges_process): Likewise.
11077 (dwarf2_ranges_read): Likewise.
11078 (dwarf2_record_block_ranges): Likewise.
11079 (dwarf2_add_field): Likewise.
11080 (dwarf2_add_member_fn): Likewise.
11081 (read_structure_type): Likewise.
11082 (process_structure_scope): Likewise.
11083 (read_enumeration_type): Likewise.
11084 (read_array_type): Likewise.
11085 (read_common_block): Likewise.
11086 (read_namespace_type): Likewise.
11087 (read_namespace): Likewise.
11088 (read_module_type): Likewise.
11089 (read_tag_pointer_type): Likewise.
11090 (read_tag_ptr_to_member_type): Likewise.
11091 (read_tag_string_type): Likewise.
11092 (read_subroutine_type): Likewise.
11093 (read_typedef): Likewise.
11094 (read_base_type): Likewise.
11095 (attr_to_dynamic_prop): Likewise.
11096 (read_subrange_type): Likewise.
11097 (read_unspecified_type): Likewise.
11098 (load_partial_dies): Likewise.
11099 (read_partial_die): Likewise.
11100 (find_partial_die): Likewise.
11101 (guess_partial_die_structure_name): Likewise.
11102 (fixup_partial_die): Likewise.
11103 (read_attribute_value): Likewise.
11104 (read_addr_index_from_leb128): Likewise.
11105 (dwarf2_read_addr_index): Likewise.
11106 (dwarf2_string_attr): Likewise.
11107 (lnp_state_machine::check_line_address): Likewise.
11108 (dwarf_decode_lines_1): Likewise.
11109 (dwarf_decode_lines): Likewise.
11110 (dwarf2_start_symtab): Likewise.
11111 (var_decode_location): Likewise.
11112 (new_symbol_full): Likewise.
11113 (dwarf2_const_value_data): Likewise.
11114 (dwarf2_const_value_attr): Likewise.
11115 (dwarf2_const_value): Likewise.
11116 (die_type): Likewise.
11117 (die_containing_type): Likewise.
11118 (lookup_die_type): Likewise.
11119 (guess_full_die_structure_name): Likewise.
11120 (anonymous_struct_prefix): Likewise.
11121 (dwarf2_name): Likewise.
11122 (follow_die_ref_or_sig): Likewise.
11123 (follow_die_offset): Likewise.
11124 (follow_die_ref): Likewise.
11125 (dwarf2_fetch_die_loc_sect_off): Likewise.
11126 (dwarf2_fetch_constant_bytes): Likewise.
11127 (dwarf2_fetch_die_type_sect_off): Likewise.
11128 (dwarf2_get_die_type): Likewise.
11129 (follow_die_sig): Likewise.
11130 (decode_locdesc): Likewise.
11131 (dwarf2_per_cu_objfile): Likewise.
11132 (dwarf2_per_cu_text_offset): Likewise.
11133 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11134 objfile.
11135 (set_die_type): Access objfile through
11136 dwarf2_per_objfile.
11137
11138 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11139
11140 * valprint.c (converted_character_d): Remove typedef.
11141 (DEF_VEC_O (converted_character_d)): Remove.
11142 (count_next_character): Use std::vector.
11143 (print_converted_chars_to_obstack): Likewise.
11144 (generic_printstr): Likewise.
11145
11146 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11147
11148 * xml-support.h (struct gdb_xml_value): Add constructor.
11149 <value>: Change type to unique_xmalloc_ptr.
11150 (gdb_xml_value_s): Remove typedef.
11151 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11152 (gdb_xml_element_start_handler): Change parameter type to
11153 std::vector.
11154 (xml_find_attribute): Likewise.
11155 * xml-support.c (xml_find_attribute): Change parameter type to
11156 std::vector and adjust.
11157 (gdb_xml_values_cleanup): Remove.
11158 (gdb_xml_parser::start_element): Adjust to std::vector.
11159 (xinclude_start_include): Change paraeter type to std::vector
11160 and adjust.
11161 * btrace.c (check_xml_btrace_version): Likewise.
11162 (parse_xml_btrace_block): Likewise.
11163 (parse_xml_btrace_pt_config_cpu): Likewise.
11164 (parse_xml_btrace_pt): Likewise.
11165 (parse_xml_btrace_conf_bts): Likewise.
11166 (parse_xml_btrace_conf_pt): Likewise.
11167 * memory-map.c (memory_map_start_memory): Likewise.
11168 (memory_map_start_property): Likewise.
11169 * osdata.c (osdata_start_osdata): Likewise.
11170 (osdata_start_item): Likewise.
11171 (osdata_start_column): Likewise.
11172 * remote.c (start_thread): Likewise.
11173 * solib-aix.c (library_list_start_library): Likewise.
11174 (library_list_start_list): Likewise.
11175 * solib-svr4.c (library_list_start_library): Likewise.
11176 (svr4_library_list_start_list): Likewise.
11177 * solib-target.c (library_list_start_segment): Likewise.
11178 (library_list_start_section): Likewise.
11179 (library_list_start_library): Likewise.
11180 (library_list_start_list): Likewise.
11181 * tracepoint.c (traceframe_info_start_memory): Likewise.
11182 (traceframe_info_start_tvar): Likewise.
11183 * xml-syscall.c (syscall_start_syscall): Likewise.
11184 * xml-tdesc.c (tdesc_start_target): Likewise.
11185 (tdesc_start_feature): Likewise.
11186 (tdesc_start_reg): Likewise.
11187 (tdesc_start_union): Likewise.
11188 (tdesc_start_struct): Likewise.
11189 (tdesc_start_flags): Likewise.
11190 (tdesc_start_enum): Likewise.
11191 (tdesc_start_field): Likewise.
11192 (tdesc_start_enum_value): Likewise.
11193 (tdesc_start_vector): Likewise.
11194
11195 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11196
11197 * extension.h (struct xmethod_worker) <clone>: Remove.
11198 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11199 Remove.
11200 (python_xmethod_worker::clone): Remove.
11201 * valops.c (find_overload_match): Use std::move instead of
11202 clone.
11203
11204 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11205
11206 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11207 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11208 <free_xmethod_worker_data>: Remove.
11209 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11210 <get_xmethod_arg_types>: Remove.
11211 <get_xmethod_result_type>: Remove.
11212 <invoke_xmethod>: Remove.
11213 * extension.c (new_xmethod_worker): Remove.
11214 (clone_xmethod_worker): Remove.
11215 (get_matching_xmethod_workers): Return void, pass std::vector by
11216 pointer.
11217 (get_xmethod_arg_types): Rename to...
11218 (xmethod_worker::get_arg_types): ... this, and adjust.
11219 (get_xmethod_result_type): Rename to...
11220 (xmethod_worker::get_result_type): ... this, and adjust.
11221 (invoke_xmethod): Remove.
11222 (free_xmethod_worker): Remove.
11223 (free_xmethod_worker_vec): Remove.
11224 * extension.h (enum ext_lang_rc): Move here from
11225 extension-priv.h.
11226 (struct xmethod_worker): Add constructor and destructor.
11227 <data>: Remove.
11228 <value>: Remove.
11229 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11230 virtual pure methods.
11231 <get_arg_types, get_result_type>: New methods.
11232 (xmethod_worker_ptr): Remove typedef.
11233 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11234 (xmethod_worker_vec): Remove typedef.
11235 (xmethod_worker_up): New typedef.
11236 (invoke_xmethod): Remove.
11237 (clone_xmethod_worker): Remove.
11238 (free_xmethod_worker): Remove.
11239 (free_xmethod_worker_vec): Remove.
11240 (get_xmethod_arg_types): Remove.
11241 (get_xmethod_result_type): Remove.
11242 * valops.c (find_method_list): Use std::vector, don't use
11243 intermediate vector.
11244 (value_find_oload_method_list): Use std::vector.
11245 (find_overload_match): Use std::vector.
11246 (find_oload_champ): Use std::vector.
11247 * value.c (value_free): Use operator delete.
11248 (value_of_xmethod): Rename to...
11249 (value_from_xmethod): ... this. Don't assign
11250 xmethod_worker::value, take rvalue-reference.
11251 (result_type_of_xmethod): Adjust.
11252 (call_xmethod): Adjust.
11253 * value.h: Include extension.h.
11254 (struct xmethod_worker): Don't forward-declare.
11255 (value_of_xmethod): Rename to...
11256 (value_from_xmethod): ... this, take rvalue-reference.
11257 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11258 (struct python_xmethod_worker): ... this, add constructor and
11259 destructor.
11260 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11261 (gdbpy_free_xmethod_worker_data): Rename to...
11262 (python_xmethod_worker::~python_xmethod_worker): ... this and
11263 adjust.
11264 (gdbpy_clone_xmethod_worker_data): Rename to...
11265 (python_xmethod_worker::clone): ... this and adjust.
11266 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11267 temporary vector.
11268 (gdbpy_get_xmethod_arg_types): Rename to...
11269 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11270 (gdbpy_get_xmethod_result_type): Rename to...
11271 (python_xmethod_worker::do_get_result_type): ... this and
11272 adjust.
11273 (gdbpy_invoke_xmethod): Rename to...
11274 (python_xmethod_worker::invoke): ... this and adjust.
11275 (new_python_xmethod_worker): Rename to...
11276 (python_xmethod_worker::python_xmethod_worker): ... this and
11277 adjust.
11278 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11279 Remove.
11280 (gdbpy_free_xmethod_worker_data): Remove.
11281 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11282 (gdbpy_get_xmethod_arg_types): Remove.
11283 (gdbpy_get_xmethod_result_type): Remove.
11284 (gdbpy_invoke_xmethod): Remove.
11285 * python/python.c (python_extension_ops): Remove obsolete
11286 callbacks.
11287
11288 2018-01-05 Pedro Alves <palves@redhat.com>
11289
11290 PR gdb/18653
11291 * common/signals-state-save-restore.c
11292 (save_original_signals_state): New parameter 'quiet'. Warn if we
11293 find a custom handler preinstalled, instead of internal erroring.
11294 But only warn if !quiet.
11295 * common/signals-state-save-restore.h
11296 (save_original_signals_state): New parameter 'quiet'.
11297 * main.c (captured_main_1): Move save_original_signals_state call
11298 after option handling, and pass QUIET.
11299
11300 2018-01-05 Pedro Alves <palves@redhat.com>
11301
11302 * spu-tdep.c (spu_catch_start): Pass
11303 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11304
11305 2018-01-05 Pedro Alves <palves@redhat.com>
11306
11307 PR gdb/22670
11308 * ada-lang.c (literal_symbol_name_matcher): New function.
11309 (ada_get_symbol_name_matcher): Use it for
11310 symbol_name_match_type::SEARCH_NAME.
11311 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11312 it down instead of assuming symbol_name_match_type::FULL.
11313 * block.h (block_lookup_symbol): New parameter 'match_type'.
11314 * c-valprint.c (print_unpacked_pointer): Use
11315 lookup_symbol_search_name instead of lookup_symbol.
11316 * compile/compile-object-load.c (get_out_value_type): Pass down
11317 symbol_name_match_type::SEARCH_NAME.
11318 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11319 symbol_name_match_type::FULL.
11320 * cp-support.c (cp_get_symbol_name_matcher): Handle
11321 symbol_name_match_type::SEARCH_NAME.
11322 * infrun.c (insert_exception_resume_breakpoint): Use
11323 lookup_symbol_search_name.
11324 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11325 * psymtab.c (maintenance_check_psymtabs): Use
11326 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11327 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11328 SYMBOL_SEARCH_NAME.
11329 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11330 if symbol_name_match_type::SEARCH_NAME.
11331 (lookup_symbol_in_language): Pass down
11332 symbol_name_match_type::FULL.
11333 (lookup_symbol_search_name): New.
11334 (lookup_language_this): Pass down
11335 symbol_name_match_type::SEARCH_NAME.
11336 (lookup_symbol_aux, lookup_local_symbol): New parameter
11337 'match_type'. Pass it down.
11338 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11339 (lookup_symbol_search_name): New declaration.
11340 (lookup_symbol_in_block): New 'match_type' parameter.
11341
11342 2018-01-05 Pedro Alves <palves@redhat.com>
11343
11344 PR gdb/22670
11345 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11346 ada_lookup_symbol.
11347 (ada_lookup_symbol): Reimplement in terms of
11348 ada_lookup_symbol_list, bits factored out from
11349 ada_lookup_encoded_symbol.
11350
11351 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11352
11353 * ada-exp.y (write_object_renaming): When subscripting an array
11354 using a symbol as the index, pass the block in call to
11355 ada_lookup_encoded_symbol when looking that symbol up.
11356
11357 2018-01-05 Jerome Guitton <guitton@adacore.com>
11358
11359 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11360 TYPE_INDEX_TYPE.
11361
11362 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11363
11364 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11365 the case where VALUE_LVAL (val0) is not lval_memory.
11366
11367 2018-01-05 Xavier Roirand <roirand@adacore.com>
11368
11369 * ada-valprint.c (print_optional_low_bound): Handle
11370 character-indexed array printing like boolean-indexed array
11371 printing.
11372
11373 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11374
11375 * NEWS: Create a new section for the next release branch.
11376 Rename the section of the current branch, now that it has
11377 been cut.
11378
11379 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11380
11381 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11382 * version.in: Bump version to 8.1.50.DATE-git.
11383
11384 2018-01-03 Xavier Roirand <roirand@adacore.com>
11385
11386 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11387 Add field.
11388 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11389 Add field.
11390 (default_exception_support_info) <catch_handlers_sym>: Add field.
11391 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11392 (ada_exception_name_addr_1): Add "catch handlers" handling.
11393 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11394 Update all callers.
11395 (create_excep_cond_exprs) <ex>: Add parameter.
11396 (re_set_exception): Update create_excep_cond_exprs call.
11397 (print_it_exception, print_one_exception, print_mention_exception)
11398 (print_recreate_exception): Add "catch handler" handling.
11399 (allocate_location_catch_handlers, re_set_catch_handlers)
11400 (check_status_catch_handlers, print_it_catch_handlers)
11401 (print_one_catch_handlers, print_mention_catch_handlers)
11402 (print_recreate_catch_handlers): New function.
11403 (catch_handlers_breakpoint_ops): New variable.
11404 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11405 Add parameter. Add "catch handler" handling.
11406 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11407 Add "catch handler" handling.
11408 (ada_exception_catchpoint_cond_string): Add "catch handler"
11409 handling.
11410 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11411 call.
11412 (catch_ada_handlers_command): New function.
11413 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11414 operations structure.
11415 (_initialize_ada_language): Add "catch handlers" command entry.
11416 * NEWS: Document "catch handlers" feature.
11417
11418 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11419
11420 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11421 account when creating the array type of the slice.
11422 (ada_value_slice): Likewise.
11423
11424 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11425
11426 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11427 New enum value.
11428 (create_array_type_with_stride): Add byte_stride_prop parameter.
11429 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11430 New parameter. Update all callers in this file.
11431 (array_type_has_dynamic_stride): New function.
11432 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11433 of arrays with dynamic byte strides.
11434 * dwarf2read.c (read_array_type): Add support for dynamic
11435 DW_AT_byte_stride attributes.
11436
11437 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11438
11439 * dwarf2read.c (read_unspecified_type): Treat
11440 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11441
11442 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11443
11444 Update copyright year range in all GDB files.
11445
11446 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11447
11448 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11449 and gdb/testsuite/gdb.base/step-line.c.
11450
11451 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11452
11453 * copyright.py (main): Dump the contents of
11454 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11455 even if BY_HAND is empty.
11456
11457 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11458
11459 * top.c (print_gdb_version): Update Copyright year in version
11460 message.
11461
11462 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11463
11464 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
11465
11466 For older changes see ChangeLog-2017.
11467 \f
11468 Local Variables:
11469 mode: change-log
11470 left-margin: 8
11471 fill-column: 74
11472 version-control: never
11473 coding: utf-8
11474 End:
This page took 0.289006 seconds and 4 git commands to generate.