RISC-V: Add native linux support.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
90ad3654
JW
12018-08-09 Jim Wilson <jimw@sifive.com>
2
3c77f97e 3 * riscv-linux-nat.c: New file.
90ad3654
JW
4 * riscv-linux-tdep.c: New file.
5
aff4e175
AB
62018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
7
8 * infrun.c (resume): Make static, add forward declaration.
9 (proceed): Update header comment.
10 * infrun.h (resume): Delete declaration.
11
06ab9219
TT
122018-08-09 Tom Tromey <tom@tromey.com>
13
14 * riscv-tdep.h: Minor formatting fixes.
15
83c8d318
SM
162018-08-09 Simon Marchi <simon.marchi@ericsson.com>
17
18 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
19 * dwarf-index-cache.c (create_dir_and_check): Likewise.
20 (test_mkdir_recursive): Likewise.
21 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
22
5ff2bbae
AB
232018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
24
25 * valarith.c (value_subscripted_rvalue): If an array is not in
26 memory, and we don't know the upper bound, then we can't know that
27 the requested element exists or not.
28
fdbac7d8
SM
292018-08-08 Simon Marchi <simon.marchi@ericsson.com>
30
31 * target.c (str_comma_list_concat_elem): Fix typo in comment.
32 (target_options_to_string): Add comment.
33
83202f7a
TT
342018-08-08 Tom Tromey <tom@tromey.com>
35
36 * unittests/scoped_mmap-selftests.c: Check result of "write".
37
411baa47
JW
382018-08-08 Jim Wilson <jimw@sifive.com>
39
5c720ed8
JW
40 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
41 (decode_register_index_short): New.
42 (decode_j_type_insn, decode_cj_type_insn): New.
43 (decode_b_type_insn, decode_cb_type_insn): New.
44 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
45 local xlen. Check xlen when decoding ambiguous compressed insns. In
46 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
47 is_c_sw_insn instead of is_sw_insn.
48 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
49 (riscv_software_single_step): New.
50 * riscv-tdep.h (riscv_software_single_step): Declare.
51
411baa47
JW
52 * riscv-tdep.c (riscv_isa_xlen): Drop static.
53 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
54
9d4a934c
AB
552018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
56
57 PR gdb/18050:
58 * target.c (dispose_inferior): Don't dispose of inferiors that are
59 already killed.
60
ff36536c
SN
612018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
62
63 * remote.c (remote_target::download_tracepoint): Change char* to
64 const char*.
65
09ce46f2
SM
662018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
67
68 * target.h (target_options_to_string): Return an std::string.
69 * target.c (str_comma_list_concat_elem): Return void, use
70 std::string.
71 (do_option): Likewise.
72 (target_options_to_string): Return an std::string.
73 * linux-nat.c (linux_nat_target::wait): Adjust.
74 * target-debug.h (target_debug_print_options): Adjust.
75
9c612964
TT
762018-08-07 Tom Tromey <tom@tromey.com>
77
78 * Makefile.in (CPPFLAGS): New variable.
79 (INTERNAL_CPPFLAGS): Use it.
80
7d11235d
SM
812018-08-07 Simon Marchi <simon.marchi@ericsson.com>
82
83 * NEWS: Mention the index cache.
84
87d6a7aa
SM
852018-08-07 Simon Marchi <simon.marchi@ericsson.com>
86
87 * common/pathstuff.h (get_standard_cache_dir): New.
88 * common/pathstuff.c (get_standard_cache_dir): New.
89 * build-id.h (build_id_to_string): New.
90 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
91 DEBUG_STR_SUFFIX): Move to here.
92 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
93 DEBUG_STR_SUFFIX): Move from there.
94 (write_psymtabs_to_index): Make non-static, add basename
95 parameter. Write to temporary files, rename when done.
96 (save_gdb_index_command): Adjust call to
97 write_psymtabs_to_index.
98 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
99 field.
100 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
101 (get_gdb_index_contents_from_cache): New.
102 (get_gdb_index_contents_from_cache_dwz): New.
103 (dwarf2_initialize_objfile): Read index from cache.
104 (dwarf2_build_psymtabs): Save to index.
105 * dwarf-index-cache.h: New file.
106 * dwarf-index-cache.c: New file.
107 * dwarf-index-write.h: New file.
108
8a99096f
SM
1092018-08-07 Simon Marchi <simon.marchi@ericsson.com>
110
111 * gnulib/aclocal.m4: Re-generate.
112 * gnulib/config.in: Re-generate.
113 * gnulib/configure: Re-generate.
114 * gnulib/import/Makefile.am: Re-generate.
115 * gnulib/import/Makefile.in: Re-generate.
116 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
117 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
118 * gnulib/import/m4/mkdir.m4: New file.
119 * gnulib/import/mkdir.c: New file.
120 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
121 module.
122
5c831bb1
SM
1232018-08-07 Simon Marchi <simon.marchi@ericsson.com>
124
125 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
126 * common/scoped_mmap.c: New file.
127 * common/scoped_mmap.h (destroy): New method.
128 (~scoped_mmap, reset): Use destroy.
129 (scoped_mmap): New move constructor.
130 (mmap_file): New declaration.
131 * unittests/scoped_mmap-selftests.c (test_normal,
132 test_invalid_filename, run_tests): New functions.
133 (_initialize_scoped_mmap_selftests): Register selftest.
134
4485a1c1
SM
1352018-08-07 Simon Marchi <simon.marchi@ericsson.com>
136
137 * dwarf2read.c (read_gdb_index_from_section): Rename to...
138 (read_gdb_index_from_buffer): ... this. Remove section
139 parameter, add buffer parameter.
140 (get_gdb_index_contents_ftype,
141 get_gdb_index_contents_dwz_ftype): New typedefs.
142 (dwarf2_read_gdb_index): Add callback parameters to get the
143 index contents.
144 (get_gdb_index_contents_from_section): New.
145 (dwarf2_initialize_objfile): Update call to
146 dwarf2_read_gdb_index.
147
528e1572
SM
1482018-08-07 Simon Marchi <simon.marchi@ericsson.com>
149
150 * common/filestuff.h (gdb_fopen_cloexec): New overload.
151 (gdb_open_cloexec): Likewise.
152 * nat/linux-osdata.c (command_from_pid): Use string_printf.
153 (commandline_from_pid): Likewise.
154 (linux_xfer_osdata_threads): Likewise.
155 (linux_xfer_osdata_fds): Likewise.
156 * ada-lang.c (is_package_name): Likewise.
157 * auxv.c (procfs_xfer_auxv): Likewise.
158 * breakpoint.c (print_one_breakpoint_location): Use
159 uiout::field_fmt.
160 (print_one_catch_solib): Use string_printf.
161 * coff-pe-read.c (add_pe_exported_sym): Likewise.
162 (add_pe_forwarded_sym): Likewise.
163 * dwarf2read.c (create_type_unit_group): Likewise.
164 (build_error_marker_type): Likewise.
165 * infcall.c (get_function_name): Likewise.
166 * valprint.c (print_converted_chars_to_obstack): Likewise.
167 * xtensa-tdep.c (xtensa_register_type): Likewise.
168
a7f25a84
SM
1692018-08-06 Simon Marchi <simon.marchi@ericsson.com>
170
171 * remote.c (remote_target::download_tracepoint): Fix format
172 string errors.
173
296956be
PFC
1742018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
175
176 * tracefile.c: Include common/byte-vector.h.
177 (trace_save): Change type of buf to gdb::byte_vector. Initialize
178 with trace_regblock_size if needed. Update uses of buf.
179
a04b9d62
PFC
1802018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
181
182 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
183 std::vector<unsigned char>.
184 * tracepoint.c (collection_list::collection_list): Remove
185 m_regs_mask initializer from initializer list. Resize
186 m_regs_mask using the largest remote register number.
187 (collection_list::add_remote_register): Remove size check on
188 m_regs_mask. Use at to access element.
189 (collection_list::stringify): Change type of temp_buf to
190 gdb::char_vector. Update uses of temp_buf. Resize if needed to
191 stringify the register mask. Use pack_hex_byte for the register
192 mask.
193
4277c4b8
PFC
1942018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
195
196 * tracepoint.h (class collection_list) <add_register>: Remove.
197 <add_remote_register, add_ax_registers, add_local_register>:
198 Declare.
199 <add_memrange>: Add scope parameter.
200 * tracepoint.c (encode_actions_1): Likewise.
201 (collection_list::add_register): Rename to ...
202 (collection_list::add_remote_register): ... this. Update
203 comment.
204 (collection_list::add_ax_registers, add_local_register): New
205 methods.
206 (collection_list::add_memrange): Add scope parameter. Call
207 add_local_register instead of add_register.
208 (finalize_tracepoint_aexpr): New function.
209 (collection_list::collect_symbol): Update calls to add_memrange.
210 Call add_local_register instead of add_register. Call
211 add_ax_registers. Call finalize_tracepoint_aexpr.
212 (encode_actions_1): Get remote regnos for $reg action. Call
213 add_remote_register, add_ax_registers, and add_local_register.
214 Update call to add_memrange. Call finalize_tracepoint_aexpr.
215 (validate_actionline): Call finalize_tracepoint_aexpr.
216
3df3a985
PFC
2172018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
218
219 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
220 Replace array buf with gdb::char_vector buf, of size
221 get_remote_packet_size (). Replace references to buf and
222 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
223 and xsnprintf with snprintf. Raise errors if the buffer is too
224 small.
225
aa6f3694
PFC
2262018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
227
228 * remote.c (remote_target::download_tracepoint): Fix the has_more
229 predicate in the QTDP action list iteration.
230
05abfc39
PFC
2312018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
232
233 * remote.c (remote_target::download_tracepoint): Fix indentation
234 in for block.
235
821a2682
RO
2362018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
237
238 * proc-api.c (_initialize_proc_api): Remove c, unused.
239 * procfs.c (procfs_init_inferior): Remove signals, unused.
240 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
241 unused.
242
95347337
AB
2432018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
244 Andrew Burgess <andrew.burgess@embecosm.com>
245
246 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
247 'W_STOPCODE (0)' as this could be ambiguous.
248
425699f5
SDJ
2492018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
250
251 * ser-tcp.c (net_open): Fix thinko when deciding whether to
252 disable TCP's Nagle algorithm (use "ai_protocol" instead of
253 "ai_socktype").
254
3e1d3d8c
TT
2552018-08-02 Tom Tromey <tom@tromey.com>
256
257 PR symtab/16842.
258 * dwarf2read.c (read_func_scope): Set symtab on template parameter
259 symbols.
260 (process_structure_scope): Likewise.
261
15843549
XR
2622018-08-02 Xavier Roirand <roirand@adacore.com>
263
264 PR gdb/22629:
265 * darwin-nat.c (darwin_kill_inferior): Fix handling of
266 kill inferior.
267
b5bddbbb
TT
2682018-08-02 Tom Tromey <tom@tromey.com>
269
270 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
271 (darwin_suspend_inferior, darwin_resume_inferior)
272 (darwin_decode_notify_message, darwin_resume_inferior_threads)
273 (darwin_check_new_threads): Check result of get_darwin_inferior.
274
f61cfa07
JB
2752018-07-31 Joel Brobecker <brobecker@adacore.com>
276
277 GDB 8.1.1 released.
278
5abe0f0c
JV
2792018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
280
281 * varobj.c (varobj_get_path_expr_parent): Report an error if
282 parent is a dynamic varobj.
283
472fa5ee
SM
2842018-07-31 Simon Marchi <simon.marchi@ericsson.com>
285
286 * gnulib/aclocal.m4: Re-generate.
287 * gnulib/config.in: Re-generate.
288 * gnulib/configure: Re-generate.
289 * gnulib/import/Makefile.in: Re-generate.
290 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
291 * gnulib/import/m4/onceonly.m4: Re-generate.
292
1c28969e
SM
2932018-07-31 Simon Marchi <simon.marchi@ericsson.com>
294
295 * target-descriptions.c (struct xml_test_tdesc): New.
296 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
297 (record_xml_tdesc): Update.
298 (maintenance_check_xml_descriptions): Update.
299 * target-descriptions.h (record_xml_tdesc): Update comment.
300
c8f2dc0d
AB
3012018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
302
303 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
304 checking array bounds are defined.
305
463c08d1
TT
3062018-07-30 Tom Tromey <tom@tromey.com>
307
308 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
309 irreflexivity violation.
310
dba7455e
TT
3112018-07-30 Tom Tromey <tom@tromey.com>
312
313 * cli/cli-decode.c (lookup_cmd): Remove lint code.
314 * value.c (unpack_long): Remove lint code.
315 * valops.c (value_ind): Remove lint code.
316 * valarith.c (value_x_binop, value_x_unop, value_equal)
317 (value_pos): Remove lint code.
318
37cc0cae
TV
3192018-07-28 Tom de Vries <tdevries@suse.de>
320
321 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
322 with undefined upper bound as <optimized out>.
323
129eb0f1
SDJ
3242018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
325
326 * gcore.in: Rename variable "name" to "prefix". Expand
327 "usage" text.
328
6af79d7b
JT
3292018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
330
331 * windows-nat.c (windows_nat_target::create_inferior): Update to
332 call close() in global namespace.
333
79748972
TT
3342018-07-26 Tom Tromey <tom@tromey.com>
335
336 * dwarf-index-write.c (add_address_entry): Don't add objfile
337 offsets.
338 * dbxread.c (find_stab_function): Rename from
339 find_stab_function_addr. Return a bound_minimal_symbol.
340 (read_dbx_symtab): Use raw_text_low, raw_text_high.
341 Don't add objfile offsets.
342 (end_psymtab): Use raw_text_low, raw_text_high,
343 MSYMBOL_VALUE_RAW_ADDRESS.
344 (read_ofile_symtab): Update.
345 (process_one_symbol): Update.
346 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
347 offsets.
348 (dw2_relocate): Remove.
349 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
350 searching addrmap.
351 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
352 Update.
353 (process_psymtab_comp_unit_reader, add_partial_symbol)
354 (add_partial_subprogram, dwarf2_ranges_read): Update.
355 (load_partial_dies): Update.
356 (add_address_entry): Don't add objfile offsets.
357 (dwarf2_build_include_psymtabs): Update.
358 (create_addrmap_from_aranges): Don't add objfile offsets.
359 (dw2_find_pc_sect_compunit_symtab): Update.
360 * mdebugread.c (parse_symbol): Don't add objfile offsets.
361 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
362 Update.
363 (parse_partial_symbols): Don't add objfile offsets. Use
364 raw_text_low, raw_text_high. Update.
365 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
366 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
367 or call 'relocate' quick function. Clear psymbol_map.
368 * psympriv.h (struct partial_symbol) <address>: Add section
369 offset.
370 <set_unrelocated_address>: Rename from set_address.
371 <raw_text_low, raw_text_high>: New methods.
372 <text_low, text_high>: Add objfile parameter.
373 (add_psymbol_to_bcache): Add 'section' parameter. Call
374 set_unrelocated_address.
375 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
376 (find_pc_psymbol): Update.
377 (fixup_psymbol_section, relocate_psymtabs): Remove.
378 (dump_psymtab, psym_functions): Update.
379 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
380 parameter.
381 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
382 (start_psymtab_common): Update.
383 * symfile-debug.c (debug_qf_relocate): Remove.
384 (debug_sym_quick_functions): Update.
385 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
386 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
387 Update.
388
52948f01
TT
3892018-07-26 Tom Tromey <tromey@redhat.com>
390
391 * dbxread.c (end_psymtab): Use text_high_valid and
392 text_low_valid.
393 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
394 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
395 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
396 Update comment.
397 <text_low_valid, text_high_valid>: New fields.
398 <set_text_low, set_text_high>: Update.
399 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
400
4ae976d1
TT
4012018-07-26 Tom Tromey <tom@tromey.com>
402
403 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
404 Update.
405 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
406 textlow and texthigh fields.
407 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
408 Update.
409 * mdebugread.c (parse_lines, parse_partial_symbols)
410 (psymtab_to_symtab_1): Update.
411 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
412 Rename fields. Update comment. Now private.
413 <text_low, text_high, set_text_low, set_text_high>: New methods.
414 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
415 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
416 (start_psymtab_common, maintenance_info_psymtabs)
417 (maintenance_check_psymtabs): Update.
418 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
419 texthigh fields.
420 (scan_xcoff_symtab): Update.
421
02e9e7f7
TT
4222018-07-26 Tom Tromey <tromey@redhat.com>
423
424 * psympriv.h (struct partial_symbol) <unrelocated_address,
425 address, set_address>: New methods.
426 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
427 (fixup_psymbol_section, relocate_psymtabs): Update.
428 (print_partial_symbols): Add 'objfile' parameter. Update.
429 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
430 Update.
431
8a6d4234
TT
4322018-07-26 Tom Tromey <tom@tromey.com>
433
434 * dwarf-index-write.c (write_psymbols, debug_names::insert)
435 (debug_names::write_psymbols): Update.
436 * psympriv.h (struct partial_symbol): Derive from
437 general_symbol_info.
438 <obj_section>: New method.
439 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
440 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
441 (find_pc_sect_psymbol, fixup_psymbol_section)
442 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
443 (print_partial_symbols, recursively_search_psymtabs)
444 (compare_psymbols, psymbol_hash, psymbol_compare)
445 (add_psymbol_to_bcache, maintenance_check_psymtabs)
446 (psymbol_name_matches, psym_fill_psymbol_map): Update.
447
08994e1d
TT
4482018-07-26 Tom Tromey <tromey@redhat.com>
449
450 * dbxread.c (end_psymtab): Remove dead code.
451
3c3bb058
AB
4522018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
453
454 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
455 DWARF unwinders are disabled.
456 * dwarf2-frame.c: Add dwarf2read.h include.
457 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
458 disabled.
459 (dwarf2_frame_unwinders_enabled_p): Define.
460 (show_dwarf_unwinders_enabled_p): New function.
461 (_initialize_dwarf2_frame): Register switch to control DWARF
462 unwinder use.
463 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
464 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
465 (show_dwarf_cmdlist): Remove static keyword.
466 * dwarf2read.h (set_dwarf_cmdlist): Declare.
467 (show_dwarf_cmdlist): Declare.
468 * NEWS: Document new feature.
469
9e7f3bbb
TV
4702018-07-26 Tom de Vries <tdevries@suse.de>
471
472 PR breakpoints/23366
473 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
474
506f5c41
TV
4752018-07-26 Tom de Vries <tdevries@suse.de>
476
477 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
478 DW_AT_count can't be translated to a dynamic prop.
479
16f808ec
TV
4802018-07-25 Tom de Vries <tdevries@suse.de>
481
482 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
483 try/catch.
484
d7154a8d
JV
4852018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
486
487 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
488
a45389f6
JB
4892018-07-25 Joel Brobecker <brobecker@adacore.com>
490
491 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
492
380618d6
KS
4932018-07-24 Keith Seitz <keiths@redhat.comt
494
495 PR symtab/23010
496 * dwarf2read.c (dw2_add_symbol_to_list): New function.
497 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
498 instead of add_symbol_to_list.
499 (read_file_scope): Call prepare_one_comp_unit before reading
500 any other DIEs.
501
4b17aefe
SM
5022018-07-24 Simon Marchi <simon.marchi@ericsson.com>
503
504 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
505
29d17e47
TT
5062018-07-24 Tom Tromey <tom@tromey.com>
507
508 * utils.c (malloc, realloc, free): Don't declare.
509 * configure, config.in: Rebuild.
510 * configure.ac: Don't check for declarations of free, malloc, or
511 realloc.
512
cf4088a9
SM
5132018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
514
515 * aarch64-linux-nat.c
516 (aarch64_linux_nat_target::stopped_data_address): Remove unused
517 variable.
518 * arm-linux-nat.c (fetch_regs): Likewise.
519 (store_regs): Likewise.
520 (fetch_vfp_regs): Likewise.
521 (store_vfp_regs): Likewise.
522 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
523 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
524 (arm_linux_nat_target::insert_watchpoint): Likewise.
525 (arm_linux_nat_target::remove_watchpoint): Likewise.
526 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
527 Likewise.
528 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
529 Likewise.
530 * ppc-linux-nat.c (fetch_register): Likewise.
531 (fetch_all_gp_regs): Likewise.
532 (fetch_ppc_registers): Likewise.
533 (store_all_gp_regs): Likewise.
534 (store_ppc_registers): Likewise.
535 (hwdebug_insert_point): Likewise.
536 (can_use_watchpoint_cond_accel): Likewise.
537 * remote-sim.c (gdb_os_write_stdout): Likewise.
538
a0de763e
TT
5392018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
540 Tom Tromey <tom@tromey.com>
541
542 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
543 test for it.
544 * configure: Rebuild.
545
3b20124b
TT
5462018-07-22 Tom Tromey <tom@tromey.com>
547
548 * regformats/regdat.sh: Define xmltarget_${name} inside
549 #ifndef IN_PROCESS_AGENT.
550
8c8807f4
TT
5512018-07-22 Tom Tromey <tom@tromey.com>
552
553 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
554
c486b610
TT
5552018-07-22 Tom Tromey <tom@tromey.com>
556
557 * symfile.c (reread_symbols): Notify iter, not objfile.
558
494f80a9
TT
5592018-07-22 Tom Tromey <tom@tromey.com>
560
561 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
562 Use arch_ops.
563 (ravenscar_thread_target::prepare_to_store): Likewise.
564
c51f6a54
TT
5652018-07-22 Tom Tromey <tom@tromey.com>
566
567 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
568 unused variable. Call value_fetch_lazy when needed.
569 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
570 Remove unused variable. Call value_fetch_lazy when needed.
571
374fd1fd
TT
5722018-07-22 Tom Tromey <tom@tromey.com>
573
574 * m32c-tdep.c (mark_dma): Return void.
575 (make_regs): Remove unused declarations.
576
d5e9a511
TT
5772018-07-22 Tom Tromey <tom@tromey.com>
578
579 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
580 cmdscm_get_valid_command_smob_arg_unsafe for effect.
581 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
582 bkscm_get_valid_block_smob_arg_unsafe for effect.
583
996d693a
TT
5842018-07-22 Tom Tromey <tom@tromey.com>
585
586 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
587 value_type.
588
15766370
TT
5892018-07-22 Tom Tromey <tom@tromey.com>
590
591 * windows-nat.c (saved_context): Conditionally define.
592 * remote.c (remote_target::remote_btrace_maybe_reopen):
593 Conditionally declare "warned".
594 * inflow.c (sigquit_ours): Conditionally define.
595 (new_tty): Move "tty" declaration inside #if.
596 * guile/guile.c (guile_datadir): Conditionally define.
597 * charset.c (set_be_le_names): Move some declarations inside #if.
598 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
599 #if.
600 (parse_xml_btrace_conf): Likewise.
601
f4e80e13
TT
6022018-07-22 Tom Tromey <tom@tromey.com>
603
604 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
605
8d49165d
TT
6062018-07-22 Tom Tromey <tom@tromey.com>
607
608 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
609 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
610 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
611 * buildsym-legacy.c (get_macro_table): Remove unused variable.
612 * stack.c (frame_apply_level_command): Remove unused variable.
613 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
614 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
615 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
616 unused variable.
617 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
618 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
619 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
620 variable.
621 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
622 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
623 variable.
624 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
625 Remove unused variable.
626 * cli/cli-script.c (recurse_read_control_structure): Remove unused
627 variable.
628 * common/tdesc.c (print_xml_feature::visit): Remove unused
629 variable.
630 * compile/compile-object-load.c (store_regs): Remove unused
631 variables.
632 * complaints.c (clear_complaints): Remove unused variable.
633 * corelow.c (core_target_open): Remove unused variable.
634 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
635 variable.
636 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
637 variable.
638 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
639 variable.
640 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
641 variable.
642 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
643 variable.
644 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
645 variable.
646 * ia64-tdep.c (examine_prologue): Remove unused variable.
647 * infcall.c (run_inferior_call): Remove unused variable.
648 * inferior.c (exit_inferior): Remove unused variable.
649 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
650 * linespec.c (decode_line_2): Remove unused variable.
651 * linux-nat.c (super_close): Remove.
652 * linux-tdep.c (linux_info_proc): Remove unused variable.
653 * mi/mi-main.c (mi_execute_command): Remove unused variable.
654 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
655 Remove unused variable.
656 * parse.c (find_minsym_type_and_address): Remove unused variable.
657 * printcmd.c (info_symbol_command, printf_floating): Remove unused
658 variable.
659 * python/py-breakpoint.c (bppy_set_commands): Remove unused
660 variable.
661 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
662 variables.
663 * record-btrace.c (record_btrace_target::store_registers): Remove
664 unused variable.
665 (cmd_show_record_btrace_cpu): Remove unused variable.
666 * riscv-tdep.c (riscv_register_reggroup_p)
667 (riscv_push_dummy_call, riscv_return_value): Remove unused
668 variable.
669 * rust-exp.y (literal): Remove unused variable.
670 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
671 unused variable.
672 <STRUCTOP_ANONYMOUS>: Likewise.
673 * s390-linux-tdep.c (s390_linux_init_abi_31)
674 (s390_linux_init_abi_64): Remove unused variable.
675 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
676 (file_select_thread, net_windows_open, _initialize_ser_windows):
677 Remove unused variables.
678 * symtab.c (find_pc_sect_line): Remove unused variable.
679 * target-memory.c (compute_garbled_blocks): Remove unused
680 variable.
681 (target_write_memory_blocks): Remove unused variable.
682 * target.c (target_stack::unpush): Remove unused variables.
683 * tracepoint.c (start_tracing, all_tracepoint_actions)
684 (merge_uploaded_trace_state_variables)
685 (print_one_static_tracepoint_marker): Remove unused variable.
686 * unittests/basic_string_view/element_access/char/1.cc (test01):
687 Remove unused variable.
688 * windows-nat.c (windows_continue, windows_add_all_dlls)
689 (do_initial_windows_stuff, windows_nat_target::create_inferior):
690 Remove unused variables.
691
17cbafdb
SM
6922018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
693
694 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
695 attr_profile in HAVE_ELF.
696 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
697 HAVE_ELF.
698
0ee6c332
SM
6992018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
700
701 * frame.c (frame_register_unwind): Change parameter name.
702 (frame_unwind_register): Likewise.
703 (frame_unwind_register_value): Likewise.
704 (frame_unwind_register_signed): Likewise.
705 (frame_unwind_register_unsigned): Likewise.
706 * frame.h (frame_register_unwind): Likewise.
707 (frame_unwind_register): Likewise.
708 (frame_unwind_register_value): Likewise.
709 (frame_unwind_register_signed): Likewise.
710 (frame_unwind_register_unsigned): Likewise.
711 (frame_unwind_arch): Likewise.
712
e2e31f10
MR
7132018-07-20 Maciej W. Rozycki <macro@mips.com>
714
715 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
716 ISA maintenance.
717
2d389915
MR
7182018-07-20 Maciej W. Rozycki <macro@mips.com>
719
720 * mips-linux-nat.c (mips_linux_nat_target::read_description):
721 Call `get_ptrace_pid' rather than extracting the ptrace PID by
722 hand.
723
cbb09508
KS
7242018-07-20 Keith Seitz <keiths@redhat.com>
725
726 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
727 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
728 m_compunit_symtab, m_language>: Add "m_" prefix.
729 Update all uses.
730 * buildsym.c: Update all uses.
731
bfe2e011
TT
7322018-07-20 Tom Tromey <tom@tromey.com>
733
734 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
735 * buildsym.h (record_line_ftype): Remove typedef.
736
0e6f3061
TT
7372018-07-20 Tom Tromey <tom@tromey.com>
738
739 * buildsym-legacy.h (augment_type_symtab): Don't declare.
740 (end_expandable_symtab): Likewise.
741 (end_symtab_get_static_block): Likewise.
742 (end_symtab_from_static_block): Likewise.
743 * buildsym-legacy.c (augment_type_symtab): Remove.
744 (end_expandable_symtab): Remove.
745 (end_symtab_get_static_block): Remove.
746 (end_symtab_from_static_block): Remove.
747
804d2729
TT
7482018-07-20 Tom Tromey <tom@tromey.com>
749
750 * dwarf2read.c: Include buildsym.h.
751 (struct dwarf2_cu) <builder>: New method.
752 (fixup_go_packaging): Update.
753 (process_full_comp_unit, process_full_type_unit): Update. Don't
754 use scoped_free_pendings.
755 (using_directives): Add "cu" parameter, remove "language".
756 (read_import_statement, setup_type_unit_groups, )
757 (read_func_scope, read_lexical_block_scope)
758 (dwarf2_record_block_ranges, read_namespace): Update.
759 (lnp_state_machine::lnp_state_machine): Add cu parameter.
760 (lnp_state_machine::handle_end_sequence): Update.
761 (class lnp_state_machine) <m_cu>: New member.
762 <m_record_line_callback>: Remove.
763 <m_currently_recording_lines>: New member.
764 (lnp_state_machine::handle_set_file): Update.
765 (noop_record_line): Remove.
766 (dwarf_record_line_p): Add cu parameter.
767 (dwarf_record_line_1, dwarf_finish_line): Likewise.
768 (lnp_state_machine::record_line)
769 (lnp_state_machine::lnp_state_machine)
770 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
771 (dwarf_decode_lines): Update.
772 (dwarf2_start_subfile): Add cu parameter.
773 (dwarf2_start_symtab, new_symbol): Update.
774 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
775 Remove dwarf2_per_objfile parameter.
776 (dwarf_decode_macros): Update.
777
80e649fc
TT
7782018-07-20 Tom Tromey <tom@tromey.com>
779
780 * stabsread.c (define_symbol): Update.
781 * buildsym-legacy.h (get_buildsym_compunit): Declare.
782 * dwarf2read.c (new_symbol): Update.
783 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
784 * cp-namespace.c: Include buildsym.h.
785 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
786 * buildsym-legacy.c (get_buildsym_compunit): New function.
787
0baae8db
TT
7882018-07-20 Tom Tromey <tom@tromey.com>
789
790 * xcoffread.c: Include buildsym-legacy.h.
791 * windows-nat.c: Include buildsym-legacy.h.
792 * stabsread.c: Include buildsym-legacy.h.
793 * mdebugread.c: Include buildsym-legacy.h.
794 * buildsym-legacy.h: New file.
795 * buildsym-legacy.c: New file, from buildsym.c.
796 * go32-nat.c: Include buildsym-legacy.h.
797 * dwarf2read.c: Include buildsym-legacy.h.
798 * dbxread.c: Include buildsym-legacy.h.
799 * cp-namespace.c: Include buildsym-legacy.h.
800 * coffread.c: Include buildsym-legacy.h.
801 * buildsym.h: Move some contents to buildsym-legacy.h.
802 * buildsym.c: Include buildsym-legacy.h. Move many functions to
803 buildsym-legacy.c.
804 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
805
ab209f6f
TT
8062018-07-20 Tom Tromey <tom@tromey.com>
807
808 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
809 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
810 (buildsym_compunit::buildsym_compunit)
811 (buildsym_compunit::~buildsym_compunit)
812 (buildsym_compunit::get_macro_table): Define.
813
74c72eac
TT
8142018-07-20 Tom Tromey <tom@tromey.com>
815
816 * buildsym.c (reset_symtab_globals): Remove.
817 (buildsym_compunit::end_symtab_from_static_block): Update.
818 (buildsym_compunit::augment_type_symtab): Update.
819 (end_symtab_from_static_block): Call free_buildsym_compunit.
820 (augment_type_symtab, end_symtab, end_expandable_symtab):
821 Likewise.
822
da6580e5
TT
8232018-07-20 Tom Tromey <tom@tromey.com>
824
825 * arch-utils.c: Do not include buildsym.h.
826 * mipsread.c: Do not include buildsym.h.
827 * machoread.c: Do not include buildsym.h.
828 * elfread.c: Do not include buildsym.h.
829
4a2125f5
TT
8302018-07-20 Tom Tromey <tom@tromey.com>
831
832 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
833 initialization.
834 (buildsym_compunit): Add new constructor.
835 (struct buildsym_compunit) <get_last_source_file, finish_block,
836 record_block_range, start_subfile, patch_subfile_names,
837 push_subfile, pop_subfile, record_line, get_compunit_symtab,
838 set_last_source_start_addr, get_last_source_start_addr,
839 get_local_using_directives, set_local_using_directives,
840 get_global_using_directives, outermost_context_p,
841 get_current_context_stack, get_context_stack_depth,
842 get_current_subfile, get_local_symbols, get_file_symbols,
843 get_global_symbols, record_debugformat, record_producer,
844 push_context, pop_context, end_symtab_get_static_block,
845 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
846 New public methods.
847 <record_pending_block, finish_block_internal, make_blockvector,
848 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
849 private methods.
850 Update all users.
851
8522018-05-22 Tom Tromey <tom@tromey.com>
853
854 * buildsym.c (record_pending_block): Move earlier. Remove objfile
855 parameter.
856 (finish_block_internal): Update.
857
6b213a47
TT
8582018-07-20 Tom Tromey <tom@tromey.com>
859
860 * buildsym.c (record_pending_block): Move earlier. Remove objfile
861 parameter.
862 (finish_block_internal): Update.
863
b80a981d
TT
8642018-07-20 Tom Tromey <tom@tromey.com>
865
866 * buildsym.h (EXTERN): Don't define or undef.
867 * buildsym.c (EXTERN): Don't define.
868
ddb70602
TT
8692018-07-20 Tom Tromey <tom@tromey.com>
870
871 * buildsym.c: Remove TODO comment.
872
b37dd3bc
TT
8732018-07-20 Tom Tromey <tom@tromey.com>
874
875 * coffread.c (coff_symtab_read): Update.
876 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
877 (xcoff_new_init): Update.
878 * mipsread.c (mipscoff_new_init): Update.
879 * mdebugread.c (mdebug_build_psymtabs): Update.
880 * elfread.c (elf_new_init): Update.
881 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
882 Update.
883 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
884 (coffstab_build_psymtabs, elfstab_build_psymtabs)
885 (stabsect_build_psymtabs): Update.
886 * buildsym.h (buildsym_init): Don't declare.
887 * buildsym.c: Update comment.
888 (prepare_for_building): Remove.
889 (start_symtab, restart_symtab): Update.
890 (reset_symtab_globals): Update comment.
891 (buildsym_init): Remove.
892
e148f09d
TT
8932018-07-20 Tom Tromey <tom@tromey.com>
894
895 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
896 * stabsread.c (patch_block_stabs, define_symbol, read_type)
897 (read_enum_type, common_block_start, common_block_end)
898 (cleanup_undefined_types_1, finish_global_stabs): Update.
899 * mdebugread.c (psymtab_to_symtab_1): Update.
900 * dwarf2read.c (fixup_go_packaging, read_func_scope)
901 (read_lexical_block_scope, new_symbol): Update.
902 * dbxread.c (process_one_symbol): Update.
903 * coffread.c (coff_symtab_read, process_coff_symbol)
904 (coff_read_enum_type): Update.
905 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
906 declare.
907 (get_local_symbols, get_file_symbols, get_global_symbols): New
908 functions.
909 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
910 m_global_symbols.
911 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
912 (~scoped_free_pendings): Update.
913 (finish_block, prepare_for_building, reset_symtab_globals)
914 (end_symtab_get_static_block, end_symtab_with_blockvector)
915 (augment_type_symtab, push_context): Update.
916 (get_local_symbols, get_file_symbols, get_global_symbols): New
917 functions.
918 (buildsym_init): Update.
919
93b8bea4
TT
9202018-07-20 Tom Tromey <tom@tromey.com>
921
922 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
923 (process_full_type_unit): Likewise.
924 (dwarf2_start_symtab): Set list_in_scope.
925
f62f6af5
TT
9262018-07-20 Tom Tromey <tom@tromey.com>
927
928 * dwarf2read.c (process_psymtab_comp_unit_reader)
929 (build_type_psymtabs_reader): Do not set list_in_scope.
930
1d376700
TT
9312018-07-20 Tom Tromey <tom@tromey.com>
932
933 * buildsym.c (free_pendings): Remove.
934 (add_symbol_to_list, scoped_free_pendings)
935 (finish_block_internal, buildsym_init): Update.
936
c233e9c6
TT
9372018-07-20 Tom Tromey <tom@tromey.com>
938
939 * xcoffread.c (read_xcoff_symtab): Update.
940 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
941 Update.
942 * dbxread.c (process_one_symbol): Update.
943 * coffread.c (coff_symtab_read): Update.
944 * buildsym.h (finish_block): Update.
945 * buildsym.c (finish_block): Remove "listhead" argument.
946 (end_symtab_get_static_block): Update.
947
5ac04550
TT
9482018-07-20 Tom Tromey <tom@tromey.com>
949
950 * buildsym.h (class scoped_free_pendings): Remove constructor.
951 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
952 method.
953 <m_pending_block_obstack, m_pending_blocks>: New members.
954 (pending_block_obstack, pending_blocks): Remove.
955 (scoped_free_pendings::scoped_free_pendings): Default.
956 (~scoped_free_pendings): Update.
957 (free_pending_blocks): Remove.
958 (finish_block_internal, record_pending_block, make_blockvector)
959 (end_symtab_get_static_block, augment_type_symtab, push_context)
960 (buildsym_init): Update.
961
7ea05a7b
TT
9622018-07-20 Tom Tromey <tom@tromey.com>
963
964 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
965 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
966 members.
967 (pending_addrmap, pending_addrmap_obstack)
968 (pending_addrmap_interesting): Remove.
969 (scoped_free_pendings, record_block_range, make_blockvector)
970 (prepare_for_building, reset_symtab_globals, buildsym_init):
971 Update.
972
3c65e5b3
TT
9732018-07-20 Tom Tromey <tom@tromey.com>
974
975 * xcoffread.c (process_linenos): Update.
976 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
977 * mdebugread.c (psymtab_to_symtab_1): Update.
978 * dwarf2read.c (setup_type_unit_groups)
979 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
980 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
981 * dbxread.c (process_one_symbol): Update.
982 * coffread.c (coff_symtab_read, enter_linenos)
983 (process_coff_symbol): Update.
984 * buildsym.h (current_subfile): Don't declare.
985 (get_current_subfile): Declare.
986 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
987 member.
988 (start_subfile, free_buildsym_compunit, push_subfile)
989 (prepare_for_building, start_symtab): Update.
990 (get_current_subfile): New function.
991
a60f3166
TT
9922018-07-20 Tom Tromey <tom@tromey.com>
993
994 * coffread.c (coff_symtab_read): Update.
995 * xcoffread.c (read_xcoff_symtab): Update.
996 * dwarf2read.c (new_symbol): Update.
997 (read_func_scope, read_lexical_block_scope): Update.
998 * dbxread.c (process_one_symbol): Update.
999 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1000 (outermost_context_p): Remove macro.
1001 (outermost_context_p, get_current_context_stack)
1002 (get_context_stack_depth): Declare.
1003 (pop_context): Return struct context_stack.
1004 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1005 member.
1006 (context_stack_size): Remove.
1007 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1008 (prepare_for_building, end_symtab_get_static_block)
1009 (augment_type_symtab, push_context): Update.
1010 (pop_context): Return struct context_stack.
1011 (outermost_context_p, get_current_context_stack)
1012 (get_context_stack_depth): New functions.
1013 (buildsym_init): Update.
1014
56ba65a0
TT
10152018-07-20 Tom Tromey <tom@tromey.com>
1016
1017 * rust-exp.y: Now a pure parser. Update all rules.
1018 (%union): Move earlier.
1019 (current_parser, work_obstack): Remove globals.
1020 (rust_parser, ~rust_parser): Update.
1021 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1022 lex_character, lex_number, lex_string, lex_identifier,
1023 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1024 convert_name, convert_params_to_expression,
1025 convert_ast_to_expression, ast_basic_type, ast_operation,
1026 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1027 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1028 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1029 ast_array_type, ast_slice_type, ast_reference_type,
1030 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1031 (rust_parse): Update.
1032 (rustyyerror, rustyylex): Add parser parameter.
1033 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1034 (rust_lex_stringish_test, rust_lex_test_sequence)
1035 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1036 (rust_lex_test_push_back, rust_lex_tests): Update.
1037
4c693332
PA
10382018-07-19 Pedro Alves <palves@redhat.com>
1039
1040 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1041 gdb::unique_xmalloc_ptr.
1042 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1043 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1044 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1045 copy-initialization.
1046 * guile/scm-pretty-print.c (ppscm_print_children): Use
1047 gdb::unique_xmalloc_ptr instead of cleanups.
1048 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1049 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1050 gdb::unique_xmalloc_ptr.
1051 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1052 Adjust to use gdb::unique_xmalloc_ptr.
1053 * guile/scm-utils.c (extract_arg): Adjust.
1054 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1055 gdb::unique_xmalloc_ptr instead of a cleanup.
1056
4581dc82
TT
10572018-07-19 Tom Tromey <tom@tromey.com>
1058
1059 * utils.c (do_value_free_to_mark)
1060 (make_cleanup_value_free_to_mark): Remove.
1061 * utils.h (make_cleanup_value_free_to_mark): Remove.
1062
43cc6c3a
PA
10632018-07-19 Pedro Alves <palves@redhat.com>
1064
1065 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1066 forwarding reference.
1067
3a5f2a48
PA
10682018-07-18 Pedro Alves <palves@redhat.com>
1069
1070 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1071 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1072 cleanup.
1073
557e56be
PA
10742018-07-18 Pedro Alves <palves@redhat.com>
1075
1076 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1077 exceptions.
1078 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1079 (gdbscm_wrap): New.
1080 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1081 directly instead of a cleanup.
1082 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1083 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1084 (vlscm_binop_gdbthrow): New, factored out from ...
1085 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1086 (vlscm_rich_compare): Use gdbscm_wrap.
1087 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1088 instead of a cleanup.
1089 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1090 cleanup.
1091 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1092 Use xfree directly instead of a cleanup.
1093 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1094 Adjust to use gdbscm_wrap and scoped_value_mark.
1095 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1096 (gdbscm_value_address, gdbscm_value_dereference)
1097 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1098 scoped_value_mark.
1099 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1100 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1101 scoped_value_mark.
1102 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1103 gdbscm_wrap and scoped_value_mark.
1104 (gdbscm_value_to_string): Use xfree directly instead of a
1105 cleanup. Move 'buffer' unique_ptr to TRY scope.
1106 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1107 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1108 scoped_value_mark.
1109 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1110 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1111 scoped_value_mark.
1112 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1113 gdbscm_wrap.
1114
42dc7699
TV
11152018-07-18 Tom de Vries <tdevries@suse.de>
1116
1117 * findvar.c (default_read_var_value): Also resolve dynamic type for
1118 LOC_OPTIMIZED_OUT vars.
1119
6592ceed
MR
11202018-07-18 Maciej W. Rozycki <macro@mips.com>
1121
1122 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1123 decoding.
1124
c6c6149a
TT
11252018-07-17 Tom Tromey <tom@tromey.com>
1126
1127 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1128 (compute_enum_list, pascm_set_param_value_x)
1129 (gdbscm_parameter_value): Update.
1130 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1131 (gdbscm_scm_to_host_string): Update.
1132 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1133 Update.
1134 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1135 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1136 * guile/scm-string.c (gdbscm_scm_to_string): Return
1137 unique_xmalloc_ptr.
1138 (gdbscm_scm_to_host_string): Likewise.
1139
a1a31cb8
TT
11402018-07-17 Tom Tromey <tom@tromey.com>
1141
1142 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1143 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1144 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1145 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1146 unique_xmalloc_ptr.
1147
15bf3002
TT
11482018-07-17 Tom Tromey <tom@tromey.com>
1149
1150 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1151 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1152 Update.
1153 * guile/scm-cmd.c (cmdscm_function): Update.
1154 * guile/scm-pretty-print.c
1155 (ppscm_print_exception_unless_memory_error): Update.
1156 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1157 Return unique_xmalloc_ptr.
1158
7eb1a66c
TT
11592018-07-17 Tom Tromey <tom@tromey.com>
1160
1161 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1162 Use string_printf.
1163
ce73f310
JW
11642018-07-17 Jim Wilson <jimw@sifive.com>
1165
27724bad
JW
1166 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1167 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1168 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1169 unecessary braces after EF_RISCV_RVC test. Delete call to
1170 set_gdbarch_decr_pc_after_break.
1171
ce73f310
JW
1172 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1173 RISCV_LAST_FP_REGNUM + 1.
1174 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1175
056dec39
TT
11762018-07-17 Tom Tromey <tom@tromey.com>
1177
1178 * configure.ac: Remove --disable-gdbcli.
1179 * configure: Rebuild.
1180 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1181 (SUBDIR_CLI_CFLAGS): Remove.
1182 (SFILES): Use SUBDIR_CLI_SRCS.
1183 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1184
4735f0ed
TT
11852018-07-17 Tom Tromey <tom@tromey.com>
1186
1187 PR gdb/18624:
1188 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1189
117a0e99
JW
11902018-07-16 Jim Wilson <jimw@sifive.com>
1191
1192 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1193
8a67aaa8
SM
11942018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1195
1196 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1197 variable.
1198 (libunwind_frame_sniffer): Likewise.
1199 (libunwind_frame_prev_register): Likewise.
1200 (libunwind_sigtramp_frame_sniffer): Likewise.
1201 * ia64-tdep.c (ia64_access_reg): Likewise.
1202 (ia64_access_rse_reg): Likewise.
1203 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1204 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1205
ec74dcd8
SM
12062018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1207
1208 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1209
a700e753
SM
12102018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1211
1212 * remote-sim.c (gdbsim_target::close,
1213 gdbsim_target::mourn_inferior): Remove unused variables.
1214
8b411ff8
SM
12152018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1216
1217 * ia64-tdep.c (ktab_buf): New global.
1218 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1219 (get_kernel_table): Adjust.
1220
edb0470b
TT
12212018-07-16 Tom Tromey <tom@tromey.com>
1222
1223 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1224 * dwarf2read.c (using_directives, new_symbol): Use
1225 outermost_context_p.
1226 * dbxread.c (process_one_symbol): Use outermost_context_p.
1227 * coffread.c (coff_symtab_read): Use outermost_context_p.
1228
6cccc9a8
TT
12292018-07-16 Tom Tromey <tom@tromey.com>
1230
1231 * dwarf2read.c (using_directives, read_func_scope)
1232 (read_lexical_block_scope): Update.
1233 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1234 * buildsym.h (local_using_directives, global_using_directives):
1235 Don't declare.
1236 (get_local_using_directives, set_local_using_directives)
1237 (get_global_using_directives): Declare.
1238 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1239 m_global_using_directives>: New members.
1240 (finish_block_internal, prepare_for_building)
1241 (reset_symtab_globals, end_symtab_get_static_block)
1242 (push_context): Update.
1243 (get_local_using_directives, set_local_using_directives)
1244 (get_global_using_directives): New functions.
1245 (buildsym_init): Update.
1246
652788a7
TT
12472018-07-16 Tom Tromey <tom@tromey.com>
1248
1249 * xcoffread.c (xcoff_initial_scan): Don't call
1250 free_pending_blocks.
1251 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1252 * buildsym.h (class scoped_free_pendings): Add constructor.
1253 (free_pending_blocks): Don't declare.
1254 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1255 (free_pending_blocks): Now static.
1256
8419ee53
TT
12572018-07-16 Tom Tromey <tom@tromey.com>
1258
1259 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1260 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1261 member.
1262 (struct subfile_stack): Remove.
1263 (subfile_stack): Remove.
1264 (push_subfile, pop_subfile, buildsym_init): Update.
1265
ccdac490
TT
12662018-07-16 Tom Tromey <tom@tromey.com>
1267
1268 * buildsym.c (push_subfile): Use gdb_assert.
1269 (pop_subfile): Use gdb_assert.
1270
43130d6f
TT
12712018-07-16 Tom Tromey <tom@tromey.com>
1272
1273 * buildsym.h (merge_symbol_lists): Remove.
1274 * buildsym.c (merge_symbol_lists): Remove.
1275
77d6f1aa
TT
12762018-07-16 Tom Tromey <tom@tromey.com>
1277
1278 * stabsread.c (scan_file_globals): Update comment.
1279 * stabsread.h (scan_file_globals): Move from buildsym.h.
1280 * buildsym.h (scan_file_globals): Move to stabsread.h.
1281
2c722d18
TT
12822018-07-16 Tom Tromey <tom@tromey.com>
1283
1284 * xcoffread.c (xcoff_new_init): Update.
1285 * mipsread.c (mipscoff_new_init): Update.
1286 * mdebugread.c (mdebug_build_psymtabs): Update.
1287 * elfread.c (elf_new_init): Update.
1288 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1289 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1290 * buildsym.h (buildsym_new_init): Don't declare.
1291 * buildsym.c (buildsym_new_init): Remove.
1292
5985ac61
TT
12932018-07-16 Tom Tromey <tom@tromey.com>
1294
1295 * stabsread.h (within_function): Move from buildsym.h.
1296 * stabsread.c (start_stabs): Clear within_function.
1297 * coffread.c (coff_start_symtab): Clear within_function.
1298 * buildsym.h (within_function): Move to stabsread.h.
1299 * buildsym.c (prepare_for_building): Update.
1300
6b84eeb2
TT
13012018-07-16 Tom Tromey <tom@tromey.com>
1302
1303 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1304 * dwarf2read.c (dwarf2_start_symtab): Don't set
1305 processing_gcc_compilation.
1306 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1307
2150c3ef
TT
13082018-07-16 Tom Tromey <tom@tromey.com>
1309
1310 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1311 (next_symbol_text_func): Move from buildsym.h.
1312 * stabsread.c (hashname): Move from buildsym.c.
1313 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1314 (next_symbol_text_func, hashname): Move to stabsread.h.
1315 * buildsym.c: Don't include bcache.h
1316 (hashname): Move to stasbread.c.
1317
0ec44fc0
TT
13182018-07-16 Tom Tromey <tom@tromey.com>
1319
1320 * buildsym.h (context_stack_size): Don't declare.
1321 * buildsym.c (context_stack_size): New global.
1322
81cc346d
TT
13232018-07-16 Tom Tromey <tom@tromey.com>
1324
1325 * dbxread.c (processing_acc_compilation): New global.
1326 * buildsym.h (processing_acc_compilation): Don't declare.
1327
2c99ee5c
TT
13282018-07-16 Tom Tromey <tom@tromey.com>
1329
1330 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1331 * dbxread.c (read_ofile_symtab): Update.
1332 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1333 * buildsym.h (last_source_start_addr): Remove.
1334 (set_last_source_start_addr, get_last_source_start_addr):
1335 Declare.
1336 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1337 parameter.
1338 (struct buildsym_compunit) <m_last_source_start_addr>: New
1339 member.
1340 (prepare_for_building): Remove start_addr parameter.
1341 (start_symtab, restart_symtab, end_symtab_get_static_block)
1342 (end_symtab_with_blockvector): Update.
1343 (set_last_source_start_addr, get_last_source_start_addr): New
1344 functions.
1345
530fedbc
TT
13462018-07-16 Tom Tromey <tom@tromey.com>
1347
1348 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1349 member.
1350 (have_line_numbers): Remove.
1351 (record_line, prepare_for_building, end_symtab_get_static_block)
1352 (augment_type_symtab): Update.
1353
6a976300
TT
13542018-07-16 Tom Tromey <tom@tromey.com>
1355
1356 * buildsym.c (~buildsym_compunit): Free the macro table.
1357 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1358 methods.
1359 <m_pending_macros>: New member.
1360 (pending_macros): Remove.
1361 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1362 (reset_symtab_globals, end_symtab_get_static_block)
1363 (end_symtab_with_blockvector, augment_type_symtab)
1364 (buildsym_init): Update.
1365
c0015d44
TT
13662018-07-16 Tom Tromey <tom@tromey.com>
1367
1368 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1369 parameter.
1370 (buildsym_compunit::set_last_source_file): New method.
1371 <m_last_source_file>: New member.
1372 (prepare_for_building): Remove "name" parameter.
1373 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1374 (last_source_file): Remove.
1375 (set_last_source_file, get_last_source_file): Update.
1376
e62cca7c
TT
13772018-07-16 Tom Tromey <tom@tromey.com>
1378
1379 * buildsym.c (prepare_for_building): Add assert.
1380
905eb0e2
TT
13812018-07-16 Tom Tromey <tom@tromey.com>
1382
1383 * buildsym.c (~buildsym_compunit): Update.
1384 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1385 (start_subfile, patch_subfile_names)
1386 (end_symtab_with_blockvector): Update.
1387
b248663f
TT
13882018-07-16 Tom Tromey <tom@tromey.com>
1389
1390 * buildsym.c (struct buildsym_compunit): Add constructor,
1391 destructor, initializers.
1392 (start_buildsym_compunit): Remove.
1393 (free_buildsym_compunit): Use "delete".
1394 (start_symtab, restart_symtab): Use "new".
1395
ff27d073
SM
13962018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1397
1398 * symfile.c (set_objfile_default_section_offset): Remove struct
1399 keyword.
1400
6a15ecf5
SH
14012018-07-14 Stafford Horne <shorne@gmail.com>
1402
1403 * (Responsible Maintainers): Add myself as or1k maintainer.
1404
027a4c30
TT
14052018-07-13 Tom Tromey <tom@tromey.com>
1406
1407 * symfile.c (set_objfile_default_section_offset): Use extra braces
1408 around initializer.
1409
5c1eda30
AA
14102018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1411
1412 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1413 non-branching basr.
1414
bc7b042b
PW
14152018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1416
1417 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1418 unittests/cli-utils-selftests.c
1419 * unittests/cli-utils-selftests.c: New file.
1420
a14c4daa
PW
14212018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1422
1423 * NEWS: Mention new commands. Mention change to 'thread apply'.
1424
1fe75df7
PW
14252018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1426
1427 * thread.c (thr_try_catch_cmd): New function.
1428 (thread_apply_all_command): Handle qcs flags.
1429 (thread_apply_command): Handle qcs flags.
1430 (taas_command): New function.
1431 (tfaas_command): New function.
1432 (_initialize_thread): Update to setup the new commands 'taas
1433 and 'tfaas'. Change doc string for 'thread apply'.
1434
6a70eb7d
PW
14352018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1436
1437 * stack.c: (trailing_outermost_frame): New function, mostly
1438 extracted from backtrace_command_1.
1439 (leading_innermost_frame): New function.
1440 (backtrace_command_1): Update to call trailing_outermost_frame.
1441 (frame_apply_command_count): New function.
1442 (frame_apply_level_command): New function.
1443 (frame_apply_all_command): New function.
1444 (frame_apply_command): New function.
1445 (faas_command): New function.
1446 (frame_cmd_list): New variable.
1447 (_initialize_stack): Update to setup the new commands 'frame apply'
1448 and 'faas'.
1449
529c08b2
PW
14502018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1451
1452 * cli-utils.c (number_or_range_parser::get_number): Only handle
1453 numbers or convenience var as numbers.
1454 (parse_flags): New function.
1455 (parse_flags_qcs): New function.
1456 (number_or_range_parser::finished): Ensure parsing end is detected
1457 before end of string.
1458 * cli-utils.h (parse_flags): New function.
1459 (parse_flags_qcs): New function.
1460 (number_or_range_parser): Remove m_finished bool.
1461 (number_or_range_parser::skip_range): Set m_in_range to false.
1462
64b58472
SDJ
14632018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1464
1465 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1466 on Windows.
1467
c7ab0aef
SDJ
14682018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1469 Jan Kratochvil <jan.kratochvil@redhat.com>
1470 Paul Fertser <fercerpav@gmail.com>
1471 Tsutomu Seki <sekiriki@gmail.com>
1472 Pedro Alves <palves@redhat.com>
1473
1474 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1475 'unittests/parse-connection-spec-selftests.c'.
1476 (COMMON_SFILES): Add 'common/netstuff.c'.
1477 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1478 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1479 * common/netstuff.c: New file.
1480 * common/netstuff.h: New file.
1481 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1482 (wait_for_connect): Update comment. New parameter
1483 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1484 Use 'sock' directly instead of 'scb->fd'.
1485 (try_connect): New function, with code from 'net_open'.
1486 (net_open): Rewrite main loop to deal with multiple
1487 sockets/addresses. Handle IPv6-style hostnames; implement
1488 support for IPv6 connections.
1489 * unittests/parse-connection-spec-selftests.c: New file.
1490
4c7333b3
PA
14912018-07-11 Pedro Alves <palves@redhat.com>
1492
1493 PR gdb/23377
1494 * remote.c (remote_target::remote_detach_pid): Call
1495 set_current_process.
1496
a6f88f6e
PA
14972018-07-11 Pedro Alves <palves@redhat.com>
1498
1499 * h8300-tdep.c (h8300_gdbarch_init): Remove
1500 set_gdbarch_ecoff_reg_to_regnum calls.
1501
16ff70dd
SDJ
15022018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1503
1504 PR c++/23373
1505 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1506 offsets/sizes for static members of a class/struct.
1507
12863263
AH
15082018-07-11 Alan Hayward <alan.hayward@arm.com>
1509
1510 * target-descriptions.c (tdesc_register_bitsize): Rename.
1511 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1512 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1513 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1514
1123588c
TT
15152018-07-10 Tom Tromey <tom@tromey.com>
1516
1517 * breakpoint.c (moribund_locations): Now static and a
1518 std::vector.
1519 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1520 (build_bpstat_chain, update_global_location_list)
1521 (breakpoint_retire_moribund): Update.
1522 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1523 VEC.
1524
8c49aa89
AB
15252018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1526
1527 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1528 (riscv_register_reggroup_p): Use new function, remove unneeded
1529 parenthesis.
1530 (riscv_push_dummy_call): Extend assert to compare against xlen or
1531 flen based on register type.
1532
42ecac17
AB
15332018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1534
1535 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1536
055303e2
AB
15372018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1538
1539 * remote.c (show_hardware_watchpoint_limit): New function.
1540 (show_hardware_watchpoint_length_limit): New function.
1541 (show_hardware_breakpoint_limit): New function.
1542 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1543 where appropriate, update help text.
1544
8fd32c1c
TT
15452018-07-09 Tom Tromey <tom@tromey.com>
1546
1547 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1548 (CLIBS): Don't mention NAT_CLIBS.
1549
31278b51
TT
15502018-07-09 Tom Tromey <tom@tromey.com>
1551
1552 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1553 (LIBGDB_OBS, clean mostlyclean): Update.
1554 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1555
e5fd1493
TT
15562018-07-09 Tom Tromey <tom@tromey.com>
1557
1558 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1559 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1560 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1561
981e0c0c
TT
15622018-07-09 Tom Tromey <tom@tromey.com>
1563
1564 * Makefile.in (ALLDEPFILES): Remove exec.c.
1565 (COMMON_OBS): Remove exec.o.
1566 (COMMON_SFILES): Add exec.c.
1567
14ccceb2
TT
15682018-07-09 Tom Tromey <tom@tromey.com>
1569
1570 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1571
5d3c3a68
TT
15722018-07-09 Tom Tromey <tom@tromey.com>
1573
1574 * Makefile.in (clean mostlyclean): Remove stamp-version.
1575 (version.c): Depend on stamp-version.
1576 (stamp-version): New rule, from version.c rule.
1577
1998086d
TT
15782018-07-09 Tom Tromey <tom@tromey.com>
1579
1580 * Makefile.in (init.c): Depend on stamp-init.
1581 (stamp-init): New rule, from init.c rule.
1582 (clean mostlyclean): Remove stamp-init.
1583
4c754949
TT
15842018-07-09 Tom Tromey <tom@tromey.com>
1585
1586 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1587 SUBDIR_GCC_COMPILE_SRCS.
1588
6497f1dd
TT
15892018-07-09 Tom Tromey <tom@tromey.com>
1590
1591 * Makefile.in (init.c): Remove some unused sed rules.
1592
97a34db9
TT
15932018-07-09 Tom Tromey <tom@tromey.com>
1594
1595 * Makefile.in (TSOBS): Remove.
1596 (INIT_FILES): Update.
1597 (LIBGDB_OBS): Update.
1598 (COMMON_SFILES): Add inflow.c.
1599 (SFILES): Remove inflow.c.
1600
25289ac1
JK
16012018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1602
1603 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1604
e83f4d97
SM
16052018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1606
4869c585
SM
1607 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1608 get_saveloc_name, is_signal_frame_name, step_name,
1609 init_remote_name, create_addr_space_name,
1610 destroy_addr_space_name, search_unwind_table_name,
1611 find_dyn_list_name): Constify.
e83f4d97 1612
6821842f
SM
16132018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1614
1615 * darwin-nat.c (darwin_pthread_kill): New function.
1616 (darwin_resume_thread): Use darwin_pthread_kill.
1617
c530603c
TV
16182018-07-05 Tom de Vries <tdevries@suse.de>
1619
1620 * macroexp.c (macro_buffer) <operator=>: New member function.
1621
a7d0f0f0
TT
16222018-07-04 Tom Tromey <tom@tromey.com>
1623
1624 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1625
6242c6a6
SM
16262018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1627
1628 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1629 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1630 * maint.c: Likewise.
1631 * top.c: Likewise.
1632
4e5b2f89
JB
16332018-07-04 Joel Brobecker <brobecker@adacore.com>
1634
1635 * NEWS: Create a new section for the next release branch.
1636 Rename the section of the current branch, now that it has
1637 been cut.
1638
538ccc4a
JB
16392018-07-04 Joel Brobecker <brobecker@adacore.com>
1640
1641 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1642 * version.in: Bump version to 8.2.50.DATE-git.
1643
1b919490
VB
16442018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1645 Pedro Alves <palves@redhat.com>
1646
1647 * linux-nat.c (linux_init_ptrace): Rename to ...
1648 (linux_init_ptrace_procfs): ... this. Call
1649 linux_proc_init_warnings.
1650 (linux_nat_target::post_attach)
1651 (linux_nat_target::post_startup_inferior): Adjust.
1652 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1653 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1654
1ea5da02
TV
16552018-07-04 Tom de Vries <tdevries@suse.de>
1656
1657 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1658 check ...
1659 (read_comp_unit_head): ... here.
1660
f51e0e20
TT
16612018-07-03 Tom Tromey <tom@tromey.com>
1662
1663 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1664 (stop_tracing, tstatus_command)
1665 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1666 (print_one_static_tracepoint_marker): Update.
1667 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1668 std::vector.
1669 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1670 VEC.
1671 (all_tracepoints, static_tracepoints_here): Return std::vector.
1672
d7e15655
TT
16732018-07-03 Tom Tromey <tom@tromey.com>
1674
1675 * common/ptid.c (ptid_equal): Remove.
1676 * common/ptid.h (ptid_equal): Don't declare.
1677 * ada-tasks.c: Update.
1678 * breakpoint.c: Update.
1679 * common/agent.c: Update.
1680 * corelow.c: Update.
1681 * darwin-nat-info.c: Update.
1682 * darwin-nat.c: Update.
1683 * dcache.c: Update.
1684 * dtrace-probe.c: Update.
1685 * dummy-frame.c: Update.
1686 * fbsd-nat.c: Update.
1687 * frame.c: Update.
1688 * gdbthread.h: Update.
1689 * gnu-nat.c: Update.
1690 * go32-nat.c: Update.
1691 * inf-loop.c: Update.
1692 * inf-ptrace.c: Update.
1693 * infcall.c: Update.
1694 * infcmd.c: Update.
1695 * inflow.c: Update.
1696 * infrun.c: Update.
1697 * linux-fork.c: Update.
1698 * linux-nat.c: Update.
1699 * linux-thread-db.c: Update.
1700 * mi/mi-cmd-var.c: Update.
1701 * mi/mi-interp.c: Update.
1702 * mi/mi-main.c: Update.
1703 * nto-procfs.c: Update.
1704 * ppc-linux-tdep.c: Update.
1705 * procfs.c: Update.
1706 * python/py-inferior.c: Update.
1707 * python/py-record-btrace.c: Update.
1708 * python/py-record.c: Update.
1709 * ravenscar-thread.c: Update.
1710 * regcache.c: Update.
1711 * remote-sim.c: Update.
1712 * remote.c: Update.
1713 * sol-thread.c: Update.
1714 * solib.c: Update.
1715 * target.c: Update.
1716 * tui/tui-stack.c: Update.
1717 * varobj.c: Update.
1718 * windows-nat.c: Update.
1719 * windows-tdep.c: Update.
1720
26a57c92
TT
17212018-07-03 Tom Tromey <tom@tromey.com>
1722
1723 * common/ptid.c (ptid_match): Remove.
1724 * common/ptid.h (ptid_match): Don't declare.
1725 * fbsd-nat.c: Update.
1726 * infcmd.c: Update.
1727 * infrun.c: Update.
1728 * linux-nat.c: Update.
1729 * record-btrace.c: Update.
1730 * regcache.c: Update.
1731 * remote.c: Update.
1732
d2a107e3
TT
17332018-07-03 Tom Tromey <tom@tromey.com>
1734
1735 * common/ptid.c (ptid_tid_p): Remove.
1736 * common/ptid.h (ptid_tid_p): Don't declare.
1737 * sol-thread.c: Update.
1738
15a9e13e
TT
17392018-07-03 Tom Tromey <tom@tromey.com>
1740
1741 * common/ptid.c (ptid_lwp_p): Remove.
1742 * common/ptid.h (ptid_lwp_p): Don't declare.
1743 * fbsd-nat.c: Update.
1744 * linux-nat.c: Update.
1745 * nat/linux-procfs.c: Update.
1746 * nat/x86-linux-dregs.c: Update.
1747 * sol-thread.c: Update.
1748
0e998d96
TT
17492018-07-03 Tom Tromey <tom@tromey.com>
1750
1751 * common/ptid.c (ptid_is_pid): Remove.
1752 * common/ptid.h (ptid_is_pid): Don't declare.
1753 * infrun.c: Update.
1754 * linux-nat.c: Update.
1755 * mi/mi-interp.c: Update.
1756 * remote.c: Update.
1757 * thread.c: Update.
1758
cc6bcb54
TT
17592018-07-03 Tom Tromey <tom@tromey.com>
1760
1761 * common/ptid.c (ptid_get_tid): Remove.
1762 * common/ptid.h (ptid_get_tid): Don't declare.
1763 * ada-tasks.c: Update.
1764 * aix-thread.c: Update.
1765 * bsd-uthread.c: Update.
1766 * darwin-nat.c: Update.
1767 * fbsd-nat.c: Update.
1768 * i386-darwin-nat.c: Update.
1769 * infrun.c: Update.
1770 * linux-tdep.c: Update.
1771 * nto-procfs.c: Update.
1772 * ppc-ravenscar-thread.c: Update.
1773 * python/py-infthread.c: Update.
1774 * ravenscar-thread.c: Update.
1775 * sol-thread.c: Update.
1776 * sparc-ravenscar-thread.c: Update.
1777 * windows-nat.c: Update.
1778
e38504b3
TT
17792018-07-03 Tom Tromey <tom@tromey.com>
1780
1781 * common/ptid.c (ptid_get_lwp): Remove.
1782 * common/ptid.h (ptid_get_lwp): Don't declare.
1783 * aarch64-linux-nat.c: Update.
1784 * ada-tasks.c: Update.
1785 * aix-thread.c: Update.
1786 * amd64-linux-nat.c: Update.
1787 * arm-linux-nat.c: Update.
1788 * corelow.c: Update.
1789 * fbsd-nat.c: Update.
1790 * fbsd-tdep.c: Update.
1791 * gnu-nat.c: Update.
1792 * i386-cygwin-tdep.c: Update.
1793 * i386-gnu-nat.c: Update.
1794 * i386-linux-nat.c: Update.
1795 * ia64-linux-nat.c: Update.
1796 * inf-ptrace.c: Update.
1797 * infrun.c: Update.
1798 * linux-fork.c: Update.
1799 * linux-nat.c: Update.
1800 * linux-tdep.c: Update.
1801 * linux-thread-db.c: Update.
1802 * mips-linux-nat.c: Update.
1803 * nat/aarch64-linux-hw-point.c: Update.
1804 * nat/aarch64-linux.c: Update.
1805 * nat/linux-btrace.c: Update.
1806 * nat/linux-osdata.c: Update.
1807 * nat/linux-procfs.c: Update.
1808 * nat/x86-linux-dregs.c: Update.
1809 * obsd-nat.c: Update.
1810 * ppc-fbsd-nat.c: Update.
1811 * ppc-linux-nat.c: Update.
1812 * procfs.c: Update.
1813 * python/py-infthread.c: Update.
1814 * ravenscar-thread.c: Update.
1815 * remote.c: Update.
1816 * s390-linux-nat.c: Update.
1817 * sol-thread.c: Update.
1818 * sol2-tdep.c: Update.
1819 * spu-linux-nat.c: Update.
1820 * x86-linux-nat.c: Update.
1821 * xtensa-linux-nat.c: Update.
1822
e99b03dc
TT
18232018-07-03 Tom Tromey <tom@tromey.com>
1824
1825 * common/ptid.c (ptid_get_pid): Remove.
1826 * common/ptid.h (ptid_get_pid): Don't declare.
1827 * aarch64-linux-nat.c: Update.
1828 * ada-lang.c: Update.
1829 * aix-thread.c: Update.
1830 * alpha-bsd-nat.c: Update.
1831 * amd64-fbsd-nat.c: Update.
1832 * amd64-linux-nat.c: Update.
1833 * arm-linux-nat.c: Update.
1834 * arm-nbsd-nat.c: Update.
1835 * auxv.c: Update.
1836 * break-catch-syscall.c: Update.
1837 * breakpoint.c: Update.
1838 * bsd-uthread.c: Update.
1839 * corelow.c: Update.
1840 * ctf.c: Update.
1841 * darwin-nat.c: Update.
1842 * fbsd-nat.c: Update.
1843 * fbsd-tdep.c: Update.
1844 * gcore.c: Update.
1845 * gnu-nat.c: Update.
1846 * hppa-nbsd-nat.c: Update.
1847 * hppa-obsd-nat.c: Update.
1848 * i386-fbsd-nat.c: Update.
1849 * ia64-linux-nat.c: Update.
1850 * inf-ptrace.c: Update.
1851 * infcmd.c: Update.
1852 * inferior.c: Update.
1853 * inferior.h: Update.
1854 * inflow.c: Update.
1855 * infrun.c: Update.
1856 * linux-fork.c: Update.
1857 * linux-nat.c: Update.
1858 * linux-tdep.c: Update.
1859 * linux-thread-db.c: Update.
1860 * m68k-bsd-nat.c: Update.
1861 * mi/mi-interp.c: Update.
1862 * mi/mi-main.c: Update.
1863 * mips-linux-nat.c: Update.
1864 * mips-nbsd-nat.c: Update.
1865 * mips64-obsd-nat.c: Update.
1866 * nat/aarch64-linux-hw-point.c: Update.
1867 * nat/aarch64-linux.c: Update.
1868 * nat/linux-btrace.c: Update.
1869 * nat/linux-osdata.c: Update.
1870 * nat/linux-procfs.c: Update.
1871 * nat/x86-linux-dregs.c: Update.
1872 * nto-procfs.c: Update.
1873 * obsd-nat.c: Update.
1874 * ppc-linux-nat.c: Update.
1875 * ppc-nbsd-nat.c: Update.
1876 * ppc-obsd-nat.c: Update.
1877 * proc-service.c: Update.
1878 * procfs.c: Update.
1879 * python/py-inferior.c: Update.
1880 * python/py-infthread.c: Update.
1881 * ravenscar-thread.c: Update.
1882 * record.c: Update.
1883 * remote-sim.c: Update.
1884 * remote.c: Update.
1885 * rs6000-nat.c: Update.
1886 * s390-linux-nat.c: Update.
1887 * sh-nbsd-nat.c: Update.
1888 * sol-thread.c: Update.
1889 * sparc-nat.c: Update.
1890 * sparc64-tdep.c: Update.
1891 * spu-linux-nat.c: Update.
1892 * spu-tdep.c: Update.
1893 * target-debug.h: Update.
1894 * target.c: Update.
1895 * thread.c: Update.
1896 * tid-parse.c: Update.
1897 * tracefile-tfile.c: Update.
1898 * vax-bsd-nat.c: Update.
1899 * windows-nat.c: Update.
1900 * x86-linux-nat.c: Update.
1901 * x86-nat.c: Update.
1902
f2907e49
TT
19032018-07-03 Tom Tromey <tom@tromey.com>
1904
1905 * common/ptid.c (pid_to_ptid): Remove.
1906 * common/ptid.h (pid_to_ptid): Don't declare.
1907 * aix-thread.c: Update.
1908 * arm-linux-nat.c: Update.
1909 * common/ptid.c: Update.
1910 * common/ptid.h: Update.
1911 * corelow.c: Update.
1912 * ctf.c: Update.
1913 * darwin-nat.c: Update.
1914 * fbsd-nat.c: Update.
1915 * fork-child.c: Update.
1916 * gnu-nat.c: Update.
1917 * go32-nat.c: Update.
1918 * inf-ptrace.c: Update.
1919 * infcmd.c: Update.
1920 * inferior.c: Update.
1921 * infrun.c: Update.
1922 * linux-fork.c: Update.
1923 * linux-nat.c: Update.
1924 * nat/aarch64-linux-hw-point.c: Update.
1925 * nat/fork-inferior.c: Update.
1926 * nat/x86-linux-dregs.c: Update.
1927 * nto-procfs.c: Update.
1928 * obsd-nat.c: Update.
1929 * procfs.c: Update.
1930 * progspace.c: Update.
1931 * remote.c: Update.
1932 * rs6000-nat.c: Update.
1933 * s390-linux-nat.c: Update.
1934 * sol-thread.c: Update.
1935 * spu-linux-nat.c: Update.
1936 * target.c: Update.
1937 * top.c: Update.
1938 * tracefile-tfile.c: Update.
1939 * windows-nat.c: Update.
1940
fd79271b
TT
19412018-07-03 Tom Tromey <tom@tromey.com>
1942
1943 * common/ptid.h (ptid_build): Don't declare.
1944 * common/ptid.c (ptid_build): Remove.
1945 * aix-thread.c: Update.
1946 * bsd-kvm.c: Update.
1947 * bsd-uthread.c: Update.
1948 * common/agent.c: Update.
1949 * common/ptid.c: Update.
1950 * common/ptid.h: Update.
1951 * corelow.c: Update.
1952 * darwin-nat.c: Update.
1953 * fbsd-nat.c: Update.
1954 * gnu-nat.c: Update.
1955 * linux-fork.c: Update.
1956 * linux-nat.c: Update.
1957 * linux-thread-db.c: Update.
1958 * nat/linux-osdata.c: Update.
1959 * nat/linux-procfs.c: Update.
1960 * nto-procfs.c: Update.
1961 * obsd-nat.c: Update.
1962 * proc-service.c: Update.
1963 * procfs.c: Update.
1964 * ravenscar-thread.c: Update.
1965 * remote-sim.c: Update.
1966 * remote.c: Update.
1967 * sol-thread.c: Update.
1968 * target.c: Update.
1969 * windows-nat.c: Update.
1970
057302ce
TT
19712018-07-03 Tom Tromey <tom@tromey.com>
1972
1973 * infrun.c (follow_exec): Use exit_inferior_silent.
1974 * inferior.c (exit_inferior_num_silent): Remove.
1975 * inferior.h (exit_inferior_num_silent): Don't declare.
1976
a50c11c6
TT
19772018-07-03 Tom Tromey <tom@tromey.com>
1978
1979 PR cli/23340:
1980 * darwin-nat.c (darwin_attach_pid): Reset inferior and
1981 inferior_ptid on error.
1982
471b9d15
MR
19832018-07-02 Maciej W. Rozycki <macro@mips.com>
1984 Simon Marchi <simon.marchi@polymtl.ca>
1985
1986 PR tdep/8282
1987 * disasm.h (gdb_disassembler): Add
1988 `m_disassembler_options_holder'. member
1989 * disasm.c (get_all_disassembler_options): New function.
1990 (gdb_disassembler::gdb_disassembler): Use it.
1991 (gdb_buffered_insn_length_init_dis): Likewise.
1992 (gdb_buffered_insn_length): Adjust accordingly.
1993 (set_disassembler_options): Handle options with arguments.
1994 (show_disassembler_options_sfunc): Likewise. Add a leading new
1995 line if showing options with descriptions.
1996 (disassembler_options_completer): Adapt to using the
1997 `disasm_options_and_args_t' structure.
1998 * mips-tdep.c (mips_disassembler_options): New variable.
1999 (mips_disassembler_options_o32): Likewise.
2000 (mips_disassembler_options_n32): Likewise.
2001 (mips_disassembler_options_n64): Likewise.
2002 (gdb_print_insn_mips): Don't set `disassembler_options'.
2003 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2004 functions.
2005 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2006 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2007 `gdbarch_disassembler_options_implicit' and
2008 `gdbarch_valid_disassembler_options'.
2009 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2010 `disasm_options_and_args_t' structure.
2011 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2012 method.
2013 (valid_disassembler_options): Switch from `disasm_options_t' to
2014 the `disasm_options_and_args_t' structure.
2015 * NEWS: Document `set disassembler-options' support for the MIPS
2016 target.
2017 * gdbarch.h: Regenerate.
2018 * gdbarch.c: Regenerate.
2019
41823f29
SH
20202018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2021
2022 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2023
41206e32
JB
20242018-06-29 Joel Brobecker <brobecker@adacore.com>
2025
2026 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2027 parameter in call to amd64_target_description.
2028 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2029 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2030 (amd64fbsd_init_abi): Likewise.
2031 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2032 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2033 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2034 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2035
de52b960
PA
20362018-06-29 Pedro Alves <palves@redhat.com>
2037
2038 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2039 "segments" parameter.
2040 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2041 (_initialize_amd64_tdep): Update call to
2042 amd64_create_target_description.
2043 (amd64_target_description): Add "segments" parameter. Adjust
2044 the implementation to use it.
2045 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2046 call to amd64_create_target_description.
2047 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2048 * gdb/arch/amd64.h (amd64_create_target_description): Add
2049 "segments" register.
2050 * gdb/arch/amd64.c (amd64_create_target_description): Add
2051 "segments" parameter. Call create_feature_i386_64bit_segments
2052 only if SEGMENTS is true.
2053 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2054 call to amd64_create_target_description.
2055
75acb486
PA
20562018-06-29 Pedro Alves <palves@redhat.com>
2057
2058 * thread.c (thread_target_id_str): New, factored out from ...
2059 (print_thread_info_1): ... here. Use it to compute the max
2060 "Target Id" column width.
2061
c76a8ea3
PA
20622018-06-29 Pedro Alves <palves@redhat.com>
2063
2064 * remote.c (remote_target::extra_thread_info): Delete
2065 'display_buf' and 'n' locals. from the cache, regardless of
2066 packet mechanims is in use. Use cache for qThreadExtra and qP
2067 methods too.
2068
cd2bb709
PA
20692018-06-29 Pedro Alves <palves@redhat.com>
2070
2071 * blockframe.c (find_pc_sect_containing_function): New function.
2072 * breakpoint.c (print_breakpoint_location): Don't call
2073 find_pc_sect_function.
2074 * linespec.c (create_sals_line_offset): Record the location's
2075 symbol in the sal.
2076 * linespec.c (convert_address_location_to_sals): Fill in sal's
2077 symbol with find_pc_sect_containing_function.
2078 * symtab.c (find_function_start_sal): Rename to ...
2079 (find_function_start_sal_1): ... this.
2080 (find_function_start_sal): Reimplement as wrapper around
2081 find_function_start_sal_1, and use
2082 find_pc_sect_containing_function to fill in the sal's symbol.
2083 (find_function_start_sal(symbol*, bool)): Adjust.
2084 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2085 comments.
2086 (find_pc_sect_containing_function): Declare.
2087
991ff292
PA
20882018-06-29 Pedro Alves <palves@redhat.com>
2089
2090 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2091 true if the the location has no symbol.
2092
44cee4fd
TT
20932018-06-28 Tom Tromey <tom@tromey.com>
2094
2095 * NEWS: Mention --enable-codesign.
2096 * silent-rules.mk (ECHO_SIGN): New variable.
2097 * configure.ac: Add --enable-codesign.
2098 * configure: Rebuild.
2099 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2100 (gdb$(EXEEXT)): Optionally invoke codesign.
2101
f2ffa92b
PA
21022018-06-28 Pedro Alves <palves@redhat.com>
2103
2104 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2105 comments.
2106 (switch_to_thread_no_regs): Adjust comment.
2107 * infcmd.c (stop_pc): Delete.
2108 (post_create_inferior, info_program_command): Replace references
2109 to stop_pc with references to thread_info->suspend.stop_pc.
2110 * inferior.h (stop_pc): Delete declaration.
2111 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2112 (handle_inferior_event_1, handle_signal_stop)
2113 (process_event_stop_test, keep_going_stepped_thread)
2114 (handle_step_into_function, handle_step_into_function_backward)
2115 (print_stop_location): Replace references to stop_pc with
2116 references to thread_info->suspend.stop_pc.
2117 (struct infcall_suspend_state) <stop_pc>: Delete field.
2118 (save_infcall_suspend_state, restore_infcall_suspend_state):
2119 Remove references to inf_stat->stop_pc.
2120 * linux-fork.c (fork_load_infrun_state): Likewise.
2121 * record-btrace.c (record_btrace_set_replay): Likewise.
2122 * record-full.c (record_full_goto_entry): Likewise.
2123 * remote.c (print_one_stopped_thread): Likewise.
2124 * target.c (target_resume): Extend comment.
2125 * thread.c (set_executing_thread): New.
2126 (set_executing): Use it.
2127 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2128 Remove references to stop_pc.
2129
ecdc3a72
PA
21302018-06-28 Pedro Alves <palves@redhat.com>
2131
2132 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2133 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2134
d95d3aef
TT
21352018-06-28 Tom Tromey <tom@tromey.com>
2136
2137 * coffread.c (coff_symfile_finish): Update.
2138 * xcoffread.c (xcoff_symfile_finish): Update.
2139 * elfread.c (elf_symfile_finish): Update.
2140 * symfile.h (dwarf2_free_objfile): Don't declare.
2141 * dwarf2read.c (_initialize_dwarf2_read): Use
2142 register_objfile_data_with_cleanup.
2143 (dwarf2_free_objfile): Now static. Change signature.
2144
291f9a96
PT
21452018-06-28 Petr Tesarik <ptesarik@suse.cz>
2146
2147 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2148 option "-o" to add-symbol-file-load to add an offset to each
2149 section's load address.
2150 * symfile.c (set_objfile_default_section_offset): New function.
2151
d81a3eaf
PT
21522018-06-28 Petr Tesarik <ptesarik@suse.cz>
2153
2154 * symfile.c (add_symbol_file_command): Make sure that sections
2155 with the same name are sorted in the same order.
2156
ed6dfe51
PT
21572018-06-28 Petr Tesarik <ptesarik@suse.cz>
2158
2159 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2160 require the second argument. If omitted, load sections at the
2161 addresses specified in the file.
2162
d4d429d5
PT
21632018-06-28 Petr Tesarik <ptesarik@suse.cz>
2164
2165 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2166 (_initialize_symfile): Add option "-o" to symbol-file to add an
2167 offset to each section of the symbol file.
2168
39b27ab6
PT
21692018-06-28 Petr Tesarik <ptesarik@suse.cz>
2170
2171 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2172
41827fc3
TT
21732018-06-27 Tom Tromey <tom@tromey.com>
2174
2175 * stack.c (_initialize_stack): Update "func" help text.
2176
0c6aef22
TT
21772018-06-27 Tom Tromey <tom@tromey.com>
2178
2179 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2180 std::vector.
2181 (unwind_infopy_str, pyuw_create_unwind_info)
2182 (unwind_infopy_add_saved_register, pyuw_sniffer)
2183 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2184 Update.
2185 (struct saved_reg): Add constructor.
2186 <value>: Now a gdbpy_ref<>.
2187
63177289
TT
21882018-06-27 Tom Tromey <tom@tromey.com>
2189
2190 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2191
e76f78a0
SM
21922018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * gdb-gdb.py.in: Format using autopep8.
2195
9a14af7b
SM
21962018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2197
2198 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2199 (type_lookup_function): Recognize CORE_ADDR values.
2200
189366cd
SM
22012018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2202
2203 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2204 print tag_name.
2205
68ad5fb9
SM
22062018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2207
2208 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2209 <__lt__>: Add.
2210
141ec9f6
SM
22112018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2212
2213 * gdb-gdb.py: Move to...
2214 * gdb-gdb.py.in: ... here.
2215 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2216 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2217 dependencies.
2218 (distclean): Remove gdb-gdb.py when cleaning.
2219 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2220 * configure: Re-generate.
2221
4c4e7ad4
PA
22222018-06-27 Pedro Alves <palves@redhat.com>
2223
2224 * proc-service.c (get_ps_regcache): New.
2225 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2226 (ps_lsetfpregs): Use it.
2227
7ab6656f
OJ
22282018-06-27 Omair Javaid <omair.javaid@linaro.org>
2229
2230 PR gdb/21695
2231 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2232 (dwarf_decode_lines_1): Adjust.
2233
bd583225
SM
22342018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2235
2236 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2237 override.
2238 <info_proc>: Likewise.
2239
9a325b7b
JB
22402018-06-26 Joel Brobecker <brobecker@adacore.com>
2241
2242 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2243 to windows_fetch_one_register, and only handle the case of
2244 fetching one register. Move the code that reloads the context
2245 and iterates over all registers if R is negative to...
2246 (windows_nat_target::fetch_registers): ... here.
2247 (do_windows_store_inferior_registers): Rename to
2248 windows_store_one_register, and only handle the case of storing
2249 one register. Move the code that handles the case where r is
2250 negative to...
2251 (windows_nat_target::store_registers) ... here.
2252
a33ccfc7
TT
22532018-06-26 Tom Tromey <tom@tromey.com>
2254
2255 PR rust/22574:
2256 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2257 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2258 Update.
2259 (rust_internal_print_type): Add podata parameter.
2260 (rust_print_type): Update.
2261
e0c547d1
TT
22622018-06-26 Tom Tromey <tom@tromey.com>
2263
2264 * typeprint.h (struct print_offset_data) <update, finish,
2265 maybe_print_hole>: New methods.
2266 <indentation>: New constant.
2267 * typeprint.c (print_offset_data::indentation): Define.
2268 (print_offset_data::maybe_print_hole, print_offset_data::update)
2269 (print_offset_data::finish): Move from c-typeprint.c and rename.
2270 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2271 (print_spaces_filtered_with_print_options): Update.
2272 (c_print_type_union_field_offset, maybe_print_hole)
2273 (c_print_type_struct_field_offset): Move to typeprint.c and
2274 rename.
2275 (c_type_print_base_struct_union): Update.
2276
75cbc781
PA
22772018-06-25 Pedro Alves <palves@redhat.com>
2278
2279 * gdbthread.h (thread_info_ref, delete_thread)
2280 (delete_thread_silent, first_thread_of_inferior)
2281 (any_thread_of_inferior, switch_to_thread)
2282 (enable_thread_stack_temporaries)
2283 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2284 (get_last_thread_stack_temporary)
2285 (value_in_thread_stack_temporaries, can_access_registers_thread):
2286 Spell out "struct thread_info" instead of just "thread_info".
2287 * inferior.h (notice_new_inferior): Likewise.
2288
b7a08269
PA
22892018-06-25 Pedro Alves <palves@redhat.com>
2290
2291 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2292 pass thread_info pointer to delete_thread.
2293 (windows_nat_target::detach): Pass inferior pointer to
2294 detach_inferior.
2295 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2296 delete_thread.
2297 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2298 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2299 and pass a thread_info pointer to delete_thread.
2300 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2301 pass thread_info pointer to delete_thread.
2302 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2303 delete_thread_silent call.
2304 * procfs.c (procfs_target::detach): Pass inferior pointer to
2305 detach_inferior.
2306 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2307 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2308 delete_thread_silent call.
2309 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2310 pass thread_info pointer to delete_thread.
2311 (windows_nat_target::detach): Pass inferior pointer to
2312 delete_inferior.
2313
8e7767e3
AH
23142018-06-22 Alan Hayward <alan.hayward@arm.com>
2315
2316 * regcache.c (readable_regcache::read_part): Fix asserts.
2317 (reg_buffer::raw_collect_part): New function.
2318 (regcache::write_part): Fix asserts.
2319 (reg_buffer::raw_supply_part): New function.
2320 (regcache::transfer_regset_register): New helper function.
2321 (regcache::transfer_regset): Call new functions.
2322 (regcache_supply_regset): Use gdb_byte*.
2323 (regcache::supply_regset): Likewise.
2324 (regcache_collect_regset): Likewise.
2325 (regcache::collect_regset): Likewise.
2326 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2327 (reg_buffer::raw_supply_part): Likewise.
2328 (regcache::transfer_regset_register): Likewise.
2329 (regcache::transfer_regset): Use gdb_byte*.
2330
bfd60e34
AH
23312018-06-22 Alan Hayward <alan.hayward@arm.com>
2332
2333 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2334
00431a78
PA
23352018-06-21 Pedro Alves <palves@redhat.com>
2336
2337 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2338 instead of a ptid_t. All callers adjusted.
2339 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2340 adjusted.
2341 (print_ada_task_info, display_current_task_id, task_command_1):
2342 Adjust.
2343 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2344 inferior_thread.
2345 (breakpoint_kind): Adjust.
2346 (remove_breakpoints_pid): Rename to ...
2347 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2348 pointer. All callers adjusted.
2349 (bpstat_clear_actions): Use inferior_thread.
2350 (get_bpstat_thread): New.
2351 (bpstat_do_actions): Use it.
2352 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2353 to take a thread_info pointer. All callers adjusted.
2354 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2355 (breakpoint_re_set_thread): Use inferior_thread.
2356 * breakpoint.h (struct inferior): Forward declare.
2357 (bpstat_stop_status): Update.
2358 (remove_breakpoints_pid): Delete.
2359 (remove_breakpoints_inf): New.
2360 * bsd-uthread.c (bsd_uthread_target::wait)
2361 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2362 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2363 (maint_btrace_packet_history_cmd)
2364 (maint_btrace_clear_packet_history_cmd): Adjust.
2365 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2366 inferior_thread.
2367 * cli/cli-interp.c: Include "inferior.h".
2368 * common/refcounted-object.h (struct
2369 refcounted_object_ref_policy): New.
2370 * compile/compile-object-load.c: Include gdbthread.h.
2371 (store_regs): Use inferior_thread.
2372 * corelow.c (core_target::close): Use current_inferior.
2373 (core_target_open): Adjust to use first_thread_of_inferior and use
2374 the current inferior.
2375 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2376 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2377 <thread>: ... this new field. All references adjusted.
2378 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2379 Take a thread_info pointer instead of a ptid_t.
2380 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2381 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2382 thread_info pointer instead of a ptid_t.
2383 * elfread.c: Include "inferior.h".
2384 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2385 Use inferior_thread.
2386 * eval.c (evaluate_subexp): Likewise.
2387 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2388 inferior_thread.
2389 * gdb_proc_service.h (struct thread_info): Forward declare.
2390 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2391 <thread>: ... this new field. All references adjusted.
2392 * gdbarch.h, gdbarch.c: Regenerate.
2393 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2394 'thread' parameter. All implementations and callers adjusted.
2395 * gdbthread.h (thread_info) <set_running>: New method.
2396 (delete_thread, delete_thread_silent): Take a thread_info pointer
2397 instead of a ptid.
2398 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2399 (first_thread_of_process): Delete, replaced by ...
2400 (first_thread_of_inferior): ... this new function. All callers
2401 adjusted.
2402 (any_live_thread_of_process): Delete, replaced by ...
2403 (any_live_thread_of_inferior): ... this new function. All callers
2404 adjusted.
2405 (switch_to_thread, switch_to_no_thread): Declare.
2406 (is_executing): Delete.
2407 (enable_thread_stack_temporaries): Update comment.
2408 <enable_thread_stack_temporaries>: Take a thread_info pointer
2409 instead of a ptid_t. Incref the thread.
2410 <~enable_thread_stack_temporaries>: Decref the thread.
2411 <m_ptid>: Delete
2412 <m_thr>: New.
2413 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2414 (get_last_thread_stack_temporary)
2415 (value_in_thread_stack_temporaries, can_access_registers_thread):
2416 Take a thread_info pointer instead of a ptid_t. All callers
2417 adjusted.
2418 * infcall.c (get_call_return_value): Use inferior_thread.
2419 (run_inferior_call): Work with thread pointers instead of ptid_t.
2420 (call_function_by_hand_dummy): Work with thread pointers instead
2421 of ptid_t. Use thread_info_ref.
2422 * infcmd.c (proceed_thread_callback): Access thread's state
2423 directly.
2424 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2425 access thread's state directly.
2426 (continue_command): Use inferior_thread.
2427 (info_program_command): Use find_thread_ptid and access thread
2428 state directly.
2429 (proceed_after_attach_callback): Use thread state directly.
2430 (notice_new_inferior): Take a thread_info pointer instead of a
2431 ptid_t. All callers adjusted.
2432 (exit_inferior): Take an inferior pointer instead of a pid. All
2433 callers adjusted.
2434 (exit_inferior_silent): New.
2435 (detach_inferior): Delete.
2436 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2437 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2438 (detach_inferior_command, kill_inferior_command): Use
2439 find_inferior_id instead of valid_gdb_inferior_id and
2440 gdb_inferior_id_to_pid.
2441 (inferior_command): Use inferior and thread pointers.
2442 * inferior.h (struct thread_info): Forward declare.
2443 (notice_new_inferior): Take a thread_info pointer instead of a
2444 ptid_t. All callers adjusted.
2445 (detach_inferior): Delete declaration.
2446 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2447 instead of a pid. All callers adjusted.
2448 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2449 (valid_gdb_inferior_id): Delete.
2450 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2451 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2452 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2453 ...
2454 <inf>: ... this new field.
2455 <step_ptid>: Delete, replaced by ...
2456 <step_thread>: ... this new field.
2457 (get_displaced_stepping_state): Take an inferior pointer instead
2458 of a pid. All callers adjusted.
2459 (displaced_step_in_progress_any_inferior): Adjust.
2460 (displaced_step_in_progress_thread): Take a thread pointer instead
2461 of a ptid_t. All callers adjusted.
2462 (displaced_step_in_progress, add_displaced_stepping_state): Take
2463 an inferior pointer instead of a pid. All callers adjusted.
2464 (get_displaced_step_closure_by_addr): Adjust.
2465 (remove_displaced_stepping_state): Take an inferior pointer
2466 instead of a pid. All callers adjusted.
2467 (displaced_step_prepare_throw, displaced_step_prepare)
2468 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2469 All callers adjusted.
2470 (start_step_over): Adjust.
2471 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2472 displaced step queue.
2473 (do_target_resume): Adjust.
2474 (fetch_inferior_event): Use inferior_thread.
2475 (context_switch, get_inferior_stop_soon): Take an
2476 execution_control_state pointer instead of a ptid_t. All callers
2477 adjusted.
2478 (switch_to_thread_cleanup): Delete.
2479 (stop_all_threads): Use scoped_restore_current_thread.
2480 * inline-frame.c: Include "gdbthread.h".
2481 (inline_state) <inline_state>: Take a thread pointer instead of a
2482 ptid_t. All callers adjusted.
2483 <ptid>: Delete, replaced by ...
2484 <thread>: ... this new field.
2485 (find_inline_frame_state): Take a thread pointer instead of a
2486 ptid_t. All callers adjusted.
2487 (skip_inline_frames, step_into_inline_frame)
2488 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2489 pointer instead of a ptid_t. All callers adjusted.
2490 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2491 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2492 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2493 pointers directly.
2494 * linux-nat.c (get_detach_signal): Likewise.
2495 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2496 (thread_db_notice_clone): Adjust.
2497 (thread_db_find_new_threads_silently)
2498 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2499 a thread pointer instead of a ptid_t. All callers adjusted.
2500 * mi/mi-cmd-var.c: Include "inferior.h".
2501 (mi_cmd_var_update_iter): Update to use thread pointers.
2502 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2503 inferior directly.
2504 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2505 out to ...
2506 (mi_output_running): ... this new function.
2507 (mi_on_resume_1): Adjust to use it.
2508 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2509 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2510 directly.
2511 (interrupt_thread_callback): : Adjust to use thread and inferior
2512 pointers.
2513 * proc-service.c: Include "gdbthread.h".
2514 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2515 * progspace-and-thread.c: Include "inferior.h".
2516 * progspace.c: Include "inferior.h".
2517 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2518 hold a reference to an inferior_object.
2519 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2520 inferior_thread.
2521 * python/py-inferior.c (struct inferior_object): Give the type a
2522 tag name instead of a typedef.
2523 (python_on_normal_stop): No need to check if the current thread is
2524 listed.
2525 (inferior_to_inferior_object): Change return type to
2526 inferior_object. All callers adjusted.
2527 (find_thread_object): Delete, bits factored out to ...
2528 (thread_to_thread_object): ... this new function.
2529 * python/py-infthread.c (create_thread_object): Use
2530 inferior_to_inferior_object.
2531 (thpy_is_stopped): Use thread pointer directly.
2532 (gdbpy_selected_thread): Use inferior_thread.
2533 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2534 field, replaced with ...
2535 <thread>: ... this new field. All users adjusted.
2536 (btpy_insn_or_gap_new): Drop const.
2537 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2538 callers adjusted.
2539 * python/py-record.c: Include "gdbthread.h".
2540 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2541 a ptid_t. All callers adjusted.
2542 (gdbpy_current_recording): Use inferior_thread.
2543 * python/py-record.h (recpy_record_object) <ptid>: Delete
2544 field, replaced with ...
2545 <thread>: ... this new field. All users adjusted.
2546 (recpy_element_object) <ptid>: Delete
2547 field, replaced with ...
2548 <thread>: ... this new field. All users adjusted.
2549 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2550 a ptid_t. All callers adjusted.
2551 * python/py-threadevent.c: Include "gdbthread.h".
2552 (get_event_thread): Use thread_to_thread_object.
2553 * python/python-internal.h (struct inferior_object): Forward
2554 declare.
2555 (find_thread_object, find_inferior_object): Delete declarations.
2556 (thread_to_thread_object, inferior_to_inferior_object): New
2557 declarations.
2558 * record-btrace.c: Include "inferior.h".
2559 (require_btrace_thread): Use inferior_thread.
2560 (record_btrace_frame_sniffer)
2561 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2562 (get_thread_current_frame): Use scoped_restore_current_thread and
2563 switch_to_thread.
2564 (get_thread_current_frame): Use thread pointer directly.
2565 (record_btrace_replay_at_breakpoint): Use thread's inferior
2566 pointer directly.
2567 * record-full.c: Include "inferior.h".
2568 * regcache.c: Include "gdbthread.h".
2569 (get_thread_arch_regcache): Use the inferior's address space
2570 directly.
2571 (get_thread_regcache, registers_changed_thread): New.
2572 * regcache.h (get_thread_regcache(thread_info *thread)): New
2573 overload.
2574 (registers_changed_thread): New.
2575 (remote_target) <remote_detach_1>: Swap order of parameters.
2576 (remote_add_thread): <remote_add_thread>: Return the new thread.
2577 (get_remote_thread_info(ptid_t)): New overload.
2578 (remote_target::remote_notice_new_inferior): Use thread pointers
2579 directly.
2580 (remote_target::process_initial_stop_replies): Use
2581 thread_info::set_running.
2582 (remote_target::remote_detach_1, remote_target::detach)
2583 (extended_remote_target::detach): Adjust.
2584 * stack.c (frame_show_address): Use inferior_thread.
2585 * target-debug.h (target_debug_print_thread_info_pp): New.
2586 * target-delegates.c: Regenerate.
2587 * target.c (default_thread_address_space): Delete.
2588 (memory_xfer_partial_1): Use current_inferior.
2589 (target_detach): Use current_inferior.
2590 (target_thread_address_space): Delete.
2591 (generic_mourn_inferior): Use current_inferior.
2592 * target.h (struct target_ops) <thread_address_space>: Delete.
2593 (target_thread_address_space): Delete.
2594 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2595 pointers directly.
2596 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2597 thread pointer instead of a ptid_t. Adjust all callers.
2598 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2599 (first_thread_of_process): Delete, replaced by ...
2600 (first_thread_of_inferior): ... this new function. All callers
2601 adjusted.
2602 (any_thread_of_process): Rename to ...
2603 (any_thread_of_inferior): ... this, and take an inferior pointer.
2604 (any_live_thread_of_process): Rename to ...
2605 (any_live_thread_of_inferior): ... this, and take an inferior
2606 pointer.
2607 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2608 (value_in_thread_stack_temporaries)
2609 (get_last_thread_stack_temporary): Take a thread pointer instead
2610 of a ptid_t. Adjust all callers.
2611 (thread_info::set_running): New.
2612 (validate_registers_access): Use inferior_thread.
2613 (can_access_registers_ptid): Rename to ...
2614 (can_access_registers_thread): ... this, and take a thread
2615 pointer.
2616 (print_thread_info_1): Adjust to compare thread pointers instead
2617 of ptids.
2618 (switch_to_no_thread, switch_to_thread): Make extern.
2619 (scoped_restore_current_thread::~scoped_restore_current_thread):
2620 Use m_thread pointer directly.
2621 (scoped_restore_current_thread::scoped_restore_current_thread):
2622 Use inferior_thread.
2623 (thread_command): Use thread pointer directly.
2624 (thread_num_make_value_helper): Use inferior_thread.
2625 * top.c (execute_command): Use inferior_thread.
2626 * tui/tui-interp.c: Include "inferior.h".
2627 * varobj.c (varobj_create): Use inferior_thread.
2628 (value_of_root_1): Use find_thread_global_id instead of
2629 global_thread_id_to_ptid.
2630
33bab475
AH
26312018-06-21 Alan Hayward <alan.hayward@arm.com>
2632
2633 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2634 possible.
2635 (regcache::write_part): Likewise.
2636 (readable_regcache::cooked_read_part): Update comment.
2637 (readable_regcache::cooked_write_part): Likewise.
2638 * regcache.h: (readable_regcache::read_part): Likewise.
2639 (regcache::write_part): Likewise.
2640
8363f9d5
RB
26412018-06-21 Richard Bunt <richard.bunt@arm.com>
2642 Dirk Schubert <dirk.schubert@arm.com>
2643
2644 * aarch64-linux-nat.c (post_attach): New.
2645 (aarch64_linux_nat_target::post_attach): Override post_attach to
2646 record the number of hardware debug registers.
2647
0d0b0ea2
TT
26482018-06-20 Tom Tromey <tom@tromey.com>
2649
2650 * python/py-param.c (add_setshow_generic): Make parameters const.
2651 (parmpy_init): Update.
2652
302abd6e
SM
26532018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2654
2655 * regcache.h (regcache_cooked_read_ftype): Rename to...
2656 (register_read_ftype): ...this, change type to function_view.
2657 (class reg_buffer) <save>: Remove src parameter.
2658 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2659 parameter non-const in first overload. Remove src parameter in
2660 second overload.
2661 * regcache.c (do_cooked_read): Remove.
2662 (readonly_detached_regcache::readonly_detached_regcache): Make
2663 parameter non-const, adjust call to other constructor.
2664 (reg_buffer::save): Remove src parameter.
2665 * frame.c (do_frame_register_read): Remove.
2666 (frame_save_as_regcache): Use lambda function.
2667 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2668 parameter to ppu2spu_data *.
2669 (ppu2spu_sniffer): Use lambda function.
2670
19f3f25f
SM
26712018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2672
2673 * record-full.c (record_full_target::insert_breakpoint): Remove
2674 "struct" keyword, add const.
2675
d0ac1c44
SM
26762018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2677
2678 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2679 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2680 * configure.ac: Remove AC_PREREQ, add missing quoting.
2681 * gnulib/configure.ac: Modernize usage of
2682 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2683 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2684 (AUTOMAKE_VERSION): Bump to 1.15.1.
2685 * configure: Re-generate.
2686 * config.in: Re-generate.
2687 * aclocal.m4: Re-generate.
2688 * gnulib/aclocal.m4: Re-generate.
2689 * gnulib/config.in: Re-generate.
2690 * gnulib/configure: Re-generate.
2691 * gnulib/import/Makefile.in: Re-generate.
2692
6ae50267
PA
26932018-06-19 Pedro Alves <palves@redhat.com>
2694
2695 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2696 (lookup_minimal_symbol_by_pc_section): ... here with
2697 gdb_assert_not_reached added.
2698
61b04dd0
PA
26992018-06-19 Pedro Alves <palves@redhat.com>
2700
2701 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2702 parameter with a block parameter. Compare location's block symbol
2703 with the frame's block instead of addresses.
2704 (skip_inline_frames): Pass the current block instead of the
2705 frame's address. Break out as soon as we determine the frame
2706 should not be skipped.
2707
f709fabb
TT
27082018-06-18 Tom Tromey <tom@tromey.com>
2709
2710 * solib-aix.c (solib_aix_get_section_offsets): Return
2711 unique_xmalloc_ptr.
2712 (solib_aix_solib_create_inferior_hook): Update.
2713
668eb2f0
TT
27142018-06-18 Tom Tromey <tom@tromey.com>
2715
2716 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2717
309822ca
TT
27182018-06-18 Tom Tromey <tom@tromey.com>
2719
2720 * solib-frv.c (frv_relocate_main_executable): Use
2721 unique_xmalloc_ptr.
2722 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2723 unique_xmalloc_ptr.
2724
06424eac
TT
27252018-06-18 Tom Tromey <tom@tromey.com>
2726
2727 * objfiles.h (inhibit_section_map_updates): Update.
2728 (resume_section_map_updates, resume_section_map_updates_cleanup):
2729 Remove.
2730 * solib-svr4.c (svr4_handle_solib_event): Update.
2731 * objfiles.c (inhibit_section_map_updates): Return
2732 scoped_restore_tmpl<int>.
2733 (resume_section_map_updates, resume_section_map_updates_cleanup):
2734 Remove.
2735
b4be9fad
TT
27362018-06-18 Tom Tromey <tom@tromey.com>
2737
2738 * valprint.h (read_string): Update.
2739 * valprint.c (read_string): Change type of "buffer".
2740 (val_print_string): Update.
2741 * python/py-value.c (valpy_string): Update.
2742 * language.h (struct language_defn) <la_get_string>: Change
2743 type of "buffer".
2744 (default_get_string, c_get_string): Update.
2745 * language.c (default_get_string): Change type of "buffer".
2746 * guile/scm-value.c (gdbscm_value_to_string): Update.
2747 * c-lang.c (c_get_string): Change type of "buffer".
2748
3f0dbd67
TT
27492018-06-18 Tom Tromey <tom@tromey.com>
2750
2751 * ser-mingw.c (struct pipe_state_destroyer): New.
2752 (pipe_state_up): New typedef.
2753 (cleanup_pipe_state): Remove.
2754 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2755
69d340c6
TT
27562018-06-18 Tom Tromey <tom@tromey.com>
2757
2758 * rust-lang.h (rust_yyerror): Don't declare.
2759 * rust-lang.c (rust_language_defn): Update.
2760 * rust-exp.y (yyerror): Now static.
2761 * parse.c (parse_exp_in_context_1): Update.
2762 * p-lang.h (p_yyerror): Don't declare.
2763 * p-lang.c (p_language_defn): Update.
2764 * p-exp.y (yyerror): Now static.
2765 * opencl-lang.c (opencl_language_defn): Update.
2766 * objc-lang.c (objc_language_defn): Update.
2767 * m2-lang.h (m2_yyerror): Don't declare.
2768 * m2-lang.c (m2_language_defn): Update.
2769 * m2-exp.y (yyerror): Now static.
2770 * language.h (struct language_defn) <la_error>: Remove.
2771 * language.c (unk_lang_error): Remove.
2772 (unknown_language_defn, auto_language_defn): Remove.
2773 * go-lang.h (go_yyerror): Don't declare.
2774 * go-lang.c (go_language_defn): Update.
2775 * go-exp.y (yyerror): Now static.
2776 * f-lang.h (f_yyerror): Don't declare.
2777 * f-lang.c (f_language_defn): Update.
2778 * f-exp.y (yyerror): Now static.
2779 * d-lang.h (d_yyerror): Don't declare.
2780 * d-lang.c (d_language_defn): Update.
2781 * d-exp.y (yyerror): Now static.
2782 * c-lang.h (c_yyerror): Don't declare.
2783 * c-lang.c (c_language_defn, cplus_language_defn)
2784 (asm_language_defn, minimal_language_defn): Update.
2785 * c-exp.y (yyerror): Now static.
2786 * ada-lang.h (ada_yyerror): Don't declare.
2787 * ada-lang.c (ada_language_defn): Update.
2788 * ada-exp.y (yyerror): Now static.
2789
e9902bfc
AH
27902018-06-18 Alan Hayward <alan.hayward@arm.com>
2791
2792 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2793 (store_sveregs_to_thread): Likewise.
2794 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2795 (aarch64_linux_store_inferior_registers): Likewise.
2796 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2797 function.
2798 (aarch64_sve_regs_copy_to_regcache): Likewise.
2799 (aarch64_sve_regs_copy_from_regcache): Likewise.
2800 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2801 declaration.
2802 (aarch64_sve_regs_copy_to_regcache): Likewise.
2803 (aarch64_sve_regs_copy_from_regcache): Likewise.
2804 (sve_context): Structure from Linux headers.
2805 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2806 (SVE_SIG_ZREG_SIZE): Likewise.
2807 (SVE_SIG_PREG_SIZE): Likewise.
2808 (SVE_SIG_FFR_SIZE): Likewise.
2809 (SVE_SIG_REGS_OFFSET): Likewise.
2810 (SVE_SIG_ZREGS_OFFSET): Likewise.
2811 (SVE_SIG_ZREG_OFFSET): Likewise.
2812 (SVE_SIG_ZREGS_SIZE): Likewise.
2813 (SVE_SIG_PREGS_OFFSET): Likewise.
2814 (SVE_SIG_PREG_OFFSET): Likewise.
2815 (SVE_SIG_PREGS_SIZE): Likewise.
2816 (SVE_SIG_FFR_OFFSET): Likewise.
2817 (SVE_SIG_REGS_SIZE): Likewise.
2818 (SVE_SIG_CONTEXT_SIZE): Likewise.
2819 (SVE_PT_REGS_MASK): Likewise.
2820 (SVE_PT_REGS_FPSIMD): Likewise.
2821 (SVE_PT_REGS_SVE): Likewise.
2822 (SVE_PT_VL_INHERIT): Likewise.
2823 (SVE_PT_VL_ONEXEC): Likewise.
2824 (SVE_PT_REGS_OFFSET): Likewise.
2825 (SVE_PT_FPSIMD_OFFSET): Likewise.
2826 (SVE_PT_FPSIMD_SIZE): Likewise.
2827 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2828 (SVE_PT_SVE_PREG_SIZE): Likewise.
2829 (SVE_PT_SVE_FFR_SIZE): Likewise.
2830 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2831 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2832 (__SVE_SIG_TO_PT): Likewise.
2833 (SVE_PT_SVE_OFFSET): Likewise.
2834 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2835 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2836 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2837 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2838 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2839 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2840 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2841 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2842 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2843 (SVE_PT_SVE_SIZE): Likewise.
2844 (SVE_PT_SIZE): Likewise.
2845 (HAS_SVE_STATE): New define.
2846
17a1cc89
AH
28472018-06-18 Alan Hayward <alan.hayward@arm.com>
2848
2849 * nat/aarch64-sve-linux-sigcontext.h: New file.
2850 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2851 new files.
2852 (SVE_VQ_MIN): Likewise.
2853 (SVE_VQ_MAX): Likewise.
2854 (SVE_VL_MIN): Likewise.
2855 (SVE_VL_MAX): Likewise.
2856 (SVE_NUM_ZREGS): Likewise.
2857 (SVE_NUM_PREGS): Likewise.
2858 (sve_vl_valid): Likewise.
2859 (struct user_sve_header): Likewise.
2860
7010835a
AB
28612018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2862 Richard Bunt <Richard.Bunt@arm.com>
2863
2864 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2865 was requested by GDB.
2866
479b3ef4
TV
28672018-06-15 Tom de Vries <tdevries@suse.de>
2868
2869 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2870
8199b8f4
SM
28712018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2872
2873 * gnulib/update-gnulib.sh: Print expected versions of
2874 autoconf/aclocal.
2875
55c748a1
SM
28762018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2877
2878 * arch-utils.c (default_type_align): Use type_length_units.
2879 * gdbtypes.c (type_align): Use type_length_units.
2880
87a8eca7
PW
28812018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2882
2883 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
2884 of 'define' command.
2885
5d9a0608
TV
28862018-06-14 Tom de Vries <tdevries@suse.de>
2887
2888 PR cli/22573
2889 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
2890 get_no_prettyformat_print_options.
2891
ab89b5a5
SM
28922018-06-13 Simon Marchi <simon.marchi@ericsson.com>
2893
2894 * sparc-nat.h: Include target.h.
2895 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
2896 <fetch_registers>: Remove this argument in function call.
2897 <store_registers>: Remove this argument in function call, remove
2898 extra semicolon.
2899 <low_forget_process>: Call sparc64_forget_process instead of
2900 sparc_forget_process.
2901
62c808ae
RO
29022018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2903
2904 * procfs.c (_initialize_procfs): Use add_inf_child_target.
2905 (procfs_target::make_corefile_notes): Adjust to new
2906 target_read_alloc return type.
2907
1840d81a
AB
29082018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2909 Stephen Roberts <stephen.roberts@arm.com>
2910
2911 PR gdb/22882
2912 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
2913 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
2914 Move should_notify_stop local into more inner scope.
2915
9516f85a
AB
29162018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2917 Stephen Roberts <stephen.roberts@arm.com>
2918
2919 PR gdb/22882
2920 * infrun.c (resume_1): Add call to mark_async_event_handler.
2921
defd2172
AB
29222018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
2923
2924 * infrun.c (do_target_wait): Change old version of $pc printed.
2925
7b23e087
SM
29262018-06-11 Simon Marchi <simon.marchi@ericsson.com>
2927
2928 * dwarf2read.c (read_index_from_section): Rename to...
2929 (read_gdb_index_from_section): ... this, update all callers.
2930 (dwarf2_read_index): Rename to...
2931 (dwarf2_read_gdb_index): ... this, update all callers.
2932
69c67a0b
JDA
29332018-06-11 John David Anglin <danglin@gcc.gnu.org>
2934
2935 * gdb/hppa-linux-nat.c
2936 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
2937 hppa_linux_nat_target::fetch_registers.
2938
65d4cada
AH
29392018-06-11 Alan Hayward <alan.hayward@arm.com>
2940
2941 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
2942 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
2943 (AARCH64_DWARF_SVE_FFR): Likewise.
2944 (AARCH64_DWARF_SVE_P0): Likewise.
2945 (AARCH64_DWARF_SVE_Z0): Likewise.
2946
f868386e
AH
29472018-06-11 Alan Hayward <alan.hayward@arm.com>
2948
2949 * common/common-regcache.h (raw_compare): New function.
2950 * regcache.c (regcache::raw_compare): Likewise.
2951 * regcache.h (regcache::raw_compare): New declaration.
2952
9c861883
AH
29532018-06-11 Alan Hayward <alan.hayward@arm.com>
2954
2955 * common/common-regcache.h (reg_buffer_common): New structure.
2956 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
2957 (reg_buffer::raw_supply): Likewise.
2958 (reg_buffer::raw_supply_integer): Likewise.
2959 (reg_buffer::raw_supply_zeroed): Likewise.
2960 (reg_buffer::raw_collect): Likewise.
2961 (reg_buffer::raw_collect_integer): Likewise.
2962 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
2963 (reg_buffer::raw_supply): Likewise.
2964 (reg_buffer::raw_supply_integer): Likewise.
2965 (reg_buffer::raw_supply_zeroed): Likewise.
2966 (reg_buffer::raw_collect): Likewise.
2967 (reg_buffer::raw_collect_integer): Likewise.
2968
953edf2b
TT
29692018-06-10 Tom Tromey <tom@tromey.com>
2970
2971 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
2972 (class remote_state) <stop_reply_queue>: Now std::vector.
2973 (remote_state::~remote_state)
2974 (remote_target::stop_reply_queue_length): Update.
2975 (struct queue_iter_param, remove_child_of_pending_fork)
2976 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
2977 (check_pending_event_prevents_wildcard_vcont_callback)
2978 (remove_stop_reply_for_inferior)
2979 (remove_stop_reply_of_remote_state)
2980 (remote_notif_remove_once_on_match)
2981 (stop_reply_match_ptid_and_ws)
2982 (remote_kill_child_of_pending_fork): Remove.
2983 (remote_target::remove_new_fork_children)
2984 (remote_target::check_pending_events_prevent_wildcard_vcont)
2985 (remote_target::discard_pending_stop_replies)
2986 (remote_target::discard_pending_stop_replies_in_queue)
2987 (remote_target::remote_notif_remove_queued_reply)
2988 (remote_target::queued_stop_reply)
2989 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
2990 (remote_target::wait, remote_target::kill_new_fork_children)
2991 (remote_target::async): Update.
2992
1ddbba9d
TT
29932018-06-10 Tom Tromey <tom@tromey.com>
2994
2995 * record-full.c (record_full_arch_list_cleanups): Remove.
2996 (record_full_message): Use try/catch.
2997 (record_full_wait_cleanups): Remove.
2998 (record_full_wait_1): Use try/catch.
2999 (record_full_restore): Likewise.
3000
219605fd
TT
30012018-06-10 Tom Tromey <tom@tromey.com>
3002
3003 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3004 declare VEC. Add constructor.
3005 <in_target_beneath>: Now bool.
3006 (record_full_breakpoints): Now a std::vector, static.
3007 (record_full_sync_record_breakpoints)
3008 (record_full_init_record_breakpoints)
3009 (record_full_target::insert_breakpoint)
3010 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3011
71b73764
SM
30122018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3013
3014 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3015 * serial.c (serial_interface_lookup): Remove struct keyword.
3016
4360561f
TT
30172018-06-10 Tom Tromey <tom@tromey.com>
3018
3019 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3020 method.
3021 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3022 a method.
3023 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3024 method.
3025 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3026 "beneath" as a method.
3027 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3028 Use "beneath" as a method.
3029
d14b92bf
TT
30302018-06-10 Tom Tromey <tom@tromey.com>
3031
3032 * tracefile.c (struct trace_file_writer_deleter): New.
3033 <operator()>: Rename from trace_file_writer_xfree.
3034 (trace_file_writer_up): New typedef.
3035 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3036
835dcf92
SM
30372018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3038
3039 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3040 <m_registers, m_register_status>: Change type to
3041 std::unique_ptr.
3042 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3043 XCNEWVEC.
3044
aac0d564
SM
30452018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3046
3047 * common/common-regcache.h (enum register_status): Add
3048 underlying type "signed char".
3049 * regcache.h (reg_buffer) <m_register_status>: Change type to
3050 register_status *.
3051 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3052 register_status instead of signed char.
3053 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3054 (reg_buffer::get_register_status): Remove cast.
3055 (readable_regcache::raw_read): Remove cast.
3056 (readable_regcache::cooked_read): Remove cast.
3057
77ad7394
TT
30582018-06-09 Tom Tromey <tom@tromey.com>
3059
3060 * source.c (reverse_search_command, forward_search_command): Use
3061 scoped_fd.
3062
191cca63
TT
30632018-06-09 Tom Tromey <tom@tromey.com>
3064
3065 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3066 (serial_ops_list): Now static, std::vector.
3067 (serial_interface_lookup, serial_add_interface): Update.
3068
c5d0225d
TT
30692018-06-09 Tom Tromey <tom@tromey.com>
3070
3071 * dwarf2read.c (process_cu_includes): Update.
3072 (process_full_comp_unit): Update.
3073 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3074 std::vector.
3075
aeab5128
PK
30762018-06-08 Paul Koning <paul_koning@dell.com>
3077
3078 PR gdb/23252
3079
3080 * python/python.c (do_start_initialization):
3081 Avoid call to internal Python API.
3082 (init__gdb_module): New function.
3083
5045b3d7
GB
30842018-06-08 Gary Benson <gbenson@redhat.com>
3085
3086 * linux-thread-db.c (valprint.h): New include.
3087 (struct check_thread_db_info): New structure.
3088 (check_thread_db_on_load, tdb_testinfo): New static globals.
3089 (check_thread_db, check_thread_db_callback): New functions.
3090 (try_thread_db_load_1): Run integrity checks if requested.
3091 (maintenance_check_libthread_db): New function.
3092 (_initialize_thread_db): Register "maint check libthread-db"
3093 and "maint set/show check-libthread-db".
3094 * NEWS: Mention the above new commands.
3095
2f4f025f
TT
30962018-06-08 Tom Tromey <tom@tromey.com>
3097
3098 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3099 now a method.
3100
343b0027
TT
31012018-06-08 Tom Tromey <tom@tromey.com>
3102
3103 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3104
8dcc53b3
TT
31052018-06-08 Tom Tromey <tom@tromey.com>
3106
3107 * common/btrace-common.h (struct btrace_data): Add constructor,
3108 destructor, move assignment operator.
3109 <empty, clear, fini>: New methods.
3110 <format>: Initialize.
3111 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3112 (btrace_data_empty): Don't declare.
3113 * common/btrace-common.c (btrace_data_init): Remove.
3114 (btrace_data::fini): Rename from btrace_data_fini.
3115 (btrace_data::empty): Rename from btrace_data_empty.
3116 (btrace_data::clear): Rename from btrace_data_clear. Return
3117 bool.
3118 * btrace.h (make_cleanup_btrace_data): Don't declare.
3119 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3120 (parse_xml_btrace): Update.
3121 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3122 (maint_btrace_clear_packet_history_cmd): Update.
3123
a1740ee1
PA
31242018-06-07 Pedro Alves <palves@redhat.com>
3125
3126 * target.h (target_ops) <beneath>: Now a method. All references
3127 updated.
3128 (class target_stack): New.
3129 * target.c (g_target_stack): New.
3130 (g_current_top_target): Delete.
3131 (current_top_target): Get the top target out of g_target_stack.
3132 (target_stack::push, target_stack::unpush): New.
3133 (push_target, unpush_target): Reimplement.
3134 (target_is_pushed): Reimplement in terms of g_target_stack.
3135 (target_ops::beneath, target_stack::find_beneath): New.
3136
d6ca69cd
PA
31372018-06-07 Pedro Alves <palves@redhat.com>
3138
3139 * target.h (find_target_beneath): Delete declaration.
3140 * target.c (find_target_beneath): Delete definition.
3141 * aix-thread.c: All callers of find_target_beneath adjusted to
3142 call target_ops::beneath instead.
3143 * bsd-uthread.c: Likewise.
3144 * linux-thread-db.c: Likewise.
3145 * ravenscar-thread.c: Likewise.
3146 * sol-thread.c: Likewise.
3147 * spu-multiarch.c: Likewise.
3148
b6a8c27b
PA
31492018-06-07 Pedro Alves <palves@redhat.com>
3150
3151 * target.h (target_ops) <beneath>: Now a method. All references
3152 updated.
3153 (target_ops) <m_beneath>: New.
3154 * target.c (target_ops::beneath): New.
3155 * corelow.c: Adjust all references to target_ops::beneath.
3156 * linux-thread-db.c: Likewise.
3157 * make-target-delegates: Likewise.
3158 * record-btrace.c: Likewise.
3159 * record-full.c: Likewise.
3160 * remote.c: Likewise.
3161 * target.c: Likewise.
3162 * target-delegates.c: Regenerate.
3163
8b88a78e
PA
31642018-06-07 Pedro Alves <palves@redhat.com>
3165
3166 * target.h (target_stack): Delete.
3167 (current_top_target): Declare function.
3168 * target.c (target_stack): Delete.
3169 (g_current_top_target): New.
3170 (current_top_target): New function.
3171 * auxv.c: Use current_top_target instead of target_stack
3172 throughout.
3173 * avr-tdep.c: Likewise.
3174 * breakpoint.c: Likewise.
3175 * corefile.c: Likewise.
3176 * elfread.c: Likewise.
3177 * eval.c: Likewise.
3178 * exceptions.c: Likewise.
3179 * frame.c: Likewise.
3180 * gdbarch-selftests.c: Likewise.
3181 * gnu-v3-abi.c: Likewise.
3182 * ia64-tdep.c: Likewise.
3183 * ia64-vms-tdep.c: Likewise.
3184 * infcall.c: Likewise.
3185 * infcmd.c: Likewise.
3186 * infrun.c: Likewise.
3187 * linespec.c: Likewise.
3188 * linux-tdep.c: Likewise.
3189 * minsyms.c: Likewise.
3190 * ppc-linux-nat.c: Likewise.
3191 * ppc-linux-tdep.c: Likewise.
3192 * procfs.c: Likewise.
3193 * regcache.c: Likewise.
3194 * remote.c: Likewise.
3195 * rs6000-tdep.c: Likewise.
3196 * s390-linux-nat.c: Likewise.
3197 * s390-tdep.c: Likewise.
3198 * solib-aix.c: Likewise.
3199 * solib-darwin.c: Likewise.
3200 * solib-dsbt.c: Likewise.
3201 * solib-spu.c: Likewise.
3202 * solib-svr4.c: Likewise.
3203 * solib-target.c: Likewise.
3204 * sparc-tdep.c: Likewise.
3205 * sparc64-tdep.c: Likewise.
3206 * spu-tdep.c: Likewise.
3207 * symfile.c: Likewise.
3208 * symtab.c: Likewise.
3209 * target-descriptions.c: Likewise.
3210 * target-memory.c: Likewise.
3211 * target.c: Likewise.
3212 * target.h: Likewise.
3213 * tracefile-tfile.c: Likewise.
3214 * tracepoint.c: Likewise.
3215 * valops.c: Likewise.
3216 * valprint.c: Likewise.
3217 * value.c: Likewise.
3218 * windows-tdep.c: Likewise.
3219 * mi/mi-main.c: Likewise.
3220
c7110220
TT
32212018-06-07 Tom Tromey <tom@tromey.com>
3222
3223 * valprint.h (build_address_symbolic): Declare.
3224 * printcmd.c (print_address_symbolic): Update.
3225 (build_address_symbolic): Change "name" and "filename" to
3226 std::string.
3227 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3228 Update.
3229 * defs.h (build_address_symbolic): Remove declaration.
3230
63bad7b6
AH
32312018-06-07 Alan Hayward <alan.hayward@arm.com>
3232
3233 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3234 (aarch64_vnv_type): Add function.
3235 (aarch64_pseudo_register_name): Add V regs for SVE.
3236 (aarch64_pseudo_register_type): Likewise.
3237 (aarch64_pseudo_register_reggroup_p): Likewise.
3238 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3239 (aarch64_pseudo_read_value): Add V regs for SVE.
3240 (aarch64_pseudo_write_2): Use V0 offset for SVE
3241 (aarch64_pseudo_write): Add V regs for SVE.
3242 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3243
13e3c608
SDJ
32442018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3245
3246 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3247 (sve_vl_from_vq): Likewise.
3248
c61b06a1
TT
32492018-06-05 Tom Tromey <tom@tromey.com>
3250
3251 * cli/cli-cmds.c (show_version): Update.
3252 * top.c (print_gdb_version): Add "interactive" parameter.
3253 Update.
3254 * main.c (captured_main_1): Update.
3255 * top.h (print_gdb_version): Add "interactive" parameter and a
3256 comment.
3257
115f7325
DM
32582018-06-05 David Malcolm <dmalcolm@redhat.com>
3259
3260 * common/enum-flags.h: Add trailing semicolon to example in
3261 comment.
3262
eb6af809
TT
32632018-06-05 Tom Tromey <tom@tromey.com>
3264
3265 PR cli/12326:
3266 * NEWS: Add entry about pager.
3267 * utils.c (pagination_disabled_for_command): New global.
3268 (prompt_for_continue): Allow "c" response to prompt.
3269 (reinitialize_more_filter): Clear
3270 pagination_disabled_for_command.
3271 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3272
54d343a2
TT
32732018-06-04 Tom Tromey <tom@tromey.com>
3274
3275 * ada-lang.h (ada_lookup_symbol_list): Update.
3276 * ada-lang.c (resolve_subexp): Update.
3277 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3278 parameter.
3279 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3280 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3281 results parameter to std::vector.
3282 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3283 Update.
3284 * ada-exp.y (block_lookup): Update.
3285 (select_possible_type_sym): Change type of syms. Remove nsyms
3286 parameter.
3287 (write_var_or_type, write_name_assoc): Update.
3288
178d6a63
JB
32892018-06-04 Joel Brobecker <brobecker@adacore.com>
3290
3291 * windows-nat.c (windows_nat_target::xfer_partial): Return
3292 TARGET_XFER_E_IO if we need to delegate to the target beneath
3293 but BENEATH is NULL.
3294
baf00c2d
SM
32952018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3296
3297 * Makefile.in (config.status): Add configure.nat as a
3298 dependency.
3299
214b073c
TT
33002018-06-04 Tom Tromey <tom@tromey.com>
3301
3302 * cp-name-parser.y (cpname_state): Add method declarations.
3303 (HANDLE_QUAL): Update.
3304 (cpname_state::d_grab, cpname_state::fill_comp)
3305 (cpname_state::make_operator, cpname_state::make_dtor)
3306 (cpname_state::make_builtin_type, cpname_state::make_name)
3307 (cpname_state::d_qualify, cpname_state::d_int_type)
3308 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3309 (%union): Move earlier.
3310
62b74cb8
AH
33112018-06-04 Alan Hayward <alan.hayward@arm.com>
3312
3313 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3314
3c5cd5c3
AH
33152018-06-04 Alan Hayward <alan.hayward@arm.com>
3316
3317 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3318 (aarch64_pseudo_write_1): Likewise.
3319 (aarch64_pseudo_read_value): Use helper.
3320 (aarch64_pseudo_write): Likewise.
3321
59f413d5
PA
33222018-06-04 Pedro Alves <palves@redhat.com>
3323
3324 * darwin-nat.c (darwin_ops): Delete.
3325 (darwin_attach_pid): Use get_native_target.
3326
1332a140
AH
33272018-06-04 Alan Hayward <alan.hayward@arm.com>
3328
3329 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3330 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3331
ba2d2bb2
AH
33322018-06-04 Alan Hayward <alan.hayward@arm.com>
3333
3334 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3335 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3336 (aarch64_gdbarch_init): Check for SVE.
3337 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3338
33392018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3340
3341 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3342 * aarch64-tdep.h (aarch64_read_description): Likewise.
3343 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3344 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3345 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3346 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3347 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3348
41c60b4b
SM
33492018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3350
3351 * value.c (value_fetch_lazy_bitfield): New.
3352 (value_fetch_lazy_memory): New.
3353 (value_fetch_lazy_register): New.
3354 (value_fetch_lazy): Factor out to smaller functions.
3355
7b640f72
TT
33562018-06-01 Tom Tromey <tom@tromey.com>
3357
3358 * cp-name-parser.y (backslashable, represented): Now const.
3359
98e69eb3
TT
33602018-06-01 Tom Tromey <tom@tromey.com>
3361
3362 * cp-name-parser.y: Include parser-defs.h.
3363 (parser_fprintf): Remove declaration.
3364
49265499
TT
33652018-06-01 Tom Tromey <tom@tromey.com>
3366
3367 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3368 %parse-param.
3369 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3370 (global_result): Remove globals.
3371 (struct cpname_state): New.
3372 (yyparse): Don't declare.
3373 (yylex, yyerror): Move declarations after %union.
3374 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3375 (make_name): Add state parameter.
3376 Update all callers.
3377 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3378 parameter.
3379 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3380 Update.
3381 (yylex): Add lvalp, state parameters.
3382 (yyerror): Add state parameter.
3383 (cp_demangled_name_to_comp): Update.
3384
55b6c984
TT
33852018-06-01 Tom Tromey <tom@tromey.com>
3386
3387 * cp-name-parser.y (parser_fprintf): Declare.
3388 (GDB_YY_REMAP_PREFIX): Define.
3389 Include yy-remap.h. Don't redefine yy* identifiers.
3390
3513a6bb
TT
33912018-06-01 Tom Tromey <tom@tromey.com>
3392
3393 * python/py-type.c (typy_legacy_template_argument): Update.
3394 * cp-support.h (cp_demangled_name_to_comp): Update.
3395 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3396 parameter to be a "std::string *".
3397 (main): Update.
3398
e9cb46ab
L
33992018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3400
3401 * ada-lex.l: Include "diagnostics.h" instead of
3402 "common/diagnostics.h".
3403 * unittests/environ-selftests.c: Likewise.
3404 * common/diagnostics.h: Moved to ../include.
3405
8e817061
JB
34062018-06-01 Joel Brobecker <brobecker@adacore.com>
3407
3408 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3409 to language_mode_manual while calling breakpoint_re_set_one.
3410
a737d952
TT
34112018-06-01 Tom Tromey <tom@tromey.com>
3412
3413 * valops.c (value_cast_structs, destructor_name_p): Update.
3414 * symtab.c (gdb_mangle_name): Update.
3415 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3416 Update.
3417 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3418 (pascal_object_print_value_fields, pascal_object_print_value):
3419 Update.
3420 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3421 * linespec.c (find_methods): Update.
3422 * gdbtypes.h (type_name_no_tag): Remove.
3423 (type_name_or_error): Rename from type_name_no_tag_or_error.
3424 * gdbtypes.c (type_name_no_tag): Remove.
3425 (type_name_or_error): Rename from type_name_no_tag_or_error.
3426 (lookup_struct_elt_type, check_typedef): Update.
3427 * expprint.c (print_subexp_standard): Update.
3428 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3429 * d-namespace.c (d_lookup_nested_symbol): Update.
3430 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3431 (cp_print_class_member): Update.
3432 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3433 * completer.c (add_struct_fields): Update.
3434 * c-typeprint.c (cp_type_print_derivation_info)
3435 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3436 Update.
3437 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3438 (ada_prefer_type, ada_is_exception_sym): Update.
3439
e86ca25f
TT
34402018-06-01 Tom Tromey <tom@tromey.com>
3441
3442 * valops.c (enum_constant_from_type, value_namespace_elt)
3443 (value_maybe_namespace_elt): Update.
3444 * valarith.c (find_size_for_pointer_math): Update.
3445 * target-descriptions.c (make_gdb_type): Update.
3446 * symmisc.c (print_symbol): Update.
3447 * stabsread.c (define_symbol, read_type)
3448 (complain_about_struct_wipeout, add_undefined_type)
3449 (cleanup_undefined_types_1): Update.
3450 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3451 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3452 (rust_internal_print_type, rust_composite_type)
3453 (rust_evaluate_funcall, rust_evaluate_subexp)
3454 (rust_inclusive_range_type_p): Update.
3455 * python/py-type.c (typy_get_tag): Update.
3456 * p-typeprint.c (pascal_type_print_base): Update.
3457 * mdebugread.c (parse_symbol, parse_type): Update.
3458 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3459 Update.
3460 * guile/scm-type.c (gdbscm_type_tag): Update.
3461 * go-lang.c (sixg_string_p): Update.
3462 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3463 Update.
3464 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3465 (TYPE_TAG_NAME): Remove.
3466 * gdbtypes.c (type_name_no_tag): Simplify.
3467 (check_typedef, check_types_equal, recursive_dump_type)
3468 (copy_type_recursive, arch_composite_type): Update.
3469 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3470 in summary mode when needed.
3471 * eval.c (evaluate_funcall): Update.
3472 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3473 (process_structure_scope, read_enumeration_type)
3474 (read_namespace_type, read_module_type, determine_prefix): Update.
3475 * cp-support.c (inspect_type): Update.
3476 * coffread.c (process_coff_symbol, decode_base_type): Update.
3477 * c-varobj.c (c_is_path_expr_parent): Update.
3478 * c-typeprint.c (c_type_print_base_struct_union): Update.
3479 (c_type_print_base_1): Update. Print struct/class/union/enum in
3480 summary when using C language.
3481 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3482 (gen_maybe_namespace_elt): Update.
3483 * ada-lang.c (ada_type_name): Simplify.
3484 (empty_record, ada_template_to_fixed_record_type_1)
3485 (template_to_static_fixed_type)
3486 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3487
c1ec8cea
TT
34882018-06-01 Tom Tromey <tom@tromey.com>
3489
3490 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3491 c_print_type.
3492 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3493 (c_print_type): Update.
3494 (c_print_type): New overload.
3495 (c_type_print_varspec_prefix, c_type_print_args)
3496 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3497 (c_type_print_base_struct_union, c_type_print_base_1)
3498 (cp_type_print_method_args): Add "language" parameter.
3499 (c_type_print_base): Update.
3500 * c-lang.h (c_print_type): Add new overload.
3501
bc8453a7
TT
35022018-06-01 Tom Tromey <tom@tromey.com>
3503
3504 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3505 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3506
739e8682
AH
35072018-06-01 Alan Hayward <alan.hayward@arm.com>
3508
3509 * aarch64-tdep.c (aarch64_sve_register_names): New const
3510 var.
3511 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3512 (AARCH64_SVE_Z_REGS_NUM): New define.
3513 (AARCH64_SVE_P_REGS_NUM): Likewise.
3514 (AARCH64_SVE_NUM_REGS): Likewise.
3515
8a60efe7
UB
35162018-05-31 Uros Bizjak <ubizjak@gmail.com>
3517
3518 * nat/linux-ptrace.h [__alpha__]
3519 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3520 definitions.
3521
4b2dfa9d
MR
35222018-05-31 Maciej W. Rozycki <macro@mips.com>
3523
3524 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3525 the endianness selected.
3526 * NEWS: Document `set endian auto' mode operation update.
3527
122394f1
AH
35282018-05-31 Alan Hayward <alan.hayward@arm.com>
3529
3530 * Makefile.in: Add new header.
3531 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3532 (sve_vl_from_vg): Likewise.
3533 (sve_vq_from_vl): Likewise.
3534 (sve_vl_from_vq): Likewise.
3535 (sve_vq_from_vg): Likewise.
3536 (sve_vg_from_vq): Likewise.
3537 * configure.nat: Add new c file.
3538 * nat/aarch64-sve-linux-ptrace.c: New file.
3539 * nat/aarch64-sve-linux-ptrace.h: New file.
3540
95228a0d
AH
35412018-05-31 Alan Hayward <alan.hayward@arm.com>
3542
3543 * aarch64-linux-nat.c (aarch64_linux_read_description):
3544 Add parmeter zero.
3545 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3546 Likewise.
3547 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3548 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3549 (aarch64_gdbarch_init): Add parmeter zero.
3550 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3551 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3552 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3553 parmeter.
3554 * doc/gdb.texinfo: Describe SVE feature
3555 * features/aarch64-sve.c: New file.
3556
5969f0db
OJ
35572018-05-31 Omair Javaid <omair.javaid@linaro.org>
3558
3559 PR gdb/23210
3560 * gdbarch.sh (significant_addr_bit): Default to zero when
3561 not set by target architecture.
3562 * gdbarch.c: Re-generated.
3563 * utils.c (address_significant): Update.
3564
61367c61
JB
35652018-05-30 Joel Brobecker <brobecker@adacore.com>
3566
3567 * stack.c (func_command): Remove trailing newline in call to error.
3568
34a79281
SM
35692018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3570
3571 * regcache.h (regcache_raw_collect): Remove, update callers to
3572 use regcache::raw_collect.
3573 * regcache.c (regcache_raw_collect): Remove.
3574
73e1c03f
SM
35752018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3576
3577 * regcache.h (regcache_raw_supply): Remove, update callers to
3578 use detached_regcache::raw_supply.
3579 * regcache.c (regcache_raw_supply): Remove.
3580
e4c4a59b
SM
35812018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3582
3583 * regcache.h (regcache_cooked_write_part): Remove, update
3584 callers to use regcache::cooked_write_part.
3585 * regcache.c (regcache_cooked_write_part): Remove.
3586
73bb0000
SM
35872018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3588
3589 * regcache.h (regcache_cooked_read_part): Remove, update callers
3590 to use readable_regcache::cooked_read_part.
3591 * regcache.c (regcache_cooked_read_part): Remove.
3592
46a45e9d
SM
35932018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3594
3595 * regcache.h (regcache_cooked_read_value): Remove, update
3596 callers to use readable_regcache::cooked_read_value.
3597 * regcache.c (regcache_cooked_read_value): Remove.
3598
b66f5587
SM
35992018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3600
3601 * regcache.h (regcache_cooked_write): Remove, update callers to
3602 use regcache::cooked_write.
3603 * regcache.c (regcache_cooked_write): Remove.
3604
6aa7d724
SM
36052018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3606
3607 * regcache.h (regcache_invalidate): Remove, update callers to
3608 use detached_regcache::invalidate instead.
3609 * regcache.c (regcache_invalidate): Remove.
3610
4f0420fd
SM
36112018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3612
3613 * regcache.h (regcache_raw_write_part): Remove, update callers
3614 to use regcache::raw_write_part instead.
3615 * regcache.c (regcache_raw_write_part): Remove.
3616
502fe83e
SM
36172018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3618
3619 * regcache.h (regcache_raw_read_part): Remove, update callers to
3620 use readable_regcache::raw_read_part instead.
3621 * regcache.c (regcache_raw_read_part): Remove.
3622
dca08e1f
SM
36232018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3624
3625 * regcache.h (regcache_cooked_read): Remove, update callers to
3626 use readable_regcache::cooked_read instead.
3627 * regcache.c (regcache_cooked_read): Remove.
3628
10eaee5f
SM
36292018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3630
3631 * regcache.h (regcache_raw_write): Remove, update callers to use
3632 regcache::raw_write instead.
3633 * regcache.c (regcache_raw_write): Remove.
3634
0b883586
SM
36352018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3636
3637 * regcache.h (regcache_raw_read): Remove, update callers to use
3638 readable_regcache::raw_read instead.
3639 * regcache.c (regcache_raw_read): Remove.
3640
0b47d985
SM
36412018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3642
3643 * regcache.h (regcache_raw_update): Remove, update callers to
3644 use readable_regcache::raw_update instead.
3645 * regcache.c (regcache_raw_update): Remove.
3646
0ec9f114
SM
36472018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3648
3649 * regcache.h (regcache_register_status): Remove, update callers
3650 to use reg_buffer::get_register_status directly instead.
3651 * regcache.c (regcache_register_status): Remove.
3652
222312d3
SM
36532018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3654
3655 * regcache.h (regcache_get_ptid): Remove, update all callers to
3656 call regcache::ptid instead.
3657 * regcache.c (regcache_get_ptid): Remove.
3658
fdbe37e3
SM
36592018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3660
3661 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3662
f7c6f423
PA
36632018-05-30 Pedro Alves <palves@redhat.com>
3664
3665 * common/common-exceptions.h (exception_rethrow): Use
3666 ATTRIBUTE_NORETURN.
3667
52941706
SM
36682018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3669
3670 * breakpoint.c (print_solib_event, check_status_catch_solib):
3671 Remove struct keyword in range-based for loops.
3672 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3673 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3674 Likewise.
3675 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3676 Likewise.
3677 * symfile.c (addr_info_make_relative): Likewise.
3678 * thread.c (value_in_thread_stack_temporaries): Likewise.
3679
bf2977b5
WP
36802018-06-12 Weimin Pan <weimin.pan@oracle.com>
3681
3682 PR gdb/16841
3683 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3684 aggregate type to get its real type before accessing it.
3685
64cc34d8
WP
36862018-05-29 Weimin Pan <weimin.pan@oracle.com>
3687
3688 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3689 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3690 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3691 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3692 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3693 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3694 * printcmd.c (info_address_command): Likewise.
3695
e7ec8713
TT
36962018-05-29 Tom Tromey <tom@tromey.com>
3697
3698 * windows-nat.c (handle_exception): Update fall-through comment.
3699
bcb430e4
TT
37002018-05-29 Tom Tromey <tom@tromey.com>
3701
3702 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3703 (struct program_space) <added_solibs>: Now a std::vector.
3704 * breakpoint.c (print_solib_event): Update.
3705 (check_status_catch_solib): Update.
3706 * progspace.c (clear_program_space_solib_cache): Update.
3707 * solib.c (update_solib_list): Update.
3708
894882e3
TT
37092018-05-29 Tom Tromey <tom@tromey.com>
3710
3711 * python/py-type.c (typy_richcompare): Update.
3712 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3713 * gdbtypes.h (types_deeply_equal): Return bool.
3714 (types_equal): Likewise.
3715 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3716 declare VEC.
3717 (check_types_equal): Change worklist to std::vector. Return
3718 bool.
3719 (struct type_equality_entry): Add constructor.
3720 (compare_maybe_null_strings): Return bool.
3721 (check_types_worklist): Return bool. Change worklist to
3722 std::vector.
3723 (types_deeply_equal): Use std::vector.
3724 (types_equal): Return bool.
3725 (compare_maybe_null_strings): Simplify.
3726
10b2ded4
TT
37272018-05-29 Tom Tromey <tom@tromey.com>
3728
3729 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3730
4f7deebe
TT
37312018-05-29 Tom Tromey <tom@tromey.com>
3732
3733 * objc-lang.h: Don't include cp-support.h.
3734 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3735 declare VEC.
3736
b8283aea
TT
37372018-05-27 Tom Tromey <tom@tromey.com>
3738
3739 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3740
41a883c8
TT
37412018-05-25 Tom Tromey <tom@tromey.com>
3742
3743 * value.c (value::location): Initialize.
3744
bf259e25
TT
37452018-05-25 Tom Tromey <tom@tromey.com>
3746
3747 * dbxread.c (init_bincl_list): Remove.
3748 (bincl_list): Now a std::vector.
3749 (bincls_allocated, next_bincl): Remove.
3750 (free_bincl_list, do_free_bincl_list_cleanup)
3751 (make_cleanup_free_bincl_list): Remove.
3752 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3753 unique_xmalloc_ptr.
3754 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3755 (struct header_file_location): Add constructor.
3756 (add_bincl_to_list): Remove.
3757
d525a99b
TT
37582018-05-25 Tom Tromey <tom@tromey.com>
3759
3760 * tui/tui.c (tui_enable): Update.
3761 * mi/mi-interp.c (mi_interp::init): Update.
3762 * interps.h (class interp) <name>: New method.
3763 <m_name>: Rename from name.
3764 (~scoped_restore_interp): Update.
3765 * interps.c (interp::interp): Update.
3766 (interp_add, interp_set, interp_lookup_existing)
3767 (current_interp_named_p): Update.
3768
da505cff
TT
37692018-05-25 Tom Tromey <tom@tromey.com>
3770
3771 * interps.c (interp_name): Remove.
3772 * mi/mi-interp.c (mi_interp::init): Update.
3773 * interps.h (interp_name): Remove.
3774 (~scoped_restore_interp): Update.
3775 * tui/tui.c (tui_enable): Update.
3776
29f94340
TT
37772018-05-25 Tom Tromey <tom@tromey.com>
3778
3779 * utils.c (fputs_maybe_filtered): Update.
3780 * linespec.c (decode_line_full): Update.
3781 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3782 (mi_print_breakpoint_for_event, mi_solib_loaded)
3783 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3784 (mi_user_selected_context_changed): Update.
3785 * mi/mi-main.c (mi_execute_command): Update.
3786 * cli/cli-script.c (execute_control_command): Update.
3787 * python/python.c (execute_gdb_command): Update.
3788 * solib.c (info_sharedlibrary_command): Update.
3789 * interps.c (interp_ui_out): Remove.
3790 * interps.h (interp_ui_out): Remove.
3791
716b8bc5
TT
37922018-05-25 Tom Tromey <tom@tromey.com>
3793
3794 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3795 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3796 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3797
753ff9bd
TT
37982018-05-25 Tom Tromey <tom@tromey.com>
3799
3800 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3801 * interps.c (interp_exec): Use scoped_restore.
3802
5ca3b260
TT
38032018-05-25 Tom Tromey <tom@tromey.com>
3804
3805 * remote.c (remote_target::remote_file_get): Use
3806 gdb::byte_vector.
3807 (remote_target::remote_file_put): Likewise.
3808
3173aa2f
TT
38092018-05-25 Tom Tromey <tom@tromey.com>
3810
3811 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3812 a std::string.
3813 (get_pe_section_index, add_pe_exported_sym): Update.
3814 (read_pe_exported_syms): Use gdb::def_vector.
3815
09a5e1b5
TT
38162018-05-25 Tom Tromey <tom@tromey.com>
3817
3818 * frame.c (remove_prev_frame): Remove.
3819 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3820
d8dab6c3
MR
38212018-05-25 Maciej W. Rozycki <macro@mips.com>
3822
3823 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3824 Remove prototypes.
3825 * mips-linux-nat.c (supply_fpregset): Always call
3826 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3827 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3828 `mips_fill_fpregset'.
3829 * mips-linux-tdep.c (mips_supply_fpregset)
3830 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3831 (mips_fill_fpregset_wrapper): Remove functions.
3832 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3833 (mips_linux_fpregset): Remove variable.
3834 (mips_linux_iterate_over_regset_sections): Use
3835 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3836 (mips_linux_o32_sigframe_init): Remove comment.
3837
3c69da40
PA
38382018-05-25 Pedro Alves <palves@redhat.com>
3839
3840 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3841 (struct readahead_cache, struct packet_reg, struct
3842 remote_arch_state, class remote_state): Move higher up in the
3843 file.
3844 (remote_target::m_remote_state): Now an object instead of a pointer.
3845 (remote_target::get_remote_state): Adjust.
3846
39f0c204
AB
38472018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3848
3849 * stack.c (select_and_print_frame): Delete.
3850 (struct function_bounds): Move struct within function.
3851 (func_command): Most content moved into new function
3852 find_frame_for_function, use new function, print result, add
3853 function comment.
3854 (find_frame_for_function): New function, now returns a result.
3855
d392224a
PW
38562018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3857
3858 * stack.c (iterate_over_block_arg_vars): Fix comment.
3859 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3860
45f25d6c
AB
38612018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3862
3863 PR gdb/23203
3864 * frame.c
3865 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3866 Define.
3867 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3868 Define.
3869 * frame.h (class scoped_restore_selected_frame): New class.
3870 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3871 of any exception, use scoped_restore_selected_frame to restore the
3872 frame instead.
3873
da05d921
PA
38742018-05-24 Pedro Alves <palves@redhat.com>
3875
3876 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3877 override.
3878
a8be540e
TT
38792018-05-23 Tom Tromey <tom@tromey.com>
3880
3881 * complaints.c (struct complaints): Remove.
3882 (symfile_complaint_book): Remove.
3883 (series): New global.
3884 (complaint_internal): Update.
3885 (clear_complaints): Update.
3886
ff1cf532
TT
38872018-05-23 Tom Tromey <tom@tromey.com>
3888
3889 * complaints.c (counters): New global.
3890 (struct complain): Remove.
3891 (struct complaints) <root>: Remove.
3892 (complaint_sentinel): Remove.
3893 (symfile_complaint_book): Update.
3894 (find_complaint) Remove.
3895 (complaint_internal, clear_complaints): Update.
3896
7ff88174
TT
38972018-05-23 Tom Tromey <tom@tromey.com>
3898
3899 * complaints.c (struct complain) <file, line>: Remove.
3900 (find_complaint): Remove file, line parameters.
3901 (complaint_internal): Update.
3902
de54e1a5
TT
39032018-05-23 Tom Tromey <tom@tromey.com>
3904
3905 * complaints.c (vcomplaint): Remove.
3906 (complaint_internal) Merge in contents of vcomplaint.
3907
2ac237e5
TT
39082018-05-23 Tom Tromey <tom@tromey.com>
3909
3910 * complaints.c (struct complaints) <explanation>: Remove.
3911 (symfile_explanations): Remove.
3912 (symfile_complaint_book): Update.
3913 (vcomplaint): Update.
3914 (struct explanation): Remove.
3915
b98664d3
TT
39162018-05-23 Tom Tromey <tom@tromey.com>
3917
3918 * complaints.c (symfile_complaints): Remove.
3919 (complaint_internal): Remove "complaints" parameter.
3920 (clear_complaints, vcomplaint): Remove "c" parameter.
3921 (get_complaints): Remove.
3922 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
3923 (dwarf2_debug_line_missing_file_complaint)
3924 (dwarf2_debug_line_missing_end_sequence_complaint)
3925 (dwarf2_complex_location_expr_complaint)
3926 (dwarf2_const_value_length_mismatch_complaint)
3927 (dwarf2_section_buffer_overflow_complaint)
3928 (dwarf2_macro_malformed_definition_complaint)
3929 (dwarf2_invalid_attrib_class_complaint)
3930 (create_addrmap_from_index, dw2_symtab_iter_next)
3931 (dw2_expand_marked_cus)
3932 (dw2_debug_names_iterator::find_vec_in_debug_names)
3933 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
3934 (create_debug_type_hash_table, init_cutu_and_read_dies)
3935 (partial_die_parent_scope, add_partial_enumeration)
3936 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
3937 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
3938 (read_import_statement, read_file_scope, create_dwo_cu_reader)
3939 (create_cus_hash_table, create_dwp_hash_table)
3940 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
3941 (dwarf2_rnglists_process, dwarf2_ranges_process)
3942 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
3943 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
3944 (handle_struct_member_die, process_structure_scope)
3945 (read_array_type, read_common_block, read_module_type)
3946 (read_tag_pointer_type, read_typedef, read_base_type)
3947 (read_subrange_type, load_partial_dies, partial_die_info::read)
3948 (partial_die_info::read, partial_die_info::read)
3949 (partial_die_info::read, read_checked_initial_length_and_offset)
3950 (dwarf2_string_attr, read_formatted_entries)
3951 (dwarf_decode_line_header)
3952 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3953 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
3954 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
3955 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3956 (get_signatured_type, get_DW_AT_signature_type)
3957 (decode_locdesc, file_file_name, consume_improper_spaces)
3958 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
3959 (dwarf_decode_macro_bytes, dwarf_decode_macros)
3960 (dwarf2_symbol_mark_computed, set_die_type)
3961 (read_attribute_value): Update.
3962 * stap-probe.c (handle_stap_probe, get_stap_base_address):
3963 Update.
3964 * dbxread.c (unknown_symtype_complaint)
3965 (lbrac_mismatch_complaint, repeated_header_complaint)
3966 (set_namestring, function_outside_compilation_unit_complaint)
3967 (read_dbx_symtab, process_one_symbol): Update.
3968 * gdbtypes.c (stub_noname_complaint): Update.
3969 * windows-nat.c (handle_unload_dll): Update.
3970 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
3971 (decode_base_type): Update.
3972 * xcoffread.c (bf_notfound_complaint, ef_complaint)
3973 (eb_complaint, record_include_begin, record_include_end)
3974 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
3975 (process_xcoff_symbol, read_symbol)
3976 (function_outside_compilation_unit_complaint)
3977 (scan_xcoff_symtab): Update.
3978 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
3979 * buildsym.c (finish_block_internal, make_blockvector)
3980 (end_symtab_get_static_block, augment_type_symtab): Update.
3981 * dtrace-probe.c (dtrace_process_dof)
3982 (dtrace_static_probe_ops::get_probes): Update.
3983 * complaints.h (struct complaint): Don't declare.
3984 (symfile_complaints): Remove.
3985 (complaint_internal): Remove "complaints" parameter.
3986 (complaint): Likewise.
3987 (clear_complaints): Likewise.
3988 * symfile.c (syms_from_objfile_1, finish_new_objfile)
3989 (reread_symbols): Update.
3990 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
3991 (dwarf2_frame_cache, decode_frame_entry): Update.
3992 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
3993 * objc-lang.c (lookup_objc_class, lookup_child_selector)
3994 (info_selectors_command): Update.
3995 * macrotab.c (macro_include, check_for_redefinition)
3996 (macro_undef): Update.
3997 * objfiles.c (filter_overlapping_sections): Update.
3998 * stabsread.c (invalid_cpp_abbrev_complaint)
3999 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4000 (define_symbol, error_type, read_type, rs6000_builtin_type)
4001 (stabs_method_name_from_physname, read_member_functions)
4002 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4003 (attach_fields_to_type, complain_about_struct_wipeout)
4004 (read_range_type, read_args, common_block_start)
4005 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4006 Update.
4007 * mdebugread.c (index_complaint, unknown_ext_complaint)
4008 (basic_type_complaint, bad_tag_guess_complaint)
4009 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4010 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4011 (parse_procedure, parse_lines)
4012 (function_outside_compilation_unit_complaint)
4013 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4014 (bad_tag_guess_complaint, reg_value_complaint): Update.
4015 * cp-support.c (demangled_name_complaint): Update.
4016 * macroscope.c (sal_macro_scope): Update.
4017 * dwarf-index-write.c (class debug_names): Update.
4018
4e9668d0
TT
40192018-05-23 Tom Tromey <tom@tromey.com>
4020
4021 * complaints.c (clear_complaints): Remove "noisy" parameter.
4022 * complaints.h (clear_complaints): Update.
4023 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4024 (reread_symbols): Update.
4025
43ba33c7
TT
40262018-05-23 Tom Tromey <tom@tromey.com>
4027
4028 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4029 SUBSEQUENT_MESSAGE.
4030 (vcomplaint, clear_complaints): Update.
4031 (symfile_explanations): Remove some messages.
4032
2b9496b2
TT
40332018-05-23 Tom Tromey <tom@tromey.com>
4034
4035 * complaints.c (internal_complaint): Remove.
4036 * complaints.h (internal_complaint): Remove.
4037
35f1fea3
MR
40382018-05-22 Maciej W. Rozycki <macro@mips.com>
4039
4040 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4041
6b8edb51
PA
40422018-05-22 Pedro Alves <palves@redhat.com>
4043
4044 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4045 (remote_fileio_badfd, remote_fileio_return_errno)
4046 (remote_fileio_return_success, remote_fileio_func_open)
4047 (remote_fileio_func_open, remote_fileio_func_close)
4048 (remote_fileio_func_read, remote_fileio_func_write)
4049 (remote_fileio_func_lseek, remote_fileio_func_rename)
4050 (remote_fileio_func_unlink, remote_fileio_func_stat)
4051 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4052 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4053 remote_target parameter.
4054 (remote_fio_func_map) <func>: Add remote_target parameter.
4055 (do_remote_fileio_request, remote_fileio_request):
4056 * remote-fileio.h (remote_fileio_request):
4057 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4058 remote_target parameter.
4059 (remote_notif_process, handle_notification): Adjust to pass down
4060 the remote.
4061 (remote_notif_state_allocate): Add remote_target parameter. Save
4062 it.
4063 * remote-notif.h (struct remote_target): Forward declare.
4064 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4065 remote_target parameter.
4066 (struct remote_notif_state) <remote>: New field.
4067 (remote_notif_ack, remote_notif_parse): Add remote_target
4068 parameter.
4069 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4070 remote_target parameter.
4071 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4072 (threads_listing_context, rmt_thread_action, protocol_feature)
4073 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4074 (packet_result, struct threads_listing_context, remote_state):
4075 Move definitions and declarations higher up.
4076 (remote_target) <~remote_target>: Declare.
4077 (remote_download_command_source, remote_file_put, remote_file_get)
4078 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4079 (remote_hostio_pread_vFile, remote_hostio_send_command)
4080 (remote_hostio_set_filesystem, remote_hostio_open)
4081 (remote_hostio_close, remote_hostio_unlink, remote_state)
4082 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4083 (get_memory_write_packet_size, get_memory_read_packet_size)
4084 (append_pending_thread_resumptions, remote_detach_1)
4085 (append_resumption, remote_resume_with_vcont)
4086 (add_current_inferior_and_thread, wait_ns, wait_as)
4087 (process_stop_reply, remote_notice_new_inferior)
4088 (process_initial_stop_replies, remote_add_thread)
4089 (btrace_sync_conf, remote_btrace_maybe_reopen)
4090 (remove_new_fork_children, kill_new_fork_children)
4091 (discard_pending_stop_replies, stop_reply_queue_length)
4092 (check_pending_events_prevent_wildcard_vcont)
4093 (discard_pending_stop_replies_in_queue, stop_reply)
4094 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4095 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4096 (remote_interrupt_as, remote_interrupt_ns)
4097 (remote_get_noisy_reply, remote_query_attached)
4098 (remote_add_inferior, remote_current_thread, get_current_thread)
4099 (set_thread, set_general_thread, set_continue_thread)
4100 (set_general_process, write_ptid)
4101 (remote_unpack_thread_info_response, remote_get_threadinfo)
4102 (parse_threadlist_response, remote_get_threadlist)
4103 (remote_threadlist_iterator, remote_get_threads_with_ql)
4104 (remote_get_threads_with_qxfer)
4105 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4106 (get_offsets, remote_check_symbols, remote_supported_packet)
4107 (remote_query_supported, remote_packet_size)
4108 (remote_serial_quit_handler, remote_detach_pid)
4109 (remote_vcont_probe, remote_resume_with_hc)
4110 (send_interrupt_sequence, interrupt_query)
4111 (remote_notif_get_pending_events, fetch_register_using_p)
4112 (send_g_packet, process_g_packet, fetch_registers_using_g)
4113 (store_register_using_P, store_registers_using_G)
4114 (set_remote_traceframe, check_binary_download)
4115 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4116 (remote_xfer_live_readonly_partial, remote_read_bytes)
4117 (remote_send_printf, remote_flash_write, readchar)
4118 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4119 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4120 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4121 (extended_remote_disable_randomization, extended_remote_run)
4122 (send_environment_packet, extended_remote_environment_support)
4123 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4124 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4125 (packet_command): Now methods of ...
4126 (remote_target): ... this class.
4127 (m_remote_state) <remote_target>: New field.
4128 (struct remote_state) <stop_reply_queue,
4129 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4130 fields.
4131 (remote_state::remote_state): Allocate stop_reply_queue.
4132 (remote_state): Delete global.
4133 (get_remote_state_raw): Delete.
4134 (remote_target::get_remote_state): Allocate m_remote_state on
4135 demand.
4136 (get_current_remote_target): New.
4137 (remote_ops, extended_remote_ops): Delete.
4138 (wait_forever_enabled_p, remote_async_inferior_event_token):
4139 Delete, moved to struct remote_state.
4140 (remote_target::close): Delete self. Destruction bits split to
4141 ...
4142 (remote_target::~remote_target): ... this.
4143 (show_memory_packet_size): Adjust to use
4144 get_current_remote_target.
4145 (struct protocol_feature) <func>: Add remote_target parameter.
4146 All callers adjusted.
4147 (curr_quit_handler_target): New.
4148 (remote_serial_quit_handler): Reimplement.
4149 (remote_target::open_1): Adjust to use get_current_remote_target.
4150 Heap-allocate remote_target/extended_remote_target instances.
4151 (vcont_builder::vcont_builder): Add remote_target parameter, and
4152 save it in m_remote. All callers adjusted.
4153 (vcont_builder::m_remote): New field.
4154 (vcont_builder::restart, vcont_builder::flush)
4155 (vcont_builder::push_action): Use it.
4156 (remote_target::commit_resume): Use it.
4157 (struct queue_iter_param) <remote>: New field.
4158 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4159 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4160 (check_pending_event_prevents_wildcard_vcont_callback)
4161 (remote_target::check_pending_events_prevent_wildcard_vcont)
4162 (remote_target::discard_pending_stop_replies)
4163 (remote_target::discard_pending_stop_replies_in_queue)
4164 (remote_target::remote_notif_remove_queued_reply): Fill in
4165 'remote' field.
4166 (remote_notif_get_pending_events): New.
4167 (remote_target::readchar, remote_target::remote_serial_write):
4168 Save/restore curr_quit_handler_target.
4169 (putpkt): New.
4170 (kill_new_fork_children): Fill in 'remote' field.
4171 (packet_command): Use get_current_remote_target, defer to
4172 remote_target method of same name.
4173 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4174 parameter, and save it in m_remote. All callers adjusted.
4175 (scoped_remote_fd::release): Use m_remote.
4176 (scoped_remote_fd::m_remote): New field.
4177 (remote_file_put, remote_file_get, remote_file_delete): Use
4178 get_current_remote_target, defer to remote_target method of same
4179 name.
4180 (remote_btrace_reset): Add remote_state paremeter. Update all
4181 callers.
4182 (remote_async_inferior_event_handler). Pass down 'data'.
4183 (remote_new_objfile): Use get_current_remote_target.
4184 (remote_target::vcont_r_supported): New.
4185 (set_range_stepping): Use get_current_remote_target and
4186 remote_target::vcont_r_supported.
4187 (_initialize_remote): Don't allocate 'remote_state' and
4188 'stop_reply_queue' globals.
4189 * remote.h (struct remote_target): Forward declare.
4190 (getpkt, putpkt, remote_notif_get_pending_events): Add
4191 'remote_target' parameter.
4192
f5db4863
PA
41932018-05-22 Pedro Alves <palves@redhat.com>
4194
4195 * remote.c (vcont_builder): Now a class. Make all data members
4196 private.
4197 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4198 Declare methods.
4199 (vcont_builder_restart): Rename to ...
4200 (vcont_builder::restart): ... this.
4201 (vcont_builder_flush): Rename to ...
4202 (vcont_builder::flush): ... this.
4203 (vcont_builder_push_action): Rename to ...
4204 (vcont_builder::push_action): ... this.
4205 (remote_target::commit_resume): Adjust.
4206
cc0be08f
PA
42072018-05-22 Pedro Alves <palves@redhat.com>
4208
4209 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4210 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4211 (get_fixed_memory_packet_size): New.
4212 (get_memory_packet_size): Use it.
4213 (set_memory_packet_size): Don't override the config size with
4214 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4215 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4216 Don't refer to get_memory_packet_size if not connected to a remote
4217 target. Show "(default)" if configured size is 0.
4218
9607784a
PA
42192018-05-22 Pedro Alves <palves@redhat.com>
4220
4221 * remote.c (remote_target::mourn_inferior): Move
4222 discard_pending_stop_replies call here from ...
4223 (_initialize_remote): ... here.
4224
0e9a6b2f
PA
42252018-05-22 Pedro Alves <palves@redhat.com>
4226
4227 * remote.c (compare_section_command): Remove set_general_process
4228 call.
4229
43c3a0e4
PA
42302018-05-22 Pedro Alves <palves@redhat.com>
4231
4232 * remote.c (struct packet_reg, struct remote_arch_state):
4233 Move higher up in the file.
4234 (remote_state) <m_arch_states>: Store remote_arch_state values
4235 instead of remote_arch_state pointers.
4236 (remote_state::get_remote_arch_state): Adjust.
4237
9d6eea31
PA
42382018-05-22 Pedro Alves <palves@redhat.com>
4239
4240 * remote.c: Include <unordered_map>.
4241 (remote_state): Now a class.
4242 (remote_state) <get_remote_arch_state>: Declare method.
4243 <get_remote_arch_state>: New field.
4244 (remote_arch_state) <remote_arch_state>: Declare ctor.
4245 <regs>: Now a unique_ptr.
4246 (remote_gdbarch_data_handle): Delete.
4247 (get_remote_arch_state): Delete.
4248 (remote_state::get_remote_arch_state): New.
4249 (get_remote_state): Adjust to call remote_state's
4250 get_remote_arch_state method.
4251 (init_remote_state): Delete, bits factored out to ...
4252 (remote_arch_state::remote_arch_state): ... this new method.
4253 (get_remote_packet_size, get_memory_packet_size)
4254 (process_g_packet, remote_target::fetch_registers)
4255 (remote_target::prepare_to_store, store_registers_using_G)
4256 (remote_target::store_registers, remote_target::get_trace_status):
4257 Adjust to call remote_state's method.
4258 (_initialize_remote): Remove reference to
4259 remote_gdbarch_data_handle.
4260
dd194f6b
PA
42612018-05-22 Pedro Alves <palves@redhat.com>
4262
4263 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4264 pread>: New method declarations.
4265 (remote_target::open_1): Adjust.
4266 (readahead_cache_invalidate): Rename to ...
4267 (readahead_cache::invalidate): ... this, and adjust to be a class
4268 method.
4269 (readahead_cache_invalidate_fd): Rename to ...
4270 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4271 class method.
4272 (remote_hostio_pwrite): Adjust.
4273 (remote_hostio_pread_from_cache): Rename to ...
4274 (readahead_cache::pread): ... this, and adjust to be a class
4275 method.
4276 (remote_hostio_close): Adjust.
4277
440b7aec
PA
42782018-05-22 Pedro Alves <palves@redhat.com>
4279
4280 * remote.c (remote_hostio_close_cleanup): Delete.
4281 (class scoped_remote_fd): New.
4282 (remote_file_put, remote_file_get): Use it.
4283
de44f5a7
PA
42842018-05-22 Pedro Alves <palves@redhat.com>
4285
4286 (struct vCont_action_support): Use bool and initialize all fields.
4287 (struct readahead_cache): Initialize all fields.
4288 (remote_state): Use bool and initialize all fields.
4289 (remote_state::remote_state, remote_state::~remote_state): New.
4290 (new_remote_state): Delete.
4291 (_initialize_remote): Use new to allocate remote_state.
4292
b1b60145
PA
42932018-05-22 Pedro Alves <palves@redhat.com>
4294 張俊芝 <zjz@zjz.name>
4295
4296 PR gdb/22973
4297 * c-exp.y: Include "c-support.h".
4298 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4299 of tolower. Use c_ident_is_alpha to scan names.
4300 * c-lang.c: Include "c-support.h".
4301 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4302 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4303 * c-support.h: New file, with bits factored out from ...
4304 * cp-name-parser.y: ... this file.
4305 Include "c-support.h".
4306 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4307 c-support.h and renamed.
4308 (symbol_end, yylex): Adjust.
4309
0ec848ad
PFC
43102018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4311
4312 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4313 parameter type to CORE_ADDR.
4314 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4315 parameter type in declaration to CORE_ADDR.
4316 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4317 target_auxv_search to get AT_HWCAP and use the result to get the
4318 target description.
4319 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4320 to CORE_ADDR. Remove the cast of the return value to unsigned
4321 long. Fix error predicate of target_auxv_search.
4322 (ppc_linux_nat_target::read_description): Change the type of the
4323 hwcap variable to CORE_ADDR.
4324
0fb2aaa1
PFC
43252018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4326
4327 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4328 if the size of fpscr is larger than 32 bits.
4329
2c3305f6
PFC
43302018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4331
4332 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4333 (ppc32_linux_vsxregmap): New global.
4334 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4335 regcache_supply_regset, and regcache_collect_regset.
4336 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4337 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4338 (fetch_vsx_register, store_vsx_register): Remove.
4339 (fetch_vsx_registers): Add regno parameter. Get regset using
4340 ppc_linux_vsxregset. Use regset to supply registers.
4341 (store_vsx_registers): Add regno parameter. Get regset using
4342 ppc_linux_vsxregset. Use regset to collect registers.
4343 (fetch_register): Call fetch_vsx_registers instead of
4344 fetch_vsx_register.
4345 (store_register): Call store_vsx_registers instead of
4346 store_vsx_register.
4347 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4348 new regno parameter.
4349 (store_ppc_registers): Call store_vsx_registers with -1 for the
4350 new regno parameter.
4351 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4352 (ppc_collect_vsxregset): Remove.
4353
1d75a658
PFC
43542018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4355
4356 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4357 offset fields.
4358 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4359 for vector register offset fields.
4360 (ppc64_fbsd_reg_offsets): Likewise.
4361 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4362 to vector register offset fields.
4363 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4364 to vector register offset fields.
4365 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4366 vector register offset fields.
4367 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4368 initializers for vector register offset fields.
4369 (rs6000_aix64_reg_offsets): Likewise.
4370 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4371 (ppc_supply_vrregset): Remove.
4372 (ppc_collect_vrregset): Remove.
4373 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4374 (ppc_linux_vrregset) : New function.
4375 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4376 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4377 (ppc32_linux_vrregset): Remove.
4378 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4379 and use result instead of ppc32_linux_vrregset.
4380 (ppc32_linux_reg_offsets): Remove initializers for vector register
4381 offset fields.
4382 (ppc64_linux_reg_offsets): Likewise.
4383 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4384 * ppc-linux-nat.c: Include regset.h.
4385 (gdb_vrregset_t): Adjust comment to account for little-endian
4386 mode.
4387 (supply_vrregset, fill_vrregset): Remove.
4388 (fetch_altivec_register, store_altivec_register): Remove.
4389 (fetch_altivec_registers): Add regno parameter. Get regset using
4390 ppc_linux_vrregset. Use regset to supply registers.
4391 (store_altivec_registers): Add regno parameter. Get regset using
4392 ppc_linux_vrregset. Use regset to collect registers.
4393 (fetch_register): Call fetch_altivec_registers instead of
4394 fetch_altivec_register.
4395 (store_register): Call store_altivec_registers instead of
4396 store_altivec_register.
4397 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4398 the new regno parameter.
4399 (store_ppc_registers): Call store_altivec_registers with -1 for
4400 the new regno parameter.
4401
d078308a
PFC
44022018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4403
4404 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4405 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4406 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4407 (gdb_vrregset_t): Change array type size to
4408 PPC_LINUX_SIZEOF_VRREGSET.
4409 (gdb_vsxregset_t): Change array type size to
4410 PPC_LINUX_SIZEOF_VSXREGSET.
4411 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4412 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4413 PPC_LINUX_SIZEOF_VSXREGSET.
4414
2e077f5e
PFC
44152018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4416
4417 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4418 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4419 nat/ppc-linux.c.
4420 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4421 ppc_linux_target_wordsize with tid.
4422 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4423 wordsize with tid.
4424 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4425 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4426 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4427 tid parameter. Remove static specifier.
4428 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4429 (ppc_linux_target_wordsize): New declaration.
4430
bd64614e
PFC
44312018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4432
4433 * arch/ppc-linux-common.c: New file.
4434 * arch/ppc-linux-common.h: New file.
4435 * arch/ppc-linux-tdesc.h: New file.
4436 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4437 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4438 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4439 arch/ppc-linux-tdesc.h.
4440 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4441 arch/ppc-linux-tdesc.h.
4442 (ppc_linux_nat_target::read_description): Remove target
4443 description matching code. Fill a ppc_linux_features struct and
4444 call ppc_linux_match_description with it. Move comment about ISA
4445 2.05 to ppc-linux-common.c.
4446 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4447 arch/ppc-linux-tdesc.h.
4448 (ppc_linux_core_read_description): Remove target description
4449 matching code. Fill a ppc_linux_features struct and call
4450 ppc_linux_match_description with it.
4451 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4452 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4453 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4454 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4455 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4456 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4457 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4458 (tdesc_powerpc_e500l): Remove.
4459
241db429
JB
44602018-05-22 Joel Brobecker <brobecker@adacore.com>
4461
4462 * ada-lang.c (catch_assert_command): Pass empty string instead
4463 of NULL for excep_string argument.
4464
75d74cca
MR
44652018-05-22 Maciej W. Rozycki <macro@mips.com>
4466
4467 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4468 the width of the requested register exceeds the width of the
4469 `ptrace' data type.
4470
122b53ea
TT
44712018-05-21 Tom Tromey <tom@tromey.com>
4472
4473 * printcmd.c (output_command): Remove.
4474 (output_command_const): Rename to output_command.
4475 * valprint.h (output_command): Rename from output_command_const.
4476 * tracepoint.c (trace_dump_actions): Call output_command.
4477
bc18fbb5
TT
44782018-05-21 Tom Tromey <tom@tromey.com>
4479
4480 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4481 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4482 * ada-lang.h (create_ada_exception_catchpoint): Update.
4483 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4484 std::string.
4485 (create_excep_cond_exprs, ~ada_catchpoint)
4486 (should_stop_exception, print_one_exception)
4487 (print_mention_exception, print_recreate_exception): Update.
4488 (ada_get_next_arg): Remove.
4489 (catch_ada_exception_command_split): Use std::string. Change type
4490 of "excep_string", "cond_string".
4491 (catch_ada_exception_command): Update.
4492 (create_ada_exception_catchpoint): Change type of excep_string.
4493 (ada_exception_sal): Remove excep_string parameter.
4494 (~ada_catchpoint): Remove.
4495
790217f6
TT
44962018-05-21 Tom Tromey <tom@tromey.com>
4497
4498 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4499 cleanup.
4500
6f46ac85
TT
45012018-05-21 Tom Tromey <tom@tromey.com>
4502
4503 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4504 Return unique_xmalloc_ptr.
4505 (print_it_exception): Update.
4506
15b6611c
TT
45072018-05-21 Tom Tromey <tom@tromey.com>
4508
4509 * tracepoint.c (trace_dump_actions): Use std::string.
4510
c0c9f665
TT
45112018-05-21 Tom Tromey <tom@tromey.com>
4512
4513 * symfile.c (reread_symbols): Use std::string for original_name.
4514
22ca247e
TT
45152018-05-21 Tom Tromey <tom@tromey.com>
4516
4517 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4518 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4519 constructor.
4520
184cde75
SM
45212018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4522
4523 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4524 instance to...
4525 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4526 * objfiles.c (get_objfile_bfd_data): Allocate
4527 objfile_per_bfd_storage with obstack_new when allocating on
4528 obstack.
4529
e39db4db
SM
45302018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4531
4532 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4533 OBSTACK_ZALLOC.
4534 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4535 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4536 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4537 (add_pending): Likewise.
4538 (parse_symbol): Likewise.
4539 (parse_partial_symbols): Likewise.
4540 (psymtab_to_symtab_1): Likewise.
4541 (new_psymtab): Likewise.
4542 (elfmdebug_build_psymtabs): Likewise.
4543 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4544 * objfiles.c (get_objfile_bfd_data): Likewise.
4545 (objfile_register_static_link): Likewise.
4546 * psymtab.c (allocate_psymtab): Likewise.
4547 * stabsread.c (read_member_functions): Likewise.
4548 * xcoffread.c (xcoff_end_psymtab): Likewise.
4549
284a0e3c
SM
45502018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4551
4552 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4553 compiler supports std::is_trivially_constructible.
4554 * common/poison.h: Include obstack.h.
4555 (IsMallocable): Define to is_trivially_constructible if the
4556 compiler supports it, define to true_type otherwise.
4557 (xobnew): New.
4558 (XOBNEW): Redefine.
4559 (xobnewvec): New.
4560 (XOBNEWVEC): Redefine.
4561 * gdb_obstack.h (obstack_zalloc): New.
4562 (OBSTACK_ZALLOC): Redefine.
4563 (obstack_calloc): New.
4564 (OBSTACK_CALLOC): Redefine.
4565 (obstack_new): New.
4566 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4567 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4568 gdbarch.c.
4569 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4570 obstack_calloc/obstack_zalloc.
4571 (gdbarch_obstack_zalloc): Remove.
4572 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4573
59f66be3
PW
45742018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4575
4576 * stack.c (backtrace_command_1): Remove useless variable int i.
4577
50c65c2d
PW
45782018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4579
4580 * stack.c (print_frame_info): Fix comment.
4581
7ff8cb8c
TT
45822018-05-18 Tom Tromey <tom@tromey.com>
4583
4584 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4585 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4586 (~dwarf2_per_objfile): Update
4587 (dwarf2_get_dwz_file): Use new.
4588 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4589 unique_ptr.
4590
400174b1
TT
45912018-05-18 Tom Tromey <tom@tromey.com>
4592
4593 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4594 unique_ptr.
4595 * dwarf2read.c (struct dwp_file): Add constructor and
4596 initializers.
4597 (open_and_init_dwp_file): Return a unique_ptr.
4598 (dwarf2_per_objfile, create_dwp_hash_table)
4599 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4600 (lookup_dwo_unit_in_dwp): Update.
4601 (open_and_init_dwp_file, get_dwp_file): Update.
4602
3063847f
TT
46032018-05-18 Tom Tromey <tom@tromey.com>
4604
4605 * dwarf2read.c (dwarf2_per_objfile): Update.
4606 (struct mapped_index): Add initializers.
4607 (dwarf2_read_index): Use new.
4608 (dw2_symtab_iter_init): Update.
4609 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4610 unique_ptr.
4611
d3d02dee
SM
46122018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4613
4614 * dwarf2read.c (mapped_index) <total_size>: Remove.
4615
1d143c36
SM
46162018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4617
4618 * unittests/format_pieces-selftests.c (test_format_specifier):
4619 Add ARI comments.
4620
ce1e8424
TT
46212018-05-18 Tom Tromey <tom@tromey.com>
4622
4623 * c-typeprint.c (maybe_print_hole): New function.
4624 (c_print_type_struct_field_offset): Update.
4625 (c_type_print_base_struct_union): Call maybe_print_hole.
4626
ddfe970e
KS
46272018-05-17 Keith Seitz <keiths@redhat.com>
4628
4629 * breakpoint.c (build_bpstat_chain): New function, moved from
4630 bpstat_stop_status.
4631 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4632 If no stop chain is passed, call build_bpstat_chain to build it.
4633 * breakpoint.h (build_bpstat_chain): Declare.
4634 (bpstat_stop_status): Move documentation here from breakpoint.c.
4635 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4636 build the stop chain and pass it to skip_inline_frames.
4637 Pass this stop chain to bpstat_stop_status.
4638 * inline-frame.c: Include breakpoint.h.
4639 (stopped_by_user_bp_inline_frame): New function.
4640 (skip_inline_frames): Add parameter `stop_chain'.
4641 Move documention to inline-frame.h.
4642 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4643 whether the frame should be elided.
4644 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4645 Add moved documentation and update for new parameter.
4646
b17992c1
SM
46472018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4648
4649 PR cli/14975
4650 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4651 unittests/format_pieces-selftests.c.
4652 * common/format.h (format_piece) <operator==>: New.
4653 (format_pieces) <operator[]>: Remove.
4654 * common/format.c (format_pieces::format_pieces): Handle \e.
4655 * unittests/format_pieces-selftests.c: New.
4656
58f0c718
TT
46572018-05-17 Tom Tromey <tom@tromey.com>
4658
4659 PR symtab/23010:
4660 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4661 (dw2_instantiate_symtab): Add skip_partial parameter.
4662 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4663 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4664 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4665 (dw2_expand_symtabs_matching_one)
4666 (dw2_find_pc_sect_compunit_symtab)
4667 (dw2_debug_names_lookup_symbol)
4668 (dw2_debug_names_expand_symtabs_for_function): Update.
4669 (init_cutu_and_read_dies): Add skip_partial parameter.
4670 (process_psymtab_comp_unit, build_type_psymtabs_1)
4671 (process_skeletonless_type_unit, load_partial_comp_unit)
4672 (psymtab_to_symtab_1): Update.
4673 (load_full_comp_unit): Add skip_partial parameter.
4674 (process_imported_unit_die, dwarf2_read_addr_index)
4675 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4676 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4677 (read_signatured_type): Update.
4678
3e618834
SM
46792018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4680
4681 * value.c (release_value): Remove unused variable.
4682 (record_latest_value): Likewise.
4683 (access_value_history): Likewise.
4684 (preserve_values): Likewise.
4685
fe10fe31
TT
46862018-05-17 Tom Tromey <tom@tromey.com>
4687
4688 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4689 Initialize.
4690
1d761124
MR
46912018-05-16 Maciej W. Rozycki <macro@mips.com>
4692
4693 PR gdb/22286
4694 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4695 Also handle registers whose width is not a multiple of
4696 PTRACE_TYPE_RET.
4697 (linux_nat_trad_target::store_register): Likewise.
4698
06333fea
TT
46992018-05-16 Tom Tromey <tom@tromey.com>
4700
4701 * gdbcore.h (core_bfd): Redefine.
4702 * corelow.c (core_target::close): Update.
4703 (core_target_open): Update.
4704 * progspace.h (struct program_space) <cbfd>: Now a
4705 gdb_bfd_ref_ptr.
4706
921222e2
TT
47072018-05-16 Tom Tromey <tom@tromey.com>
4708
4709 PR cli/19551:
4710 * symfile-add-flags.h (enum symfile_add_flags)
4711 <SYMFILE_NOT_FILENAME>: New constant.
4712 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4713 objfile name from BFD.
4714 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4715 * minidebug.c (find_separate_debug_file_in_section): Put
4716 ".gnu_debugdata" into BFD's file name.
4717
3acb7083
SM
47182018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4719
4720 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4721 Remove.
4722
561a72d4
TC
47232018-05-15 Tamar Christina <tamar.christina@arm.com>
4724
4725 PR binutils/21446
4726 * aarch64-tdep.c (aarch64_analyze_prologue,
4727 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4728 Indicate not interested in errors.
4729
4e6ff0e1
MR
47302018-05-15 Maciej W. Rozycki <macro@mips.com>
4731
4732 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4733 Supply the MIPS_ZERO_REGNUM register.
4734
ea33cd92
MR
47352018-05-15 Maciej W. Rozycki <macro@mips.com>
4736
4737 * mips-tdep.c (mask_address_var): Make variable static.
4738
2d79090e
TT
47392018-05-14 Tom Tromey <tom@tromey.com>
4740
4741 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4742
cf4912ae
AB
47432018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4744
4745 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4746 FXSAVE_ADDR for the mxcsr register.
4747
67e6f569
MF
47482018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4749
4750 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4751
15244507
PA
47522018-05-11 Pedro Alves <palves@redhat.com>
4753
4754 * corelow.c (core_target) <core_target>: No longer inline.
4755 Initialize m_core_gdbarch, m_core_vec and build the section table
4756 here.
4757 <~core_target>: New.
4758 <core_gdbarch, get_core_register_section>: New methods.
4759 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4760 factored out from ...
4761 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4762 (core_ops): Delete.
4763 (sniff_core_bfd): Add gdbarch parameter.
4764 (core_close): Delete, merged into ...
4765 (core_target::close): ... here. Delete self.
4766 (core_close_cleanup): Delete.
4767 (core_target_open): Allocate a core_target on the heap. Use a
4768 unique_ptr instead of a cleanup. Bits moved into the core_target
4769 ctor. Adjust to use core_target methods instead of globals.
4770 (get_core_register_section): Rename to ...
4771 (core_target::get_core_register_section): ... this and adjust.
4772 (struct get_core_registers_cb_data): New.
4773 (get_core_registers_cb): Use it. Use bool.
4774 (core_target::fetch_registers, core_target::files_info)
4775 (core_target::xfer_partial, core_target::read_description)
4776 (core_target::pid_to, core_target::thread_name): Adjust to
4777 reference class fields instead of globals.
4778 * target.h (struct target_ops_deleter, target_ops_up): New.
4779
451953fa
PA
47802018-05-11 Pedro Alves <palves@redhat.com>
4781
4782 * corefile.c (core_file_command): Move to corelow.c.
4783 * corelow.c (the_core_target): Delete.
4784 (core_file_command): Moved from corefile.c. Check exec_bfd
4785 instead of the_core_target. Use target_detach instead of calling
4786 into the_core_target directly.
4787 (maybe_say_no_core_file_now): New.
4788 (core_target::detach): Use it.
4789 (_initialize_corelow): Remove references to the_core_target.
4790 * gdbcore.h (the_core_target): Delete.
4791
e540a5a2 47922018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 4793 Pedro Alves <palves@redhat.com>
e540a5a2
TT
4794
4795 * corefile.c (core_bfd): Remove.
4796 * gdbcore.h (core_bfd): Now a macro.
4797 * progspace.h (struct program_space) <cbfd>: New field.
4798
633cf254
TT
47992018-05-11 Tom Tromey <tom@tromey.com>
4800
4801 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4802 gdb::def_vector.
4803
1a34f210
TT
48042018-05-10 Tom Tromey <tom@tromey.com>
4805
4806 * configure: Rebuild.
4807 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4808
190852c8
JB
48092018-05-10 Joel Brobecker <brobecker@adacore.com>
4810
4811 PR server/23158:
4812 * regformats/regdat.sh: Adjust script, following the addition
4813 of the new expedite_regs parameter to init_target_desc.
4814
8727de56
OJ
48152018-05-10 Omair Javaid <omair.javaid@linaro.org>
4816
4817 PR gdb/23127
4818 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4819 set_gdbarch_significant_addr_bit.
4820 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4821 set_gdbarch_significant_addr_bit.
4822 * utils.c (address_significant): Update to sign extend addr.
4823
37d9e062
MF
48242018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4825
4826 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4827 (xtensa_linux_init_abi): Limit tdep->num_regs by
4828 tdep->num_nopriv_regs.
4829 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4830 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4831 not initialized.
4832
7402fbca
SM
48332018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4834
4835 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4836
8ee22052
AB
48372018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4838
4839 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4840 (I387_MXCSR_INIT_VAL): New constant.
4841 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4842 buffer if it was supplied by the inferior.
4843 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4844 (i387_xsave_get_clear_bv): New function.
4845 (i387_supply_xsave): Only read x87 control registers from the
4846 xsave buffer if the feature is enabled, and the state will have
4847 been written, otherwise, provide a suitable default.
4848 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4849 including x87 control registers. Update control registers if they
4850 have changed from the default value, and mark features as enabled
4851 as required.
4852 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4853
968ae51b
UW
48542018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4855
4856 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4857
aff689d3
TT
48582018-05-07 Tom Tromey <tom@tromey.com>
4859
4860 * configure: Rebuild.
4861 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4862
ce887586
TT
48632018-05-07 Tom Tromey <tom@tromey.com>
4864
4865 PR tdep/20362:
4866 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4867 bit. Use correct value for VDIV.
4868
85e26832
TT
48692018-05-04 Tom Tromey <tom@tromey.com>
4870
4871 * configure: Rebuild.
4872 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4873
449b1ac7
TT
48742018-05-04 Tom Tromey <tom@tromey.com>
4875
4876 * linux-record.c (record_linux_system_call) <case
4877 RECORD_SYS_RECVFROM>: Add "break".
4878
15c9ffd6
TT
48792018-05-04 Tom Tromey <tom@tromey.com>
4880
4881 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4882 Add missing "break".
4883 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
4884 Add missing "break".
4885
e3829d13
TT
48862018-05-04 Tom Tromey <tom@tromey.com>
4887
4888 * rs6000-tdep.c (ppc_process_record_op4)
4889 (ppc_process_record_op63): Add fall-through comment.
4890
da0e1563
TT
48912018-05-04 Tom Tromey <tom@tromey.com>
4892
4893 * i386-tdep.c (i386_process_record): Add fall-through comment.
4894
0019cd49
TT
48952018-05-04 Tom Tromey <tom@tromey.com>
4896
4897 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
4898 comment.
4899
565e0eda
TT
49002018-05-04 Tom Tromey <tom@tromey.com>
4901
4902 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
4903 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
4904 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
4905 comment.
4906 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
4907 comment.
4908 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
4909 comment.
4910
621846f4
TT
49112018-05-04 Tom Tromey <tom@tromey.com>
4912
4913 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
4914
86a73007
TT
49152018-05-04 Tom Tromey <tom@tromey.com>
4916
4917 * s390-tdep.c (s390_process_record): Fix fall-through comments.
4918 * xcoffread.c (scan_xcoff_symtab): Move comment later.
4919 * symfile.c (section_is_mapped): Fix fall-through comment.
4920 * stabsread.c (define_symbol, read_member_functions): Fix
4921 fall-through comment.
4922 * s390-linux-tdep.c (s390_process_record): Fix fall-through
4923 comment.
4924 * remote.c (remote_wait_as): Fix fall-through comment.
4925 * p-exp.y (yylex): Fix fall-through comment.
4926 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
4927 comment.
4928 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
4929 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
4930 * jv-exp.y (yylex): Fix fall-through comment.
4931 * go-exp.y (lex_one_token): Fix fall-through comment.
4932 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
4933 fall-through comment.
4934 * f-exp.y (yylex): Fix fall-through comment.
4935 * dwarf2read.c (process_die): Fix fall-through comments.
4936 * dbxread.c (process_one_symbol): Fix fall-through comment.
4937 * d-exp.y (lex_one_token): Fix fall-through comment.
4938 * cp-name-parser.y (yylex): Fix fall-through comment.
4939 * coffread.c (coff_symtab_read): Fix fall-through comment.
4940 * c-exp.y (lex_one_token): Fix fall-through comment.
4941 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
4942 comment.
4943 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
4944 comment.
4945
56bcdbea
TT
49462018-05-04 Tom Tromey <tom@tromey.com>
4947
4948 PR python/22730:
4949 * NEWS: Mention gdb.execute change.
4950 * gdbcmd.h (execute_control_command): Don't declare.
4951 * python/python.c (execute_gdb_command): Use read_command_lines_1,
4952 execute_control_commands, execute_control_commands_to_string.
4953 * cli/cli-script.h (execute_control_commands)
4954 (execute_control_commands_to_string): Declare.
4955 (execute_control_command): Add from_tty parameter.
4956 * cli/cli-script.c (execute_control_commands)
4957 (execute_control_commands_to_string): New functions.
4958 (execute_user_command): Use execute_control_commands.
4959 (execute_control_command_1): Add "from_tty" parameter. Update.
4960 (execute_control_command): Likewise.
4961
a913fffb
TT
49622018-05-04 Tom Tromey <tom@tromey.com>
4963
4964 PR python/22731:
4965 * NEWS: Mention that breakpoint commands are writable.
4966 * python/py-breakpoint.c (bppy_set_commands): New function.
4967 (breakpoint_object_getset) <"commands">: Use it.
4968
60b3cef2
TT
49692018-05-04 Tom Tromey <tom@tromey.com>
4970
4971 * tracepoint.c (actions_command): Update.
4972 * mi/mi-cmd-break.c (mi_command_line_array)
4973 (mi_command_line_array_cnt, mi_command_line_array_ptr)
4974 (mi_read_next_line): Remove.
4975 (mi_cmd_break_commands): Update.
4976 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
4977 function_view.
4978 * cli/cli-script.c (get_command_line): Update.
4979 (process_next_line): Use function_view. Constify.
4980 (recurse_read_control_structure, read_command_lines)
4981 (read_command_lines_1): Change argument types to function_view.
4982 (do_define_command, document_command): Update.
4983 * breakpoint.h (check_tracepoint_command): Don't declare.
4984 * breakpoint.c (check_tracepoint_command): Remove.
4985 (commands_command_1, create_tracepoint_from_upload): Update.
4986
7a2c85f2
TT
49872018-05-04 Tom Tromey <tom@tromey.com>
4988
4989 PR gdb/11750:
4990 * cli/cli-script.h (enum command_control_type) <define_control>:
4991 New constant.
4992 * cli/cli-script.c (multi_line_command_p): Handle define_control.
4993 (build_command_line, execute_control_command_1)
4994 (process_next_line): Likewise.
4995 (do_define_command): New function, extracted from define_command.
4996 (define_command): Use it.
4997
295dc222
TT
49982018-05-04 Tom Tromey <tom@tromey.com>
4999
5000 * tracepoint.c (actions_command): Update.
5001 * cli/cli-script.h (read_command_lines): Update.
5002 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5003 (MAX_TMPBUF): Remove define.
5004 (define_command): Use string_printf.
5005 (document_command): Likewise.
5006 * breakpoint.c (commands_command_1): Update.
5007
1263a9d5
TT
50082018-05-04 Tom Tromey <tom@tromey.com>
5009
5010 * top.c (execute_command): Update.
5011 * cli/cli-script.h (print_command_lines): Now varargs.
5012 * cli/cli-script.c (print_command_lines): Now varargs.
5013 (execute_control_command_1) <case while_control, case if_control>:
5014 Update.
5015
12973681
TT
50162018-05-04 Tom Tromey <tom@tromey.com>
5017
5018 * tracepoint.c (all_tracepoint_actions): Rename from
5019 all_tracepoint_actions_and_cleanup. Change return type.
5020 (actions_command, encode_actions_1, encode_actions)
5021 (trace_dump_actions, tdump_command): Update.
5022 * remote.c (remote_download_command_source): Update.
5023 * python/python.c (gdbpy_eval_from_control_command)
5024 (python_command, python_interactive_command): Update.
5025 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5026 * guile/guile.c (guile_command)
5027 (gdbscm_eval_from_control_command, guile_command): Update.
5028 * compile/compile.c (compile_code_command)
5029 (compile_print_command, compile_to_object): Update.
5030 * cli/cli-script.h (struct command_lines_deleter): New.
5031 (counted_command_line): New typedef.
5032 (struct command_line): Add constructor, destructor.
5033 <body_list>: Remove.
5034 <body_list_0, body_list_1>: New members.
5035 (command_line_up): Remove typedef.
5036 (read_command_lines, read_command_lines_1, get_command_line):
5037 Update.
5038 (copy_command_lines): Don't declare.
5039 * cli/cli-script.c (build_command_line): Use "new".
5040 (get_command_line): Return counted_command_line.
5041 (print_command_lines, execute_user_command)
5042 (execute_control_command_1, while_command, if_command): Update.
5043 (realloc_body_list): Remove.
5044 (process_next_line, recurse_read_control_structure): Update.
5045 (read_command_lines, read_command_lines_1): Return counted_command_line.
5046 (free_command_lines): Use "delete".
5047 (copy_command_lines): Remove.
5048 (define_command, document_command, show_user_1): Update.
5049 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5050 a counted_command_line.
5051 * breakpoint.h (counted_command_line): Remove typedef.
5052 (breakpoint_set_commands): Update.
5053 * breakpoint.c (check_no_tracepoint_commands)
5054 (validate_commands_for_breakpoint): Update.
5055 (breakpoint_set_commands): Change commands to be a
5056 counted_command_line.
5057 (commands_command_1, update_dprintf_command_list)
5058 (create_tracepoint_from_upload): Update.
5059
e2fc72e2
TT
50602018-05-04 Tom Tromey <tom@tromey.com>
5061
5062 * cli/cli-decode.h (cmd_list_element): New constructor.
5063 (~cmd_list_element): New destructor.
5064 (struct cmd_list_element): Add initializers.
5065 * cli/cli-decode.c (do_add_cmd): Use "new".
5066 (delete_cmd): Use "delete".
5067
a3b60e45
JK
50682018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5069 Pedro Alves <palves@redhat.com>
5070
5071 PR breakpoints/19806 and support for PR external/20207.
5072 * NEWS: Mention Aarch64 watchpoint improvements.
5073 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5074 watchpoints and PR external/20207 watchpoints.
5075 * nat/aarch64-linux-hw-point.c
5076 (kernel_supports_any_contiguous_range): New.
5077 (aarch64_watchpoint_offset): New.
5078 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5079 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5080 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5081 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5082 next_addr_orig_p. Support PR external/20207 watchpoints.
5083 (aarch64_downgrade_regs): New.
5084 (aarch64_dr_state_insert_one_point): New parameters offset and
5085 addr_orig.
5086 (aarch64_dr_state_remove_one_point): Likewise.
5087 (aarch64_handle_breakpoint): Update caller.
5088 (aarch64_handle_aligned_watchpoint): Likewise.
5089 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5090 aligned_offset.
5091 (aarch64_linux_set_debug_regs): Remove const from state. Call
5092 aarch64_downgrade_regs.
5093 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5094 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5095 (DR_CONTROL_MASK): ... this.
5096 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5097 (unsigned int aarch64_watchpoint_offset): New prototype.
5098 (aarch64_linux_set_debug_regs): Remove const from state.
5099 * utils.c (align_up, align_down): Move to ...
5100 * common/common-utils.c (align_up, align_down): ... here.
5101 * utils.h (align_up, align_down): Move to ...
5102 * common/common-utils.h (align_up, align_down): ... here.
5103
05bc7456
JB
51042018-05-04 Joel Brobecker <brobecker@adacore.com>
5105
5106 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5107 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5108 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5109 Re-implement to match the ABI as summarized in GCC's
5110 gcc/config/sparc/sparc.c. All callers updated.
5111 (sparc32_store_arguments): Remove assertion.
5112
2f433492
TT
51132018-05-04 Tom Tromey <tom@tromey.com>
5114
5115 * printcmd.c: Don't include tui.h.
5116 (decode_format): Use skip_spaces.
5117
9be2ae8f
TT
51182018-05-04 Tom Tromey <tom@tromey.com>
5119
5120 PR gdb/22619:
5121 * printcmd.c (last_count): New global.
5122 (x_command): Use saved count when repeating.
5123
f0b3976b
TT
51242018-05-04 Tom Tromey <tom@tromey.com>
5125
5126 * nto-procfs.c (do_closedir_cleanup): Remove.
5127 (procfs_pidlist): Use gdb_dir_up.
5128 * procfs.c (do_closedir_cleanup): Remove.
5129 (proc_update_threads): Use gdb_dir_up.
5130 * common/filestuff.h (struct gdb_dir_deleter): New.
5131 (gdb_dir_up): New typedef.
5132
862d101a
TT
51332018-05-04 Tom Tromey <tom@tromey.com>
5134
5135 * ada-lang.c (print_mention_exception): Use std::string.
5136
cb7de75e
TT
51372018-05-04 Tom Tromey <tom@tromey.com>
5138
5139 * ada-lang.c (create_excep_cond_exprs): Update.
5140 (ada_exception_catchpoint_cond_string): Use std::string.
5141
49d83361
TT
51422018-05-04 Tom Tromey <tom@tromey.com>
5143
5144 * ada-lang.c (xget_renaming_scope): Return std::string.
5145 (old_renaming_is_invisible): Update.
5146
ade72a34
TT
51472018-05-04 Tom Tromey <tom@tromey.com>
5148
5149 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5150 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5151
2be4d7f0
UW
51522018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5153
5154 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5155
69b6ecb0
TT
51562018-05-04 Tom Tromey <tom@tromey.com>
5157
5158 * remote.c (remote_query_supported_append): Change type.
5159 (remote_check_symbols): Update.
5160
bf27f0e2
PP
51612018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5162
5163 PR gdb/11420
5164 * configure.ac: Prepend libpython.
5165 * python/python-config.py: Likewise.
5166 * configure: Regenerate.
5167
4ea17de8
SM
51682018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5169
5170 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5171
bd732259
PA
51722018-05-03 Pedro Alves <palves@redhat.com>
5173
5174 * s390-linux-nat.c
5175 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5176 override. Write 'true' instead of '1'.
5177 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5178 declaration.
5179
d9f719f1
PA
51802018-05-02 Pedro Alves <palves@redhat.com>
5181
5182 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5183 add_inf_child_target.
5184 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5185 add_inf_child_target.
5186 * aix-thread.c (aix_thread_target_info): New.
5187 (aix_thread_target) <shortname, longname, doc>: Delete.
5188 <info>: New.
5189 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5190 add_inf_child_target.
5191 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5192 add_inf_child_target.
5193 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5194 add_inf_child_target.
5195 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5196 add_inf_child_target.
5197 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5198 add_inf_child_target.
5199 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5200 add_inf_child_target.
5201 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5202 add_inf_child_target.
5203 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5204 add_inf_child_target.
5205 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5206 add_inf_child_target.
5207 * bfd-target.c (target_bfd_target_info): New.
5208 (target_bfd) <shortname, longname, doc>: Delete.
5209 <info>: New.
5210 * bsd-kvm.c (bsd_kvm_target_info): New.
5211 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5212 <info>: New.
5213 (bsd_kvm_target::open): Rename to ...
5214 (bsd_kvm_target_open): ... this. Adjust.
5215 * bsd-uthread.c (bsd_uthread_target_info): New.
5216 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5217 <info>: New.
5218 * corefile.c (core_file_command): Adjust.
5219 * corelow.c (core_target_info): New.
5220 (core_target) <shortname, longname, doc>: Delete.
5221 <info>: New.
5222 (core_target::open): Rename to ...
5223 (core_target_open): ... this. Adjust.
5224 * ctf.c (ctf_target_info): New.
5225 (ctf_target) <shortname, longname, doc>: Delete.
5226 <info>: New.
5227 (ctf_target::open): Rename to ...
5228 (ctf_target_open): ... this.
5229 (_initialize_ctf): Adjust.
5230 * exec.c (exec_target_info): New.
5231 (exec_target) <shortname, longname, doc>: Delete.
5232 <info>: New.
5233 (exec_target::open): Rename to ...
5234 (exec_target_open): ... this.
5235 * gdbcore.h (core_target_open): Declare.
5236 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5237 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5238 add_inf_child_target.
5239 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5240 add_inf_child_target.
5241 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5242 add_inf_child_target.
5243 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5244 add_inf_child_target.
5245 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5246 add_inf_child_target.
5247 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5248 add_inf_child_target.
5249 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5250 add_inf_child_target.
5251 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5252 add_inf_child_target.
5253 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5254 add_inf_child_target.
5255 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5256 add_inf_child_target.
5257 * inf-child.c (inf_child_target_info): New.
5258 (inf_child_target::info): New.
5259 (inf_child_open_target): Remove 'target' parameter. Use
5260 get_native_target instead.
5261 (inf_child_target::open): Delete.
5262 (add_inf_child_target): New.
5263 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5264 Delete.
5265 <info>: New.
5266 (add_inf_child_target): Declare.
5267 (inf_child_open_target): Declare.
5268 * linux-thread-db.c (thread_db_target_info): New.
5269 (thread_db_target) <shortname, longname, doc>: Delete.
5270 <info>: New.
5271 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5272 add_inf_child_target.
5273 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5274 add_inf_child_target.
5275 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5276 add_inf_child_target.
5277 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5278 add_inf_child_target.
5279 * make-target-delegates (print_class): Adjust.
5280 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5281 add_inf_child_target.
5282 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5283 add_inf_child_target.
5284 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5285 add_inf_child_target.
5286 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5287 add_inf_child_target.
5288 * nto-procfs.c (nto_native_target_info): New.
5289 (nto_procfs_target_native) <shortname, longname, doc>:
5290 Delete.
5291 <info>: New.
5292 (nto_procfs_target_info): New.
5293 (nto_procfs_target_procfs) <shortname, longname, doc>:
5294 Delete.
5295 <info>: New.
5296 (init_procfs_targets): Adjust.
5297 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5298 add_inf_child_target.
5299 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5300 add_inf_child_target.
5301 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5302 add_inf_child_target.
5303 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5304 add_inf_child_target.
5305 * ravenscar-thread.c (ravenscar_target_info): New.
5306 (ravenscar_thread_target) <shortname, longname, doc>:
5307 Delete.
5308 <info>: New.
5309 * record-btrace.c (record_btrace_target_info):
5310 (record_btrace_target) <shortname, longname, doc>: Delete.
5311 <info>: New.
5312 (record_btrace_target::open): Rename to ...
5313 (record_btrace_target_open): ... this. Adjust.
5314 * record-full.c (record_longname, record_doc): New.
5315 (record_full_base_target) <shortname, longname, doc>: Delete.
5316 <info>: New.
5317 (record_full_target_info): New.
5318 (record_full_target): <shortname>: Delete.
5319 <info>: New.
5320 (record_full_core_open_1, record_full_open_1): Update comments.
5321 (record_full_base_target::open): Rename to ...
5322 (record_full_open): ... this.
5323 (cmd_record_full_restore): Update.
5324 (_initialize_record_full): Update.
5325 * remote-sim.c (remote_sim_target_info): New.
5326 (gdbsim_target) <shortname, longname, doc>: Delete.
5327 <info>: New.
5328 (gdbsim_target::open): Rename to ...
5329 (gdbsim_target_open): ... this.
5330 (_initialize_remote_sim): Adjust.
5331 * remote.c (remote_doc): New.
5332 (remote_target_info): New.
5333 (remote_target) <shortname, longname, doc>: Delete.
5334 <info>: New.
5335 (extended_remote_target_info): New.
5336 (extended_remote_target) <shortname, longname, doc>: Delete.
5337 <info>: New.
5338 (remote_target::open_1): Make static. Adjust.
5339 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5340 * s390-linux-nat.c (_initialize_s390_nat): Use
5341 add_inf_child_target.
5342 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5343 add_inf_child_target.
5344 * sol-thread.c (thread_db_target_info): New.
5345 (sol_thread_target) <shortname, longname, doc>: Delete.
5346 <info>: New.
5347 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5348 add_inf_child_target.
5349 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5350 add_inf_child_target.
5351 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5352 add_inf_child_target.
5353 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5354 add_inf_child_target.
5355 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5356 add_inf_child_target.
5357 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5358 add_inf_child_target.
5359 * spu-linux-nat.c (_initialize_spu_nat): Use
5360 add_inf_child_target.
5361 * spu-multiarch.c (spu_multiarch_target_info): New.
5362 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5363 <info>: New.
5364 * target-delegates.c: Regenerate.
5365 * target.c: Include <unordered_map>.
5366 (target_ops_p): Delete.
5367 (DEF_VEC_P(target_ops_p)): Delete.
5368 (target_factories): New.
5369 (test_target_info): New.
5370 (test_target_ops::info): New.
5371 (open_target): Adjust to use target_factories.
5372 (add_target_with_completer): Rename to ...
5373 (add_target): ... this. Change prototype. Register target_info
5374 and open callback in target_factories. Register target_info in
5375 command context instead of target_ops.
5376 (add_target): Delete old implementation.
5377 (add_deprecated_target_alias): Change prototype. Adjust.
5378 (the_native_target): New.
5379 (set_native_target, get_native_target): New.
5380 (find_default_run_target): Use the_native_target.
5381 (find_attach_target, find_run_target): Simplify.
5382 (target_ops::open): Delete.
5383 (dummy_target_info): New.
5384 (dummy_target::shortname, dummy_target::longname)
5385 (dummy_target::doc): Delete.
5386 (dummy_target::info): New.
5387 (debug_target::shortname, debug_target::longname)
5388 (debug_target::doc): Delete.
5389 (debug_target::info): New.
5390 * target.h (struct target_info): New.
5391 (target_ops::~target_ops): Add comment.
5392 (target_ops::info): New.
5393 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5394 longer virtual. Implement in terms of target_info.
5395 (set_native_target, get_native_target): Declare.
5396 (target_open_ftype): New.
5397 (add_target, add_target_with_completer)
5398 (add_deprecated_target_alias): Change prototype.
5399 (test_target) <shortname, longname, doc>: Delete.
5400 <info>: New.
5401 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5402 add_inf_child_target.
5403 * tracefile-tfile.c (tfile_target_info): New.
5404 (tfile_target) <shortname, longname, doc>: Delete.
5405 <info>: New.
5406 (tfile_target::open): Rename to ...
5407 (tfile_target_open): ... this.
5408 (_initialize_tracefile_tfile): Adjust.
5409 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5410 add_inf_child_target.
5411 * windows-nat.c (_initialize_windows_nat): Use
5412 add_inf_child_target.
5413 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5414 add_inf_child_target.
5415
135340af
PA
54162018-05-02 Pedro Alves <palves@redhat.com>
5417
5418 * linux-nat.h (linux_nat_target) <low_new_thread,
5419 low_delete_thread, low_new_fork, low_forget_process,
5420 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5421 New virtual methods.
5422 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5423 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5424 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5425 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5426 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5427 Delete.
5428 * linux-fork.c (delete_fork): Adjust to call low method.
5429 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5430 (linux_nat_new_fork, linux_nat_forget_process_hook)
5431 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5432 (linux_nat_status_is_event):
5433 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5434 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5435 to call low method.
5436 (sigtrap_is_event): Rename to ...
5437 (linux_nat_target::low_status_is_event): ... this.
5438 (linux_nat_set_status_is_event): Delete.
5439 (save_stop_reason, linux_nat_wait_1)
5440 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5441 low methods.
5442 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5443 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5444 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5445 (linux_nat_set_prepare_to_resume): Delete.
5446 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5447 low virtual methods.
5448 * amd64-linux-nat.c: Likewise.
5449 * arm-linux-nat.c: Likewise.
5450 * i386-linux-nat.c: Likewise.
5451 * ia64-linux-nat.c: Likewise.
5452 * mips-linux-nat.c: Likewise.
5453 * ppc-linux-nat.c: Likewise.
5454 * s390-linux-nat.c: Likewise.
5455 * sparc64-linux-nat.c: Likewise.
5456 * x86-linux-nat.c: Likewise.
5457 * x86-linux-nat.h: Include "nat/x86-linux.h".
5458 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5459 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5460 Override methods.
5461
57810aa7
PA
54622018-05-02 Pedro Alves <palves@redhat.com>
5463
5464 * target.h (target_ops)
5465 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5466 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5467 stopped_by_watchpoint, have_continuable_watchpoint,
5468 stopped_data_address, watchpoint_addr_within_range,
5469 can_accel_watchpoint_condition, can_run, thread_alive,
5470 has_all_memory, has_memory, has_stack, has_registers,
5471 has_execution, can_async_p, is_async_p, supports_non_stop,
5472 always_non_stop_p, can_execute_reverse, supports_multi_process,
5473 supports_enable_disable_tracepoint,
5474 supports_disable_randomization, supports_string_tracing,
5475 supports_evaluation_of_breakpoint_conditions,
5476 can_run_breakpoint_commands, filesystem_is_local,
5477 can_download_tracepoint, get_trace_state_variable_value,
5478 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5479 record_is_replaying, record_will_replay,
5480 augmented_libraries_svr4_read>: Adjust to return bool.
5481 * aarch64-linux-nat.c: All implementations adjusted.
5482 * aix-thread.c: All implementations adjusted.
5483 * arm-linux-nat.c: All implementations adjusted.
5484 * breakpoint.c: All implementations adjusted.
5485 * bsd-kvm.c: All implementations adjusted.
5486 * bsd-uthread.c: All implementations adjusted.
5487 * corelow.c: All implementations adjusted.
5488 * ctf.c: All implementations adjusted.
5489 * darwin-nat.c: All implementations adjusted.
5490 * darwin-nat.h: All implementations adjusted.
5491 * exec.c: All implementations adjusted.
5492 * fbsd-nat.c: All implementations adjusted.
5493 * fbsd-nat.h: All implementations adjusted.
5494 * gnu-nat.c: All implementations adjusted.
5495 * gnu-nat.h: All implementations adjusted.
5496 * go32-nat.c: All implementations adjusted.
5497 * ia64-linux-nat.c: All implementations adjusted.
5498 * inf-child.c: All implementations adjusted.
5499 * inf-child.h: All implementations adjusted.
5500 * inf-ptrace.c: All implementations adjusted.
5501 * inf-ptrace.h: All implementations adjusted.
5502 * linux-nat.c: All implementations adjusted.
5503 * linux-nat.h: All implementations adjusted.
5504 * mips-linux-nat.c: All implementations adjusted.
5505 * nto-procfs.c: All implementations adjusted.
5506 * ppc-linux-nat.c: All implementations adjusted.
5507 * procfs.c: All implementations adjusted.
5508 * ravenscar-thread.c: All implementations adjusted.
5509 * record-btrace.c: All implementations adjusted.
5510 * record-full.c: All implementations adjusted.
5511 * remote-sim.c: All implementations adjusted.
5512 * remote.c: All implementations adjusted.
5513 * s390-linux-nat.c: All implementations adjusted.
5514 * sol-thread.c: All implementations adjusted.
5515 * spu-multiarch.c: All implementations adjusted.
5516 * target-delegates.c: All implementations adjusted.
5517 * target.c: All implementations adjusted.
5518 * target.h: All implementations adjusted.
5519 * tracefile-tfile.c: All implementations adjusted.
5520 * tracefile.c: All implementations adjusted.
5521 * tracefile.h: All implementations adjusted.
5522 * windows-nat.c: All implementations adjusted.
5523 * x86-linux-nat.h: All implementations adjusted.
5524 * x86-nat.h: All implementations adjusted.
5525
ad6a4e2d
PA
55262018-05-02 Pedro Alves <palves@redhat.com>
5527
5528 * make-target-delegates (scan_target_h): Don't trim lines here.
5529 Replace sequences of tabs and/or whitespace with a single
5530 whitespace.
5531 (top level, parsing methods): Trim each line before processing it
5532 here.
5533
f6ac5f3d
PA
55342018-05-02 Pedro Alves <palves@redhat.com>
5535 John Baldwin <jhb@freebsd.org>
5536
5537 * target.h (enum strata) <debug_stratum>: New.
5538 (struct target_ops) <all delegation methods>: Replace by C++
5539 virtual methods, and drop "to_" prefix. All references updated
5540 throughout.
5541 <to_shortname, to_longname, to_doc, to_data,
5542 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5543 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5544 virtual methods. All references updated throughout.
5545 <can_attach, supports_terminal_ours, can_create_inferior,
5546 get_thread_control_capabilities, attach_no_wait>: New
5547 virtual methods.
5548 <insert_breakpoint, remove_breakpoint>: Now
5549 TARGET_DEFAULT_NORETURN methods.
5550 <info_proc>: Now returns bool.
5551 <to_magic>: Delete.
5552 (OPS_MAGIC): Delete.
5553 (current_target): Delete. All references replaced by references
5554 to ...
5555 (target_stack): ... this. New.
5556 (target_shortname, target_longname): Adjust.
5557 (target_can_run): Now a function declaration.
5558 (default_child_has_all_memory, default_child_has_memory)
5559 (default_child_has_stack, default_child_has_registers)
5560 (default_child_has_execution): Remove target_ops parameter.
5561 (complete_target_initialization): Delete.
5562 (memory_breakpoint_target): New template class.
5563 (test_target_ops): Refactor as a C++ class with virtual methods.
5564 * make-target-delegates (NAME_PART): Tighten.
5565 (POINTER_PART, CP_SYMBOL): New.
5566 (SIMPLE_RETURN_PART): Reimplement.
5567 (VEC_RETURN_PART): Expect less.
5568 (RETURN_PART, VIRTUAL_PART): New.
5569 (METHOD): Adjust to C++ virtual methods.
5570 (scan_target_h): Remove reference to C99.
5571 (dname): Output "target_ops::" prefix.
5572 (write_function_header): Adjust to output a C++ class method.
5573 (write_declaration): New.
5574 (write_delegator): Adjust to output a C++ class method.
5575 (tdname): Output "dummy_target::" prefix.
5576 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5577 method.
5578 (tdefault_names, debug_names): Delete.
5579 (return_types, tdefaults, styles, argtypes_array): New.
5580 (top level): All methods are delegators.
5581 (print_class): New.
5582 (top level): Print dummy_target and debug_target classes.
5583 * target-delegates.c: Regenerate.
5584 * target-debug.h (target_debug_print_enum_info_proc_what)
5585 (target_debug_print_thread_control_capabilities)
5586 (target_debug_print_thread_info_p): New.
5587 * target.c (dummy_target): Delete.
5588 (the_dummy_target, the_debug_target): New.
5589 (target_stack): Now extern.
5590 (set_targetdebug): Push/unpush debug target.
5591 (default_child_has_all_memory, default_child_has_memory)
5592 (default_child_has_stack, default_child_has_registers)
5593 (default_child_has_execution): Remove target_ops parameter.
5594 (complete_target_initialization): Delete.
5595 (add_target_with_completer): No longer call
5596 complete_target_initialization.
5597 (target_supports_terminal_ours): Use regular delegation.
5598 (update_current_target): Delete.
5599 (push_target): No longer check magic number. Don't call
5600 update_current_target.
5601 (unpush_target): Don't call update_current_target.
5602 (target_is_pushed): No longer check magic number.
5603 (target_require_runnable): Skip for all stratums over
5604 process_stratum.
5605 (target_ops::info_proc): New.
5606 (target_info_proc): Use find_target_at and
5607 find_default_run_target.
5608 (target_supports_disable_randomization): Use regular delegation.
5609 (target_get_osdata): Use find_target_at.
5610 (target_ops::open, target_ops::close, target_ops::can_attach)
5611 (target_ops::attach, target_ops::can_create_inferior)
5612 (target_ops::create_inferior, target_ops::can_run)
5613 (target_can_run): New.
5614 (default_fileio_target): Use regular delegation.
5615 (target_ops::fileio_open, target_ops::fileio_pwrite)
5616 (target_ops::fileio_pread, target_ops::fileio_fstat)
5617 (target_ops::fileio_close, target_ops::fileio_unlink)
5618 (target_ops::fileio_readlink): New.
5619 (target_fileio_open_1, target_fileio_unlink)
5620 (target_fileio_readlink): Always call the target method. Handle
5621 FILEIO_ENOSYS.
5622 (return_zero, return_zero_has_execution): Delete.
5623 (init_dummy_target): Delete.
5624 (dummy_target::dummy_target, dummy_target::shortname)
5625 (dummy_target::longname, dummy_target::doc)
5626 (debug_target::debug_target, debug_target::shortname)
5627 (debug_target::longname, debug_target::doc): New.
5628 (target_supports_delete_record): Use regular delegation.
5629 (setup_target_debug): Delete.
5630 (maintenance_print_target_stack): Skip debug_stratum.
5631 (initialize_targets): Instantiate the_dummy_target and
5632 the_debug_target.
5633 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5634 use target_stack.
5635 (target_auxv_search, fprint_target_auxv): Adjust.
5636 (info_auxv_command): Adjust to use target_stack.
5637 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5638 * exceptions.c (print_flush): Handle a NULL target_stack.
5639 * regcache.c (target_ops_no_register): Refactor as class with
5640 virtual methods.
5641
5642 * exec.c (exec_target): New class.
5643 (exec_ops): Now an exec_target.
5644 (exec_open, exec_close_1, exec_get_section_table)
5645 (exec_xfer_partial, exec_files_info, exec_has_memory)
5646 (exec_make_note_section): Refactor as exec_target methods.
5647 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5648 Delete.
5649 (exec_target::find_memory_regions): New.
5650 (_initialize_exec): Don't call init_exec_ops.
5651 * gdbcore.h (exec_file_clear): Delete.
5652
5653 * corefile.c (core_target): Delete.
5654 (core_file_command): Adjust.
5655 * corelow.c (core_target): New class.
5656 (the_core_target): New.
5657 (core_close): Remove target_ops parameter.
5658 (core_close_cleanup): Adjust.
5659 (core_target::close): New.
5660 (core_open, core_detach, get_core_registers, core_files_info)
5661 (core_xfer_partial, core_thread_alive, core_read_description)
5662 (core_pid_to_str, core_thread_name, core_has_memory)
5663 (core_has_stack, core_has_registers, core_info_proc): Rework as
5664 core_target methods.
5665 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5666 (_initialize_corelow): Initialize the_core_target.
5667 * gdbcore.h (core_target): Delete.
5668 (the_core_target): New.
5669
5670 * ctf.c: (ctf_target): New class.
5671 (ctf_ops): Now a ctf_target.
5672 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5673 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5674 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5675 methods.
5676 (init_ctf_ops): Delete.
5677 (_initialize_ctf): Don't call it.
5678 * tracefile-tfile.c (tfile_target): New class.
5679 (tfile_ops): Now a tfile_target.
5680 (tfile_open, tfile_close, tfile_files_info)
5681 (tfile_get_tracepoint_status, tfile_trace_find)
5682 (tfile_fetch_registers, tfile_xfer_partial)
5683 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5684 Refactor as tfile_target methods.
5685 (tfile_xfer_partial_features): Remove target_ops parameter.
5686 (init_tfile_ops): Delete.
5687 (_initialize_tracefile_tfile): Don't call it.
5688 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5689 (tracefile_has_stack, tracefile_has_registers)
5690 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5691 tracefile_target methods.
5692 (init_tracefile_ops): Delete.
5693 (tracefile_target::tracefile_target): New.
5694 * tracefile.h: Include "target.h".
5695 (tracefile_target): New class.
5696 (init_tracefile_ops): Delete.
5697
5698 * spu-multiarch.c (spu_multiarch_target): New class.
5699 (spu_ops): Now a spu_multiarch_target.
5700 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5701 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5702 (spu_search_memory, spu_mourn_inferior): Refactor as
5703 spu_multiarch_target methods.
5704 (init_spu_ops): Delete.
5705 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5706 complete_target_initialization.
5707
5708 * ravenscar-thread.c (ravenscar_thread_target): New class.
5709 (ravenscar_ops): Now a ravenscar_thread_target.
5710 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5711 (ravenscar_thread_alive, ravenscar_pid_to_str)
5712 (ravenscar_fetch_registers, ravenscar_store_registers)
5713 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5714 (ravenscar_stopped_by_hw_breakpoint)
5715 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5716 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5717 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5718 methods.
5719 (init_ravenscar_thread_ops): Delete.
5720 (_initialize_ravenscar): Remove references to
5721 init_ravenscar_thread_ops and complete_target_initialization.
5722
5723 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5724 (bsd_uthread_target): New class.
5725 (bsd_uthread_ops): Now a bsd_uthread_target.
5726 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5727 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5728 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5729 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5730 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5731 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5732 (bsd_uthread_target): Delete function.
5733 (_initialize_bsd_uthread): Remove reference to
5734 complete_target_initialization.
5735
5736 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5737 (target_bfd): ... this new class.
5738 (target_bfd_xfer_partial, target_bfd_get_section_table)
5739 (target_bfd_close): Refactor as target_bfd methods.
5740 (target_bfd::~target_bfd): New.
5741 (target_bfd_reopen): Adjust.
5742 (target_bfd::close): New.
5743
5744 * record-btrace.c (record_btrace_target): New class.
5745 (record_btrace_ops): Now a record_btrace_target.
5746 (record_btrace_open, record_btrace_stop_recording)
5747 (record_btrace_disconnect, record_btrace_close)
5748 (record_btrace_async, record_btrace_info)
5749 (record_btrace_insn_history, record_btrace_insn_history_range)
5750 (record_btrace_insn_history_from, record_btrace_call_history)
5751 (record_btrace_call_history_range)
5752 (record_btrace_call_history_from, record_btrace_record_method)
5753 (record_btrace_is_replaying, record_btrace_will_replay)
5754 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5755 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5756 (record_btrace_store_registers, record_btrace_prepare_to_store)
5757 (record_btrace_to_get_unwinder)
5758 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5759 (record_btrace_commit_resume, record_btrace_wait)
5760 (record_btrace_stop, record_btrace_can_execute_reverse)
5761 (record_btrace_stopped_by_sw_breakpoint)
5762 (record_btrace_supports_stopped_by_sw_breakpoint)
5763 (record_btrace_stopped_by_hw_breakpoint)
5764 (record_btrace_supports_stopped_by_hw_breakpoint)
5765 (record_btrace_update_thread_list, record_btrace_thread_alive)
5766 (record_btrace_goto_begin, record_btrace_goto_end)
5767 (record_btrace_goto, record_btrace_stop_replaying_all)
5768 (record_btrace_execution_direction)
5769 (record_btrace_prepare_to_generate_core)
5770 (record_btrace_done_generating_core): Refactor as
5771 record_btrace_target methods.
5772 (init_record_btrace_ops): Delete.
5773 (_initialize_record_btrace): Remove reference to
5774 init_record_btrace_ops.
5775 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5776 the execution_direction global.
5777 (record_full_base_target, record_full_target)
5778 (record_full_core_target): New classes.
5779 (record_full_ops): Now a record_full_target.
5780 (record_full_core_ops): Now a record_full_core_target.
5781 (record_full_target::detach, record_full_target::disconnect)
5782 (record_full_core_target::disconnect)
5783 (record_full_target::mourn_inferior, record_full_target::kill):
5784 New.
5785 (record_full_open, record_full_close, record_full_async): Refactor
5786 as methods of the record_full_base_target class.
5787 (record_full_resume, record_full_commit_resume): Refactor
5788 as methods of the record_full_target class.
5789 (record_full_wait, record_full_stopped_by_watchpoint)
5790 (record_full_stopped_data_address)
5791 (record_full_stopped_by_sw_breakpoint)
5792 (record_full_supports_stopped_by_sw_breakpoint)
5793 (record_full_stopped_by_hw_breakpoint)
5794 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5795 methods of the record_full_base_target class.
5796 (record_full_store_registers, record_full_xfer_partial)
5797 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5798 Refactor as methods of the record_full_target class.
5799 (record_full_can_execute_reverse, record_full_get_bookmark)
5800 (record_full_goto_bookmark, record_full_execution_direction)
5801 (record_full_record_method, record_full_info, record_full_delete)
5802 (record_full_is_replaying, record_full_will_replay)
5803 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5804 (record_full_stop_replaying): Refactor as methods of the
5805 record_full_base_target class.
5806 (record_full_core_resume, record_full_core_kill)
5807 (record_full_core_fetch_registers)
5808 (record_full_core_prepare_to_store)
5809 (record_full_core_store_registers, record_full_core_xfer_partial)
5810 (record_full_core_insert_breakpoint)
5811 (record_full_core_remove_breakpoint)
5812 (record_full_core_has_execution): Refactor
5813 as methods of the record_full_core_target class.
5814 (record_full_base_target::supports_delete_record): New.
5815 (init_record_full_ops): Delete.
5816 (init_record_full_core_ops): Delete.
5817 (record_full_save): Refactor as method of the
5818 record_full_base_target class.
5819 (_initialize_record_full): Remove references to
5820 init_record_full_ops and init_record_full_core_ops.
5821
5822 * remote.c (remote_target, extended_remote_target): New classes.
5823 (remote_ops): Now a remote_target.
5824 (extended_remote_ops): Now an extended_remote_target.
5825 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5826 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5827 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5828 (remote_pass_signals, remote_set_syscall_catchpoint)
5829 (remote_program_signals, )
5830 (remote_thread_always_alive): Remove target_ops parameter.
5831 (remote_thread_alive, remote_thread_name)
5832 (remote_update_thread_list, remote_threads_extra_info)
5833 (remote_static_tracepoint_marker_at)
5834 (remote_static_tracepoint_markers_by_strid)
5835 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5836 (remote_open): Refactor as methods of remote_target.
5837 (extended_remote_open, extended_remote_detach)
5838 (extended_remote_attach, extended_remote_post_attach):
5839 (extended_remote_supports_disable_randomization)
5840 (extended_remote_create_inferior): : Refactor as method of
5841 extended_remote_target.
5842 (remote_set_permissions, remote_open_1, remote_detach)
5843 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5844 (remote_resume, remote_commit_resume, remote_stop)
5845 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5846 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5847 (remote_prepare_to_store, remote_store_registers)
5848 (remote_flash_erase, remote_flash_done, remote_files_info)
5849 (remote_kill, remote_mourn, remote_insert_breakpoint)
5850 (remote_remove_breakpoint, remote_insert_watchpoint)
5851 (remote_watchpoint_addr_within_range)
5852 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5853 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5854 (remote_supports_stopped_by_sw_breakpoint)
5855 (remote_stopped_by_hw_breakpoint)
5856 (remote_supports_stopped_by_hw_breakpoint)
5857 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5858 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5859 (remote_verify_memory): Refactor as methods of remote_target.
5860 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5861 parameter.
5862 (remote_xfer_partial, remote_get_memory_xfer_limit)
5863 (remote_search_memory, remote_rcmd, remote_memory_map)
5864 (remote_pid_to_str, remote_get_thread_local_address)
5865 (remote_get_tib_address, remote_read_description): Refactor as
5866 methods of remote_target.
5867 (remote_target::fileio_open, remote_target::fileio_pwrite)
5868 (remote_target::fileio_pread, remote_target::fileio_close): New.
5869 (remote_hostio_readlink, remote_hostio_fstat)
5870 (remote_filesystem_is_local, remote_can_execute_reverse)
5871 (remote_supports_non_stop, remote_supports_disable_randomization)
5872 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5873 (remote_supports_enable_disable_tracepoint)
5874 (remote_supports_string_tracing)
5875 (remote_can_run_breakpoint_commands, remote_trace_init)
5876 (remote_download_tracepoint, remote_can_download_tracepoint)
5877 (remote_download_trace_state_variable, remote_enable_tracepoint)
5878 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5879 (remote_trace_start, remote_get_trace_status)
5880 (remote_get_tracepoint_status, remote_trace_stop)
5881 (remote_trace_find, remote_get_trace_state_variable_value)
5882 (remote_save_trace_data, remote_get_raw_trace_data)
5883 (remote_set_disconnected_tracing, remote_core_of_thread)
5884 (remote_set_circular_trace_buffer, remote_traceframe_info)
5885 (remote_get_min_fast_tracepoint_insn_len)
5886 (remote_set_trace_buffer_size, remote_set_trace_notes)
5887 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
5888 (remote_disable_btrace, remote_teardown_btrace)
5889 (remote_read_btrace, remote_btrace_conf)
5890 (remote_augmented_libraries_svr4_read, remote_load)
5891 (remote_pid_to_exec_file, remote_can_do_single_step)
5892 (remote_execution_direction, remote_thread_handle_to_thread_info):
5893 Refactor as methods of remote_target.
5894 (init_remote_ops, init_extended_remote_ops): Delete.
5895 (remote_can_async_p, remote_is_async_p, remote_async)
5896 (remote_thread_events, remote_upload_tracepoints)
5897 (remote_upload_trace_state_variables): Refactor as methods of
5898 remote_target.
5899 (_initialize_remote): Remove references to init_remote_ops and
5900 init_extended_remote_ops.
5901
5902 * remote-sim.c (gdbsim_target): New class.
5903 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
5904 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
5905 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
5906 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
5907 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
5908 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
5909 Refactor as methods of gdbsim_target.
5910 (gdbsim_ops): Now a gdbsim_target.
5911 (init_gdbsim_ops): Delete.
5912 (gdbsim_cntrl_c): Adjust.
5913 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
5914
5915 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
5916 (the_amd64_linux_nat_target): New.
5917 (amd64_linux_fetch_inferior_registers)
5918 (amd64_linux_store_inferior_registers): Refactor as methods of
5919 amd64_linux_nat_target.
5920 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
5921 * i386-linux-nat.c: Don't include "linux-nat.h".
5922 (i386_linux_nat_target): New class.
5923 (the_i386_linux_nat_target): New.
5924 (i386_linux_fetch_inferior_registers)
5925 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
5926 as methods of i386_linux_nat_target.
5927 (_initialize_i386_linux_nat): Adjust. Set linux_target.
5928 * inf-child.c (inf_child_ops): Delete.
5929 (inf_child_fetch_inferior_registers)
5930 (inf_child_store_inferior_registers): Delete.
5931 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
5932 methods of inf_child_target.
5933 (inf_child_target::supports_terminal_ours)
5934 (inf_child_target::terminal_init)
5935 (inf_child_target::terminal_inferior)
5936 (inf_child_target::terminal_ours_for_output)
5937 (inf_child_target::terminal_ours, inf_child_target::interrupt)
5938 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
5939 New.
5940 (inf_child_open, inf_child_disconnect, inf_child_close)
5941 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
5942 (inf_child_post_startup_inferior, inf_child_can_run)
5943 (inf_child_pid_to_exec_file): Refactor as methods of
5944 inf_child_target.
5945 (inf_child_follow_fork): Delete.
5946 (inf_child_target::can_create_inferior)
5947 (inf_child_target::can_attach): New.
5948 (inf_child_target::has_all_memory, inf_child_target::has_memory)
5949 (inf_child_target::has_stack, inf_child_target::has_registers)
5950 (inf_child_target::has_execution): New.
5951 (inf_child_fileio_open, inf_child_fileio_pwrite)
5952 (inf_child_fileio_pread, inf_child_fileio_fstat)
5953 (inf_child_fileio_close, inf_child_fileio_unlink)
5954 (inf_child_fileio_readlink, inf_child_use_agent)
5955 (inf_child_can_use_agent): Refactor as methods of
5956 inf_child_target.
5957 (return_zero, inf_child_target): Delete.
5958 (inf_child_target::inf_child_target): New.
5959 * inf-child.h: Include "target.h".
5960 (inf_child_target): Delete function prototype.
5961 (inf_child_target): New class.
5962 (inf_child_open_target, inf_child_mourn_inferior)
5963 (inf_child_maybe_unpush_target): Delete.
5964 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
5965 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
5966 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
5967 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
5968 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
5969 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
5970 (inf_ptrace_wait, inf_ptrace_xfer_partial)
5971 (inf_ptrace_thread_alive, inf_ptrace_files_info)
5972 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
5973 methods of inf_ptrace_target.
5974 (inf_ptrace_target): Delete function.
5975 * inf-ptrace.h: Include "inf-child.h".
5976 (inf_ptrace_target): Delete function declaration.
5977 (inf_ptrace_target): New class.
5978 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
5979 * linux-nat.c (linux_target): New.
5980 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
5981 (linux_nat_target::~linux_nat_target): New.
5982 (linux_child_post_attach, linux_child_post_startup_inferior)
5983 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
5984 (linux_child_remove_fork_catchpoint)
5985 (linux_child_insert_vfork_catchpoint)
5986 (linux_child_remove_vfork_catchpoint)
5987 (linux_child_insert_exec_catchpoint)
5988 (linux_child_remove_exec_catchpoint)
5989 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
5990 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
5991 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
5992 (linux_nat_stopped_data_address)
5993 (linux_nat_stopped_by_sw_breakpoint)
5994 (linux_nat_supports_stopped_by_sw_breakpoint)
5995 (linux_nat_stopped_by_hw_breakpoint)
5996 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
5997 (linux_nat_kill, linux_nat_mourn_inferior)
5998 (linux_nat_xfer_partial, linux_nat_thread_alive)
5999 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6000 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6001 (linux_child_static_tracepoint_markers_by_strid)
6002 (linux_nat_is_async_p, linux_nat_can_async_p)
6003 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6004 (linux_nat_supports_multi_process)
6005 (linux_nat_supports_disable_randomization, linux_nat_async)
6006 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6007 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6008 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6009 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6010 methods of linux_nat_target.
6011 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6012 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6013 parameter.
6014 (check_stopped_by_watchpoint): Adjust.
6015 (linux_xfer_partial): Delete.
6016 (linux_target_install_ops, linux_target, linux_nat_add_target):
6017 Delete.
6018 (linux_nat_target::linux_nat_target): New.
6019 * linux-nat.h: Include "inf-ptrace.h".
6020 (linux_nat_target): New.
6021 (linux_target, linux_target_install_ops, linux_nat_add_target):
6022 Delete function declarations.
6023 (linux_target): Declare global.
6024 * linux-thread-db.c (thread_db_target): New.
6025 (thread_db_target::thread_db_target): New.
6026 (thread_db_ops): Delete.
6027 (the_thread_db_target): New.
6028 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6029 (thread_db_update_thread_list, thread_db_pid_to_str)
6030 (thread_db_extra_thread_info)
6031 (thread_db_thread_handle_to_thread_info)
6032 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6033 (thread_db_resume): Refactor as methods of thread_db_target.
6034 (init_thread_db_ops): Delete.
6035 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6036 * x86-linux-nat.c: Don't include "linux-nat.h".
6037 (super_post_startup_inferior): Delete.
6038 (x86_linux_nat_target::~x86_linux_nat_target): New.
6039 (x86_linux_child_post_startup_inferior)
6040 (x86_linux_read_description, x86_linux_enable_btrace)
6041 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6042 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6043 methods of x86_linux_nat_target.
6044 (x86_linux_create_target): Delete. Bits folded ...
6045 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6046 pointer.
6047 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6048 (x86_linux_nat_target): New class.
6049 (x86_linux_create_target): Delete.
6050 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6051 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6052 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6053 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6054 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6055 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6056 make extern.
6057 (x86_use_watchpoints): Delete.
6058 * x86-nat.h: Include "breakpoint.h" and "target.h".
6059 (x86_use_watchpoints): Delete.
6060 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6061 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6062 (x86_insert_watchpoint, x86_remove_watchpoint)
6063 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6064 (x86_stopped_by_hw_breakpoint): New declarations.
6065 (x86_nat_target): New template class.
6066
6067 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6068 (the_ppc_linux_nat_target): New.
6069 (ppc_linux_fetch_inferior_registers)
6070 (ppc_linux_can_use_hw_breakpoint)
6071 (ppc_linux_region_ok_for_hw_watchpoint)
6072 (ppc_linux_ranged_break_num_registers)
6073 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6074 (ppc_linux_insert_mask_watchpoint)
6075 (ppc_linux_remove_mask_watchpoint)
6076 (ppc_linux_can_accel_watchpoint_condition)
6077 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6078 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6079 (ppc_linux_watchpoint_addr_within_range)
6080 (ppc_linux_masked_watch_num_registers)
6081 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6082 (ppc_linux_read_description): Refactor as methods of
6083 ppc_linux_nat_target.
6084 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6085
6086 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6087 (procfs_target): New class.
6088 (the_procfs_target): New.
6089 (procfs_target): Delete function.
6090 (procfs_auxv_parse, procfs_attach, procfs_detach)
6091 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6092 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6093 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6094 (procfs_create_inferior, procfs_update_thread_list)
6095 (procfs_thread_alive, procfs_pid_to_str)
6096 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6097 (procfs_stopped_data_address, procfs_insert_watchpoint)
6098 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6099 (proc_find_memory_regions, procfs_info_proc)
6100 (procfs_make_note_section): Refactor as methods of procfs_target.
6101 (_initialize_procfs): Adjust.
6102 * sol-thread.c (sol_thread_target): New class.
6103 (sol_thread_ops): Now a sol_thread_target.
6104 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6105 (sol_thread_fetch_registers, sol_thread_store_registers)
6106 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6107 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6108 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6109 (init_sol_thread_ops): Delete.
6110 (_initialize_sol_thread): Adjust. Remove references to
6111 init_sol_thread_ops and complete_target_initialization.
6112
6113 * windows-nat.c (windows_nat_target): New class.
6114 (windows_fetch_inferior_registers)
6115 (windows_store_inferior_registers, windows_resume, windows_wait)
6116 (windows_attach, windows_detach, windows_pid_to_exec_file)
6117 (windows_files_info, windows_create_inferior)
6118 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6119 (windows_close, windows_pid_to_str, windows_xfer_partial)
6120 (windows_get_tib_address, windows_get_ada_task_ptid)
6121 (windows_thread_name, windows_thread_alive): Refactor as
6122 windows_nat_target methods.
6123 (do_initial_windows_stuff): Adjust.
6124 (windows_target): Delete function.
6125 (_initialize_windows_nat): Adjust.
6126
6127 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6128 (darwin_mourn_inferior, darwin_kill_inferior)
6129 (darwin_create_inferior, darwin_attach, darwin_detach)
6130 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6131 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6132 (darwin_supports_multi_process): Refactor as darwin_nat_target
6133 methods.
6134 (darwin_resume_to, darwin_files_info): Delete.
6135 (_initialize_darwin_inferior): Rename to ...
6136 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6137 * darwin-nat.h: Include "inf-child.h".
6138 (darwin_nat_target): New class.
6139 (darwin_complete_target): Delete.
6140 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6141 (darwin_target): New.
6142 (i386_darwin_fetch_inferior_registers)
6143 (i386_darwin_store_inferior_registers): Refactor as methods of
6144 darwin_nat_target.
6145 (darwin_complete_target): Delete, with ...
6146 (_initialize_i386_darwin_nat): ... bits factored out here.
6147
6148 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6149 (the_alpha_linux_nat_target): New.
6150 (alpha_linux_register_u_offset): Refactor as
6151 alpha_linux_nat_target method.
6152 (_initialize_alpha_linux_nat): Adjust.
6153 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6154 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6155 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6156 methods of linux_nat_trad_target.
6157 (linux_trad_target): Delete.
6158 * linux-nat-trad.h (linux_trad_target): Delete function.
6159 (linux_nat_trad_target): New class.
6160 * mips-linux-nat.c (mips_linux_nat_target): New class.
6161 (super_fetch_registers, super_store_registers, super_close):
6162 Delete.
6163 (the_mips_linux_nat_target): New.
6164 (mips64_linux_regsets_fetch_registers)
6165 (mips64_linux_regsets_store_registers)
6166 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6167 (mips_linux_register_u_offset, mips_linux_read_description)
6168 (mips_linux_can_use_hw_breakpoint)
6169 (mips_linux_stopped_by_watchpoint)
6170 (mips_linux_stopped_data_address)
6171 (mips_linux_region_ok_for_hw_watchpoint)
6172 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6173 (mips_linux_close): Refactor as methods of mips_linux_nat.
6174 (_initialize_mips_linux_nat): Adjust to C++ification.
6175
6176 * aix-thread.c (aix_thread_target): New class.
6177 (aix_thread_ops): Now an aix_thread_target.
6178 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6179 (aix_thread_fetch_registers, aix_thread_store_registers)
6180 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6181 (aix_thread_thread_alive, aix_thread_pid_to_str)
6182 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6183 Refactor as methods of aix_thread_target.
6184 (init_aix_thread_ops): Delete.
6185 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6186 and complete_target_initialization.
6187 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6188 (rs6000_nat_target): New class.
6189 (the_rs6000_nat_target): New.
6190 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6191 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6192 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6193 (super_create_inferior): Delete.
6194 (_initialize_rs6000_nat): Adjust to C++ification.
6195
6196 * arm-linux-nat.c (arm_linux_nat_target): New class.
6197 (the_arm_linux_nat_target): New.
6198 (arm_linux_fetch_inferior_registers)
6199 (arm_linux_store_inferior_registers, arm_linux_read_description)
6200 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6201 (arm_linux_remove_hw_breakpoint)
6202 (arm_linux_region_ok_for_hw_watchpoint)
6203 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6204 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6205 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6206 arm_linux_nat_target.
6207 (_initialize_arm_linux_nat): Adjust to C++ification.
6208
6209 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6210 (the_aarch64_linux_nat_target): New.
6211 (aarch64_linux_fetch_inferior_registers)
6212 (aarch64_linux_store_inferior_registers)
6213 (aarch64_linux_child_post_startup_inferior)
6214 (aarch64_linux_read_description)
6215 (aarch64_linux_can_use_hw_breakpoint)
6216 (aarch64_linux_insert_hw_breakpoint)
6217 (aarch64_linux_remove_hw_breakpoint)
6218 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6219 (aarch64_linux_region_ok_for_hw_watchpoint)
6220 (aarch64_linux_stopped_data_address)
6221 (aarch64_linux_stopped_by_watchpoint)
6222 (aarch64_linux_watchpoint_addr_within_range)
6223 (aarch64_linux_can_do_single_step): Refactor as methods of
6224 aarch64_linux_nat_target.
6225 (super_post_startup_inferior): Delete.
6226 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6227
6228 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6229 (the_hppa_linux_nat_target): New.
6230 (hppa_linux_fetch_inferior_registers)
6231 (hppa_linux_store_inferior_registers): Refactor as methods of
6232 hppa_linux_nat_target.
6233 (_initialize_hppa_linux_nat): Adjust to C++ification.
6234
6235 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6236 (the_ia64_linux_nat_target): New.
6237 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6238 (ia64_linux_stopped_data_address)
6239 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6240 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6241 ia64_linux_nat_target methods.
6242 (super_xfer_partial): Delete.
6243 (_initialize_ia64_linux_nat): Adjust to C++ification.
6244
6245 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6246 (the_m32r_linux_nat_target): New.
6247 (m32r_linux_fetch_inferior_registers)
6248 (m32r_linux_store_inferior_registers): Refactor as
6249 m32r_linux_nat_target methods.
6250 (_initialize_m32r_linux_nat): Adjust to C++ification.
6251
6252 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6253 (the_m68k_linux_nat_target): New.
6254 (m68k_linux_fetch_inferior_registers)
6255 (m68k_linux_store_inferior_registers): Refactor as
6256 m68k_linux_nat_target methods.
6257 (_initialize_m68k_linux_nat): Adjust to C++ification.
6258
6259 * s390-linux-nat.c (s390_linux_nat_target): New class.
6260 (the_s390_linux_nat_target): New.
6261 (s390_linux_fetch_inferior_registers)
6262 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6263 (s390_insert_watchpoint, s390_remove_watchpoint)
6264 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6265 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6266 (s390_auxv_parse, s390_read_description): Refactor as methods of
6267 s390_linux_nat_target.
6268 (_initialize_s390_nat): Adjust to C++ification.
6269
6270 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6271 (the_sparc_linux_nat_target): New.
6272 (_initialize_sparc_linux_nat): Adjust to C++ification.
6273 * sparc-nat.c (sparc_fetch_inferior_registers)
6274 (sparc_store_inferior_registers): Remove target_ops parameter.
6275 * sparc-nat.h (sparc_fetch_inferior_registers)
6276 (sparc_store_inferior_registers): Remove target_ops parameter.
6277 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6278 (the_sparc64_linux_nat_target): New.
6279 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6280
6281 * spu-linux-nat.c (spu_linux_nat_target): New class.
6282 (the_spu_linux_nat_target): New.
6283 (spu_child_post_startup_inferior, spu_child_post_attach)
6284 (spu_child_wait, spu_fetch_inferior_registers)
6285 (spu_store_inferior_registers, spu_xfer_partial)
6286 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6287 methods.
6288 (_initialize_spu_nat): Adjust to C++ification.
6289
6290 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6291 (the_tilegx_linux_nat_target): New.
6292 (fetch_inferior_registers, store_inferior_registers):
6293 Refactor as methods.
6294 (_initialize_tile_linux_nat): Adjust to C++ification.
6295
6296 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6297 (the_xtensa_linux_nat_target): New.
6298 (xtensa_linux_fetch_inferior_registers)
6299 (xtensa_linux_store_inferior_registers): Refactor as
6300 xtensa_linux_nat_target methods.
6301 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6302
6303 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6304 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6305 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6306 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6307 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6308 (fbsd_stopped_by_sw_breakpoint)
6309 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6310 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6311 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6312 (fbsd_post_startup_inferior, fbsd_post_attach)
6313 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6314 (fbsd_set_syscall_catchpoint)
6315 (super_xfer_partial, super_resume, super_wait)
6316 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6317 (fbsd_handle_debug_trap): Remove target_ops parameter.
6318 (fbsd_nat_add_target): Delete.
6319 * fbsd-nat.h: Include "inf-ptrace.h".
6320 (fbsd_nat_add_target): Delete.
6321 (USE_SIGTRAP_SIGINFO): Define.
6322 (fbsd_nat_target): New class.
6323
6324 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6325 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6326 (amd64bsd_target): Delete.
6327 * amd64-bsd-nat.h: New file.
6328 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6329 "x86-bsd-nat.h".
6330 (amd64_fbsd_nat_target): New class.
6331 (the_amd64_fbsd_nat_target): New.
6332 (amd64fbsd_read_description): Refactor as method of
6333 amd64_fbsd_nat_target.
6334 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6335 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6336 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6337 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6338 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6339 (i386bsd_target): Delete.
6340 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6341 (i386bsd_fetch_inferior_registers)
6342 (i386bsd_store_inferior_registers): Declare.
6343 (i386_bsd_nat_target): New class.
6344 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6345 (the_i386_fbsd_nat_target): New.
6346 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6347 i386_fbsd_nat_target methods.
6348 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6349 (_initialize_i386fbsd_nat): Adjust to C++ification.
6350 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6351 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6352 (_initialize_x86_bsd_nat): Adjust to C++ification.
6353 * x86-bsd-nat.h: Include "x86-nat.h".
6354 (x86bsd_target): Delete declaration.
6355 (x86bsd_nat_target): New class.
6356
6357 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6358 (the_aarch64_fbsd_nat_target): New.
6359 (aarch64_fbsd_fetch_inferior_registers)
6360 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6361 aarch64_fbsd_nat_target.
6362 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6363 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6364 (the_alpha_bsd_nat_target): New.
6365 (alphabsd_fetch_inferior_registers)
6366 (alphabsd_store_inferior_registers): Refactor as
6367 alpha_bsd_nat_target methods.
6368 (_initialize_alphabsd_nat): Refactor as methods of
6369 alpha_bsd_nat_target.
6370 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6371 (the_amd64_nbsd_nat_target): New.
6372 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6373 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6374 (the_amd64_obsd_nat_target): New.
6375 (_initialize_amd64obsd_nat): Adjust to C++ification.
6376 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6377 (the_arm_fbsd_nat_target): New.
6378 (arm_fbsd_fetch_inferior_registers)
6379 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6380 (_initialize_arm_fbsd_nat): Refactor as methods of
6381 arm_fbsd_nat_target.
6382 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6383 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6384 (the_arm_netbsd_nat_target): New.
6385 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6386 arm_netbsd_nat_target.
6387 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6388 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6389 (the_hppa_nbsd_nat_target): New.
6390 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6391 hppa_nbsd_nat_target methods.
6392 (_initialize_hppanbsd_nat): Adjust to C++ification.
6393 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6394 (the_hppa_obsd_nat_target): New.
6395 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6396 methods of hppa_obsd_nat_target.
6397 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6398 add_target.
6399 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6400 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6401 add_target.
6402 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6403 (_initialize_i386obsd_nat): Use add_target.
6404 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6405 (the_m68k_bsd_nat_target): New.
6406 (m68kbsd_fetch_inferior_registers)
6407 (m68kbsd_store_inferior_registers): Refactor as methods of
6408 m68k_bsd_nat_target.
6409 (_initialize_m68kbsd_nat): Adjust to C++ification.
6410 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6411 (the_mips_fbsd_nat_target): New.
6412 (mips_fbsd_fetch_inferior_registers)
6413 (mips_fbsd_store_inferior_registers): Refactor as methods of
6414 mips_fbsd_nat_target.
6415 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6416 add_target.
6417 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6418 (the_mips_nbsd_nat_target): New.
6419 (mipsnbsd_fetch_inferior_registers)
6420 (mipsnbsd_store_inferior_registers): Refactor as methods of
6421 mips_nbsd_nat_target.
6422 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6423 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6424 (the_mips64_obsd_nat_target): New.
6425 (mips64obsd_fetch_inferior_registers)
6426 (mips64obsd_store_inferior_registers): Refactor as methods of
6427 mips64_obsd_nat_target.
6428 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6429 add_target.
6430 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6431 nbsd_nat_target.
6432 * nbsd-nat.h: Include "inf-ptrace.h".
6433 (nbsd_nat_target): New class.
6434 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6435 (obsd_wait): Refactor as methods of obsd_nat_target.
6436 (obsd_add_target): Delete.
6437 * obsd-nat.h: Include "inf-ptrace.h".
6438 (obsd_nat_target): New class.
6439 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6440 (the_ppc_fbsd_nat_target): New.
6441 (ppcfbsd_fetch_inferior_registers)
6442 (ppcfbsd_store_inferior_registers): Refactor as methods of
6443 ppc_fbsd_nat_target.
6444 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6445 add_target.
6446 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6447 (the_ppc_nbsd_nat_target): New.
6448 (ppcnbsd_fetch_inferior_registers)
6449 (ppcnbsd_store_inferior_registers): Refactor as methods of
6450 ppc_nbsd_nat_target.
6451 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6452 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6453 (the_ppc_obsd_nat_target): New.
6454 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6455 methods of ppc_obsd_nat_target.
6456 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6457 add_target.
6458 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6459 (the_sh_nbsd_nat_target): New.
6460 (shnbsd_fetch_inferior_registers)
6461 (shnbsd_store_inferior_registers): Refactor as methods of
6462 sh_nbsd_nat_target.
6463 (_initialize_shnbsd_nat): Adjust to C++ification.
6464 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6465 (inf_ptrace_xfer_partial): Delete.
6466 (sparc_xfer_partial, sparc_target): Delete.
6467 * sparc-nat.h (sparc_fetch_inferior_registers)
6468 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6469 (sparc_target): Delete function declaration.
6470 (sparc_target): New template class.
6471 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6472 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6473 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6474 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6475 add_target.
6476 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6477 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6478 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6479 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6480 add_target.
6481 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6482 (the_vax_bsd_nat_target): New.
6483 (vaxbsd_fetch_inferior_registers)
6484 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6485 methods.
6486 (_initialize_vaxbsd_nat): Adjust to C++ification.
6487
6488 * bsd-kvm.c (bsd_kvm_target): New class.
6489 (bsd_kvm_ops): Now a bsd_kvm_target.
6490 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6491 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6492 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6493 bsd_kvm_target.
6494 (bsd_kvm_return_one): Delete.
6495 (bsd_kvm_add_target): Adjust to C++ification.
6496
6497 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6498 (nto_procfs_target_procfs): New classes.
6499 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6500 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6501 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6502 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6503 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6504 (procfs_remove_hw_breakpoint, procfs_resume)
6505 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6506 (procfs_kill_inferior, procfs_store_registers)
6507 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6508 as methods of nto_procfs_target.
6509 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6510 (nto_native_ops): Delete.
6511 (procfs_open, procfs_native_open): Delete.
6512 (nto_native_ops): Now an nto_procfs_target_native.
6513 (init_procfs_targets): Adjust to C++ification.
6514 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6515 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6516 Refactor as methods of nto_procfs_target.
6517
6518 * go32-nat.c (go32_nat_target): New class.
6519 (the_go32_nat_target): New.
6520 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6521 (go32_store_registers, go32_xfer_partial, go32_files_info)
6522 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6523 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6524 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6525 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6526 (go32_target): Delete.
6527 (_initialize_go32_nat): Adjust to C++ification.
6528
6529 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6530 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6531 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6532 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6533 gnu_nat_target.
6534 (gnu_target): Delete.
6535 * gnu-nat.h (gnu_target): Delete.
6536 (gnu_nat_target): New class.
6537 * i386-gnu-nat.c (gnu_base_target): New.
6538 (i386_gnu_nat_target): New class.
6539 (the_i386_gnu_nat_target): New.
6540 (_initialize_i386gnu_nat): Adjust to C++ification.
6541
3fffc070
PA
65422018-05-02 Pedro Alves <palves@redhat.com>
6543
6544 * bfd-target.c (target_bfd_xclose): Rename to ...
6545 (target_bfd_close): ... this.
6546 (target_bfd_reopen): Adjust.
6547 * target.c (target_close): Remove references to to_xclose.
6548 * target.h (target_ops::to_xclose): Delete.
6549 (target_ops::to_close): Update comments.
6550
6798487f
PA
65512018-05-02 Pedro Alves <palves@redhat.com>
6552
6553 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6554 "linux-nat.h".
6555 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6556 * inf-ptrace.c (inf_ptrace_register_u_offset)
6557 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6558 (inf_ptrace_store_register, inf_ptrace_store_registers)
6559 (inf_ptrace_trad_target): Move to ...
6560 * linux-nat-trad.c: ... this new file.
6561 * linux-nat-trad.h: New file.
6562 * linux-nat.c (linux_target_install_ops): Make extern.
6563 (linux_trad_target): Delete.
6564 * linux-nat.h (linux_trad_target): Delete declaration.
6565 (linux_target_install_ops): Declare.
6566 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6567 "linux-nat.h".
6568
c1955e17
PA
65692018-05-02 Pedro Alves <palves@redhat.com>
6570
6571 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6572 procfs_target/add_target here.
6573 * procfs.c (procfs_target): Make static.
6574 (_initialize_procfs): Call add_target here.
6575 * procfs.h (struct target_ops): Remove forward declaration.
6576 (procfs_target): Remove declaration.
6577 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6578
b5c8fcb1
PA
65792018-05-02 Pedro Alves <palves@redhat.com>
6580
6581 * procfs.c (procfs_stopped_by_watchpoint)
6582 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6583 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6584 Forward declare.
6585 (procfs_use_watchpoints): Delete, move contents...
6586 (procfs_target): ... here.
6587 * procfs.h (procfs_use_watchpoints): Delete declaration.
6588 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6589 procfs_use_watchpoints.
6590 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6591 procfs_use_watchpoints.
6592
0489430a
TT
65932018-05-02 Tom Tromey <tom@tromey.com>
6594
6595 PR python/20084:
6596 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6597 and var_zuinteger_unlimited.
6598 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6599 and PARAM_ZUINTEGER_UNLIMITED.
6600 (set_parameter_value): Handle var_zuinteger and
6601 var_zuinteger_unlimited.
6602 (add_setshow_generic): Likewise.
6603 (parmpy_init): Likewise.
6604
1632f8ba
DR
66052018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6606
6607 PR rust/23124
6608 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6609 pointer is not null before dereferencing it.
6610
76761936
TT
66112018-04-30 Tom Tromey <tom@tromey.com>
6612
6613 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6614 is_mi_like_p.
6615
2d33446d
TT
66162018-04-30 Tom Tromey <tom@tromey.com>
6617
6618 * breakpoint.c (mention): Remove use of is_mi_like_p.
6619 (print_mention_ranged_breakpoint): Likewise.
6620 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6621 of is_mi_like_p.
6622
f3c6abab
TT
66232018-04-30 Tom Tromey <tom@tromey.com>
6624
6625 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6626
40c03530
TT
66272018-04-30 Tom Tromey <tom@tromey.com>
6628
6629 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6630 (info_spu_event_command): Remove some uses of is_mi_like_p.
6631
2038b7fd
TT
66322018-04-30 Tom Tromey <tom@tromey.com>
6633
6634 * python/py-framefilter.c (py_print_single_arg)
6635 (enumerate_locals, py_print_args, py_print_frame): Remove some
6636 uses of is_mi_like_p.
6637
4904c3c6
TT
66382018-04-30 Tom Tromey <tom@tromey.com>
6639
6640 * ui-out.c: Update.
6641 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6642 * ui-out.h (ui_out::is_mi_like_p): Now const.
6643 (ui_out::do_is_mi_like_p): Now const.
6644 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6645
7c66fffc
TT
66462018-04-30 Tom Tromey <tom@tromey.com>
6647
6648 * varobj.c (varobj_set_visualizer): Use new_reference.
6649 * python/python.c (gdbpy_decode_line): Use new_reference.
6650 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6651 new_reference.
6652
bbfa6f00
TT
66532018-04-30 Tom Tromey <tom@tromey.com>
6654
6655 * varobj.c (install_new_value): Use new_reference.
6656 * value.h (value_incref): Return void. Swap intro comment with
6657 value_decref.
6658 * value.c (set_value_parent): Use new_reference.
6659 (value_incref): Return void. Update intro comment.
6660 (release_value): Use new_reference.
6661 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6662
1831a9f9
TT
66632018-04-30 Tom Tromey <tom@tromey.com>
6664
6665 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6666 * gdb_bfd.h (new_bfd_ref): Remove.
6667 (gdb_bfd_open): Update comment.
6668 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6669 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6670 (gdb_bfd_fdopenr): Use new_reference.
6671 * exec.c (exec_file_attach): Use new_reference.
6672
7c1b5f3d
TT
66732018-04-30 Tom Tromey <tom@tromey.com>
6674
6675 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6676 method.
6677
e11fb955
TT
66782018-04-30 Tom Tromey <tom@tromey.com>
6679
6680 * jit.c (jit_read_code_entry): Use type_align.
6681 * i386-tdep.c (i386_gdbarch_init): Don't call
6682 set_gdbarch_long_long_align_bit.
6683 * gdbarch.sh: Remove long_long_align_bit.
6684 * gdbarch.c, gdbarch.h: Rebuild.
6685 * arc-tdep.c (arc_type_align): New function.
6686 (arc_gdbarch_init): Use arc_type_align. Don't call
6687 set_gdbarch_long_long_align_bit.
6688
2fff16dd
TT
66892018-04-30 Tom Tromey <tom@tromey.com>
6690
6691 * rust-lang.c (rust_type_alignment): Remove.
6692 (rust_composite_type): Use type_align.
6693
6d7bb824
TT
66942018-04-30 Tom Tromey <tom@tromey.com>
6695
6696 * NEWS: Mention Type.align.
6697 * python/py-type.c (typy_get_alignof): New function.
6698 (type_object_getset): Add "alignof".
6699
007e1530
TT
67002018-04-30 Tom Tromey <tom@tromey.com>
6701
6702 PR exp/17095:
6703 * NEWS: Update.
6704 * std-operator.def (UNOP_ALIGNOF): New operator.
6705 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6706 New.
6707 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6708 * c-lang.c (c_op_print_tab): Add alignof.
6709 * c-exp.y (ALIGNOF): New token.
6710 (exp): Add "ALIGNOF" production.
6711 (ident_tokens): Add _Alignof and alignof.
6712
2b4424c3
TT
67132018-04-30 Tom Tromey <tom@tromey.com>
6714
6715 * i386-tdep.c (i386_type_align): New function.
6716 (i386_gdbarch_init): Update.
6717 * gdbarch.sh (type_align): New method.
6718 * gdbarch.c, gdbarch.h: Rebuild.
6719 * arch-utils.h (default_type_align): Declare.
6720 * arch-utils.c (default_type_align): New function.
6721 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6722 (struct type) <align_log2>: New field.
6723 <instance_flags>: Now a bitfield.
6724 (TYPE_RAW_ALIGN): New macro.
6725 (type_align, type_raw_align, set_type_align): Declare.
6726 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6727 functions.
6728 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6729 (get_alignment, maybe_set_alignment): New functions.
6730 (read_structure_type, read_enumeration_type, read_array_type)
6731 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6732 (read_subrange_type, read_base_type): Set type alignment.
6733
d33bc52e
SM
67342018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6735
6736 * dwarf2read.c (read_index_from_section): Use bool.
6737
e28b63a9
FG
67382018-04-29 Fabian Groffen <grobian@gentoo.org>
6739
6740 PR gdb/22950
6741 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6742 with #ifdef.
6743
cd8c76e4
JR
67442018-04-29 John Reiser <jreiser@BitWagon.com>
6745
6746 PR build/22873
6747 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6748 last step, and do it atomically.
6749
476d250e
AO
67502018-04-27 Alexandre Oliva <aoliva@redhat.com>
6751
6752 * compile/compile-c-types.c (convert_int, convert_float):
6753 Update for C FE v1.
6754
6873858b
TT
67552018-04-27 Tom Tromey <tom@tromey.com>
6756
6757 PR rust/22545:
6758 * rust-lang.c (rust_inclusive_range_type_p): New function.
6759 (rust_range): Handle inclusive ranges.
6760 (rust_compute_range): Likewise.
6761 * rust-exp.y (struct rust_op) <inclusive>: New field.
6762 (DOTDOTEQ): New constant.
6763 (range_expr): Add "..=" productions.
6764 (operator_tokens): Add "..=" token.
6765 (ast_range): Add "inclusive" parameter.
6766 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6767 ranges.
6768 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6769 bounds values.
6770 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6771 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6772 Update comments.
6773 * expprint.c (print_subexp_standard): Handle new bounds values.
6774 (dump_subexp_body_standard): Likewise.
6775
632e107b
TT
67762018-04-27 Tom Tromey <tom@tromey.com>
6777
6778 * configure: Rebuild.
6779 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6780 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6781 "OVERRIDE".
6782 (class symbol_needs_eval_context): Likewise.
6783 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6784 (mock_mapped_index::symbol_name_at): Use "override". Remove
6785 "virtual".
6786 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6787 "override".
6788 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6789 * aarch64-tdep.c (instruction_reader::read): Use "override".
6790 (instruction_reader_test::read): Likewise.
6791 * arm-tdep.c (instruction_reader::read): Use "override".
6792 (instruction_reader_thumb::read): Likewise.
6793
b75abf5b
AK
67942018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6795
6796 PR remote/9665
6797 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6798 instead of remote_send.
6799 (remote_send): Remove.
6800
79188d8d
PA
68012018-04-26 Pedro Alves <palves@redhat.com>
6802
6803 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6804 find_function_start_sal instead of find_pc_line.
6805
f50776aa
PA
68062018-04-26 Pedro Alves <palves@redhat.com>
6807
6808 * breakpoint.c (set_breakpoint_location_function): Handle
6809 mst_data_gnu_ifunc.
6810 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6811 * elfread.c (elf_symtab_read): Give data symbols with
6812 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6813 (elf_rel_plt_read): Update comment.
6814 * linespec.c (convert_linespec_to_sals): Handle
6815 mst_data_gnu_ifunc.
6816 (minsym_found): Handle mst_data_gnu_ifunc.
6817 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6818 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6819 * parse.c (find_minsym_type_and_address): Handle
6820 mst_data_gnu_ifunc.
6821 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6822 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6823 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6824 comment.
6825 <mst_data_gnu_ifunc>: New enumerator.
6826
20944a6e
PA
68272018-04-26 Pedro Alves <palves@redhat.com>
6828
6829 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6830 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6831 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6832 Handle it.
6833 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6834 (lookup_minimal_symbol_by_pc): Adjust.
6835 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6836 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6837 * minsyms.h (lookup_msym_prefer): New enum.
6838 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6839 parameter by a lookup_msym_prefer parameter.
6840
1adeb822
PA
68412018-04-26 Pedro Alves <palves@redhat.com>
6842
6843 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6844 ends in "@plt" instead of looking at the symbol's section.
6845
a0aca7b0
PA
68462018-04-26 Pedro Alves <palves@redhat.com>
6847
6848 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6849 all references.
6850 (find_pc_partial_function_gnu_ifunc): Rename to ...
6851 (find_pc_partial_function): ... this, and remove references to
6852 'is_gnu_ifunc_p'.
6853 (find_pc_partial_function): Delete old implementation.
6854 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6855
76af0f26
PA
68562018-04-26 Pedro Alves <palves@redhat.com>
6857
6858 * linespec.c (struct bound_minimal_symbol_search_key): New.
6859 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6860 skip first line if we found a GNU ifunc minimal symbol by name.
6861 (compare_msymbols): Change parameters to work with a destructured
6862 lhs minsym.
6863 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6864 functions.
6865
3467ec66
PA
68662018-04-26 Pedro Alves <palves@redhat.com>
6867
6868 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6869 ifunc targets here. Instead, if we have an ifunc minsym, use its
6870 address/name.
6871 (add_location_to_breakpoint): Store the minsym and the objfile in
6872 the breakpoint location.
6873 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6874 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6875 Record the minsym in the sal.
6876 * symtab.h (symtab_and_line) <msymbol>: New field.
6877
28f4fa4d
PA
68782018-04-26 Pedro Alves <palves@redhat.com>
6879
6880 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6881 unless we actually resolved the ifunc.
6882
ca31ab1d
PA
68832018-04-26 Pedro Alves <palves@redhat.com>
6884
6885 * c-exp.y (variable production): Prefer ifunc minsyms over
6886 regular function symbols.
6887 * symtab.c (find_gnu_ifunc): New function.
6888 * minsyms.h (lookup_msym_prefer): New enum.
6889 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6890 parameter by a lookup_msym_prefer parameter.
6891 * symtab.h (find_gnu_ifunc): New declaration.
6892
8388016d
PA
68932018-04-26 Pedro Alves <palves@redhat.com>
6894
6895 * blockframe.c (find_gnu_ifunc_target_type): New function.
6896 (find_function_type): New.
6897 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
6898 return a value with a memory address.
6899 (eval_call): For calls to GNU ifunc functions, try to find the
6900 type of the target function from the type that the resolver
6901 returns.
6902 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
6903 symbols.
6904 * infcall.c (find_function_return_type): Delete.
6905 (find_function_addr): Add 'function_type' parameter. For calls to
6906 GNU ifunc functions, try to find the type of the target function
6907 from the type that the resolver returns, and return it via
6908 FUNCTION_TYPE.
6909 (call_function_by_hand_dummy): Adjust to use the function type
6910 returned by find_function_addr.
6911 (find_function_addr): Add 'function_type' parameter and move
6912 description here.
6913 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
6914 declarations.
6915
a376e11d
PA
69162018-04-26 Pedro Alves <palves@redhat.com>
6917
6918 * c-exp.y (variable production): Skip finding an alias for ifunc
6919 symbols.
6920
02e169e2
PA
69212018-04-26 Pedro Alves <palves@redhat.com>
6922
6923 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
6924
249b5733
PA
69252018-04-25 Pedro Alves <palves@redhat.com>
6926
6927 * infcmd.c (kill_command): Print the pid as string, not the whole
6928 thread's ptid. Add comment. s/has been killed/killed/ in output
6929 message.
6930 * remote.c (remote_detach_1): Print the pid as string, not the
6931 whole thread's ptid.
6932
f67c0c91
SDJ
69332018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6934 Sergio Durigan Junior <sergiodj@redhat.com>
6935 Pedro Alves <palves@redhat.com>
6936
6937 * infcmd.c (kill_command): Print message when inferior has
6938 been killed.
6939 * inferior.c (print_inferior_events): Remove 'static'. Set as
6940 '1'.
6941 (add_inferior): Improve message printed when
6942 'print_inferior_events' is on.
6943 (exit_inferior): Remove message printed when
6944 'print_inferior_events' is on.
6945 (detach_inferior): Improve message printed when
6946 'print_inferior_events' is on.
6947 (initialize_inferiors): Use 'add_inferior_silent' to set
6948 'current_inferior_'.
6949 * inferior.h (print_inferior_events): Declare here as
6950 'extern'.
6951 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
6952 '[Detaching...]' messages when 'print_inferior_events' is on.
6953 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
6954 as prefix/suffix for messages. Remove periods. Fix erroneous
6955 'Detaching after fork from child...', replace it by '... from
6956 parent...'.
6957 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
6958 prefix/suffix when printing 'Detaching...' messages. Print
6959 them when 'print_inferior_events' is on.
6960 * remote.c (remote_detach_1): Print message when detaching
6961 from inferior and '!is_fork_parent'.
6962
e427af18
TT
69632018-04-24 Tom Tromey <tom@tromey.com>
6964
6965 * cli-out.h: Reindent.
6966
05b1d8d6
TT
69672018-04-24 Tom Tromey <tom@tromey.com>
6968
6969 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
6970 (cli_ui_out::do_field_string): Use fputs_filtered.
6971 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
6972
a95c7dab
TT
69732018-04-23 Tom Tromey <tom@tromey.com>
6974
6975 * guile/scm-frame.c (gdbscm_frame_read_var): Use
6976 gdb::unique_xmalloc_ptr.
6977
458412c3
TT
69782018-04-23 Tom Tromey <tom@tromey.com>
6979
6980 * configure: Rebuild.
6981
db86b02b
RS
69822018-04-22 Rajendra SY <rajendra.sy@gmail.com>
6983
6984 PR gdb/23095
6985 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
6986 prepare_for_testing. Set normal_bp to r_debug_state if target
6987 is bsd.
6988
00aecdcf
PA
69892018-04-21 Pedro Alves <palves@redhat.com>
6990 Rajendra SY <rajendra.sy@gmail.com>
6991
6992 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
6993 * remote.c (extended_remote_attach): In all-stop mode, mark the
6994 thread as executing.
6995
224608c3
PW
69962018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6997
6998 * thread.c (thread_apply_all_command): Fix comment.
6999 (thread_command): Fix comment.
7000
3b74854b
AH
70012018-04-10 Alan Hayward <alan.hayward@arm.com>
7002
7003 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7004 parameter.
7005 * features/aarch64-core.c (create_feature_aarch64_core):
7006 Regenerate.
7007 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7008 Likewise.
7009 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7010 Likewise.
7011 * features/i386/32bit-avx512.c
7012 (create_feature_i386_32bit_avx512): Likewise.
7013 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7014 Likewise.
7015 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7016 Likewise.
7017 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7018 Likewise.
7019 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7020 Likewise.
7021 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7022 Likewise.
7023 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7024 Likewise.
7025 * features/i386/64bit-avx512.c
7026 (create_feature_i386_64bit_avx512): Likewise.
7027 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7028 Likewise.
7029 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7030 Likewise.
7031 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7032 Likewise.
7033 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7034 Likewise.
7035 * features/i386/64bit-segments.c
7036 (create_feature_i386_64bit_segments): Likewise.
7037 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7038 Likewise.
7039 * features/i386/x32-core.c
7040 (create_feature_i386_x32_core): Likewise.
7041 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7042 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7043 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7044 * target-descriptions.c: In generated code, don't pass xml
7045 filename.
7046
e98577a9
AH
70472018-04-18 Alan Hayward <alan.hayward@arm.com>
7048
7049 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7050 (print_xml_feature::visit_post): Likewise.
7051 (print_xml_feature::visit): Likewise.
7052 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7053 (print_xml_feature): Add new class.
7054 * regformats/regdat.sh: Null xmltarget on feature targets.
7055 * target-descriptions.c (struct target_desc): Add xmltarget.
7056 (maintenance_check_tdesc_xml_convert): Add unittest function.
7057 (tdesc_get_features_xml): Add function to get xml.
7058 (maintenance_check_xml_descriptions): Test xml generation.
7059 * xml-tdesc.c (string_read_description_xml): Add function.
7060 * xml-tdesc.h (string_read_description_xml): Add declaration.
7061
ad7fc756
AH
70622018-04-18 Alan Hayward <alan.hayward@arm.com>
7063
7064 * features/Makefile: Add feature marker to targets with new style
7065 target descriptions.
7066 * regformats/aarch64.dat: Regenerate.
7067 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7068 * regformats/i386/amd64-avx-linux.dat: Likewise.
7069 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7070 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7071 * regformats/i386/amd64-linux.dat: Likewise.
7072 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7073 * regformats/i386/amd64.dat: Likewise.
7074 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7075 * regformats/i386/i386-avx-linux.dat: Likewise.
7076 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7077 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7078 * regformats/i386/i386-linux.dat: Likewise.
7079 * regformats/i386/i386-mmx-linux.dat: Likewise.
7080 * regformats/i386/i386-mpx-linux.dat: Likewise.
7081 * regformats/i386/i386.dat: Likewise.
7082 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7083 * regformats/i386/x32-avx-linux.dat: Likewise.
7084 * regformats/i386/x32-linux.dat: Likewise.
7085 * regformats/tic6x-c62x-linux.dat: Likewise.
7086 * regformats/tic6x-c64x-linux.dat: Likewise.
7087 * regformats/tic6x-c64xp-linux.dat: Likewise.
7088 * regformats/regdat.sh: Parse feature marker.
7089
d278f585
AH
70902018-04-18 Alan Hayward <alan.hayward@arm.com>
7091
7092 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7093 (tdesc_osabi_name): Likewise.
7094 * target-descriptions.c (tdesc_architecture_name): Add new
7095 function.
7096 (tdesc_osabi_name): Likewise.
7097
eee8a18d
AH
70982018-04-18 Alan Hayward <alan.hayward@arm.com>
7099
7100 * common/tdesc.c (tdesc_predefined_type): Move to here.
7101 (tdesc_named_type): Likewise.
7102 (tdesc_create_vector): Likewise.
7103 (tdesc_create_struct): Likewise.
7104 (tdesc_set_struct_size): Likewise.
7105 (tdesc_create_union): Likewise.
7106 (tdesc_create_flags): Likewise.
7107 (tdesc_create_enum): Likewise.
7108 (tdesc_add_field): Likewise.
7109 (tdesc_add_typed_bitfield): Likewise.
7110 (tdesc_add_bitfield): Likewise.
7111 (tdesc_add_flag): Likewise.
7112 (tdesc_add_enum_value): Likewise.
7113 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7114 (struct tdesc_type_vector): Likewise.
7115 (struct tdesc_type_field): Likewise.
7116 (struct tdesc_type_with_fields): Likewise.
7117 (tdesc_create_enum): Add declaration.
7118 (tdesc_add_typed_bitfield): Likewise.
7119 (tdesc_add_enum_value): Likewise.
7120 * target-descriptions.c (tdesc_type_field): Move from here.
7121 (tdesc_type_builtin): Likewise.
7122 (tdesc_type_vector): Likewise.
7123 (tdesc_type_with_fields): Likewise.
7124 (tdesc_predefined_types): Likewise.
7125 (tdesc_named_type): Likewise.
7126 (tdesc_create_vector): Likewise.
7127 (tdesc_create_struct): Likewise.
7128 (tdesc_set_struct_size): Likewise.
7129 (tdesc_create_union): Likewise.
7130 (tdesc_create_flags): Likewise.
7131 (tdesc_create_enum): Likewise.
7132 (tdesc_add_field): Likewise.
7133 (tdesc_add_typed_bitfield): Likewise.
7134 (tdesc_add_bitfield): Likewise.
7135 (tdesc_add_flag): Likewise.
7136 (tdesc_add_enum_value): Likewise.
7137 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7138 (tdesc_add_typed_bitfield): Likewise.
7139 (tdesc_add_enum_value): Likewise.
7140
82ec9bc7
AH
71412018-04-18 Alan Hayward <alan.hayward@arm.com>
7142
7143 * common/tdesc.c (tdesc_feature::accept): Move to here.
7144 (tdesc_feature::operator==): Likewise.
7145 (tdesc_create_reg): Likewise.
7146 * common/tdesc.h (tdesc_type_kind): Likewise.
7147 (struct tdesc_type): Likewise.
7148 (struct tdesc_feature): Likewise.
7149 * regformats/regdat.sh: Create a feature.
7150 * target-descriptions.c (tdesc_type_kind): Move from here.
7151 (tdesc_type): Likewise.
7152 (tdesc_type_up): Likewise.
7153 (tdesc_feature): Likewise.
7154 (tdesc_create_reg): Likewise.
7155
ea3e7d71
AH
71562018-04-18 Alan Hayward <alan.hayward@arm.com>
7157
7158 * Makefile.in: Add arch/tdesc.c
7159 * common/tdesc.c: New file.
7160 * common/tdesc.h (tdesc_element_visitor): Move to here.
7161 (tdesc_element): Likewise.
7162 (tdesc_reg): Likewise.
7163 (tdesc_reg_up): Likewise.
7164 * regformats/regdef.h (reg): Add offset to constructors.
7165 * target-descriptions.c (tdesc_element_visitor): Move from here.
7166 (tdesc_element): Likewise.
7167 (tdesc_reg): Likewise.
7168 (tdesc_reg_up): Likewise.
7169
bedda9ac
TT
71702018-04-17 Tom Tromey <tom@tromey.com>
7171
7172 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7173 discriminant field.
7174
a037790e
TT
71752018-04-17 Tom Tromey <tom@tromey.com>
7176
7177 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7178
c7dcbf88
AA
71792018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7180
7181 * symtab.c (print_symbol_info): Skip printing filename and line
7182 number when `last' is NULL.
7183 (symtab_symbol_info): Use empty string instead of NULL for first
7184 invocation of print_symbol_info.
7185 (rbreak_command): Pass NULL to `last' parameter of
7186 print_symbol_info.
7187
07d28c77
SM
71882018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7189
7190 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7191 instead of nullptr.
7192
8a3de5e1
PA
71932018-04-16 Pedro Alves <palves@redhat.com>
7194
7195 * MAINTAINERS (sh): Remove.
7196 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7197 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7198 (ALLDEPFILES): Remove sh64-tdep.c.
7199 * NEWS: Mentions that support for SH-5/SH64 is removed.
7200 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7201 (sh*-*-openbsd*): Ditto.
7202 (sh64-*-elf*): Remove.
7203 (sh*): Remove.
7204 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7205 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7206 * sh-tdep.c: No longer include "sh64-tdep.h".
7207 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7208 * sh64-tdep.c, sh64-tdep.h: Remove files.
7209
a2a79012
PA
72102018-04-16 Pedro Alves <palves@redhat.com>
7211
7212 * MAINTAINERS: Remove m88k.
7213 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7214 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7215 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7216 * NEWS: Mention that support for m88k was removed.
7217 * configure.host (m88*-*-*): Remove support.
7218 * configure.nat (m88k-*-*): Remove support.
7219 * configure.tgt (m88*-*-openbsd*): Remove.
7220 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7221
eda4efb1
SM
72222018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7223
7224 * configure.tgt (x86_tobjs): New variable.
7225 (amd64_tobjs, i386_tobjs): Use it.
7226
b744723f
AA
72272018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7228
7229 * symtab.c (print_symbol_info): Precede the symbol definition by
7230 the line number when available.
7231 * NEWS: Advertise this enhancement.
7232
4a4495d6
MM
72332018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7234
7235 * NEWS (New options): announce set/show record btrace cpu.
7236 * btrace.c: Include record-btrace.h.
7237 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7238 the vendor is unknown.
7239 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7240 Maybe overwrite the btrace configuration's cpu.
7241 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7242 (btrace_fetch): Add cpu parameter. Update callers.
7243 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7244 Maybe overwrite the btrace configuration's cpu. Skip enabling
7245 errata workarounds if the vendor is unknown.
7246 * python/py-record-btrace.c: Include record-btrace.h.
7247 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7248 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7249 * record-btrace.c (record_btrace_cpu_state_kind): New.
7250 (record_btrace_cpu): New.
7251 (set_record_btrace_cpu_cmdlist): New.
7252 (record_btrace_get_cpu): New.
7253 (require_btrace_thread, record_btrace_info)
7254 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7255 (cmd_set_record_btrace_cpu_none): New.
7256 (cmd_set_record_btrace_cpu_auto): New.
7257 (cmd_set_record_btrace_cpu): New.
7258 (cmd_show_record_btrace_cpu): New.
7259 (_initialize_record_btrace): Initialize set/show record btrace cpu
7260 commands.
7261 * record-btrace.h (record_btrace_get_cpu): New.
7262
69f90c75
MM
72632018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7264
7265 * record.c (set_record_command): Fix typo in message.
7266
b85310e1
MM
72672018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7268
7269 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7270
1d509aa6
MM
72712018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7272
7273 * infrun.c (process_event_stop_test): Call
7274 gdbarch_in_indirect_branch_thunk.
7275 * gdbarch.sh (in_indirect_branch_thunk): New.
7276 * gdbarch.c: Regenerated.
7277 * gdbarch.h: Regenerated.
7278 * x86-tdep.h: New.
7279 * x86-tdep.c: New.
7280 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7281 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7282 (ALLDEPFILES): Add x86-tdep.c.
7283 * arch-utils.h (default_in_indirect_branch_thunk): New.
7284 * arch-utils.c (default_in_indirect_branch_thunk): New.
7285 * i386-tdep: Include x86-tdep.h.
7286 (i386_in_indirect_branch_thunk): New.
7287 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7288 function.
7289 * amd64-tdep: Include x86-tdep.h.
7290 (amd64_in_indirect_branch_thunk): New.
7291 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7292
b4be9bfd
JK
72932018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7294
7295 PR gdb/23053
7296 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7297 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7298 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7299 regression.
7300
53d7df28
TT
73012018-04-12 Tom Tromey <tom@tromey.com>
7302
7303 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7304 (rust_evaluate_subexp): Likewise.
7305
70b33f19
PA
73062018-04-12 Pedro Alves <palves@redhat.com>
7307
7308 * procfs.c (procfs_detach): Make forward declaration's prototype
7309 match definition's protototype.
7310 (proc_get_LDT_entry): Remove stale do_cleanups call.
7311
436411b1
PA
73122018-04-12 Pedro Alves <palves@redhat.com>
7313
7314 * target.h (target_ops::to_has_exited): Delete.
7315 (target_has_exited): Delete.
7316 * target-delegates.c: Regenerate.
7317
20db9c52
PA
73182018-04-11 Pedro Alves <palves@redhat.com>
7319
7320 * target.c (fileio_fh_t::t): Add comment.
7321 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7322 (target_fileio_close): Handle a NULL target.
7323 (invalidate_fileio_fh): New.
7324 (target_close): Call it.
7325 * remote.c (remote_hostio_send_command): No longer check whether
7326 remote_desc is open.
7327
5ff79300
PA
73282018-04-11 Pedro Alves <palves@redhat.com>
7329
7330 * target.c (fileio_fh_t): Make it a named struct instead of a
7331 typedef.
7332 (fileio_fh_t::is_closed): New method.
7333 (DEF_VEC_O (fileio_fh_t)): Remove.
7334 (fileio_fhandles): Now a std::vector.
7335 (is_closed_fileio_fh): Delete.
7336 (acquire_fileio_fd): Adjust. Rename parameters.
7337 (release_fileio_fd): Adjust.
7338 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7339 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7340 (target_fileio_close): Adjust.
7341
6e22e10d
SM
73422018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7343
7344 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7345 index.
7346
731f534f
PA
73472018-04-10 Pedro Alves <palves@redhat.com>
7348
7349 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7350 (scoped_finish_thread_state): New class.
7351 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7352 cleanup.
7353 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7354 (fetch_inferior_event, normal_stop): Likewise.
7355 * thread.c (finish_thread_state_cleanup): Delete.
7356
d5f4488f
SM
73572018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7358 Pedro Alves <palves@redhat.com>
7359
7360 * value.c: Include "selftest.h" and "common/array-view.h".
7361 (struct range) <operator ==>: New.
7362 (test_ranges_contain): New.
7363 (check_ranges_vector): New.
7364 (test_insert_into_bit_range_vector): New.
7365 (_initialize_values): Register selftests.
7366 * common/array-view.h (operator==, operator!=): New.
7367
b24531ed
SM
73682018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7369
7370 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7371 an iterator.
7372 * inline-frame.c: Include <algorithm>.
7373 (struct inline_state): Add constructor.
7374 (inline_state_s): Remove.
7375 (DEF_VEC_O(inline_state_s)): Remove.
7376 (inline_states): Change type to std::vector.
7377 (find_inline_frame_state): Adjust to std::vector.
7378 (allocate_inline_frame_state): Remove.
7379 (clear_inline_frame_state): Adjust to std::vector.
7380 (skip_inline_frames): Adjust to std::vector.
7381
c252925c
SM
73822018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7383
7384 * tracepoint.h (struct trace_state_variable): Add constructor.
7385 <name>: Change type to std::string.
7386 * tracepoint.c (tsv_s): Remove.
7387 (DEF_VEC_O(tsv_s)): Remove.
7388 (tvariables): Change to std::vector.
7389 (create_trace_state_variable): Adjust to std::vector.
7390 (find_trace_state_variable): Likewise.
7391 (find_trace_state_variable_by_number): Likewise.
7392 (delete_trace_state_variable): Likewise.
7393 (trace_variable_command): Adjust to std::string.
7394 (delete_trace_variable_command): Likewise.
7395 (tvariables_info_1): Adjust to std::vector.
7396 (save_trace_state_variables): Likewise.
7397 (start_tracing): Likewise.
7398 (merge_uploaded_trace_state_variables): Adjust to std::vector
7399 and std::string.
7400 * target.h (struct target_ops)
7401 <to_download_trace_state_variable>: Pass reference to
7402 trace_state_variable.
7403 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7404 * target-delegates.c: Re-generate.
7405 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7406 (mi_tsv_deleted): Likewise.
7407 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7408 * remote.c (remote_download_trace_state_variable): Change
7409 pointer to reference and adjust.
7410 * make-target-delegates (parse_argtypes): Handle references.
7411 (write_function_header): Likewise.
7412 (munge_type): Likewise.
7413
c9638d26
SM
74142018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7415
7416 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7417 string_view-selftests.c.
7418 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7419 testsuite.
7420 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7421 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7422 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7423 * unittests/basic_string_view/element_access/char/1.cc:
7424 Likewise.
7425 * unittests/basic_string_view/element_access/char/empty.cc:
7426 Likewise.
7427 * unittests/basic_string_view/element_access/char/front_back.cc:
7428 Likewise.
7429 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7430 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7431 Likewise.
7432 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7433 Likewise.
7434 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7435 Likewise.
7436 * unittests/basic_string_view/operations/compare/char/1.cc:
7437 Likewise.
7438 * unittests/basic_string_view/operations/compare/char/13650.cc:
7439 Likewise.
7440 * unittests/basic_string_view/operations/copy/char/1.cc:
7441 Likewise.
7442 * unittests/basic_string_view/operations/data/char/1.cc:
7443 Likewise.
7444 * unittests/basic_string_view/operations/find/char/1.cc:
7445 Likewise.
7446 * unittests/basic_string_view/operations/find/char/2.cc:
7447 Likewise.
7448 * unittests/basic_string_view/operations/find/char/3.cc:
7449 Likewise.
7450 * unittests/basic_string_view/operations/find/char/4.cc:
7451 Likewise.
7452 * unittests/basic_string_view/operations/rfind/char/1.cc:
7453 Likewise.
7454 * unittests/basic_string_view/operations/rfind/char/2.cc:
7455 Likewise.
7456 * unittests/basic_string_view/operations/rfind/char/3.cc:
7457 Likewise.
7458 * unittests/basic_string_view/operations/substr/char/1.cc:
7459 Likewise.
7460 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7461 * unittests/string_view-selftests.c: New file.
7462
fdc11678
SM
74632018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7464
7465 * unittests/basic_string_view/capacity/1.cc: New file.
7466 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7467 * unittests/basic_string_view/cons/char/1.cc: New file.
7468 * unittests/basic_string_view/cons/char/2.cc: New file.
7469 * unittests/basic_string_view/cons/char/3.cc: New file.
7470 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7471 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7472 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7473 * unittests/basic_string_view/element_access/char/1.cc: New file.
7474 * unittests/basic_string_view/element_access/char/2.cc: New file.
7475 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7476 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7477 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7478 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7479 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7480 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7481 * unittests/basic_string_view/include.cc: New file.
7482 * unittests/basic_string_view/inserters/char/1.cc: New file.
7483 * unittests/basic_string_view/inserters/char/2.cc: New file.
7484 * unittests/basic_string_view/inserters/char/3.cc: New file.
7485 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7486 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7487 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7488 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7489 * unittests/basic_string_view/literals/types.cc: New file.
7490 * unittests/basic_string_view/literals/values.cc: New file.
7491 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7492 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7493 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7494 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7495 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7496 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7497 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7498 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7499 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7500 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7501 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7502 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7503 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7504 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7505 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7506 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7507 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7508 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7509 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7510 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7511 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7512 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7513 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7514 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7515 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7516 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7517 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7518 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7519 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7520 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7521 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7522 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7523 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7524 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7525 * unittests/basic_string_view/operators/char/2.cc: New file.
7526 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7527 * unittests/basic_string_view/range_access/char/1.cc: New file.
7528 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7529 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7530 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7531 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7532 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7533 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7534 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7535 * unittests/basic_string_view/typedefs.cc: New file.
7536 * unittests/basic_string_view/types/1.cc: New file.
7537
8345c4a2
SM
75382018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7539
7540 * common/gdb_string_view.h: Remove libstdc++ implementation
7541 details, adjust to gdb reality.
7542 * common/gdb_string_view.tcc: Likewise.
7543 * cli/cli-script.c (struct string_view): Remove.
7544 (user_args) <m_args>: Change element type to gdb::string_view.
7545 (user_args::insert_args): Adjust.
7546
7adcdf08
SM
75472018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7548
7549 * common/gdb_string_view.h: New file.
7550 * common/gdb_string_view.tcc: New file.
7551
41260ac2
SM
75522018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7553
7554 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7555 * configure: Re-generate.
7556
0bee6dd4
PA
75572018-04-09 Pedro Alves <palves@redhat.com>
7558
7559 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7560 (set_target_gdbarch): Call
7561 gdb::observers::architecture_changed.notify instead of
7562 observer_notify_architecture_changed.
7563
6f14adc5
SM
75642018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7565
7566 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7567 (do_restore_current_traceframe_cleanup): Remove.
7568 (restore_current_traceframe_cleanup_dtor): Remove.
7569 (make_cleanup_restore_current_traceframe): Remove.
7570 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7571 New.
7572 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7573 * infrun.c (fetch_inferior_event): Use
7574 scoped_restore_current_traceframe.
7575
b2bdb8cf
SM
75762018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7577
7578 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7579 Remove.
7580 <n_allocated_type_units>: Remove.
7581 <all_type_units>: Change to std::vector.
7582 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7583 to std::vector change.
7584 (dwarf2_per_objfile::get_cutu): Likewise.
7585 (dwarf2_per_objfile::get_tu): Likewise.
7586 (create_signatured_type_table_from_index): Likewise.
7587 (create_signatured_type_table_from_debug_names): Likewise.
7588 (dw2_symtab_iter_next): Likewise.
7589 (dw2_print_stats): Likewise.
7590 (dw2_expand_all_symtabs): Likewise.
7591 (dw2_expand_marked_cus): Likewise.
7592 (dw2_debug_names_iterator::next): Likewise.
7593 (dwarf2_initialize_objfile): Likewise.
7594 (add_signatured_type_cu_to_table): Likewise.
7595 (create_all_type_units): Likewise.
7596 (add_type_unit): Likewise.
7597 (struct tu_abbrev_offset): Add constructor.
7598 (build_type_psymtabs_1): Adjust to std::vector change.
7599 (print_tu_stats): Likewise.
7600 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7601 (write_debug_names): Likewise.
7602
b76e467d
SM
76032018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7604
7605 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7606 Make an std::vector.
7607 <n_comp_units>: Remove.
7608 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7609 to std::vector change.
7610 (dwarf2_per_objfile::get_cutu): Likewise.
7611 (dwarf2_per_objfile::get_cu): Likewise.
7612 (create_cus_from_index): Likewise.
7613 (create_addrmap_from_index): Likewise.
7614 (create_addrmap_from_aranges): Likewise.
7615 (dwarf2_read_index): Likewise.
7616 (dw2_find_last_source_symtab): Likewise.
7617 (dw2_map_symtabs_matching_filename): Likewise.
7618 (dw2_symtab_iter_next): Likewise.
7619 (dw2_print_stats): Likewise.
7620 (dw2_expand_all_symtabs): Likewise.
7621 (dw2_expand_symtabs_with_fullname): Likewise.
7622 (dw2_expand_marked_cus): Likewise.
7623 (dw2_map_symbol_filenames): Likewise.
7624 (create_cus_from_debug_names): Likewise.
7625 (dwarf2_read_debug_names): Likewise.
7626 (dw2_debug_names_iterator::next): Likewise.
7627 (dwarf2_initialize_objfile): Likewise.
7628 (set_partial_user): Likewise.
7629 (dwarf2_build_psymtabs_hard): Likewise.
7630 (read_comp_units_from_section): Remove arguments, adjust to
7631 std::vector change.
7632 (create_all_comp_units): Adjust to std::vector and
7633 read_comp_units_from_section changes.
7634 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7635 change.
7636 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7637 (psyms_seen_size): Likewise.
7638 (write_gdbindex): Likewise.
7639 (write_debug_names): Likewise.
7640
12359b5e
SM
76412018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7642
7643 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7644 with dwarf2_per_objfile.
7645 (create_cus_from_index): Likewise.
7646 (create_signatured_type_table_from_index): Likewise.
7647 (dwarf2_read_index): Likewise.
7648 (dwarf2_initialize_objfile): Likewise.
7649 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7650 per_cu rather than get_dwarf2_per_objfile.
7651
ff4c9fec
SM
76522018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7653
7654 * dwarf2read.h (struct signatured_type): Forward declare.
7655 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7656 New methods.
7657 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7658 (dw2_get_cutu): ...this.
7659 (dwarf2_per_objfile::get_cu): Rename from...
7660 (dw2_get_cu): ...this.
7661 (dwarf2_per_objfile::get_tu): New.
7662 (create_addrmap_from_index): Adjust.
7663 (create_addrmap_from_aranges): Adjust.
7664 (dw2_find_last_source_symtab): Adjust.
7665 (dw2_map_symtabs_matching_filename): Adjust.
7666 (dw2_symtab_iter_next): Adjust.
7667 (dw2_print_stats): Adjust.
7668 (dw2_expand_all_symtabs): Adjust.
7669 (dw2_expand_symtabs_with_fullname): Adjust.
7670 (dw2_expand_marked_cus): Adjust.
7671 (dw_expand_symtabs_matching_file_matcher): Adjust.
7672 (dw2_map_symbol_filenames): Adjust.
7673 (dw2_debug_names_iterator::next): Adjust.
7674 (dwarf2_initialize_objfile): Adjust.
7675 (set_partial_user): Adjust.
7676 (dwarf2_build_psymtabs_hard): Adjust.
7677
5ca3fcb6
SM
76782018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7679
7680 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7681 Remove unused variables.
7682 (dw2_map_symtabs_matching_filename): Likewise.
7683 (dwarf2_record_block_ranges): Likewise.
7684 (dwarf2_read_addr_index): Likewise.
7685 (follow_die_offset): Likewise.
7686
b2e586e8
SM
76872018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7688
7689 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7690 to symbol_file_add_main.
7691
7c4e78cf
SM
76922018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7693
7694 PR mi/22299
7695 * mi/mi-console.c (do_fputc_async_safe): New.
7696 (mi_console_file::write_async_safe): New.
7697 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7698 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7699 New.
7700 * ui-file.c (ui_file::putstrn): Adjust call to
7701 fputstrn_unfiltered.
7702 * utils.c (printchar): Replace do_fputs and do_fprintf
7703 parameters by do_fputc.
7704 (fputstr_filtered): Adjust call to printchar.
7705 (fputstr_unfiltered): Likewise.
7706 (fputstrn_filtered): Likewise.
7707 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7708 printchar.
7709 * utils.h (do_fputc_ftype): New typedef.
7710 (fputstrn_unfiltered): Add do_fputc parameter.
7711
5dc026d3
SM
77122018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7713
7714 * regformats/i386/i386-avx.dat: Remove.
7715
c912f608
SM
77162018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7717
7718 PR gdb/22979
7719 * amd64-tdep.c (amd64_none_init_abi): New function.
7720 (amd64_x32_none_init_abi): New function.
7721 (_initialize_amd64_tdep): Register handlers for x86-64 and
7722 x64_32 with GDB_OSABI_NONE.
7723 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7724 GDB_OSABI_NONE osabi.
7725
26540402
SM
77262018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7727
7728 PR gdb/22980
7729 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7730 GDB_OSABI_NONE.
7731 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7732 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7733
9018be22
SM
77342018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7735
7736 * common/byte-vector.h (char_vector): New type.
7737 * target.h (target_read_alloc): Return
7738 gdb::optional<byte_vector>.
7739 (target_read_stralloc): Return gdb::optional<char_vector>.
7740 (target_get_osdata): Return gdb::optional<char_vector>.
7741 * target.c (target_read_alloc_1): Templatize. Replacement
7742 manual memory management with vector.
7743 (target_read_alloc): Change return type, adjust.
7744 (target_read_stralloc): Change return type, adjust.
7745 (target_get_osdata): Change return type, adjust.
7746 * auxv.c (struct auxv_info) <length>: Remove.
7747 <data>: Change type to gdb::optional<byte_vector>.
7748 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7749 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7750 (target_auxv_search): Adjust.
7751 (fprint_target_auxv): Adjust.
7752 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7753 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7754 (linux_make_corefile_notes): Adjust.
7755 * osdata.c (get_osdata): Adjust.
7756 * remote.c (remote_get_threads_with_qxfer): Adjust.
7757 (remote_memory_map): Adjust.
7758 (remote_traceframe_info): Adjust.
7759 (btrace_read_config): Adjust.
7760 (remote_read_btrace): Adjust.
7761 (remote_pid_to_exec_file): Adjust.
7762 * solib-aix.c (solib_aix_get_library_list): Adjust.
7763 * solib-dsbt.c (decode_loadmap): Don't free buf.
7764 (dsbt_get_initial_loadmaps): Adjust.
7765 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7766 * solib-target.c (solib_target_current_sos): Adjust.
7767 * tracepoint.c (sdata_make_value): Adjust.
7768 * xml-support.c (xinclude_start_include): Adjust.
7769 (xml_fetch_content_from_file): Adjust.
7770 * xml-support.h (xml_fetch_another): Change return type.
7771 (xml_fetch_content_from_file): Change return type.
7772 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7773 * xml-tdesc.c (file_read_description_xml): Adjust.
7774 (fetch_available_features_from_target): Change return type.
7775 (target_fetch_description_xml): Adjust.
7776 (target_read_description_xml): Adjust.
7777
14c88955
TT
77782018-04-06 Tom Tromey <tom@tromey.com>
7779
7780 * value.c (~value): Update.
7781 (struct value) <contents>: Now unique_xmalloc_ptr.
7782 (value_contents_bits_eq, allocate_value_contents)
7783 (value_contents_raw, value_contents_all_raw)
7784 (value_contents_for_printing, value_contents_for_printing_const)
7785 (set_value_enclosing_type): Update.
7786
0c7e6dd8
TT
77872018-04-06 Tom Tromey <tom@tromey.com>
7788
7789 * value.c (range_s): Remove typedef, VEC.
7790 (struct range): Add operator<.
7791 (range_lessthan): Remove.
7792 (ranges_contain): Change type.
7793 (~value): Update.
7794 (struct value) <unavailable, optimized_out>: Now std::vector.
7795 (value_entirely_available)
7796 (value_entirely_covered_by_range_vector)
7797 (value_entirely_unavailable, value_entirely_optimized_out):
7798 Update.
7799 (insert_into_bit_range_vector): Change argument type.
7800 (find_first_range_overlap): Likewise.
7801 (struct ranges_and_idx, value_contents_bits_eq)
7802 (require_not_optimized_out, require_available): Update.
7803 (ranges_copy_adjusted): Change argument types.
7804 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7805
2c8331b9
TT
78062018-04-06 Tom Tromey <tom@tromey.com>
7807
7808 * value.c (~value): Update.
7809 (struct value) <parent>: Now a value_ref_ptr.
7810 (value_parent, set_value_parent, value_address, value_copy):
7811 Update.
7812
466ce3ae
TT
78132018-04-06 Tom Tromey <tom@tromey.com>
7814
7815 * value.c (struct value): Add constructor, destructor, and member
7816 initializers.
7817 (allocate_value_lazy, value_decref): Update.
7818
062d818d
TT
78192018-04-06 Tom Tromey <tom@tromey.com>
7820
7821 * value.c (struct value) <released, next>: Remove.
7822 (all_values): Now a std::vector.
7823 (allocate_value_lazy): Update.
7824 (value_next): Remove.
7825 (value_mark, value_free_to_mark, release_value)
7826 (value_release_to_mark): Update.
7827
a6535de1
TT
78282018-04-06 Tom Tromey <tom@tromey.com>
7829
7830 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7831 (free_value_chain): Remove.
7832 * value.c (free_value_chain): Remove.
7833 (value_release_to_mark): Return a std::vector.
7834 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7835 std::vector.
7836 (check_condition): Update.
7837 * eval.c (fetch_subexp_value): Change "val_chain" to a
7838 std::vector.
7839 * breakpoint.c (update_watchpoint): Update.
7840 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7841
b5621201
TT
78422018-04-06 Tom Tromey <tom@tromey.com>
7843
7844 * value.h (free_all_values): Remove.
7845 * value.c (free_all_values): Remove.
7846
4d0266a0
TT
78472018-04-06 Tom Tromey <tom@tromey.com>
7848
7849 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7850 (value_history_chain, value_history_count): Remove.
7851 (value_history): New global.
7852 (record_latest_value, access_value_history, show_values)
7853 (preserve_values): Update.
7854
b4d61099
TT
78552018-04-06 Tom Tromey <tom@tromey.com>
7856
7857 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7858 * varobj.c (varobj_set_display_format, varobj_set_value)
7859 (install_default_visualizer, construct_visualizer)
7860 (install_new_value, ~varobj, varobj_get_value_type)
7861 (my_value_of_variable, varobj_editable_p): Update.
7862 * c-varobj.c (c_describe_child, c_value_of_variable)
7863 (cplus_number_of_children, cplus_describe_child): Update.
7864 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7865 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7866 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7867
9b558729
TT
78682018-04-06 Tom Tromey <tom@tromey.com>
7869
7870 * printcmd.c (last_examine_address): Change type to
7871 value_ref_ptr.
7872 (do_examine, x_command): Update.
7873
850645cf
TT
78742018-04-06 Tom Tromey <tom@tromey.com>
7875
7876 * value.c (release_value): Update.
7877 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7878 (struct bpstats) <val>: Now a value_ref_ptr.
7879 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7880 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7881 (~watchpoint, print_it_watchpoint, watch_command_1)
7882 (invalidate_bp_value_on_memory_change): Update.
7883
22bc8444
TT
78842018-04-06 Tom Tromey <tom@tromey.com>
7885
7886 * varobj.c (varobj_clear_saved_item)
7887 (update_dynamic_varobj_children, install_new_value, ~varobj):
7888 Update.
7889 * value.h (value_incref): Move declaration earlier.
7890 (value_decref): Rename from value_free.
7891 (struct value_ref_policy): New.
7892 (value_ref_ptr): New typedef.
7893 (struct value_deleter): Remove.
7894 (gdb_value_up): Remove typedef.
7895 (release_value): Change return type.
7896 (release_value_or_incref): Remove.
7897 * value.c (set_value_parent): Update.
7898 (value_incref): Change return type.
7899 (value_decref): Rename from value_free.
7900 (value_free_to_mark, free_all_values, free_value_chain): Update.
7901 (release_value): Return value_ref_ptr.
7902 (release_value_or_incref): Remove.
7903 (record_latest_value, set_internalvar, clear_internalvar):
7904 Update.
7905 * stack.c (info_frame_command): Don't call value_free.
7906 * python/py-value.c (valpy_dealloc, valpy_new)
7907 (value_to_value_object): Update.
7908 * printcmd.c (do_examine): Update.
7909 * opencl-lang.c (lval_func_free_closure): Update.
7910 * mi/mi-main.c (register_changed_p): Don't call value_free.
7911 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
7912 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
7913 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
7914 value_free.
7915 * guile/scm-value.c (vlscm_free_value_smob)
7916 (vlscm_scm_from_value): Update.
7917 * frame.c (frame_register_unwind, frame_unwind_register_signed)
7918 (frame_unwind_register_unsigned, get_frame_register_bytes)
7919 (put_frame_register_bytes): Don't call value_free.
7920 * findvar.c (address_from_register): Don't call value_free.
7921 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
7922 * dwarf2loc.c (entry_data_value_free_closure)
7923 (value_of_dwarf_reg_entry, free_pieced_value_closure)
7924 (dwarf2_evaluate_loc_desc_full): Update.
7925 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7926 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7927 (~watchpoint, watch_command_1)
7928 (invalidate_bp_value_on_memory_change): Update.
7929 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
7930
7f8a5d38
SM
79312018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
7932
7933 PR gdb/23022
7934 * warning.m4: Add -Wno-error=deprecated-register.
7935 * configure: Re-generate.
7936
8a76bd3b
TT
79372018-04-05 Tom Tromey <tom@tromey.com>
7938
7939 * linespec.h: Remove include of "vec.h".
7940
8e8d776e
TT
79412018-04-05 Tom Tromey <tom@tromey.com>
7942
7943 * linespec.c (typep): Remove typedef.
7944 (find_methods, find_superclass_methods): Take a std::vector.
7945 (find_method): Use std::vector.
7946
9b2f8581
TT
79472018-04-05 Tom Tromey <tom@tromey.com>
7948
7949 * utils.c (compare_strings): Remove.
7950 * utils.h (compare_strings): Remove.
7951 * objc-lang.h (find_imps): Update.
7952 * objc-lang.c (find_methods): Take a std::vector.
7953 (uniquify_strings, find_imps): Likewise.
7954 * linespec.c (find_methods): Take a std::vector.
7955 (decode_objc): Use std::vector.
7956 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
7957 a std::vector.
7958 (find_method, find_function_symbols): Use std::vector.
7959
459a2e4c
TT
79602018-04-05 Tom Tromey <tom@tromey.com>
7961
7962 * completer.c (completion_tracker::completion_tracker): Remove
7963 cast.
7964 (completion_tracker::discard_completions): Likewise.
7965 * breakpoint.c (ambiguous_names_p): Remove cast.
7966 * ada-lang.c (_initialize_ada_language): Remove cast.
7967 * utils.h (streq): Update.
7968 (streq_hash): Add new declaration.
7969 * utils.c (streq): Return bool.
7970 (streq_hash): New function.
7971
9be2c17a
TT
79722018-04-05 Tom Tromey <tom@tromey.com>
7973
7974 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
7975 Remove a string copy.
7976
f73c6ece
TT
79772018-04-05 Tom Tromey <tom@tromey.com>
7978
7979 * linespec.c (filter_results): Use std::vector.
7980 (decode_line_2, decode_line_full): Update.
7981
53a0f8a2
TT
79822018-04-05 Tom Tromey <tom@tromey.com>
7983
7984 * linespec.c (canonical_to_fullform): Return std::string.
7985 (filter_results): Update.
7986 (struct decode_line_2_item): Add constructor.
7987 <fullform, displayform>: Now std::string.
7988 (decode_line_2_compare_items): Now a std::sort comparator.
7989 (decode_line_2): Update.
7990
a5b5adf5
TT
79912018-04-05 Tom Tromey <tom@tromey.com>
7992
7993 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
7994 (unexpected_linespec_error): Update.
7995 (linespec_parse_basic, parse_linespec): Update.
7996
6a307fc5
TT
79972018-04-05 Tom Tromey <tom@tromey.com>
7998
7999 * linespec.c (linespec_parse_basic): Reindent.
8000
41c1efc6
TT
80012018-04-05 Tom Tromey <tom@tromey.com>
8002
8003 * minsyms.h (iterate_over_minimal_symbols): Update.
8004 * minsyms.c (iterate_over_minimal_symbols): Take a
8005 gdb::function_view.
8006 * linespec.c (struct collect_minsyms): Remove.
8007 (compare_msyms): Now a std::sort comparator.
8008 (add_minsym): Add parameters.
8009 (search_minsyms_for_name): Update. Use std::vector.
8010
c5edbf3d
TT
80112018-04-03 Tom Tromey <tom@tromey.com>
8012
8013 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8014 gdb::byte_vector.
8015
b39efc48
WP
80162018-04-02 Weimin Pan <weimin.pan@oracle.com>
8017
8018 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8019
121ad66c 80202018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
8021
8022 PR gdb/16959
8023 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8024 printing static type.
8025
09473be8
TT
80262018-04-01 Tom Tromey <tom@tromey.com>
8027
8028 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8029 (rs6000_xfer_shared_libraries): Update.
8030
ec1f2d91
SM
80312018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8032
8033 * common/gdb_vecs.h (char_ptr): Remove.
8034 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8035
d8611974
SM
80362018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8037
8038 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8039 with std::vector.
8040 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8041
a18ba4e4
SM
80422018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8043
8044 * tracepoint.h (struct uploaded_tp): Initialize fields.
8045 <actions, step_actions, cmd_strings>: Change type to
8046 std::vector<char *>.
8047 * tracepoint.c (get_uploaded_tp): Allocate with new.
8048 (free_uploaded_tps): Free with delete.
8049 (parse_tracepoint_definition): Adjust to std::vector change.
8050 * breakpoint.c (read_uploaded_action): Likewise.
8051 (create_tracepoint_from_upload): Likewise.
8052 * ctf.c (ctf_write_uploaded_tp): Likewise.
8053 (SET_ARRAY_FIELD): Likewise.
8054 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8055
a7961323
TT
80562018-03-30 Tom Tromey <tom@tromey.com>
8057
8058 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8059 std::unique_ptr.
8060 (svr4_keep_data_in_core): Update.
8061 (svr4_read_so_list): Update.
8062
e83e4e24
TT
80632018-03-30 Tom Tromey <tom@tromey.com>
8064
8065 * windows-nat.c (handle_output_debug_string, handle_exception):
8066 Update.
8067 * target.h (target_read_string): Update.
8068 * target.c (target_read_string): Change "string" to
8069 unique_xmalloc_ptr.
8070 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8071 Update.
8072 * solib-frv.c (frv_current_sos): Update.
8073 * solib-dsbt.c (dsbt_current_sos): Update.
8074 * solib-darwin.c (darwin_current_sos): Update.
8075 * linux-thread-db.c (inferior_has_bug): Update.
8076 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8077 Update. Remove alloca.
8078 * ada-lang.c (ada_main_name): Update.
8079
263db9a1
TT
80802018-03-30 Tom Tromey <tom@tromey.com>
8081
8082 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8083 (struct dwo_file_deleter): New.
8084 (dwo_file_up): New typedef.
8085 (open_and_init_dwo_file): Use dwo_file_up.
8086 (free_dwo_file_cleanup): Remove.
8087
5dafb3d1
TT
80882018-03-30 Tom Tromey <tom@tromey.com>
8089
8090 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8091 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8092
11ed8cad
TT
80932018-03-30 Tom Tromey <tom@tromey.com>
8094
8095 * dwarf2read.c (class free_cached_comp_units): New class.
8096 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8097 (free_cached_comp_units): Remove function.
8098
9ae79dac
TT
80992018-03-30 Tom Tromey <tom@tromey.com>
8100
8101 * utils.h (make_cleanup_unpush_target): Remove.
8102 * inf-ptrace.c (struct target_unpusher): New.
8103 (target_unpush_up) New typedef.
8104 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8105 target_unpush_up.
8106 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8107
5aa89276
TT
81082018-03-27 Tom Tromey <tom@tromey.com>
8109
8110 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8111
1dbeed45
TT
81122018-03-27 Pedro Alves <palves@redhat.com>
8113 Tom Tromey <tom@tromey.com>
8114
8115 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8116 destructor. Now a class.
8117 (gdb_readline_wrapper_cleanup): Remove function.
8118 (gdb_readline_wrapper): Remove cleanups.
8119
c819b2c0
TT
81202018-03-27 Tom Tromey <tom@tromey.com>
8121
8122 * typeprint.h (struct type_print_options) <local_typedefs,
8123 global_typedefs>: Remove "struct" keyword.
8124 (class typedef_hash_table): New class.
8125 (recursively_update_typedef_hash, add_template_parameters)
8126 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8127 (find_typedef_in_hash): Don't declare.
8128 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8129 (typedef_hash_table::recursively_update): Rename from
8130 recursively_update_typedef_hash. Now a member.
8131 (typedef_hash_table::add_template_parameters): Rename from
8132 add_template_parameters. Now a member.
8133 (typedef_hash_table::typedef_hash_table): Now a constructor;
8134 rename from create_typedef_hash.
8135 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8136 rename from free_typedef_hash.
8137 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8138 (do_free_global_table): Remove.
8139 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8140 from copy_type_recursive.
8141 (create_global_typedef_table): Remove.
8142 (typedef_hash_table::find_global_typedef): Now a member of
8143 typedef_hash_table.
8144 (typedef_hash_table::find_typedef): Rename from
8145 find_typedef_in_hash; now a member.
8146 (whatis_exp): Update.
8147 * extension.h (struct ext_lang_type_printers): Add constructor and
8148 destructor.
8149 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8150 declare.
8151 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8152 Now a constructor; rename from start_ext_lang_type_printers.
8153 (ext_lang_type_printers): Now a destructor; rename from
8154 free_ext_lang_type_printers.
8155 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8156 Update.
8157 (c_type_print_base_struct_union): Update. Remove cleanups.
8158
608219fb
TT
81592018-03-27 Tom Tromey <tom@tromey.com>
8160
8161 * dwarf-index-write.c: Include <cmath>.
8162
3fcded8f
JB
81632018-03-27 Joel Brobecker <brobecker@adacore.com>
8164
8165 * NEWS: Add entry describing new "set|show varsize-limit" command.
8166 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8167 command.
8168 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8169 "set variable".
8170
cd4fb1b2
SM
81712018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8172
8173 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8174 dwarf-index-write.c
8175 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8176 * dwarf-index-common.c: New file.
8177 * dwarf-index-common.h: New file.
8178 * dwarf-index-write.c: New file.
8179 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8180 (struct dwarf2_section_info): Move from here.
8181 (dwarf2_section_info_def): Likewise.
8182 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8183 (offset_type): Likewise.
8184 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8185 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8186 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8187 (byte_swap): Likewise.
8188 (MAYBE_SWAP): Likewise.
8189 (dwarf2_per_cu_ptr): Likewise.
8190 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8191 (struct tu_stats): Likewise.
8192 (struct dwarf2_per_objfile): Likewise.
8193 (struct dwarf2_per_cu_data): Likewise.
8194 (struct signatured_type): Likewise.
8195 (sig_type_ptr): Likewise.
8196 (DEF_VEC_P (sig_type_ptr)): Likewise.
8197 (INDEX4_SUFFIX): Likewise.
8198 (INDEX5_SUFFIX): Likewise.
8199 (DEBUG_STR_SUFFIX): Likewise.
8200 (dwarf2_read_section): Make non-static.
8201 (mapped_index_string_hash): Move from here.
8202 (dwarf5_djb_hash): Likewise.
8203 (file_write): Likewise.
8204 (class data_buf): Likewise.
8205 (struct symtab_index_entry): Likewise.
8206 (struct mapped_symtab): Likewise.
8207 (find_slot): Likewise.
8208 (hash_expand): Likewise.
8209 (add_index_entry): Likewise.
8210 (uniquify_cu_indices): Likewise.
8211 (class c_str_view): Likewise.
8212 (class c_str_view_hasher): Likewise.
8213 (class vector_hasher): Likewise.
8214 (write_hash_table): Likewise.
8215 (psym_index_map): Likewise.
8216 (struct addrmap_index_data): Likewise.
8217 (add_address_entry): Likewise.
8218 (add_address_entry_worker): Likewise.
8219 (write_address_map): Likewise.
8220 (symbol_kind): Likewise.
8221 (write_psymbols): Likewise.
8222 (struct signatured_type_index_data): Likewise.
8223 (write_one_signatured_type): Likewise.
8224 (recursively_count_psymbols): Likewise.
8225 (recursively_write_psymbols): Likewise.
8226 (class debug_names): Likewise.
8227 (check_dwarf64_offsets): Likewise.
8228 (psyms_seen_size): Likewise.
8229 (write_gdbindex): Likewise.
8230 (write_debug_names): Likewise.
8231 (assert_file_size): Likewise.
8232 (write_psymtabs_to_index): Likewise.
8233 (save_gdb_index_command): Likewise.
8234 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8235 command.
8236 * dwarf2read.h: New file.
8237
59cc4834
JB
82382018-03-27 Joel Brobecker <brobecker@adacore.com>
8239
8240 PR gdb/22670
8241 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8242 symbol name if the CU's language stores symbol names in linkage
8243 format.
8244 * language.h (struct language_defn)
8245 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8246 all instances of this struct.
8247
67501539
TT
82482018-03-26 Tom Tromey <tom@tromey.com>
8249
8250 * stack.c (backtrace_command_1): Remove verbose code.
8251
76c939ac
TT
82522018-03-26 Tom Tromey <tom@tromey.com>
8253
8254 * python/py-framefilter.c (py_print_type): Don't catch
8255 exceptions. Return void.
8256 (py_print_value): Likewise.
8257 (py_print_single_arg): Likewise.
8258 (enumerate_args): Don't catch exceptions.
8259 (py_print_args): Likewise.
8260 (py_print_frame): Likewise.
8261 (gdbpy_apply_frame_filter): Catch exceptions here.
8262
9507b29c
TT
82632018-03-26 Tom Tromey <tom@tromey.com>
8264
8265 * stack.c (_initialize_stack): Remove trailing newlines from help
8266 text. Add "Usage" line to "backtrace" help.
8267
eb68e487
TT
82682018-03-26 Tom Tromey <tom@tromey.com>
8269
8270 PR python/16486:
8271 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8272
1f111921
TT
82732018-03-26 Tom Tromey <tom@tromey.com>
8274
8275 * python/py-framefilter.c (py_print_single_arg): Return
8276 EXT_LANG_BT_ERROR from catch.
8277
fb7eb8b5
TT
82782018-03-26 Tom Tromey <tom@tromey.com>
8279
8280 PR backtrace/15584:
8281 * stack.c (backtrace_command_1): Move some code into no-filters
8282 "if".
8283
4ca59a9f
TT
82842018-03-26 Tom Tromey <tom@tromey.com>
8285
8286 * python/py-framefilter.c (throw_quit_or_print_exception): New
8287 function.
8288 (gdbpy_apply_frame_filter): Use it.
8289
92256134
TT
82902018-03-26 Tom Tromey <tom@tromey.com>
8291
8292 PR cli/17716:
8293 * python/py-framefilter.c (py_print_type, py_print_value)
8294 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8295 RETURN_MASK_ERROR.
8296
7a630bc2
TT
82972018-03-26 Tom Tromey <tom@tromey.com>
8298
8299 * python/py-framefilter.c (enumerate_args): Use
8300 gdb::unique_xmalloc_ptr.
8301
63283d4a
TT
83022018-03-26 Tom Tromey <tom@tromey.com>
8303
8304 * python/py-framefilter.c (py_print_frame): Return
8305 EXT_LANG_BT_OK.
8306 (gdbpy_apply_frame_filter): Update comment.
8307 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8308 Remove.
8309 <EXT_LANG_BT_NO_FILTERS>: Change value.
8310
978d6c75
TT
83112018-03-26 Tom Tromey <tom@tromey.com>
8312
8313 PR backtrace/15582:
8314 * stack.c (backtrace_command): Parse "hide" argument.
8315 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8316 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8317 constant.
8318
1cf7e640
TT
83192018-03-26 Tom Tromey <tom@tromey.com>
8320
8321 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8322 add "flags".
8323 (backtrace_command): Remove "fulltrace", add "flags".
8324
ea3b0687
TT
83252018-03-26 Tom Tromey <tom@tromey.com>
8326
8327 * stack.c (backtrace_command): Rewrite command line parsing.
8328
9f034d75
SM
83292018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8330
8331 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8332
ce1459e5
SM
83332018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8334
8335 * filename-seen-cache.h: Add include guard.
8336
4f7ae6f5
KS
83372018-03-26 Keith Seitz <keiths@redhat.com>
8338
8339 * symfile.c (place_section): Remove "struct" from section_addr_info
8340 in comment.
8341 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8342 "struct" keyword from section_addr_info.
8343
5cd3e386
AH
83442018-03-26 Alan Hayward <alan.hayward@arm.com>
8345
8346 * regformats/regdef.h (reg): Add constructors.
8347
3e5ef9a4
PA
83482018-03-25 Pedro Alves <palves@redhat.com>
8349
8350 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8351 if then/else bodies in var_func_name extraction.
8352
c88d2fcc 83532018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8354
8355 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8356 lookup_minimal_symbol() to find symbol entry.
8357 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8358
b7fee5a3
KS
83592018-03-23 Keith Seitz <keiths@redhat.com>
8360
8361 PR c++/22968
8362 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8363 nested type definitions for C++, too.
8364
2cc9b304
TT
83652018-03-23 Tom Tromey <tom@tromey.com>
8366
8367 * machoread.c (struct oso_el): Add a constructor. Don't define as
8368 a typedef.
8369 (macho_register_oso): Remove.
8370 (macho_symtab_read): Take a std::vector.
8371 (oso_el_compare_name): Now a std::sort comparator.
8372 (macho_symfile_read_all_oso): Take a std::vector.
8373 (macho_symfile_read): Use std::vector. Remove cleanups.
8374
a2b2bc12
TT
83752018-03-22 Tom Tromey <tom@tromey.com>
8376
8377 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8378 (record_full_goto_bookmark): Use std::string.
8379
7a8f494c
PFC
83802018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8381
8382 PR tdep/18295
8383 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8384 a single mask.
8385
dd6d677f
PFC
83862018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8387
8388 * rs6000-tdep.c (store_insn_p): New function.
8389 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8390 and cr_reg to their unshifted values. Use store_insn_p to
8391 match LR saves using either R1 or fdata->alloca_reg. Use
8392 store_insn_p to match CR saves. Set alloca_reg_offset
8393 when alloca_reg and framep are set. Remove lr_reg shift
8394 when assigning to fdata->lr_register.
8395
26d6cec4
AA
83962018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8397
8398 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8399 command line args instead of emitting a warning.
8400
5d9310c4
SM
84012018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8402
8403 * tracepoint.h (struct static_tracepoint_marker): Initialize
8404 fields, define default constructor, move constructor and move
8405 assignment, disable the rest.
8406 <str_id, extra>: Make std::string.
8407 (release_static_tracepoint_marker): Remove.
8408 (free_current_marker): Remove.
8409 * tracepoint.c (free_current_marker): Remove.
8410 (parse_static_tracepoint_marker_definition): Adjust to
8411 std::string, use new hex2str overload.
8412 (release_static_tracepoint_marker): Remove.
8413 (print_one_static_tracepoint_marker): Get marker by reference
8414 and adjust to std::string.
8415 (info_static_tracepoint_markers_command): Adjust to std::vector
8416 changes
8417 * target.h (static_tracepoint_marker_p): Remove typedef.
8418 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8419 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8420 bool.
8421 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8422 * target-debug.h
8423 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8424 (target_debug_print_std_vector_static_tracepoint_marker): New.
8425 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8426 to...
8427 (target_debug_print_static_tracepoint_marker_p): ... this.
8428 * target-delegates.c: Re-generate.
8429 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8430 Make std::string.
8431 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8432 (decode_static_tracepoint_spec): Adjust to std::vector.
8433 (tracepoint_print_one_detail): Adjust to std::string.
8434 (strace_marker_decode_location): Adjust to std::string.
8435 (update_static_tracepoint): Adjust to std::string, remove call
8436 to release_static_tracepoint_marker.
8437 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8438 Adjust to std::vector.
8439 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8440 (remote_static_tracepoint_markers_by_strid): Adjust to
8441 std::vector.
8442 * common/rsp-low.h (hex2str): New overload with explicit count
8443 of bytes.
8444 * common/rsp-low.c (hex2str): New overload with explicit count
8445 of bytes.
8446 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8447 (_initialize_rsp_low_selftests): Add test_hex2str test.
8448 * unittests/tracepoint-selftests.c
8449 (test_parse_static_tracepoint_marker_definition): Adjust to
8450 std::string.
8451
62c222b6
SM
84522018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8453
8454 * tracepoint.c (parse_static_tracepoint_marker_definition):
8455 Consider case where the definition is followed by more
8456 definitions.
8457 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8458 tracepoint-selftests.c.
8459 * unittests/tracepoint-selftests.c: New.
8460
7eb2418f
PFC
84612018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8462
8463 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8464 Carvalho.
8465
7cbe16e9
SR
84662018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8467
3d6b3b82 8468 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8469
4ee89e90
SR
84702018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8471
3d6b3b82 8472 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8473
92630041
TT
84742018-03-19 Tom Tromey <tom@tromey.com>
8475
8476 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8477 "IDENT" production.
8478
76727919
TT
84792018-03-19 Pedro Alves <palves@redhat.com>
8480 Tom Tromey <tom@tromey.com>
8481
8482 * unittests/observable-selftests.c: New file.
8483 * common/observable.h: New file.
8484 * observable.h: New file.
8485 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8486 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8487 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8488 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8489 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8490 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8491 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8492 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8493 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8494 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8495 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8496 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8497 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8498 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8499 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8500 tui/tui-interp.c, valops.c: Update all users.
8501 * tui/tui-hooks.c (tui_bp_created_observer)
8502 (tui_bp_deleted_observer, tui_bp_modified_observer)
8503 (tui_inferior_exit_observer, tui_before_prompt_observer)
8504 (tui_normal_stop_observer, tui_register_changed_observer):
8505 Remove.
8506 (tui_observers_token): New global.
8507 (attach_or_detach, tui_attach_detach_observers): New functions.
8508 (tui_install_hooks, tui_remove_hooks): Use
8509 tui_attach_detach_observers.
8510 * record-btrace.c (record_btrace_thread_observer): Remove.
8511 (record_btrace_thread_observer_token): New global.
8512 * observer.sh: Remove.
8513 * observer.c: Rename to observable.c.
8514 * observable.c (namespace gdb_observers): Define new objects.
8515 (observer_debug): Move into gdb_observers namespace.
8516 (struct observer, struct observer_list, xalloc_observer_list_node)
8517 (xfree_observer_list_node, generic_observer_attach)
8518 (generic_observer_detach, generic_observer_notify): Remove.
8519 (_initialize_observer): Update.
8520 Don't include observer.inc.
8521 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8522 (clean mostlyclean): Likewise.
8523 (observer.h, observer.inc): Remove targets.
8524 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8525 (COMMON_SFILES): Use observable.c, not observer.c.
8526 * .gitignore: Remove observer.h.
8527
1cb1f3da
TT
85282018-03-18 Tom Tromey <tom@tromey.com>
8529
8530 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8531 gdb::def_vector.
8532 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8533
a06ab151
TT
85342018-03-17 Tom Tromey <tom@tromey.com>
8535
8536 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8537
770623f7
TT
85382018-03-17 Tom Tromey <tom@tromey.com>
8539
8540 * target.c (class scoped_target_fd): New.
8541 (target_fileio_close_cleanup): Remove.
8542 (target_fileio_read_alloc_1): Use scoped_target_fd.
8543
39be3c7e
SM
85442018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8545
8546 * silent-rules.mk: New.
8547 * Makefile.in: Include silent-rules.mk
8548 (srcdir, VPATH, top_srcdir): Move up.
8549 (COMPILE): Add ECHO_CXX.
8550 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8551 (init.c): Add ECHO_INIT_C.
8552 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8553 (version.c): Add ECHO_GEN.
8554 (printcmd.o): Add ECHO_CXX.
8555 (target-float.o): Add ECHO_CXX.
8556 (ada-exp.o): Add ECHO_CXX.
8557 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8558 (insight$(EXEEXT)): Add ECHO_CXXLD.
8559 * gnulib/configure.ac: Add AM_SILENT_RULES.
8560 * gnulib/aclocal.m4: Re-generate.
8561 * gnulib/configure: Re-generate.
8562 * gnulib/import/Makefile.in: Re-generate.
8563
37e136b1
TT
85642018-03-16 Tom Tromey <tom@tromey.com>
8565
8566 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8567 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8568 * utils.c (do_free_section_addr_info)
8569 (make_cleanup_free_section_addr_info): Remove.
8570 * symfile.h (struct other_sections): Add constructor.
8571 (struct section_addr_info): Remove.
8572 (section_addr_info): New typedef.
8573 (struct sym_fns) <sym_offsets>: Change type of parameter.
8574 (build_section_addr_info_from_objfile)
8575 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8576 (default_symfile_offsets, symbol_file_add)
8577 (symbol_file_add_from_bfd)
8578 (build_section_addr_info_from_section_table): Update.
8579 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8580 * symfile.c (alloc_section_addr_info): Remove.
8581 (build_section_addr_info_from_section_table): Change return type.
8582 Update.
8583 (build_section_addr_info_from_bfd)
8584 (build_section_addr_info_from_objfile): Likewise.
8585 (free_section_addr_info): Remove.
8586 (relative_addr_info_to_section_offsets): Change type of "addrs".
8587 (addrs_section_compar): Now a std::sort comparator.
8588 (addrs_section_sort): Change return type.
8589 (addr_info_make_relative): Change type of "addrs". Update.
8590 (default_symfile_offsets, syms_from_objfile_1)
8591 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8592 (symbol_file_add_separate): Update.
8593 (symbol_file_add): Change type of "addrs". Update.
8594 (add_symbol_file_command): Update. Remove cleanups.
8595 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8596 cleanups.
8597 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8598 * solib.c (solib_read_symbols): Update.
8599 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8600 * machoread.c (macho_symfile_offsets): Update.
8601 * jit.c (jit_bfd_try_read_symtab): Update.
8602
03afa6ef
SM
86032018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8604
8605 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8606 unittests/utils-selftests.c.
8607 * unittests/utils-selftests.c: New file.
8608
3ae9ce5d
TT
86092018-03-14 Tom Tromey <tom@tromey.com>
8610
8611 PR cli/14977:
8612 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8613 for NULL.
8614
b8c2339b
TT
86152018-03-14 Tom Tromey <tom@tromey.com>
8616
8617 PR cli/19918:
8618 * printcmd.c (printf_pointer): Allow "-" in format.
8619
80ae639d
TT
86202018-03-14 Tom Tromey <tom@tromey.com>
8621
8622 * printcmd.c (_initialize_printcmd): Add usage to printf.
8623
0d671d99
YQ
86242018-03-14 Yao Qi <qiyao@sourceware.org>
8625
8626 * MAINTAINERS: Update my email address.
8627
b577b6af
TT
86282018-03-13 Tom Tromey <tom@tromey.com>
8629
8630 * machoread.c (macho_check_dsym): Change filenamep to a
8631 std::string*.
8632 (macho_symfile_read): Update.
8633 * symfile.c (load_command): Use std::string.
8634
89a3b63e
AB
86352018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8636
8637 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8638 to error message string.
8639 (riscv_register_name): Use xsnprintf instead of sprintf.
8640 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8641 internal_error.
8642 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8643 error.
8644 (riscv_push_dummy_call): Likewise.
8645
984c7238
TT
86462018-03-12 Tom Tromey <tom@tromey.com>
8647
8648 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8649 Use gdb::byte_vector.
8650 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8651
933522d1
YQ
86522018-03-12 Yao Qi <yao.qi@linaro.org>
8653
8654 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8655 parameter type to readable_regcache.
8656 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8657 the declaration.
8658
be2daae6
TT
86592018-03-11 Tom Tromey <tom@tromey.com>
8660
8661 * dwarf2read.c (struct nextfield): Add initializers.
8662 (struct nextfnfield): Remove.
8663 (struct fnfieldlist): Add initializers. Remove "length" and
8664 "head", use std::vector.
8665 (struct decl_field_list): Remove.
8666 (struct field_info): Add initializers.
8667 <fields, baseclasses>: Now std::vector.
8668 <nbaseclasses, nfnfields, typedef_field_list_count,
8669 nested_types_list_count>: Remove.
8670 (dwarf2_add_field, dwarf2_add_type_defn)
8671 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8672 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8673 (process_structure_scope): Update.
8674
484cf504
TT
86752018-03-11 Tom Tromey <tom@tromey.com>
8676
8677 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8678 for use by std::sort.
8679 (build_type_psymtabs_1): Use std::vector.
8680
9bd8e0b0
EZ
86812018-03-09 Eli Zaretskii <eliz@gnu.org>
8682
8683 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8684 and LIBMPFR in the printed configuration.
8685
5dc1a704
TT
86862018-03-08 Tom Tromey <tom@tromey.com>
8687
8688 * source.c (get_filename_and_charpos): Use scoped_fd.
8689 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8690 (procfs_pidlist): Likewise.
8691 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8692 (iterate_over_mappings): Likewise.
8693
fdf07f3a
TT
86942018-03-08 Tom Tromey <tom@tromey.com>
8695
8696 * infcall.c (struct call_return_meta_info)
8697 <stack_temporaries_enabled>: Remove.
8698 (get_call_return_value, call_function_by_hand_dummy): Update.
8699 * thread.c (disable_thread_stack_temporaries): Remove.
8700 (enable_thread_stack_temporaries): Remove.
8701 (thread_stack_temporaries_enabled_p): Return bool.
8702 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8703 (get_last_thread_stack_temporary): Update.
8704 * eval.c (evaluate_subexp): Update.
8705 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8706 class, not a function.
8707 (value_ptr, value_vec): Remove typedefs.
8708 (class thread_info) <stack_temporaries_enabled>: Now bool.
8709 <stack_temporaries>: Now a std::vector.
8710 (thread_stack_temporaries_enabled_p)
8711 (value_in_thread_stack_temporaries): Return bool.
8712
567a3e54
SM
87132018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8714
8715 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8716 (getpkt_or_notif_sane_1): Likewise.
8717
00b40057
SM
87182018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8719
8720 * build-id.c (build_id_to_debug_bfd): Use std::string.
8721
a8dbfd58
SM
87222018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8723
8724 * build-id.c (find_separate_debug_file_by_buildid): Return
8725 std::string.
8726 * build-id.h (find_separate_debug_file_by_buildid): Return
8727 std::string.
8728 * coffread.c (coff_symfile_read): Adjust to std::string.
8729 * elfread.c (elf_symfile_read): Adjust to std::string.
8730 * symfile.c (separate_debug_file_exists): Change parameter to
8731 std::string.
8732 (find_separate_debug_file): Return std::string.
8733 (find_separate_debug_file_by_debuglink): Return std::string.
8734 * symfile.h (find_separate_debug_file_by_debuglink): Return
8735 std::string.
8736
e6a58aa8
SM
87372018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8738
8739 * common/xml-utils.c (xml_escape_text): Move code to...
8740 (xml_escape_text_append): ... this new function.
8741 * common/xml-utils.h (xml_escape_text_append): New declaration.
8742 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8743 New function.
8744 (_initialize_xml_utils): register test_xml_escape_text_append as
8745 a selftest.
8746
4ef0bef6
AH
87472018-03-07 Alan Hayward <alan.hayward@arm.com>
8748
8749 * defs.h: Remove MAX_REGISTER_SIZE.
8750 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8751 asserts.
8752 * python/py-unwind.c (pyuw_sniffer): Likewise.
8753
e0d3522b
TT
87542018-03-07 Tom Tromey <tom@tromey.com>
8755
8756 * linux-tdep.c (linux_info_proc): Update.
8757 * target.h (struct target_ops) <to_fileio_readlink>: Return
8758 optional<string>.
8759 (target_fileio_readlink): Return optional<string>.
8760 * remote.c (remote_hostio_readlink): Return optional<string>.
8761 * inf-child.c (inf_child_fileio_readlink): Return
8762 optional<string>.
8763 * target.c (target_fileio_readlink): Return optional<string>.
8764
ea005f31
AB
87652018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8766
8767 * regcache.c (cooked_read_test): Add riscv to the list of
8768 architectures that have a save_reggroup.
8769
e95a97d4
AA
87702018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8771
8772 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8773 value is not a dynamic class object.
8774
d8344f3d
TT
87752018-03-06 Tom Tromey <tom@tromey.com>
8776
8777 * rust-exp.y: Formatting fixes.
8778
9add17f2
AB
87792018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8780
8781 * riscv-tdep.c (riscv_register_name): Remove target description
8782 support.
8783 (riscv_gdbarch_init): Remove target description check.
8784
c9486dfe
AB
87852018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8786
8787 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8788 comment.
8789 * riscv-tdep.h: Likewise.
8790
d74aff3d
AB
87912018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8792
8793 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8794 (riscv_pseudo_register_write): Delete.
8795 (riscv_gdbarch_init): Remove all use of pseudo registers.
8796
7ea78b59
SM
87972018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8798
8799 * record-btrace.c (btrace_print_lines): Replace cleanup
8800 parameter with RAII equivalents.
8801 (btrace_insn_history): Replace cleanup with RAII equivalents.
8802 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8803 make_cleanup_ui_out_tuple_begin_end): Remove.
8804 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8805 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8806 make_cleanup_ui_out_list_begin_end): Remove.
8807
53127008
SM
88082018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8809
8810 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8811 parameter types to std::vector. Use bool.
8812 (record_btrace_wait): Replace VEC(tp_t) with
8813 std::vector<thread_info *>.
8814 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8815
228f1508
SM
88162018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8817
8818 * record-btrace.c (record_btrace_disable_callback): Remove.
8819 (struct scoped_btrace_disable): New.
8820 (record_btrace_open): Use scoped_btrace_disable.
8821
b2970c23
AB
88222018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8823
8824 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8825 reading values from registers.
8826
fb294655
AB
88272018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8828
8829 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8830 where appropriate.
8831
cab5bb9d
AB
88322018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8833
8834 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8835 change parameter type. Use GDB's print functions, and use
8836 core_addr_to_string where appropriate.
8837 (riscv_push_dummy_call): Use core_addr_to_string where
8838 appropriate, update call to riscv_print_arg_location, and reindent
8839 a few lines.
8840 (riscv_return_value): Update call to riscv_print_arg_location.
8841
dbbb1059
AB
88422018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8843 Tim Newsome <tim@sifive.com>
8844 Albert Ou <a0u@eecs.berkeley.edu>
8845 Darius Rad <darius@bluespec.com>
8846
8847 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8848 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8849 (ALLDEPFILES): Add riscv-tdep.c
8850 * configure.tgt: Add riscv support.
8851 * riscv-tdep.c: New file.
8852 * riscv-tdep.h: New file.
8853 * NEWS: Mention new target.
8854 * MAINTAINERS: Add entry for riscv.
8855
5dc43913
AB
88562018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8857
8858 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8859 fields within aggregates.
8860
3dea1ef7
SM
88612018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8862
8863 * record-btrace.c (btrace_print_lines): Change type of flags to
8864 gdb_disassembly_flags.
8865
7efba073
JB
88662018-03-04 John Baldwin <jhb@FreeBSD.org>
8867
8868 * fbsd-nat.c: Include "inf-ptrace.h".
8869 (USE_SIGTRAP_SIGINFO): Conditionally define.
8870 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8871 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8872 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8873 function.
8874 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8875 Likewise.
8876 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8877 Likewise.
8878 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8879 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8880 "supports_stopped_by_hw_breakpoint" target methods.
8881
386a8676
JB
88822018-03-04 John Baldwin <jhb@FreeBSD.org>
8883
8884 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
8885 * fbsd-nat.c (debug_fbsd_nat): New variable.
8886 (show_fbsd_nat_debug): New function.
8887 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
8888 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
8889
12279366
JB
88902018-03-04 John Baldwin <jhb@FreeBSD.org>
8891
8892 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
8893 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
8894 prototype.
8895 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
8896 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
8897 method.
8898
54693cf5
SM
88992018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8900
8901 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
8902 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
8903
ccb2231c
SM
89042018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8905
8906 * charset.c (struct charset_vector): New.
8907 (charsets): Change type to charset_vector.
8908 (find_charset_names): Adjust.
8909 (add_one): Adjust.
8910 (_initialize_charset): Adjust.
8911
6fb16ce6
SM
89122018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8913
8914 * progspace.h (struct program_space) <deleted_solibs>: Change
8915 type to std::vector<std::string>.
8916 * progspace.c (clear_program_space_solib_cache): Adjust.
8917 * breakpoint.c (print_solib_event): Adjust.
8918 (check_status_catch_solib): Adjust.
8919 * solib.c (update_solib_list): Adjust.
8920 * ui-out.h (class ui_out) <field_string>: New overload.
8921 * ui-out.c (ui_out::field_string): New overload.
8922
564b1e3f
SM
89232018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8924
8925 * progspace.h (struct program_space): Add constructor and
8926 destructor, initialize fields.
8927 (add_program_space): Remove.
8928 * progspace.c (add_program_space): Rename to...
8929 (program_space::program_space): ... this.
8930 (release_program_space): Rename to...
8931 (program_space::~program_space): ... this.
8932 (delete_program_space): Use delete to delete program_space.
8933 (initialize_progspace): Use new to allocate program_space.
8934 * inferior.c (add_inferior_with_spaces): Likewise.
8935 (clone_inferior_command): Likewise.
8936 * infrun.c (follow_fork_inferior): Likewise.
8937 (handle_vfork_child_exec_or_exit): Likewise.
8938
e80aaf61
SM
89392018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8940
8941 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
8942 (delim_string_to_char_ptr_vec): Return std::vector of
8943 gdb::unique_xmalloc_ptr.
8944 (dirnames_to_char_ptr_vec_append): Take std::vector of
8945 gdb::unique_xmalloc_ptr.
8946 (dirnames_to_char_ptr_vec): Return std::vector of
8947 gdb::unique_xmalloc_ptr.
8948 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
8949 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
8950 (delim_string_to_char_ptr_vec): Return an std::vector of
8951 gdb::unique_xmalloc_ptr, adjust the code.
8952 (dirnames_to_char_ptr_vec_append): Take an std::vector of
8953 gdb::unique_xmalloc_ptr, adjust the code.
8954 (dirnames_to_char_ptr_vec): Return an std::vector of
8955 gdb::unique_xmalloc_ptr, adjust the code.
8956 * auto-load.c (auto_load_safe_path_vec): Change type to
8957 std::vector of gdb::unique_xmalloc_ptr.
8958 (auto_load_expand_dir_vars): Return an std::vector of
8959 gdb::unique_xmalloc_ptr, adjust the code.
8960 (auto_load_safe_path_vec_update): Adjust.
8961 (filename_is_in_auto_load_safe_path_vec): Adjust.
8962 (auto_load_objfile_script_1): Adjust.
8963 * build-id.c (build_id_to_debug_bfd): Adjust.
8964 * linux-thread-db.c (thread_db_load_search): Adjust.
8965 * source.c (add_path): Adjust.
8966 (openp): Adjust.
8967 * symfile.c (find_separate_debug_file): Adjust.
8968 * utils.c (do_free_char_ptr_vec): Remove.
8969 (make_cleanup_free_char_ptr_vec): Remove.
8970
ab818ade
SDJ
89712018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
8972
8973 PR gdb/22907
8974 * common/pathstuff.c: Conditionally include "<windows.h>".
8975
e1e6f073
GS
89762018-03-01 Georg Sauthoff <mail@georg.so>
8977
8978 PR gdb/22888
8979 * gcore.in: Quote variables and switch interpreter to bash.
8980
c7b15a66
TT
89812018-03-01 Tom Tromey <tom@tromey.com>
8982
8983 * dwarf2read.c (alloc_discriminant_info): Fix default_index
8984 assertion. Add assertion for discriminant_index.
8985 (quirk_rust_enum): Use correct base type name in univariant case.
8986
0cb7c7b0
SM
89872018-03-01 Simon Marchi <simon.marchi@ericsson.com>
8988
8989 * record.c (get_call_history_modifiers): Return a
8990 record_print_flags.
8991 (cmd_record_call_history): Adjust.
8992 * record-btrace.c (record_btrace_call_history): Adjust.
8993 (record_btrace_call_history_range): Adjust.
8994 (record_btrace_call_history_from): Adjust.
8995 * target-debug.h (target_debug_print_record_print_flags): New.
8996 * target-delegates.c: Re-generate.
8997 * target.c (target_call_history): Change flags type.
8998 (target_call_history_from): Likewise.
8999 (target_call_history_range): Likewise.
9000 * target.h (struct target_ops) <target_call_history>: Likewise.
9001 (target_call_history_from): Likewise.
9002 (target_call_history_range): Likewise.
9003
25e3c82c
SDJ
90042018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9005 Simon Marchi <simon.marchi@polymtl.ca>
9006
9007 * common/common-utils.c: Include "sys/stat.h".
9008 (is_regular_file): Move here from "source.c"; change return
9009 type to "bool".
9010 * common/common-utils.h (is_regular_file): New prototype.
9011 * common/pathstuff.c (contains_dir_separator): New function.
9012 * common/pathstuff.h (contains_dir_separator): New prototype.
9013 * source.c: Don't include "sys/stat.h".
9014 (is_regular_file): Move to "common/common-utils.c".
9015
b4987c95
SDJ
90162018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9017
9018 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9019 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9020 * auto-load.c: Include "common/pathstuff.h".
9021 * common/common-def.h (current_directory): Move here.
9022 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9023 function.
9024 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9025 prototype.
9026 * common/pathstuff.c: New file.
9027 * common/pathstuff.h: New file.
9028 * compile/compile.c: Include "common/pathstuff.h".
9029 * defs.h (current_directory): Move to "common/common-defs.h".
9030 * dwarf2read.c: Include "common/pathstuff.h".
9031 * exec.c: Likewise.
9032 * guile/scm-safe-call.c: Likewise.
9033 * linux-thread-db.c: Likewise.
9034 * main.c: Likewise.
9035 * nto-tdep.c: Likewise.
9036 * objfiles.c: Likewise.
9037 * source.c: Likewise.
9038 * symtab.c: Likewise.
9039 * utils.c: Include "common/pathstuff.h".
9040 (gdb_realpath): Move to "common/pathstuff.c".
9041 (gdb_realpath_keepfile): Likewise.
9042 (gdb_abspath): Likewise.
9043 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9044 (gdb_realpath_keepfile): Likewise.
9045 (gdb_abspath): Likewise.
9046
f169cfdc
JB
90472018-02-28 John Baldwin <jhb@FreeBSD.org>
9048
9049 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9050 wildcard process pid for super_resume for kernels with a
9051 specific bug.
9052
e05cac70
PM
90532018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9054
9055 * compile/compile.c (get_args): Add additional comments
9056 explaining function.
9057
55089490
TT
90582018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9059 Tom Tromey <tom@tromey.com>
9060
9061 * target.h (memory_write_request_s): Remove typedef. Don't define
9062 VEC.
9063 (target_write_memory_blocks): Change argument to std::vector.
9064 (struct memory_write_request): Add constructor.
9065 * target-memory.c (compare_block_starting_address): Return bool.
9066 Change argument types.
9067 (claim_memory): Change arguments to use std::vector.
9068 (split_regular_and_flash_blocks, blocks_to_erase)
9069 (compute_garbled_blocks): Likewise.
9070 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9071 (target_write_memory_blocks): Change argument to std::vector.
9072 * symfile.c (struct load_section_data): Add constructor and
9073 destructor. Use std::vector for "requests".
9074 (struct load_progress_data): Add initializers.
9075 (load_section_callback): Update. Use "new".
9076 (clear_memory_write_data): Remove.
9077 (generic_load): Update.
9078
0c305b61
AH
90792018-02-27 Alan Hayward <alan.hayward@arm.com>
9080
9081 * arch/aarch64.h: Use common/tdesc.h.
9082
c5196c92
MR
90832018-02-26 Maciej W. Rozycki <macro@mips.com>
9084
9085 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9086 architecture with a 64-bit ABI.
9087
37c33887
MR
90882018-02-26 Maciej W. Rozycki <macro@mips.com>
9089
9090 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9091 ahead of target description loading.
9092
d4dd3282
TT
90932018-02-26 Tom Tromey <tom@tromey.com>
9094
9095 * stack.c (backtrace_command_1): Update.
9096 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9097 of "flags".
9098 * python/py-framefilter.c (py_print_frame)
9099 (gdbpy_apply_frame_filter): Change type of "flags".
9100 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9101 of "flags".
9102 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9103 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9104 * extension.h (enum frame_filter_flag): Rename from
9105 frame_filter_flags.
9106 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9107 (apply_ext_lang_frame_filter): Change type of "flags".
9108 * extension.c (apply_ext_lang_frame_filter): Change type of
9109 "flags".
9110 * extension-priv.h (struct extension_language_ops)
9111 <apply_frame_filter>: Change type of "flags".
9112
6893c19a
TT
91132018-02-26 Tom Tromey <tom@tromey.com>
9114
9115 PR python/16497:
9116 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9117 off-by-one in py_end computation.
9118 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9119 PRINT_MORE_FRAMES.
9120 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9121 constant.
9122
2ddeaf8a
TT
91232018-02-26 Tom Tromey <tom@tromey.com>
9124
9125 * dwarf2read.c (struct variant_field): New.
9126 (struct nextfield) <variant>: New field.
9127 (dwarf2_add_field): Handle DW_TAG_variant_part.
9128 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9129 discriminated union.
9130 (read_structure_type): Handle DW_TAG_variant_part.
9131 (handle_struct_member_die): New function, extracted from
9132 process_structure_scope. Handle DW_TAG_variant.
9133 (process_structure_scope): Handle discriminated unions. Call
9134 handle_struct_member_die.
9135
c9317f21
TT
91362018-02-26 Tom Tromey <tom@tromey.com>
9137
9138 * rust-lang.h (rust_last_path_segment): Declare.
9139 * rust-lang.c (rust_last_path_segment): Now public. Change
9140 contract.
9141 (struct disr_info): Remove.
9142 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9143 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9144 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9145 (rust_enum_p, rust_enum_variant): New function.
9146 (rust_underscore_fields): Remove "offset" parameter.
9147 (rust_print_enum): New function.
9148 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9149 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9150 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9151 enums.
9152 (rust_internal_print_type): New function, from rust_print_type.
9153 Remove enum code.
9154 (rust_print_type): Call rust_internal_print_type.
9155 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9156 Update enum handling.
9157 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9158 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9159 (rust_union_quirks): New functions.
9160 (process_full_comp_unit, process_full_type_unit): Call
9161 rust_union_quirks.
9162 (process_structure_scope): Update rust_unions if necessary.
9163
7c22600a
TT
91642018-02-26 Tom Tromey <tom@tromey.com>
9165
9166 * value.h (value_union_variant): Declare.
9167 * valops.c (value_union_variant): New function.
9168 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9169 (struct discriminant_info): New.
9170 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9171 enumerator.
9172 (struct main_type) <flag_discriminated_union>: New field.
9173
15ce8941
TT
91742018-02-26 Tom Tromey <tom@tromey.com>
9175
9176 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9177 unittests/unpack-selftests.c.
9178 * unittests/unpack-selftests.c: New file.
9179 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9180
48fbe735
YQ
91812018-02-26 Yao Qi <yao.qi@linaro.org>
9182
9183 * dwarf2read.c (struct partial_die_info) <read>: New method.
9184 (read_partial_die): Remove the declaration.
9185 (load_partial_dies): Update.
9186 (partial_die_info::partial_die_info):
9187 (read_partial_die): Change it to partial_die_info::read.
9188
52356b79
YQ
91892018-02-26 Yao Qi <yao.qi@linaro.org>
9190
9191 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9192 (fixup_partial_die): Remove declaration.
9193 (scan_partial_symbols): Update.
9194 (partial_die_parent_scope): Likewise.
9195 (partial_die_full_name): Likewise.
9196 (fixup_partial_die): Change it to partial_die_info::fixup.
9197
35cc7ed7
YQ
91982018-02-26 Yao Qi <yao.qi@linaro.org>
9199
9200 * dwarf2read.c (read_partial_die): Update the declaration.
9201 (load_partial_dies): Caller update.
9202 (read_partial_die): Remove one argument abbrev_len.
9203
6f06d47b
YQ
92042018-02-26 Yao Qi <yao.qi@linaro.org>
9205
9206 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9207 assignment operator.
9208 (load_partial_dies): Use ctor and copy ctor.
9209 (read_partial_die): Update.
9210 (dwarf2_cu::find_partial_die): Use ctor.
9211
d590ff25
YQ
92122018-02-26 Yao Qi <yao.qi@linaro.org>
9213
9214 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9215 (find_partial_die_in_comp_unit): Change it to
9216 dwarf2_cu::find_partial_die.
9217 (find_partial_die): Update.
9218
fd0a254f
YQ
92192018-02-26 Yao Qi <yao.qi@linaro.org>
9220
9221 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9222 is NULL.
9223
cd9983dd
YQ
92242018-02-26 Yao Qi <yao.qi@linaro.org>
9225
9226 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9227
f46cd62a
AH
92282018-02-26 Alan Hayward <alan.hayward@arm.com>
9229
9230 * arch/amd64.h: Use common/tdesc.h.
9231 * arch/i386.c: Likewise.
9232 * arch/i386.h: Likewise.
9233 * arch/tic6x.c: Likewise.
9234 * arch/tdesc.h: Move file from here...
9235 * common/tdesc.h: ...to here.
9236 * features/aarch64-core.c: Regenerate.
9237 * features/aarch64-fpu.c: Regenerate.
9238 * features/i386/32bit-avx.c: Regenerate.
9239 * features/i386/32bit-avx512.c: Regenerate.
9240 * features/i386/32bit-core.c: Regenerate.
9241 * features/i386/32bit-linux.c: Regenerate.
9242 * features/i386/32bit-mpx.c: Regenerate.
9243 * features/i386/32bit-pkeys.c: Regenerate.
9244 * features/i386/32bit-sse.c: Regenerate.
9245 * features/i386/64bit-avx.c: Regenerate.
9246 * features/i386/64bit-avx512.c: Regenerate.
9247 * features/i386/64bit-core.c: Regenerate.
9248 * features/i386/64bit-linux.c: Regenerate.
9249 * features/i386/64bit-mpx.c: Regenerate.
9250 * features/i386/64bit-pkeys.c: Regenerate.
9251 * features/i386/64bit-segments.c: Regenerate.
9252 * features/i386/64bit-sse.c: Regenerate.
9253 * features/i386/x32-core.c: Regenerate.
9254 * features/tic6x-c6xp.c: Regenerate.
9255 * features/tic6x-core.c: Regenerate.
9256 * features/tic6x-gp.c: Regenerate.
9257 * target-descriptions.c: Use common/tdesc.h.
9258 * target-descriptions.h: Likewise.
9259
9b292f68
TT
92602018-02-24 Tom Tromey <tom@tromey.com>
9261
9262 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9263 (try_thread_db_load_from_dir, thread_db_load_search): Use
9264 std::string.
9265 (info_auto_load_libthread_db_compare): Return bool. Change
9266 argument types.
9267 (info_auto_load_libthread_db): Use std::vector, std::string.
9268 Remove cleanups.
9269
281d762b
TT
92702018-02-24 Tom Tromey <tom@tromey.com>
9271
9272 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9273 std::string.
9274 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9275 std::string*.
9276 * gdbarch.c: Rebuild.
9277 * gdbarch.h: Rebuild.
9278 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9279 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9280 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9281 std::string*.
9282
9d8780f0
SM
92832018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9284
9285 * gdbtypes.h (sect_offset): Change type to uint64_t.
9286 (sect_offset_str): New function.
9287 * dwarf2read.c (create_addrmap_from_aranges): Use
9288 sect_offset_str.
9289 (error_check_comp_unit_head): Likewise.
9290 (create_debug_type_hash_table): Likewise.
9291 (read_cutu_die_from_dwo): Likewise.
9292 (init_cutu_and_read_dies): Likewise.
9293 (init_cutu_and_read_dies_no_follow): Likewise.
9294 (process_psymtab_comp_unit_reader): Likewise.
9295 (partial_die_parent_scope): Likewise.
9296 (peek_die_abbrev): Likewise.
9297 (process_queue): Likewise.
9298 (dwarf2_physname): Likewise.
9299 (read_namespace_alias): Likewise.
9300 (read_import_statement): Likewise.
9301 (create_dwo_cu_reader): Likewise.
9302 (create_cus_hash_table): Likewise.
9303 (lookup_dwo_cutu): Likewise.
9304 (inherit_abstract_dies): Likewise.
9305 (read_func_scope): Likewise.
9306 (read_call_site_scope): Likewise.
9307 (dwarf2_add_member_fn): Likewise.
9308 (read_common_block): Likewise.
9309 (read_module_type): Likewise.
9310 (read_typedef): Likewise.
9311 (read_subrange_type): Likewise.
9312 (load_partial_dies): Likewise.
9313 (read_partial_die): Likewise.
9314 (find_partial_die): Likewise.
9315 (read_str_index): Likewise.
9316 (dwarf2_string_attr): Likewise.
9317 (build_error_marker_type): Likewise.
9318 (lookup_die_type): Likewise.
9319 (dump_die_shallow): Likewise.
9320 (follow_die_ref): Likewise.
9321 (dwarf2_fetch_die_loc_sect_off): Likewise.
9322 (dwarf2_fetch_constant_bytes): Likewise.
9323 (follow_die_sig): Likewise.
9324 (get_signatured_type): Likewise.
9325 (get_DW_AT_signature_type): Likewise.
9326 (dwarf2_find_containing_comp_unit): Likewise.
9327 (set_die_type): Likewise.
9328
8ec57239
JB
93292018-02-21 John Baldwin <jhb@FreeBSD.org>
9330
9331 * arch/aarch64.c: Include "common-defs.h".
9332 * arch/amd64.c: Likewise.
9333 * arch/i386.c: Likewise.
9334
3eac2b65
TT
93352018-02-21 Tom Tromey <tom@tromey.com>
9336
9337 * value.h: (extract_field_op): Update.
9338 * eval.c (extract_field_op): Return a const char *.
9339 * expression.h (parse_expression_for_completion): Update.
9340 * completer.c (complete_expression): Update.
9341 (add_struct_fields): Make fieldname const.
9342 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9343 (mark_completion_tag, parse_exp_in_context_1): Update.
9344 (parse_expression_for_completion): Change "name" to
9345 unique_xmalloc_ptr*.
9346
6ccb583f
TT
93472018-02-21 Tom Tromey <tom@tromey.com>
9348
9349 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9350
c113ed0c
YQ
93512018-02-21 Yao Qi <yao.qi@linaro.org>
9352
9353 * avr-tdep.c (avr_read_pc): Change parameter type to
9354 readable_regcache.
9355 * gdbarch.sh (read_pc): Likewise.
9356 * gdbarch.c: Re-generated.
9357 * gdbarch.h: Re-generated.
9358 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9359 readable_regcache.
9360 * ia64-tdep.c (ia64_read_pc): Likewise.
9361 * mips-tdep.c (mips_read_pc): Likewise.
9362 * spu-tdep.c (spu_read_pc): Likewise.
9363
4c74fe6b
YQ
93642018-02-21 Yao Qi <yao.qi@linaro.org>
9365
9366 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9367 * regcache-dump.c: New file.
9368 * regcache.c: Move register_dump to regcache-dump.c.
9369 (maintenance_print_registers): Likewise.
9370 (maintenance_print_raw_registers): Likewise.
9371 (maintenance_print_cooked_registers): Likewise.
9372 (maintenance_print_register_groups): Likewise.
9373 (maintenance_print_remote_registers): Likewise.
9374 (_initialize_regcache): Likewise.
9375 * regcache.h (register_dump): Moved from regcache.c.
9376
796bb026
YQ
93772018-02-21 Yao Qi <yao.qi@linaro.org>
9378
9379 * regcache.c (regcache::regcache): Update.
9380 (regcache::invalidate): Move it to detached_regcache::invalidate.
9381 (get_thread_arch_aspace_regcache): Update.
9382 (regcache::raw_update): Update.
9383 (regcache::cooked_read): Remove some code.
9384 (regcache::cooked_read_value): Likewise.
9385 (regcache::raw_write): Remove assert on m_readonly_p.
9386 (regcache::raw_supply_integer): Move it to
9387 detached_regcache::raw_supply_integer.
9388 (regcache::raw_supply_zeroed): Likewise.
9389 * regcache.h (detached_regcache) <raw_supply_integer>: New
9390 declaration.
9391 <raw_supply_zeroed, invalidate>: Likewise.
9392 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9393 <invalidate>: Likewise.
9394 <m_readonly_p>: Removed.
9395
215c69dc
YQ
93962018-02-21 Yao Qi <yao.qi@linaro.org>
9397
9398 * infcmd.c (get_return_value): Let stop_regs point to
9399 get_current_regcache.
9400 * regcache.c (regcache::regcache): Remove.
9401 (register_dump_reg_buffer): New class.
9402 (regcache_print): Adjust.
9403 * regcache.h (regcache): Remove constructors.
9404
f3384e66
YQ
94052018-02-21 Yao Qi <yao.qi@linaro.org>
9406
9407 * regcache.c (class register_dump): New class.
9408 (register_dump_regcache, register_dump_none): New class.
9409 (register_dump_remote, register_dump_groups): New class.
9410 (regcache_print): Update.
9411 * regcache.h (regcache_dump_what): Move it to regcache.c.
9412 (regcache) <dump>: Remove.
9413
c8ec2f33
YQ
94142018-02-21 Yao Qi <yao.qi@linaro.org>
9415
9416 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9417 reg_buffer_rw *.
9418 (jit_unwind_reg_set_impl): Call raw_supply.
9419 (jit_frame_sniffer): Use reg_buffer_rw.
9420 * record-full.c (record_full_core_regbuf): Change its type.
9421 (record_full_core_open_1): Use reg_buffer_rw.
9422 (record_full_close): Likewise.
9423 (record_full_core_fetch_registers): Use regcache->raw_supply.
9424 (record_full_core_store_registers): Likewise.
9425 * regcache.c (regcache::get_register_status): Move it to
9426 reg_buffer.
9427 (regcache_raw_set_cached_value): Remove.
9428 (regcache::raw_set_cached_value): Remove.
9429 (regcache::raw_write): Call raw_supply.
9430 (regcache::raw_supply): Move it to reg_buffer_rw.
9431 * regcache.h (regcache_raw_set_cached_value): Remove.
9432 (reg_buffer_rw): New class.
9433
daf6667d
YQ
94342018-02-21 Yao Qi <yao.qi@linaro.org>
9435
9436 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9437 readonly_detached_regcache.
9438 (dummy_frame_prev_register): Use regcache->cooked_read.
9439 * frame.c (frame_save_as_regcache): Change return type.
9440 (frame_pop): Update.
9441 * frame.h (frame_save_as_regcache): Update declaration.
9442 * inferior.h (get_infcall_suspend_state_regcache): Update
9443 declaration.
9444 * infrun.c (infcall_suspend_state) <registers>: use
9445 readonly_detached_regcache.
9446 (save_infcall_suspend_state): Don't use regcache_dup.
9447 (get_infcall_suspend_state_regcache): Change return type.
9448 * linux-fork.c (struct fork_info) <savedregs>: Change to
9449 readonly_detached_regcache.
9450 <pc>: New field.
9451 (fork_save_infrun_state): Don't use regcache_dup.
9452 (info_checkpoints_command): Adjust.
9453 * mi/mi-main.c (register_changed_p): Update declaration.
9454 (mi_cmd_data_list_changed_registers): Use
9455 readonly_detached_regcache.
9456 (register_changed_p): Change parameter type to
9457 readonly_detached_regcache.
9458 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9459 readonly_detached_regcache.
9460 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9461 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9462 New.
9463 (regcache::save): Move it to reg_buffer.
9464 (regcache::restore): Change parameter type.
9465 (regcache_dup): Remove.
9466 * regcache.h (reg_buffer) <save>: New method.
9467 (readonly_detached_regcache): New class.
9468 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9469 readonly_detached_regcache.
9470 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9471
fc5b8736
YQ
94722018-02-21 Yao Qi <yao.qi@linaro.org>
9473
9474 * frame.c (frame_save_as_regcache): Use regcache method save.
9475 (frame_pop): Use regcache method restore.
9476 * infrun.c (restore_infcall_suspend_state): Likewise.
9477 * linux-fork.c (fork_load_infrun_state): Likewise.
9478 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9479 save.
9480 * regcache.c (regcache_save): Remove.
9481 (regcache::restore): More asserts.
9482 (regcache_cpy): Remove.
9483 * regcache.h (regcache_save): Remove the declaration.
9484 (regcache::restore): Move from private to public.
9485 Remove the friend declaration of regcache_cpy.
9486 (regcache_cpy): Remove declaration.
9487
849d0ba8
YQ
94882018-02-21 Yao Qi <yao.qi@linaro.org>
9489
9490 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9491 parameter type to 'readable_regcache *'.
9492 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9493 * arm-tdep.c (arm_neon_quad_read): Likewise.
9494 (arm_pseudo_read): Likewise.
9495 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9496 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9497 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9498 * gdbarch.c: Re-generated.
9499 * gdbarch.h: Re-generated.
9500 * gdbarch.sh (pseudo_register_read): Change parameter type to
9501 'readable_regcache *'.
9502 (pseudo_register_read_value): Likewise.
9503 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9504 (h8300_pseudo_register_read): Likewise.
9505 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9506 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9507 (i386_pseudo_register_read_into_value): Likewise.
9508 (i386_pseudo_register_read_value): Likewise.
9509 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9510 declaration.
9511 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9512 * m32c-tdep.c (m32c_raw_read): Likewise.
9513 (m32c_read_flg): Likewise.
9514 (m32c_banked_register): Likewise.
9515 (m32c_banked_read): Likewise.
9516 (m32c_sb_read): Likewise.
9517 (m32c_part_read): Likewise.
9518 (m32c_cat_read): Likewise.
9519 (m32c_r3r2r1r0_read): Likewise.
9520 (m32c_pseudo_register_read): Likewise.
9521 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9522 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9523 (mep_pseudo_cr64_read): Likewise.
9524 (mep_pseudo_register_read): Likewise.
9525 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9526 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9527 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9528 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9529 (regcache::cooked_read): Likewise.
9530 (regcache::cooked_read_value): Likewise.
9531 (regcache_cooked_read_signed):
9532 (regcache::cooked_read): Likewise.
9533 * regcache.h (readable_regcache): New class.
9534 (regcache): Inherit readable_regcache. Move some methods to
9535 readable_regcache.
9536 * rl78-tdep.c (rl78_pseudo_register_read): Change
9537 parameter type to 'readable_regcache *'.
9538 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9539 (e500_pseudo_register_read): Change parameter type to
9540 'readable_regcache *'.
9541 (dfp_pseudo_register_read): Likewise.
9542 (vsx_pseudo_register_read): Likewise.
9543 (efpr_pseudo_register_read): Likewise.
9544 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9545 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9546 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9547 (sh64_pseudo_register_read): Likewise.
9548 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9549 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9550 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9551 (spu_pseudo_register_read): Likewise.
9552 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9553 (xtensa_pseudo_register_read): Likewise.
9554
31716595
YQ
95552018-02-21 Yao Qi <yao.qi@linaro.org>
9556
9557 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9558 (regcache::arch): Move it to reg_buffer::arch.
9559 (regcache::register_buffer): Likewise.
9560 (regcache::assert_regnum): Likewise.
9561 (regcache::num_raw_registers): Likewise.
9562 * regcache.h (reg_buffer): New class.
9563 (regcache): Inherit reg_buffer.
9564
7104e59b
SM
95652018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9566
9567 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9568 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9569
2d8adcbd
MM
95702018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9571
9572 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9573
b5884fa7
AH
95742018-02-19 Alan Hayward <alan.hayward@arm.com>
9575
9576 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9577 (SFILES): Remove common/*.c files.
9578 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9579 * common/common.host: Add common reference.
9580 * configure.ac: Likewise.
9581 * configure: Regenerate.
9582
fd90ace4
YQ
95832018-02-16 Yao Qi <yao.qi@linaro.org>
9584
9585 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9586 (block_initialize_namespace): Use new.
9587 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9588 (dwarf2_free_objfile): Use delete.
9589 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9590 (copy_type_recursive): Use new.
9591 * gdb_obstack.h (allocate_on_obstack): New.
9592
85046ae2
YQ
95932018-02-15 Yao Qi <yao.qi@linaro.org>
9594
9595 PR gdb/22849
9596 * inferior.c (exit_inferior_1): Reset inf->control.
9597
355c559b
JB
95982018-02-15 Joel Brobecker <brobecker@adacore.com>
9599
9600 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9601 declaration.
9602
980548fd
PA
96032018-02-14 Pedro Alves <palves@redhat.com>
9604
9605 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9606 frame_cleanup_after_sniffer on exception.
9607
692d6f97
TT
96082018-02-14 Tom Tromey <tom@tromey.com>
9609
9610 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9611 const.
9612 (solib_bfd_open): Make pathname const.
9613 * solib.c (solib_bfd_open): Make pathname const.
9614 * solib-spu.c (spu_bfd_fopen): Make name const.
9615 (spu_bfd_open): Make pathname const.
9616 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9617 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9618
e0cc99a6
TT
96192018-02-14 Tom Tromey <tom@tromey.com>
9620
9621 * symfile.c (symfile_bfd_open): Update.
9622 * source.h (openp, source_full_path_of, find_and_open_source):
9623 Change argument type to unique_xmalloc_ptr.
9624 * source.c (openp): Take a unique_xmalloc_ptr.
9625 (source_full_path_of, find_and_open_source): Likewise.
9626 (open_source_file, symtab_to_fullname): Update.
9627 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9628 unique_xmalloc_ptr.
9629 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9630 (exec_file_find): Update.
9631 * psymtab.c (psymtab_to_fullname): Update.
9632 * nto-tdep.h (nto_find_and_open_solib): Update.
9633 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9634 unique_xmalloc_ptr.
9635 * exec.c (exec_file_attach): Update.
9636 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9637 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9638
b46a8d7c
TT
96392018-02-14 Tom Tromey <tom@tromey.com>
9640
9641 * solib.c: Include source.h.
9642 * nto-tdep.c: Include source.h.
9643 * mi/mi-cmd-env.c: Include source.h.
9644 * infcmd.c: Include source.h.
9645 * exec.c: Include source.h.
9646 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9647 (add_path, directory_switch, source_path, init_source_path): Move
9648 declarations...
9649 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9650 (add_path, directory_switch, source_path, init_source_path):
9651 ...here.
9652
797bc1cb
TT
96532018-02-14 Tom Tromey <tom@tromey.com>
9654
9655 * solist.h (exec_file_find, solib_find): Return
9656 unique_xmalloc_ptr.
9657 (solib_bfd_fopen): Take a const char *.
9658 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9659 (exec_file_find, solib_find): Likewise.
9660 (solib_bfd_fopen): Do not take ownership of "pathname".
9661 (solib_bfd_open): Use unique_xmalloc_ptr.
9662 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9663 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9664 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9665 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9666
f98b2e33
JB
96672018-02-14 Joel Brobecker <brobecker@adacore.com>
9668
9669 * ada-lang.c (name_match_type_from_name): Remove reference to
9670 ada_name_for_lookup in function's documentation.
9671 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9672
24b9144d
SM
96732018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9674
9675 * defs.h (enum openp_flags): New enum.
9676 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9677 Move to enum openp_flags.
9678 (openp_flags): New enum flags.
9679 (openp): Change parameter type to openp_flags.
9680 * source.c (openp): Change parameter type to openp_flags.
9681 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9682 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9683
387cd15b
SM
96842018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9685
9686 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9687 per-command.
9688
b303c6f6
AB
96892018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9690
9691 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9692 into...
9693 (class dwarf2_queue_guard): ...the destructor of this new class.
9694 (dw2_do_instantiate_symtab): Create instance of the new class
9695 dwarf2_queue_guard, remove cleanup.
9696
9c3630e9
TT
96972018-02-09 Tom Tromey <tom@tromey.com>
9698
9699 * source.c (find_source_lines): Don't reference past the end of
9700 the vector.
9701
c4e12631
MM
97022018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9703
9704 * remote.c (remote_btrace_maybe_reopen): Change error message.
9705 * btrace.c (btrace_enable): Likewise.
9706 (parse_xml_btrace): Likewise.
9707 (parse_xml_btrace_conf): Likewise.
9708
88711fbf
MM
97092018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9710
9711 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9712 (linux_enable_pt, linux_enable_bts): Call
9713 diagnose_perf_event_open_fail.
9714
17ad2a4f
MM
97152018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9716
9717 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9718 Remove parameter and change return type. Update callers. Move it.
9719 (linux_enable_bts, linux_enable_pt): Improve error message.
9720 (linux_enable_pt): Remove zero buffer size check.
9721 (linux_enable_btrace): Improve error messages. Remove NULL return
9722 check.
9723
de6242d3
MM
97242018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9725
9726 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9727 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9728 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9729 (linux_supports_pt, linux_supports_btrace): Remove.
9730 (linux_enable_bts): Call cpu_supports_bts.
9731 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9732 * remote.c (remote_supports_btrace): Remove.
9733 (init_remote_ops): Remove remote_supports_btrace.
9734 * target-delegates.c: Regenerated.
9735 * target.c (target_supports_btrace): Remove.
9736 * target.h (target_ops) <to_supports_btrace>: Remove
9737 (target_supports_btrace): Remove.
9738 * x86-linux-nat.c (x86_linux_create_target): Remove
9739 linux_supports_btrace.
9740
9ee23a85
MM
97412018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9742
9743 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9744 btrace failed.
9745 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9746 exception and use message in own exception.
9747
5c3284c1
MM
97482018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9749
9750 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9751 (perf_event_pt_event_type): Use gdb_file_up.
9752 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9753 scoped_fd, and scoped_mmap.
9754
84696f37
MM
97552018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9756
9757 * common/scoped_mmap.h: New.
9758 * unittests/scoped_mmap-selftest.c: New.
9759 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9760 unittests/scoped_mmap-selftest.c.
9761
ea4a0888
MM
97622018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9763
9764 * common/scoped_fd.h: New.
9765 * unittests/scoped_fd-selftest.c: New.
9766 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9767 unittests/scoped_fd-selftest.c.
9768
869e8290
TT
97692018-02-09 Tom Tromey <tom@tromey.com>
9770
9771 * auto-load.c (auto_load_section_scripts): Use
9772 gdb::unique_xmalloc_ptr.
9773
a37a2ae7
TT
97742018-02-09 Tom Tromey <tom@tromey.com>
9775
9776 * auto-load.c (execute_script_contents): Use std::string.
9777
4e725347
JB
97782018-02-09 Joel Brobecker <brobecker@adacore.com>
9779
9780 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9781 Python function, rather than a new command.
9782
9a897d43
TT
97832018-02-08 Tom Tromey <tom@tromey.com>
9784
9785 * solib.c (solib_find_1): Use std::string.
9786 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9787
58ef3771
TT
97882018-02-08 Tom Tromey <tom@tromey.com>
9789
9790 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9791
a9abc434
TT
97922018-02-08 Tom Tromey <tom@tromey.com>
9793
9794 * source.c (find_source_lines): Use gdb::def_vector.
9795
84f27c6f
TT
97962018-02-08 Tom Tromey <tom@tromey.com>
9797
9798 * macrocmd.c (struct temporary_macro_definition): New.
9799 (macro_define_command): Use temporary_macro_definition. Remove
9800 cleanups.
9801 (free_macro_definition_ptr): Remove.
9802
0354904b
TT
98032018-02-08 Tom Tromey <tom@tromey.com>
9804
9805 * macroexp.c (maybe_expand): Use std::string.
9806
1739cf24
TT
98072018-02-08 Tom Tromey <tom@tromey.com>
9808
9809 * macroexp.c (struct macro_buffer): Add initializers for some
9810 members.
9811 (init_buffer, init_shared_buffer, free_buffer)
9812 (free_buffer_return_text): Remove.
9813 (macro_buffer): New constructors.
9814 (~macro_buffer): New destructor.
9815 (macro_buffer::set_shared): New method.
9816 (macro_buffer::resize_buffer, macro_buffer::appendc)
9817 (macro_buffer::appendmem): Now methods, not free functions.
9818 (set_token, append_tokens_without_splicing, stringify)
9819 (macro_stringify): Update.
9820 (gather_arguments): Change return type. Remove argc_p argument,
9821 add args_ptr argument. Use std::vector.
9822 (substitute_args): Remove argc argument. Accept std::vector.
9823 (expand): Update. Use std::vector.
9824 (scan, macro_expand, macro_expand_next): Update.
9825
f6c2623e
TT
98262018-02-08 Tom Tromey <tom@tromey.com>
9827
9828 * symtab.c (default_collect_symbol_completion_matches_break_on):
9829 Use unique_xmalloc_ptr.
9830 * macroscope.h: (sal_macro_scope, user_macro_scope)
9831 (default_macro_scope): Return unique_xmalloc_ptr.
9832 * macroscope.c (sal_macro_scope, user_macro_scope)
9833 (default_macro_scope): Return unique_xmalloc_ptr.
9834 * macroexp.h (macro_expand, macro_expand_once): Return
9835 unique_xmalloc_ptr.
9836 * macroexp.c (macro_expand, macro_expand_once): Return
9837 unique_xmalloc_ptr.
9838 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9839 (info_macro_command, info_macros_command): Use
9840 unique_xmalloc_ptr.
9841 * compile/compile-c-support.c (write_macro_definitions): Use
9842 unique_xmalloc_ptr.
9843 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9844
c2e0e465
SM
98452018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9846
9847 * value.c (value_static_field): Assign field type instead of
9848 containing type when returning an optimized out value.
9849
3f8c94b4
YQ
98502018-02-06 Yao Qi <yao.qi@linaro.org>
9851
9852 * ft32-tdep.c (ft32_read_pc): Remove.
9853 (ft32_write_pc): Remove.
9854 (ft32_gdbarch_init): Update.
9855 * m32r-tdep.c (m32r_read_pc): Remove.
9856 (m32r_gdbarch_init): Update.
9857 * mep-tdep.c (mep_read_pc): Remove.
9858 (mep_gdbarch_init): Update.
9859 * microblaze-tdep.c (microblaze_write_pc): Remove.
9860 (microblaze_gdbarch_init): Update.
9861 * mn10300-tdep.c (mn10300_read_pc): Remove.
9862 (mn10300_write_pc): Remove.
9863 (mn10300_gdbarch_init): Update.
9864 * moxie-tdep.c (moxie_read_pc): Remove.
9865 (moxie_write_pc): Remove.
9866 (moxie_gdbarch_init): Update.
9867
bca65a23
YQ
98682018-02-06 Yao Qi <yao.qi@linaro.org>
9869
9870 * expprint.c (print_subexp_standard): Handle
9871 OP_F77_UNDETERMINED_ARGLIST.
9872 (dump_subexp_body_standard): Likewise.
9873
583e3f90 98742018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 9875
583e3f90
YQ
9876 * target-descriptions.c (tdesc_element_visitor) Add empty
9877 implementations.
b8df6ca7
AH
9878 (tdesc_type): Move make_gdb_type from here.
9879 (tdesc_type_builtin): Likewise.
9880 (tdesc_type_vector): Likewise.
9881 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9882 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9883 (make_gdb_type_union): Likewise.
9884 (make_gdb_type_flags): Likewise.
9885 (make_gdb_type_enum): Likewise.
9886 (make_gdb_type): New function.
9887 (tdesc_register_type): Use static make_gdb_type.
9888
e813d34a
RK
98892018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
9890
9891 * infcmd.c (default_print_one_register_info): Align natural-format
9892 column values consistently one under another.
9893 (pad_to_column): New function.
9894
0eb876f5
JB
98952018-02-05 Joel Brobecker <brobecker@adacore.com>
9896
9897 * dwarf2read.c (dwarf2_physname): Move commment.
9898
0625771b
LS
98992018-02-01 Leszek Swirski <leszeks@google.com>
9900
9901 * varobj.c (varobj_formatted_print_options): Allow recursive
9902 pretty printing if pretty printing is enabled.
9903
59498c30
LS
99042018-02-01 Leszek Swirski <leszeks@google.com>
9905
9906 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
9907 names after a structop as a filename.
9908
2d9e6acb
YQ
99092018-02-01 Yao Qi <yao.qi@linaro.org>
9910
9911 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
9912 (arm_record_coproc_data_proc): Likewise.
9913
df95a9cf
YQ
99142018-02-01 Yao Qi <yao.qi@linaro.org>
9915
9916 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
9917
07e5f5cf
NP
99182018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
9919
9920 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
9921 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
9922
3045b475
PA
99232018-01-31 Pedro Alves <palves@redhat.com>
9924
9925 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
9926 * inflow.c (child_terminal_save_inferior): Wrap reference to
9927 tcgetpgrp in HAVE_TERMIOS_H.
9928 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
9929 _WIN32.
9930 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
9931 always iterate over all inferiors.
9932 (gdbsim_cntrl_c): Adjust.
9933 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
9934
929b5ad4
JB
99352018-01-31 Joel Brobecker <brobecker@adacore.com>
9936
9937 * gdbtypes.c (lookup_array_range_type): Make sure the array's
9938 index type is objfile-owned if the element type is as well.
9939
29236ca2
JB
99402018-01-31 Joel Brobecker <brobecker@adacore.com>
9941
9942 GDB 8.1 released.
9943
c81e8879
PR
99442018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
9945
9946 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
9947 "features/s390x-linux64.c".
9948 (_initialize_s390_linux_tdep): Remove initialization of tdescs
9949 s390_linux32 and s390x_linux64.
9950 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
9951 default tdesc.
9952 * s390-tdep.c: Include "features/s390-linux32.c" and
9953 "features/s390x-linux64.c".
9954 (s390_tdesc_valid): Add check for tdesc_has_registers.
9955 (s390_gdbarch_init): Make sure there is always a valid tdesc.
9956 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
9957 tdesc_s390x_linux64.
9958 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
9959 tdesc_s390x_linux64 to...
9960 * s390-tdep.h: ...here.
9961
e671cd59
PA
99622018-01-30 Pedro Alves <palves@redhat.com>
9963
9964 PR gdb/13211
9965 * config.in, configure: Regenerate.
9966 * configure.ac: Check for getpgid.
9967 * go32-nat.c (go32_pass_ctrlc): New.
9968 (go32_target): Install it.
9969 * inf-child.c (inf_child_target): Install
9970 child_terminal_save_inferior, child_pass_ctrlc and
9971 child_interrupt.
9972 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
9973 (inf_ptrace_target): No longer install it.
9974 * infcmd.c (interrupt_target_1): Adjust.
9975 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
9976 (child_interrupt): Declare.
9977 (inferior::terminal_state): New.
9978 * inflow.c (struct terminal_info): Update comments.
9979 (inferior_process_group): Delete.
9980 (terminal_is_ours): Delete.
9981 (gdb_tty_state): New.
9982 (child_terminal_init): Adjust.
9983 (is_gdb_terminal, sharing_input_terminal_1)
9984 (sharing_input_terminal): New functions.
9985 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
9986 Set the process's actual process group in the foreground if
9987 possible. Handle is_ours_for_output/is_ours distinction. Don't
9988 mark terminal as the inferior's if not sharing GDB's terminal.
9989 Don't check attach_flag.
9990 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
9991 pass down a target_terminal_state.
9992 (child_terminal_save_inferior): New, factored out from ...
9993 (child_terminal_ours_1): ... this. Handle
9994 target_terminal_state::is_ours_for_output.
9995 (child_interrupt, child_pass_ctrlc): New.
9996 (inflow_inferior_exit): Clear the inferior's terminal_state.
9997 (copy_terminal_info): Copy the inferior's terminal state.
9998 (_initialize_inflow): Remove reference to terminal_is_ours.
9999 * inflow.h (inferior_process_group): Delete.
10000 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10001 * procfs.c (procfs_target): Don't install procfs_interrupt.
10002 (procfs_interrupt): Delete.
10003 * remote.c (remote_serial_quit_handler): Adjust.
10004 (remote_interrupt): Remove ptid parameter. Adjust.
10005 * target-delegates.c: Regenerate.
10006 * target.c: Include "terminal.h".
10007 (target_terminal::terminal_state): Rename to ...
10008 (target_terminal::m_terminal_state): ... this.
10009 (target_terminal::init): Adjust.
10010 (target_terminal::inferior): Adjust to per-inferior
10011 terminal_state.
10012 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10013 (target_terminal::ours, target_terminal::ours_for_output): Use
10014 target_terminal_is_ours_kind.
10015 (target_interrupt): Remove ptid parameter. Adjust.
10016 (default_target_pass_ctrlc): Adjust.
10017 * target.h (target_ops::to_terminal_save_inferior): New field.
10018 (target_ops::to_interrupt): Remove ptid_t parameter.
10019 (target_interrupt): Remove ptid_t parameter. Update comment.
10020 (target_pass_ctrlc): Update comment.
10021 * target/target.h (target_terminal_state): New scoped enum,
10022 factored out of ...
10023 (target_terminal::terminal_state): ... here.
10024 (target_terminal::inferior): Update comments.
10025 (target_terminal::restore_inferior): New.
10026 (target_terminal::is_inferior, target_terminal::is_ours)
10027 (target_terminal::is_ours_for_output): Adjust.
10028 (target_terminal::scoped_restore_terminal_state): Adjust to
10029 rename, and call restore_inferior() instead of inferior().
10030 (target_terminal::scoped_restore_terminal_state::m_state): Change
10031 type.
10032 (target_terminal::terminal_state): Rename to ...
10033 (target_terminal::m_terminal_state): ... this and change type.
10034
9c3a5d93
PA
100352018-01-30 Pedro Alves <palves@redhat.com>
10036
10037 * linux-nat.c (wait_for_signal): New function.
10038 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10039 directly.
10040 (async_terminal_is_ours)
10041 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10042 (linux_nat_add_target): Don't override
10043 to_terminal_inferior/to_terminal_ours.
10044
69ab5edb
SDJ
100452018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10046
10047 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10048
fc8e7e75
SM
100492018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10050
10051 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10052 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10053 dwarf2_per_objfile_free here.
10054 (dwarf2_per_objfile_free): Remove.
10055 (_initialize_dwarf2_read): Don't register
10056 dwarf2_per_objfile_free as a registry cleanup.
10057
b2a426e2
EZ
100582018-01-27 Eli Zaretskii <eliz@gnu.org>
10059
10060 Avoid compilation errors in MinGW native builds
10061
10062 The error is triggered by including python-internal.h, and the
10063 error message is:
10064
10065 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10066 from build-gnulib/import/math.h:27,
10067 from d:/usr/Python26/include/pyport.h:235,
10068 from d:/usr/Python26/include/Python.h:58,
10069 from python/python-internal.h:94,
10070 from python/py-arch.c:24:
10071 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10072 using ::hypot;
10073 ^~~~~
10074
10075 This happens because Python headers define 'hypot' to expand t
10076 '_hypot' in the Windows builds.
10077 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10078 'hypoth'. This avoids a compilation error.
10079
0bdd8eac
AH
100802018-01-26 Alan Hayward <alan.hayward@arm.com>
10081
10082 * MAINTAINERS (Write After Approval): Fix ordering.
10083
56ae9dc3
AH
100842018-01-26 Alan Hayward <alan.hayward@arm.com>
10085
10086 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10087
7433498b
AM
100882018-01-26 Alan Modra <amodra@gmail.com>
10089
10090 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10091 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10092 Remove nop. Make const. Comment.
10093 (powerpc32_plt_stub_so_2): New.
10094 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10095 Correct count. Update uses.
10096 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10097 Move common code reading PLT entry word. Correct
10098 powerpc32_plt_stub PLT address calculation.
10099 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10100 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10101 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10102 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10103 (ppc64_standard_linkage8): Likewise.
10104 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10105 Correct insns description.
10106 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10107
0f59d5fc
PA
101082018-01-24 Pedro Alves <palves@redhat.com>
10109
10110 GCC PR libstdc++/83906
10111 * gdbtypes.c (operator==(const dynamic_prop &,
10112 const dynamic_prop &)): New.
10113 (operator==(const range_bounds &, const range_bounds &)): New.
10114 (check_types_equal): Use them instead of memcmp.
10115 * gdbtypes.h (operator==(const dynamic_prop &,
10116 const dynamic_prop &)): Declare.
10117 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10118 (operator==(const range_bounds &, const range_bounds &)): Declare.
10119 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10120
ef8914a4
PR
101212018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10122
10123 * s390-linux-tdep.c (s390_record_address_mask)
10124 (s390_record_calc_disp_common, s390_record_calc_disp)
10125 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10126 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10127 (s390_process_record): Move to s390-tdep.c.
10128 (s390_linux_init_abi_any): Adjust.
10129 * s390-tdep.c (s390_record_address_mask)
10130 (s390_record_calc_disp_common, s390_record_calc_disp)
10131 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10132 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10133 (s390_process_record): Moved from s390-linux-tdep.c
10134 (s390_gdbarch_init): Adjust.
10135
d6e58945
PR
101362018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10137
10138 * s390-linux-nat.c (s390-tdep.h): New include.
10139 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10140 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10141 (ALLDEPFILES): Add s390-tdep.c.
10142 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10143 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10144 * s390-tdep.h: ...this. New file.
10145 * s390-linux-tdep.c (s390-tdep.h): New include.
10146 (_initialize_s390_tdep): Rename to...
10147 (_initialize_s390_linux_tdep): ...this and adjust.
10148 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10149 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10150 s390-tdep.h.
10151 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10152 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10153 (s390_is_partial_instruction, s390_software_single_step)
10154 (is_non_branch_ril, s390_displaced_step_copy_insn)
10155 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10156 (s390_prologue_data, s390_addr, s390_store, s390_load)
10157 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10158 (s390_register_call_saved, s390_guess_tracepoint_registers)
10159 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10160 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10161 (s390_pseudo_register_name, s390_pseudo_register_type)
10162 (s390_pseudo_register_read, s390_pseudo_register_write)
10163 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10164 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10165 (s390_addr_bits_remove, s390_address_class_type_flags)
10166 (s390_address_class_type_flags_to_name)
10167 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10168 (s390_function_arg_float, s390_function_arg_vector)
10169 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10170 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10171 (s390_frame_align, s390_register_return_value, s390_return_value)
10172 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10173 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10174 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10175 (s390_trad_frame_prev_register, s390_unwind_cache)
10176 (s390_prologue_frame_unwind_cache)
10177 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10178 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10179 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10180 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10181 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10182 (s390_frame_base_address, s390_local_base_address)
10183 (s390_frame_base, s390_gcc_target_options)
10184 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10185 (s390_validate_reg_range, s390_tdesc_valid)
10186 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10187 * s390-tdep.c: ...this. New file.
10188
9c0b896e
PR
101892018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10190
10191 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10192 (s390_process_record, s390_gdbarch_tdep_alloc)
10193 (s390_linux_init_abi_any): Use/set new hook.
10194
7042632b
PR
101952018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10196
10197 * s390-linux-tdep.c (osabi.h): New include.
10198 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10199 (s390_linux_init_abi_any): New functions.
10200 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10201
650f5e13
PR
102022018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10203
10204 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10205 tdesc_has_registers check
10206
47c9317e
PR
102072018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10208
10209 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10210 (s390_validate_reg_range): New macro.
10211 (s390_gdbarch_init): Adjust.
10212
095085d8
PR
102132018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10214
10215 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10216 (s390_gdbarch_tdep_alloc): Adjust.
10217 (s390_gdbarch_init): Adjust.
10218
ab9bcc67
PR
102192018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10220
10221 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10222 <have_tdb>: Change type to bool.
10223 (s390_gdbarch_tdep_alloc): Adjust.
10224 (s390_gdbarch_init): Adjust.
10225
21f6f5ff
PR
102262018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10227
10228 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10229 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10230 (s390_gdbarch_tdep_alloc): New function.
10231 (s390_gdbarch_init): Allocate tdep at start and use its fields
10232 instead of separate variables.
10233
0eb97953
PR
102342018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10235
10236 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10237 when looking for cached gdbarch and add comment for remaining.
10238
5c319bb2
PA
102392018-01-22 Pedro Alves <palves@redhat.com>
10240 Sergio Durigan Junior <sergiodj@redhat.com>
10241
10242 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10243 case.
10244
d65ce302
MR
102452018-01-22 Maciej W. Rozycki <macro@mips.com>
10246
10247 * MAINTAINERS: Update my company e-mail address.
10248
ec7a5fcb
YQ
102492018-01-22 Yao Qi <yao.qi@linaro.org>
10250
10251 * regcache.c (cooked_write_test): New function.
10252 (_initialize_regcache): Register the test.
10253
11f57cb6
YQ
102542018-01-22 Yao Qi <yao.qi@linaro.org>
10255
10256 * ia64-tdep.c (ia64_pseudo_register_read): Call
10257 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10258 * m32c-tdep.c (m32c_cat_read): Likewise.
10259 (m32c_r3r2r1r0_read): Likewise.
10260 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10261 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10262
03f50fc8
YQ
102632018-01-22 Yao Qi <yao.qi@linaro.org>
10264
10265 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10266 method raw_read instead of regcache_raw_read.
10267 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10268 * arm-tdep.c (arm_neon_quad_read): Likewise.
10269 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10270 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10271 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10272 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10273 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10274 (i386_pseudo_register_read_into_value): Likewise.
10275 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10276 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10277 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10278 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10279 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10280 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10281 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10282 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10283 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10284
dc711524
YQ
102852018-01-22 Yao Qi <yao.qi@linaro.org>
10286
10287 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10288 * configure.tgt: Remove target mt.
10289 * mt-tdep.c: Remove.
10290 * regcache.c (cooked_read_test): Remove the check for mt.
10291
3f5a868b
YQ
102922018-01-22 Yao Qi <yao.qi@linaro.org>
10293
10294 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10295 instead of gdbarch_pseudo_register_read_value.
10296
de4cb04a
JB
102972018-01-22 Joel Brobecker <brobecker@adacore.com>
10298
10299 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10300 language is Ada.
10301
a9e40818
JB
103022018-01-22 Joel Brobecker <brobecker@adacore.com>
10303
10304 * linespec.c (create_sals_line_offset): Remove code that preserved
10305 the symtab_and_line's line number.
10306
e707fc44
AB
103072018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10308
10309 * varobj.c (varobj_create): Don't set valid_block when creating a
10310 floating varobj.
10311
03d0bf7b
AB
103122018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10313
10314 * varobj.c (varobj_create): Remove out of date comment.
10315
ae451627
AB
103162018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10317
10318 PR mi/20395
10319 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10320 updating innermost block.
10321 * parse.c (innermost_block_tracker::update): Take extra type
10322 parameter, and check types match before updating innermost block.
10323 (write_dollar_variable): Update innermost block for registers.
10324 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10325 (innermost_block_tracker::innermost_block_tracker): Initialise
10326 m_types member.
10327 (innermost_block_tracker::reset): Take type parameter.
10328 (innermost_block_tracker::update): Take type parameter, and pass
10329 type through as needed.
10330 (innermost_block_tracker::m_types): New member.
10331 * varobj.c (varobj_create): Pass type when reseting innermost
10332 block.
10333
aee1fcdf
AB
103342018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10335
10336 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10337 * ada-lang.c (resolve_subexp): Likewise.
10338 * breakpoint.c (set_breakpoint_condition) Likewise.
10339 (watch_command_1) Likewise.
10340 * c-exp.y (variable): Likewise.
10341 * d-exp.y (PrimaryExpression): Likewise.
10342 * f-exp.y (variable): Likewise.
10343 * go-exp.y (variable): Likewise.
10344 * m2-exp.y (variable): Likewise.
10345 * objfiles.c (objfile::~objfile): Likewise.
10346 * p-exp.y (variable): Likewise.
10347 * parse.c (innermost_block): Change type.
10348 * parser-defs.h (class innermost_block_tracker): New.
10349 (innermost_block): Change to innermost_block_tracker.
10350 * printcmd.c (display_command): Switch to innermost_block API.
10351 (do_one_display): Likewise.
10352 * rust-exp.y (do_one_display): Likewise.
10353 * symfile.c (clear_symtab_users): Likewise.
10354 * varobj.c (varobj_create): Switch to innermost_block API, replace
10355 use of innermost_block with block stored on varobj object.
10356
396af9a1
AB
103572018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10358
10359 * expression.h (innermost_block): Remove declaration.
10360 * varobj.c: Add 'parser-defs.h' include.
10361
fcfcc376
TT
103622018-01-19 Tom Tromey <tom@tromey.com>
10363
10364 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10365 symbols in the static and global blocks.
10366
5a6c3296
JC
103672018-01-19 James Clarke <jrtc27@jrtc27.com>
10368
10369 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10370 gdb_ptrace.h, and move including gdb_wait.h ...
10371 * nat/linux-ptrace.h: ... to here.
10372
bc09b0c1
SM
103732018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10374
10375 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10376 inf_ptrace_detach_success.
10377 (inf_ptrace_detach_success): Add inferior parameter, use it
10378 instead of inferior_ptid, pass it to detach_inferior.
10379 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10380 parameter.
10381 * inferior.c (detach_inferior): Add overload that takes an
10382 inferior object.
10383 * inferior.h (detach_inferior): Likewise.
10384 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10385 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10386 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10387
6e1e1966
SM
103882018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10389
10390 * target.h (struct target_ops) <to_detach>: Add inferior
10391 parameter.
10392 (target_detach): Likewise.
10393 * target.c (dispose_inferior): Pass inferior down.
10394 (target_detach): Pass inferior down. Assert that it is equal to
10395 the current inferior.
10396 * aix-thread.c (aix_thread_detach): Pass inferior down.
10397 * corefile.c (core_file_command): Pass current_inferior() down.
10398 * corelow.c (core_detach): Add inferior parameter.
10399 * darwin-nat.c (darwin_detach): Likewise.
10400 * gnu-nat.c (gnu_detach): Likewise.
10401 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10402 * infcmd.c (detach_command): Pass current_inferior() down to
10403 target_detach.
10404 * infrun.c (follow_fork_inferior): Pass parent_inf to
10405 target_detach.
10406 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10407 target_detach.
10408 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10409 * linux-thread-db.c (thread_db_detach): Likewise.
10410 * nto-procfs.c (procfs_detach): Likewise.
10411 * procfs.c (procfs_detach): Likewise.
10412 * record.c (record_detach): Likewise.
10413 * record.h (struct inferior): Forward-declare.
10414 (record_detach): Add inferior parameter.
10415 * remote-sim.c (gdbsim_detach): Likewise.
10416 * remote.c (remote_detach_1): Likewise.
10417 (remote_detach): Likewise.
10418 (extended_remote_detach): Likewise.
10419 * sol-thread.c (sol_thread_detach): Likewise.
10420 * target-debug.h (target_debug_print_inferior_p): New macro.
10421 * target-delegates.c: Re-generate.
10422 * top.c (kill_or_detach): Pass inferior down to target_detach.
10423 * windows-nat.c (windows_detach): Add inferior parameter.
10424
6bd6f3b6
SM
104252018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10426
10427 * target.h (struct target_ops) <to_detach>: Remove args
10428 parameter.
10429 (target_detach): Likewise.
10430 * target.c (dispose_inferior): Adjust.
10431 (target_detach): Remove args parameter, adjust.
10432 * aix-thread.c (aix_thread_detach): Adjust.
10433 * corefile.c (core_file_command): Adjust.
10434 * corelow.c (core_detach): Adjust.
10435 * darwin-nat.c (darwin_detach): Adjust.
10436 * gnu-nat.c (gnu_detach): Adjust.
10437 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10438 * infcmd.c (detach_command): Adjust
10439 * infrun.c (follow_fork_inferior): Adjust.
10440 (handle_vfork_child_exec_or_exit): Adjust.
10441 * linux-fork.c (linux_fork_detach): Remove args parameter.
10442 * linux-fork.h (linux_fork_detach): Likewise.
10443 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10444 * linux-thread-db.c (thread_db_detach): Likewise.
10445 * nto-procfs.c (procfs_detach): Likewise.
10446 * procfs.c (procfs_detach): Likewise.
10447 (do_detach): Remove signo parameter.
10448 * record.c (record_detach): Remove args parameter.
10449 * record.h (record_detach): Likewise.
10450 * remote-sim.c (gdbsim_detach): Likewise.
10451 * remote.c (remote_detach_1): Likewise.
10452 (remote_detach): Likewise.
10453 (extended_remote_detach): Likewise.
10454 * sol-thread.c (sol_thread_detach): Likewise.
10455 * target-delegates.c: Re-generate.
10456 * top.c (struct qt_args) <args>: Remove field.
10457 (kill_or_detach): Don't pass args.
10458 (quit_force): Don't set args.
10459 * windows-nat.c (windows_detach): Remove args parameter.
10460
88af8ea8
YQ
104612018-01-19 Yao Qi <yao.qi@linaro.org>
10462
10463 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10464 (arm_linux_init_abi): Install it.
10465
dea445b9
YQ
104662018-01-19 Yao Qi <yao.qi@linaro.org>
10467
10468 * osabi.c (gdb_osabi_names): Extend the regexp for
10469 arm-linux-gnueabihf.
10470
4a17f768
YQ
104712018-01-18 Yao Qi <yao.qi@linaro.org>
10472
10473 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10474 m_abbrevs.
10475 (abbrev_table::add_abbrev): Update.
10476 (abbrev_table::lookup_abbrev): Update.
10477
d679c21a
YQ
104782018-01-18 Yao Qi <yao.qi@linaro.org>
10479
10480 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10481
7d937cad
SDJ
104822018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10483
10484 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10485 to "std::string".
10486
9e14690d
TT
104872018-01-17 Tom Tromey <tom@tromey.com>
10488
10489 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10490
50a82047
TT
104912018-01-17 Tom Tromey <tom@tromey.com>
10492
10493 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10494 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10495 (create_array_type_with_stride): Update.
10496 * dwarf2read.c (set_die_type): Update.
10497
c89b44cd
TT
104982018-01-17 Tom Tromey <tom@tromey.com>
10499
10500 * dwarf2read.c (delayed_method_info): Remove typedef.
10501 (dwarf2_cu::method_info): Now a std::vector.
10502 (add_to_method_list): Update.
10503 (free_delayed_list): Remove.
10504 (compute_delayed_physnames): Update.
10505 (process_full_comp_unit, process_full_type_unit): Clear the method
10506 list. Remove cleanups.
10507 (psymtab_include_file_name): Add name_holder parameter. Use
10508 unique_xmalloc_ptr.
10509 (dwarf_decode_lines): Update.
10510
fcd3b13d
SM
105112018-01-17 Tom Tromey <tom@tromey.com>
10512 Simon Marchi <simon.marchi@ericsson.com>
10513
10514 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10515 (dwarf2_per_objfile::free_cached_comp_units)
10516 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10517 (init_cutu_and_read_dies_no_follow): Update.
10518 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10519 (dwarf2_cu::~dwarf2_cu): New.
10520 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10521 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10522
685af9cd
TT
105232018-01-17 Tom Tromey <tom@tromey.com>
10524 Simon Marchi <simon.marchi@ericsson.com>
10525
10526 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10527 (struct die_reader_specs) <abbrev_table>: New member.
10528 (struct abbrev_table): Add constructor.
10529 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10530 <abbrev_obstack>: Now an auto_obstack.
10531 (abbrev_table_up): New typedef.
10532 (init_cu_die_reader): Add abbrev_table parameter.
10533 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10534 Add result_dwo_abbrev_table.
10535 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10536 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10537 Update.
10538 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10539 parameter.
10540 (skip_children): Update.
10541 (abbrev_table::alloc_abbrev): Rename from
10542 abbrev_table_alloc_abbrev.
10543 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10544 (abbrev_table::lookup_abbrev): Rename from
10545 abbrev_table_lookup_abbrev.
10546 (abbrev_table_read_table): Return abbrev_table_up.
10547 (abbrev_table_free, abbrev_table_free_cleanup)
10548 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10549 (load_partial_dies): Update.
10550
5e2db402
TT
105512018-01-17 Tom Tromey <tom@tromey.com>
10552
10553 * dwarf2read.c (dwarf2_compute_name): Update comment.
10554 (read_func_scope, read_variable): Update.
10555 (new_symbol): Remove.
10556 (new_symbol_full): Rename to new_symbol.
10557
ee7f689e 105582018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
10559
10560 PR gdb/16577
10561 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10562 a warning instead of throwing an error, set section size to 0 and return
10563 NULL.
10564 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10565
4d9b86e1
SM
105662018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10567
10568 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10569 std::string.
10570 (linux_ptrace_attach_fail_reason_string): Likewise.
10571 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10572 Likewise.
10573 (linux_ptrace_attach_fail_reason_string): Likewise.
10574 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10575
a7b2d0fb
SM
105762018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10577
10578 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10579
f517c180
EA
105802018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10581
10582 PR gdb/21559
10583 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10584 checking for fs_base/gs_base fields in struct user_regs_struct.
10585 * configure: Regenerate.
10586
7045b1ca
YQ
105872018-01-17 Yao Qi <yao.qi@linaro.org>
10588
10589 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10590 function.
10591 (aarch64_linux_init_abi): Install it to gdbarch hook
10592 gcc_target_options.
10593
db422fb2
PA
105942018-01-15 Pedro Alves <palves@redhat.com>
10595
10596 * common/signals-state-save-restore.c
10597 (save_original_signals_state): Fix typos.
10598
ba643918
SDJ
105992017-01-12 Tom Tromey <tom@tromey.com>
10600 Sergio Durigan Junior <sergiodj@redhat.com>
10601
10602 * Makefile.in (install-only): Install gdb-add-index.
10603
906b4aac
JB
106042018-01-12 John Baldwin <jhb@FreeBSD.org>
10605
10606 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10607
bdf2a94a
AA
106082018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10609
10610 * infrun.c (keep_going_pass_signal): Clear step-over info when
10611 insert_breakpoints fails.
10612
71d378ae
PA
106132018-01-11 Pedro Alves <palves@redhat.com>
10614
10615 PR gdb/22583
10616 * infrun.c (resume): Rename to ...
10617 (resume_1): ... this.
10618 (resume): Reimplement as wrapper around resume_1.
10619
3cada740
PA
106202018-01-11 Pedro Alves <palves@redhat.com>
10621
10622 PR remote/22597
10623 * remote.c (remote_parse_stop_reply): Default to the last-set
10624 general thread instead of to 'magic_null_ptid'.
10625
618daa93
PA
106262018-01-10 Pedro Alves <palves@redhat.com>
10627
10628 * language.h (language_get_symbol_name_matcher): Rename ...
10629 (get_symbol_name_matcher): ... this.
10630 * language.c (language_get_symbol_name_matcher): Ditto.
10631 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10632 callers adjusted.
10633
c63d3e8d
PA
106342018-01-10 Pedro Alves <palves@redhat.com>
10635
10636 PR gdb/22670
10637 * dwarf2read.c
10638 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10639 Adjust to use language_get_symbol_name_matcher instead of
10640 language_defn::la_get_symbol_name_matcher.
10641 * language.c (language_get_symbol_name_matcher): If in Ada mode
10642 and the lookup name is a verbatim match, return Ada's matcher.
10643 * language.h (language_get_symbol_name_matcher): Adjust comment.
10644 (ada_lookup_name_info::verbatim_p):: New method.
10645
d4c2a405
PA
106462018-01-10 Pedro Alves <palves@redhat.com>
10647
10648 PR gdb/22670
10649 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10650 minsym's language is language_auto or language_cplus, pass down
10651 language_ada instead.
10652 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10653
8825213e
PA
106542018-01-10 Pedro Alves <palves@redhat.com>
10655
10656 PR gdb/22670
10657 * minsyms.c (linkage_name_str): New function.
10658 (iterate_over_minimal_symbols): Use it.
10659
2d97a5d9
JB
106602018-01-09 John Baldwin <jhb@FreeBSD.org>
10661
10662 * NEWS: Document that 'info proc' now works on FreeBSD.
10663
92fce24d
JB
106642018-01-09 John Baldwin <jhb@FreeBSD.org>
10665
10666 * configure.ac: Check for kinfo_getfile in libutil.
10667 * configure: Regenerate.
10668 * config.in: Regenerate.
10669 * fbsd-nat.c: Include "fbsd-tdep.h".
10670 (fbsd_fetch_cmdline): New.
10671 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10672 rather than calling error.
10673 (fbsd_info_proc): New.
10674 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10675 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10676 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10677
262f62f5
JB
106782018-01-09 John Baldwin <jhb@FreeBSD.org>
10679
10680 * fbsd-nat.c (struct free_deleter): Remove.
10681 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10682
b999e203
JB
106832018-01-09 John Baldwin <jhb@FreeBSD.org>
10684
10685 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10686 NULL for an empty pathname.
10687
d2176225
JB
106882018-01-09 John Baldwin <jhb@FreeBSD.org>
10689
10690 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10691 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10692 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10693 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10694 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10695 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10696 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10697 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10698 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10699 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10700 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10701 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10702 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10703 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10704 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10705
9c4ac400
ST
107062018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10707
10708 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10709 (gnu_xfer_auxv): New function.
10710 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10711 TARGET_OBJECT_AUXV.
10712
1e5ded6c
YQ
107132018-01-08 Yao Qi <yao.qi@linaro.org>
10714 Simon Marchi <simon.marchi@ericsson.com>
10715
10716 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10717 common/selftest.c.
10718 (COMMON_OBS): Remove selftest.o.
10719 * configure.ac: Append selftest-arch.c and common/selftest.c to
10720 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10721 * configure: Re-generated.
10722 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10723 GDB_SELF_TEST.
10724 (maintenance_info_selftests): Likewise.
10725
04bafb1e
XR
107262018-01-08 Xavier Roirand <roirand@adacore.com>
10727
10728 * ada-valprint.c (val_print_packed_array_elements): Use
10729 proper number of elements when printing an array indexed
10730 by an enumeration type.
10731
518817b3
SM
107322018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10733
10734 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10735 (dw2_get_file_names_reader): Adjust.
10736 (lookup_dwo_signatured_type): Adjust.
10737 (lookup_dwp_signatured_type): Adjust.
10738 (lookup_signatured_type): Adjust.
10739 (create_type_unit_group): Adjust.
10740 (get_type_unit_group): Adjust.
10741 (process_psymtab_comp_unit_reader): Adjust.
10742 (build_type_psymtabs_reader): Adjust.
10743 (scan_partial_symbols): Adjust.
10744 (add_partial_symbol): Adjust.
10745 (add_partial_subprogram): Adjust.
10746 (peek_die_abbrev): Adjust.
10747 (fixup_go_packaging): Adjust.
10748 (process_imported_unit_die): Adjust.
10749 (dwarf2_compute_name): Adjust.
10750 (dwarf2_physname): Adjust.
10751 (read_import_statement): Adjust.
10752 (handle_DW_AT_stmt_list): Adjust.
10753 (read_file_scope): Adjust.
10754 (read_func_scope): Adjust.
10755 (read_lexical_block_scope): Adjust.
10756 (read_call_site_scope): Adjust.
10757 (read_variable): Adjust.
10758 (dwarf2_rnglists_process): Adjust.
10759 (dwarf2_ranges_process): Adjust.
10760 (dwarf2_ranges_read): Adjust.
10761 (dwarf2_get_pc_bounds): Adjust.
10762 (dwarf2_record_block_ranges): Adjust.
10763 (dwarf2_add_field): Adjust.
10764 (dwarf2_add_member_fn): Adjust.
10765 (read_structure_type): Adjust.
10766 (process_structure_scope): Adjust.
10767 (read_enumeration_type): Adjust.
10768 (read_array_type): Adjust.
10769 (mark_common_block_symbol_computed): Adjust.
10770 (read_common_block): Adjust.
10771 (read_namespace_type): Adjust.
10772 (read_namespace): Adjust.
10773 (read_module_type): Adjust.
10774 (read_tag_pointer_type): Adjust.
10775 (read_tag_ptr_to_member_type): Adjust.
10776 (read_tag_string_type): Adjust.
10777 (read_subroutine_type): Adjust.
10778 (read_typedef): Adjust.
10779 (read_base_type): Adjust.
10780 (attr_to_dynamic_prop): Adjust.
10781 (read_subrange_type): Adjust.
10782 (read_unspecified_type): Adjust.
10783 (dwarf2_read_abbrevs): Adjust.
10784 (load_partial_dies): Adjust.
10785 (read_partial_die): Adjust.
10786 (find_partial_die): Adjust.
10787 (guess_partial_die_structure_name): Adjust.
10788 (fixup_partial_die): Adjust.
10789 (read_attribute_value): Adjust.
10790 (read_addr_index): Adjust.
10791 (read_addr_index_from_leb128): Adjust.
10792 (read_str_index): Adjust.
10793 (dwarf2_string_attr): Adjust.
10794 (get_debug_line_section): Adjust.
10795 (dwarf_decode_line_header): Adjust.
10796 (lnp_state_machine::check_line_address): Adjust.
10797 (dwarf_decode_lines_1): Adjust.
10798 (dwarf_decode_lines): Adjust.
10799 (dwarf2_start_symtab): Adjust.
10800 (var_decode_location): Adjust.
10801 (new_symbol_full): Adjust.
10802 (dwarf2_const_value_data): Adjust.
10803 (dwarf2_const_value_attr): Adjust.
10804 (dwarf2_const_value): Adjust.
10805 (die_type): Adjust.
10806 (die_containing_type): Adjust.
10807 (build_error_marker_type): Adjust.
10808 (lookup_die_type): Adjust.
10809 (guess_full_die_structure_name): Adjust.
10810 (anonymous_struct_prefix): Adjust.
10811 (determine_prefix): Adjust.
10812 (dwarf2_name): Adjust.
10813 (follow_die_ref_or_sig): Adjust.
10814 (follow_die_offset): Adjust.
10815 (follow_die_ref): Adjust.
10816 (follow_die_sig_1): Adjust.
10817 (follow_die_sig): Adjust.
10818 (get_signatured_type): Adjust.
10819 (get_DW_AT_signature_type): Adjust.
10820 (decode_locdesc): Adjust.
10821 (dwarf_decode_macros): Adjust.
10822 (cu_debug_loc_section): Adjust.
10823 (fill_in_loclist_baton): Adjust.
10824 (dwarf2_symbol_mark_computed): Adjust.
10825 (init_one_comp_unit): Don't assign
10826 dwarf2_cu::dwarf2_per_objfile.
10827 (set_die_type): Adjust.
10828
ed2dc618
SM
108292018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10830
10831 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10832 <dwarf2_per_objfile>: New field.
10833 (dwarf2_per_objfile): Remove global.
10834 (get_dwarf2_per_objfile): New function.
10835 (set_dwarf2_per_objfile): New function.
10836 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10837 dwarf2_per_objfile.
10838 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10839 (read_abbrev_offset): Likewise.
10840 (read_indirect_string): Likewise.
10841 (read_indirect_line_string): Likewise.
10842 (read_indirect_string_at_offset): Likewise.
10843 (read_indirect_string_from_dwz): Likewise.
10844 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10845 dwarf2_per_objfile.
10846 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10847 (create_all_comp_units): Change objfile parameter to
10848 dwarf2_per_objfile.
10849 (create_all_type_units): Likewise.
10850 (process_queue): Add dwarf2_per_objfile parameter.
10851 (read_and_check_comp_unit_head): Likewise.
10852 (lookup_dwo_unit_in_dwp): Likewise.
10853 (get_dwp_file): Likewise.
10854 (process_cu_includes): Likewise.
10855 (struct free_dwo_file_cleanup_data): New struct.
10856 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10857 set_dwarf2_per_objfile.
10858 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10859 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10860 context, adjust calls.
10861 (dw2_instantiate_symtab): Likewise.
10862 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10863 (dw2_get_cu): Likewise.
10864 (create_cu_from_index_list): Change objfile parameter to
10865 dwarf2_per_objfile.
10866 (create_cus_from_index_list): Get dwarf2_per_objfile from
10867 context, adjust calls.
10868 (create_cus_from_index): Likewise.
10869 (create_signatured_type_table_from_index): Change objfile
10870 parameter to dwarf2_per_objfile.
10871 (create_signatured_type_table_from_debug_names): Change objfile
10872 parameter to dwarf2_per_objfile.
10873 (create_addrmap_from_index): Likewise.
10874 (create_addrmap_from_aranges): Likewise.
10875 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10876 (dw2_setup): Remove.
10877 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10878 context.
10879 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10880 get_dwarf2_per_objfile.
10881 (dw2_forget_cached_source_info): Likewise.
10882 (dw2_map_symtabs_matching_filename): Likewise.
10883 (struct dw2_symtab_iterator) <index>: Remove.
10884 <dwarf2_per_objfile>: New field.
10885 (dw2_symtab_iter_init): Replace index parameter with
10886 dwarf2_per_objfile.
10887 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
10888 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
10889 (dw2_print_stats): Likewise.
10890 (dw2_dump): Likewise.
10891 (dw2_expand_symtabs_for_function): Likewise.
10892 (dw2_expand_all_symtabs): Likewise.
10893 (dw2_expand_symtabs_with_fullname): Likewise.
10894 (dw2_expand_marked_cus): Replace index and objfile parameters
10895 with dwarf2_per_objfile.
10896 (dw_expand_symtabs_matching_file_matcher): Add
10897 dwarf2_per_objfile parameter and adjust calls.
10898 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
10899 adjust calls.
10900 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
10901 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
10902 adjust calls.
10903 (create_cus_from_debug_names_list): Replace objfile parameter
10904 with dwarf2_per_objfile and adjust calls.
10905 (create_cus_from_debug_names): Likewise.
10906 (dwarf2_read_debug_names): Likewise.
10907 (mapped_debug_names::namei_to_name): Adjust call.
10908 (dw2_debug_names_iterator::next): Likewise.
10909 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
10910 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
10911 (dw2_debug_names_dump): Likewise.
10912 (dw2_debug_names_expand_symtabs_for_function): Likewise.
10913 (dw2_debug_names_expand_symtabs_matching): Likewise.
10914 (dwarf2_initialize_objfile): Likewise.
10915 (dwarf2_build_psymtabs): Likewise.
10916 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
10917 this_cu.
10918 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
10919 (read_and_check_comp_unit_head): Likewise.
10920 (read_abbrev_offset): Likewise.
10921 (create_debug_type_hash_table): Likewise.
10922 (create_debug_types_hash_table): Likewise.
10923 (create_all_type_units): Replace objfile parameter with
10924 dwarf2_per_objfile.
10925 (add_type_unit): Add dwarf2_per_objfile parameter.
10926 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
10927 with dwarf2_per_objfile.
10928 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
10929 (lookup_dwp_signatured_type): Likewise.
10930 (lookup_signatured_type): Likewise.
10931 (read_cutu_die_from_dwo): Likewise.
10932 (init_tu_and_read_dwo_dies): Likewise.
10933 (init_cutu_and_read_dies): Likewise.
10934 (init_cutu_and_read_dies_no_follow): Likewise.
10935 (allocate_type_unit_groups_table): Add objfile parameter.
10936 (create_type_unit_group): Use dwarf2_per_objfile from cu.
10937 (get_type_unit_group): Likewise.
10938 (process_psymtab_comp_unit): Update call.
10939 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
10940 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
10941 (print_tu_stats): Likewise.
10942 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
10943 in void* parameter.
10944 (build_type_psymtabs): Change objfile parameter to
10945 dwarf2_per_objfile.
10946 (process_skeletonless_type_unit): Use dwarf2_per_objfile
10947 passed in void* parameter.
10948 (process_skeletonless_type_units): Change objfile parameter to
10949 dwarf2_per_objfile.
10950 (set_partial_user): Likewise.
10951 (dwarf2_build_psymtabs_hard): Likewise.
10952 (read_comp_units_from_section): Likewise.
10953 (create_all_comp_units): Likewise.
10954 (scan_partial_symbols): Update calls.
10955 (add_partial_symbol): Likewise.
10956 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
10957 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
10958 (process_queue): Add dwarf2_per_objfile parameter.
10959 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
10960 (compute_compunit_symtab_includes): Likewise.
10961 (process_cu_includes): Add dwarf2_per_objfile parameter.
10962 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
10963 (process_full_type_unit): Likewise.
10964 (process_imported_unit_die): Update call.
10965 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
10966 (read_file_scope): Likewise.
10967 (allocate_dwo_file_hash_table): Add objfile parameter.
10968 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
10969 (create_cus_hash_table): Likewise.
10970 (create_dwp_hash_table): Likewise.
10971 (create_dwo_unit_in_dwp_v1): Likewise.
10972 (create_dwp_v2_section): Likewise.
10973 (create_dwo_unit_in_dwp_v2): Likewise.
10974 (lookup_dwo_unit_in_dwp): Likewise.
10975 (try_open_dwop_file): Likewise.
10976 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
10977 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
10978 cleanup to include a reference to dwarf2_per_objfile.
10979 (open_dwp_file): Add dwarf2_per_objfile parameter.
10980 (open_and_init_dwp_file): Likewise.
10981 (get_dwp_file): Likewise.
10982 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
10983 (queue_and_load_all_dwo_tus): Update call.
10984 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
10985 data.
10986 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
10987 (dwarf2_ranges_process): Likewise.
10988 (dwarf2_get_pc_bounds): Likewise.
10989 (mark_common_block_symbol_computed): Likewise.
10990 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10991 (dwarf2_read_abbrevs): Update call.
10992 (read_partial_die): Use dwarf2_per_objfile from cu.
10993 (find_partial_die): Likewise.
10994 (fixup_partial_die): Likewise.
10995 (read_attribute_value): Likewise.
10996 (read_indirect_string_at_offset_from): Add objfile parameter.
10997 (read_indirect_string_at_offset): Add dwarf2_per_objfile
10998 parameter.
10999 (read_indirect_string_from_dwz): Add objfile parameter.
11000 (read_indirect_string): Add objfile parameter.
11001 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11002 (read_addr_index): Use dwarf2_per_objfile from cu.
11003 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11004 call dw2_setup.
11005 (read_str_index): Use dwarf2_per_objfile from cu.
11006 (get_debug_line_section): Likewise.
11007 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11008 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11009 (new_symbol_full): Use dwarf2_per_objfile from cu.
11010 (build_error_marker_type): Likewise.
11011 (lookup_die_type): Likewise.
11012 (determine_prefix): Likewise.
11013 (follow_die_offset): Likewise.
11014 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11015 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11016 (dwarf2_fetch_die_type_sect_off): Likewise.
11017 (dwarf2_get_die_type): Likewise.
11018 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11019 (get_signatured_type): Likewise.
11020 (get_DW_AT_signature_type): Likewise.
11021 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11022 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11023 (cu_debug_loc_section): Likewise.
11024 (fill_in_loclist_baton): Likewise.
11025 (dwarf2_symbol_mark_computed): Likewise.
11026 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11027 dwarf2_per_objfile.
11028 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11029 parameter.
11030 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11031 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11032 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11033 (set_die_type): Use dwarf2_free_objfile from cu.
11034 (get_die_type_at_offset): Likewise.
11035 (dwarf2_per_objfile_free): Don't assign global variable.
11036 (debug_names) <constructor>: Add dwarf2_per_objfile
11037 parameter, update m_debugstrlookup construction.
11038 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11039 parameter.
11040 <m_dwarf2_per_objfile>: New field.
11041 <lookup>: Use m_dwarf2_per_objfile.
11042 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11043 (psyms_seen_size): Likewise.
11044 (write_gdbindex): Replace objfile parameter with
11045 dwarf2_per_objfile.
11046 (write_debug_names): Likewise.
11047 (write_psymtabs_to_index): Likewise.
11048 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11049 calls.
11050
e3b94546
SM
110512018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11052
11053 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11054 <dwarf2_per_objfile>: New field.
11055 (struct dwarf2_per_cu_data) <objfile>: Remove.
11056 <dwarf2_per_objfile>: New field.
11057 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11058 of objfile.
11059 (create_signatured_type_table_from_index): Likewise.
11060 (create_debug_type_hash_table): Likewise.
11061 (fill_in_sig_entry_from_dwo_entry): Likewise.
11062 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11063 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11064 objfile.
11065 (create_partial_symtab): Access objfile through
11066 dwarf2_per_objfile.
11067 (process_psymtab_comp_unit_reader): Likewise.
11068 (read_comp_units_from_section): Likewise.
11069 (scan_partial_symbols): Likewise.
11070 (add_partial_symbol): Likewise.
11071 (add_partial_subprogram): Likewise.
11072 (peek_die_abbrev): Likewise.
11073 (fixup_go_packaging): Likewise.
11074 (process_full_comp_unit): Likewise.
11075 (process_full_type_unit): Likewise.
11076 (process_imported_unit_die): Likewise.
11077 (dwarf2_compute_name): Likewise.
11078 (dwarf2_physname): Likewise.
11079 (read_import_statement): Likewise.
11080 (create_cus_hash_table): Assign dwarf2_physname instead of
11081 objfile.
11082 (read_func_scope): Access objfile through dwarf2_per_objfile.
11083 (read_lexical_block_scope): Likewise.
11084 (read_call_site_scope): Likewise.
11085 (read_variable): Likewise.
11086 (dwarf2_rnglists_process): Likewise.
11087 (dwarf2_ranges_process): Likewise.
11088 (dwarf2_ranges_read): Likewise.
11089 (dwarf2_record_block_ranges): Likewise.
11090 (dwarf2_add_field): Likewise.
11091 (dwarf2_add_member_fn): Likewise.
11092 (read_structure_type): Likewise.
11093 (process_structure_scope): Likewise.
11094 (read_enumeration_type): Likewise.
11095 (read_array_type): Likewise.
11096 (read_common_block): Likewise.
11097 (read_namespace_type): Likewise.
11098 (read_namespace): Likewise.
11099 (read_module_type): Likewise.
11100 (read_tag_pointer_type): Likewise.
11101 (read_tag_ptr_to_member_type): Likewise.
11102 (read_tag_string_type): Likewise.
11103 (read_subroutine_type): Likewise.
11104 (read_typedef): Likewise.
11105 (read_base_type): Likewise.
11106 (attr_to_dynamic_prop): Likewise.
11107 (read_subrange_type): Likewise.
11108 (read_unspecified_type): Likewise.
11109 (load_partial_dies): Likewise.
11110 (read_partial_die): Likewise.
11111 (find_partial_die): Likewise.
11112 (guess_partial_die_structure_name): Likewise.
11113 (fixup_partial_die): Likewise.
11114 (read_attribute_value): Likewise.
11115 (read_addr_index_from_leb128): Likewise.
11116 (dwarf2_read_addr_index): Likewise.
11117 (dwarf2_string_attr): Likewise.
11118 (lnp_state_machine::check_line_address): Likewise.
11119 (dwarf_decode_lines_1): Likewise.
11120 (dwarf_decode_lines): Likewise.
11121 (dwarf2_start_symtab): Likewise.
11122 (var_decode_location): Likewise.
11123 (new_symbol_full): Likewise.
11124 (dwarf2_const_value_data): Likewise.
11125 (dwarf2_const_value_attr): Likewise.
11126 (dwarf2_const_value): Likewise.
11127 (die_type): Likewise.
11128 (die_containing_type): Likewise.
11129 (lookup_die_type): Likewise.
11130 (guess_full_die_structure_name): Likewise.
11131 (anonymous_struct_prefix): Likewise.
11132 (dwarf2_name): Likewise.
11133 (follow_die_ref_or_sig): Likewise.
11134 (follow_die_offset): Likewise.
11135 (follow_die_ref): Likewise.
11136 (dwarf2_fetch_die_loc_sect_off): Likewise.
11137 (dwarf2_fetch_constant_bytes): Likewise.
11138 (dwarf2_fetch_die_type_sect_off): Likewise.
11139 (dwarf2_get_die_type): Likewise.
11140 (follow_die_sig): Likewise.
11141 (decode_locdesc): Likewise.
11142 (dwarf2_per_cu_objfile): Likewise.
11143 (dwarf2_per_cu_text_offset): Likewise.
11144 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11145 objfile.
11146 (set_die_type): Access objfile through
11147 dwarf2_per_objfile.
11148
b01ba14d
SM
111492018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11150
11151 * valprint.c (converted_character_d): Remove typedef.
11152 (DEF_VEC_O (converted_character_d)): Remove.
11153 (count_next_character): Use std::vector.
11154 (print_converted_chars_to_obstack): Likewise.
11155 (generic_printstr): Likewise.
11156
4d0fdd9b
SM
111572018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11158
11159 * xml-support.h (struct gdb_xml_value): Add constructor.
11160 <value>: Change type to unique_xmalloc_ptr.
11161 (gdb_xml_value_s): Remove typedef.
11162 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11163 (gdb_xml_element_start_handler): Change parameter type to
11164 std::vector.
11165 (xml_find_attribute): Likewise.
11166 * xml-support.c (xml_find_attribute): Change parameter type to
11167 std::vector and adjust.
11168 (gdb_xml_values_cleanup): Remove.
11169 (gdb_xml_parser::start_element): Adjust to std::vector.
11170 (xinclude_start_include): Change paraeter type to std::vector
11171 and adjust.
11172 * btrace.c (check_xml_btrace_version): Likewise.
11173 (parse_xml_btrace_block): Likewise.
11174 (parse_xml_btrace_pt_config_cpu): Likewise.
11175 (parse_xml_btrace_pt): Likewise.
11176 (parse_xml_btrace_conf_bts): Likewise.
11177 (parse_xml_btrace_conf_pt): Likewise.
11178 * memory-map.c (memory_map_start_memory): Likewise.
11179 (memory_map_start_property): Likewise.
11180 * osdata.c (osdata_start_osdata): Likewise.
11181 (osdata_start_item): Likewise.
11182 (osdata_start_column): Likewise.
11183 * remote.c (start_thread): Likewise.
11184 * solib-aix.c (library_list_start_library): Likewise.
11185 (library_list_start_list): Likewise.
11186 * solib-svr4.c (library_list_start_library): Likewise.
11187 (svr4_library_list_start_list): Likewise.
11188 * solib-target.c (library_list_start_segment): Likewise.
11189 (library_list_start_section): Likewise.
11190 (library_list_start_library): Likewise.
11191 (library_list_start_list): Likewise.
11192 * tracepoint.c (traceframe_info_start_memory): Likewise.
11193 (traceframe_info_start_tvar): Likewise.
11194 * xml-syscall.c (syscall_start_syscall): Likewise.
11195 * xml-tdesc.c (tdesc_start_target): Likewise.
11196 (tdesc_start_feature): Likewise.
11197 (tdesc_start_reg): Likewise.
11198 (tdesc_start_union): Likewise.
11199 (tdesc_start_struct): Likewise.
11200 (tdesc_start_flags): Likewise.
11201 (tdesc_start_enum): Likewise.
11202 (tdesc_start_field): Likewise.
11203 (tdesc_start_enum_value): Likewise.
11204 (tdesc_start_vector): Likewise.
11205
f979c73f
SM
112062018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11207
11208 * extension.h (struct xmethod_worker) <clone>: Remove.
11209 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11210 Remove.
11211 (python_xmethod_worker::clone): Remove.
11212 * valops.c (find_overload_match): Use std::move instead of
11213 clone.
11214
ba18742c
SM
112152018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11216
11217 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11218 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11219 <free_xmethod_worker_data>: Remove.
11220 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11221 <get_xmethod_arg_types>: Remove.
11222 <get_xmethod_result_type>: Remove.
11223 <invoke_xmethod>: Remove.
11224 * extension.c (new_xmethod_worker): Remove.
11225 (clone_xmethod_worker): Remove.
11226 (get_matching_xmethod_workers): Return void, pass std::vector by
11227 pointer.
11228 (get_xmethod_arg_types): Rename to...
11229 (xmethod_worker::get_arg_types): ... this, and adjust.
11230 (get_xmethod_result_type): Rename to...
11231 (xmethod_worker::get_result_type): ... this, and adjust.
11232 (invoke_xmethod): Remove.
11233 (free_xmethod_worker): Remove.
11234 (free_xmethod_worker_vec): Remove.
11235 * extension.h (enum ext_lang_rc): Move here from
11236 extension-priv.h.
11237 (struct xmethod_worker): Add constructor and destructor.
11238 <data>: Remove.
11239 <value>: Remove.
11240 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11241 virtual pure methods.
11242 <get_arg_types, get_result_type>: New methods.
11243 (xmethod_worker_ptr): Remove typedef.
11244 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11245 (xmethod_worker_vec): Remove typedef.
11246 (xmethod_worker_up): New typedef.
11247 (invoke_xmethod): Remove.
11248 (clone_xmethod_worker): Remove.
11249 (free_xmethod_worker): Remove.
11250 (free_xmethod_worker_vec): Remove.
11251 (get_xmethod_arg_types): Remove.
11252 (get_xmethod_result_type): Remove.
11253 * valops.c (find_method_list): Use std::vector, don't use
11254 intermediate vector.
11255 (value_find_oload_method_list): Use std::vector.
11256 (find_overload_match): Use std::vector.
11257 (find_oload_champ): Use std::vector.
11258 * value.c (value_free): Use operator delete.
11259 (value_of_xmethod): Rename to...
11260 (value_from_xmethod): ... this. Don't assign
11261 xmethod_worker::value, take rvalue-reference.
11262 (result_type_of_xmethod): Adjust.
11263 (call_xmethod): Adjust.
11264 * value.h: Include extension.h.
11265 (struct xmethod_worker): Don't forward-declare.
11266 (value_of_xmethod): Rename to...
11267 (value_from_xmethod): ... this, take rvalue-reference.
11268 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11269 (struct python_xmethod_worker): ... this, add constructor and
11270 destructor.
11271 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11272 (gdbpy_free_xmethod_worker_data): Rename to...
11273 (python_xmethod_worker::~python_xmethod_worker): ... this and
11274 adjust.
11275 (gdbpy_clone_xmethod_worker_data): Rename to...
11276 (python_xmethod_worker::clone): ... this and adjust.
11277 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11278 temporary vector.
11279 (gdbpy_get_xmethod_arg_types): Rename to...
11280 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11281 (gdbpy_get_xmethod_result_type): Rename to...
11282 (python_xmethod_worker::do_get_result_type): ... this and
11283 adjust.
11284 (gdbpy_invoke_xmethod): Rename to...
11285 (python_xmethod_worker::invoke): ... this and adjust.
11286 (new_python_xmethod_worker): Rename to...
11287 (python_xmethod_worker::python_xmethod_worker): ... this and
11288 adjust.
11289 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11290 Remove.
11291 (gdbpy_free_xmethod_worker_data): Remove.
11292 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11293 (gdbpy_get_xmethod_arg_types): Remove.
11294 (gdbpy_get_xmethod_result_type): Remove.
11295 (gdbpy_invoke_xmethod): Remove.
11296 * python/python.c (python_extension_ops): Remove obsolete
11297 callbacks.
11298
e379cee6
PA
112992018-01-05 Pedro Alves <palves@redhat.com>
11300
11301 PR gdb/18653
11302 * common/signals-state-save-restore.c
11303 (save_original_signals_state): New parameter 'quiet'. Warn if we
11304 find a custom handler preinstalled, instead of internal erroring.
11305 But only warn if !quiet.
11306 * common/signals-state-save-restore.h
11307 (save_original_signals_state): New parameter 'quiet'.
11308 * main.c (captured_main_1): Move save_original_signals_state call
11309 after option handling, and pass QUIET.
11310
a655456c
PA
113112018-01-05 Pedro Alves <palves@redhat.com>
11312
11313 * spu-tdep.c (spu_catch_start): Pass
11314 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11315
de63c46b
PA
113162018-01-05 Pedro Alves <palves@redhat.com>
11317
11318 PR gdb/22670
11319 * ada-lang.c (literal_symbol_name_matcher): New function.
11320 (ada_get_symbol_name_matcher): Use it for
11321 symbol_name_match_type::SEARCH_NAME.
11322 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11323 it down instead of assuming symbol_name_match_type::FULL.
11324 * block.h (block_lookup_symbol): New parameter 'match_type'.
11325 * c-valprint.c (print_unpacked_pointer): Use
11326 lookup_symbol_search_name instead of lookup_symbol.
11327 * compile/compile-object-load.c (get_out_value_type): Pass down
11328 symbol_name_match_type::SEARCH_NAME.
11329 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11330 symbol_name_match_type::FULL.
11331 * cp-support.c (cp_get_symbol_name_matcher): Handle
11332 symbol_name_match_type::SEARCH_NAME.
11333 * infrun.c (insert_exception_resume_breakpoint): Use
11334 lookup_symbol_search_name.
11335 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11336 * psymtab.c (maintenance_check_psymtabs): Use
11337 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11338 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11339 SYMBOL_SEARCH_NAME.
11340 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11341 if symbol_name_match_type::SEARCH_NAME.
11342 (lookup_symbol_in_language): Pass down
11343 symbol_name_match_type::FULL.
11344 (lookup_symbol_search_name): New.
11345 (lookup_language_this): Pass down
11346 symbol_name_match_type::SEARCH_NAME.
11347 (lookup_symbol_aux, lookup_local_symbol): New parameter
11348 'match_type'. Pass it down.
11349 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11350 (lookup_symbol_search_name): New declaration.
11351 (lookup_symbol_in_block): New 'match_type' parameter.
11352
f98fc17b
PA
113532018-01-05 Pedro Alves <palves@redhat.com>
11354
11355 PR gdb/22670
11356 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11357 ada_lookup_symbol.
11358 (ada_lookup_symbol): Reimplement in terms of
11359 ada_lookup_symbol_list, bits factored out from
11360 ada_lookup_encoded_symbol.
11361
342f8240
JB
113622018-01-05 Joel Brobecker <brobecker@adacore.com>
11363
11364 * ada-exp.y (write_object_renaming): When subscripting an array
11365 using a symbol as the index, pass the block in call to
11366 ada_lookup_encoded_symbol when looking that symbol up.
11367
7150d33c
JG
113682018-01-05 Jerome Guitton <guitton@adacore.com>
11369
11370 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11371 TYPE_INDEX_TYPE.
11372
cc0e770c
JB
113732018-01-05 Joel Brobecker <brobecker@adacore.com>
11374
11375 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11376 the case where VALUE_LVAL (val0) is not lval_memory.
11377
f79da888 113782018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11379
11380 * ada-valprint.c (print_optional_low_bound): Handle
11381 character-indexed array printing like boolean-indexed array
11382 printing.
11383
cd385f94
JB
113842018-01-05 Joel Brobecker <brobecker@adacore.com>
11385
11386 * NEWS: Create a new section for the next release branch.
11387 Rename the section of the current branch, now that it has
11388 been cut.
11389
09aca949
JB
113902018-01-05 Joel Brobecker <brobecker@adacore.com>
11391
11392 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11393 * version.in: Bump version to 8.1.50.DATE-git.
11394
9f757bf7
XR
113952018-01-03 Xavier Roirand <roirand@adacore.com>
11396
11397 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11398 Add field.
11399 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11400 Add field.
11401 (default_exception_support_info) <catch_handlers_sym>: Add field.
11402 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11403 (ada_exception_name_addr_1): Add "catch handlers" handling.
11404 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11405 Update all callers.
11406 (create_excep_cond_exprs) <ex>: Add parameter.
11407 (re_set_exception): Update create_excep_cond_exprs call.
11408 (print_it_exception, print_one_exception, print_mention_exception)
11409 (print_recreate_exception): Add "catch handler" handling.
11410 (allocate_location_catch_handlers, re_set_catch_handlers)
11411 (check_status_catch_handlers, print_it_catch_handlers)
11412 (print_one_catch_handlers, print_mention_catch_handlers)
11413 (print_recreate_catch_handlers): New function.
11414 (catch_handlers_breakpoint_ops): New variable.
11415 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11416 Add parameter. Add "catch handler" handling.
11417 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11418 Add "catch handler" handling.
11419 (ada_exception_catchpoint_cond_string): Add "catch handler"
11420 handling.
11421 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11422 call.
11423 (catch_ada_handlers_command): New function.
11424 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11425 operations structure.
11426 (_initialize_ada_language): Add "catch handlers" command entry.
11427 * NEWS: Document "catch handlers" feature.
11428
9fe561ab
JB
114292018-01-02 Joel Brobecker <brobecker@adacore.com>
11430
11431 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11432 account when creating the array type of the slice.
11433 (ada_value_slice): Likewise.
11434
a405673c
JB
114352018-01-02 Joel Brobecker <brobecker@adacore.com>
11436
11437 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11438 New enum value.
11439 (create_array_type_with_stride): Add byte_stride_prop parameter.
11440 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11441 New parameter. Update all callers in this file.
11442 (array_type_has_dynamic_stride): New function.
11443 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11444 of arrays with dynamic byte strides.
11445 * dwarf2read.c (read_array_type): Add support for dynamic
11446 DW_AT_byte_stride attributes.
11447
74a2f8ff
JB
114482018-01-02 Joel Brobecker <brobecker@adacore.com>
11449
11450 * dwarf2read.c (read_unspecified_type): Treat
11451 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11452
e2882c85
JB
114532018-01-01 Joel Brobecker <brobecker@adacore.com>
11454
11455 Update copyright year range in all GDB files.
11456
1690bb24
JB
114572018-01-01 Joel Brobecker <brobecker@adacore.com>
11458
11459 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11460 and gdb/testsuite/gdb.base/step-line.c.
11461
0f0c98a8
JB
114622018-01-01 Joel Brobecker <brobecker@adacore.com>
11463
11464 * copyright.py (main): Dump the contents of
11465 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11466 even if BY_HAND is empty.
11467
82e1e79a
JB
114682018-01-01 Joel Brobecker <brobecker@adacore.com>
11469
11470 * top.c (print_gdb_version): Update Copyright year in version
11471 message.
11472
053f54e5 114732018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11474
053f54e5 11475 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11476
053f54e5 11477For older changes see ChangeLog-2017.
c906108c
SS
11478\f
11479Local Variables:
11480mode: change-log
11481left-margin: 8
11482fill-column: 74
11483version-control: never
57da7796 11484coding: utf-8
c906108c 11485End:
This page took 2.848816 seconds and 4 git commands to generate.