Move C-related declarations to compile-c.h
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
b7dc48b4
KS
12018-08-10 Keith Seitz <keiths@redhat.com>
2
3 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4 (HFILES_NO_SRCDIR): ... to here.
5 Add compile-internal.h and compile-c.h.
6 * compile/compile-c-support.c: Include compile-c.h.
7 * compile/compile-c-symbols.c: Include compile-c.h.
8 (generate_c_for_variable_locations): Update comment.
9 * compile/compile-c-types.c: Include compile-c.h.
10 * compile/compile-c.h: New file -- moved C language declarations
11 from other files here.
12 * compile/compile-internal.h: Do not include hashtab.h or
13 common/enum-flags.h.
14 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
15 (gcc_convert_symbol, gcc_symbol_address)
16 (generate_c_for_variable_locations, c_get_mode_for_size)
17 (c_get_range_decl_name): Definitions moved to compile-c.h.
18 * compile/compile-loc2c.c: Include compile-c.h.
19
6f36b6d2
KS
202018-08-10 Keith Seitz <keiths@redhat.com>
21
22 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
23 (c_symbol_substitution_name): ... this.
24 Update all callers.
25
bd923e51
KS
262018-08-10 Keith Seitz <keiths@redhat.com>
27
28 * compile/compile-c-support.c (c_compute_program): Use
29 unique_xmalloc_ptr to eliminate cleanup.
30 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
31 Return a unique_xmalloc_ptr and eliminate cleanup.
32 * compile/compile-internal.h (generate_c_for_variable_locations):
33 Return unique_xmalloc_ptr and update description.
34
dbd534fe
AH
352018-08-10 Alan Hayward <alan.hayward@arm.com>
36
37 * corelow.c (core_target::get_core_register_section): Rename
38 min_size to section_min_size.
39
90ad3654
JW
402018-08-09 Jim Wilson <jimw@sifive.com>
41
52a187f8
JW
42 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
43 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
44 * NEWS: Mention new GNU/Linux RISC-V target.
45 * configure.host: Add riscv*-*-linux*.
46 * configure.nat: Add riscv*.
47 * configure.tgt: Add riscv*-*-linux*.
3c77f97e 48 * riscv-linux-nat.c: New file.
90ad3654
JW
49 * riscv-linux-tdep.c: New file.
50
aff4e175
AB
512018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
52
53 * infrun.c (resume): Make static, add forward declaration.
54 (proceed): Update header comment.
55 * infrun.h (resume): Delete declaration.
56
06ab9219
TT
572018-08-09 Tom Tromey <tom@tromey.com>
58
59 * riscv-tdep.h: Minor formatting fixes.
60
83c8d318
SM
612018-08-09 Simon Marchi <simon.marchi@ericsson.com>
62
63 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
64 * dwarf-index-cache.c (create_dir_and_check): Likewise.
65 (test_mkdir_recursive): Likewise.
66 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
67
5ff2bbae
AB
682018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
69
70 * valarith.c (value_subscripted_rvalue): If an array is not in
71 memory, and we don't know the upper bound, then we can't know that
72 the requested element exists or not.
73
fdbac7d8
SM
742018-08-08 Simon Marchi <simon.marchi@ericsson.com>
75
76 * target.c (str_comma_list_concat_elem): Fix typo in comment.
77 (target_options_to_string): Add comment.
78
83202f7a
TT
792018-08-08 Tom Tromey <tom@tromey.com>
80
81 * unittests/scoped_mmap-selftests.c: Check result of "write".
82
411baa47
JW
832018-08-08 Jim Wilson <jimw@sifive.com>
84
5c720ed8
JW
85 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
86 (decode_register_index_short): New.
87 (decode_j_type_insn, decode_cj_type_insn): New.
88 (decode_b_type_insn, decode_cb_type_insn): New.
89 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
90 local xlen. Check xlen when decoding ambiguous compressed insns. In
91 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
92 is_c_sw_insn instead of is_sw_insn.
93 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
94 (riscv_software_single_step): New.
95 * riscv-tdep.h (riscv_software_single_step): Declare.
96
411baa47
JW
97 * riscv-tdep.c (riscv_isa_xlen): Drop static.
98 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
99
9d4a934c
AB
1002018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
101
102 PR gdb/18050:
103 * target.c (dispose_inferior): Don't dispose of inferiors that are
104 already killed.
105
ff36536c
SN
1062018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
107
108 * remote.c (remote_target::download_tracepoint): Change char* to
109 const char*.
110
09ce46f2
SM
1112018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
112
113 * target.h (target_options_to_string): Return an std::string.
114 * target.c (str_comma_list_concat_elem): Return void, use
115 std::string.
116 (do_option): Likewise.
117 (target_options_to_string): Return an std::string.
118 * linux-nat.c (linux_nat_target::wait): Adjust.
119 * target-debug.h (target_debug_print_options): Adjust.
120
9c612964
TT
1212018-08-07 Tom Tromey <tom@tromey.com>
122
123 * Makefile.in (CPPFLAGS): New variable.
124 (INTERNAL_CPPFLAGS): Use it.
125
7d11235d
SM
1262018-08-07 Simon Marchi <simon.marchi@ericsson.com>
127
128 * NEWS: Mention the index cache.
129
87d6a7aa
SM
1302018-08-07 Simon Marchi <simon.marchi@ericsson.com>
131
132 * common/pathstuff.h (get_standard_cache_dir): New.
133 * common/pathstuff.c (get_standard_cache_dir): New.
134 * build-id.h (build_id_to_string): New.
135 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
136 DEBUG_STR_SUFFIX): Move to here.
137 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
138 DEBUG_STR_SUFFIX): Move from there.
139 (write_psymtabs_to_index): Make non-static, add basename
140 parameter. Write to temporary files, rename when done.
141 (save_gdb_index_command): Adjust call to
142 write_psymtabs_to_index.
143 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
144 field.
145 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
146 (get_gdb_index_contents_from_cache): New.
147 (get_gdb_index_contents_from_cache_dwz): New.
148 (dwarf2_initialize_objfile): Read index from cache.
149 (dwarf2_build_psymtabs): Save to index.
150 * dwarf-index-cache.h: New file.
151 * dwarf-index-cache.c: New file.
152 * dwarf-index-write.h: New file.
153
8a99096f
SM
1542018-08-07 Simon Marchi <simon.marchi@ericsson.com>
155
156 * gnulib/aclocal.m4: Re-generate.
157 * gnulib/config.in: Re-generate.
158 * gnulib/configure: Re-generate.
159 * gnulib/import/Makefile.am: Re-generate.
160 * gnulib/import/Makefile.in: Re-generate.
161 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
162 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
163 * gnulib/import/m4/mkdir.m4: New file.
164 * gnulib/import/mkdir.c: New file.
165 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
166 module.
167
5c831bb1
SM
1682018-08-07 Simon Marchi <simon.marchi@ericsson.com>
169
170 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
171 * common/scoped_mmap.c: New file.
172 * common/scoped_mmap.h (destroy): New method.
173 (~scoped_mmap, reset): Use destroy.
174 (scoped_mmap): New move constructor.
175 (mmap_file): New declaration.
176 * unittests/scoped_mmap-selftests.c (test_normal,
177 test_invalid_filename, run_tests): New functions.
178 (_initialize_scoped_mmap_selftests): Register selftest.
179
4485a1c1
SM
1802018-08-07 Simon Marchi <simon.marchi@ericsson.com>
181
182 * dwarf2read.c (read_gdb_index_from_section): Rename to...
183 (read_gdb_index_from_buffer): ... this. Remove section
184 parameter, add buffer parameter.
185 (get_gdb_index_contents_ftype,
186 get_gdb_index_contents_dwz_ftype): New typedefs.
187 (dwarf2_read_gdb_index): Add callback parameters to get the
188 index contents.
189 (get_gdb_index_contents_from_section): New.
190 (dwarf2_initialize_objfile): Update call to
191 dwarf2_read_gdb_index.
192
528e1572
SM
1932018-08-07 Simon Marchi <simon.marchi@ericsson.com>
194
195 * common/filestuff.h (gdb_fopen_cloexec): New overload.
196 (gdb_open_cloexec): Likewise.
197 * nat/linux-osdata.c (command_from_pid): Use string_printf.
198 (commandline_from_pid): Likewise.
199 (linux_xfer_osdata_threads): Likewise.
200 (linux_xfer_osdata_fds): Likewise.
201 * ada-lang.c (is_package_name): Likewise.
202 * auxv.c (procfs_xfer_auxv): Likewise.
203 * breakpoint.c (print_one_breakpoint_location): Use
204 uiout::field_fmt.
205 (print_one_catch_solib): Use string_printf.
206 * coff-pe-read.c (add_pe_exported_sym): Likewise.
207 (add_pe_forwarded_sym): Likewise.
208 * dwarf2read.c (create_type_unit_group): Likewise.
209 (build_error_marker_type): Likewise.
210 * infcall.c (get_function_name): Likewise.
211 * valprint.c (print_converted_chars_to_obstack): Likewise.
212 * xtensa-tdep.c (xtensa_register_type): Likewise.
213
a7f25a84
SM
2142018-08-06 Simon Marchi <simon.marchi@ericsson.com>
215
216 * remote.c (remote_target::download_tracepoint): Fix format
217 string errors.
218
296956be
PFC
2192018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
220
221 * tracefile.c: Include common/byte-vector.h.
222 (trace_save): Change type of buf to gdb::byte_vector. Initialize
223 with trace_regblock_size if needed. Update uses of buf.
224
a04b9d62
PFC
2252018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
226
227 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
228 std::vector<unsigned char>.
229 * tracepoint.c (collection_list::collection_list): Remove
230 m_regs_mask initializer from initializer list. Resize
231 m_regs_mask using the largest remote register number.
232 (collection_list::add_remote_register): Remove size check on
233 m_regs_mask. Use at to access element.
234 (collection_list::stringify): Change type of temp_buf to
235 gdb::char_vector. Update uses of temp_buf. Resize if needed to
236 stringify the register mask. Use pack_hex_byte for the register
237 mask.
238
4277c4b8
PFC
2392018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
240
241 * tracepoint.h (class collection_list) <add_register>: Remove.
242 <add_remote_register, add_ax_registers, add_local_register>:
243 Declare.
244 <add_memrange>: Add scope parameter.
245 * tracepoint.c (encode_actions_1): Likewise.
246 (collection_list::add_register): Rename to ...
247 (collection_list::add_remote_register): ... this. Update
248 comment.
249 (collection_list::add_ax_registers, add_local_register): New
250 methods.
251 (collection_list::add_memrange): Add scope parameter. Call
252 add_local_register instead of add_register.
253 (finalize_tracepoint_aexpr): New function.
254 (collection_list::collect_symbol): Update calls to add_memrange.
255 Call add_local_register instead of add_register. Call
256 add_ax_registers. Call finalize_tracepoint_aexpr.
257 (encode_actions_1): Get remote regnos for $reg action. Call
258 add_remote_register, add_ax_registers, and add_local_register.
259 Update call to add_memrange. Call finalize_tracepoint_aexpr.
260 (validate_actionline): Call finalize_tracepoint_aexpr.
261
3df3a985
PFC
2622018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
263
264 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
265 Replace array buf with gdb::char_vector buf, of size
266 get_remote_packet_size (). Replace references to buf and
267 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
268 and xsnprintf with snprintf. Raise errors if the buffer is too
269 small.
270
aa6f3694
PFC
2712018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
272
273 * remote.c (remote_target::download_tracepoint): Fix the has_more
274 predicate in the QTDP action list iteration.
275
05abfc39
PFC
2762018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
277
278 * remote.c (remote_target::download_tracepoint): Fix indentation
279 in for block.
280
821a2682
RO
2812018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
282
283 * proc-api.c (_initialize_proc_api): Remove c, unused.
284 * procfs.c (procfs_init_inferior): Remove signals, unused.
285 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
286 unused.
287
95347337
AB
2882018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
289 Andrew Burgess <andrew.burgess@embecosm.com>
290
291 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
292 'W_STOPCODE (0)' as this could be ambiguous.
293
425699f5
SDJ
2942018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
295
296 * ser-tcp.c (net_open): Fix thinko when deciding whether to
297 disable TCP's Nagle algorithm (use "ai_protocol" instead of
298 "ai_socktype").
299
3e1d3d8c
TT
3002018-08-02 Tom Tromey <tom@tromey.com>
301
302 PR symtab/16842.
303 * dwarf2read.c (read_func_scope): Set symtab on template parameter
304 symbols.
305 (process_structure_scope): Likewise.
306
15843549
XR
3072018-08-02 Xavier Roirand <roirand@adacore.com>
308
309 PR gdb/22629:
310 * darwin-nat.c (darwin_kill_inferior): Fix handling of
311 kill inferior.
312
b5bddbbb
TT
3132018-08-02 Tom Tromey <tom@tromey.com>
314
315 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
316 (darwin_suspend_inferior, darwin_resume_inferior)
317 (darwin_decode_notify_message, darwin_resume_inferior_threads)
318 (darwin_check_new_threads): Check result of get_darwin_inferior.
319
f61cfa07
JB
3202018-07-31 Joel Brobecker <brobecker@adacore.com>
321
322 GDB 8.1.1 released.
323
5abe0f0c
JV
3242018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
325
326 * varobj.c (varobj_get_path_expr_parent): Report an error if
327 parent is a dynamic varobj.
328
472fa5ee
SM
3292018-07-31 Simon Marchi <simon.marchi@ericsson.com>
330
331 * gnulib/aclocal.m4: Re-generate.
332 * gnulib/config.in: Re-generate.
333 * gnulib/configure: Re-generate.
334 * gnulib/import/Makefile.in: Re-generate.
335 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
336 * gnulib/import/m4/onceonly.m4: Re-generate.
337
1c28969e
SM
3382018-07-31 Simon Marchi <simon.marchi@ericsson.com>
339
340 * target-descriptions.c (struct xml_test_tdesc): New.
341 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
342 (record_xml_tdesc): Update.
343 (maintenance_check_xml_descriptions): Update.
344 * target-descriptions.h (record_xml_tdesc): Update comment.
345
c8f2dc0d
AB
3462018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
347
348 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
349 checking array bounds are defined.
350
463c08d1
TT
3512018-07-30 Tom Tromey <tom@tromey.com>
352
353 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
354 irreflexivity violation.
355
dba7455e
TT
3562018-07-30 Tom Tromey <tom@tromey.com>
357
358 * cli/cli-decode.c (lookup_cmd): Remove lint code.
359 * value.c (unpack_long): Remove lint code.
360 * valops.c (value_ind): Remove lint code.
361 * valarith.c (value_x_binop, value_x_unop, value_equal)
362 (value_pos): Remove lint code.
363
37cc0cae
TV
3642018-07-28 Tom de Vries <tdevries@suse.de>
365
366 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
367 with undefined upper bound as <optimized out>.
368
129eb0f1
SDJ
3692018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
370
371 * gcore.in: Rename variable "name" to "prefix". Expand
372 "usage" text.
373
6af79d7b
JT
3742018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
375
376 * windows-nat.c (windows_nat_target::create_inferior): Update to
377 call close() in global namespace.
378
79748972
TT
3792018-07-26 Tom Tromey <tom@tromey.com>
380
381 * dwarf-index-write.c (add_address_entry): Don't add objfile
382 offsets.
383 * dbxread.c (find_stab_function): Rename from
384 find_stab_function_addr. Return a bound_minimal_symbol.
385 (read_dbx_symtab): Use raw_text_low, raw_text_high.
386 Don't add objfile offsets.
387 (end_psymtab): Use raw_text_low, raw_text_high,
388 MSYMBOL_VALUE_RAW_ADDRESS.
389 (read_ofile_symtab): Update.
390 (process_one_symbol): Update.
391 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
392 offsets.
393 (dw2_relocate): Remove.
394 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
395 searching addrmap.
396 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
397 Update.
398 (process_psymtab_comp_unit_reader, add_partial_symbol)
399 (add_partial_subprogram, dwarf2_ranges_read): Update.
400 (load_partial_dies): Update.
401 (add_address_entry): Don't add objfile offsets.
402 (dwarf2_build_include_psymtabs): Update.
403 (create_addrmap_from_aranges): Don't add objfile offsets.
404 (dw2_find_pc_sect_compunit_symtab): Update.
405 * mdebugread.c (parse_symbol): Don't add objfile offsets.
406 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
407 Update.
408 (parse_partial_symbols): Don't add objfile offsets. Use
409 raw_text_low, raw_text_high. Update.
410 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
411 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
412 or call 'relocate' quick function. Clear psymbol_map.
413 * psympriv.h (struct partial_symbol) <address>: Add section
414 offset.
415 <set_unrelocated_address>: Rename from set_address.
416 <raw_text_low, raw_text_high>: New methods.
417 <text_low, text_high>: Add objfile parameter.
418 (add_psymbol_to_bcache): Add 'section' parameter. Call
419 set_unrelocated_address.
420 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
421 (find_pc_psymbol): Update.
422 (fixup_psymbol_section, relocate_psymtabs): Remove.
423 (dump_psymtab, psym_functions): Update.
424 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
425 parameter.
426 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
427 (start_psymtab_common): Update.
428 * symfile-debug.c (debug_qf_relocate): Remove.
429 (debug_sym_quick_functions): Update.
430 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
431 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
432 Update.
433
52948f01
TT
4342018-07-26 Tom Tromey <tromey@redhat.com>
435
436 * dbxread.c (end_psymtab): Use text_high_valid and
437 text_low_valid.
438 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
439 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
440 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
441 Update comment.
442 <text_low_valid, text_high_valid>: New fields.
443 <set_text_low, set_text_high>: Update.
444 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
445
4ae976d1
TT
4462018-07-26 Tom Tromey <tom@tromey.com>
447
448 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
449 Update.
450 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
451 textlow and texthigh fields.
452 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
453 Update.
454 * mdebugread.c (parse_lines, parse_partial_symbols)
455 (psymtab_to_symtab_1): Update.
456 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
457 Rename fields. Update comment. Now private.
458 <text_low, text_high, set_text_low, set_text_high>: New methods.
459 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
460 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
461 (start_psymtab_common, maintenance_info_psymtabs)
462 (maintenance_check_psymtabs): Update.
463 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
464 texthigh fields.
465 (scan_xcoff_symtab): Update.
466
02e9e7f7
TT
4672018-07-26 Tom Tromey <tromey@redhat.com>
468
469 * psympriv.h (struct partial_symbol) <unrelocated_address,
470 address, set_address>: New methods.
471 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
472 (fixup_psymbol_section, relocate_psymtabs): Update.
473 (print_partial_symbols): Add 'objfile' parameter. Update.
474 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
475 Update.
476
8a6d4234
TT
4772018-07-26 Tom Tromey <tom@tromey.com>
478
479 * dwarf-index-write.c (write_psymbols, debug_names::insert)
480 (debug_names::write_psymbols): Update.
481 * psympriv.h (struct partial_symbol): Derive from
482 general_symbol_info.
483 <obj_section>: New method.
484 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
485 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
486 (find_pc_sect_psymbol, fixup_psymbol_section)
487 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
488 (print_partial_symbols, recursively_search_psymtabs)
489 (compare_psymbols, psymbol_hash, psymbol_compare)
490 (add_psymbol_to_bcache, maintenance_check_psymtabs)
491 (psymbol_name_matches, psym_fill_psymbol_map): Update.
492
08994e1d
TT
4932018-07-26 Tom Tromey <tromey@redhat.com>
494
495 * dbxread.c (end_psymtab): Remove dead code.
496
3c3bb058
AB
4972018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
498
499 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
500 DWARF unwinders are disabled.
501 * dwarf2-frame.c: Add dwarf2read.h include.
502 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
503 disabled.
504 (dwarf2_frame_unwinders_enabled_p): Define.
505 (show_dwarf_unwinders_enabled_p): New function.
506 (_initialize_dwarf2_frame): Register switch to control DWARF
507 unwinder use.
508 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
509 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
510 (show_dwarf_cmdlist): Remove static keyword.
511 * dwarf2read.h (set_dwarf_cmdlist): Declare.
512 (show_dwarf_cmdlist): Declare.
513 * NEWS: Document new feature.
514
9e7f3bbb
TV
5152018-07-26 Tom de Vries <tdevries@suse.de>
516
517 PR breakpoints/23366
518 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
519
506f5c41
TV
5202018-07-26 Tom de Vries <tdevries@suse.de>
521
522 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
523 DW_AT_count can't be translated to a dynamic prop.
524
16f808ec
TV
5252018-07-25 Tom de Vries <tdevries@suse.de>
526
527 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
528 try/catch.
529
d7154a8d
JV
5302018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
531
532 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
533
a45389f6
JB
5342018-07-25 Joel Brobecker <brobecker@adacore.com>
535
536 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
537
380618d6
KS
5382018-07-24 Keith Seitz <keiths@redhat.comt
539
540 PR symtab/23010
541 * dwarf2read.c (dw2_add_symbol_to_list): New function.
542 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
543 instead of add_symbol_to_list.
544 (read_file_scope): Call prepare_one_comp_unit before reading
545 any other DIEs.
546
4b17aefe
SM
5472018-07-24 Simon Marchi <simon.marchi@ericsson.com>
548
549 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
550
29d17e47
TT
5512018-07-24 Tom Tromey <tom@tromey.com>
552
553 * utils.c (malloc, realloc, free): Don't declare.
554 * configure, config.in: Rebuild.
555 * configure.ac: Don't check for declarations of free, malloc, or
556 realloc.
557
cf4088a9
SM
5582018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
559
560 * aarch64-linux-nat.c
561 (aarch64_linux_nat_target::stopped_data_address): Remove unused
562 variable.
563 * arm-linux-nat.c (fetch_regs): Likewise.
564 (store_regs): Likewise.
565 (fetch_vfp_regs): Likewise.
566 (store_vfp_regs): Likewise.
567 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
568 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
569 (arm_linux_nat_target::insert_watchpoint): Likewise.
570 (arm_linux_nat_target::remove_watchpoint): Likewise.
571 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
572 Likewise.
573 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
574 Likewise.
575 * ppc-linux-nat.c (fetch_register): Likewise.
576 (fetch_all_gp_regs): Likewise.
577 (fetch_ppc_registers): Likewise.
578 (store_all_gp_regs): Likewise.
579 (store_ppc_registers): Likewise.
580 (hwdebug_insert_point): Likewise.
581 (can_use_watchpoint_cond_accel): Likewise.
582 * remote-sim.c (gdb_os_write_stdout): Likewise.
583
a0de763e
TT
5842018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
585 Tom Tromey <tom@tromey.com>
586
587 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
588 test for it.
589 * configure: Rebuild.
590
3b20124b
TT
5912018-07-22 Tom Tromey <tom@tromey.com>
592
593 * regformats/regdat.sh: Define xmltarget_${name} inside
594 #ifndef IN_PROCESS_AGENT.
595
8c8807f4
TT
5962018-07-22 Tom Tromey <tom@tromey.com>
597
598 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
599
c486b610
TT
6002018-07-22 Tom Tromey <tom@tromey.com>
601
602 * symfile.c (reread_symbols): Notify iter, not objfile.
603
494f80a9
TT
6042018-07-22 Tom Tromey <tom@tromey.com>
605
606 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
607 Use arch_ops.
608 (ravenscar_thread_target::prepare_to_store): Likewise.
609
c51f6a54
TT
6102018-07-22 Tom Tromey <tom@tromey.com>
611
612 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
613 unused variable. Call value_fetch_lazy when needed.
614 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
615 Remove unused variable. Call value_fetch_lazy when needed.
616
374fd1fd
TT
6172018-07-22 Tom Tromey <tom@tromey.com>
618
619 * m32c-tdep.c (mark_dma): Return void.
620 (make_regs): Remove unused declarations.
621
d5e9a511
TT
6222018-07-22 Tom Tromey <tom@tromey.com>
623
624 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
625 cmdscm_get_valid_command_smob_arg_unsafe for effect.
626 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
627 bkscm_get_valid_block_smob_arg_unsafe for effect.
628
996d693a
TT
6292018-07-22 Tom Tromey <tom@tromey.com>
630
631 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
632 value_type.
633
15766370
TT
6342018-07-22 Tom Tromey <tom@tromey.com>
635
636 * windows-nat.c (saved_context): Conditionally define.
637 * remote.c (remote_target::remote_btrace_maybe_reopen):
638 Conditionally declare "warned".
639 * inflow.c (sigquit_ours): Conditionally define.
640 (new_tty): Move "tty" declaration inside #if.
641 * guile/guile.c (guile_datadir): Conditionally define.
642 * charset.c (set_be_le_names): Move some declarations inside #if.
643 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
644 #if.
645 (parse_xml_btrace_conf): Likewise.
646
f4e80e13
TT
6472018-07-22 Tom Tromey <tom@tromey.com>
648
649 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
650
8d49165d
TT
6512018-07-22 Tom Tromey <tom@tromey.com>
652
653 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
654 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
655 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
656 * buildsym-legacy.c (get_macro_table): Remove unused variable.
657 * stack.c (frame_apply_level_command): Remove unused variable.
658 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
659 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
660 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
661 unused variable.
662 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
663 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
664 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
665 variable.
666 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
667 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
668 variable.
669 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
670 Remove unused variable.
671 * cli/cli-script.c (recurse_read_control_structure): Remove unused
672 variable.
673 * common/tdesc.c (print_xml_feature::visit): Remove unused
674 variable.
675 * compile/compile-object-load.c (store_regs): Remove unused
676 variables.
677 * complaints.c (clear_complaints): Remove unused variable.
678 * corelow.c (core_target_open): Remove unused variable.
679 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
680 variable.
681 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
682 variable.
683 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
684 variable.
685 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
686 variable.
687 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
688 variable.
689 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
690 variable.
691 * ia64-tdep.c (examine_prologue): Remove unused variable.
692 * infcall.c (run_inferior_call): Remove unused variable.
693 * inferior.c (exit_inferior): Remove unused variable.
694 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
695 * linespec.c (decode_line_2): Remove unused variable.
696 * linux-nat.c (super_close): Remove.
697 * linux-tdep.c (linux_info_proc): Remove unused variable.
698 * mi/mi-main.c (mi_execute_command): Remove unused variable.
699 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
700 Remove unused variable.
701 * parse.c (find_minsym_type_and_address): Remove unused variable.
702 * printcmd.c (info_symbol_command, printf_floating): Remove unused
703 variable.
704 * python/py-breakpoint.c (bppy_set_commands): Remove unused
705 variable.
706 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
707 variables.
708 * record-btrace.c (record_btrace_target::store_registers): Remove
709 unused variable.
710 (cmd_show_record_btrace_cpu): Remove unused variable.
711 * riscv-tdep.c (riscv_register_reggroup_p)
712 (riscv_push_dummy_call, riscv_return_value): Remove unused
713 variable.
714 * rust-exp.y (literal): Remove unused variable.
715 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
716 unused variable.
717 <STRUCTOP_ANONYMOUS>: Likewise.
718 * s390-linux-tdep.c (s390_linux_init_abi_31)
719 (s390_linux_init_abi_64): Remove unused variable.
720 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
721 (file_select_thread, net_windows_open, _initialize_ser_windows):
722 Remove unused variables.
723 * symtab.c (find_pc_sect_line): Remove unused variable.
724 * target-memory.c (compute_garbled_blocks): Remove unused
725 variable.
726 (target_write_memory_blocks): Remove unused variable.
727 * target.c (target_stack::unpush): Remove unused variables.
728 * tracepoint.c (start_tracing, all_tracepoint_actions)
729 (merge_uploaded_trace_state_variables)
730 (print_one_static_tracepoint_marker): Remove unused variable.
731 * unittests/basic_string_view/element_access/char/1.cc (test01):
732 Remove unused variable.
733 * windows-nat.c (windows_continue, windows_add_all_dlls)
734 (do_initial_windows_stuff, windows_nat_target::create_inferior):
735 Remove unused variables.
736
17cbafdb
SM
7372018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
738
739 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
740 attr_profile in HAVE_ELF.
741 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
742 HAVE_ELF.
743
0ee6c332
SM
7442018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
745
746 * frame.c (frame_register_unwind): Change parameter name.
747 (frame_unwind_register): Likewise.
748 (frame_unwind_register_value): Likewise.
749 (frame_unwind_register_signed): Likewise.
750 (frame_unwind_register_unsigned): Likewise.
751 * frame.h (frame_register_unwind): Likewise.
752 (frame_unwind_register): Likewise.
753 (frame_unwind_register_value): Likewise.
754 (frame_unwind_register_signed): Likewise.
755 (frame_unwind_register_unsigned): Likewise.
756 (frame_unwind_arch): Likewise.
757
e2e31f10
MR
7582018-07-20 Maciej W. Rozycki <macro@mips.com>
759
760 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
761 ISA maintenance.
762
2d389915
MR
7632018-07-20 Maciej W. Rozycki <macro@mips.com>
764
765 * mips-linux-nat.c (mips_linux_nat_target::read_description):
766 Call `get_ptrace_pid' rather than extracting the ptrace PID by
767 hand.
768
cbb09508
KS
7692018-07-20 Keith Seitz <keiths@redhat.com>
770
771 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
772 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
773 m_compunit_symtab, m_language>: Add "m_" prefix.
774 Update all uses.
775 * buildsym.c: Update all uses.
776
bfe2e011
TT
7772018-07-20 Tom Tromey <tom@tromey.com>
778
779 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
780 * buildsym.h (record_line_ftype): Remove typedef.
781
0e6f3061
TT
7822018-07-20 Tom Tromey <tom@tromey.com>
783
784 * buildsym-legacy.h (augment_type_symtab): Don't declare.
785 (end_expandable_symtab): Likewise.
786 (end_symtab_get_static_block): Likewise.
787 (end_symtab_from_static_block): Likewise.
788 * buildsym-legacy.c (augment_type_symtab): Remove.
789 (end_expandable_symtab): Remove.
790 (end_symtab_get_static_block): Remove.
791 (end_symtab_from_static_block): Remove.
792
804d2729
TT
7932018-07-20 Tom Tromey <tom@tromey.com>
794
795 * dwarf2read.c: Include buildsym.h.
796 (struct dwarf2_cu) <builder>: New method.
797 (fixup_go_packaging): Update.
798 (process_full_comp_unit, process_full_type_unit): Update. Don't
799 use scoped_free_pendings.
800 (using_directives): Add "cu" parameter, remove "language".
801 (read_import_statement, setup_type_unit_groups, )
802 (read_func_scope, read_lexical_block_scope)
803 (dwarf2_record_block_ranges, read_namespace): Update.
804 (lnp_state_machine::lnp_state_machine): Add cu parameter.
805 (lnp_state_machine::handle_end_sequence): Update.
806 (class lnp_state_machine) <m_cu>: New member.
807 <m_record_line_callback>: Remove.
808 <m_currently_recording_lines>: New member.
809 (lnp_state_machine::handle_set_file): Update.
810 (noop_record_line): Remove.
811 (dwarf_record_line_p): Add cu parameter.
812 (dwarf_record_line_1, dwarf_finish_line): Likewise.
813 (lnp_state_machine::record_line)
814 (lnp_state_machine::lnp_state_machine)
815 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
816 (dwarf_decode_lines): Update.
817 (dwarf2_start_subfile): Add cu parameter.
818 (dwarf2_start_symtab, new_symbol): Update.
819 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
820 Remove dwarf2_per_objfile parameter.
821 (dwarf_decode_macros): Update.
822
80e649fc
TT
8232018-07-20 Tom Tromey <tom@tromey.com>
824
825 * stabsread.c (define_symbol): Update.
826 * buildsym-legacy.h (get_buildsym_compunit): Declare.
827 * dwarf2read.c (new_symbol): Update.
828 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
829 * cp-namespace.c: Include buildsym.h.
830 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
831 * buildsym-legacy.c (get_buildsym_compunit): New function.
832
0baae8db
TT
8332018-07-20 Tom Tromey <tom@tromey.com>
834
835 * xcoffread.c: Include buildsym-legacy.h.
836 * windows-nat.c: Include buildsym-legacy.h.
837 * stabsread.c: Include buildsym-legacy.h.
838 * mdebugread.c: Include buildsym-legacy.h.
839 * buildsym-legacy.h: New file.
840 * buildsym-legacy.c: New file, from buildsym.c.
841 * go32-nat.c: Include buildsym-legacy.h.
842 * dwarf2read.c: Include buildsym-legacy.h.
843 * dbxread.c: Include buildsym-legacy.h.
844 * cp-namespace.c: Include buildsym-legacy.h.
845 * coffread.c: Include buildsym-legacy.h.
846 * buildsym.h: Move some contents to buildsym-legacy.h.
847 * buildsym.c: Include buildsym-legacy.h. Move many functions to
848 buildsym-legacy.c.
849 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
850
ab209f6f
TT
8512018-07-20 Tom Tromey <tom@tromey.com>
852
853 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
854 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
855 (buildsym_compunit::buildsym_compunit)
856 (buildsym_compunit::~buildsym_compunit)
857 (buildsym_compunit::get_macro_table): Define.
858
74c72eac
TT
8592018-07-20 Tom Tromey <tom@tromey.com>
860
861 * buildsym.c (reset_symtab_globals): Remove.
862 (buildsym_compunit::end_symtab_from_static_block): Update.
863 (buildsym_compunit::augment_type_symtab): Update.
864 (end_symtab_from_static_block): Call free_buildsym_compunit.
865 (augment_type_symtab, end_symtab, end_expandable_symtab):
866 Likewise.
867
da6580e5
TT
8682018-07-20 Tom Tromey <tom@tromey.com>
869
870 * arch-utils.c: Do not include buildsym.h.
871 * mipsread.c: Do not include buildsym.h.
872 * machoread.c: Do not include buildsym.h.
873 * elfread.c: Do not include buildsym.h.
874
4a2125f5
TT
8752018-07-20 Tom Tromey <tom@tromey.com>
876
877 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
878 initialization.
879 (buildsym_compunit): Add new constructor.
880 (struct buildsym_compunit) <get_last_source_file, finish_block,
881 record_block_range, start_subfile, patch_subfile_names,
882 push_subfile, pop_subfile, record_line, get_compunit_symtab,
883 set_last_source_start_addr, get_last_source_start_addr,
884 get_local_using_directives, set_local_using_directives,
885 get_global_using_directives, outermost_context_p,
886 get_current_context_stack, get_context_stack_depth,
887 get_current_subfile, get_local_symbols, get_file_symbols,
888 get_global_symbols, record_debugformat, record_producer,
889 push_context, pop_context, end_symtab_get_static_block,
890 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
891 New public methods.
892 <record_pending_block, finish_block_internal, make_blockvector,
893 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
894 private methods.
895 Update all users.
896
8972018-05-22 Tom Tromey <tom@tromey.com>
898
899 * buildsym.c (record_pending_block): Move earlier. Remove objfile
900 parameter.
901 (finish_block_internal): Update.
902
6b213a47
TT
9032018-07-20 Tom Tromey <tom@tromey.com>
904
905 * buildsym.c (record_pending_block): Move earlier. Remove objfile
906 parameter.
907 (finish_block_internal): Update.
908
b80a981d
TT
9092018-07-20 Tom Tromey <tom@tromey.com>
910
911 * buildsym.h (EXTERN): Don't define or undef.
912 * buildsym.c (EXTERN): Don't define.
913
ddb70602
TT
9142018-07-20 Tom Tromey <tom@tromey.com>
915
916 * buildsym.c: Remove TODO comment.
917
b37dd3bc
TT
9182018-07-20 Tom Tromey <tom@tromey.com>
919
920 * coffread.c (coff_symtab_read): Update.
921 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
922 (xcoff_new_init): Update.
923 * mipsread.c (mipscoff_new_init): Update.
924 * mdebugread.c (mdebug_build_psymtabs): Update.
925 * elfread.c (elf_new_init): Update.
926 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
927 Update.
928 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
929 (coffstab_build_psymtabs, elfstab_build_psymtabs)
930 (stabsect_build_psymtabs): Update.
931 * buildsym.h (buildsym_init): Don't declare.
932 * buildsym.c: Update comment.
933 (prepare_for_building): Remove.
934 (start_symtab, restart_symtab): Update.
935 (reset_symtab_globals): Update comment.
936 (buildsym_init): Remove.
937
e148f09d
TT
9382018-07-20 Tom Tromey <tom@tromey.com>
939
940 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
941 * stabsread.c (patch_block_stabs, define_symbol, read_type)
942 (read_enum_type, common_block_start, common_block_end)
943 (cleanup_undefined_types_1, finish_global_stabs): Update.
944 * mdebugread.c (psymtab_to_symtab_1): Update.
945 * dwarf2read.c (fixup_go_packaging, read_func_scope)
946 (read_lexical_block_scope, new_symbol): Update.
947 * dbxread.c (process_one_symbol): Update.
948 * coffread.c (coff_symtab_read, process_coff_symbol)
949 (coff_read_enum_type): Update.
950 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
951 declare.
952 (get_local_symbols, get_file_symbols, get_global_symbols): New
953 functions.
954 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
955 m_global_symbols.
956 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
957 (~scoped_free_pendings): Update.
958 (finish_block, prepare_for_building, reset_symtab_globals)
959 (end_symtab_get_static_block, end_symtab_with_blockvector)
960 (augment_type_symtab, push_context): Update.
961 (get_local_symbols, get_file_symbols, get_global_symbols): New
962 functions.
963 (buildsym_init): Update.
964
93b8bea4
TT
9652018-07-20 Tom Tromey <tom@tromey.com>
966
967 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
968 (process_full_type_unit): Likewise.
969 (dwarf2_start_symtab): Set list_in_scope.
970
f62f6af5
TT
9712018-07-20 Tom Tromey <tom@tromey.com>
972
973 * dwarf2read.c (process_psymtab_comp_unit_reader)
974 (build_type_psymtabs_reader): Do not set list_in_scope.
975
1d376700
TT
9762018-07-20 Tom Tromey <tom@tromey.com>
977
978 * buildsym.c (free_pendings): Remove.
979 (add_symbol_to_list, scoped_free_pendings)
980 (finish_block_internal, buildsym_init): Update.
981
c233e9c6
TT
9822018-07-20 Tom Tromey <tom@tromey.com>
983
984 * xcoffread.c (read_xcoff_symtab): Update.
985 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
986 Update.
987 * dbxread.c (process_one_symbol): Update.
988 * coffread.c (coff_symtab_read): Update.
989 * buildsym.h (finish_block): Update.
990 * buildsym.c (finish_block): Remove "listhead" argument.
991 (end_symtab_get_static_block): Update.
992
5ac04550
TT
9932018-07-20 Tom Tromey <tom@tromey.com>
994
995 * buildsym.h (class scoped_free_pendings): Remove constructor.
996 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
997 method.
998 <m_pending_block_obstack, m_pending_blocks>: New members.
999 (pending_block_obstack, pending_blocks): Remove.
1000 (scoped_free_pendings::scoped_free_pendings): Default.
1001 (~scoped_free_pendings): Update.
1002 (free_pending_blocks): Remove.
1003 (finish_block_internal, record_pending_block, make_blockvector)
1004 (end_symtab_get_static_block, augment_type_symtab, push_context)
1005 (buildsym_init): Update.
1006
7ea05a7b
TT
10072018-07-20 Tom Tromey <tom@tromey.com>
1008
1009 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1010 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1011 members.
1012 (pending_addrmap, pending_addrmap_obstack)
1013 (pending_addrmap_interesting): Remove.
1014 (scoped_free_pendings, record_block_range, make_blockvector)
1015 (prepare_for_building, reset_symtab_globals, buildsym_init):
1016 Update.
1017
3c65e5b3
TT
10182018-07-20 Tom Tromey <tom@tromey.com>
1019
1020 * xcoffread.c (process_linenos): Update.
1021 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1022 * mdebugread.c (psymtab_to_symtab_1): Update.
1023 * dwarf2read.c (setup_type_unit_groups)
1024 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1025 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1026 * dbxread.c (process_one_symbol): Update.
1027 * coffread.c (coff_symtab_read, enter_linenos)
1028 (process_coff_symbol): Update.
1029 * buildsym.h (current_subfile): Don't declare.
1030 (get_current_subfile): Declare.
1031 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1032 member.
1033 (start_subfile, free_buildsym_compunit, push_subfile)
1034 (prepare_for_building, start_symtab): Update.
1035 (get_current_subfile): New function.
1036
a60f3166
TT
10372018-07-20 Tom Tromey <tom@tromey.com>
1038
1039 * coffread.c (coff_symtab_read): Update.
1040 * xcoffread.c (read_xcoff_symtab): Update.
1041 * dwarf2read.c (new_symbol): Update.
1042 (read_func_scope, read_lexical_block_scope): Update.
1043 * dbxread.c (process_one_symbol): Update.
1044 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1045 (outermost_context_p): Remove macro.
1046 (outermost_context_p, get_current_context_stack)
1047 (get_context_stack_depth): Declare.
1048 (pop_context): Return struct context_stack.
1049 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1050 member.
1051 (context_stack_size): Remove.
1052 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1053 (prepare_for_building, end_symtab_get_static_block)
1054 (augment_type_symtab, push_context): Update.
1055 (pop_context): Return struct context_stack.
1056 (outermost_context_p, get_current_context_stack)
1057 (get_context_stack_depth): New functions.
1058 (buildsym_init): Update.
1059
56ba65a0
TT
10602018-07-20 Tom Tromey <tom@tromey.com>
1061
1062 * rust-exp.y: Now a pure parser. Update all rules.
1063 (%union): Move earlier.
1064 (current_parser, work_obstack): Remove globals.
1065 (rust_parser, ~rust_parser): Update.
1066 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1067 lex_character, lex_number, lex_string, lex_identifier,
1068 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1069 convert_name, convert_params_to_expression,
1070 convert_ast_to_expression, ast_basic_type, ast_operation,
1071 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1072 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1073 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1074 ast_array_type, ast_slice_type, ast_reference_type,
1075 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1076 (rust_parse): Update.
1077 (rustyyerror, rustyylex): Add parser parameter.
1078 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1079 (rust_lex_stringish_test, rust_lex_test_sequence)
1080 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1081 (rust_lex_test_push_back, rust_lex_tests): Update.
1082
4c693332
PA
10832018-07-19 Pedro Alves <palves@redhat.com>
1084
1085 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1086 gdb::unique_xmalloc_ptr.
1087 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1088 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1089 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1090 copy-initialization.
1091 * guile/scm-pretty-print.c (ppscm_print_children): Use
1092 gdb::unique_xmalloc_ptr instead of cleanups.
1093 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1094 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1095 gdb::unique_xmalloc_ptr.
1096 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1097 Adjust to use gdb::unique_xmalloc_ptr.
1098 * guile/scm-utils.c (extract_arg): Adjust.
1099 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1100 gdb::unique_xmalloc_ptr instead of a cleanup.
1101
4581dc82
TT
11022018-07-19 Tom Tromey <tom@tromey.com>
1103
1104 * utils.c (do_value_free_to_mark)
1105 (make_cleanup_value_free_to_mark): Remove.
1106 * utils.h (make_cleanup_value_free_to_mark): Remove.
1107
43cc6c3a
PA
11082018-07-19 Pedro Alves <palves@redhat.com>
1109
1110 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1111 forwarding reference.
1112
3a5f2a48
PA
11132018-07-18 Pedro Alves <palves@redhat.com>
1114
1115 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1116 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1117 cleanup.
1118
557e56be
PA
11192018-07-18 Pedro Alves <palves@redhat.com>
1120
1121 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1122 exceptions.
1123 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1124 (gdbscm_wrap): New.
1125 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1126 directly instead of a cleanup.
1127 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1128 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1129 (vlscm_binop_gdbthrow): New, factored out from ...
1130 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1131 (vlscm_rich_compare): Use gdbscm_wrap.
1132 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1133 instead of a cleanup.
1134 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1135 cleanup.
1136 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1137 Use xfree directly instead of a cleanup.
1138 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1139 Adjust to use gdbscm_wrap and scoped_value_mark.
1140 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1141 (gdbscm_value_address, gdbscm_value_dereference)
1142 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1143 scoped_value_mark.
1144 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1145 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1146 scoped_value_mark.
1147 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1148 gdbscm_wrap and scoped_value_mark.
1149 (gdbscm_value_to_string): Use xfree directly instead of a
1150 cleanup. Move 'buffer' unique_ptr to TRY scope.
1151 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1152 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1153 scoped_value_mark.
1154 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1155 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1156 scoped_value_mark.
1157 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1158 gdbscm_wrap.
1159
42dc7699
TV
11602018-07-18 Tom de Vries <tdevries@suse.de>
1161
1162 * findvar.c (default_read_var_value): Also resolve dynamic type for
1163 LOC_OPTIMIZED_OUT vars.
1164
6592ceed
MR
11652018-07-18 Maciej W. Rozycki <macro@mips.com>
1166
1167 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1168 decoding.
1169
c6c6149a
TT
11702018-07-17 Tom Tromey <tom@tromey.com>
1171
1172 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1173 (compute_enum_list, pascm_set_param_value_x)
1174 (gdbscm_parameter_value): Update.
1175 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1176 (gdbscm_scm_to_host_string): Update.
1177 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1178 Update.
1179 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1180 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1181 * guile/scm-string.c (gdbscm_scm_to_string): Return
1182 unique_xmalloc_ptr.
1183 (gdbscm_scm_to_host_string): Likewise.
1184
a1a31cb8
TT
11852018-07-17 Tom Tromey <tom@tromey.com>
1186
1187 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1188 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1189 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1190 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1191 unique_xmalloc_ptr.
1192
15bf3002
TT
11932018-07-17 Tom Tromey <tom@tromey.com>
1194
1195 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1196 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1197 Update.
1198 * guile/scm-cmd.c (cmdscm_function): Update.
1199 * guile/scm-pretty-print.c
1200 (ppscm_print_exception_unless_memory_error): Update.
1201 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1202 Return unique_xmalloc_ptr.
1203
7eb1a66c
TT
12042018-07-17 Tom Tromey <tom@tromey.com>
1205
1206 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1207 Use string_printf.
1208
ce73f310
JW
12092018-07-17 Jim Wilson <jimw@sifive.com>
1210
27724bad
JW
1211 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1212 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1213 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1214 unecessary braces after EF_RISCV_RVC test. Delete call to
1215 set_gdbarch_decr_pc_after_break.
1216
ce73f310
JW
1217 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1218 RISCV_LAST_FP_REGNUM + 1.
1219 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1220
056dec39
TT
12212018-07-17 Tom Tromey <tom@tromey.com>
1222
1223 * configure.ac: Remove --disable-gdbcli.
1224 * configure: Rebuild.
1225 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1226 (SUBDIR_CLI_CFLAGS): Remove.
1227 (SFILES): Use SUBDIR_CLI_SRCS.
1228 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1229
4735f0ed
TT
12302018-07-17 Tom Tromey <tom@tromey.com>
1231
1232 PR gdb/18624:
1233 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1234
117a0e99
JW
12352018-07-16 Jim Wilson <jimw@sifive.com>
1236
1237 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1238
8a67aaa8
SM
12392018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1240
1241 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1242 variable.
1243 (libunwind_frame_sniffer): Likewise.
1244 (libunwind_frame_prev_register): Likewise.
1245 (libunwind_sigtramp_frame_sniffer): Likewise.
1246 * ia64-tdep.c (ia64_access_reg): Likewise.
1247 (ia64_access_rse_reg): Likewise.
1248 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1249 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1250
ec74dcd8
SM
12512018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1252
1253 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1254
a700e753
SM
12552018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1256
1257 * remote-sim.c (gdbsim_target::close,
1258 gdbsim_target::mourn_inferior): Remove unused variables.
1259
8b411ff8
SM
12602018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1261
1262 * ia64-tdep.c (ktab_buf): New global.
1263 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1264 (get_kernel_table): Adjust.
1265
edb0470b
TT
12662018-07-16 Tom Tromey <tom@tromey.com>
1267
1268 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1269 * dwarf2read.c (using_directives, new_symbol): Use
1270 outermost_context_p.
1271 * dbxread.c (process_one_symbol): Use outermost_context_p.
1272 * coffread.c (coff_symtab_read): Use outermost_context_p.
1273
6cccc9a8
TT
12742018-07-16 Tom Tromey <tom@tromey.com>
1275
1276 * dwarf2read.c (using_directives, read_func_scope)
1277 (read_lexical_block_scope): Update.
1278 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1279 * buildsym.h (local_using_directives, global_using_directives):
1280 Don't declare.
1281 (get_local_using_directives, set_local_using_directives)
1282 (get_global_using_directives): Declare.
1283 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1284 m_global_using_directives>: New members.
1285 (finish_block_internal, prepare_for_building)
1286 (reset_symtab_globals, end_symtab_get_static_block)
1287 (push_context): Update.
1288 (get_local_using_directives, set_local_using_directives)
1289 (get_global_using_directives): New functions.
1290 (buildsym_init): Update.
1291
652788a7
TT
12922018-07-16 Tom Tromey <tom@tromey.com>
1293
1294 * xcoffread.c (xcoff_initial_scan): Don't call
1295 free_pending_blocks.
1296 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1297 * buildsym.h (class scoped_free_pendings): Add constructor.
1298 (free_pending_blocks): Don't declare.
1299 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1300 (free_pending_blocks): Now static.
1301
8419ee53
TT
13022018-07-16 Tom Tromey <tom@tromey.com>
1303
1304 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1305 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1306 member.
1307 (struct subfile_stack): Remove.
1308 (subfile_stack): Remove.
1309 (push_subfile, pop_subfile, buildsym_init): Update.
1310
ccdac490
TT
13112018-07-16 Tom Tromey <tom@tromey.com>
1312
1313 * buildsym.c (push_subfile): Use gdb_assert.
1314 (pop_subfile): Use gdb_assert.
1315
43130d6f
TT
13162018-07-16 Tom Tromey <tom@tromey.com>
1317
1318 * buildsym.h (merge_symbol_lists): Remove.
1319 * buildsym.c (merge_symbol_lists): Remove.
1320
77d6f1aa
TT
13212018-07-16 Tom Tromey <tom@tromey.com>
1322
1323 * stabsread.c (scan_file_globals): Update comment.
1324 * stabsread.h (scan_file_globals): Move from buildsym.h.
1325 * buildsym.h (scan_file_globals): Move to stabsread.h.
1326
2c722d18
TT
13272018-07-16 Tom Tromey <tom@tromey.com>
1328
1329 * xcoffread.c (xcoff_new_init): Update.
1330 * mipsread.c (mipscoff_new_init): Update.
1331 * mdebugread.c (mdebug_build_psymtabs): Update.
1332 * elfread.c (elf_new_init): Update.
1333 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1334 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1335 * buildsym.h (buildsym_new_init): Don't declare.
1336 * buildsym.c (buildsym_new_init): Remove.
1337
5985ac61
TT
13382018-07-16 Tom Tromey <tom@tromey.com>
1339
1340 * stabsread.h (within_function): Move from buildsym.h.
1341 * stabsread.c (start_stabs): Clear within_function.
1342 * coffread.c (coff_start_symtab): Clear within_function.
1343 * buildsym.h (within_function): Move to stabsread.h.
1344 * buildsym.c (prepare_for_building): Update.
1345
6b84eeb2
TT
13462018-07-16 Tom Tromey <tom@tromey.com>
1347
1348 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1349 * dwarf2read.c (dwarf2_start_symtab): Don't set
1350 processing_gcc_compilation.
1351 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1352
2150c3ef
TT
13532018-07-16 Tom Tromey <tom@tromey.com>
1354
1355 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1356 (next_symbol_text_func): Move from buildsym.h.
1357 * stabsread.c (hashname): Move from buildsym.c.
1358 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1359 (next_symbol_text_func, hashname): Move to stabsread.h.
1360 * buildsym.c: Don't include bcache.h
1361 (hashname): Move to stasbread.c.
1362
0ec44fc0
TT
13632018-07-16 Tom Tromey <tom@tromey.com>
1364
1365 * buildsym.h (context_stack_size): Don't declare.
1366 * buildsym.c (context_stack_size): New global.
1367
81cc346d
TT
13682018-07-16 Tom Tromey <tom@tromey.com>
1369
1370 * dbxread.c (processing_acc_compilation): New global.
1371 * buildsym.h (processing_acc_compilation): Don't declare.
1372
2c99ee5c
TT
13732018-07-16 Tom Tromey <tom@tromey.com>
1374
1375 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1376 * dbxread.c (read_ofile_symtab): Update.
1377 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1378 * buildsym.h (last_source_start_addr): Remove.
1379 (set_last_source_start_addr, get_last_source_start_addr):
1380 Declare.
1381 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1382 parameter.
1383 (struct buildsym_compunit) <m_last_source_start_addr>: New
1384 member.
1385 (prepare_for_building): Remove start_addr parameter.
1386 (start_symtab, restart_symtab, end_symtab_get_static_block)
1387 (end_symtab_with_blockvector): Update.
1388 (set_last_source_start_addr, get_last_source_start_addr): New
1389 functions.
1390
530fedbc
TT
13912018-07-16 Tom Tromey <tom@tromey.com>
1392
1393 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1394 member.
1395 (have_line_numbers): Remove.
1396 (record_line, prepare_for_building, end_symtab_get_static_block)
1397 (augment_type_symtab): Update.
1398
6a976300
TT
13992018-07-16 Tom Tromey <tom@tromey.com>
1400
1401 * buildsym.c (~buildsym_compunit): Free the macro table.
1402 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1403 methods.
1404 <m_pending_macros>: New member.
1405 (pending_macros): Remove.
1406 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1407 (reset_symtab_globals, end_symtab_get_static_block)
1408 (end_symtab_with_blockvector, augment_type_symtab)
1409 (buildsym_init): Update.
1410
c0015d44
TT
14112018-07-16 Tom Tromey <tom@tromey.com>
1412
1413 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1414 parameter.
1415 (buildsym_compunit::set_last_source_file): New method.
1416 <m_last_source_file>: New member.
1417 (prepare_for_building): Remove "name" parameter.
1418 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1419 (last_source_file): Remove.
1420 (set_last_source_file, get_last_source_file): Update.
1421
e62cca7c
TT
14222018-07-16 Tom Tromey <tom@tromey.com>
1423
1424 * buildsym.c (prepare_for_building): Add assert.
1425
905eb0e2
TT
14262018-07-16 Tom Tromey <tom@tromey.com>
1427
1428 * buildsym.c (~buildsym_compunit): Update.
1429 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1430 (start_subfile, patch_subfile_names)
1431 (end_symtab_with_blockvector): Update.
1432
b248663f
TT
14332018-07-16 Tom Tromey <tom@tromey.com>
1434
1435 * buildsym.c (struct buildsym_compunit): Add constructor,
1436 destructor, initializers.
1437 (start_buildsym_compunit): Remove.
1438 (free_buildsym_compunit): Use "delete".
1439 (start_symtab, restart_symtab): Use "new".
1440
ff27d073
SM
14412018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1442
1443 * symfile.c (set_objfile_default_section_offset): Remove struct
1444 keyword.
1445
6a15ecf5
SH
14462018-07-14 Stafford Horne <shorne@gmail.com>
1447
1448 * (Responsible Maintainers): Add myself as or1k maintainer.
1449
027a4c30
TT
14502018-07-13 Tom Tromey <tom@tromey.com>
1451
1452 * symfile.c (set_objfile_default_section_offset): Use extra braces
1453 around initializer.
1454
5c1eda30
AA
14552018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1456
1457 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1458 non-branching basr.
1459
bc7b042b
PW
14602018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1461
1462 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1463 unittests/cli-utils-selftests.c
1464 * unittests/cli-utils-selftests.c: New file.
1465
a14c4daa
PW
14662018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1467
1468 * NEWS: Mention new commands. Mention change to 'thread apply'.
1469
1fe75df7
PW
14702018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1471
1472 * thread.c (thr_try_catch_cmd): New function.
1473 (thread_apply_all_command): Handle qcs flags.
1474 (thread_apply_command): Handle qcs flags.
1475 (taas_command): New function.
1476 (tfaas_command): New function.
1477 (_initialize_thread): Update to setup the new commands 'taas
1478 and 'tfaas'. Change doc string for 'thread apply'.
1479
6a70eb7d
PW
14802018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1481
1482 * stack.c: (trailing_outermost_frame): New function, mostly
1483 extracted from backtrace_command_1.
1484 (leading_innermost_frame): New function.
1485 (backtrace_command_1): Update to call trailing_outermost_frame.
1486 (frame_apply_command_count): New function.
1487 (frame_apply_level_command): New function.
1488 (frame_apply_all_command): New function.
1489 (frame_apply_command): New function.
1490 (faas_command): New function.
1491 (frame_cmd_list): New variable.
1492 (_initialize_stack): Update to setup the new commands 'frame apply'
1493 and 'faas'.
1494
529c08b2
PW
14952018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1496
1497 * cli-utils.c (number_or_range_parser::get_number): Only handle
1498 numbers or convenience var as numbers.
1499 (parse_flags): New function.
1500 (parse_flags_qcs): New function.
1501 (number_or_range_parser::finished): Ensure parsing end is detected
1502 before end of string.
1503 * cli-utils.h (parse_flags): New function.
1504 (parse_flags_qcs): New function.
1505 (number_or_range_parser): Remove m_finished bool.
1506 (number_or_range_parser::skip_range): Set m_in_range to false.
1507
64b58472
SDJ
15082018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1509
1510 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1511 on Windows.
1512
c7ab0aef
SDJ
15132018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1514 Jan Kratochvil <jan.kratochvil@redhat.com>
1515 Paul Fertser <fercerpav@gmail.com>
1516 Tsutomu Seki <sekiriki@gmail.com>
1517 Pedro Alves <palves@redhat.com>
1518
1519 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1520 'unittests/parse-connection-spec-selftests.c'.
1521 (COMMON_SFILES): Add 'common/netstuff.c'.
1522 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1523 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1524 * common/netstuff.c: New file.
1525 * common/netstuff.h: New file.
1526 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1527 (wait_for_connect): Update comment. New parameter
1528 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1529 Use 'sock' directly instead of 'scb->fd'.
1530 (try_connect): New function, with code from 'net_open'.
1531 (net_open): Rewrite main loop to deal with multiple
1532 sockets/addresses. Handle IPv6-style hostnames; implement
1533 support for IPv6 connections.
1534 * unittests/parse-connection-spec-selftests.c: New file.
1535
4c7333b3
PA
15362018-07-11 Pedro Alves <palves@redhat.com>
1537
1538 PR gdb/23377
1539 * remote.c (remote_target::remote_detach_pid): Call
1540 set_current_process.
1541
a6f88f6e
PA
15422018-07-11 Pedro Alves <palves@redhat.com>
1543
1544 * h8300-tdep.c (h8300_gdbarch_init): Remove
1545 set_gdbarch_ecoff_reg_to_regnum calls.
1546
16ff70dd
SDJ
15472018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1548
1549 PR c++/23373
1550 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1551 offsets/sizes for static members of a class/struct.
1552
12863263
AH
15532018-07-11 Alan Hayward <alan.hayward@arm.com>
1554
1555 * target-descriptions.c (tdesc_register_bitsize): Rename.
1556 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1557 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1558 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1559
1123588c
TT
15602018-07-10 Tom Tromey <tom@tromey.com>
1561
1562 * breakpoint.c (moribund_locations): Now static and a
1563 std::vector.
1564 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1565 (build_bpstat_chain, update_global_location_list)
1566 (breakpoint_retire_moribund): Update.
1567 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1568 VEC.
1569
8c49aa89
AB
15702018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1571
1572 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1573 (riscv_register_reggroup_p): Use new function, remove unneeded
1574 parenthesis.
1575 (riscv_push_dummy_call): Extend assert to compare against xlen or
1576 flen based on register type.
1577
42ecac17
AB
15782018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1579
1580 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1581
055303e2
AB
15822018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1583
1584 * remote.c (show_hardware_watchpoint_limit): New function.
1585 (show_hardware_watchpoint_length_limit): New function.
1586 (show_hardware_breakpoint_limit): New function.
1587 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1588 where appropriate, update help text.
1589
8fd32c1c
TT
15902018-07-09 Tom Tromey <tom@tromey.com>
1591
1592 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1593 (CLIBS): Don't mention NAT_CLIBS.
1594
31278b51
TT
15952018-07-09 Tom Tromey <tom@tromey.com>
1596
1597 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1598 (LIBGDB_OBS, clean mostlyclean): Update.
1599 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1600
e5fd1493
TT
16012018-07-09 Tom Tromey <tom@tromey.com>
1602
1603 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1604 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1605 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1606
981e0c0c
TT
16072018-07-09 Tom Tromey <tom@tromey.com>
1608
1609 * Makefile.in (ALLDEPFILES): Remove exec.c.
1610 (COMMON_OBS): Remove exec.o.
1611 (COMMON_SFILES): Add exec.c.
1612
14ccceb2
TT
16132018-07-09 Tom Tromey <tom@tromey.com>
1614
1615 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1616
5d3c3a68
TT
16172018-07-09 Tom Tromey <tom@tromey.com>
1618
1619 * Makefile.in (clean mostlyclean): Remove stamp-version.
1620 (version.c): Depend on stamp-version.
1621 (stamp-version): New rule, from version.c rule.
1622
1998086d
TT
16232018-07-09 Tom Tromey <tom@tromey.com>
1624
1625 * Makefile.in (init.c): Depend on stamp-init.
1626 (stamp-init): New rule, from init.c rule.
1627 (clean mostlyclean): Remove stamp-init.
1628
4c754949
TT
16292018-07-09 Tom Tromey <tom@tromey.com>
1630
1631 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1632 SUBDIR_GCC_COMPILE_SRCS.
1633
6497f1dd
TT
16342018-07-09 Tom Tromey <tom@tromey.com>
1635
1636 * Makefile.in (init.c): Remove some unused sed rules.
1637
97a34db9
TT
16382018-07-09 Tom Tromey <tom@tromey.com>
1639
1640 * Makefile.in (TSOBS): Remove.
1641 (INIT_FILES): Update.
1642 (LIBGDB_OBS): Update.
1643 (COMMON_SFILES): Add inflow.c.
1644 (SFILES): Remove inflow.c.
1645
25289ac1
JK
16462018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1647
1648 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1649
e83f4d97
SM
16502018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1651
4869c585
SM
1652 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1653 get_saveloc_name, is_signal_frame_name, step_name,
1654 init_remote_name, create_addr_space_name,
1655 destroy_addr_space_name, search_unwind_table_name,
1656 find_dyn_list_name): Constify.
e83f4d97 1657
6821842f
SM
16582018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1659
1660 * darwin-nat.c (darwin_pthread_kill): New function.
1661 (darwin_resume_thread): Use darwin_pthread_kill.
1662
c530603c
TV
16632018-07-05 Tom de Vries <tdevries@suse.de>
1664
1665 * macroexp.c (macro_buffer) <operator=>: New member function.
1666
a7d0f0f0
TT
16672018-07-04 Tom Tromey <tom@tromey.com>
1668
1669 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1670
6242c6a6
SM
16712018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1672
1673 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1674 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1675 * maint.c: Likewise.
1676 * top.c: Likewise.
1677
4e5b2f89
JB
16782018-07-04 Joel Brobecker <brobecker@adacore.com>
1679
1680 * NEWS: Create a new section for the next release branch.
1681 Rename the section of the current branch, now that it has
1682 been cut.
1683
538ccc4a
JB
16842018-07-04 Joel Brobecker <brobecker@adacore.com>
1685
1686 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1687 * version.in: Bump version to 8.2.50.DATE-git.
1688
1b919490
VB
16892018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1690 Pedro Alves <palves@redhat.com>
1691
1692 * linux-nat.c (linux_init_ptrace): Rename to ...
1693 (linux_init_ptrace_procfs): ... this. Call
1694 linux_proc_init_warnings.
1695 (linux_nat_target::post_attach)
1696 (linux_nat_target::post_startup_inferior): Adjust.
1697 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1698 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1699
1ea5da02
TV
17002018-07-04 Tom de Vries <tdevries@suse.de>
1701
1702 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1703 check ...
1704 (read_comp_unit_head): ... here.
1705
f51e0e20
TT
17062018-07-03 Tom Tromey <tom@tromey.com>
1707
1708 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1709 (stop_tracing, tstatus_command)
1710 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1711 (print_one_static_tracepoint_marker): Update.
1712 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1713 std::vector.
1714 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1715 VEC.
1716 (all_tracepoints, static_tracepoints_here): Return std::vector.
1717
d7e15655
TT
17182018-07-03 Tom Tromey <tom@tromey.com>
1719
1720 * common/ptid.c (ptid_equal): Remove.
1721 * common/ptid.h (ptid_equal): Don't declare.
1722 * ada-tasks.c: Update.
1723 * breakpoint.c: Update.
1724 * common/agent.c: Update.
1725 * corelow.c: Update.
1726 * darwin-nat-info.c: Update.
1727 * darwin-nat.c: Update.
1728 * dcache.c: Update.
1729 * dtrace-probe.c: Update.
1730 * dummy-frame.c: Update.
1731 * fbsd-nat.c: Update.
1732 * frame.c: Update.
1733 * gdbthread.h: Update.
1734 * gnu-nat.c: Update.
1735 * go32-nat.c: Update.
1736 * inf-loop.c: Update.
1737 * inf-ptrace.c: Update.
1738 * infcall.c: Update.
1739 * infcmd.c: Update.
1740 * inflow.c: Update.
1741 * infrun.c: Update.
1742 * linux-fork.c: Update.
1743 * linux-nat.c: Update.
1744 * linux-thread-db.c: Update.
1745 * mi/mi-cmd-var.c: Update.
1746 * mi/mi-interp.c: Update.
1747 * mi/mi-main.c: Update.
1748 * nto-procfs.c: Update.
1749 * ppc-linux-tdep.c: Update.
1750 * procfs.c: Update.
1751 * python/py-inferior.c: Update.
1752 * python/py-record-btrace.c: Update.
1753 * python/py-record.c: Update.
1754 * ravenscar-thread.c: Update.
1755 * regcache.c: Update.
1756 * remote-sim.c: Update.
1757 * remote.c: Update.
1758 * sol-thread.c: Update.
1759 * solib.c: Update.
1760 * target.c: Update.
1761 * tui/tui-stack.c: Update.
1762 * varobj.c: Update.
1763 * windows-nat.c: Update.
1764 * windows-tdep.c: Update.
1765
26a57c92
TT
17662018-07-03 Tom Tromey <tom@tromey.com>
1767
1768 * common/ptid.c (ptid_match): Remove.
1769 * common/ptid.h (ptid_match): Don't declare.
1770 * fbsd-nat.c: Update.
1771 * infcmd.c: Update.
1772 * infrun.c: Update.
1773 * linux-nat.c: Update.
1774 * record-btrace.c: Update.
1775 * regcache.c: Update.
1776 * remote.c: Update.
1777
d2a107e3
TT
17782018-07-03 Tom Tromey <tom@tromey.com>
1779
1780 * common/ptid.c (ptid_tid_p): Remove.
1781 * common/ptid.h (ptid_tid_p): Don't declare.
1782 * sol-thread.c: Update.
1783
15a9e13e
TT
17842018-07-03 Tom Tromey <tom@tromey.com>
1785
1786 * common/ptid.c (ptid_lwp_p): Remove.
1787 * common/ptid.h (ptid_lwp_p): Don't declare.
1788 * fbsd-nat.c: Update.
1789 * linux-nat.c: Update.
1790 * nat/linux-procfs.c: Update.
1791 * nat/x86-linux-dregs.c: Update.
1792 * sol-thread.c: Update.
1793
0e998d96
TT
17942018-07-03 Tom Tromey <tom@tromey.com>
1795
1796 * common/ptid.c (ptid_is_pid): Remove.
1797 * common/ptid.h (ptid_is_pid): Don't declare.
1798 * infrun.c: Update.
1799 * linux-nat.c: Update.
1800 * mi/mi-interp.c: Update.
1801 * remote.c: Update.
1802 * thread.c: Update.
1803
cc6bcb54
TT
18042018-07-03 Tom Tromey <tom@tromey.com>
1805
1806 * common/ptid.c (ptid_get_tid): Remove.
1807 * common/ptid.h (ptid_get_tid): Don't declare.
1808 * ada-tasks.c: Update.
1809 * aix-thread.c: Update.
1810 * bsd-uthread.c: Update.
1811 * darwin-nat.c: Update.
1812 * fbsd-nat.c: Update.
1813 * i386-darwin-nat.c: Update.
1814 * infrun.c: Update.
1815 * linux-tdep.c: Update.
1816 * nto-procfs.c: Update.
1817 * ppc-ravenscar-thread.c: Update.
1818 * python/py-infthread.c: Update.
1819 * ravenscar-thread.c: Update.
1820 * sol-thread.c: Update.
1821 * sparc-ravenscar-thread.c: Update.
1822 * windows-nat.c: Update.
1823
e38504b3
TT
18242018-07-03 Tom Tromey <tom@tromey.com>
1825
1826 * common/ptid.c (ptid_get_lwp): Remove.
1827 * common/ptid.h (ptid_get_lwp): Don't declare.
1828 * aarch64-linux-nat.c: Update.
1829 * ada-tasks.c: Update.
1830 * aix-thread.c: Update.
1831 * amd64-linux-nat.c: Update.
1832 * arm-linux-nat.c: Update.
1833 * corelow.c: Update.
1834 * fbsd-nat.c: Update.
1835 * fbsd-tdep.c: Update.
1836 * gnu-nat.c: Update.
1837 * i386-cygwin-tdep.c: Update.
1838 * i386-gnu-nat.c: Update.
1839 * i386-linux-nat.c: Update.
1840 * ia64-linux-nat.c: Update.
1841 * inf-ptrace.c: Update.
1842 * infrun.c: Update.
1843 * linux-fork.c: Update.
1844 * linux-nat.c: Update.
1845 * linux-tdep.c: Update.
1846 * linux-thread-db.c: Update.
1847 * mips-linux-nat.c: Update.
1848 * nat/aarch64-linux-hw-point.c: Update.
1849 * nat/aarch64-linux.c: Update.
1850 * nat/linux-btrace.c: Update.
1851 * nat/linux-osdata.c: Update.
1852 * nat/linux-procfs.c: Update.
1853 * nat/x86-linux-dregs.c: Update.
1854 * obsd-nat.c: Update.
1855 * ppc-fbsd-nat.c: Update.
1856 * ppc-linux-nat.c: Update.
1857 * procfs.c: Update.
1858 * python/py-infthread.c: Update.
1859 * ravenscar-thread.c: Update.
1860 * remote.c: Update.
1861 * s390-linux-nat.c: Update.
1862 * sol-thread.c: Update.
1863 * sol2-tdep.c: Update.
1864 * spu-linux-nat.c: Update.
1865 * x86-linux-nat.c: Update.
1866 * xtensa-linux-nat.c: Update.
1867
e99b03dc
TT
18682018-07-03 Tom Tromey <tom@tromey.com>
1869
1870 * common/ptid.c (ptid_get_pid): Remove.
1871 * common/ptid.h (ptid_get_pid): Don't declare.
1872 * aarch64-linux-nat.c: Update.
1873 * ada-lang.c: Update.
1874 * aix-thread.c: Update.
1875 * alpha-bsd-nat.c: Update.
1876 * amd64-fbsd-nat.c: Update.
1877 * amd64-linux-nat.c: Update.
1878 * arm-linux-nat.c: Update.
1879 * arm-nbsd-nat.c: Update.
1880 * auxv.c: Update.
1881 * break-catch-syscall.c: Update.
1882 * breakpoint.c: Update.
1883 * bsd-uthread.c: Update.
1884 * corelow.c: Update.
1885 * ctf.c: Update.
1886 * darwin-nat.c: Update.
1887 * fbsd-nat.c: Update.
1888 * fbsd-tdep.c: Update.
1889 * gcore.c: Update.
1890 * gnu-nat.c: Update.
1891 * hppa-nbsd-nat.c: Update.
1892 * hppa-obsd-nat.c: Update.
1893 * i386-fbsd-nat.c: Update.
1894 * ia64-linux-nat.c: Update.
1895 * inf-ptrace.c: Update.
1896 * infcmd.c: Update.
1897 * inferior.c: Update.
1898 * inferior.h: Update.
1899 * inflow.c: Update.
1900 * infrun.c: Update.
1901 * linux-fork.c: Update.
1902 * linux-nat.c: Update.
1903 * linux-tdep.c: Update.
1904 * linux-thread-db.c: Update.
1905 * m68k-bsd-nat.c: Update.
1906 * mi/mi-interp.c: Update.
1907 * mi/mi-main.c: Update.
1908 * mips-linux-nat.c: Update.
1909 * mips-nbsd-nat.c: Update.
1910 * mips64-obsd-nat.c: Update.
1911 * nat/aarch64-linux-hw-point.c: Update.
1912 * nat/aarch64-linux.c: Update.
1913 * nat/linux-btrace.c: Update.
1914 * nat/linux-osdata.c: Update.
1915 * nat/linux-procfs.c: Update.
1916 * nat/x86-linux-dregs.c: Update.
1917 * nto-procfs.c: Update.
1918 * obsd-nat.c: Update.
1919 * ppc-linux-nat.c: Update.
1920 * ppc-nbsd-nat.c: Update.
1921 * ppc-obsd-nat.c: Update.
1922 * proc-service.c: Update.
1923 * procfs.c: Update.
1924 * python/py-inferior.c: Update.
1925 * python/py-infthread.c: Update.
1926 * ravenscar-thread.c: Update.
1927 * record.c: Update.
1928 * remote-sim.c: Update.
1929 * remote.c: Update.
1930 * rs6000-nat.c: Update.
1931 * s390-linux-nat.c: Update.
1932 * sh-nbsd-nat.c: Update.
1933 * sol-thread.c: Update.
1934 * sparc-nat.c: Update.
1935 * sparc64-tdep.c: Update.
1936 * spu-linux-nat.c: Update.
1937 * spu-tdep.c: Update.
1938 * target-debug.h: Update.
1939 * target.c: Update.
1940 * thread.c: Update.
1941 * tid-parse.c: Update.
1942 * tracefile-tfile.c: Update.
1943 * vax-bsd-nat.c: Update.
1944 * windows-nat.c: Update.
1945 * x86-linux-nat.c: Update.
1946 * x86-nat.c: Update.
1947
f2907e49
TT
19482018-07-03 Tom Tromey <tom@tromey.com>
1949
1950 * common/ptid.c (pid_to_ptid): Remove.
1951 * common/ptid.h (pid_to_ptid): Don't declare.
1952 * aix-thread.c: Update.
1953 * arm-linux-nat.c: Update.
1954 * common/ptid.c: Update.
1955 * common/ptid.h: Update.
1956 * corelow.c: Update.
1957 * ctf.c: Update.
1958 * darwin-nat.c: Update.
1959 * fbsd-nat.c: Update.
1960 * fork-child.c: Update.
1961 * gnu-nat.c: Update.
1962 * go32-nat.c: Update.
1963 * inf-ptrace.c: Update.
1964 * infcmd.c: Update.
1965 * inferior.c: Update.
1966 * infrun.c: Update.
1967 * linux-fork.c: Update.
1968 * linux-nat.c: Update.
1969 * nat/aarch64-linux-hw-point.c: Update.
1970 * nat/fork-inferior.c: Update.
1971 * nat/x86-linux-dregs.c: Update.
1972 * nto-procfs.c: Update.
1973 * obsd-nat.c: Update.
1974 * procfs.c: Update.
1975 * progspace.c: Update.
1976 * remote.c: Update.
1977 * rs6000-nat.c: Update.
1978 * s390-linux-nat.c: Update.
1979 * sol-thread.c: Update.
1980 * spu-linux-nat.c: Update.
1981 * target.c: Update.
1982 * top.c: Update.
1983 * tracefile-tfile.c: Update.
1984 * windows-nat.c: Update.
1985
fd79271b
TT
19862018-07-03 Tom Tromey <tom@tromey.com>
1987
1988 * common/ptid.h (ptid_build): Don't declare.
1989 * common/ptid.c (ptid_build): Remove.
1990 * aix-thread.c: Update.
1991 * bsd-kvm.c: Update.
1992 * bsd-uthread.c: Update.
1993 * common/agent.c: Update.
1994 * common/ptid.c: Update.
1995 * common/ptid.h: Update.
1996 * corelow.c: Update.
1997 * darwin-nat.c: Update.
1998 * fbsd-nat.c: Update.
1999 * gnu-nat.c: Update.
2000 * linux-fork.c: Update.
2001 * linux-nat.c: Update.
2002 * linux-thread-db.c: Update.
2003 * nat/linux-osdata.c: Update.
2004 * nat/linux-procfs.c: Update.
2005 * nto-procfs.c: Update.
2006 * obsd-nat.c: Update.
2007 * proc-service.c: Update.
2008 * procfs.c: Update.
2009 * ravenscar-thread.c: Update.
2010 * remote-sim.c: Update.
2011 * remote.c: Update.
2012 * sol-thread.c: Update.
2013 * target.c: Update.
2014 * windows-nat.c: Update.
2015
057302ce
TT
20162018-07-03 Tom Tromey <tom@tromey.com>
2017
2018 * infrun.c (follow_exec): Use exit_inferior_silent.
2019 * inferior.c (exit_inferior_num_silent): Remove.
2020 * inferior.h (exit_inferior_num_silent): Don't declare.
2021
a50c11c6
TT
20222018-07-03 Tom Tromey <tom@tromey.com>
2023
2024 PR cli/23340:
2025 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2026 inferior_ptid on error.
2027
471b9d15
MR
20282018-07-02 Maciej W. Rozycki <macro@mips.com>
2029 Simon Marchi <simon.marchi@polymtl.ca>
2030
2031 PR tdep/8282
2032 * disasm.h (gdb_disassembler): Add
2033 `m_disassembler_options_holder'. member
2034 * disasm.c (get_all_disassembler_options): New function.
2035 (gdb_disassembler::gdb_disassembler): Use it.
2036 (gdb_buffered_insn_length_init_dis): Likewise.
2037 (gdb_buffered_insn_length): Adjust accordingly.
2038 (set_disassembler_options): Handle options with arguments.
2039 (show_disassembler_options_sfunc): Likewise. Add a leading new
2040 line if showing options with descriptions.
2041 (disassembler_options_completer): Adapt to using the
2042 `disasm_options_and_args_t' structure.
2043 * mips-tdep.c (mips_disassembler_options): New variable.
2044 (mips_disassembler_options_o32): Likewise.
2045 (mips_disassembler_options_n32): Likewise.
2046 (mips_disassembler_options_n64): Likewise.
2047 (gdb_print_insn_mips): Don't set `disassembler_options'.
2048 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2049 functions.
2050 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2051 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2052 `gdbarch_disassembler_options_implicit' and
2053 `gdbarch_valid_disassembler_options'.
2054 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2055 `disasm_options_and_args_t' structure.
2056 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2057 method.
2058 (valid_disassembler_options): Switch from `disasm_options_t' to
2059 the `disasm_options_and_args_t' structure.
2060 * NEWS: Document `set disassembler-options' support for the MIPS
2061 target.
2062 * gdbarch.h: Regenerate.
2063 * gdbarch.c: Regenerate.
2064
41823f29
SH
20652018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2066
2067 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2068
41206e32
JB
20692018-06-29 Joel Brobecker <brobecker@adacore.com>
2070
2071 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2072 parameter in call to amd64_target_description.
2073 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2074 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2075 (amd64fbsd_init_abi): Likewise.
2076 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2077 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2078 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2079 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2080
de52b960
PA
20812018-06-29 Pedro Alves <palves@redhat.com>
2082
2083 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2084 "segments" parameter.
2085 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2086 (_initialize_amd64_tdep): Update call to
2087 amd64_create_target_description.
2088 (amd64_target_description): Add "segments" parameter. Adjust
2089 the implementation to use it.
2090 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2091 call to amd64_create_target_description.
2092 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2093 * gdb/arch/amd64.h (amd64_create_target_description): Add
2094 "segments" register.
2095 * gdb/arch/amd64.c (amd64_create_target_description): Add
2096 "segments" parameter. Call create_feature_i386_64bit_segments
2097 only if SEGMENTS is true.
2098 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2099 call to amd64_create_target_description.
2100
75acb486
PA
21012018-06-29 Pedro Alves <palves@redhat.com>
2102
2103 * thread.c (thread_target_id_str): New, factored out from ...
2104 (print_thread_info_1): ... here. Use it to compute the max
2105 "Target Id" column width.
2106
c76a8ea3
PA
21072018-06-29 Pedro Alves <palves@redhat.com>
2108
2109 * remote.c (remote_target::extra_thread_info): Delete
2110 'display_buf' and 'n' locals. from the cache, regardless of
2111 packet mechanims is in use. Use cache for qThreadExtra and qP
2112 methods too.
2113
cd2bb709
PA
21142018-06-29 Pedro Alves <palves@redhat.com>
2115
2116 * blockframe.c (find_pc_sect_containing_function): New function.
2117 * breakpoint.c (print_breakpoint_location): Don't call
2118 find_pc_sect_function.
2119 * linespec.c (create_sals_line_offset): Record the location's
2120 symbol in the sal.
2121 * linespec.c (convert_address_location_to_sals): Fill in sal's
2122 symbol with find_pc_sect_containing_function.
2123 * symtab.c (find_function_start_sal): Rename to ...
2124 (find_function_start_sal_1): ... this.
2125 (find_function_start_sal): Reimplement as wrapper around
2126 find_function_start_sal_1, and use
2127 find_pc_sect_containing_function to fill in the sal's symbol.
2128 (find_function_start_sal(symbol*, bool)): Adjust.
2129 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2130 comments.
2131 (find_pc_sect_containing_function): Declare.
2132
991ff292
PA
21332018-06-29 Pedro Alves <palves@redhat.com>
2134
2135 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2136 true if the the location has no symbol.
2137
44cee4fd
TT
21382018-06-28 Tom Tromey <tom@tromey.com>
2139
2140 * NEWS: Mention --enable-codesign.
2141 * silent-rules.mk (ECHO_SIGN): New variable.
2142 * configure.ac: Add --enable-codesign.
2143 * configure: Rebuild.
2144 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2145 (gdb$(EXEEXT)): Optionally invoke codesign.
2146
f2ffa92b
PA
21472018-06-28 Pedro Alves <palves@redhat.com>
2148
2149 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2150 comments.
2151 (switch_to_thread_no_regs): Adjust comment.
2152 * infcmd.c (stop_pc): Delete.
2153 (post_create_inferior, info_program_command): Replace references
2154 to stop_pc with references to thread_info->suspend.stop_pc.
2155 * inferior.h (stop_pc): Delete declaration.
2156 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2157 (handle_inferior_event_1, handle_signal_stop)
2158 (process_event_stop_test, keep_going_stepped_thread)
2159 (handle_step_into_function, handle_step_into_function_backward)
2160 (print_stop_location): Replace references to stop_pc with
2161 references to thread_info->suspend.stop_pc.
2162 (struct infcall_suspend_state) <stop_pc>: Delete field.
2163 (save_infcall_suspend_state, restore_infcall_suspend_state):
2164 Remove references to inf_stat->stop_pc.
2165 * linux-fork.c (fork_load_infrun_state): Likewise.
2166 * record-btrace.c (record_btrace_set_replay): Likewise.
2167 * record-full.c (record_full_goto_entry): Likewise.
2168 * remote.c (print_one_stopped_thread): Likewise.
2169 * target.c (target_resume): Extend comment.
2170 * thread.c (set_executing_thread): New.
2171 (set_executing): Use it.
2172 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2173 Remove references to stop_pc.
2174
ecdc3a72
PA
21752018-06-28 Pedro Alves <palves@redhat.com>
2176
2177 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2178 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2179
d95d3aef
TT
21802018-06-28 Tom Tromey <tom@tromey.com>
2181
2182 * coffread.c (coff_symfile_finish): Update.
2183 * xcoffread.c (xcoff_symfile_finish): Update.
2184 * elfread.c (elf_symfile_finish): Update.
2185 * symfile.h (dwarf2_free_objfile): Don't declare.
2186 * dwarf2read.c (_initialize_dwarf2_read): Use
2187 register_objfile_data_with_cleanup.
2188 (dwarf2_free_objfile): Now static. Change signature.
2189
291f9a96
PT
21902018-06-28 Petr Tesarik <ptesarik@suse.cz>
2191
2192 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2193 option "-o" to add-symbol-file-load to add an offset to each
2194 section's load address.
2195 * symfile.c (set_objfile_default_section_offset): New function.
2196
d81a3eaf
PT
21972018-06-28 Petr Tesarik <ptesarik@suse.cz>
2198
2199 * symfile.c (add_symbol_file_command): Make sure that sections
2200 with the same name are sorted in the same order.
2201
ed6dfe51
PT
22022018-06-28 Petr Tesarik <ptesarik@suse.cz>
2203
2204 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2205 require the second argument. If omitted, load sections at the
2206 addresses specified in the file.
2207
d4d429d5
PT
22082018-06-28 Petr Tesarik <ptesarik@suse.cz>
2209
2210 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2211 (_initialize_symfile): Add option "-o" to symbol-file to add an
2212 offset to each section of the symbol file.
2213
39b27ab6
PT
22142018-06-28 Petr Tesarik <ptesarik@suse.cz>
2215
2216 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2217
41827fc3
TT
22182018-06-27 Tom Tromey <tom@tromey.com>
2219
2220 * stack.c (_initialize_stack): Update "func" help text.
2221
0c6aef22
TT
22222018-06-27 Tom Tromey <tom@tromey.com>
2223
2224 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2225 std::vector.
2226 (unwind_infopy_str, pyuw_create_unwind_info)
2227 (unwind_infopy_add_saved_register, pyuw_sniffer)
2228 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2229 Update.
2230 (struct saved_reg): Add constructor.
2231 <value>: Now a gdbpy_ref<>.
2232
63177289
TT
22332018-06-27 Tom Tromey <tom@tromey.com>
2234
2235 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2236
e76f78a0
SM
22372018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * gdb-gdb.py.in: Format using autopep8.
2240
9a14af7b
SM
22412018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2242
2243 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2244 (type_lookup_function): Recognize CORE_ADDR values.
2245
189366cd
SM
22462018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2247
2248 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2249 print tag_name.
2250
68ad5fb9
SM
22512018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2252
2253 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2254 <__lt__>: Add.
2255
141ec9f6
SM
22562018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2257
2258 * gdb-gdb.py: Move to...
2259 * gdb-gdb.py.in: ... here.
2260 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2261 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2262 dependencies.
2263 (distclean): Remove gdb-gdb.py when cleaning.
2264 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2265 * configure: Re-generate.
2266
4c4e7ad4
PA
22672018-06-27 Pedro Alves <palves@redhat.com>
2268
2269 * proc-service.c (get_ps_regcache): New.
2270 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2271 (ps_lsetfpregs): Use it.
2272
7ab6656f
OJ
22732018-06-27 Omair Javaid <omair.javaid@linaro.org>
2274
2275 PR gdb/21695
2276 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2277 (dwarf_decode_lines_1): Adjust.
2278
bd583225
SM
22792018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2280
2281 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2282 override.
2283 <info_proc>: Likewise.
2284
9a325b7b
JB
22852018-06-26 Joel Brobecker <brobecker@adacore.com>
2286
2287 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2288 to windows_fetch_one_register, and only handle the case of
2289 fetching one register. Move the code that reloads the context
2290 and iterates over all registers if R is negative to...
2291 (windows_nat_target::fetch_registers): ... here.
2292 (do_windows_store_inferior_registers): Rename to
2293 windows_store_one_register, and only handle the case of storing
2294 one register. Move the code that handles the case where r is
2295 negative to...
2296 (windows_nat_target::store_registers) ... here.
2297
a33ccfc7
TT
22982018-06-26 Tom Tromey <tom@tromey.com>
2299
2300 PR rust/22574:
2301 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2302 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2303 Update.
2304 (rust_internal_print_type): Add podata parameter.
2305 (rust_print_type): Update.
2306
e0c547d1
TT
23072018-06-26 Tom Tromey <tom@tromey.com>
2308
2309 * typeprint.h (struct print_offset_data) <update, finish,
2310 maybe_print_hole>: New methods.
2311 <indentation>: New constant.
2312 * typeprint.c (print_offset_data::indentation): Define.
2313 (print_offset_data::maybe_print_hole, print_offset_data::update)
2314 (print_offset_data::finish): Move from c-typeprint.c and rename.
2315 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2316 (print_spaces_filtered_with_print_options): Update.
2317 (c_print_type_union_field_offset, maybe_print_hole)
2318 (c_print_type_struct_field_offset): Move to typeprint.c and
2319 rename.
2320 (c_type_print_base_struct_union): Update.
2321
75cbc781
PA
23222018-06-25 Pedro Alves <palves@redhat.com>
2323
2324 * gdbthread.h (thread_info_ref, delete_thread)
2325 (delete_thread_silent, first_thread_of_inferior)
2326 (any_thread_of_inferior, switch_to_thread)
2327 (enable_thread_stack_temporaries)
2328 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2329 (get_last_thread_stack_temporary)
2330 (value_in_thread_stack_temporaries, can_access_registers_thread):
2331 Spell out "struct thread_info" instead of just "thread_info".
2332 * inferior.h (notice_new_inferior): Likewise.
2333
b7a08269
PA
23342018-06-25 Pedro Alves <palves@redhat.com>
2335
2336 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2337 pass thread_info pointer to delete_thread.
2338 (windows_nat_target::detach): Pass inferior pointer to
2339 detach_inferior.
2340 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2341 delete_thread.
2342 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2343 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2344 and pass a thread_info pointer to delete_thread.
2345 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2346 pass thread_info pointer to delete_thread.
2347 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2348 delete_thread_silent call.
2349 * procfs.c (procfs_target::detach): Pass inferior pointer to
2350 detach_inferior.
2351 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2352 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2353 delete_thread_silent call.
2354 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2355 pass thread_info pointer to delete_thread.
2356 (windows_nat_target::detach): Pass inferior pointer to
2357 delete_inferior.
2358
8e7767e3
AH
23592018-06-22 Alan Hayward <alan.hayward@arm.com>
2360
2361 * regcache.c (readable_regcache::read_part): Fix asserts.
2362 (reg_buffer::raw_collect_part): New function.
2363 (regcache::write_part): Fix asserts.
2364 (reg_buffer::raw_supply_part): New function.
2365 (regcache::transfer_regset_register): New helper function.
2366 (regcache::transfer_regset): Call new functions.
2367 (regcache_supply_regset): Use gdb_byte*.
2368 (regcache::supply_regset): Likewise.
2369 (regcache_collect_regset): Likewise.
2370 (regcache::collect_regset): Likewise.
2371 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2372 (reg_buffer::raw_supply_part): Likewise.
2373 (regcache::transfer_regset_register): Likewise.
2374 (regcache::transfer_regset): Use gdb_byte*.
2375
bfd60e34
AH
23762018-06-22 Alan Hayward <alan.hayward@arm.com>
2377
2378 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2379
00431a78
PA
23802018-06-21 Pedro Alves <palves@redhat.com>
2381
2382 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2383 instead of a ptid_t. All callers adjusted.
2384 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2385 adjusted.
2386 (print_ada_task_info, display_current_task_id, task_command_1):
2387 Adjust.
2388 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2389 inferior_thread.
2390 (breakpoint_kind): Adjust.
2391 (remove_breakpoints_pid): Rename to ...
2392 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2393 pointer. All callers adjusted.
2394 (bpstat_clear_actions): Use inferior_thread.
2395 (get_bpstat_thread): New.
2396 (bpstat_do_actions): Use it.
2397 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2398 to take a thread_info pointer. All callers adjusted.
2399 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2400 (breakpoint_re_set_thread): Use inferior_thread.
2401 * breakpoint.h (struct inferior): Forward declare.
2402 (bpstat_stop_status): Update.
2403 (remove_breakpoints_pid): Delete.
2404 (remove_breakpoints_inf): New.
2405 * bsd-uthread.c (bsd_uthread_target::wait)
2406 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2407 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2408 (maint_btrace_packet_history_cmd)
2409 (maint_btrace_clear_packet_history_cmd): Adjust.
2410 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2411 inferior_thread.
2412 * cli/cli-interp.c: Include "inferior.h".
2413 * common/refcounted-object.h (struct
2414 refcounted_object_ref_policy): New.
2415 * compile/compile-object-load.c: Include gdbthread.h.
2416 (store_regs): Use inferior_thread.
2417 * corelow.c (core_target::close): Use current_inferior.
2418 (core_target_open): Adjust to use first_thread_of_inferior and use
2419 the current inferior.
2420 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2421 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2422 <thread>: ... this new field. All references adjusted.
2423 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2424 Take a thread_info pointer instead of a ptid_t.
2425 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2426 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2427 thread_info pointer instead of a ptid_t.
2428 * elfread.c: Include "inferior.h".
2429 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2430 Use inferior_thread.
2431 * eval.c (evaluate_subexp): Likewise.
2432 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2433 inferior_thread.
2434 * gdb_proc_service.h (struct thread_info): Forward declare.
2435 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2436 <thread>: ... this new field. All references adjusted.
2437 * gdbarch.h, gdbarch.c: Regenerate.
2438 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2439 'thread' parameter. All implementations and callers adjusted.
2440 * gdbthread.h (thread_info) <set_running>: New method.
2441 (delete_thread, delete_thread_silent): Take a thread_info pointer
2442 instead of a ptid.
2443 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2444 (first_thread_of_process): Delete, replaced by ...
2445 (first_thread_of_inferior): ... this new function. All callers
2446 adjusted.
2447 (any_live_thread_of_process): Delete, replaced by ...
2448 (any_live_thread_of_inferior): ... this new function. All callers
2449 adjusted.
2450 (switch_to_thread, switch_to_no_thread): Declare.
2451 (is_executing): Delete.
2452 (enable_thread_stack_temporaries): Update comment.
2453 <enable_thread_stack_temporaries>: Take a thread_info pointer
2454 instead of a ptid_t. Incref the thread.
2455 <~enable_thread_stack_temporaries>: Decref the thread.
2456 <m_ptid>: Delete
2457 <m_thr>: New.
2458 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2459 (get_last_thread_stack_temporary)
2460 (value_in_thread_stack_temporaries, can_access_registers_thread):
2461 Take a thread_info pointer instead of a ptid_t. All callers
2462 adjusted.
2463 * infcall.c (get_call_return_value): Use inferior_thread.
2464 (run_inferior_call): Work with thread pointers instead of ptid_t.
2465 (call_function_by_hand_dummy): Work with thread pointers instead
2466 of ptid_t. Use thread_info_ref.
2467 * infcmd.c (proceed_thread_callback): Access thread's state
2468 directly.
2469 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2470 access thread's state directly.
2471 (continue_command): Use inferior_thread.
2472 (info_program_command): Use find_thread_ptid and access thread
2473 state directly.
2474 (proceed_after_attach_callback): Use thread state directly.
2475 (notice_new_inferior): Take a thread_info pointer instead of a
2476 ptid_t. All callers adjusted.
2477 (exit_inferior): Take an inferior pointer instead of a pid. All
2478 callers adjusted.
2479 (exit_inferior_silent): New.
2480 (detach_inferior): Delete.
2481 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2482 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2483 (detach_inferior_command, kill_inferior_command): Use
2484 find_inferior_id instead of valid_gdb_inferior_id and
2485 gdb_inferior_id_to_pid.
2486 (inferior_command): Use inferior and thread pointers.
2487 * inferior.h (struct thread_info): Forward declare.
2488 (notice_new_inferior): Take a thread_info pointer instead of a
2489 ptid_t. All callers adjusted.
2490 (detach_inferior): Delete declaration.
2491 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2492 instead of a pid. All callers adjusted.
2493 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2494 (valid_gdb_inferior_id): Delete.
2495 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2496 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2497 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2498 ...
2499 <inf>: ... this new field.
2500 <step_ptid>: Delete, replaced by ...
2501 <step_thread>: ... this new field.
2502 (get_displaced_stepping_state): Take an inferior pointer instead
2503 of a pid. All callers adjusted.
2504 (displaced_step_in_progress_any_inferior): Adjust.
2505 (displaced_step_in_progress_thread): Take a thread pointer instead
2506 of a ptid_t. All callers adjusted.
2507 (displaced_step_in_progress, add_displaced_stepping_state): Take
2508 an inferior pointer instead of a pid. All callers adjusted.
2509 (get_displaced_step_closure_by_addr): Adjust.
2510 (remove_displaced_stepping_state): Take an inferior pointer
2511 instead of a pid. All callers adjusted.
2512 (displaced_step_prepare_throw, displaced_step_prepare)
2513 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2514 All callers adjusted.
2515 (start_step_over): Adjust.
2516 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2517 displaced step queue.
2518 (do_target_resume): Adjust.
2519 (fetch_inferior_event): Use inferior_thread.
2520 (context_switch, get_inferior_stop_soon): Take an
2521 execution_control_state pointer instead of a ptid_t. All callers
2522 adjusted.
2523 (switch_to_thread_cleanup): Delete.
2524 (stop_all_threads): Use scoped_restore_current_thread.
2525 * inline-frame.c: Include "gdbthread.h".
2526 (inline_state) <inline_state>: Take a thread pointer instead of a
2527 ptid_t. All callers adjusted.
2528 <ptid>: Delete, replaced by ...
2529 <thread>: ... this new field.
2530 (find_inline_frame_state): Take a thread pointer instead of a
2531 ptid_t. All callers adjusted.
2532 (skip_inline_frames, step_into_inline_frame)
2533 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2534 pointer instead of a ptid_t. All callers adjusted.
2535 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2536 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2537 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2538 pointers directly.
2539 * linux-nat.c (get_detach_signal): Likewise.
2540 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2541 (thread_db_notice_clone): Adjust.
2542 (thread_db_find_new_threads_silently)
2543 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2544 a thread pointer instead of a ptid_t. All callers adjusted.
2545 * mi/mi-cmd-var.c: Include "inferior.h".
2546 (mi_cmd_var_update_iter): Update to use thread pointers.
2547 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2548 inferior directly.
2549 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2550 out to ...
2551 (mi_output_running): ... this new function.
2552 (mi_on_resume_1): Adjust to use it.
2553 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2554 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2555 directly.
2556 (interrupt_thread_callback): : Adjust to use thread and inferior
2557 pointers.
2558 * proc-service.c: Include "gdbthread.h".
2559 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2560 * progspace-and-thread.c: Include "inferior.h".
2561 * progspace.c: Include "inferior.h".
2562 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2563 hold a reference to an inferior_object.
2564 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2565 inferior_thread.
2566 * python/py-inferior.c (struct inferior_object): Give the type a
2567 tag name instead of a typedef.
2568 (python_on_normal_stop): No need to check if the current thread is
2569 listed.
2570 (inferior_to_inferior_object): Change return type to
2571 inferior_object. All callers adjusted.
2572 (find_thread_object): Delete, bits factored out to ...
2573 (thread_to_thread_object): ... this new function.
2574 * python/py-infthread.c (create_thread_object): Use
2575 inferior_to_inferior_object.
2576 (thpy_is_stopped): Use thread pointer directly.
2577 (gdbpy_selected_thread): Use inferior_thread.
2578 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2579 field, replaced with ...
2580 <thread>: ... this new field. All users adjusted.
2581 (btpy_insn_or_gap_new): Drop const.
2582 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2583 callers adjusted.
2584 * python/py-record.c: Include "gdbthread.h".
2585 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2586 a ptid_t. All callers adjusted.
2587 (gdbpy_current_recording): Use inferior_thread.
2588 * python/py-record.h (recpy_record_object) <ptid>: Delete
2589 field, replaced with ...
2590 <thread>: ... this new field. All users adjusted.
2591 (recpy_element_object) <ptid>: Delete
2592 field, replaced with ...
2593 <thread>: ... this new field. All users adjusted.
2594 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2595 a ptid_t. All callers adjusted.
2596 * python/py-threadevent.c: Include "gdbthread.h".
2597 (get_event_thread): Use thread_to_thread_object.
2598 * python/python-internal.h (struct inferior_object): Forward
2599 declare.
2600 (find_thread_object, find_inferior_object): Delete declarations.
2601 (thread_to_thread_object, inferior_to_inferior_object): New
2602 declarations.
2603 * record-btrace.c: Include "inferior.h".
2604 (require_btrace_thread): Use inferior_thread.
2605 (record_btrace_frame_sniffer)
2606 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2607 (get_thread_current_frame): Use scoped_restore_current_thread and
2608 switch_to_thread.
2609 (get_thread_current_frame): Use thread pointer directly.
2610 (record_btrace_replay_at_breakpoint): Use thread's inferior
2611 pointer directly.
2612 * record-full.c: Include "inferior.h".
2613 * regcache.c: Include "gdbthread.h".
2614 (get_thread_arch_regcache): Use the inferior's address space
2615 directly.
2616 (get_thread_regcache, registers_changed_thread): New.
2617 * regcache.h (get_thread_regcache(thread_info *thread)): New
2618 overload.
2619 (registers_changed_thread): New.
2620 (remote_target) <remote_detach_1>: Swap order of parameters.
2621 (remote_add_thread): <remote_add_thread>: Return the new thread.
2622 (get_remote_thread_info(ptid_t)): New overload.
2623 (remote_target::remote_notice_new_inferior): Use thread pointers
2624 directly.
2625 (remote_target::process_initial_stop_replies): Use
2626 thread_info::set_running.
2627 (remote_target::remote_detach_1, remote_target::detach)
2628 (extended_remote_target::detach): Adjust.
2629 * stack.c (frame_show_address): Use inferior_thread.
2630 * target-debug.h (target_debug_print_thread_info_pp): New.
2631 * target-delegates.c: Regenerate.
2632 * target.c (default_thread_address_space): Delete.
2633 (memory_xfer_partial_1): Use current_inferior.
2634 (target_detach): Use current_inferior.
2635 (target_thread_address_space): Delete.
2636 (generic_mourn_inferior): Use current_inferior.
2637 * target.h (struct target_ops) <thread_address_space>: Delete.
2638 (target_thread_address_space): Delete.
2639 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2640 pointers directly.
2641 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2642 thread pointer instead of a ptid_t. Adjust all callers.
2643 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2644 (first_thread_of_process): Delete, replaced by ...
2645 (first_thread_of_inferior): ... this new function. All callers
2646 adjusted.
2647 (any_thread_of_process): Rename to ...
2648 (any_thread_of_inferior): ... this, and take an inferior pointer.
2649 (any_live_thread_of_process): Rename to ...
2650 (any_live_thread_of_inferior): ... this, and take an inferior
2651 pointer.
2652 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2653 (value_in_thread_stack_temporaries)
2654 (get_last_thread_stack_temporary): Take a thread pointer instead
2655 of a ptid_t. Adjust all callers.
2656 (thread_info::set_running): New.
2657 (validate_registers_access): Use inferior_thread.
2658 (can_access_registers_ptid): Rename to ...
2659 (can_access_registers_thread): ... this, and take a thread
2660 pointer.
2661 (print_thread_info_1): Adjust to compare thread pointers instead
2662 of ptids.
2663 (switch_to_no_thread, switch_to_thread): Make extern.
2664 (scoped_restore_current_thread::~scoped_restore_current_thread):
2665 Use m_thread pointer directly.
2666 (scoped_restore_current_thread::scoped_restore_current_thread):
2667 Use inferior_thread.
2668 (thread_command): Use thread pointer directly.
2669 (thread_num_make_value_helper): Use inferior_thread.
2670 * top.c (execute_command): Use inferior_thread.
2671 * tui/tui-interp.c: Include "inferior.h".
2672 * varobj.c (varobj_create): Use inferior_thread.
2673 (value_of_root_1): Use find_thread_global_id instead of
2674 global_thread_id_to_ptid.
2675
33bab475
AH
26762018-06-21 Alan Hayward <alan.hayward@arm.com>
2677
2678 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2679 possible.
2680 (regcache::write_part): Likewise.
2681 (readable_regcache::cooked_read_part): Update comment.
2682 (readable_regcache::cooked_write_part): Likewise.
2683 * regcache.h: (readable_regcache::read_part): Likewise.
2684 (regcache::write_part): Likewise.
2685
8363f9d5
RB
26862018-06-21 Richard Bunt <richard.bunt@arm.com>
2687 Dirk Schubert <dirk.schubert@arm.com>
2688
2689 * aarch64-linux-nat.c (post_attach): New.
2690 (aarch64_linux_nat_target::post_attach): Override post_attach to
2691 record the number of hardware debug registers.
2692
0d0b0ea2
TT
26932018-06-20 Tom Tromey <tom@tromey.com>
2694
2695 * python/py-param.c (add_setshow_generic): Make parameters const.
2696 (parmpy_init): Update.
2697
302abd6e
SM
26982018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2699
2700 * regcache.h (regcache_cooked_read_ftype): Rename to...
2701 (register_read_ftype): ...this, change type to function_view.
2702 (class reg_buffer) <save>: Remove src parameter.
2703 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2704 parameter non-const in first overload. Remove src parameter in
2705 second overload.
2706 * regcache.c (do_cooked_read): Remove.
2707 (readonly_detached_regcache::readonly_detached_regcache): Make
2708 parameter non-const, adjust call to other constructor.
2709 (reg_buffer::save): Remove src parameter.
2710 * frame.c (do_frame_register_read): Remove.
2711 (frame_save_as_regcache): Use lambda function.
2712 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2713 parameter to ppu2spu_data *.
2714 (ppu2spu_sniffer): Use lambda function.
2715
19f3f25f
SM
27162018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2717
2718 * record-full.c (record_full_target::insert_breakpoint): Remove
2719 "struct" keyword, add const.
2720
d0ac1c44
SM
27212018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2722
2723 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2724 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2725 * configure.ac: Remove AC_PREREQ, add missing quoting.
2726 * gnulib/configure.ac: Modernize usage of
2727 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2728 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2729 (AUTOMAKE_VERSION): Bump to 1.15.1.
2730 * configure: Re-generate.
2731 * config.in: Re-generate.
2732 * aclocal.m4: Re-generate.
2733 * gnulib/aclocal.m4: Re-generate.
2734 * gnulib/config.in: Re-generate.
2735 * gnulib/configure: Re-generate.
2736 * gnulib/import/Makefile.in: Re-generate.
2737
6ae50267
PA
27382018-06-19 Pedro Alves <palves@redhat.com>
2739
2740 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2741 (lookup_minimal_symbol_by_pc_section): ... here with
2742 gdb_assert_not_reached added.
2743
61b04dd0
PA
27442018-06-19 Pedro Alves <palves@redhat.com>
2745
2746 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2747 parameter with a block parameter. Compare location's block symbol
2748 with the frame's block instead of addresses.
2749 (skip_inline_frames): Pass the current block instead of the
2750 frame's address. Break out as soon as we determine the frame
2751 should not be skipped.
2752
f709fabb
TT
27532018-06-18 Tom Tromey <tom@tromey.com>
2754
2755 * solib-aix.c (solib_aix_get_section_offsets): Return
2756 unique_xmalloc_ptr.
2757 (solib_aix_solib_create_inferior_hook): Update.
2758
668eb2f0
TT
27592018-06-18 Tom Tromey <tom@tromey.com>
2760
2761 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2762
309822ca
TT
27632018-06-18 Tom Tromey <tom@tromey.com>
2764
2765 * solib-frv.c (frv_relocate_main_executable): Use
2766 unique_xmalloc_ptr.
2767 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2768 unique_xmalloc_ptr.
2769
06424eac
TT
27702018-06-18 Tom Tromey <tom@tromey.com>
2771
2772 * objfiles.h (inhibit_section_map_updates): Update.
2773 (resume_section_map_updates, resume_section_map_updates_cleanup):
2774 Remove.
2775 * solib-svr4.c (svr4_handle_solib_event): Update.
2776 * objfiles.c (inhibit_section_map_updates): Return
2777 scoped_restore_tmpl<int>.
2778 (resume_section_map_updates, resume_section_map_updates_cleanup):
2779 Remove.
2780
b4be9fad
TT
27812018-06-18 Tom Tromey <tom@tromey.com>
2782
2783 * valprint.h (read_string): Update.
2784 * valprint.c (read_string): Change type of "buffer".
2785 (val_print_string): Update.
2786 * python/py-value.c (valpy_string): Update.
2787 * language.h (struct language_defn) <la_get_string>: Change
2788 type of "buffer".
2789 (default_get_string, c_get_string): Update.
2790 * language.c (default_get_string): Change type of "buffer".
2791 * guile/scm-value.c (gdbscm_value_to_string): Update.
2792 * c-lang.c (c_get_string): Change type of "buffer".
2793
3f0dbd67
TT
27942018-06-18 Tom Tromey <tom@tromey.com>
2795
2796 * ser-mingw.c (struct pipe_state_destroyer): New.
2797 (pipe_state_up): New typedef.
2798 (cleanup_pipe_state): Remove.
2799 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2800
69d340c6
TT
28012018-06-18 Tom Tromey <tom@tromey.com>
2802
2803 * rust-lang.h (rust_yyerror): Don't declare.
2804 * rust-lang.c (rust_language_defn): Update.
2805 * rust-exp.y (yyerror): Now static.
2806 * parse.c (parse_exp_in_context_1): Update.
2807 * p-lang.h (p_yyerror): Don't declare.
2808 * p-lang.c (p_language_defn): Update.
2809 * p-exp.y (yyerror): Now static.
2810 * opencl-lang.c (opencl_language_defn): Update.
2811 * objc-lang.c (objc_language_defn): Update.
2812 * m2-lang.h (m2_yyerror): Don't declare.
2813 * m2-lang.c (m2_language_defn): Update.
2814 * m2-exp.y (yyerror): Now static.
2815 * language.h (struct language_defn) <la_error>: Remove.
2816 * language.c (unk_lang_error): Remove.
2817 (unknown_language_defn, auto_language_defn): Remove.
2818 * go-lang.h (go_yyerror): Don't declare.
2819 * go-lang.c (go_language_defn): Update.
2820 * go-exp.y (yyerror): Now static.
2821 * f-lang.h (f_yyerror): Don't declare.
2822 * f-lang.c (f_language_defn): Update.
2823 * f-exp.y (yyerror): Now static.
2824 * d-lang.h (d_yyerror): Don't declare.
2825 * d-lang.c (d_language_defn): Update.
2826 * d-exp.y (yyerror): Now static.
2827 * c-lang.h (c_yyerror): Don't declare.
2828 * c-lang.c (c_language_defn, cplus_language_defn)
2829 (asm_language_defn, minimal_language_defn): Update.
2830 * c-exp.y (yyerror): Now static.
2831 * ada-lang.h (ada_yyerror): Don't declare.
2832 * ada-lang.c (ada_language_defn): Update.
2833 * ada-exp.y (yyerror): Now static.
2834
e9902bfc
AH
28352018-06-18 Alan Hayward <alan.hayward@arm.com>
2836
2837 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2838 (store_sveregs_to_thread): Likewise.
2839 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2840 (aarch64_linux_store_inferior_registers): Likewise.
2841 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2842 function.
2843 (aarch64_sve_regs_copy_to_regcache): Likewise.
2844 (aarch64_sve_regs_copy_from_regcache): Likewise.
2845 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2846 declaration.
2847 (aarch64_sve_regs_copy_to_regcache): Likewise.
2848 (aarch64_sve_regs_copy_from_regcache): Likewise.
2849 (sve_context): Structure from Linux headers.
2850 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2851 (SVE_SIG_ZREG_SIZE): Likewise.
2852 (SVE_SIG_PREG_SIZE): Likewise.
2853 (SVE_SIG_FFR_SIZE): Likewise.
2854 (SVE_SIG_REGS_OFFSET): Likewise.
2855 (SVE_SIG_ZREGS_OFFSET): Likewise.
2856 (SVE_SIG_ZREG_OFFSET): Likewise.
2857 (SVE_SIG_ZREGS_SIZE): Likewise.
2858 (SVE_SIG_PREGS_OFFSET): Likewise.
2859 (SVE_SIG_PREG_OFFSET): Likewise.
2860 (SVE_SIG_PREGS_SIZE): Likewise.
2861 (SVE_SIG_FFR_OFFSET): Likewise.
2862 (SVE_SIG_REGS_SIZE): Likewise.
2863 (SVE_SIG_CONTEXT_SIZE): Likewise.
2864 (SVE_PT_REGS_MASK): Likewise.
2865 (SVE_PT_REGS_FPSIMD): Likewise.
2866 (SVE_PT_REGS_SVE): Likewise.
2867 (SVE_PT_VL_INHERIT): Likewise.
2868 (SVE_PT_VL_ONEXEC): Likewise.
2869 (SVE_PT_REGS_OFFSET): Likewise.
2870 (SVE_PT_FPSIMD_OFFSET): Likewise.
2871 (SVE_PT_FPSIMD_SIZE): Likewise.
2872 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2873 (SVE_PT_SVE_PREG_SIZE): Likewise.
2874 (SVE_PT_SVE_FFR_SIZE): Likewise.
2875 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2876 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2877 (__SVE_SIG_TO_PT): Likewise.
2878 (SVE_PT_SVE_OFFSET): Likewise.
2879 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2880 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2881 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2882 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2883 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2884 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2885 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2886 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2887 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2888 (SVE_PT_SVE_SIZE): Likewise.
2889 (SVE_PT_SIZE): Likewise.
2890 (HAS_SVE_STATE): New define.
2891
17a1cc89
AH
28922018-06-18 Alan Hayward <alan.hayward@arm.com>
2893
2894 * nat/aarch64-sve-linux-sigcontext.h: New file.
2895 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2896 new files.
2897 (SVE_VQ_MIN): Likewise.
2898 (SVE_VQ_MAX): Likewise.
2899 (SVE_VL_MIN): Likewise.
2900 (SVE_VL_MAX): Likewise.
2901 (SVE_NUM_ZREGS): Likewise.
2902 (SVE_NUM_PREGS): Likewise.
2903 (sve_vl_valid): Likewise.
2904 (struct user_sve_header): Likewise.
2905
7010835a
AB
29062018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2907 Richard Bunt <Richard.Bunt@arm.com>
2908
2909 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2910 was requested by GDB.
2911
479b3ef4
TV
29122018-06-15 Tom de Vries <tdevries@suse.de>
2913
2914 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2915
8199b8f4
SM
29162018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2917
2918 * gnulib/update-gnulib.sh: Print expected versions of
2919 autoconf/aclocal.
2920
55c748a1
SM
29212018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2922
2923 * arch-utils.c (default_type_align): Use type_length_units.
2924 * gdbtypes.c (type_align): Use type_length_units.
2925
87a8eca7
PW
29262018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2927
2928 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2929 of 'define' command.
2930
5d9a0608
TV
29312018-06-14 Tom de Vries <tdevries@suse.de>
2932
2933 PR cli/22573
2934 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2935 get_no_prettyformat_print_options.
2936
ab89b5a5
SM
29372018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2938
2939 * sparc-nat.h: Include target.h.
2940 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2941 <fetch_registers>: Remove this argument in function call.
2942 <store_registers>: Remove this argument in function call, remove
2943 extra semicolon.
2944 <low_forget_process>: Call sparc64_forget_process instead of
2945 sparc_forget_process.
2946
62c808ae
RO
29472018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2948
2949 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2950 (procfs_target::make_corefile_notes): Adjust to new
2951 target_read_alloc return type.
2952
1840d81a
AB
29532018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2954 Stephen Roberts <stephen.roberts@arm.com>
2955
2956 PR gdb/22882
2957 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2958 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2959 Move should_notify_stop local into more inner scope.
2960
9516f85a
AB
29612018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2962 Stephen Roberts <stephen.roberts@arm.com>
2963
2964 PR gdb/22882
2965 * infrun.c (resume_1): Add call to mark_async_event_handler.
2966
defd2172
AB
29672018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2968
2969 * infrun.c (do_target_wait): Change old version of $pc printed.
2970
7b23e087
SM
29712018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2972
2973 * dwarf2read.c (read_index_from_section): Rename to...
2974 (read_gdb_index_from_section): ... this, update all callers.
2975 (dwarf2_read_index): Rename to...
2976 (dwarf2_read_gdb_index): ... this, update all callers.
2977
69c67a0b
JDA
29782018-06-11 John David Anglin <danglin@gcc.gnu.org>
2979
2980 * gdb/hppa-linux-nat.c
2981 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2982 hppa_linux_nat_target::fetch_registers.
2983
65d4cada
AH
29842018-06-11 Alan Hayward <alan.hayward@arm.com>
2985
2986 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2987 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2988 (AARCH64_DWARF_SVE_FFR): Likewise.
2989 (AARCH64_DWARF_SVE_P0): Likewise.
2990 (AARCH64_DWARF_SVE_Z0): Likewise.
2991
f868386e
AH
29922018-06-11 Alan Hayward <alan.hayward@arm.com>
2993
2994 * common/common-regcache.h (raw_compare): New function.
2995 * regcache.c (regcache::raw_compare): Likewise.
2996 * regcache.h (regcache::raw_compare): New declaration.
2997
9c861883
AH
29982018-06-11 Alan Hayward <alan.hayward@arm.com>
2999
3000 * common/common-regcache.h (reg_buffer_common): New structure.
3001 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3002 (reg_buffer::raw_supply): Likewise.
3003 (reg_buffer::raw_supply_integer): Likewise.
3004 (reg_buffer::raw_supply_zeroed): Likewise.
3005 (reg_buffer::raw_collect): Likewise.
3006 (reg_buffer::raw_collect_integer): Likewise.
3007 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3008 (reg_buffer::raw_supply): Likewise.
3009 (reg_buffer::raw_supply_integer): Likewise.
3010 (reg_buffer::raw_supply_zeroed): Likewise.
3011 (reg_buffer::raw_collect): Likewise.
3012 (reg_buffer::raw_collect_integer): Likewise.
3013
953edf2b
TT
30142018-06-10 Tom Tromey <tom@tromey.com>
3015
3016 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3017 (class remote_state) <stop_reply_queue>: Now std::vector.
3018 (remote_state::~remote_state)
3019 (remote_target::stop_reply_queue_length): Update.
3020 (struct queue_iter_param, remove_child_of_pending_fork)
3021 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3022 (check_pending_event_prevents_wildcard_vcont_callback)
3023 (remove_stop_reply_for_inferior)
3024 (remove_stop_reply_of_remote_state)
3025 (remote_notif_remove_once_on_match)
3026 (stop_reply_match_ptid_and_ws)
3027 (remote_kill_child_of_pending_fork): Remove.
3028 (remote_target::remove_new_fork_children)
3029 (remote_target::check_pending_events_prevent_wildcard_vcont)
3030 (remote_target::discard_pending_stop_replies)
3031 (remote_target::discard_pending_stop_replies_in_queue)
3032 (remote_target::remote_notif_remove_queued_reply)
3033 (remote_target::queued_stop_reply)
3034 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3035 (remote_target::wait, remote_target::kill_new_fork_children)
3036 (remote_target::async): Update.
3037
1ddbba9d
TT
30382018-06-10 Tom Tromey <tom@tromey.com>
3039
3040 * record-full.c (record_full_arch_list_cleanups): Remove.
3041 (record_full_message): Use try/catch.
3042 (record_full_wait_cleanups): Remove.
3043 (record_full_wait_1): Use try/catch.
3044 (record_full_restore): Likewise.
3045
219605fd
TT
30462018-06-10 Tom Tromey <tom@tromey.com>
3047
3048 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3049 declare VEC. Add constructor.
3050 <in_target_beneath>: Now bool.
3051 (record_full_breakpoints): Now a std::vector, static.
3052 (record_full_sync_record_breakpoints)
3053 (record_full_init_record_breakpoints)
3054 (record_full_target::insert_breakpoint)
3055 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3056
71b73764
SM
30572018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3058
3059 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3060 * serial.c (serial_interface_lookup): Remove struct keyword.
3061
4360561f
TT
30622018-06-10 Tom Tromey <tom@tromey.com>
3063
3064 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3065 method.
3066 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3067 a method.
3068 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3069 method.
3070 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3071 "beneath" as a method.
3072 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3073 Use "beneath" as a method.
3074
d14b92bf
TT
30752018-06-10 Tom Tromey <tom@tromey.com>
3076
3077 * tracefile.c (struct trace_file_writer_deleter): New.
3078 <operator()>: Rename from trace_file_writer_xfree.
3079 (trace_file_writer_up): New typedef.
3080 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3081
835dcf92
SM
30822018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3083
3084 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3085 <m_registers, m_register_status>: Change type to
3086 std::unique_ptr.
3087 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3088 XCNEWVEC.
3089
aac0d564
SM
30902018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3091
3092 * common/common-regcache.h (enum register_status): Add
3093 underlying type "signed char".
3094 * regcache.h (reg_buffer) <m_register_status>: Change type to
3095 register_status *.
3096 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3097 register_status instead of signed char.
3098 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3099 (reg_buffer::get_register_status): Remove cast.
3100 (readable_regcache::raw_read): Remove cast.
3101 (readable_regcache::cooked_read): Remove cast.
3102
77ad7394
TT
31032018-06-09 Tom Tromey <tom@tromey.com>
3104
3105 * source.c (reverse_search_command, forward_search_command): Use
3106 scoped_fd.
3107
191cca63
TT
31082018-06-09 Tom Tromey <tom@tromey.com>
3109
3110 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3111 (serial_ops_list): Now static, std::vector.
3112 (serial_interface_lookup, serial_add_interface): Update.
3113
c5d0225d
TT
31142018-06-09 Tom Tromey <tom@tromey.com>
3115
3116 * dwarf2read.c (process_cu_includes): Update.
3117 (process_full_comp_unit): Update.
3118 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3119 std::vector.
3120
aeab5128
PK
31212018-06-08 Paul Koning <paul_koning@dell.com>
3122
3123 PR gdb/23252
3124
3125 * python/python.c (do_start_initialization):
3126 Avoid call to internal Python API.
3127 (init__gdb_module): New function.
3128
5045b3d7
GB
31292018-06-08 Gary Benson <gbenson@redhat.com>
3130
3131 * linux-thread-db.c (valprint.h): New include.
3132 (struct check_thread_db_info): New structure.
3133 (check_thread_db_on_load, tdb_testinfo): New static globals.
3134 (check_thread_db, check_thread_db_callback): New functions.
3135 (try_thread_db_load_1): Run integrity checks if requested.
3136 (maintenance_check_libthread_db): New function.
3137 (_initialize_thread_db): Register "maint check libthread-db"
3138 and "maint set/show check-libthread-db".
3139 * NEWS: Mention the above new commands.
3140
2f4f025f
TT
31412018-06-08 Tom Tromey <tom@tromey.com>
3142
3143 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3144 now a method.
3145
343b0027
TT
31462018-06-08 Tom Tromey <tom@tromey.com>
3147
3148 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3149
8dcc53b3
TT
31502018-06-08 Tom Tromey <tom@tromey.com>
3151
3152 * common/btrace-common.h (struct btrace_data): Add constructor,
3153 destructor, move assignment operator.
3154 <empty, clear, fini>: New methods.
3155 <format>: Initialize.
3156 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3157 (btrace_data_empty): Don't declare.
3158 * common/btrace-common.c (btrace_data_init): Remove.
3159 (btrace_data::fini): Rename from btrace_data_fini.
3160 (btrace_data::empty): Rename from btrace_data_empty.
3161 (btrace_data::clear): Rename from btrace_data_clear. Return
3162 bool.
3163 * btrace.h (make_cleanup_btrace_data): Don't declare.
3164 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3165 (parse_xml_btrace): Update.
3166 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3167 (maint_btrace_clear_packet_history_cmd): Update.
3168
a1740ee1
PA
31692018-06-07 Pedro Alves <palves@redhat.com>
3170
3171 * target.h (target_ops) <beneath>: Now a method. All references
3172 updated.
3173 (class target_stack): New.
3174 * target.c (g_target_stack): New.
3175 (g_current_top_target): Delete.
3176 (current_top_target): Get the top target out of g_target_stack.
3177 (target_stack::push, target_stack::unpush): New.
3178 (push_target, unpush_target): Reimplement.
3179 (target_is_pushed): Reimplement in terms of g_target_stack.
3180 (target_ops::beneath, target_stack::find_beneath): New.
3181
d6ca69cd
PA
31822018-06-07 Pedro Alves <palves@redhat.com>
3183
3184 * target.h (find_target_beneath): Delete declaration.
3185 * target.c (find_target_beneath): Delete definition.
3186 * aix-thread.c: All callers of find_target_beneath adjusted to
3187 call target_ops::beneath instead.
3188 * bsd-uthread.c: Likewise.
3189 * linux-thread-db.c: Likewise.
3190 * ravenscar-thread.c: Likewise.
3191 * sol-thread.c: Likewise.
3192 * spu-multiarch.c: Likewise.
3193
b6a8c27b
PA
31942018-06-07 Pedro Alves <palves@redhat.com>
3195
3196 * target.h (target_ops) <beneath>: Now a method. All references
3197 updated.
3198 (target_ops) <m_beneath>: New.
3199 * target.c (target_ops::beneath): New.
3200 * corelow.c: Adjust all references to target_ops::beneath.
3201 * linux-thread-db.c: Likewise.
3202 * make-target-delegates: Likewise.
3203 * record-btrace.c: Likewise.
3204 * record-full.c: Likewise.
3205 * remote.c: Likewise.
3206 * target.c: Likewise.
3207 * target-delegates.c: Regenerate.
3208
8b88a78e
PA
32092018-06-07 Pedro Alves <palves@redhat.com>
3210
3211 * target.h (target_stack): Delete.
3212 (current_top_target): Declare function.
3213 * target.c (target_stack): Delete.
3214 (g_current_top_target): New.
3215 (current_top_target): New function.
3216 * auxv.c: Use current_top_target instead of target_stack
3217 throughout.
3218 * avr-tdep.c: Likewise.
3219 * breakpoint.c: Likewise.
3220 * corefile.c: Likewise.
3221 * elfread.c: Likewise.
3222 * eval.c: Likewise.
3223 * exceptions.c: Likewise.
3224 * frame.c: Likewise.
3225 * gdbarch-selftests.c: Likewise.
3226 * gnu-v3-abi.c: Likewise.
3227 * ia64-tdep.c: Likewise.
3228 * ia64-vms-tdep.c: Likewise.
3229 * infcall.c: Likewise.
3230 * infcmd.c: Likewise.
3231 * infrun.c: Likewise.
3232 * linespec.c: Likewise.
3233 * linux-tdep.c: Likewise.
3234 * minsyms.c: Likewise.
3235 * ppc-linux-nat.c: Likewise.
3236 * ppc-linux-tdep.c: Likewise.
3237 * procfs.c: Likewise.
3238 * regcache.c: Likewise.
3239 * remote.c: Likewise.
3240 * rs6000-tdep.c: Likewise.
3241 * s390-linux-nat.c: Likewise.
3242 * s390-tdep.c: Likewise.
3243 * solib-aix.c: Likewise.
3244 * solib-darwin.c: Likewise.
3245 * solib-dsbt.c: Likewise.
3246 * solib-spu.c: Likewise.
3247 * solib-svr4.c: Likewise.
3248 * solib-target.c: Likewise.
3249 * sparc-tdep.c: Likewise.
3250 * sparc64-tdep.c: Likewise.
3251 * spu-tdep.c: Likewise.
3252 * symfile.c: Likewise.
3253 * symtab.c: Likewise.
3254 * target-descriptions.c: Likewise.
3255 * target-memory.c: Likewise.
3256 * target.c: Likewise.
3257 * target.h: Likewise.
3258 * tracefile-tfile.c: Likewise.
3259 * tracepoint.c: Likewise.
3260 * valops.c: Likewise.
3261 * valprint.c: Likewise.
3262 * value.c: Likewise.
3263 * windows-tdep.c: Likewise.
3264 * mi/mi-main.c: Likewise.
3265
c7110220
TT
32662018-06-07 Tom Tromey <tom@tromey.com>
3267
3268 * valprint.h (build_address_symbolic): Declare.
3269 * printcmd.c (print_address_symbolic): Update.
3270 (build_address_symbolic): Change "name" and "filename" to
3271 std::string.
3272 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3273 Update.
3274 * defs.h (build_address_symbolic): Remove declaration.
3275
63bad7b6
AH
32762018-06-07 Alan Hayward <alan.hayward@arm.com>
3277
3278 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3279 (aarch64_vnv_type): Add function.
3280 (aarch64_pseudo_register_name): Add V regs for SVE.
3281 (aarch64_pseudo_register_type): Likewise.
3282 (aarch64_pseudo_register_reggroup_p): Likewise.
3283 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3284 (aarch64_pseudo_read_value): Add V regs for SVE.
3285 (aarch64_pseudo_write_2): Use V0 offset for SVE
3286 (aarch64_pseudo_write): Add V regs for SVE.
3287 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3288
13e3c608
SDJ
32892018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3290
3291 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3292 (sve_vl_from_vq): Likewise.
3293
c61b06a1
TT
32942018-06-05 Tom Tromey <tom@tromey.com>
3295
3296 * cli/cli-cmds.c (show_version): Update.
3297 * top.c (print_gdb_version): Add "interactive" parameter.
3298 Update.
3299 * main.c (captured_main_1): Update.
3300 * top.h (print_gdb_version): Add "interactive" parameter and a
3301 comment.
3302
115f7325
DM
33032018-06-05 David Malcolm <dmalcolm@redhat.com>
3304
3305 * common/enum-flags.h: Add trailing semicolon to example in
3306 comment.
3307
eb6af809
TT
33082018-06-05 Tom Tromey <tom@tromey.com>
3309
3310 PR cli/12326:
3311 * NEWS: Add entry about pager.
3312 * utils.c (pagination_disabled_for_command): New global.
3313 (prompt_for_continue): Allow "c" response to prompt.
3314 (reinitialize_more_filter): Clear
3315 pagination_disabled_for_command.
3316 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3317
54d343a2
TT
33182018-06-04 Tom Tromey <tom@tromey.com>
3319
3320 * ada-lang.h (ada_lookup_symbol_list): Update.
3321 * ada-lang.c (resolve_subexp): Update.
3322 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3323 parameter.
3324 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3325 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3326 results parameter to std::vector.
3327 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3328 Update.
3329 * ada-exp.y (block_lookup): Update.
3330 (select_possible_type_sym): Change type of syms. Remove nsyms
3331 parameter.
3332 (write_var_or_type, write_name_assoc): Update.
3333
178d6a63
JB
33342018-06-04 Joel Brobecker <brobecker@adacore.com>
3335
3336 * windows-nat.c (windows_nat_target::xfer_partial): Return
3337 TARGET_XFER_E_IO if we need to delegate to the target beneath
3338 but BENEATH is NULL.
3339
baf00c2d
SM
33402018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3341
3342 * Makefile.in (config.status): Add configure.nat as a
3343 dependency.
3344
214b073c
TT
33452018-06-04 Tom Tromey <tom@tromey.com>
3346
3347 * cp-name-parser.y (cpname_state): Add method declarations.
3348 (HANDLE_QUAL): Update.
3349 (cpname_state::d_grab, cpname_state::fill_comp)
3350 (cpname_state::make_operator, cpname_state::make_dtor)
3351 (cpname_state::make_builtin_type, cpname_state::make_name)
3352 (cpname_state::d_qualify, cpname_state::d_int_type)
3353 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3354 (%union): Move earlier.
3355
62b74cb8
AH
33562018-06-04 Alan Hayward <alan.hayward@arm.com>
3357
3358 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3359
3c5cd5c3
AH
33602018-06-04 Alan Hayward <alan.hayward@arm.com>
3361
3362 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3363 (aarch64_pseudo_write_1): Likewise.
3364 (aarch64_pseudo_read_value): Use helper.
3365 (aarch64_pseudo_write): Likewise.
3366
59f413d5
PA
33672018-06-04 Pedro Alves <palves@redhat.com>
3368
3369 * darwin-nat.c (darwin_ops): Delete.
3370 (darwin_attach_pid): Use get_native_target.
3371
1332a140
AH
33722018-06-04 Alan Hayward <alan.hayward@arm.com>
3373
3374 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3375 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3376
ba2d2bb2
AH
33772018-06-04 Alan Hayward <alan.hayward@arm.com>
3378
3379 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3380 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3381 (aarch64_gdbarch_init): Check for SVE.
3382 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3383
33842018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3385
3386 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3387 * aarch64-tdep.h (aarch64_read_description): Likewise.
3388 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3389 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3390 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3391 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3392 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3393
41c60b4b
SM
33942018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3395
3396 * value.c (value_fetch_lazy_bitfield): New.
3397 (value_fetch_lazy_memory): New.
3398 (value_fetch_lazy_register): New.
3399 (value_fetch_lazy): Factor out to smaller functions.
3400
7b640f72
TT
34012018-06-01 Tom Tromey <tom@tromey.com>
3402
3403 * cp-name-parser.y (backslashable, represented): Now const.
3404
98e69eb3
TT
34052018-06-01 Tom Tromey <tom@tromey.com>
3406
3407 * cp-name-parser.y: Include parser-defs.h.
3408 (parser_fprintf): Remove declaration.
3409
49265499
TT
34102018-06-01 Tom Tromey <tom@tromey.com>
3411
3412 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3413 %parse-param.
3414 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3415 (global_result): Remove globals.
3416 (struct cpname_state): New.
3417 (yyparse): Don't declare.
3418 (yylex, yyerror): Move declarations after %union.
3419 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3420 (make_name): Add state parameter.
3421 Update all callers.
3422 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3423 parameter.
3424 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3425 Update.
3426 (yylex): Add lvalp, state parameters.
3427 (yyerror): Add state parameter.
3428 (cp_demangled_name_to_comp): Update.
3429
55b6c984
TT
34302018-06-01 Tom Tromey <tom@tromey.com>
3431
3432 * cp-name-parser.y (parser_fprintf): Declare.
3433 (GDB_YY_REMAP_PREFIX): Define.
3434 Include yy-remap.h. Don't redefine yy* identifiers.
3435
3513a6bb
TT
34362018-06-01 Tom Tromey <tom@tromey.com>
3437
3438 * python/py-type.c (typy_legacy_template_argument): Update.
3439 * cp-support.h (cp_demangled_name_to_comp): Update.
3440 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3441 parameter to be a "std::string *".
3442 (main): Update.
3443
e9cb46ab
L
34442018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3445
3446 * ada-lex.l: Include "diagnostics.h" instead of
3447 "common/diagnostics.h".
3448 * unittests/environ-selftests.c: Likewise.
3449 * common/diagnostics.h: Moved to ../include.
3450
8e817061
JB
34512018-06-01 Joel Brobecker <brobecker@adacore.com>
3452
3453 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3454 to language_mode_manual while calling breakpoint_re_set_one.
3455
a737d952
TT
34562018-06-01 Tom Tromey <tom@tromey.com>
3457
3458 * valops.c (value_cast_structs, destructor_name_p): Update.
3459 * symtab.c (gdb_mangle_name): Update.
3460 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3461 Update.
3462 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3463 (pascal_object_print_value_fields, pascal_object_print_value):
3464 Update.
3465 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3466 * linespec.c (find_methods): Update.
3467 * gdbtypes.h (type_name_no_tag): Remove.
3468 (type_name_or_error): Rename from type_name_no_tag_or_error.
3469 * gdbtypes.c (type_name_no_tag): Remove.
3470 (type_name_or_error): Rename from type_name_no_tag_or_error.
3471 (lookup_struct_elt_type, check_typedef): Update.
3472 * expprint.c (print_subexp_standard): Update.
3473 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3474 * d-namespace.c (d_lookup_nested_symbol): Update.
3475 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3476 (cp_print_class_member): Update.
3477 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3478 * completer.c (add_struct_fields): Update.
3479 * c-typeprint.c (cp_type_print_derivation_info)
3480 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3481 Update.
3482 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3483 (ada_prefer_type, ada_is_exception_sym): Update.
3484
e86ca25f
TT
34852018-06-01 Tom Tromey <tom@tromey.com>
3486
3487 * valops.c (enum_constant_from_type, value_namespace_elt)
3488 (value_maybe_namespace_elt): Update.
3489 * valarith.c (find_size_for_pointer_math): Update.
3490 * target-descriptions.c (make_gdb_type): Update.
3491 * symmisc.c (print_symbol): Update.
3492 * stabsread.c (define_symbol, read_type)
3493 (complain_about_struct_wipeout, add_undefined_type)
3494 (cleanup_undefined_types_1): Update.
3495 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3496 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3497 (rust_internal_print_type, rust_composite_type)
3498 (rust_evaluate_funcall, rust_evaluate_subexp)
3499 (rust_inclusive_range_type_p): Update.
3500 * python/py-type.c (typy_get_tag): Update.
3501 * p-typeprint.c (pascal_type_print_base): Update.
3502 * mdebugread.c (parse_symbol, parse_type): Update.
3503 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3504 Update.
3505 * guile/scm-type.c (gdbscm_type_tag): Update.
3506 * go-lang.c (sixg_string_p): Update.
3507 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3508 Update.
3509 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3510 (TYPE_TAG_NAME): Remove.
3511 * gdbtypes.c (type_name_no_tag): Simplify.
3512 (check_typedef, check_types_equal, recursive_dump_type)
3513 (copy_type_recursive, arch_composite_type): Update.
3514 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3515 in summary mode when needed.
3516 * eval.c (evaluate_funcall): Update.
3517 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3518 (process_structure_scope, read_enumeration_type)
3519 (read_namespace_type, read_module_type, determine_prefix): Update.
3520 * cp-support.c (inspect_type): Update.
3521 * coffread.c (process_coff_symbol, decode_base_type): Update.
3522 * c-varobj.c (c_is_path_expr_parent): Update.
3523 * c-typeprint.c (c_type_print_base_struct_union): Update.
3524 (c_type_print_base_1): Update. Print struct/class/union/enum in
3525 summary when using C language.
3526 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3527 (gen_maybe_namespace_elt): Update.
3528 * ada-lang.c (ada_type_name): Simplify.
3529 (empty_record, ada_template_to_fixed_record_type_1)
3530 (template_to_static_fixed_type)
3531 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3532
c1ec8cea
TT
35332018-06-01 Tom Tromey <tom@tromey.com>
3534
3535 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3536 c_print_type.
3537 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3538 (c_print_type): Update.
3539 (c_print_type): New overload.
3540 (c_type_print_varspec_prefix, c_type_print_args)
3541 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3542 (c_type_print_base_struct_union, c_type_print_base_1)
3543 (cp_type_print_method_args): Add "language" parameter.
3544 (c_type_print_base): Update.
3545 * c-lang.h (c_print_type): Add new overload.
3546
bc8453a7
TT
35472018-06-01 Tom Tromey <tom@tromey.com>
3548
3549 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3550 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3551
739e8682
AH
35522018-06-01 Alan Hayward <alan.hayward@arm.com>
3553
3554 * aarch64-tdep.c (aarch64_sve_register_names): New const
3555 var.
3556 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3557 (AARCH64_SVE_Z_REGS_NUM): New define.
3558 (AARCH64_SVE_P_REGS_NUM): Likewise.
3559 (AARCH64_SVE_NUM_REGS): Likewise.
3560
8a60efe7
UB
35612018-05-31 Uros Bizjak <ubizjak@gmail.com>
3562
3563 * nat/linux-ptrace.h [__alpha__]
3564 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3565 definitions.
3566
4b2dfa9d
MR
35672018-05-31 Maciej W. Rozycki <macro@mips.com>
3568
3569 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3570 the endianness selected.
3571 * NEWS: Document `set endian auto' mode operation update.
3572
122394f1
AH
35732018-05-31 Alan Hayward <alan.hayward@arm.com>
3574
3575 * Makefile.in: Add new header.
3576 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3577 (sve_vl_from_vg): Likewise.
3578 (sve_vq_from_vl): Likewise.
3579 (sve_vl_from_vq): Likewise.
3580 (sve_vq_from_vg): Likewise.
3581 (sve_vg_from_vq): Likewise.
3582 * configure.nat: Add new c file.
3583 * nat/aarch64-sve-linux-ptrace.c: New file.
3584 * nat/aarch64-sve-linux-ptrace.h: New file.
3585
95228a0d
AH
35862018-05-31 Alan Hayward <alan.hayward@arm.com>
3587
3588 * aarch64-linux-nat.c (aarch64_linux_read_description):
3589 Add parmeter zero.
3590 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3591 Likewise.
3592 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3593 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3594 (aarch64_gdbarch_init): Add parmeter zero.
3595 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3596 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3597 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3598 parmeter.
3599 * doc/gdb.texinfo: Describe SVE feature
3600 * features/aarch64-sve.c: New file.
3601
5969f0db
OJ
36022018-05-31 Omair Javaid <omair.javaid@linaro.org>
3603
3604 PR gdb/23210
3605 * gdbarch.sh (significant_addr_bit): Default to zero when
3606 not set by target architecture.
3607 * gdbarch.c: Re-generated.
3608 * utils.c (address_significant): Update.
3609
61367c61
JB
36102018-05-30 Joel Brobecker <brobecker@adacore.com>
3611
3612 * stack.c (func_command): Remove trailing newline in call to error.
3613
34a79281
SM
36142018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3615
3616 * regcache.h (regcache_raw_collect): Remove, update callers to
3617 use regcache::raw_collect.
3618 * regcache.c (regcache_raw_collect): Remove.
3619
73e1c03f
SM
36202018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3621
3622 * regcache.h (regcache_raw_supply): Remove, update callers to
3623 use detached_regcache::raw_supply.
3624 * regcache.c (regcache_raw_supply): Remove.
3625
e4c4a59b
SM
36262018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * regcache.h (regcache_cooked_write_part): Remove, update
3629 callers to use regcache::cooked_write_part.
3630 * regcache.c (regcache_cooked_write_part): Remove.
3631
73bb0000
SM
36322018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3633
3634 * regcache.h (regcache_cooked_read_part): Remove, update callers
3635 to use readable_regcache::cooked_read_part.
3636 * regcache.c (regcache_cooked_read_part): Remove.
3637
46a45e9d
SM
36382018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3639
3640 * regcache.h (regcache_cooked_read_value): Remove, update
3641 callers to use readable_regcache::cooked_read_value.
3642 * regcache.c (regcache_cooked_read_value): Remove.
3643
b66f5587
SM
36442018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3645
3646 * regcache.h (regcache_cooked_write): Remove, update callers to
3647 use regcache::cooked_write.
3648 * regcache.c (regcache_cooked_write): Remove.
3649
6aa7d724
SM
36502018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3651
3652 * regcache.h (regcache_invalidate): Remove, update callers to
3653 use detached_regcache::invalidate instead.
3654 * regcache.c (regcache_invalidate): Remove.
3655
4f0420fd
SM
36562018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3657
3658 * regcache.h (regcache_raw_write_part): Remove, update callers
3659 to use regcache::raw_write_part instead.
3660 * regcache.c (regcache_raw_write_part): Remove.
3661
502fe83e
SM
36622018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3663
3664 * regcache.h (regcache_raw_read_part): Remove, update callers to
3665 use readable_regcache::raw_read_part instead.
3666 * regcache.c (regcache_raw_read_part): Remove.
3667
dca08e1f
SM
36682018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3669
3670 * regcache.h (regcache_cooked_read): Remove, update callers to
3671 use readable_regcache::cooked_read instead.
3672 * regcache.c (regcache_cooked_read): Remove.
3673
10eaee5f
SM
36742018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3675
3676 * regcache.h (regcache_raw_write): Remove, update callers to use
3677 regcache::raw_write instead.
3678 * regcache.c (regcache_raw_write): Remove.
3679
0b883586
SM
36802018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3681
3682 * regcache.h (regcache_raw_read): Remove, update callers to use
3683 readable_regcache::raw_read instead.
3684 * regcache.c (regcache_raw_read): Remove.
3685
0b47d985
SM
36862018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3687
3688 * regcache.h (regcache_raw_update): Remove, update callers to
3689 use readable_regcache::raw_update instead.
3690 * regcache.c (regcache_raw_update): Remove.
3691
0ec9f114
SM
36922018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3693
3694 * regcache.h (regcache_register_status): Remove, update callers
3695 to use reg_buffer::get_register_status directly instead.
3696 * regcache.c (regcache_register_status): Remove.
3697
222312d3
SM
36982018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3699
3700 * regcache.h (regcache_get_ptid): Remove, update all callers to
3701 call regcache::ptid instead.
3702 * regcache.c (regcache_get_ptid): Remove.
3703
fdbe37e3
SM
37042018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3705
3706 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3707
f7c6f423
PA
37082018-05-30 Pedro Alves <palves@redhat.com>
3709
3710 * common/common-exceptions.h (exception_rethrow): Use
3711 ATTRIBUTE_NORETURN.
3712
52941706
SM
37132018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3714
3715 * breakpoint.c (print_solib_event, check_status_catch_solib):
3716 Remove struct keyword in range-based for loops.
3717 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3718 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3719 Likewise.
3720 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3721 Likewise.
3722 * symfile.c (addr_info_make_relative): Likewise.
3723 * thread.c (value_in_thread_stack_temporaries): Likewise.
3724
bf2977b5
WP
37252018-06-12 Weimin Pan <weimin.pan@oracle.com>
3726
3727 PR gdb/16841
3728 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3729 aggregate type to get its real type before accessing it.
3730
64cc34d8
WP
37312018-05-29 Weimin Pan <weimin.pan@oracle.com>
3732
3733 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3734 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3735 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3736 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3737 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3738 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3739 * printcmd.c (info_address_command): Likewise.
3740
e7ec8713
TT
37412018-05-29 Tom Tromey <tom@tromey.com>
3742
3743 * windows-nat.c (handle_exception): Update fall-through comment.
3744
bcb430e4
TT
37452018-05-29 Tom Tromey <tom@tromey.com>
3746
3747 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3748 (struct program_space) <added_solibs>: Now a std::vector.
3749 * breakpoint.c (print_solib_event): Update.
3750 (check_status_catch_solib): Update.
3751 * progspace.c (clear_program_space_solib_cache): Update.
3752 * solib.c (update_solib_list): Update.
3753
894882e3
TT
37542018-05-29 Tom Tromey <tom@tromey.com>
3755
3756 * python/py-type.c (typy_richcompare): Update.
3757 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3758 * gdbtypes.h (types_deeply_equal): Return bool.
3759 (types_equal): Likewise.
3760 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3761 declare VEC.
3762 (check_types_equal): Change worklist to std::vector. Return
3763 bool.
3764 (struct type_equality_entry): Add constructor.
3765 (compare_maybe_null_strings): Return bool.
3766 (check_types_worklist): Return bool. Change worklist to
3767 std::vector.
3768 (types_deeply_equal): Use std::vector.
3769 (types_equal): Return bool.
3770 (compare_maybe_null_strings): Simplify.
3771
10b2ded4
TT
37722018-05-29 Tom Tromey <tom@tromey.com>
3773
3774 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3775
4f7deebe
TT
37762018-05-29 Tom Tromey <tom@tromey.com>
3777
3778 * objc-lang.h: Don't include cp-support.h.
3779 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3780 declare VEC.
3781
b8283aea
TT
37822018-05-27 Tom Tromey <tom@tromey.com>
3783
3784 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3785
41a883c8
TT
37862018-05-25 Tom Tromey <tom@tromey.com>
3787
3788 * value.c (value::location): Initialize.
3789
bf259e25
TT
37902018-05-25 Tom Tromey <tom@tromey.com>
3791
3792 * dbxread.c (init_bincl_list): Remove.
3793 (bincl_list): Now a std::vector.
3794 (bincls_allocated, next_bincl): Remove.
3795 (free_bincl_list, do_free_bincl_list_cleanup)
3796 (make_cleanup_free_bincl_list): Remove.
3797 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3798 unique_xmalloc_ptr.
3799 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3800 (struct header_file_location): Add constructor.
3801 (add_bincl_to_list): Remove.
3802
d525a99b
TT
38032018-05-25 Tom Tromey <tom@tromey.com>
3804
3805 * tui/tui.c (tui_enable): Update.
3806 * mi/mi-interp.c (mi_interp::init): Update.
3807 * interps.h (class interp) <name>: New method.
3808 <m_name>: Rename from name.
3809 (~scoped_restore_interp): Update.
3810 * interps.c (interp::interp): Update.
3811 (interp_add, interp_set, interp_lookup_existing)
3812 (current_interp_named_p): Update.
3813
da505cff
TT
38142018-05-25 Tom Tromey <tom@tromey.com>
3815
3816 * interps.c (interp_name): Remove.
3817 * mi/mi-interp.c (mi_interp::init): Update.
3818 * interps.h (interp_name): Remove.
3819 (~scoped_restore_interp): Update.
3820 * tui/tui.c (tui_enable): Update.
3821
29f94340
TT
38222018-05-25 Tom Tromey <tom@tromey.com>
3823
3824 * utils.c (fputs_maybe_filtered): Update.
3825 * linespec.c (decode_line_full): Update.
3826 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3827 (mi_print_breakpoint_for_event, mi_solib_loaded)
3828 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3829 (mi_user_selected_context_changed): Update.
3830 * mi/mi-main.c (mi_execute_command): Update.
3831 * cli/cli-script.c (execute_control_command): Update.
3832 * python/python.c (execute_gdb_command): Update.
3833 * solib.c (info_sharedlibrary_command): Update.
3834 * interps.c (interp_ui_out): Remove.
3835 * interps.h (interp_ui_out): Remove.
3836
716b8bc5
TT
38372018-05-25 Tom Tromey <tom@tromey.com>
3838
3839 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3840 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3841 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3842
753ff9bd
TT
38432018-05-25 Tom Tromey <tom@tromey.com>
3844
3845 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3846 * interps.c (interp_exec): Use scoped_restore.
3847
5ca3b260
TT
38482018-05-25 Tom Tromey <tom@tromey.com>
3849
3850 * remote.c (remote_target::remote_file_get): Use
3851 gdb::byte_vector.
3852 (remote_target::remote_file_put): Likewise.
3853
3173aa2f
TT
38542018-05-25 Tom Tromey <tom@tromey.com>
3855
3856 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3857 a std::string.
3858 (get_pe_section_index, add_pe_exported_sym): Update.
3859 (read_pe_exported_syms): Use gdb::def_vector.
3860
09a5e1b5
TT
38612018-05-25 Tom Tromey <tom@tromey.com>
3862
3863 * frame.c (remove_prev_frame): Remove.
3864 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3865
d8dab6c3
MR
38662018-05-25 Maciej W. Rozycki <macro@mips.com>
3867
3868 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3869 Remove prototypes.
3870 * mips-linux-nat.c (supply_fpregset): Always call
3871 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3872 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3873 `mips_fill_fpregset'.
3874 * mips-linux-tdep.c (mips_supply_fpregset)
3875 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3876 (mips_fill_fpregset_wrapper): Remove functions.
3877 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3878 (mips_linux_fpregset): Remove variable.
3879 (mips_linux_iterate_over_regset_sections): Use
3880 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3881 (mips_linux_o32_sigframe_init): Remove comment.
3882
3c69da40
PA
38832018-05-25 Pedro Alves <palves@redhat.com>
3884
3885 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3886 (struct readahead_cache, struct packet_reg, struct
3887 remote_arch_state, class remote_state): Move higher up in the
3888 file.
3889 (remote_target::m_remote_state): Now an object instead of a pointer.
3890 (remote_target::get_remote_state): Adjust.
3891
39f0c204
AB
38922018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3893
3894 * stack.c (select_and_print_frame): Delete.
3895 (struct function_bounds): Move struct within function.
3896 (func_command): Most content moved into new function
3897 find_frame_for_function, use new function, print result, add
3898 function comment.
3899 (find_frame_for_function): New function, now returns a result.
3900
d392224a
PW
39012018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3902
3903 * stack.c (iterate_over_block_arg_vars): Fix comment.
3904 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3905
45f25d6c
AB
39062018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3907
3908 PR gdb/23203
3909 * frame.c
3910 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3911 Define.
3912 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3913 Define.
3914 * frame.h (class scoped_restore_selected_frame): New class.
3915 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3916 of any exception, use scoped_restore_selected_frame to restore the
3917 frame instead.
3918
da05d921
PA
39192018-05-24 Pedro Alves <palves@redhat.com>
3920
3921 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3922 override.
3923
a8be540e
TT
39242018-05-23 Tom Tromey <tom@tromey.com>
3925
3926 * complaints.c (struct complaints): Remove.
3927 (symfile_complaint_book): Remove.
3928 (series): New global.
3929 (complaint_internal): Update.
3930 (clear_complaints): Update.
3931
ff1cf532
TT
39322018-05-23 Tom Tromey <tom@tromey.com>
3933
3934 * complaints.c (counters): New global.
3935 (struct complain): Remove.
3936 (struct complaints) <root>: Remove.
3937 (complaint_sentinel): Remove.
3938 (symfile_complaint_book): Update.
3939 (find_complaint) Remove.
3940 (complaint_internal, clear_complaints): Update.
3941
7ff88174
TT
39422018-05-23 Tom Tromey <tom@tromey.com>
3943
3944 * complaints.c (struct complain) <file, line>: Remove.
3945 (find_complaint): Remove file, line parameters.
3946 (complaint_internal): Update.
3947
de54e1a5
TT
39482018-05-23 Tom Tromey <tom@tromey.com>
3949
3950 * complaints.c (vcomplaint): Remove.
3951 (complaint_internal) Merge in contents of vcomplaint.
3952
2ac237e5
TT
39532018-05-23 Tom Tromey <tom@tromey.com>
3954
3955 * complaints.c (struct complaints) <explanation>: Remove.
3956 (symfile_explanations): Remove.
3957 (symfile_complaint_book): Update.
3958 (vcomplaint): Update.
3959 (struct explanation): Remove.
3960
b98664d3
TT
39612018-05-23 Tom Tromey <tom@tromey.com>
3962
3963 * complaints.c (symfile_complaints): Remove.
3964 (complaint_internal): Remove "complaints" parameter.
3965 (clear_complaints, vcomplaint): Remove "c" parameter.
3966 (get_complaints): Remove.
3967 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3968 (dwarf2_debug_line_missing_file_complaint)
3969 (dwarf2_debug_line_missing_end_sequence_complaint)
3970 (dwarf2_complex_location_expr_complaint)
3971 (dwarf2_const_value_length_mismatch_complaint)
3972 (dwarf2_section_buffer_overflow_complaint)
3973 (dwarf2_macro_malformed_definition_complaint)
3974 (dwarf2_invalid_attrib_class_complaint)
3975 (create_addrmap_from_index, dw2_symtab_iter_next)
3976 (dw2_expand_marked_cus)
3977 (dw2_debug_names_iterator::find_vec_in_debug_names)
3978 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3979 (create_debug_type_hash_table, init_cutu_and_read_dies)
3980 (partial_die_parent_scope, add_partial_enumeration)
3981 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3982 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3983 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3984 (create_cus_hash_table, create_dwp_hash_table)
3985 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3986 (dwarf2_rnglists_process, dwarf2_ranges_process)
3987 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3988 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3989 (handle_struct_member_die, process_structure_scope)
3990 (read_array_type, read_common_block, read_module_type)
3991 (read_tag_pointer_type, read_typedef, read_base_type)
3992 (read_subrange_type, load_partial_dies, partial_die_info::read)
3993 (partial_die_info::read, partial_die_info::read)
3994 (partial_die_info::read, read_checked_initial_length_and_offset)
3995 (dwarf2_string_attr, read_formatted_entries)
3996 (dwarf_decode_line_header)
3997 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3998 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3999 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4000 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4001 (get_signatured_type, get_DW_AT_signature_type)
4002 (decode_locdesc, file_file_name, consume_improper_spaces)
4003 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4004 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4005 (dwarf2_symbol_mark_computed, set_die_type)
4006 (read_attribute_value): Update.
4007 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4008 Update.
4009 * dbxread.c (unknown_symtype_complaint)
4010 (lbrac_mismatch_complaint, repeated_header_complaint)
4011 (set_namestring, function_outside_compilation_unit_complaint)
4012 (read_dbx_symtab, process_one_symbol): Update.
4013 * gdbtypes.c (stub_noname_complaint): Update.
4014 * windows-nat.c (handle_unload_dll): Update.
4015 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4016 (decode_base_type): Update.
4017 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4018 (eb_complaint, record_include_begin, record_include_end)
4019 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4020 (process_xcoff_symbol, read_symbol)
4021 (function_outside_compilation_unit_complaint)
4022 (scan_xcoff_symtab): Update.
4023 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4024 * buildsym.c (finish_block_internal, make_blockvector)
4025 (end_symtab_get_static_block, augment_type_symtab): Update.
4026 * dtrace-probe.c (dtrace_process_dof)
4027 (dtrace_static_probe_ops::get_probes): Update.
4028 * complaints.h (struct complaint): Don't declare.
4029 (symfile_complaints): Remove.
4030 (complaint_internal): Remove "complaints" parameter.
4031 (complaint): Likewise.
4032 (clear_complaints): Likewise.
4033 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4034 (reread_symbols): Update.
4035 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4036 (dwarf2_frame_cache, decode_frame_entry): Update.
4037 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4038 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4039 (info_selectors_command): Update.
4040 * macrotab.c (macro_include, check_for_redefinition)
4041 (macro_undef): Update.
4042 * objfiles.c (filter_overlapping_sections): Update.
4043 * stabsread.c (invalid_cpp_abbrev_complaint)
4044 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4045 (define_symbol, error_type, read_type, rs6000_builtin_type)
4046 (stabs_method_name_from_physname, read_member_functions)
4047 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4048 (attach_fields_to_type, complain_about_struct_wipeout)
4049 (read_range_type, read_args, common_block_start)
4050 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4051 Update.
4052 * mdebugread.c (index_complaint, unknown_ext_complaint)
4053 (basic_type_complaint, bad_tag_guess_complaint)
4054 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4055 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4056 (parse_procedure, parse_lines)
4057 (function_outside_compilation_unit_complaint)
4058 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4059 (bad_tag_guess_complaint, reg_value_complaint): Update.
4060 * cp-support.c (demangled_name_complaint): Update.
4061 * macroscope.c (sal_macro_scope): Update.
4062 * dwarf-index-write.c (class debug_names): Update.
4063
4e9668d0
TT
40642018-05-23 Tom Tromey <tom@tromey.com>
4065
4066 * complaints.c (clear_complaints): Remove "noisy" parameter.
4067 * complaints.h (clear_complaints): Update.
4068 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4069 (reread_symbols): Update.
4070
43ba33c7
TT
40712018-05-23 Tom Tromey <tom@tromey.com>
4072
4073 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4074 SUBSEQUENT_MESSAGE.
4075 (vcomplaint, clear_complaints): Update.
4076 (symfile_explanations): Remove some messages.
4077
2b9496b2
TT
40782018-05-23 Tom Tromey <tom@tromey.com>
4079
4080 * complaints.c (internal_complaint): Remove.
4081 * complaints.h (internal_complaint): Remove.
4082
35f1fea3
MR
40832018-05-22 Maciej W. Rozycki <macro@mips.com>
4084
4085 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4086
6b8edb51
PA
40872018-05-22 Pedro Alves <palves@redhat.com>
4088
4089 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4090 (remote_fileio_badfd, remote_fileio_return_errno)
4091 (remote_fileio_return_success, remote_fileio_func_open)
4092 (remote_fileio_func_open, remote_fileio_func_close)
4093 (remote_fileio_func_read, remote_fileio_func_write)
4094 (remote_fileio_func_lseek, remote_fileio_func_rename)
4095 (remote_fileio_func_unlink, remote_fileio_func_stat)
4096 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4097 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4098 remote_target parameter.
4099 (remote_fio_func_map) <func>: Add remote_target parameter.
4100 (do_remote_fileio_request, remote_fileio_request):
4101 * remote-fileio.h (remote_fileio_request):
4102 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4103 remote_target parameter.
4104 (remote_notif_process, handle_notification): Adjust to pass down
4105 the remote.
4106 (remote_notif_state_allocate): Add remote_target parameter. Save
4107 it.
4108 * remote-notif.h (struct remote_target): Forward declare.
4109 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4110 remote_target parameter.
4111 (struct remote_notif_state) <remote>: New field.
4112 (remote_notif_ack, remote_notif_parse): Add remote_target
4113 parameter.
4114 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4115 remote_target parameter.
4116 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4117 (threads_listing_context, rmt_thread_action, protocol_feature)
4118 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4119 (packet_result, struct threads_listing_context, remote_state):
4120 Move definitions and declarations higher up.
4121 (remote_target) <~remote_target>: Declare.
4122 (remote_download_command_source, remote_file_put, remote_file_get)
4123 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4124 (remote_hostio_pread_vFile, remote_hostio_send_command)
4125 (remote_hostio_set_filesystem, remote_hostio_open)
4126 (remote_hostio_close, remote_hostio_unlink, remote_state)
4127 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4128 (get_memory_write_packet_size, get_memory_read_packet_size)
4129 (append_pending_thread_resumptions, remote_detach_1)
4130 (append_resumption, remote_resume_with_vcont)
4131 (add_current_inferior_and_thread, wait_ns, wait_as)
4132 (process_stop_reply, remote_notice_new_inferior)
4133 (process_initial_stop_replies, remote_add_thread)
4134 (btrace_sync_conf, remote_btrace_maybe_reopen)
4135 (remove_new_fork_children, kill_new_fork_children)
4136 (discard_pending_stop_replies, stop_reply_queue_length)
4137 (check_pending_events_prevent_wildcard_vcont)
4138 (discard_pending_stop_replies_in_queue, stop_reply)
4139 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4140 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4141 (remote_interrupt_as, remote_interrupt_ns)
4142 (remote_get_noisy_reply, remote_query_attached)
4143 (remote_add_inferior, remote_current_thread, get_current_thread)
4144 (set_thread, set_general_thread, set_continue_thread)
4145 (set_general_process, write_ptid)
4146 (remote_unpack_thread_info_response, remote_get_threadinfo)
4147 (parse_threadlist_response, remote_get_threadlist)
4148 (remote_threadlist_iterator, remote_get_threads_with_ql)
4149 (remote_get_threads_with_qxfer)
4150 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4151 (get_offsets, remote_check_symbols, remote_supported_packet)
4152 (remote_query_supported, remote_packet_size)
4153 (remote_serial_quit_handler, remote_detach_pid)
4154 (remote_vcont_probe, remote_resume_with_hc)
4155 (send_interrupt_sequence, interrupt_query)
4156 (remote_notif_get_pending_events, fetch_register_using_p)
4157 (send_g_packet, process_g_packet, fetch_registers_using_g)
4158 (store_register_using_P, store_registers_using_G)
4159 (set_remote_traceframe, check_binary_download)
4160 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4161 (remote_xfer_live_readonly_partial, remote_read_bytes)
4162 (remote_send_printf, remote_flash_write, readchar)
4163 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4164 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4165 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4166 (extended_remote_disable_randomization, extended_remote_run)
4167 (send_environment_packet, extended_remote_environment_support)
4168 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4169 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4170 (packet_command): Now methods of ...
4171 (remote_target): ... this class.
4172 (m_remote_state) <remote_target>: New field.
4173 (struct remote_state) <stop_reply_queue,
4174 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4175 fields.
4176 (remote_state::remote_state): Allocate stop_reply_queue.
4177 (remote_state): Delete global.
4178 (get_remote_state_raw): Delete.
4179 (remote_target::get_remote_state): Allocate m_remote_state on
4180 demand.
4181 (get_current_remote_target): New.
4182 (remote_ops, extended_remote_ops): Delete.
4183 (wait_forever_enabled_p, remote_async_inferior_event_token):
4184 Delete, moved to struct remote_state.
4185 (remote_target::close): Delete self. Destruction bits split to
4186 ...
4187 (remote_target::~remote_target): ... this.
4188 (show_memory_packet_size): Adjust to use
4189 get_current_remote_target.
4190 (struct protocol_feature) <func>: Add remote_target parameter.
4191 All callers adjusted.
4192 (curr_quit_handler_target): New.
4193 (remote_serial_quit_handler): Reimplement.
4194 (remote_target::open_1): Adjust to use get_current_remote_target.
4195 Heap-allocate remote_target/extended_remote_target instances.
4196 (vcont_builder::vcont_builder): Add remote_target parameter, and
4197 save it in m_remote. All callers adjusted.
4198 (vcont_builder::m_remote): New field.
4199 (vcont_builder::restart, vcont_builder::flush)
4200 (vcont_builder::push_action): Use it.
4201 (remote_target::commit_resume): Use it.
4202 (struct queue_iter_param) <remote>: New field.
4203 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4204 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4205 (check_pending_event_prevents_wildcard_vcont_callback)
4206 (remote_target::check_pending_events_prevent_wildcard_vcont)
4207 (remote_target::discard_pending_stop_replies)
4208 (remote_target::discard_pending_stop_replies_in_queue)
4209 (remote_target::remote_notif_remove_queued_reply): Fill in
4210 'remote' field.
4211 (remote_notif_get_pending_events): New.
4212 (remote_target::readchar, remote_target::remote_serial_write):
4213 Save/restore curr_quit_handler_target.
4214 (putpkt): New.
4215 (kill_new_fork_children): Fill in 'remote' field.
4216 (packet_command): Use get_current_remote_target, defer to
4217 remote_target method of same name.
4218 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4219 parameter, and save it in m_remote. All callers adjusted.
4220 (scoped_remote_fd::release): Use m_remote.
4221 (scoped_remote_fd::m_remote): New field.
4222 (remote_file_put, remote_file_get, remote_file_delete): Use
4223 get_current_remote_target, defer to remote_target method of same
4224 name.
4225 (remote_btrace_reset): Add remote_state paremeter. Update all
4226 callers.
4227 (remote_async_inferior_event_handler). Pass down 'data'.
4228 (remote_new_objfile): Use get_current_remote_target.
4229 (remote_target::vcont_r_supported): New.
4230 (set_range_stepping): Use get_current_remote_target and
4231 remote_target::vcont_r_supported.
4232 (_initialize_remote): Don't allocate 'remote_state' and
4233 'stop_reply_queue' globals.
4234 * remote.h (struct remote_target): Forward declare.
4235 (getpkt, putpkt, remote_notif_get_pending_events): Add
4236 'remote_target' parameter.
4237
f5db4863
PA
42382018-05-22 Pedro Alves <palves@redhat.com>
4239
4240 * remote.c (vcont_builder): Now a class. Make all data members
4241 private.
4242 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4243 Declare methods.
4244 (vcont_builder_restart): Rename to ...
4245 (vcont_builder::restart): ... this.
4246 (vcont_builder_flush): Rename to ...
4247 (vcont_builder::flush): ... this.
4248 (vcont_builder_push_action): Rename to ...
4249 (vcont_builder::push_action): ... this.
4250 (remote_target::commit_resume): Adjust.
4251
cc0be08f
PA
42522018-05-22 Pedro Alves <palves@redhat.com>
4253
4254 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4255 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4256 (get_fixed_memory_packet_size): New.
4257 (get_memory_packet_size): Use it.
4258 (set_memory_packet_size): Don't override the config size with
4259 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4260 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4261 Don't refer to get_memory_packet_size if not connected to a remote
4262 target. Show "(default)" if configured size is 0.
4263
9607784a
PA
42642018-05-22 Pedro Alves <palves@redhat.com>
4265
4266 * remote.c (remote_target::mourn_inferior): Move
4267 discard_pending_stop_replies call here from ...
4268 (_initialize_remote): ... here.
4269
0e9a6b2f
PA
42702018-05-22 Pedro Alves <palves@redhat.com>
4271
4272 * remote.c (compare_section_command): Remove set_general_process
4273 call.
4274
43c3a0e4
PA
42752018-05-22 Pedro Alves <palves@redhat.com>
4276
4277 * remote.c (struct packet_reg, struct remote_arch_state):
4278 Move higher up in the file.
4279 (remote_state) <m_arch_states>: Store remote_arch_state values
4280 instead of remote_arch_state pointers.
4281 (remote_state::get_remote_arch_state): Adjust.
4282
9d6eea31
PA
42832018-05-22 Pedro Alves <palves@redhat.com>
4284
4285 * remote.c: Include <unordered_map>.
4286 (remote_state): Now a class.
4287 (remote_state) <get_remote_arch_state>: Declare method.
4288 <get_remote_arch_state>: New field.
4289 (remote_arch_state) <remote_arch_state>: Declare ctor.
4290 <regs>: Now a unique_ptr.
4291 (remote_gdbarch_data_handle): Delete.
4292 (get_remote_arch_state): Delete.
4293 (remote_state::get_remote_arch_state): New.
4294 (get_remote_state): Adjust to call remote_state's
4295 get_remote_arch_state method.
4296 (init_remote_state): Delete, bits factored out to ...
4297 (remote_arch_state::remote_arch_state): ... this new method.
4298 (get_remote_packet_size, get_memory_packet_size)
4299 (process_g_packet, remote_target::fetch_registers)
4300 (remote_target::prepare_to_store, store_registers_using_G)
4301 (remote_target::store_registers, remote_target::get_trace_status):
4302 Adjust to call remote_state's method.
4303 (_initialize_remote): Remove reference to
4304 remote_gdbarch_data_handle.
4305
dd194f6b
PA
43062018-05-22 Pedro Alves <palves@redhat.com>
4307
4308 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4309 pread>: New method declarations.
4310 (remote_target::open_1): Adjust.
4311 (readahead_cache_invalidate): Rename to ...
4312 (readahead_cache::invalidate): ... this, and adjust to be a class
4313 method.
4314 (readahead_cache_invalidate_fd): Rename to ...
4315 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4316 class method.
4317 (remote_hostio_pwrite): Adjust.
4318 (remote_hostio_pread_from_cache): Rename to ...
4319 (readahead_cache::pread): ... this, and adjust to be a class
4320 method.
4321 (remote_hostio_close): Adjust.
4322
440b7aec
PA
43232018-05-22 Pedro Alves <palves@redhat.com>
4324
4325 * remote.c (remote_hostio_close_cleanup): Delete.
4326 (class scoped_remote_fd): New.
4327 (remote_file_put, remote_file_get): Use it.
4328
de44f5a7
PA
43292018-05-22 Pedro Alves <palves@redhat.com>
4330
4331 (struct vCont_action_support): Use bool and initialize all fields.
4332 (struct readahead_cache): Initialize all fields.
4333 (remote_state): Use bool and initialize all fields.
4334 (remote_state::remote_state, remote_state::~remote_state): New.
4335 (new_remote_state): Delete.
4336 (_initialize_remote): Use new to allocate remote_state.
4337
b1b60145
PA
43382018-05-22 Pedro Alves <palves@redhat.com>
4339 張俊芝 <zjz@zjz.name>
4340
4341 PR gdb/22973
4342 * c-exp.y: Include "c-support.h".
4343 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4344 of tolower. Use c_ident_is_alpha to scan names.
4345 * c-lang.c: Include "c-support.h".
4346 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4347 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4348 * c-support.h: New file, with bits factored out from ...
4349 * cp-name-parser.y: ... this file.
4350 Include "c-support.h".
4351 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4352 c-support.h and renamed.
4353 (symbol_end, yylex): Adjust.
4354
0ec848ad
PFC
43552018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4356
4357 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4358 parameter type to CORE_ADDR.
4359 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4360 parameter type in declaration to CORE_ADDR.
4361 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4362 target_auxv_search to get AT_HWCAP and use the result to get the
4363 target description.
4364 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4365 to CORE_ADDR. Remove the cast of the return value to unsigned
4366 long. Fix error predicate of target_auxv_search.
4367 (ppc_linux_nat_target::read_description): Change the type of the
4368 hwcap variable to CORE_ADDR.
4369
0fb2aaa1
PFC
43702018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4371
4372 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4373 if the size of fpscr is larger than 32 bits.
4374
2c3305f6
PFC
43752018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4376
4377 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4378 (ppc32_linux_vsxregmap): New global.
4379 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4380 regcache_supply_regset, and regcache_collect_regset.
4381 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4382 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4383 (fetch_vsx_register, store_vsx_register): Remove.
4384 (fetch_vsx_registers): Add regno parameter. Get regset using
4385 ppc_linux_vsxregset. Use regset to supply registers.
4386 (store_vsx_registers): Add regno parameter. Get regset using
4387 ppc_linux_vsxregset. Use regset to collect registers.
4388 (fetch_register): Call fetch_vsx_registers instead of
4389 fetch_vsx_register.
4390 (store_register): Call store_vsx_registers instead of
4391 store_vsx_register.
4392 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4393 new regno parameter.
4394 (store_ppc_registers): Call store_vsx_registers with -1 for the
4395 new regno parameter.
4396 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4397 (ppc_collect_vsxregset): Remove.
4398
1d75a658
PFC
43992018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4400
4401 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4402 offset fields.
4403 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4404 for vector register offset fields.
4405 (ppc64_fbsd_reg_offsets): Likewise.
4406 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4407 to vector register offset fields.
4408 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4409 to vector register offset fields.
4410 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4411 vector register offset fields.
4412 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4413 initializers for vector register offset fields.
4414 (rs6000_aix64_reg_offsets): Likewise.
4415 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4416 (ppc_supply_vrregset): Remove.
4417 (ppc_collect_vrregset): Remove.
4418 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4419 (ppc_linux_vrregset) : New function.
4420 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4421 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4422 (ppc32_linux_vrregset): Remove.
4423 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4424 and use result instead of ppc32_linux_vrregset.
4425 (ppc32_linux_reg_offsets): Remove initializers for vector register
4426 offset fields.
4427 (ppc64_linux_reg_offsets): Likewise.
4428 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4429 * ppc-linux-nat.c: Include regset.h.
4430 (gdb_vrregset_t): Adjust comment to account for little-endian
4431 mode.
4432 (supply_vrregset, fill_vrregset): Remove.
4433 (fetch_altivec_register, store_altivec_register): Remove.
4434 (fetch_altivec_registers): Add regno parameter. Get regset using
4435 ppc_linux_vrregset. Use regset to supply registers.
4436 (store_altivec_registers): Add regno parameter. Get regset using
4437 ppc_linux_vrregset. Use regset to collect registers.
4438 (fetch_register): Call fetch_altivec_registers instead of
4439 fetch_altivec_register.
4440 (store_register): Call store_altivec_registers instead of
4441 store_altivec_register.
4442 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4443 the new regno parameter.
4444 (store_ppc_registers): Call store_altivec_registers with -1 for
4445 the new regno parameter.
4446
d078308a
PFC
44472018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4448
4449 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4450 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4451 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4452 (gdb_vrregset_t): Change array type size to
4453 PPC_LINUX_SIZEOF_VRREGSET.
4454 (gdb_vsxregset_t): Change array type size to
4455 PPC_LINUX_SIZEOF_VSXREGSET.
4456 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4457 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4458 PPC_LINUX_SIZEOF_VSXREGSET.
4459
2e077f5e
PFC
44602018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4461
4462 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4463 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4464 nat/ppc-linux.c.
4465 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4466 ppc_linux_target_wordsize with tid.
4467 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4468 wordsize with tid.
4469 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4470 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4471 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4472 tid parameter. Remove static specifier.
4473 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4474 (ppc_linux_target_wordsize): New declaration.
4475
bd64614e
PFC
44762018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4477
4478 * arch/ppc-linux-common.c: New file.
4479 * arch/ppc-linux-common.h: New file.
4480 * arch/ppc-linux-tdesc.h: New file.
4481 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4482 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4483 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4484 arch/ppc-linux-tdesc.h.
4485 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4486 arch/ppc-linux-tdesc.h.
4487 (ppc_linux_nat_target::read_description): Remove target
4488 description matching code. Fill a ppc_linux_features struct and
4489 call ppc_linux_match_description with it. Move comment about ISA
4490 2.05 to ppc-linux-common.c.
4491 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4492 arch/ppc-linux-tdesc.h.
4493 (ppc_linux_core_read_description): Remove target description
4494 matching code. Fill a ppc_linux_features struct and call
4495 ppc_linux_match_description with it.
4496 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4497 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4498 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4499 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4500 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4501 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4502 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4503 (tdesc_powerpc_e500l): Remove.
4504
241db429
JB
45052018-05-22 Joel Brobecker <brobecker@adacore.com>
4506
4507 * ada-lang.c (catch_assert_command): Pass empty string instead
4508 of NULL for excep_string argument.
4509
75d74cca
MR
45102018-05-22 Maciej W. Rozycki <macro@mips.com>
4511
4512 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4513 the width of the requested register exceeds the width of the
4514 `ptrace' data type.
4515
122b53ea
TT
45162018-05-21 Tom Tromey <tom@tromey.com>
4517
4518 * printcmd.c (output_command): Remove.
4519 (output_command_const): Rename to output_command.
4520 * valprint.h (output_command): Rename from output_command_const.
4521 * tracepoint.c (trace_dump_actions): Call output_command.
4522
bc18fbb5
TT
45232018-05-21 Tom Tromey <tom@tromey.com>
4524
4525 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4526 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4527 * ada-lang.h (create_ada_exception_catchpoint): Update.
4528 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4529 std::string.
4530 (create_excep_cond_exprs, ~ada_catchpoint)
4531 (should_stop_exception, print_one_exception)
4532 (print_mention_exception, print_recreate_exception): Update.
4533 (ada_get_next_arg): Remove.
4534 (catch_ada_exception_command_split): Use std::string. Change type
4535 of "excep_string", "cond_string".
4536 (catch_ada_exception_command): Update.
4537 (create_ada_exception_catchpoint): Change type of excep_string.
4538 (ada_exception_sal): Remove excep_string parameter.
4539 (~ada_catchpoint): Remove.
4540
790217f6
TT
45412018-05-21 Tom Tromey <tom@tromey.com>
4542
4543 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4544 cleanup.
4545
6f46ac85
TT
45462018-05-21 Tom Tromey <tom@tromey.com>
4547
4548 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4549 Return unique_xmalloc_ptr.
4550 (print_it_exception): Update.
4551
15b6611c
TT
45522018-05-21 Tom Tromey <tom@tromey.com>
4553
4554 * tracepoint.c (trace_dump_actions): Use std::string.
4555
c0c9f665
TT
45562018-05-21 Tom Tromey <tom@tromey.com>
4557
4558 * symfile.c (reread_symbols): Use std::string for original_name.
4559
22ca247e
TT
45602018-05-21 Tom Tromey <tom@tromey.com>
4561
4562 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4563 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4564 constructor.
4565
184cde75
SM
45662018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4567
4568 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4569 instance to...
4570 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4571 * objfiles.c (get_objfile_bfd_data): Allocate
4572 objfile_per_bfd_storage with obstack_new when allocating on
4573 obstack.
4574
e39db4db
SM
45752018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4576
4577 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4578 OBSTACK_ZALLOC.
4579 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4580 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4581 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4582 (add_pending): Likewise.
4583 (parse_symbol): Likewise.
4584 (parse_partial_symbols): Likewise.
4585 (psymtab_to_symtab_1): Likewise.
4586 (new_psymtab): Likewise.
4587 (elfmdebug_build_psymtabs): Likewise.
4588 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4589 * objfiles.c (get_objfile_bfd_data): Likewise.
4590 (objfile_register_static_link): Likewise.
4591 * psymtab.c (allocate_psymtab): Likewise.
4592 * stabsread.c (read_member_functions): Likewise.
4593 * xcoffread.c (xcoff_end_psymtab): Likewise.
4594
284a0e3c
SM
45952018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4596
4597 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4598 compiler supports std::is_trivially_constructible.
4599 * common/poison.h: Include obstack.h.
4600 (IsMallocable): Define to is_trivially_constructible if the
4601 compiler supports it, define to true_type otherwise.
4602 (xobnew): New.
4603 (XOBNEW): Redefine.
4604 (xobnewvec): New.
4605 (XOBNEWVEC): Redefine.
4606 * gdb_obstack.h (obstack_zalloc): New.
4607 (OBSTACK_ZALLOC): Redefine.
4608 (obstack_calloc): New.
4609 (OBSTACK_CALLOC): Redefine.
4610 (obstack_new): New.
4611 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4612 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4613 gdbarch.c.
4614 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4615 obstack_calloc/obstack_zalloc.
4616 (gdbarch_obstack_zalloc): Remove.
4617 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4618
59f66be3
PW
46192018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4620
4621 * stack.c (backtrace_command_1): Remove useless variable int i.
4622
50c65c2d
PW
46232018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4624
4625 * stack.c (print_frame_info): Fix comment.
4626
7ff8cb8c
TT
46272018-05-18 Tom Tromey <tom@tromey.com>
4628
4629 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4630 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4631 (~dwarf2_per_objfile): Update
4632 (dwarf2_get_dwz_file): Use new.
4633 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4634 unique_ptr.
4635
400174b1
TT
46362018-05-18 Tom Tromey <tom@tromey.com>
4637
4638 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4639 unique_ptr.
4640 * dwarf2read.c (struct dwp_file): Add constructor and
4641 initializers.
4642 (open_and_init_dwp_file): Return a unique_ptr.
4643 (dwarf2_per_objfile, create_dwp_hash_table)
4644 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4645 (lookup_dwo_unit_in_dwp): Update.
4646 (open_and_init_dwp_file, get_dwp_file): Update.
4647
3063847f
TT
46482018-05-18 Tom Tromey <tom@tromey.com>
4649
4650 * dwarf2read.c (dwarf2_per_objfile): Update.
4651 (struct mapped_index): Add initializers.
4652 (dwarf2_read_index): Use new.
4653 (dw2_symtab_iter_init): Update.
4654 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4655 unique_ptr.
4656
d3d02dee
SM
46572018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4658
4659 * dwarf2read.c (mapped_index) <total_size>: Remove.
4660
1d143c36
SM
46612018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4662
4663 * unittests/format_pieces-selftests.c (test_format_specifier):
4664 Add ARI comments.
4665
ce1e8424
TT
46662018-05-18 Tom Tromey <tom@tromey.com>
4667
4668 * c-typeprint.c (maybe_print_hole): New function.
4669 (c_print_type_struct_field_offset): Update.
4670 (c_type_print_base_struct_union): Call maybe_print_hole.
4671
ddfe970e
KS
46722018-05-17 Keith Seitz <keiths@redhat.com>
4673
4674 * breakpoint.c (build_bpstat_chain): New function, moved from
4675 bpstat_stop_status.
4676 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4677 If no stop chain is passed, call build_bpstat_chain to build it.
4678 * breakpoint.h (build_bpstat_chain): Declare.
4679 (bpstat_stop_status): Move documentation here from breakpoint.c.
4680 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4681 build the stop chain and pass it to skip_inline_frames.
4682 Pass this stop chain to bpstat_stop_status.
4683 * inline-frame.c: Include breakpoint.h.
4684 (stopped_by_user_bp_inline_frame): New function.
4685 (skip_inline_frames): Add parameter `stop_chain'.
4686 Move documention to inline-frame.h.
4687 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4688 whether the frame should be elided.
4689 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4690 Add moved documentation and update for new parameter.
4691
b17992c1
SM
46922018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4693
4694 PR cli/14975
4695 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4696 unittests/format_pieces-selftests.c.
4697 * common/format.h (format_piece) <operator==>: New.
4698 (format_pieces) <operator[]>: Remove.
4699 * common/format.c (format_pieces::format_pieces): Handle \e.
4700 * unittests/format_pieces-selftests.c: New.
4701
58f0c718
TT
47022018-05-17 Tom Tromey <tom@tromey.com>
4703
4704 PR symtab/23010:
4705 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4706 (dw2_instantiate_symtab): Add skip_partial parameter.
4707 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4708 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4709 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4710 (dw2_expand_symtabs_matching_one)
4711 (dw2_find_pc_sect_compunit_symtab)
4712 (dw2_debug_names_lookup_symbol)
4713 (dw2_debug_names_expand_symtabs_for_function): Update.
4714 (init_cutu_and_read_dies): Add skip_partial parameter.
4715 (process_psymtab_comp_unit, build_type_psymtabs_1)
4716 (process_skeletonless_type_unit, load_partial_comp_unit)
4717 (psymtab_to_symtab_1): Update.
4718 (load_full_comp_unit): Add skip_partial parameter.
4719 (process_imported_unit_die, dwarf2_read_addr_index)
4720 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4721 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4722 (read_signatured_type): Update.
4723
3e618834
SM
47242018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4725
4726 * value.c (release_value): Remove unused variable.
4727 (record_latest_value): Likewise.
4728 (access_value_history): Likewise.
4729 (preserve_values): Likewise.
4730
fe10fe31
TT
47312018-05-17 Tom Tromey <tom@tromey.com>
4732
4733 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4734 Initialize.
4735
1d761124
MR
47362018-05-16 Maciej W. Rozycki <macro@mips.com>
4737
4738 PR gdb/22286
4739 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4740 Also handle registers whose width is not a multiple of
4741 PTRACE_TYPE_RET.
4742 (linux_nat_trad_target::store_register): Likewise.
4743
06333fea
TT
47442018-05-16 Tom Tromey <tom@tromey.com>
4745
4746 * gdbcore.h (core_bfd): Redefine.
4747 * corelow.c (core_target::close): Update.
4748 (core_target_open): Update.
4749 * progspace.h (struct program_space) <cbfd>: Now a
4750 gdb_bfd_ref_ptr.
4751
921222e2
TT
47522018-05-16 Tom Tromey <tom@tromey.com>
4753
4754 PR cli/19551:
4755 * symfile-add-flags.h (enum symfile_add_flags)
4756 <SYMFILE_NOT_FILENAME>: New constant.
4757 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4758 objfile name from BFD.
4759 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4760 * minidebug.c (find_separate_debug_file_in_section): Put
4761 ".gnu_debugdata" into BFD's file name.
4762
3acb7083
SM
47632018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4764
4765 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4766 Remove.
4767
561a72d4
TC
47682018-05-15 Tamar Christina <tamar.christina@arm.com>
4769
4770 PR binutils/21446
4771 * aarch64-tdep.c (aarch64_analyze_prologue,
4772 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4773 Indicate not interested in errors.
4774
4e6ff0e1
MR
47752018-05-15 Maciej W. Rozycki <macro@mips.com>
4776
4777 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4778 Supply the MIPS_ZERO_REGNUM register.
4779
ea33cd92
MR
47802018-05-15 Maciej W. Rozycki <macro@mips.com>
4781
4782 * mips-tdep.c (mask_address_var): Make variable static.
4783
2d79090e
TT
47842018-05-14 Tom Tromey <tom@tromey.com>
4785
4786 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4787
cf4912ae
AB
47882018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4789
4790 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4791 FXSAVE_ADDR for the mxcsr register.
4792
67e6f569
MF
47932018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4794
4795 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4796
15244507
PA
47972018-05-11 Pedro Alves <palves@redhat.com>
4798
4799 * corelow.c (core_target) <core_target>: No longer inline.
4800 Initialize m_core_gdbarch, m_core_vec and build the section table
4801 here.
4802 <~core_target>: New.
4803 <core_gdbarch, get_core_register_section>: New methods.
4804 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4805 factored out from ...
4806 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4807 (core_ops): Delete.
4808 (sniff_core_bfd): Add gdbarch parameter.
4809 (core_close): Delete, merged into ...
4810 (core_target::close): ... here. Delete self.
4811 (core_close_cleanup): Delete.
4812 (core_target_open): Allocate a core_target on the heap. Use a
4813 unique_ptr instead of a cleanup. Bits moved into the core_target
4814 ctor. Adjust to use core_target methods instead of globals.
4815 (get_core_register_section): Rename to ...
4816 (core_target::get_core_register_section): ... this and adjust.
4817 (struct get_core_registers_cb_data): New.
4818 (get_core_registers_cb): Use it. Use bool.
4819 (core_target::fetch_registers, core_target::files_info)
4820 (core_target::xfer_partial, core_target::read_description)
4821 (core_target::pid_to, core_target::thread_name): Adjust to
4822 reference class fields instead of globals.
4823 * target.h (struct target_ops_deleter, target_ops_up): New.
4824
451953fa
PA
48252018-05-11 Pedro Alves <palves@redhat.com>
4826
4827 * corefile.c (core_file_command): Move to corelow.c.
4828 * corelow.c (the_core_target): Delete.
4829 (core_file_command): Moved from corefile.c. Check exec_bfd
4830 instead of the_core_target. Use target_detach instead of calling
4831 into the_core_target directly.
4832 (maybe_say_no_core_file_now): New.
4833 (core_target::detach): Use it.
4834 (_initialize_corelow): Remove references to the_core_target.
4835 * gdbcore.h (the_core_target): Delete.
4836
e540a5a2 48372018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 4838 Pedro Alves <palves@redhat.com>
e540a5a2
TT
4839
4840 * corefile.c (core_bfd): Remove.
4841 * gdbcore.h (core_bfd): Now a macro.
4842 * progspace.h (struct program_space) <cbfd>: New field.
4843
633cf254
TT
48442018-05-11 Tom Tromey <tom@tromey.com>
4845
4846 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4847 gdb::def_vector.
4848
1a34f210
TT
48492018-05-10 Tom Tromey <tom@tromey.com>
4850
4851 * configure: Rebuild.
4852 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4853
190852c8
JB
48542018-05-10 Joel Brobecker <brobecker@adacore.com>
4855
4856 PR server/23158:
4857 * regformats/regdat.sh: Adjust script, following the addition
4858 of the new expedite_regs parameter to init_target_desc.
4859
8727de56
OJ
48602018-05-10 Omair Javaid <omair.javaid@linaro.org>
4861
4862 PR gdb/23127
4863 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4864 set_gdbarch_significant_addr_bit.
4865 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4866 set_gdbarch_significant_addr_bit.
4867 * utils.c (address_significant): Update to sign extend addr.
4868
37d9e062
MF
48692018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4870
4871 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4872 (xtensa_linux_init_abi): Limit tdep->num_regs by
4873 tdep->num_nopriv_regs.
4874 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4875 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4876 not initialized.
4877
7402fbca
SM
48782018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4879
4880 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4881
8ee22052
AB
48822018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4883
4884 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4885 (I387_MXCSR_INIT_VAL): New constant.
4886 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4887 buffer if it was supplied by the inferior.
4888 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4889 (i387_xsave_get_clear_bv): New function.
4890 (i387_supply_xsave): Only read x87 control registers from the
4891 xsave buffer if the feature is enabled, and the state will have
4892 been written, otherwise, provide a suitable default.
4893 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4894 including x87 control registers. Update control registers if they
4895 have changed from the default value, and mark features as enabled
4896 as required.
4897 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4898
968ae51b
UW
48992018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4900
4901 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4902
aff689d3
TT
49032018-05-07 Tom Tromey <tom@tromey.com>
4904
4905 * configure: Rebuild.
4906 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4907
ce887586
TT
49082018-05-07 Tom Tromey <tom@tromey.com>
4909
4910 PR tdep/20362:
4911 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4912 bit. Use correct value for VDIV.
4913
85e26832
TT
49142018-05-04 Tom Tromey <tom@tromey.com>
4915
4916 * configure: Rebuild.
4917 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4918
449b1ac7
TT
49192018-05-04 Tom Tromey <tom@tromey.com>
4920
4921 * linux-record.c (record_linux_system_call) <case
4922 RECORD_SYS_RECVFROM>: Add "break".
4923
15c9ffd6
TT
49242018-05-04 Tom Tromey <tom@tromey.com>
4925
4926 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4927 Add missing "break".
4928 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4929 Add missing "break".
4930
e3829d13
TT
49312018-05-04 Tom Tromey <tom@tromey.com>
4932
4933 * rs6000-tdep.c (ppc_process_record_op4)
4934 (ppc_process_record_op63): Add fall-through comment.
4935
da0e1563
TT
49362018-05-04 Tom Tromey <tom@tromey.com>
4937
4938 * i386-tdep.c (i386_process_record): Add fall-through comment.
4939
0019cd49
TT
49402018-05-04 Tom Tromey <tom@tromey.com>
4941
4942 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4943 comment.
4944
565e0eda
TT
49452018-05-04 Tom Tromey <tom@tromey.com>
4946
4947 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4948 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4949 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4950 comment.
4951 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4952 comment.
4953 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4954 comment.
4955
621846f4
TT
49562018-05-04 Tom Tromey <tom@tromey.com>
4957
4958 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4959
86a73007
TT
49602018-05-04 Tom Tromey <tom@tromey.com>
4961
4962 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4963 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4964 * symfile.c (section_is_mapped): Fix fall-through comment.
4965 * stabsread.c (define_symbol, read_member_functions): Fix
4966 fall-through comment.
4967 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4968 comment.
4969 * remote.c (remote_wait_as): Fix fall-through comment.
4970 * p-exp.y (yylex): Fix fall-through comment.
4971 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4972 comment.
4973 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4974 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4975 * jv-exp.y (yylex): Fix fall-through comment.
4976 * go-exp.y (lex_one_token): Fix fall-through comment.
4977 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4978 fall-through comment.
4979 * f-exp.y (yylex): Fix fall-through comment.
4980 * dwarf2read.c (process_die): Fix fall-through comments.
4981 * dbxread.c (process_one_symbol): Fix fall-through comment.
4982 * d-exp.y (lex_one_token): Fix fall-through comment.
4983 * cp-name-parser.y (yylex): Fix fall-through comment.
4984 * coffread.c (coff_symtab_read): Fix fall-through comment.
4985 * c-exp.y (lex_one_token): Fix fall-through comment.
4986 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4987 comment.
4988 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4989 comment.
4990
56bcdbea
TT
49912018-05-04 Tom Tromey <tom@tromey.com>
4992
4993 PR python/22730:
4994 * NEWS: Mention gdb.execute change.
4995 * gdbcmd.h (execute_control_command): Don't declare.
4996 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4997 execute_control_commands, execute_control_commands_to_string.
4998 * cli/cli-script.h (execute_control_commands)
4999 (execute_control_commands_to_string): Declare.
5000 (execute_control_command): Add from_tty parameter.
5001 * cli/cli-script.c (execute_control_commands)
5002 (execute_control_commands_to_string): New functions.
5003 (execute_user_command): Use execute_control_commands.
5004 (execute_control_command_1): Add "from_tty" parameter. Update.
5005 (execute_control_command): Likewise.
5006
a913fffb
TT
50072018-05-04 Tom Tromey <tom@tromey.com>
5008
5009 PR python/22731:
5010 * NEWS: Mention that breakpoint commands are writable.
5011 * python/py-breakpoint.c (bppy_set_commands): New function.
5012 (breakpoint_object_getset) <"commands">: Use it.
5013
60b3cef2
TT
50142018-05-04 Tom Tromey <tom@tromey.com>
5015
5016 * tracepoint.c (actions_command): Update.
5017 * mi/mi-cmd-break.c (mi_command_line_array)
5018 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5019 (mi_read_next_line): Remove.
5020 (mi_cmd_break_commands): Update.
5021 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5022 function_view.
5023 * cli/cli-script.c (get_command_line): Update.
5024 (process_next_line): Use function_view. Constify.
5025 (recurse_read_control_structure, read_command_lines)
5026 (read_command_lines_1): Change argument types to function_view.
5027 (do_define_command, document_command): Update.
5028 * breakpoint.h (check_tracepoint_command): Don't declare.
5029 * breakpoint.c (check_tracepoint_command): Remove.
5030 (commands_command_1, create_tracepoint_from_upload): Update.
5031
7a2c85f2
TT
50322018-05-04 Tom Tromey <tom@tromey.com>
5033
5034 PR gdb/11750:
5035 * cli/cli-script.h (enum command_control_type) <define_control>:
5036 New constant.
5037 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5038 (build_command_line, execute_control_command_1)
5039 (process_next_line): Likewise.
5040 (do_define_command): New function, extracted from define_command.
5041 (define_command): Use it.
5042
295dc222
TT
50432018-05-04 Tom Tromey <tom@tromey.com>
5044
5045 * tracepoint.c (actions_command): Update.
5046 * cli/cli-script.h (read_command_lines): Update.
5047 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5048 (MAX_TMPBUF): Remove define.
5049 (define_command): Use string_printf.
5050 (document_command): Likewise.
5051 * breakpoint.c (commands_command_1): Update.
5052
1263a9d5
TT
50532018-05-04 Tom Tromey <tom@tromey.com>
5054
5055 * top.c (execute_command): Update.
5056 * cli/cli-script.h (print_command_lines): Now varargs.
5057 * cli/cli-script.c (print_command_lines): Now varargs.
5058 (execute_control_command_1) <case while_control, case if_control>:
5059 Update.
5060
12973681
TT
50612018-05-04 Tom Tromey <tom@tromey.com>
5062
5063 * tracepoint.c (all_tracepoint_actions): Rename from
5064 all_tracepoint_actions_and_cleanup. Change return type.
5065 (actions_command, encode_actions_1, encode_actions)
5066 (trace_dump_actions, tdump_command): Update.
5067 * remote.c (remote_download_command_source): Update.
5068 * python/python.c (gdbpy_eval_from_control_command)
5069 (python_command, python_interactive_command): Update.
5070 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5071 * guile/guile.c (guile_command)
5072 (gdbscm_eval_from_control_command, guile_command): Update.
5073 * compile/compile.c (compile_code_command)
5074 (compile_print_command, compile_to_object): Update.
5075 * cli/cli-script.h (struct command_lines_deleter): New.
5076 (counted_command_line): New typedef.
5077 (struct command_line): Add constructor, destructor.
5078 <body_list>: Remove.
5079 <body_list_0, body_list_1>: New members.
5080 (command_line_up): Remove typedef.
5081 (read_command_lines, read_command_lines_1, get_command_line):
5082 Update.
5083 (copy_command_lines): Don't declare.
5084 * cli/cli-script.c (build_command_line): Use "new".
5085 (get_command_line): Return counted_command_line.
5086 (print_command_lines, execute_user_command)
5087 (execute_control_command_1, while_command, if_command): Update.
5088 (realloc_body_list): Remove.
5089 (process_next_line, recurse_read_control_structure): Update.
5090 (read_command_lines, read_command_lines_1): Return counted_command_line.
5091 (free_command_lines): Use "delete".
5092 (copy_command_lines): Remove.
5093 (define_command, document_command, show_user_1): Update.
5094 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5095 a counted_command_line.
5096 * breakpoint.h (counted_command_line): Remove typedef.
5097 (breakpoint_set_commands): Update.
5098 * breakpoint.c (check_no_tracepoint_commands)
5099 (validate_commands_for_breakpoint): Update.
5100 (breakpoint_set_commands): Change commands to be a
5101 counted_command_line.
5102 (commands_command_1, update_dprintf_command_list)
5103 (create_tracepoint_from_upload): Update.
5104
e2fc72e2
TT
51052018-05-04 Tom Tromey <tom@tromey.com>
5106
5107 * cli/cli-decode.h (cmd_list_element): New constructor.
5108 (~cmd_list_element): New destructor.
5109 (struct cmd_list_element): Add initializers.
5110 * cli/cli-decode.c (do_add_cmd): Use "new".
5111 (delete_cmd): Use "delete".
5112
a3b60e45
JK
51132018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5114 Pedro Alves <palves@redhat.com>
5115
5116 PR breakpoints/19806 and support for PR external/20207.
5117 * NEWS: Mention Aarch64 watchpoint improvements.
5118 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5119 watchpoints and PR external/20207 watchpoints.
5120 * nat/aarch64-linux-hw-point.c
5121 (kernel_supports_any_contiguous_range): New.
5122 (aarch64_watchpoint_offset): New.
5123 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5124 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5125 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5126 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5127 next_addr_orig_p. Support PR external/20207 watchpoints.
5128 (aarch64_downgrade_regs): New.
5129 (aarch64_dr_state_insert_one_point): New parameters offset and
5130 addr_orig.
5131 (aarch64_dr_state_remove_one_point): Likewise.
5132 (aarch64_handle_breakpoint): Update caller.
5133 (aarch64_handle_aligned_watchpoint): Likewise.
5134 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5135 aligned_offset.
5136 (aarch64_linux_set_debug_regs): Remove const from state. Call
5137 aarch64_downgrade_regs.
5138 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5139 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5140 (DR_CONTROL_MASK): ... this.
5141 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5142 (unsigned int aarch64_watchpoint_offset): New prototype.
5143 (aarch64_linux_set_debug_regs): Remove const from state.
5144 * utils.c (align_up, align_down): Move to ...
5145 * common/common-utils.c (align_up, align_down): ... here.
5146 * utils.h (align_up, align_down): Move to ...
5147 * common/common-utils.h (align_up, align_down): ... here.
5148
05bc7456
JB
51492018-05-04 Joel Brobecker <brobecker@adacore.com>
5150
5151 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5152 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5153 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5154 Re-implement to match the ABI as summarized in GCC's
5155 gcc/config/sparc/sparc.c. All callers updated.
5156 (sparc32_store_arguments): Remove assertion.
5157
2f433492
TT
51582018-05-04 Tom Tromey <tom@tromey.com>
5159
5160 * printcmd.c: Don't include tui.h.
5161 (decode_format): Use skip_spaces.
5162
9be2ae8f
TT
51632018-05-04 Tom Tromey <tom@tromey.com>
5164
5165 PR gdb/22619:
5166 * printcmd.c (last_count): New global.
5167 (x_command): Use saved count when repeating.
5168
f0b3976b
TT
51692018-05-04 Tom Tromey <tom@tromey.com>
5170
5171 * nto-procfs.c (do_closedir_cleanup): Remove.
5172 (procfs_pidlist): Use gdb_dir_up.
5173 * procfs.c (do_closedir_cleanup): Remove.
5174 (proc_update_threads): Use gdb_dir_up.
5175 * common/filestuff.h (struct gdb_dir_deleter): New.
5176 (gdb_dir_up): New typedef.
5177
862d101a
TT
51782018-05-04 Tom Tromey <tom@tromey.com>
5179
5180 * ada-lang.c (print_mention_exception): Use std::string.
5181
cb7de75e
TT
51822018-05-04 Tom Tromey <tom@tromey.com>
5183
5184 * ada-lang.c (create_excep_cond_exprs): Update.
5185 (ada_exception_catchpoint_cond_string): Use std::string.
5186
49d83361
TT
51872018-05-04 Tom Tromey <tom@tromey.com>
5188
5189 * ada-lang.c (xget_renaming_scope): Return std::string.
5190 (old_renaming_is_invisible): Update.
5191
ade72a34
TT
51922018-05-04 Tom Tromey <tom@tromey.com>
5193
5194 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5195 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5196
2be4d7f0
UW
51972018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5198
5199 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5200
69b6ecb0
TT
52012018-05-04 Tom Tromey <tom@tromey.com>
5202
5203 * remote.c (remote_query_supported_append): Change type.
5204 (remote_check_symbols): Update.
5205
bf27f0e2
PP
52062018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5207
5208 PR gdb/11420
5209 * configure.ac: Prepend libpython.
5210 * python/python-config.py: Likewise.
5211 * configure: Regenerate.
5212
4ea17de8
SM
52132018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5214
5215 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5216
bd732259
PA
52172018-05-03 Pedro Alves <palves@redhat.com>
5218
5219 * s390-linux-nat.c
5220 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5221 override. Write 'true' instead of '1'.
5222 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5223 declaration.
5224
d9f719f1
PA
52252018-05-02 Pedro Alves <palves@redhat.com>
5226
5227 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5228 add_inf_child_target.
5229 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5230 add_inf_child_target.
5231 * aix-thread.c (aix_thread_target_info): New.
5232 (aix_thread_target) <shortname, longname, doc>: Delete.
5233 <info>: New.
5234 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5235 add_inf_child_target.
5236 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5237 add_inf_child_target.
5238 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5239 add_inf_child_target.
5240 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5241 add_inf_child_target.
5242 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5243 add_inf_child_target.
5244 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5245 add_inf_child_target.
5246 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5247 add_inf_child_target.
5248 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5249 add_inf_child_target.
5250 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5251 add_inf_child_target.
5252 * bfd-target.c (target_bfd_target_info): New.
5253 (target_bfd) <shortname, longname, doc>: Delete.
5254 <info>: New.
5255 * bsd-kvm.c (bsd_kvm_target_info): New.
5256 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5257 <info>: New.
5258 (bsd_kvm_target::open): Rename to ...
5259 (bsd_kvm_target_open): ... this. Adjust.
5260 * bsd-uthread.c (bsd_uthread_target_info): New.
5261 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5262 <info>: New.
5263 * corefile.c (core_file_command): Adjust.
5264 * corelow.c (core_target_info): New.
5265 (core_target) <shortname, longname, doc>: Delete.
5266 <info>: New.
5267 (core_target::open): Rename to ...
5268 (core_target_open): ... this. Adjust.
5269 * ctf.c (ctf_target_info): New.
5270 (ctf_target) <shortname, longname, doc>: Delete.
5271 <info>: New.
5272 (ctf_target::open): Rename to ...
5273 (ctf_target_open): ... this.
5274 (_initialize_ctf): Adjust.
5275 * exec.c (exec_target_info): New.
5276 (exec_target) <shortname, longname, doc>: Delete.
5277 <info>: New.
5278 (exec_target::open): Rename to ...
5279 (exec_target_open): ... this.
5280 * gdbcore.h (core_target_open): Declare.
5281 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5282 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5283 add_inf_child_target.
5284 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5285 add_inf_child_target.
5286 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5287 add_inf_child_target.
5288 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5289 add_inf_child_target.
5290 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5291 add_inf_child_target.
5292 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5293 add_inf_child_target.
5294 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5295 add_inf_child_target.
5296 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5297 add_inf_child_target.
5298 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5299 add_inf_child_target.
5300 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5301 add_inf_child_target.
5302 * inf-child.c (inf_child_target_info): New.
5303 (inf_child_target::info): New.
5304 (inf_child_open_target): Remove 'target' parameter. Use
5305 get_native_target instead.
5306 (inf_child_target::open): Delete.
5307 (add_inf_child_target): New.
5308 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5309 Delete.
5310 <info>: New.
5311 (add_inf_child_target): Declare.
5312 (inf_child_open_target): Declare.
5313 * linux-thread-db.c (thread_db_target_info): New.
5314 (thread_db_target) <shortname, longname, doc>: Delete.
5315 <info>: New.
5316 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5317 add_inf_child_target.
5318 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5319 add_inf_child_target.
5320 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5321 add_inf_child_target.
5322 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5323 add_inf_child_target.
5324 * make-target-delegates (print_class): Adjust.
5325 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5326 add_inf_child_target.
5327 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5328 add_inf_child_target.
5329 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5330 add_inf_child_target.
5331 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5332 add_inf_child_target.
5333 * nto-procfs.c (nto_native_target_info): New.
5334 (nto_procfs_target_native) <shortname, longname, doc>:
5335 Delete.
5336 <info>: New.
5337 (nto_procfs_target_info): New.
5338 (nto_procfs_target_procfs) <shortname, longname, doc>:
5339 Delete.
5340 <info>: New.
5341 (init_procfs_targets): Adjust.
5342 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5343 add_inf_child_target.
5344 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5345 add_inf_child_target.
5346 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5347 add_inf_child_target.
5348 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5349 add_inf_child_target.
5350 * ravenscar-thread.c (ravenscar_target_info): New.
5351 (ravenscar_thread_target) <shortname, longname, doc>:
5352 Delete.
5353 <info>: New.
5354 * record-btrace.c (record_btrace_target_info):
5355 (record_btrace_target) <shortname, longname, doc>: Delete.
5356 <info>: New.
5357 (record_btrace_target::open): Rename to ...
5358 (record_btrace_target_open): ... this. Adjust.
5359 * record-full.c (record_longname, record_doc): New.
5360 (record_full_base_target) <shortname, longname, doc>: Delete.
5361 <info>: New.
5362 (record_full_target_info): New.
5363 (record_full_target): <shortname>: Delete.
5364 <info>: New.
5365 (record_full_core_open_1, record_full_open_1): Update comments.
5366 (record_full_base_target::open): Rename to ...
5367 (record_full_open): ... this.
5368 (cmd_record_full_restore): Update.
5369 (_initialize_record_full): Update.
5370 * remote-sim.c (remote_sim_target_info): New.
5371 (gdbsim_target) <shortname, longname, doc>: Delete.
5372 <info>: New.
5373 (gdbsim_target::open): Rename to ...
5374 (gdbsim_target_open): ... this.
5375 (_initialize_remote_sim): Adjust.
5376 * remote.c (remote_doc): New.
5377 (remote_target_info): New.
5378 (remote_target) <shortname, longname, doc>: Delete.
5379 <info>: New.
5380 (extended_remote_target_info): New.
5381 (extended_remote_target) <shortname, longname, doc>: Delete.
5382 <info>: New.
5383 (remote_target::open_1): Make static. Adjust.
5384 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5385 * s390-linux-nat.c (_initialize_s390_nat): Use
5386 add_inf_child_target.
5387 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5388 add_inf_child_target.
5389 * sol-thread.c (thread_db_target_info): New.
5390 (sol_thread_target) <shortname, longname, doc>: Delete.
5391 <info>: New.
5392 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5393 add_inf_child_target.
5394 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5395 add_inf_child_target.
5396 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5397 add_inf_child_target.
5398 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5399 add_inf_child_target.
5400 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5401 add_inf_child_target.
5402 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5403 add_inf_child_target.
5404 * spu-linux-nat.c (_initialize_spu_nat): Use
5405 add_inf_child_target.
5406 * spu-multiarch.c (spu_multiarch_target_info): New.
5407 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5408 <info>: New.
5409 * target-delegates.c: Regenerate.
5410 * target.c: Include <unordered_map>.
5411 (target_ops_p): Delete.
5412 (DEF_VEC_P(target_ops_p)): Delete.
5413 (target_factories): New.
5414 (test_target_info): New.
5415 (test_target_ops::info): New.
5416 (open_target): Adjust to use target_factories.
5417 (add_target_with_completer): Rename to ...
5418 (add_target): ... this. Change prototype. Register target_info
5419 and open callback in target_factories. Register target_info in
5420 command context instead of target_ops.
5421 (add_target): Delete old implementation.
5422 (add_deprecated_target_alias): Change prototype. Adjust.
5423 (the_native_target): New.
5424 (set_native_target, get_native_target): New.
5425 (find_default_run_target): Use the_native_target.
5426 (find_attach_target, find_run_target): Simplify.
5427 (target_ops::open): Delete.
5428 (dummy_target_info): New.
5429 (dummy_target::shortname, dummy_target::longname)
5430 (dummy_target::doc): Delete.
5431 (dummy_target::info): New.
5432 (debug_target::shortname, debug_target::longname)
5433 (debug_target::doc): Delete.
5434 (debug_target::info): New.
5435 * target.h (struct target_info): New.
5436 (target_ops::~target_ops): Add comment.
5437 (target_ops::info): New.
5438 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5439 longer virtual. Implement in terms of target_info.
5440 (set_native_target, get_native_target): Declare.
5441 (target_open_ftype): New.
5442 (add_target, add_target_with_completer)
5443 (add_deprecated_target_alias): Change prototype.
5444 (test_target) <shortname, longname, doc>: Delete.
5445 <info>: New.
5446 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5447 add_inf_child_target.
5448 * tracefile-tfile.c (tfile_target_info): New.
5449 (tfile_target) <shortname, longname, doc>: Delete.
5450 <info>: New.
5451 (tfile_target::open): Rename to ...
5452 (tfile_target_open): ... this.
5453 (_initialize_tracefile_tfile): Adjust.
5454 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5455 add_inf_child_target.
5456 * windows-nat.c (_initialize_windows_nat): Use
5457 add_inf_child_target.
5458 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5459 add_inf_child_target.
5460
135340af
PA
54612018-05-02 Pedro Alves <palves@redhat.com>
5462
5463 * linux-nat.h (linux_nat_target) <low_new_thread,
5464 low_delete_thread, low_new_fork, low_forget_process,
5465 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5466 New virtual methods.
5467 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5468 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5469 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5470 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5471 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5472 Delete.
5473 * linux-fork.c (delete_fork): Adjust to call low method.
5474 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5475 (linux_nat_new_fork, linux_nat_forget_process_hook)
5476 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5477 (linux_nat_status_is_event):
5478 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5479 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5480 to call low method.
5481 (sigtrap_is_event): Rename to ...
5482 (linux_nat_target::low_status_is_event): ... this.
5483 (linux_nat_set_status_is_event): Delete.
5484 (save_stop_reason, linux_nat_wait_1)
5485 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5486 low methods.
5487 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5488 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5489 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5490 (linux_nat_set_prepare_to_resume): Delete.
5491 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5492 low virtual methods.
5493 * amd64-linux-nat.c: Likewise.
5494 * arm-linux-nat.c: Likewise.
5495 * i386-linux-nat.c: Likewise.
5496 * ia64-linux-nat.c: Likewise.
5497 * mips-linux-nat.c: Likewise.
5498 * ppc-linux-nat.c: Likewise.
5499 * s390-linux-nat.c: Likewise.
5500 * sparc64-linux-nat.c: Likewise.
5501 * x86-linux-nat.c: Likewise.
5502 * x86-linux-nat.h: Include "nat/x86-linux.h".
5503 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5504 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5505 Override methods.
5506
57810aa7
PA
55072018-05-02 Pedro Alves <palves@redhat.com>
5508
5509 * target.h (target_ops)
5510 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5511 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5512 stopped_by_watchpoint, have_continuable_watchpoint,
5513 stopped_data_address, watchpoint_addr_within_range,
5514 can_accel_watchpoint_condition, can_run, thread_alive,
5515 has_all_memory, has_memory, has_stack, has_registers,
5516 has_execution, can_async_p, is_async_p, supports_non_stop,
5517 always_non_stop_p, can_execute_reverse, supports_multi_process,
5518 supports_enable_disable_tracepoint,
5519 supports_disable_randomization, supports_string_tracing,
5520 supports_evaluation_of_breakpoint_conditions,
5521 can_run_breakpoint_commands, filesystem_is_local,
5522 can_download_tracepoint, get_trace_state_variable_value,
5523 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5524 record_is_replaying, record_will_replay,
5525 augmented_libraries_svr4_read>: Adjust to return bool.
5526 * aarch64-linux-nat.c: All implementations adjusted.
5527 * aix-thread.c: All implementations adjusted.
5528 * arm-linux-nat.c: All implementations adjusted.
5529 * breakpoint.c: All implementations adjusted.
5530 * bsd-kvm.c: All implementations adjusted.
5531 * bsd-uthread.c: All implementations adjusted.
5532 * corelow.c: All implementations adjusted.
5533 * ctf.c: All implementations adjusted.
5534 * darwin-nat.c: All implementations adjusted.
5535 * darwin-nat.h: All implementations adjusted.
5536 * exec.c: All implementations adjusted.
5537 * fbsd-nat.c: All implementations adjusted.
5538 * fbsd-nat.h: All implementations adjusted.
5539 * gnu-nat.c: All implementations adjusted.
5540 * gnu-nat.h: All implementations adjusted.
5541 * go32-nat.c: All implementations adjusted.
5542 * ia64-linux-nat.c: All implementations adjusted.
5543 * inf-child.c: All implementations adjusted.
5544 * inf-child.h: All implementations adjusted.
5545 * inf-ptrace.c: All implementations adjusted.
5546 * inf-ptrace.h: All implementations adjusted.
5547 * linux-nat.c: All implementations adjusted.
5548 * linux-nat.h: All implementations adjusted.
5549 * mips-linux-nat.c: All implementations adjusted.
5550 * nto-procfs.c: All implementations adjusted.
5551 * ppc-linux-nat.c: All implementations adjusted.
5552 * procfs.c: All implementations adjusted.
5553 * ravenscar-thread.c: All implementations adjusted.
5554 * record-btrace.c: All implementations adjusted.
5555 * record-full.c: All implementations adjusted.
5556 * remote-sim.c: All implementations adjusted.
5557 * remote.c: All implementations adjusted.
5558 * s390-linux-nat.c: All implementations adjusted.
5559 * sol-thread.c: All implementations adjusted.
5560 * spu-multiarch.c: All implementations adjusted.
5561 * target-delegates.c: All implementations adjusted.
5562 * target.c: All implementations adjusted.
5563 * target.h: All implementations adjusted.
5564 * tracefile-tfile.c: All implementations adjusted.
5565 * tracefile.c: All implementations adjusted.
5566 * tracefile.h: All implementations adjusted.
5567 * windows-nat.c: All implementations adjusted.
5568 * x86-linux-nat.h: All implementations adjusted.
5569 * x86-nat.h: All implementations adjusted.
5570
ad6a4e2d
PA
55712018-05-02 Pedro Alves <palves@redhat.com>
5572
5573 * make-target-delegates (scan_target_h): Don't trim lines here.
5574 Replace sequences of tabs and/or whitespace with a single
5575 whitespace.
5576 (top level, parsing methods): Trim each line before processing it
5577 here.
5578
f6ac5f3d
PA
55792018-05-02 Pedro Alves <palves@redhat.com>
5580 John Baldwin <jhb@freebsd.org>
5581
5582 * target.h (enum strata) <debug_stratum>: New.
5583 (struct target_ops) <all delegation methods>: Replace by C++
5584 virtual methods, and drop "to_" prefix. All references updated
5585 throughout.
5586 <to_shortname, to_longname, to_doc, to_data,
5587 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5588 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5589 virtual methods. All references updated throughout.
5590 <can_attach, supports_terminal_ours, can_create_inferior,
5591 get_thread_control_capabilities, attach_no_wait>: New
5592 virtual methods.
5593 <insert_breakpoint, remove_breakpoint>: Now
5594 TARGET_DEFAULT_NORETURN methods.
5595 <info_proc>: Now returns bool.
5596 <to_magic>: Delete.
5597 (OPS_MAGIC): Delete.
5598 (current_target): Delete. All references replaced by references
5599 to ...
5600 (target_stack): ... this. New.
5601 (target_shortname, target_longname): Adjust.
5602 (target_can_run): Now a function declaration.
5603 (default_child_has_all_memory, default_child_has_memory)
5604 (default_child_has_stack, default_child_has_registers)
5605 (default_child_has_execution): Remove target_ops parameter.
5606 (complete_target_initialization): Delete.
5607 (memory_breakpoint_target): New template class.
5608 (test_target_ops): Refactor as a C++ class with virtual methods.
5609 * make-target-delegates (NAME_PART): Tighten.
5610 (POINTER_PART, CP_SYMBOL): New.
5611 (SIMPLE_RETURN_PART): Reimplement.
5612 (VEC_RETURN_PART): Expect less.
5613 (RETURN_PART, VIRTUAL_PART): New.
5614 (METHOD): Adjust to C++ virtual methods.
5615 (scan_target_h): Remove reference to C99.
5616 (dname): Output "target_ops::" prefix.
5617 (write_function_header): Adjust to output a C++ class method.
5618 (write_declaration): New.
5619 (write_delegator): Adjust to output a C++ class method.
5620 (tdname): Output "dummy_target::" prefix.
5621 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5622 method.
5623 (tdefault_names, debug_names): Delete.
5624 (return_types, tdefaults, styles, argtypes_array): New.
5625 (top level): All methods are delegators.
5626 (print_class): New.
5627 (top level): Print dummy_target and debug_target classes.
5628 * target-delegates.c: Regenerate.
5629 * target-debug.h (target_debug_print_enum_info_proc_what)
5630 (target_debug_print_thread_control_capabilities)
5631 (target_debug_print_thread_info_p): New.
5632 * target.c (dummy_target): Delete.
5633 (the_dummy_target, the_debug_target): New.
5634 (target_stack): Now extern.
5635 (set_targetdebug): Push/unpush debug target.
5636 (default_child_has_all_memory, default_child_has_memory)
5637 (default_child_has_stack, default_child_has_registers)
5638 (default_child_has_execution): Remove target_ops parameter.
5639 (complete_target_initialization): Delete.
5640 (add_target_with_completer): No longer call
5641 complete_target_initialization.
5642 (target_supports_terminal_ours): Use regular delegation.
5643 (update_current_target): Delete.
5644 (push_target): No longer check magic number. Don't call
5645 update_current_target.
5646 (unpush_target): Don't call update_current_target.
5647 (target_is_pushed): No longer check magic number.
5648 (target_require_runnable): Skip for all stratums over
5649 process_stratum.
5650 (target_ops::info_proc): New.
5651 (target_info_proc): Use find_target_at and
5652 find_default_run_target.
5653 (target_supports_disable_randomization): Use regular delegation.
5654 (target_get_osdata): Use find_target_at.
5655 (target_ops::open, target_ops::close, target_ops::can_attach)
5656 (target_ops::attach, target_ops::can_create_inferior)
5657 (target_ops::create_inferior, target_ops::can_run)
5658 (target_can_run): New.
5659 (default_fileio_target): Use regular delegation.
5660 (target_ops::fileio_open, target_ops::fileio_pwrite)
5661 (target_ops::fileio_pread, target_ops::fileio_fstat)
5662 (target_ops::fileio_close, target_ops::fileio_unlink)
5663 (target_ops::fileio_readlink): New.
5664 (target_fileio_open_1, target_fileio_unlink)
5665 (target_fileio_readlink): Always call the target method. Handle
5666 FILEIO_ENOSYS.
5667 (return_zero, return_zero_has_execution): Delete.
5668 (init_dummy_target): Delete.
5669 (dummy_target::dummy_target, dummy_target::shortname)
5670 (dummy_target::longname, dummy_target::doc)
5671 (debug_target::debug_target, debug_target::shortname)
5672 (debug_target::longname, debug_target::doc): New.
5673 (target_supports_delete_record): Use regular delegation.
5674 (setup_target_debug): Delete.
5675 (maintenance_print_target_stack): Skip debug_stratum.
5676 (initialize_targets): Instantiate the_dummy_target and
5677 the_debug_target.
5678 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5679 use target_stack.
5680 (target_auxv_search, fprint_target_auxv): Adjust.
5681 (info_auxv_command): Adjust to use target_stack.
5682 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5683 * exceptions.c (print_flush): Handle a NULL target_stack.
5684 * regcache.c (target_ops_no_register): Refactor as class with
5685 virtual methods.
5686
5687 * exec.c (exec_target): New class.
5688 (exec_ops): Now an exec_target.
5689 (exec_open, exec_close_1, exec_get_section_table)
5690 (exec_xfer_partial, exec_files_info, exec_has_memory)
5691 (exec_make_note_section): Refactor as exec_target methods.
5692 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5693 Delete.
5694 (exec_target::find_memory_regions): New.
5695 (_initialize_exec): Don't call init_exec_ops.
5696 * gdbcore.h (exec_file_clear): Delete.
5697
5698 * corefile.c (core_target): Delete.
5699 (core_file_command): Adjust.
5700 * corelow.c (core_target): New class.
5701 (the_core_target): New.
5702 (core_close): Remove target_ops parameter.
5703 (core_close_cleanup): Adjust.
5704 (core_target::close): New.
5705 (core_open, core_detach, get_core_registers, core_files_info)
5706 (core_xfer_partial, core_thread_alive, core_read_description)
5707 (core_pid_to_str, core_thread_name, core_has_memory)
5708 (core_has_stack, core_has_registers, core_info_proc): Rework as
5709 core_target methods.
5710 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5711 (_initialize_corelow): Initialize the_core_target.
5712 * gdbcore.h (core_target): Delete.
5713 (the_core_target): New.
5714
5715 * ctf.c: (ctf_target): New class.
5716 (ctf_ops): Now a ctf_target.
5717 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5718 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5719 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5720 methods.
5721 (init_ctf_ops): Delete.
5722 (_initialize_ctf): Don't call it.
5723 * tracefile-tfile.c (tfile_target): New class.
5724 (tfile_ops): Now a tfile_target.
5725 (tfile_open, tfile_close, tfile_files_info)
5726 (tfile_get_tracepoint_status, tfile_trace_find)
5727 (tfile_fetch_registers, tfile_xfer_partial)
5728 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5729 Refactor as tfile_target methods.
5730 (tfile_xfer_partial_features): Remove target_ops parameter.
5731 (init_tfile_ops): Delete.
5732 (_initialize_tracefile_tfile): Don't call it.
5733 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5734 (tracefile_has_stack, tracefile_has_registers)
5735 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5736 tracefile_target methods.
5737 (init_tracefile_ops): Delete.
5738 (tracefile_target::tracefile_target): New.
5739 * tracefile.h: Include "target.h".
5740 (tracefile_target): New class.
5741 (init_tracefile_ops): Delete.
5742
5743 * spu-multiarch.c (spu_multiarch_target): New class.
5744 (spu_ops): Now a spu_multiarch_target.
5745 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5746 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5747 (spu_search_memory, spu_mourn_inferior): Refactor as
5748 spu_multiarch_target methods.
5749 (init_spu_ops): Delete.
5750 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5751 complete_target_initialization.
5752
5753 * ravenscar-thread.c (ravenscar_thread_target): New class.
5754 (ravenscar_ops): Now a ravenscar_thread_target.
5755 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5756 (ravenscar_thread_alive, ravenscar_pid_to_str)
5757 (ravenscar_fetch_registers, ravenscar_store_registers)
5758 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5759 (ravenscar_stopped_by_hw_breakpoint)
5760 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5761 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5762 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5763 methods.
5764 (init_ravenscar_thread_ops): Delete.
5765 (_initialize_ravenscar): Remove references to
5766 init_ravenscar_thread_ops and complete_target_initialization.
5767
5768 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5769 (bsd_uthread_target): New class.
5770 (bsd_uthread_ops): Now a bsd_uthread_target.
5771 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5772 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5773 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5774 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5775 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5776 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5777 (bsd_uthread_target): Delete function.
5778 (_initialize_bsd_uthread): Remove reference to
5779 complete_target_initialization.
5780
5781 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5782 (target_bfd): ... this new class.
5783 (target_bfd_xfer_partial, target_bfd_get_section_table)
5784 (target_bfd_close): Refactor as target_bfd methods.
5785 (target_bfd::~target_bfd): New.
5786 (target_bfd_reopen): Adjust.
5787 (target_bfd::close): New.
5788
5789 * record-btrace.c (record_btrace_target): New class.
5790 (record_btrace_ops): Now a record_btrace_target.
5791 (record_btrace_open, record_btrace_stop_recording)
5792 (record_btrace_disconnect, record_btrace_close)
5793 (record_btrace_async, record_btrace_info)
5794 (record_btrace_insn_history, record_btrace_insn_history_range)
5795 (record_btrace_insn_history_from, record_btrace_call_history)
5796 (record_btrace_call_history_range)
5797 (record_btrace_call_history_from, record_btrace_record_method)
5798 (record_btrace_is_replaying, record_btrace_will_replay)
5799 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5800 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5801 (record_btrace_store_registers, record_btrace_prepare_to_store)
5802 (record_btrace_to_get_unwinder)
5803 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5804 (record_btrace_commit_resume, record_btrace_wait)
5805 (record_btrace_stop, record_btrace_can_execute_reverse)
5806 (record_btrace_stopped_by_sw_breakpoint)
5807 (record_btrace_supports_stopped_by_sw_breakpoint)
5808 (record_btrace_stopped_by_hw_breakpoint)
5809 (record_btrace_supports_stopped_by_hw_breakpoint)
5810 (record_btrace_update_thread_list, record_btrace_thread_alive)
5811 (record_btrace_goto_begin, record_btrace_goto_end)
5812 (record_btrace_goto, record_btrace_stop_replaying_all)
5813 (record_btrace_execution_direction)
5814 (record_btrace_prepare_to_generate_core)
5815 (record_btrace_done_generating_core): Refactor as
5816 record_btrace_target methods.
5817 (init_record_btrace_ops): Delete.
5818 (_initialize_record_btrace): Remove reference to
5819 init_record_btrace_ops.
5820 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5821 the execution_direction global.
5822 (record_full_base_target, record_full_target)
5823 (record_full_core_target): New classes.
5824 (record_full_ops): Now a record_full_target.
5825 (record_full_core_ops): Now a record_full_core_target.
5826 (record_full_target::detach, record_full_target::disconnect)
5827 (record_full_core_target::disconnect)
5828 (record_full_target::mourn_inferior, record_full_target::kill):
5829 New.
5830 (record_full_open, record_full_close, record_full_async): Refactor
5831 as methods of the record_full_base_target class.
5832 (record_full_resume, record_full_commit_resume): Refactor
5833 as methods of the record_full_target class.
5834 (record_full_wait, record_full_stopped_by_watchpoint)
5835 (record_full_stopped_data_address)
5836 (record_full_stopped_by_sw_breakpoint)
5837 (record_full_supports_stopped_by_sw_breakpoint)
5838 (record_full_stopped_by_hw_breakpoint)
5839 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5840 methods of the record_full_base_target class.
5841 (record_full_store_registers, record_full_xfer_partial)
5842 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5843 Refactor as methods of the record_full_target class.
5844 (record_full_can_execute_reverse, record_full_get_bookmark)
5845 (record_full_goto_bookmark, record_full_execution_direction)
5846 (record_full_record_method, record_full_info, record_full_delete)
5847 (record_full_is_replaying, record_full_will_replay)
5848 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5849 (record_full_stop_replaying): Refactor as methods of the
5850 record_full_base_target class.
5851 (record_full_core_resume, record_full_core_kill)
5852 (record_full_core_fetch_registers)
5853 (record_full_core_prepare_to_store)
5854 (record_full_core_store_registers, record_full_core_xfer_partial)
5855 (record_full_core_insert_breakpoint)
5856 (record_full_core_remove_breakpoint)
5857 (record_full_core_has_execution): Refactor
5858 as methods of the record_full_core_target class.
5859 (record_full_base_target::supports_delete_record): New.
5860 (init_record_full_ops): Delete.
5861 (init_record_full_core_ops): Delete.
5862 (record_full_save): Refactor as method of the
5863 record_full_base_target class.
5864 (_initialize_record_full): Remove references to
5865 init_record_full_ops and init_record_full_core_ops.
5866
5867 * remote.c (remote_target, extended_remote_target): New classes.
5868 (remote_ops): Now a remote_target.
5869 (extended_remote_ops): Now an extended_remote_target.
5870 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5871 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5872 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5873 (remote_pass_signals, remote_set_syscall_catchpoint)
5874 (remote_program_signals, )
5875 (remote_thread_always_alive): Remove target_ops parameter.
5876 (remote_thread_alive, remote_thread_name)
5877 (remote_update_thread_list, remote_threads_extra_info)
5878 (remote_static_tracepoint_marker_at)
5879 (remote_static_tracepoint_markers_by_strid)
5880 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5881 (remote_open): Refactor as methods of remote_target.
5882 (extended_remote_open, extended_remote_detach)
5883 (extended_remote_attach, extended_remote_post_attach):
5884 (extended_remote_supports_disable_randomization)
5885 (extended_remote_create_inferior): : Refactor as method of
5886 extended_remote_target.
5887 (remote_set_permissions, remote_open_1, remote_detach)
5888 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5889 (remote_resume, remote_commit_resume, remote_stop)
5890 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5891 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5892 (remote_prepare_to_store, remote_store_registers)
5893 (remote_flash_erase, remote_flash_done, remote_files_info)
5894 (remote_kill, remote_mourn, remote_insert_breakpoint)
5895 (remote_remove_breakpoint, remote_insert_watchpoint)
5896 (remote_watchpoint_addr_within_range)
5897 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5898 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5899 (remote_supports_stopped_by_sw_breakpoint)
5900 (remote_stopped_by_hw_breakpoint)
5901 (remote_supports_stopped_by_hw_breakpoint)
5902 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5903 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5904 (remote_verify_memory): Refactor as methods of remote_target.
5905 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5906 parameter.
5907 (remote_xfer_partial, remote_get_memory_xfer_limit)
5908 (remote_search_memory, remote_rcmd, remote_memory_map)
5909 (remote_pid_to_str, remote_get_thread_local_address)
5910 (remote_get_tib_address, remote_read_description): Refactor as
5911 methods of remote_target.
5912 (remote_target::fileio_open, remote_target::fileio_pwrite)
5913 (remote_target::fileio_pread, remote_target::fileio_close): New.
5914 (remote_hostio_readlink, remote_hostio_fstat)
5915 (remote_filesystem_is_local, remote_can_execute_reverse)
5916 (remote_supports_non_stop, remote_supports_disable_randomization)
5917 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5918 (remote_supports_enable_disable_tracepoint)
5919 (remote_supports_string_tracing)
5920 (remote_can_run_breakpoint_commands, remote_trace_init)
5921 (remote_download_tracepoint, remote_can_download_tracepoint)
5922 (remote_download_trace_state_variable, remote_enable_tracepoint)
5923 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5924 (remote_trace_start, remote_get_trace_status)
5925 (remote_get_tracepoint_status, remote_trace_stop)
5926 (remote_trace_find, remote_get_trace_state_variable_value)
5927 (remote_save_trace_data, remote_get_raw_trace_data)
5928 (remote_set_disconnected_tracing, remote_core_of_thread)
5929 (remote_set_circular_trace_buffer, remote_traceframe_info)
5930 (remote_get_min_fast_tracepoint_insn_len)
5931 (remote_set_trace_buffer_size, remote_set_trace_notes)
5932 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5933 (remote_disable_btrace, remote_teardown_btrace)
5934 (remote_read_btrace, remote_btrace_conf)
5935 (remote_augmented_libraries_svr4_read, remote_load)
5936 (remote_pid_to_exec_file, remote_can_do_single_step)
5937 (remote_execution_direction, remote_thread_handle_to_thread_info):
5938 Refactor as methods of remote_target.
5939 (init_remote_ops, init_extended_remote_ops): Delete.
5940 (remote_can_async_p, remote_is_async_p, remote_async)
5941 (remote_thread_events, remote_upload_tracepoints)
5942 (remote_upload_trace_state_variables): Refactor as methods of
5943 remote_target.
5944 (_initialize_remote): Remove references to init_remote_ops and
5945 init_extended_remote_ops.
5946
5947 * remote-sim.c (gdbsim_target): New class.
5948 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5949 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5950 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5951 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5952 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5953 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5954 Refactor as methods of gdbsim_target.
5955 (gdbsim_ops): Now a gdbsim_target.
5956 (init_gdbsim_ops): Delete.
5957 (gdbsim_cntrl_c): Adjust.
5958 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5959
5960 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5961 (the_amd64_linux_nat_target): New.
5962 (amd64_linux_fetch_inferior_registers)
5963 (amd64_linux_store_inferior_registers): Refactor as methods of
5964 amd64_linux_nat_target.
5965 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5966 * i386-linux-nat.c: Don't include "linux-nat.h".
5967 (i386_linux_nat_target): New class.
5968 (the_i386_linux_nat_target): New.
5969 (i386_linux_fetch_inferior_registers)
5970 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5971 as methods of i386_linux_nat_target.
5972 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5973 * inf-child.c (inf_child_ops): Delete.
5974 (inf_child_fetch_inferior_registers)
5975 (inf_child_store_inferior_registers): Delete.
5976 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5977 methods of inf_child_target.
5978 (inf_child_target::supports_terminal_ours)
5979 (inf_child_target::terminal_init)
5980 (inf_child_target::terminal_inferior)
5981 (inf_child_target::terminal_ours_for_output)
5982 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5983 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5984 New.
5985 (inf_child_open, inf_child_disconnect, inf_child_close)
5986 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5987 (inf_child_post_startup_inferior, inf_child_can_run)
5988 (inf_child_pid_to_exec_file): Refactor as methods of
5989 inf_child_target.
5990 (inf_child_follow_fork): Delete.
5991 (inf_child_target::can_create_inferior)
5992 (inf_child_target::can_attach): New.
5993 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5994 (inf_child_target::has_stack, inf_child_target::has_registers)
5995 (inf_child_target::has_execution): New.
5996 (inf_child_fileio_open, inf_child_fileio_pwrite)
5997 (inf_child_fileio_pread, inf_child_fileio_fstat)
5998 (inf_child_fileio_close, inf_child_fileio_unlink)
5999 (inf_child_fileio_readlink, inf_child_use_agent)
6000 (inf_child_can_use_agent): Refactor as methods of
6001 inf_child_target.
6002 (return_zero, inf_child_target): Delete.
6003 (inf_child_target::inf_child_target): New.
6004 * inf-child.h: Include "target.h".
6005 (inf_child_target): Delete function prototype.
6006 (inf_child_target): New class.
6007 (inf_child_open_target, inf_child_mourn_inferior)
6008 (inf_child_maybe_unpush_target): Delete.
6009 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6010 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6011 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6012 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6013 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6014 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6015 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6016 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6017 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6018 methods of inf_ptrace_target.
6019 (inf_ptrace_target): Delete function.
6020 * inf-ptrace.h: Include "inf-child.h".
6021 (inf_ptrace_target): Delete function declaration.
6022 (inf_ptrace_target): New class.
6023 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6024 * linux-nat.c (linux_target): New.
6025 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6026 (linux_nat_target::~linux_nat_target): New.
6027 (linux_child_post_attach, linux_child_post_startup_inferior)
6028 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6029 (linux_child_remove_fork_catchpoint)
6030 (linux_child_insert_vfork_catchpoint)
6031 (linux_child_remove_vfork_catchpoint)
6032 (linux_child_insert_exec_catchpoint)
6033 (linux_child_remove_exec_catchpoint)
6034 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6035 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6036 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6037 (linux_nat_stopped_data_address)
6038 (linux_nat_stopped_by_sw_breakpoint)
6039 (linux_nat_supports_stopped_by_sw_breakpoint)
6040 (linux_nat_stopped_by_hw_breakpoint)
6041 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6042 (linux_nat_kill, linux_nat_mourn_inferior)
6043 (linux_nat_xfer_partial, linux_nat_thread_alive)
6044 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6045 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6046 (linux_child_static_tracepoint_markers_by_strid)
6047 (linux_nat_is_async_p, linux_nat_can_async_p)
6048 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6049 (linux_nat_supports_multi_process)
6050 (linux_nat_supports_disable_randomization, linux_nat_async)
6051 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6052 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6053 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6054 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6055 methods of linux_nat_target.
6056 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6057 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6058 parameter.
6059 (check_stopped_by_watchpoint): Adjust.
6060 (linux_xfer_partial): Delete.
6061 (linux_target_install_ops, linux_target, linux_nat_add_target):
6062 Delete.
6063 (linux_nat_target::linux_nat_target): New.
6064 * linux-nat.h: Include "inf-ptrace.h".
6065 (linux_nat_target): New.
6066 (linux_target, linux_target_install_ops, linux_nat_add_target):
6067 Delete function declarations.
6068 (linux_target): Declare global.
6069 * linux-thread-db.c (thread_db_target): New.
6070 (thread_db_target::thread_db_target): New.
6071 (thread_db_ops): Delete.
6072 (the_thread_db_target): New.
6073 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6074 (thread_db_update_thread_list, thread_db_pid_to_str)
6075 (thread_db_extra_thread_info)
6076 (thread_db_thread_handle_to_thread_info)
6077 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6078 (thread_db_resume): Refactor as methods of thread_db_target.
6079 (init_thread_db_ops): Delete.
6080 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6081 * x86-linux-nat.c: Don't include "linux-nat.h".
6082 (super_post_startup_inferior): Delete.
6083 (x86_linux_nat_target::~x86_linux_nat_target): New.
6084 (x86_linux_child_post_startup_inferior)
6085 (x86_linux_read_description, x86_linux_enable_btrace)
6086 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6087 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6088 methods of x86_linux_nat_target.
6089 (x86_linux_create_target): Delete. Bits folded ...
6090 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6091 pointer.
6092 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6093 (x86_linux_nat_target): New class.
6094 (x86_linux_create_target): Delete.
6095 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6096 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6097 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6098 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6099 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6100 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6101 make extern.
6102 (x86_use_watchpoints): Delete.
6103 * x86-nat.h: Include "breakpoint.h" and "target.h".
6104 (x86_use_watchpoints): Delete.
6105 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6106 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6107 (x86_insert_watchpoint, x86_remove_watchpoint)
6108 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6109 (x86_stopped_by_hw_breakpoint): New declarations.
6110 (x86_nat_target): New template class.
6111
6112 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6113 (the_ppc_linux_nat_target): New.
6114 (ppc_linux_fetch_inferior_registers)
6115 (ppc_linux_can_use_hw_breakpoint)
6116 (ppc_linux_region_ok_for_hw_watchpoint)
6117 (ppc_linux_ranged_break_num_registers)
6118 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6119 (ppc_linux_insert_mask_watchpoint)
6120 (ppc_linux_remove_mask_watchpoint)
6121 (ppc_linux_can_accel_watchpoint_condition)
6122 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6123 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6124 (ppc_linux_watchpoint_addr_within_range)
6125 (ppc_linux_masked_watch_num_registers)
6126 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6127 (ppc_linux_read_description): Refactor as methods of
6128 ppc_linux_nat_target.
6129 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6130
6131 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6132 (procfs_target): New class.
6133 (the_procfs_target): New.
6134 (procfs_target): Delete function.
6135 (procfs_auxv_parse, procfs_attach, procfs_detach)
6136 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6137 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6138 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6139 (procfs_create_inferior, procfs_update_thread_list)
6140 (procfs_thread_alive, procfs_pid_to_str)
6141 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6142 (procfs_stopped_data_address, procfs_insert_watchpoint)
6143 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6144 (proc_find_memory_regions, procfs_info_proc)
6145 (procfs_make_note_section): Refactor as methods of procfs_target.
6146 (_initialize_procfs): Adjust.
6147 * sol-thread.c (sol_thread_target): New class.
6148 (sol_thread_ops): Now a sol_thread_target.
6149 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6150 (sol_thread_fetch_registers, sol_thread_store_registers)
6151 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6152 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6153 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6154 (init_sol_thread_ops): Delete.
6155 (_initialize_sol_thread): Adjust. Remove references to
6156 init_sol_thread_ops and complete_target_initialization.
6157
6158 * windows-nat.c (windows_nat_target): New class.
6159 (windows_fetch_inferior_registers)
6160 (windows_store_inferior_registers, windows_resume, windows_wait)
6161 (windows_attach, windows_detach, windows_pid_to_exec_file)
6162 (windows_files_info, windows_create_inferior)
6163 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6164 (windows_close, windows_pid_to_str, windows_xfer_partial)
6165 (windows_get_tib_address, windows_get_ada_task_ptid)
6166 (windows_thread_name, windows_thread_alive): Refactor as
6167 windows_nat_target methods.
6168 (do_initial_windows_stuff): Adjust.
6169 (windows_target): Delete function.
6170 (_initialize_windows_nat): Adjust.
6171
6172 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6173 (darwin_mourn_inferior, darwin_kill_inferior)
6174 (darwin_create_inferior, darwin_attach, darwin_detach)
6175 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6176 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6177 (darwin_supports_multi_process): Refactor as darwin_nat_target
6178 methods.
6179 (darwin_resume_to, darwin_files_info): Delete.
6180 (_initialize_darwin_inferior): Rename to ...
6181 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6182 * darwin-nat.h: Include "inf-child.h".
6183 (darwin_nat_target): New class.
6184 (darwin_complete_target): Delete.
6185 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6186 (darwin_target): New.
6187 (i386_darwin_fetch_inferior_registers)
6188 (i386_darwin_store_inferior_registers): Refactor as methods of
6189 darwin_nat_target.
6190 (darwin_complete_target): Delete, with ...
6191 (_initialize_i386_darwin_nat): ... bits factored out here.
6192
6193 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6194 (the_alpha_linux_nat_target): New.
6195 (alpha_linux_register_u_offset): Refactor as
6196 alpha_linux_nat_target method.
6197 (_initialize_alpha_linux_nat): Adjust.
6198 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6199 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6200 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6201 methods of linux_nat_trad_target.
6202 (linux_trad_target): Delete.
6203 * linux-nat-trad.h (linux_trad_target): Delete function.
6204 (linux_nat_trad_target): New class.
6205 * mips-linux-nat.c (mips_linux_nat_target): New class.
6206 (super_fetch_registers, super_store_registers, super_close):
6207 Delete.
6208 (the_mips_linux_nat_target): New.
6209 (mips64_linux_regsets_fetch_registers)
6210 (mips64_linux_regsets_store_registers)
6211 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6212 (mips_linux_register_u_offset, mips_linux_read_description)
6213 (mips_linux_can_use_hw_breakpoint)
6214 (mips_linux_stopped_by_watchpoint)
6215 (mips_linux_stopped_data_address)
6216 (mips_linux_region_ok_for_hw_watchpoint)
6217 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6218 (mips_linux_close): Refactor as methods of mips_linux_nat.
6219 (_initialize_mips_linux_nat): Adjust to C++ification.
6220
6221 * aix-thread.c (aix_thread_target): New class.
6222 (aix_thread_ops): Now an aix_thread_target.
6223 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6224 (aix_thread_fetch_registers, aix_thread_store_registers)
6225 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6226 (aix_thread_thread_alive, aix_thread_pid_to_str)
6227 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6228 Refactor as methods of aix_thread_target.
6229 (init_aix_thread_ops): Delete.
6230 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6231 and complete_target_initialization.
6232 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6233 (rs6000_nat_target): New class.
6234 (the_rs6000_nat_target): New.
6235 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6236 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6237 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6238 (super_create_inferior): Delete.
6239 (_initialize_rs6000_nat): Adjust to C++ification.
6240
6241 * arm-linux-nat.c (arm_linux_nat_target): New class.
6242 (the_arm_linux_nat_target): New.
6243 (arm_linux_fetch_inferior_registers)
6244 (arm_linux_store_inferior_registers, arm_linux_read_description)
6245 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6246 (arm_linux_remove_hw_breakpoint)
6247 (arm_linux_region_ok_for_hw_watchpoint)
6248 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6249 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6250 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6251 arm_linux_nat_target.
6252 (_initialize_arm_linux_nat): Adjust to C++ification.
6253
6254 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6255 (the_aarch64_linux_nat_target): New.
6256 (aarch64_linux_fetch_inferior_registers)
6257 (aarch64_linux_store_inferior_registers)
6258 (aarch64_linux_child_post_startup_inferior)
6259 (aarch64_linux_read_description)
6260 (aarch64_linux_can_use_hw_breakpoint)
6261 (aarch64_linux_insert_hw_breakpoint)
6262 (aarch64_linux_remove_hw_breakpoint)
6263 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6264 (aarch64_linux_region_ok_for_hw_watchpoint)
6265 (aarch64_linux_stopped_data_address)
6266 (aarch64_linux_stopped_by_watchpoint)
6267 (aarch64_linux_watchpoint_addr_within_range)
6268 (aarch64_linux_can_do_single_step): Refactor as methods of
6269 aarch64_linux_nat_target.
6270 (super_post_startup_inferior): Delete.
6271 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6272
6273 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6274 (the_hppa_linux_nat_target): New.
6275 (hppa_linux_fetch_inferior_registers)
6276 (hppa_linux_store_inferior_registers): Refactor as methods of
6277 hppa_linux_nat_target.
6278 (_initialize_hppa_linux_nat): Adjust to C++ification.
6279
6280 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6281 (the_ia64_linux_nat_target): New.
6282 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6283 (ia64_linux_stopped_data_address)
6284 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6285 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6286 ia64_linux_nat_target methods.
6287 (super_xfer_partial): Delete.
6288 (_initialize_ia64_linux_nat): Adjust to C++ification.
6289
6290 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6291 (the_m32r_linux_nat_target): New.
6292 (m32r_linux_fetch_inferior_registers)
6293 (m32r_linux_store_inferior_registers): Refactor as
6294 m32r_linux_nat_target methods.
6295 (_initialize_m32r_linux_nat): Adjust to C++ification.
6296
6297 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6298 (the_m68k_linux_nat_target): New.
6299 (m68k_linux_fetch_inferior_registers)
6300 (m68k_linux_store_inferior_registers): Refactor as
6301 m68k_linux_nat_target methods.
6302 (_initialize_m68k_linux_nat): Adjust to C++ification.
6303
6304 * s390-linux-nat.c (s390_linux_nat_target): New class.
6305 (the_s390_linux_nat_target): New.
6306 (s390_linux_fetch_inferior_registers)
6307 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6308 (s390_insert_watchpoint, s390_remove_watchpoint)
6309 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6310 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6311 (s390_auxv_parse, s390_read_description): Refactor as methods of
6312 s390_linux_nat_target.
6313 (_initialize_s390_nat): Adjust to C++ification.
6314
6315 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6316 (the_sparc_linux_nat_target): New.
6317 (_initialize_sparc_linux_nat): Adjust to C++ification.
6318 * sparc-nat.c (sparc_fetch_inferior_registers)
6319 (sparc_store_inferior_registers): Remove target_ops parameter.
6320 * sparc-nat.h (sparc_fetch_inferior_registers)
6321 (sparc_store_inferior_registers): Remove target_ops parameter.
6322 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6323 (the_sparc64_linux_nat_target): New.
6324 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6325
6326 * spu-linux-nat.c (spu_linux_nat_target): New class.
6327 (the_spu_linux_nat_target): New.
6328 (spu_child_post_startup_inferior, spu_child_post_attach)
6329 (spu_child_wait, spu_fetch_inferior_registers)
6330 (spu_store_inferior_registers, spu_xfer_partial)
6331 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6332 methods.
6333 (_initialize_spu_nat): Adjust to C++ification.
6334
6335 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6336 (the_tilegx_linux_nat_target): New.
6337 (fetch_inferior_registers, store_inferior_registers):
6338 Refactor as methods.
6339 (_initialize_tile_linux_nat): Adjust to C++ification.
6340
6341 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6342 (the_xtensa_linux_nat_target): New.
6343 (xtensa_linux_fetch_inferior_registers)
6344 (xtensa_linux_store_inferior_registers): Refactor as
6345 xtensa_linux_nat_target methods.
6346 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6347
6348 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6349 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6350 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6351 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6352 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6353 (fbsd_stopped_by_sw_breakpoint)
6354 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6355 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6356 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6357 (fbsd_post_startup_inferior, fbsd_post_attach)
6358 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6359 (fbsd_set_syscall_catchpoint)
6360 (super_xfer_partial, super_resume, super_wait)
6361 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6362 (fbsd_handle_debug_trap): Remove target_ops parameter.
6363 (fbsd_nat_add_target): Delete.
6364 * fbsd-nat.h: Include "inf-ptrace.h".
6365 (fbsd_nat_add_target): Delete.
6366 (USE_SIGTRAP_SIGINFO): Define.
6367 (fbsd_nat_target): New class.
6368
6369 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6370 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6371 (amd64bsd_target): Delete.
6372 * amd64-bsd-nat.h: New file.
6373 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6374 "x86-bsd-nat.h".
6375 (amd64_fbsd_nat_target): New class.
6376 (the_amd64_fbsd_nat_target): New.
6377 (amd64fbsd_read_description): Refactor as method of
6378 amd64_fbsd_nat_target.
6379 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6380 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6381 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6382 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6383 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6384 (i386bsd_target): Delete.
6385 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6386 (i386bsd_fetch_inferior_registers)
6387 (i386bsd_store_inferior_registers): Declare.
6388 (i386_bsd_nat_target): New class.
6389 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6390 (the_i386_fbsd_nat_target): New.
6391 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6392 i386_fbsd_nat_target methods.
6393 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6394 (_initialize_i386fbsd_nat): Adjust to C++ification.
6395 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6396 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6397 (_initialize_x86_bsd_nat): Adjust to C++ification.
6398 * x86-bsd-nat.h: Include "x86-nat.h".
6399 (x86bsd_target): Delete declaration.
6400 (x86bsd_nat_target): New class.
6401
6402 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6403 (the_aarch64_fbsd_nat_target): New.
6404 (aarch64_fbsd_fetch_inferior_registers)
6405 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6406 aarch64_fbsd_nat_target.
6407 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6408 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6409 (the_alpha_bsd_nat_target): New.
6410 (alphabsd_fetch_inferior_registers)
6411 (alphabsd_store_inferior_registers): Refactor as
6412 alpha_bsd_nat_target methods.
6413 (_initialize_alphabsd_nat): Refactor as methods of
6414 alpha_bsd_nat_target.
6415 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6416 (the_amd64_nbsd_nat_target): New.
6417 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6418 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6419 (the_amd64_obsd_nat_target): New.
6420 (_initialize_amd64obsd_nat): Adjust to C++ification.
6421 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6422 (the_arm_fbsd_nat_target): New.
6423 (arm_fbsd_fetch_inferior_registers)
6424 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6425 (_initialize_arm_fbsd_nat): Refactor as methods of
6426 arm_fbsd_nat_target.
6427 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6428 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6429 (the_arm_netbsd_nat_target): New.
6430 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6431 arm_netbsd_nat_target.
6432 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6433 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6434 (the_hppa_nbsd_nat_target): New.
6435 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6436 hppa_nbsd_nat_target methods.
6437 (_initialize_hppanbsd_nat): Adjust to C++ification.
6438 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6439 (the_hppa_obsd_nat_target): New.
6440 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6441 methods of hppa_obsd_nat_target.
6442 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6443 add_target.
6444 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6445 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6446 add_target.
6447 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6448 (_initialize_i386obsd_nat): Use add_target.
6449 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6450 (the_m68k_bsd_nat_target): New.
6451 (m68kbsd_fetch_inferior_registers)
6452 (m68kbsd_store_inferior_registers): Refactor as methods of
6453 m68k_bsd_nat_target.
6454 (_initialize_m68kbsd_nat): Adjust to C++ification.
6455 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6456 (the_mips_fbsd_nat_target): New.
6457 (mips_fbsd_fetch_inferior_registers)
6458 (mips_fbsd_store_inferior_registers): Refactor as methods of
6459 mips_fbsd_nat_target.
6460 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6461 add_target.
6462 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6463 (the_mips_nbsd_nat_target): New.
6464 (mipsnbsd_fetch_inferior_registers)
6465 (mipsnbsd_store_inferior_registers): Refactor as methods of
6466 mips_nbsd_nat_target.
6467 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6468 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6469 (the_mips64_obsd_nat_target): New.
6470 (mips64obsd_fetch_inferior_registers)
6471 (mips64obsd_store_inferior_registers): Refactor as methods of
6472 mips64_obsd_nat_target.
6473 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6474 add_target.
6475 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6476 nbsd_nat_target.
6477 * nbsd-nat.h: Include "inf-ptrace.h".
6478 (nbsd_nat_target): New class.
6479 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6480 (obsd_wait): Refactor as methods of obsd_nat_target.
6481 (obsd_add_target): Delete.
6482 * obsd-nat.h: Include "inf-ptrace.h".
6483 (obsd_nat_target): New class.
6484 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6485 (the_ppc_fbsd_nat_target): New.
6486 (ppcfbsd_fetch_inferior_registers)
6487 (ppcfbsd_store_inferior_registers): Refactor as methods of
6488 ppc_fbsd_nat_target.
6489 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6490 add_target.
6491 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6492 (the_ppc_nbsd_nat_target): New.
6493 (ppcnbsd_fetch_inferior_registers)
6494 (ppcnbsd_store_inferior_registers): Refactor as methods of
6495 ppc_nbsd_nat_target.
6496 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6497 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6498 (the_ppc_obsd_nat_target): New.
6499 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6500 methods of ppc_obsd_nat_target.
6501 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6502 add_target.
6503 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6504 (the_sh_nbsd_nat_target): New.
6505 (shnbsd_fetch_inferior_registers)
6506 (shnbsd_store_inferior_registers): Refactor as methods of
6507 sh_nbsd_nat_target.
6508 (_initialize_shnbsd_nat): Adjust to C++ification.
6509 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6510 (inf_ptrace_xfer_partial): Delete.
6511 (sparc_xfer_partial, sparc_target): Delete.
6512 * sparc-nat.h (sparc_fetch_inferior_registers)
6513 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6514 (sparc_target): Delete function declaration.
6515 (sparc_target): New template class.
6516 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6517 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6518 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6519 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6520 add_target.
6521 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6522 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6523 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6524 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6525 add_target.
6526 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6527 (the_vax_bsd_nat_target): New.
6528 (vaxbsd_fetch_inferior_registers)
6529 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6530 methods.
6531 (_initialize_vaxbsd_nat): Adjust to C++ification.
6532
6533 * bsd-kvm.c (bsd_kvm_target): New class.
6534 (bsd_kvm_ops): Now a bsd_kvm_target.
6535 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6536 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6537 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6538 bsd_kvm_target.
6539 (bsd_kvm_return_one): Delete.
6540 (bsd_kvm_add_target): Adjust to C++ification.
6541
6542 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6543 (nto_procfs_target_procfs): New classes.
6544 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6545 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6546 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6547 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6548 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6549 (procfs_remove_hw_breakpoint, procfs_resume)
6550 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6551 (procfs_kill_inferior, procfs_store_registers)
6552 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6553 as methods of nto_procfs_target.
6554 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6555 (nto_native_ops): Delete.
6556 (procfs_open, procfs_native_open): Delete.
6557 (nto_native_ops): Now an nto_procfs_target_native.
6558 (init_procfs_targets): Adjust to C++ification.
6559 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6560 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6561 Refactor as methods of nto_procfs_target.
6562
6563 * go32-nat.c (go32_nat_target): New class.
6564 (the_go32_nat_target): New.
6565 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6566 (go32_store_registers, go32_xfer_partial, go32_files_info)
6567 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6568 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6569 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6570 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6571 (go32_target): Delete.
6572 (_initialize_go32_nat): Adjust to C++ification.
6573
6574 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6575 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6576 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6577 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6578 gnu_nat_target.
6579 (gnu_target): Delete.
6580 * gnu-nat.h (gnu_target): Delete.
6581 (gnu_nat_target): New class.
6582 * i386-gnu-nat.c (gnu_base_target): New.
6583 (i386_gnu_nat_target): New class.
6584 (the_i386_gnu_nat_target): New.
6585 (_initialize_i386gnu_nat): Adjust to C++ification.
6586
3fffc070
PA
65872018-05-02 Pedro Alves <palves@redhat.com>
6588
6589 * bfd-target.c (target_bfd_xclose): Rename to ...
6590 (target_bfd_close): ... this.
6591 (target_bfd_reopen): Adjust.
6592 * target.c (target_close): Remove references to to_xclose.
6593 * target.h (target_ops::to_xclose): Delete.
6594 (target_ops::to_close): Update comments.
6595
6798487f
PA
65962018-05-02 Pedro Alves <palves@redhat.com>
6597
6598 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6599 "linux-nat.h".
6600 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6601 * inf-ptrace.c (inf_ptrace_register_u_offset)
6602 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6603 (inf_ptrace_store_register, inf_ptrace_store_registers)
6604 (inf_ptrace_trad_target): Move to ...
6605 * linux-nat-trad.c: ... this new file.
6606 * linux-nat-trad.h: New file.
6607 * linux-nat.c (linux_target_install_ops): Make extern.
6608 (linux_trad_target): Delete.
6609 * linux-nat.h (linux_trad_target): Delete declaration.
6610 (linux_target_install_ops): Declare.
6611 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6612 "linux-nat.h".
6613
c1955e17
PA
66142018-05-02 Pedro Alves <palves@redhat.com>
6615
6616 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6617 procfs_target/add_target here.
6618 * procfs.c (procfs_target): Make static.
6619 (_initialize_procfs): Call add_target here.
6620 * procfs.h (struct target_ops): Remove forward declaration.
6621 (procfs_target): Remove declaration.
6622 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6623
b5c8fcb1
PA
66242018-05-02 Pedro Alves <palves@redhat.com>
6625
6626 * procfs.c (procfs_stopped_by_watchpoint)
6627 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6628 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6629 Forward declare.
6630 (procfs_use_watchpoints): Delete, move contents...
6631 (procfs_target): ... here.
6632 * procfs.h (procfs_use_watchpoints): Delete declaration.
6633 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6634 procfs_use_watchpoints.
6635 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6636 procfs_use_watchpoints.
6637
0489430a
TT
66382018-05-02 Tom Tromey <tom@tromey.com>
6639
6640 PR python/20084:
6641 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6642 and var_zuinteger_unlimited.
6643 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6644 and PARAM_ZUINTEGER_UNLIMITED.
6645 (set_parameter_value): Handle var_zuinteger and
6646 var_zuinteger_unlimited.
6647 (add_setshow_generic): Likewise.
6648 (parmpy_init): Likewise.
6649
1632f8ba
DR
66502018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6651
6652 PR rust/23124
6653 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6654 pointer is not null before dereferencing it.
6655
76761936
TT
66562018-04-30 Tom Tromey <tom@tromey.com>
6657
6658 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6659 is_mi_like_p.
6660
2d33446d
TT
66612018-04-30 Tom Tromey <tom@tromey.com>
6662
6663 * breakpoint.c (mention): Remove use of is_mi_like_p.
6664 (print_mention_ranged_breakpoint): Likewise.
6665 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6666 of is_mi_like_p.
6667
f3c6abab
TT
66682018-04-30 Tom Tromey <tom@tromey.com>
6669
6670 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6671
40c03530
TT
66722018-04-30 Tom Tromey <tom@tromey.com>
6673
6674 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6675 (info_spu_event_command): Remove some uses of is_mi_like_p.
6676
2038b7fd
TT
66772018-04-30 Tom Tromey <tom@tromey.com>
6678
6679 * python/py-framefilter.c (py_print_single_arg)
6680 (enumerate_locals, py_print_args, py_print_frame): Remove some
6681 uses of is_mi_like_p.
6682
4904c3c6
TT
66832018-04-30 Tom Tromey <tom@tromey.com>
6684
6685 * ui-out.c: Update.
6686 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6687 * ui-out.h (ui_out::is_mi_like_p): Now const.
6688 (ui_out::do_is_mi_like_p): Now const.
6689 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6690
7c66fffc
TT
66912018-04-30 Tom Tromey <tom@tromey.com>
6692
6693 * varobj.c (varobj_set_visualizer): Use new_reference.
6694 * python/python.c (gdbpy_decode_line): Use new_reference.
6695 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6696 new_reference.
6697
bbfa6f00
TT
66982018-04-30 Tom Tromey <tom@tromey.com>
6699
6700 * varobj.c (install_new_value): Use new_reference.
6701 * value.h (value_incref): Return void. Swap intro comment with
6702 value_decref.
6703 * value.c (set_value_parent): Use new_reference.
6704 (value_incref): Return void. Update intro comment.
6705 (release_value): Use new_reference.
6706 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6707
1831a9f9
TT
67082018-04-30 Tom Tromey <tom@tromey.com>
6709
6710 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6711 * gdb_bfd.h (new_bfd_ref): Remove.
6712 (gdb_bfd_open): Update comment.
6713 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6714 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6715 (gdb_bfd_fdopenr): Use new_reference.
6716 * exec.c (exec_file_attach): Use new_reference.
6717
7c1b5f3d
TT
67182018-04-30 Tom Tromey <tom@tromey.com>
6719
6720 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6721 method.
6722
e11fb955
TT
67232018-04-30 Tom Tromey <tom@tromey.com>
6724
6725 * jit.c (jit_read_code_entry): Use type_align.
6726 * i386-tdep.c (i386_gdbarch_init): Don't call
6727 set_gdbarch_long_long_align_bit.
6728 * gdbarch.sh: Remove long_long_align_bit.
6729 * gdbarch.c, gdbarch.h: Rebuild.
6730 * arc-tdep.c (arc_type_align): New function.
6731 (arc_gdbarch_init): Use arc_type_align. Don't call
6732 set_gdbarch_long_long_align_bit.
6733
2fff16dd
TT
67342018-04-30 Tom Tromey <tom@tromey.com>
6735
6736 * rust-lang.c (rust_type_alignment): Remove.
6737 (rust_composite_type): Use type_align.
6738
6d7bb824
TT
67392018-04-30 Tom Tromey <tom@tromey.com>
6740
6741 * NEWS: Mention Type.align.
6742 * python/py-type.c (typy_get_alignof): New function.
6743 (type_object_getset): Add "alignof".
6744
007e1530
TT
67452018-04-30 Tom Tromey <tom@tromey.com>
6746
6747 PR exp/17095:
6748 * NEWS: Update.
6749 * std-operator.def (UNOP_ALIGNOF): New operator.
6750 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6751 New.
6752 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6753 * c-lang.c (c_op_print_tab): Add alignof.
6754 * c-exp.y (ALIGNOF): New token.
6755 (exp): Add "ALIGNOF" production.
6756 (ident_tokens): Add _Alignof and alignof.
6757
2b4424c3
TT
67582018-04-30 Tom Tromey <tom@tromey.com>
6759
6760 * i386-tdep.c (i386_type_align): New function.
6761 (i386_gdbarch_init): Update.
6762 * gdbarch.sh (type_align): New method.
6763 * gdbarch.c, gdbarch.h: Rebuild.
6764 * arch-utils.h (default_type_align): Declare.
6765 * arch-utils.c (default_type_align): New function.
6766 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6767 (struct type) <align_log2>: New field.
6768 <instance_flags>: Now a bitfield.
6769 (TYPE_RAW_ALIGN): New macro.
6770 (type_align, type_raw_align, set_type_align): Declare.
6771 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6772 functions.
6773 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6774 (get_alignment, maybe_set_alignment): New functions.
6775 (read_structure_type, read_enumeration_type, read_array_type)
6776 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6777 (read_subrange_type, read_base_type): Set type alignment.
6778
d33bc52e
SM
67792018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6780
6781 * dwarf2read.c (read_index_from_section): Use bool.
6782
e28b63a9
FG
67832018-04-29 Fabian Groffen <grobian@gentoo.org>
6784
6785 PR gdb/22950
6786 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6787 with #ifdef.
6788
cd8c76e4
JR
67892018-04-29 John Reiser <jreiser@BitWagon.com>
6790
6791 PR build/22873
6792 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6793 last step, and do it atomically.
6794
476d250e
AO
67952018-04-27 Alexandre Oliva <aoliva@redhat.com>
6796
6797 * compile/compile-c-types.c (convert_int, convert_float):
6798 Update for C FE v1.
6799
6873858b
TT
68002018-04-27 Tom Tromey <tom@tromey.com>
6801
6802 PR rust/22545:
6803 * rust-lang.c (rust_inclusive_range_type_p): New function.
6804 (rust_range): Handle inclusive ranges.
6805 (rust_compute_range): Likewise.
6806 * rust-exp.y (struct rust_op) <inclusive>: New field.
6807 (DOTDOTEQ): New constant.
6808 (range_expr): Add "..=" productions.
6809 (operator_tokens): Add "..=" token.
6810 (ast_range): Add "inclusive" parameter.
6811 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6812 ranges.
6813 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6814 bounds values.
6815 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6816 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6817 Update comments.
6818 * expprint.c (print_subexp_standard): Handle new bounds values.
6819 (dump_subexp_body_standard): Likewise.
6820
632e107b
TT
68212018-04-27 Tom Tromey <tom@tromey.com>
6822
6823 * configure: Rebuild.
6824 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6825 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6826 "OVERRIDE".
6827 (class symbol_needs_eval_context): Likewise.
6828 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6829 (mock_mapped_index::symbol_name_at): Use "override". Remove
6830 "virtual".
6831 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6832 "override".
6833 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6834 * aarch64-tdep.c (instruction_reader::read): Use "override".
6835 (instruction_reader_test::read): Likewise.
6836 * arm-tdep.c (instruction_reader::read): Use "override".
6837 (instruction_reader_thumb::read): Likewise.
6838
b75abf5b
AK
68392018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6840
6841 PR remote/9665
6842 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6843 instead of remote_send.
6844 (remote_send): Remove.
6845
79188d8d
PA
68462018-04-26 Pedro Alves <palves@redhat.com>
6847
6848 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6849 find_function_start_sal instead of find_pc_line.
6850
f50776aa
PA
68512018-04-26 Pedro Alves <palves@redhat.com>
6852
6853 * breakpoint.c (set_breakpoint_location_function): Handle
6854 mst_data_gnu_ifunc.
6855 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6856 * elfread.c (elf_symtab_read): Give data symbols with
6857 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6858 (elf_rel_plt_read): Update comment.
6859 * linespec.c (convert_linespec_to_sals): Handle
6860 mst_data_gnu_ifunc.
6861 (minsym_found): Handle mst_data_gnu_ifunc.
6862 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6863 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6864 * parse.c (find_minsym_type_and_address): Handle
6865 mst_data_gnu_ifunc.
6866 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6867 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6868 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6869 comment.
6870 <mst_data_gnu_ifunc>: New enumerator.
6871
20944a6e
PA
68722018-04-26 Pedro Alves <palves@redhat.com>
6873
6874 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6875 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6876 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6877 Handle it.
6878 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6879 (lookup_minimal_symbol_by_pc): Adjust.
6880 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6881 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6882 * minsyms.h (lookup_msym_prefer): New enum.
6883 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6884 parameter by a lookup_msym_prefer parameter.
6885
1adeb822
PA
68862018-04-26 Pedro Alves <palves@redhat.com>
6887
6888 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6889 ends in "@plt" instead of looking at the symbol's section.
6890
a0aca7b0
PA
68912018-04-26 Pedro Alves <palves@redhat.com>
6892
6893 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6894 all references.
6895 (find_pc_partial_function_gnu_ifunc): Rename to ...
6896 (find_pc_partial_function): ... this, and remove references to
6897 'is_gnu_ifunc_p'.
6898 (find_pc_partial_function): Delete old implementation.
6899 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6900
76af0f26
PA
69012018-04-26 Pedro Alves <palves@redhat.com>
6902
6903 * linespec.c (struct bound_minimal_symbol_search_key): New.
6904 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6905 skip first line if we found a GNU ifunc minimal symbol by name.
6906 (compare_msymbols): Change parameters to work with a destructured
6907 lhs minsym.
6908 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6909 functions.
6910
3467ec66
PA
69112018-04-26 Pedro Alves <palves@redhat.com>
6912
6913 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6914 ifunc targets here. Instead, if we have an ifunc minsym, use its
6915 address/name.
6916 (add_location_to_breakpoint): Store the minsym and the objfile in
6917 the breakpoint location.
6918 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6919 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6920 Record the minsym in the sal.
6921 * symtab.h (symtab_and_line) <msymbol>: New field.
6922
28f4fa4d
PA
69232018-04-26 Pedro Alves <palves@redhat.com>
6924
6925 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6926 unless we actually resolved the ifunc.
6927
ca31ab1d
PA
69282018-04-26 Pedro Alves <palves@redhat.com>
6929
6930 * c-exp.y (variable production): Prefer ifunc minsyms over
6931 regular function symbols.
6932 * symtab.c (find_gnu_ifunc): New function.
6933 * minsyms.h (lookup_msym_prefer): New enum.
6934 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6935 parameter by a lookup_msym_prefer parameter.
6936 * symtab.h (find_gnu_ifunc): New declaration.
6937
8388016d
PA
69382018-04-26 Pedro Alves <palves@redhat.com>
6939
6940 * blockframe.c (find_gnu_ifunc_target_type): New function.
6941 (find_function_type): New.
6942 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6943 return a value with a memory address.
6944 (eval_call): For calls to GNU ifunc functions, try to find the
6945 type of the target function from the type that the resolver
6946 returns.
6947 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6948 symbols.
6949 * infcall.c (find_function_return_type): Delete.
6950 (find_function_addr): Add 'function_type' parameter. For calls to
6951 GNU ifunc functions, try to find the type of the target function
6952 from the type that the resolver returns, and return it via
6953 FUNCTION_TYPE.
6954 (call_function_by_hand_dummy): Adjust to use the function type
6955 returned by find_function_addr.
6956 (find_function_addr): Add 'function_type' parameter and move
6957 description here.
6958 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6959 declarations.
6960
a376e11d
PA
69612018-04-26 Pedro Alves <palves@redhat.com>
6962
6963 * c-exp.y (variable production): Skip finding an alias for ifunc
6964 symbols.
6965
02e169e2
PA
69662018-04-26 Pedro Alves <palves@redhat.com>
6967
6968 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6969
249b5733
PA
69702018-04-25 Pedro Alves <palves@redhat.com>
6971
6972 * infcmd.c (kill_command): Print the pid as string, not the whole
6973 thread's ptid. Add comment. s/has been killed/killed/ in output
6974 message.
6975 * remote.c (remote_detach_1): Print the pid as string, not the
6976 whole thread's ptid.
6977
f67c0c91
SDJ
69782018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6979 Sergio Durigan Junior <sergiodj@redhat.com>
6980 Pedro Alves <palves@redhat.com>
6981
6982 * infcmd.c (kill_command): Print message when inferior has
6983 been killed.
6984 * inferior.c (print_inferior_events): Remove 'static'. Set as
6985 '1'.
6986 (add_inferior): Improve message printed when
6987 'print_inferior_events' is on.
6988 (exit_inferior): Remove message printed when
6989 'print_inferior_events' is on.
6990 (detach_inferior): Improve message printed when
6991 'print_inferior_events' is on.
6992 (initialize_inferiors): Use 'add_inferior_silent' to set
6993 'current_inferior_'.
6994 * inferior.h (print_inferior_events): Declare here as
6995 'extern'.
6996 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6997 '[Detaching...]' messages when 'print_inferior_events' is on.
6998 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6999 as prefix/suffix for messages. Remove periods. Fix erroneous
7000 'Detaching after fork from child...', replace it by '... from
7001 parent...'.
7002 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7003 prefix/suffix when printing 'Detaching...' messages. Print
7004 them when 'print_inferior_events' is on.
7005 * remote.c (remote_detach_1): Print message when detaching
7006 from inferior and '!is_fork_parent'.
7007
e427af18
TT
70082018-04-24 Tom Tromey <tom@tromey.com>
7009
7010 * cli-out.h: Reindent.
7011
05b1d8d6
TT
70122018-04-24 Tom Tromey <tom@tromey.com>
7013
7014 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7015 (cli_ui_out::do_field_string): Use fputs_filtered.
7016 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7017
a95c7dab
TT
70182018-04-23 Tom Tromey <tom@tromey.com>
7019
7020 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7021 gdb::unique_xmalloc_ptr.
7022
458412c3
TT
70232018-04-23 Tom Tromey <tom@tromey.com>
7024
7025 * configure: Rebuild.
7026
db86b02b
RS
70272018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7028
7029 PR gdb/23095
7030 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7031 prepare_for_testing. Set normal_bp to r_debug_state if target
7032 is bsd.
7033
00aecdcf
PA
70342018-04-21 Pedro Alves <palves@redhat.com>
7035 Rajendra SY <rajendra.sy@gmail.com>
7036
7037 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7038 * remote.c (extended_remote_attach): In all-stop mode, mark the
7039 thread as executing.
7040
224608c3
PW
70412018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7042
7043 * thread.c (thread_apply_all_command): Fix comment.
7044 (thread_command): Fix comment.
7045
3b74854b
AH
70462018-04-10 Alan Hayward <alan.hayward@arm.com>
7047
7048 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7049 parameter.
7050 * features/aarch64-core.c (create_feature_aarch64_core):
7051 Regenerate.
7052 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7053 Likewise.
7054 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7055 Likewise.
7056 * features/i386/32bit-avx512.c
7057 (create_feature_i386_32bit_avx512): Likewise.
7058 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7059 Likewise.
7060 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7061 Likewise.
7062 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7063 Likewise.
7064 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7065 Likewise.
7066 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7067 Likewise.
7068 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7069 Likewise.
7070 * features/i386/64bit-avx512.c
7071 (create_feature_i386_64bit_avx512): Likewise.
7072 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7073 Likewise.
7074 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7075 Likewise.
7076 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7077 Likewise.
7078 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7079 Likewise.
7080 * features/i386/64bit-segments.c
7081 (create_feature_i386_64bit_segments): Likewise.
7082 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7083 Likewise.
7084 * features/i386/x32-core.c
7085 (create_feature_i386_x32_core): Likewise.
7086 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7087 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7088 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7089 * target-descriptions.c: In generated code, don't pass xml
7090 filename.
7091
e98577a9
AH
70922018-04-18 Alan Hayward <alan.hayward@arm.com>
7093
7094 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7095 (print_xml_feature::visit_post): Likewise.
7096 (print_xml_feature::visit): Likewise.
7097 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7098 (print_xml_feature): Add new class.
7099 * regformats/regdat.sh: Null xmltarget on feature targets.
7100 * target-descriptions.c (struct target_desc): Add xmltarget.
7101 (maintenance_check_tdesc_xml_convert): Add unittest function.
7102 (tdesc_get_features_xml): Add function to get xml.
7103 (maintenance_check_xml_descriptions): Test xml generation.
7104 * xml-tdesc.c (string_read_description_xml): Add function.
7105 * xml-tdesc.h (string_read_description_xml): Add declaration.
7106
ad7fc756
AH
71072018-04-18 Alan Hayward <alan.hayward@arm.com>
7108
7109 * features/Makefile: Add feature marker to targets with new style
7110 target descriptions.
7111 * regformats/aarch64.dat: Regenerate.
7112 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7113 * regformats/i386/amd64-avx-linux.dat: Likewise.
7114 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7115 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7116 * regformats/i386/amd64-linux.dat: Likewise.
7117 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7118 * regformats/i386/amd64.dat: Likewise.
7119 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7120 * regformats/i386/i386-avx-linux.dat: Likewise.
7121 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7122 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7123 * regformats/i386/i386-linux.dat: Likewise.
7124 * regformats/i386/i386-mmx-linux.dat: Likewise.
7125 * regformats/i386/i386-mpx-linux.dat: Likewise.
7126 * regformats/i386/i386.dat: Likewise.
7127 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7128 * regformats/i386/x32-avx-linux.dat: Likewise.
7129 * regformats/i386/x32-linux.dat: Likewise.
7130 * regformats/tic6x-c62x-linux.dat: Likewise.
7131 * regformats/tic6x-c64x-linux.dat: Likewise.
7132 * regformats/tic6x-c64xp-linux.dat: Likewise.
7133 * regformats/regdat.sh: Parse feature marker.
7134
d278f585
AH
71352018-04-18 Alan Hayward <alan.hayward@arm.com>
7136
7137 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7138 (tdesc_osabi_name): Likewise.
7139 * target-descriptions.c (tdesc_architecture_name): Add new
7140 function.
7141 (tdesc_osabi_name): Likewise.
7142
eee8a18d
AH
71432018-04-18 Alan Hayward <alan.hayward@arm.com>
7144
7145 * common/tdesc.c (tdesc_predefined_type): Move to here.
7146 (tdesc_named_type): Likewise.
7147 (tdesc_create_vector): Likewise.
7148 (tdesc_create_struct): Likewise.
7149 (tdesc_set_struct_size): Likewise.
7150 (tdesc_create_union): Likewise.
7151 (tdesc_create_flags): Likewise.
7152 (tdesc_create_enum): Likewise.
7153 (tdesc_add_field): Likewise.
7154 (tdesc_add_typed_bitfield): Likewise.
7155 (tdesc_add_bitfield): Likewise.
7156 (tdesc_add_flag): Likewise.
7157 (tdesc_add_enum_value): Likewise.
7158 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7159 (struct tdesc_type_vector): Likewise.
7160 (struct tdesc_type_field): Likewise.
7161 (struct tdesc_type_with_fields): Likewise.
7162 (tdesc_create_enum): Add declaration.
7163 (tdesc_add_typed_bitfield): Likewise.
7164 (tdesc_add_enum_value): Likewise.
7165 * target-descriptions.c (tdesc_type_field): Move from here.
7166 (tdesc_type_builtin): Likewise.
7167 (tdesc_type_vector): Likewise.
7168 (tdesc_type_with_fields): Likewise.
7169 (tdesc_predefined_types): Likewise.
7170 (tdesc_named_type): Likewise.
7171 (tdesc_create_vector): Likewise.
7172 (tdesc_create_struct): Likewise.
7173 (tdesc_set_struct_size): Likewise.
7174 (tdesc_create_union): Likewise.
7175 (tdesc_create_flags): Likewise.
7176 (tdesc_create_enum): Likewise.
7177 (tdesc_add_field): Likewise.
7178 (tdesc_add_typed_bitfield): Likewise.
7179 (tdesc_add_bitfield): Likewise.
7180 (tdesc_add_flag): Likewise.
7181 (tdesc_add_enum_value): Likewise.
7182 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7183 (tdesc_add_typed_bitfield): Likewise.
7184 (tdesc_add_enum_value): Likewise.
7185
82ec9bc7
AH
71862018-04-18 Alan Hayward <alan.hayward@arm.com>
7187
7188 * common/tdesc.c (tdesc_feature::accept): Move to here.
7189 (tdesc_feature::operator==): Likewise.
7190 (tdesc_create_reg): Likewise.
7191 * common/tdesc.h (tdesc_type_kind): Likewise.
7192 (struct tdesc_type): Likewise.
7193 (struct tdesc_feature): Likewise.
7194 * regformats/regdat.sh: Create a feature.
7195 * target-descriptions.c (tdesc_type_kind): Move from here.
7196 (tdesc_type): Likewise.
7197 (tdesc_type_up): Likewise.
7198 (tdesc_feature): Likewise.
7199 (tdesc_create_reg): Likewise.
7200
ea3e7d71
AH
72012018-04-18 Alan Hayward <alan.hayward@arm.com>
7202
7203 * Makefile.in: Add arch/tdesc.c
7204 * common/tdesc.c: New file.
7205 * common/tdesc.h (tdesc_element_visitor): Move to here.
7206 (tdesc_element): Likewise.
7207 (tdesc_reg): Likewise.
7208 (tdesc_reg_up): Likewise.
7209 * regformats/regdef.h (reg): Add offset to constructors.
7210 * target-descriptions.c (tdesc_element_visitor): Move from here.
7211 (tdesc_element): Likewise.
7212 (tdesc_reg): Likewise.
7213 (tdesc_reg_up): Likewise.
7214
bedda9ac
TT
72152018-04-17 Tom Tromey <tom@tromey.com>
7216
7217 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7218 discriminant field.
7219
a037790e
TT
72202018-04-17 Tom Tromey <tom@tromey.com>
7221
7222 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7223
c7dcbf88
AA
72242018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7225
7226 * symtab.c (print_symbol_info): Skip printing filename and line
7227 number when `last' is NULL.
7228 (symtab_symbol_info): Use empty string instead of NULL for first
7229 invocation of print_symbol_info.
7230 (rbreak_command): Pass NULL to `last' parameter of
7231 print_symbol_info.
7232
07d28c77
SM
72332018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7234
7235 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7236 instead of nullptr.
7237
8a3de5e1
PA
72382018-04-16 Pedro Alves <palves@redhat.com>
7239
7240 * MAINTAINERS (sh): Remove.
7241 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7242 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7243 (ALLDEPFILES): Remove sh64-tdep.c.
7244 * NEWS: Mentions that support for SH-5/SH64 is removed.
7245 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7246 (sh*-*-openbsd*): Ditto.
7247 (sh64-*-elf*): Remove.
7248 (sh*): Remove.
7249 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7250 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7251 * sh-tdep.c: No longer include "sh64-tdep.h".
7252 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7253 * sh64-tdep.c, sh64-tdep.h: Remove files.
7254
a2a79012
PA
72552018-04-16 Pedro Alves <palves@redhat.com>
7256
7257 * MAINTAINERS: Remove m88k.
7258 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7259 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7260 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7261 * NEWS: Mention that support for m88k was removed.
7262 * configure.host (m88*-*-*): Remove support.
7263 * configure.nat (m88k-*-*): Remove support.
7264 * configure.tgt (m88*-*-openbsd*): Remove.
7265 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7266
eda4efb1
SM
72672018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7268
7269 * configure.tgt (x86_tobjs): New variable.
7270 (amd64_tobjs, i386_tobjs): Use it.
7271
b744723f
AA
72722018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7273
7274 * symtab.c (print_symbol_info): Precede the symbol definition by
7275 the line number when available.
7276 * NEWS: Advertise this enhancement.
7277
4a4495d6
MM
72782018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7279
7280 * NEWS (New options): announce set/show record btrace cpu.
7281 * btrace.c: Include record-btrace.h.
7282 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7283 the vendor is unknown.
7284 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7285 Maybe overwrite the btrace configuration's cpu.
7286 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7287 (btrace_fetch): Add cpu parameter. Update callers.
7288 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7289 Maybe overwrite the btrace configuration's cpu. Skip enabling
7290 errata workarounds if the vendor is unknown.
7291 * python/py-record-btrace.c: Include record-btrace.h.
7292 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7293 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7294 * record-btrace.c (record_btrace_cpu_state_kind): New.
7295 (record_btrace_cpu): New.
7296 (set_record_btrace_cpu_cmdlist): New.
7297 (record_btrace_get_cpu): New.
7298 (require_btrace_thread, record_btrace_info)
7299 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7300 (cmd_set_record_btrace_cpu_none): New.
7301 (cmd_set_record_btrace_cpu_auto): New.
7302 (cmd_set_record_btrace_cpu): New.
7303 (cmd_show_record_btrace_cpu): New.
7304 (_initialize_record_btrace): Initialize set/show record btrace cpu
7305 commands.
7306 * record-btrace.h (record_btrace_get_cpu): New.
7307
69f90c75
MM
73082018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7309
7310 * record.c (set_record_command): Fix typo in message.
7311
b85310e1
MM
73122018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7313
7314 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7315
1d509aa6
MM
73162018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7317
7318 * infrun.c (process_event_stop_test): Call
7319 gdbarch_in_indirect_branch_thunk.
7320 * gdbarch.sh (in_indirect_branch_thunk): New.
7321 * gdbarch.c: Regenerated.
7322 * gdbarch.h: Regenerated.
7323 * x86-tdep.h: New.
7324 * x86-tdep.c: New.
7325 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7326 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7327 (ALLDEPFILES): Add x86-tdep.c.
7328 * arch-utils.h (default_in_indirect_branch_thunk): New.
7329 * arch-utils.c (default_in_indirect_branch_thunk): New.
7330 * i386-tdep: Include x86-tdep.h.
7331 (i386_in_indirect_branch_thunk): New.
7332 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7333 function.
7334 * amd64-tdep: Include x86-tdep.h.
7335 (amd64_in_indirect_branch_thunk): New.
7336 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7337
b4be9bfd
JK
73382018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7339
7340 PR gdb/23053
7341 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7342 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7343 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7344 regression.
7345
53d7df28
TT
73462018-04-12 Tom Tromey <tom@tromey.com>
7347
7348 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7349 (rust_evaluate_subexp): Likewise.
7350
70b33f19
PA
73512018-04-12 Pedro Alves <palves@redhat.com>
7352
7353 * procfs.c (procfs_detach): Make forward declaration's prototype
7354 match definition's protototype.
7355 (proc_get_LDT_entry): Remove stale do_cleanups call.
7356
436411b1
PA
73572018-04-12 Pedro Alves <palves@redhat.com>
7358
7359 * target.h (target_ops::to_has_exited): Delete.
7360 (target_has_exited): Delete.
7361 * target-delegates.c: Regenerate.
7362
20db9c52
PA
73632018-04-11 Pedro Alves <palves@redhat.com>
7364
7365 * target.c (fileio_fh_t::t): Add comment.
7366 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7367 (target_fileio_close): Handle a NULL target.
7368 (invalidate_fileio_fh): New.
7369 (target_close): Call it.
7370 * remote.c (remote_hostio_send_command): No longer check whether
7371 remote_desc is open.
7372
5ff79300
PA
73732018-04-11 Pedro Alves <palves@redhat.com>
7374
7375 * target.c (fileio_fh_t): Make it a named struct instead of a
7376 typedef.
7377 (fileio_fh_t::is_closed): New method.
7378 (DEF_VEC_O (fileio_fh_t)): Remove.
7379 (fileio_fhandles): Now a std::vector.
7380 (is_closed_fileio_fh): Delete.
7381 (acquire_fileio_fd): Adjust. Rename parameters.
7382 (release_fileio_fd): Adjust.
7383 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7384 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7385 (target_fileio_close): Adjust.
7386
6e22e10d
SM
73872018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7388
7389 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7390 index.
7391
731f534f
PA
73922018-04-10 Pedro Alves <palves@redhat.com>
7393
7394 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7395 (scoped_finish_thread_state): New class.
7396 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7397 cleanup.
7398 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7399 (fetch_inferior_event, normal_stop): Likewise.
7400 * thread.c (finish_thread_state_cleanup): Delete.
7401
d5f4488f
SM
74022018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7403 Pedro Alves <palves@redhat.com>
7404
7405 * value.c: Include "selftest.h" and "common/array-view.h".
7406 (struct range) <operator ==>: New.
7407 (test_ranges_contain): New.
7408 (check_ranges_vector): New.
7409 (test_insert_into_bit_range_vector): New.
7410 (_initialize_values): Register selftests.
7411 * common/array-view.h (operator==, operator!=): New.
7412
b24531ed
SM
74132018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7414
7415 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7416 an iterator.
7417 * inline-frame.c: Include <algorithm>.
7418 (struct inline_state): Add constructor.
7419 (inline_state_s): Remove.
7420 (DEF_VEC_O(inline_state_s)): Remove.
7421 (inline_states): Change type to std::vector.
7422 (find_inline_frame_state): Adjust to std::vector.
7423 (allocate_inline_frame_state): Remove.
7424 (clear_inline_frame_state): Adjust to std::vector.
7425 (skip_inline_frames): Adjust to std::vector.
7426
c252925c
SM
74272018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7428
7429 * tracepoint.h (struct trace_state_variable): Add constructor.
7430 <name>: Change type to std::string.
7431 * tracepoint.c (tsv_s): Remove.
7432 (DEF_VEC_O(tsv_s)): Remove.
7433 (tvariables): Change to std::vector.
7434 (create_trace_state_variable): Adjust to std::vector.
7435 (find_trace_state_variable): Likewise.
7436 (find_trace_state_variable_by_number): Likewise.
7437 (delete_trace_state_variable): Likewise.
7438 (trace_variable_command): Adjust to std::string.
7439 (delete_trace_variable_command): Likewise.
7440 (tvariables_info_1): Adjust to std::vector.
7441 (save_trace_state_variables): Likewise.
7442 (start_tracing): Likewise.
7443 (merge_uploaded_trace_state_variables): Adjust to std::vector
7444 and std::string.
7445 * target.h (struct target_ops)
7446 <to_download_trace_state_variable>: Pass reference to
7447 trace_state_variable.
7448 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7449 * target-delegates.c: Re-generate.
7450 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7451 (mi_tsv_deleted): Likewise.
7452 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7453 * remote.c (remote_download_trace_state_variable): Change
7454 pointer to reference and adjust.
7455 * make-target-delegates (parse_argtypes): Handle references.
7456 (write_function_header): Likewise.
7457 (munge_type): Likewise.
7458
c9638d26
SM
74592018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7460
7461 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7462 string_view-selftests.c.
7463 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7464 testsuite.
7465 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7466 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7467 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7468 * unittests/basic_string_view/element_access/char/1.cc:
7469 Likewise.
7470 * unittests/basic_string_view/element_access/char/empty.cc:
7471 Likewise.
7472 * unittests/basic_string_view/element_access/char/front_back.cc:
7473 Likewise.
7474 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7475 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7476 Likewise.
7477 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7478 Likewise.
7479 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7480 Likewise.
7481 * unittests/basic_string_view/operations/compare/char/1.cc:
7482 Likewise.
7483 * unittests/basic_string_view/operations/compare/char/13650.cc:
7484 Likewise.
7485 * unittests/basic_string_view/operations/copy/char/1.cc:
7486 Likewise.
7487 * unittests/basic_string_view/operations/data/char/1.cc:
7488 Likewise.
7489 * unittests/basic_string_view/operations/find/char/1.cc:
7490 Likewise.
7491 * unittests/basic_string_view/operations/find/char/2.cc:
7492 Likewise.
7493 * unittests/basic_string_view/operations/find/char/3.cc:
7494 Likewise.
7495 * unittests/basic_string_view/operations/find/char/4.cc:
7496 Likewise.
7497 * unittests/basic_string_view/operations/rfind/char/1.cc:
7498 Likewise.
7499 * unittests/basic_string_view/operations/rfind/char/2.cc:
7500 Likewise.
7501 * unittests/basic_string_view/operations/rfind/char/3.cc:
7502 Likewise.
7503 * unittests/basic_string_view/operations/substr/char/1.cc:
7504 Likewise.
7505 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7506 * unittests/string_view-selftests.c: New file.
7507
fdc11678
SM
75082018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7509
7510 * unittests/basic_string_view/capacity/1.cc: New file.
7511 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7512 * unittests/basic_string_view/cons/char/1.cc: New file.
7513 * unittests/basic_string_view/cons/char/2.cc: New file.
7514 * unittests/basic_string_view/cons/char/3.cc: New file.
7515 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7516 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7517 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7518 * unittests/basic_string_view/element_access/char/1.cc: New file.
7519 * unittests/basic_string_view/element_access/char/2.cc: New file.
7520 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7521 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7522 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7523 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7524 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7525 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7526 * unittests/basic_string_view/include.cc: New file.
7527 * unittests/basic_string_view/inserters/char/1.cc: New file.
7528 * unittests/basic_string_view/inserters/char/2.cc: New file.
7529 * unittests/basic_string_view/inserters/char/3.cc: New file.
7530 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7531 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7532 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7533 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7534 * unittests/basic_string_view/literals/types.cc: New file.
7535 * unittests/basic_string_view/literals/values.cc: New file.
7536 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7537 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7538 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7539 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7540 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7541 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7542 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7543 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7544 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7545 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7546 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7547 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7548 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7549 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7550 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7551 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7552 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7553 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7554 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7555 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7556 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7557 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7558 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7559 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7560 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7561 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7562 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7563 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7564 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7565 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7566 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7567 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7568 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7569 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7570 * unittests/basic_string_view/operators/char/2.cc: New file.
7571 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7572 * unittests/basic_string_view/range_access/char/1.cc: New file.
7573 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7574 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7575 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7576 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7577 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7578 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7579 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7580 * unittests/basic_string_view/typedefs.cc: New file.
7581 * unittests/basic_string_view/types/1.cc: New file.
7582
8345c4a2
SM
75832018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7584
7585 * common/gdb_string_view.h: Remove libstdc++ implementation
7586 details, adjust to gdb reality.
7587 * common/gdb_string_view.tcc: Likewise.
7588 * cli/cli-script.c (struct string_view): Remove.
7589 (user_args) <m_args>: Change element type to gdb::string_view.
7590 (user_args::insert_args): Adjust.
7591
7adcdf08
SM
75922018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7593
7594 * common/gdb_string_view.h: New file.
7595 * common/gdb_string_view.tcc: New file.
7596
41260ac2
SM
75972018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7598
7599 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7600 * configure: Re-generate.
7601
0bee6dd4
PA
76022018-04-09 Pedro Alves <palves@redhat.com>
7603
7604 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7605 (set_target_gdbarch): Call
7606 gdb::observers::architecture_changed.notify instead of
7607 observer_notify_architecture_changed.
7608
6f14adc5
SM
76092018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7610
7611 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7612 (do_restore_current_traceframe_cleanup): Remove.
7613 (restore_current_traceframe_cleanup_dtor): Remove.
7614 (make_cleanup_restore_current_traceframe): Remove.
7615 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7616 New.
7617 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7618 * infrun.c (fetch_inferior_event): Use
7619 scoped_restore_current_traceframe.
7620
b2bdb8cf
SM
76212018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7622
7623 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7624 Remove.
7625 <n_allocated_type_units>: Remove.
7626 <all_type_units>: Change to std::vector.
7627 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7628 to std::vector change.
7629 (dwarf2_per_objfile::get_cutu): Likewise.
7630 (dwarf2_per_objfile::get_tu): Likewise.
7631 (create_signatured_type_table_from_index): Likewise.
7632 (create_signatured_type_table_from_debug_names): Likewise.
7633 (dw2_symtab_iter_next): Likewise.
7634 (dw2_print_stats): Likewise.
7635 (dw2_expand_all_symtabs): Likewise.
7636 (dw2_expand_marked_cus): Likewise.
7637 (dw2_debug_names_iterator::next): Likewise.
7638 (dwarf2_initialize_objfile): Likewise.
7639 (add_signatured_type_cu_to_table): Likewise.
7640 (create_all_type_units): Likewise.
7641 (add_type_unit): Likewise.
7642 (struct tu_abbrev_offset): Add constructor.
7643 (build_type_psymtabs_1): Adjust to std::vector change.
7644 (print_tu_stats): Likewise.
7645 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7646 (write_debug_names): Likewise.
7647
b76e467d
SM
76482018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7649
7650 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7651 Make an std::vector.
7652 <n_comp_units>: Remove.
7653 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7654 to std::vector change.
7655 (dwarf2_per_objfile::get_cutu): Likewise.
7656 (dwarf2_per_objfile::get_cu): Likewise.
7657 (create_cus_from_index): Likewise.
7658 (create_addrmap_from_index): Likewise.
7659 (create_addrmap_from_aranges): Likewise.
7660 (dwarf2_read_index): Likewise.
7661 (dw2_find_last_source_symtab): Likewise.
7662 (dw2_map_symtabs_matching_filename): Likewise.
7663 (dw2_symtab_iter_next): Likewise.
7664 (dw2_print_stats): Likewise.
7665 (dw2_expand_all_symtabs): Likewise.
7666 (dw2_expand_symtabs_with_fullname): Likewise.
7667 (dw2_expand_marked_cus): Likewise.
7668 (dw2_map_symbol_filenames): Likewise.
7669 (create_cus_from_debug_names): Likewise.
7670 (dwarf2_read_debug_names): Likewise.
7671 (dw2_debug_names_iterator::next): Likewise.
7672 (dwarf2_initialize_objfile): Likewise.
7673 (set_partial_user): Likewise.
7674 (dwarf2_build_psymtabs_hard): Likewise.
7675 (read_comp_units_from_section): Remove arguments, adjust to
7676 std::vector change.
7677 (create_all_comp_units): Adjust to std::vector and
7678 read_comp_units_from_section changes.
7679 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7680 change.
7681 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7682 (psyms_seen_size): Likewise.
7683 (write_gdbindex): Likewise.
7684 (write_debug_names): Likewise.
7685
12359b5e
SM
76862018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7687
7688 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7689 with dwarf2_per_objfile.
7690 (create_cus_from_index): Likewise.
7691 (create_signatured_type_table_from_index): Likewise.
7692 (dwarf2_read_index): Likewise.
7693 (dwarf2_initialize_objfile): Likewise.
7694 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7695 per_cu rather than get_dwarf2_per_objfile.
7696
ff4c9fec
SM
76972018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7698
7699 * dwarf2read.h (struct signatured_type): Forward declare.
7700 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7701 New methods.
7702 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7703 (dw2_get_cutu): ...this.
7704 (dwarf2_per_objfile::get_cu): Rename from...
7705 (dw2_get_cu): ...this.
7706 (dwarf2_per_objfile::get_tu): New.
7707 (create_addrmap_from_index): Adjust.
7708 (create_addrmap_from_aranges): Adjust.
7709 (dw2_find_last_source_symtab): Adjust.
7710 (dw2_map_symtabs_matching_filename): Adjust.
7711 (dw2_symtab_iter_next): Adjust.
7712 (dw2_print_stats): Adjust.
7713 (dw2_expand_all_symtabs): Adjust.
7714 (dw2_expand_symtabs_with_fullname): Adjust.
7715 (dw2_expand_marked_cus): Adjust.
7716 (dw_expand_symtabs_matching_file_matcher): Adjust.
7717 (dw2_map_symbol_filenames): Adjust.
7718 (dw2_debug_names_iterator::next): Adjust.
7719 (dwarf2_initialize_objfile): Adjust.
7720 (set_partial_user): Adjust.
7721 (dwarf2_build_psymtabs_hard): Adjust.
7722
5ca3fcb6
SM
77232018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7724
7725 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7726 Remove unused variables.
7727 (dw2_map_symtabs_matching_filename): Likewise.
7728 (dwarf2_record_block_ranges): Likewise.
7729 (dwarf2_read_addr_index): Likewise.
7730 (follow_die_offset): Likewise.
7731
b2e586e8
SM
77322018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7733
7734 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7735 to symbol_file_add_main.
7736
7c4e78cf
SM
77372018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7738
7739 PR mi/22299
7740 * mi/mi-console.c (do_fputc_async_safe): New.
7741 (mi_console_file::write_async_safe): New.
7742 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7743 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7744 New.
7745 * ui-file.c (ui_file::putstrn): Adjust call to
7746 fputstrn_unfiltered.
7747 * utils.c (printchar): Replace do_fputs and do_fprintf
7748 parameters by do_fputc.
7749 (fputstr_filtered): Adjust call to printchar.
7750 (fputstr_unfiltered): Likewise.
7751 (fputstrn_filtered): Likewise.
7752 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7753 printchar.
7754 * utils.h (do_fputc_ftype): New typedef.
7755 (fputstrn_unfiltered): Add do_fputc parameter.
7756
5dc026d3
SM
77572018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7758
7759 * regformats/i386/i386-avx.dat: Remove.
7760
c912f608
SM
77612018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7762
7763 PR gdb/22979
7764 * amd64-tdep.c (amd64_none_init_abi): New function.
7765 (amd64_x32_none_init_abi): New function.
7766 (_initialize_amd64_tdep): Register handlers for x86-64 and
7767 x64_32 with GDB_OSABI_NONE.
7768 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7769 GDB_OSABI_NONE osabi.
7770
26540402
SM
77712018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7772
7773 PR gdb/22980
7774 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7775 GDB_OSABI_NONE.
7776 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7777 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7778
9018be22
SM
77792018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7780
7781 * common/byte-vector.h (char_vector): New type.
7782 * target.h (target_read_alloc): Return
7783 gdb::optional<byte_vector>.
7784 (target_read_stralloc): Return gdb::optional<char_vector>.
7785 (target_get_osdata): Return gdb::optional<char_vector>.
7786 * target.c (target_read_alloc_1): Templatize. Replacement
7787 manual memory management with vector.
7788 (target_read_alloc): Change return type, adjust.
7789 (target_read_stralloc): Change return type, adjust.
7790 (target_get_osdata): Change return type, adjust.
7791 * auxv.c (struct auxv_info) <length>: Remove.
7792 <data>: Change type to gdb::optional<byte_vector>.
7793 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7794 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7795 (target_auxv_search): Adjust.
7796 (fprint_target_auxv): Adjust.
7797 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7798 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7799 (linux_make_corefile_notes): Adjust.
7800 * osdata.c (get_osdata): Adjust.
7801 * remote.c (remote_get_threads_with_qxfer): Adjust.
7802 (remote_memory_map): Adjust.
7803 (remote_traceframe_info): Adjust.
7804 (btrace_read_config): Adjust.
7805 (remote_read_btrace): Adjust.
7806 (remote_pid_to_exec_file): Adjust.
7807 * solib-aix.c (solib_aix_get_library_list): Adjust.
7808 * solib-dsbt.c (decode_loadmap): Don't free buf.
7809 (dsbt_get_initial_loadmaps): Adjust.
7810 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7811 * solib-target.c (solib_target_current_sos): Adjust.
7812 * tracepoint.c (sdata_make_value): Adjust.
7813 * xml-support.c (xinclude_start_include): Adjust.
7814 (xml_fetch_content_from_file): Adjust.
7815 * xml-support.h (xml_fetch_another): Change return type.
7816 (xml_fetch_content_from_file): Change return type.
7817 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7818 * xml-tdesc.c (file_read_description_xml): Adjust.
7819 (fetch_available_features_from_target): Change return type.
7820 (target_fetch_description_xml): Adjust.
7821 (target_read_description_xml): Adjust.
7822
14c88955
TT
78232018-04-06 Tom Tromey <tom@tromey.com>
7824
7825 * value.c (~value): Update.
7826 (struct value) <contents>: Now unique_xmalloc_ptr.
7827 (value_contents_bits_eq, allocate_value_contents)
7828 (value_contents_raw, value_contents_all_raw)
7829 (value_contents_for_printing, value_contents_for_printing_const)
7830 (set_value_enclosing_type): Update.
7831
0c7e6dd8
TT
78322018-04-06 Tom Tromey <tom@tromey.com>
7833
7834 * value.c (range_s): Remove typedef, VEC.
7835 (struct range): Add operator<.
7836 (range_lessthan): Remove.
7837 (ranges_contain): Change type.
7838 (~value): Update.
7839 (struct value) <unavailable, optimized_out>: Now std::vector.
7840 (value_entirely_available)
7841 (value_entirely_covered_by_range_vector)
7842 (value_entirely_unavailable, value_entirely_optimized_out):
7843 Update.
7844 (insert_into_bit_range_vector): Change argument type.
7845 (find_first_range_overlap): Likewise.
7846 (struct ranges_and_idx, value_contents_bits_eq)
7847 (require_not_optimized_out, require_available): Update.
7848 (ranges_copy_adjusted): Change argument types.
7849 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7850
2c8331b9
TT
78512018-04-06 Tom Tromey <tom@tromey.com>
7852
7853 * value.c (~value): Update.
7854 (struct value) <parent>: Now a value_ref_ptr.
7855 (value_parent, set_value_parent, value_address, value_copy):
7856 Update.
7857
466ce3ae
TT
78582018-04-06 Tom Tromey <tom@tromey.com>
7859
7860 * value.c (struct value): Add constructor, destructor, and member
7861 initializers.
7862 (allocate_value_lazy, value_decref): Update.
7863
062d818d
TT
78642018-04-06 Tom Tromey <tom@tromey.com>
7865
7866 * value.c (struct value) <released, next>: Remove.
7867 (all_values): Now a std::vector.
7868 (allocate_value_lazy): Update.
7869 (value_next): Remove.
7870 (value_mark, value_free_to_mark, release_value)
7871 (value_release_to_mark): Update.
7872
a6535de1
TT
78732018-04-06 Tom Tromey <tom@tromey.com>
7874
7875 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7876 (free_value_chain): Remove.
7877 * value.c (free_value_chain): Remove.
7878 (value_release_to_mark): Return a std::vector.
7879 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7880 std::vector.
7881 (check_condition): Update.
7882 * eval.c (fetch_subexp_value): Change "val_chain" to a
7883 std::vector.
7884 * breakpoint.c (update_watchpoint): Update.
7885 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7886
b5621201
TT
78872018-04-06 Tom Tromey <tom@tromey.com>
7888
7889 * value.h (free_all_values): Remove.
7890 * value.c (free_all_values): Remove.
7891
4d0266a0
TT
78922018-04-06 Tom Tromey <tom@tromey.com>
7893
7894 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7895 (value_history_chain, value_history_count): Remove.
7896 (value_history): New global.
7897 (record_latest_value, access_value_history, show_values)
7898 (preserve_values): Update.
7899
b4d61099
TT
79002018-04-06 Tom Tromey <tom@tromey.com>
7901
7902 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7903 * varobj.c (varobj_set_display_format, varobj_set_value)
7904 (install_default_visualizer, construct_visualizer)
7905 (install_new_value, ~varobj, varobj_get_value_type)
7906 (my_value_of_variable, varobj_editable_p): Update.
7907 * c-varobj.c (c_describe_child, c_value_of_variable)
7908 (cplus_number_of_children, cplus_describe_child): Update.
7909 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7910 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7911 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7912
9b558729
TT
79132018-04-06 Tom Tromey <tom@tromey.com>
7914
7915 * printcmd.c (last_examine_address): Change type to
7916 value_ref_ptr.
7917 (do_examine, x_command): Update.
7918
850645cf
TT
79192018-04-06 Tom Tromey <tom@tromey.com>
7920
7921 * value.c (release_value): Update.
7922 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7923 (struct bpstats) <val>: Now a value_ref_ptr.
7924 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7925 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7926 (~watchpoint, print_it_watchpoint, watch_command_1)
7927 (invalidate_bp_value_on_memory_change): Update.
7928
22bc8444
TT
79292018-04-06 Tom Tromey <tom@tromey.com>
7930
7931 * varobj.c (varobj_clear_saved_item)
7932 (update_dynamic_varobj_children, install_new_value, ~varobj):
7933 Update.
7934 * value.h (value_incref): Move declaration earlier.
7935 (value_decref): Rename from value_free.
7936 (struct value_ref_policy): New.
7937 (value_ref_ptr): New typedef.
7938 (struct value_deleter): Remove.
7939 (gdb_value_up): Remove typedef.
7940 (release_value): Change return type.
7941 (release_value_or_incref): Remove.
7942 * value.c (set_value_parent): Update.
7943 (value_incref): Change return type.
7944 (value_decref): Rename from value_free.
7945 (value_free_to_mark, free_all_values, free_value_chain): Update.
7946 (release_value): Return value_ref_ptr.
7947 (release_value_or_incref): Remove.
7948 (record_latest_value, set_internalvar, clear_internalvar):
7949 Update.
7950 * stack.c (info_frame_command): Don't call value_free.
7951 * python/py-value.c (valpy_dealloc, valpy_new)
7952 (value_to_value_object): Update.
7953 * printcmd.c (do_examine): Update.
7954 * opencl-lang.c (lval_func_free_closure): Update.
7955 * mi/mi-main.c (register_changed_p): Don't call value_free.
7956 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7957 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7958 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7959 value_free.
7960 * guile/scm-value.c (vlscm_free_value_smob)
7961 (vlscm_scm_from_value): Update.
7962 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7963 (frame_unwind_register_unsigned, get_frame_register_bytes)
7964 (put_frame_register_bytes): Don't call value_free.
7965 * findvar.c (address_from_register): Don't call value_free.
7966 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7967 * dwarf2loc.c (entry_data_value_free_closure)
7968 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7969 (dwarf2_evaluate_loc_desc_full): Update.
7970 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7971 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7972 (~watchpoint, watch_command_1)
7973 (invalidate_bp_value_on_memory_change): Update.
7974 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7975
7f8a5d38
SM
79762018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7977
7978 PR gdb/23022
7979 * warning.m4: Add -Wno-error=deprecated-register.
7980 * configure: Re-generate.
7981
8a76bd3b
TT
79822018-04-05 Tom Tromey <tom@tromey.com>
7983
7984 * linespec.h: Remove include of "vec.h".
7985
8e8d776e
TT
79862018-04-05 Tom Tromey <tom@tromey.com>
7987
7988 * linespec.c (typep): Remove typedef.
7989 (find_methods, find_superclass_methods): Take a std::vector.
7990 (find_method): Use std::vector.
7991
9b2f8581
TT
79922018-04-05 Tom Tromey <tom@tromey.com>
7993
7994 * utils.c (compare_strings): Remove.
7995 * utils.h (compare_strings): Remove.
7996 * objc-lang.h (find_imps): Update.
7997 * objc-lang.c (find_methods): Take a std::vector.
7998 (uniquify_strings, find_imps): Likewise.
7999 * linespec.c (find_methods): Take a std::vector.
8000 (decode_objc): Use std::vector.
8001 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8002 a std::vector.
8003 (find_method, find_function_symbols): Use std::vector.
8004
459a2e4c
TT
80052018-04-05 Tom Tromey <tom@tromey.com>
8006
8007 * completer.c (completion_tracker::completion_tracker): Remove
8008 cast.
8009 (completion_tracker::discard_completions): Likewise.
8010 * breakpoint.c (ambiguous_names_p): Remove cast.
8011 * ada-lang.c (_initialize_ada_language): Remove cast.
8012 * utils.h (streq): Update.
8013 (streq_hash): Add new declaration.
8014 * utils.c (streq): Return bool.
8015 (streq_hash): New function.
8016
9be2c17a
TT
80172018-04-05 Tom Tromey <tom@tromey.com>
8018
8019 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8020 Remove a string copy.
8021
f73c6ece
TT
80222018-04-05 Tom Tromey <tom@tromey.com>
8023
8024 * linespec.c (filter_results): Use std::vector.
8025 (decode_line_2, decode_line_full): Update.
8026
53a0f8a2
TT
80272018-04-05 Tom Tromey <tom@tromey.com>
8028
8029 * linespec.c (canonical_to_fullform): Return std::string.
8030 (filter_results): Update.
8031 (struct decode_line_2_item): Add constructor.
8032 <fullform, displayform>: Now std::string.
8033 (decode_line_2_compare_items): Now a std::sort comparator.
8034 (decode_line_2): Update.
8035
a5b5adf5
TT
80362018-04-05 Tom Tromey <tom@tromey.com>
8037
8038 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8039 (unexpected_linespec_error): Update.
8040 (linespec_parse_basic, parse_linespec): Update.
8041
6a307fc5
TT
80422018-04-05 Tom Tromey <tom@tromey.com>
8043
8044 * linespec.c (linespec_parse_basic): Reindent.
8045
41c1efc6
TT
80462018-04-05 Tom Tromey <tom@tromey.com>
8047
8048 * minsyms.h (iterate_over_minimal_symbols): Update.
8049 * minsyms.c (iterate_over_minimal_symbols): Take a
8050 gdb::function_view.
8051 * linespec.c (struct collect_minsyms): Remove.
8052 (compare_msyms): Now a std::sort comparator.
8053 (add_minsym): Add parameters.
8054 (search_minsyms_for_name): Update. Use std::vector.
8055
c5edbf3d
TT
80562018-04-03 Tom Tromey <tom@tromey.com>
8057
8058 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8059 gdb::byte_vector.
8060
b39efc48
WP
80612018-04-02 Weimin Pan <weimin.pan@oracle.com>
8062
8063 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8064
121ad66c 80652018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
8066
8067 PR gdb/16959
8068 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8069 printing static type.
8070
09473be8
TT
80712018-04-01 Tom Tromey <tom@tromey.com>
8072
8073 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8074 (rs6000_xfer_shared_libraries): Update.
8075
ec1f2d91
SM
80762018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8077
8078 * common/gdb_vecs.h (char_ptr): Remove.
8079 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8080
d8611974
SM
80812018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8082
8083 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8084 with std::vector.
8085 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8086
a18ba4e4
SM
80872018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8088
8089 * tracepoint.h (struct uploaded_tp): Initialize fields.
8090 <actions, step_actions, cmd_strings>: Change type to
8091 std::vector<char *>.
8092 * tracepoint.c (get_uploaded_tp): Allocate with new.
8093 (free_uploaded_tps): Free with delete.
8094 (parse_tracepoint_definition): Adjust to std::vector change.
8095 * breakpoint.c (read_uploaded_action): Likewise.
8096 (create_tracepoint_from_upload): Likewise.
8097 * ctf.c (ctf_write_uploaded_tp): Likewise.
8098 (SET_ARRAY_FIELD): Likewise.
8099 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8100
a7961323
TT
81012018-03-30 Tom Tromey <tom@tromey.com>
8102
8103 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8104 std::unique_ptr.
8105 (svr4_keep_data_in_core): Update.
8106 (svr4_read_so_list): Update.
8107
e83e4e24
TT
81082018-03-30 Tom Tromey <tom@tromey.com>
8109
8110 * windows-nat.c (handle_output_debug_string, handle_exception):
8111 Update.
8112 * target.h (target_read_string): Update.
8113 * target.c (target_read_string): Change "string" to
8114 unique_xmalloc_ptr.
8115 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8116 Update.
8117 * solib-frv.c (frv_current_sos): Update.
8118 * solib-dsbt.c (dsbt_current_sos): Update.
8119 * solib-darwin.c (darwin_current_sos): Update.
8120 * linux-thread-db.c (inferior_has_bug): Update.
8121 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8122 Update. Remove alloca.
8123 * ada-lang.c (ada_main_name): Update.
8124
263db9a1
TT
81252018-03-30 Tom Tromey <tom@tromey.com>
8126
8127 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8128 (struct dwo_file_deleter): New.
8129 (dwo_file_up): New typedef.
8130 (open_and_init_dwo_file): Use dwo_file_up.
8131 (free_dwo_file_cleanup): Remove.
8132
5dafb3d1
TT
81332018-03-30 Tom Tromey <tom@tromey.com>
8134
8135 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8136 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8137
11ed8cad
TT
81382018-03-30 Tom Tromey <tom@tromey.com>
8139
8140 * dwarf2read.c (class free_cached_comp_units): New class.
8141 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8142 (free_cached_comp_units): Remove function.
8143
9ae79dac
TT
81442018-03-30 Tom Tromey <tom@tromey.com>
8145
8146 * utils.h (make_cleanup_unpush_target): Remove.
8147 * inf-ptrace.c (struct target_unpusher): New.
8148 (target_unpush_up) New typedef.
8149 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8150 target_unpush_up.
8151 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8152
5aa89276
TT
81532018-03-27 Tom Tromey <tom@tromey.com>
8154
8155 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8156
1dbeed45
TT
81572018-03-27 Pedro Alves <palves@redhat.com>
8158 Tom Tromey <tom@tromey.com>
8159
8160 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8161 destructor. Now a class.
8162 (gdb_readline_wrapper_cleanup): Remove function.
8163 (gdb_readline_wrapper): Remove cleanups.
8164
c819b2c0
TT
81652018-03-27 Tom Tromey <tom@tromey.com>
8166
8167 * typeprint.h (struct type_print_options) <local_typedefs,
8168 global_typedefs>: Remove "struct" keyword.
8169 (class typedef_hash_table): New class.
8170 (recursively_update_typedef_hash, add_template_parameters)
8171 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8172 (find_typedef_in_hash): Don't declare.
8173 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8174 (typedef_hash_table::recursively_update): Rename from
8175 recursively_update_typedef_hash. Now a member.
8176 (typedef_hash_table::add_template_parameters): Rename from
8177 add_template_parameters. Now a member.
8178 (typedef_hash_table::typedef_hash_table): Now a constructor;
8179 rename from create_typedef_hash.
8180 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8181 rename from free_typedef_hash.
8182 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8183 (do_free_global_table): Remove.
8184 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8185 from copy_type_recursive.
8186 (create_global_typedef_table): Remove.
8187 (typedef_hash_table::find_global_typedef): Now a member of
8188 typedef_hash_table.
8189 (typedef_hash_table::find_typedef): Rename from
8190 find_typedef_in_hash; now a member.
8191 (whatis_exp): Update.
8192 * extension.h (struct ext_lang_type_printers): Add constructor and
8193 destructor.
8194 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8195 declare.
8196 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8197 Now a constructor; rename from start_ext_lang_type_printers.
8198 (ext_lang_type_printers): Now a destructor; rename from
8199 free_ext_lang_type_printers.
8200 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8201 Update.
8202 (c_type_print_base_struct_union): Update. Remove cleanups.
8203
608219fb
TT
82042018-03-27 Tom Tromey <tom@tromey.com>
8205
8206 * dwarf-index-write.c: Include <cmath>.
8207
3fcded8f
JB
82082018-03-27 Joel Brobecker <brobecker@adacore.com>
8209
8210 * NEWS: Add entry describing new "set|show varsize-limit" command.
8211 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8212 command.
8213 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8214 "set variable".
8215
cd4fb1b2
SM
82162018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8217
8218 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8219 dwarf-index-write.c
8220 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8221 * dwarf-index-common.c: New file.
8222 * dwarf-index-common.h: New file.
8223 * dwarf-index-write.c: New file.
8224 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8225 (struct dwarf2_section_info): Move from here.
8226 (dwarf2_section_info_def): Likewise.
8227 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8228 (offset_type): Likewise.
8229 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8230 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8231 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8232 (byte_swap): Likewise.
8233 (MAYBE_SWAP): Likewise.
8234 (dwarf2_per_cu_ptr): Likewise.
8235 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8236 (struct tu_stats): Likewise.
8237 (struct dwarf2_per_objfile): Likewise.
8238 (struct dwarf2_per_cu_data): Likewise.
8239 (struct signatured_type): Likewise.
8240 (sig_type_ptr): Likewise.
8241 (DEF_VEC_P (sig_type_ptr)): Likewise.
8242 (INDEX4_SUFFIX): Likewise.
8243 (INDEX5_SUFFIX): Likewise.
8244 (DEBUG_STR_SUFFIX): Likewise.
8245 (dwarf2_read_section): Make non-static.
8246 (mapped_index_string_hash): Move from here.
8247 (dwarf5_djb_hash): Likewise.
8248 (file_write): Likewise.
8249 (class data_buf): Likewise.
8250 (struct symtab_index_entry): Likewise.
8251 (struct mapped_symtab): Likewise.
8252 (find_slot): Likewise.
8253 (hash_expand): Likewise.
8254 (add_index_entry): Likewise.
8255 (uniquify_cu_indices): Likewise.
8256 (class c_str_view): Likewise.
8257 (class c_str_view_hasher): Likewise.
8258 (class vector_hasher): Likewise.
8259 (write_hash_table): Likewise.
8260 (psym_index_map): Likewise.
8261 (struct addrmap_index_data): Likewise.
8262 (add_address_entry): Likewise.
8263 (add_address_entry_worker): Likewise.
8264 (write_address_map): Likewise.
8265 (symbol_kind): Likewise.
8266 (write_psymbols): Likewise.
8267 (struct signatured_type_index_data): Likewise.
8268 (write_one_signatured_type): Likewise.
8269 (recursively_count_psymbols): Likewise.
8270 (recursively_write_psymbols): Likewise.
8271 (class debug_names): Likewise.
8272 (check_dwarf64_offsets): Likewise.
8273 (psyms_seen_size): Likewise.
8274 (write_gdbindex): Likewise.
8275 (write_debug_names): Likewise.
8276 (assert_file_size): Likewise.
8277 (write_psymtabs_to_index): Likewise.
8278 (save_gdb_index_command): Likewise.
8279 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8280 command.
8281 * dwarf2read.h: New file.
8282
59cc4834
JB
82832018-03-27 Joel Brobecker <brobecker@adacore.com>
8284
8285 PR gdb/22670
8286 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8287 symbol name if the CU's language stores symbol names in linkage
8288 format.
8289 * language.h (struct language_defn)
8290 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8291 all instances of this struct.
8292
67501539
TT
82932018-03-26 Tom Tromey <tom@tromey.com>
8294
8295 * stack.c (backtrace_command_1): Remove verbose code.
8296
76c939ac
TT
82972018-03-26 Tom Tromey <tom@tromey.com>
8298
8299 * python/py-framefilter.c (py_print_type): Don't catch
8300 exceptions. Return void.
8301 (py_print_value): Likewise.
8302 (py_print_single_arg): Likewise.
8303 (enumerate_args): Don't catch exceptions.
8304 (py_print_args): Likewise.
8305 (py_print_frame): Likewise.
8306 (gdbpy_apply_frame_filter): Catch exceptions here.
8307
9507b29c
TT
83082018-03-26 Tom Tromey <tom@tromey.com>
8309
8310 * stack.c (_initialize_stack): Remove trailing newlines from help
8311 text. Add "Usage" line to "backtrace" help.
8312
eb68e487
TT
83132018-03-26 Tom Tromey <tom@tromey.com>
8314
8315 PR python/16486:
8316 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8317
1f111921
TT
83182018-03-26 Tom Tromey <tom@tromey.com>
8319
8320 * python/py-framefilter.c (py_print_single_arg): Return
8321 EXT_LANG_BT_ERROR from catch.
8322
fb7eb8b5
TT
83232018-03-26 Tom Tromey <tom@tromey.com>
8324
8325 PR backtrace/15584:
8326 * stack.c (backtrace_command_1): Move some code into no-filters
8327 "if".
8328
4ca59a9f
TT
83292018-03-26 Tom Tromey <tom@tromey.com>
8330
8331 * python/py-framefilter.c (throw_quit_or_print_exception): New
8332 function.
8333 (gdbpy_apply_frame_filter): Use it.
8334
92256134
TT
83352018-03-26 Tom Tromey <tom@tromey.com>
8336
8337 PR cli/17716:
8338 * python/py-framefilter.c (py_print_type, py_print_value)
8339 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8340 RETURN_MASK_ERROR.
8341
7a630bc2
TT
83422018-03-26 Tom Tromey <tom@tromey.com>
8343
8344 * python/py-framefilter.c (enumerate_args): Use
8345 gdb::unique_xmalloc_ptr.
8346
63283d4a
TT
83472018-03-26 Tom Tromey <tom@tromey.com>
8348
8349 * python/py-framefilter.c (py_print_frame): Return
8350 EXT_LANG_BT_OK.
8351 (gdbpy_apply_frame_filter): Update comment.
8352 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8353 Remove.
8354 <EXT_LANG_BT_NO_FILTERS>: Change value.
8355
978d6c75
TT
83562018-03-26 Tom Tromey <tom@tromey.com>
8357
8358 PR backtrace/15582:
8359 * stack.c (backtrace_command): Parse "hide" argument.
8360 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8361 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8362 constant.
8363
1cf7e640
TT
83642018-03-26 Tom Tromey <tom@tromey.com>
8365
8366 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8367 add "flags".
8368 (backtrace_command): Remove "fulltrace", add "flags".
8369
ea3b0687
TT
83702018-03-26 Tom Tromey <tom@tromey.com>
8371
8372 * stack.c (backtrace_command): Rewrite command line parsing.
8373
9f034d75
SM
83742018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8375
8376 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8377
ce1459e5
SM
83782018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8379
8380 * filename-seen-cache.h: Add include guard.
8381
4f7ae6f5
KS
83822018-03-26 Keith Seitz <keiths@redhat.com>
8383
8384 * symfile.c (place_section): Remove "struct" from section_addr_info
8385 in comment.
8386 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8387 "struct" keyword from section_addr_info.
8388
5cd3e386
AH
83892018-03-26 Alan Hayward <alan.hayward@arm.com>
8390
8391 * regformats/regdef.h (reg): Add constructors.
8392
3e5ef9a4
PA
83932018-03-25 Pedro Alves <palves@redhat.com>
8394
8395 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8396 if then/else bodies in var_func_name extraction.
8397
c88d2fcc 83982018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8399
8400 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8401 lookup_minimal_symbol() to find symbol entry.
8402 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8403
b7fee5a3
KS
84042018-03-23 Keith Seitz <keiths@redhat.com>
8405
8406 PR c++/22968
8407 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8408 nested type definitions for C++, too.
8409
2cc9b304
TT
84102018-03-23 Tom Tromey <tom@tromey.com>
8411
8412 * machoread.c (struct oso_el): Add a constructor. Don't define as
8413 a typedef.
8414 (macho_register_oso): Remove.
8415 (macho_symtab_read): Take a std::vector.
8416 (oso_el_compare_name): Now a std::sort comparator.
8417 (macho_symfile_read_all_oso): Take a std::vector.
8418 (macho_symfile_read): Use std::vector. Remove cleanups.
8419
a2b2bc12
TT
84202018-03-22 Tom Tromey <tom@tromey.com>
8421
8422 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8423 (record_full_goto_bookmark): Use std::string.
8424
7a8f494c
PFC
84252018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8426
8427 PR tdep/18295
8428 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8429 a single mask.
8430
dd6d677f
PFC
84312018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8432
8433 * rs6000-tdep.c (store_insn_p): New function.
8434 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8435 and cr_reg to their unshifted values. Use store_insn_p to
8436 match LR saves using either R1 or fdata->alloca_reg. Use
8437 store_insn_p to match CR saves. Set alloca_reg_offset
8438 when alloca_reg and framep are set. Remove lr_reg shift
8439 when assigning to fdata->lr_register.
8440
26d6cec4
AA
84412018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8442
8443 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8444 command line args instead of emitting a warning.
8445
5d9310c4
SM
84462018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8447
8448 * tracepoint.h (struct static_tracepoint_marker): Initialize
8449 fields, define default constructor, move constructor and move
8450 assignment, disable the rest.
8451 <str_id, extra>: Make std::string.
8452 (release_static_tracepoint_marker): Remove.
8453 (free_current_marker): Remove.
8454 * tracepoint.c (free_current_marker): Remove.
8455 (parse_static_tracepoint_marker_definition): Adjust to
8456 std::string, use new hex2str overload.
8457 (release_static_tracepoint_marker): Remove.
8458 (print_one_static_tracepoint_marker): Get marker by reference
8459 and adjust to std::string.
8460 (info_static_tracepoint_markers_command): Adjust to std::vector
8461 changes
8462 * target.h (static_tracepoint_marker_p): Remove typedef.
8463 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8464 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8465 bool.
8466 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8467 * target-debug.h
8468 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8469 (target_debug_print_std_vector_static_tracepoint_marker): New.
8470 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8471 to...
8472 (target_debug_print_static_tracepoint_marker_p): ... this.
8473 * target-delegates.c: Re-generate.
8474 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8475 Make std::string.
8476 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8477 (decode_static_tracepoint_spec): Adjust to std::vector.
8478 (tracepoint_print_one_detail): Adjust to std::string.
8479 (strace_marker_decode_location): Adjust to std::string.
8480 (update_static_tracepoint): Adjust to std::string, remove call
8481 to release_static_tracepoint_marker.
8482 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8483 Adjust to std::vector.
8484 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8485 (remote_static_tracepoint_markers_by_strid): Adjust to
8486 std::vector.
8487 * common/rsp-low.h (hex2str): New overload with explicit count
8488 of bytes.
8489 * common/rsp-low.c (hex2str): New overload with explicit count
8490 of bytes.
8491 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8492 (_initialize_rsp_low_selftests): Add test_hex2str test.
8493 * unittests/tracepoint-selftests.c
8494 (test_parse_static_tracepoint_marker_definition): Adjust to
8495 std::string.
8496
62c222b6
SM
84972018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8498
8499 * tracepoint.c (parse_static_tracepoint_marker_definition):
8500 Consider case where the definition is followed by more
8501 definitions.
8502 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8503 tracepoint-selftests.c.
8504 * unittests/tracepoint-selftests.c: New.
8505
7eb2418f
PFC
85062018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8507
8508 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8509 Carvalho.
8510
7cbe16e9
SR
85112018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8512
3d6b3b82 8513 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8514
4ee89e90
SR
85152018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8516
3d6b3b82 8517 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8518
92630041
TT
85192018-03-19 Tom Tromey <tom@tromey.com>
8520
8521 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8522 "IDENT" production.
8523
76727919
TT
85242018-03-19 Pedro Alves <palves@redhat.com>
8525 Tom Tromey <tom@tromey.com>
8526
8527 * unittests/observable-selftests.c: New file.
8528 * common/observable.h: New file.
8529 * observable.h: New file.
8530 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8531 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8532 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8533 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8534 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8535 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8536 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8537 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8538 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8539 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8540 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8541 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8542 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8543 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8544 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8545 tui/tui-interp.c, valops.c: Update all users.
8546 * tui/tui-hooks.c (tui_bp_created_observer)
8547 (tui_bp_deleted_observer, tui_bp_modified_observer)
8548 (tui_inferior_exit_observer, tui_before_prompt_observer)
8549 (tui_normal_stop_observer, tui_register_changed_observer):
8550 Remove.
8551 (tui_observers_token): New global.
8552 (attach_or_detach, tui_attach_detach_observers): New functions.
8553 (tui_install_hooks, tui_remove_hooks): Use
8554 tui_attach_detach_observers.
8555 * record-btrace.c (record_btrace_thread_observer): Remove.
8556 (record_btrace_thread_observer_token): New global.
8557 * observer.sh: Remove.
8558 * observer.c: Rename to observable.c.
8559 * observable.c (namespace gdb_observers): Define new objects.
8560 (observer_debug): Move into gdb_observers namespace.
8561 (struct observer, struct observer_list, xalloc_observer_list_node)
8562 (xfree_observer_list_node, generic_observer_attach)
8563 (generic_observer_detach, generic_observer_notify): Remove.
8564 (_initialize_observer): Update.
8565 Don't include observer.inc.
8566 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8567 (clean mostlyclean): Likewise.
8568 (observer.h, observer.inc): Remove targets.
8569 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8570 (COMMON_SFILES): Use observable.c, not observer.c.
8571 * .gitignore: Remove observer.h.
8572
1cb1f3da
TT
85732018-03-18 Tom Tromey <tom@tromey.com>
8574
8575 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8576 gdb::def_vector.
8577 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8578
a06ab151
TT
85792018-03-17 Tom Tromey <tom@tromey.com>
8580
8581 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8582
770623f7
TT
85832018-03-17 Tom Tromey <tom@tromey.com>
8584
8585 * target.c (class scoped_target_fd): New.
8586 (target_fileio_close_cleanup): Remove.
8587 (target_fileio_read_alloc_1): Use scoped_target_fd.
8588
39be3c7e
SM
85892018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8590
8591 * silent-rules.mk: New.
8592 * Makefile.in: Include silent-rules.mk
8593 (srcdir, VPATH, top_srcdir): Move up.
8594 (COMPILE): Add ECHO_CXX.
8595 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8596 (init.c): Add ECHO_INIT_C.
8597 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8598 (version.c): Add ECHO_GEN.
8599 (printcmd.o): Add ECHO_CXX.
8600 (target-float.o): Add ECHO_CXX.
8601 (ada-exp.o): Add ECHO_CXX.
8602 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8603 (insight$(EXEEXT)): Add ECHO_CXXLD.
8604 * gnulib/configure.ac: Add AM_SILENT_RULES.
8605 * gnulib/aclocal.m4: Re-generate.
8606 * gnulib/configure: Re-generate.
8607 * gnulib/import/Makefile.in: Re-generate.
8608
37e136b1
TT
86092018-03-16 Tom Tromey <tom@tromey.com>
8610
8611 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8612 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8613 * utils.c (do_free_section_addr_info)
8614 (make_cleanup_free_section_addr_info): Remove.
8615 * symfile.h (struct other_sections): Add constructor.
8616 (struct section_addr_info): Remove.
8617 (section_addr_info): New typedef.
8618 (struct sym_fns) <sym_offsets>: Change type of parameter.
8619 (build_section_addr_info_from_objfile)
8620 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8621 (default_symfile_offsets, symbol_file_add)
8622 (symbol_file_add_from_bfd)
8623 (build_section_addr_info_from_section_table): Update.
8624 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8625 * symfile.c (alloc_section_addr_info): Remove.
8626 (build_section_addr_info_from_section_table): Change return type.
8627 Update.
8628 (build_section_addr_info_from_bfd)
8629 (build_section_addr_info_from_objfile): Likewise.
8630 (free_section_addr_info): Remove.
8631 (relative_addr_info_to_section_offsets): Change type of "addrs".
8632 (addrs_section_compar): Now a std::sort comparator.
8633 (addrs_section_sort): Change return type.
8634 (addr_info_make_relative): Change type of "addrs". Update.
8635 (default_symfile_offsets, syms_from_objfile_1)
8636 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8637 (symbol_file_add_separate): Update.
8638 (symbol_file_add): Change type of "addrs". Update.
8639 (add_symbol_file_command): Update. Remove cleanups.
8640 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8641 cleanups.
8642 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8643 * solib.c (solib_read_symbols): Update.
8644 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8645 * machoread.c (macho_symfile_offsets): Update.
8646 * jit.c (jit_bfd_try_read_symtab): Update.
8647
03afa6ef
SM
86482018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8649
8650 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8651 unittests/utils-selftests.c.
8652 * unittests/utils-selftests.c: New file.
8653
3ae9ce5d
TT
86542018-03-14 Tom Tromey <tom@tromey.com>
8655
8656 PR cli/14977:
8657 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8658 for NULL.
8659
b8c2339b
TT
86602018-03-14 Tom Tromey <tom@tromey.com>
8661
8662 PR cli/19918:
8663 * printcmd.c (printf_pointer): Allow "-" in format.
8664
80ae639d
TT
86652018-03-14 Tom Tromey <tom@tromey.com>
8666
8667 * printcmd.c (_initialize_printcmd): Add usage to printf.
8668
0d671d99
YQ
86692018-03-14 Yao Qi <qiyao@sourceware.org>
8670
8671 * MAINTAINERS: Update my email address.
8672
b577b6af
TT
86732018-03-13 Tom Tromey <tom@tromey.com>
8674
8675 * machoread.c (macho_check_dsym): Change filenamep to a
8676 std::string*.
8677 (macho_symfile_read): Update.
8678 * symfile.c (load_command): Use std::string.
8679
89a3b63e
AB
86802018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8681
8682 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8683 to error message string.
8684 (riscv_register_name): Use xsnprintf instead of sprintf.
8685 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8686 internal_error.
8687 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8688 error.
8689 (riscv_push_dummy_call): Likewise.
8690
984c7238
TT
86912018-03-12 Tom Tromey <tom@tromey.com>
8692
8693 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8694 Use gdb::byte_vector.
8695 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8696
933522d1
YQ
86972018-03-12 Yao Qi <yao.qi@linaro.org>
8698
8699 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8700 parameter type to readable_regcache.
8701 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8702 the declaration.
8703
be2daae6
TT
87042018-03-11 Tom Tromey <tom@tromey.com>
8705
8706 * dwarf2read.c (struct nextfield): Add initializers.
8707 (struct nextfnfield): Remove.
8708 (struct fnfieldlist): Add initializers. Remove "length" and
8709 "head", use std::vector.
8710 (struct decl_field_list): Remove.
8711 (struct field_info): Add initializers.
8712 <fields, baseclasses>: Now std::vector.
8713 <nbaseclasses, nfnfields, typedef_field_list_count,
8714 nested_types_list_count>: Remove.
8715 (dwarf2_add_field, dwarf2_add_type_defn)
8716 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8717 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8718 (process_structure_scope): Update.
8719
484cf504
TT
87202018-03-11 Tom Tromey <tom@tromey.com>
8721
8722 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8723 for use by std::sort.
8724 (build_type_psymtabs_1): Use std::vector.
8725
9bd8e0b0
EZ
87262018-03-09 Eli Zaretskii <eliz@gnu.org>
8727
8728 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8729 and LIBMPFR in the printed configuration.
8730
5dc1a704
TT
87312018-03-08 Tom Tromey <tom@tromey.com>
8732
8733 * source.c (get_filename_and_charpos): Use scoped_fd.
8734 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8735 (procfs_pidlist): Likewise.
8736 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8737 (iterate_over_mappings): Likewise.
8738
fdf07f3a
TT
87392018-03-08 Tom Tromey <tom@tromey.com>
8740
8741 * infcall.c (struct call_return_meta_info)
8742 <stack_temporaries_enabled>: Remove.
8743 (get_call_return_value, call_function_by_hand_dummy): Update.
8744 * thread.c (disable_thread_stack_temporaries): Remove.
8745 (enable_thread_stack_temporaries): Remove.
8746 (thread_stack_temporaries_enabled_p): Return bool.
8747 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8748 (get_last_thread_stack_temporary): Update.
8749 * eval.c (evaluate_subexp): Update.
8750 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8751 class, not a function.
8752 (value_ptr, value_vec): Remove typedefs.
8753 (class thread_info) <stack_temporaries_enabled>: Now bool.
8754 <stack_temporaries>: Now a std::vector.
8755 (thread_stack_temporaries_enabled_p)
8756 (value_in_thread_stack_temporaries): Return bool.
8757
567a3e54
SM
87582018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8759
8760 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8761 (getpkt_or_notif_sane_1): Likewise.
8762
00b40057
SM
87632018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8764
8765 * build-id.c (build_id_to_debug_bfd): Use std::string.
8766
a8dbfd58
SM
87672018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8768
8769 * build-id.c (find_separate_debug_file_by_buildid): Return
8770 std::string.
8771 * build-id.h (find_separate_debug_file_by_buildid): Return
8772 std::string.
8773 * coffread.c (coff_symfile_read): Adjust to std::string.
8774 * elfread.c (elf_symfile_read): Adjust to std::string.
8775 * symfile.c (separate_debug_file_exists): Change parameter to
8776 std::string.
8777 (find_separate_debug_file): Return std::string.
8778 (find_separate_debug_file_by_debuglink): Return std::string.
8779 * symfile.h (find_separate_debug_file_by_debuglink): Return
8780 std::string.
8781
e6a58aa8
SM
87822018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8783
8784 * common/xml-utils.c (xml_escape_text): Move code to...
8785 (xml_escape_text_append): ... this new function.
8786 * common/xml-utils.h (xml_escape_text_append): New declaration.
8787 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8788 New function.
8789 (_initialize_xml_utils): register test_xml_escape_text_append as
8790 a selftest.
8791
4ef0bef6
AH
87922018-03-07 Alan Hayward <alan.hayward@arm.com>
8793
8794 * defs.h: Remove MAX_REGISTER_SIZE.
8795 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8796 asserts.
8797 * python/py-unwind.c (pyuw_sniffer): Likewise.
8798
e0d3522b
TT
87992018-03-07 Tom Tromey <tom@tromey.com>
8800
8801 * linux-tdep.c (linux_info_proc): Update.
8802 * target.h (struct target_ops) <to_fileio_readlink>: Return
8803 optional<string>.
8804 (target_fileio_readlink): Return optional<string>.
8805 * remote.c (remote_hostio_readlink): Return optional<string>.
8806 * inf-child.c (inf_child_fileio_readlink): Return
8807 optional<string>.
8808 * target.c (target_fileio_readlink): Return optional<string>.
8809
ea005f31
AB
88102018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8811
8812 * regcache.c (cooked_read_test): Add riscv to the list of
8813 architectures that have a save_reggroup.
8814
e95a97d4
AA
88152018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8816
8817 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8818 value is not a dynamic class object.
8819
d8344f3d
TT
88202018-03-06 Tom Tromey <tom@tromey.com>
8821
8822 * rust-exp.y: Formatting fixes.
8823
9add17f2
AB
88242018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8825
8826 * riscv-tdep.c (riscv_register_name): Remove target description
8827 support.
8828 (riscv_gdbarch_init): Remove target description check.
8829
c9486dfe
AB
88302018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8831
8832 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8833 comment.
8834 * riscv-tdep.h: Likewise.
8835
d74aff3d
AB
88362018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8837
8838 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8839 (riscv_pseudo_register_write): Delete.
8840 (riscv_gdbarch_init): Remove all use of pseudo registers.
8841
7ea78b59
SM
88422018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8843
8844 * record-btrace.c (btrace_print_lines): Replace cleanup
8845 parameter with RAII equivalents.
8846 (btrace_insn_history): Replace cleanup with RAII equivalents.
8847 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8848 make_cleanup_ui_out_tuple_begin_end): Remove.
8849 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8850 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8851 make_cleanup_ui_out_list_begin_end): Remove.
8852
53127008
SM
88532018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8854
8855 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8856 parameter types to std::vector. Use bool.
8857 (record_btrace_wait): Replace VEC(tp_t) with
8858 std::vector<thread_info *>.
8859 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8860
228f1508
SM
88612018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8862
8863 * record-btrace.c (record_btrace_disable_callback): Remove.
8864 (struct scoped_btrace_disable): New.
8865 (record_btrace_open): Use scoped_btrace_disable.
8866
b2970c23
AB
88672018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8868
8869 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8870 reading values from registers.
8871
fb294655
AB
88722018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8873
8874 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8875 where appropriate.
8876
cab5bb9d
AB
88772018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8878
8879 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8880 change parameter type. Use GDB's print functions, and use
8881 core_addr_to_string where appropriate.
8882 (riscv_push_dummy_call): Use core_addr_to_string where
8883 appropriate, update call to riscv_print_arg_location, and reindent
8884 a few lines.
8885 (riscv_return_value): Update call to riscv_print_arg_location.
8886
dbbb1059
AB
88872018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8888 Tim Newsome <tim@sifive.com>
8889 Albert Ou <a0u@eecs.berkeley.edu>
8890 Darius Rad <darius@bluespec.com>
8891
8892 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8893 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8894 (ALLDEPFILES): Add riscv-tdep.c
8895 * configure.tgt: Add riscv support.
8896 * riscv-tdep.c: New file.
8897 * riscv-tdep.h: New file.
8898 * NEWS: Mention new target.
8899 * MAINTAINERS: Add entry for riscv.
8900
5dc43913
AB
89012018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8902
8903 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8904 fields within aggregates.
8905
3dea1ef7
SM
89062018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8907
8908 * record-btrace.c (btrace_print_lines): Change type of flags to
8909 gdb_disassembly_flags.
8910
7efba073
JB
89112018-03-04 John Baldwin <jhb@FreeBSD.org>
8912
8913 * fbsd-nat.c: Include "inf-ptrace.h".
8914 (USE_SIGTRAP_SIGINFO): Conditionally define.
8915 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8916 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8917 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8918 function.
8919 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8920 Likewise.
8921 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8922 Likewise.
8923 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8924 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8925 "supports_stopped_by_hw_breakpoint" target methods.
8926
386a8676
JB
89272018-03-04 John Baldwin <jhb@FreeBSD.org>
8928
8929 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8930 * fbsd-nat.c (debug_fbsd_nat): New variable.
8931 (show_fbsd_nat_debug): New function.
8932 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8933 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8934
12279366
JB
89352018-03-04 John Baldwin <jhb@FreeBSD.org>
8936
8937 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8938 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8939 prototype.
8940 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8941 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8942 method.
8943
54693cf5
SM
89442018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8945
8946 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8947 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8948
ccb2231c
SM
89492018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8950
8951 * charset.c (struct charset_vector): New.
8952 (charsets): Change type to charset_vector.
8953 (find_charset_names): Adjust.
8954 (add_one): Adjust.
8955 (_initialize_charset): Adjust.
8956
6fb16ce6
SM
89572018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8958
8959 * progspace.h (struct program_space) <deleted_solibs>: Change
8960 type to std::vector<std::string>.
8961 * progspace.c (clear_program_space_solib_cache): Adjust.
8962 * breakpoint.c (print_solib_event): Adjust.
8963 (check_status_catch_solib): Adjust.
8964 * solib.c (update_solib_list): Adjust.
8965 * ui-out.h (class ui_out) <field_string>: New overload.
8966 * ui-out.c (ui_out::field_string): New overload.
8967
564b1e3f
SM
89682018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8969
8970 * progspace.h (struct program_space): Add constructor and
8971 destructor, initialize fields.
8972 (add_program_space): Remove.
8973 * progspace.c (add_program_space): Rename to...
8974 (program_space::program_space): ... this.
8975 (release_program_space): Rename to...
8976 (program_space::~program_space): ... this.
8977 (delete_program_space): Use delete to delete program_space.
8978 (initialize_progspace): Use new to allocate program_space.
8979 * inferior.c (add_inferior_with_spaces): Likewise.
8980 (clone_inferior_command): Likewise.
8981 * infrun.c (follow_fork_inferior): Likewise.
8982 (handle_vfork_child_exec_or_exit): Likewise.
8983
e80aaf61
SM
89842018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8985
8986 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8987 (delim_string_to_char_ptr_vec): Return std::vector of
8988 gdb::unique_xmalloc_ptr.
8989 (dirnames_to_char_ptr_vec_append): Take std::vector of
8990 gdb::unique_xmalloc_ptr.
8991 (dirnames_to_char_ptr_vec): Return std::vector of
8992 gdb::unique_xmalloc_ptr.
8993 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8994 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8995 (delim_string_to_char_ptr_vec): Return an std::vector of
8996 gdb::unique_xmalloc_ptr, adjust the code.
8997 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8998 gdb::unique_xmalloc_ptr, adjust the code.
8999 (dirnames_to_char_ptr_vec): Return an std::vector of
9000 gdb::unique_xmalloc_ptr, adjust the code.
9001 * auto-load.c (auto_load_safe_path_vec): Change type to
9002 std::vector of gdb::unique_xmalloc_ptr.
9003 (auto_load_expand_dir_vars): Return an std::vector of
9004 gdb::unique_xmalloc_ptr, adjust the code.
9005 (auto_load_safe_path_vec_update): Adjust.
9006 (filename_is_in_auto_load_safe_path_vec): Adjust.
9007 (auto_load_objfile_script_1): Adjust.
9008 * build-id.c (build_id_to_debug_bfd): Adjust.
9009 * linux-thread-db.c (thread_db_load_search): Adjust.
9010 * source.c (add_path): Adjust.
9011 (openp): Adjust.
9012 * symfile.c (find_separate_debug_file): Adjust.
9013 * utils.c (do_free_char_ptr_vec): Remove.
9014 (make_cleanup_free_char_ptr_vec): Remove.
9015
ab818ade
SDJ
90162018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9017
9018 PR gdb/22907
9019 * common/pathstuff.c: Conditionally include "<windows.h>".
9020
e1e6f073
GS
90212018-03-01 Georg Sauthoff <mail@georg.so>
9022
9023 PR gdb/22888
9024 * gcore.in: Quote variables and switch interpreter to bash.
9025
c7b15a66
TT
90262018-03-01 Tom Tromey <tom@tromey.com>
9027
9028 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9029 assertion. Add assertion for discriminant_index.
9030 (quirk_rust_enum): Use correct base type name in univariant case.
9031
0cb7c7b0
SM
90322018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9033
9034 * record.c (get_call_history_modifiers): Return a
9035 record_print_flags.
9036 (cmd_record_call_history): Adjust.
9037 * record-btrace.c (record_btrace_call_history): Adjust.
9038 (record_btrace_call_history_range): Adjust.
9039 (record_btrace_call_history_from): Adjust.
9040 * target-debug.h (target_debug_print_record_print_flags): New.
9041 * target-delegates.c: Re-generate.
9042 * target.c (target_call_history): Change flags type.
9043 (target_call_history_from): Likewise.
9044 (target_call_history_range): Likewise.
9045 * target.h (struct target_ops) <target_call_history>: Likewise.
9046 (target_call_history_from): Likewise.
9047 (target_call_history_range): Likewise.
9048
25e3c82c
SDJ
90492018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9050 Simon Marchi <simon.marchi@polymtl.ca>
9051
9052 * common/common-utils.c: Include "sys/stat.h".
9053 (is_regular_file): Move here from "source.c"; change return
9054 type to "bool".
9055 * common/common-utils.h (is_regular_file): New prototype.
9056 * common/pathstuff.c (contains_dir_separator): New function.
9057 * common/pathstuff.h (contains_dir_separator): New prototype.
9058 * source.c: Don't include "sys/stat.h".
9059 (is_regular_file): Move to "common/common-utils.c".
9060
b4987c95
SDJ
90612018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9062
9063 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9064 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9065 * auto-load.c: Include "common/pathstuff.h".
9066 * common/common-def.h (current_directory): Move here.
9067 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9068 function.
9069 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9070 prototype.
9071 * common/pathstuff.c: New file.
9072 * common/pathstuff.h: New file.
9073 * compile/compile.c: Include "common/pathstuff.h".
9074 * defs.h (current_directory): Move to "common/common-defs.h".
9075 * dwarf2read.c: Include "common/pathstuff.h".
9076 * exec.c: Likewise.
9077 * guile/scm-safe-call.c: Likewise.
9078 * linux-thread-db.c: Likewise.
9079 * main.c: Likewise.
9080 * nto-tdep.c: Likewise.
9081 * objfiles.c: Likewise.
9082 * source.c: Likewise.
9083 * symtab.c: Likewise.
9084 * utils.c: Include "common/pathstuff.h".
9085 (gdb_realpath): Move to "common/pathstuff.c".
9086 (gdb_realpath_keepfile): Likewise.
9087 (gdb_abspath): Likewise.
9088 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9089 (gdb_realpath_keepfile): Likewise.
9090 (gdb_abspath): Likewise.
9091
f169cfdc
JB
90922018-02-28 John Baldwin <jhb@FreeBSD.org>
9093
9094 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9095 wildcard process pid for super_resume for kernels with a
9096 specific bug.
9097
e05cac70
PM
90982018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9099
9100 * compile/compile.c (get_args): Add additional comments
9101 explaining function.
9102
55089490
TT
91032018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9104 Tom Tromey <tom@tromey.com>
9105
9106 * target.h (memory_write_request_s): Remove typedef. Don't define
9107 VEC.
9108 (target_write_memory_blocks): Change argument to std::vector.
9109 (struct memory_write_request): Add constructor.
9110 * target-memory.c (compare_block_starting_address): Return bool.
9111 Change argument types.
9112 (claim_memory): Change arguments to use std::vector.
9113 (split_regular_and_flash_blocks, blocks_to_erase)
9114 (compute_garbled_blocks): Likewise.
9115 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9116 (target_write_memory_blocks): Change argument to std::vector.
9117 * symfile.c (struct load_section_data): Add constructor and
9118 destructor. Use std::vector for "requests".
9119 (struct load_progress_data): Add initializers.
9120 (load_section_callback): Update. Use "new".
9121 (clear_memory_write_data): Remove.
9122 (generic_load): Update.
9123
0c305b61
AH
91242018-02-27 Alan Hayward <alan.hayward@arm.com>
9125
9126 * arch/aarch64.h: Use common/tdesc.h.
9127
c5196c92
MR
91282018-02-26 Maciej W. Rozycki <macro@mips.com>
9129
9130 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9131 architecture with a 64-bit ABI.
9132
37c33887
MR
91332018-02-26 Maciej W. Rozycki <macro@mips.com>
9134
9135 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9136 ahead of target description loading.
9137
d4dd3282
TT
91382018-02-26 Tom Tromey <tom@tromey.com>
9139
9140 * stack.c (backtrace_command_1): Update.
9141 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9142 of "flags".
9143 * python/py-framefilter.c (py_print_frame)
9144 (gdbpy_apply_frame_filter): Change type of "flags".
9145 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9146 of "flags".
9147 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9148 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9149 * extension.h (enum frame_filter_flag): Rename from
9150 frame_filter_flags.
9151 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9152 (apply_ext_lang_frame_filter): Change type of "flags".
9153 * extension.c (apply_ext_lang_frame_filter): Change type of
9154 "flags".
9155 * extension-priv.h (struct extension_language_ops)
9156 <apply_frame_filter>: Change type of "flags".
9157
6893c19a
TT
91582018-02-26 Tom Tromey <tom@tromey.com>
9159
9160 PR python/16497:
9161 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9162 off-by-one in py_end computation.
9163 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9164 PRINT_MORE_FRAMES.
9165 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9166 constant.
9167
2ddeaf8a
TT
91682018-02-26 Tom Tromey <tom@tromey.com>
9169
9170 * dwarf2read.c (struct variant_field): New.
9171 (struct nextfield) <variant>: New field.
9172 (dwarf2_add_field): Handle DW_TAG_variant_part.
9173 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9174 discriminated union.
9175 (read_structure_type): Handle DW_TAG_variant_part.
9176 (handle_struct_member_die): New function, extracted from
9177 process_structure_scope. Handle DW_TAG_variant.
9178 (process_structure_scope): Handle discriminated unions. Call
9179 handle_struct_member_die.
9180
c9317f21
TT
91812018-02-26 Tom Tromey <tom@tromey.com>
9182
9183 * rust-lang.h (rust_last_path_segment): Declare.
9184 * rust-lang.c (rust_last_path_segment): Now public. Change
9185 contract.
9186 (struct disr_info): Remove.
9187 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9188 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9189 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9190 (rust_enum_p, rust_enum_variant): New function.
9191 (rust_underscore_fields): Remove "offset" parameter.
9192 (rust_print_enum): New function.
9193 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9194 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9195 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9196 enums.
9197 (rust_internal_print_type): New function, from rust_print_type.
9198 Remove enum code.
9199 (rust_print_type): Call rust_internal_print_type.
9200 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9201 Update enum handling.
9202 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9203 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9204 (rust_union_quirks): New functions.
9205 (process_full_comp_unit, process_full_type_unit): Call
9206 rust_union_quirks.
9207 (process_structure_scope): Update rust_unions if necessary.
9208
7c22600a
TT
92092018-02-26 Tom Tromey <tom@tromey.com>
9210
9211 * value.h (value_union_variant): Declare.
9212 * valops.c (value_union_variant): New function.
9213 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9214 (struct discriminant_info): New.
9215 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9216 enumerator.
9217 (struct main_type) <flag_discriminated_union>: New field.
9218
15ce8941
TT
92192018-02-26 Tom Tromey <tom@tromey.com>
9220
9221 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9222 unittests/unpack-selftests.c.
9223 * unittests/unpack-selftests.c: New file.
9224 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9225
48fbe735
YQ
92262018-02-26 Yao Qi <yao.qi@linaro.org>
9227
9228 * dwarf2read.c (struct partial_die_info) <read>: New method.
9229 (read_partial_die): Remove the declaration.
9230 (load_partial_dies): Update.
9231 (partial_die_info::partial_die_info):
9232 (read_partial_die): Change it to partial_die_info::read.
9233
52356b79
YQ
92342018-02-26 Yao Qi <yao.qi@linaro.org>
9235
9236 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9237 (fixup_partial_die): Remove declaration.
9238 (scan_partial_symbols): Update.
9239 (partial_die_parent_scope): Likewise.
9240 (partial_die_full_name): Likewise.
9241 (fixup_partial_die): Change it to partial_die_info::fixup.
9242
35cc7ed7
YQ
92432018-02-26 Yao Qi <yao.qi@linaro.org>
9244
9245 * dwarf2read.c (read_partial_die): Update the declaration.
9246 (load_partial_dies): Caller update.
9247 (read_partial_die): Remove one argument abbrev_len.
9248
6f06d47b
YQ
92492018-02-26 Yao Qi <yao.qi@linaro.org>
9250
9251 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9252 assignment operator.
9253 (load_partial_dies): Use ctor and copy ctor.
9254 (read_partial_die): Update.
9255 (dwarf2_cu::find_partial_die): Use ctor.
9256
d590ff25
YQ
92572018-02-26 Yao Qi <yao.qi@linaro.org>
9258
9259 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9260 (find_partial_die_in_comp_unit): Change it to
9261 dwarf2_cu::find_partial_die.
9262 (find_partial_die): Update.
9263
fd0a254f
YQ
92642018-02-26 Yao Qi <yao.qi@linaro.org>
9265
9266 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9267 is NULL.
9268
cd9983dd
YQ
92692018-02-26 Yao Qi <yao.qi@linaro.org>
9270
9271 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9272
f46cd62a
AH
92732018-02-26 Alan Hayward <alan.hayward@arm.com>
9274
9275 * arch/amd64.h: Use common/tdesc.h.
9276 * arch/i386.c: Likewise.
9277 * arch/i386.h: Likewise.
9278 * arch/tic6x.c: Likewise.
9279 * arch/tdesc.h: Move file from here...
9280 * common/tdesc.h: ...to here.
9281 * features/aarch64-core.c: Regenerate.
9282 * features/aarch64-fpu.c: Regenerate.
9283 * features/i386/32bit-avx.c: Regenerate.
9284 * features/i386/32bit-avx512.c: Regenerate.
9285 * features/i386/32bit-core.c: Regenerate.
9286 * features/i386/32bit-linux.c: Regenerate.
9287 * features/i386/32bit-mpx.c: Regenerate.
9288 * features/i386/32bit-pkeys.c: Regenerate.
9289 * features/i386/32bit-sse.c: Regenerate.
9290 * features/i386/64bit-avx.c: Regenerate.
9291 * features/i386/64bit-avx512.c: Regenerate.
9292 * features/i386/64bit-core.c: Regenerate.
9293 * features/i386/64bit-linux.c: Regenerate.
9294 * features/i386/64bit-mpx.c: Regenerate.
9295 * features/i386/64bit-pkeys.c: Regenerate.
9296 * features/i386/64bit-segments.c: Regenerate.
9297 * features/i386/64bit-sse.c: Regenerate.
9298 * features/i386/x32-core.c: Regenerate.
9299 * features/tic6x-c6xp.c: Regenerate.
9300 * features/tic6x-core.c: Regenerate.
9301 * features/tic6x-gp.c: Regenerate.
9302 * target-descriptions.c: Use common/tdesc.h.
9303 * target-descriptions.h: Likewise.
9304
9b292f68
TT
93052018-02-24 Tom Tromey <tom@tromey.com>
9306
9307 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9308 (try_thread_db_load_from_dir, thread_db_load_search): Use
9309 std::string.
9310 (info_auto_load_libthread_db_compare): Return bool. Change
9311 argument types.
9312 (info_auto_load_libthread_db): Use std::vector, std::string.
9313 Remove cleanups.
9314
281d762b
TT
93152018-02-24 Tom Tromey <tom@tromey.com>
9316
9317 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9318 std::string.
9319 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9320 std::string*.
9321 * gdbarch.c: Rebuild.
9322 * gdbarch.h: Rebuild.
9323 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9324 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9325 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9326 std::string*.
9327
9d8780f0
SM
93282018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9329
9330 * gdbtypes.h (sect_offset): Change type to uint64_t.
9331 (sect_offset_str): New function.
9332 * dwarf2read.c (create_addrmap_from_aranges): Use
9333 sect_offset_str.
9334 (error_check_comp_unit_head): Likewise.
9335 (create_debug_type_hash_table): Likewise.
9336 (read_cutu_die_from_dwo): Likewise.
9337 (init_cutu_and_read_dies): Likewise.
9338 (init_cutu_and_read_dies_no_follow): Likewise.
9339 (process_psymtab_comp_unit_reader): Likewise.
9340 (partial_die_parent_scope): Likewise.
9341 (peek_die_abbrev): Likewise.
9342 (process_queue): Likewise.
9343 (dwarf2_physname): Likewise.
9344 (read_namespace_alias): Likewise.
9345 (read_import_statement): Likewise.
9346 (create_dwo_cu_reader): Likewise.
9347 (create_cus_hash_table): Likewise.
9348 (lookup_dwo_cutu): Likewise.
9349 (inherit_abstract_dies): Likewise.
9350 (read_func_scope): Likewise.
9351 (read_call_site_scope): Likewise.
9352 (dwarf2_add_member_fn): Likewise.
9353 (read_common_block): Likewise.
9354 (read_module_type): Likewise.
9355 (read_typedef): Likewise.
9356 (read_subrange_type): Likewise.
9357 (load_partial_dies): Likewise.
9358 (read_partial_die): Likewise.
9359 (find_partial_die): Likewise.
9360 (read_str_index): Likewise.
9361 (dwarf2_string_attr): Likewise.
9362 (build_error_marker_type): Likewise.
9363 (lookup_die_type): Likewise.
9364 (dump_die_shallow): Likewise.
9365 (follow_die_ref): Likewise.
9366 (dwarf2_fetch_die_loc_sect_off): Likewise.
9367 (dwarf2_fetch_constant_bytes): Likewise.
9368 (follow_die_sig): Likewise.
9369 (get_signatured_type): Likewise.
9370 (get_DW_AT_signature_type): Likewise.
9371 (dwarf2_find_containing_comp_unit): Likewise.
9372 (set_die_type): Likewise.
9373
8ec57239
JB
93742018-02-21 John Baldwin <jhb@FreeBSD.org>
9375
9376 * arch/aarch64.c: Include "common-defs.h".
9377 * arch/amd64.c: Likewise.
9378 * arch/i386.c: Likewise.
9379
3eac2b65
TT
93802018-02-21 Tom Tromey <tom@tromey.com>
9381
9382 * value.h: (extract_field_op): Update.
9383 * eval.c (extract_field_op): Return a const char *.
9384 * expression.h (parse_expression_for_completion): Update.
9385 * completer.c (complete_expression): Update.
9386 (add_struct_fields): Make fieldname const.
9387 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9388 (mark_completion_tag, parse_exp_in_context_1): Update.
9389 (parse_expression_for_completion): Change "name" to
9390 unique_xmalloc_ptr*.
9391
6ccb583f
TT
93922018-02-21 Tom Tromey <tom@tromey.com>
9393
9394 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9395
c113ed0c
YQ
93962018-02-21 Yao Qi <yao.qi@linaro.org>
9397
9398 * avr-tdep.c (avr_read_pc): Change parameter type to
9399 readable_regcache.
9400 * gdbarch.sh (read_pc): Likewise.
9401 * gdbarch.c: Re-generated.
9402 * gdbarch.h: Re-generated.
9403 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9404 readable_regcache.
9405 * ia64-tdep.c (ia64_read_pc): Likewise.
9406 * mips-tdep.c (mips_read_pc): Likewise.
9407 * spu-tdep.c (spu_read_pc): Likewise.
9408
4c74fe6b
YQ
94092018-02-21 Yao Qi <yao.qi@linaro.org>
9410
9411 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9412 * regcache-dump.c: New file.
9413 * regcache.c: Move register_dump to regcache-dump.c.
9414 (maintenance_print_registers): Likewise.
9415 (maintenance_print_raw_registers): Likewise.
9416 (maintenance_print_cooked_registers): Likewise.
9417 (maintenance_print_register_groups): Likewise.
9418 (maintenance_print_remote_registers): Likewise.
9419 (_initialize_regcache): Likewise.
9420 * regcache.h (register_dump): Moved from regcache.c.
9421
796bb026
YQ
94222018-02-21 Yao Qi <yao.qi@linaro.org>
9423
9424 * regcache.c (regcache::regcache): Update.
9425 (regcache::invalidate): Move it to detached_regcache::invalidate.
9426 (get_thread_arch_aspace_regcache): Update.
9427 (regcache::raw_update): Update.
9428 (regcache::cooked_read): Remove some code.
9429 (regcache::cooked_read_value): Likewise.
9430 (regcache::raw_write): Remove assert on m_readonly_p.
9431 (regcache::raw_supply_integer): Move it to
9432 detached_regcache::raw_supply_integer.
9433 (regcache::raw_supply_zeroed): Likewise.
9434 * regcache.h (detached_regcache) <raw_supply_integer>: New
9435 declaration.
9436 <raw_supply_zeroed, invalidate>: Likewise.
9437 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9438 <invalidate>: Likewise.
9439 <m_readonly_p>: Removed.
9440
215c69dc
YQ
94412018-02-21 Yao Qi <yao.qi@linaro.org>
9442
9443 * infcmd.c (get_return_value): Let stop_regs point to
9444 get_current_regcache.
9445 * regcache.c (regcache::regcache): Remove.
9446 (register_dump_reg_buffer): New class.
9447 (regcache_print): Adjust.
9448 * regcache.h (regcache): Remove constructors.
9449
f3384e66
YQ
94502018-02-21 Yao Qi <yao.qi@linaro.org>
9451
9452 * regcache.c (class register_dump): New class.
9453 (register_dump_regcache, register_dump_none): New class.
9454 (register_dump_remote, register_dump_groups): New class.
9455 (regcache_print): Update.
9456 * regcache.h (regcache_dump_what): Move it to regcache.c.
9457 (regcache) <dump>: Remove.
9458
c8ec2f33
YQ
94592018-02-21 Yao Qi <yao.qi@linaro.org>
9460
9461 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9462 reg_buffer_rw *.
9463 (jit_unwind_reg_set_impl): Call raw_supply.
9464 (jit_frame_sniffer): Use reg_buffer_rw.
9465 * record-full.c (record_full_core_regbuf): Change its type.
9466 (record_full_core_open_1): Use reg_buffer_rw.
9467 (record_full_close): Likewise.
9468 (record_full_core_fetch_registers): Use regcache->raw_supply.
9469 (record_full_core_store_registers): Likewise.
9470 * regcache.c (regcache::get_register_status): Move it to
9471 reg_buffer.
9472 (regcache_raw_set_cached_value): Remove.
9473 (regcache::raw_set_cached_value): Remove.
9474 (regcache::raw_write): Call raw_supply.
9475 (regcache::raw_supply): Move it to reg_buffer_rw.
9476 * regcache.h (regcache_raw_set_cached_value): Remove.
9477 (reg_buffer_rw): New class.
9478
daf6667d
YQ
94792018-02-21 Yao Qi <yao.qi@linaro.org>
9480
9481 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9482 readonly_detached_regcache.
9483 (dummy_frame_prev_register): Use regcache->cooked_read.
9484 * frame.c (frame_save_as_regcache): Change return type.
9485 (frame_pop): Update.
9486 * frame.h (frame_save_as_regcache): Update declaration.
9487 * inferior.h (get_infcall_suspend_state_regcache): Update
9488 declaration.
9489 * infrun.c (infcall_suspend_state) <registers>: use
9490 readonly_detached_regcache.
9491 (save_infcall_suspend_state): Don't use regcache_dup.
9492 (get_infcall_suspend_state_regcache): Change return type.
9493 * linux-fork.c (struct fork_info) <savedregs>: Change to
9494 readonly_detached_regcache.
9495 <pc>: New field.
9496 (fork_save_infrun_state): Don't use regcache_dup.
9497 (info_checkpoints_command): Adjust.
9498 * mi/mi-main.c (register_changed_p): Update declaration.
9499 (mi_cmd_data_list_changed_registers): Use
9500 readonly_detached_regcache.
9501 (register_changed_p): Change parameter type to
9502 readonly_detached_regcache.
9503 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9504 readonly_detached_regcache.
9505 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9506 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9507 New.
9508 (regcache::save): Move it to reg_buffer.
9509 (regcache::restore): Change parameter type.
9510 (regcache_dup): Remove.
9511 * regcache.h (reg_buffer) <save>: New method.
9512 (readonly_detached_regcache): New class.
9513 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9514 readonly_detached_regcache.
9515 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9516
fc5b8736
YQ
95172018-02-21 Yao Qi <yao.qi@linaro.org>
9518
9519 * frame.c (frame_save_as_regcache): Use regcache method save.
9520 (frame_pop): Use regcache method restore.
9521 * infrun.c (restore_infcall_suspend_state): Likewise.
9522 * linux-fork.c (fork_load_infrun_state): Likewise.
9523 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9524 save.
9525 * regcache.c (regcache_save): Remove.
9526 (regcache::restore): More asserts.
9527 (regcache_cpy): Remove.
9528 * regcache.h (regcache_save): Remove the declaration.
9529 (regcache::restore): Move from private to public.
9530 Remove the friend declaration of regcache_cpy.
9531 (regcache_cpy): Remove declaration.
9532
849d0ba8
YQ
95332018-02-21 Yao Qi <yao.qi@linaro.org>
9534
9535 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9536 parameter type to 'readable_regcache *'.
9537 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9538 * arm-tdep.c (arm_neon_quad_read): Likewise.
9539 (arm_pseudo_read): Likewise.
9540 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9541 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9542 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9543 * gdbarch.c: Re-generated.
9544 * gdbarch.h: Re-generated.
9545 * gdbarch.sh (pseudo_register_read): Change parameter type to
9546 'readable_regcache *'.
9547 (pseudo_register_read_value): Likewise.
9548 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9549 (h8300_pseudo_register_read): Likewise.
9550 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9551 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9552 (i386_pseudo_register_read_into_value): Likewise.
9553 (i386_pseudo_register_read_value): Likewise.
9554 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9555 declaration.
9556 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9557 * m32c-tdep.c (m32c_raw_read): Likewise.
9558 (m32c_read_flg): Likewise.
9559 (m32c_banked_register): Likewise.
9560 (m32c_banked_read): Likewise.
9561 (m32c_sb_read): Likewise.
9562 (m32c_part_read): Likewise.
9563 (m32c_cat_read): Likewise.
9564 (m32c_r3r2r1r0_read): Likewise.
9565 (m32c_pseudo_register_read): Likewise.
9566 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9567 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9568 (mep_pseudo_cr64_read): Likewise.
9569 (mep_pseudo_register_read): Likewise.
9570 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9571 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9572 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9573 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9574 (regcache::cooked_read): Likewise.
9575 (regcache::cooked_read_value): Likewise.
9576 (regcache_cooked_read_signed):
9577 (regcache::cooked_read): Likewise.
9578 * regcache.h (readable_regcache): New class.
9579 (regcache): Inherit readable_regcache. Move some methods to
9580 readable_regcache.
9581 * rl78-tdep.c (rl78_pseudo_register_read): Change
9582 parameter type to 'readable_regcache *'.
9583 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9584 (e500_pseudo_register_read): Change parameter type to
9585 'readable_regcache *'.
9586 (dfp_pseudo_register_read): Likewise.
9587 (vsx_pseudo_register_read): Likewise.
9588 (efpr_pseudo_register_read): Likewise.
9589 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9590 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9591 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9592 (sh64_pseudo_register_read): Likewise.
9593 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9594 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9595 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9596 (spu_pseudo_register_read): Likewise.
9597 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9598 (xtensa_pseudo_register_read): Likewise.
9599
31716595
YQ
96002018-02-21 Yao Qi <yao.qi@linaro.org>
9601
9602 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9603 (regcache::arch): Move it to reg_buffer::arch.
9604 (regcache::register_buffer): Likewise.
9605 (regcache::assert_regnum): Likewise.
9606 (regcache::num_raw_registers): Likewise.
9607 * regcache.h (reg_buffer): New class.
9608 (regcache): Inherit reg_buffer.
9609
7104e59b
SM
96102018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9611
9612 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9613 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9614
2d8adcbd
MM
96152018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9616
9617 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9618
b5884fa7
AH
96192018-02-19 Alan Hayward <alan.hayward@arm.com>
9620
9621 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9622 (SFILES): Remove common/*.c files.
9623 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9624 * common/common.host: Add common reference.
9625 * configure.ac: Likewise.
9626 * configure: Regenerate.
9627
fd90ace4
YQ
96282018-02-16 Yao Qi <yao.qi@linaro.org>
9629
9630 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9631 (block_initialize_namespace): Use new.
9632 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9633 (dwarf2_free_objfile): Use delete.
9634 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9635 (copy_type_recursive): Use new.
9636 * gdb_obstack.h (allocate_on_obstack): New.
9637
85046ae2
YQ
96382018-02-15 Yao Qi <yao.qi@linaro.org>
9639
9640 PR gdb/22849
9641 * inferior.c (exit_inferior_1): Reset inf->control.
9642
355c559b
JB
96432018-02-15 Joel Brobecker <brobecker@adacore.com>
9644
9645 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9646 declaration.
9647
980548fd
PA
96482018-02-14 Pedro Alves <palves@redhat.com>
9649
9650 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9651 frame_cleanup_after_sniffer on exception.
9652
692d6f97
TT
96532018-02-14 Tom Tromey <tom@tromey.com>
9654
9655 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9656 const.
9657 (solib_bfd_open): Make pathname const.
9658 * solib.c (solib_bfd_open): Make pathname const.
9659 * solib-spu.c (spu_bfd_fopen): Make name const.
9660 (spu_bfd_open): Make pathname const.
9661 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9662 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9663
e0cc99a6
TT
96642018-02-14 Tom Tromey <tom@tromey.com>
9665
9666 * symfile.c (symfile_bfd_open): Update.
9667 * source.h (openp, source_full_path_of, find_and_open_source):
9668 Change argument type to unique_xmalloc_ptr.
9669 * source.c (openp): Take a unique_xmalloc_ptr.
9670 (source_full_path_of, find_and_open_source): Likewise.
9671 (open_source_file, symtab_to_fullname): Update.
9672 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9673 unique_xmalloc_ptr.
9674 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9675 (exec_file_find): Update.
9676 * psymtab.c (psymtab_to_fullname): Update.
9677 * nto-tdep.h (nto_find_and_open_solib): Update.
9678 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9679 unique_xmalloc_ptr.
9680 * exec.c (exec_file_attach): Update.
9681 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9682 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9683
b46a8d7c
TT
96842018-02-14 Tom Tromey <tom@tromey.com>
9685
9686 * solib.c: Include source.h.
9687 * nto-tdep.c: Include source.h.
9688 * mi/mi-cmd-env.c: Include source.h.
9689 * infcmd.c: Include source.h.
9690 * exec.c: Include source.h.
9691 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9692 (add_path, directory_switch, source_path, init_source_path): Move
9693 declarations...
9694 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9695 (add_path, directory_switch, source_path, init_source_path):
9696 ...here.
9697
797bc1cb
TT
96982018-02-14 Tom Tromey <tom@tromey.com>
9699
9700 * solist.h (exec_file_find, solib_find): Return
9701 unique_xmalloc_ptr.
9702 (solib_bfd_fopen): Take a const char *.
9703 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9704 (exec_file_find, solib_find): Likewise.
9705 (solib_bfd_fopen): Do not take ownership of "pathname".
9706 (solib_bfd_open): Use unique_xmalloc_ptr.
9707 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9708 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9709 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9710 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9711
f98b2e33
JB
97122018-02-14 Joel Brobecker <brobecker@adacore.com>
9713
9714 * ada-lang.c (name_match_type_from_name): Remove reference to
9715 ada_name_for_lookup in function's documentation.
9716 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9717
24b9144d
SM
97182018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9719
9720 * defs.h (enum openp_flags): New enum.
9721 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9722 Move to enum openp_flags.
9723 (openp_flags): New enum flags.
9724 (openp): Change parameter type to openp_flags.
9725 * source.c (openp): Change parameter type to openp_flags.
9726 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9727 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9728
387cd15b
SM
97292018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9730
9731 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9732 per-command.
9733
b303c6f6
AB
97342018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9735
9736 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9737 into...
9738 (class dwarf2_queue_guard): ...the destructor of this new class.
9739 (dw2_do_instantiate_symtab): Create instance of the new class
9740 dwarf2_queue_guard, remove cleanup.
9741
9c3630e9
TT
97422018-02-09 Tom Tromey <tom@tromey.com>
9743
9744 * source.c (find_source_lines): Don't reference past the end of
9745 the vector.
9746
c4e12631
MM
97472018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9748
9749 * remote.c (remote_btrace_maybe_reopen): Change error message.
9750 * btrace.c (btrace_enable): Likewise.
9751 (parse_xml_btrace): Likewise.
9752 (parse_xml_btrace_conf): Likewise.
9753
88711fbf
MM
97542018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9755
9756 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9757 (linux_enable_pt, linux_enable_bts): Call
9758 diagnose_perf_event_open_fail.
9759
17ad2a4f
MM
97602018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9761
9762 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9763 Remove parameter and change return type. Update callers. Move it.
9764 (linux_enable_bts, linux_enable_pt): Improve error message.
9765 (linux_enable_pt): Remove zero buffer size check.
9766 (linux_enable_btrace): Improve error messages. Remove NULL return
9767 check.
9768
de6242d3
MM
97692018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9770
9771 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9772 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9773 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9774 (linux_supports_pt, linux_supports_btrace): Remove.
9775 (linux_enable_bts): Call cpu_supports_bts.
9776 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9777 * remote.c (remote_supports_btrace): Remove.
9778 (init_remote_ops): Remove remote_supports_btrace.
9779 * target-delegates.c: Regenerated.
9780 * target.c (target_supports_btrace): Remove.
9781 * target.h (target_ops) <to_supports_btrace>: Remove
9782 (target_supports_btrace): Remove.
9783 * x86-linux-nat.c (x86_linux_create_target): Remove
9784 linux_supports_btrace.
9785
9ee23a85
MM
97862018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9787
9788 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9789 btrace failed.
9790 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9791 exception and use message in own exception.
9792
5c3284c1
MM
97932018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9794
9795 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9796 (perf_event_pt_event_type): Use gdb_file_up.
9797 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9798 scoped_fd, and scoped_mmap.
9799
84696f37
MM
98002018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9801
9802 * common/scoped_mmap.h: New.
9803 * unittests/scoped_mmap-selftest.c: New.
9804 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9805 unittests/scoped_mmap-selftest.c.
9806
ea4a0888
MM
98072018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9808
9809 * common/scoped_fd.h: New.
9810 * unittests/scoped_fd-selftest.c: New.
9811 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9812 unittests/scoped_fd-selftest.c.
9813
869e8290
TT
98142018-02-09 Tom Tromey <tom@tromey.com>
9815
9816 * auto-load.c (auto_load_section_scripts): Use
9817 gdb::unique_xmalloc_ptr.
9818
a37a2ae7
TT
98192018-02-09 Tom Tromey <tom@tromey.com>
9820
9821 * auto-load.c (execute_script_contents): Use std::string.
9822
4e725347
JB
98232018-02-09 Joel Brobecker <brobecker@adacore.com>
9824
9825 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9826 Python function, rather than a new command.
9827
9a897d43
TT
98282018-02-08 Tom Tromey <tom@tromey.com>
9829
9830 * solib.c (solib_find_1): Use std::string.
9831 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9832
58ef3771
TT
98332018-02-08 Tom Tromey <tom@tromey.com>
9834
9835 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9836
a9abc434
TT
98372018-02-08 Tom Tromey <tom@tromey.com>
9838
9839 * source.c (find_source_lines): Use gdb::def_vector.
9840
84f27c6f
TT
98412018-02-08 Tom Tromey <tom@tromey.com>
9842
9843 * macrocmd.c (struct temporary_macro_definition): New.
9844 (macro_define_command): Use temporary_macro_definition. Remove
9845 cleanups.
9846 (free_macro_definition_ptr): Remove.
9847
0354904b
TT
98482018-02-08 Tom Tromey <tom@tromey.com>
9849
9850 * macroexp.c (maybe_expand): Use std::string.
9851
1739cf24
TT
98522018-02-08 Tom Tromey <tom@tromey.com>
9853
9854 * macroexp.c (struct macro_buffer): Add initializers for some
9855 members.
9856 (init_buffer, init_shared_buffer, free_buffer)
9857 (free_buffer_return_text): Remove.
9858 (macro_buffer): New constructors.
9859 (~macro_buffer): New destructor.
9860 (macro_buffer::set_shared): New method.
9861 (macro_buffer::resize_buffer, macro_buffer::appendc)
9862 (macro_buffer::appendmem): Now methods, not free functions.
9863 (set_token, append_tokens_without_splicing, stringify)
9864 (macro_stringify): Update.
9865 (gather_arguments): Change return type. Remove argc_p argument,
9866 add args_ptr argument. Use std::vector.
9867 (substitute_args): Remove argc argument. Accept std::vector.
9868 (expand): Update. Use std::vector.
9869 (scan, macro_expand, macro_expand_next): Update.
9870
f6c2623e
TT
98712018-02-08 Tom Tromey <tom@tromey.com>
9872
9873 * symtab.c (default_collect_symbol_completion_matches_break_on):
9874 Use unique_xmalloc_ptr.
9875 * macroscope.h: (sal_macro_scope, user_macro_scope)
9876 (default_macro_scope): Return unique_xmalloc_ptr.
9877 * macroscope.c (sal_macro_scope, user_macro_scope)
9878 (default_macro_scope): Return unique_xmalloc_ptr.
9879 * macroexp.h (macro_expand, macro_expand_once): Return
9880 unique_xmalloc_ptr.
9881 * macroexp.c (macro_expand, macro_expand_once): Return
9882 unique_xmalloc_ptr.
9883 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9884 (info_macro_command, info_macros_command): Use
9885 unique_xmalloc_ptr.
9886 * compile/compile-c-support.c (write_macro_definitions): Use
9887 unique_xmalloc_ptr.
9888 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9889
c2e0e465
SM
98902018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9891
9892 * value.c (value_static_field): Assign field type instead of
9893 containing type when returning an optimized out value.
9894
3f8c94b4
YQ
98952018-02-06 Yao Qi <yao.qi@linaro.org>
9896
9897 * ft32-tdep.c (ft32_read_pc): Remove.
9898 (ft32_write_pc): Remove.
9899 (ft32_gdbarch_init): Update.
9900 * m32r-tdep.c (m32r_read_pc): Remove.
9901 (m32r_gdbarch_init): Update.
9902 * mep-tdep.c (mep_read_pc): Remove.
9903 (mep_gdbarch_init): Update.
9904 * microblaze-tdep.c (microblaze_write_pc): Remove.
9905 (microblaze_gdbarch_init): Update.
9906 * mn10300-tdep.c (mn10300_read_pc): Remove.
9907 (mn10300_write_pc): Remove.
9908 (mn10300_gdbarch_init): Update.
9909 * moxie-tdep.c (moxie_read_pc): Remove.
9910 (moxie_write_pc): Remove.
9911 (moxie_gdbarch_init): Update.
9912
bca65a23
YQ
99132018-02-06 Yao Qi <yao.qi@linaro.org>
9914
9915 * expprint.c (print_subexp_standard): Handle
9916 OP_F77_UNDETERMINED_ARGLIST.
9917 (dump_subexp_body_standard): Likewise.
9918
583e3f90 99192018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 9920
583e3f90
YQ
9921 * target-descriptions.c (tdesc_element_visitor) Add empty
9922 implementations.
b8df6ca7
AH
9923 (tdesc_type): Move make_gdb_type from here.
9924 (tdesc_type_builtin): Likewise.
9925 (tdesc_type_vector): Likewise.
9926 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9927 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9928 (make_gdb_type_union): Likewise.
9929 (make_gdb_type_flags): Likewise.
9930 (make_gdb_type_enum): Likewise.
9931 (make_gdb_type): New function.
9932 (tdesc_register_type): Use static make_gdb_type.
9933
e813d34a
RK
99342018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9935
9936 * infcmd.c (default_print_one_register_info): Align natural-format
9937 column values consistently one under another.
9938 (pad_to_column): New function.
9939
0eb876f5
JB
99402018-02-05 Joel Brobecker <brobecker@adacore.com>
9941
9942 * dwarf2read.c (dwarf2_physname): Move commment.
9943
0625771b
LS
99442018-02-01 Leszek Swirski <leszeks@google.com>
9945
9946 * varobj.c (varobj_formatted_print_options): Allow recursive
9947 pretty printing if pretty printing is enabled.
9948
59498c30
LS
99492018-02-01 Leszek Swirski <leszeks@google.com>
9950
9951 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9952 names after a structop as a filename.
9953
2d9e6acb
YQ
99542018-02-01 Yao Qi <yao.qi@linaro.org>
9955
9956 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9957 (arm_record_coproc_data_proc): Likewise.
9958
df95a9cf
YQ
99592018-02-01 Yao Qi <yao.qi@linaro.org>
9960
9961 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9962
07e5f5cf
NP
99632018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9964
9965 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9966 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9967
3045b475
PA
99682018-01-31 Pedro Alves <palves@redhat.com>
9969
9970 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9971 * inflow.c (child_terminal_save_inferior): Wrap reference to
9972 tcgetpgrp in HAVE_TERMIOS_H.
9973 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9974 _WIN32.
9975 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9976 always iterate over all inferiors.
9977 (gdbsim_cntrl_c): Adjust.
9978 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9979
929b5ad4
JB
99802018-01-31 Joel Brobecker <brobecker@adacore.com>
9981
9982 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9983 index type is objfile-owned if the element type is as well.
9984
29236ca2
JB
99852018-01-31 Joel Brobecker <brobecker@adacore.com>
9986
9987 GDB 8.1 released.
9988
c81e8879
PR
99892018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9990
9991 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9992 "features/s390x-linux64.c".
9993 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9994 s390_linux32 and s390x_linux64.
9995 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9996 default tdesc.
9997 * s390-tdep.c: Include "features/s390-linux32.c" and
9998 "features/s390x-linux64.c".
9999 (s390_tdesc_valid): Add check for tdesc_has_registers.
10000 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10001 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10002 tdesc_s390x_linux64.
10003 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10004 tdesc_s390x_linux64 to...
10005 * s390-tdep.h: ...here.
10006
e671cd59
PA
100072018-01-30 Pedro Alves <palves@redhat.com>
10008
10009 PR gdb/13211
10010 * config.in, configure: Regenerate.
10011 * configure.ac: Check for getpgid.
10012 * go32-nat.c (go32_pass_ctrlc): New.
10013 (go32_target): Install it.
10014 * inf-child.c (inf_child_target): Install
10015 child_terminal_save_inferior, child_pass_ctrlc and
10016 child_interrupt.
10017 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10018 (inf_ptrace_target): No longer install it.
10019 * infcmd.c (interrupt_target_1): Adjust.
10020 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10021 (child_interrupt): Declare.
10022 (inferior::terminal_state): New.
10023 * inflow.c (struct terminal_info): Update comments.
10024 (inferior_process_group): Delete.
10025 (terminal_is_ours): Delete.
10026 (gdb_tty_state): New.
10027 (child_terminal_init): Adjust.
10028 (is_gdb_terminal, sharing_input_terminal_1)
10029 (sharing_input_terminal): New functions.
10030 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10031 Set the process's actual process group in the foreground if
10032 possible. Handle is_ours_for_output/is_ours distinction. Don't
10033 mark terminal as the inferior's if not sharing GDB's terminal.
10034 Don't check attach_flag.
10035 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10036 pass down a target_terminal_state.
10037 (child_terminal_save_inferior): New, factored out from ...
10038 (child_terminal_ours_1): ... this. Handle
10039 target_terminal_state::is_ours_for_output.
10040 (child_interrupt, child_pass_ctrlc): New.
10041 (inflow_inferior_exit): Clear the inferior's terminal_state.
10042 (copy_terminal_info): Copy the inferior's terminal state.
10043 (_initialize_inflow): Remove reference to terminal_is_ours.
10044 * inflow.h (inferior_process_group): Delete.
10045 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10046 * procfs.c (procfs_target): Don't install procfs_interrupt.
10047 (procfs_interrupt): Delete.
10048 * remote.c (remote_serial_quit_handler): Adjust.
10049 (remote_interrupt): Remove ptid parameter. Adjust.
10050 * target-delegates.c: Regenerate.
10051 * target.c: Include "terminal.h".
10052 (target_terminal::terminal_state): Rename to ...
10053 (target_terminal::m_terminal_state): ... this.
10054 (target_terminal::init): Adjust.
10055 (target_terminal::inferior): Adjust to per-inferior
10056 terminal_state.
10057 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10058 (target_terminal::ours, target_terminal::ours_for_output): Use
10059 target_terminal_is_ours_kind.
10060 (target_interrupt): Remove ptid parameter. Adjust.
10061 (default_target_pass_ctrlc): Adjust.
10062 * target.h (target_ops::to_terminal_save_inferior): New field.
10063 (target_ops::to_interrupt): Remove ptid_t parameter.
10064 (target_interrupt): Remove ptid_t parameter. Update comment.
10065 (target_pass_ctrlc): Update comment.
10066 * target/target.h (target_terminal_state): New scoped enum,
10067 factored out of ...
10068 (target_terminal::terminal_state): ... here.
10069 (target_terminal::inferior): Update comments.
10070 (target_terminal::restore_inferior): New.
10071 (target_terminal::is_inferior, target_terminal::is_ours)
10072 (target_terminal::is_ours_for_output): Adjust.
10073 (target_terminal::scoped_restore_terminal_state): Adjust to
10074 rename, and call restore_inferior() instead of inferior().
10075 (target_terminal::scoped_restore_terminal_state::m_state): Change
10076 type.
10077 (target_terminal::terminal_state): Rename to ...
10078 (target_terminal::m_terminal_state): ... this and change type.
10079
9c3a5d93
PA
100802018-01-30 Pedro Alves <palves@redhat.com>
10081
10082 * linux-nat.c (wait_for_signal): New function.
10083 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10084 directly.
10085 (async_terminal_is_ours)
10086 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10087 (linux_nat_add_target): Don't override
10088 to_terminal_inferior/to_terminal_ours.
10089
69ab5edb
SDJ
100902018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10091
10092 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10093
fc8e7e75
SM
100942018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10095
10096 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10097 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10098 dwarf2_per_objfile_free here.
10099 (dwarf2_per_objfile_free): Remove.
10100 (_initialize_dwarf2_read): Don't register
10101 dwarf2_per_objfile_free as a registry cleanup.
10102
b2a426e2
EZ
101032018-01-27 Eli Zaretskii <eliz@gnu.org>
10104
10105 Avoid compilation errors in MinGW native builds
10106
10107 The error is triggered by including python-internal.h, and the
10108 error message is:
10109
10110 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10111 from build-gnulib/import/math.h:27,
10112 from d:/usr/Python26/include/pyport.h:235,
10113 from d:/usr/Python26/include/Python.h:58,
10114 from python/python-internal.h:94,
10115 from python/py-arch.c:24:
10116 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10117 using ::hypot;
10118 ^~~~~
10119
10120 This happens because Python headers define 'hypot' to expand t
10121 '_hypot' in the Windows builds.
10122 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10123 'hypoth'. This avoids a compilation error.
10124
0bdd8eac
AH
101252018-01-26 Alan Hayward <alan.hayward@arm.com>
10126
10127 * MAINTAINERS (Write After Approval): Fix ordering.
10128
56ae9dc3
AH
101292018-01-26 Alan Hayward <alan.hayward@arm.com>
10130
10131 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10132
7433498b
AM
101332018-01-26 Alan Modra <amodra@gmail.com>
10134
10135 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10136 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10137 Remove nop. Make const. Comment.
10138 (powerpc32_plt_stub_so_2): New.
10139 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10140 Correct count. Update uses.
10141 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10142 Move common code reading PLT entry word. Correct
10143 powerpc32_plt_stub PLT address calculation.
10144 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10145 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10146 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10147 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10148 (ppc64_standard_linkage8): Likewise.
10149 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10150 Correct insns description.
10151 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10152
0f59d5fc
PA
101532018-01-24 Pedro Alves <palves@redhat.com>
10154
10155 GCC PR libstdc++/83906
10156 * gdbtypes.c (operator==(const dynamic_prop &,
10157 const dynamic_prop &)): New.
10158 (operator==(const range_bounds &, const range_bounds &)): New.
10159 (check_types_equal): Use them instead of memcmp.
10160 * gdbtypes.h (operator==(const dynamic_prop &,
10161 const dynamic_prop &)): Declare.
10162 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10163 (operator==(const range_bounds &, const range_bounds &)): Declare.
10164 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10165
ef8914a4
PR
101662018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10167
10168 * s390-linux-tdep.c (s390_record_address_mask)
10169 (s390_record_calc_disp_common, s390_record_calc_disp)
10170 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10171 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10172 (s390_process_record): Move to s390-tdep.c.
10173 (s390_linux_init_abi_any): Adjust.
10174 * s390-tdep.c (s390_record_address_mask)
10175 (s390_record_calc_disp_common, s390_record_calc_disp)
10176 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10177 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10178 (s390_process_record): Moved from s390-linux-tdep.c
10179 (s390_gdbarch_init): Adjust.
10180
d6e58945
PR
101812018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10182
10183 * s390-linux-nat.c (s390-tdep.h): New include.
10184 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10185 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10186 (ALLDEPFILES): Add s390-tdep.c.
10187 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10188 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10189 * s390-tdep.h: ...this. New file.
10190 * s390-linux-tdep.c (s390-tdep.h): New include.
10191 (_initialize_s390_tdep): Rename to...
10192 (_initialize_s390_linux_tdep): ...this and adjust.
10193 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10194 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10195 s390-tdep.h.
10196 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10197 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10198 (s390_is_partial_instruction, s390_software_single_step)
10199 (is_non_branch_ril, s390_displaced_step_copy_insn)
10200 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10201 (s390_prologue_data, s390_addr, s390_store, s390_load)
10202 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10203 (s390_register_call_saved, s390_guess_tracepoint_registers)
10204 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10205 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10206 (s390_pseudo_register_name, s390_pseudo_register_type)
10207 (s390_pseudo_register_read, s390_pseudo_register_write)
10208 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10209 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10210 (s390_addr_bits_remove, s390_address_class_type_flags)
10211 (s390_address_class_type_flags_to_name)
10212 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10213 (s390_function_arg_float, s390_function_arg_vector)
10214 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10215 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10216 (s390_frame_align, s390_register_return_value, s390_return_value)
10217 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10218 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10219 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10220 (s390_trad_frame_prev_register, s390_unwind_cache)
10221 (s390_prologue_frame_unwind_cache)
10222 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10223 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10224 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10225 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10226 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10227 (s390_frame_base_address, s390_local_base_address)
10228 (s390_frame_base, s390_gcc_target_options)
10229 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10230 (s390_validate_reg_range, s390_tdesc_valid)
10231 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10232 * s390-tdep.c: ...this. New file.
10233
9c0b896e
PR
102342018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10235
10236 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10237 (s390_process_record, s390_gdbarch_tdep_alloc)
10238 (s390_linux_init_abi_any): Use/set new hook.
10239
7042632b
PR
102402018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10241
10242 * s390-linux-tdep.c (osabi.h): New include.
10243 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10244 (s390_linux_init_abi_any): New functions.
10245 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10246
650f5e13
PR
102472018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10248
10249 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10250 tdesc_has_registers check
10251
47c9317e
PR
102522018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10253
10254 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10255 (s390_validate_reg_range): New macro.
10256 (s390_gdbarch_init): Adjust.
10257
095085d8
PR
102582018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10259
10260 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10261 (s390_gdbarch_tdep_alloc): Adjust.
10262 (s390_gdbarch_init): Adjust.
10263
ab9bcc67
PR
102642018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10265
10266 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10267 <have_tdb>: Change type to bool.
10268 (s390_gdbarch_tdep_alloc): Adjust.
10269 (s390_gdbarch_init): Adjust.
10270
21f6f5ff
PR
102712018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10272
10273 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10274 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10275 (s390_gdbarch_tdep_alloc): New function.
10276 (s390_gdbarch_init): Allocate tdep at start and use its fields
10277 instead of separate variables.
10278
0eb97953
PR
102792018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10280
10281 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10282 when looking for cached gdbarch and add comment for remaining.
10283
5c319bb2
PA
102842018-01-22 Pedro Alves <palves@redhat.com>
10285 Sergio Durigan Junior <sergiodj@redhat.com>
10286
10287 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10288 case.
10289
d65ce302
MR
102902018-01-22 Maciej W. Rozycki <macro@mips.com>
10291
10292 * MAINTAINERS: Update my company e-mail address.
10293
ec7a5fcb
YQ
102942018-01-22 Yao Qi <yao.qi@linaro.org>
10295
10296 * regcache.c (cooked_write_test): New function.
10297 (_initialize_regcache): Register the test.
10298
11f57cb6
YQ
102992018-01-22 Yao Qi <yao.qi@linaro.org>
10300
10301 * ia64-tdep.c (ia64_pseudo_register_read): Call
10302 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10303 * m32c-tdep.c (m32c_cat_read): Likewise.
10304 (m32c_r3r2r1r0_read): Likewise.
10305 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10306 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10307
03f50fc8
YQ
103082018-01-22 Yao Qi <yao.qi@linaro.org>
10309
10310 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10311 method raw_read instead of regcache_raw_read.
10312 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10313 * arm-tdep.c (arm_neon_quad_read): Likewise.
10314 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10315 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10316 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10317 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10318 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10319 (i386_pseudo_register_read_into_value): Likewise.
10320 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10321 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10322 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10323 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10324 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10325 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10326 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10327 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10328 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10329
dc711524
YQ
103302018-01-22 Yao Qi <yao.qi@linaro.org>
10331
10332 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10333 * configure.tgt: Remove target mt.
10334 * mt-tdep.c: Remove.
10335 * regcache.c (cooked_read_test): Remove the check for mt.
10336
3f5a868b
YQ
103372018-01-22 Yao Qi <yao.qi@linaro.org>
10338
10339 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10340 instead of gdbarch_pseudo_register_read_value.
10341
de4cb04a
JB
103422018-01-22 Joel Brobecker <brobecker@adacore.com>
10343
10344 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10345 language is Ada.
10346
a9e40818
JB
103472018-01-22 Joel Brobecker <brobecker@adacore.com>
10348
10349 * linespec.c (create_sals_line_offset): Remove code that preserved
10350 the symtab_and_line's line number.
10351
e707fc44
AB
103522018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10353
10354 * varobj.c (varobj_create): Don't set valid_block when creating a
10355 floating varobj.
10356
03d0bf7b
AB
103572018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10358
10359 * varobj.c (varobj_create): Remove out of date comment.
10360
ae451627
AB
103612018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10362
10363 PR mi/20395
10364 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10365 updating innermost block.
10366 * parse.c (innermost_block_tracker::update): Take extra type
10367 parameter, and check types match before updating innermost block.
10368 (write_dollar_variable): Update innermost block for registers.
10369 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10370 (innermost_block_tracker::innermost_block_tracker): Initialise
10371 m_types member.
10372 (innermost_block_tracker::reset): Take type parameter.
10373 (innermost_block_tracker::update): Take type parameter, and pass
10374 type through as needed.
10375 (innermost_block_tracker::m_types): New member.
10376 * varobj.c (varobj_create): Pass type when reseting innermost
10377 block.
10378
aee1fcdf
AB
103792018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10380
10381 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10382 * ada-lang.c (resolve_subexp): Likewise.
10383 * breakpoint.c (set_breakpoint_condition) Likewise.
10384 (watch_command_1) Likewise.
10385 * c-exp.y (variable): Likewise.
10386 * d-exp.y (PrimaryExpression): Likewise.
10387 * f-exp.y (variable): Likewise.
10388 * go-exp.y (variable): Likewise.
10389 * m2-exp.y (variable): Likewise.
10390 * objfiles.c (objfile::~objfile): Likewise.
10391 * p-exp.y (variable): Likewise.
10392 * parse.c (innermost_block): Change type.
10393 * parser-defs.h (class innermost_block_tracker): New.
10394 (innermost_block): Change to innermost_block_tracker.
10395 * printcmd.c (display_command): Switch to innermost_block API.
10396 (do_one_display): Likewise.
10397 * rust-exp.y (do_one_display): Likewise.
10398 * symfile.c (clear_symtab_users): Likewise.
10399 * varobj.c (varobj_create): Switch to innermost_block API, replace
10400 use of innermost_block with block stored on varobj object.
10401
396af9a1
AB
104022018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10403
10404 * expression.h (innermost_block): Remove declaration.
10405 * varobj.c: Add 'parser-defs.h' include.
10406
fcfcc376
TT
104072018-01-19 Tom Tromey <tom@tromey.com>
10408
10409 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10410 symbols in the static and global blocks.
10411
5a6c3296
JC
104122018-01-19 James Clarke <jrtc27@jrtc27.com>
10413
10414 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10415 gdb_ptrace.h, and move including gdb_wait.h ...
10416 * nat/linux-ptrace.h: ... to here.
10417
bc09b0c1
SM
104182018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10419
10420 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10421 inf_ptrace_detach_success.
10422 (inf_ptrace_detach_success): Add inferior parameter, use it
10423 instead of inferior_ptid, pass it to detach_inferior.
10424 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10425 parameter.
10426 * inferior.c (detach_inferior): Add overload that takes an
10427 inferior object.
10428 * inferior.h (detach_inferior): Likewise.
10429 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10430 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10431 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10432
6e1e1966
SM
104332018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10434
10435 * target.h (struct target_ops) <to_detach>: Add inferior
10436 parameter.
10437 (target_detach): Likewise.
10438 * target.c (dispose_inferior): Pass inferior down.
10439 (target_detach): Pass inferior down. Assert that it is equal to
10440 the current inferior.
10441 * aix-thread.c (aix_thread_detach): Pass inferior down.
10442 * corefile.c (core_file_command): Pass current_inferior() down.
10443 * corelow.c (core_detach): Add inferior parameter.
10444 * darwin-nat.c (darwin_detach): Likewise.
10445 * gnu-nat.c (gnu_detach): Likewise.
10446 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10447 * infcmd.c (detach_command): Pass current_inferior() down to
10448 target_detach.
10449 * infrun.c (follow_fork_inferior): Pass parent_inf to
10450 target_detach.
10451 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10452 target_detach.
10453 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10454 * linux-thread-db.c (thread_db_detach): Likewise.
10455 * nto-procfs.c (procfs_detach): Likewise.
10456 * procfs.c (procfs_detach): Likewise.
10457 * record.c (record_detach): Likewise.
10458 * record.h (struct inferior): Forward-declare.
10459 (record_detach): Add inferior parameter.
10460 * remote-sim.c (gdbsim_detach): Likewise.
10461 * remote.c (remote_detach_1): Likewise.
10462 (remote_detach): Likewise.
10463 (extended_remote_detach): Likewise.
10464 * sol-thread.c (sol_thread_detach): Likewise.
10465 * target-debug.h (target_debug_print_inferior_p): New macro.
10466 * target-delegates.c: Re-generate.
10467 * top.c (kill_or_detach): Pass inferior down to target_detach.
10468 * windows-nat.c (windows_detach): Add inferior parameter.
10469
6bd6f3b6
SM
104702018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10471
10472 * target.h (struct target_ops) <to_detach>: Remove args
10473 parameter.
10474 (target_detach): Likewise.
10475 * target.c (dispose_inferior): Adjust.
10476 (target_detach): Remove args parameter, adjust.
10477 * aix-thread.c (aix_thread_detach): Adjust.
10478 * corefile.c (core_file_command): Adjust.
10479 * corelow.c (core_detach): Adjust.
10480 * darwin-nat.c (darwin_detach): Adjust.
10481 * gnu-nat.c (gnu_detach): Adjust.
10482 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10483 * infcmd.c (detach_command): Adjust
10484 * infrun.c (follow_fork_inferior): Adjust.
10485 (handle_vfork_child_exec_or_exit): Adjust.
10486 * linux-fork.c (linux_fork_detach): Remove args parameter.
10487 * linux-fork.h (linux_fork_detach): Likewise.
10488 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10489 * linux-thread-db.c (thread_db_detach): Likewise.
10490 * nto-procfs.c (procfs_detach): Likewise.
10491 * procfs.c (procfs_detach): Likewise.
10492 (do_detach): Remove signo parameter.
10493 * record.c (record_detach): Remove args parameter.
10494 * record.h (record_detach): Likewise.
10495 * remote-sim.c (gdbsim_detach): Likewise.
10496 * remote.c (remote_detach_1): Likewise.
10497 (remote_detach): Likewise.
10498 (extended_remote_detach): Likewise.
10499 * sol-thread.c (sol_thread_detach): Likewise.
10500 * target-delegates.c: Re-generate.
10501 * top.c (struct qt_args) <args>: Remove field.
10502 (kill_or_detach): Don't pass args.
10503 (quit_force): Don't set args.
10504 * windows-nat.c (windows_detach): Remove args parameter.
10505
88af8ea8
YQ
105062018-01-19 Yao Qi <yao.qi@linaro.org>
10507
10508 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10509 (arm_linux_init_abi): Install it.
10510
dea445b9
YQ
105112018-01-19 Yao Qi <yao.qi@linaro.org>
10512
10513 * osabi.c (gdb_osabi_names): Extend the regexp for
10514 arm-linux-gnueabihf.
10515
4a17f768
YQ
105162018-01-18 Yao Qi <yao.qi@linaro.org>
10517
10518 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10519 m_abbrevs.
10520 (abbrev_table::add_abbrev): Update.
10521 (abbrev_table::lookup_abbrev): Update.
10522
d679c21a
YQ
105232018-01-18 Yao Qi <yao.qi@linaro.org>
10524
10525 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10526
7d937cad
SDJ
105272018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10528
10529 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10530 to "std::string".
10531
9e14690d
TT
105322018-01-17 Tom Tromey <tom@tromey.com>
10533
10534 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10535
50a82047
TT
105362018-01-17 Tom Tromey <tom@tromey.com>
10537
10538 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10539 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10540 (create_array_type_with_stride): Update.
10541 * dwarf2read.c (set_die_type): Update.
10542
c89b44cd
TT
105432018-01-17 Tom Tromey <tom@tromey.com>
10544
10545 * dwarf2read.c (delayed_method_info): Remove typedef.
10546 (dwarf2_cu::method_info): Now a std::vector.
10547 (add_to_method_list): Update.
10548 (free_delayed_list): Remove.
10549 (compute_delayed_physnames): Update.
10550 (process_full_comp_unit, process_full_type_unit): Clear the method
10551 list. Remove cleanups.
10552 (psymtab_include_file_name): Add name_holder parameter. Use
10553 unique_xmalloc_ptr.
10554 (dwarf_decode_lines): Update.
10555
fcd3b13d
SM
105562018-01-17 Tom Tromey <tom@tromey.com>
10557 Simon Marchi <simon.marchi@ericsson.com>
10558
10559 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10560 (dwarf2_per_objfile::free_cached_comp_units)
10561 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10562 (init_cutu_and_read_dies_no_follow): Update.
10563 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10564 (dwarf2_cu::~dwarf2_cu): New.
10565 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10566 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10567
685af9cd
TT
105682018-01-17 Tom Tromey <tom@tromey.com>
10569 Simon Marchi <simon.marchi@ericsson.com>
10570
10571 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10572 (struct die_reader_specs) <abbrev_table>: New member.
10573 (struct abbrev_table): Add constructor.
10574 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10575 <abbrev_obstack>: Now an auto_obstack.
10576 (abbrev_table_up): New typedef.
10577 (init_cu_die_reader): Add abbrev_table parameter.
10578 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10579 Add result_dwo_abbrev_table.
10580 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10581 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10582 Update.
10583 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10584 parameter.
10585 (skip_children): Update.
10586 (abbrev_table::alloc_abbrev): Rename from
10587 abbrev_table_alloc_abbrev.
10588 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10589 (abbrev_table::lookup_abbrev): Rename from
10590 abbrev_table_lookup_abbrev.
10591 (abbrev_table_read_table): Return abbrev_table_up.
10592 (abbrev_table_free, abbrev_table_free_cleanup)
10593 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10594 (load_partial_dies): Update.
10595
5e2db402
TT
105962018-01-17 Tom Tromey <tom@tromey.com>
10597
10598 * dwarf2read.c (dwarf2_compute_name): Update comment.
10599 (read_func_scope, read_variable): Update.
10600 (new_symbol): Remove.
10601 (new_symbol_full): Rename to new_symbol.
10602
ee7f689e 106032018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
10604
10605 PR gdb/16577
10606 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10607 a warning instead of throwing an error, set section size to 0 and return
10608 NULL.
10609 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10610
4d9b86e1
SM
106112018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10612
10613 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10614 std::string.
10615 (linux_ptrace_attach_fail_reason_string): Likewise.
10616 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10617 Likewise.
10618 (linux_ptrace_attach_fail_reason_string): Likewise.
10619 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10620
a7b2d0fb
SM
106212018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10622
10623 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10624
f517c180
EA
106252018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10626
10627 PR gdb/21559
10628 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10629 checking for fs_base/gs_base fields in struct user_regs_struct.
10630 * configure: Regenerate.
10631
7045b1ca
YQ
106322018-01-17 Yao Qi <yao.qi@linaro.org>
10633
10634 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10635 function.
10636 (aarch64_linux_init_abi): Install it to gdbarch hook
10637 gcc_target_options.
10638
db422fb2
PA
106392018-01-15 Pedro Alves <palves@redhat.com>
10640
10641 * common/signals-state-save-restore.c
10642 (save_original_signals_state): Fix typos.
10643
ba643918
SDJ
106442017-01-12 Tom Tromey <tom@tromey.com>
10645 Sergio Durigan Junior <sergiodj@redhat.com>
10646
10647 * Makefile.in (install-only): Install gdb-add-index.
10648
906b4aac
JB
106492018-01-12 John Baldwin <jhb@FreeBSD.org>
10650
10651 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10652
bdf2a94a
AA
106532018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10654
10655 * infrun.c (keep_going_pass_signal): Clear step-over info when
10656 insert_breakpoints fails.
10657
71d378ae
PA
106582018-01-11 Pedro Alves <palves@redhat.com>
10659
10660 PR gdb/22583
10661 * infrun.c (resume): Rename to ...
10662 (resume_1): ... this.
10663 (resume): Reimplement as wrapper around resume_1.
10664
3cada740
PA
106652018-01-11 Pedro Alves <palves@redhat.com>
10666
10667 PR remote/22597
10668 * remote.c (remote_parse_stop_reply): Default to the last-set
10669 general thread instead of to 'magic_null_ptid'.
10670
618daa93
PA
106712018-01-10 Pedro Alves <palves@redhat.com>
10672
10673 * language.h (language_get_symbol_name_matcher): Rename ...
10674 (get_symbol_name_matcher): ... this.
10675 * language.c (language_get_symbol_name_matcher): Ditto.
10676 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10677 callers adjusted.
10678
c63d3e8d
PA
106792018-01-10 Pedro Alves <palves@redhat.com>
10680
10681 PR gdb/22670
10682 * dwarf2read.c
10683 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10684 Adjust to use language_get_symbol_name_matcher instead of
10685 language_defn::la_get_symbol_name_matcher.
10686 * language.c (language_get_symbol_name_matcher): If in Ada mode
10687 and the lookup name is a verbatim match, return Ada's matcher.
10688 * language.h (language_get_symbol_name_matcher): Adjust comment.
10689 (ada_lookup_name_info::verbatim_p):: New method.
10690
d4c2a405
PA
106912018-01-10 Pedro Alves <palves@redhat.com>
10692
10693 PR gdb/22670
10694 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10695 minsym's language is language_auto or language_cplus, pass down
10696 language_ada instead.
10697 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10698
8825213e
PA
106992018-01-10 Pedro Alves <palves@redhat.com>
10700
10701 PR gdb/22670
10702 * minsyms.c (linkage_name_str): New function.
10703 (iterate_over_minimal_symbols): Use it.
10704
2d97a5d9
JB
107052018-01-09 John Baldwin <jhb@FreeBSD.org>
10706
10707 * NEWS: Document that 'info proc' now works on FreeBSD.
10708
92fce24d
JB
107092018-01-09 John Baldwin <jhb@FreeBSD.org>
10710
10711 * configure.ac: Check for kinfo_getfile in libutil.
10712 * configure: Regenerate.
10713 * config.in: Regenerate.
10714 * fbsd-nat.c: Include "fbsd-tdep.h".
10715 (fbsd_fetch_cmdline): New.
10716 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10717 rather than calling error.
10718 (fbsd_info_proc): New.
10719 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10720 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10721 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10722
262f62f5
JB
107232018-01-09 John Baldwin <jhb@FreeBSD.org>
10724
10725 * fbsd-nat.c (struct free_deleter): Remove.
10726 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10727
b999e203
JB
107282018-01-09 John Baldwin <jhb@FreeBSD.org>
10729
10730 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10731 NULL for an empty pathname.
10732
d2176225
JB
107332018-01-09 John Baldwin <jhb@FreeBSD.org>
10734
10735 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10736 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10737 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10738 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10739 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10740 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10741 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10742 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10743 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10744 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10745 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10746 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10747 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10748 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10749 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10750
9c4ac400
ST
107512018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10752
10753 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10754 (gnu_xfer_auxv): New function.
10755 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10756 TARGET_OBJECT_AUXV.
10757
1e5ded6c
YQ
107582018-01-08 Yao Qi <yao.qi@linaro.org>
10759 Simon Marchi <simon.marchi@ericsson.com>
10760
10761 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10762 common/selftest.c.
10763 (COMMON_OBS): Remove selftest.o.
10764 * configure.ac: Append selftest-arch.c and common/selftest.c to
10765 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10766 * configure: Re-generated.
10767 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10768 GDB_SELF_TEST.
10769 (maintenance_info_selftests): Likewise.
10770
04bafb1e
XR
107712018-01-08 Xavier Roirand <roirand@adacore.com>
10772
10773 * ada-valprint.c (val_print_packed_array_elements): Use
10774 proper number of elements when printing an array indexed
10775 by an enumeration type.
10776
518817b3
SM
107772018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10778
10779 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10780 (dw2_get_file_names_reader): Adjust.
10781 (lookup_dwo_signatured_type): Adjust.
10782 (lookup_dwp_signatured_type): Adjust.
10783 (lookup_signatured_type): Adjust.
10784 (create_type_unit_group): Adjust.
10785 (get_type_unit_group): Adjust.
10786 (process_psymtab_comp_unit_reader): Adjust.
10787 (build_type_psymtabs_reader): Adjust.
10788 (scan_partial_symbols): Adjust.
10789 (add_partial_symbol): Adjust.
10790 (add_partial_subprogram): Adjust.
10791 (peek_die_abbrev): Adjust.
10792 (fixup_go_packaging): Adjust.
10793 (process_imported_unit_die): Adjust.
10794 (dwarf2_compute_name): Adjust.
10795 (dwarf2_physname): Adjust.
10796 (read_import_statement): Adjust.
10797 (handle_DW_AT_stmt_list): Adjust.
10798 (read_file_scope): Adjust.
10799 (read_func_scope): Adjust.
10800 (read_lexical_block_scope): Adjust.
10801 (read_call_site_scope): Adjust.
10802 (read_variable): Adjust.
10803 (dwarf2_rnglists_process): Adjust.
10804 (dwarf2_ranges_process): Adjust.
10805 (dwarf2_ranges_read): Adjust.
10806 (dwarf2_get_pc_bounds): Adjust.
10807 (dwarf2_record_block_ranges): Adjust.
10808 (dwarf2_add_field): Adjust.
10809 (dwarf2_add_member_fn): Adjust.
10810 (read_structure_type): Adjust.
10811 (process_structure_scope): Adjust.
10812 (read_enumeration_type): Adjust.
10813 (read_array_type): Adjust.
10814 (mark_common_block_symbol_computed): Adjust.
10815 (read_common_block): Adjust.
10816 (read_namespace_type): Adjust.
10817 (read_namespace): Adjust.
10818 (read_module_type): Adjust.
10819 (read_tag_pointer_type): Adjust.
10820 (read_tag_ptr_to_member_type): Adjust.
10821 (read_tag_string_type): Adjust.
10822 (read_subroutine_type): Adjust.
10823 (read_typedef): Adjust.
10824 (read_base_type): Adjust.
10825 (attr_to_dynamic_prop): Adjust.
10826 (read_subrange_type): Adjust.
10827 (read_unspecified_type): Adjust.
10828 (dwarf2_read_abbrevs): Adjust.
10829 (load_partial_dies): Adjust.
10830 (read_partial_die): Adjust.
10831 (find_partial_die): Adjust.
10832 (guess_partial_die_structure_name): Adjust.
10833 (fixup_partial_die): Adjust.
10834 (read_attribute_value): Adjust.
10835 (read_addr_index): Adjust.
10836 (read_addr_index_from_leb128): Adjust.
10837 (read_str_index): Adjust.
10838 (dwarf2_string_attr): Adjust.
10839 (get_debug_line_section): Adjust.
10840 (dwarf_decode_line_header): Adjust.
10841 (lnp_state_machine::check_line_address): Adjust.
10842 (dwarf_decode_lines_1): Adjust.
10843 (dwarf_decode_lines): Adjust.
10844 (dwarf2_start_symtab): Adjust.
10845 (var_decode_location): Adjust.
10846 (new_symbol_full): Adjust.
10847 (dwarf2_const_value_data): Adjust.
10848 (dwarf2_const_value_attr): Adjust.
10849 (dwarf2_const_value): Adjust.
10850 (die_type): Adjust.
10851 (die_containing_type): Adjust.
10852 (build_error_marker_type): Adjust.
10853 (lookup_die_type): Adjust.
10854 (guess_full_die_structure_name): Adjust.
10855 (anonymous_struct_prefix): Adjust.
10856 (determine_prefix): Adjust.
10857 (dwarf2_name): Adjust.
10858 (follow_die_ref_or_sig): Adjust.
10859 (follow_die_offset): Adjust.
10860 (follow_die_ref): Adjust.
10861 (follow_die_sig_1): Adjust.
10862 (follow_die_sig): Adjust.
10863 (get_signatured_type): Adjust.
10864 (get_DW_AT_signature_type): Adjust.
10865 (decode_locdesc): Adjust.
10866 (dwarf_decode_macros): Adjust.
10867 (cu_debug_loc_section): Adjust.
10868 (fill_in_loclist_baton): Adjust.
10869 (dwarf2_symbol_mark_computed): Adjust.
10870 (init_one_comp_unit): Don't assign
10871 dwarf2_cu::dwarf2_per_objfile.
10872 (set_die_type): Adjust.
10873
ed2dc618
SM
108742018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10875
10876 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10877 <dwarf2_per_objfile>: New field.
10878 (dwarf2_per_objfile): Remove global.
10879 (get_dwarf2_per_objfile): New function.
10880 (set_dwarf2_per_objfile): New function.
10881 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10882 dwarf2_per_objfile.
10883 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10884 (read_abbrev_offset): Likewise.
10885 (read_indirect_string): Likewise.
10886 (read_indirect_line_string): Likewise.
10887 (read_indirect_string_at_offset): Likewise.
10888 (read_indirect_string_from_dwz): Likewise.
10889 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10890 dwarf2_per_objfile.
10891 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10892 (create_all_comp_units): Change objfile parameter to
10893 dwarf2_per_objfile.
10894 (create_all_type_units): Likewise.
10895 (process_queue): Add dwarf2_per_objfile parameter.
10896 (read_and_check_comp_unit_head): Likewise.
10897 (lookup_dwo_unit_in_dwp): Likewise.
10898 (get_dwp_file): Likewise.
10899 (process_cu_includes): Likewise.
10900 (struct free_dwo_file_cleanup_data): New struct.
10901 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10902 set_dwarf2_per_objfile.
10903 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10904 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10905 context, adjust calls.
10906 (dw2_instantiate_symtab): Likewise.
10907 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10908 (dw2_get_cu): Likewise.
10909 (create_cu_from_index_list): Change objfile parameter to
10910 dwarf2_per_objfile.
10911 (create_cus_from_index_list): Get dwarf2_per_objfile from
10912 context, adjust calls.
10913 (create_cus_from_index): Likewise.
10914 (create_signatured_type_table_from_index): Change objfile
10915 parameter to dwarf2_per_objfile.
10916 (create_signatured_type_table_from_debug_names): Change objfile
10917 parameter to dwarf2_per_objfile.
10918 (create_addrmap_from_index): Likewise.
10919 (create_addrmap_from_aranges): Likewise.
10920 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10921 (dw2_setup): Remove.
10922 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10923 context.
10924 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10925 get_dwarf2_per_objfile.
10926 (dw2_forget_cached_source_info): Likewise.
10927 (dw2_map_symtabs_matching_filename): Likewise.
10928 (struct dw2_symtab_iterator) <index>: Remove.
10929 <dwarf2_per_objfile>: New field.
10930 (dw2_symtab_iter_init): Replace index parameter with
10931 dwarf2_per_objfile.
10932 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10933 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10934 (dw2_print_stats): Likewise.
10935 (dw2_dump): Likewise.
10936 (dw2_expand_symtabs_for_function): Likewise.
10937 (dw2_expand_all_symtabs): Likewise.
10938 (dw2_expand_symtabs_with_fullname): Likewise.
10939 (dw2_expand_marked_cus): Replace index and objfile parameters
10940 with dwarf2_per_objfile.
10941 (dw_expand_symtabs_matching_file_matcher): Add
10942 dwarf2_per_objfile parameter and adjust calls.
10943 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10944 adjust calls.
10945 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10946 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10947 adjust calls.
10948 (create_cus_from_debug_names_list): Replace objfile parameter
10949 with dwarf2_per_objfile and adjust calls.
10950 (create_cus_from_debug_names): Likewise.
10951 (dwarf2_read_debug_names): Likewise.
10952 (mapped_debug_names::namei_to_name): Adjust call.
10953 (dw2_debug_names_iterator::next): Likewise.
10954 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10955 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10956 (dw2_debug_names_dump): Likewise.
10957 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10958 (dw2_debug_names_expand_symtabs_matching): Likewise.
10959 (dwarf2_initialize_objfile): Likewise.
10960 (dwarf2_build_psymtabs): Likewise.
10961 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10962 this_cu.
10963 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10964 (read_and_check_comp_unit_head): Likewise.
10965 (read_abbrev_offset): Likewise.
10966 (create_debug_type_hash_table): Likewise.
10967 (create_debug_types_hash_table): Likewise.
10968 (create_all_type_units): Replace objfile parameter with
10969 dwarf2_per_objfile.
10970 (add_type_unit): Add dwarf2_per_objfile parameter.
10971 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10972 with dwarf2_per_objfile.
10973 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10974 (lookup_dwp_signatured_type): Likewise.
10975 (lookup_signatured_type): Likewise.
10976 (read_cutu_die_from_dwo): Likewise.
10977 (init_tu_and_read_dwo_dies): Likewise.
10978 (init_cutu_and_read_dies): Likewise.
10979 (init_cutu_and_read_dies_no_follow): Likewise.
10980 (allocate_type_unit_groups_table): Add objfile parameter.
10981 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10982 (get_type_unit_group): Likewise.
10983 (process_psymtab_comp_unit): Update call.
10984 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10985 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10986 (print_tu_stats): Likewise.
10987 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10988 in void* parameter.
10989 (build_type_psymtabs): Change objfile parameter to
10990 dwarf2_per_objfile.
10991 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10992 passed in void* parameter.
10993 (process_skeletonless_type_units): Change objfile parameter to
10994 dwarf2_per_objfile.
10995 (set_partial_user): Likewise.
10996 (dwarf2_build_psymtabs_hard): Likewise.
10997 (read_comp_units_from_section): Likewise.
10998 (create_all_comp_units): Likewise.
10999 (scan_partial_symbols): Update calls.
11000 (add_partial_symbol): Likewise.
11001 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11002 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11003 (process_queue): Add dwarf2_per_objfile parameter.
11004 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11005 (compute_compunit_symtab_includes): Likewise.
11006 (process_cu_includes): Add dwarf2_per_objfile parameter.
11007 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11008 (process_full_type_unit): Likewise.
11009 (process_imported_unit_die): Update call.
11010 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11011 (read_file_scope): Likewise.
11012 (allocate_dwo_file_hash_table): Add objfile parameter.
11013 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11014 (create_cus_hash_table): Likewise.
11015 (create_dwp_hash_table): Likewise.
11016 (create_dwo_unit_in_dwp_v1): Likewise.
11017 (create_dwp_v2_section): Likewise.
11018 (create_dwo_unit_in_dwp_v2): Likewise.
11019 (lookup_dwo_unit_in_dwp): Likewise.
11020 (try_open_dwop_file): Likewise.
11021 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11022 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11023 cleanup to include a reference to dwarf2_per_objfile.
11024 (open_dwp_file): Add dwarf2_per_objfile parameter.
11025 (open_and_init_dwp_file): Likewise.
11026 (get_dwp_file): Likewise.
11027 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11028 (queue_and_load_all_dwo_tus): Update call.
11029 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11030 data.
11031 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11032 (dwarf2_ranges_process): Likewise.
11033 (dwarf2_get_pc_bounds): Likewise.
11034 (mark_common_block_symbol_computed): Likewise.
11035 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11036 (dwarf2_read_abbrevs): Update call.
11037 (read_partial_die): Use dwarf2_per_objfile from cu.
11038 (find_partial_die): Likewise.
11039 (fixup_partial_die): Likewise.
11040 (read_attribute_value): Likewise.
11041 (read_indirect_string_at_offset_from): Add objfile parameter.
11042 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11043 parameter.
11044 (read_indirect_string_from_dwz): Add objfile parameter.
11045 (read_indirect_string): Add objfile parameter.
11046 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11047 (read_addr_index): Use dwarf2_per_objfile from cu.
11048 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11049 call dw2_setup.
11050 (read_str_index): Use dwarf2_per_objfile from cu.
11051 (get_debug_line_section): Likewise.
11052 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11053 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11054 (new_symbol_full): Use dwarf2_per_objfile from cu.
11055 (build_error_marker_type): Likewise.
11056 (lookup_die_type): Likewise.
11057 (determine_prefix): Likewise.
11058 (follow_die_offset): Likewise.
11059 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11060 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11061 (dwarf2_fetch_die_type_sect_off): Likewise.
11062 (dwarf2_get_die_type): Likewise.
11063 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11064 (get_signatured_type): Likewise.
11065 (get_DW_AT_signature_type): Likewise.
11066 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11067 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11068 (cu_debug_loc_section): Likewise.
11069 (fill_in_loclist_baton): Likewise.
11070 (dwarf2_symbol_mark_computed): Likewise.
11071 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11072 dwarf2_per_objfile.
11073 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11074 parameter.
11075 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11076 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11077 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11078 (set_die_type): Use dwarf2_free_objfile from cu.
11079 (get_die_type_at_offset): Likewise.
11080 (dwarf2_per_objfile_free): Don't assign global variable.
11081 (debug_names) <constructor>: Add dwarf2_per_objfile
11082 parameter, update m_debugstrlookup construction.
11083 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11084 parameter.
11085 <m_dwarf2_per_objfile>: New field.
11086 <lookup>: Use m_dwarf2_per_objfile.
11087 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11088 (psyms_seen_size): Likewise.
11089 (write_gdbindex): Replace objfile parameter with
11090 dwarf2_per_objfile.
11091 (write_debug_names): Likewise.
11092 (write_psymtabs_to_index): Likewise.
11093 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11094 calls.
11095
e3b94546
SM
110962018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11097
11098 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11099 <dwarf2_per_objfile>: New field.
11100 (struct dwarf2_per_cu_data) <objfile>: Remove.
11101 <dwarf2_per_objfile>: New field.
11102 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11103 of objfile.
11104 (create_signatured_type_table_from_index): Likewise.
11105 (create_debug_type_hash_table): Likewise.
11106 (fill_in_sig_entry_from_dwo_entry): Likewise.
11107 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11108 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11109 objfile.
11110 (create_partial_symtab): Access objfile through
11111 dwarf2_per_objfile.
11112 (process_psymtab_comp_unit_reader): Likewise.
11113 (read_comp_units_from_section): Likewise.
11114 (scan_partial_symbols): Likewise.
11115 (add_partial_symbol): Likewise.
11116 (add_partial_subprogram): Likewise.
11117 (peek_die_abbrev): Likewise.
11118 (fixup_go_packaging): Likewise.
11119 (process_full_comp_unit): Likewise.
11120 (process_full_type_unit): Likewise.
11121 (process_imported_unit_die): Likewise.
11122 (dwarf2_compute_name): Likewise.
11123 (dwarf2_physname): Likewise.
11124 (read_import_statement): Likewise.
11125 (create_cus_hash_table): Assign dwarf2_physname instead of
11126 objfile.
11127 (read_func_scope): Access objfile through dwarf2_per_objfile.
11128 (read_lexical_block_scope): Likewise.
11129 (read_call_site_scope): Likewise.
11130 (read_variable): Likewise.
11131 (dwarf2_rnglists_process): Likewise.
11132 (dwarf2_ranges_process): Likewise.
11133 (dwarf2_ranges_read): Likewise.
11134 (dwarf2_record_block_ranges): Likewise.
11135 (dwarf2_add_field): Likewise.
11136 (dwarf2_add_member_fn): Likewise.
11137 (read_structure_type): Likewise.
11138 (process_structure_scope): Likewise.
11139 (read_enumeration_type): Likewise.
11140 (read_array_type): Likewise.
11141 (read_common_block): Likewise.
11142 (read_namespace_type): Likewise.
11143 (read_namespace): Likewise.
11144 (read_module_type): Likewise.
11145 (read_tag_pointer_type): Likewise.
11146 (read_tag_ptr_to_member_type): Likewise.
11147 (read_tag_string_type): Likewise.
11148 (read_subroutine_type): Likewise.
11149 (read_typedef): Likewise.
11150 (read_base_type): Likewise.
11151 (attr_to_dynamic_prop): Likewise.
11152 (read_subrange_type): Likewise.
11153 (read_unspecified_type): Likewise.
11154 (load_partial_dies): Likewise.
11155 (read_partial_die): Likewise.
11156 (find_partial_die): Likewise.
11157 (guess_partial_die_structure_name): Likewise.
11158 (fixup_partial_die): Likewise.
11159 (read_attribute_value): Likewise.
11160 (read_addr_index_from_leb128): Likewise.
11161 (dwarf2_read_addr_index): Likewise.
11162 (dwarf2_string_attr): Likewise.
11163 (lnp_state_machine::check_line_address): Likewise.
11164 (dwarf_decode_lines_1): Likewise.
11165 (dwarf_decode_lines): Likewise.
11166 (dwarf2_start_symtab): Likewise.
11167 (var_decode_location): Likewise.
11168 (new_symbol_full): Likewise.
11169 (dwarf2_const_value_data): Likewise.
11170 (dwarf2_const_value_attr): Likewise.
11171 (dwarf2_const_value): Likewise.
11172 (die_type): Likewise.
11173 (die_containing_type): Likewise.
11174 (lookup_die_type): Likewise.
11175 (guess_full_die_structure_name): Likewise.
11176 (anonymous_struct_prefix): Likewise.
11177 (dwarf2_name): Likewise.
11178 (follow_die_ref_or_sig): Likewise.
11179 (follow_die_offset): Likewise.
11180 (follow_die_ref): Likewise.
11181 (dwarf2_fetch_die_loc_sect_off): Likewise.
11182 (dwarf2_fetch_constant_bytes): Likewise.
11183 (dwarf2_fetch_die_type_sect_off): Likewise.
11184 (dwarf2_get_die_type): Likewise.
11185 (follow_die_sig): Likewise.
11186 (decode_locdesc): Likewise.
11187 (dwarf2_per_cu_objfile): Likewise.
11188 (dwarf2_per_cu_text_offset): Likewise.
11189 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11190 objfile.
11191 (set_die_type): Access objfile through
11192 dwarf2_per_objfile.
11193
b01ba14d
SM
111942018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11195
11196 * valprint.c (converted_character_d): Remove typedef.
11197 (DEF_VEC_O (converted_character_d)): Remove.
11198 (count_next_character): Use std::vector.
11199 (print_converted_chars_to_obstack): Likewise.
11200 (generic_printstr): Likewise.
11201
4d0fdd9b
SM
112022018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11203
11204 * xml-support.h (struct gdb_xml_value): Add constructor.
11205 <value>: Change type to unique_xmalloc_ptr.
11206 (gdb_xml_value_s): Remove typedef.
11207 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11208 (gdb_xml_element_start_handler): Change parameter type to
11209 std::vector.
11210 (xml_find_attribute): Likewise.
11211 * xml-support.c (xml_find_attribute): Change parameter type to
11212 std::vector and adjust.
11213 (gdb_xml_values_cleanup): Remove.
11214 (gdb_xml_parser::start_element): Adjust to std::vector.
11215 (xinclude_start_include): Change paraeter type to std::vector
11216 and adjust.
11217 * btrace.c (check_xml_btrace_version): Likewise.
11218 (parse_xml_btrace_block): Likewise.
11219 (parse_xml_btrace_pt_config_cpu): Likewise.
11220 (parse_xml_btrace_pt): Likewise.
11221 (parse_xml_btrace_conf_bts): Likewise.
11222 (parse_xml_btrace_conf_pt): Likewise.
11223 * memory-map.c (memory_map_start_memory): Likewise.
11224 (memory_map_start_property): Likewise.
11225 * osdata.c (osdata_start_osdata): Likewise.
11226 (osdata_start_item): Likewise.
11227 (osdata_start_column): Likewise.
11228 * remote.c (start_thread): Likewise.
11229 * solib-aix.c (library_list_start_library): Likewise.
11230 (library_list_start_list): Likewise.
11231 * solib-svr4.c (library_list_start_library): Likewise.
11232 (svr4_library_list_start_list): Likewise.
11233 * solib-target.c (library_list_start_segment): Likewise.
11234 (library_list_start_section): Likewise.
11235 (library_list_start_library): Likewise.
11236 (library_list_start_list): Likewise.
11237 * tracepoint.c (traceframe_info_start_memory): Likewise.
11238 (traceframe_info_start_tvar): Likewise.
11239 * xml-syscall.c (syscall_start_syscall): Likewise.
11240 * xml-tdesc.c (tdesc_start_target): Likewise.
11241 (tdesc_start_feature): Likewise.
11242 (tdesc_start_reg): Likewise.
11243 (tdesc_start_union): Likewise.
11244 (tdesc_start_struct): Likewise.
11245 (tdesc_start_flags): Likewise.
11246 (tdesc_start_enum): Likewise.
11247 (tdesc_start_field): Likewise.
11248 (tdesc_start_enum_value): Likewise.
11249 (tdesc_start_vector): Likewise.
11250
f979c73f
SM
112512018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11252
11253 * extension.h (struct xmethod_worker) <clone>: Remove.
11254 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11255 Remove.
11256 (python_xmethod_worker::clone): Remove.
11257 * valops.c (find_overload_match): Use std::move instead of
11258 clone.
11259
ba18742c
SM
112602018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11261
11262 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11263 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11264 <free_xmethod_worker_data>: Remove.
11265 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11266 <get_xmethod_arg_types>: Remove.
11267 <get_xmethod_result_type>: Remove.
11268 <invoke_xmethod>: Remove.
11269 * extension.c (new_xmethod_worker): Remove.
11270 (clone_xmethod_worker): Remove.
11271 (get_matching_xmethod_workers): Return void, pass std::vector by
11272 pointer.
11273 (get_xmethod_arg_types): Rename to...
11274 (xmethod_worker::get_arg_types): ... this, and adjust.
11275 (get_xmethod_result_type): Rename to...
11276 (xmethod_worker::get_result_type): ... this, and adjust.
11277 (invoke_xmethod): Remove.
11278 (free_xmethod_worker): Remove.
11279 (free_xmethod_worker_vec): Remove.
11280 * extension.h (enum ext_lang_rc): Move here from
11281 extension-priv.h.
11282 (struct xmethod_worker): Add constructor and destructor.
11283 <data>: Remove.
11284 <value>: Remove.
11285 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11286 virtual pure methods.
11287 <get_arg_types, get_result_type>: New methods.
11288 (xmethod_worker_ptr): Remove typedef.
11289 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11290 (xmethod_worker_vec): Remove typedef.
11291 (xmethod_worker_up): New typedef.
11292 (invoke_xmethod): Remove.
11293 (clone_xmethod_worker): Remove.
11294 (free_xmethod_worker): Remove.
11295 (free_xmethod_worker_vec): Remove.
11296 (get_xmethod_arg_types): Remove.
11297 (get_xmethod_result_type): Remove.
11298 * valops.c (find_method_list): Use std::vector, don't use
11299 intermediate vector.
11300 (value_find_oload_method_list): Use std::vector.
11301 (find_overload_match): Use std::vector.
11302 (find_oload_champ): Use std::vector.
11303 * value.c (value_free): Use operator delete.
11304 (value_of_xmethod): Rename to...
11305 (value_from_xmethod): ... this. Don't assign
11306 xmethod_worker::value, take rvalue-reference.
11307 (result_type_of_xmethod): Adjust.
11308 (call_xmethod): Adjust.
11309 * value.h: Include extension.h.
11310 (struct xmethod_worker): Don't forward-declare.
11311 (value_of_xmethod): Rename to...
11312 (value_from_xmethod): ... this, take rvalue-reference.
11313 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11314 (struct python_xmethod_worker): ... this, add constructor and
11315 destructor.
11316 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11317 (gdbpy_free_xmethod_worker_data): Rename to...
11318 (python_xmethod_worker::~python_xmethod_worker): ... this and
11319 adjust.
11320 (gdbpy_clone_xmethod_worker_data): Rename to...
11321 (python_xmethod_worker::clone): ... this and adjust.
11322 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11323 temporary vector.
11324 (gdbpy_get_xmethod_arg_types): Rename to...
11325 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11326 (gdbpy_get_xmethod_result_type): Rename to...
11327 (python_xmethod_worker::do_get_result_type): ... this and
11328 adjust.
11329 (gdbpy_invoke_xmethod): Rename to...
11330 (python_xmethod_worker::invoke): ... this and adjust.
11331 (new_python_xmethod_worker): Rename to...
11332 (python_xmethod_worker::python_xmethod_worker): ... this and
11333 adjust.
11334 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11335 Remove.
11336 (gdbpy_free_xmethod_worker_data): Remove.
11337 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11338 (gdbpy_get_xmethod_arg_types): Remove.
11339 (gdbpy_get_xmethod_result_type): Remove.
11340 (gdbpy_invoke_xmethod): Remove.
11341 * python/python.c (python_extension_ops): Remove obsolete
11342 callbacks.
11343
e379cee6
PA
113442018-01-05 Pedro Alves <palves@redhat.com>
11345
11346 PR gdb/18653
11347 * common/signals-state-save-restore.c
11348 (save_original_signals_state): New parameter 'quiet'. Warn if we
11349 find a custom handler preinstalled, instead of internal erroring.
11350 But only warn if !quiet.
11351 * common/signals-state-save-restore.h
11352 (save_original_signals_state): New parameter 'quiet'.
11353 * main.c (captured_main_1): Move save_original_signals_state call
11354 after option handling, and pass QUIET.
11355
a655456c
PA
113562018-01-05 Pedro Alves <palves@redhat.com>
11357
11358 * spu-tdep.c (spu_catch_start): Pass
11359 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11360
de63c46b
PA
113612018-01-05 Pedro Alves <palves@redhat.com>
11362
11363 PR gdb/22670
11364 * ada-lang.c (literal_symbol_name_matcher): New function.
11365 (ada_get_symbol_name_matcher): Use it for
11366 symbol_name_match_type::SEARCH_NAME.
11367 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11368 it down instead of assuming symbol_name_match_type::FULL.
11369 * block.h (block_lookup_symbol): New parameter 'match_type'.
11370 * c-valprint.c (print_unpacked_pointer): Use
11371 lookup_symbol_search_name instead of lookup_symbol.
11372 * compile/compile-object-load.c (get_out_value_type): Pass down
11373 symbol_name_match_type::SEARCH_NAME.
11374 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11375 symbol_name_match_type::FULL.
11376 * cp-support.c (cp_get_symbol_name_matcher): Handle
11377 symbol_name_match_type::SEARCH_NAME.
11378 * infrun.c (insert_exception_resume_breakpoint): Use
11379 lookup_symbol_search_name.
11380 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11381 * psymtab.c (maintenance_check_psymtabs): Use
11382 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11383 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11384 SYMBOL_SEARCH_NAME.
11385 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11386 if symbol_name_match_type::SEARCH_NAME.
11387 (lookup_symbol_in_language): Pass down
11388 symbol_name_match_type::FULL.
11389 (lookup_symbol_search_name): New.
11390 (lookup_language_this): Pass down
11391 symbol_name_match_type::SEARCH_NAME.
11392 (lookup_symbol_aux, lookup_local_symbol): New parameter
11393 'match_type'. Pass it down.
11394 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11395 (lookup_symbol_search_name): New declaration.
11396 (lookup_symbol_in_block): New 'match_type' parameter.
11397
f98fc17b
PA
113982018-01-05 Pedro Alves <palves@redhat.com>
11399
11400 PR gdb/22670
11401 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11402 ada_lookup_symbol.
11403 (ada_lookup_symbol): Reimplement in terms of
11404 ada_lookup_symbol_list, bits factored out from
11405 ada_lookup_encoded_symbol.
11406
342f8240
JB
114072018-01-05 Joel Brobecker <brobecker@adacore.com>
11408
11409 * ada-exp.y (write_object_renaming): When subscripting an array
11410 using a symbol as the index, pass the block in call to
11411 ada_lookup_encoded_symbol when looking that symbol up.
11412
7150d33c
JG
114132018-01-05 Jerome Guitton <guitton@adacore.com>
11414
11415 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11416 TYPE_INDEX_TYPE.
11417
cc0e770c
JB
114182018-01-05 Joel Brobecker <brobecker@adacore.com>
11419
11420 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11421 the case where VALUE_LVAL (val0) is not lval_memory.
11422
f79da888 114232018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11424
11425 * ada-valprint.c (print_optional_low_bound): Handle
11426 character-indexed array printing like boolean-indexed array
11427 printing.
11428
cd385f94
JB
114292018-01-05 Joel Brobecker <brobecker@adacore.com>
11430
11431 * NEWS: Create a new section for the next release branch.
11432 Rename the section of the current branch, now that it has
11433 been cut.
11434
09aca949
JB
114352018-01-05 Joel Brobecker <brobecker@adacore.com>
11436
11437 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11438 * version.in: Bump version to 8.1.50.DATE-git.
11439
9f757bf7
XR
114402018-01-03 Xavier Roirand <roirand@adacore.com>
11441
11442 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11443 Add field.
11444 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11445 Add field.
11446 (default_exception_support_info) <catch_handlers_sym>: Add field.
11447 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11448 (ada_exception_name_addr_1): Add "catch handlers" handling.
11449 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11450 Update all callers.
11451 (create_excep_cond_exprs) <ex>: Add parameter.
11452 (re_set_exception): Update create_excep_cond_exprs call.
11453 (print_it_exception, print_one_exception, print_mention_exception)
11454 (print_recreate_exception): Add "catch handler" handling.
11455 (allocate_location_catch_handlers, re_set_catch_handlers)
11456 (check_status_catch_handlers, print_it_catch_handlers)
11457 (print_one_catch_handlers, print_mention_catch_handlers)
11458 (print_recreate_catch_handlers): New function.
11459 (catch_handlers_breakpoint_ops): New variable.
11460 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11461 Add parameter. Add "catch handler" handling.
11462 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11463 Add "catch handler" handling.
11464 (ada_exception_catchpoint_cond_string): Add "catch handler"
11465 handling.
11466 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11467 call.
11468 (catch_ada_handlers_command): New function.
11469 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11470 operations structure.
11471 (_initialize_ada_language): Add "catch handlers" command entry.
11472 * NEWS: Document "catch handlers" feature.
11473
9fe561ab
JB
114742018-01-02 Joel Brobecker <brobecker@adacore.com>
11475
11476 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11477 account when creating the array type of the slice.
11478 (ada_value_slice): Likewise.
11479
a405673c
JB
114802018-01-02 Joel Brobecker <brobecker@adacore.com>
11481
11482 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11483 New enum value.
11484 (create_array_type_with_stride): Add byte_stride_prop parameter.
11485 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11486 New parameter. Update all callers in this file.
11487 (array_type_has_dynamic_stride): New function.
11488 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11489 of arrays with dynamic byte strides.
11490 * dwarf2read.c (read_array_type): Add support for dynamic
11491 DW_AT_byte_stride attributes.
11492
74a2f8ff
JB
114932018-01-02 Joel Brobecker <brobecker@adacore.com>
11494
11495 * dwarf2read.c (read_unspecified_type): Treat
11496 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11497
e2882c85
JB
114982018-01-01 Joel Brobecker <brobecker@adacore.com>
11499
11500 Update copyright year range in all GDB files.
11501
1690bb24
JB
115022018-01-01 Joel Brobecker <brobecker@adacore.com>
11503
11504 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11505 and gdb/testsuite/gdb.base/step-line.c.
11506
0f0c98a8
JB
115072018-01-01 Joel Brobecker <brobecker@adacore.com>
11508
11509 * copyright.py (main): Dump the contents of
11510 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11511 even if BY_HAND is empty.
11512
82e1e79a
JB
115132018-01-01 Joel Brobecker <brobecker@adacore.com>
11514
11515 * top.c (print_gdb_version): Update Copyright year in version
11516 message.
11517
053f54e5 115182018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11519
053f54e5 11520 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11521
053f54e5 11522For older changes see ChangeLog-2017.
c906108c
SS
11523\f
11524Local Variables:
11525mode: change-log
11526left-margin: 8
11527fill-column: 74
11528version-control: never
57da7796 11529coding: utf-8
c906108c 11530End:
This page took 2.582923 seconds and 4 git commands to generate.