Use unique_ptr for htabs
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
0cfbf430
KS
12018-08-10 Keith Seitz <keiths@redhat.com>
2
3 * compile/compile-internal.h (compile_instance::~compile_instance):
4 Remove calls to htab_delete.
5 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
6 * compile.c (compile_instance::compile_instance): Initialize
7 htab unique pointers.
8 (compile_instance::get_cached_type, compile_instance::insert_type)
9 (compile_instance::error_symbol_once): Update for unique_ptr.
10
946d3d10
KS
112018-08-10 Keith Seitz <keiths@redhat.com>
12
13 * compile/compile-c-symbols.c (struct symbol_error)
14 (hash_symbol_error, eq_symbol_error, del_symbol_error)
15 (compile_instance::insert_symbol_error)
16 (compile_instance::error_symbol_once): Move to ...
17 * compile/compile.c: ... here.
18
9cdfd9a2
KS
192018-08-10 Keith Seitz <keiths@redhat.com>
20
21 * compile/compile-c-support.c (c_get_compile_context): Use `new'
22 instead of `new_compile_instance'.
23 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
24 Update description.
25 If the symbol error map is not initialized, create it.
26 (generate_c_for_for_one_symbol): Do not check/initialize
27 the symbol error map.
28 * compile/compile-c-types.c (compile_c_instance): Make a class.
29 Update all callers.
30 (compile_instance::compile_instance): Initialize the type cache.
31 (get_cached_type): New function.
32 (insert_type): Update description.
33 (compile_c_instance::m_default_cflags): Define.
34 (convert_type): Update description. Use get_cached_type.
35 (delete_instance): Moved to destructor.
36 (new_compile_instance): Moved to constructor.
37 * compile/compile-c.h (compile_c_instance): Make class inheriting
38 from compile_instance.
39 <base>: Remove field.
40 <type_map, symbol_err_map>: Move to base class.
41 <c_plugin>: Rename to `m_plugin' and remove pointer type.
42 * compile/compile-internal.h (compile_instance): Make class.
43 <type_map_t, symbol_err_map_t>: Define.
44 <fe>: Rename to `m_gcc_fe'.
45 <scope, block, gcc_target_options>: Add `m_' prefix.
46 <m_type_map, m_symbol_err_map>: New fields, moved from
47 compile_c_instance.
48 <destroy>: Remove.
49 (convert_type, new_compile_instance): Remove.
50 * compile/compile.c (cleanup_compile_instance): Remove.
51 (compile_to_object): Use unique_ptr to eliminate cleanups.
52 (compile_instance::set_print_callback, compile_instance::version)
53 (compile_instance::set_verbose)
54 (compile_instance::set_driver_filename)
55 (compile_instance::set_triplet_regexp)
56 (compile_instance::set_arguments)
57 (compile_instance::set_source_file)
58 (compile_instance::compile): Define.
59
18cdc6d8
KS
602018-08-10 Keith Seitz <keiths@redhat.com>
61
62 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
63 * compile/compile-c-types.c: Define GCC_METHODN macros and include
64 gcc-c-fe.def to define C plugin.
65 (delete_instance): Delete `c_plugin'.
66 (new_compile_instance): Initialize `c_plugin'.
67 * compile/compile-c.h: Include gcc_c_plugin.h.
68 (struct compile_c_instance) <c_plugin>: New member.
69 * gcc-c-plugin.h: New file.
70 Update all callers with API change.
71
b7dc48b4
KS
722018-08-10 Keith Seitz <keiths@redhat.com>
73
74 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
75 (HFILES_NO_SRCDIR): ... to here.
76 Add compile-internal.h and compile-c.h.
77 * compile/compile-c-support.c: Include compile-c.h.
78 * compile/compile-c-symbols.c: Include compile-c.h.
79 (generate_c_for_variable_locations): Update comment.
80 * compile/compile-c-types.c: Include compile-c.h.
81 * compile/compile-c.h: New file -- moved C language declarations
82 from other files here.
83 * compile/compile-internal.h: Do not include hashtab.h or
84 common/enum-flags.h.
85 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
86 (gcc_convert_symbol, gcc_symbol_address)
87 (generate_c_for_variable_locations, c_get_mode_for_size)
88 (c_get_range_decl_name): Definitions moved to compile-c.h.
89 * compile/compile-loc2c.c: Include compile-c.h.
90
6f36b6d2
KS
912018-08-10 Keith Seitz <keiths@redhat.com>
92
93 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
94 (c_symbol_substitution_name): ... this.
95 Update all callers.
96
bd923e51
KS
972018-08-10 Keith Seitz <keiths@redhat.com>
98
99 * compile/compile-c-support.c (c_compute_program): Use
100 unique_xmalloc_ptr to eliminate cleanup.
101 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
102 Return a unique_xmalloc_ptr and eliminate cleanup.
103 * compile/compile-internal.h (generate_c_for_variable_locations):
104 Return unique_xmalloc_ptr and update description.
105
dbd534fe
AH
1062018-08-10 Alan Hayward <alan.hayward@arm.com>
107
108 * corelow.c (core_target::get_core_register_section): Rename
109 min_size to section_min_size.
110
90ad3654
JW
1112018-08-09 Jim Wilson <jimw@sifive.com>
112
52a187f8
JW
113 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
114 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
115 * NEWS: Mention new GNU/Linux RISC-V target.
116 * configure.host: Add riscv*-*-linux*.
117 * configure.nat: Add riscv*.
118 * configure.tgt: Add riscv*-*-linux*.
3c77f97e 119 * riscv-linux-nat.c: New file.
90ad3654
JW
120 * riscv-linux-tdep.c: New file.
121
aff4e175
AB
1222018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
123
124 * infrun.c (resume): Make static, add forward declaration.
125 (proceed): Update header comment.
126 * infrun.h (resume): Delete declaration.
127
06ab9219
TT
1282018-08-09 Tom Tromey <tom@tromey.com>
129
130 * riscv-tdep.h: Minor formatting fixes.
131
83c8d318
SM
1322018-08-09 Simon Marchi <simon.marchi@ericsson.com>
133
134 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
135 * dwarf-index-cache.c (create_dir_and_check): Likewise.
136 (test_mkdir_recursive): Likewise.
137 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
138
5ff2bbae
AB
1392018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
140
141 * valarith.c (value_subscripted_rvalue): If an array is not in
142 memory, and we don't know the upper bound, then we can't know that
143 the requested element exists or not.
144
fdbac7d8
SM
1452018-08-08 Simon Marchi <simon.marchi@ericsson.com>
146
147 * target.c (str_comma_list_concat_elem): Fix typo in comment.
148 (target_options_to_string): Add comment.
149
83202f7a
TT
1502018-08-08 Tom Tromey <tom@tromey.com>
151
152 * unittests/scoped_mmap-selftests.c: Check result of "write".
153
411baa47
JW
1542018-08-08 Jim Wilson <jimw@sifive.com>
155
5c720ed8
JW
156 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
157 (decode_register_index_short): New.
158 (decode_j_type_insn, decode_cj_type_insn): New.
159 (decode_b_type_insn, decode_cb_type_insn): New.
160 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
161 local xlen. Check xlen when decoding ambiguous compressed insns. In
162 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
163 is_c_sw_insn instead of is_sw_insn.
164 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
165 (riscv_software_single_step): New.
166 * riscv-tdep.h (riscv_software_single_step): Declare.
167
411baa47
JW
168 * riscv-tdep.c (riscv_isa_xlen): Drop static.
169 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
170
9d4a934c
AB
1712018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
172
173 PR gdb/18050:
174 * target.c (dispose_inferior): Don't dispose of inferiors that are
175 already killed.
176
ff36536c
SN
1772018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
178
179 * remote.c (remote_target::download_tracepoint): Change char* to
180 const char*.
181
09ce46f2
SM
1822018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
183
184 * target.h (target_options_to_string): Return an std::string.
185 * target.c (str_comma_list_concat_elem): Return void, use
186 std::string.
187 (do_option): Likewise.
188 (target_options_to_string): Return an std::string.
189 * linux-nat.c (linux_nat_target::wait): Adjust.
190 * target-debug.h (target_debug_print_options): Adjust.
191
9c612964
TT
1922018-08-07 Tom Tromey <tom@tromey.com>
193
194 * Makefile.in (CPPFLAGS): New variable.
195 (INTERNAL_CPPFLAGS): Use it.
196
7d11235d
SM
1972018-08-07 Simon Marchi <simon.marchi@ericsson.com>
198
199 * NEWS: Mention the index cache.
200
87d6a7aa
SM
2012018-08-07 Simon Marchi <simon.marchi@ericsson.com>
202
203 * common/pathstuff.h (get_standard_cache_dir): New.
204 * common/pathstuff.c (get_standard_cache_dir): New.
205 * build-id.h (build_id_to_string): New.
206 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
207 DEBUG_STR_SUFFIX): Move to here.
208 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
209 DEBUG_STR_SUFFIX): Move from there.
210 (write_psymtabs_to_index): Make non-static, add basename
211 parameter. Write to temporary files, rename when done.
212 (save_gdb_index_command): Adjust call to
213 write_psymtabs_to_index.
214 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
215 field.
216 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
217 (get_gdb_index_contents_from_cache): New.
218 (get_gdb_index_contents_from_cache_dwz): New.
219 (dwarf2_initialize_objfile): Read index from cache.
220 (dwarf2_build_psymtabs): Save to index.
221 * dwarf-index-cache.h: New file.
222 * dwarf-index-cache.c: New file.
223 * dwarf-index-write.h: New file.
224
8a99096f
SM
2252018-08-07 Simon Marchi <simon.marchi@ericsson.com>
226
227 * gnulib/aclocal.m4: Re-generate.
228 * gnulib/config.in: Re-generate.
229 * gnulib/configure: Re-generate.
230 * gnulib/import/Makefile.am: Re-generate.
231 * gnulib/import/Makefile.in: Re-generate.
232 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
233 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
234 * gnulib/import/m4/mkdir.m4: New file.
235 * gnulib/import/mkdir.c: New file.
236 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
237 module.
238
5c831bb1
SM
2392018-08-07 Simon Marchi <simon.marchi@ericsson.com>
240
241 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
242 * common/scoped_mmap.c: New file.
243 * common/scoped_mmap.h (destroy): New method.
244 (~scoped_mmap, reset): Use destroy.
245 (scoped_mmap): New move constructor.
246 (mmap_file): New declaration.
247 * unittests/scoped_mmap-selftests.c (test_normal,
248 test_invalid_filename, run_tests): New functions.
249 (_initialize_scoped_mmap_selftests): Register selftest.
250
4485a1c1
SM
2512018-08-07 Simon Marchi <simon.marchi@ericsson.com>
252
253 * dwarf2read.c (read_gdb_index_from_section): Rename to...
254 (read_gdb_index_from_buffer): ... this. Remove section
255 parameter, add buffer parameter.
256 (get_gdb_index_contents_ftype,
257 get_gdb_index_contents_dwz_ftype): New typedefs.
258 (dwarf2_read_gdb_index): Add callback parameters to get the
259 index contents.
260 (get_gdb_index_contents_from_section): New.
261 (dwarf2_initialize_objfile): Update call to
262 dwarf2_read_gdb_index.
263
528e1572
SM
2642018-08-07 Simon Marchi <simon.marchi@ericsson.com>
265
266 * common/filestuff.h (gdb_fopen_cloexec): New overload.
267 (gdb_open_cloexec): Likewise.
268 * nat/linux-osdata.c (command_from_pid): Use string_printf.
269 (commandline_from_pid): Likewise.
270 (linux_xfer_osdata_threads): Likewise.
271 (linux_xfer_osdata_fds): Likewise.
272 * ada-lang.c (is_package_name): Likewise.
273 * auxv.c (procfs_xfer_auxv): Likewise.
274 * breakpoint.c (print_one_breakpoint_location): Use
275 uiout::field_fmt.
276 (print_one_catch_solib): Use string_printf.
277 * coff-pe-read.c (add_pe_exported_sym): Likewise.
278 (add_pe_forwarded_sym): Likewise.
279 * dwarf2read.c (create_type_unit_group): Likewise.
280 (build_error_marker_type): Likewise.
281 * infcall.c (get_function_name): Likewise.
282 * valprint.c (print_converted_chars_to_obstack): Likewise.
283 * xtensa-tdep.c (xtensa_register_type): Likewise.
284
a7f25a84
SM
2852018-08-06 Simon Marchi <simon.marchi@ericsson.com>
286
287 * remote.c (remote_target::download_tracepoint): Fix format
288 string errors.
289
296956be
PFC
2902018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
291
292 * tracefile.c: Include common/byte-vector.h.
293 (trace_save): Change type of buf to gdb::byte_vector. Initialize
294 with trace_regblock_size if needed. Update uses of buf.
295
a04b9d62
PFC
2962018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
297
298 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
299 std::vector<unsigned char>.
300 * tracepoint.c (collection_list::collection_list): Remove
301 m_regs_mask initializer from initializer list. Resize
302 m_regs_mask using the largest remote register number.
303 (collection_list::add_remote_register): Remove size check on
304 m_regs_mask. Use at to access element.
305 (collection_list::stringify): Change type of temp_buf to
306 gdb::char_vector. Update uses of temp_buf. Resize if needed to
307 stringify the register mask. Use pack_hex_byte for the register
308 mask.
309
4277c4b8
PFC
3102018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
311
312 * tracepoint.h (class collection_list) <add_register>: Remove.
313 <add_remote_register, add_ax_registers, add_local_register>:
314 Declare.
315 <add_memrange>: Add scope parameter.
316 * tracepoint.c (encode_actions_1): Likewise.
317 (collection_list::add_register): Rename to ...
318 (collection_list::add_remote_register): ... this. Update
319 comment.
320 (collection_list::add_ax_registers, add_local_register): New
321 methods.
322 (collection_list::add_memrange): Add scope parameter. Call
323 add_local_register instead of add_register.
324 (finalize_tracepoint_aexpr): New function.
325 (collection_list::collect_symbol): Update calls to add_memrange.
326 Call add_local_register instead of add_register. Call
327 add_ax_registers. Call finalize_tracepoint_aexpr.
328 (encode_actions_1): Get remote regnos for $reg action. Call
329 add_remote_register, add_ax_registers, and add_local_register.
330 Update call to add_memrange. Call finalize_tracepoint_aexpr.
331 (validate_actionline): Call finalize_tracepoint_aexpr.
332
3df3a985
PFC
3332018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
334
335 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
336 Replace array buf with gdb::char_vector buf, of size
337 get_remote_packet_size (). Replace references to buf and
338 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
339 and xsnprintf with snprintf. Raise errors if the buffer is too
340 small.
341
aa6f3694
PFC
3422018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
343
344 * remote.c (remote_target::download_tracepoint): Fix the has_more
345 predicate in the QTDP action list iteration.
346
05abfc39
PFC
3472018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
348
349 * remote.c (remote_target::download_tracepoint): Fix indentation
350 in for block.
351
821a2682
RO
3522018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
353
354 * proc-api.c (_initialize_proc_api): Remove c, unused.
355 * procfs.c (procfs_init_inferior): Remove signals, unused.
356 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
357 unused.
358
95347337
AB
3592018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
360 Andrew Burgess <andrew.burgess@embecosm.com>
361
362 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
363 'W_STOPCODE (0)' as this could be ambiguous.
364
425699f5
SDJ
3652018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
366
367 * ser-tcp.c (net_open): Fix thinko when deciding whether to
368 disable TCP's Nagle algorithm (use "ai_protocol" instead of
369 "ai_socktype").
370
3e1d3d8c
TT
3712018-08-02 Tom Tromey <tom@tromey.com>
372
373 PR symtab/16842.
374 * dwarf2read.c (read_func_scope): Set symtab on template parameter
375 symbols.
376 (process_structure_scope): Likewise.
377
15843549
XR
3782018-08-02 Xavier Roirand <roirand@adacore.com>
379
380 PR gdb/22629:
381 * darwin-nat.c (darwin_kill_inferior): Fix handling of
382 kill inferior.
383
b5bddbbb
TT
3842018-08-02 Tom Tromey <tom@tromey.com>
385
386 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
387 (darwin_suspend_inferior, darwin_resume_inferior)
388 (darwin_decode_notify_message, darwin_resume_inferior_threads)
389 (darwin_check_new_threads): Check result of get_darwin_inferior.
390
f61cfa07
JB
3912018-07-31 Joel Brobecker <brobecker@adacore.com>
392
393 GDB 8.1.1 released.
394
5abe0f0c
JV
3952018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
396
397 * varobj.c (varobj_get_path_expr_parent): Report an error if
398 parent is a dynamic varobj.
399
472fa5ee
SM
4002018-07-31 Simon Marchi <simon.marchi@ericsson.com>
401
402 * gnulib/aclocal.m4: Re-generate.
403 * gnulib/config.in: Re-generate.
404 * gnulib/configure: Re-generate.
405 * gnulib/import/Makefile.in: Re-generate.
406 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
407 * gnulib/import/m4/onceonly.m4: Re-generate.
408
1c28969e
SM
4092018-07-31 Simon Marchi <simon.marchi@ericsson.com>
410
411 * target-descriptions.c (struct xml_test_tdesc): New.
412 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
413 (record_xml_tdesc): Update.
414 (maintenance_check_xml_descriptions): Update.
415 * target-descriptions.h (record_xml_tdesc): Update comment.
416
c8f2dc0d
AB
4172018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
418
419 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
420 checking array bounds are defined.
421
463c08d1
TT
4222018-07-30 Tom Tromey <tom@tromey.com>
423
424 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
425 irreflexivity violation.
426
dba7455e
TT
4272018-07-30 Tom Tromey <tom@tromey.com>
428
429 * cli/cli-decode.c (lookup_cmd): Remove lint code.
430 * value.c (unpack_long): Remove lint code.
431 * valops.c (value_ind): Remove lint code.
432 * valarith.c (value_x_binop, value_x_unop, value_equal)
433 (value_pos): Remove lint code.
434
37cc0cae
TV
4352018-07-28 Tom de Vries <tdevries@suse.de>
436
437 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
438 with undefined upper bound as <optimized out>.
439
129eb0f1
SDJ
4402018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
441
442 * gcore.in: Rename variable "name" to "prefix". Expand
443 "usage" text.
444
6af79d7b
JT
4452018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
446
447 * windows-nat.c (windows_nat_target::create_inferior): Update to
448 call close() in global namespace.
449
79748972
TT
4502018-07-26 Tom Tromey <tom@tromey.com>
451
452 * dwarf-index-write.c (add_address_entry): Don't add objfile
453 offsets.
454 * dbxread.c (find_stab_function): Rename from
455 find_stab_function_addr. Return a bound_minimal_symbol.
456 (read_dbx_symtab): Use raw_text_low, raw_text_high.
457 Don't add objfile offsets.
458 (end_psymtab): Use raw_text_low, raw_text_high,
459 MSYMBOL_VALUE_RAW_ADDRESS.
460 (read_ofile_symtab): Update.
461 (process_one_symbol): Update.
462 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
463 offsets.
464 (dw2_relocate): Remove.
465 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
466 searching addrmap.
467 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
468 Update.
469 (process_psymtab_comp_unit_reader, add_partial_symbol)
470 (add_partial_subprogram, dwarf2_ranges_read): Update.
471 (load_partial_dies): Update.
472 (add_address_entry): Don't add objfile offsets.
473 (dwarf2_build_include_psymtabs): Update.
474 (create_addrmap_from_aranges): Don't add objfile offsets.
475 (dw2_find_pc_sect_compunit_symtab): Update.
476 * mdebugread.c (parse_symbol): Don't add objfile offsets.
477 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
478 Update.
479 (parse_partial_symbols): Don't add objfile offsets. Use
480 raw_text_low, raw_text_high. Update.
481 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
482 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
483 or call 'relocate' quick function. Clear psymbol_map.
484 * psympriv.h (struct partial_symbol) <address>: Add section
485 offset.
486 <set_unrelocated_address>: Rename from set_address.
487 <raw_text_low, raw_text_high>: New methods.
488 <text_low, text_high>: Add objfile parameter.
489 (add_psymbol_to_bcache): Add 'section' parameter. Call
490 set_unrelocated_address.
491 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
492 (find_pc_psymbol): Update.
493 (fixup_psymbol_section, relocate_psymtabs): Remove.
494 (dump_psymtab, psym_functions): Update.
495 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
496 parameter.
497 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
498 (start_psymtab_common): Update.
499 * symfile-debug.c (debug_qf_relocate): Remove.
500 (debug_sym_quick_functions): Update.
501 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
502 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
503 Update.
504
52948f01
TT
5052018-07-26 Tom Tromey <tromey@redhat.com>
506
507 * dbxread.c (end_psymtab): Use text_high_valid and
508 text_low_valid.
509 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
510 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
511 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
512 Update comment.
513 <text_low_valid, text_high_valid>: New fields.
514 <set_text_low, set_text_high>: Update.
515 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
516
4ae976d1
TT
5172018-07-26 Tom Tromey <tom@tromey.com>
518
519 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
520 Update.
521 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
522 textlow and texthigh fields.
523 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
524 Update.
525 * mdebugread.c (parse_lines, parse_partial_symbols)
526 (psymtab_to_symtab_1): Update.
527 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
528 Rename fields. Update comment. Now private.
529 <text_low, text_high, set_text_low, set_text_high>: New methods.
530 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
531 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
532 (start_psymtab_common, maintenance_info_psymtabs)
533 (maintenance_check_psymtabs): Update.
534 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
535 texthigh fields.
536 (scan_xcoff_symtab): Update.
537
02e9e7f7
TT
5382018-07-26 Tom Tromey <tromey@redhat.com>
539
540 * psympriv.h (struct partial_symbol) <unrelocated_address,
541 address, set_address>: New methods.
542 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
543 (fixup_psymbol_section, relocate_psymtabs): Update.
544 (print_partial_symbols): Add 'objfile' parameter. Update.
545 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
546 Update.
547
8a6d4234
TT
5482018-07-26 Tom Tromey <tom@tromey.com>
549
550 * dwarf-index-write.c (write_psymbols, debug_names::insert)
551 (debug_names::write_psymbols): Update.
552 * psympriv.h (struct partial_symbol): Derive from
553 general_symbol_info.
554 <obj_section>: New method.
555 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
556 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
557 (find_pc_sect_psymbol, fixup_psymbol_section)
558 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
559 (print_partial_symbols, recursively_search_psymtabs)
560 (compare_psymbols, psymbol_hash, psymbol_compare)
561 (add_psymbol_to_bcache, maintenance_check_psymtabs)
562 (psymbol_name_matches, psym_fill_psymbol_map): Update.
563
08994e1d
TT
5642018-07-26 Tom Tromey <tromey@redhat.com>
565
566 * dbxread.c (end_psymtab): Remove dead code.
567
3c3bb058
AB
5682018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
569
570 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
571 DWARF unwinders are disabled.
572 * dwarf2-frame.c: Add dwarf2read.h include.
573 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
574 disabled.
575 (dwarf2_frame_unwinders_enabled_p): Define.
576 (show_dwarf_unwinders_enabled_p): New function.
577 (_initialize_dwarf2_frame): Register switch to control DWARF
578 unwinder use.
579 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
580 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
581 (show_dwarf_cmdlist): Remove static keyword.
582 * dwarf2read.h (set_dwarf_cmdlist): Declare.
583 (show_dwarf_cmdlist): Declare.
584 * NEWS: Document new feature.
585
9e7f3bbb
TV
5862018-07-26 Tom de Vries <tdevries@suse.de>
587
588 PR breakpoints/23366
589 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
590
506f5c41
TV
5912018-07-26 Tom de Vries <tdevries@suse.de>
592
593 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
594 DW_AT_count can't be translated to a dynamic prop.
595
16f808ec
TV
5962018-07-25 Tom de Vries <tdevries@suse.de>
597
598 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
599 try/catch.
600
d7154a8d
JV
6012018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
602
603 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
604
a45389f6
JB
6052018-07-25 Joel Brobecker <brobecker@adacore.com>
606
607 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
608
380618d6
KS
6092018-07-24 Keith Seitz <keiths@redhat.comt
610
611 PR symtab/23010
612 * dwarf2read.c (dw2_add_symbol_to_list): New function.
613 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
614 instead of add_symbol_to_list.
615 (read_file_scope): Call prepare_one_comp_unit before reading
616 any other DIEs.
617
4b17aefe
SM
6182018-07-24 Simon Marchi <simon.marchi@ericsson.com>
619
620 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
621
29d17e47
TT
6222018-07-24 Tom Tromey <tom@tromey.com>
623
624 * utils.c (malloc, realloc, free): Don't declare.
625 * configure, config.in: Rebuild.
626 * configure.ac: Don't check for declarations of free, malloc, or
627 realloc.
628
cf4088a9
SM
6292018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
630
631 * aarch64-linux-nat.c
632 (aarch64_linux_nat_target::stopped_data_address): Remove unused
633 variable.
634 * arm-linux-nat.c (fetch_regs): Likewise.
635 (store_regs): Likewise.
636 (fetch_vfp_regs): Likewise.
637 (store_vfp_regs): Likewise.
638 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
639 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
640 (arm_linux_nat_target::insert_watchpoint): Likewise.
641 (arm_linux_nat_target::remove_watchpoint): Likewise.
642 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
643 Likewise.
644 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
645 Likewise.
646 * ppc-linux-nat.c (fetch_register): Likewise.
647 (fetch_all_gp_regs): Likewise.
648 (fetch_ppc_registers): Likewise.
649 (store_all_gp_regs): Likewise.
650 (store_ppc_registers): Likewise.
651 (hwdebug_insert_point): Likewise.
652 (can_use_watchpoint_cond_accel): Likewise.
653 * remote-sim.c (gdb_os_write_stdout): Likewise.
654
a0de763e
TT
6552018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
656 Tom Tromey <tom@tromey.com>
657
658 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
659 test for it.
660 * configure: Rebuild.
661
3b20124b
TT
6622018-07-22 Tom Tromey <tom@tromey.com>
663
664 * regformats/regdat.sh: Define xmltarget_${name} inside
665 #ifndef IN_PROCESS_AGENT.
666
8c8807f4
TT
6672018-07-22 Tom Tromey <tom@tromey.com>
668
669 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
670
c486b610
TT
6712018-07-22 Tom Tromey <tom@tromey.com>
672
673 * symfile.c (reread_symbols): Notify iter, not objfile.
674
494f80a9
TT
6752018-07-22 Tom Tromey <tom@tromey.com>
676
677 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
678 Use arch_ops.
679 (ravenscar_thread_target::prepare_to_store): Likewise.
680
c51f6a54
TT
6812018-07-22 Tom Tromey <tom@tromey.com>
682
683 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
684 unused variable. Call value_fetch_lazy when needed.
685 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
686 Remove unused variable. Call value_fetch_lazy when needed.
687
374fd1fd
TT
6882018-07-22 Tom Tromey <tom@tromey.com>
689
690 * m32c-tdep.c (mark_dma): Return void.
691 (make_regs): Remove unused declarations.
692
d5e9a511
TT
6932018-07-22 Tom Tromey <tom@tromey.com>
694
695 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
696 cmdscm_get_valid_command_smob_arg_unsafe for effect.
697 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
698 bkscm_get_valid_block_smob_arg_unsafe for effect.
699
996d693a
TT
7002018-07-22 Tom Tromey <tom@tromey.com>
701
702 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
703 value_type.
704
15766370
TT
7052018-07-22 Tom Tromey <tom@tromey.com>
706
707 * windows-nat.c (saved_context): Conditionally define.
708 * remote.c (remote_target::remote_btrace_maybe_reopen):
709 Conditionally declare "warned".
710 * inflow.c (sigquit_ours): Conditionally define.
711 (new_tty): Move "tty" declaration inside #if.
712 * guile/guile.c (guile_datadir): Conditionally define.
713 * charset.c (set_be_le_names): Move some declarations inside #if.
714 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
715 #if.
716 (parse_xml_btrace_conf): Likewise.
717
f4e80e13
TT
7182018-07-22 Tom Tromey <tom@tromey.com>
719
720 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
721
8d49165d
TT
7222018-07-22 Tom Tromey <tom@tromey.com>
723
724 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
725 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
726 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
727 * buildsym-legacy.c (get_macro_table): Remove unused variable.
728 * stack.c (frame_apply_level_command): Remove unused variable.
729 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
730 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
731 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
732 unused variable.
733 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
734 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
735 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
736 variable.
737 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
738 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
739 variable.
740 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
741 Remove unused variable.
742 * cli/cli-script.c (recurse_read_control_structure): Remove unused
743 variable.
744 * common/tdesc.c (print_xml_feature::visit): Remove unused
745 variable.
746 * compile/compile-object-load.c (store_regs): Remove unused
747 variables.
748 * complaints.c (clear_complaints): Remove unused variable.
749 * corelow.c (core_target_open): Remove unused variable.
750 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
751 variable.
752 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
753 variable.
754 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
755 variable.
756 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
757 variable.
758 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
759 variable.
760 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
761 variable.
762 * ia64-tdep.c (examine_prologue): Remove unused variable.
763 * infcall.c (run_inferior_call): Remove unused variable.
764 * inferior.c (exit_inferior): Remove unused variable.
765 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
766 * linespec.c (decode_line_2): Remove unused variable.
767 * linux-nat.c (super_close): Remove.
768 * linux-tdep.c (linux_info_proc): Remove unused variable.
769 * mi/mi-main.c (mi_execute_command): Remove unused variable.
770 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
771 Remove unused variable.
772 * parse.c (find_minsym_type_and_address): Remove unused variable.
773 * printcmd.c (info_symbol_command, printf_floating): Remove unused
774 variable.
775 * python/py-breakpoint.c (bppy_set_commands): Remove unused
776 variable.
777 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
778 variables.
779 * record-btrace.c (record_btrace_target::store_registers): Remove
780 unused variable.
781 (cmd_show_record_btrace_cpu): Remove unused variable.
782 * riscv-tdep.c (riscv_register_reggroup_p)
783 (riscv_push_dummy_call, riscv_return_value): Remove unused
784 variable.
785 * rust-exp.y (literal): Remove unused variable.
786 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
787 unused variable.
788 <STRUCTOP_ANONYMOUS>: Likewise.
789 * s390-linux-tdep.c (s390_linux_init_abi_31)
790 (s390_linux_init_abi_64): Remove unused variable.
791 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
792 (file_select_thread, net_windows_open, _initialize_ser_windows):
793 Remove unused variables.
794 * symtab.c (find_pc_sect_line): Remove unused variable.
795 * target-memory.c (compute_garbled_blocks): Remove unused
796 variable.
797 (target_write_memory_blocks): Remove unused variable.
798 * target.c (target_stack::unpush): Remove unused variables.
799 * tracepoint.c (start_tracing, all_tracepoint_actions)
800 (merge_uploaded_trace_state_variables)
801 (print_one_static_tracepoint_marker): Remove unused variable.
802 * unittests/basic_string_view/element_access/char/1.cc (test01):
803 Remove unused variable.
804 * windows-nat.c (windows_continue, windows_add_all_dlls)
805 (do_initial_windows_stuff, windows_nat_target::create_inferior):
806 Remove unused variables.
807
17cbafdb
SM
8082018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
809
810 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
811 attr_profile in HAVE_ELF.
812 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
813 HAVE_ELF.
814
0ee6c332
SM
8152018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
816
817 * frame.c (frame_register_unwind): Change parameter name.
818 (frame_unwind_register): Likewise.
819 (frame_unwind_register_value): Likewise.
820 (frame_unwind_register_signed): Likewise.
821 (frame_unwind_register_unsigned): Likewise.
822 * frame.h (frame_register_unwind): Likewise.
823 (frame_unwind_register): Likewise.
824 (frame_unwind_register_value): Likewise.
825 (frame_unwind_register_signed): Likewise.
826 (frame_unwind_register_unsigned): Likewise.
827 (frame_unwind_arch): Likewise.
828
e2e31f10
MR
8292018-07-20 Maciej W. Rozycki <macro@mips.com>
830
831 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
832 ISA maintenance.
833
2d389915
MR
8342018-07-20 Maciej W. Rozycki <macro@mips.com>
835
836 * mips-linux-nat.c (mips_linux_nat_target::read_description):
837 Call `get_ptrace_pid' rather than extracting the ptrace PID by
838 hand.
839
cbb09508
KS
8402018-07-20 Keith Seitz <keiths@redhat.com>
841
842 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
843 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
844 m_compunit_symtab, m_language>: Add "m_" prefix.
845 Update all uses.
846 * buildsym.c: Update all uses.
847
bfe2e011
TT
8482018-07-20 Tom Tromey <tom@tromey.com>
849
850 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
851 * buildsym.h (record_line_ftype): Remove typedef.
852
0e6f3061
TT
8532018-07-20 Tom Tromey <tom@tromey.com>
854
855 * buildsym-legacy.h (augment_type_symtab): Don't declare.
856 (end_expandable_symtab): Likewise.
857 (end_symtab_get_static_block): Likewise.
858 (end_symtab_from_static_block): Likewise.
859 * buildsym-legacy.c (augment_type_symtab): Remove.
860 (end_expandable_symtab): Remove.
861 (end_symtab_get_static_block): Remove.
862 (end_symtab_from_static_block): Remove.
863
804d2729
TT
8642018-07-20 Tom Tromey <tom@tromey.com>
865
866 * dwarf2read.c: Include buildsym.h.
867 (struct dwarf2_cu) <builder>: New method.
868 (fixup_go_packaging): Update.
869 (process_full_comp_unit, process_full_type_unit): Update. Don't
870 use scoped_free_pendings.
871 (using_directives): Add "cu" parameter, remove "language".
872 (read_import_statement, setup_type_unit_groups, )
873 (read_func_scope, read_lexical_block_scope)
874 (dwarf2_record_block_ranges, read_namespace): Update.
875 (lnp_state_machine::lnp_state_machine): Add cu parameter.
876 (lnp_state_machine::handle_end_sequence): Update.
877 (class lnp_state_machine) <m_cu>: New member.
878 <m_record_line_callback>: Remove.
879 <m_currently_recording_lines>: New member.
880 (lnp_state_machine::handle_set_file): Update.
881 (noop_record_line): Remove.
882 (dwarf_record_line_p): Add cu parameter.
883 (dwarf_record_line_1, dwarf_finish_line): Likewise.
884 (lnp_state_machine::record_line)
885 (lnp_state_machine::lnp_state_machine)
886 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
887 (dwarf_decode_lines): Update.
888 (dwarf2_start_subfile): Add cu parameter.
889 (dwarf2_start_symtab, new_symbol): Update.
890 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
891 Remove dwarf2_per_objfile parameter.
892 (dwarf_decode_macros): Update.
893
80e649fc
TT
8942018-07-20 Tom Tromey <tom@tromey.com>
895
896 * stabsread.c (define_symbol): Update.
897 * buildsym-legacy.h (get_buildsym_compunit): Declare.
898 * dwarf2read.c (new_symbol): Update.
899 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
900 * cp-namespace.c: Include buildsym.h.
901 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
902 * buildsym-legacy.c (get_buildsym_compunit): New function.
903
0baae8db
TT
9042018-07-20 Tom Tromey <tom@tromey.com>
905
906 * xcoffread.c: Include buildsym-legacy.h.
907 * windows-nat.c: Include buildsym-legacy.h.
908 * stabsread.c: Include buildsym-legacy.h.
909 * mdebugread.c: Include buildsym-legacy.h.
910 * buildsym-legacy.h: New file.
911 * buildsym-legacy.c: New file, from buildsym.c.
912 * go32-nat.c: Include buildsym-legacy.h.
913 * dwarf2read.c: Include buildsym-legacy.h.
914 * dbxread.c: Include buildsym-legacy.h.
915 * cp-namespace.c: Include buildsym-legacy.h.
916 * coffread.c: Include buildsym-legacy.h.
917 * buildsym.h: Move some contents to buildsym-legacy.h.
918 * buildsym.c: Include buildsym-legacy.h. Move many functions to
919 buildsym-legacy.c.
920 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
921
ab209f6f
TT
9222018-07-20 Tom Tromey <tom@tromey.com>
923
924 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
925 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
926 (buildsym_compunit::buildsym_compunit)
927 (buildsym_compunit::~buildsym_compunit)
928 (buildsym_compunit::get_macro_table): Define.
929
74c72eac
TT
9302018-07-20 Tom Tromey <tom@tromey.com>
931
932 * buildsym.c (reset_symtab_globals): Remove.
933 (buildsym_compunit::end_symtab_from_static_block): Update.
934 (buildsym_compunit::augment_type_symtab): Update.
935 (end_symtab_from_static_block): Call free_buildsym_compunit.
936 (augment_type_symtab, end_symtab, end_expandable_symtab):
937 Likewise.
938
da6580e5
TT
9392018-07-20 Tom Tromey <tom@tromey.com>
940
941 * arch-utils.c: Do not include buildsym.h.
942 * mipsread.c: Do not include buildsym.h.
943 * machoread.c: Do not include buildsym.h.
944 * elfread.c: Do not include buildsym.h.
945
4a2125f5
TT
9462018-07-20 Tom Tromey <tom@tromey.com>
947
948 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
949 initialization.
950 (buildsym_compunit): Add new constructor.
951 (struct buildsym_compunit) <get_last_source_file, finish_block,
952 record_block_range, start_subfile, patch_subfile_names,
953 push_subfile, pop_subfile, record_line, get_compunit_symtab,
954 set_last_source_start_addr, get_last_source_start_addr,
955 get_local_using_directives, set_local_using_directives,
956 get_global_using_directives, outermost_context_p,
957 get_current_context_stack, get_context_stack_depth,
958 get_current_subfile, get_local_symbols, get_file_symbols,
959 get_global_symbols, record_debugformat, record_producer,
960 push_context, pop_context, end_symtab_get_static_block,
961 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
962 New public methods.
963 <record_pending_block, finish_block_internal, make_blockvector,
964 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
965 private methods.
966 Update all users.
967
9682018-05-22 Tom Tromey <tom@tromey.com>
969
970 * buildsym.c (record_pending_block): Move earlier. Remove objfile
971 parameter.
972 (finish_block_internal): Update.
973
6b213a47
TT
9742018-07-20 Tom Tromey <tom@tromey.com>
975
976 * buildsym.c (record_pending_block): Move earlier. Remove objfile
977 parameter.
978 (finish_block_internal): Update.
979
b80a981d
TT
9802018-07-20 Tom Tromey <tom@tromey.com>
981
982 * buildsym.h (EXTERN): Don't define or undef.
983 * buildsym.c (EXTERN): Don't define.
984
ddb70602
TT
9852018-07-20 Tom Tromey <tom@tromey.com>
986
987 * buildsym.c: Remove TODO comment.
988
b37dd3bc
TT
9892018-07-20 Tom Tromey <tom@tromey.com>
990
991 * coffread.c (coff_symtab_read): Update.
992 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
993 (xcoff_new_init): Update.
994 * mipsread.c (mipscoff_new_init): Update.
995 * mdebugread.c (mdebug_build_psymtabs): Update.
996 * elfread.c (elf_new_init): Update.
997 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
998 Update.
999 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1000 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1001 (stabsect_build_psymtabs): Update.
1002 * buildsym.h (buildsym_init): Don't declare.
1003 * buildsym.c: Update comment.
1004 (prepare_for_building): Remove.
1005 (start_symtab, restart_symtab): Update.
1006 (reset_symtab_globals): Update comment.
1007 (buildsym_init): Remove.
1008
e148f09d
TT
10092018-07-20 Tom Tromey <tom@tromey.com>
1010
1011 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1012 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1013 (read_enum_type, common_block_start, common_block_end)
1014 (cleanup_undefined_types_1, finish_global_stabs): Update.
1015 * mdebugread.c (psymtab_to_symtab_1): Update.
1016 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1017 (read_lexical_block_scope, new_symbol): Update.
1018 * dbxread.c (process_one_symbol): Update.
1019 * coffread.c (coff_symtab_read, process_coff_symbol)
1020 (coff_read_enum_type): Update.
1021 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1022 declare.
1023 (get_local_symbols, get_file_symbols, get_global_symbols): New
1024 functions.
1025 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1026 m_global_symbols.
1027 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1028 (~scoped_free_pendings): Update.
1029 (finish_block, prepare_for_building, reset_symtab_globals)
1030 (end_symtab_get_static_block, end_symtab_with_blockvector)
1031 (augment_type_symtab, push_context): Update.
1032 (get_local_symbols, get_file_symbols, get_global_symbols): New
1033 functions.
1034 (buildsym_init): Update.
1035
93b8bea4
TT
10362018-07-20 Tom Tromey <tom@tromey.com>
1037
1038 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1039 (process_full_type_unit): Likewise.
1040 (dwarf2_start_symtab): Set list_in_scope.
1041
f62f6af5
TT
10422018-07-20 Tom Tromey <tom@tromey.com>
1043
1044 * dwarf2read.c (process_psymtab_comp_unit_reader)
1045 (build_type_psymtabs_reader): Do not set list_in_scope.
1046
1d376700
TT
10472018-07-20 Tom Tromey <tom@tromey.com>
1048
1049 * buildsym.c (free_pendings): Remove.
1050 (add_symbol_to_list, scoped_free_pendings)
1051 (finish_block_internal, buildsym_init): Update.
1052
c233e9c6
TT
10532018-07-20 Tom Tromey <tom@tromey.com>
1054
1055 * xcoffread.c (read_xcoff_symtab): Update.
1056 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1057 Update.
1058 * dbxread.c (process_one_symbol): Update.
1059 * coffread.c (coff_symtab_read): Update.
1060 * buildsym.h (finish_block): Update.
1061 * buildsym.c (finish_block): Remove "listhead" argument.
1062 (end_symtab_get_static_block): Update.
1063
5ac04550
TT
10642018-07-20 Tom Tromey <tom@tromey.com>
1065
1066 * buildsym.h (class scoped_free_pendings): Remove constructor.
1067 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1068 method.
1069 <m_pending_block_obstack, m_pending_blocks>: New members.
1070 (pending_block_obstack, pending_blocks): Remove.
1071 (scoped_free_pendings::scoped_free_pendings): Default.
1072 (~scoped_free_pendings): Update.
1073 (free_pending_blocks): Remove.
1074 (finish_block_internal, record_pending_block, make_blockvector)
1075 (end_symtab_get_static_block, augment_type_symtab, push_context)
1076 (buildsym_init): Update.
1077
7ea05a7b
TT
10782018-07-20 Tom Tromey <tom@tromey.com>
1079
1080 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1081 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1082 members.
1083 (pending_addrmap, pending_addrmap_obstack)
1084 (pending_addrmap_interesting): Remove.
1085 (scoped_free_pendings, record_block_range, make_blockvector)
1086 (prepare_for_building, reset_symtab_globals, buildsym_init):
1087 Update.
1088
3c65e5b3
TT
10892018-07-20 Tom Tromey <tom@tromey.com>
1090
1091 * xcoffread.c (process_linenos): Update.
1092 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1093 * mdebugread.c (psymtab_to_symtab_1): Update.
1094 * dwarf2read.c (setup_type_unit_groups)
1095 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1096 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1097 * dbxread.c (process_one_symbol): Update.
1098 * coffread.c (coff_symtab_read, enter_linenos)
1099 (process_coff_symbol): Update.
1100 * buildsym.h (current_subfile): Don't declare.
1101 (get_current_subfile): Declare.
1102 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1103 member.
1104 (start_subfile, free_buildsym_compunit, push_subfile)
1105 (prepare_for_building, start_symtab): Update.
1106 (get_current_subfile): New function.
1107
a60f3166
TT
11082018-07-20 Tom Tromey <tom@tromey.com>
1109
1110 * coffread.c (coff_symtab_read): Update.
1111 * xcoffread.c (read_xcoff_symtab): Update.
1112 * dwarf2read.c (new_symbol): Update.
1113 (read_func_scope, read_lexical_block_scope): Update.
1114 * dbxread.c (process_one_symbol): Update.
1115 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1116 (outermost_context_p): Remove macro.
1117 (outermost_context_p, get_current_context_stack)
1118 (get_context_stack_depth): Declare.
1119 (pop_context): Return struct context_stack.
1120 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1121 member.
1122 (context_stack_size): Remove.
1123 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1124 (prepare_for_building, end_symtab_get_static_block)
1125 (augment_type_symtab, push_context): Update.
1126 (pop_context): Return struct context_stack.
1127 (outermost_context_p, get_current_context_stack)
1128 (get_context_stack_depth): New functions.
1129 (buildsym_init): Update.
1130
56ba65a0
TT
11312018-07-20 Tom Tromey <tom@tromey.com>
1132
1133 * rust-exp.y: Now a pure parser. Update all rules.
1134 (%union): Move earlier.
1135 (current_parser, work_obstack): Remove globals.
1136 (rust_parser, ~rust_parser): Update.
1137 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1138 lex_character, lex_number, lex_string, lex_identifier,
1139 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1140 convert_name, convert_params_to_expression,
1141 convert_ast_to_expression, ast_basic_type, ast_operation,
1142 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1143 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1144 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1145 ast_array_type, ast_slice_type, ast_reference_type,
1146 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1147 (rust_parse): Update.
1148 (rustyyerror, rustyylex): Add parser parameter.
1149 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1150 (rust_lex_stringish_test, rust_lex_test_sequence)
1151 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1152 (rust_lex_test_push_back, rust_lex_tests): Update.
1153
4c693332
PA
11542018-07-19 Pedro Alves <palves@redhat.com>
1155
1156 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1157 gdb::unique_xmalloc_ptr.
1158 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1159 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1160 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1161 copy-initialization.
1162 * guile/scm-pretty-print.c (ppscm_print_children): Use
1163 gdb::unique_xmalloc_ptr instead of cleanups.
1164 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1165 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1166 gdb::unique_xmalloc_ptr.
1167 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1168 Adjust to use gdb::unique_xmalloc_ptr.
1169 * guile/scm-utils.c (extract_arg): Adjust.
1170 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1171 gdb::unique_xmalloc_ptr instead of a cleanup.
1172
4581dc82
TT
11732018-07-19 Tom Tromey <tom@tromey.com>
1174
1175 * utils.c (do_value_free_to_mark)
1176 (make_cleanup_value_free_to_mark): Remove.
1177 * utils.h (make_cleanup_value_free_to_mark): Remove.
1178
43cc6c3a
PA
11792018-07-19 Pedro Alves <palves@redhat.com>
1180
1181 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1182 forwarding reference.
1183
3a5f2a48
PA
11842018-07-18 Pedro Alves <palves@redhat.com>
1185
1186 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1187 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1188 cleanup.
1189
557e56be
PA
11902018-07-18 Pedro Alves <palves@redhat.com>
1191
1192 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1193 exceptions.
1194 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1195 (gdbscm_wrap): New.
1196 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1197 directly instead of a cleanup.
1198 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1199 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1200 (vlscm_binop_gdbthrow): New, factored out from ...
1201 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1202 (vlscm_rich_compare): Use gdbscm_wrap.
1203 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1204 instead of a cleanup.
1205 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1206 cleanup.
1207 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1208 Use xfree directly instead of a cleanup.
1209 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1210 Adjust to use gdbscm_wrap and scoped_value_mark.
1211 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1212 (gdbscm_value_address, gdbscm_value_dereference)
1213 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1214 scoped_value_mark.
1215 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1216 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1217 scoped_value_mark.
1218 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1219 gdbscm_wrap and scoped_value_mark.
1220 (gdbscm_value_to_string): Use xfree directly instead of a
1221 cleanup. Move 'buffer' unique_ptr to TRY scope.
1222 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1223 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1224 scoped_value_mark.
1225 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1226 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1227 scoped_value_mark.
1228 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1229 gdbscm_wrap.
1230
42dc7699
TV
12312018-07-18 Tom de Vries <tdevries@suse.de>
1232
1233 * findvar.c (default_read_var_value): Also resolve dynamic type for
1234 LOC_OPTIMIZED_OUT vars.
1235
6592ceed
MR
12362018-07-18 Maciej W. Rozycki <macro@mips.com>
1237
1238 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1239 decoding.
1240
c6c6149a
TT
12412018-07-17 Tom Tromey <tom@tromey.com>
1242
1243 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1244 (compute_enum_list, pascm_set_param_value_x)
1245 (gdbscm_parameter_value): Update.
1246 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1247 (gdbscm_scm_to_host_string): Update.
1248 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1249 Update.
1250 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1251 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1252 * guile/scm-string.c (gdbscm_scm_to_string): Return
1253 unique_xmalloc_ptr.
1254 (gdbscm_scm_to_host_string): Likewise.
1255
a1a31cb8
TT
12562018-07-17 Tom Tromey <tom@tromey.com>
1257
1258 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1259 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1260 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1261 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1262 unique_xmalloc_ptr.
1263
15bf3002
TT
12642018-07-17 Tom Tromey <tom@tromey.com>
1265
1266 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1267 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1268 Update.
1269 * guile/scm-cmd.c (cmdscm_function): Update.
1270 * guile/scm-pretty-print.c
1271 (ppscm_print_exception_unless_memory_error): Update.
1272 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1273 Return unique_xmalloc_ptr.
1274
7eb1a66c
TT
12752018-07-17 Tom Tromey <tom@tromey.com>
1276
1277 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1278 Use string_printf.
1279
ce73f310
JW
12802018-07-17 Jim Wilson <jimw@sifive.com>
1281
27724bad
JW
1282 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1283 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1284 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1285 unecessary braces after EF_RISCV_RVC test. Delete call to
1286 set_gdbarch_decr_pc_after_break.
1287
ce73f310
JW
1288 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1289 RISCV_LAST_FP_REGNUM + 1.
1290 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1291
056dec39
TT
12922018-07-17 Tom Tromey <tom@tromey.com>
1293
1294 * configure.ac: Remove --disable-gdbcli.
1295 * configure: Rebuild.
1296 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1297 (SUBDIR_CLI_CFLAGS): Remove.
1298 (SFILES): Use SUBDIR_CLI_SRCS.
1299 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1300
4735f0ed
TT
13012018-07-17 Tom Tromey <tom@tromey.com>
1302
1303 PR gdb/18624:
1304 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1305
117a0e99
JW
13062018-07-16 Jim Wilson <jimw@sifive.com>
1307
1308 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1309
8a67aaa8
SM
13102018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1311
1312 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1313 variable.
1314 (libunwind_frame_sniffer): Likewise.
1315 (libunwind_frame_prev_register): Likewise.
1316 (libunwind_sigtramp_frame_sniffer): Likewise.
1317 * ia64-tdep.c (ia64_access_reg): Likewise.
1318 (ia64_access_rse_reg): Likewise.
1319 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1320 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1321
ec74dcd8
SM
13222018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1323
1324 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1325
a700e753
SM
13262018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1327
1328 * remote-sim.c (gdbsim_target::close,
1329 gdbsim_target::mourn_inferior): Remove unused variables.
1330
8b411ff8
SM
13312018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1332
1333 * ia64-tdep.c (ktab_buf): New global.
1334 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1335 (get_kernel_table): Adjust.
1336
edb0470b
TT
13372018-07-16 Tom Tromey <tom@tromey.com>
1338
1339 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1340 * dwarf2read.c (using_directives, new_symbol): Use
1341 outermost_context_p.
1342 * dbxread.c (process_one_symbol): Use outermost_context_p.
1343 * coffread.c (coff_symtab_read): Use outermost_context_p.
1344
6cccc9a8
TT
13452018-07-16 Tom Tromey <tom@tromey.com>
1346
1347 * dwarf2read.c (using_directives, read_func_scope)
1348 (read_lexical_block_scope): Update.
1349 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1350 * buildsym.h (local_using_directives, global_using_directives):
1351 Don't declare.
1352 (get_local_using_directives, set_local_using_directives)
1353 (get_global_using_directives): Declare.
1354 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1355 m_global_using_directives>: New members.
1356 (finish_block_internal, prepare_for_building)
1357 (reset_symtab_globals, end_symtab_get_static_block)
1358 (push_context): Update.
1359 (get_local_using_directives, set_local_using_directives)
1360 (get_global_using_directives): New functions.
1361 (buildsym_init): Update.
1362
652788a7
TT
13632018-07-16 Tom Tromey <tom@tromey.com>
1364
1365 * xcoffread.c (xcoff_initial_scan): Don't call
1366 free_pending_blocks.
1367 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1368 * buildsym.h (class scoped_free_pendings): Add constructor.
1369 (free_pending_blocks): Don't declare.
1370 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1371 (free_pending_blocks): Now static.
1372
8419ee53
TT
13732018-07-16 Tom Tromey <tom@tromey.com>
1374
1375 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1376 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1377 member.
1378 (struct subfile_stack): Remove.
1379 (subfile_stack): Remove.
1380 (push_subfile, pop_subfile, buildsym_init): Update.
1381
ccdac490
TT
13822018-07-16 Tom Tromey <tom@tromey.com>
1383
1384 * buildsym.c (push_subfile): Use gdb_assert.
1385 (pop_subfile): Use gdb_assert.
1386
43130d6f
TT
13872018-07-16 Tom Tromey <tom@tromey.com>
1388
1389 * buildsym.h (merge_symbol_lists): Remove.
1390 * buildsym.c (merge_symbol_lists): Remove.
1391
77d6f1aa
TT
13922018-07-16 Tom Tromey <tom@tromey.com>
1393
1394 * stabsread.c (scan_file_globals): Update comment.
1395 * stabsread.h (scan_file_globals): Move from buildsym.h.
1396 * buildsym.h (scan_file_globals): Move to stabsread.h.
1397
2c722d18
TT
13982018-07-16 Tom Tromey <tom@tromey.com>
1399
1400 * xcoffread.c (xcoff_new_init): Update.
1401 * mipsread.c (mipscoff_new_init): Update.
1402 * mdebugread.c (mdebug_build_psymtabs): Update.
1403 * elfread.c (elf_new_init): Update.
1404 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1405 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1406 * buildsym.h (buildsym_new_init): Don't declare.
1407 * buildsym.c (buildsym_new_init): Remove.
1408
5985ac61
TT
14092018-07-16 Tom Tromey <tom@tromey.com>
1410
1411 * stabsread.h (within_function): Move from buildsym.h.
1412 * stabsread.c (start_stabs): Clear within_function.
1413 * coffread.c (coff_start_symtab): Clear within_function.
1414 * buildsym.h (within_function): Move to stabsread.h.
1415 * buildsym.c (prepare_for_building): Update.
1416
6b84eeb2
TT
14172018-07-16 Tom Tromey <tom@tromey.com>
1418
1419 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1420 * dwarf2read.c (dwarf2_start_symtab): Don't set
1421 processing_gcc_compilation.
1422 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1423
2150c3ef
TT
14242018-07-16 Tom Tromey <tom@tromey.com>
1425
1426 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1427 (next_symbol_text_func): Move from buildsym.h.
1428 * stabsread.c (hashname): Move from buildsym.c.
1429 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1430 (next_symbol_text_func, hashname): Move to stabsread.h.
1431 * buildsym.c: Don't include bcache.h
1432 (hashname): Move to stasbread.c.
1433
0ec44fc0
TT
14342018-07-16 Tom Tromey <tom@tromey.com>
1435
1436 * buildsym.h (context_stack_size): Don't declare.
1437 * buildsym.c (context_stack_size): New global.
1438
81cc346d
TT
14392018-07-16 Tom Tromey <tom@tromey.com>
1440
1441 * dbxread.c (processing_acc_compilation): New global.
1442 * buildsym.h (processing_acc_compilation): Don't declare.
1443
2c99ee5c
TT
14442018-07-16 Tom Tromey <tom@tromey.com>
1445
1446 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1447 * dbxread.c (read_ofile_symtab): Update.
1448 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1449 * buildsym.h (last_source_start_addr): Remove.
1450 (set_last_source_start_addr, get_last_source_start_addr):
1451 Declare.
1452 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1453 parameter.
1454 (struct buildsym_compunit) <m_last_source_start_addr>: New
1455 member.
1456 (prepare_for_building): Remove start_addr parameter.
1457 (start_symtab, restart_symtab, end_symtab_get_static_block)
1458 (end_symtab_with_blockvector): Update.
1459 (set_last_source_start_addr, get_last_source_start_addr): New
1460 functions.
1461
530fedbc
TT
14622018-07-16 Tom Tromey <tom@tromey.com>
1463
1464 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1465 member.
1466 (have_line_numbers): Remove.
1467 (record_line, prepare_for_building, end_symtab_get_static_block)
1468 (augment_type_symtab): Update.
1469
6a976300
TT
14702018-07-16 Tom Tromey <tom@tromey.com>
1471
1472 * buildsym.c (~buildsym_compunit): Free the macro table.
1473 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1474 methods.
1475 <m_pending_macros>: New member.
1476 (pending_macros): Remove.
1477 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1478 (reset_symtab_globals, end_symtab_get_static_block)
1479 (end_symtab_with_blockvector, augment_type_symtab)
1480 (buildsym_init): Update.
1481
c0015d44
TT
14822018-07-16 Tom Tromey <tom@tromey.com>
1483
1484 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1485 parameter.
1486 (buildsym_compunit::set_last_source_file): New method.
1487 <m_last_source_file>: New member.
1488 (prepare_for_building): Remove "name" parameter.
1489 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1490 (last_source_file): Remove.
1491 (set_last_source_file, get_last_source_file): Update.
1492
e62cca7c
TT
14932018-07-16 Tom Tromey <tom@tromey.com>
1494
1495 * buildsym.c (prepare_for_building): Add assert.
1496
905eb0e2
TT
14972018-07-16 Tom Tromey <tom@tromey.com>
1498
1499 * buildsym.c (~buildsym_compunit): Update.
1500 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1501 (start_subfile, patch_subfile_names)
1502 (end_symtab_with_blockvector): Update.
1503
b248663f
TT
15042018-07-16 Tom Tromey <tom@tromey.com>
1505
1506 * buildsym.c (struct buildsym_compunit): Add constructor,
1507 destructor, initializers.
1508 (start_buildsym_compunit): Remove.
1509 (free_buildsym_compunit): Use "delete".
1510 (start_symtab, restart_symtab): Use "new".
1511
ff27d073
SM
15122018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1513
1514 * symfile.c (set_objfile_default_section_offset): Remove struct
1515 keyword.
1516
6a15ecf5
SH
15172018-07-14 Stafford Horne <shorne@gmail.com>
1518
1519 * (Responsible Maintainers): Add myself as or1k maintainer.
1520
027a4c30
TT
15212018-07-13 Tom Tromey <tom@tromey.com>
1522
1523 * symfile.c (set_objfile_default_section_offset): Use extra braces
1524 around initializer.
1525
5c1eda30
AA
15262018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1527
1528 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1529 non-branching basr.
1530
bc7b042b
PW
15312018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1532
1533 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1534 unittests/cli-utils-selftests.c
1535 * unittests/cli-utils-selftests.c: New file.
1536
a14c4daa
PW
15372018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1538
1539 * NEWS: Mention new commands. Mention change to 'thread apply'.
1540
1fe75df7
PW
15412018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1542
1543 * thread.c (thr_try_catch_cmd): New function.
1544 (thread_apply_all_command): Handle qcs flags.
1545 (thread_apply_command): Handle qcs flags.
1546 (taas_command): New function.
1547 (tfaas_command): New function.
1548 (_initialize_thread): Update to setup the new commands 'taas
1549 and 'tfaas'. Change doc string for 'thread apply'.
1550
6a70eb7d
PW
15512018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1552
1553 * stack.c: (trailing_outermost_frame): New function, mostly
1554 extracted from backtrace_command_1.
1555 (leading_innermost_frame): New function.
1556 (backtrace_command_1): Update to call trailing_outermost_frame.
1557 (frame_apply_command_count): New function.
1558 (frame_apply_level_command): New function.
1559 (frame_apply_all_command): New function.
1560 (frame_apply_command): New function.
1561 (faas_command): New function.
1562 (frame_cmd_list): New variable.
1563 (_initialize_stack): Update to setup the new commands 'frame apply'
1564 and 'faas'.
1565
529c08b2
PW
15662018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1567
1568 * cli-utils.c (number_or_range_parser::get_number): Only handle
1569 numbers or convenience var as numbers.
1570 (parse_flags): New function.
1571 (parse_flags_qcs): New function.
1572 (number_or_range_parser::finished): Ensure parsing end is detected
1573 before end of string.
1574 * cli-utils.h (parse_flags): New function.
1575 (parse_flags_qcs): New function.
1576 (number_or_range_parser): Remove m_finished bool.
1577 (number_or_range_parser::skip_range): Set m_in_range to false.
1578
64b58472
SDJ
15792018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1580
1581 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1582 on Windows.
1583
c7ab0aef
SDJ
15842018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1585 Jan Kratochvil <jan.kratochvil@redhat.com>
1586 Paul Fertser <fercerpav@gmail.com>
1587 Tsutomu Seki <sekiriki@gmail.com>
1588 Pedro Alves <palves@redhat.com>
1589
1590 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1591 'unittests/parse-connection-spec-selftests.c'.
1592 (COMMON_SFILES): Add 'common/netstuff.c'.
1593 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1594 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1595 * common/netstuff.c: New file.
1596 * common/netstuff.h: New file.
1597 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1598 (wait_for_connect): Update comment. New parameter
1599 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1600 Use 'sock' directly instead of 'scb->fd'.
1601 (try_connect): New function, with code from 'net_open'.
1602 (net_open): Rewrite main loop to deal with multiple
1603 sockets/addresses. Handle IPv6-style hostnames; implement
1604 support for IPv6 connections.
1605 * unittests/parse-connection-spec-selftests.c: New file.
1606
4c7333b3
PA
16072018-07-11 Pedro Alves <palves@redhat.com>
1608
1609 PR gdb/23377
1610 * remote.c (remote_target::remote_detach_pid): Call
1611 set_current_process.
1612
a6f88f6e
PA
16132018-07-11 Pedro Alves <palves@redhat.com>
1614
1615 * h8300-tdep.c (h8300_gdbarch_init): Remove
1616 set_gdbarch_ecoff_reg_to_regnum calls.
1617
16ff70dd
SDJ
16182018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1619
1620 PR c++/23373
1621 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1622 offsets/sizes for static members of a class/struct.
1623
12863263
AH
16242018-07-11 Alan Hayward <alan.hayward@arm.com>
1625
1626 * target-descriptions.c (tdesc_register_bitsize): Rename.
1627 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1628 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1629 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1630
1123588c
TT
16312018-07-10 Tom Tromey <tom@tromey.com>
1632
1633 * breakpoint.c (moribund_locations): Now static and a
1634 std::vector.
1635 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1636 (build_bpstat_chain, update_global_location_list)
1637 (breakpoint_retire_moribund): Update.
1638 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1639 VEC.
1640
8c49aa89
AB
16412018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1642
1643 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1644 (riscv_register_reggroup_p): Use new function, remove unneeded
1645 parenthesis.
1646 (riscv_push_dummy_call): Extend assert to compare against xlen or
1647 flen based on register type.
1648
42ecac17
AB
16492018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1650
1651 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1652
055303e2
AB
16532018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1654
1655 * remote.c (show_hardware_watchpoint_limit): New function.
1656 (show_hardware_watchpoint_length_limit): New function.
1657 (show_hardware_breakpoint_limit): New function.
1658 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1659 where appropriate, update help text.
1660
8fd32c1c
TT
16612018-07-09 Tom Tromey <tom@tromey.com>
1662
1663 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1664 (CLIBS): Don't mention NAT_CLIBS.
1665
31278b51
TT
16662018-07-09 Tom Tromey <tom@tromey.com>
1667
1668 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1669 (LIBGDB_OBS, clean mostlyclean): Update.
1670 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1671
e5fd1493
TT
16722018-07-09 Tom Tromey <tom@tromey.com>
1673
1674 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1675 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1676 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1677
981e0c0c
TT
16782018-07-09 Tom Tromey <tom@tromey.com>
1679
1680 * Makefile.in (ALLDEPFILES): Remove exec.c.
1681 (COMMON_OBS): Remove exec.o.
1682 (COMMON_SFILES): Add exec.c.
1683
14ccceb2
TT
16842018-07-09 Tom Tromey <tom@tromey.com>
1685
1686 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1687
5d3c3a68
TT
16882018-07-09 Tom Tromey <tom@tromey.com>
1689
1690 * Makefile.in (clean mostlyclean): Remove stamp-version.
1691 (version.c): Depend on stamp-version.
1692 (stamp-version): New rule, from version.c rule.
1693
1998086d
TT
16942018-07-09 Tom Tromey <tom@tromey.com>
1695
1696 * Makefile.in (init.c): Depend on stamp-init.
1697 (stamp-init): New rule, from init.c rule.
1698 (clean mostlyclean): Remove stamp-init.
1699
4c754949
TT
17002018-07-09 Tom Tromey <tom@tromey.com>
1701
1702 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1703 SUBDIR_GCC_COMPILE_SRCS.
1704
6497f1dd
TT
17052018-07-09 Tom Tromey <tom@tromey.com>
1706
1707 * Makefile.in (init.c): Remove some unused sed rules.
1708
97a34db9
TT
17092018-07-09 Tom Tromey <tom@tromey.com>
1710
1711 * Makefile.in (TSOBS): Remove.
1712 (INIT_FILES): Update.
1713 (LIBGDB_OBS): Update.
1714 (COMMON_SFILES): Add inflow.c.
1715 (SFILES): Remove inflow.c.
1716
25289ac1
JK
17172018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1718
1719 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1720
e83f4d97
SM
17212018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1722
4869c585
SM
1723 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1724 get_saveloc_name, is_signal_frame_name, step_name,
1725 init_remote_name, create_addr_space_name,
1726 destroy_addr_space_name, search_unwind_table_name,
1727 find_dyn_list_name): Constify.
e83f4d97 1728
6821842f
SM
17292018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1730
1731 * darwin-nat.c (darwin_pthread_kill): New function.
1732 (darwin_resume_thread): Use darwin_pthread_kill.
1733
c530603c
TV
17342018-07-05 Tom de Vries <tdevries@suse.de>
1735
1736 * macroexp.c (macro_buffer) <operator=>: New member function.
1737
a7d0f0f0
TT
17382018-07-04 Tom Tromey <tom@tromey.com>
1739
1740 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1741
6242c6a6
SM
17422018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1743
1744 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1745 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1746 * maint.c: Likewise.
1747 * top.c: Likewise.
1748
4e5b2f89
JB
17492018-07-04 Joel Brobecker <brobecker@adacore.com>
1750
1751 * NEWS: Create a new section for the next release branch.
1752 Rename the section of the current branch, now that it has
1753 been cut.
1754
538ccc4a
JB
17552018-07-04 Joel Brobecker <brobecker@adacore.com>
1756
1757 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1758 * version.in: Bump version to 8.2.50.DATE-git.
1759
1b919490
VB
17602018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1761 Pedro Alves <palves@redhat.com>
1762
1763 * linux-nat.c (linux_init_ptrace): Rename to ...
1764 (linux_init_ptrace_procfs): ... this. Call
1765 linux_proc_init_warnings.
1766 (linux_nat_target::post_attach)
1767 (linux_nat_target::post_startup_inferior): Adjust.
1768 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1769 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1770
1ea5da02
TV
17712018-07-04 Tom de Vries <tdevries@suse.de>
1772
1773 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1774 check ...
1775 (read_comp_unit_head): ... here.
1776
f51e0e20
TT
17772018-07-03 Tom Tromey <tom@tromey.com>
1778
1779 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1780 (stop_tracing, tstatus_command)
1781 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1782 (print_one_static_tracepoint_marker): Update.
1783 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1784 std::vector.
1785 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1786 VEC.
1787 (all_tracepoints, static_tracepoints_here): Return std::vector.
1788
d7e15655
TT
17892018-07-03 Tom Tromey <tom@tromey.com>
1790
1791 * common/ptid.c (ptid_equal): Remove.
1792 * common/ptid.h (ptid_equal): Don't declare.
1793 * ada-tasks.c: Update.
1794 * breakpoint.c: Update.
1795 * common/agent.c: Update.
1796 * corelow.c: Update.
1797 * darwin-nat-info.c: Update.
1798 * darwin-nat.c: Update.
1799 * dcache.c: Update.
1800 * dtrace-probe.c: Update.
1801 * dummy-frame.c: Update.
1802 * fbsd-nat.c: Update.
1803 * frame.c: Update.
1804 * gdbthread.h: Update.
1805 * gnu-nat.c: Update.
1806 * go32-nat.c: Update.
1807 * inf-loop.c: Update.
1808 * inf-ptrace.c: Update.
1809 * infcall.c: Update.
1810 * infcmd.c: Update.
1811 * inflow.c: Update.
1812 * infrun.c: Update.
1813 * linux-fork.c: Update.
1814 * linux-nat.c: Update.
1815 * linux-thread-db.c: Update.
1816 * mi/mi-cmd-var.c: Update.
1817 * mi/mi-interp.c: Update.
1818 * mi/mi-main.c: Update.
1819 * nto-procfs.c: Update.
1820 * ppc-linux-tdep.c: Update.
1821 * procfs.c: Update.
1822 * python/py-inferior.c: Update.
1823 * python/py-record-btrace.c: Update.
1824 * python/py-record.c: Update.
1825 * ravenscar-thread.c: Update.
1826 * regcache.c: Update.
1827 * remote-sim.c: Update.
1828 * remote.c: Update.
1829 * sol-thread.c: Update.
1830 * solib.c: Update.
1831 * target.c: Update.
1832 * tui/tui-stack.c: Update.
1833 * varobj.c: Update.
1834 * windows-nat.c: Update.
1835 * windows-tdep.c: Update.
1836
26a57c92
TT
18372018-07-03 Tom Tromey <tom@tromey.com>
1838
1839 * common/ptid.c (ptid_match): Remove.
1840 * common/ptid.h (ptid_match): Don't declare.
1841 * fbsd-nat.c: Update.
1842 * infcmd.c: Update.
1843 * infrun.c: Update.
1844 * linux-nat.c: Update.
1845 * record-btrace.c: Update.
1846 * regcache.c: Update.
1847 * remote.c: Update.
1848
d2a107e3
TT
18492018-07-03 Tom Tromey <tom@tromey.com>
1850
1851 * common/ptid.c (ptid_tid_p): Remove.
1852 * common/ptid.h (ptid_tid_p): Don't declare.
1853 * sol-thread.c: Update.
1854
15a9e13e
TT
18552018-07-03 Tom Tromey <tom@tromey.com>
1856
1857 * common/ptid.c (ptid_lwp_p): Remove.
1858 * common/ptid.h (ptid_lwp_p): Don't declare.
1859 * fbsd-nat.c: Update.
1860 * linux-nat.c: Update.
1861 * nat/linux-procfs.c: Update.
1862 * nat/x86-linux-dregs.c: Update.
1863 * sol-thread.c: Update.
1864
0e998d96
TT
18652018-07-03 Tom Tromey <tom@tromey.com>
1866
1867 * common/ptid.c (ptid_is_pid): Remove.
1868 * common/ptid.h (ptid_is_pid): Don't declare.
1869 * infrun.c: Update.
1870 * linux-nat.c: Update.
1871 * mi/mi-interp.c: Update.
1872 * remote.c: Update.
1873 * thread.c: Update.
1874
cc6bcb54
TT
18752018-07-03 Tom Tromey <tom@tromey.com>
1876
1877 * common/ptid.c (ptid_get_tid): Remove.
1878 * common/ptid.h (ptid_get_tid): Don't declare.
1879 * ada-tasks.c: Update.
1880 * aix-thread.c: Update.
1881 * bsd-uthread.c: Update.
1882 * darwin-nat.c: Update.
1883 * fbsd-nat.c: Update.
1884 * i386-darwin-nat.c: Update.
1885 * infrun.c: Update.
1886 * linux-tdep.c: Update.
1887 * nto-procfs.c: Update.
1888 * ppc-ravenscar-thread.c: Update.
1889 * python/py-infthread.c: Update.
1890 * ravenscar-thread.c: Update.
1891 * sol-thread.c: Update.
1892 * sparc-ravenscar-thread.c: Update.
1893 * windows-nat.c: Update.
1894
e38504b3
TT
18952018-07-03 Tom Tromey <tom@tromey.com>
1896
1897 * common/ptid.c (ptid_get_lwp): Remove.
1898 * common/ptid.h (ptid_get_lwp): Don't declare.
1899 * aarch64-linux-nat.c: Update.
1900 * ada-tasks.c: Update.
1901 * aix-thread.c: Update.
1902 * amd64-linux-nat.c: Update.
1903 * arm-linux-nat.c: Update.
1904 * corelow.c: Update.
1905 * fbsd-nat.c: Update.
1906 * fbsd-tdep.c: Update.
1907 * gnu-nat.c: Update.
1908 * i386-cygwin-tdep.c: Update.
1909 * i386-gnu-nat.c: Update.
1910 * i386-linux-nat.c: Update.
1911 * ia64-linux-nat.c: Update.
1912 * inf-ptrace.c: Update.
1913 * infrun.c: Update.
1914 * linux-fork.c: Update.
1915 * linux-nat.c: Update.
1916 * linux-tdep.c: Update.
1917 * linux-thread-db.c: Update.
1918 * mips-linux-nat.c: Update.
1919 * nat/aarch64-linux-hw-point.c: Update.
1920 * nat/aarch64-linux.c: Update.
1921 * nat/linux-btrace.c: Update.
1922 * nat/linux-osdata.c: Update.
1923 * nat/linux-procfs.c: Update.
1924 * nat/x86-linux-dregs.c: Update.
1925 * obsd-nat.c: Update.
1926 * ppc-fbsd-nat.c: Update.
1927 * ppc-linux-nat.c: Update.
1928 * procfs.c: Update.
1929 * python/py-infthread.c: Update.
1930 * ravenscar-thread.c: Update.
1931 * remote.c: Update.
1932 * s390-linux-nat.c: Update.
1933 * sol-thread.c: Update.
1934 * sol2-tdep.c: Update.
1935 * spu-linux-nat.c: Update.
1936 * x86-linux-nat.c: Update.
1937 * xtensa-linux-nat.c: Update.
1938
e99b03dc
TT
19392018-07-03 Tom Tromey <tom@tromey.com>
1940
1941 * common/ptid.c (ptid_get_pid): Remove.
1942 * common/ptid.h (ptid_get_pid): Don't declare.
1943 * aarch64-linux-nat.c: Update.
1944 * ada-lang.c: Update.
1945 * aix-thread.c: Update.
1946 * alpha-bsd-nat.c: Update.
1947 * amd64-fbsd-nat.c: Update.
1948 * amd64-linux-nat.c: Update.
1949 * arm-linux-nat.c: Update.
1950 * arm-nbsd-nat.c: Update.
1951 * auxv.c: Update.
1952 * break-catch-syscall.c: Update.
1953 * breakpoint.c: Update.
1954 * bsd-uthread.c: Update.
1955 * corelow.c: Update.
1956 * ctf.c: Update.
1957 * darwin-nat.c: Update.
1958 * fbsd-nat.c: Update.
1959 * fbsd-tdep.c: Update.
1960 * gcore.c: Update.
1961 * gnu-nat.c: Update.
1962 * hppa-nbsd-nat.c: Update.
1963 * hppa-obsd-nat.c: Update.
1964 * i386-fbsd-nat.c: Update.
1965 * ia64-linux-nat.c: Update.
1966 * inf-ptrace.c: Update.
1967 * infcmd.c: Update.
1968 * inferior.c: Update.
1969 * inferior.h: Update.
1970 * inflow.c: Update.
1971 * infrun.c: Update.
1972 * linux-fork.c: Update.
1973 * linux-nat.c: Update.
1974 * linux-tdep.c: Update.
1975 * linux-thread-db.c: Update.
1976 * m68k-bsd-nat.c: Update.
1977 * mi/mi-interp.c: Update.
1978 * mi/mi-main.c: Update.
1979 * mips-linux-nat.c: Update.
1980 * mips-nbsd-nat.c: Update.
1981 * mips64-obsd-nat.c: Update.
1982 * nat/aarch64-linux-hw-point.c: Update.
1983 * nat/aarch64-linux.c: Update.
1984 * nat/linux-btrace.c: Update.
1985 * nat/linux-osdata.c: Update.
1986 * nat/linux-procfs.c: Update.
1987 * nat/x86-linux-dregs.c: Update.
1988 * nto-procfs.c: Update.
1989 * obsd-nat.c: Update.
1990 * ppc-linux-nat.c: Update.
1991 * ppc-nbsd-nat.c: Update.
1992 * ppc-obsd-nat.c: Update.
1993 * proc-service.c: Update.
1994 * procfs.c: Update.
1995 * python/py-inferior.c: Update.
1996 * python/py-infthread.c: Update.
1997 * ravenscar-thread.c: Update.
1998 * record.c: Update.
1999 * remote-sim.c: Update.
2000 * remote.c: Update.
2001 * rs6000-nat.c: Update.
2002 * s390-linux-nat.c: Update.
2003 * sh-nbsd-nat.c: Update.
2004 * sol-thread.c: Update.
2005 * sparc-nat.c: Update.
2006 * sparc64-tdep.c: Update.
2007 * spu-linux-nat.c: Update.
2008 * spu-tdep.c: Update.
2009 * target-debug.h: Update.
2010 * target.c: Update.
2011 * thread.c: Update.
2012 * tid-parse.c: Update.
2013 * tracefile-tfile.c: Update.
2014 * vax-bsd-nat.c: Update.
2015 * windows-nat.c: Update.
2016 * x86-linux-nat.c: Update.
2017 * x86-nat.c: Update.
2018
f2907e49
TT
20192018-07-03 Tom Tromey <tom@tromey.com>
2020
2021 * common/ptid.c (pid_to_ptid): Remove.
2022 * common/ptid.h (pid_to_ptid): Don't declare.
2023 * aix-thread.c: Update.
2024 * arm-linux-nat.c: Update.
2025 * common/ptid.c: Update.
2026 * common/ptid.h: Update.
2027 * corelow.c: Update.
2028 * ctf.c: Update.
2029 * darwin-nat.c: Update.
2030 * fbsd-nat.c: Update.
2031 * fork-child.c: Update.
2032 * gnu-nat.c: Update.
2033 * go32-nat.c: Update.
2034 * inf-ptrace.c: Update.
2035 * infcmd.c: Update.
2036 * inferior.c: Update.
2037 * infrun.c: Update.
2038 * linux-fork.c: Update.
2039 * linux-nat.c: Update.
2040 * nat/aarch64-linux-hw-point.c: Update.
2041 * nat/fork-inferior.c: Update.
2042 * nat/x86-linux-dregs.c: Update.
2043 * nto-procfs.c: Update.
2044 * obsd-nat.c: Update.
2045 * procfs.c: Update.
2046 * progspace.c: Update.
2047 * remote.c: Update.
2048 * rs6000-nat.c: Update.
2049 * s390-linux-nat.c: Update.
2050 * sol-thread.c: Update.
2051 * spu-linux-nat.c: Update.
2052 * target.c: Update.
2053 * top.c: Update.
2054 * tracefile-tfile.c: Update.
2055 * windows-nat.c: Update.
2056
fd79271b
TT
20572018-07-03 Tom Tromey <tom@tromey.com>
2058
2059 * common/ptid.h (ptid_build): Don't declare.
2060 * common/ptid.c (ptid_build): Remove.
2061 * aix-thread.c: Update.
2062 * bsd-kvm.c: Update.
2063 * bsd-uthread.c: Update.
2064 * common/agent.c: Update.
2065 * common/ptid.c: Update.
2066 * common/ptid.h: Update.
2067 * corelow.c: Update.
2068 * darwin-nat.c: Update.
2069 * fbsd-nat.c: Update.
2070 * gnu-nat.c: Update.
2071 * linux-fork.c: Update.
2072 * linux-nat.c: Update.
2073 * linux-thread-db.c: Update.
2074 * nat/linux-osdata.c: Update.
2075 * nat/linux-procfs.c: Update.
2076 * nto-procfs.c: Update.
2077 * obsd-nat.c: Update.
2078 * proc-service.c: Update.
2079 * procfs.c: Update.
2080 * ravenscar-thread.c: Update.
2081 * remote-sim.c: Update.
2082 * remote.c: Update.
2083 * sol-thread.c: Update.
2084 * target.c: Update.
2085 * windows-nat.c: Update.
2086
057302ce
TT
20872018-07-03 Tom Tromey <tom@tromey.com>
2088
2089 * infrun.c (follow_exec): Use exit_inferior_silent.
2090 * inferior.c (exit_inferior_num_silent): Remove.
2091 * inferior.h (exit_inferior_num_silent): Don't declare.
2092
a50c11c6
TT
20932018-07-03 Tom Tromey <tom@tromey.com>
2094
2095 PR cli/23340:
2096 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2097 inferior_ptid on error.
2098
471b9d15
MR
20992018-07-02 Maciej W. Rozycki <macro@mips.com>
2100 Simon Marchi <simon.marchi@polymtl.ca>
2101
2102 PR tdep/8282
2103 * disasm.h (gdb_disassembler): Add
2104 `m_disassembler_options_holder'. member
2105 * disasm.c (get_all_disassembler_options): New function.
2106 (gdb_disassembler::gdb_disassembler): Use it.
2107 (gdb_buffered_insn_length_init_dis): Likewise.
2108 (gdb_buffered_insn_length): Adjust accordingly.
2109 (set_disassembler_options): Handle options with arguments.
2110 (show_disassembler_options_sfunc): Likewise. Add a leading new
2111 line if showing options with descriptions.
2112 (disassembler_options_completer): Adapt to using the
2113 `disasm_options_and_args_t' structure.
2114 * mips-tdep.c (mips_disassembler_options): New variable.
2115 (mips_disassembler_options_o32): Likewise.
2116 (mips_disassembler_options_n32): Likewise.
2117 (mips_disassembler_options_n64): Likewise.
2118 (gdb_print_insn_mips): Don't set `disassembler_options'.
2119 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2120 functions.
2121 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2122 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2123 `gdbarch_disassembler_options_implicit' and
2124 `gdbarch_valid_disassembler_options'.
2125 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2126 `disasm_options_and_args_t' structure.
2127 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2128 method.
2129 (valid_disassembler_options): Switch from `disasm_options_t' to
2130 the `disasm_options_and_args_t' structure.
2131 * NEWS: Document `set disassembler-options' support for the MIPS
2132 target.
2133 * gdbarch.h: Regenerate.
2134 * gdbarch.c: Regenerate.
2135
41823f29
SH
21362018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2137
2138 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2139
41206e32
JB
21402018-06-29 Joel Brobecker <brobecker@adacore.com>
2141
2142 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2143 parameter in call to amd64_target_description.
2144 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2145 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2146 (amd64fbsd_init_abi): Likewise.
2147 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2148 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2149 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2150 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2151
de52b960
PA
21522018-06-29 Pedro Alves <palves@redhat.com>
2153
2154 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2155 "segments" parameter.
2156 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2157 (_initialize_amd64_tdep): Update call to
2158 amd64_create_target_description.
2159 (amd64_target_description): Add "segments" parameter. Adjust
2160 the implementation to use it.
2161 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2162 call to amd64_create_target_description.
2163 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2164 * gdb/arch/amd64.h (amd64_create_target_description): Add
2165 "segments" register.
2166 * gdb/arch/amd64.c (amd64_create_target_description): Add
2167 "segments" parameter. Call create_feature_i386_64bit_segments
2168 only if SEGMENTS is true.
2169 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2170 call to amd64_create_target_description.
2171
75acb486
PA
21722018-06-29 Pedro Alves <palves@redhat.com>
2173
2174 * thread.c (thread_target_id_str): New, factored out from ...
2175 (print_thread_info_1): ... here. Use it to compute the max
2176 "Target Id" column width.
2177
c76a8ea3
PA
21782018-06-29 Pedro Alves <palves@redhat.com>
2179
2180 * remote.c (remote_target::extra_thread_info): Delete
2181 'display_buf' and 'n' locals. from the cache, regardless of
2182 packet mechanims is in use. Use cache for qThreadExtra and qP
2183 methods too.
2184
cd2bb709
PA
21852018-06-29 Pedro Alves <palves@redhat.com>
2186
2187 * blockframe.c (find_pc_sect_containing_function): New function.
2188 * breakpoint.c (print_breakpoint_location): Don't call
2189 find_pc_sect_function.
2190 * linespec.c (create_sals_line_offset): Record the location's
2191 symbol in the sal.
2192 * linespec.c (convert_address_location_to_sals): Fill in sal's
2193 symbol with find_pc_sect_containing_function.
2194 * symtab.c (find_function_start_sal): Rename to ...
2195 (find_function_start_sal_1): ... this.
2196 (find_function_start_sal): Reimplement as wrapper around
2197 find_function_start_sal_1, and use
2198 find_pc_sect_containing_function to fill in the sal's symbol.
2199 (find_function_start_sal(symbol*, bool)): Adjust.
2200 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2201 comments.
2202 (find_pc_sect_containing_function): Declare.
2203
991ff292
PA
22042018-06-29 Pedro Alves <palves@redhat.com>
2205
2206 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2207 true if the the location has no symbol.
2208
44cee4fd
TT
22092018-06-28 Tom Tromey <tom@tromey.com>
2210
2211 * NEWS: Mention --enable-codesign.
2212 * silent-rules.mk (ECHO_SIGN): New variable.
2213 * configure.ac: Add --enable-codesign.
2214 * configure: Rebuild.
2215 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2216 (gdb$(EXEEXT)): Optionally invoke codesign.
2217
f2ffa92b
PA
22182018-06-28 Pedro Alves <palves@redhat.com>
2219
2220 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2221 comments.
2222 (switch_to_thread_no_regs): Adjust comment.
2223 * infcmd.c (stop_pc): Delete.
2224 (post_create_inferior, info_program_command): Replace references
2225 to stop_pc with references to thread_info->suspend.stop_pc.
2226 * inferior.h (stop_pc): Delete declaration.
2227 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2228 (handle_inferior_event_1, handle_signal_stop)
2229 (process_event_stop_test, keep_going_stepped_thread)
2230 (handle_step_into_function, handle_step_into_function_backward)
2231 (print_stop_location): Replace references to stop_pc with
2232 references to thread_info->suspend.stop_pc.
2233 (struct infcall_suspend_state) <stop_pc>: Delete field.
2234 (save_infcall_suspend_state, restore_infcall_suspend_state):
2235 Remove references to inf_stat->stop_pc.
2236 * linux-fork.c (fork_load_infrun_state): Likewise.
2237 * record-btrace.c (record_btrace_set_replay): Likewise.
2238 * record-full.c (record_full_goto_entry): Likewise.
2239 * remote.c (print_one_stopped_thread): Likewise.
2240 * target.c (target_resume): Extend comment.
2241 * thread.c (set_executing_thread): New.
2242 (set_executing): Use it.
2243 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2244 Remove references to stop_pc.
2245
ecdc3a72
PA
22462018-06-28 Pedro Alves <palves@redhat.com>
2247
2248 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2249 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2250
d95d3aef
TT
22512018-06-28 Tom Tromey <tom@tromey.com>
2252
2253 * coffread.c (coff_symfile_finish): Update.
2254 * xcoffread.c (xcoff_symfile_finish): Update.
2255 * elfread.c (elf_symfile_finish): Update.
2256 * symfile.h (dwarf2_free_objfile): Don't declare.
2257 * dwarf2read.c (_initialize_dwarf2_read): Use
2258 register_objfile_data_with_cleanup.
2259 (dwarf2_free_objfile): Now static. Change signature.
2260
291f9a96
PT
22612018-06-28 Petr Tesarik <ptesarik@suse.cz>
2262
2263 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2264 option "-o" to add-symbol-file-load to add an offset to each
2265 section's load address.
2266 * symfile.c (set_objfile_default_section_offset): New function.
2267
d81a3eaf
PT
22682018-06-28 Petr Tesarik <ptesarik@suse.cz>
2269
2270 * symfile.c (add_symbol_file_command): Make sure that sections
2271 with the same name are sorted in the same order.
2272
ed6dfe51
PT
22732018-06-28 Petr Tesarik <ptesarik@suse.cz>
2274
2275 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2276 require the second argument. If omitted, load sections at the
2277 addresses specified in the file.
2278
d4d429d5
PT
22792018-06-28 Petr Tesarik <ptesarik@suse.cz>
2280
2281 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2282 (_initialize_symfile): Add option "-o" to symbol-file to add an
2283 offset to each section of the symbol file.
2284
39b27ab6
PT
22852018-06-28 Petr Tesarik <ptesarik@suse.cz>
2286
2287 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2288
41827fc3
TT
22892018-06-27 Tom Tromey <tom@tromey.com>
2290
2291 * stack.c (_initialize_stack): Update "func" help text.
2292
0c6aef22
TT
22932018-06-27 Tom Tromey <tom@tromey.com>
2294
2295 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2296 std::vector.
2297 (unwind_infopy_str, pyuw_create_unwind_info)
2298 (unwind_infopy_add_saved_register, pyuw_sniffer)
2299 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2300 Update.
2301 (struct saved_reg): Add constructor.
2302 <value>: Now a gdbpy_ref<>.
2303
63177289
TT
23042018-06-27 Tom Tromey <tom@tromey.com>
2305
2306 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2307
e76f78a0
SM
23082018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2309
2310 * gdb-gdb.py.in: Format using autopep8.
2311
9a14af7b
SM
23122018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2313
2314 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2315 (type_lookup_function): Recognize CORE_ADDR values.
2316
189366cd
SM
23172018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2318
2319 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2320 print tag_name.
2321
68ad5fb9
SM
23222018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2323
2324 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2325 <__lt__>: Add.
2326
141ec9f6
SM
23272018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2328
2329 * gdb-gdb.py: Move to...
2330 * gdb-gdb.py.in: ... here.
2331 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2332 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2333 dependencies.
2334 (distclean): Remove gdb-gdb.py when cleaning.
2335 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2336 * configure: Re-generate.
2337
4c4e7ad4
PA
23382018-06-27 Pedro Alves <palves@redhat.com>
2339
2340 * proc-service.c (get_ps_regcache): New.
2341 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2342 (ps_lsetfpregs): Use it.
2343
7ab6656f
OJ
23442018-06-27 Omair Javaid <omair.javaid@linaro.org>
2345
2346 PR gdb/21695
2347 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2348 (dwarf_decode_lines_1): Adjust.
2349
bd583225
SM
23502018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2351
2352 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2353 override.
2354 <info_proc>: Likewise.
2355
9a325b7b
JB
23562018-06-26 Joel Brobecker <brobecker@adacore.com>
2357
2358 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2359 to windows_fetch_one_register, and only handle the case of
2360 fetching one register. Move the code that reloads the context
2361 and iterates over all registers if R is negative to...
2362 (windows_nat_target::fetch_registers): ... here.
2363 (do_windows_store_inferior_registers): Rename to
2364 windows_store_one_register, and only handle the case of storing
2365 one register. Move the code that handles the case where r is
2366 negative to...
2367 (windows_nat_target::store_registers) ... here.
2368
a33ccfc7
TT
23692018-06-26 Tom Tromey <tom@tromey.com>
2370
2371 PR rust/22574:
2372 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2373 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2374 Update.
2375 (rust_internal_print_type): Add podata parameter.
2376 (rust_print_type): Update.
2377
e0c547d1
TT
23782018-06-26 Tom Tromey <tom@tromey.com>
2379
2380 * typeprint.h (struct print_offset_data) <update, finish,
2381 maybe_print_hole>: New methods.
2382 <indentation>: New constant.
2383 * typeprint.c (print_offset_data::indentation): Define.
2384 (print_offset_data::maybe_print_hole, print_offset_data::update)
2385 (print_offset_data::finish): Move from c-typeprint.c and rename.
2386 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2387 (print_spaces_filtered_with_print_options): Update.
2388 (c_print_type_union_field_offset, maybe_print_hole)
2389 (c_print_type_struct_field_offset): Move to typeprint.c and
2390 rename.
2391 (c_type_print_base_struct_union): Update.
2392
75cbc781
PA
23932018-06-25 Pedro Alves <palves@redhat.com>
2394
2395 * gdbthread.h (thread_info_ref, delete_thread)
2396 (delete_thread_silent, first_thread_of_inferior)
2397 (any_thread_of_inferior, switch_to_thread)
2398 (enable_thread_stack_temporaries)
2399 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2400 (get_last_thread_stack_temporary)
2401 (value_in_thread_stack_temporaries, can_access_registers_thread):
2402 Spell out "struct thread_info" instead of just "thread_info".
2403 * inferior.h (notice_new_inferior): Likewise.
2404
b7a08269
PA
24052018-06-25 Pedro Alves <palves@redhat.com>
2406
2407 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2408 pass thread_info pointer to delete_thread.
2409 (windows_nat_target::detach): Pass inferior pointer to
2410 detach_inferior.
2411 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2412 delete_thread.
2413 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2414 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2415 and pass a thread_info pointer to delete_thread.
2416 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2417 pass thread_info pointer to delete_thread.
2418 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2419 delete_thread_silent call.
2420 * procfs.c (procfs_target::detach): Pass inferior pointer to
2421 detach_inferior.
2422 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2423 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2424 delete_thread_silent call.
2425 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2426 pass thread_info pointer to delete_thread.
2427 (windows_nat_target::detach): Pass inferior pointer to
2428 delete_inferior.
2429
8e7767e3
AH
24302018-06-22 Alan Hayward <alan.hayward@arm.com>
2431
2432 * regcache.c (readable_regcache::read_part): Fix asserts.
2433 (reg_buffer::raw_collect_part): New function.
2434 (regcache::write_part): Fix asserts.
2435 (reg_buffer::raw_supply_part): New function.
2436 (regcache::transfer_regset_register): New helper function.
2437 (regcache::transfer_regset): Call new functions.
2438 (regcache_supply_regset): Use gdb_byte*.
2439 (regcache::supply_regset): Likewise.
2440 (regcache_collect_regset): Likewise.
2441 (regcache::collect_regset): Likewise.
2442 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2443 (reg_buffer::raw_supply_part): Likewise.
2444 (regcache::transfer_regset_register): Likewise.
2445 (regcache::transfer_regset): Use gdb_byte*.
2446
bfd60e34
AH
24472018-06-22 Alan Hayward <alan.hayward@arm.com>
2448
2449 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2450
00431a78
PA
24512018-06-21 Pedro Alves <palves@redhat.com>
2452
2453 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2454 instead of a ptid_t. All callers adjusted.
2455 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2456 adjusted.
2457 (print_ada_task_info, display_current_task_id, task_command_1):
2458 Adjust.
2459 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2460 inferior_thread.
2461 (breakpoint_kind): Adjust.
2462 (remove_breakpoints_pid): Rename to ...
2463 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2464 pointer. All callers adjusted.
2465 (bpstat_clear_actions): Use inferior_thread.
2466 (get_bpstat_thread): New.
2467 (bpstat_do_actions): Use it.
2468 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2469 to take a thread_info pointer. All callers adjusted.
2470 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2471 (breakpoint_re_set_thread): Use inferior_thread.
2472 * breakpoint.h (struct inferior): Forward declare.
2473 (bpstat_stop_status): Update.
2474 (remove_breakpoints_pid): Delete.
2475 (remove_breakpoints_inf): New.
2476 * bsd-uthread.c (bsd_uthread_target::wait)
2477 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2478 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2479 (maint_btrace_packet_history_cmd)
2480 (maint_btrace_clear_packet_history_cmd): Adjust.
2481 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2482 inferior_thread.
2483 * cli/cli-interp.c: Include "inferior.h".
2484 * common/refcounted-object.h (struct
2485 refcounted_object_ref_policy): New.
2486 * compile/compile-object-load.c: Include gdbthread.h.
2487 (store_regs): Use inferior_thread.
2488 * corelow.c (core_target::close): Use current_inferior.
2489 (core_target_open): Adjust to use first_thread_of_inferior and use
2490 the current inferior.
2491 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2492 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2493 <thread>: ... this new field. All references adjusted.
2494 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2495 Take a thread_info pointer instead of a ptid_t.
2496 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2497 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2498 thread_info pointer instead of a ptid_t.
2499 * elfread.c: Include "inferior.h".
2500 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2501 Use inferior_thread.
2502 * eval.c (evaluate_subexp): Likewise.
2503 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2504 inferior_thread.
2505 * gdb_proc_service.h (struct thread_info): Forward declare.
2506 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2507 <thread>: ... this new field. All references adjusted.
2508 * gdbarch.h, gdbarch.c: Regenerate.
2509 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2510 'thread' parameter. All implementations and callers adjusted.
2511 * gdbthread.h (thread_info) <set_running>: New method.
2512 (delete_thread, delete_thread_silent): Take a thread_info pointer
2513 instead of a ptid.
2514 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2515 (first_thread_of_process): Delete, replaced by ...
2516 (first_thread_of_inferior): ... this new function. All callers
2517 adjusted.
2518 (any_live_thread_of_process): Delete, replaced by ...
2519 (any_live_thread_of_inferior): ... this new function. All callers
2520 adjusted.
2521 (switch_to_thread, switch_to_no_thread): Declare.
2522 (is_executing): Delete.
2523 (enable_thread_stack_temporaries): Update comment.
2524 <enable_thread_stack_temporaries>: Take a thread_info pointer
2525 instead of a ptid_t. Incref the thread.
2526 <~enable_thread_stack_temporaries>: Decref the thread.
2527 <m_ptid>: Delete
2528 <m_thr>: New.
2529 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2530 (get_last_thread_stack_temporary)
2531 (value_in_thread_stack_temporaries, can_access_registers_thread):
2532 Take a thread_info pointer instead of a ptid_t. All callers
2533 adjusted.
2534 * infcall.c (get_call_return_value): Use inferior_thread.
2535 (run_inferior_call): Work with thread pointers instead of ptid_t.
2536 (call_function_by_hand_dummy): Work with thread pointers instead
2537 of ptid_t. Use thread_info_ref.
2538 * infcmd.c (proceed_thread_callback): Access thread's state
2539 directly.
2540 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2541 access thread's state directly.
2542 (continue_command): Use inferior_thread.
2543 (info_program_command): Use find_thread_ptid and access thread
2544 state directly.
2545 (proceed_after_attach_callback): Use thread state directly.
2546 (notice_new_inferior): Take a thread_info pointer instead of a
2547 ptid_t. All callers adjusted.
2548 (exit_inferior): Take an inferior pointer instead of a pid. All
2549 callers adjusted.
2550 (exit_inferior_silent): New.
2551 (detach_inferior): Delete.
2552 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2553 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2554 (detach_inferior_command, kill_inferior_command): Use
2555 find_inferior_id instead of valid_gdb_inferior_id and
2556 gdb_inferior_id_to_pid.
2557 (inferior_command): Use inferior and thread pointers.
2558 * inferior.h (struct thread_info): Forward declare.
2559 (notice_new_inferior): Take a thread_info pointer instead of a
2560 ptid_t. All callers adjusted.
2561 (detach_inferior): Delete declaration.
2562 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2563 instead of a pid. All callers adjusted.
2564 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2565 (valid_gdb_inferior_id): Delete.
2566 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2567 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2568 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2569 ...
2570 <inf>: ... this new field.
2571 <step_ptid>: Delete, replaced by ...
2572 <step_thread>: ... this new field.
2573 (get_displaced_stepping_state): Take an inferior pointer instead
2574 of a pid. All callers adjusted.
2575 (displaced_step_in_progress_any_inferior): Adjust.
2576 (displaced_step_in_progress_thread): Take a thread pointer instead
2577 of a ptid_t. All callers adjusted.
2578 (displaced_step_in_progress, add_displaced_stepping_state): Take
2579 an inferior pointer instead of a pid. All callers adjusted.
2580 (get_displaced_step_closure_by_addr): Adjust.
2581 (remove_displaced_stepping_state): Take an inferior pointer
2582 instead of a pid. All callers adjusted.
2583 (displaced_step_prepare_throw, displaced_step_prepare)
2584 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2585 All callers adjusted.
2586 (start_step_over): Adjust.
2587 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2588 displaced step queue.
2589 (do_target_resume): Adjust.
2590 (fetch_inferior_event): Use inferior_thread.
2591 (context_switch, get_inferior_stop_soon): Take an
2592 execution_control_state pointer instead of a ptid_t. All callers
2593 adjusted.
2594 (switch_to_thread_cleanup): Delete.
2595 (stop_all_threads): Use scoped_restore_current_thread.
2596 * inline-frame.c: Include "gdbthread.h".
2597 (inline_state) <inline_state>: Take a thread pointer instead of a
2598 ptid_t. All callers adjusted.
2599 <ptid>: Delete, replaced by ...
2600 <thread>: ... this new field.
2601 (find_inline_frame_state): Take a thread pointer instead of a
2602 ptid_t. All callers adjusted.
2603 (skip_inline_frames, step_into_inline_frame)
2604 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2605 pointer instead of a ptid_t. All callers adjusted.
2606 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2607 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2608 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2609 pointers directly.
2610 * linux-nat.c (get_detach_signal): Likewise.
2611 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2612 (thread_db_notice_clone): Adjust.
2613 (thread_db_find_new_threads_silently)
2614 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2615 a thread pointer instead of a ptid_t. All callers adjusted.
2616 * mi/mi-cmd-var.c: Include "inferior.h".
2617 (mi_cmd_var_update_iter): Update to use thread pointers.
2618 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2619 inferior directly.
2620 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2621 out to ...
2622 (mi_output_running): ... this new function.
2623 (mi_on_resume_1): Adjust to use it.
2624 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2625 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2626 directly.
2627 (interrupt_thread_callback): : Adjust to use thread and inferior
2628 pointers.
2629 * proc-service.c: Include "gdbthread.h".
2630 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2631 * progspace-and-thread.c: Include "inferior.h".
2632 * progspace.c: Include "inferior.h".
2633 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2634 hold a reference to an inferior_object.
2635 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2636 inferior_thread.
2637 * python/py-inferior.c (struct inferior_object): Give the type a
2638 tag name instead of a typedef.
2639 (python_on_normal_stop): No need to check if the current thread is
2640 listed.
2641 (inferior_to_inferior_object): Change return type to
2642 inferior_object. All callers adjusted.
2643 (find_thread_object): Delete, bits factored out to ...
2644 (thread_to_thread_object): ... this new function.
2645 * python/py-infthread.c (create_thread_object): Use
2646 inferior_to_inferior_object.
2647 (thpy_is_stopped): Use thread pointer directly.
2648 (gdbpy_selected_thread): Use inferior_thread.
2649 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2650 field, replaced with ...
2651 <thread>: ... this new field. All users adjusted.
2652 (btpy_insn_or_gap_new): Drop const.
2653 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2654 callers adjusted.
2655 * python/py-record.c: Include "gdbthread.h".
2656 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2657 a ptid_t. All callers adjusted.
2658 (gdbpy_current_recording): Use inferior_thread.
2659 * python/py-record.h (recpy_record_object) <ptid>: Delete
2660 field, replaced with ...
2661 <thread>: ... this new field. All users adjusted.
2662 (recpy_element_object) <ptid>: Delete
2663 field, replaced with ...
2664 <thread>: ... this new field. All users adjusted.
2665 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2666 a ptid_t. All callers adjusted.
2667 * python/py-threadevent.c: Include "gdbthread.h".
2668 (get_event_thread): Use thread_to_thread_object.
2669 * python/python-internal.h (struct inferior_object): Forward
2670 declare.
2671 (find_thread_object, find_inferior_object): Delete declarations.
2672 (thread_to_thread_object, inferior_to_inferior_object): New
2673 declarations.
2674 * record-btrace.c: Include "inferior.h".
2675 (require_btrace_thread): Use inferior_thread.
2676 (record_btrace_frame_sniffer)
2677 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2678 (get_thread_current_frame): Use scoped_restore_current_thread and
2679 switch_to_thread.
2680 (get_thread_current_frame): Use thread pointer directly.
2681 (record_btrace_replay_at_breakpoint): Use thread's inferior
2682 pointer directly.
2683 * record-full.c: Include "inferior.h".
2684 * regcache.c: Include "gdbthread.h".
2685 (get_thread_arch_regcache): Use the inferior's address space
2686 directly.
2687 (get_thread_regcache, registers_changed_thread): New.
2688 * regcache.h (get_thread_regcache(thread_info *thread)): New
2689 overload.
2690 (registers_changed_thread): New.
2691 (remote_target) <remote_detach_1>: Swap order of parameters.
2692 (remote_add_thread): <remote_add_thread>: Return the new thread.
2693 (get_remote_thread_info(ptid_t)): New overload.
2694 (remote_target::remote_notice_new_inferior): Use thread pointers
2695 directly.
2696 (remote_target::process_initial_stop_replies): Use
2697 thread_info::set_running.
2698 (remote_target::remote_detach_1, remote_target::detach)
2699 (extended_remote_target::detach): Adjust.
2700 * stack.c (frame_show_address): Use inferior_thread.
2701 * target-debug.h (target_debug_print_thread_info_pp): New.
2702 * target-delegates.c: Regenerate.
2703 * target.c (default_thread_address_space): Delete.
2704 (memory_xfer_partial_1): Use current_inferior.
2705 (target_detach): Use current_inferior.
2706 (target_thread_address_space): Delete.
2707 (generic_mourn_inferior): Use current_inferior.
2708 * target.h (struct target_ops) <thread_address_space>: Delete.
2709 (target_thread_address_space): Delete.
2710 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2711 pointers directly.
2712 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2713 thread pointer instead of a ptid_t. Adjust all callers.
2714 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2715 (first_thread_of_process): Delete, replaced by ...
2716 (first_thread_of_inferior): ... this new function. All callers
2717 adjusted.
2718 (any_thread_of_process): Rename to ...
2719 (any_thread_of_inferior): ... this, and take an inferior pointer.
2720 (any_live_thread_of_process): Rename to ...
2721 (any_live_thread_of_inferior): ... this, and take an inferior
2722 pointer.
2723 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2724 (value_in_thread_stack_temporaries)
2725 (get_last_thread_stack_temporary): Take a thread pointer instead
2726 of a ptid_t. Adjust all callers.
2727 (thread_info::set_running): New.
2728 (validate_registers_access): Use inferior_thread.
2729 (can_access_registers_ptid): Rename to ...
2730 (can_access_registers_thread): ... this, and take a thread
2731 pointer.
2732 (print_thread_info_1): Adjust to compare thread pointers instead
2733 of ptids.
2734 (switch_to_no_thread, switch_to_thread): Make extern.
2735 (scoped_restore_current_thread::~scoped_restore_current_thread):
2736 Use m_thread pointer directly.
2737 (scoped_restore_current_thread::scoped_restore_current_thread):
2738 Use inferior_thread.
2739 (thread_command): Use thread pointer directly.
2740 (thread_num_make_value_helper): Use inferior_thread.
2741 * top.c (execute_command): Use inferior_thread.
2742 * tui/tui-interp.c: Include "inferior.h".
2743 * varobj.c (varobj_create): Use inferior_thread.
2744 (value_of_root_1): Use find_thread_global_id instead of
2745 global_thread_id_to_ptid.
2746
33bab475
AH
27472018-06-21 Alan Hayward <alan.hayward@arm.com>
2748
2749 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2750 possible.
2751 (regcache::write_part): Likewise.
2752 (readable_regcache::cooked_read_part): Update comment.
2753 (readable_regcache::cooked_write_part): Likewise.
2754 * regcache.h: (readable_regcache::read_part): Likewise.
2755 (regcache::write_part): Likewise.
2756
8363f9d5
RB
27572018-06-21 Richard Bunt <richard.bunt@arm.com>
2758 Dirk Schubert <dirk.schubert@arm.com>
2759
2760 * aarch64-linux-nat.c (post_attach): New.
2761 (aarch64_linux_nat_target::post_attach): Override post_attach to
2762 record the number of hardware debug registers.
2763
0d0b0ea2
TT
27642018-06-20 Tom Tromey <tom@tromey.com>
2765
2766 * python/py-param.c (add_setshow_generic): Make parameters const.
2767 (parmpy_init): Update.
2768
302abd6e
SM
27692018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2770
2771 * regcache.h (regcache_cooked_read_ftype): Rename to...
2772 (register_read_ftype): ...this, change type to function_view.
2773 (class reg_buffer) <save>: Remove src parameter.
2774 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2775 parameter non-const in first overload. Remove src parameter in
2776 second overload.
2777 * regcache.c (do_cooked_read): Remove.
2778 (readonly_detached_regcache::readonly_detached_regcache): Make
2779 parameter non-const, adjust call to other constructor.
2780 (reg_buffer::save): Remove src parameter.
2781 * frame.c (do_frame_register_read): Remove.
2782 (frame_save_as_regcache): Use lambda function.
2783 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2784 parameter to ppu2spu_data *.
2785 (ppu2spu_sniffer): Use lambda function.
2786
19f3f25f
SM
27872018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2788
2789 * record-full.c (record_full_target::insert_breakpoint): Remove
2790 "struct" keyword, add const.
2791
d0ac1c44
SM
27922018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2793
2794 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
2795 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
2796 * configure.ac: Remove AC_PREREQ, add missing quoting.
2797 * gnulib/configure.ac: Modernize usage of
2798 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
2799 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
2800 (AUTOMAKE_VERSION): Bump to 1.15.1.
2801 * configure: Re-generate.
2802 * config.in: Re-generate.
2803 * aclocal.m4: Re-generate.
2804 * gnulib/aclocal.m4: Re-generate.
2805 * gnulib/config.in: Re-generate.
2806 * gnulib/configure: Re-generate.
2807 * gnulib/import/Makefile.in: Re-generate.
2808
6ae50267
PA
28092018-06-19 Pedro Alves <palves@redhat.com>
2810
2811 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
2812 (lookup_minimal_symbol_by_pc_section): ... here with
2813 gdb_assert_not_reached added.
2814
61b04dd0
PA
28152018-06-19 Pedro Alves <palves@redhat.com>
2816
2817 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
2818 parameter with a block parameter. Compare location's block symbol
2819 with the frame's block instead of addresses.
2820 (skip_inline_frames): Pass the current block instead of the
2821 frame's address. Break out as soon as we determine the frame
2822 should not be skipped.
2823
f709fabb
TT
28242018-06-18 Tom Tromey <tom@tromey.com>
2825
2826 * solib-aix.c (solib_aix_get_section_offsets): Return
2827 unique_xmalloc_ptr.
2828 (solib_aix_solib_create_inferior_hook): Update.
2829
668eb2f0
TT
28302018-06-18 Tom Tromey <tom@tromey.com>
2831
2832 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
2833
309822ca
TT
28342018-06-18 Tom Tromey <tom@tromey.com>
2835
2836 * solib-frv.c (frv_relocate_main_executable): Use
2837 unique_xmalloc_ptr.
2838 * solib-dsbt.c (dsbt_relocate_main_executable): Use
2839 unique_xmalloc_ptr.
2840
06424eac
TT
28412018-06-18 Tom Tromey <tom@tromey.com>
2842
2843 * objfiles.h (inhibit_section_map_updates): Update.
2844 (resume_section_map_updates, resume_section_map_updates_cleanup):
2845 Remove.
2846 * solib-svr4.c (svr4_handle_solib_event): Update.
2847 * objfiles.c (inhibit_section_map_updates): Return
2848 scoped_restore_tmpl<int>.
2849 (resume_section_map_updates, resume_section_map_updates_cleanup):
2850 Remove.
2851
b4be9fad
TT
28522018-06-18 Tom Tromey <tom@tromey.com>
2853
2854 * valprint.h (read_string): Update.
2855 * valprint.c (read_string): Change type of "buffer".
2856 (val_print_string): Update.
2857 * python/py-value.c (valpy_string): Update.
2858 * language.h (struct language_defn) <la_get_string>: Change
2859 type of "buffer".
2860 (default_get_string, c_get_string): Update.
2861 * language.c (default_get_string): Change type of "buffer".
2862 * guile/scm-value.c (gdbscm_value_to_string): Update.
2863 * c-lang.c (c_get_string): Change type of "buffer".
2864
3f0dbd67
TT
28652018-06-18 Tom Tromey <tom@tromey.com>
2866
2867 * ser-mingw.c (struct pipe_state_destroyer): New.
2868 (pipe_state_up): New typedef.
2869 (cleanup_pipe_state): Remove.
2870 (pipe_windows_open): Use pipe_state_up. Don't release argv.
2871
69d340c6
TT
28722018-06-18 Tom Tromey <tom@tromey.com>
2873
2874 * rust-lang.h (rust_yyerror): Don't declare.
2875 * rust-lang.c (rust_language_defn): Update.
2876 * rust-exp.y (yyerror): Now static.
2877 * parse.c (parse_exp_in_context_1): Update.
2878 * p-lang.h (p_yyerror): Don't declare.
2879 * p-lang.c (p_language_defn): Update.
2880 * p-exp.y (yyerror): Now static.
2881 * opencl-lang.c (opencl_language_defn): Update.
2882 * objc-lang.c (objc_language_defn): Update.
2883 * m2-lang.h (m2_yyerror): Don't declare.
2884 * m2-lang.c (m2_language_defn): Update.
2885 * m2-exp.y (yyerror): Now static.
2886 * language.h (struct language_defn) <la_error>: Remove.
2887 * language.c (unk_lang_error): Remove.
2888 (unknown_language_defn, auto_language_defn): Remove.
2889 * go-lang.h (go_yyerror): Don't declare.
2890 * go-lang.c (go_language_defn): Update.
2891 * go-exp.y (yyerror): Now static.
2892 * f-lang.h (f_yyerror): Don't declare.
2893 * f-lang.c (f_language_defn): Update.
2894 * f-exp.y (yyerror): Now static.
2895 * d-lang.h (d_yyerror): Don't declare.
2896 * d-lang.c (d_language_defn): Update.
2897 * d-exp.y (yyerror): Now static.
2898 * c-lang.h (c_yyerror): Don't declare.
2899 * c-lang.c (c_language_defn, cplus_language_defn)
2900 (asm_language_defn, minimal_language_defn): Update.
2901 * c-exp.y (yyerror): Now static.
2902 * ada-lang.h (ada_yyerror): Don't declare.
2903 * ada-lang.c (ada_language_defn): Update.
2904 * ada-exp.y (yyerror): Now static.
2905
e9902bfc
AH
29062018-06-18 Alan Hayward <alan.hayward@arm.com>
2907
2908 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
2909 (store_sveregs_to_thread): Likewise.
2910 (aarch64_linux_fetch_inferior_registers): Check for SVE.
2911 (aarch64_linux_store_inferior_registers): Likewise.
2912 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
2913 function.
2914 (aarch64_sve_regs_copy_to_regcache): Likewise.
2915 (aarch64_sve_regs_copy_from_regcache): Likewise.
2916 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
2917 declaration.
2918 (aarch64_sve_regs_copy_to_regcache): Likewise.
2919 (aarch64_sve_regs_copy_from_regcache): Likewise.
2920 (sve_context): Structure from Linux headers.
2921 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
2922 (SVE_SIG_ZREG_SIZE): Likewise.
2923 (SVE_SIG_PREG_SIZE): Likewise.
2924 (SVE_SIG_FFR_SIZE): Likewise.
2925 (SVE_SIG_REGS_OFFSET): Likewise.
2926 (SVE_SIG_ZREGS_OFFSET): Likewise.
2927 (SVE_SIG_ZREG_OFFSET): Likewise.
2928 (SVE_SIG_ZREGS_SIZE): Likewise.
2929 (SVE_SIG_PREGS_OFFSET): Likewise.
2930 (SVE_SIG_PREG_OFFSET): Likewise.
2931 (SVE_SIG_PREGS_SIZE): Likewise.
2932 (SVE_SIG_FFR_OFFSET): Likewise.
2933 (SVE_SIG_REGS_SIZE): Likewise.
2934 (SVE_SIG_CONTEXT_SIZE): Likewise.
2935 (SVE_PT_REGS_MASK): Likewise.
2936 (SVE_PT_REGS_FPSIMD): Likewise.
2937 (SVE_PT_REGS_SVE): Likewise.
2938 (SVE_PT_VL_INHERIT): Likewise.
2939 (SVE_PT_VL_ONEXEC): Likewise.
2940 (SVE_PT_REGS_OFFSET): Likewise.
2941 (SVE_PT_FPSIMD_OFFSET): Likewise.
2942 (SVE_PT_FPSIMD_SIZE): Likewise.
2943 (SVE_PT_SVE_ZREG_SIZE): Likewise.
2944 (SVE_PT_SVE_PREG_SIZE): Likewise.
2945 (SVE_PT_SVE_FFR_SIZE): Likewise.
2946 (SVE_PT_SVE_FPSR_SIZE): Likewise.
2947 (SVE_PT_SVE_FPCR_SIZE): Likewise.
2948 (__SVE_SIG_TO_PT): Likewise.
2949 (SVE_PT_SVE_OFFSET): Likewise.
2950 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
2951 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
2952 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
2953 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
2954 (SVE_PT_SVE_PREG_OFFSET): Likewise.
2955 (SVE_PT_SVE_PREGS_SIZE): Likewise.
2956 (SVE_PT_SVE_FFR_OFFSET): Likewise.
2957 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
2958 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
2959 (SVE_PT_SVE_SIZE): Likewise.
2960 (SVE_PT_SIZE): Likewise.
2961 (HAS_SVE_STATE): New define.
2962
17a1cc89
AH
29632018-06-18 Alan Hayward <alan.hayward@arm.com>
2964
2965 * nat/aarch64-sve-linux-sigcontext.h: New file.
2966 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
2967 new files.
2968 (SVE_VQ_MIN): Likewise.
2969 (SVE_VQ_MAX): Likewise.
2970 (SVE_VL_MIN): Likewise.
2971 (SVE_VL_MAX): Likewise.
2972 (SVE_NUM_ZREGS): Likewise.
2973 (SVE_NUM_PREGS): Likewise.
2974 (sve_vl_valid): Likewise.
2975 (struct user_sve_header): Likewise.
2976
7010835a
AB
29772018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
2978 Richard Bunt <Richard.Bunt@arm.com>
2979
2980 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
2981 was requested by GDB.
2982
479b3ef4
TV
29832018-06-15 Tom de Vries <tdevries@suse.de>
2984
2985 * MAINTAINERS (Write After Approval): Add Tom de Vries.
2986
8199b8f4
SM
29872018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
2988
2989 * gnulib/update-gnulib.sh: Print expected versions of
2990 autoconf/aclocal.
2991
55c748a1
SM
29922018-06-14 Simon Marchi <simon.marchi@ericsson.com>
2993
2994 * arch-utils.c (default_type_align): Use type_length_units.
2995 * gdbtypes.c (type_align): Use type_length_units.
2996
87a8eca7
PW
29972018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2998
2999 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3000 of 'define' command.
3001
5d9a0608
TV
30022018-06-14 Tom de Vries <tdevries@suse.de>
3003
3004 PR cli/22573
3005 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3006 get_no_prettyformat_print_options.
3007
ab89b5a5
SM
30082018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3009
3010 * sparc-nat.h: Include target.h.
3011 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3012 <fetch_registers>: Remove this argument in function call.
3013 <store_registers>: Remove this argument in function call, remove
3014 extra semicolon.
3015 <low_forget_process>: Call sparc64_forget_process instead of
3016 sparc_forget_process.
3017
62c808ae
RO
30182018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3019
3020 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3021 (procfs_target::make_corefile_notes): Adjust to new
3022 target_read_alloc return type.
3023
1840d81a
AB
30242018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3025 Stephen Roberts <stephen.roberts@arm.com>
3026
3027 PR gdb/22882
3028 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3029 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3030 Move should_notify_stop local into more inner scope.
3031
9516f85a
AB
30322018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3033 Stephen Roberts <stephen.roberts@arm.com>
3034
3035 PR gdb/22882
3036 * infrun.c (resume_1): Add call to mark_async_event_handler.
3037
defd2172
AB
30382018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3039
3040 * infrun.c (do_target_wait): Change old version of $pc printed.
3041
7b23e087
SM
30422018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3043
3044 * dwarf2read.c (read_index_from_section): Rename to...
3045 (read_gdb_index_from_section): ... this, update all callers.
3046 (dwarf2_read_index): Rename to...
3047 (dwarf2_read_gdb_index): ... this, update all callers.
3048
69c67a0b
JDA
30492018-06-11 John David Anglin <danglin@gcc.gnu.org>
3050
3051 * gdb/hppa-linux-nat.c
3052 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3053 hppa_linux_nat_target::fetch_registers.
3054
65d4cada
AH
30552018-06-11 Alan Hayward <alan.hayward@arm.com>
3056
3057 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3058 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3059 (AARCH64_DWARF_SVE_FFR): Likewise.
3060 (AARCH64_DWARF_SVE_P0): Likewise.
3061 (AARCH64_DWARF_SVE_Z0): Likewise.
3062
f868386e
AH
30632018-06-11 Alan Hayward <alan.hayward@arm.com>
3064
3065 * common/common-regcache.h (raw_compare): New function.
3066 * regcache.c (regcache::raw_compare): Likewise.
3067 * regcache.h (regcache::raw_compare): New declaration.
3068
9c861883
AH
30692018-06-11 Alan Hayward <alan.hayward@arm.com>
3070
3071 * common/common-regcache.h (reg_buffer_common): New structure.
3072 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3073 (reg_buffer::raw_supply): Likewise.
3074 (reg_buffer::raw_supply_integer): Likewise.
3075 (reg_buffer::raw_supply_zeroed): Likewise.
3076 (reg_buffer::raw_collect): Likewise.
3077 (reg_buffer::raw_collect_integer): Likewise.
3078 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3079 (reg_buffer::raw_supply): Likewise.
3080 (reg_buffer::raw_supply_integer): Likewise.
3081 (reg_buffer::raw_supply_zeroed): Likewise.
3082 (reg_buffer::raw_collect): Likewise.
3083 (reg_buffer::raw_collect_integer): Likewise.
3084
953edf2b
TT
30852018-06-10 Tom Tromey <tom@tromey.com>
3086
3087 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3088 (class remote_state) <stop_reply_queue>: Now std::vector.
3089 (remote_state::~remote_state)
3090 (remote_target::stop_reply_queue_length): Update.
3091 (struct queue_iter_param, remove_child_of_pending_fork)
3092 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3093 (check_pending_event_prevents_wildcard_vcont_callback)
3094 (remove_stop_reply_for_inferior)
3095 (remove_stop_reply_of_remote_state)
3096 (remote_notif_remove_once_on_match)
3097 (stop_reply_match_ptid_and_ws)
3098 (remote_kill_child_of_pending_fork): Remove.
3099 (remote_target::remove_new_fork_children)
3100 (remote_target::check_pending_events_prevent_wildcard_vcont)
3101 (remote_target::discard_pending_stop_replies)
3102 (remote_target::discard_pending_stop_replies_in_queue)
3103 (remote_target::remote_notif_remove_queued_reply)
3104 (remote_target::queued_stop_reply)
3105 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3106 (remote_target::wait, remote_target::kill_new_fork_children)
3107 (remote_target::async): Update.
3108
1ddbba9d
TT
31092018-06-10 Tom Tromey <tom@tromey.com>
3110
3111 * record-full.c (record_full_arch_list_cleanups): Remove.
3112 (record_full_message): Use try/catch.
3113 (record_full_wait_cleanups): Remove.
3114 (record_full_wait_1): Use try/catch.
3115 (record_full_restore): Likewise.
3116
219605fd
TT
31172018-06-10 Tom Tromey <tom@tromey.com>
3118
3119 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3120 declare VEC. Add constructor.
3121 <in_target_beneath>: Now bool.
3122 (record_full_breakpoints): Now a std::vector, static.
3123 (record_full_sync_record_breakpoints)
3124 (record_full_init_record_breakpoints)
3125 (record_full_target::insert_breakpoint)
3126 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3127
71b73764
SM
31282018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3129
3130 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3131 * serial.c (serial_interface_lookup): Remove struct keyword.
3132
4360561f
TT
31332018-06-10 Tom Tromey <tom@tromey.com>
3134
3135 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3136 method.
3137 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3138 a method.
3139 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3140 method.
3141 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3142 "beneath" as a method.
3143 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3144 Use "beneath" as a method.
3145
d14b92bf
TT
31462018-06-10 Tom Tromey <tom@tromey.com>
3147
3148 * tracefile.c (struct trace_file_writer_deleter): New.
3149 <operator()>: Rename from trace_file_writer_xfree.
3150 (trace_file_writer_up): New typedef.
3151 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3152
835dcf92
SM
31532018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3154
3155 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3156 <m_registers, m_register_status>: Change type to
3157 std::unique_ptr.
3158 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3159 XCNEWVEC.
3160
aac0d564
SM
31612018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3162
3163 * common/common-regcache.h (enum register_status): Add
3164 underlying type "signed char".
3165 * regcache.h (reg_buffer) <m_register_status>: Change type to
3166 register_status *.
3167 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3168 register_status instead of signed char.
3169 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3170 (reg_buffer::get_register_status): Remove cast.
3171 (readable_regcache::raw_read): Remove cast.
3172 (readable_regcache::cooked_read): Remove cast.
3173
77ad7394
TT
31742018-06-09 Tom Tromey <tom@tromey.com>
3175
3176 * source.c (reverse_search_command, forward_search_command): Use
3177 scoped_fd.
3178
191cca63
TT
31792018-06-09 Tom Tromey <tom@tromey.com>
3180
3181 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3182 (serial_ops_list): Now static, std::vector.
3183 (serial_interface_lookup, serial_add_interface): Update.
3184
c5d0225d
TT
31852018-06-09 Tom Tromey <tom@tromey.com>
3186
3187 * dwarf2read.c (process_cu_includes): Update.
3188 (process_full_comp_unit): Update.
3189 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3190 std::vector.
3191
aeab5128
PK
31922018-06-08 Paul Koning <paul_koning@dell.com>
3193
3194 PR gdb/23252
3195
3196 * python/python.c (do_start_initialization):
3197 Avoid call to internal Python API.
3198 (init__gdb_module): New function.
3199
5045b3d7
GB
32002018-06-08 Gary Benson <gbenson@redhat.com>
3201
3202 * linux-thread-db.c (valprint.h): New include.
3203 (struct check_thread_db_info): New structure.
3204 (check_thread_db_on_load, tdb_testinfo): New static globals.
3205 (check_thread_db, check_thread_db_callback): New functions.
3206 (try_thread_db_load_1): Run integrity checks if requested.
3207 (maintenance_check_libthread_db): New function.
3208 (_initialize_thread_db): Register "maint check libthread-db"
3209 and "maint set/show check-libthread-db".
3210 * NEWS: Mention the above new commands.
3211
2f4f025f
TT
32122018-06-08 Tom Tromey <tom@tromey.com>
3213
3214 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3215 now a method.
3216
343b0027
TT
32172018-06-08 Tom Tromey <tom@tromey.com>
3218
3219 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3220
8dcc53b3
TT
32212018-06-08 Tom Tromey <tom@tromey.com>
3222
3223 * common/btrace-common.h (struct btrace_data): Add constructor,
3224 destructor, move assignment operator.
3225 <empty, clear, fini>: New methods.
3226 <format>: Initialize.
3227 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3228 (btrace_data_empty): Don't declare.
3229 * common/btrace-common.c (btrace_data_init): Remove.
3230 (btrace_data::fini): Rename from btrace_data_fini.
3231 (btrace_data::empty): Rename from btrace_data_empty.
3232 (btrace_data::clear): Rename from btrace_data_clear. Return
3233 bool.
3234 * btrace.h (make_cleanup_btrace_data): Don't declare.
3235 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3236 (parse_xml_btrace): Update.
3237 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3238 (maint_btrace_clear_packet_history_cmd): Update.
3239
a1740ee1
PA
32402018-06-07 Pedro Alves <palves@redhat.com>
3241
3242 * target.h (target_ops) <beneath>: Now a method. All references
3243 updated.
3244 (class target_stack): New.
3245 * target.c (g_target_stack): New.
3246 (g_current_top_target): Delete.
3247 (current_top_target): Get the top target out of g_target_stack.
3248 (target_stack::push, target_stack::unpush): New.
3249 (push_target, unpush_target): Reimplement.
3250 (target_is_pushed): Reimplement in terms of g_target_stack.
3251 (target_ops::beneath, target_stack::find_beneath): New.
3252
d6ca69cd
PA
32532018-06-07 Pedro Alves <palves@redhat.com>
3254
3255 * target.h (find_target_beneath): Delete declaration.
3256 * target.c (find_target_beneath): Delete definition.
3257 * aix-thread.c: All callers of find_target_beneath adjusted to
3258 call target_ops::beneath instead.
3259 * bsd-uthread.c: Likewise.
3260 * linux-thread-db.c: Likewise.
3261 * ravenscar-thread.c: Likewise.
3262 * sol-thread.c: Likewise.
3263 * spu-multiarch.c: Likewise.
3264
b6a8c27b
PA
32652018-06-07 Pedro Alves <palves@redhat.com>
3266
3267 * target.h (target_ops) <beneath>: Now a method. All references
3268 updated.
3269 (target_ops) <m_beneath>: New.
3270 * target.c (target_ops::beneath): New.
3271 * corelow.c: Adjust all references to target_ops::beneath.
3272 * linux-thread-db.c: Likewise.
3273 * make-target-delegates: Likewise.
3274 * record-btrace.c: Likewise.
3275 * record-full.c: Likewise.
3276 * remote.c: Likewise.
3277 * target.c: Likewise.
3278 * target-delegates.c: Regenerate.
3279
8b88a78e
PA
32802018-06-07 Pedro Alves <palves@redhat.com>
3281
3282 * target.h (target_stack): Delete.
3283 (current_top_target): Declare function.
3284 * target.c (target_stack): Delete.
3285 (g_current_top_target): New.
3286 (current_top_target): New function.
3287 * auxv.c: Use current_top_target instead of target_stack
3288 throughout.
3289 * avr-tdep.c: Likewise.
3290 * breakpoint.c: Likewise.
3291 * corefile.c: Likewise.
3292 * elfread.c: Likewise.
3293 * eval.c: Likewise.
3294 * exceptions.c: Likewise.
3295 * frame.c: Likewise.
3296 * gdbarch-selftests.c: Likewise.
3297 * gnu-v3-abi.c: Likewise.
3298 * ia64-tdep.c: Likewise.
3299 * ia64-vms-tdep.c: Likewise.
3300 * infcall.c: Likewise.
3301 * infcmd.c: Likewise.
3302 * infrun.c: Likewise.
3303 * linespec.c: Likewise.
3304 * linux-tdep.c: Likewise.
3305 * minsyms.c: Likewise.
3306 * ppc-linux-nat.c: Likewise.
3307 * ppc-linux-tdep.c: Likewise.
3308 * procfs.c: Likewise.
3309 * regcache.c: Likewise.
3310 * remote.c: Likewise.
3311 * rs6000-tdep.c: Likewise.
3312 * s390-linux-nat.c: Likewise.
3313 * s390-tdep.c: Likewise.
3314 * solib-aix.c: Likewise.
3315 * solib-darwin.c: Likewise.
3316 * solib-dsbt.c: Likewise.
3317 * solib-spu.c: Likewise.
3318 * solib-svr4.c: Likewise.
3319 * solib-target.c: Likewise.
3320 * sparc-tdep.c: Likewise.
3321 * sparc64-tdep.c: Likewise.
3322 * spu-tdep.c: Likewise.
3323 * symfile.c: Likewise.
3324 * symtab.c: Likewise.
3325 * target-descriptions.c: Likewise.
3326 * target-memory.c: Likewise.
3327 * target.c: Likewise.
3328 * target.h: Likewise.
3329 * tracefile-tfile.c: Likewise.
3330 * tracepoint.c: Likewise.
3331 * valops.c: Likewise.
3332 * valprint.c: Likewise.
3333 * value.c: Likewise.
3334 * windows-tdep.c: Likewise.
3335 * mi/mi-main.c: Likewise.
3336
c7110220
TT
33372018-06-07 Tom Tromey <tom@tromey.com>
3338
3339 * valprint.h (build_address_symbolic): Declare.
3340 * printcmd.c (print_address_symbolic): Update.
3341 (build_address_symbolic): Change "name" and "filename" to
3342 std::string.
3343 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3344 Update.
3345 * defs.h (build_address_symbolic): Remove declaration.
3346
63bad7b6
AH
33472018-06-07 Alan Hayward <alan.hayward@arm.com>
3348
3349 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3350 (aarch64_vnv_type): Add function.
3351 (aarch64_pseudo_register_name): Add V regs for SVE.
3352 (aarch64_pseudo_register_type): Likewise.
3353 (aarch64_pseudo_register_reggroup_p): Likewise.
3354 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3355 (aarch64_pseudo_read_value): Add V regs for SVE.
3356 (aarch64_pseudo_write_2): Use V0 offset for SVE
3357 (aarch64_pseudo_write): Add V regs for SVE.
3358 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3359
13e3c608
SDJ
33602018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3361
3362 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3363 (sve_vl_from_vq): Likewise.
3364
c61b06a1
TT
33652018-06-05 Tom Tromey <tom@tromey.com>
3366
3367 * cli/cli-cmds.c (show_version): Update.
3368 * top.c (print_gdb_version): Add "interactive" parameter.
3369 Update.
3370 * main.c (captured_main_1): Update.
3371 * top.h (print_gdb_version): Add "interactive" parameter and a
3372 comment.
3373
115f7325
DM
33742018-06-05 David Malcolm <dmalcolm@redhat.com>
3375
3376 * common/enum-flags.h: Add trailing semicolon to example in
3377 comment.
3378
eb6af809
TT
33792018-06-05 Tom Tromey <tom@tromey.com>
3380
3381 PR cli/12326:
3382 * NEWS: Add entry about pager.
3383 * utils.c (pagination_disabled_for_command): New global.
3384 (prompt_for_continue): Allow "c" response to prompt.
3385 (reinitialize_more_filter): Clear
3386 pagination_disabled_for_command.
3387 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3388
54d343a2
TT
33892018-06-04 Tom Tromey <tom@tromey.com>
3390
3391 * ada-lang.h (ada_lookup_symbol_list): Update.
3392 * ada-lang.c (resolve_subexp): Update.
3393 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3394 parameter.
3395 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3396 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3397 results parameter to std::vector.
3398 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3399 Update.
3400 * ada-exp.y (block_lookup): Update.
3401 (select_possible_type_sym): Change type of syms. Remove nsyms
3402 parameter.
3403 (write_var_or_type, write_name_assoc): Update.
3404
178d6a63
JB
34052018-06-04 Joel Brobecker <brobecker@adacore.com>
3406
3407 * windows-nat.c (windows_nat_target::xfer_partial): Return
3408 TARGET_XFER_E_IO if we need to delegate to the target beneath
3409 but BENEATH is NULL.
3410
baf00c2d
SM
34112018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3412
3413 * Makefile.in (config.status): Add configure.nat as a
3414 dependency.
3415
214b073c
TT
34162018-06-04 Tom Tromey <tom@tromey.com>
3417
3418 * cp-name-parser.y (cpname_state): Add method declarations.
3419 (HANDLE_QUAL): Update.
3420 (cpname_state::d_grab, cpname_state::fill_comp)
3421 (cpname_state::make_operator, cpname_state::make_dtor)
3422 (cpname_state::make_builtin_type, cpname_state::make_name)
3423 (cpname_state::d_qualify, cpname_state::d_int_type)
3424 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3425 (%union): Move earlier.
3426
62b74cb8
AH
34272018-06-04 Alan Hayward <alan.hayward@arm.com>
3428
3429 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3430
3c5cd5c3
AH
34312018-06-04 Alan Hayward <alan.hayward@arm.com>
3432
3433 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3434 (aarch64_pseudo_write_1): Likewise.
3435 (aarch64_pseudo_read_value): Use helper.
3436 (aarch64_pseudo_write): Likewise.
3437
59f413d5
PA
34382018-06-04 Pedro Alves <palves@redhat.com>
3439
3440 * darwin-nat.c (darwin_ops): Delete.
3441 (darwin_attach_pid): Use get_native_target.
3442
1332a140
AH
34432018-06-04 Alan Hayward <alan.hayward@arm.com>
3444
3445 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3446 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3447
ba2d2bb2
AH
34482018-06-04 Alan Hayward <alan.hayward@arm.com>
3449
3450 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3451 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3452 (aarch64_gdbarch_init): Check for SVE.
3453 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3454
34552018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3456
3457 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3458 * aarch64-tdep.h (aarch64_read_description): Likewise.
3459 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3460 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3461 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3462 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3463 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3464
41c60b4b
SM
34652018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3466
3467 * value.c (value_fetch_lazy_bitfield): New.
3468 (value_fetch_lazy_memory): New.
3469 (value_fetch_lazy_register): New.
3470 (value_fetch_lazy): Factor out to smaller functions.
3471
7b640f72
TT
34722018-06-01 Tom Tromey <tom@tromey.com>
3473
3474 * cp-name-parser.y (backslashable, represented): Now const.
3475
98e69eb3
TT
34762018-06-01 Tom Tromey <tom@tromey.com>
3477
3478 * cp-name-parser.y: Include parser-defs.h.
3479 (parser_fprintf): Remove declaration.
3480
49265499
TT
34812018-06-01 Tom Tromey <tom@tromey.com>
3482
3483 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3484 %parse-param.
3485 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3486 (global_result): Remove globals.
3487 (struct cpname_state): New.
3488 (yyparse): Don't declare.
3489 (yylex, yyerror): Move declarations after %union.
3490 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3491 (make_name): Add state parameter.
3492 Update all callers.
3493 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3494 parameter.
3495 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3496 Update.
3497 (yylex): Add lvalp, state parameters.
3498 (yyerror): Add state parameter.
3499 (cp_demangled_name_to_comp): Update.
3500
55b6c984
TT
35012018-06-01 Tom Tromey <tom@tromey.com>
3502
3503 * cp-name-parser.y (parser_fprintf): Declare.
3504 (GDB_YY_REMAP_PREFIX): Define.
3505 Include yy-remap.h. Don't redefine yy* identifiers.
3506
3513a6bb
TT
35072018-06-01 Tom Tromey <tom@tromey.com>
3508
3509 * python/py-type.c (typy_legacy_template_argument): Update.
3510 * cp-support.h (cp_demangled_name_to_comp): Update.
3511 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3512 parameter to be a "std::string *".
3513 (main): Update.
3514
e9cb46ab
L
35152018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3516
3517 * ada-lex.l: Include "diagnostics.h" instead of
3518 "common/diagnostics.h".
3519 * unittests/environ-selftests.c: Likewise.
3520 * common/diagnostics.h: Moved to ../include.
3521
8e817061
JB
35222018-06-01 Joel Brobecker <brobecker@adacore.com>
3523
3524 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3525 to language_mode_manual while calling breakpoint_re_set_one.
3526
a737d952
TT
35272018-06-01 Tom Tromey <tom@tromey.com>
3528
3529 * valops.c (value_cast_structs, destructor_name_p): Update.
3530 * symtab.c (gdb_mangle_name): Update.
3531 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3532 Update.
3533 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3534 (pascal_object_print_value_fields, pascal_object_print_value):
3535 Update.
3536 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3537 * linespec.c (find_methods): Update.
3538 * gdbtypes.h (type_name_no_tag): Remove.
3539 (type_name_or_error): Rename from type_name_no_tag_or_error.
3540 * gdbtypes.c (type_name_no_tag): Remove.
3541 (type_name_or_error): Rename from type_name_no_tag_or_error.
3542 (lookup_struct_elt_type, check_typedef): Update.
3543 * expprint.c (print_subexp_standard): Update.
3544 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3545 * d-namespace.c (d_lookup_nested_symbol): Update.
3546 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3547 (cp_print_class_member): Update.
3548 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3549 * completer.c (add_struct_fields): Update.
3550 * c-typeprint.c (cp_type_print_derivation_info)
3551 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3552 Update.
3553 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3554 (ada_prefer_type, ada_is_exception_sym): Update.
3555
e86ca25f
TT
35562018-06-01 Tom Tromey <tom@tromey.com>
3557
3558 * valops.c (enum_constant_from_type, value_namespace_elt)
3559 (value_maybe_namespace_elt): Update.
3560 * valarith.c (find_size_for_pointer_math): Update.
3561 * target-descriptions.c (make_gdb_type): Update.
3562 * symmisc.c (print_symbol): Update.
3563 * stabsread.c (define_symbol, read_type)
3564 (complain_about_struct_wipeout, add_undefined_type)
3565 (cleanup_undefined_types_1): Update.
3566 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3567 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3568 (rust_internal_print_type, rust_composite_type)
3569 (rust_evaluate_funcall, rust_evaluate_subexp)
3570 (rust_inclusive_range_type_p): Update.
3571 * python/py-type.c (typy_get_tag): Update.
3572 * p-typeprint.c (pascal_type_print_base): Update.
3573 * mdebugread.c (parse_symbol, parse_type): Update.
3574 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3575 Update.
3576 * guile/scm-type.c (gdbscm_type_tag): Update.
3577 * go-lang.c (sixg_string_p): Update.
3578 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3579 Update.
3580 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3581 (TYPE_TAG_NAME): Remove.
3582 * gdbtypes.c (type_name_no_tag): Simplify.
3583 (check_typedef, check_types_equal, recursive_dump_type)
3584 (copy_type_recursive, arch_composite_type): Update.
3585 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3586 in summary mode when needed.
3587 * eval.c (evaluate_funcall): Update.
3588 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3589 (process_structure_scope, read_enumeration_type)
3590 (read_namespace_type, read_module_type, determine_prefix): Update.
3591 * cp-support.c (inspect_type): Update.
3592 * coffread.c (process_coff_symbol, decode_base_type): Update.
3593 * c-varobj.c (c_is_path_expr_parent): Update.
3594 * c-typeprint.c (c_type_print_base_struct_union): Update.
3595 (c_type_print_base_1): Update. Print struct/class/union/enum in
3596 summary when using C language.
3597 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3598 (gen_maybe_namespace_elt): Update.
3599 * ada-lang.c (ada_type_name): Simplify.
3600 (empty_record, ada_template_to_fixed_record_type_1)
3601 (template_to_static_fixed_type)
3602 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3603
c1ec8cea
TT
36042018-06-01 Tom Tromey <tom@tromey.com>
3605
3606 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3607 c_print_type.
3608 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3609 (c_print_type): Update.
3610 (c_print_type): New overload.
3611 (c_type_print_varspec_prefix, c_type_print_args)
3612 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3613 (c_type_print_base_struct_union, c_type_print_base_1)
3614 (cp_type_print_method_args): Add "language" parameter.
3615 (c_type_print_base): Update.
3616 * c-lang.h (c_print_type): Add new overload.
3617
bc8453a7
TT
36182018-06-01 Tom Tromey <tom@tromey.com>
3619
3620 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3621 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3622
739e8682
AH
36232018-06-01 Alan Hayward <alan.hayward@arm.com>
3624
3625 * aarch64-tdep.c (aarch64_sve_register_names): New const
3626 var.
3627 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3628 (AARCH64_SVE_Z_REGS_NUM): New define.
3629 (AARCH64_SVE_P_REGS_NUM): Likewise.
3630 (AARCH64_SVE_NUM_REGS): Likewise.
3631
8a60efe7
UB
36322018-05-31 Uros Bizjak <ubizjak@gmail.com>
3633
3634 * nat/linux-ptrace.h [__alpha__]
3635 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3636 definitions.
3637
4b2dfa9d
MR
36382018-05-31 Maciej W. Rozycki <macro@mips.com>
3639
3640 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3641 the endianness selected.
3642 * NEWS: Document `set endian auto' mode operation update.
3643
122394f1
AH
36442018-05-31 Alan Hayward <alan.hayward@arm.com>
3645
3646 * Makefile.in: Add new header.
3647 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3648 (sve_vl_from_vg): Likewise.
3649 (sve_vq_from_vl): Likewise.
3650 (sve_vl_from_vq): Likewise.
3651 (sve_vq_from_vg): Likewise.
3652 (sve_vg_from_vq): Likewise.
3653 * configure.nat: Add new c file.
3654 * nat/aarch64-sve-linux-ptrace.c: New file.
3655 * nat/aarch64-sve-linux-ptrace.h: New file.
3656
95228a0d
AH
36572018-05-31 Alan Hayward <alan.hayward@arm.com>
3658
3659 * aarch64-linux-nat.c (aarch64_linux_read_description):
3660 Add parmeter zero.
3661 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3662 Likewise.
3663 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3664 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3665 (aarch64_gdbarch_init): Add parmeter zero.
3666 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3667 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3668 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3669 parmeter.
3670 * doc/gdb.texinfo: Describe SVE feature
3671 * features/aarch64-sve.c: New file.
3672
5969f0db
OJ
36732018-05-31 Omair Javaid <omair.javaid@linaro.org>
3674
3675 PR gdb/23210
3676 * gdbarch.sh (significant_addr_bit): Default to zero when
3677 not set by target architecture.
3678 * gdbarch.c: Re-generated.
3679 * utils.c (address_significant): Update.
3680
61367c61
JB
36812018-05-30 Joel Brobecker <brobecker@adacore.com>
3682
3683 * stack.c (func_command): Remove trailing newline in call to error.
3684
34a79281
SM
36852018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3686
3687 * regcache.h (regcache_raw_collect): Remove, update callers to
3688 use regcache::raw_collect.
3689 * regcache.c (regcache_raw_collect): Remove.
3690
73e1c03f
SM
36912018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3692
3693 * regcache.h (regcache_raw_supply): Remove, update callers to
3694 use detached_regcache::raw_supply.
3695 * regcache.c (regcache_raw_supply): Remove.
3696
e4c4a59b
SM
36972018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3698
3699 * regcache.h (regcache_cooked_write_part): Remove, update
3700 callers to use regcache::cooked_write_part.
3701 * regcache.c (regcache_cooked_write_part): Remove.
3702
73bb0000
SM
37032018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3704
3705 * regcache.h (regcache_cooked_read_part): Remove, update callers
3706 to use readable_regcache::cooked_read_part.
3707 * regcache.c (regcache_cooked_read_part): Remove.
3708
46a45e9d
SM
37092018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3710
3711 * regcache.h (regcache_cooked_read_value): Remove, update
3712 callers to use readable_regcache::cooked_read_value.
3713 * regcache.c (regcache_cooked_read_value): Remove.
3714
b66f5587
SM
37152018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3716
3717 * regcache.h (regcache_cooked_write): Remove, update callers to
3718 use regcache::cooked_write.
3719 * regcache.c (regcache_cooked_write): Remove.
3720
6aa7d724
SM
37212018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3722
3723 * regcache.h (regcache_invalidate): Remove, update callers to
3724 use detached_regcache::invalidate instead.
3725 * regcache.c (regcache_invalidate): Remove.
3726
4f0420fd
SM
37272018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3728
3729 * regcache.h (regcache_raw_write_part): Remove, update callers
3730 to use regcache::raw_write_part instead.
3731 * regcache.c (regcache_raw_write_part): Remove.
3732
502fe83e
SM
37332018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3734
3735 * regcache.h (regcache_raw_read_part): Remove, update callers to
3736 use readable_regcache::raw_read_part instead.
3737 * regcache.c (regcache_raw_read_part): Remove.
3738
dca08e1f
SM
37392018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3740
3741 * regcache.h (regcache_cooked_read): Remove, update callers to
3742 use readable_regcache::cooked_read instead.
3743 * regcache.c (regcache_cooked_read): Remove.
3744
10eaee5f
SM
37452018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3746
3747 * regcache.h (regcache_raw_write): Remove, update callers to use
3748 regcache::raw_write instead.
3749 * regcache.c (regcache_raw_write): Remove.
3750
0b883586
SM
37512018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3752
3753 * regcache.h (regcache_raw_read): Remove, update callers to use
3754 readable_regcache::raw_read instead.
3755 * regcache.c (regcache_raw_read): Remove.
3756
0b47d985
SM
37572018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3758
3759 * regcache.h (regcache_raw_update): Remove, update callers to
3760 use readable_regcache::raw_update instead.
3761 * regcache.c (regcache_raw_update): Remove.
3762
0ec9f114
SM
37632018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3764
3765 * regcache.h (regcache_register_status): Remove, update callers
3766 to use reg_buffer::get_register_status directly instead.
3767 * regcache.c (regcache_register_status): Remove.
3768
222312d3
SM
37692018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3770
3771 * regcache.h (regcache_get_ptid): Remove, update all callers to
3772 call regcache::ptid instead.
3773 * regcache.c (regcache_get_ptid): Remove.
3774
fdbe37e3
SM
37752018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3776
3777 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3778
f7c6f423
PA
37792018-05-30 Pedro Alves <palves@redhat.com>
3780
3781 * common/common-exceptions.h (exception_rethrow): Use
3782 ATTRIBUTE_NORETURN.
3783
52941706
SM
37842018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3785
3786 * breakpoint.c (print_solib_event, check_status_catch_solib):
3787 Remove struct keyword in range-based for loops.
3788 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3789 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
3790 Likewise.
3791 * linespec.c (find_superclass_methods, search_minsyms_for_name):
3792 Likewise.
3793 * symfile.c (addr_info_make_relative): Likewise.
3794 * thread.c (value_in_thread_stack_temporaries): Likewise.
3795
bf2977b5
WP
37962018-06-12 Weimin Pan <weimin.pan@oracle.com>
3797
3798 PR gdb/16841
3799 * valops.c (value_struct_elt_for_reference): Call check_typedef on
3800 aggregate type to get its real type before accessing it.
3801
64cc34d8
WP
38022018-05-29 Weimin Pan <weimin.pan@oracle.com>
3803
3804 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
3805 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
3806 * coff-pe-read.c (add_pe_forwarded_sym): Replace
3807 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
3808 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
3809 * jit.c (jit_breakpoint_re_set_internal): Likewise.
3810 * printcmd.c (info_address_command): Likewise.
3811
e7ec8713
TT
38122018-05-29 Tom Tromey <tom@tromey.com>
3813
3814 * windows-nat.c (handle_exception): Update fall-through comment.
3815
bcb430e4
TT
38162018-05-29 Tom Tromey <tom@tromey.com>
3817
3818 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
3819 (struct program_space) <added_solibs>: Now a std::vector.
3820 * breakpoint.c (print_solib_event): Update.
3821 (check_status_catch_solib): Update.
3822 * progspace.c (clear_program_space_solib_cache): Update.
3823 * solib.c (update_solib_list): Update.
3824
894882e3
TT
38252018-05-29 Tom Tromey <tom@tromey.com>
3826
3827 * python/py-type.c (typy_richcompare): Update.
3828 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
3829 * gdbtypes.h (types_deeply_equal): Return bool.
3830 (types_equal): Likewise.
3831 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
3832 declare VEC.
3833 (check_types_equal): Change worklist to std::vector. Return
3834 bool.
3835 (struct type_equality_entry): Add constructor.
3836 (compare_maybe_null_strings): Return bool.
3837 (check_types_worklist): Return bool. Change worklist to
3838 std::vector.
3839 (types_deeply_equal): Use std::vector.
3840 (types_equal): Return bool.
3841 (compare_maybe_null_strings): Simplify.
3842
10b2ded4
TT
38432018-05-29 Tom Tromey <tom@tromey.com>
3844
3845 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
3846
4f7deebe
TT
38472018-05-29 Tom Tromey <tom@tromey.com>
3848
3849 * objc-lang.h: Don't include cp-support.h.
3850 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
3851 declare VEC.
3852
b8283aea
TT
38532018-05-27 Tom Tromey <tom@tromey.com>
3854
3855 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
3856
41a883c8
TT
38572018-05-25 Tom Tromey <tom@tromey.com>
3858
3859 * value.c (value::location): Initialize.
3860
bf259e25
TT
38612018-05-25 Tom Tromey <tom@tromey.com>
3862
3863 * dbxread.c (init_bincl_list): Remove.
3864 (bincl_list): Now a std::vector.
3865 (bincls_allocated, next_bincl): Remove.
3866 (free_bincl_list, do_free_bincl_list_cleanup)
3867 (make_cleanup_free_bincl_list): Remove.
3868 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
3869 unique_xmalloc_ptr.
3870 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
3871 (struct header_file_location): Add constructor.
3872 (add_bincl_to_list): Remove.
3873
d525a99b
TT
38742018-05-25 Tom Tromey <tom@tromey.com>
3875
3876 * tui/tui.c (tui_enable): Update.
3877 * mi/mi-interp.c (mi_interp::init): Update.
3878 * interps.h (class interp) <name>: New method.
3879 <m_name>: Rename from name.
3880 (~scoped_restore_interp): Update.
3881 * interps.c (interp::interp): Update.
3882 (interp_add, interp_set, interp_lookup_existing)
3883 (current_interp_named_p): Update.
3884
da505cff
TT
38852018-05-25 Tom Tromey <tom@tromey.com>
3886
3887 * interps.c (interp_name): Remove.
3888 * mi/mi-interp.c (mi_interp::init): Update.
3889 * interps.h (interp_name): Remove.
3890 (~scoped_restore_interp): Update.
3891 * tui/tui.c (tui_enable): Update.
3892
29f94340
TT
38932018-05-25 Tom Tromey <tom@tromey.com>
3894
3895 * utils.c (fputs_maybe_filtered): Update.
3896 * linespec.c (decode_line_full): Update.
3897 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
3898 (mi_print_breakpoint_for_event, mi_solib_loaded)
3899 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3900 (mi_user_selected_context_changed): Update.
3901 * mi/mi-main.c (mi_execute_command): Update.
3902 * cli/cli-script.c (execute_control_command): Update.
3903 * python/python.c (execute_gdb_command): Update.
3904 * solib.c (info_sharedlibrary_command): Update.
3905 * interps.c (interp_ui_out): Remove.
3906 * interps.h (interp_ui_out): Remove.
3907
716b8bc5
TT
39082018-05-25 Tom Tromey <tom@tromey.com>
3909
3910 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
3911 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
3912 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
3913
753ff9bd
TT
39142018-05-25 Tom Tromey <tom@tromey.com>
3915
3916 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
3917 * interps.c (interp_exec): Use scoped_restore.
3918
5ca3b260
TT
39192018-05-25 Tom Tromey <tom@tromey.com>
3920
3921 * remote.c (remote_target::remote_file_get): Use
3922 gdb::byte_vector.
3923 (remote_target::remote_file_put): Likewise.
3924
3173aa2f
TT
39252018-05-25 Tom Tromey <tom@tromey.com>
3926
3927 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
3928 a std::string.
3929 (get_pe_section_index, add_pe_exported_sym): Update.
3930 (read_pe_exported_syms): Use gdb::def_vector.
3931
09a5e1b5
TT
39322018-05-25 Tom Tromey <tom@tromey.com>
3933
3934 * frame.c (remove_prev_frame): Remove.
3935 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
3936
d8dab6c3
MR
39372018-05-25 Maciej W. Rozycki <macro@mips.com>
3938
3939 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
3940 Remove prototypes.
3941 * mips-linux-nat.c (supply_fpregset): Always call
3942 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
3943 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
3944 `mips_fill_fpregset'.
3945 * mips-linux-tdep.c (mips_supply_fpregset)
3946 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
3947 (mips_fill_fpregset_wrapper): Remove functions.
3948 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
3949 (mips_linux_fpregset): Remove variable.
3950 (mips_linux_iterate_over_regset_sections): Use
3951 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
3952 (mips_linux_o32_sigframe_init): Remove comment.
3953
3c69da40
PA
39542018-05-25 Pedro Alves <palves@redhat.com>
3955
3956 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
3957 (struct readahead_cache, struct packet_reg, struct
3958 remote_arch_state, class remote_state): Move higher up in the
3959 file.
3960 (remote_target::m_remote_state): Now an object instead of a pointer.
3961 (remote_target::get_remote_state): Adjust.
3962
39f0c204
AB
39632018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3964
3965 * stack.c (select_and_print_frame): Delete.
3966 (struct function_bounds): Move struct within function.
3967 (func_command): Most content moved into new function
3968 find_frame_for_function, use new function, print result, add
3969 function comment.
3970 (find_frame_for_function): New function, now returns a result.
3971
d392224a
PW
39722018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3973
3974 * stack.c (iterate_over_block_arg_vars): Fix comment.
3975 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
3976
45f25d6c
AB
39772018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
3978
3979 PR gdb/23203
3980 * frame.c
3981 (scoped_restore_selected_frame::scoped_restore_selected_frame):
3982 Define.
3983 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
3984 Define.
3985 * frame.h (class scoped_restore_selected_frame): New class.
3986 * stack.c (print_frame_local_vars): Remove catching and rethrowing
3987 of any exception, use scoped_restore_selected_frame to restore the
3988 frame instead.
3989
da05d921
PA
39902018-05-24 Pedro Alves <palves@redhat.com>
3991
3992 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
3993 override.
3994
a8be540e
TT
39952018-05-23 Tom Tromey <tom@tromey.com>
3996
3997 * complaints.c (struct complaints): Remove.
3998 (symfile_complaint_book): Remove.
3999 (series): New global.
4000 (complaint_internal): Update.
4001 (clear_complaints): Update.
4002
ff1cf532
TT
40032018-05-23 Tom Tromey <tom@tromey.com>
4004
4005 * complaints.c (counters): New global.
4006 (struct complain): Remove.
4007 (struct complaints) <root>: Remove.
4008 (complaint_sentinel): Remove.
4009 (symfile_complaint_book): Update.
4010 (find_complaint) Remove.
4011 (complaint_internal, clear_complaints): Update.
4012
7ff88174
TT
40132018-05-23 Tom Tromey <tom@tromey.com>
4014
4015 * complaints.c (struct complain) <file, line>: Remove.
4016 (find_complaint): Remove file, line parameters.
4017 (complaint_internal): Update.
4018
de54e1a5
TT
40192018-05-23 Tom Tromey <tom@tromey.com>
4020
4021 * complaints.c (vcomplaint): Remove.
4022 (complaint_internal) Merge in contents of vcomplaint.
4023
2ac237e5
TT
40242018-05-23 Tom Tromey <tom@tromey.com>
4025
4026 * complaints.c (struct complaints) <explanation>: Remove.
4027 (symfile_explanations): Remove.
4028 (symfile_complaint_book): Update.
4029 (vcomplaint): Update.
4030 (struct explanation): Remove.
4031
b98664d3
TT
40322018-05-23 Tom Tromey <tom@tromey.com>
4033
4034 * complaints.c (symfile_complaints): Remove.
4035 (complaint_internal): Remove "complaints" parameter.
4036 (clear_complaints, vcomplaint): Remove "c" parameter.
4037 (get_complaints): Remove.
4038 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4039 (dwarf2_debug_line_missing_file_complaint)
4040 (dwarf2_debug_line_missing_end_sequence_complaint)
4041 (dwarf2_complex_location_expr_complaint)
4042 (dwarf2_const_value_length_mismatch_complaint)
4043 (dwarf2_section_buffer_overflow_complaint)
4044 (dwarf2_macro_malformed_definition_complaint)
4045 (dwarf2_invalid_attrib_class_complaint)
4046 (create_addrmap_from_index, dw2_symtab_iter_next)
4047 (dw2_expand_marked_cus)
4048 (dw2_debug_names_iterator::find_vec_in_debug_names)
4049 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4050 (create_debug_type_hash_table, init_cutu_and_read_dies)
4051 (partial_die_parent_scope, add_partial_enumeration)
4052 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4053 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4054 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4055 (create_cus_hash_table, create_dwp_hash_table)
4056 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4057 (dwarf2_rnglists_process, dwarf2_ranges_process)
4058 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4059 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4060 (handle_struct_member_die, process_structure_scope)
4061 (read_array_type, read_common_block, read_module_type)
4062 (read_tag_pointer_type, read_typedef, read_base_type)
4063 (read_subrange_type, load_partial_dies, partial_die_info::read)
4064 (partial_die_info::read, partial_die_info::read)
4065 (partial_die_info::read, read_checked_initial_length_and_offset)
4066 (dwarf2_string_attr, read_formatted_entries)
4067 (dwarf_decode_line_header)
4068 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4069 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4070 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4071 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4072 (get_signatured_type, get_DW_AT_signature_type)
4073 (decode_locdesc, file_file_name, consume_improper_spaces)
4074 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4075 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4076 (dwarf2_symbol_mark_computed, set_die_type)
4077 (read_attribute_value): Update.
4078 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4079 Update.
4080 * dbxread.c (unknown_symtype_complaint)
4081 (lbrac_mismatch_complaint, repeated_header_complaint)
4082 (set_namestring, function_outside_compilation_unit_complaint)
4083 (read_dbx_symtab, process_one_symbol): Update.
4084 * gdbtypes.c (stub_noname_complaint): Update.
4085 * windows-nat.c (handle_unload_dll): Update.
4086 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4087 (decode_base_type): Update.
4088 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4089 (eb_complaint, record_include_begin, record_include_end)
4090 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4091 (process_xcoff_symbol, read_symbol)
4092 (function_outside_compilation_unit_complaint)
4093 (scan_xcoff_symtab): Update.
4094 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4095 * buildsym.c (finish_block_internal, make_blockvector)
4096 (end_symtab_get_static_block, augment_type_symtab): Update.
4097 * dtrace-probe.c (dtrace_process_dof)
4098 (dtrace_static_probe_ops::get_probes): Update.
4099 * complaints.h (struct complaint): Don't declare.
4100 (symfile_complaints): Remove.
4101 (complaint_internal): Remove "complaints" parameter.
4102 (complaint): Likewise.
4103 (clear_complaints): Likewise.
4104 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4105 (reread_symbols): Update.
4106 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4107 (dwarf2_frame_cache, decode_frame_entry): Update.
4108 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4109 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4110 (info_selectors_command): Update.
4111 * macrotab.c (macro_include, check_for_redefinition)
4112 (macro_undef): Update.
4113 * objfiles.c (filter_overlapping_sections): Update.
4114 * stabsread.c (invalid_cpp_abbrev_complaint)
4115 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4116 (define_symbol, error_type, read_type, rs6000_builtin_type)
4117 (stabs_method_name_from_physname, read_member_functions)
4118 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4119 (attach_fields_to_type, complain_about_struct_wipeout)
4120 (read_range_type, read_args, common_block_start)
4121 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4122 Update.
4123 * mdebugread.c (index_complaint, unknown_ext_complaint)
4124 (basic_type_complaint, bad_tag_guess_complaint)
4125 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4126 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4127 (parse_procedure, parse_lines)
4128 (function_outside_compilation_unit_complaint)
4129 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4130 (bad_tag_guess_complaint, reg_value_complaint): Update.
4131 * cp-support.c (demangled_name_complaint): Update.
4132 * macroscope.c (sal_macro_scope): Update.
4133 * dwarf-index-write.c (class debug_names): Update.
4134
4e9668d0
TT
41352018-05-23 Tom Tromey <tom@tromey.com>
4136
4137 * complaints.c (clear_complaints): Remove "noisy" parameter.
4138 * complaints.h (clear_complaints): Update.
4139 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4140 (reread_symbols): Update.
4141
43ba33c7
TT
41422018-05-23 Tom Tromey <tom@tromey.com>
4143
4144 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4145 SUBSEQUENT_MESSAGE.
4146 (vcomplaint, clear_complaints): Update.
4147 (symfile_explanations): Remove some messages.
4148
2b9496b2
TT
41492018-05-23 Tom Tromey <tom@tromey.com>
4150
4151 * complaints.c (internal_complaint): Remove.
4152 * complaints.h (internal_complaint): Remove.
4153
35f1fea3
MR
41542018-05-22 Maciej W. Rozycki <macro@mips.com>
4155
4156 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4157
6b8edb51
PA
41582018-05-22 Pedro Alves <palves@redhat.com>
4159
4160 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4161 (remote_fileio_badfd, remote_fileio_return_errno)
4162 (remote_fileio_return_success, remote_fileio_func_open)
4163 (remote_fileio_func_open, remote_fileio_func_close)
4164 (remote_fileio_func_read, remote_fileio_func_write)
4165 (remote_fileio_func_lseek, remote_fileio_func_rename)
4166 (remote_fileio_func_unlink, remote_fileio_func_stat)
4167 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4168 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4169 remote_target parameter.
4170 (remote_fio_func_map) <func>: Add remote_target parameter.
4171 (do_remote_fileio_request, remote_fileio_request):
4172 * remote-fileio.h (remote_fileio_request):
4173 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4174 remote_target parameter.
4175 (remote_notif_process, handle_notification): Adjust to pass down
4176 the remote.
4177 (remote_notif_state_allocate): Add remote_target parameter. Save
4178 it.
4179 * remote-notif.h (struct remote_target): Forward declare.
4180 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4181 remote_target parameter.
4182 (struct remote_notif_state) <remote>: New field.
4183 (remote_notif_ack, remote_notif_parse): Add remote_target
4184 parameter.
4185 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4186 remote_target parameter.
4187 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4188 (threads_listing_context, rmt_thread_action, protocol_feature)
4189 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4190 (packet_result, struct threads_listing_context, remote_state):
4191 Move definitions and declarations higher up.
4192 (remote_target) <~remote_target>: Declare.
4193 (remote_download_command_source, remote_file_put, remote_file_get)
4194 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4195 (remote_hostio_pread_vFile, remote_hostio_send_command)
4196 (remote_hostio_set_filesystem, remote_hostio_open)
4197 (remote_hostio_close, remote_hostio_unlink, remote_state)
4198 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4199 (get_memory_write_packet_size, get_memory_read_packet_size)
4200 (append_pending_thread_resumptions, remote_detach_1)
4201 (append_resumption, remote_resume_with_vcont)
4202 (add_current_inferior_and_thread, wait_ns, wait_as)
4203 (process_stop_reply, remote_notice_new_inferior)
4204 (process_initial_stop_replies, remote_add_thread)
4205 (btrace_sync_conf, remote_btrace_maybe_reopen)
4206 (remove_new_fork_children, kill_new_fork_children)
4207 (discard_pending_stop_replies, stop_reply_queue_length)
4208 (check_pending_events_prevent_wildcard_vcont)
4209 (discard_pending_stop_replies_in_queue, stop_reply)
4210 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4211 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4212 (remote_interrupt_as, remote_interrupt_ns)
4213 (remote_get_noisy_reply, remote_query_attached)
4214 (remote_add_inferior, remote_current_thread, get_current_thread)
4215 (set_thread, set_general_thread, set_continue_thread)
4216 (set_general_process, write_ptid)
4217 (remote_unpack_thread_info_response, remote_get_threadinfo)
4218 (parse_threadlist_response, remote_get_threadlist)
4219 (remote_threadlist_iterator, remote_get_threads_with_ql)
4220 (remote_get_threads_with_qxfer)
4221 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4222 (get_offsets, remote_check_symbols, remote_supported_packet)
4223 (remote_query_supported, remote_packet_size)
4224 (remote_serial_quit_handler, remote_detach_pid)
4225 (remote_vcont_probe, remote_resume_with_hc)
4226 (send_interrupt_sequence, interrupt_query)
4227 (remote_notif_get_pending_events, fetch_register_using_p)
4228 (send_g_packet, process_g_packet, fetch_registers_using_g)
4229 (store_register_using_P, store_registers_using_G)
4230 (set_remote_traceframe, check_binary_download)
4231 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4232 (remote_xfer_live_readonly_partial, remote_read_bytes)
4233 (remote_send_printf, remote_flash_write, readchar)
4234 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4235 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4236 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4237 (extended_remote_disable_randomization, extended_remote_run)
4238 (send_environment_packet, extended_remote_environment_support)
4239 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4240 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4241 (packet_command): Now methods of ...
4242 (remote_target): ... this class.
4243 (m_remote_state) <remote_target>: New field.
4244 (struct remote_state) <stop_reply_queue,
4245 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4246 fields.
4247 (remote_state::remote_state): Allocate stop_reply_queue.
4248 (remote_state): Delete global.
4249 (get_remote_state_raw): Delete.
4250 (remote_target::get_remote_state): Allocate m_remote_state on
4251 demand.
4252 (get_current_remote_target): New.
4253 (remote_ops, extended_remote_ops): Delete.
4254 (wait_forever_enabled_p, remote_async_inferior_event_token):
4255 Delete, moved to struct remote_state.
4256 (remote_target::close): Delete self. Destruction bits split to
4257 ...
4258 (remote_target::~remote_target): ... this.
4259 (show_memory_packet_size): Adjust to use
4260 get_current_remote_target.
4261 (struct protocol_feature) <func>: Add remote_target parameter.
4262 All callers adjusted.
4263 (curr_quit_handler_target): New.
4264 (remote_serial_quit_handler): Reimplement.
4265 (remote_target::open_1): Adjust to use get_current_remote_target.
4266 Heap-allocate remote_target/extended_remote_target instances.
4267 (vcont_builder::vcont_builder): Add remote_target parameter, and
4268 save it in m_remote. All callers adjusted.
4269 (vcont_builder::m_remote): New field.
4270 (vcont_builder::restart, vcont_builder::flush)
4271 (vcont_builder::push_action): Use it.
4272 (remote_target::commit_resume): Use it.
4273 (struct queue_iter_param) <remote>: New field.
4274 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4275 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4276 (check_pending_event_prevents_wildcard_vcont_callback)
4277 (remote_target::check_pending_events_prevent_wildcard_vcont)
4278 (remote_target::discard_pending_stop_replies)
4279 (remote_target::discard_pending_stop_replies_in_queue)
4280 (remote_target::remote_notif_remove_queued_reply): Fill in
4281 'remote' field.
4282 (remote_notif_get_pending_events): New.
4283 (remote_target::readchar, remote_target::remote_serial_write):
4284 Save/restore curr_quit_handler_target.
4285 (putpkt): New.
4286 (kill_new_fork_children): Fill in 'remote' field.
4287 (packet_command): Use get_current_remote_target, defer to
4288 remote_target method of same name.
4289 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4290 parameter, and save it in m_remote. All callers adjusted.
4291 (scoped_remote_fd::release): Use m_remote.
4292 (scoped_remote_fd::m_remote): New field.
4293 (remote_file_put, remote_file_get, remote_file_delete): Use
4294 get_current_remote_target, defer to remote_target method of same
4295 name.
4296 (remote_btrace_reset): Add remote_state paremeter. Update all
4297 callers.
4298 (remote_async_inferior_event_handler). Pass down 'data'.
4299 (remote_new_objfile): Use get_current_remote_target.
4300 (remote_target::vcont_r_supported): New.
4301 (set_range_stepping): Use get_current_remote_target and
4302 remote_target::vcont_r_supported.
4303 (_initialize_remote): Don't allocate 'remote_state' and
4304 'stop_reply_queue' globals.
4305 * remote.h (struct remote_target): Forward declare.
4306 (getpkt, putpkt, remote_notif_get_pending_events): Add
4307 'remote_target' parameter.
4308
f5db4863
PA
43092018-05-22 Pedro Alves <palves@redhat.com>
4310
4311 * remote.c (vcont_builder): Now a class. Make all data members
4312 private.
4313 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4314 Declare methods.
4315 (vcont_builder_restart): Rename to ...
4316 (vcont_builder::restart): ... this.
4317 (vcont_builder_flush): Rename to ...
4318 (vcont_builder::flush): ... this.
4319 (vcont_builder_push_action): Rename to ...
4320 (vcont_builder::push_action): ... this.
4321 (remote_target::commit_resume): Adjust.
4322
cc0be08f
PA
43232018-05-22 Pedro Alves <palves@redhat.com>
4324
4325 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4326 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4327 (get_fixed_memory_packet_size): New.
4328 (get_memory_packet_size): Use it.
4329 (set_memory_packet_size): Don't override the config size with
4330 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4331 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4332 Don't refer to get_memory_packet_size if not connected to a remote
4333 target. Show "(default)" if configured size is 0.
4334
9607784a
PA
43352018-05-22 Pedro Alves <palves@redhat.com>
4336
4337 * remote.c (remote_target::mourn_inferior): Move
4338 discard_pending_stop_replies call here from ...
4339 (_initialize_remote): ... here.
4340
0e9a6b2f
PA
43412018-05-22 Pedro Alves <palves@redhat.com>
4342
4343 * remote.c (compare_section_command): Remove set_general_process
4344 call.
4345
43c3a0e4
PA
43462018-05-22 Pedro Alves <palves@redhat.com>
4347
4348 * remote.c (struct packet_reg, struct remote_arch_state):
4349 Move higher up in the file.
4350 (remote_state) <m_arch_states>: Store remote_arch_state values
4351 instead of remote_arch_state pointers.
4352 (remote_state::get_remote_arch_state): Adjust.
4353
9d6eea31
PA
43542018-05-22 Pedro Alves <palves@redhat.com>
4355
4356 * remote.c: Include <unordered_map>.
4357 (remote_state): Now a class.
4358 (remote_state) <get_remote_arch_state>: Declare method.
4359 <get_remote_arch_state>: New field.
4360 (remote_arch_state) <remote_arch_state>: Declare ctor.
4361 <regs>: Now a unique_ptr.
4362 (remote_gdbarch_data_handle): Delete.
4363 (get_remote_arch_state): Delete.
4364 (remote_state::get_remote_arch_state): New.
4365 (get_remote_state): Adjust to call remote_state's
4366 get_remote_arch_state method.
4367 (init_remote_state): Delete, bits factored out to ...
4368 (remote_arch_state::remote_arch_state): ... this new method.
4369 (get_remote_packet_size, get_memory_packet_size)
4370 (process_g_packet, remote_target::fetch_registers)
4371 (remote_target::prepare_to_store, store_registers_using_G)
4372 (remote_target::store_registers, remote_target::get_trace_status):
4373 Adjust to call remote_state's method.
4374 (_initialize_remote): Remove reference to
4375 remote_gdbarch_data_handle.
4376
dd194f6b
PA
43772018-05-22 Pedro Alves <palves@redhat.com>
4378
4379 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4380 pread>: New method declarations.
4381 (remote_target::open_1): Adjust.
4382 (readahead_cache_invalidate): Rename to ...
4383 (readahead_cache::invalidate): ... this, and adjust to be a class
4384 method.
4385 (readahead_cache_invalidate_fd): Rename to ...
4386 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4387 class method.
4388 (remote_hostio_pwrite): Adjust.
4389 (remote_hostio_pread_from_cache): Rename to ...
4390 (readahead_cache::pread): ... this, and adjust to be a class
4391 method.
4392 (remote_hostio_close): Adjust.
4393
440b7aec
PA
43942018-05-22 Pedro Alves <palves@redhat.com>
4395
4396 * remote.c (remote_hostio_close_cleanup): Delete.
4397 (class scoped_remote_fd): New.
4398 (remote_file_put, remote_file_get): Use it.
4399
de44f5a7
PA
44002018-05-22 Pedro Alves <palves@redhat.com>
4401
4402 (struct vCont_action_support): Use bool and initialize all fields.
4403 (struct readahead_cache): Initialize all fields.
4404 (remote_state): Use bool and initialize all fields.
4405 (remote_state::remote_state, remote_state::~remote_state): New.
4406 (new_remote_state): Delete.
4407 (_initialize_remote): Use new to allocate remote_state.
4408
b1b60145
PA
44092018-05-22 Pedro Alves <palves@redhat.com>
4410 張俊芝 <zjz@zjz.name>
4411
4412 PR gdb/22973
4413 * c-exp.y: Include "c-support.h".
4414 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4415 of tolower. Use c_ident_is_alpha to scan names.
4416 * c-lang.c: Include "c-support.h".
4417 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4418 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4419 * c-support.h: New file, with bits factored out from ...
4420 * cp-name-parser.y: ... this file.
4421 Include "c-support.h".
4422 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4423 c-support.h and renamed.
4424 (symbol_end, yylex): Adjust.
4425
0ec848ad
PFC
44262018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4427
4428 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4429 parameter type to CORE_ADDR.
4430 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4431 parameter type in declaration to CORE_ADDR.
4432 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4433 target_auxv_search to get AT_HWCAP and use the result to get the
4434 target description.
4435 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4436 to CORE_ADDR. Remove the cast of the return value to unsigned
4437 long. Fix error predicate of target_auxv_search.
4438 (ppc_linux_nat_target::read_description): Change the type of the
4439 hwcap variable to CORE_ADDR.
4440
0fb2aaa1
PFC
44412018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4442
4443 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4444 if the size of fpscr is larger than 32 bits.
4445
2c3305f6
PFC
44462018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4447
4448 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4449 (ppc32_linux_vsxregmap): New global.
4450 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4451 regcache_supply_regset, and regcache_collect_regset.
4452 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4453 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4454 (fetch_vsx_register, store_vsx_register): Remove.
4455 (fetch_vsx_registers): Add regno parameter. Get regset using
4456 ppc_linux_vsxregset. Use regset to supply registers.
4457 (store_vsx_registers): Add regno parameter. Get regset using
4458 ppc_linux_vsxregset. Use regset to collect registers.
4459 (fetch_register): Call fetch_vsx_registers instead of
4460 fetch_vsx_register.
4461 (store_register): Call store_vsx_registers instead of
4462 store_vsx_register.
4463 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4464 new regno parameter.
4465 (store_ppc_registers): Call store_vsx_registers with -1 for the
4466 new regno parameter.
4467 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4468 (ppc_collect_vsxregset): Remove.
4469
1d75a658
PFC
44702018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4471
4472 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4473 offset fields.
4474 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4475 for vector register offset fields.
4476 (ppc64_fbsd_reg_offsets): Likewise.
4477 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4478 to vector register offset fields.
4479 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4480 to vector register offset fields.
4481 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4482 vector register offset fields.
4483 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4484 initializers for vector register offset fields.
4485 (rs6000_aix64_reg_offsets): Likewise.
4486 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4487 (ppc_supply_vrregset): Remove.
4488 (ppc_collect_vrregset): Remove.
4489 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4490 (ppc_linux_vrregset) : New function.
4491 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4492 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4493 (ppc32_linux_vrregset): Remove.
4494 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4495 and use result instead of ppc32_linux_vrregset.
4496 (ppc32_linux_reg_offsets): Remove initializers for vector register
4497 offset fields.
4498 (ppc64_linux_reg_offsets): Likewise.
4499 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4500 * ppc-linux-nat.c: Include regset.h.
4501 (gdb_vrregset_t): Adjust comment to account for little-endian
4502 mode.
4503 (supply_vrregset, fill_vrregset): Remove.
4504 (fetch_altivec_register, store_altivec_register): Remove.
4505 (fetch_altivec_registers): Add regno parameter. Get regset using
4506 ppc_linux_vrregset. Use regset to supply registers.
4507 (store_altivec_registers): Add regno parameter. Get regset using
4508 ppc_linux_vrregset. Use regset to collect registers.
4509 (fetch_register): Call fetch_altivec_registers instead of
4510 fetch_altivec_register.
4511 (store_register): Call store_altivec_registers instead of
4512 store_altivec_register.
4513 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4514 the new regno parameter.
4515 (store_ppc_registers): Call store_altivec_registers with -1 for
4516 the new regno parameter.
4517
d078308a
PFC
45182018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4519
4520 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4521 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4522 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4523 (gdb_vrregset_t): Change array type size to
4524 PPC_LINUX_SIZEOF_VRREGSET.
4525 (gdb_vsxregset_t): Change array type size to
4526 PPC_LINUX_SIZEOF_VSXREGSET.
4527 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4528 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4529 PPC_LINUX_SIZEOF_VSXREGSET.
4530
2e077f5e
PFC
45312018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4532
4533 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4534 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4535 nat/ppc-linux.c.
4536 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4537 ppc_linux_target_wordsize with tid.
4538 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4539 wordsize with tid.
4540 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4541 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4542 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4543 tid parameter. Remove static specifier.
4544 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4545 (ppc_linux_target_wordsize): New declaration.
4546
bd64614e
PFC
45472018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4548
4549 * arch/ppc-linux-common.c: New file.
4550 * arch/ppc-linux-common.h: New file.
4551 * arch/ppc-linux-tdesc.h: New file.
4552 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4553 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4554 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4555 arch/ppc-linux-tdesc.h.
4556 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4557 arch/ppc-linux-tdesc.h.
4558 (ppc_linux_nat_target::read_description): Remove target
4559 description matching code. Fill a ppc_linux_features struct and
4560 call ppc_linux_match_description with it. Move comment about ISA
4561 2.05 to ppc-linux-common.c.
4562 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4563 arch/ppc-linux-tdesc.h.
4564 (ppc_linux_core_read_description): Remove target description
4565 matching code. Fill a ppc_linux_features struct and call
4566 ppc_linux_match_description with it.
4567 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4568 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4569 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4570 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4571 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4572 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4573 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4574 (tdesc_powerpc_e500l): Remove.
4575
241db429
JB
45762018-05-22 Joel Brobecker <brobecker@adacore.com>
4577
4578 * ada-lang.c (catch_assert_command): Pass empty string instead
4579 of NULL for excep_string argument.
4580
75d74cca
MR
45812018-05-22 Maciej W. Rozycki <macro@mips.com>
4582
4583 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4584 the width of the requested register exceeds the width of the
4585 `ptrace' data type.
4586
122b53ea
TT
45872018-05-21 Tom Tromey <tom@tromey.com>
4588
4589 * printcmd.c (output_command): Remove.
4590 (output_command_const): Rename to output_command.
4591 * valprint.h (output_command): Rename from output_command_const.
4592 * tracepoint.c (trace_dump_actions): Call output_command.
4593
bc18fbb5
TT
45942018-05-21 Tom Tromey <tom@tromey.com>
4595
4596 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4597 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4598 * ada-lang.h (create_ada_exception_catchpoint): Update.
4599 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4600 std::string.
4601 (create_excep_cond_exprs, ~ada_catchpoint)
4602 (should_stop_exception, print_one_exception)
4603 (print_mention_exception, print_recreate_exception): Update.
4604 (ada_get_next_arg): Remove.
4605 (catch_ada_exception_command_split): Use std::string. Change type
4606 of "excep_string", "cond_string".
4607 (catch_ada_exception_command): Update.
4608 (create_ada_exception_catchpoint): Change type of excep_string.
4609 (ada_exception_sal): Remove excep_string parameter.
4610 (~ada_catchpoint): Remove.
4611
790217f6
TT
46122018-05-21 Tom Tromey <tom@tromey.com>
4613
4614 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4615 cleanup.
4616
6f46ac85
TT
46172018-05-21 Tom Tromey <tom@tromey.com>
4618
4619 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4620 Return unique_xmalloc_ptr.
4621 (print_it_exception): Update.
4622
15b6611c
TT
46232018-05-21 Tom Tromey <tom@tromey.com>
4624
4625 * tracepoint.c (trace_dump_actions): Use std::string.
4626
c0c9f665
TT
46272018-05-21 Tom Tromey <tom@tromey.com>
4628
4629 * symfile.c (reread_symbols): Use std::string for original_name.
4630
22ca247e
TT
46312018-05-21 Tom Tromey <tom@tromey.com>
4632
4633 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4634 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4635 constructor.
4636
184cde75
SM
46372018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4638
4639 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4640 instance to...
4641 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4642 * objfiles.c (get_objfile_bfd_data): Allocate
4643 objfile_per_bfd_storage with obstack_new when allocating on
4644 obstack.
4645
e39db4db
SM
46462018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4647
4648 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4649 OBSTACK_ZALLOC.
4650 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4651 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4652 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4653 (add_pending): Likewise.
4654 (parse_symbol): Likewise.
4655 (parse_partial_symbols): Likewise.
4656 (psymtab_to_symtab_1): Likewise.
4657 (new_psymtab): Likewise.
4658 (elfmdebug_build_psymtabs): Likewise.
4659 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4660 * objfiles.c (get_objfile_bfd_data): Likewise.
4661 (objfile_register_static_link): Likewise.
4662 * psymtab.c (allocate_psymtab): Likewise.
4663 * stabsread.c (read_member_functions): Likewise.
4664 * xcoffread.c (xcoff_end_psymtab): Likewise.
4665
284a0e3c
SM
46662018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4667
4668 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4669 compiler supports std::is_trivially_constructible.
4670 * common/poison.h: Include obstack.h.
4671 (IsMallocable): Define to is_trivially_constructible if the
4672 compiler supports it, define to true_type otherwise.
4673 (xobnew): New.
4674 (XOBNEW): Redefine.
4675 (xobnewvec): New.
4676 (XOBNEWVEC): Redefine.
4677 * gdb_obstack.h (obstack_zalloc): New.
4678 (OBSTACK_ZALLOC): Redefine.
4679 (obstack_calloc): New.
4680 (OBSTACK_CALLOC): Redefine.
4681 (obstack_new): New.
4682 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4683 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4684 gdbarch.c.
4685 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4686 obstack_calloc/obstack_zalloc.
4687 (gdbarch_obstack_zalloc): Remove.
4688 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4689
59f66be3
PW
46902018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4691
4692 * stack.c (backtrace_command_1): Remove useless variable int i.
4693
50c65c2d
PW
46942018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4695
4696 * stack.c (print_frame_info): Fix comment.
4697
7ff8cb8c
TT
46982018-05-18 Tom Tromey <tom@tromey.com>
4699
4700 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4701 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4702 (~dwarf2_per_objfile): Update
4703 (dwarf2_get_dwz_file): Use new.
4704 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4705 unique_ptr.
4706
400174b1
TT
47072018-05-18 Tom Tromey <tom@tromey.com>
4708
4709 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4710 unique_ptr.
4711 * dwarf2read.c (struct dwp_file): Add constructor and
4712 initializers.
4713 (open_and_init_dwp_file): Return a unique_ptr.
4714 (dwarf2_per_objfile, create_dwp_hash_table)
4715 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4716 (lookup_dwo_unit_in_dwp): Update.
4717 (open_and_init_dwp_file, get_dwp_file): Update.
4718
3063847f
TT
47192018-05-18 Tom Tromey <tom@tromey.com>
4720
4721 * dwarf2read.c (dwarf2_per_objfile): Update.
4722 (struct mapped_index): Add initializers.
4723 (dwarf2_read_index): Use new.
4724 (dw2_symtab_iter_init): Update.
4725 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4726 unique_ptr.
4727
d3d02dee
SM
47282018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4729
4730 * dwarf2read.c (mapped_index) <total_size>: Remove.
4731
1d143c36
SM
47322018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4733
4734 * unittests/format_pieces-selftests.c (test_format_specifier):
4735 Add ARI comments.
4736
ce1e8424
TT
47372018-05-18 Tom Tromey <tom@tromey.com>
4738
4739 * c-typeprint.c (maybe_print_hole): New function.
4740 (c_print_type_struct_field_offset): Update.
4741 (c_type_print_base_struct_union): Call maybe_print_hole.
4742
ddfe970e
KS
47432018-05-17 Keith Seitz <keiths@redhat.com>
4744
4745 * breakpoint.c (build_bpstat_chain): New function, moved from
4746 bpstat_stop_status.
4747 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4748 If no stop chain is passed, call build_bpstat_chain to build it.
4749 * breakpoint.h (build_bpstat_chain): Declare.
4750 (bpstat_stop_status): Move documentation here from breakpoint.c.
4751 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4752 build the stop chain and pass it to skip_inline_frames.
4753 Pass this stop chain to bpstat_stop_status.
4754 * inline-frame.c: Include breakpoint.h.
4755 (stopped_by_user_bp_inline_frame): New function.
4756 (skip_inline_frames): Add parameter `stop_chain'.
4757 Move documention to inline-frame.h.
4758 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4759 whether the frame should be elided.
4760 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4761 Add moved documentation and update for new parameter.
4762
b17992c1
SM
47632018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4764
4765 PR cli/14975
4766 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4767 unittests/format_pieces-selftests.c.
4768 * common/format.h (format_piece) <operator==>: New.
4769 (format_pieces) <operator[]>: Remove.
4770 * common/format.c (format_pieces::format_pieces): Handle \e.
4771 * unittests/format_pieces-selftests.c: New.
4772
58f0c718
TT
47732018-05-17 Tom Tromey <tom@tromey.com>
4774
4775 PR symtab/23010:
4776 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4777 (dw2_instantiate_symtab): Add skip_partial parameter.
4778 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4779 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4780 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4781 (dw2_expand_symtabs_matching_one)
4782 (dw2_find_pc_sect_compunit_symtab)
4783 (dw2_debug_names_lookup_symbol)
4784 (dw2_debug_names_expand_symtabs_for_function): Update.
4785 (init_cutu_and_read_dies): Add skip_partial parameter.
4786 (process_psymtab_comp_unit, build_type_psymtabs_1)
4787 (process_skeletonless_type_unit, load_partial_comp_unit)
4788 (psymtab_to_symtab_1): Update.
4789 (load_full_comp_unit): Add skip_partial parameter.
4790 (process_imported_unit_die, dwarf2_read_addr_index)
4791 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
4792 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
4793 (read_signatured_type): Update.
4794
3e618834
SM
47952018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4796
4797 * value.c (release_value): Remove unused variable.
4798 (record_latest_value): Likewise.
4799 (access_value_history): Likewise.
4800 (preserve_values): Likewise.
4801
fe10fe31
TT
48022018-05-17 Tom Tromey <tom@tromey.com>
4803
4804 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
4805 Initialize.
4806
1d761124
MR
48072018-05-16 Maciej W. Rozycki <macro@mips.com>
4808
4809 PR gdb/22286
4810 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
4811 Also handle registers whose width is not a multiple of
4812 PTRACE_TYPE_RET.
4813 (linux_nat_trad_target::store_register): Likewise.
4814
06333fea
TT
48152018-05-16 Tom Tromey <tom@tromey.com>
4816
4817 * gdbcore.h (core_bfd): Redefine.
4818 * corelow.c (core_target::close): Update.
4819 (core_target_open): Update.
4820 * progspace.h (struct program_space) <cbfd>: Now a
4821 gdb_bfd_ref_ptr.
4822
921222e2
TT
48232018-05-16 Tom Tromey <tom@tromey.com>
4824
4825 PR cli/19551:
4826 * symfile-add-flags.h (enum symfile_add_flags)
4827 <SYMFILE_NOT_FILENAME>: New constant.
4828 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
4829 objfile name from BFD.
4830 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
4831 * minidebug.c (find_separate_debug_file_in_section): Put
4832 ".gnu_debugdata" into BFD's file name.
4833
3acb7083
SM
48342018-05-16 Simon Marchi <simon.marchi@ericsson.com>
4835
4836 * regcache.c (regcache_read_ftype, regcache_write_ftype):
4837 Remove.
4838
561a72d4
TC
48392018-05-15 Tamar Christina <tamar.christina@arm.com>
4840
4841 PR binutils/21446
4842 * aarch64-tdep.c (aarch64_analyze_prologue,
4843 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
4844 Indicate not interested in errors.
4845
4e6ff0e1
MR
48462018-05-15 Maciej W. Rozycki <macro@mips.com>
4847
4848 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
4849 Supply the MIPS_ZERO_REGNUM register.
4850
ea33cd92
MR
48512018-05-15 Maciej W. Rozycki <macro@mips.com>
4852
4853 * mips-tdep.c (mask_address_var): Make variable static.
4854
2d79090e
TT
48552018-05-14 Tom Tromey <tom@tromey.com>
4856
4857 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
4858
cf4912ae
AB
48592018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
4860
4861 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
4862 FXSAVE_ADDR for the mxcsr register.
4863
67e6f569
MF
48642018-05-11 Max Filippov <jcmvbkbc@gmail.com>
4865
4866 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
4867
15244507
PA
48682018-05-11 Pedro Alves <palves@redhat.com>
4869
4870 * corelow.c (core_target) <core_target>: No longer inline.
4871 Initialize m_core_gdbarch, m_core_vec and build the section table
4872 here.
4873 <~core_target>: New.
4874 <core_gdbarch, get_core_register_section>: New methods.
4875 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
4876 factored out from ...
4877 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
4878 (core_ops): Delete.
4879 (sniff_core_bfd): Add gdbarch parameter.
4880 (core_close): Delete, merged into ...
4881 (core_target::close): ... here. Delete self.
4882 (core_close_cleanup): Delete.
4883 (core_target_open): Allocate a core_target on the heap. Use a
4884 unique_ptr instead of a cleanup. Bits moved into the core_target
4885 ctor. Adjust to use core_target methods instead of globals.
4886 (get_core_register_section): Rename to ...
4887 (core_target::get_core_register_section): ... this and adjust.
4888 (struct get_core_registers_cb_data): New.
4889 (get_core_registers_cb): Use it. Use bool.
4890 (core_target::fetch_registers, core_target::files_info)
4891 (core_target::xfer_partial, core_target::read_description)
4892 (core_target::pid_to, core_target::thread_name): Adjust to
4893 reference class fields instead of globals.
4894 * target.h (struct target_ops_deleter, target_ops_up): New.
4895
451953fa
PA
48962018-05-11 Pedro Alves <palves@redhat.com>
4897
4898 * corefile.c (core_file_command): Move to corelow.c.
4899 * corelow.c (the_core_target): Delete.
4900 (core_file_command): Moved from corefile.c. Check exec_bfd
4901 instead of the_core_target. Use target_detach instead of calling
4902 into the_core_target directly.
4903 (maybe_say_no_core_file_now): New.
4904 (core_target::detach): Use it.
4905 (_initialize_corelow): Remove references to the_core_target.
4906 * gdbcore.h (the_core_target): Delete.
4907
e540a5a2 49082018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 4909 Pedro Alves <palves@redhat.com>
e540a5a2
TT
4910
4911 * corefile.c (core_bfd): Remove.
4912 * gdbcore.h (core_bfd): Now a macro.
4913 * progspace.h (struct program_space) <cbfd>: New field.
4914
633cf254
TT
49152018-05-11 Tom Tromey <tom@tromey.com>
4916
4917 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
4918 gdb::def_vector.
4919
1a34f210
TT
49202018-05-10 Tom Tromey <tom@tromey.com>
4921
4922 * configure: Rebuild.
4923 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
4924
190852c8
JB
49252018-05-10 Joel Brobecker <brobecker@adacore.com>
4926
4927 PR server/23158:
4928 * regformats/regdat.sh: Adjust script, following the addition
4929 of the new expedite_regs parameter to init_target_desc.
4930
8727de56
OJ
49312018-05-10 Omair Javaid <omair.javaid@linaro.org>
4932
4933 PR gdb/23127
4934 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
4935 set_gdbarch_significant_addr_bit.
4936 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
4937 set_gdbarch_significant_addr_bit.
4938 * utils.c (address_significant): Update to sign extend addr.
4939
37d9e062
MF
49402018-05-09 Max Filippov <jcmvbkbc@gmail.com>
4941
4942 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
4943 (xtensa_linux_init_abi): Limit tdep->num_regs by
4944 tdep->num_nopriv_regs.
4945 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
4946 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
4947 not initialized.
4948
7402fbca
SM
49492018-05-08 Simon Marchi <simon.marchi@ericsson.com>
4950
4951 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
4952
8ee22052
AB
49532018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
4954
4955 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
4956 (I387_MXCSR_INIT_VAL): New constant.
4957 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
4958 buffer if it was supplied by the inferior.
4959 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
4960 (i387_xsave_get_clear_bv): New function.
4961 (i387_supply_xsave): Only read x87 control registers from the
4962 xsave buffer if the feature is enabled, and the state will have
4963 been written, otherwise, provide a suitable default.
4964 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
4965 including x87 control registers. Update control registers if they
4966 have changed from the default value, and mark features as enabled
4967 as required.
4968 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
4969
968ae51b
UW
49702018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4971
4972 * spu-tdep.c (info_spu_event_command): Fix output formatting.
4973
aff689d3
TT
49742018-05-07 Tom Tromey <tom@tromey.com>
4975
4976 * configure: Rebuild.
4977 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
4978
ce887586
TT
49792018-05-07 Tom Tromey <tom@tromey.com>
4980
4981 PR tdep/20362:
4982 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
4983 bit. Use correct value for VDIV.
4984
85e26832
TT
49852018-05-04 Tom Tromey <tom@tromey.com>
4986
4987 * configure: Rebuild.
4988 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
4989
449b1ac7
TT
49902018-05-04 Tom Tromey <tom@tromey.com>
4991
4992 * linux-record.c (record_linux_system_call) <case
4993 RECORD_SYS_RECVFROM>: Add "break".
4994
15c9ffd6
TT
49952018-05-04 Tom Tromey <tom@tromey.com>
4996
4997 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
4998 Add missing "break".
4999 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5000 Add missing "break".
5001
e3829d13
TT
50022018-05-04 Tom Tromey <tom@tromey.com>
5003
5004 * rs6000-tdep.c (ppc_process_record_op4)
5005 (ppc_process_record_op63): Add fall-through comment.
5006
da0e1563
TT
50072018-05-04 Tom Tromey <tom@tromey.com>
5008
5009 * i386-tdep.c (i386_process_record): Add fall-through comment.
5010
0019cd49
TT
50112018-05-04 Tom Tromey <tom@tromey.com>
5012
5013 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5014 comment.
5015
565e0eda
TT
50162018-05-04 Tom Tromey <tom@tromey.com>
5017
5018 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5019 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5020 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5021 comment.
5022 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5023 comment.
5024 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5025 comment.
5026
621846f4
TT
50272018-05-04 Tom Tromey <tom@tromey.com>
5028
5029 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5030
86a73007
TT
50312018-05-04 Tom Tromey <tom@tromey.com>
5032
5033 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5034 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5035 * symfile.c (section_is_mapped): Fix fall-through comment.
5036 * stabsread.c (define_symbol, read_member_functions): Fix
5037 fall-through comment.
5038 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5039 comment.
5040 * remote.c (remote_wait_as): Fix fall-through comment.
5041 * p-exp.y (yylex): Fix fall-through comment.
5042 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5043 comment.
5044 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5045 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5046 * jv-exp.y (yylex): Fix fall-through comment.
5047 * go-exp.y (lex_one_token): Fix fall-through comment.
5048 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5049 fall-through comment.
5050 * f-exp.y (yylex): Fix fall-through comment.
5051 * dwarf2read.c (process_die): Fix fall-through comments.
5052 * dbxread.c (process_one_symbol): Fix fall-through comment.
5053 * d-exp.y (lex_one_token): Fix fall-through comment.
5054 * cp-name-parser.y (yylex): Fix fall-through comment.
5055 * coffread.c (coff_symtab_read): Fix fall-through comment.
5056 * c-exp.y (lex_one_token): Fix fall-through comment.
5057 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5058 comment.
5059 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5060 comment.
5061
56bcdbea
TT
50622018-05-04 Tom Tromey <tom@tromey.com>
5063
5064 PR python/22730:
5065 * NEWS: Mention gdb.execute change.
5066 * gdbcmd.h (execute_control_command): Don't declare.
5067 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5068 execute_control_commands, execute_control_commands_to_string.
5069 * cli/cli-script.h (execute_control_commands)
5070 (execute_control_commands_to_string): Declare.
5071 (execute_control_command): Add from_tty parameter.
5072 * cli/cli-script.c (execute_control_commands)
5073 (execute_control_commands_to_string): New functions.
5074 (execute_user_command): Use execute_control_commands.
5075 (execute_control_command_1): Add "from_tty" parameter. Update.
5076 (execute_control_command): Likewise.
5077
a913fffb
TT
50782018-05-04 Tom Tromey <tom@tromey.com>
5079
5080 PR python/22731:
5081 * NEWS: Mention that breakpoint commands are writable.
5082 * python/py-breakpoint.c (bppy_set_commands): New function.
5083 (breakpoint_object_getset) <"commands">: Use it.
5084
60b3cef2
TT
50852018-05-04 Tom Tromey <tom@tromey.com>
5086
5087 * tracepoint.c (actions_command): Update.
5088 * mi/mi-cmd-break.c (mi_command_line_array)
5089 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5090 (mi_read_next_line): Remove.
5091 (mi_cmd_break_commands): Update.
5092 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5093 function_view.
5094 * cli/cli-script.c (get_command_line): Update.
5095 (process_next_line): Use function_view. Constify.
5096 (recurse_read_control_structure, read_command_lines)
5097 (read_command_lines_1): Change argument types to function_view.
5098 (do_define_command, document_command): Update.
5099 * breakpoint.h (check_tracepoint_command): Don't declare.
5100 * breakpoint.c (check_tracepoint_command): Remove.
5101 (commands_command_1, create_tracepoint_from_upload): Update.
5102
7a2c85f2
TT
51032018-05-04 Tom Tromey <tom@tromey.com>
5104
5105 PR gdb/11750:
5106 * cli/cli-script.h (enum command_control_type) <define_control>:
5107 New constant.
5108 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5109 (build_command_line, execute_control_command_1)
5110 (process_next_line): Likewise.
5111 (do_define_command): New function, extracted from define_command.
5112 (define_command): Use it.
5113
295dc222
TT
51142018-05-04 Tom Tromey <tom@tromey.com>
5115
5116 * tracepoint.c (actions_command): Update.
5117 * cli/cli-script.h (read_command_lines): Update.
5118 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5119 (MAX_TMPBUF): Remove define.
5120 (define_command): Use string_printf.
5121 (document_command): Likewise.
5122 * breakpoint.c (commands_command_1): Update.
5123
1263a9d5
TT
51242018-05-04 Tom Tromey <tom@tromey.com>
5125
5126 * top.c (execute_command): Update.
5127 * cli/cli-script.h (print_command_lines): Now varargs.
5128 * cli/cli-script.c (print_command_lines): Now varargs.
5129 (execute_control_command_1) <case while_control, case if_control>:
5130 Update.
5131
12973681
TT
51322018-05-04 Tom Tromey <tom@tromey.com>
5133
5134 * tracepoint.c (all_tracepoint_actions): Rename from
5135 all_tracepoint_actions_and_cleanup. Change return type.
5136 (actions_command, encode_actions_1, encode_actions)
5137 (trace_dump_actions, tdump_command): Update.
5138 * remote.c (remote_download_command_source): Update.
5139 * python/python.c (gdbpy_eval_from_control_command)
5140 (python_command, python_interactive_command): Update.
5141 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5142 * guile/guile.c (guile_command)
5143 (gdbscm_eval_from_control_command, guile_command): Update.
5144 * compile/compile.c (compile_code_command)
5145 (compile_print_command, compile_to_object): Update.
5146 * cli/cli-script.h (struct command_lines_deleter): New.
5147 (counted_command_line): New typedef.
5148 (struct command_line): Add constructor, destructor.
5149 <body_list>: Remove.
5150 <body_list_0, body_list_1>: New members.
5151 (command_line_up): Remove typedef.
5152 (read_command_lines, read_command_lines_1, get_command_line):
5153 Update.
5154 (copy_command_lines): Don't declare.
5155 * cli/cli-script.c (build_command_line): Use "new".
5156 (get_command_line): Return counted_command_line.
5157 (print_command_lines, execute_user_command)
5158 (execute_control_command_1, while_command, if_command): Update.
5159 (realloc_body_list): Remove.
5160 (process_next_line, recurse_read_control_structure): Update.
5161 (read_command_lines, read_command_lines_1): Return counted_command_line.
5162 (free_command_lines): Use "delete".
5163 (copy_command_lines): Remove.
5164 (define_command, document_command, show_user_1): Update.
5165 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5166 a counted_command_line.
5167 * breakpoint.h (counted_command_line): Remove typedef.
5168 (breakpoint_set_commands): Update.
5169 * breakpoint.c (check_no_tracepoint_commands)
5170 (validate_commands_for_breakpoint): Update.
5171 (breakpoint_set_commands): Change commands to be a
5172 counted_command_line.
5173 (commands_command_1, update_dprintf_command_list)
5174 (create_tracepoint_from_upload): Update.
5175
e2fc72e2
TT
51762018-05-04 Tom Tromey <tom@tromey.com>
5177
5178 * cli/cli-decode.h (cmd_list_element): New constructor.
5179 (~cmd_list_element): New destructor.
5180 (struct cmd_list_element): Add initializers.
5181 * cli/cli-decode.c (do_add_cmd): Use "new".
5182 (delete_cmd): Use "delete".
5183
a3b60e45
JK
51842018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5185 Pedro Alves <palves@redhat.com>
5186
5187 PR breakpoints/19806 and support for PR external/20207.
5188 * NEWS: Mention Aarch64 watchpoint improvements.
5189 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5190 watchpoints and PR external/20207 watchpoints.
5191 * nat/aarch64-linux-hw-point.c
5192 (kernel_supports_any_contiguous_range): New.
5193 (aarch64_watchpoint_offset): New.
5194 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5195 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5196 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5197 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5198 next_addr_orig_p. Support PR external/20207 watchpoints.
5199 (aarch64_downgrade_regs): New.
5200 (aarch64_dr_state_insert_one_point): New parameters offset and
5201 addr_orig.
5202 (aarch64_dr_state_remove_one_point): Likewise.
5203 (aarch64_handle_breakpoint): Update caller.
5204 (aarch64_handle_aligned_watchpoint): Likewise.
5205 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5206 aligned_offset.
5207 (aarch64_linux_set_debug_regs): Remove const from state. Call
5208 aarch64_downgrade_regs.
5209 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5210 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5211 (DR_CONTROL_MASK): ... this.
5212 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5213 (unsigned int aarch64_watchpoint_offset): New prototype.
5214 (aarch64_linux_set_debug_regs): Remove const from state.
5215 * utils.c (align_up, align_down): Move to ...
5216 * common/common-utils.c (align_up, align_down): ... here.
5217 * utils.h (align_up, align_down): Move to ...
5218 * common/common-utils.h (align_up, align_down): ... here.
5219
05bc7456
JB
52202018-05-04 Joel Brobecker <brobecker@adacore.com>
5221
5222 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5223 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5224 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5225 Re-implement to match the ABI as summarized in GCC's
5226 gcc/config/sparc/sparc.c. All callers updated.
5227 (sparc32_store_arguments): Remove assertion.
5228
2f433492
TT
52292018-05-04 Tom Tromey <tom@tromey.com>
5230
5231 * printcmd.c: Don't include tui.h.
5232 (decode_format): Use skip_spaces.
5233
9be2ae8f
TT
52342018-05-04 Tom Tromey <tom@tromey.com>
5235
5236 PR gdb/22619:
5237 * printcmd.c (last_count): New global.
5238 (x_command): Use saved count when repeating.
5239
f0b3976b
TT
52402018-05-04 Tom Tromey <tom@tromey.com>
5241
5242 * nto-procfs.c (do_closedir_cleanup): Remove.
5243 (procfs_pidlist): Use gdb_dir_up.
5244 * procfs.c (do_closedir_cleanup): Remove.
5245 (proc_update_threads): Use gdb_dir_up.
5246 * common/filestuff.h (struct gdb_dir_deleter): New.
5247 (gdb_dir_up): New typedef.
5248
862d101a
TT
52492018-05-04 Tom Tromey <tom@tromey.com>
5250
5251 * ada-lang.c (print_mention_exception): Use std::string.
5252
cb7de75e
TT
52532018-05-04 Tom Tromey <tom@tromey.com>
5254
5255 * ada-lang.c (create_excep_cond_exprs): Update.
5256 (ada_exception_catchpoint_cond_string): Use std::string.
5257
49d83361
TT
52582018-05-04 Tom Tromey <tom@tromey.com>
5259
5260 * ada-lang.c (xget_renaming_scope): Return std::string.
5261 (old_renaming_is_invisible): Update.
5262
ade72a34
TT
52632018-05-04 Tom Tromey <tom@tromey.com>
5264
5265 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5266 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5267
2be4d7f0
UW
52682018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5269
5270 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5271
69b6ecb0
TT
52722018-05-04 Tom Tromey <tom@tromey.com>
5273
5274 * remote.c (remote_query_supported_append): Change type.
5275 (remote_check_symbols): Update.
5276
bf27f0e2
PP
52772018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5278
5279 PR gdb/11420
5280 * configure.ac: Prepend libpython.
5281 * python/python-config.py: Likewise.
5282 * configure: Regenerate.
5283
4ea17de8
SM
52842018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5285
5286 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5287
bd732259
PA
52882018-05-03 Pedro Alves <palves@redhat.com>
5289
5290 * s390-linux-nat.c
5291 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5292 override. Write 'true' instead of '1'.
5293 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5294 declaration.
5295
d9f719f1
PA
52962018-05-02 Pedro Alves <palves@redhat.com>
5297
5298 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5299 add_inf_child_target.
5300 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5301 add_inf_child_target.
5302 * aix-thread.c (aix_thread_target_info): New.
5303 (aix_thread_target) <shortname, longname, doc>: Delete.
5304 <info>: New.
5305 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5306 add_inf_child_target.
5307 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5308 add_inf_child_target.
5309 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5310 add_inf_child_target.
5311 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5312 add_inf_child_target.
5313 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5314 add_inf_child_target.
5315 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5316 add_inf_child_target.
5317 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5318 add_inf_child_target.
5319 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5320 add_inf_child_target.
5321 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5322 add_inf_child_target.
5323 * bfd-target.c (target_bfd_target_info): New.
5324 (target_bfd) <shortname, longname, doc>: Delete.
5325 <info>: New.
5326 * bsd-kvm.c (bsd_kvm_target_info): New.
5327 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5328 <info>: New.
5329 (bsd_kvm_target::open): Rename to ...
5330 (bsd_kvm_target_open): ... this. Adjust.
5331 * bsd-uthread.c (bsd_uthread_target_info): New.
5332 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5333 <info>: New.
5334 * corefile.c (core_file_command): Adjust.
5335 * corelow.c (core_target_info): New.
5336 (core_target) <shortname, longname, doc>: Delete.
5337 <info>: New.
5338 (core_target::open): Rename to ...
5339 (core_target_open): ... this. Adjust.
5340 * ctf.c (ctf_target_info): New.
5341 (ctf_target) <shortname, longname, doc>: Delete.
5342 <info>: New.
5343 (ctf_target::open): Rename to ...
5344 (ctf_target_open): ... this.
5345 (_initialize_ctf): Adjust.
5346 * exec.c (exec_target_info): New.
5347 (exec_target) <shortname, longname, doc>: Delete.
5348 <info>: New.
5349 (exec_target::open): Rename to ...
5350 (exec_target_open): ... this.
5351 * gdbcore.h (core_target_open): Declare.
5352 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5353 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5354 add_inf_child_target.
5355 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5356 add_inf_child_target.
5357 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5358 add_inf_child_target.
5359 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5360 add_inf_child_target.
5361 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5362 add_inf_child_target.
5363 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5364 add_inf_child_target.
5365 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5366 add_inf_child_target.
5367 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5368 add_inf_child_target.
5369 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5370 add_inf_child_target.
5371 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5372 add_inf_child_target.
5373 * inf-child.c (inf_child_target_info): New.
5374 (inf_child_target::info): New.
5375 (inf_child_open_target): Remove 'target' parameter. Use
5376 get_native_target instead.
5377 (inf_child_target::open): Delete.
5378 (add_inf_child_target): New.
5379 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5380 Delete.
5381 <info>: New.
5382 (add_inf_child_target): Declare.
5383 (inf_child_open_target): Declare.
5384 * linux-thread-db.c (thread_db_target_info): New.
5385 (thread_db_target) <shortname, longname, doc>: Delete.
5386 <info>: New.
5387 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5388 add_inf_child_target.
5389 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5390 add_inf_child_target.
5391 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5392 add_inf_child_target.
5393 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5394 add_inf_child_target.
5395 * make-target-delegates (print_class): Adjust.
5396 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5397 add_inf_child_target.
5398 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5399 add_inf_child_target.
5400 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5401 add_inf_child_target.
5402 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5403 add_inf_child_target.
5404 * nto-procfs.c (nto_native_target_info): New.
5405 (nto_procfs_target_native) <shortname, longname, doc>:
5406 Delete.
5407 <info>: New.
5408 (nto_procfs_target_info): New.
5409 (nto_procfs_target_procfs) <shortname, longname, doc>:
5410 Delete.
5411 <info>: New.
5412 (init_procfs_targets): Adjust.
5413 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5414 add_inf_child_target.
5415 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5416 add_inf_child_target.
5417 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5418 add_inf_child_target.
5419 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5420 add_inf_child_target.
5421 * ravenscar-thread.c (ravenscar_target_info): New.
5422 (ravenscar_thread_target) <shortname, longname, doc>:
5423 Delete.
5424 <info>: New.
5425 * record-btrace.c (record_btrace_target_info):
5426 (record_btrace_target) <shortname, longname, doc>: Delete.
5427 <info>: New.
5428 (record_btrace_target::open): Rename to ...
5429 (record_btrace_target_open): ... this. Adjust.
5430 * record-full.c (record_longname, record_doc): New.
5431 (record_full_base_target) <shortname, longname, doc>: Delete.
5432 <info>: New.
5433 (record_full_target_info): New.
5434 (record_full_target): <shortname>: Delete.
5435 <info>: New.
5436 (record_full_core_open_1, record_full_open_1): Update comments.
5437 (record_full_base_target::open): Rename to ...
5438 (record_full_open): ... this.
5439 (cmd_record_full_restore): Update.
5440 (_initialize_record_full): Update.
5441 * remote-sim.c (remote_sim_target_info): New.
5442 (gdbsim_target) <shortname, longname, doc>: Delete.
5443 <info>: New.
5444 (gdbsim_target::open): Rename to ...
5445 (gdbsim_target_open): ... this.
5446 (_initialize_remote_sim): Adjust.
5447 * remote.c (remote_doc): New.
5448 (remote_target_info): New.
5449 (remote_target) <shortname, longname, doc>: Delete.
5450 <info>: New.
5451 (extended_remote_target_info): New.
5452 (extended_remote_target) <shortname, longname, doc>: Delete.
5453 <info>: New.
5454 (remote_target::open_1): Make static. Adjust.
5455 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5456 * s390-linux-nat.c (_initialize_s390_nat): Use
5457 add_inf_child_target.
5458 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5459 add_inf_child_target.
5460 * sol-thread.c (thread_db_target_info): New.
5461 (sol_thread_target) <shortname, longname, doc>: Delete.
5462 <info>: New.
5463 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5464 add_inf_child_target.
5465 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5466 add_inf_child_target.
5467 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5468 add_inf_child_target.
5469 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5470 add_inf_child_target.
5471 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5472 add_inf_child_target.
5473 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5474 add_inf_child_target.
5475 * spu-linux-nat.c (_initialize_spu_nat): Use
5476 add_inf_child_target.
5477 * spu-multiarch.c (spu_multiarch_target_info): New.
5478 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5479 <info>: New.
5480 * target-delegates.c: Regenerate.
5481 * target.c: Include <unordered_map>.
5482 (target_ops_p): Delete.
5483 (DEF_VEC_P(target_ops_p)): Delete.
5484 (target_factories): New.
5485 (test_target_info): New.
5486 (test_target_ops::info): New.
5487 (open_target): Adjust to use target_factories.
5488 (add_target_with_completer): Rename to ...
5489 (add_target): ... this. Change prototype. Register target_info
5490 and open callback in target_factories. Register target_info in
5491 command context instead of target_ops.
5492 (add_target): Delete old implementation.
5493 (add_deprecated_target_alias): Change prototype. Adjust.
5494 (the_native_target): New.
5495 (set_native_target, get_native_target): New.
5496 (find_default_run_target): Use the_native_target.
5497 (find_attach_target, find_run_target): Simplify.
5498 (target_ops::open): Delete.
5499 (dummy_target_info): New.
5500 (dummy_target::shortname, dummy_target::longname)
5501 (dummy_target::doc): Delete.
5502 (dummy_target::info): New.
5503 (debug_target::shortname, debug_target::longname)
5504 (debug_target::doc): Delete.
5505 (debug_target::info): New.
5506 * target.h (struct target_info): New.
5507 (target_ops::~target_ops): Add comment.
5508 (target_ops::info): New.
5509 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5510 longer virtual. Implement in terms of target_info.
5511 (set_native_target, get_native_target): Declare.
5512 (target_open_ftype): New.
5513 (add_target, add_target_with_completer)
5514 (add_deprecated_target_alias): Change prototype.
5515 (test_target) <shortname, longname, doc>: Delete.
5516 <info>: New.
5517 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5518 add_inf_child_target.
5519 * tracefile-tfile.c (tfile_target_info): New.
5520 (tfile_target) <shortname, longname, doc>: Delete.
5521 <info>: New.
5522 (tfile_target::open): Rename to ...
5523 (tfile_target_open): ... this.
5524 (_initialize_tracefile_tfile): Adjust.
5525 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5526 add_inf_child_target.
5527 * windows-nat.c (_initialize_windows_nat): Use
5528 add_inf_child_target.
5529 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5530 add_inf_child_target.
5531
135340af
PA
55322018-05-02 Pedro Alves <palves@redhat.com>
5533
5534 * linux-nat.h (linux_nat_target) <low_new_thread,
5535 low_delete_thread, low_new_fork, low_forget_process,
5536 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5537 New virtual methods.
5538 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5539 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5540 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5541 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5542 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5543 Delete.
5544 * linux-fork.c (delete_fork): Adjust to call low method.
5545 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5546 (linux_nat_new_fork, linux_nat_forget_process_hook)
5547 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5548 (linux_nat_status_is_event):
5549 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5550 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5551 to call low method.
5552 (sigtrap_is_event): Rename to ...
5553 (linux_nat_target::low_status_is_event): ... this.
5554 (linux_nat_set_status_is_event): Delete.
5555 (save_stop_reason, linux_nat_wait_1)
5556 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5557 low methods.
5558 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5559 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5560 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5561 (linux_nat_set_prepare_to_resume): Delete.
5562 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5563 low virtual methods.
5564 * amd64-linux-nat.c: Likewise.
5565 * arm-linux-nat.c: Likewise.
5566 * i386-linux-nat.c: Likewise.
5567 * ia64-linux-nat.c: Likewise.
5568 * mips-linux-nat.c: Likewise.
5569 * ppc-linux-nat.c: Likewise.
5570 * s390-linux-nat.c: Likewise.
5571 * sparc64-linux-nat.c: Likewise.
5572 * x86-linux-nat.c: Likewise.
5573 * x86-linux-nat.h: Include "nat/x86-linux.h".
5574 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5575 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5576 Override methods.
5577
57810aa7
PA
55782018-05-02 Pedro Alves <palves@redhat.com>
5579
5580 * target.h (target_ops)
5581 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5582 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5583 stopped_by_watchpoint, have_continuable_watchpoint,
5584 stopped_data_address, watchpoint_addr_within_range,
5585 can_accel_watchpoint_condition, can_run, thread_alive,
5586 has_all_memory, has_memory, has_stack, has_registers,
5587 has_execution, can_async_p, is_async_p, supports_non_stop,
5588 always_non_stop_p, can_execute_reverse, supports_multi_process,
5589 supports_enable_disable_tracepoint,
5590 supports_disable_randomization, supports_string_tracing,
5591 supports_evaluation_of_breakpoint_conditions,
5592 can_run_breakpoint_commands, filesystem_is_local,
5593 can_download_tracepoint, get_trace_state_variable_value,
5594 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5595 record_is_replaying, record_will_replay,
5596 augmented_libraries_svr4_read>: Adjust to return bool.
5597 * aarch64-linux-nat.c: All implementations adjusted.
5598 * aix-thread.c: All implementations adjusted.
5599 * arm-linux-nat.c: All implementations adjusted.
5600 * breakpoint.c: All implementations adjusted.
5601 * bsd-kvm.c: All implementations adjusted.
5602 * bsd-uthread.c: All implementations adjusted.
5603 * corelow.c: All implementations adjusted.
5604 * ctf.c: All implementations adjusted.
5605 * darwin-nat.c: All implementations adjusted.
5606 * darwin-nat.h: All implementations adjusted.
5607 * exec.c: All implementations adjusted.
5608 * fbsd-nat.c: All implementations adjusted.
5609 * fbsd-nat.h: All implementations adjusted.
5610 * gnu-nat.c: All implementations adjusted.
5611 * gnu-nat.h: All implementations adjusted.
5612 * go32-nat.c: All implementations adjusted.
5613 * ia64-linux-nat.c: All implementations adjusted.
5614 * inf-child.c: All implementations adjusted.
5615 * inf-child.h: All implementations adjusted.
5616 * inf-ptrace.c: All implementations adjusted.
5617 * inf-ptrace.h: All implementations adjusted.
5618 * linux-nat.c: All implementations adjusted.
5619 * linux-nat.h: All implementations adjusted.
5620 * mips-linux-nat.c: All implementations adjusted.
5621 * nto-procfs.c: All implementations adjusted.
5622 * ppc-linux-nat.c: All implementations adjusted.
5623 * procfs.c: All implementations adjusted.
5624 * ravenscar-thread.c: All implementations adjusted.
5625 * record-btrace.c: All implementations adjusted.
5626 * record-full.c: All implementations adjusted.
5627 * remote-sim.c: All implementations adjusted.
5628 * remote.c: All implementations adjusted.
5629 * s390-linux-nat.c: All implementations adjusted.
5630 * sol-thread.c: All implementations adjusted.
5631 * spu-multiarch.c: All implementations adjusted.
5632 * target-delegates.c: All implementations adjusted.
5633 * target.c: All implementations adjusted.
5634 * target.h: All implementations adjusted.
5635 * tracefile-tfile.c: All implementations adjusted.
5636 * tracefile.c: All implementations adjusted.
5637 * tracefile.h: All implementations adjusted.
5638 * windows-nat.c: All implementations adjusted.
5639 * x86-linux-nat.h: All implementations adjusted.
5640 * x86-nat.h: All implementations adjusted.
5641
ad6a4e2d
PA
56422018-05-02 Pedro Alves <palves@redhat.com>
5643
5644 * make-target-delegates (scan_target_h): Don't trim lines here.
5645 Replace sequences of tabs and/or whitespace with a single
5646 whitespace.
5647 (top level, parsing methods): Trim each line before processing it
5648 here.
5649
f6ac5f3d
PA
56502018-05-02 Pedro Alves <palves@redhat.com>
5651 John Baldwin <jhb@freebsd.org>
5652
5653 * target.h (enum strata) <debug_stratum>: New.
5654 (struct target_ops) <all delegation methods>: Replace by C++
5655 virtual methods, and drop "to_" prefix. All references updated
5656 throughout.
5657 <to_shortname, to_longname, to_doc, to_data,
5658 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5659 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5660 virtual methods. All references updated throughout.
5661 <can_attach, supports_terminal_ours, can_create_inferior,
5662 get_thread_control_capabilities, attach_no_wait>: New
5663 virtual methods.
5664 <insert_breakpoint, remove_breakpoint>: Now
5665 TARGET_DEFAULT_NORETURN methods.
5666 <info_proc>: Now returns bool.
5667 <to_magic>: Delete.
5668 (OPS_MAGIC): Delete.
5669 (current_target): Delete. All references replaced by references
5670 to ...
5671 (target_stack): ... this. New.
5672 (target_shortname, target_longname): Adjust.
5673 (target_can_run): Now a function declaration.
5674 (default_child_has_all_memory, default_child_has_memory)
5675 (default_child_has_stack, default_child_has_registers)
5676 (default_child_has_execution): Remove target_ops parameter.
5677 (complete_target_initialization): Delete.
5678 (memory_breakpoint_target): New template class.
5679 (test_target_ops): Refactor as a C++ class with virtual methods.
5680 * make-target-delegates (NAME_PART): Tighten.
5681 (POINTER_PART, CP_SYMBOL): New.
5682 (SIMPLE_RETURN_PART): Reimplement.
5683 (VEC_RETURN_PART): Expect less.
5684 (RETURN_PART, VIRTUAL_PART): New.
5685 (METHOD): Adjust to C++ virtual methods.
5686 (scan_target_h): Remove reference to C99.
5687 (dname): Output "target_ops::" prefix.
5688 (write_function_header): Adjust to output a C++ class method.
5689 (write_declaration): New.
5690 (write_delegator): Adjust to output a C++ class method.
5691 (tdname): Output "dummy_target::" prefix.
5692 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5693 method.
5694 (tdefault_names, debug_names): Delete.
5695 (return_types, tdefaults, styles, argtypes_array): New.
5696 (top level): All methods are delegators.
5697 (print_class): New.
5698 (top level): Print dummy_target and debug_target classes.
5699 * target-delegates.c: Regenerate.
5700 * target-debug.h (target_debug_print_enum_info_proc_what)
5701 (target_debug_print_thread_control_capabilities)
5702 (target_debug_print_thread_info_p): New.
5703 * target.c (dummy_target): Delete.
5704 (the_dummy_target, the_debug_target): New.
5705 (target_stack): Now extern.
5706 (set_targetdebug): Push/unpush debug target.
5707 (default_child_has_all_memory, default_child_has_memory)
5708 (default_child_has_stack, default_child_has_registers)
5709 (default_child_has_execution): Remove target_ops parameter.
5710 (complete_target_initialization): Delete.
5711 (add_target_with_completer): No longer call
5712 complete_target_initialization.
5713 (target_supports_terminal_ours): Use regular delegation.
5714 (update_current_target): Delete.
5715 (push_target): No longer check magic number. Don't call
5716 update_current_target.
5717 (unpush_target): Don't call update_current_target.
5718 (target_is_pushed): No longer check magic number.
5719 (target_require_runnable): Skip for all stratums over
5720 process_stratum.
5721 (target_ops::info_proc): New.
5722 (target_info_proc): Use find_target_at and
5723 find_default_run_target.
5724 (target_supports_disable_randomization): Use regular delegation.
5725 (target_get_osdata): Use find_target_at.
5726 (target_ops::open, target_ops::close, target_ops::can_attach)
5727 (target_ops::attach, target_ops::can_create_inferior)
5728 (target_ops::create_inferior, target_ops::can_run)
5729 (target_can_run): New.
5730 (default_fileio_target): Use regular delegation.
5731 (target_ops::fileio_open, target_ops::fileio_pwrite)
5732 (target_ops::fileio_pread, target_ops::fileio_fstat)
5733 (target_ops::fileio_close, target_ops::fileio_unlink)
5734 (target_ops::fileio_readlink): New.
5735 (target_fileio_open_1, target_fileio_unlink)
5736 (target_fileio_readlink): Always call the target method. Handle
5737 FILEIO_ENOSYS.
5738 (return_zero, return_zero_has_execution): Delete.
5739 (init_dummy_target): Delete.
5740 (dummy_target::dummy_target, dummy_target::shortname)
5741 (dummy_target::longname, dummy_target::doc)
5742 (debug_target::debug_target, debug_target::shortname)
5743 (debug_target::longname, debug_target::doc): New.
5744 (target_supports_delete_record): Use regular delegation.
5745 (setup_target_debug): Delete.
5746 (maintenance_print_target_stack): Skip debug_stratum.
5747 (initialize_targets): Instantiate the_dummy_target and
5748 the_debug_target.
5749 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5750 use target_stack.
5751 (target_auxv_search, fprint_target_auxv): Adjust.
5752 (info_auxv_command): Adjust to use target_stack.
5753 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5754 * exceptions.c (print_flush): Handle a NULL target_stack.
5755 * regcache.c (target_ops_no_register): Refactor as class with
5756 virtual methods.
5757
5758 * exec.c (exec_target): New class.
5759 (exec_ops): Now an exec_target.
5760 (exec_open, exec_close_1, exec_get_section_table)
5761 (exec_xfer_partial, exec_files_info, exec_has_memory)
5762 (exec_make_note_section): Refactor as exec_target methods.
5763 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5764 Delete.
5765 (exec_target::find_memory_regions): New.
5766 (_initialize_exec): Don't call init_exec_ops.
5767 * gdbcore.h (exec_file_clear): Delete.
5768
5769 * corefile.c (core_target): Delete.
5770 (core_file_command): Adjust.
5771 * corelow.c (core_target): New class.
5772 (the_core_target): New.
5773 (core_close): Remove target_ops parameter.
5774 (core_close_cleanup): Adjust.
5775 (core_target::close): New.
5776 (core_open, core_detach, get_core_registers, core_files_info)
5777 (core_xfer_partial, core_thread_alive, core_read_description)
5778 (core_pid_to_str, core_thread_name, core_has_memory)
5779 (core_has_stack, core_has_registers, core_info_proc): Rework as
5780 core_target methods.
5781 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5782 (_initialize_corelow): Initialize the_core_target.
5783 * gdbcore.h (core_target): Delete.
5784 (the_core_target): New.
5785
5786 * ctf.c: (ctf_target): New class.
5787 (ctf_ops): Now a ctf_target.
5788 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5789 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
5790 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
5791 methods.
5792 (init_ctf_ops): Delete.
5793 (_initialize_ctf): Don't call it.
5794 * tracefile-tfile.c (tfile_target): New class.
5795 (tfile_ops): Now a tfile_target.
5796 (tfile_open, tfile_close, tfile_files_info)
5797 (tfile_get_tracepoint_status, tfile_trace_find)
5798 (tfile_fetch_registers, tfile_xfer_partial)
5799 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
5800 Refactor as tfile_target methods.
5801 (tfile_xfer_partial_features): Remove target_ops parameter.
5802 (init_tfile_ops): Delete.
5803 (_initialize_tracefile_tfile): Don't call it.
5804 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
5805 (tracefile_has_stack, tracefile_has_registers)
5806 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
5807 tracefile_target methods.
5808 (init_tracefile_ops): Delete.
5809 (tracefile_target::tracefile_target): New.
5810 * tracefile.h: Include "target.h".
5811 (tracefile_target): New class.
5812 (init_tracefile_ops): Delete.
5813
5814 * spu-multiarch.c (spu_multiarch_target): New class.
5815 (spu_ops): Now a spu_multiarch_target.
5816 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
5817 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
5818 (spu_search_memory, spu_mourn_inferior): Refactor as
5819 spu_multiarch_target methods.
5820 (init_spu_ops): Delete.
5821 (_initialize_spu_multiarch): Remove references to init_spu_ops,
5822 complete_target_initialization.
5823
5824 * ravenscar-thread.c (ravenscar_thread_target): New class.
5825 (ravenscar_ops): Now a ravenscar_thread_target.
5826 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
5827 (ravenscar_thread_alive, ravenscar_pid_to_str)
5828 (ravenscar_fetch_registers, ravenscar_store_registers)
5829 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
5830 (ravenscar_stopped_by_hw_breakpoint)
5831 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
5832 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
5833 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
5834 methods.
5835 (init_ravenscar_thread_ops): Delete.
5836 (_initialize_ravenscar): Remove references to
5837 init_ravenscar_thread_ops and complete_target_initialization.
5838
5839 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
5840 (bsd_uthread_target): New class.
5841 (bsd_uthread_ops): Now a bsd_uthread_target.
5842 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
5843 (bsd_uthread_close, bsd_uthread_mourn_inferior)
5844 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
5845 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
5846 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
5847 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
5848 (bsd_uthread_target): Delete function.
5849 (_initialize_bsd_uthread): Remove reference to
5850 complete_target_initialization.
5851
5852 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
5853 (target_bfd): ... this new class.
5854 (target_bfd_xfer_partial, target_bfd_get_section_table)
5855 (target_bfd_close): Refactor as target_bfd methods.
5856 (target_bfd::~target_bfd): New.
5857 (target_bfd_reopen): Adjust.
5858 (target_bfd::close): New.
5859
5860 * record-btrace.c (record_btrace_target): New class.
5861 (record_btrace_ops): Now a record_btrace_target.
5862 (record_btrace_open, record_btrace_stop_recording)
5863 (record_btrace_disconnect, record_btrace_close)
5864 (record_btrace_async, record_btrace_info)
5865 (record_btrace_insn_history, record_btrace_insn_history_range)
5866 (record_btrace_insn_history_from, record_btrace_call_history)
5867 (record_btrace_call_history_range)
5868 (record_btrace_call_history_from, record_btrace_record_method)
5869 (record_btrace_is_replaying, record_btrace_will_replay)
5870 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
5871 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
5872 (record_btrace_store_registers, record_btrace_prepare_to_store)
5873 (record_btrace_to_get_unwinder)
5874 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
5875 (record_btrace_commit_resume, record_btrace_wait)
5876 (record_btrace_stop, record_btrace_can_execute_reverse)
5877 (record_btrace_stopped_by_sw_breakpoint)
5878 (record_btrace_supports_stopped_by_sw_breakpoint)
5879 (record_btrace_stopped_by_hw_breakpoint)
5880 (record_btrace_supports_stopped_by_hw_breakpoint)
5881 (record_btrace_update_thread_list, record_btrace_thread_alive)
5882 (record_btrace_goto_begin, record_btrace_goto_end)
5883 (record_btrace_goto, record_btrace_stop_replaying_all)
5884 (record_btrace_execution_direction)
5885 (record_btrace_prepare_to_generate_core)
5886 (record_btrace_done_generating_core): Refactor as
5887 record_btrace_target methods.
5888 (init_record_btrace_ops): Delete.
5889 (_initialize_record_btrace): Remove reference to
5890 init_record_btrace_ops.
5891 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
5892 the execution_direction global.
5893 (record_full_base_target, record_full_target)
5894 (record_full_core_target): New classes.
5895 (record_full_ops): Now a record_full_target.
5896 (record_full_core_ops): Now a record_full_core_target.
5897 (record_full_target::detach, record_full_target::disconnect)
5898 (record_full_core_target::disconnect)
5899 (record_full_target::mourn_inferior, record_full_target::kill):
5900 New.
5901 (record_full_open, record_full_close, record_full_async): Refactor
5902 as methods of the record_full_base_target class.
5903 (record_full_resume, record_full_commit_resume): Refactor
5904 as methods of the record_full_target class.
5905 (record_full_wait, record_full_stopped_by_watchpoint)
5906 (record_full_stopped_data_address)
5907 (record_full_stopped_by_sw_breakpoint)
5908 (record_full_supports_stopped_by_sw_breakpoint)
5909 (record_full_stopped_by_hw_breakpoint)
5910 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
5911 methods of the record_full_base_target class.
5912 (record_full_store_registers, record_full_xfer_partial)
5913 (record_full_insert_breakpoint, record_full_remove_breakpoint):
5914 Refactor as methods of the record_full_target class.
5915 (record_full_can_execute_reverse, record_full_get_bookmark)
5916 (record_full_goto_bookmark, record_full_execution_direction)
5917 (record_full_record_method, record_full_info, record_full_delete)
5918 (record_full_is_replaying, record_full_will_replay)
5919 (record_full_goto_begin, record_full_goto_end, record_full_goto)
5920 (record_full_stop_replaying): Refactor as methods of the
5921 record_full_base_target class.
5922 (record_full_core_resume, record_full_core_kill)
5923 (record_full_core_fetch_registers)
5924 (record_full_core_prepare_to_store)
5925 (record_full_core_store_registers, record_full_core_xfer_partial)
5926 (record_full_core_insert_breakpoint)
5927 (record_full_core_remove_breakpoint)
5928 (record_full_core_has_execution): Refactor
5929 as methods of the record_full_core_target class.
5930 (record_full_base_target::supports_delete_record): New.
5931 (init_record_full_ops): Delete.
5932 (init_record_full_core_ops): Delete.
5933 (record_full_save): Refactor as method of the
5934 record_full_base_target class.
5935 (_initialize_record_full): Remove references to
5936 init_record_full_ops and init_record_full_core_ops.
5937
5938 * remote.c (remote_target, extended_remote_target): New classes.
5939 (remote_ops): Now a remote_target.
5940 (extended_remote_ops): Now an extended_remote_target.
5941 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
5942 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
5943 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
5944 (remote_pass_signals, remote_set_syscall_catchpoint)
5945 (remote_program_signals, )
5946 (remote_thread_always_alive): Remove target_ops parameter.
5947 (remote_thread_alive, remote_thread_name)
5948 (remote_update_thread_list, remote_threads_extra_info)
5949 (remote_static_tracepoint_marker_at)
5950 (remote_static_tracepoint_markers_by_strid)
5951 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
5952 (remote_open): Refactor as methods of remote_target.
5953 (extended_remote_open, extended_remote_detach)
5954 (extended_remote_attach, extended_remote_post_attach):
5955 (extended_remote_supports_disable_randomization)
5956 (extended_remote_create_inferior): : Refactor as method of
5957 extended_remote_target.
5958 (remote_set_permissions, remote_open_1, remote_detach)
5959 (remote_follow_fork, remote_follow_exec, remote_disconnect)
5960 (remote_resume, remote_commit_resume, remote_stop)
5961 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
5962 (remote_terminal_ours, remote_wait, remote_fetch_registers)
5963 (remote_prepare_to_store, remote_store_registers)
5964 (remote_flash_erase, remote_flash_done, remote_files_info)
5965 (remote_kill, remote_mourn, remote_insert_breakpoint)
5966 (remote_remove_breakpoint, remote_insert_watchpoint)
5967 (remote_watchpoint_addr_within_range)
5968 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
5969 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
5970 (remote_supports_stopped_by_sw_breakpoint)
5971 (remote_stopped_by_hw_breakpoint)
5972 (remote_supports_stopped_by_hw_breakpoint)
5973 (remote_stopped_by_watchpoint, remote_stopped_data_address)
5974 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
5975 (remote_verify_memory): Refactor as methods of remote_target.
5976 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
5977 parameter.
5978 (remote_xfer_partial, remote_get_memory_xfer_limit)
5979 (remote_search_memory, remote_rcmd, remote_memory_map)
5980 (remote_pid_to_str, remote_get_thread_local_address)
5981 (remote_get_tib_address, remote_read_description): Refactor as
5982 methods of remote_target.
5983 (remote_target::fileio_open, remote_target::fileio_pwrite)
5984 (remote_target::fileio_pread, remote_target::fileio_close): New.
5985 (remote_hostio_readlink, remote_hostio_fstat)
5986 (remote_filesystem_is_local, remote_can_execute_reverse)
5987 (remote_supports_non_stop, remote_supports_disable_randomization)
5988 (remote_supports_multi_process, remote_supports_cond_breakpoints)
5989 (remote_supports_enable_disable_tracepoint)
5990 (remote_supports_string_tracing)
5991 (remote_can_run_breakpoint_commands, remote_trace_init)
5992 (remote_download_tracepoint, remote_can_download_tracepoint)
5993 (remote_download_trace_state_variable, remote_enable_tracepoint)
5994 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
5995 (remote_trace_start, remote_get_trace_status)
5996 (remote_get_tracepoint_status, remote_trace_stop)
5997 (remote_trace_find, remote_get_trace_state_variable_value)
5998 (remote_save_trace_data, remote_get_raw_trace_data)
5999 (remote_set_disconnected_tracing, remote_core_of_thread)
6000 (remote_set_circular_trace_buffer, remote_traceframe_info)
6001 (remote_get_min_fast_tracepoint_insn_len)
6002 (remote_set_trace_buffer_size, remote_set_trace_notes)
6003 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6004 (remote_disable_btrace, remote_teardown_btrace)
6005 (remote_read_btrace, remote_btrace_conf)
6006 (remote_augmented_libraries_svr4_read, remote_load)
6007 (remote_pid_to_exec_file, remote_can_do_single_step)
6008 (remote_execution_direction, remote_thread_handle_to_thread_info):
6009 Refactor as methods of remote_target.
6010 (init_remote_ops, init_extended_remote_ops): Delete.
6011 (remote_can_async_p, remote_is_async_p, remote_async)
6012 (remote_thread_events, remote_upload_tracepoints)
6013 (remote_upload_trace_state_variables): Refactor as methods of
6014 remote_target.
6015 (_initialize_remote): Remove references to init_remote_ops and
6016 init_extended_remote_ops.
6017
6018 * remote-sim.c (gdbsim_target): New class.
6019 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6020 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6021 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6022 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6023 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6024 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6025 Refactor as methods of gdbsim_target.
6026 (gdbsim_ops): Now a gdbsim_target.
6027 (init_gdbsim_ops): Delete.
6028 (gdbsim_cntrl_c): Adjust.
6029 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6030
6031 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6032 (the_amd64_linux_nat_target): New.
6033 (amd64_linux_fetch_inferior_registers)
6034 (amd64_linux_store_inferior_registers): Refactor as methods of
6035 amd64_linux_nat_target.
6036 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6037 * i386-linux-nat.c: Don't include "linux-nat.h".
6038 (i386_linux_nat_target): New class.
6039 (the_i386_linux_nat_target): New.
6040 (i386_linux_fetch_inferior_registers)
6041 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6042 as methods of i386_linux_nat_target.
6043 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6044 * inf-child.c (inf_child_ops): Delete.
6045 (inf_child_fetch_inferior_registers)
6046 (inf_child_store_inferior_registers): Delete.
6047 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6048 methods of inf_child_target.
6049 (inf_child_target::supports_terminal_ours)
6050 (inf_child_target::terminal_init)
6051 (inf_child_target::terminal_inferior)
6052 (inf_child_target::terminal_ours_for_output)
6053 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6054 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6055 New.
6056 (inf_child_open, inf_child_disconnect, inf_child_close)
6057 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6058 (inf_child_post_startup_inferior, inf_child_can_run)
6059 (inf_child_pid_to_exec_file): Refactor as methods of
6060 inf_child_target.
6061 (inf_child_follow_fork): Delete.
6062 (inf_child_target::can_create_inferior)
6063 (inf_child_target::can_attach): New.
6064 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6065 (inf_child_target::has_stack, inf_child_target::has_registers)
6066 (inf_child_target::has_execution): New.
6067 (inf_child_fileio_open, inf_child_fileio_pwrite)
6068 (inf_child_fileio_pread, inf_child_fileio_fstat)
6069 (inf_child_fileio_close, inf_child_fileio_unlink)
6070 (inf_child_fileio_readlink, inf_child_use_agent)
6071 (inf_child_can_use_agent): Refactor as methods of
6072 inf_child_target.
6073 (return_zero, inf_child_target): Delete.
6074 (inf_child_target::inf_child_target): New.
6075 * inf-child.h: Include "target.h".
6076 (inf_child_target): Delete function prototype.
6077 (inf_child_target): New class.
6078 (inf_child_open_target, inf_child_mourn_inferior)
6079 (inf_child_maybe_unpush_target): Delete.
6080 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6081 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6082 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6083 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6084 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6085 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6086 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6087 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6088 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6089 methods of inf_ptrace_target.
6090 (inf_ptrace_target): Delete function.
6091 * inf-ptrace.h: Include "inf-child.h".
6092 (inf_ptrace_target): Delete function declaration.
6093 (inf_ptrace_target): New class.
6094 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6095 * linux-nat.c (linux_target): New.
6096 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6097 (linux_nat_target::~linux_nat_target): New.
6098 (linux_child_post_attach, linux_child_post_startup_inferior)
6099 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6100 (linux_child_remove_fork_catchpoint)
6101 (linux_child_insert_vfork_catchpoint)
6102 (linux_child_remove_vfork_catchpoint)
6103 (linux_child_insert_exec_catchpoint)
6104 (linux_child_remove_exec_catchpoint)
6105 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6106 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6107 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6108 (linux_nat_stopped_data_address)
6109 (linux_nat_stopped_by_sw_breakpoint)
6110 (linux_nat_supports_stopped_by_sw_breakpoint)
6111 (linux_nat_stopped_by_hw_breakpoint)
6112 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6113 (linux_nat_kill, linux_nat_mourn_inferior)
6114 (linux_nat_xfer_partial, linux_nat_thread_alive)
6115 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6116 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6117 (linux_child_static_tracepoint_markers_by_strid)
6118 (linux_nat_is_async_p, linux_nat_can_async_p)
6119 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6120 (linux_nat_supports_multi_process)
6121 (linux_nat_supports_disable_randomization, linux_nat_async)
6122 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6123 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6124 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6125 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6126 methods of linux_nat_target.
6127 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6128 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6129 parameter.
6130 (check_stopped_by_watchpoint): Adjust.
6131 (linux_xfer_partial): Delete.
6132 (linux_target_install_ops, linux_target, linux_nat_add_target):
6133 Delete.
6134 (linux_nat_target::linux_nat_target): New.
6135 * linux-nat.h: Include "inf-ptrace.h".
6136 (linux_nat_target): New.
6137 (linux_target, linux_target_install_ops, linux_nat_add_target):
6138 Delete function declarations.
6139 (linux_target): Declare global.
6140 * linux-thread-db.c (thread_db_target): New.
6141 (thread_db_target::thread_db_target): New.
6142 (thread_db_ops): Delete.
6143 (the_thread_db_target): New.
6144 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6145 (thread_db_update_thread_list, thread_db_pid_to_str)
6146 (thread_db_extra_thread_info)
6147 (thread_db_thread_handle_to_thread_info)
6148 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6149 (thread_db_resume): Refactor as methods of thread_db_target.
6150 (init_thread_db_ops): Delete.
6151 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6152 * x86-linux-nat.c: Don't include "linux-nat.h".
6153 (super_post_startup_inferior): Delete.
6154 (x86_linux_nat_target::~x86_linux_nat_target): New.
6155 (x86_linux_child_post_startup_inferior)
6156 (x86_linux_read_description, x86_linux_enable_btrace)
6157 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6158 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6159 methods of x86_linux_nat_target.
6160 (x86_linux_create_target): Delete. Bits folded ...
6161 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6162 pointer.
6163 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6164 (x86_linux_nat_target): New class.
6165 (x86_linux_create_target): Delete.
6166 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6167 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6168 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6169 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6170 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6171 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6172 make extern.
6173 (x86_use_watchpoints): Delete.
6174 * x86-nat.h: Include "breakpoint.h" and "target.h".
6175 (x86_use_watchpoints): Delete.
6176 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6177 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6178 (x86_insert_watchpoint, x86_remove_watchpoint)
6179 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6180 (x86_stopped_by_hw_breakpoint): New declarations.
6181 (x86_nat_target): New template class.
6182
6183 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6184 (the_ppc_linux_nat_target): New.
6185 (ppc_linux_fetch_inferior_registers)
6186 (ppc_linux_can_use_hw_breakpoint)
6187 (ppc_linux_region_ok_for_hw_watchpoint)
6188 (ppc_linux_ranged_break_num_registers)
6189 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6190 (ppc_linux_insert_mask_watchpoint)
6191 (ppc_linux_remove_mask_watchpoint)
6192 (ppc_linux_can_accel_watchpoint_condition)
6193 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6194 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6195 (ppc_linux_watchpoint_addr_within_range)
6196 (ppc_linux_masked_watch_num_registers)
6197 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6198 (ppc_linux_read_description): Refactor as methods of
6199 ppc_linux_nat_target.
6200 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6201
6202 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6203 (procfs_target): New class.
6204 (the_procfs_target): New.
6205 (procfs_target): Delete function.
6206 (procfs_auxv_parse, procfs_attach, procfs_detach)
6207 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6208 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6209 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6210 (procfs_create_inferior, procfs_update_thread_list)
6211 (procfs_thread_alive, procfs_pid_to_str)
6212 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6213 (procfs_stopped_data_address, procfs_insert_watchpoint)
6214 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6215 (proc_find_memory_regions, procfs_info_proc)
6216 (procfs_make_note_section): Refactor as methods of procfs_target.
6217 (_initialize_procfs): Adjust.
6218 * sol-thread.c (sol_thread_target): New class.
6219 (sol_thread_ops): Now a sol_thread_target.
6220 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6221 (sol_thread_fetch_registers, sol_thread_store_registers)
6222 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6223 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6224 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6225 (init_sol_thread_ops): Delete.
6226 (_initialize_sol_thread): Adjust. Remove references to
6227 init_sol_thread_ops and complete_target_initialization.
6228
6229 * windows-nat.c (windows_nat_target): New class.
6230 (windows_fetch_inferior_registers)
6231 (windows_store_inferior_registers, windows_resume, windows_wait)
6232 (windows_attach, windows_detach, windows_pid_to_exec_file)
6233 (windows_files_info, windows_create_inferior)
6234 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6235 (windows_close, windows_pid_to_str, windows_xfer_partial)
6236 (windows_get_tib_address, windows_get_ada_task_ptid)
6237 (windows_thread_name, windows_thread_alive): Refactor as
6238 windows_nat_target methods.
6239 (do_initial_windows_stuff): Adjust.
6240 (windows_target): Delete function.
6241 (_initialize_windows_nat): Adjust.
6242
6243 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6244 (darwin_mourn_inferior, darwin_kill_inferior)
6245 (darwin_create_inferior, darwin_attach, darwin_detach)
6246 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6247 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6248 (darwin_supports_multi_process): Refactor as darwin_nat_target
6249 methods.
6250 (darwin_resume_to, darwin_files_info): Delete.
6251 (_initialize_darwin_inferior): Rename to ...
6252 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6253 * darwin-nat.h: Include "inf-child.h".
6254 (darwin_nat_target): New class.
6255 (darwin_complete_target): Delete.
6256 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6257 (darwin_target): New.
6258 (i386_darwin_fetch_inferior_registers)
6259 (i386_darwin_store_inferior_registers): Refactor as methods of
6260 darwin_nat_target.
6261 (darwin_complete_target): Delete, with ...
6262 (_initialize_i386_darwin_nat): ... bits factored out here.
6263
6264 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6265 (the_alpha_linux_nat_target): New.
6266 (alpha_linux_register_u_offset): Refactor as
6267 alpha_linux_nat_target method.
6268 (_initialize_alpha_linux_nat): Adjust.
6269 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6270 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6271 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6272 methods of linux_nat_trad_target.
6273 (linux_trad_target): Delete.
6274 * linux-nat-trad.h (linux_trad_target): Delete function.
6275 (linux_nat_trad_target): New class.
6276 * mips-linux-nat.c (mips_linux_nat_target): New class.
6277 (super_fetch_registers, super_store_registers, super_close):
6278 Delete.
6279 (the_mips_linux_nat_target): New.
6280 (mips64_linux_regsets_fetch_registers)
6281 (mips64_linux_regsets_store_registers)
6282 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6283 (mips_linux_register_u_offset, mips_linux_read_description)
6284 (mips_linux_can_use_hw_breakpoint)
6285 (mips_linux_stopped_by_watchpoint)
6286 (mips_linux_stopped_data_address)
6287 (mips_linux_region_ok_for_hw_watchpoint)
6288 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6289 (mips_linux_close): Refactor as methods of mips_linux_nat.
6290 (_initialize_mips_linux_nat): Adjust to C++ification.
6291
6292 * aix-thread.c (aix_thread_target): New class.
6293 (aix_thread_ops): Now an aix_thread_target.
6294 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6295 (aix_thread_fetch_registers, aix_thread_store_registers)
6296 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6297 (aix_thread_thread_alive, aix_thread_pid_to_str)
6298 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6299 Refactor as methods of aix_thread_target.
6300 (init_aix_thread_ops): Delete.
6301 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6302 and complete_target_initialization.
6303 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6304 (rs6000_nat_target): New class.
6305 (the_rs6000_nat_target): New.
6306 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6307 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6308 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6309 (super_create_inferior): Delete.
6310 (_initialize_rs6000_nat): Adjust to C++ification.
6311
6312 * arm-linux-nat.c (arm_linux_nat_target): New class.
6313 (the_arm_linux_nat_target): New.
6314 (arm_linux_fetch_inferior_registers)
6315 (arm_linux_store_inferior_registers, arm_linux_read_description)
6316 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6317 (arm_linux_remove_hw_breakpoint)
6318 (arm_linux_region_ok_for_hw_watchpoint)
6319 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6320 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6321 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6322 arm_linux_nat_target.
6323 (_initialize_arm_linux_nat): Adjust to C++ification.
6324
6325 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6326 (the_aarch64_linux_nat_target): New.
6327 (aarch64_linux_fetch_inferior_registers)
6328 (aarch64_linux_store_inferior_registers)
6329 (aarch64_linux_child_post_startup_inferior)
6330 (aarch64_linux_read_description)
6331 (aarch64_linux_can_use_hw_breakpoint)
6332 (aarch64_linux_insert_hw_breakpoint)
6333 (aarch64_linux_remove_hw_breakpoint)
6334 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6335 (aarch64_linux_region_ok_for_hw_watchpoint)
6336 (aarch64_linux_stopped_data_address)
6337 (aarch64_linux_stopped_by_watchpoint)
6338 (aarch64_linux_watchpoint_addr_within_range)
6339 (aarch64_linux_can_do_single_step): Refactor as methods of
6340 aarch64_linux_nat_target.
6341 (super_post_startup_inferior): Delete.
6342 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6343
6344 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6345 (the_hppa_linux_nat_target): New.
6346 (hppa_linux_fetch_inferior_registers)
6347 (hppa_linux_store_inferior_registers): Refactor as methods of
6348 hppa_linux_nat_target.
6349 (_initialize_hppa_linux_nat): Adjust to C++ification.
6350
6351 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6352 (the_ia64_linux_nat_target): New.
6353 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6354 (ia64_linux_stopped_data_address)
6355 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6356 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6357 ia64_linux_nat_target methods.
6358 (super_xfer_partial): Delete.
6359 (_initialize_ia64_linux_nat): Adjust to C++ification.
6360
6361 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6362 (the_m32r_linux_nat_target): New.
6363 (m32r_linux_fetch_inferior_registers)
6364 (m32r_linux_store_inferior_registers): Refactor as
6365 m32r_linux_nat_target methods.
6366 (_initialize_m32r_linux_nat): Adjust to C++ification.
6367
6368 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6369 (the_m68k_linux_nat_target): New.
6370 (m68k_linux_fetch_inferior_registers)
6371 (m68k_linux_store_inferior_registers): Refactor as
6372 m68k_linux_nat_target methods.
6373 (_initialize_m68k_linux_nat): Adjust to C++ification.
6374
6375 * s390-linux-nat.c (s390_linux_nat_target): New class.
6376 (the_s390_linux_nat_target): New.
6377 (s390_linux_fetch_inferior_registers)
6378 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6379 (s390_insert_watchpoint, s390_remove_watchpoint)
6380 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6381 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6382 (s390_auxv_parse, s390_read_description): Refactor as methods of
6383 s390_linux_nat_target.
6384 (_initialize_s390_nat): Adjust to C++ification.
6385
6386 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6387 (the_sparc_linux_nat_target): New.
6388 (_initialize_sparc_linux_nat): Adjust to C++ification.
6389 * sparc-nat.c (sparc_fetch_inferior_registers)
6390 (sparc_store_inferior_registers): Remove target_ops parameter.
6391 * sparc-nat.h (sparc_fetch_inferior_registers)
6392 (sparc_store_inferior_registers): Remove target_ops parameter.
6393 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6394 (the_sparc64_linux_nat_target): New.
6395 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6396
6397 * spu-linux-nat.c (spu_linux_nat_target): New class.
6398 (the_spu_linux_nat_target): New.
6399 (spu_child_post_startup_inferior, spu_child_post_attach)
6400 (spu_child_wait, spu_fetch_inferior_registers)
6401 (spu_store_inferior_registers, spu_xfer_partial)
6402 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6403 methods.
6404 (_initialize_spu_nat): Adjust to C++ification.
6405
6406 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6407 (the_tilegx_linux_nat_target): New.
6408 (fetch_inferior_registers, store_inferior_registers):
6409 Refactor as methods.
6410 (_initialize_tile_linux_nat): Adjust to C++ification.
6411
6412 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6413 (the_xtensa_linux_nat_target): New.
6414 (xtensa_linux_fetch_inferior_registers)
6415 (xtensa_linux_store_inferior_registers): Refactor as
6416 xtensa_linux_nat_target methods.
6417 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6418
6419 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6420 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6421 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6422 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6423 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6424 (fbsd_stopped_by_sw_breakpoint)
6425 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6426 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6427 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6428 (fbsd_post_startup_inferior, fbsd_post_attach)
6429 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6430 (fbsd_set_syscall_catchpoint)
6431 (super_xfer_partial, super_resume, super_wait)
6432 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6433 (fbsd_handle_debug_trap): Remove target_ops parameter.
6434 (fbsd_nat_add_target): Delete.
6435 * fbsd-nat.h: Include "inf-ptrace.h".
6436 (fbsd_nat_add_target): Delete.
6437 (USE_SIGTRAP_SIGINFO): Define.
6438 (fbsd_nat_target): New class.
6439
6440 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6441 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6442 (amd64bsd_target): Delete.
6443 * amd64-bsd-nat.h: New file.
6444 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6445 "x86-bsd-nat.h".
6446 (amd64_fbsd_nat_target): New class.
6447 (the_amd64_fbsd_nat_target): New.
6448 (amd64fbsd_read_description): Refactor as method of
6449 amd64_fbsd_nat_target.
6450 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6451 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6452 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6453 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6454 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6455 (i386bsd_target): Delete.
6456 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6457 (i386bsd_fetch_inferior_registers)
6458 (i386bsd_store_inferior_registers): Declare.
6459 (i386_bsd_nat_target): New class.
6460 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6461 (the_i386_fbsd_nat_target): New.
6462 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6463 i386_fbsd_nat_target methods.
6464 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6465 (_initialize_i386fbsd_nat): Adjust to C++ification.
6466 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6467 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6468 (_initialize_x86_bsd_nat): Adjust to C++ification.
6469 * x86-bsd-nat.h: Include "x86-nat.h".
6470 (x86bsd_target): Delete declaration.
6471 (x86bsd_nat_target): New class.
6472
6473 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6474 (the_aarch64_fbsd_nat_target): New.
6475 (aarch64_fbsd_fetch_inferior_registers)
6476 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6477 aarch64_fbsd_nat_target.
6478 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6479 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6480 (the_alpha_bsd_nat_target): New.
6481 (alphabsd_fetch_inferior_registers)
6482 (alphabsd_store_inferior_registers): Refactor as
6483 alpha_bsd_nat_target methods.
6484 (_initialize_alphabsd_nat): Refactor as methods of
6485 alpha_bsd_nat_target.
6486 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6487 (the_amd64_nbsd_nat_target): New.
6488 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6489 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6490 (the_amd64_obsd_nat_target): New.
6491 (_initialize_amd64obsd_nat): Adjust to C++ification.
6492 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6493 (the_arm_fbsd_nat_target): New.
6494 (arm_fbsd_fetch_inferior_registers)
6495 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6496 (_initialize_arm_fbsd_nat): Refactor as methods of
6497 arm_fbsd_nat_target.
6498 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6499 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6500 (the_arm_netbsd_nat_target): New.
6501 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6502 arm_netbsd_nat_target.
6503 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6504 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6505 (the_hppa_nbsd_nat_target): New.
6506 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6507 hppa_nbsd_nat_target methods.
6508 (_initialize_hppanbsd_nat): Adjust to C++ification.
6509 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6510 (the_hppa_obsd_nat_target): New.
6511 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6512 methods of hppa_obsd_nat_target.
6513 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6514 add_target.
6515 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6516 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6517 add_target.
6518 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6519 (_initialize_i386obsd_nat): Use add_target.
6520 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6521 (the_m68k_bsd_nat_target): New.
6522 (m68kbsd_fetch_inferior_registers)
6523 (m68kbsd_store_inferior_registers): Refactor as methods of
6524 m68k_bsd_nat_target.
6525 (_initialize_m68kbsd_nat): Adjust to C++ification.
6526 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6527 (the_mips_fbsd_nat_target): New.
6528 (mips_fbsd_fetch_inferior_registers)
6529 (mips_fbsd_store_inferior_registers): Refactor as methods of
6530 mips_fbsd_nat_target.
6531 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6532 add_target.
6533 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6534 (the_mips_nbsd_nat_target): New.
6535 (mipsnbsd_fetch_inferior_registers)
6536 (mipsnbsd_store_inferior_registers): Refactor as methods of
6537 mips_nbsd_nat_target.
6538 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6539 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6540 (the_mips64_obsd_nat_target): New.
6541 (mips64obsd_fetch_inferior_registers)
6542 (mips64obsd_store_inferior_registers): Refactor as methods of
6543 mips64_obsd_nat_target.
6544 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6545 add_target.
6546 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6547 nbsd_nat_target.
6548 * nbsd-nat.h: Include "inf-ptrace.h".
6549 (nbsd_nat_target): New class.
6550 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6551 (obsd_wait): Refactor as methods of obsd_nat_target.
6552 (obsd_add_target): Delete.
6553 * obsd-nat.h: Include "inf-ptrace.h".
6554 (obsd_nat_target): New class.
6555 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6556 (the_ppc_fbsd_nat_target): New.
6557 (ppcfbsd_fetch_inferior_registers)
6558 (ppcfbsd_store_inferior_registers): Refactor as methods of
6559 ppc_fbsd_nat_target.
6560 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6561 add_target.
6562 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6563 (the_ppc_nbsd_nat_target): New.
6564 (ppcnbsd_fetch_inferior_registers)
6565 (ppcnbsd_store_inferior_registers): Refactor as methods of
6566 ppc_nbsd_nat_target.
6567 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6568 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6569 (the_ppc_obsd_nat_target): New.
6570 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6571 methods of ppc_obsd_nat_target.
6572 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6573 add_target.
6574 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6575 (the_sh_nbsd_nat_target): New.
6576 (shnbsd_fetch_inferior_registers)
6577 (shnbsd_store_inferior_registers): Refactor as methods of
6578 sh_nbsd_nat_target.
6579 (_initialize_shnbsd_nat): Adjust to C++ification.
6580 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6581 (inf_ptrace_xfer_partial): Delete.
6582 (sparc_xfer_partial, sparc_target): Delete.
6583 * sparc-nat.h (sparc_fetch_inferior_registers)
6584 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6585 (sparc_target): Delete function declaration.
6586 (sparc_target): New template class.
6587 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6588 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6589 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6590 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6591 add_target.
6592 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6593 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6594 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6595 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6596 add_target.
6597 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6598 (the_vax_bsd_nat_target): New.
6599 (vaxbsd_fetch_inferior_registers)
6600 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6601 methods.
6602 (_initialize_vaxbsd_nat): Adjust to C++ification.
6603
6604 * bsd-kvm.c (bsd_kvm_target): New class.
6605 (bsd_kvm_ops): Now a bsd_kvm_target.
6606 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6607 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6608 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6609 bsd_kvm_target.
6610 (bsd_kvm_return_one): Delete.
6611 (bsd_kvm_add_target): Adjust to C++ification.
6612
6613 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6614 (nto_procfs_target_procfs): New classes.
6615 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6616 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6617 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6618 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6619 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6620 (procfs_remove_hw_breakpoint, procfs_resume)
6621 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6622 (procfs_kill_inferior, procfs_store_registers)
6623 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6624 as methods of nto_procfs_target.
6625 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6626 (nto_native_ops): Delete.
6627 (procfs_open, procfs_native_open): Delete.
6628 (nto_native_ops): Now an nto_procfs_target_native.
6629 (init_procfs_targets): Adjust to C++ification.
6630 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6631 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6632 Refactor as methods of nto_procfs_target.
6633
6634 * go32-nat.c (go32_nat_target): New class.
6635 (the_go32_nat_target): New.
6636 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6637 (go32_store_registers, go32_xfer_partial, go32_files_info)
6638 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6639 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6640 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6641 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6642 (go32_target): Delete.
6643 (_initialize_go32_nat): Adjust to C++ification.
6644
6645 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6646 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6647 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6648 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6649 gnu_nat_target.
6650 (gnu_target): Delete.
6651 * gnu-nat.h (gnu_target): Delete.
6652 (gnu_nat_target): New class.
6653 * i386-gnu-nat.c (gnu_base_target): New.
6654 (i386_gnu_nat_target): New class.
6655 (the_i386_gnu_nat_target): New.
6656 (_initialize_i386gnu_nat): Adjust to C++ification.
6657
3fffc070
PA
66582018-05-02 Pedro Alves <palves@redhat.com>
6659
6660 * bfd-target.c (target_bfd_xclose): Rename to ...
6661 (target_bfd_close): ... this.
6662 (target_bfd_reopen): Adjust.
6663 * target.c (target_close): Remove references to to_xclose.
6664 * target.h (target_ops::to_xclose): Delete.
6665 (target_ops::to_close): Update comments.
6666
6798487f
PA
66672018-05-02 Pedro Alves <palves@redhat.com>
6668
6669 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6670 "linux-nat.h".
6671 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6672 * inf-ptrace.c (inf_ptrace_register_u_offset)
6673 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6674 (inf_ptrace_store_register, inf_ptrace_store_registers)
6675 (inf_ptrace_trad_target): Move to ...
6676 * linux-nat-trad.c: ... this new file.
6677 * linux-nat-trad.h: New file.
6678 * linux-nat.c (linux_target_install_ops): Make extern.
6679 (linux_trad_target): Delete.
6680 * linux-nat.h (linux_trad_target): Delete declaration.
6681 (linux_target_install_ops): Declare.
6682 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6683 "linux-nat.h".
6684
c1955e17
PA
66852018-05-02 Pedro Alves <palves@redhat.com>
6686
6687 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6688 procfs_target/add_target here.
6689 * procfs.c (procfs_target): Make static.
6690 (_initialize_procfs): Call add_target here.
6691 * procfs.h (struct target_ops): Remove forward declaration.
6692 (procfs_target): Remove declaration.
6693 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6694
b5c8fcb1
PA
66952018-05-02 Pedro Alves <palves@redhat.com>
6696
6697 * procfs.c (procfs_stopped_by_watchpoint)
6698 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6699 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6700 Forward declare.
6701 (procfs_use_watchpoints): Delete, move contents...
6702 (procfs_target): ... here.
6703 * procfs.h (procfs_use_watchpoints): Delete declaration.
6704 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6705 procfs_use_watchpoints.
6706 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6707 procfs_use_watchpoints.
6708
0489430a
TT
67092018-05-02 Tom Tromey <tom@tromey.com>
6710
6711 PR python/20084:
6712 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6713 and var_zuinteger_unlimited.
6714 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6715 and PARAM_ZUINTEGER_UNLIMITED.
6716 (set_parameter_value): Handle var_zuinteger and
6717 var_zuinteger_unlimited.
6718 (add_setshow_generic): Likewise.
6719 (parmpy_init): Likewise.
6720
1632f8ba
DR
67212018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6722
6723 PR rust/23124
6724 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6725 pointer is not null before dereferencing it.
6726
76761936
TT
67272018-04-30 Tom Tromey <tom@tromey.com>
6728
6729 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6730 is_mi_like_p.
6731
2d33446d
TT
67322018-04-30 Tom Tromey <tom@tromey.com>
6733
6734 * breakpoint.c (mention): Remove use of is_mi_like_p.
6735 (print_mention_ranged_breakpoint): Likewise.
6736 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6737 of is_mi_like_p.
6738
f3c6abab
TT
67392018-04-30 Tom Tromey <tom@tromey.com>
6740
6741 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6742
40c03530
TT
67432018-04-30 Tom Tromey <tom@tromey.com>
6744
6745 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6746 (info_spu_event_command): Remove some uses of is_mi_like_p.
6747
2038b7fd
TT
67482018-04-30 Tom Tromey <tom@tromey.com>
6749
6750 * python/py-framefilter.c (py_print_single_arg)
6751 (enumerate_locals, py_print_args, py_print_frame): Remove some
6752 uses of is_mi_like_p.
6753
4904c3c6
TT
67542018-04-30 Tom Tromey <tom@tromey.com>
6755
6756 * ui-out.c: Update.
6757 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6758 * ui-out.h (ui_out::is_mi_like_p): Now const.
6759 (ui_out::do_is_mi_like_p): Now const.
6760 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6761
7c66fffc
TT
67622018-04-30 Tom Tromey <tom@tromey.com>
6763
6764 * varobj.c (varobj_set_visualizer): Use new_reference.
6765 * python/python.c (gdbpy_decode_line): Use new_reference.
6766 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6767 new_reference.
6768
bbfa6f00
TT
67692018-04-30 Tom Tromey <tom@tromey.com>
6770
6771 * varobj.c (install_new_value): Use new_reference.
6772 * value.h (value_incref): Return void. Swap intro comment with
6773 value_decref.
6774 * value.c (set_value_parent): Use new_reference.
6775 (value_incref): Return void. Update intro comment.
6776 (release_value): Use new_reference.
6777 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6778
1831a9f9
TT
67792018-04-30 Tom Tromey <tom@tromey.com>
6780
6781 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6782 * gdb_bfd.h (new_bfd_ref): Remove.
6783 (gdb_bfd_open): Update comment.
6784 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6785 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6786 (gdb_bfd_fdopenr): Use new_reference.
6787 * exec.c (exec_file_attach): Use new_reference.
6788
7c1b5f3d
TT
67892018-04-30 Tom Tromey <tom@tromey.com>
6790
6791 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
6792 method.
6793
e11fb955
TT
67942018-04-30 Tom Tromey <tom@tromey.com>
6795
6796 * jit.c (jit_read_code_entry): Use type_align.
6797 * i386-tdep.c (i386_gdbarch_init): Don't call
6798 set_gdbarch_long_long_align_bit.
6799 * gdbarch.sh: Remove long_long_align_bit.
6800 * gdbarch.c, gdbarch.h: Rebuild.
6801 * arc-tdep.c (arc_type_align): New function.
6802 (arc_gdbarch_init): Use arc_type_align. Don't call
6803 set_gdbarch_long_long_align_bit.
6804
2fff16dd
TT
68052018-04-30 Tom Tromey <tom@tromey.com>
6806
6807 * rust-lang.c (rust_type_alignment): Remove.
6808 (rust_composite_type): Use type_align.
6809
6d7bb824
TT
68102018-04-30 Tom Tromey <tom@tromey.com>
6811
6812 * NEWS: Mention Type.align.
6813 * python/py-type.c (typy_get_alignof): New function.
6814 (type_object_getset): Add "alignof".
6815
007e1530
TT
68162018-04-30 Tom Tromey <tom@tromey.com>
6817
6818 PR exp/17095:
6819 * NEWS: Update.
6820 * std-operator.def (UNOP_ALIGNOF): New operator.
6821 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
6822 New.
6823 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
6824 * c-lang.c (c_op_print_tab): Add alignof.
6825 * c-exp.y (ALIGNOF): New token.
6826 (exp): Add "ALIGNOF" production.
6827 (ident_tokens): Add _Alignof and alignof.
6828
2b4424c3
TT
68292018-04-30 Tom Tromey <tom@tromey.com>
6830
6831 * i386-tdep.c (i386_type_align): New function.
6832 (i386_gdbarch_init): Update.
6833 * gdbarch.sh (type_align): New method.
6834 * gdbarch.c, gdbarch.h: Rebuild.
6835 * arch-utils.h (default_type_align): Declare.
6836 * arch-utils.c (default_type_align): New function.
6837 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
6838 (struct type) <align_log2>: New field.
6839 <instance_flags>: Now a bitfield.
6840 (TYPE_RAW_ALIGN): New macro.
6841 (type_align, type_raw_align, set_type_align): Declare.
6842 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
6843 functions.
6844 * dwarf2read.c (quirk_rust_enum): Set type alignment.
6845 (get_alignment, maybe_set_alignment): New functions.
6846 (read_structure_type, read_enumeration_type, read_array_type)
6847 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
6848 (read_subrange_type, read_base_type): Set type alignment.
6849
d33bc52e
SM
68502018-04-30 Simon Marchi <simon.marchi@ericsson.com>
6851
6852 * dwarf2read.c (read_index_from_section): Use bool.
6853
e28b63a9
FG
68542018-04-29 Fabian Groffen <grobian@gentoo.org>
6855
6856 PR gdb/22950
6857 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
6858 with #ifdef.
6859
cd8c76e4
JR
68602018-04-29 John Reiser <jreiser@BitWagon.com>
6861
6862 PR build/22873
6863 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
6864 last step, and do it atomically.
6865
476d250e
AO
68662018-04-27 Alexandre Oliva <aoliva@redhat.com>
6867
6868 * compile/compile-c-types.c (convert_int, convert_float):
6869 Update for C FE v1.
6870
6873858b
TT
68712018-04-27 Tom Tromey <tom@tromey.com>
6872
6873 PR rust/22545:
6874 * rust-lang.c (rust_inclusive_range_type_p): New function.
6875 (rust_range): Handle inclusive ranges.
6876 (rust_compute_range): Likewise.
6877 * rust-exp.y (struct rust_op) <inclusive>: New field.
6878 (DOTDOTEQ): New constant.
6879 (range_expr): Add "..=" productions.
6880 (operator_tokens): Add "..=" token.
6881 (ast_range): Add "inclusive" parameter.
6882 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
6883 ranges.
6884 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
6885 bounds values.
6886 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
6887 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
6888 Update comments.
6889 * expprint.c (print_subexp_standard): Handle new bounds values.
6890 (dump_subexp_body_standard): Likewise.
6891
632e107b
TT
68922018-04-27 Tom Tromey <tom@tromey.com>
6893
6894 * configure: Rebuild.
6895 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
6896 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
6897 "OVERRIDE".
6898 (class symbol_needs_eval_context): Likewise.
6899 * dwarf2read.c (mock_mapped_index::symbol_name_count)
6900 (mock_mapped_index::symbol_name_at): Use "override". Remove
6901 "virtual".
6902 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
6903 "override".
6904 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
6905 * aarch64-tdep.c (instruction_reader::read): Use "override".
6906 (instruction_reader_test::read): Likewise.
6907 * arm-tdep.c (instruction_reader::read): Use "override".
6908 (instruction_reader_thumb::read): Likewise.
6909
b75abf5b
AK
69102018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
6911
6912 PR remote/9665
6913 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
6914 instead of remote_send.
6915 (remote_send): Remove.
6916
79188d8d
PA
69172018-04-26 Pedro Alves <palves@redhat.com>
6918
6919 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
6920 find_function_start_sal instead of find_pc_line.
6921
f50776aa
PA
69222018-04-26 Pedro Alves <palves@redhat.com>
6923
6924 * breakpoint.c (set_breakpoint_location_function): Handle
6925 mst_data_gnu_ifunc.
6926 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
6927 * elfread.c (elf_symtab_read): Give data symbols with
6928 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
6929 (elf_rel_plt_read): Update comment.
6930 * linespec.c (convert_linespec_to_sals): Handle
6931 mst_data_gnu_ifunc.
6932 (minsym_found): Handle mst_data_gnu_ifunc.
6933 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
6934 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
6935 * parse.c (find_minsym_type_and_address): Handle
6936 mst_data_gnu_ifunc.
6937 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
6938 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
6939 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
6940 comment.
6941 <mst_data_gnu_ifunc>: New enumerator.
6942
20944a6e
PA
69432018-04-26 Pedro Alves <palves@redhat.com>
6944
6945 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
6946 (lookup_minimal_symbol_by_pc_section): ... this. Replace
6947 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6948 Handle it.
6949 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
6950 (lookup_minimal_symbol_by_pc): Adjust.
6951 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
6952 (lookup_solib_trampoline_symbol_by_pc): Adjust.
6953 * minsyms.h (lookup_msym_prefer): New enum.
6954 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
6955 parameter by a lookup_msym_prefer parameter.
6956
1adeb822
PA
69572018-04-26 Pedro Alves <palves@redhat.com>
6958
6959 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
6960 ends in "@plt" instead of looking at the symbol's section.
6961
a0aca7b0
PA
69622018-04-26 Pedro Alves <palves@redhat.com>
6963
6964 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
6965 all references.
6966 (find_pc_partial_function_gnu_ifunc): Rename to ...
6967 (find_pc_partial_function): ... this, and remove references to
6968 'is_gnu_ifunc_p'.
6969 (find_pc_partial_function): Delete old implementation.
6970 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
6971
76af0f26
PA
69722018-04-26 Pedro Alves <palves@redhat.com>
6973
6974 * linespec.c (struct bound_minimal_symbol_search_key): New.
6975 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
6976 skip first line if we found a GNU ifunc minimal symbol by name.
6977 (compare_msymbols): Change parameters to work with a destructured
6978 lhs minsym.
6979 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
6980 functions.
6981
3467ec66
PA
69822018-04-26 Pedro Alves <palves@redhat.com>
6983
6984 * breakpoint.c (set_breakpoint_location_function): Don't resolve
6985 ifunc targets here. Instead, if we have an ifunc minsym, use its
6986 address/name.
6987 (add_location_to_breakpoint): Store the minsym and the objfile in
6988 the breakpoint location.
6989 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
6990 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
6991 Record the minsym in the sal.
6992 * symtab.h (symtab_and_line) <msymbol>: New field.
6993
28f4fa4d
PA
69942018-04-26 Pedro Alves <palves@redhat.com>
6995
6996 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
6997 unless we actually resolved the ifunc.
6998
ca31ab1d
PA
69992018-04-26 Pedro Alves <palves@redhat.com>
7000
7001 * c-exp.y (variable production): Prefer ifunc minsyms over
7002 regular function symbols.
7003 * symtab.c (find_gnu_ifunc): New function.
7004 * minsyms.h (lookup_msym_prefer): New enum.
7005 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7006 parameter by a lookup_msym_prefer parameter.
7007 * symtab.h (find_gnu_ifunc): New declaration.
7008
8388016d
PA
70092018-04-26 Pedro Alves <palves@redhat.com>
7010
7011 * blockframe.c (find_gnu_ifunc_target_type): New function.
7012 (find_function_type): New.
7013 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7014 return a value with a memory address.
7015 (eval_call): For calls to GNU ifunc functions, try to find the
7016 type of the target function from the type that the resolver
7017 returns.
7018 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7019 symbols.
7020 * infcall.c (find_function_return_type): Delete.
7021 (find_function_addr): Add 'function_type' parameter. For calls to
7022 GNU ifunc functions, try to find the type of the target function
7023 from the type that the resolver returns, and return it via
7024 FUNCTION_TYPE.
7025 (call_function_by_hand_dummy): Adjust to use the function type
7026 returned by find_function_addr.
7027 (find_function_addr): Add 'function_type' parameter and move
7028 description here.
7029 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7030 declarations.
7031
a376e11d
PA
70322018-04-26 Pedro Alves <palves@redhat.com>
7033
7034 * c-exp.y (variable production): Skip finding an alias for ifunc
7035 symbols.
7036
02e169e2
PA
70372018-04-26 Pedro Alves <palves@redhat.com>
7038
7039 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7040
249b5733
PA
70412018-04-25 Pedro Alves <palves@redhat.com>
7042
7043 * infcmd.c (kill_command): Print the pid as string, not the whole
7044 thread's ptid. Add comment. s/has been killed/killed/ in output
7045 message.
7046 * remote.c (remote_detach_1): Print the pid as string, not the
7047 whole thread's ptid.
7048
f67c0c91
SDJ
70492018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7050 Sergio Durigan Junior <sergiodj@redhat.com>
7051 Pedro Alves <palves@redhat.com>
7052
7053 * infcmd.c (kill_command): Print message when inferior has
7054 been killed.
7055 * inferior.c (print_inferior_events): Remove 'static'. Set as
7056 '1'.
7057 (add_inferior): Improve message printed when
7058 'print_inferior_events' is on.
7059 (exit_inferior): Remove message printed when
7060 'print_inferior_events' is on.
7061 (detach_inferior): Improve message printed when
7062 'print_inferior_events' is on.
7063 (initialize_inferiors): Use 'add_inferior_silent' to set
7064 'current_inferior_'.
7065 * inferior.h (print_inferior_events): Declare here as
7066 'extern'.
7067 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7068 '[Detaching...]' messages when 'print_inferior_events' is on.
7069 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7070 as prefix/suffix for messages. Remove periods. Fix erroneous
7071 'Detaching after fork from child...', replace it by '... from
7072 parent...'.
7073 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7074 prefix/suffix when printing 'Detaching...' messages. Print
7075 them when 'print_inferior_events' is on.
7076 * remote.c (remote_detach_1): Print message when detaching
7077 from inferior and '!is_fork_parent'.
7078
e427af18
TT
70792018-04-24 Tom Tromey <tom@tromey.com>
7080
7081 * cli-out.h: Reindent.
7082
05b1d8d6
TT
70832018-04-24 Tom Tromey <tom@tromey.com>
7084
7085 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7086 (cli_ui_out::do_field_string): Use fputs_filtered.
7087 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7088
a95c7dab
TT
70892018-04-23 Tom Tromey <tom@tromey.com>
7090
7091 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7092 gdb::unique_xmalloc_ptr.
7093
458412c3
TT
70942018-04-23 Tom Tromey <tom@tromey.com>
7095
7096 * configure: Rebuild.
7097
db86b02b
RS
70982018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7099
7100 PR gdb/23095
7101 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7102 prepare_for_testing. Set normal_bp to r_debug_state if target
7103 is bsd.
7104
00aecdcf
PA
71052018-04-21 Pedro Alves <palves@redhat.com>
7106 Rajendra SY <rajendra.sy@gmail.com>
7107
7108 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7109 * remote.c (extended_remote_attach): In all-stop mode, mark the
7110 thread as executing.
7111
224608c3
PW
71122018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7113
7114 * thread.c (thread_apply_all_command): Fix comment.
7115 (thread_command): Fix comment.
7116
3b74854b
AH
71172018-04-10 Alan Hayward <alan.hayward@arm.com>
7118
7119 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7120 parameter.
7121 * features/aarch64-core.c (create_feature_aarch64_core):
7122 Regenerate.
7123 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7124 Likewise.
7125 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7126 Likewise.
7127 * features/i386/32bit-avx512.c
7128 (create_feature_i386_32bit_avx512): Likewise.
7129 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7130 Likewise.
7131 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7132 Likewise.
7133 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7134 Likewise.
7135 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7136 Likewise.
7137 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7138 Likewise.
7139 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7140 Likewise.
7141 * features/i386/64bit-avx512.c
7142 (create_feature_i386_64bit_avx512): Likewise.
7143 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7144 Likewise.
7145 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7146 Likewise.
7147 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7148 Likewise.
7149 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7150 Likewise.
7151 * features/i386/64bit-segments.c
7152 (create_feature_i386_64bit_segments): Likewise.
7153 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7154 Likewise.
7155 * features/i386/x32-core.c
7156 (create_feature_i386_x32_core): Likewise.
7157 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7158 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7159 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7160 * target-descriptions.c: In generated code, don't pass xml
7161 filename.
7162
e98577a9
AH
71632018-04-18 Alan Hayward <alan.hayward@arm.com>
7164
7165 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7166 (print_xml_feature::visit_post): Likewise.
7167 (print_xml_feature::visit): Likewise.
7168 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7169 (print_xml_feature): Add new class.
7170 * regformats/regdat.sh: Null xmltarget on feature targets.
7171 * target-descriptions.c (struct target_desc): Add xmltarget.
7172 (maintenance_check_tdesc_xml_convert): Add unittest function.
7173 (tdesc_get_features_xml): Add function to get xml.
7174 (maintenance_check_xml_descriptions): Test xml generation.
7175 * xml-tdesc.c (string_read_description_xml): Add function.
7176 * xml-tdesc.h (string_read_description_xml): Add declaration.
7177
ad7fc756
AH
71782018-04-18 Alan Hayward <alan.hayward@arm.com>
7179
7180 * features/Makefile: Add feature marker to targets with new style
7181 target descriptions.
7182 * regformats/aarch64.dat: Regenerate.
7183 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7184 * regformats/i386/amd64-avx-linux.dat: Likewise.
7185 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7186 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7187 * regformats/i386/amd64-linux.dat: Likewise.
7188 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7189 * regformats/i386/amd64.dat: Likewise.
7190 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7191 * regformats/i386/i386-avx-linux.dat: Likewise.
7192 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7193 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7194 * regformats/i386/i386-linux.dat: Likewise.
7195 * regformats/i386/i386-mmx-linux.dat: Likewise.
7196 * regformats/i386/i386-mpx-linux.dat: Likewise.
7197 * regformats/i386/i386.dat: Likewise.
7198 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7199 * regformats/i386/x32-avx-linux.dat: Likewise.
7200 * regformats/i386/x32-linux.dat: Likewise.
7201 * regformats/tic6x-c62x-linux.dat: Likewise.
7202 * regformats/tic6x-c64x-linux.dat: Likewise.
7203 * regformats/tic6x-c64xp-linux.dat: Likewise.
7204 * regformats/regdat.sh: Parse feature marker.
7205
d278f585
AH
72062018-04-18 Alan Hayward <alan.hayward@arm.com>
7207
7208 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7209 (tdesc_osabi_name): Likewise.
7210 * target-descriptions.c (tdesc_architecture_name): Add new
7211 function.
7212 (tdesc_osabi_name): Likewise.
7213
eee8a18d
AH
72142018-04-18 Alan Hayward <alan.hayward@arm.com>
7215
7216 * common/tdesc.c (tdesc_predefined_type): Move to here.
7217 (tdesc_named_type): Likewise.
7218 (tdesc_create_vector): Likewise.
7219 (tdesc_create_struct): Likewise.
7220 (tdesc_set_struct_size): Likewise.
7221 (tdesc_create_union): Likewise.
7222 (tdesc_create_flags): Likewise.
7223 (tdesc_create_enum): Likewise.
7224 (tdesc_add_field): Likewise.
7225 (tdesc_add_typed_bitfield): Likewise.
7226 (tdesc_add_bitfield): Likewise.
7227 (tdesc_add_flag): Likewise.
7228 (tdesc_add_enum_value): Likewise.
7229 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7230 (struct tdesc_type_vector): Likewise.
7231 (struct tdesc_type_field): Likewise.
7232 (struct tdesc_type_with_fields): Likewise.
7233 (tdesc_create_enum): Add declaration.
7234 (tdesc_add_typed_bitfield): Likewise.
7235 (tdesc_add_enum_value): Likewise.
7236 * target-descriptions.c (tdesc_type_field): Move from here.
7237 (tdesc_type_builtin): Likewise.
7238 (tdesc_type_vector): Likewise.
7239 (tdesc_type_with_fields): Likewise.
7240 (tdesc_predefined_types): Likewise.
7241 (tdesc_named_type): Likewise.
7242 (tdesc_create_vector): Likewise.
7243 (tdesc_create_struct): Likewise.
7244 (tdesc_set_struct_size): Likewise.
7245 (tdesc_create_union): Likewise.
7246 (tdesc_create_flags): Likewise.
7247 (tdesc_create_enum): Likewise.
7248 (tdesc_add_field): Likewise.
7249 (tdesc_add_typed_bitfield): Likewise.
7250 (tdesc_add_bitfield): Likewise.
7251 (tdesc_add_flag): Likewise.
7252 (tdesc_add_enum_value): Likewise.
7253 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7254 (tdesc_add_typed_bitfield): Likewise.
7255 (tdesc_add_enum_value): Likewise.
7256
82ec9bc7
AH
72572018-04-18 Alan Hayward <alan.hayward@arm.com>
7258
7259 * common/tdesc.c (tdesc_feature::accept): Move to here.
7260 (tdesc_feature::operator==): Likewise.
7261 (tdesc_create_reg): Likewise.
7262 * common/tdesc.h (tdesc_type_kind): Likewise.
7263 (struct tdesc_type): Likewise.
7264 (struct tdesc_feature): Likewise.
7265 * regformats/regdat.sh: Create a feature.
7266 * target-descriptions.c (tdesc_type_kind): Move from here.
7267 (tdesc_type): Likewise.
7268 (tdesc_type_up): Likewise.
7269 (tdesc_feature): Likewise.
7270 (tdesc_create_reg): Likewise.
7271
ea3e7d71
AH
72722018-04-18 Alan Hayward <alan.hayward@arm.com>
7273
7274 * Makefile.in: Add arch/tdesc.c
7275 * common/tdesc.c: New file.
7276 * common/tdesc.h (tdesc_element_visitor): Move to here.
7277 (tdesc_element): Likewise.
7278 (tdesc_reg): Likewise.
7279 (tdesc_reg_up): Likewise.
7280 * regformats/regdef.h (reg): Add offset to constructors.
7281 * target-descriptions.c (tdesc_element_visitor): Move from here.
7282 (tdesc_element): Likewise.
7283 (tdesc_reg): Likewise.
7284 (tdesc_reg_up): Likewise.
7285
bedda9ac
TT
72862018-04-17 Tom Tromey <tom@tromey.com>
7287
7288 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7289 discriminant field.
7290
a037790e
TT
72912018-04-17 Tom Tromey <tom@tromey.com>
7292
7293 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7294
c7dcbf88
AA
72952018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7296
7297 * symtab.c (print_symbol_info): Skip printing filename and line
7298 number when `last' is NULL.
7299 (symtab_symbol_info): Use empty string instead of NULL for first
7300 invocation of print_symbol_info.
7301 (rbreak_command): Pass NULL to `last' parameter of
7302 print_symbol_info.
7303
07d28c77
SM
73042018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7305
7306 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7307 instead of nullptr.
7308
8a3de5e1
PA
73092018-04-16 Pedro Alves <palves@redhat.com>
7310
7311 * MAINTAINERS (sh): Remove.
7312 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7313 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7314 (ALLDEPFILES): Remove sh64-tdep.c.
7315 * NEWS: Mentions that support for SH-5/SH64 is removed.
7316 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7317 (sh*-*-openbsd*): Ditto.
7318 (sh64-*-elf*): Remove.
7319 (sh*): Remove.
7320 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7321 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7322 * sh-tdep.c: No longer include "sh64-tdep.h".
7323 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7324 * sh64-tdep.c, sh64-tdep.h: Remove files.
7325
a2a79012
PA
73262018-04-16 Pedro Alves <palves@redhat.com>
7327
7328 * MAINTAINERS: Remove m88k.
7329 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7330 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7331 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7332 * NEWS: Mention that support for m88k was removed.
7333 * configure.host (m88*-*-*): Remove support.
7334 * configure.nat (m88k-*-*): Remove support.
7335 * configure.tgt (m88*-*-openbsd*): Remove.
7336 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7337
eda4efb1
SM
73382018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7339
7340 * configure.tgt (x86_tobjs): New variable.
7341 (amd64_tobjs, i386_tobjs): Use it.
7342
b744723f
AA
73432018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7344
7345 * symtab.c (print_symbol_info): Precede the symbol definition by
7346 the line number when available.
7347 * NEWS: Advertise this enhancement.
7348
4a4495d6
MM
73492018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7350
7351 * NEWS (New options): announce set/show record btrace cpu.
7352 * btrace.c: Include record-btrace.h.
7353 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7354 the vendor is unknown.
7355 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7356 Maybe overwrite the btrace configuration's cpu.
7357 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7358 (btrace_fetch): Add cpu parameter. Update callers.
7359 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7360 Maybe overwrite the btrace configuration's cpu. Skip enabling
7361 errata workarounds if the vendor is unknown.
7362 * python/py-record-btrace.c: Include record-btrace.h.
7363 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7364 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7365 * record-btrace.c (record_btrace_cpu_state_kind): New.
7366 (record_btrace_cpu): New.
7367 (set_record_btrace_cpu_cmdlist): New.
7368 (record_btrace_get_cpu): New.
7369 (require_btrace_thread, record_btrace_info)
7370 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7371 (cmd_set_record_btrace_cpu_none): New.
7372 (cmd_set_record_btrace_cpu_auto): New.
7373 (cmd_set_record_btrace_cpu): New.
7374 (cmd_show_record_btrace_cpu): New.
7375 (_initialize_record_btrace): Initialize set/show record btrace cpu
7376 commands.
7377 * record-btrace.h (record_btrace_get_cpu): New.
7378
69f90c75
MM
73792018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7380
7381 * record.c (set_record_command): Fix typo in message.
7382
b85310e1
MM
73832018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7384
7385 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7386
1d509aa6
MM
73872018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7388
7389 * infrun.c (process_event_stop_test): Call
7390 gdbarch_in_indirect_branch_thunk.
7391 * gdbarch.sh (in_indirect_branch_thunk): New.
7392 * gdbarch.c: Regenerated.
7393 * gdbarch.h: Regenerated.
7394 * x86-tdep.h: New.
7395 * x86-tdep.c: New.
7396 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7397 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7398 (ALLDEPFILES): Add x86-tdep.c.
7399 * arch-utils.h (default_in_indirect_branch_thunk): New.
7400 * arch-utils.c (default_in_indirect_branch_thunk): New.
7401 * i386-tdep: Include x86-tdep.h.
7402 (i386_in_indirect_branch_thunk): New.
7403 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7404 function.
7405 * amd64-tdep: Include x86-tdep.h.
7406 (amd64_in_indirect_branch_thunk): New.
7407 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7408
b4be9bfd
JK
74092018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7410
7411 PR gdb/23053
7412 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7413 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7414 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7415 regression.
7416
53d7df28
TT
74172018-04-12 Tom Tromey <tom@tromey.com>
7418
7419 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7420 (rust_evaluate_subexp): Likewise.
7421
70b33f19
PA
74222018-04-12 Pedro Alves <palves@redhat.com>
7423
7424 * procfs.c (procfs_detach): Make forward declaration's prototype
7425 match definition's protototype.
7426 (proc_get_LDT_entry): Remove stale do_cleanups call.
7427
436411b1
PA
74282018-04-12 Pedro Alves <palves@redhat.com>
7429
7430 * target.h (target_ops::to_has_exited): Delete.
7431 (target_has_exited): Delete.
7432 * target-delegates.c: Regenerate.
7433
20db9c52
PA
74342018-04-11 Pedro Alves <palves@redhat.com>
7435
7436 * target.c (fileio_fh_t::t): Add comment.
7437 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7438 (target_fileio_close): Handle a NULL target.
7439 (invalidate_fileio_fh): New.
7440 (target_close): Call it.
7441 * remote.c (remote_hostio_send_command): No longer check whether
7442 remote_desc is open.
7443
5ff79300
PA
74442018-04-11 Pedro Alves <palves@redhat.com>
7445
7446 * target.c (fileio_fh_t): Make it a named struct instead of a
7447 typedef.
7448 (fileio_fh_t::is_closed): New method.
7449 (DEF_VEC_O (fileio_fh_t)): Remove.
7450 (fileio_fhandles): Now a std::vector.
7451 (is_closed_fileio_fh): Delete.
7452 (acquire_fileio_fd): Adjust. Rename parameters.
7453 (release_fileio_fd): Adjust.
7454 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7455 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7456 (target_fileio_close): Adjust.
7457
6e22e10d
SM
74582018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7459
7460 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7461 index.
7462
731f534f
PA
74632018-04-10 Pedro Alves <palves@redhat.com>
7464
7465 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7466 (scoped_finish_thread_state): New class.
7467 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7468 cleanup.
7469 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7470 (fetch_inferior_event, normal_stop): Likewise.
7471 * thread.c (finish_thread_state_cleanup): Delete.
7472
d5f4488f
SM
74732018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7474 Pedro Alves <palves@redhat.com>
7475
7476 * value.c: Include "selftest.h" and "common/array-view.h".
7477 (struct range) <operator ==>: New.
7478 (test_ranges_contain): New.
7479 (check_ranges_vector): New.
7480 (test_insert_into_bit_range_vector): New.
7481 (_initialize_values): Register selftests.
7482 * common/array-view.h (operator==, operator!=): New.
7483
b24531ed
SM
74842018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7485
7486 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7487 an iterator.
7488 * inline-frame.c: Include <algorithm>.
7489 (struct inline_state): Add constructor.
7490 (inline_state_s): Remove.
7491 (DEF_VEC_O(inline_state_s)): Remove.
7492 (inline_states): Change type to std::vector.
7493 (find_inline_frame_state): Adjust to std::vector.
7494 (allocate_inline_frame_state): Remove.
7495 (clear_inline_frame_state): Adjust to std::vector.
7496 (skip_inline_frames): Adjust to std::vector.
7497
c252925c
SM
74982018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7499
7500 * tracepoint.h (struct trace_state_variable): Add constructor.
7501 <name>: Change type to std::string.
7502 * tracepoint.c (tsv_s): Remove.
7503 (DEF_VEC_O(tsv_s)): Remove.
7504 (tvariables): Change to std::vector.
7505 (create_trace_state_variable): Adjust to std::vector.
7506 (find_trace_state_variable): Likewise.
7507 (find_trace_state_variable_by_number): Likewise.
7508 (delete_trace_state_variable): Likewise.
7509 (trace_variable_command): Adjust to std::string.
7510 (delete_trace_variable_command): Likewise.
7511 (tvariables_info_1): Adjust to std::vector.
7512 (save_trace_state_variables): Likewise.
7513 (start_tracing): Likewise.
7514 (merge_uploaded_trace_state_variables): Adjust to std::vector
7515 and std::string.
7516 * target.h (struct target_ops)
7517 <to_download_trace_state_variable>: Pass reference to
7518 trace_state_variable.
7519 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7520 * target-delegates.c: Re-generate.
7521 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7522 (mi_tsv_deleted): Likewise.
7523 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7524 * remote.c (remote_download_trace_state_variable): Change
7525 pointer to reference and adjust.
7526 * make-target-delegates (parse_argtypes): Handle references.
7527 (write_function_header): Likewise.
7528 (munge_type): Likewise.
7529
c9638d26
SM
75302018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7531
7532 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7533 string_view-selftests.c.
7534 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7535 testsuite.
7536 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7537 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7538 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7539 * unittests/basic_string_view/element_access/char/1.cc:
7540 Likewise.
7541 * unittests/basic_string_view/element_access/char/empty.cc:
7542 Likewise.
7543 * unittests/basic_string_view/element_access/char/front_back.cc:
7544 Likewise.
7545 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7546 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7547 Likewise.
7548 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7549 Likewise.
7550 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7551 Likewise.
7552 * unittests/basic_string_view/operations/compare/char/1.cc:
7553 Likewise.
7554 * unittests/basic_string_view/operations/compare/char/13650.cc:
7555 Likewise.
7556 * unittests/basic_string_view/operations/copy/char/1.cc:
7557 Likewise.
7558 * unittests/basic_string_view/operations/data/char/1.cc:
7559 Likewise.
7560 * unittests/basic_string_view/operations/find/char/1.cc:
7561 Likewise.
7562 * unittests/basic_string_view/operations/find/char/2.cc:
7563 Likewise.
7564 * unittests/basic_string_view/operations/find/char/3.cc:
7565 Likewise.
7566 * unittests/basic_string_view/operations/find/char/4.cc:
7567 Likewise.
7568 * unittests/basic_string_view/operations/rfind/char/1.cc:
7569 Likewise.
7570 * unittests/basic_string_view/operations/rfind/char/2.cc:
7571 Likewise.
7572 * unittests/basic_string_view/operations/rfind/char/3.cc:
7573 Likewise.
7574 * unittests/basic_string_view/operations/substr/char/1.cc:
7575 Likewise.
7576 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7577 * unittests/string_view-selftests.c: New file.
7578
fdc11678
SM
75792018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7580
7581 * unittests/basic_string_view/capacity/1.cc: New file.
7582 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7583 * unittests/basic_string_view/cons/char/1.cc: New file.
7584 * unittests/basic_string_view/cons/char/2.cc: New file.
7585 * unittests/basic_string_view/cons/char/3.cc: New file.
7586 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7587 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7588 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7589 * unittests/basic_string_view/element_access/char/1.cc: New file.
7590 * unittests/basic_string_view/element_access/char/2.cc: New file.
7591 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7592 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7593 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7594 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7595 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7596 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7597 * unittests/basic_string_view/include.cc: New file.
7598 * unittests/basic_string_view/inserters/char/1.cc: New file.
7599 * unittests/basic_string_view/inserters/char/2.cc: New file.
7600 * unittests/basic_string_view/inserters/char/3.cc: New file.
7601 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7602 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7603 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7604 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7605 * unittests/basic_string_view/literals/types.cc: New file.
7606 * unittests/basic_string_view/literals/values.cc: New file.
7607 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7608 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7609 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7610 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7611 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7612 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7613 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7614 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7615 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7616 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7617 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7618 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7619 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7620 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7621 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7622 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7623 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7624 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7625 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7626 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7627 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7628 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7629 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7630 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7631 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7632 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7633 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7634 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7635 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7636 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7637 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7638 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7639 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7640 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7641 * unittests/basic_string_view/operators/char/2.cc: New file.
7642 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7643 * unittests/basic_string_view/range_access/char/1.cc: New file.
7644 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7645 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7646 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7647 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7648 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7649 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7650 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7651 * unittests/basic_string_view/typedefs.cc: New file.
7652 * unittests/basic_string_view/types/1.cc: New file.
7653
8345c4a2
SM
76542018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7655
7656 * common/gdb_string_view.h: Remove libstdc++ implementation
7657 details, adjust to gdb reality.
7658 * common/gdb_string_view.tcc: Likewise.
7659 * cli/cli-script.c (struct string_view): Remove.
7660 (user_args) <m_args>: Change element type to gdb::string_view.
7661 (user_args::insert_args): Adjust.
7662
7adcdf08
SM
76632018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7664
7665 * common/gdb_string_view.h: New file.
7666 * common/gdb_string_view.tcc: New file.
7667
41260ac2
SM
76682018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7669
7670 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7671 * configure: Re-generate.
7672
0bee6dd4
PA
76732018-04-09 Pedro Alves <palves@redhat.com>
7674
7675 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7676 (set_target_gdbarch): Call
7677 gdb::observers::architecture_changed.notify instead of
7678 observer_notify_architecture_changed.
7679
6f14adc5
SM
76802018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7681
7682 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7683 (do_restore_current_traceframe_cleanup): Remove.
7684 (restore_current_traceframe_cleanup_dtor): Remove.
7685 (make_cleanup_restore_current_traceframe): Remove.
7686 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7687 New.
7688 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7689 * infrun.c (fetch_inferior_event): Use
7690 scoped_restore_current_traceframe.
7691
b2bdb8cf
SM
76922018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7693
7694 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7695 Remove.
7696 <n_allocated_type_units>: Remove.
7697 <all_type_units>: Change to std::vector.
7698 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7699 to std::vector change.
7700 (dwarf2_per_objfile::get_cutu): Likewise.
7701 (dwarf2_per_objfile::get_tu): Likewise.
7702 (create_signatured_type_table_from_index): Likewise.
7703 (create_signatured_type_table_from_debug_names): Likewise.
7704 (dw2_symtab_iter_next): Likewise.
7705 (dw2_print_stats): Likewise.
7706 (dw2_expand_all_symtabs): Likewise.
7707 (dw2_expand_marked_cus): Likewise.
7708 (dw2_debug_names_iterator::next): Likewise.
7709 (dwarf2_initialize_objfile): Likewise.
7710 (add_signatured_type_cu_to_table): Likewise.
7711 (create_all_type_units): Likewise.
7712 (add_type_unit): Likewise.
7713 (struct tu_abbrev_offset): Add constructor.
7714 (build_type_psymtabs_1): Adjust to std::vector change.
7715 (print_tu_stats): Likewise.
7716 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7717 (write_debug_names): Likewise.
7718
b76e467d
SM
77192018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7720
7721 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7722 Make an std::vector.
7723 <n_comp_units>: Remove.
7724 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7725 to std::vector change.
7726 (dwarf2_per_objfile::get_cutu): Likewise.
7727 (dwarf2_per_objfile::get_cu): Likewise.
7728 (create_cus_from_index): Likewise.
7729 (create_addrmap_from_index): Likewise.
7730 (create_addrmap_from_aranges): Likewise.
7731 (dwarf2_read_index): Likewise.
7732 (dw2_find_last_source_symtab): Likewise.
7733 (dw2_map_symtabs_matching_filename): Likewise.
7734 (dw2_symtab_iter_next): Likewise.
7735 (dw2_print_stats): Likewise.
7736 (dw2_expand_all_symtabs): Likewise.
7737 (dw2_expand_symtabs_with_fullname): Likewise.
7738 (dw2_expand_marked_cus): Likewise.
7739 (dw2_map_symbol_filenames): Likewise.
7740 (create_cus_from_debug_names): Likewise.
7741 (dwarf2_read_debug_names): Likewise.
7742 (dw2_debug_names_iterator::next): Likewise.
7743 (dwarf2_initialize_objfile): Likewise.
7744 (set_partial_user): Likewise.
7745 (dwarf2_build_psymtabs_hard): Likewise.
7746 (read_comp_units_from_section): Remove arguments, adjust to
7747 std::vector change.
7748 (create_all_comp_units): Adjust to std::vector and
7749 read_comp_units_from_section changes.
7750 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7751 change.
7752 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7753 (psyms_seen_size): Likewise.
7754 (write_gdbindex): Likewise.
7755 (write_debug_names): Likewise.
7756
12359b5e
SM
77572018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7758
7759 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7760 with dwarf2_per_objfile.
7761 (create_cus_from_index): Likewise.
7762 (create_signatured_type_table_from_index): Likewise.
7763 (dwarf2_read_index): Likewise.
7764 (dwarf2_initialize_objfile): Likewise.
7765 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7766 per_cu rather than get_dwarf2_per_objfile.
7767
ff4c9fec
SM
77682018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7769
7770 * dwarf2read.h (struct signatured_type): Forward declare.
7771 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7772 New methods.
7773 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7774 (dw2_get_cutu): ...this.
7775 (dwarf2_per_objfile::get_cu): Rename from...
7776 (dw2_get_cu): ...this.
7777 (dwarf2_per_objfile::get_tu): New.
7778 (create_addrmap_from_index): Adjust.
7779 (create_addrmap_from_aranges): Adjust.
7780 (dw2_find_last_source_symtab): Adjust.
7781 (dw2_map_symtabs_matching_filename): Adjust.
7782 (dw2_symtab_iter_next): Adjust.
7783 (dw2_print_stats): Adjust.
7784 (dw2_expand_all_symtabs): Adjust.
7785 (dw2_expand_symtabs_with_fullname): Adjust.
7786 (dw2_expand_marked_cus): Adjust.
7787 (dw_expand_symtabs_matching_file_matcher): Adjust.
7788 (dw2_map_symbol_filenames): Adjust.
7789 (dw2_debug_names_iterator::next): Adjust.
7790 (dwarf2_initialize_objfile): Adjust.
7791 (set_partial_user): Adjust.
7792 (dwarf2_build_psymtabs_hard): Adjust.
7793
5ca3fcb6
SM
77942018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7795
7796 * dwarf2read.c (create_signatured_type_table_from_debug_names):
7797 Remove unused variables.
7798 (dw2_map_symtabs_matching_filename): Likewise.
7799 (dwarf2_record_block_ranges): Likewise.
7800 (dwarf2_read_addr_index): Likewise.
7801 (follow_die_offset): Likewise.
7802
b2e586e8
SM
78032018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7804
7805 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
7806 to symbol_file_add_main.
7807
7c4e78cf
SM
78082018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7809
7810 PR mi/22299
7811 * mi/mi-console.c (do_fputc_async_safe): New.
7812 (mi_console_file::write_async_safe): New.
7813 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
7814 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
7815 New.
7816 * ui-file.c (ui_file::putstrn): Adjust call to
7817 fputstrn_unfiltered.
7818 * utils.c (printchar): Replace do_fputs and do_fprintf
7819 parameters by do_fputc.
7820 (fputstr_filtered): Adjust call to printchar.
7821 (fputstr_unfiltered): Likewise.
7822 (fputstrn_filtered): Likewise.
7823 (fputstrn_unfiltered): Add do_fputc parameter, pass to
7824 printchar.
7825 * utils.h (do_fputc_ftype): New typedef.
7826 (fputstrn_unfiltered): Add do_fputc parameter.
7827
5dc026d3
SM
78282018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7829
7830 * regformats/i386/i386-avx.dat: Remove.
7831
c912f608
SM
78322018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7833
7834 PR gdb/22979
7835 * amd64-tdep.c (amd64_none_init_abi): New function.
7836 (amd64_x32_none_init_abi): New function.
7837 (_initialize_amd64_tdep): Register handlers for x86-64 and
7838 x64_32 with GDB_OSABI_NONE.
7839 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
7840 GDB_OSABI_NONE osabi.
7841
26540402
SM
78422018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7843
7844 PR gdb/22980
7845 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
7846 GDB_OSABI_NONE.
7847 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
7848 * osabi.c (gdb_osabi_names): Add "unknown" entry.
7849
9018be22
SM
78502018-04-07 Simon Marchi <simon.marchi@ericsson.com>
7851
7852 * common/byte-vector.h (char_vector): New type.
7853 * target.h (target_read_alloc): Return
7854 gdb::optional<byte_vector>.
7855 (target_read_stralloc): Return gdb::optional<char_vector>.
7856 (target_get_osdata): Return gdb::optional<char_vector>.
7857 * target.c (target_read_alloc_1): Templatize. Replacement
7858 manual memory management with vector.
7859 (target_read_alloc): Change return type, adjust.
7860 (target_read_stralloc): Change return type, adjust.
7861 (target_get_osdata): Change return type, adjust.
7862 * auxv.c (struct auxv_info) <length>: Remove.
7863 <data>: Change type to gdb::optional<byte_vector>.
7864 (auxv_inferior_data_cleanup): Free auxv_info with delete.
7865 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
7866 (target_auxv_search): Adjust.
7867 (fprint_target_auxv): Adjust.
7868 * avr-tdep.c (avr_io_reg_read_command): Adjust.
7869 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
7870 (linux_make_corefile_notes): Adjust.
7871 * osdata.c (get_osdata): Adjust.
7872 * remote.c (remote_get_threads_with_qxfer): Adjust.
7873 (remote_memory_map): Adjust.
7874 (remote_traceframe_info): Adjust.
7875 (btrace_read_config): Adjust.
7876 (remote_read_btrace): Adjust.
7877 (remote_pid_to_exec_file): Adjust.
7878 * solib-aix.c (solib_aix_get_library_list): Adjust.
7879 * solib-dsbt.c (decode_loadmap): Don't free buf.
7880 (dsbt_get_initial_loadmaps): Adjust.
7881 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
7882 * solib-target.c (solib_target_current_sos): Adjust.
7883 * tracepoint.c (sdata_make_value): Adjust.
7884 * xml-support.c (xinclude_start_include): Adjust.
7885 (xml_fetch_content_from_file): Adjust.
7886 * xml-support.h (xml_fetch_another): Change return type.
7887 (xml_fetch_content_from_file): Change return type.
7888 * xml-syscall.c (xml_init_syscalls_info): Adjust.
7889 * xml-tdesc.c (file_read_description_xml): Adjust.
7890 (fetch_available_features_from_target): Change return type.
7891 (target_fetch_description_xml): Adjust.
7892 (target_read_description_xml): Adjust.
7893
14c88955
TT
78942018-04-06 Tom Tromey <tom@tromey.com>
7895
7896 * value.c (~value): Update.
7897 (struct value) <contents>: Now unique_xmalloc_ptr.
7898 (value_contents_bits_eq, allocate_value_contents)
7899 (value_contents_raw, value_contents_all_raw)
7900 (value_contents_for_printing, value_contents_for_printing_const)
7901 (set_value_enclosing_type): Update.
7902
0c7e6dd8
TT
79032018-04-06 Tom Tromey <tom@tromey.com>
7904
7905 * value.c (range_s): Remove typedef, VEC.
7906 (struct range): Add operator<.
7907 (range_lessthan): Remove.
7908 (ranges_contain): Change type.
7909 (~value): Update.
7910 (struct value) <unavailable, optimized_out>: Now std::vector.
7911 (value_entirely_available)
7912 (value_entirely_covered_by_range_vector)
7913 (value_entirely_unavailable, value_entirely_optimized_out):
7914 Update.
7915 (insert_into_bit_range_vector): Change argument type.
7916 (find_first_range_overlap): Likewise.
7917 (struct ranges_and_idx, value_contents_bits_eq)
7918 (require_not_optimized_out, require_available): Update.
7919 (ranges_copy_adjusted): Change argument types.
7920 (value_optimized_out, value_copy, value_fetch_lazy): Update.
7921
2c8331b9
TT
79222018-04-06 Tom Tromey <tom@tromey.com>
7923
7924 * value.c (~value): Update.
7925 (struct value) <parent>: Now a value_ref_ptr.
7926 (value_parent, set_value_parent, value_address, value_copy):
7927 Update.
7928
466ce3ae
TT
79292018-04-06 Tom Tromey <tom@tromey.com>
7930
7931 * value.c (struct value): Add constructor, destructor, and member
7932 initializers.
7933 (allocate_value_lazy, value_decref): Update.
7934
062d818d
TT
79352018-04-06 Tom Tromey <tom@tromey.com>
7936
7937 * value.c (struct value) <released, next>: Remove.
7938 (all_values): Now a std::vector.
7939 (allocate_value_lazy): Update.
7940 (value_next): Remove.
7941 (value_mark, value_free_to_mark, release_value)
7942 (value_release_to_mark): Update.
7943
a6535de1
TT
79442018-04-06 Tom Tromey <tom@tromey.com>
7945
7946 * value.h (fetch_subexp_value, value_release_to_mark): Update.
7947 (free_value_chain): Remove.
7948 * value.c (free_value_chain): Remove.
7949 (value_release_to_mark): Return a std::vector.
7950 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
7951 std::vector.
7952 (check_condition): Update.
7953 * eval.c (fetch_subexp_value): Change "val_chain" to a
7954 std::vector.
7955 * breakpoint.c (update_watchpoint): Update.
7956 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
7957
b5621201
TT
79582018-04-06 Tom Tromey <tom@tromey.com>
7959
7960 * value.h (free_all_values): Remove.
7961 * value.c (free_all_values): Remove.
7962
4d0266a0
TT
79632018-04-06 Tom Tromey <tom@tromey.com>
7964
7965 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
7966 (value_history_chain, value_history_count): Remove.
7967 (value_history): New global.
7968 (record_latest_value, access_value_history, show_values)
7969 (preserve_values): Update.
7970
b4d61099
TT
79712018-04-06 Tom Tromey <tom@tromey.com>
7972
7973 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
7974 * varobj.c (varobj_set_display_format, varobj_set_value)
7975 (install_default_visualizer, construct_visualizer)
7976 (install_new_value, ~varobj, varobj_get_value_type)
7977 (my_value_of_variable, varobj_editable_p): Update.
7978 * c-varobj.c (c_describe_child, c_value_of_variable)
7979 (cplus_number_of_children, cplus_describe_child): Update.
7980 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
7981 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
7982 (ada_value_of_variable, ada_value_is_changeable_p): Update.
7983
9b558729
TT
79842018-04-06 Tom Tromey <tom@tromey.com>
7985
7986 * printcmd.c (last_examine_address): Change type to
7987 value_ref_ptr.
7988 (do_examine, x_command): Update.
7989
850645cf
TT
79902018-04-06 Tom Tromey <tom@tromey.com>
7991
7992 * value.c (release_value): Update.
7993 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
7994 (struct bpstats) <val>: Now a value_ref_ptr.
7995 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
7996 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
7997 (~watchpoint, print_it_watchpoint, watch_command_1)
7998 (invalidate_bp_value_on_memory_change): Update.
7999
22bc8444
TT
80002018-04-06 Tom Tromey <tom@tromey.com>
8001
8002 * varobj.c (varobj_clear_saved_item)
8003 (update_dynamic_varobj_children, install_new_value, ~varobj):
8004 Update.
8005 * value.h (value_incref): Move declaration earlier.
8006 (value_decref): Rename from value_free.
8007 (struct value_ref_policy): New.
8008 (value_ref_ptr): New typedef.
8009 (struct value_deleter): Remove.
8010 (gdb_value_up): Remove typedef.
8011 (release_value): Change return type.
8012 (release_value_or_incref): Remove.
8013 * value.c (set_value_parent): Update.
8014 (value_incref): Change return type.
8015 (value_decref): Rename from value_free.
8016 (value_free_to_mark, free_all_values, free_value_chain): Update.
8017 (release_value): Return value_ref_ptr.
8018 (release_value_or_incref): Remove.
8019 (record_latest_value, set_internalvar, clear_internalvar):
8020 Update.
8021 * stack.c (info_frame_command): Don't call value_free.
8022 * python/py-value.c (valpy_dealloc, valpy_new)
8023 (value_to_value_object): Update.
8024 * printcmd.c (do_examine): Update.
8025 * opencl-lang.c (lval_func_free_closure): Update.
8026 * mi/mi-main.c (register_changed_p): Don't call value_free.
8027 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8028 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8029 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8030 value_free.
8031 * guile/scm-value.c (vlscm_free_value_smob)
8032 (vlscm_scm_from_value): Update.
8033 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8034 (frame_unwind_register_unsigned, get_frame_register_bytes)
8035 (put_frame_register_bytes): Don't call value_free.
8036 * findvar.c (address_from_register): Don't call value_free.
8037 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8038 * dwarf2loc.c (entry_data_value_free_closure)
8039 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8040 (dwarf2_evaluate_loc_desc_full): Update.
8041 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8042 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8043 (~watchpoint, watch_command_1)
8044 (invalidate_bp_value_on_memory_change): Update.
8045 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8046
7f8a5d38
SM
80472018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8048
8049 PR gdb/23022
8050 * warning.m4: Add -Wno-error=deprecated-register.
8051 * configure: Re-generate.
8052
8a76bd3b
TT
80532018-04-05 Tom Tromey <tom@tromey.com>
8054
8055 * linespec.h: Remove include of "vec.h".
8056
8e8d776e
TT
80572018-04-05 Tom Tromey <tom@tromey.com>
8058
8059 * linespec.c (typep): Remove typedef.
8060 (find_methods, find_superclass_methods): Take a std::vector.
8061 (find_method): Use std::vector.
8062
9b2f8581
TT
80632018-04-05 Tom Tromey <tom@tromey.com>
8064
8065 * utils.c (compare_strings): Remove.
8066 * utils.h (compare_strings): Remove.
8067 * objc-lang.h (find_imps): Update.
8068 * objc-lang.c (find_methods): Take a std::vector.
8069 (uniquify_strings, find_imps): Likewise.
8070 * linespec.c (find_methods): Take a std::vector.
8071 (decode_objc): Use std::vector.
8072 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8073 a std::vector.
8074 (find_method, find_function_symbols): Use std::vector.
8075
459a2e4c
TT
80762018-04-05 Tom Tromey <tom@tromey.com>
8077
8078 * completer.c (completion_tracker::completion_tracker): Remove
8079 cast.
8080 (completion_tracker::discard_completions): Likewise.
8081 * breakpoint.c (ambiguous_names_p): Remove cast.
8082 * ada-lang.c (_initialize_ada_language): Remove cast.
8083 * utils.h (streq): Update.
8084 (streq_hash): Add new declaration.
8085 * utils.c (streq): Return bool.
8086 (streq_hash): New function.
8087
9be2c17a
TT
80882018-04-05 Tom Tromey <tom@tromey.com>
8089
8090 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8091 Remove a string copy.
8092
f73c6ece
TT
80932018-04-05 Tom Tromey <tom@tromey.com>
8094
8095 * linespec.c (filter_results): Use std::vector.
8096 (decode_line_2, decode_line_full): Update.
8097
53a0f8a2
TT
80982018-04-05 Tom Tromey <tom@tromey.com>
8099
8100 * linespec.c (canonical_to_fullform): Return std::string.
8101 (filter_results): Update.
8102 (struct decode_line_2_item): Add constructor.
8103 <fullform, displayform>: Now std::string.
8104 (decode_line_2_compare_items): Now a std::sort comparator.
8105 (decode_line_2): Update.
8106
a5b5adf5
TT
81072018-04-05 Tom Tromey <tom@tromey.com>
8108
8109 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8110 (unexpected_linespec_error): Update.
8111 (linespec_parse_basic, parse_linespec): Update.
8112
6a307fc5
TT
81132018-04-05 Tom Tromey <tom@tromey.com>
8114
8115 * linespec.c (linespec_parse_basic): Reindent.
8116
41c1efc6
TT
81172018-04-05 Tom Tromey <tom@tromey.com>
8118
8119 * minsyms.h (iterate_over_minimal_symbols): Update.
8120 * minsyms.c (iterate_over_minimal_symbols): Take a
8121 gdb::function_view.
8122 * linespec.c (struct collect_minsyms): Remove.
8123 (compare_msyms): Now a std::sort comparator.
8124 (add_minsym): Add parameters.
8125 (search_minsyms_for_name): Update. Use std::vector.
8126
c5edbf3d
TT
81272018-04-03 Tom Tromey <tom@tromey.com>
8128
8129 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8130 gdb::byte_vector.
8131
b39efc48
WP
81322018-04-02 Weimin Pan <weimin.pan@oracle.com>
8133
8134 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8135
121ad66c 81362018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
8137
8138 PR gdb/16959
8139 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8140 printing static type.
8141
09473be8
TT
81422018-04-01 Tom Tromey <tom@tromey.com>
8143
8144 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8145 (rs6000_xfer_shared_libraries): Update.
8146
ec1f2d91
SM
81472018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8148
8149 * common/gdb_vecs.h (char_ptr): Remove.
8150 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8151
d8611974
SM
81522018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8153
8154 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8155 with std::vector.
8156 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8157
a18ba4e4
SM
81582018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8159
8160 * tracepoint.h (struct uploaded_tp): Initialize fields.
8161 <actions, step_actions, cmd_strings>: Change type to
8162 std::vector<char *>.
8163 * tracepoint.c (get_uploaded_tp): Allocate with new.
8164 (free_uploaded_tps): Free with delete.
8165 (parse_tracepoint_definition): Adjust to std::vector change.
8166 * breakpoint.c (read_uploaded_action): Likewise.
8167 (create_tracepoint_from_upload): Likewise.
8168 * ctf.c (ctf_write_uploaded_tp): Likewise.
8169 (SET_ARRAY_FIELD): Likewise.
8170 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8171
a7961323
TT
81722018-03-30 Tom Tromey <tom@tromey.com>
8173
8174 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8175 std::unique_ptr.
8176 (svr4_keep_data_in_core): Update.
8177 (svr4_read_so_list): Update.
8178
e83e4e24
TT
81792018-03-30 Tom Tromey <tom@tromey.com>
8180
8181 * windows-nat.c (handle_output_debug_string, handle_exception):
8182 Update.
8183 * target.h (target_read_string): Update.
8184 * target.c (target_read_string): Change "string" to
8185 unique_xmalloc_ptr.
8186 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8187 Update.
8188 * solib-frv.c (frv_current_sos): Update.
8189 * solib-dsbt.c (dsbt_current_sos): Update.
8190 * solib-darwin.c (darwin_current_sos): Update.
8191 * linux-thread-db.c (inferior_has_bug): Update.
8192 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8193 Update. Remove alloca.
8194 * ada-lang.c (ada_main_name): Update.
8195
263db9a1
TT
81962018-03-30 Tom Tromey <tom@tromey.com>
8197
8198 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8199 (struct dwo_file_deleter): New.
8200 (dwo_file_up): New typedef.
8201 (open_and_init_dwo_file): Use dwo_file_up.
8202 (free_dwo_file_cleanup): Remove.
8203
5dafb3d1
TT
82042018-03-30 Tom Tromey <tom@tromey.com>
8205
8206 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8207 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8208
11ed8cad
TT
82092018-03-30 Tom Tromey <tom@tromey.com>
8210
8211 * dwarf2read.c (class free_cached_comp_units): New class.
8212 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8213 (free_cached_comp_units): Remove function.
8214
9ae79dac
TT
82152018-03-30 Tom Tromey <tom@tromey.com>
8216
8217 * utils.h (make_cleanup_unpush_target): Remove.
8218 * inf-ptrace.c (struct target_unpusher): New.
8219 (target_unpush_up) New typedef.
8220 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8221 target_unpush_up.
8222 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8223
5aa89276
TT
82242018-03-27 Tom Tromey <tom@tromey.com>
8225
8226 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8227
1dbeed45
TT
82282018-03-27 Pedro Alves <palves@redhat.com>
8229 Tom Tromey <tom@tromey.com>
8230
8231 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8232 destructor. Now a class.
8233 (gdb_readline_wrapper_cleanup): Remove function.
8234 (gdb_readline_wrapper): Remove cleanups.
8235
c819b2c0
TT
82362018-03-27 Tom Tromey <tom@tromey.com>
8237
8238 * typeprint.h (struct type_print_options) <local_typedefs,
8239 global_typedefs>: Remove "struct" keyword.
8240 (class typedef_hash_table): New class.
8241 (recursively_update_typedef_hash, add_template_parameters)
8242 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8243 (find_typedef_in_hash): Don't declare.
8244 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8245 (typedef_hash_table::recursively_update): Rename from
8246 recursively_update_typedef_hash. Now a member.
8247 (typedef_hash_table::add_template_parameters): Rename from
8248 add_template_parameters. Now a member.
8249 (typedef_hash_table::typedef_hash_table): Now a constructor;
8250 rename from create_typedef_hash.
8251 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8252 rename from free_typedef_hash.
8253 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8254 (do_free_global_table): Remove.
8255 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8256 from copy_type_recursive.
8257 (create_global_typedef_table): Remove.
8258 (typedef_hash_table::find_global_typedef): Now a member of
8259 typedef_hash_table.
8260 (typedef_hash_table::find_typedef): Rename from
8261 find_typedef_in_hash; now a member.
8262 (whatis_exp): Update.
8263 * extension.h (struct ext_lang_type_printers): Add constructor and
8264 destructor.
8265 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8266 declare.
8267 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8268 Now a constructor; rename from start_ext_lang_type_printers.
8269 (ext_lang_type_printers): Now a destructor; rename from
8270 free_ext_lang_type_printers.
8271 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8272 Update.
8273 (c_type_print_base_struct_union): Update. Remove cleanups.
8274
608219fb
TT
82752018-03-27 Tom Tromey <tom@tromey.com>
8276
8277 * dwarf-index-write.c: Include <cmath>.
8278
3fcded8f
JB
82792018-03-27 Joel Brobecker <brobecker@adacore.com>
8280
8281 * NEWS: Add entry describing new "set|show varsize-limit" command.
8282 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8283 command.
8284 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8285 "set variable".
8286
cd4fb1b2
SM
82872018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8288
8289 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8290 dwarf-index-write.c
8291 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8292 * dwarf-index-common.c: New file.
8293 * dwarf-index-common.h: New file.
8294 * dwarf-index-write.c: New file.
8295 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8296 (struct dwarf2_section_info): Move from here.
8297 (dwarf2_section_info_def): Likewise.
8298 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8299 (offset_type): Likewise.
8300 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8301 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8302 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8303 (byte_swap): Likewise.
8304 (MAYBE_SWAP): Likewise.
8305 (dwarf2_per_cu_ptr): Likewise.
8306 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8307 (struct tu_stats): Likewise.
8308 (struct dwarf2_per_objfile): Likewise.
8309 (struct dwarf2_per_cu_data): Likewise.
8310 (struct signatured_type): Likewise.
8311 (sig_type_ptr): Likewise.
8312 (DEF_VEC_P (sig_type_ptr)): Likewise.
8313 (INDEX4_SUFFIX): Likewise.
8314 (INDEX5_SUFFIX): Likewise.
8315 (DEBUG_STR_SUFFIX): Likewise.
8316 (dwarf2_read_section): Make non-static.
8317 (mapped_index_string_hash): Move from here.
8318 (dwarf5_djb_hash): Likewise.
8319 (file_write): Likewise.
8320 (class data_buf): Likewise.
8321 (struct symtab_index_entry): Likewise.
8322 (struct mapped_symtab): Likewise.
8323 (find_slot): Likewise.
8324 (hash_expand): Likewise.
8325 (add_index_entry): Likewise.
8326 (uniquify_cu_indices): Likewise.
8327 (class c_str_view): Likewise.
8328 (class c_str_view_hasher): Likewise.
8329 (class vector_hasher): Likewise.
8330 (write_hash_table): Likewise.
8331 (psym_index_map): Likewise.
8332 (struct addrmap_index_data): Likewise.
8333 (add_address_entry): Likewise.
8334 (add_address_entry_worker): Likewise.
8335 (write_address_map): Likewise.
8336 (symbol_kind): Likewise.
8337 (write_psymbols): Likewise.
8338 (struct signatured_type_index_data): Likewise.
8339 (write_one_signatured_type): Likewise.
8340 (recursively_count_psymbols): Likewise.
8341 (recursively_write_psymbols): Likewise.
8342 (class debug_names): Likewise.
8343 (check_dwarf64_offsets): Likewise.
8344 (psyms_seen_size): Likewise.
8345 (write_gdbindex): Likewise.
8346 (write_debug_names): Likewise.
8347 (assert_file_size): Likewise.
8348 (write_psymtabs_to_index): Likewise.
8349 (save_gdb_index_command): Likewise.
8350 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8351 command.
8352 * dwarf2read.h: New file.
8353
59cc4834
JB
83542018-03-27 Joel Brobecker <brobecker@adacore.com>
8355
8356 PR gdb/22670
8357 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8358 symbol name if the CU's language stores symbol names in linkage
8359 format.
8360 * language.h (struct language_defn)
8361 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8362 all instances of this struct.
8363
67501539
TT
83642018-03-26 Tom Tromey <tom@tromey.com>
8365
8366 * stack.c (backtrace_command_1): Remove verbose code.
8367
76c939ac
TT
83682018-03-26 Tom Tromey <tom@tromey.com>
8369
8370 * python/py-framefilter.c (py_print_type): Don't catch
8371 exceptions. Return void.
8372 (py_print_value): Likewise.
8373 (py_print_single_arg): Likewise.
8374 (enumerate_args): Don't catch exceptions.
8375 (py_print_args): Likewise.
8376 (py_print_frame): Likewise.
8377 (gdbpy_apply_frame_filter): Catch exceptions here.
8378
9507b29c
TT
83792018-03-26 Tom Tromey <tom@tromey.com>
8380
8381 * stack.c (_initialize_stack): Remove trailing newlines from help
8382 text. Add "Usage" line to "backtrace" help.
8383
eb68e487
TT
83842018-03-26 Tom Tromey <tom@tromey.com>
8385
8386 PR python/16486:
8387 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8388
1f111921
TT
83892018-03-26 Tom Tromey <tom@tromey.com>
8390
8391 * python/py-framefilter.c (py_print_single_arg): Return
8392 EXT_LANG_BT_ERROR from catch.
8393
fb7eb8b5
TT
83942018-03-26 Tom Tromey <tom@tromey.com>
8395
8396 PR backtrace/15584:
8397 * stack.c (backtrace_command_1): Move some code into no-filters
8398 "if".
8399
4ca59a9f
TT
84002018-03-26 Tom Tromey <tom@tromey.com>
8401
8402 * python/py-framefilter.c (throw_quit_or_print_exception): New
8403 function.
8404 (gdbpy_apply_frame_filter): Use it.
8405
92256134
TT
84062018-03-26 Tom Tromey <tom@tromey.com>
8407
8408 PR cli/17716:
8409 * python/py-framefilter.c (py_print_type, py_print_value)
8410 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8411 RETURN_MASK_ERROR.
8412
7a630bc2
TT
84132018-03-26 Tom Tromey <tom@tromey.com>
8414
8415 * python/py-framefilter.c (enumerate_args): Use
8416 gdb::unique_xmalloc_ptr.
8417
63283d4a
TT
84182018-03-26 Tom Tromey <tom@tromey.com>
8419
8420 * python/py-framefilter.c (py_print_frame): Return
8421 EXT_LANG_BT_OK.
8422 (gdbpy_apply_frame_filter): Update comment.
8423 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8424 Remove.
8425 <EXT_LANG_BT_NO_FILTERS>: Change value.
8426
978d6c75
TT
84272018-03-26 Tom Tromey <tom@tromey.com>
8428
8429 PR backtrace/15582:
8430 * stack.c (backtrace_command): Parse "hide" argument.
8431 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8432 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8433 constant.
8434
1cf7e640
TT
84352018-03-26 Tom Tromey <tom@tromey.com>
8436
8437 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8438 add "flags".
8439 (backtrace_command): Remove "fulltrace", add "flags".
8440
ea3b0687
TT
84412018-03-26 Tom Tromey <tom@tromey.com>
8442
8443 * stack.c (backtrace_command): Rewrite command line parsing.
8444
9f034d75
SM
84452018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8446
8447 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8448
ce1459e5
SM
84492018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8450
8451 * filename-seen-cache.h: Add include guard.
8452
4f7ae6f5
KS
84532018-03-26 Keith Seitz <keiths@redhat.com>
8454
8455 * symfile.c (place_section): Remove "struct" from section_addr_info
8456 in comment.
8457 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8458 "struct" keyword from section_addr_info.
8459
5cd3e386
AH
84602018-03-26 Alan Hayward <alan.hayward@arm.com>
8461
8462 * regformats/regdef.h (reg): Add constructors.
8463
3e5ef9a4
PA
84642018-03-25 Pedro Alves <palves@redhat.com>
8465
8466 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8467 if then/else bodies in var_func_name extraction.
8468
c88d2fcc 84692018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8470
8471 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8472 lookup_minimal_symbol() to find symbol entry.
8473 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8474
b7fee5a3
KS
84752018-03-23 Keith Seitz <keiths@redhat.com>
8476
8477 PR c++/22968
8478 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8479 nested type definitions for C++, too.
8480
2cc9b304
TT
84812018-03-23 Tom Tromey <tom@tromey.com>
8482
8483 * machoread.c (struct oso_el): Add a constructor. Don't define as
8484 a typedef.
8485 (macho_register_oso): Remove.
8486 (macho_symtab_read): Take a std::vector.
8487 (oso_el_compare_name): Now a std::sort comparator.
8488 (macho_symfile_read_all_oso): Take a std::vector.
8489 (macho_symfile_read): Use std::vector. Remove cleanups.
8490
a2b2bc12
TT
84912018-03-22 Tom Tromey <tom@tromey.com>
8492
8493 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8494 (record_full_goto_bookmark): Use std::string.
8495
7a8f494c
PFC
84962018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8497
8498 PR tdep/18295
8499 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8500 a single mask.
8501
dd6d677f
PFC
85022018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8503
8504 * rs6000-tdep.c (store_insn_p): New function.
8505 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8506 and cr_reg to their unshifted values. Use store_insn_p to
8507 match LR saves using either R1 or fdata->alloca_reg. Use
8508 store_insn_p to match CR saves. Set alloca_reg_offset
8509 when alloca_reg and framep are set. Remove lr_reg shift
8510 when assigning to fdata->lr_register.
8511
26d6cec4
AA
85122018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8513
8514 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8515 command line args instead of emitting a warning.
8516
5d9310c4
SM
85172018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8518
8519 * tracepoint.h (struct static_tracepoint_marker): Initialize
8520 fields, define default constructor, move constructor and move
8521 assignment, disable the rest.
8522 <str_id, extra>: Make std::string.
8523 (release_static_tracepoint_marker): Remove.
8524 (free_current_marker): Remove.
8525 * tracepoint.c (free_current_marker): Remove.
8526 (parse_static_tracepoint_marker_definition): Adjust to
8527 std::string, use new hex2str overload.
8528 (release_static_tracepoint_marker): Remove.
8529 (print_one_static_tracepoint_marker): Get marker by reference
8530 and adjust to std::string.
8531 (info_static_tracepoint_markers_command): Adjust to std::vector
8532 changes
8533 * target.h (static_tracepoint_marker_p): Remove typedef.
8534 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8535 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8536 bool.
8537 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8538 * target-debug.h
8539 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8540 (target_debug_print_std_vector_static_tracepoint_marker): New.
8541 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8542 to...
8543 (target_debug_print_static_tracepoint_marker_p): ... this.
8544 * target-delegates.c: Re-generate.
8545 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8546 Make std::string.
8547 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8548 (decode_static_tracepoint_spec): Adjust to std::vector.
8549 (tracepoint_print_one_detail): Adjust to std::string.
8550 (strace_marker_decode_location): Adjust to std::string.
8551 (update_static_tracepoint): Adjust to std::string, remove call
8552 to release_static_tracepoint_marker.
8553 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8554 Adjust to std::vector.
8555 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8556 (remote_static_tracepoint_markers_by_strid): Adjust to
8557 std::vector.
8558 * common/rsp-low.h (hex2str): New overload with explicit count
8559 of bytes.
8560 * common/rsp-low.c (hex2str): New overload with explicit count
8561 of bytes.
8562 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8563 (_initialize_rsp_low_selftests): Add test_hex2str test.
8564 * unittests/tracepoint-selftests.c
8565 (test_parse_static_tracepoint_marker_definition): Adjust to
8566 std::string.
8567
62c222b6
SM
85682018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8569
8570 * tracepoint.c (parse_static_tracepoint_marker_definition):
8571 Consider case where the definition is followed by more
8572 definitions.
8573 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8574 tracepoint-selftests.c.
8575 * unittests/tracepoint-selftests.c: New.
8576
7eb2418f
PFC
85772018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8578
8579 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8580 Carvalho.
8581
7cbe16e9
SR
85822018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8583
3d6b3b82 8584 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8585
4ee89e90
SR
85862018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8587
3d6b3b82 8588 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8589
92630041
TT
85902018-03-19 Tom Tromey <tom@tromey.com>
8591
8592 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8593 "IDENT" production.
8594
76727919
TT
85952018-03-19 Pedro Alves <palves@redhat.com>
8596 Tom Tromey <tom@tromey.com>
8597
8598 * unittests/observable-selftests.c: New file.
8599 * common/observable.h: New file.
8600 * observable.h: New file.
8601 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8602 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8603 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8604 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8605 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8606 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8607 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8608 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8609 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8610 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8611 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8612 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8613 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8614 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8615 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8616 tui/tui-interp.c, valops.c: Update all users.
8617 * tui/tui-hooks.c (tui_bp_created_observer)
8618 (tui_bp_deleted_observer, tui_bp_modified_observer)
8619 (tui_inferior_exit_observer, tui_before_prompt_observer)
8620 (tui_normal_stop_observer, tui_register_changed_observer):
8621 Remove.
8622 (tui_observers_token): New global.
8623 (attach_or_detach, tui_attach_detach_observers): New functions.
8624 (tui_install_hooks, tui_remove_hooks): Use
8625 tui_attach_detach_observers.
8626 * record-btrace.c (record_btrace_thread_observer): Remove.
8627 (record_btrace_thread_observer_token): New global.
8628 * observer.sh: Remove.
8629 * observer.c: Rename to observable.c.
8630 * observable.c (namespace gdb_observers): Define new objects.
8631 (observer_debug): Move into gdb_observers namespace.
8632 (struct observer, struct observer_list, xalloc_observer_list_node)
8633 (xfree_observer_list_node, generic_observer_attach)
8634 (generic_observer_detach, generic_observer_notify): Remove.
8635 (_initialize_observer): Update.
8636 Don't include observer.inc.
8637 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8638 (clean mostlyclean): Likewise.
8639 (observer.h, observer.inc): Remove targets.
8640 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8641 (COMMON_SFILES): Use observable.c, not observer.c.
8642 * .gitignore: Remove observer.h.
8643
1cb1f3da
TT
86442018-03-18 Tom Tromey <tom@tromey.com>
8645
8646 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8647 gdb::def_vector.
8648 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8649
a06ab151
TT
86502018-03-17 Tom Tromey <tom@tromey.com>
8651
8652 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8653
770623f7
TT
86542018-03-17 Tom Tromey <tom@tromey.com>
8655
8656 * target.c (class scoped_target_fd): New.
8657 (target_fileio_close_cleanup): Remove.
8658 (target_fileio_read_alloc_1): Use scoped_target_fd.
8659
39be3c7e
SM
86602018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8661
8662 * silent-rules.mk: New.
8663 * Makefile.in: Include silent-rules.mk
8664 (srcdir, VPATH, top_srcdir): Move up.
8665 (COMPILE): Add ECHO_CXX.
8666 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8667 (init.c): Add ECHO_INIT_C.
8668 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8669 (version.c): Add ECHO_GEN.
8670 (printcmd.o): Add ECHO_CXX.
8671 (target-float.o): Add ECHO_CXX.
8672 (ada-exp.o): Add ECHO_CXX.
8673 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8674 (insight$(EXEEXT)): Add ECHO_CXXLD.
8675 * gnulib/configure.ac: Add AM_SILENT_RULES.
8676 * gnulib/aclocal.m4: Re-generate.
8677 * gnulib/configure: Re-generate.
8678 * gnulib/import/Makefile.in: Re-generate.
8679
37e136b1
TT
86802018-03-16 Tom Tromey <tom@tromey.com>
8681
8682 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8683 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8684 * utils.c (do_free_section_addr_info)
8685 (make_cleanup_free_section_addr_info): Remove.
8686 * symfile.h (struct other_sections): Add constructor.
8687 (struct section_addr_info): Remove.
8688 (section_addr_info): New typedef.
8689 (struct sym_fns) <sym_offsets>: Change type of parameter.
8690 (build_section_addr_info_from_objfile)
8691 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8692 (default_symfile_offsets, symbol_file_add)
8693 (symbol_file_add_from_bfd)
8694 (build_section_addr_info_from_section_table): Update.
8695 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8696 * symfile.c (alloc_section_addr_info): Remove.
8697 (build_section_addr_info_from_section_table): Change return type.
8698 Update.
8699 (build_section_addr_info_from_bfd)
8700 (build_section_addr_info_from_objfile): Likewise.
8701 (free_section_addr_info): Remove.
8702 (relative_addr_info_to_section_offsets): Change type of "addrs".
8703 (addrs_section_compar): Now a std::sort comparator.
8704 (addrs_section_sort): Change return type.
8705 (addr_info_make_relative): Change type of "addrs". Update.
8706 (default_symfile_offsets, syms_from_objfile_1)
8707 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8708 (symbol_file_add_separate): Update.
8709 (symbol_file_add): Change type of "addrs". Update.
8710 (add_symbol_file_command): Update. Remove cleanups.
8711 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8712 cleanups.
8713 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8714 * solib.c (solib_read_symbols): Update.
8715 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8716 * machoread.c (macho_symfile_offsets): Update.
8717 * jit.c (jit_bfd_try_read_symtab): Update.
8718
03afa6ef
SM
87192018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8720
8721 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8722 unittests/utils-selftests.c.
8723 * unittests/utils-selftests.c: New file.
8724
3ae9ce5d
TT
87252018-03-14 Tom Tromey <tom@tromey.com>
8726
8727 PR cli/14977:
8728 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8729 for NULL.
8730
b8c2339b
TT
87312018-03-14 Tom Tromey <tom@tromey.com>
8732
8733 PR cli/19918:
8734 * printcmd.c (printf_pointer): Allow "-" in format.
8735
80ae639d
TT
87362018-03-14 Tom Tromey <tom@tromey.com>
8737
8738 * printcmd.c (_initialize_printcmd): Add usage to printf.
8739
0d671d99
YQ
87402018-03-14 Yao Qi <qiyao@sourceware.org>
8741
8742 * MAINTAINERS: Update my email address.
8743
b577b6af
TT
87442018-03-13 Tom Tromey <tom@tromey.com>
8745
8746 * machoread.c (macho_check_dsym): Change filenamep to a
8747 std::string*.
8748 (macho_symfile_read): Update.
8749 * symfile.c (load_command): Use std::string.
8750
89a3b63e
AB
87512018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8752
8753 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8754 to error message string.
8755 (riscv_register_name): Use xsnprintf instead of sprintf.
8756 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8757 internal_error.
8758 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8759 error.
8760 (riscv_push_dummy_call): Likewise.
8761
984c7238
TT
87622018-03-12 Tom Tromey <tom@tromey.com>
8763
8764 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8765 Use gdb::byte_vector.
8766 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8767
933522d1
YQ
87682018-03-12 Yao Qi <yao.qi@linaro.org>
8769
8770 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8771 parameter type to readable_regcache.
8772 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8773 the declaration.
8774
be2daae6
TT
87752018-03-11 Tom Tromey <tom@tromey.com>
8776
8777 * dwarf2read.c (struct nextfield): Add initializers.
8778 (struct nextfnfield): Remove.
8779 (struct fnfieldlist): Add initializers. Remove "length" and
8780 "head", use std::vector.
8781 (struct decl_field_list): Remove.
8782 (struct field_info): Add initializers.
8783 <fields, baseclasses>: Now std::vector.
8784 <nbaseclasses, nfnfields, typedef_field_list_count,
8785 nested_types_list_count>: Remove.
8786 (dwarf2_add_field, dwarf2_add_type_defn)
8787 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8788 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8789 (process_structure_scope): Update.
8790
484cf504
TT
87912018-03-11 Tom Tromey <tom@tromey.com>
8792
8793 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
8794 for use by std::sort.
8795 (build_type_psymtabs_1): Use std::vector.
8796
9bd8e0b0
EZ
87972018-03-09 Eli Zaretskii <eliz@gnu.org>
8798
8799 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
8800 and LIBMPFR in the printed configuration.
8801
5dc1a704
TT
88022018-03-08 Tom Tromey <tom@tromey.com>
8803
8804 * source.c (get_filename_and_charpos): Use scoped_fd.
8805 * nto-procfs.c (procfs_open_1): Use scoped_fd.
8806 (procfs_pidlist): Likewise.
8807 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
8808 (iterate_over_mappings): Likewise.
8809
fdf07f3a
TT
88102018-03-08 Tom Tromey <tom@tromey.com>
8811
8812 * infcall.c (struct call_return_meta_info)
8813 <stack_temporaries_enabled>: Remove.
8814 (get_call_return_value, call_function_by_hand_dummy): Update.
8815 * thread.c (disable_thread_stack_temporaries): Remove.
8816 (enable_thread_stack_temporaries): Remove.
8817 (thread_stack_temporaries_enabled_p): Return bool.
8818 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
8819 (get_last_thread_stack_temporary): Update.
8820 * eval.c (evaluate_subexp): Update.
8821 * gdbthread.h (class enable_thread_stack_temporaries): Now a
8822 class, not a function.
8823 (value_ptr, value_vec): Remove typedefs.
8824 (class thread_info) <stack_temporaries_enabled>: Now bool.
8825 <stack_temporaries>: Now a std::vector.
8826 (thread_stack_temporaries_enabled_p)
8827 (value_in_thread_stack_temporaries): Return bool.
8828
567a3e54
SM
88292018-03-08 Simon Marchi <simon.marchi@ericsson.com>
8830
8831 * remote.c (putpkt_binary): Fix omitted bytes reporting.
8832 (getpkt_or_notif_sane_1): Likewise.
8833
00b40057
SM
88342018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8835
8836 * build-id.c (build_id_to_debug_bfd): Use std::string.
8837
a8dbfd58
SM
88382018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8839
8840 * build-id.c (find_separate_debug_file_by_buildid): Return
8841 std::string.
8842 * build-id.h (find_separate_debug_file_by_buildid): Return
8843 std::string.
8844 * coffread.c (coff_symfile_read): Adjust to std::string.
8845 * elfread.c (elf_symfile_read): Adjust to std::string.
8846 * symfile.c (separate_debug_file_exists): Change parameter to
8847 std::string.
8848 (find_separate_debug_file): Return std::string.
8849 (find_separate_debug_file_by_debuglink): Return std::string.
8850 * symfile.h (find_separate_debug_file_by_debuglink): Return
8851 std::string.
8852
e6a58aa8
SM
88532018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
8854
8855 * common/xml-utils.c (xml_escape_text): Move code to...
8856 (xml_escape_text_append): ... this new function.
8857 * common/xml-utils.h (xml_escape_text_append): New declaration.
8858 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
8859 New function.
8860 (_initialize_xml_utils): register test_xml_escape_text_append as
8861 a selftest.
8862
4ef0bef6
AH
88632018-03-07 Alan Hayward <alan.hayward@arm.com>
8864
8865 * defs.h: Remove MAX_REGISTER_SIZE.
8866 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
8867 asserts.
8868 * python/py-unwind.c (pyuw_sniffer): Likewise.
8869
e0d3522b
TT
88702018-03-07 Tom Tromey <tom@tromey.com>
8871
8872 * linux-tdep.c (linux_info_proc): Update.
8873 * target.h (struct target_ops) <to_fileio_readlink>: Return
8874 optional<string>.
8875 (target_fileio_readlink): Return optional<string>.
8876 * remote.c (remote_hostio_readlink): Return optional<string>.
8877 * inf-child.c (inf_child_fileio_readlink): Return
8878 optional<string>.
8879 * target.c (target_fileio_readlink): Return optional<string>.
8880
ea005f31
AB
88812018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
8882
8883 * regcache.c (cooked_read_test): Add riscv to the list of
8884 architectures that have a save_reggroup.
8885
e95a97d4
AA
88862018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
8887
8888 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
8889 value is not a dynamic class object.
8890
d8344f3d
TT
88912018-03-06 Tom Tromey <tom@tromey.com>
8892
8893 * rust-exp.y: Formatting fixes.
8894
9add17f2
AB
88952018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8896
8897 * riscv-tdep.c (riscv_register_name): Remove target description
8898 support.
8899 (riscv_gdbarch_init): Remove target description check.
8900
c9486dfe
AB
89012018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8902
8903 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
8904 comment.
8905 * riscv-tdep.h: Likewise.
8906
d74aff3d
AB
89072018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8908
8909 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
8910 (riscv_pseudo_register_write): Delete.
8911 (riscv_gdbarch_init): Remove all use of pseudo registers.
8912
7ea78b59
SM
89132018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8914
8915 * record-btrace.c (btrace_print_lines): Replace cleanup
8916 parameter with RAII equivalents.
8917 (btrace_insn_history): Replace cleanup with RAII equivalents.
8918 * ui-out.h (make_cleanup_ui_out_list_begin_end,
8919 make_cleanup_ui_out_tuple_begin_end): Remove.
8920 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
8921 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
8922 make_cleanup_ui_out_list_begin_end): Remove.
8923
53127008
SM
89242018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8925
8926 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
8927 parameter types to std::vector. Use bool.
8928 (record_btrace_wait): Replace VEC(tp_t) with
8929 std::vector<thread_info *>.
8930 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
8931
228f1508
SM
89322018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8933
8934 * record-btrace.c (record_btrace_disable_callback): Remove.
8935 (struct scoped_btrace_disable): New.
8936 (record_btrace_open): Use scoped_btrace_disable.
8937
b2970c23
AB
89382018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8939
8940 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
8941 reading values from registers.
8942
fb294655
AB
89432018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8944
8945 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
8946 where appropriate.
8947
cab5bb9d
AB
89482018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8949
8950 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
8951 change parameter type. Use GDB's print functions, and use
8952 core_addr_to_string where appropriate.
8953 (riscv_push_dummy_call): Use core_addr_to_string where
8954 appropriate, update call to riscv_print_arg_location, and reindent
8955 a few lines.
8956 (riscv_return_value): Update call to riscv_print_arg_location.
8957
dbbb1059
AB
89582018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8959 Tim Newsome <tim@sifive.com>
8960 Albert Ou <a0u@eecs.berkeley.edu>
8961 Darius Rad <darius@bluespec.com>
8962
8963 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
8964 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
8965 (ALLDEPFILES): Add riscv-tdep.c
8966 * configure.tgt: Add riscv support.
8967 * riscv-tdep.c: New file.
8968 * riscv-tdep.h: New file.
8969 * NEWS: Mention new target.
8970 * MAINTAINERS: Add entry for riscv.
8971
5dc43913
AB
89722018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8973
8974 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
8975 fields within aggregates.
8976
3dea1ef7
SM
89772018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
8978
8979 * record-btrace.c (btrace_print_lines): Change type of flags to
8980 gdb_disassembly_flags.
8981
7efba073
JB
89822018-03-04 John Baldwin <jhb@FreeBSD.org>
8983
8984 * fbsd-nat.c: Include "inf-ptrace.h".
8985 (USE_SIGTRAP_SIGINFO): Conditionally define.
8986 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
8987 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
8988 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
8989 function.
8990 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
8991 Likewise.
8992 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
8993 Likewise.
8994 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
8995 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
8996 "supports_stopped_by_hw_breakpoint" target methods.
8997
386a8676
JB
89982018-03-04 John Baldwin <jhb@FreeBSD.org>
8999
9000 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9001 * fbsd-nat.c (debug_fbsd_nat): New variable.
9002 (show_fbsd_nat_debug): New function.
9003 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9004 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9005
12279366
JB
90062018-03-04 John Baldwin <jhb@FreeBSD.org>
9007
9008 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9009 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9010 prototype.
9011 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9012 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9013 method.
9014
54693cf5
SM
90152018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9016
9017 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9018 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9019
ccb2231c
SM
90202018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9021
9022 * charset.c (struct charset_vector): New.
9023 (charsets): Change type to charset_vector.
9024 (find_charset_names): Adjust.
9025 (add_one): Adjust.
9026 (_initialize_charset): Adjust.
9027
6fb16ce6
SM
90282018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9029
9030 * progspace.h (struct program_space) <deleted_solibs>: Change
9031 type to std::vector<std::string>.
9032 * progspace.c (clear_program_space_solib_cache): Adjust.
9033 * breakpoint.c (print_solib_event): Adjust.
9034 (check_status_catch_solib): Adjust.
9035 * solib.c (update_solib_list): Adjust.
9036 * ui-out.h (class ui_out) <field_string>: New overload.
9037 * ui-out.c (ui_out::field_string): New overload.
9038
564b1e3f
SM
90392018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9040
9041 * progspace.h (struct program_space): Add constructor and
9042 destructor, initialize fields.
9043 (add_program_space): Remove.
9044 * progspace.c (add_program_space): Rename to...
9045 (program_space::program_space): ... this.
9046 (release_program_space): Rename to...
9047 (program_space::~program_space): ... this.
9048 (delete_program_space): Use delete to delete program_space.
9049 (initialize_progspace): Use new to allocate program_space.
9050 * inferior.c (add_inferior_with_spaces): Likewise.
9051 (clone_inferior_command): Likewise.
9052 * infrun.c (follow_fork_inferior): Likewise.
9053 (handle_vfork_child_exec_or_exit): Likewise.
9054
e80aaf61
SM
90552018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9056
9057 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9058 (delim_string_to_char_ptr_vec): Return std::vector of
9059 gdb::unique_xmalloc_ptr.
9060 (dirnames_to_char_ptr_vec_append): Take std::vector of
9061 gdb::unique_xmalloc_ptr.
9062 (dirnames_to_char_ptr_vec): Return std::vector of
9063 gdb::unique_xmalloc_ptr.
9064 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9065 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9066 (delim_string_to_char_ptr_vec): Return an std::vector of
9067 gdb::unique_xmalloc_ptr, adjust the code.
9068 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9069 gdb::unique_xmalloc_ptr, adjust the code.
9070 (dirnames_to_char_ptr_vec): Return an std::vector of
9071 gdb::unique_xmalloc_ptr, adjust the code.
9072 * auto-load.c (auto_load_safe_path_vec): Change type to
9073 std::vector of gdb::unique_xmalloc_ptr.
9074 (auto_load_expand_dir_vars): Return an std::vector of
9075 gdb::unique_xmalloc_ptr, adjust the code.
9076 (auto_load_safe_path_vec_update): Adjust.
9077 (filename_is_in_auto_load_safe_path_vec): Adjust.
9078 (auto_load_objfile_script_1): Adjust.
9079 * build-id.c (build_id_to_debug_bfd): Adjust.
9080 * linux-thread-db.c (thread_db_load_search): Adjust.
9081 * source.c (add_path): Adjust.
9082 (openp): Adjust.
9083 * symfile.c (find_separate_debug_file): Adjust.
9084 * utils.c (do_free_char_ptr_vec): Remove.
9085 (make_cleanup_free_char_ptr_vec): Remove.
9086
ab818ade
SDJ
90872018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9088
9089 PR gdb/22907
9090 * common/pathstuff.c: Conditionally include "<windows.h>".
9091
e1e6f073
GS
90922018-03-01 Georg Sauthoff <mail@georg.so>
9093
9094 PR gdb/22888
9095 * gcore.in: Quote variables and switch interpreter to bash.
9096
c7b15a66
TT
90972018-03-01 Tom Tromey <tom@tromey.com>
9098
9099 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9100 assertion. Add assertion for discriminant_index.
9101 (quirk_rust_enum): Use correct base type name in univariant case.
9102
0cb7c7b0
SM
91032018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9104
9105 * record.c (get_call_history_modifiers): Return a
9106 record_print_flags.
9107 (cmd_record_call_history): Adjust.
9108 * record-btrace.c (record_btrace_call_history): Adjust.
9109 (record_btrace_call_history_range): Adjust.
9110 (record_btrace_call_history_from): Adjust.
9111 * target-debug.h (target_debug_print_record_print_flags): New.
9112 * target-delegates.c: Re-generate.
9113 * target.c (target_call_history): Change flags type.
9114 (target_call_history_from): Likewise.
9115 (target_call_history_range): Likewise.
9116 * target.h (struct target_ops) <target_call_history>: Likewise.
9117 (target_call_history_from): Likewise.
9118 (target_call_history_range): Likewise.
9119
25e3c82c
SDJ
91202018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9121 Simon Marchi <simon.marchi@polymtl.ca>
9122
9123 * common/common-utils.c: Include "sys/stat.h".
9124 (is_regular_file): Move here from "source.c"; change return
9125 type to "bool".
9126 * common/common-utils.h (is_regular_file): New prototype.
9127 * common/pathstuff.c (contains_dir_separator): New function.
9128 * common/pathstuff.h (contains_dir_separator): New prototype.
9129 * source.c: Don't include "sys/stat.h".
9130 (is_regular_file): Move to "common/common-utils.c".
9131
b4987c95
SDJ
91322018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9133
9134 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9135 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9136 * auto-load.c: Include "common/pathstuff.h".
9137 * common/common-def.h (current_directory): Move here.
9138 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9139 function.
9140 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9141 prototype.
9142 * common/pathstuff.c: New file.
9143 * common/pathstuff.h: New file.
9144 * compile/compile.c: Include "common/pathstuff.h".
9145 * defs.h (current_directory): Move to "common/common-defs.h".
9146 * dwarf2read.c: Include "common/pathstuff.h".
9147 * exec.c: Likewise.
9148 * guile/scm-safe-call.c: Likewise.
9149 * linux-thread-db.c: Likewise.
9150 * main.c: Likewise.
9151 * nto-tdep.c: Likewise.
9152 * objfiles.c: Likewise.
9153 * source.c: Likewise.
9154 * symtab.c: Likewise.
9155 * utils.c: Include "common/pathstuff.h".
9156 (gdb_realpath): Move to "common/pathstuff.c".
9157 (gdb_realpath_keepfile): Likewise.
9158 (gdb_abspath): Likewise.
9159 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9160 (gdb_realpath_keepfile): Likewise.
9161 (gdb_abspath): Likewise.
9162
f169cfdc
JB
91632018-02-28 John Baldwin <jhb@FreeBSD.org>
9164
9165 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9166 wildcard process pid for super_resume for kernels with a
9167 specific bug.
9168
e05cac70
PM
91692018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9170
9171 * compile/compile.c (get_args): Add additional comments
9172 explaining function.
9173
55089490
TT
91742018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9175 Tom Tromey <tom@tromey.com>
9176
9177 * target.h (memory_write_request_s): Remove typedef. Don't define
9178 VEC.
9179 (target_write_memory_blocks): Change argument to std::vector.
9180 (struct memory_write_request): Add constructor.
9181 * target-memory.c (compare_block_starting_address): Return bool.
9182 Change argument types.
9183 (claim_memory): Change arguments to use std::vector.
9184 (split_regular_and_flash_blocks, blocks_to_erase)
9185 (compute_garbled_blocks): Likewise.
9186 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9187 (target_write_memory_blocks): Change argument to std::vector.
9188 * symfile.c (struct load_section_data): Add constructor and
9189 destructor. Use std::vector for "requests".
9190 (struct load_progress_data): Add initializers.
9191 (load_section_callback): Update. Use "new".
9192 (clear_memory_write_data): Remove.
9193 (generic_load): Update.
9194
0c305b61
AH
91952018-02-27 Alan Hayward <alan.hayward@arm.com>
9196
9197 * arch/aarch64.h: Use common/tdesc.h.
9198
c5196c92
MR
91992018-02-26 Maciej W. Rozycki <macro@mips.com>
9200
9201 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9202 architecture with a 64-bit ABI.
9203
37c33887
MR
92042018-02-26 Maciej W. Rozycki <macro@mips.com>
9205
9206 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9207 ahead of target description loading.
9208
d4dd3282
TT
92092018-02-26 Tom Tromey <tom@tromey.com>
9210
9211 * stack.c (backtrace_command_1): Update.
9212 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9213 of "flags".
9214 * python/py-framefilter.c (py_print_frame)
9215 (gdbpy_apply_frame_filter): Change type of "flags".
9216 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9217 of "flags".
9218 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9219 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9220 * extension.h (enum frame_filter_flag): Rename from
9221 frame_filter_flags.
9222 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9223 (apply_ext_lang_frame_filter): Change type of "flags".
9224 * extension.c (apply_ext_lang_frame_filter): Change type of
9225 "flags".
9226 * extension-priv.h (struct extension_language_ops)
9227 <apply_frame_filter>: Change type of "flags".
9228
6893c19a
TT
92292018-02-26 Tom Tromey <tom@tromey.com>
9230
9231 PR python/16497:
9232 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9233 off-by-one in py_end computation.
9234 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9235 PRINT_MORE_FRAMES.
9236 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9237 constant.
9238
2ddeaf8a
TT
92392018-02-26 Tom Tromey <tom@tromey.com>
9240
9241 * dwarf2read.c (struct variant_field): New.
9242 (struct nextfield) <variant>: New field.
9243 (dwarf2_add_field): Handle DW_TAG_variant_part.
9244 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9245 discriminated union.
9246 (read_structure_type): Handle DW_TAG_variant_part.
9247 (handle_struct_member_die): New function, extracted from
9248 process_structure_scope. Handle DW_TAG_variant.
9249 (process_structure_scope): Handle discriminated unions. Call
9250 handle_struct_member_die.
9251
c9317f21
TT
92522018-02-26 Tom Tromey <tom@tromey.com>
9253
9254 * rust-lang.h (rust_last_path_segment): Declare.
9255 * rust-lang.c (rust_last_path_segment): Now public. Change
9256 contract.
9257 (struct disr_info): Remove.
9258 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9259 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9260 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9261 (rust_enum_p, rust_enum_variant): New function.
9262 (rust_underscore_fields): Remove "offset" parameter.
9263 (rust_print_enum): New function.
9264 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9265 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9266 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9267 enums.
9268 (rust_internal_print_type): New function, from rust_print_type.
9269 Remove enum code.
9270 (rust_print_type): Call rust_internal_print_type.
9271 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9272 Update enum handling.
9273 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9274 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9275 (rust_union_quirks): New functions.
9276 (process_full_comp_unit, process_full_type_unit): Call
9277 rust_union_quirks.
9278 (process_structure_scope): Update rust_unions if necessary.
9279
7c22600a
TT
92802018-02-26 Tom Tromey <tom@tromey.com>
9281
9282 * value.h (value_union_variant): Declare.
9283 * valops.c (value_union_variant): New function.
9284 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9285 (struct discriminant_info): New.
9286 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9287 enumerator.
9288 (struct main_type) <flag_discriminated_union>: New field.
9289
15ce8941
TT
92902018-02-26 Tom Tromey <tom@tromey.com>
9291
9292 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9293 unittests/unpack-selftests.c.
9294 * unittests/unpack-selftests.c: New file.
9295 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9296
48fbe735
YQ
92972018-02-26 Yao Qi <yao.qi@linaro.org>
9298
9299 * dwarf2read.c (struct partial_die_info) <read>: New method.
9300 (read_partial_die): Remove the declaration.
9301 (load_partial_dies): Update.
9302 (partial_die_info::partial_die_info):
9303 (read_partial_die): Change it to partial_die_info::read.
9304
52356b79
YQ
93052018-02-26 Yao Qi <yao.qi@linaro.org>
9306
9307 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9308 (fixup_partial_die): Remove declaration.
9309 (scan_partial_symbols): Update.
9310 (partial_die_parent_scope): Likewise.
9311 (partial_die_full_name): Likewise.
9312 (fixup_partial_die): Change it to partial_die_info::fixup.
9313
35cc7ed7
YQ
93142018-02-26 Yao Qi <yao.qi@linaro.org>
9315
9316 * dwarf2read.c (read_partial_die): Update the declaration.
9317 (load_partial_dies): Caller update.
9318 (read_partial_die): Remove one argument abbrev_len.
9319
6f06d47b
YQ
93202018-02-26 Yao Qi <yao.qi@linaro.org>
9321
9322 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9323 assignment operator.
9324 (load_partial_dies): Use ctor and copy ctor.
9325 (read_partial_die): Update.
9326 (dwarf2_cu::find_partial_die): Use ctor.
9327
d590ff25
YQ
93282018-02-26 Yao Qi <yao.qi@linaro.org>
9329
9330 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9331 (find_partial_die_in_comp_unit): Change it to
9332 dwarf2_cu::find_partial_die.
9333 (find_partial_die): Update.
9334
fd0a254f
YQ
93352018-02-26 Yao Qi <yao.qi@linaro.org>
9336
9337 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9338 is NULL.
9339
cd9983dd
YQ
93402018-02-26 Yao Qi <yao.qi@linaro.org>
9341
9342 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9343
f46cd62a
AH
93442018-02-26 Alan Hayward <alan.hayward@arm.com>
9345
9346 * arch/amd64.h: Use common/tdesc.h.
9347 * arch/i386.c: Likewise.
9348 * arch/i386.h: Likewise.
9349 * arch/tic6x.c: Likewise.
9350 * arch/tdesc.h: Move file from here...
9351 * common/tdesc.h: ...to here.
9352 * features/aarch64-core.c: Regenerate.
9353 * features/aarch64-fpu.c: Regenerate.
9354 * features/i386/32bit-avx.c: Regenerate.
9355 * features/i386/32bit-avx512.c: Regenerate.
9356 * features/i386/32bit-core.c: Regenerate.
9357 * features/i386/32bit-linux.c: Regenerate.
9358 * features/i386/32bit-mpx.c: Regenerate.
9359 * features/i386/32bit-pkeys.c: Regenerate.
9360 * features/i386/32bit-sse.c: Regenerate.
9361 * features/i386/64bit-avx.c: Regenerate.
9362 * features/i386/64bit-avx512.c: Regenerate.
9363 * features/i386/64bit-core.c: Regenerate.
9364 * features/i386/64bit-linux.c: Regenerate.
9365 * features/i386/64bit-mpx.c: Regenerate.
9366 * features/i386/64bit-pkeys.c: Regenerate.
9367 * features/i386/64bit-segments.c: Regenerate.
9368 * features/i386/64bit-sse.c: Regenerate.
9369 * features/i386/x32-core.c: Regenerate.
9370 * features/tic6x-c6xp.c: Regenerate.
9371 * features/tic6x-core.c: Regenerate.
9372 * features/tic6x-gp.c: Regenerate.
9373 * target-descriptions.c: Use common/tdesc.h.
9374 * target-descriptions.h: Likewise.
9375
9b292f68
TT
93762018-02-24 Tom Tromey <tom@tromey.com>
9377
9378 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9379 (try_thread_db_load_from_dir, thread_db_load_search): Use
9380 std::string.
9381 (info_auto_load_libthread_db_compare): Return bool. Change
9382 argument types.
9383 (info_auto_load_libthread_db): Use std::vector, std::string.
9384 Remove cleanups.
9385
281d762b
TT
93862018-02-24 Tom Tromey <tom@tromey.com>
9387
9388 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9389 std::string.
9390 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9391 std::string*.
9392 * gdbarch.c: Rebuild.
9393 * gdbarch.h: Rebuild.
9394 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9395 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9396 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9397 std::string*.
9398
9d8780f0
SM
93992018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9400
9401 * gdbtypes.h (sect_offset): Change type to uint64_t.
9402 (sect_offset_str): New function.
9403 * dwarf2read.c (create_addrmap_from_aranges): Use
9404 sect_offset_str.
9405 (error_check_comp_unit_head): Likewise.
9406 (create_debug_type_hash_table): Likewise.
9407 (read_cutu_die_from_dwo): Likewise.
9408 (init_cutu_and_read_dies): Likewise.
9409 (init_cutu_and_read_dies_no_follow): Likewise.
9410 (process_psymtab_comp_unit_reader): Likewise.
9411 (partial_die_parent_scope): Likewise.
9412 (peek_die_abbrev): Likewise.
9413 (process_queue): Likewise.
9414 (dwarf2_physname): Likewise.
9415 (read_namespace_alias): Likewise.
9416 (read_import_statement): Likewise.
9417 (create_dwo_cu_reader): Likewise.
9418 (create_cus_hash_table): Likewise.
9419 (lookup_dwo_cutu): Likewise.
9420 (inherit_abstract_dies): Likewise.
9421 (read_func_scope): Likewise.
9422 (read_call_site_scope): Likewise.
9423 (dwarf2_add_member_fn): Likewise.
9424 (read_common_block): Likewise.
9425 (read_module_type): Likewise.
9426 (read_typedef): Likewise.
9427 (read_subrange_type): Likewise.
9428 (load_partial_dies): Likewise.
9429 (read_partial_die): Likewise.
9430 (find_partial_die): Likewise.
9431 (read_str_index): Likewise.
9432 (dwarf2_string_attr): Likewise.
9433 (build_error_marker_type): Likewise.
9434 (lookup_die_type): Likewise.
9435 (dump_die_shallow): Likewise.
9436 (follow_die_ref): Likewise.
9437 (dwarf2_fetch_die_loc_sect_off): Likewise.
9438 (dwarf2_fetch_constant_bytes): Likewise.
9439 (follow_die_sig): Likewise.
9440 (get_signatured_type): Likewise.
9441 (get_DW_AT_signature_type): Likewise.
9442 (dwarf2_find_containing_comp_unit): Likewise.
9443 (set_die_type): Likewise.
9444
8ec57239
JB
94452018-02-21 John Baldwin <jhb@FreeBSD.org>
9446
9447 * arch/aarch64.c: Include "common-defs.h".
9448 * arch/amd64.c: Likewise.
9449 * arch/i386.c: Likewise.
9450
3eac2b65
TT
94512018-02-21 Tom Tromey <tom@tromey.com>
9452
9453 * value.h: (extract_field_op): Update.
9454 * eval.c (extract_field_op): Return a const char *.
9455 * expression.h (parse_expression_for_completion): Update.
9456 * completer.c (complete_expression): Update.
9457 (add_struct_fields): Make fieldname const.
9458 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9459 (mark_completion_tag, parse_exp_in_context_1): Update.
9460 (parse_expression_for_completion): Change "name" to
9461 unique_xmalloc_ptr*.
9462
6ccb583f
TT
94632018-02-21 Tom Tromey <tom@tromey.com>
9464
9465 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9466
c113ed0c
YQ
94672018-02-21 Yao Qi <yao.qi@linaro.org>
9468
9469 * avr-tdep.c (avr_read_pc): Change parameter type to
9470 readable_regcache.
9471 * gdbarch.sh (read_pc): Likewise.
9472 * gdbarch.c: Re-generated.
9473 * gdbarch.h: Re-generated.
9474 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9475 readable_regcache.
9476 * ia64-tdep.c (ia64_read_pc): Likewise.
9477 * mips-tdep.c (mips_read_pc): Likewise.
9478 * spu-tdep.c (spu_read_pc): Likewise.
9479
4c74fe6b
YQ
94802018-02-21 Yao Qi <yao.qi@linaro.org>
9481
9482 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9483 * regcache-dump.c: New file.
9484 * regcache.c: Move register_dump to regcache-dump.c.
9485 (maintenance_print_registers): Likewise.
9486 (maintenance_print_raw_registers): Likewise.
9487 (maintenance_print_cooked_registers): Likewise.
9488 (maintenance_print_register_groups): Likewise.
9489 (maintenance_print_remote_registers): Likewise.
9490 (_initialize_regcache): Likewise.
9491 * regcache.h (register_dump): Moved from regcache.c.
9492
796bb026
YQ
94932018-02-21 Yao Qi <yao.qi@linaro.org>
9494
9495 * regcache.c (regcache::regcache): Update.
9496 (regcache::invalidate): Move it to detached_regcache::invalidate.
9497 (get_thread_arch_aspace_regcache): Update.
9498 (regcache::raw_update): Update.
9499 (regcache::cooked_read): Remove some code.
9500 (regcache::cooked_read_value): Likewise.
9501 (regcache::raw_write): Remove assert on m_readonly_p.
9502 (regcache::raw_supply_integer): Move it to
9503 detached_regcache::raw_supply_integer.
9504 (regcache::raw_supply_zeroed): Likewise.
9505 * regcache.h (detached_regcache) <raw_supply_integer>: New
9506 declaration.
9507 <raw_supply_zeroed, invalidate>: Likewise.
9508 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9509 <invalidate>: Likewise.
9510 <m_readonly_p>: Removed.
9511
215c69dc
YQ
95122018-02-21 Yao Qi <yao.qi@linaro.org>
9513
9514 * infcmd.c (get_return_value): Let stop_regs point to
9515 get_current_regcache.
9516 * regcache.c (regcache::regcache): Remove.
9517 (register_dump_reg_buffer): New class.
9518 (regcache_print): Adjust.
9519 * regcache.h (regcache): Remove constructors.
9520
f3384e66
YQ
95212018-02-21 Yao Qi <yao.qi@linaro.org>
9522
9523 * regcache.c (class register_dump): New class.
9524 (register_dump_regcache, register_dump_none): New class.
9525 (register_dump_remote, register_dump_groups): New class.
9526 (regcache_print): Update.
9527 * regcache.h (regcache_dump_what): Move it to regcache.c.
9528 (regcache) <dump>: Remove.
9529
c8ec2f33
YQ
95302018-02-21 Yao Qi <yao.qi@linaro.org>
9531
9532 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9533 reg_buffer_rw *.
9534 (jit_unwind_reg_set_impl): Call raw_supply.
9535 (jit_frame_sniffer): Use reg_buffer_rw.
9536 * record-full.c (record_full_core_regbuf): Change its type.
9537 (record_full_core_open_1): Use reg_buffer_rw.
9538 (record_full_close): Likewise.
9539 (record_full_core_fetch_registers): Use regcache->raw_supply.
9540 (record_full_core_store_registers): Likewise.
9541 * regcache.c (regcache::get_register_status): Move it to
9542 reg_buffer.
9543 (regcache_raw_set_cached_value): Remove.
9544 (regcache::raw_set_cached_value): Remove.
9545 (regcache::raw_write): Call raw_supply.
9546 (regcache::raw_supply): Move it to reg_buffer_rw.
9547 * regcache.h (regcache_raw_set_cached_value): Remove.
9548 (reg_buffer_rw): New class.
9549
daf6667d
YQ
95502018-02-21 Yao Qi <yao.qi@linaro.org>
9551
9552 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9553 readonly_detached_regcache.
9554 (dummy_frame_prev_register): Use regcache->cooked_read.
9555 * frame.c (frame_save_as_regcache): Change return type.
9556 (frame_pop): Update.
9557 * frame.h (frame_save_as_regcache): Update declaration.
9558 * inferior.h (get_infcall_suspend_state_regcache): Update
9559 declaration.
9560 * infrun.c (infcall_suspend_state) <registers>: use
9561 readonly_detached_regcache.
9562 (save_infcall_suspend_state): Don't use regcache_dup.
9563 (get_infcall_suspend_state_regcache): Change return type.
9564 * linux-fork.c (struct fork_info) <savedregs>: Change to
9565 readonly_detached_regcache.
9566 <pc>: New field.
9567 (fork_save_infrun_state): Don't use regcache_dup.
9568 (info_checkpoints_command): Adjust.
9569 * mi/mi-main.c (register_changed_p): Update declaration.
9570 (mi_cmd_data_list_changed_registers): Use
9571 readonly_detached_regcache.
9572 (register_changed_p): Change parameter type to
9573 readonly_detached_regcache.
9574 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9575 readonly_detached_regcache.
9576 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9577 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9578 New.
9579 (regcache::save): Move it to reg_buffer.
9580 (regcache::restore): Change parameter type.
9581 (regcache_dup): Remove.
9582 * regcache.h (reg_buffer) <save>: New method.
9583 (readonly_detached_regcache): New class.
9584 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9585 readonly_detached_regcache.
9586 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9587
fc5b8736
YQ
95882018-02-21 Yao Qi <yao.qi@linaro.org>
9589
9590 * frame.c (frame_save_as_regcache): Use regcache method save.
9591 (frame_pop): Use regcache method restore.
9592 * infrun.c (restore_infcall_suspend_state): Likewise.
9593 * linux-fork.c (fork_load_infrun_state): Likewise.
9594 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9595 save.
9596 * regcache.c (regcache_save): Remove.
9597 (regcache::restore): More asserts.
9598 (regcache_cpy): Remove.
9599 * regcache.h (regcache_save): Remove the declaration.
9600 (regcache::restore): Move from private to public.
9601 Remove the friend declaration of regcache_cpy.
9602 (regcache_cpy): Remove declaration.
9603
849d0ba8
YQ
96042018-02-21 Yao Qi <yao.qi@linaro.org>
9605
9606 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9607 parameter type to 'readable_regcache *'.
9608 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9609 * arm-tdep.c (arm_neon_quad_read): Likewise.
9610 (arm_pseudo_read): Likewise.
9611 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9612 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9613 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9614 * gdbarch.c: Re-generated.
9615 * gdbarch.h: Re-generated.
9616 * gdbarch.sh (pseudo_register_read): Change parameter type to
9617 'readable_regcache *'.
9618 (pseudo_register_read_value): Likewise.
9619 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9620 (h8300_pseudo_register_read): Likewise.
9621 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9622 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9623 (i386_pseudo_register_read_into_value): Likewise.
9624 (i386_pseudo_register_read_value): Likewise.
9625 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9626 declaration.
9627 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9628 * m32c-tdep.c (m32c_raw_read): Likewise.
9629 (m32c_read_flg): Likewise.
9630 (m32c_banked_register): Likewise.
9631 (m32c_banked_read): Likewise.
9632 (m32c_sb_read): Likewise.
9633 (m32c_part_read): Likewise.
9634 (m32c_cat_read): Likewise.
9635 (m32c_r3r2r1r0_read): Likewise.
9636 (m32c_pseudo_register_read): Likewise.
9637 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9638 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9639 (mep_pseudo_cr64_read): Likewise.
9640 (mep_pseudo_register_read): Likewise.
9641 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9642 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9643 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9644 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9645 (regcache::cooked_read): Likewise.
9646 (regcache::cooked_read_value): Likewise.
9647 (regcache_cooked_read_signed):
9648 (regcache::cooked_read): Likewise.
9649 * regcache.h (readable_regcache): New class.
9650 (regcache): Inherit readable_regcache. Move some methods to
9651 readable_regcache.
9652 * rl78-tdep.c (rl78_pseudo_register_read): Change
9653 parameter type to 'readable_regcache *'.
9654 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9655 (e500_pseudo_register_read): Change parameter type to
9656 'readable_regcache *'.
9657 (dfp_pseudo_register_read): Likewise.
9658 (vsx_pseudo_register_read): Likewise.
9659 (efpr_pseudo_register_read): Likewise.
9660 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9661 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9662 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9663 (sh64_pseudo_register_read): Likewise.
9664 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9665 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9666 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9667 (spu_pseudo_register_read): Likewise.
9668 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9669 (xtensa_pseudo_register_read): Likewise.
9670
31716595
YQ
96712018-02-21 Yao Qi <yao.qi@linaro.org>
9672
9673 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9674 (regcache::arch): Move it to reg_buffer::arch.
9675 (regcache::register_buffer): Likewise.
9676 (regcache::assert_regnum): Likewise.
9677 (regcache::num_raw_registers): Likewise.
9678 * regcache.h (reg_buffer): New class.
9679 (regcache): Inherit reg_buffer.
9680
7104e59b
SM
96812018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9682
9683 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9684 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9685
2d8adcbd
MM
96862018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9687
9688 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9689
b5884fa7
AH
96902018-02-19 Alan Hayward <alan.hayward@arm.com>
9691
9692 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9693 (SFILES): Remove common/*.c files.
9694 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9695 * common/common.host: Add common reference.
9696 * configure.ac: Likewise.
9697 * configure: Regenerate.
9698
fd90ace4
YQ
96992018-02-16 Yao Qi <yao.qi@linaro.org>
9700
9701 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9702 (block_initialize_namespace): Use new.
9703 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9704 (dwarf2_free_objfile): Use delete.
9705 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9706 (copy_type_recursive): Use new.
9707 * gdb_obstack.h (allocate_on_obstack): New.
9708
85046ae2
YQ
97092018-02-15 Yao Qi <yao.qi@linaro.org>
9710
9711 PR gdb/22849
9712 * inferior.c (exit_inferior_1): Reset inf->control.
9713
355c559b
JB
97142018-02-15 Joel Brobecker <brobecker@adacore.com>
9715
9716 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9717 declaration.
9718
980548fd
PA
97192018-02-14 Pedro Alves <palves@redhat.com>
9720
9721 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9722 frame_cleanup_after_sniffer on exception.
9723
692d6f97
TT
97242018-02-14 Tom Tromey <tom@tromey.com>
9725
9726 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9727 const.
9728 (solib_bfd_open): Make pathname const.
9729 * solib.c (solib_bfd_open): Make pathname const.
9730 * solib-spu.c (spu_bfd_fopen): Make name const.
9731 (spu_bfd_open): Make pathname const.
9732 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9733 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9734
e0cc99a6
TT
97352018-02-14 Tom Tromey <tom@tromey.com>
9736
9737 * symfile.c (symfile_bfd_open): Update.
9738 * source.h (openp, source_full_path_of, find_and_open_source):
9739 Change argument type to unique_xmalloc_ptr.
9740 * source.c (openp): Take a unique_xmalloc_ptr.
9741 (source_full_path_of, find_and_open_source): Likewise.
9742 (open_source_file, symtab_to_fullname): Update.
9743 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9744 unique_xmalloc_ptr.
9745 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9746 (exec_file_find): Update.
9747 * psymtab.c (psymtab_to_fullname): Update.
9748 * nto-tdep.h (nto_find_and_open_solib): Update.
9749 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9750 unique_xmalloc_ptr.
9751 * exec.c (exec_file_attach): Update.
9752 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9753 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9754
b46a8d7c
TT
97552018-02-14 Tom Tromey <tom@tromey.com>
9756
9757 * solib.c: Include source.h.
9758 * nto-tdep.c: Include source.h.
9759 * mi/mi-cmd-env.c: Include source.h.
9760 * infcmd.c: Include source.h.
9761 * exec.c: Include source.h.
9762 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9763 (add_path, directory_switch, source_path, init_source_path): Move
9764 declarations...
9765 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9766 (add_path, directory_switch, source_path, init_source_path):
9767 ...here.
9768
797bc1cb
TT
97692018-02-14 Tom Tromey <tom@tromey.com>
9770
9771 * solist.h (exec_file_find, solib_find): Return
9772 unique_xmalloc_ptr.
9773 (solib_bfd_fopen): Take a const char *.
9774 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9775 (exec_file_find, solib_find): Likewise.
9776 (solib_bfd_fopen): Do not take ownership of "pathname".
9777 (solib_bfd_open): Use unique_xmalloc_ptr.
9778 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9779 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9780 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9781 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9782
f98b2e33
JB
97832018-02-14 Joel Brobecker <brobecker@adacore.com>
9784
9785 * ada-lang.c (name_match_type_from_name): Remove reference to
9786 ada_name_for_lookup in function's documentation.
9787 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9788
24b9144d
SM
97892018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9790
9791 * defs.h (enum openp_flags): New enum.
9792 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
9793 Move to enum openp_flags.
9794 (openp_flags): New enum flags.
9795 (openp): Change parameter type to openp_flags.
9796 * source.c (openp): Change parameter type to openp_flags.
9797 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
9798 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
9799
387cd15b
SM
98002018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
9801
9802 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
9803 per-command.
9804
b303c6f6
AB
98052018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
9806
9807 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
9808 into...
9809 (class dwarf2_queue_guard): ...the destructor of this new class.
9810 (dw2_do_instantiate_symtab): Create instance of the new class
9811 dwarf2_queue_guard, remove cleanup.
9812
9c3630e9
TT
98132018-02-09 Tom Tromey <tom@tromey.com>
9814
9815 * source.c (find_source_lines): Don't reference past the end of
9816 the vector.
9817
c4e12631
MM
98182018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9819
9820 * remote.c (remote_btrace_maybe_reopen): Change error message.
9821 * btrace.c (btrace_enable): Likewise.
9822 (parse_xml_btrace): Likewise.
9823 (parse_xml_btrace_conf): Likewise.
9824
88711fbf
MM
98252018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9826
9827 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
9828 (linux_enable_pt, linux_enable_bts): Call
9829 diagnose_perf_event_open_fail.
9830
17ad2a4f
MM
98312018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9832
9833 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
9834 Remove parameter and change return type. Update callers. Move it.
9835 (linux_enable_bts, linux_enable_pt): Improve error message.
9836 (linux_enable_pt): Remove zero buffer size check.
9837 (linux_enable_btrace): Improve error messages. Remove NULL return
9838 check.
9839
de6242d3
MM
98402018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9841
9842 * btrace.c (btrace_enable): Remove target_supports_btrace call.
9843 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
9844 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
9845 (linux_supports_pt, linux_supports_btrace): Remove.
9846 (linux_enable_bts): Call cpu_supports_bts.
9847 * nat/linux-btrace.h (linux_supports_btrace): Remove.
9848 * remote.c (remote_supports_btrace): Remove.
9849 (init_remote_ops): Remove remote_supports_btrace.
9850 * target-delegates.c: Regenerated.
9851 * target.c (target_supports_btrace): Remove.
9852 * target.h (target_ops) <to_supports_btrace>: Remove
9853 (target_supports_btrace): Remove.
9854 * x86-linux-nat.c (x86_linux_create_target): Remove
9855 linux_supports_btrace.
9856
9ee23a85
MM
98572018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9858
9859 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
9860 btrace failed.
9861 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
9862 exception and use message in own exception.
9863
5c3284c1
MM
98642018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9865
9866 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
9867 (perf_event_pt_event_type): Use gdb_file_up.
9868 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
9869 scoped_fd, and scoped_mmap.
9870
84696f37
MM
98712018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9872
9873 * common/scoped_mmap.h: New.
9874 * unittests/scoped_mmap-selftest.c: New.
9875 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9876 unittests/scoped_mmap-selftest.c.
9877
ea4a0888
MM
98782018-02-09 Markus Metzger <markus.t.metzger@intel.com>
9879
9880 * common/scoped_fd.h: New.
9881 * unittests/scoped_fd-selftest.c: New.
9882 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9883 unittests/scoped_fd-selftest.c.
9884
869e8290
TT
98852018-02-09 Tom Tromey <tom@tromey.com>
9886
9887 * auto-load.c (auto_load_section_scripts): Use
9888 gdb::unique_xmalloc_ptr.
9889
a37a2ae7
TT
98902018-02-09 Tom Tromey <tom@tromey.com>
9891
9892 * auto-load.c (execute_script_contents): Use std::string.
9893
4e725347
JB
98942018-02-09 Joel Brobecker <brobecker@adacore.com>
9895
9896 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
9897 Python function, rather than a new command.
9898
9a897d43
TT
98992018-02-08 Tom Tromey <tom@tromey.com>
9900
9901 * solib.c (solib_find_1): Use std::string.
9902 (solib_bfd_fopen): Use unique_xmalloc_ptr.
9903
58ef3771
TT
99042018-02-08 Tom Tromey <tom@tromey.com>
9905
9906 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
9907
a9abc434
TT
99082018-02-08 Tom Tromey <tom@tromey.com>
9909
9910 * source.c (find_source_lines): Use gdb::def_vector.
9911
84f27c6f
TT
99122018-02-08 Tom Tromey <tom@tromey.com>
9913
9914 * macrocmd.c (struct temporary_macro_definition): New.
9915 (macro_define_command): Use temporary_macro_definition. Remove
9916 cleanups.
9917 (free_macro_definition_ptr): Remove.
9918
0354904b
TT
99192018-02-08 Tom Tromey <tom@tromey.com>
9920
9921 * macroexp.c (maybe_expand): Use std::string.
9922
1739cf24
TT
99232018-02-08 Tom Tromey <tom@tromey.com>
9924
9925 * macroexp.c (struct macro_buffer): Add initializers for some
9926 members.
9927 (init_buffer, init_shared_buffer, free_buffer)
9928 (free_buffer_return_text): Remove.
9929 (macro_buffer): New constructors.
9930 (~macro_buffer): New destructor.
9931 (macro_buffer::set_shared): New method.
9932 (macro_buffer::resize_buffer, macro_buffer::appendc)
9933 (macro_buffer::appendmem): Now methods, not free functions.
9934 (set_token, append_tokens_without_splicing, stringify)
9935 (macro_stringify): Update.
9936 (gather_arguments): Change return type. Remove argc_p argument,
9937 add args_ptr argument. Use std::vector.
9938 (substitute_args): Remove argc argument. Accept std::vector.
9939 (expand): Update. Use std::vector.
9940 (scan, macro_expand, macro_expand_next): Update.
9941
f6c2623e
TT
99422018-02-08 Tom Tromey <tom@tromey.com>
9943
9944 * symtab.c (default_collect_symbol_completion_matches_break_on):
9945 Use unique_xmalloc_ptr.
9946 * macroscope.h: (sal_macro_scope, user_macro_scope)
9947 (default_macro_scope): Return unique_xmalloc_ptr.
9948 * macroscope.c (sal_macro_scope, user_macro_scope)
9949 (default_macro_scope): Return unique_xmalloc_ptr.
9950 * macroexp.h (macro_expand, macro_expand_once): Return
9951 unique_xmalloc_ptr.
9952 * macroexp.c (macro_expand, macro_expand_once): Return
9953 unique_xmalloc_ptr.
9954 * macrocmd.c (macro_expand_command, macro_expand_once_command)
9955 (info_macro_command, info_macros_command): Use
9956 unique_xmalloc_ptr.
9957 * compile/compile-c-support.c (write_macro_definitions): Use
9958 unique_xmalloc_ptr.
9959 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
9960
c2e0e465
SM
99612018-02-07 Simon Marchi <simon.marchi@ericsson.com>
9962
9963 * value.c (value_static_field): Assign field type instead of
9964 containing type when returning an optimized out value.
9965
3f8c94b4
YQ
99662018-02-06 Yao Qi <yao.qi@linaro.org>
9967
9968 * ft32-tdep.c (ft32_read_pc): Remove.
9969 (ft32_write_pc): Remove.
9970 (ft32_gdbarch_init): Update.
9971 * m32r-tdep.c (m32r_read_pc): Remove.
9972 (m32r_gdbarch_init): Update.
9973 * mep-tdep.c (mep_read_pc): Remove.
9974 (mep_gdbarch_init): Update.
9975 * microblaze-tdep.c (microblaze_write_pc): Remove.
9976 (microblaze_gdbarch_init): Update.
9977 * mn10300-tdep.c (mn10300_read_pc): Remove.
9978 (mn10300_write_pc): Remove.
9979 (mn10300_gdbarch_init): Update.
9980 * moxie-tdep.c (moxie_read_pc): Remove.
9981 (moxie_write_pc): Remove.
9982 (moxie_gdbarch_init): Update.
9983
bca65a23
YQ
99842018-02-06 Yao Qi <yao.qi@linaro.org>
9985
9986 * expprint.c (print_subexp_standard): Handle
9987 OP_F77_UNDETERMINED_ARGLIST.
9988 (dump_subexp_body_standard): Likewise.
9989
583e3f90 99902018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 9991
583e3f90
YQ
9992 * target-descriptions.c (tdesc_element_visitor) Add empty
9993 implementations.
b8df6ca7
AH
9994 (tdesc_type): Move make_gdb_type from here.
9995 (tdesc_type_builtin): Likewise.
9996 (tdesc_type_vector): Likewise.
9997 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
9998 (make_gdb_type_struct): Move from tdesc_type_with_fields.
9999 (make_gdb_type_union): Likewise.
10000 (make_gdb_type_flags): Likewise.
10001 (make_gdb_type_enum): Likewise.
10002 (make_gdb_type): New function.
10003 (tdesc_register_type): Use static make_gdb_type.
10004
e813d34a
RK
100052018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10006
10007 * infcmd.c (default_print_one_register_info): Align natural-format
10008 column values consistently one under another.
10009 (pad_to_column): New function.
10010
0eb876f5
JB
100112018-02-05 Joel Brobecker <brobecker@adacore.com>
10012
10013 * dwarf2read.c (dwarf2_physname): Move commment.
10014
0625771b
LS
100152018-02-01 Leszek Swirski <leszeks@google.com>
10016
10017 * varobj.c (varobj_formatted_print_options): Allow recursive
10018 pretty printing if pretty printing is enabled.
10019
59498c30
LS
100202018-02-01 Leszek Swirski <leszeks@google.com>
10021
10022 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10023 names after a structop as a filename.
10024
2d9e6acb
YQ
100252018-02-01 Yao Qi <yao.qi@linaro.org>
10026
10027 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10028 (arm_record_coproc_data_proc): Likewise.
10029
df95a9cf
YQ
100302018-02-01 Yao Qi <yao.qi@linaro.org>
10031
10032 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10033
07e5f5cf
NP
100342018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10035
10036 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10037 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10038
3045b475
PA
100392018-01-31 Pedro Alves <palves@redhat.com>
10040
10041 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10042 * inflow.c (child_terminal_save_inferior): Wrap reference to
10043 tcgetpgrp in HAVE_TERMIOS_H.
10044 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10045 _WIN32.
10046 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10047 always iterate over all inferiors.
10048 (gdbsim_cntrl_c): Adjust.
10049 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10050
929b5ad4
JB
100512018-01-31 Joel Brobecker <brobecker@adacore.com>
10052
10053 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10054 index type is objfile-owned if the element type is as well.
10055
29236ca2
JB
100562018-01-31 Joel Brobecker <brobecker@adacore.com>
10057
10058 GDB 8.1 released.
10059
c81e8879
PR
100602018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10061
10062 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10063 "features/s390x-linux64.c".
10064 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10065 s390_linux32 and s390x_linux64.
10066 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10067 default tdesc.
10068 * s390-tdep.c: Include "features/s390-linux32.c" and
10069 "features/s390x-linux64.c".
10070 (s390_tdesc_valid): Add check for tdesc_has_registers.
10071 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10072 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10073 tdesc_s390x_linux64.
10074 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10075 tdesc_s390x_linux64 to...
10076 * s390-tdep.h: ...here.
10077
e671cd59
PA
100782018-01-30 Pedro Alves <palves@redhat.com>
10079
10080 PR gdb/13211
10081 * config.in, configure: Regenerate.
10082 * configure.ac: Check for getpgid.
10083 * go32-nat.c (go32_pass_ctrlc): New.
10084 (go32_target): Install it.
10085 * inf-child.c (inf_child_target): Install
10086 child_terminal_save_inferior, child_pass_ctrlc and
10087 child_interrupt.
10088 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10089 (inf_ptrace_target): No longer install it.
10090 * infcmd.c (interrupt_target_1): Adjust.
10091 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10092 (child_interrupt): Declare.
10093 (inferior::terminal_state): New.
10094 * inflow.c (struct terminal_info): Update comments.
10095 (inferior_process_group): Delete.
10096 (terminal_is_ours): Delete.
10097 (gdb_tty_state): New.
10098 (child_terminal_init): Adjust.
10099 (is_gdb_terminal, sharing_input_terminal_1)
10100 (sharing_input_terminal): New functions.
10101 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10102 Set the process's actual process group in the foreground if
10103 possible. Handle is_ours_for_output/is_ours distinction. Don't
10104 mark terminal as the inferior's if not sharing GDB's terminal.
10105 Don't check attach_flag.
10106 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10107 pass down a target_terminal_state.
10108 (child_terminal_save_inferior): New, factored out from ...
10109 (child_terminal_ours_1): ... this. Handle
10110 target_terminal_state::is_ours_for_output.
10111 (child_interrupt, child_pass_ctrlc): New.
10112 (inflow_inferior_exit): Clear the inferior's terminal_state.
10113 (copy_terminal_info): Copy the inferior's terminal state.
10114 (_initialize_inflow): Remove reference to terminal_is_ours.
10115 * inflow.h (inferior_process_group): Delete.
10116 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10117 * procfs.c (procfs_target): Don't install procfs_interrupt.
10118 (procfs_interrupt): Delete.
10119 * remote.c (remote_serial_quit_handler): Adjust.
10120 (remote_interrupt): Remove ptid parameter. Adjust.
10121 * target-delegates.c: Regenerate.
10122 * target.c: Include "terminal.h".
10123 (target_terminal::terminal_state): Rename to ...
10124 (target_terminal::m_terminal_state): ... this.
10125 (target_terminal::init): Adjust.
10126 (target_terminal::inferior): Adjust to per-inferior
10127 terminal_state.
10128 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10129 (target_terminal::ours, target_terminal::ours_for_output): Use
10130 target_terminal_is_ours_kind.
10131 (target_interrupt): Remove ptid parameter. Adjust.
10132 (default_target_pass_ctrlc): Adjust.
10133 * target.h (target_ops::to_terminal_save_inferior): New field.
10134 (target_ops::to_interrupt): Remove ptid_t parameter.
10135 (target_interrupt): Remove ptid_t parameter. Update comment.
10136 (target_pass_ctrlc): Update comment.
10137 * target/target.h (target_terminal_state): New scoped enum,
10138 factored out of ...
10139 (target_terminal::terminal_state): ... here.
10140 (target_terminal::inferior): Update comments.
10141 (target_terminal::restore_inferior): New.
10142 (target_terminal::is_inferior, target_terminal::is_ours)
10143 (target_terminal::is_ours_for_output): Adjust.
10144 (target_terminal::scoped_restore_terminal_state): Adjust to
10145 rename, and call restore_inferior() instead of inferior().
10146 (target_terminal::scoped_restore_terminal_state::m_state): Change
10147 type.
10148 (target_terminal::terminal_state): Rename to ...
10149 (target_terminal::m_terminal_state): ... this and change type.
10150
9c3a5d93
PA
101512018-01-30 Pedro Alves <palves@redhat.com>
10152
10153 * linux-nat.c (wait_for_signal): New function.
10154 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10155 directly.
10156 (async_terminal_is_ours)
10157 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10158 (linux_nat_add_target): Don't override
10159 to_terminal_inferior/to_terminal_ours.
10160
69ab5edb
SDJ
101612018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10162
10163 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10164
fc8e7e75
SM
101652018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10166
10167 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10168 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10169 dwarf2_per_objfile_free here.
10170 (dwarf2_per_objfile_free): Remove.
10171 (_initialize_dwarf2_read): Don't register
10172 dwarf2_per_objfile_free as a registry cleanup.
10173
b2a426e2
EZ
101742018-01-27 Eli Zaretskii <eliz@gnu.org>
10175
10176 Avoid compilation errors in MinGW native builds
10177
10178 The error is triggered by including python-internal.h, and the
10179 error message is:
10180
10181 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10182 from build-gnulib/import/math.h:27,
10183 from d:/usr/Python26/include/pyport.h:235,
10184 from d:/usr/Python26/include/Python.h:58,
10185 from python/python-internal.h:94,
10186 from python/py-arch.c:24:
10187 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10188 using ::hypot;
10189 ^~~~~
10190
10191 This happens because Python headers define 'hypot' to expand t
10192 '_hypot' in the Windows builds.
10193 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10194 'hypoth'. This avoids a compilation error.
10195
0bdd8eac
AH
101962018-01-26 Alan Hayward <alan.hayward@arm.com>
10197
10198 * MAINTAINERS (Write After Approval): Fix ordering.
10199
56ae9dc3
AH
102002018-01-26 Alan Hayward <alan.hayward@arm.com>
10201
10202 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10203
7433498b
AM
102042018-01-26 Alan Modra <amodra@gmail.com>
10205
10206 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10207 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10208 Remove nop. Make const. Comment.
10209 (powerpc32_plt_stub_so_2): New.
10210 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10211 Correct count. Update uses.
10212 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10213 Move common code reading PLT entry word. Correct
10214 powerpc32_plt_stub PLT address calculation.
10215 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10216 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10217 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10218 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10219 (ppc64_standard_linkage8): Likewise.
10220 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10221 Correct insns description.
10222 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10223
0f59d5fc
PA
102242018-01-24 Pedro Alves <palves@redhat.com>
10225
10226 GCC PR libstdc++/83906
10227 * gdbtypes.c (operator==(const dynamic_prop &,
10228 const dynamic_prop &)): New.
10229 (operator==(const range_bounds &, const range_bounds &)): New.
10230 (check_types_equal): Use them instead of memcmp.
10231 * gdbtypes.h (operator==(const dynamic_prop &,
10232 const dynamic_prop &)): Declare.
10233 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10234 (operator==(const range_bounds &, const range_bounds &)): Declare.
10235 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10236
ef8914a4
PR
102372018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10238
10239 * s390-linux-tdep.c (s390_record_address_mask)
10240 (s390_record_calc_disp_common, s390_record_calc_disp)
10241 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10242 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10243 (s390_process_record): Move to s390-tdep.c.
10244 (s390_linux_init_abi_any): Adjust.
10245 * s390-tdep.c (s390_record_address_mask)
10246 (s390_record_calc_disp_common, s390_record_calc_disp)
10247 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10248 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10249 (s390_process_record): Moved from s390-linux-tdep.c
10250 (s390_gdbarch_init): Adjust.
10251
d6e58945
PR
102522018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10253
10254 * s390-linux-nat.c (s390-tdep.h): New include.
10255 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10256 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10257 (ALLDEPFILES): Add s390-tdep.c.
10258 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10259 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10260 * s390-tdep.h: ...this. New file.
10261 * s390-linux-tdep.c (s390-tdep.h): New include.
10262 (_initialize_s390_tdep): Rename to...
10263 (_initialize_s390_linux_tdep): ...this and adjust.
10264 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10265 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10266 s390-tdep.h.
10267 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10268 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10269 (s390_is_partial_instruction, s390_software_single_step)
10270 (is_non_branch_ril, s390_displaced_step_copy_insn)
10271 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10272 (s390_prologue_data, s390_addr, s390_store, s390_load)
10273 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10274 (s390_register_call_saved, s390_guess_tracepoint_registers)
10275 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10276 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10277 (s390_pseudo_register_name, s390_pseudo_register_type)
10278 (s390_pseudo_register_read, s390_pseudo_register_write)
10279 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10280 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10281 (s390_addr_bits_remove, s390_address_class_type_flags)
10282 (s390_address_class_type_flags_to_name)
10283 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10284 (s390_function_arg_float, s390_function_arg_vector)
10285 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10286 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10287 (s390_frame_align, s390_register_return_value, s390_return_value)
10288 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10289 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10290 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10291 (s390_trad_frame_prev_register, s390_unwind_cache)
10292 (s390_prologue_frame_unwind_cache)
10293 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10294 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10295 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10296 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10297 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10298 (s390_frame_base_address, s390_local_base_address)
10299 (s390_frame_base, s390_gcc_target_options)
10300 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10301 (s390_validate_reg_range, s390_tdesc_valid)
10302 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10303 * s390-tdep.c: ...this. New file.
10304
9c0b896e
PR
103052018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10306
10307 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10308 (s390_process_record, s390_gdbarch_tdep_alloc)
10309 (s390_linux_init_abi_any): Use/set new hook.
10310
7042632b
PR
103112018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10312
10313 * s390-linux-tdep.c (osabi.h): New include.
10314 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10315 (s390_linux_init_abi_any): New functions.
10316 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10317
650f5e13
PR
103182018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10319
10320 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10321 tdesc_has_registers check
10322
47c9317e
PR
103232018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10324
10325 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10326 (s390_validate_reg_range): New macro.
10327 (s390_gdbarch_init): Adjust.
10328
095085d8
PR
103292018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10330
10331 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10332 (s390_gdbarch_tdep_alloc): Adjust.
10333 (s390_gdbarch_init): Adjust.
10334
ab9bcc67
PR
103352018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10336
10337 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10338 <have_tdb>: Change type to bool.
10339 (s390_gdbarch_tdep_alloc): Adjust.
10340 (s390_gdbarch_init): Adjust.
10341
21f6f5ff
PR
103422018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10343
10344 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10345 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10346 (s390_gdbarch_tdep_alloc): New function.
10347 (s390_gdbarch_init): Allocate tdep at start and use its fields
10348 instead of separate variables.
10349
0eb97953
PR
103502018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10351
10352 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10353 when looking for cached gdbarch and add comment for remaining.
10354
5c319bb2
PA
103552018-01-22 Pedro Alves <palves@redhat.com>
10356 Sergio Durigan Junior <sergiodj@redhat.com>
10357
10358 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10359 case.
10360
d65ce302
MR
103612018-01-22 Maciej W. Rozycki <macro@mips.com>
10362
10363 * MAINTAINERS: Update my company e-mail address.
10364
ec7a5fcb
YQ
103652018-01-22 Yao Qi <yao.qi@linaro.org>
10366
10367 * regcache.c (cooked_write_test): New function.
10368 (_initialize_regcache): Register the test.
10369
11f57cb6
YQ
103702018-01-22 Yao Qi <yao.qi@linaro.org>
10371
10372 * ia64-tdep.c (ia64_pseudo_register_read): Call
10373 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10374 * m32c-tdep.c (m32c_cat_read): Likewise.
10375 (m32c_r3r2r1r0_read): Likewise.
10376 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10377 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10378
03f50fc8
YQ
103792018-01-22 Yao Qi <yao.qi@linaro.org>
10380
10381 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10382 method raw_read instead of regcache_raw_read.
10383 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10384 * arm-tdep.c (arm_neon_quad_read): Likewise.
10385 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10386 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10387 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10388 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10389 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10390 (i386_pseudo_register_read_into_value): Likewise.
10391 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10392 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10393 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10394 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10395 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10396 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10397 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10398 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10399 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10400
dc711524
YQ
104012018-01-22 Yao Qi <yao.qi@linaro.org>
10402
10403 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10404 * configure.tgt: Remove target mt.
10405 * mt-tdep.c: Remove.
10406 * regcache.c (cooked_read_test): Remove the check for mt.
10407
3f5a868b
YQ
104082018-01-22 Yao Qi <yao.qi@linaro.org>
10409
10410 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10411 instead of gdbarch_pseudo_register_read_value.
10412
de4cb04a
JB
104132018-01-22 Joel Brobecker <brobecker@adacore.com>
10414
10415 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10416 language is Ada.
10417
a9e40818
JB
104182018-01-22 Joel Brobecker <brobecker@adacore.com>
10419
10420 * linespec.c (create_sals_line_offset): Remove code that preserved
10421 the symtab_and_line's line number.
10422
e707fc44
AB
104232018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10424
10425 * varobj.c (varobj_create): Don't set valid_block when creating a
10426 floating varobj.
10427
03d0bf7b
AB
104282018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10429
10430 * varobj.c (varobj_create): Remove out of date comment.
10431
ae451627
AB
104322018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10433
10434 PR mi/20395
10435 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10436 updating innermost block.
10437 * parse.c (innermost_block_tracker::update): Take extra type
10438 parameter, and check types match before updating innermost block.
10439 (write_dollar_variable): Update innermost block for registers.
10440 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10441 (innermost_block_tracker::innermost_block_tracker): Initialise
10442 m_types member.
10443 (innermost_block_tracker::reset): Take type parameter.
10444 (innermost_block_tracker::update): Take type parameter, and pass
10445 type through as needed.
10446 (innermost_block_tracker::m_types): New member.
10447 * varobj.c (varobj_create): Pass type when reseting innermost
10448 block.
10449
aee1fcdf
AB
104502018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10451
10452 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10453 * ada-lang.c (resolve_subexp): Likewise.
10454 * breakpoint.c (set_breakpoint_condition) Likewise.
10455 (watch_command_1) Likewise.
10456 * c-exp.y (variable): Likewise.
10457 * d-exp.y (PrimaryExpression): Likewise.
10458 * f-exp.y (variable): Likewise.
10459 * go-exp.y (variable): Likewise.
10460 * m2-exp.y (variable): Likewise.
10461 * objfiles.c (objfile::~objfile): Likewise.
10462 * p-exp.y (variable): Likewise.
10463 * parse.c (innermost_block): Change type.
10464 * parser-defs.h (class innermost_block_tracker): New.
10465 (innermost_block): Change to innermost_block_tracker.
10466 * printcmd.c (display_command): Switch to innermost_block API.
10467 (do_one_display): Likewise.
10468 * rust-exp.y (do_one_display): Likewise.
10469 * symfile.c (clear_symtab_users): Likewise.
10470 * varobj.c (varobj_create): Switch to innermost_block API, replace
10471 use of innermost_block with block stored on varobj object.
10472
396af9a1
AB
104732018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10474
10475 * expression.h (innermost_block): Remove declaration.
10476 * varobj.c: Add 'parser-defs.h' include.
10477
fcfcc376
TT
104782018-01-19 Tom Tromey <tom@tromey.com>
10479
10480 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10481 symbols in the static and global blocks.
10482
5a6c3296
JC
104832018-01-19 James Clarke <jrtc27@jrtc27.com>
10484
10485 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10486 gdb_ptrace.h, and move including gdb_wait.h ...
10487 * nat/linux-ptrace.h: ... to here.
10488
bc09b0c1
SM
104892018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10490
10491 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10492 inf_ptrace_detach_success.
10493 (inf_ptrace_detach_success): Add inferior parameter, use it
10494 instead of inferior_ptid, pass it to detach_inferior.
10495 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10496 parameter.
10497 * inferior.c (detach_inferior): Add overload that takes an
10498 inferior object.
10499 * inferior.h (detach_inferior): Likewise.
10500 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10501 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10502 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10503
6e1e1966
SM
105042018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10505
10506 * target.h (struct target_ops) <to_detach>: Add inferior
10507 parameter.
10508 (target_detach): Likewise.
10509 * target.c (dispose_inferior): Pass inferior down.
10510 (target_detach): Pass inferior down. Assert that it is equal to
10511 the current inferior.
10512 * aix-thread.c (aix_thread_detach): Pass inferior down.
10513 * corefile.c (core_file_command): Pass current_inferior() down.
10514 * corelow.c (core_detach): Add inferior parameter.
10515 * darwin-nat.c (darwin_detach): Likewise.
10516 * gnu-nat.c (gnu_detach): Likewise.
10517 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10518 * infcmd.c (detach_command): Pass current_inferior() down to
10519 target_detach.
10520 * infrun.c (follow_fork_inferior): Pass parent_inf to
10521 target_detach.
10522 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10523 target_detach.
10524 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10525 * linux-thread-db.c (thread_db_detach): Likewise.
10526 * nto-procfs.c (procfs_detach): Likewise.
10527 * procfs.c (procfs_detach): Likewise.
10528 * record.c (record_detach): Likewise.
10529 * record.h (struct inferior): Forward-declare.
10530 (record_detach): Add inferior parameter.
10531 * remote-sim.c (gdbsim_detach): Likewise.
10532 * remote.c (remote_detach_1): Likewise.
10533 (remote_detach): Likewise.
10534 (extended_remote_detach): Likewise.
10535 * sol-thread.c (sol_thread_detach): Likewise.
10536 * target-debug.h (target_debug_print_inferior_p): New macro.
10537 * target-delegates.c: Re-generate.
10538 * top.c (kill_or_detach): Pass inferior down to target_detach.
10539 * windows-nat.c (windows_detach): Add inferior parameter.
10540
6bd6f3b6
SM
105412018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10542
10543 * target.h (struct target_ops) <to_detach>: Remove args
10544 parameter.
10545 (target_detach): Likewise.
10546 * target.c (dispose_inferior): Adjust.
10547 (target_detach): Remove args parameter, adjust.
10548 * aix-thread.c (aix_thread_detach): Adjust.
10549 * corefile.c (core_file_command): Adjust.
10550 * corelow.c (core_detach): Adjust.
10551 * darwin-nat.c (darwin_detach): Adjust.
10552 * gnu-nat.c (gnu_detach): Adjust.
10553 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10554 * infcmd.c (detach_command): Adjust
10555 * infrun.c (follow_fork_inferior): Adjust.
10556 (handle_vfork_child_exec_or_exit): Adjust.
10557 * linux-fork.c (linux_fork_detach): Remove args parameter.
10558 * linux-fork.h (linux_fork_detach): Likewise.
10559 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10560 * linux-thread-db.c (thread_db_detach): Likewise.
10561 * nto-procfs.c (procfs_detach): Likewise.
10562 * procfs.c (procfs_detach): Likewise.
10563 (do_detach): Remove signo parameter.
10564 * record.c (record_detach): Remove args parameter.
10565 * record.h (record_detach): Likewise.
10566 * remote-sim.c (gdbsim_detach): Likewise.
10567 * remote.c (remote_detach_1): Likewise.
10568 (remote_detach): Likewise.
10569 (extended_remote_detach): Likewise.
10570 * sol-thread.c (sol_thread_detach): Likewise.
10571 * target-delegates.c: Re-generate.
10572 * top.c (struct qt_args) <args>: Remove field.
10573 (kill_or_detach): Don't pass args.
10574 (quit_force): Don't set args.
10575 * windows-nat.c (windows_detach): Remove args parameter.
10576
88af8ea8
YQ
105772018-01-19 Yao Qi <yao.qi@linaro.org>
10578
10579 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10580 (arm_linux_init_abi): Install it.
10581
dea445b9
YQ
105822018-01-19 Yao Qi <yao.qi@linaro.org>
10583
10584 * osabi.c (gdb_osabi_names): Extend the regexp for
10585 arm-linux-gnueabihf.
10586
4a17f768
YQ
105872018-01-18 Yao Qi <yao.qi@linaro.org>
10588
10589 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10590 m_abbrevs.
10591 (abbrev_table::add_abbrev): Update.
10592 (abbrev_table::lookup_abbrev): Update.
10593
d679c21a
YQ
105942018-01-18 Yao Qi <yao.qi@linaro.org>
10595
10596 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10597
7d937cad
SDJ
105982018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10599
10600 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10601 to "std::string".
10602
9e14690d
TT
106032018-01-17 Tom Tromey <tom@tromey.com>
10604
10605 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10606
50a82047
TT
106072018-01-17 Tom Tromey <tom@tromey.com>
10608
10609 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10610 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10611 (create_array_type_with_stride): Update.
10612 * dwarf2read.c (set_die_type): Update.
10613
c89b44cd
TT
106142018-01-17 Tom Tromey <tom@tromey.com>
10615
10616 * dwarf2read.c (delayed_method_info): Remove typedef.
10617 (dwarf2_cu::method_info): Now a std::vector.
10618 (add_to_method_list): Update.
10619 (free_delayed_list): Remove.
10620 (compute_delayed_physnames): Update.
10621 (process_full_comp_unit, process_full_type_unit): Clear the method
10622 list. Remove cleanups.
10623 (psymtab_include_file_name): Add name_holder parameter. Use
10624 unique_xmalloc_ptr.
10625 (dwarf_decode_lines): Update.
10626
fcd3b13d
SM
106272018-01-17 Tom Tromey <tom@tromey.com>
10628 Simon Marchi <simon.marchi@ericsson.com>
10629
10630 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10631 (dwarf2_per_objfile::free_cached_comp_units)
10632 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10633 (init_cutu_and_read_dies_no_follow): Update.
10634 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10635 (dwarf2_cu::~dwarf2_cu): New.
10636 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10637 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10638
685af9cd
TT
106392018-01-17 Tom Tromey <tom@tromey.com>
10640 Simon Marchi <simon.marchi@ericsson.com>
10641
10642 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10643 (struct die_reader_specs) <abbrev_table>: New member.
10644 (struct abbrev_table): Add constructor.
10645 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10646 <abbrev_obstack>: Now an auto_obstack.
10647 (abbrev_table_up): New typedef.
10648 (init_cu_die_reader): Add abbrev_table parameter.
10649 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10650 Add result_dwo_abbrev_table.
10651 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10652 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10653 Update.
10654 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10655 parameter.
10656 (skip_children): Update.
10657 (abbrev_table::alloc_abbrev): Rename from
10658 abbrev_table_alloc_abbrev.
10659 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10660 (abbrev_table::lookup_abbrev): Rename from
10661 abbrev_table_lookup_abbrev.
10662 (abbrev_table_read_table): Return abbrev_table_up.
10663 (abbrev_table_free, abbrev_table_free_cleanup)
10664 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10665 (load_partial_dies): Update.
10666
5e2db402
TT
106672018-01-17 Tom Tromey <tom@tromey.com>
10668
10669 * dwarf2read.c (dwarf2_compute_name): Update comment.
10670 (read_func_scope, read_variable): Update.
10671 (new_symbol): Remove.
10672 (new_symbol_full): Rename to new_symbol.
10673
ee7f689e 106742018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
10675
10676 PR gdb/16577
10677 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10678 a warning instead of throwing an error, set section size to 0 and return
10679 NULL.
10680 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10681
4d9b86e1
SM
106822018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10683
10684 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10685 std::string.
10686 (linux_ptrace_attach_fail_reason_string): Likewise.
10687 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10688 Likewise.
10689 (linux_ptrace_attach_fail_reason_string): Likewise.
10690 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10691
a7b2d0fb
SM
106922018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10693
10694 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10695
f517c180
EA
106962018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10697
10698 PR gdb/21559
10699 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10700 checking for fs_base/gs_base fields in struct user_regs_struct.
10701 * configure: Regenerate.
10702
7045b1ca
YQ
107032018-01-17 Yao Qi <yao.qi@linaro.org>
10704
10705 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10706 function.
10707 (aarch64_linux_init_abi): Install it to gdbarch hook
10708 gcc_target_options.
10709
db422fb2
PA
107102018-01-15 Pedro Alves <palves@redhat.com>
10711
10712 * common/signals-state-save-restore.c
10713 (save_original_signals_state): Fix typos.
10714
ba643918
SDJ
107152017-01-12 Tom Tromey <tom@tromey.com>
10716 Sergio Durigan Junior <sergiodj@redhat.com>
10717
10718 * Makefile.in (install-only): Install gdb-add-index.
10719
906b4aac
JB
107202018-01-12 John Baldwin <jhb@FreeBSD.org>
10721
10722 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10723
bdf2a94a
AA
107242018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10725
10726 * infrun.c (keep_going_pass_signal): Clear step-over info when
10727 insert_breakpoints fails.
10728
71d378ae
PA
107292018-01-11 Pedro Alves <palves@redhat.com>
10730
10731 PR gdb/22583
10732 * infrun.c (resume): Rename to ...
10733 (resume_1): ... this.
10734 (resume): Reimplement as wrapper around resume_1.
10735
3cada740
PA
107362018-01-11 Pedro Alves <palves@redhat.com>
10737
10738 PR remote/22597
10739 * remote.c (remote_parse_stop_reply): Default to the last-set
10740 general thread instead of to 'magic_null_ptid'.
10741
618daa93
PA
107422018-01-10 Pedro Alves <palves@redhat.com>
10743
10744 * language.h (language_get_symbol_name_matcher): Rename ...
10745 (get_symbol_name_matcher): ... this.
10746 * language.c (language_get_symbol_name_matcher): Ditto.
10747 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10748 callers adjusted.
10749
c63d3e8d
PA
107502018-01-10 Pedro Alves <palves@redhat.com>
10751
10752 PR gdb/22670
10753 * dwarf2read.c
10754 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10755 Adjust to use language_get_symbol_name_matcher instead of
10756 language_defn::la_get_symbol_name_matcher.
10757 * language.c (language_get_symbol_name_matcher): If in Ada mode
10758 and the lookup name is a verbatim match, return Ada's matcher.
10759 * language.h (language_get_symbol_name_matcher): Adjust comment.
10760 (ada_lookup_name_info::verbatim_p):: New method.
10761
d4c2a405
PA
107622018-01-10 Pedro Alves <palves@redhat.com>
10763
10764 PR gdb/22670
10765 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10766 minsym's language is language_auto or language_cplus, pass down
10767 language_ada instead.
10768 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10769
8825213e
PA
107702018-01-10 Pedro Alves <palves@redhat.com>
10771
10772 PR gdb/22670
10773 * minsyms.c (linkage_name_str): New function.
10774 (iterate_over_minimal_symbols): Use it.
10775
2d97a5d9
JB
107762018-01-09 John Baldwin <jhb@FreeBSD.org>
10777
10778 * NEWS: Document that 'info proc' now works on FreeBSD.
10779
92fce24d
JB
107802018-01-09 John Baldwin <jhb@FreeBSD.org>
10781
10782 * configure.ac: Check for kinfo_getfile in libutil.
10783 * configure: Regenerate.
10784 * config.in: Regenerate.
10785 * fbsd-nat.c: Include "fbsd-tdep.h".
10786 (fbsd_fetch_cmdline): New.
10787 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10788 rather than calling error.
10789 (fbsd_info_proc): New.
10790 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
10791 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
10792 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
10793
262f62f5
JB
107942018-01-09 John Baldwin <jhb@FreeBSD.org>
10795
10796 * fbsd-nat.c (struct free_deleter): Remove.
10797 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
10798
b999e203
JB
107992018-01-09 John Baldwin <jhb@FreeBSD.org>
10800
10801 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
10802 NULL for an empty pathname.
10803
d2176225
JB
108042018-01-09 John Baldwin <jhb@FreeBSD.org>
10805
10806 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
10807 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
10808 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
10809 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
10810 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
10811 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
10812 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
10813 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
10814 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
10815 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
10816 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
10817 (fbsd_core_fetch_timeval, fbsd_print_sigset)
10818 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
10819 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
10820 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
10821
9c4ac400
ST
108222018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
10823
10824 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
10825 (gnu_xfer_auxv): New function.
10826 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
10827 TARGET_OBJECT_AUXV.
10828
1e5ded6c
YQ
108292018-01-08 Yao Qi <yao.qi@linaro.org>
10830 Simon Marchi <simon.marchi@ericsson.com>
10831
10832 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
10833 common/selftest.c.
10834 (COMMON_OBS): Remove selftest.o.
10835 * configure.ac: Append selftest-arch.c and common/selftest.c to
10836 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
10837 * configure: Re-generated.
10838 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
10839 GDB_SELF_TEST.
10840 (maintenance_info_selftests): Likewise.
10841
04bafb1e
XR
108422018-01-08 Xavier Roirand <roirand@adacore.com>
10843
10844 * ada-valprint.c (val_print_packed_array_elements): Use
10845 proper number of elements when printing an array indexed
10846 by an enumeration type.
10847
518817b3
SM
108482018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
10849
10850 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
10851 (dw2_get_file_names_reader): Adjust.
10852 (lookup_dwo_signatured_type): Adjust.
10853 (lookup_dwp_signatured_type): Adjust.
10854 (lookup_signatured_type): Adjust.
10855 (create_type_unit_group): Adjust.
10856 (get_type_unit_group): Adjust.
10857 (process_psymtab_comp_unit_reader): Adjust.
10858 (build_type_psymtabs_reader): Adjust.
10859 (scan_partial_symbols): Adjust.
10860 (add_partial_symbol): Adjust.
10861 (add_partial_subprogram): Adjust.
10862 (peek_die_abbrev): Adjust.
10863 (fixup_go_packaging): Adjust.
10864 (process_imported_unit_die): Adjust.
10865 (dwarf2_compute_name): Adjust.
10866 (dwarf2_physname): Adjust.
10867 (read_import_statement): Adjust.
10868 (handle_DW_AT_stmt_list): Adjust.
10869 (read_file_scope): Adjust.
10870 (read_func_scope): Adjust.
10871 (read_lexical_block_scope): Adjust.
10872 (read_call_site_scope): Adjust.
10873 (read_variable): Adjust.
10874 (dwarf2_rnglists_process): Adjust.
10875 (dwarf2_ranges_process): Adjust.
10876 (dwarf2_ranges_read): Adjust.
10877 (dwarf2_get_pc_bounds): Adjust.
10878 (dwarf2_record_block_ranges): Adjust.
10879 (dwarf2_add_field): Adjust.
10880 (dwarf2_add_member_fn): Adjust.
10881 (read_structure_type): Adjust.
10882 (process_structure_scope): Adjust.
10883 (read_enumeration_type): Adjust.
10884 (read_array_type): Adjust.
10885 (mark_common_block_symbol_computed): Adjust.
10886 (read_common_block): Adjust.
10887 (read_namespace_type): Adjust.
10888 (read_namespace): Adjust.
10889 (read_module_type): Adjust.
10890 (read_tag_pointer_type): Adjust.
10891 (read_tag_ptr_to_member_type): Adjust.
10892 (read_tag_string_type): Adjust.
10893 (read_subroutine_type): Adjust.
10894 (read_typedef): Adjust.
10895 (read_base_type): Adjust.
10896 (attr_to_dynamic_prop): Adjust.
10897 (read_subrange_type): Adjust.
10898 (read_unspecified_type): Adjust.
10899 (dwarf2_read_abbrevs): Adjust.
10900 (load_partial_dies): Adjust.
10901 (read_partial_die): Adjust.
10902 (find_partial_die): Adjust.
10903 (guess_partial_die_structure_name): Adjust.
10904 (fixup_partial_die): Adjust.
10905 (read_attribute_value): Adjust.
10906 (read_addr_index): Adjust.
10907 (read_addr_index_from_leb128): Adjust.
10908 (read_str_index): Adjust.
10909 (dwarf2_string_attr): Adjust.
10910 (get_debug_line_section): Adjust.
10911 (dwarf_decode_line_header): Adjust.
10912 (lnp_state_machine::check_line_address): Adjust.
10913 (dwarf_decode_lines_1): Adjust.
10914 (dwarf_decode_lines): Adjust.
10915 (dwarf2_start_symtab): Adjust.
10916 (var_decode_location): Adjust.
10917 (new_symbol_full): Adjust.
10918 (dwarf2_const_value_data): Adjust.
10919 (dwarf2_const_value_attr): Adjust.
10920 (dwarf2_const_value): Adjust.
10921 (die_type): Adjust.
10922 (die_containing_type): Adjust.
10923 (build_error_marker_type): Adjust.
10924 (lookup_die_type): Adjust.
10925 (guess_full_die_structure_name): Adjust.
10926 (anonymous_struct_prefix): Adjust.
10927 (determine_prefix): Adjust.
10928 (dwarf2_name): Adjust.
10929 (follow_die_ref_or_sig): Adjust.
10930 (follow_die_offset): Adjust.
10931 (follow_die_ref): Adjust.
10932 (follow_die_sig_1): Adjust.
10933 (follow_die_sig): Adjust.
10934 (get_signatured_type): Adjust.
10935 (get_DW_AT_signature_type): Adjust.
10936 (decode_locdesc): Adjust.
10937 (dwarf_decode_macros): Adjust.
10938 (cu_debug_loc_section): Adjust.
10939 (fill_in_loclist_baton): Adjust.
10940 (dwarf2_symbol_mark_computed): Adjust.
10941 (init_one_comp_unit): Don't assign
10942 dwarf2_cu::dwarf2_per_objfile.
10943 (set_die_type): Adjust.
10944
ed2dc618
SM
109452018-01-07 Simon Marchi <simon.marchi@ericsson.com>
10946
10947 * dwarf2read.c (struct mapped_debug_names): Add constructor.
10948 <dwarf2_per_objfile>: New field.
10949 (dwarf2_per_objfile): Remove global.
10950 (get_dwarf2_per_objfile): New function.
10951 (set_dwarf2_per_objfile): New function.
10952 (dwarf2_build_psymtabs_hard): Change objfile parameter to
10953 dwarf2_per_objfile.
10954 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
10955 (read_abbrev_offset): Likewise.
10956 (read_indirect_string): Likewise.
10957 (read_indirect_line_string): Likewise.
10958 (read_indirect_string_at_offset): Likewise.
10959 (read_indirect_string_from_dwz): Likewise.
10960 (dwarf2_find_containing_comp_unit): Change objfile parameter to
10961 dwarf2_per_objfile.
10962 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
10963 (create_all_comp_units): Change objfile parameter to
10964 dwarf2_per_objfile.
10965 (create_all_type_units): Likewise.
10966 (process_queue): Add dwarf2_per_objfile parameter.
10967 (read_and_check_comp_unit_head): Likewise.
10968 (lookup_dwo_unit_in_dwp): Likewise.
10969 (get_dwp_file): Likewise.
10970 (process_cu_includes): Likewise.
10971 (struct free_dwo_file_cleanup_data): New struct.
10972 (dwarf2_has_info): Use get_dwarf2_per_objfile and
10973 set_dwarf2_per_objfile.
10974 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
10975 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
10976 context, adjust calls.
10977 (dw2_instantiate_symtab): Likewise.
10978 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
10979 (dw2_get_cu): Likewise.
10980 (create_cu_from_index_list): Change objfile parameter to
10981 dwarf2_per_objfile.
10982 (create_cus_from_index_list): Get dwarf2_per_objfile from
10983 context, adjust calls.
10984 (create_cus_from_index): Likewise.
10985 (create_signatured_type_table_from_index): Change objfile
10986 parameter to dwarf2_per_objfile.
10987 (create_signatured_type_table_from_debug_names): Change objfile
10988 parameter to dwarf2_per_objfile.
10989 (create_addrmap_from_index): Likewise.
10990 (create_addrmap_from_aranges): Likewise.
10991 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
10992 (dw2_setup): Remove.
10993 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
10994 context.
10995 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
10996 get_dwarf2_per_objfile.
10997 (dw2_forget_cached_source_info): Likewise.
10998 (dw2_map_symtabs_matching_filename): Likewise.
10999 (struct dw2_symtab_iterator) <index>: Remove.
11000 <dwarf2_per_objfile>: New field.
11001 (dw2_symtab_iter_init): Replace index parameter with
11002 dwarf2_per_objfile.
11003 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11004 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11005 (dw2_print_stats): Likewise.
11006 (dw2_dump): Likewise.
11007 (dw2_expand_symtabs_for_function): Likewise.
11008 (dw2_expand_all_symtabs): Likewise.
11009 (dw2_expand_symtabs_with_fullname): Likewise.
11010 (dw2_expand_marked_cus): Replace index and objfile parameters
11011 with dwarf2_per_objfile.
11012 (dw_expand_symtabs_matching_file_matcher): Add
11013 dwarf2_per_objfile parameter and adjust calls.
11014 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11015 adjust calls.
11016 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11017 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11018 adjust calls.
11019 (create_cus_from_debug_names_list): Replace objfile parameter
11020 with dwarf2_per_objfile and adjust calls.
11021 (create_cus_from_debug_names): Likewise.
11022 (dwarf2_read_debug_names): Likewise.
11023 (mapped_debug_names::namei_to_name): Adjust call.
11024 (dw2_debug_names_iterator::next): Likewise.
11025 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11026 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11027 (dw2_debug_names_dump): Likewise.
11028 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11029 (dw2_debug_names_expand_symtabs_matching): Likewise.
11030 (dwarf2_initialize_objfile): Likewise.
11031 (dwarf2_build_psymtabs): Likewise.
11032 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11033 this_cu.
11034 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11035 (read_and_check_comp_unit_head): Likewise.
11036 (read_abbrev_offset): Likewise.
11037 (create_debug_type_hash_table): Likewise.
11038 (create_debug_types_hash_table): Likewise.
11039 (create_all_type_units): Replace objfile parameter with
11040 dwarf2_per_objfile.
11041 (add_type_unit): Add dwarf2_per_objfile parameter.
11042 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11043 with dwarf2_per_objfile.
11044 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11045 (lookup_dwp_signatured_type): Likewise.
11046 (lookup_signatured_type): Likewise.
11047 (read_cutu_die_from_dwo): Likewise.
11048 (init_tu_and_read_dwo_dies): Likewise.
11049 (init_cutu_and_read_dies): Likewise.
11050 (init_cutu_and_read_dies_no_follow): Likewise.
11051 (allocate_type_unit_groups_table): Add objfile parameter.
11052 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11053 (get_type_unit_group): Likewise.
11054 (process_psymtab_comp_unit): Update call.
11055 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11056 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11057 (print_tu_stats): Likewise.
11058 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11059 in void* parameter.
11060 (build_type_psymtabs): Change objfile parameter to
11061 dwarf2_per_objfile.
11062 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11063 passed in void* parameter.
11064 (process_skeletonless_type_units): Change objfile parameter to
11065 dwarf2_per_objfile.
11066 (set_partial_user): Likewise.
11067 (dwarf2_build_psymtabs_hard): Likewise.
11068 (read_comp_units_from_section): Likewise.
11069 (create_all_comp_units): Likewise.
11070 (scan_partial_symbols): Update calls.
11071 (add_partial_symbol): Likewise.
11072 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11073 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11074 (process_queue): Add dwarf2_per_objfile parameter.
11075 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11076 (compute_compunit_symtab_includes): Likewise.
11077 (process_cu_includes): Add dwarf2_per_objfile parameter.
11078 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11079 (process_full_type_unit): Likewise.
11080 (process_imported_unit_die): Update call.
11081 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11082 (read_file_scope): Likewise.
11083 (allocate_dwo_file_hash_table): Add objfile parameter.
11084 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11085 (create_cus_hash_table): Likewise.
11086 (create_dwp_hash_table): Likewise.
11087 (create_dwo_unit_in_dwp_v1): Likewise.
11088 (create_dwp_v2_section): Likewise.
11089 (create_dwo_unit_in_dwp_v2): Likewise.
11090 (lookup_dwo_unit_in_dwp): Likewise.
11091 (try_open_dwop_file): Likewise.
11092 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11093 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11094 cleanup to include a reference to dwarf2_per_objfile.
11095 (open_dwp_file): Add dwarf2_per_objfile parameter.
11096 (open_and_init_dwp_file): Likewise.
11097 (get_dwp_file): Likewise.
11098 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11099 (queue_and_load_all_dwo_tus): Update call.
11100 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11101 data.
11102 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11103 (dwarf2_ranges_process): Likewise.
11104 (dwarf2_get_pc_bounds): Likewise.
11105 (mark_common_block_symbol_computed): Likewise.
11106 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11107 (dwarf2_read_abbrevs): Update call.
11108 (read_partial_die): Use dwarf2_per_objfile from cu.
11109 (find_partial_die): Likewise.
11110 (fixup_partial_die): Likewise.
11111 (read_attribute_value): Likewise.
11112 (read_indirect_string_at_offset_from): Add objfile parameter.
11113 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11114 parameter.
11115 (read_indirect_string_from_dwz): Add objfile parameter.
11116 (read_indirect_string): Add objfile parameter.
11117 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11118 (read_addr_index): Use dwarf2_per_objfile from cu.
11119 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11120 call dw2_setup.
11121 (read_str_index): Use dwarf2_per_objfile from cu.
11122 (get_debug_line_section): Likewise.
11123 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11124 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11125 (new_symbol_full): Use dwarf2_per_objfile from cu.
11126 (build_error_marker_type): Likewise.
11127 (lookup_die_type): Likewise.
11128 (determine_prefix): Likewise.
11129 (follow_die_offset): Likewise.
11130 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11131 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11132 (dwarf2_fetch_die_type_sect_off): Likewise.
11133 (dwarf2_get_die_type): Likewise.
11134 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11135 (get_signatured_type): Likewise.
11136 (get_DW_AT_signature_type): Likewise.
11137 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11138 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11139 (cu_debug_loc_section): Likewise.
11140 (fill_in_loclist_baton): Likewise.
11141 (dwarf2_symbol_mark_computed): Likewise.
11142 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11143 dwarf2_per_objfile.
11144 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11145 parameter.
11146 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11147 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11148 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11149 (set_die_type): Use dwarf2_free_objfile from cu.
11150 (get_die_type_at_offset): Likewise.
11151 (dwarf2_per_objfile_free): Don't assign global variable.
11152 (debug_names) <constructor>: Add dwarf2_per_objfile
11153 parameter, update m_debugstrlookup construction.
11154 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11155 parameter.
11156 <m_dwarf2_per_objfile>: New field.
11157 <lookup>: Use m_dwarf2_per_objfile.
11158 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11159 (psyms_seen_size): Likewise.
11160 (write_gdbindex): Replace objfile parameter with
11161 dwarf2_per_objfile.
11162 (write_debug_names): Likewise.
11163 (write_psymtabs_to_index): Likewise.
11164 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11165 calls.
11166
e3b94546
SM
111672018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11168
11169 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11170 <dwarf2_per_objfile>: New field.
11171 (struct dwarf2_per_cu_data) <objfile>: Remove.
11172 <dwarf2_per_objfile>: New field.
11173 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11174 of objfile.
11175 (create_signatured_type_table_from_index): Likewise.
11176 (create_debug_type_hash_table): Likewise.
11177 (fill_in_sig_entry_from_dwo_entry): Likewise.
11178 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11179 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11180 objfile.
11181 (create_partial_symtab): Access objfile through
11182 dwarf2_per_objfile.
11183 (process_psymtab_comp_unit_reader): Likewise.
11184 (read_comp_units_from_section): Likewise.
11185 (scan_partial_symbols): Likewise.
11186 (add_partial_symbol): Likewise.
11187 (add_partial_subprogram): Likewise.
11188 (peek_die_abbrev): Likewise.
11189 (fixup_go_packaging): Likewise.
11190 (process_full_comp_unit): Likewise.
11191 (process_full_type_unit): Likewise.
11192 (process_imported_unit_die): Likewise.
11193 (dwarf2_compute_name): Likewise.
11194 (dwarf2_physname): Likewise.
11195 (read_import_statement): Likewise.
11196 (create_cus_hash_table): Assign dwarf2_physname instead of
11197 objfile.
11198 (read_func_scope): Access objfile through dwarf2_per_objfile.
11199 (read_lexical_block_scope): Likewise.
11200 (read_call_site_scope): Likewise.
11201 (read_variable): Likewise.
11202 (dwarf2_rnglists_process): Likewise.
11203 (dwarf2_ranges_process): Likewise.
11204 (dwarf2_ranges_read): Likewise.
11205 (dwarf2_record_block_ranges): Likewise.
11206 (dwarf2_add_field): Likewise.
11207 (dwarf2_add_member_fn): Likewise.
11208 (read_structure_type): Likewise.
11209 (process_structure_scope): Likewise.
11210 (read_enumeration_type): Likewise.
11211 (read_array_type): Likewise.
11212 (read_common_block): Likewise.
11213 (read_namespace_type): Likewise.
11214 (read_namespace): Likewise.
11215 (read_module_type): Likewise.
11216 (read_tag_pointer_type): Likewise.
11217 (read_tag_ptr_to_member_type): Likewise.
11218 (read_tag_string_type): Likewise.
11219 (read_subroutine_type): Likewise.
11220 (read_typedef): Likewise.
11221 (read_base_type): Likewise.
11222 (attr_to_dynamic_prop): Likewise.
11223 (read_subrange_type): Likewise.
11224 (read_unspecified_type): Likewise.
11225 (load_partial_dies): Likewise.
11226 (read_partial_die): Likewise.
11227 (find_partial_die): Likewise.
11228 (guess_partial_die_structure_name): Likewise.
11229 (fixup_partial_die): Likewise.
11230 (read_attribute_value): Likewise.
11231 (read_addr_index_from_leb128): Likewise.
11232 (dwarf2_read_addr_index): Likewise.
11233 (dwarf2_string_attr): Likewise.
11234 (lnp_state_machine::check_line_address): Likewise.
11235 (dwarf_decode_lines_1): Likewise.
11236 (dwarf_decode_lines): Likewise.
11237 (dwarf2_start_symtab): Likewise.
11238 (var_decode_location): Likewise.
11239 (new_symbol_full): Likewise.
11240 (dwarf2_const_value_data): Likewise.
11241 (dwarf2_const_value_attr): Likewise.
11242 (dwarf2_const_value): Likewise.
11243 (die_type): Likewise.
11244 (die_containing_type): Likewise.
11245 (lookup_die_type): Likewise.
11246 (guess_full_die_structure_name): Likewise.
11247 (anonymous_struct_prefix): Likewise.
11248 (dwarf2_name): Likewise.
11249 (follow_die_ref_or_sig): Likewise.
11250 (follow_die_offset): Likewise.
11251 (follow_die_ref): Likewise.
11252 (dwarf2_fetch_die_loc_sect_off): Likewise.
11253 (dwarf2_fetch_constant_bytes): Likewise.
11254 (dwarf2_fetch_die_type_sect_off): Likewise.
11255 (dwarf2_get_die_type): Likewise.
11256 (follow_die_sig): Likewise.
11257 (decode_locdesc): Likewise.
11258 (dwarf2_per_cu_objfile): Likewise.
11259 (dwarf2_per_cu_text_offset): Likewise.
11260 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11261 objfile.
11262 (set_die_type): Access objfile through
11263 dwarf2_per_objfile.
11264
b01ba14d
SM
112652018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11266
11267 * valprint.c (converted_character_d): Remove typedef.
11268 (DEF_VEC_O (converted_character_d)): Remove.
11269 (count_next_character): Use std::vector.
11270 (print_converted_chars_to_obstack): Likewise.
11271 (generic_printstr): Likewise.
11272
4d0fdd9b
SM
112732018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11274
11275 * xml-support.h (struct gdb_xml_value): Add constructor.
11276 <value>: Change type to unique_xmalloc_ptr.
11277 (gdb_xml_value_s): Remove typedef.
11278 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11279 (gdb_xml_element_start_handler): Change parameter type to
11280 std::vector.
11281 (xml_find_attribute): Likewise.
11282 * xml-support.c (xml_find_attribute): Change parameter type to
11283 std::vector and adjust.
11284 (gdb_xml_values_cleanup): Remove.
11285 (gdb_xml_parser::start_element): Adjust to std::vector.
11286 (xinclude_start_include): Change paraeter type to std::vector
11287 and adjust.
11288 * btrace.c (check_xml_btrace_version): Likewise.
11289 (parse_xml_btrace_block): Likewise.
11290 (parse_xml_btrace_pt_config_cpu): Likewise.
11291 (parse_xml_btrace_pt): Likewise.
11292 (parse_xml_btrace_conf_bts): Likewise.
11293 (parse_xml_btrace_conf_pt): Likewise.
11294 * memory-map.c (memory_map_start_memory): Likewise.
11295 (memory_map_start_property): Likewise.
11296 * osdata.c (osdata_start_osdata): Likewise.
11297 (osdata_start_item): Likewise.
11298 (osdata_start_column): Likewise.
11299 * remote.c (start_thread): Likewise.
11300 * solib-aix.c (library_list_start_library): Likewise.
11301 (library_list_start_list): Likewise.
11302 * solib-svr4.c (library_list_start_library): Likewise.
11303 (svr4_library_list_start_list): Likewise.
11304 * solib-target.c (library_list_start_segment): Likewise.
11305 (library_list_start_section): Likewise.
11306 (library_list_start_library): Likewise.
11307 (library_list_start_list): Likewise.
11308 * tracepoint.c (traceframe_info_start_memory): Likewise.
11309 (traceframe_info_start_tvar): Likewise.
11310 * xml-syscall.c (syscall_start_syscall): Likewise.
11311 * xml-tdesc.c (tdesc_start_target): Likewise.
11312 (tdesc_start_feature): Likewise.
11313 (tdesc_start_reg): Likewise.
11314 (tdesc_start_union): Likewise.
11315 (tdesc_start_struct): Likewise.
11316 (tdesc_start_flags): Likewise.
11317 (tdesc_start_enum): Likewise.
11318 (tdesc_start_field): Likewise.
11319 (tdesc_start_enum_value): Likewise.
11320 (tdesc_start_vector): Likewise.
11321
f979c73f
SM
113222018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11323
11324 * extension.h (struct xmethod_worker) <clone>: Remove.
11325 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11326 Remove.
11327 (python_xmethod_worker::clone): Remove.
11328 * valops.c (find_overload_match): Use std::move instead of
11329 clone.
11330
ba18742c
SM
113312018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11332
11333 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11334 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11335 <free_xmethod_worker_data>: Remove.
11336 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11337 <get_xmethod_arg_types>: Remove.
11338 <get_xmethod_result_type>: Remove.
11339 <invoke_xmethod>: Remove.
11340 * extension.c (new_xmethod_worker): Remove.
11341 (clone_xmethod_worker): Remove.
11342 (get_matching_xmethod_workers): Return void, pass std::vector by
11343 pointer.
11344 (get_xmethod_arg_types): Rename to...
11345 (xmethod_worker::get_arg_types): ... this, and adjust.
11346 (get_xmethod_result_type): Rename to...
11347 (xmethod_worker::get_result_type): ... this, and adjust.
11348 (invoke_xmethod): Remove.
11349 (free_xmethod_worker): Remove.
11350 (free_xmethod_worker_vec): Remove.
11351 * extension.h (enum ext_lang_rc): Move here from
11352 extension-priv.h.
11353 (struct xmethod_worker): Add constructor and destructor.
11354 <data>: Remove.
11355 <value>: Remove.
11356 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11357 virtual pure methods.
11358 <get_arg_types, get_result_type>: New methods.
11359 (xmethod_worker_ptr): Remove typedef.
11360 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11361 (xmethod_worker_vec): Remove typedef.
11362 (xmethod_worker_up): New typedef.
11363 (invoke_xmethod): Remove.
11364 (clone_xmethod_worker): Remove.
11365 (free_xmethod_worker): Remove.
11366 (free_xmethod_worker_vec): Remove.
11367 (get_xmethod_arg_types): Remove.
11368 (get_xmethod_result_type): Remove.
11369 * valops.c (find_method_list): Use std::vector, don't use
11370 intermediate vector.
11371 (value_find_oload_method_list): Use std::vector.
11372 (find_overload_match): Use std::vector.
11373 (find_oload_champ): Use std::vector.
11374 * value.c (value_free): Use operator delete.
11375 (value_of_xmethod): Rename to...
11376 (value_from_xmethod): ... this. Don't assign
11377 xmethod_worker::value, take rvalue-reference.
11378 (result_type_of_xmethod): Adjust.
11379 (call_xmethod): Adjust.
11380 * value.h: Include extension.h.
11381 (struct xmethod_worker): Don't forward-declare.
11382 (value_of_xmethod): Rename to...
11383 (value_from_xmethod): ... this, take rvalue-reference.
11384 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11385 (struct python_xmethod_worker): ... this, add constructor and
11386 destructor.
11387 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11388 (gdbpy_free_xmethod_worker_data): Rename to...
11389 (python_xmethod_worker::~python_xmethod_worker): ... this and
11390 adjust.
11391 (gdbpy_clone_xmethod_worker_data): Rename to...
11392 (python_xmethod_worker::clone): ... this and adjust.
11393 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11394 temporary vector.
11395 (gdbpy_get_xmethod_arg_types): Rename to...
11396 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11397 (gdbpy_get_xmethod_result_type): Rename to...
11398 (python_xmethod_worker::do_get_result_type): ... this and
11399 adjust.
11400 (gdbpy_invoke_xmethod): Rename to...
11401 (python_xmethod_worker::invoke): ... this and adjust.
11402 (new_python_xmethod_worker): Rename to...
11403 (python_xmethod_worker::python_xmethod_worker): ... this and
11404 adjust.
11405 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11406 Remove.
11407 (gdbpy_free_xmethod_worker_data): Remove.
11408 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11409 (gdbpy_get_xmethod_arg_types): Remove.
11410 (gdbpy_get_xmethod_result_type): Remove.
11411 (gdbpy_invoke_xmethod): Remove.
11412 * python/python.c (python_extension_ops): Remove obsolete
11413 callbacks.
11414
e379cee6
PA
114152018-01-05 Pedro Alves <palves@redhat.com>
11416
11417 PR gdb/18653
11418 * common/signals-state-save-restore.c
11419 (save_original_signals_state): New parameter 'quiet'. Warn if we
11420 find a custom handler preinstalled, instead of internal erroring.
11421 But only warn if !quiet.
11422 * common/signals-state-save-restore.h
11423 (save_original_signals_state): New parameter 'quiet'.
11424 * main.c (captured_main_1): Move save_original_signals_state call
11425 after option handling, and pass QUIET.
11426
a655456c
PA
114272018-01-05 Pedro Alves <palves@redhat.com>
11428
11429 * spu-tdep.c (spu_catch_start): Pass
11430 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11431
de63c46b
PA
114322018-01-05 Pedro Alves <palves@redhat.com>
11433
11434 PR gdb/22670
11435 * ada-lang.c (literal_symbol_name_matcher): New function.
11436 (ada_get_symbol_name_matcher): Use it for
11437 symbol_name_match_type::SEARCH_NAME.
11438 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11439 it down instead of assuming symbol_name_match_type::FULL.
11440 * block.h (block_lookup_symbol): New parameter 'match_type'.
11441 * c-valprint.c (print_unpacked_pointer): Use
11442 lookup_symbol_search_name instead of lookup_symbol.
11443 * compile/compile-object-load.c (get_out_value_type): Pass down
11444 symbol_name_match_type::SEARCH_NAME.
11445 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11446 symbol_name_match_type::FULL.
11447 * cp-support.c (cp_get_symbol_name_matcher): Handle
11448 symbol_name_match_type::SEARCH_NAME.
11449 * infrun.c (insert_exception_resume_breakpoint): Use
11450 lookup_symbol_search_name.
11451 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11452 * psymtab.c (maintenance_check_psymtabs): Use
11453 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11454 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11455 SYMBOL_SEARCH_NAME.
11456 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11457 if symbol_name_match_type::SEARCH_NAME.
11458 (lookup_symbol_in_language): Pass down
11459 symbol_name_match_type::FULL.
11460 (lookup_symbol_search_name): New.
11461 (lookup_language_this): Pass down
11462 symbol_name_match_type::SEARCH_NAME.
11463 (lookup_symbol_aux, lookup_local_symbol): New parameter
11464 'match_type'. Pass it down.
11465 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11466 (lookup_symbol_search_name): New declaration.
11467 (lookup_symbol_in_block): New 'match_type' parameter.
11468
f98fc17b
PA
114692018-01-05 Pedro Alves <palves@redhat.com>
11470
11471 PR gdb/22670
11472 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11473 ada_lookup_symbol.
11474 (ada_lookup_symbol): Reimplement in terms of
11475 ada_lookup_symbol_list, bits factored out from
11476 ada_lookup_encoded_symbol.
11477
342f8240
JB
114782018-01-05 Joel Brobecker <brobecker@adacore.com>
11479
11480 * ada-exp.y (write_object_renaming): When subscripting an array
11481 using a symbol as the index, pass the block in call to
11482 ada_lookup_encoded_symbol when looking that symbol up.
11483
7150d33c
JG
114842018-01-05 Jerome Guitton <guitton@adacore.com>
11485
11486 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11487 TYPE_INDEX_TYPE.
11488
cc0e770c
JB
114892018-01-05 Joel Brobecker <brobecker@adacore.com>
11490
11491 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11492 the case where VALUE_LVAL (val0) is not lval_memory.
11493
f79da888 114942018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11495
11496 * ada-valprint.c (print_optional_low_bound): Handle
11497 character-indexed array printing like boolean-indexed array
11498 printing.
11499
cd385f94
JB
115002018-01-05 Joel Brobecker <brobecker@adacore.com>
11501
11502 * NEWS: Create a new section for the next release branch.
11503 Rename the section of the current branch, now that it has
11504 been cut.
11505
09aca949
JB
115062018-01-05 Joel Brobecker <brobecker@adacore.com>
11507
11508 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11509 * version.in: Bump version to 8.1.50.DATE-git.
11510
9f757bf7
XR
115112018-01-03 Xavier Roirand <roirand@adacore.com>
11512
11513 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11514 Add field.
11515 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11516 Add field.
11517 (default_exception_support_info) <catch_handlers_sym>: Add field.
11518 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11519 (ada_exception_name_addr_1): Add "catch handlers" handling.
11520 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11521 Update all callers.
11522 (create_excep_cond_exprs) <ex>: Add parameter.
11523 (re_set_exception): Update create_excep_cond_exprs call.
11524 (print_it_exception, print_one_exception, print_mention_exception)
11525 (print_recreate_exception): Add "catch handler" handling.
11526 (allocate_location_catch_handlers, re_set_catch_handlers)
11527 (check_status_catch_handlers, print_it_catch_handlers)
11528 (print_one_catch_handlers, print_mention_catch_handlers)
11529 (print_recreate_catch_handlers): New function.
11530 (catch_handlers_breakpoint_ops): New variable.
11531 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11532 Add parameter. Add "catch handler" handling.
11533 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11534 Add "catch handler" handling.
11535 (ada_exception_catchpoint_cond_string): Add "catch handler"
11536 handling.
11537 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11538 call.
11539 (catch_ada_handlers_command): New function.
11540 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11541 operations structure.
11542 (_initialize_ada_language): Add "catch handlers" command entry.
11543 * NEWS: Document "catch handlers" feature.
11544
9fe561ab
JB
115452018-01-02 Joel Brobecker <brobecker@adacore.com>
11546
11547 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11548 account when creating the array type of the slice.
11549 (ada_value_slice): Likewise.
11550
a405673c
JB
115512018-01-02 Joel Brobecker <brobecker@adacore.com>
11552
11553 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11554 New enum value.
11555 (create_array_type_with_stride): Add byte_stride_prop parameter.
11556 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11557 New parameter. Update all callers in this file.
11558 (array_type_has_dynamic_stride): New function.
11559 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11560 of arrays with dynamic byte strides.
11561 * dwarf2read.c (read_array_type): Add support for dynamic
11562 DW_AT_byte_stride attributes.
11563
74a2f8ff
JB
115642018-01-02 Joel Brobecker <brobecker@adacore.com>
11565
11566 * dwarf2read.c (read_unspecified_type): Treat
11567 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11568
e2882c85
JB
115692018-01-01 Joel Brobecker <brobecker@adacore.com>
11570
11571 Update copyright year range in all GDB files.
11572
1690bb24
JB
115732018-01-01 Joel Brobecker <brobecker@adacore.com>
11574
11575 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11576 and gdb/testsuite/gdb.base/step-line.c.
11577
0f0c98a8
JB
115782018-01-01 Joel Brobecker <brobecker@adacore.com>
11579
11580 * copyright.py (main): Dump the contents of
11581 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11582 even if BY_HAND is empty.
11583
82e1e79a
JB
115842018-01-01 Joel Brobecker <brobecker@adacore.com>
11585
11586 * top.c (print_gdb_version): Update Copyright year in version
11587 message.
11588
053f54e5 115892018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11590
053f54e5 11591 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11592
053f54e5 11593For older changes see ChangeLog-2017.
c906108c
SS
11594\f
11595Local Variables:
11596mode: change-log
11597left-margin: 8
11598fill-column: 74
11599version-control: never
57da7796 11600coding: utf-8
c906108c 11601End:
This page took 3.262195 seconds and 4 git commands to generate.