btrace: fix output of "set record btrace"
[binutils-gdb.git] / gdb / ChangeLog
1 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
2
3 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
4
5 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
6
7 * infrun.c (process_event_stop_test): Call
8 gdbarch_in_indirect_branch_thunk.
9 * gdbarch.sh (in_indirect_branch_thunk): New.
10 * gdbarch.c: Regenerated.
11 * gdbarch.h: Regenerated.
12 * x86-tdep.h: New.
13 * x86-tdep.c: New.
14 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
15 (HFILES_NO_SRCDIR): Add x86-tdep.h.
16 (ALLDEPFILES): Add x86-tdep.c.
17 * arch-utils.h (default_in_indirect_branch_thunk): New.
18 * arch-utils.c (default_in_indirect_branch_thunk): New.
19 * i386-tdep: Include x86-tdep.h.
20 (i386_in_indirect_branch_thunk): New.
21 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
22 function.
23 * amd64-tdep: Include x86-tdep.h.
24 (amd64_in_indirect_branch_thunk): New.
25 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
26
27 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
28
29 PR gdb/23053
30 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
31 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
32 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
33 regression.
34
35 2018-04-12 Tom Tromey <tom@tromey.com>
36
37 * rust-lang.c (rust_print_struct_def): Remove univariant code.
38 (rust_evaluate_subexp): Likewise.
39
40 2018-04-12 Pedro Alves <palves@redhat.com>
41
42 * procfs.c (procfs_detach): Make forward declaration's prototype
43 match definition's protototype.
44 (proc_get_LDT_entry): Remove stale do_cleanups call.
45
46 2018-04-12 Pedro Alves <palves@redhat.com>
47
48 * target.h (target_ops::to_has_exited): Delete.
49 (target_has_exited): Delete.
50 * target-delegates.c: Regenerate.
51
52 2018-04-11 Pedro Alves <palves@redhat.com>
53
54 * target.c (fileio_fh_t::t): Add comment.
55 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
56 (target_fileio_close): Handle a NULL target.
57 (invalidate_fileio_fh): New.
58 (target_close): Call it.
59 * remote.c (remote_hostio_send_command): No longer check whether
60 remote_desc is open.
61
62 2018-04-11 Pedro Alves <palves@redhat.com>
63
64 * target.c (fileio_fh_t): Make it a named struct instead of a
65 typedef.
66 (fileio_fh_t::is_closed): New method.
67 (DEF_VEC_O (fileio_fh_t)): Remove.
68 (fileio_fhandles): Now a std::vector.
69 (is_closed_fileio_fh): Delete.
70 (acquire_fileio_fd): Adjust. Rename parameters.
71 (release_fileio_fd): Adjust.
72 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
73 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
74 (target_fileio_close): Adjust.
75
76 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
77
78 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
79 index.
80
81 2018-04-10 Pedro Alves <palves@redhat.com>
82
83 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
84 (scoped_finish_thread_state): New class.
85 * infcmd.c (run_command_1): Use it instead of finish_thread_state
86 cleanup.
87 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
88 (fetch_inferior_event, normal_stop): Likewise.
89 * thread.c (finish_thread_state_cleanup): Delete.
90
91 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
92 Pedro Alves <palves@redhat.com>
93
94 * value.c: Include "selftest.h" and "common/array-view.h".
95 (struct range) <operator ==>: New.
96 (test_ranges_contain): New.
97 (check_ranges_vector): New.
98 (test_insert_into_bit_range_vector): New.
99 (_initialize_values): Register selftests.
100 * common/array-view.h (operator==, operator!=): New.
101
102 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
103
104 * common/gdb_vecs.h (unordered_remove): Add overload that takes
105 an iterator.
106 * inline-frame.c: Include <algorithm>.
107 (struct inline_state): Add constructor.
108 (inline_state_s): Remove.
109 (DEF_VEC_O(inline_state_s)): Remove.
110 (inline_states): Change type to std::vector.
111 (find_inline_frame_state): Adjust to std::vector.
112 (allocate_inline_frame_state): Remove.
113 (clear_inline_frame_state): Adjust to std::vector.
114 (skip_inline_frames): Adjust to std::vector.
115
116 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
117
118 * tracepoint.h (struct trace_state_variable): Add constructor.
119 <name>: Change type to std::string.
120 * tracepoint.c (tsv_s): Remove.
121 (DEF_VEC_O(tsv_s)): Remove.
122 (tvariables): Change to std::vector.
123 (create_trace_state_variable): Adjust to std::vector.
124 (find_trace_state_variable): Likewise.
125 (find_trace_state_variable_by_number): Likewise.
126 (delete_trace_state_variable): Likewise.
127 (trace_variable_command): Adjust to std::string.
128 (delete_trace_variable_command): Likewise.
129 (tvariables_info_1): Adjust to std::vector.
130 (save_trace_state_variables): Likewise.
131 (start_tracing): Likewise.
132 (merge_uploaded_trace_state_variables): Adjust to std::vector
133 and std::string.
134 * target.h (struct target_ops)
135 <to_download_trace_state_variable>: Pass reference to
136 trace_state_variable.
137 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
138 * target-delegates.c: Re-generate.
139 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
140 (mi_tsv_deleted): Likewise.
141 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
142 * remote.c (remote_download_trace_state_variable): Change
143 pointer to reference and adjust.
144 * make-target-delegates (parse_argtypes): Handle references.
145 (write_function_header): Likewise.
146 (munge_type): Likewise.
147
148 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
149
150 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
151 string_view-selftests.c.
152 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
153 testsuite.
154 * unittests/basic_string_view/cons/char/1.cc: Likewise.
155 * unittests/basic_string_view/cons/char/2.cc: Likewise.
156 * unittests/basic_string_view/cons/char/3.cc: Likewise.
157 * unittests/basic_string_view/element_access/char/1.cc:
158 Likewise.
159 * unittests/basic_string_view/element_access/char/empty.cc:
160 Likewise.
161 * unittests/basic_string_view/element_access/char/front_back.cc:
162 Likewise.
163 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
164 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
165 Likewise.
166 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
167 Likewise.
168 * unittests/basic_string_view/modifiers/swap/char/1.cc:
169 Likewise.
170 * unittests/basic_string_view/operations/compare/char/1.cc:
171 Likewise.
172 * unittests/basic_string_view/operations/compare/char/13650.cc:
173 Likewise.
174 * unittests/basic_string_view/operations/copy/char/1.cc:
175 Likewise.
176 * unittests/basic_string_view/operations/data/char/1.cc:
177 Likewise.
178 * unittests/basic_string_view/operations/find/char/1.cc:
179 Likewise.
180 * unittests/basic_string_view/operations/find/char/2.cc:
181 Likewise.
182 * unittests/basic_string_view/operations/find/char/3.cc:
183 Likewise.
184 * unittests/basic_string_view/operations/find/char/4.cc:
185 Likewise.
186 * unittests/basic_string_view/operations/rfind/char/1.cc:
187 Likewise.
188 * unittests/basic_string_view/operations/rfind/char/2.cc:
189 Likewise.
190 * unittests/basic_string_view/operations/rfind/char/3.cc:
191 Likewise.
192 * unittests/basic_string_view/operations/substr/char/1.cc:
193 Likewise.
194 * unittests/basic_string_view/operators/char/2.cc: Likewise.
195 * unittests/string_view-selftests.c: New file.
196
197 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
198
199 * unittests/basic_string_view/capacity/1.cc: New file.
200 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
201 * unittests/basic_string_view/cons/char/1.cc: New file.
202 * unittests/basic_string_view/cons/char/2.cc: New file.
203 * unittests/basic_string_view/cons/char/3.cc: New file.
204 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
205 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
206 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
207 * unittests/basic_string_view/element_access/char/1.cc: New file.
208 * unittests/basic_string_view/element_access/char/2.cc: New file.
209 * unittests/basic_string_view/element_access/char/empty.cc: New file.
210 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
211 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
212 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
213 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
214 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
215 * unittests/basic_string_view/include.cc: New file.
216 * unittests/basic_string_view/inserters/char/1.cc: New file.
217 * unittests/basic_string_view/inserters/char/2.cc: New file.
218 * unittests/basic_string_view/inserters/char/3.cc: New file.
219 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
220 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
221 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
222 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
223 * unittests/basic_string_view/literals/types.cc: New file.
224 * unittests/basic_string_view/literals/values.cc: New file.
225 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
226 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
227 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
228 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
229 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
230 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
231 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
232 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
233 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
234 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
235 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
236 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
237 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
238 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
239 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
240 * unittests/basic_string_view/operations/data/char/1.cc: New file.
241 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
242 * unittests/basic_string_view/operations/find/char/1.cc: New file.
243 * unittests/basic_string_view/operations/find/char/2.cc: New file.
244 * unittests/basic_string_view/operations/find/char/3.cc: New file.
245 * unittests/basic_string_view/operations/find/char/4.cc: New file.
246 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
247 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
248 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
249 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
250 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
251 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
252 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
253 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
254 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
255 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
256 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
257 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
258 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
259 * unittests/basic_string_view/operators/char/2.cc: New file.
260 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
261 * unittests/basic_string_view/range_access/char/1.cc: New file.
262 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
263 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
264 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
265 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
266 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
267 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
268 * unittests/basic_string_view/requirements/typedefs.cc: New file.
269 * unittests/basic_string_view/typedefs.cc: New file.
270 * unittests/basic_string_view/types/1.cc: New file.
271
272 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * common/gdb_string_view.h: Remove libstdc++ implementation
275 details, adjust to gdb reality.
276 * common/gdb_string_view.tcc: Likewise.
277 * cli/cli-script.c (struct string_view): Remove.
278 (user_args) <m_args>: Change element type to gdb::string_view.
279 (user_args::insert_args): Adjust.
280
281 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
282
283 * common/gdb_string_view.h: New file.
284 * common/gdb_string_view.tcc: New file.
285
286 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
287
288 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
289 * configure: Re-generate.
290
291 2018-04-09 Pedro Alves <palves@redhat.com>
292
293 * gdbarch.sh: Include "observable.h" instead of "observer.h".
294 (set_target_gdbarch): Call
295 gdb::observers::architecture_changed.notify instead of
296 observer_notify_architecture_changed.
297
298 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
299
300 * tracepoint.c (struct current_traceframe_cleanup): Remove.
301 (do_restore_current_traceframe_cleanup): Remove.
302 (restore_current_traceframe_cleanup_dtor): Remove.
303 (make_cleanup_restore_current_traceframe): Remove.
304 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
305 New.
306 * tracepoint.h (struct scoped_restore_current_traceframe): New.
307 * infrun.c (fetch_inferior_event): Use
308 scoped_restore_current_traceframe.
309
310 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
311
312 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
313 Remove.
314 <n_allocated_type_units>: Remove.
315 <all_type_units>: Change to std::vector.
316 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
317 to std::vector change.
318 (dwarf2_per_objfile::get_cutu): Likewise.
319 (dwarf2_per_objfile::get_tu): Likewise.
320 (create_signatured_type_table_from_index): Likewise.
321 (create_signatured_type_table_from_debug_names): Likewise.
322 (dw2_symtab_iter_next): Likewise.
323 (dw2_print_stats): Likewise.
324 (dw2_expand_all_symtabs): Likewise.
325 (dw2_expand_marked_cus): Likewise.
326 (dw2_debug_names_iterator::next): Likewise.
327 (dwarf2_initialize_objfile): Likewise.
328 (add_signatured_type_cu_to_table): Likewise.
329 (create_all_type_units): Likewise.
330 (add_type_unit): Likewise.
331 (struct tu_abbrev_offset): Add constructor.
332 (build_type_psymtabs_1): Adjust to std::vector change.
333 (print_tu_stats): Likewise.
334 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
335 (write_debug_names): Likewise.
336
337 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
338
339 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
340 Make an std::vector.
341 <n_comp_units>: Remove.
342 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
343 to std::vector change.
344 (dwarf2_per_objfile::get_cutu): Likewise.
345 (dwarf2_per_objfile::get_cu): Likewise.
346 (create_cus_from_index): Likewise.
347 (create_addrmap_from_index): Likewise.
348 (create_addrmap_from_aranges): Likewise.
349 (dwarf2_read_index): Likewise.
350 (dw2_find_last_source_symtab): Likewise.
351 (dw2_map_symtabs_matching_filename): Likewise.
352 (dw2_symtab_iter_next): Likewise.
353 (dw2_print_stats): Likewise.
354 (dw2_expand_all_symtabs): Likewise.
355 (dw2_expand_symtabs_with_fullname): Likewise.
356 (dw2_expand_marked_cus): Likewise.
357 (dw2_map_symbol_filenames): Likewise.
358 (create_cus_from_debug_names): Likewise.
359 (dwarf2_read_debug_names): Likewise.
360 (dw2_debug_names_iterator::next): Likewise.
361 (dwarf2_initialize_objfile): Likewise.
362 (set_partial_user): Likewise.
363 (dwarf2_build_psymtabs_hard): Likewise.
364 (read_comp_units_from_section): Remove arguments, adjust to
365 std::vector change.
366 (create_all_comp_units): Adjust to std::vector and
367 read_comp_units_from_section changes.
368 (dwarf2_find_containing_comp_unit): Adjust to std::vector
369 change.
370 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
371 (psyms_seen_size): Likewise.
372 (write_gdbindex): Likewise.
373 (write_debug_names): Likewise.
374
375 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
376
377 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
378 with dwarf2_per_objfile.
379 (create_cus_from_index): Likewise.
380 (create_signatured_type_table_from_index): Likewise.
381 (dwarf2_read_index): Likewise.
382 (dwarf2_initialize_objfile): Likewise.
383 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
384 per_cu rather than get_dwarf2_per_objfile.
385
386 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
387
388 * dwarf2read.h (struct signatured_type): Forward declare.
389 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
390 New methods.
391 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
392 (dw2_get_cutu): ...this.
393 (dwarf2_per_objfile::get_cu): Rename from...
394 (dw2_get_cu): ...this.
395 (dwarf2_per_objfile::get_tu): New.
396 (create_addrmap_from_index): Adjust.
397 (create_addrmap_from_aranges): Adjust.
398 (dw2_find_last_source_symtab): Adjust.
399 (dw2_map_symtabs_matching_filename): Adjust.
400 (dw2_symtab_iter_next): Adjust.
401 (dw2_print_stats): Adjust.
402 (dw2_expand_all_symtabs): Adjust.
403 (dw2_expand_symtabs_with_fullname): Adjust.
404 (dw2_expand_marked_cus): Adjust.
405 (dw_expand_symtabs_matching_file_matcher): Adjust.
406 (dw2_map_symbol_filenames): Adjust.
407 (dw2_debug_names_iterator::next): Adjust.
408 (dwarf2_initialize_objfile): Adjust.
409 (set_partial_user): Adjust.
410 (dwarf2_build_psymtabs_hard): Adjust.
411
412 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
413
414 * dwarf2read.c (create_signatured_type_table_from_debug_names):
415 Remove unused variables.
416 (dw2_map_symtabs_matching_filename): Likewise.
417 (dwarf2_record_block_ranges): Likewise.
418 (dwarf2_read_addr_index): Likewise.
419 (follow_die_offset): Likewise.
420
421 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
422
423 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
424 to symbol_file_add_main.
425
426 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
427
428 PR mi/22299
429 * mi/mi-console.c (do_fputc_async_safe): New.
430 (mi_console_file::write_async_safe): New.
431 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
432 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
433 New.
434 * ui-file.c (ui_file::putstrn): Adjust call to
435 fputstrn_unfiltered.
436 * utils.c (printchar): Replace do_fputs and do_fprintf
437 parameters by do_fputc.
438 (fputstr_filtered): Adjust call to printchar.
439 (fputstr_unfiltered): Likewise.
440 (fputstrn_filtered): Likewise.
441 (fputstrn_unfiltered): Add do_fputc parameter, pass to
442 printchar.
443 * utils.h (do_fputc_ftype): New typedef.
444 (fputstrn_unfiltered): Add do_fputc parameter.
445
446 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
447
448 * regformats/i386/i386-avx.dat: Remove.
449
450 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
451
452 PR gdb/22979
453 * amd64-tdep.c (amd64_none_init_abi): New function.
454 (amd64_x32_none_init_abi): New function.
455 (_initialize_amd64_tdep): Register handlers for x86-64 and
456 x64_32 with GDB_OSABI_NONE.
457 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
458 GDB_OSABI_NONE osabi.
459
460 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
461
462 PR gdb/22980
463 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
464 GDB_OSABI_NONE.
465 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
466 * osabi.c (gdb_osabi_names): Add "unknown" entry.
467
468 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
469
470 * common/byte-vector.h (char_vector): New type.
471 * target.h (target_read_alloc): Return
472 gdb::optional<byte_vector>.
473 (target_read_stralloc): Return gdb::optional<char_vector>.
474 (target_get_osdata): Return gdb::optional<char_vector>.
475 * target.c (target_read_alloc_1): Templatize. Replacement
476 manual memory management with vector.
477 (target_read_alloc): Change return type, adjust.
478 (target_read_stralloc): Change return type, adjust.
479 (target_get_osdata): Change return type, adjust.
480 * auxv.c (struct auxv_info) <length>: Remove.
481 <data>: Change type to gdb::optional<byte_vector>.
482 (auxv_inferior_data_cleanup): Free auxv_info with delete.
483 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
484 (target_auxv_search): Adjust.
485 (fprint_target_auxv): Adjust.
486 * avr-tdep.c (avr_io_reg_read_command): Adjust.
487 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
488 (linux_make_corefile_notes): Adjust.
489 * osdata.c (get_osdata): Adjust.
490 * remote.c (remote_get_threads_with_qxfer): Adjust.
491 (remote_memory_map): Adjust.
492 (remote_traceframe_info): Adjust.
493 (btrace_read_config): Adjust.
494 (remote_read_btrace): Adjust.
495 (remote_pid_to_exec_file): Adjust.
496 * solib-aix.c (solib_aix_get_library_list): Adjust.
497 * solib-dsbt.c (decode_loadmap): Don't free buf.
498 (dsbt_get_initial_loadmaps): Adjust.
499 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
500 * solib-target.c (solib_target_current_sos): Adjust.
501 * tracepoint.c (sdata_make_value): Adjust.
502 * xml-support.c (xinclude_start_include): Adjust.
503 (xml_fetch_content_from_file): Adjust.
504 * xml-support.h (xml_fetch_another): Change return type.
505 (xml_fetch_content_from_file): Change return type.
506 * xml-syscall.c (xml_init_syscalls_info): Adjust.
507 * xml-tdesc.c (file_read_description_xml): Adjust.
508 (fetch_available_features_from_target): Change return type.
509 (target_fetch_description_xml): Adjust.
510 (target_read_description_xml): Adjust.
511
512 2018-04-06 Tom Tromey <tom@tromey.com>
513
514 * value.c (~value): Update.
515 (struct value) <contents>: Now unique_xmalloc_ptr.
516 (value_contents_bits_eq, allocate_value_contents)
517 (value_contents_raw, value_contents_all_raw)
518 (value_contents_for_printing, value_contents_for_printing_const)
519 (set_value_enclosing_type): Update.
520
521 2018-04-06 Tom Tromey <tom@tromey.com>
522
523 * value.c (range_s): Remove typedef, VEC.
524 (struct range): Add operator<.
525 (range_lessthan): Remove.
526 (ranges_contain): Change type.
527 (~value): Update.
528 (struct value) <unavailable, optimized_out>: Now std::vector.
529 (value_entirely_available)
530 (value_entirely_covered_by_range_vector)
531 (value_entirely_unavailable, value_entirely_optimized_out):
532 Update.
533 (insert_into_bit_range_vector): Change argument type.
534 (find_first_range_overlap): Likewise.
535 (struct ranges_and_idx, value_contents_bits_eq)
536 (require_not_optimized_out, require_available): Update.
537 (ranges_copy_adjusted): Change argument types.
538 (value_optimized_out, value_copy, value_fetch_lazy): Update.
539
540 2018-04-06 Tom Tromey <tom@tromey.com>
541
542 * value.c (~value): Update.
543 (struct value) <parent>: Now a value_ref_ptr.
544 (value_parent, set_value_parent, value_address, value_copy):
545 Update.
546
547 2018-04-06 Tom Tromey <tom@tromey.com>
548
549 * value.c (struct value): Add constructor, destructor, and member
550 initializers.
551 (allocate_value_lazy, value_decref): Update.
552
553 2018-04-06 Tom Tromey <tom@tromey.com>
554
555 * value.c (struct value) <released, next>: Remove.
556 (all_values): Now a std::vector.
557 (allocate_value_lazy): Update.
558 (value_next): Remove.
559 (value_mark, value_free_to_mark, release_value)
560 (value_release_to_mark): Update.
561
562 2018-04-06 Tom Tromey <tom@tromey.com>
563
564 * value.h (fetch_subexp_value, value_release_to_mark): Update.
565 (free_value_chain): Remove.
566 * value.c (free_value_chain): Remove.
567 (value_release_to_mark): Return a std::vector.
568 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
569 std::vector.
570 (check_condition): Update.
571 * eval.c (fetch_subexp_value): Change "val_chain" to a
572 std::vector.
573 * breakpoint.c (update_watchpoint): Update.
574 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
575
576 2018-04-06 Tom Tromey <tom@tromey.com>
577
578 * value.h (free_all_values): Remove.
579 * value.c (free_all_values): Remove.
580
581 2018-04-06 Tom Tromey <tom@tromey.com>
582
583 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
584 (value_history_chain, value_history_count): Remove.
585 (value_history): New global.
586 (record_latest_value, access_value_history, show_values)
587 (preserve_values): Update.
588
589 2018-04-06 Tom Tromey <tom@tromey.com>
590
591 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
592 * varobj.c (varobj_set_display_format, varobj_set_value)
593 (install_default_visualizer, construct_visualizer)
594 (install_new_value, ~varobj, varobj_get_value_type)
595 (my_value_of_variable, varobj_editable_p): Update.
596 * c-varobj.c (c_describe_child, c_value_of_variable)
597 (cplus_number_of_children, cplus_describe_child): Update.
598 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
599 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
600 (ada_value_of_variable, ada_value_is_changeable_p): Update.
601
602 2018-04-06 Tom Tromey <tom@tromey.com>
603
604 * printcmd.c (last_examine_address): Change type to
605 value_ref_ptr.
606 (do_examine, x_command): Update.
607
608 2018-04-06 Tom Tromey <tom@tromey.com>
609
610 * value.c (release_value): Update.
611 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
612 (struct bpstats) <val>: Now a value_ref_ptr.
613 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
614 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
615 (~watchpoint, print_it_watchpoint, watch_command_1)
616 (invalidate_bp_value_on_memory_change): Update.
617
618 2018-04-06 Tom Tromey <tom@tromey.com>
619
620 * varobj.c (varobj_clear_saved_item)
621 (update_dynamic_varobj_children, install_new_value, ~varobj):
622 Update.
623 * value.h (value_incref): Move declaration earlier.
624 (value_decref): Rename from value_free.
625 (struct value_ref_policy): New.
626 (value_ref_ptr): New typedef.
627 (struct value_deleter): Remove.
628 (gdb_value_up): Remove typedef.
629 (release_value): Change return type.
630 (release_value_or_incref): Remove.
631 * value.c (set_value_parent): Update.
632 (value_incref): Change return type.
633 (value_decref): Rename from value_free.
634 (value_free_to_mark, free_all_values, free_value_chain): Update.
635 (release_value): Return value_ref_ptr.
636 (release_value_or_incref): Remove.
637 (record_latest_value, set_internalvar, clear_internalvar):
638 Update.
639 * stack.c (info_frame_command): Don't call value_free.
640 * python/py-value.c (valpy_dealloc, valpy_new)
641 (value_to_value_object): Update.
642 * printcmd.c (do_examine): Update.
643 * opencl-lang.c (lval_func_free_closure): Update.
644 * mi/mi-main.c (register_changed_p): Don't call value_free.
645 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
646 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
647 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
648 value_free.
649 * guile/scm-value.c (vlscm_free_value_smob)
650 (vlscm_scm_from_value): Update.
651 * frame.c (frame_register_unwind, frame_unwind_register_signed)
652 (frame_unwind_register_unsigned, get_frame_register_bytes)
653 (put_frame_register_bytes): Don't call value_free.
654 * findvar.c (address_from_register): Don't call value_free.
655 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
656 * dwarf2loc.c (entry_data_value_free_closure)
657 (value_of_dwarf_reg_entry, free_pieced_value_closure)
658 (dwarf2_evaluate_loc_desc_full): Update.
659 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
660 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
661 (~watchpoint, watch_command_1)
662 (invalidate_bp_value_on_memory_change): Update.
663 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
664
665 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
666
667 PR gdb/23022
668 * warning.m4: Add -Wno-error=deprecated-register.
669 * configure: Re-generate.
670
671 2018-04-05 Tom Tromey <tom@tromey.com>
672
673 * linespec.h: Remove include of "vec.h".
674
675 2018-04-05 Tom Tromey <tom@tromey.com>
676
677 * linespec.c (typep): Remove typedef.
678 (find_methods, find_superclass_methods): Take a std::vector.
679 (find_method): Use std::vector.
680
681 2018-04-05 Tom Tromey <tom@tromey.com>
682
683 * utils.c (compare_strings): Remove.
684 * utils.h (compare_strings): Remove.
685 * objc-lang.h (find_imps): Update.
686 * objc-lang.c (find_methods): Take a std::vector.
687 (uniquify_strings, find_imps): Likewise.
688 * linespec.c (find_methods): Take a std::vector.
689 (decode_objc): Use std::vector.
690 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
691 a std::vector.
692 (find_method, find_function_symbols): Use std::vector.
693
694 2018-04-05 Tom Tromey <tom@tromey.com>
695
696 * completer.c (completion_tracker::completion_tracker): Remove
697 cast.
698 (completion_tracker::discard_completions): Likewise.
699 * breakpoint.c (ambiguous_names_p): Remove cast.
700 * ada-lang.c (_initialize_ada_language): Remove cast.
701 * utils.h (streq): Update.
702 (streq_hash): Add new declaration.
703 * utils.c (streq): Return bool.
704 (streq_hash): New function.
705
706 2018-04-05 Tom Tromey <tom@tromey.com>
707
708 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
709 Remove a string copy.
710
711 2018-04-05 Tom Tromey <tom@tromey.com>
712
713 * linespec.c (filter_results): Use std::vector.
714 (decode_line_2, decode_line_full): Update.
715
716 2018-04-05 Tom Tromey <tom@tromey.com>
717
718 * linespec.c (canonical_to_fullform): Return std::string.
719 (filter_results): Update.
720 (struct decode_line_2_item): Add constructor.
721 <fullform, displayform>: Now std::string.
722 (decode_line_2_compare_items): Now a std::sort comparator.
723 (decode_line_2): Update.
724
725 2018-04-05 Tom Tromey <tom@tromey.com>
726
727 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
728 (unexpected_linespec_error): Update.
729 (linespec_parse_basic, parse_linespec): Update.
730
731 2018-04-05 Tom Tromey <tom@tromey.com>
732
733 * linespec.c (linespec_parse_basic): Reindent.
734
735 2018-04-05 Tom Tromey <tom@tromey.com>
736
737 * minsyms.h (iterate_over_minimal_symbols): Update.
738 * minsyms.c (iterate_over_minimal_symbols): Take a
739 gdb::function_view.
740 * linespec.c (struct collect_minsyms): Remove.
741 (compare_msyms): Now a std::sort comparator.
742 (add_minsym): Add parameters.
743 (search_minsyms_for_name): Update. Use std::vector.
744
745 2018-04-03 Tom Tromey <tom@tromey.com>
746
747 * mipsread.c (read_alphacoff_dynamic_symtab): Use
748 gdb::byte_vector.
749
750 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
751
752 * MAINTAINERS (Write After Approval): Add Weimin Pan.
753
754 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
755
756 PR gdb/16959
757 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
758 printing static type.
759
760 2018-04-01 Tom Tromey <tom@tromey.com>
761
762 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
763 (rs6000_xfer_shared_libraries): Update.
764
765 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
766
767 * common/gdb_vecs.h (char_ptr): Remove.
768 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
769
770 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
771
772 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
773 with std::vector.
774 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
775
776 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
777
778 * tracepoint.h (struct uploaded_tp): Initialize fields.
779 <actions, step_actions, cmd_strings>: Change type to
780 std::vector<char *>.
781 * tracepoint.c (get_uploaded_tp): Allocate with new.
782 (free_uploaded_tps): Free with delete.
783 (parse_tracepoint_definition): Adjust to std::vector change.
784 * breakpoint.c (read_uploaded_action): Likewise.
785 (create_tracepoint_from_upload): Likewise.
786 * ctf.c (ctf_write_uploaded_tp): Likewise.
787 (SET_ARRAY_FIELD): Likewise.
788 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
789
790 2018-03-30 Tom Tromey <tom@tromey.com>
791
792 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
793 std::unique_ptr.
794 (svr4_keep_data_in_core): Update.
795 (svr4_read_so_list): Update.
796
797 2018-03-30 Tom Tromey <tom@tromey.com>
798
799 * windows-nat.c (handle_output_debug_string, handle_exception):
800 Update.
801 * target.h (target_read_string): Update.
802 * target.c (target_read_string): Change "string" to
803 unique_xmalloc_ptr.
804 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
805 Update.
806 * solib-frv.c (frv_current_sos): Update.
807 * solib-dsbt.c (dsbt_current_sos): Update.
808 * solib-darwin.c (darwin_current_sos): Update.
809 * linux-thread-db.c (inferior_has_bug): Update.
810 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
811 Update. Remove alloca.
812 * ada-lang.c (ada_main_name): Update.
813
814 2018-03-30 Tom Tromey <tom@tromey.com>
815
816 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
817 (struct dwo_file_deleter): New.
818 (dwo_file_up): New typedef.
819 (open_and_init_dwo_file): Use dwo_file_up.
820 (free_dwo_file_cleanup): Remove.
821
822 2018-03-30 Tom Tromey <tom@tromey.com>
823
824 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
825 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
826
827 2018-03-30 Tom Tromey <tom@tromey.com>
828
829 * dwarf2read.c (class free_cached_comp_units): New class.
830 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
831 (free_cached_comp_units): Remove function.
832
833 2018-03-30 Tom Tromey <tom@tromey.com>
834
835 * utils.h (make_cleanup_unpush_target): Remove.
836 * inf-ptrace.c (struct target_unpusher): New.
837 (target_unpush_up) New typedef.
838 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
839 target_unpush_up.
840 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
841
842 2018-03-27 Tom Tromey <tom@tromey.com>
843
844 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
845
846 2018-03-27 Pedro Alves <palves@redhat.com>
847 Tom Tromey <tom@tromey.com>
848
849 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
850 destructor. Now a class.
851 (gdb_readline_wrapper_cleanup): Remove function.
852 (gdb_readline_wrapper): Remove cleanups.
853
854 2018-03-27 Tom Tromey <tom@tromey.com>
855
856 * typeprint.h (struct type_print_options) <local_typedefs,
857 global_typedefs>: Remove "struct" keyword.
858 (class typedef_hash_table): New class.
859 (recursively_update_typedef_hash, add_template_parameters)
860 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
861 (find_typedef_in_hash): Don't declare.
862 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
863 (typedef_hash_table::recursively_update): Rename from
864 recursively_update_typedef_hash. Now a member.
865 (typedef_hash_table::add_template_parameters): Rename from
866 add_template_parameters. Now a member.
867 (typedef_hash_table::typedef_hash_table): Now a constructor;
868 rename from create_typedef_hash.
869 (typedef_hash_table::~typedef_hash_table): Now a destructor;
870 rename from free_typedef_hash.
871 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
872 (do_free_global_table): Remove.
873 (typedef_hash_table::typedef_hash_table): New constructor; renamed
874 from copy_type_recursive.
875 (create_global_typedef_table): Remove.
876 (typedef_hash_table::find_global_typedef): Now a member of
877 typedef_hash_table.
878 (typedef_hash_table::find_typedef): Rename from
879 find_typedef_in_hash; now a member.
880 (whatis_exp): Update.
881 * extension.h (struct ext_lang_type_printers): Add constructor and
882 destructor.
883 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
884 declare.
885 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
886 Now a constructor; rename from start_ext_lang_type_printers.
887 (ext_lang_type_printers): Now a destructor; rename from
888 free_ext_lang_type_printers.
889 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
890 Update.
891 (c_type_print_base_struct_union): Update. Remove cleanups.
892
893 2018-03-27 Tom Tromey <tom@tromey.com>
894
895 * dwarf-index-write.c: Include <cmath>.
896
897 2018-03-27 Joel Brobecker <brobecker@adacore.com>
898
899 * NEWS: Add entry describing new "set|show varsize-limit" command.
900 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
901 command.
902 * printcmd.c (_initialize_printcmd): Add "set var" alias of
903 "set variable".
904
905 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
906
907 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
908 dwarf-index-write.c
909 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
910 * dwarf-index-common.c: New file.
911 * dwarf-index-common.h: New file.
912 * dwarf-index-write.c: New file.
913 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
914 (struct dwarf2_section_info): Move from here.
915 (dwarf2_section_info_def): Likewise.
916 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
917 (offset_type): Likewise.
918 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
919 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
920 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
921 (byte_swap): Likewise.
922 (MAYBE_SWAP): Likewise.
923 (dwarf2_per_cu_ptr): Likewise.
924 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
925 (struct tu_stats): Likewise.
926 (struct dwarf2_per_objfile): Likewise.
927 (struct dwarf2_per_cu_data): Likewise.
928 (struct signatured_type): Likewise.
929 (sig_type_ptr): Likewise.
930 (DEF_VEC_P (sig_type_ptr)): Likewise.
931 (INDEX4_SUFFIX): Likewise.
932 (INDEX5_SUFFIX): Likewise.
933 (DEBUG_STR_SUFFIX): Likewise.
934 (dwarf2_read_section): Make non-static.
935 (mapped_index_string_hash): Move from here.
936 (dwarf5_djb_hash): Likewise.
937 (file_write): Likewise.
938 (class data_buf): Likewise.
939 (struct symtab_index_entry): Likewise.
940 (struct mapped_symtab): Likewise.
941 (find_slot): Likewise.
942 (hash_expand): Likewise.
943 (add_index_entry): Likewise.
944 (uniquify_cu_indices): Likewise.
945 (class c_str_view): Likewise.
946 (class c_str_view_hasher): Likewise.
947 (class vector_hasher): Likewise.
948 (write_hash_table): Likewise.
949 (psym_index_map): Likewise.
950 (struct addrmap_index_data): Likewise.
951 (add_address_entry): Likewise.
952 (add_address_entry_worker): Likewise.
953 (write_address_map): Likewise.
954 (symbol_kind): Likewise.
955 (write_psymbols): Likewise.
956 (struct signatured_type_index_data): Likewise.
957 (write_one_signatured_type): Likewise.
958 (recursively_count_psymbols): Likewise.
959 (recursively_write_psymbols): Likewise.
960 (class debug_names): Likewise.
961 (check_dwarf64_offsets): Likewise.
962 (psyms_seen_size): Likewise.
963 (write_gdbindex): Likewise.
964 (write_debug_names): Likewise.
965 (assert_file_size): Likewise.
966 (write_psymtabs_to_index): Likewise.
967 (save_gdb_index_command): Likewise.
968 (_initialize_dwarf2_read): Don't register the "save gdb-index"
969 command.
970 * dwarf2read.h: New file.
971
972 2018-03-27 Joel Brobecker <brobecker@adacore.com>
973
974 PR gdb/22670
975 * dwarf2read.c (dwarf2_physname): Do not return the demangled
976 symbol name if the CU's language stores symbol names in linkage
977 format.
978 * language.h (struct language_defn)
979 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
980 all instances of this struct.
981
982 2018-03-26 Tom Tromey <tom@tromey.com>
983
984 * stack.c (backtrace_command_1): Remove verbose code.
985
986 2018-03-26 Tom Tromey <tom@tromey.com>
987
988 * python/py-framefilter.c (py_print_type): Don't catch
989 exceptions. Return void.
990 (py_print_value): Likewise.
991 (py_print_single_arg): Likewise.
992 (enumerate_args): Don't catch exceptions.
993 (py_print_args): Likewise.
994 (py_print_frame): Likewise.
995 (gdbpy_apply_frame_filter): Catch exceptions here.
996
997 2018-03-26 Tom Tromey <tom@tromey.com>
998
999 * stack.c (_initialize_stack): Remove trailing newlines from help
1000 text. Add "Usage" line to "backtrace" help.
1001
1002 2018-03-26 Tom Tromey <tom@tromey.com>
1003
1004 PR python/16486:
1005 * python/py-framefilter.c (py_print_args): Call wrap_hint.
1006
1007 2018-03-26 Tom Tromey <tom@tromey.com>
1008
1009 * python/py-framefilter.c (py_print_single_arg): Return
1010 EXT_LANG_BT_ERROR from catch.
1011
1012 2018-03-26 Tom Tromey <tom@tromey.com>
1013
1014 PR backtrace/15584:
1015 * stack.c (backtrace_command_1): Move some code into no-filters
1016 "if".
1017
1018 2018-03-26 Tom Tromey <tom@tromey.com>
1019
1020 * python/py-framefilter.c (throw_quit_or_print_exception): New
1021 function.
1022 (gdbpy_apply_frame_filter): Use it.
1023
1024 2018-03-26 Tom Tromey <tom@tromey.com>
1025
1026 PR cli/17716:
1027 * python/py-framefilter.c (py_print_type, py_print_value)
1028 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
1029 RETURN_MASK_ERROR.
1030
1031 2018-03-26 Tom Tromey <tom@tromey.com>
1032
1033 * python/py-framefilter.c (enumerate_args): Use
1034 gdb::unique_xmalloc_ptr.
1035
1036 2018-03-26 Tom Tromey <tom@tromey.com>
1037
1038 * python/py-framefilter.c (py_print_frame): Return
1039 EXT_LANG_BT_OK.
1040 (gdbpy_apply_frame_filter): Update comment.
1041 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
1042 Remove.
1043 <EXT_LANG_BT_NO_FILTERS>: Change value.
1044
1045 2018-03-26 Tom Tromey <tom@tromey.com>
1046
1047 PR backtrace/15582:
1048 * stack.c (backtrace_command): Parse "hide" argument.
1049 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
1050 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
1051 constant.
1052
1053 2018-03-26 Tom Tromey <tom@tromey.com>
1054
1055 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
1056 add "flags".
1057 (backtrace_command): Remove "fulltrace", add "flags".
1058
1059 2018-03-26 Tom Tromey <tom@tromey.com>
1060
1061 * stack.c (backtrace_command): Rewrite command line parsing.
1062
1063 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
1064
1065 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
1066
1067 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
1068
1069 * filename-seen-cache.h: Add include guard.
1070
1071 2018-03-26 Keith Seitz <keiths@redhat.com>
1072
1073 * symfile.c (place_section): Remove "struct" from section_addr_info
1074 in comment.
1075 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
1076 "struct" keyword from section_addr_info.
1077
1078 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1079
1080 * regformats/regdef.h (reg): Add constructors.
1081
1082 2018-03-25 Pedro Alves <palves@redhat.com>
1083
1084 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
1085 if then/else bodies in var_func_name extraction.
1086
1087 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
1088
1089 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
1090 lookup_minimal_symbol() to find symbol entry.
1091 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
1092
1093 2018-03-23 Keith Seitz <keiths@redhat.com>
1094
1095 PR c++/22968
1096 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
1097 nested type definitions for C++, too.
1098
1099 2018-03-23 Tom Tromey <tom@tromey.com>
1100
1101 * machoread.c (struct oso_el): Add a constructor. Don't define as
1102 a typedef.
1103 (macho_register_oso): Remove.
1104 (macho_symtab_read): Take a std::vector.
1105 (oso_el_compare_name): Now a std::sort comparator.
1106 (macho_symfile_read_all_oso): Take a std::vector.
1107 (macho_symfile_read): Use std::vector. Remove cleanups.
1108
1109 2018-03-22 Tom Tromey <tom@tromey.com>
1110
1111 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
1112 (record_full_goto_bookmark): Use std::string.
1113
1114 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1115
1116 PR tdep/18295
1117 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
1118 a single mask.
1119
1120 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1121
1122 * rs6000-tdep.c (store_insn_p): New function.
1123 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
1124 and cr_reg to their unshifted values. Use store_insn_p to
1125 match LR saves using either R1 or fdata->alloca_reg. Use
1126 store_insn_p to match CR saves. Set alloca_reg_offset
1127 when alloca_reg and framep are set. Remove lr_reg shift
1128 when assigning to fdata->lr_register.
1129
1130 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1131
1132 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
1133 command line args instead of emitting a warning.
1134
1135 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1136
1137 * tracepoint.h (struct static_tracepoint_marker): Initialize
1138 fields, define default constructor, move constructor and move
1139 assignment, disable the rest.
1140 <str_id, extra>: Make std::string.
1141 (release_static_tracepoint_marker): Remove.
1142 (free_current_marker): Remove.
1143 * tracepoint.c (free_current_marker): Remove.
1144 (parse_static_tracepoint_marker_definition): Adjust to
1145 std::string, use new hex2str overload.
1146 (release_static_tracepoint_marker): Remove.
1147 (print_one_static_tracepoint_marker): Get marker by reference
1148 and adjust to std::string.
1149 (info_static_tracepoint_markers_command): Adjust to std::vector
1150 changes
1151 * target.h (static_tracepoint_marker_p): Remove typedef.
1152 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
1153 (struct target_ops) <to_static_tracepoint_marker_at>: Return
1154 bool.
1155 <to_static_tracepoint_markers_by_strid>: Return std::vector.
1156 * target-debug.h
1157 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
1158 (target_debug_print_std_vector_static_tracepoint_marker): New.
1159 (target_debug_print_struct_static_tracepoint_marker_p): Rename
1160 to...
1161 (target_debug_print_static_tracepoint_marker_p): ... this.
1162 * target-delegates.c: Re-generate.
1163 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
1164 Make std::string.
1165 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
1166 (decode_static_tracepoint_spec): Adjust to std::vector.
1167 (tracepoint_print_one_detail): Adjust to std::string.
1168 (strace_marker_decode_location): Adjust to std::string.
1169 (update_static_tracepoint): Adjust to std::string, remove call
1170 to release_static_tracepoint_marker.
1171 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1172 Adjust to std::vector.
1173 * remote.c (remote_static_tracepoint_marker_at): Return bool.
1174 (remote_static_tracepoint_markers_by_strid): Adjust to
1175 std::vector.
1176 * common/rsp-low.h (hex2str): New overload with explicit count
1177 of bytes.
1178 * common/rsp-low.c (hex2str): New overload with explicit count
1179 of bytes.
1180 * unittests/rsp-low-selftests.c (test_hex2str): New function.
1181 (_initialize_rsp_low_selftests): Add test_hex2str test.
1182 * unittests/tracepoint-selftests.c
1183 (test_parse_static_tracepoint_marker_definition): Adjust to
1184 std::string.
1185
1186 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1187
1188 * tracepoint.c (parse_static_tracepoint_marker_definition):
1189 Consider case where the definition is followed by more
1190 definitions.
1191 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1192 tracepoint-selftests.c.
1193 * unittests/tracepoint-selftests.c: New.
1194
1195 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1196
1197 * MAINTAINERS (Write After Approval): Add Pedro Franco de
1198 Carvalho.
1199
1200 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1201
1202 * symtab.c (find_pc_sect_line): fixed indentation.
1203
1204 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1205
1206 * symtab.c (find_pc_sect_line): now uses binary search.
1207
1208 2018-03-19 Tom Tromey <tom@tromey.com>
1209
1210 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
1211 "IDENT" production.
1212
1213 2018-03-19 Pedro Alves <palves@redhat.com>
1214 Tom Tromey <tom@tromey.com>
1215
1216 * unittests/observable-selftests.c: New file.
1217 * common/observable.h: New file.
1218 * observable.h: New file.
1219 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
1220 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
1221 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
1222 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
1223 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
1224 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
1225 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
1226 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
1227 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
1228 python/py-breakpoint.c, python/py-finishbreakpoint.c,
1229 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
1230 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
1231 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
1232 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
1233 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
1234 tui/tui-interp.c, valops.c: Update all users.
1235 * tui/tui-hooks.c (tui_bp_created_observer)
1236 (tui_bp_deleted_observer, tui_bp_modified_observer)
1237 (tui_inferior_exit_observer, tui_before_prompt_observer)
1238 (tui_normal_stop_observer, tui_register_changed_observer):
1239 Remove.
1240 (tui_observers_token): New global.
1241 (attach_or_detach, tui_attach_detach_observers): New functions.
1242 (tui_install_hooks, tui_remove_hooks): Use
1243 tui_attach_detach_observers.
1244 * record-btrace.c (record_btrace_thread_observer): Remove.
1245 (record_btrace_thread_observer_token): New global.
1246 * observer.sh: Remove.
1247 * observer.c: Rename to observable.c.
1248 * observable.c (namespace gdb_observers): Define new objects.
1249 (observer_debug): Move into gdb_observers namespace.
1250 (struct observer, struct observer_list, xalloc_observer_list_node)
1251 (xfree_observer_list_node, generic_observer_attach)
1252 (generic_observer_detach, generic_observer_notify): Remove.
1253 (_initialize_observer): Update.
1254 Don't include observer.inc.
1255 * Makefile.in (generated_files): Remove observer.h, observer.inc.
1256 (clean mostlyclean): Likewise.
1257 (observer.h, observer.inc): Remove targets.
1258 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
1259 (COMMON_SFILES): Use observable.c, not observer.c.
1260 * .gitignore: Remove observer.h.
1261
1262 2018-03-18 Tom Tromey <tom@tromey.com>
1263
1264 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
1265 gdb::def_vector.
1266 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
1267
1268 2018-03-17 Tom Tromey <tom@tromey.com>
1269
1270 * auto-load.c (auto_load_objfile_script_1): Use std::string.
1271
1272 2018-03-17 Tom Tromey <tom@tromey.com>
1273
1274 * target.c (class scoped_target_fd): New.
1275 (target_fileio_close_cleanup): Remove.
1276 (target_fileio_read_alloc_1): Use scoped_target_fd.
1277
1278 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1279
1280 * silent-rules.mk: New.
1281 * Makefile.in: Include silent-rules.mk
1282 (srcdir, VPATH, top_srcdir): Move up.
1283 (COMPILE): Add ECHO_CXX.
1284 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
1285 (init.c): Add ECHO_INIT_C.
1286 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1287 (version.c): Add ECHO_GEN.
1288 (printcmd.o): Add ECHO_CXX.
1289 (target-float.o): Add ECHO_CXX.
1290 (ada-exp.o): Add ECHO_CXX.
1291 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
1292 (insight$(EXEEXT)): Add ECHO_CXXLD.
1293 * gnulib/configure.ac: Add AM_SILENT_RULES.
1294 * gnulib/aclocal.m4: Re-generate.
1295 * gnulib/configure: Re-generate.
1296 * gnulib/import/Makefile.in: Re-generate.
1297
1298 2018-03-16 Tom Tromey <tom@tromey.com>
1299
1300 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
1301 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
1302 * utils.c (do_free_section_addr_info)
1303 (make_cleanup_free_section_addr_info): Remove.
1304 * symfile.h (struct other_sections): Add constructor.
1305 (struct section_addr_info): Remove.
1306 (section_addr_info): New typedef.
1307 (struct sym_fns) <sym_offsets>: Change type of parameter.
1308 (build_section_addr_info_from_objfile)
1309 (relative_addr_info_to_section_offsets, addr_info_make_relative)
1310 (default_symfile_offsets, symbol_file_add)
1311 (symbol_file_add_from_bfd)
1312 (build_section_addr_info_from_section_table): Update.
1313 (alloc_section_addr_info, free_section_addr_info): Don't declare.
1314 * symfile.c (alloc_section_addr_info): Remove.
1315 (build_section_addr_info_from_section_table): Change return type.
1316 Update.
1317 (build_section_addr_info_from_bfd)
1318 (build_section_addr_info_from_objfile): Likewise.
1319 (free_section_addr_info): Remove.
1320 (relative_addr_info_to_section_offsets): Change type of "addrs".
1321 (addrs_section_compar): Now a std::sort comparator.
1322 (addrs_section_sort): Change return type.
1323 (addr_info_make_relative): Change type of "addrs". Update.
1324 (default_symfile_offsets, syms_from_objfile_1)
1325 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
1326 (symbol_file_add_separate): Update.
1327 (symbol_file_add): Change type of "addrs". Update.
1328 (add_symbol_file_command): Update. Remove cleanups.
1329 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
1330 cleanups.
1331 * symfile-debug.c (debug_sym_offsets): Change type of "info".
1332 * solib.c (solib_read_symbols): Update.
1333 * objfiles.c (objfile_relocate): Update. Remove cleanups.
1334 * machoread.c (macho_symfile_offsets): Update.
1335 * jit.c (jit_bfd_try_read_symtab): Update.
1336
1337 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
1338
1339 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1340 unittests/utils-selftests.c.
1341 * unittests/utils-selftests.c: New file.
1342
1343 2018-03-14 Tom Tromey <tom@tromey.com>
1344
1345 PR cli/14977:
1346 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
1347 for NULL.
1348
1349 2018-03-14 Tom Tromey <tom@tromey.com>
1350
1351 PR cli/19918:
1352 * printcmd.c (printf_pointer): Allow "-" in format.
1353
1354 2018-03-14 Tom Tromey <tom@tromey.com>
1355
1356 * printcmd.c (_initialize_printcmd): Add usage to printf.
1357
1358 2018-03-14 Yao Qi <qiyao@sourceware.org>
1359
1360 * MAINTAINERS: Update my email address.
1361
1362 2018-03-13 Tom Tromey <tom@tromey.com>
1363
1364 * machoread.c (macho_check_dsym): Change filenamep to a
1365 std::string*.
1366 (macho_symfile_read): Update.
1367 * symfile.c (load_command): Use std::string.
1368
1369 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
1370
1371 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
1372 to error message string.
1373 (riscv_register_name): Use xsnprintf instead of sprintf.
1374 (riscv_insn::fetch_instruction): Use gdb_assert instead of
1375 internal_error.
1376 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
1377 error.
1378 (riscv_push_dummy_call): Likewise.
1379
1380 2018-03-12 Tom Tromey <tom@tromey.com>
1381
1382 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
1383 Use gdb::byte_vector.
1384 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
1385
1386 2018-03-12 Yao Qi <yao.qi@linaro.org>
1387
1388 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
1389 parameter type to readable_regcache.
1390 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
1391 the declaration.
1392
1393 2018-03-11 Tom Tromey <tom@tromey.com>
1394
1395 * dwarf2read.c (struct nextfield): Add initializers.
1396 (struct nextfnfield): Remove.
1397 (struct fnfieldlist): Add initializers. Remove "length" and
1398 "head", use std::vector.
1399 (struct decl_field_list): Remove.
1400 (struct field_info): Add initializers.
1401 <fields, baseclasses>: Now std::vector.
1402 <nbaseclasses, nfnfields, typedef_field_list_count,
1403 nested_types_list_count>: Remove.
1404 (dwarf2_add_field, dwarf2_add_type_defn)
1405 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
1406 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
1407 (process_structure_scope): Update.
1408
1409 2018-03-11 Tom Tromey <tom@tromey.com>
1410
1411 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
1412 for use by std::sort.
1413 (build_type_psymtabs_1): Use std::vector.
1414
1415 2018-03-09 Eli Zaretskii <eliz@gnu.org>
1416
1417 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
1418 and LIBMPFR in the printed configuration.
1419
1420 2018-03-08 Tom Tromey <tom@tromey.com>
1421
1422 * source.c (get_filename_and_charpos): Use scoped_fd.
1423 * nto-procfs.c (procfs_open_1): Use scoped_fd.
1424 (procfs_pidlist): Likewise.
1425 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
1426 (iterate_over_mappings): Likewise.
1427
1428 2018-03-08 Tom Tromey <tom@tromey.com>
1429
1430 * infcall.c (struct call_return_meta_info)
1431 <stack_temporaries_enabled>: Remove.
1432 (get_call_return_value, call_function_by_hand_dummy): Update.
1433 * thread.c (disable_thread_stack_temporaries): Remove.
1434 (enable_thread_stack_temporaries): Remove.
1435 (thread_stack_temporaries_enabled_p): Return bool.
1436 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
1437 (get_last_thread_stack_temporary): Update.
1438 * eval.c (evaluate_subexp): Update.
1439 * gdbthread.h (class enable_thread_stack_temporaries): Now a
1440 class, not a function.
1441 (value_ptr, value_vec): Remove typedefs.
1442 (class thread_info) <stack_temporaries_enabled>: Now bool.
1443 <stack_temporaries>: Now a std::vector.
1444 (thread_stack_temporaries_enabled_p)
1445 (value_in_thread_stack_temporaries): Return bool.
1446
1447 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
1448
1449 * remote.c (putpkt_binary): Fix omitted bytes reporting.
1450 (getpkt_or_notif_sane_1): Likewise.
1451
1452 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1453
1454 * build-id.c (build_id_to_debug_bfd): Use std::string.
1455
1456 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1457
1458 * build-id.c (find_separate_debug_file_by_buildid): Return
1459 std::string.
1460 * build-id.h (find_separate_debug_file_by_buildid): Return
1461 std::string.
1462 * coffread.c (coff_symfile_read): Adjust to std::string.
1463 * elfread.c (elf_symfile_read): Adjust to std::string.
1464 * symfile.c (separate_debug_file_exists): Change parameter to
1465 std::string.
1466 (find_separate_debug_file): Return std::string.
1467 (find_separate_debug_file_by_debuglink): Return std::string.
1468 * symfile.h (find_separate_debug_file_by_debuglink): Return
1469 std::string.
1470
1471 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1472
1473 * common/xml-utils.c (xml_escape_text): Move code to...
1474 (xml_escape_text_append): ... this new function.
1475 * common/xml-utils.h (xml_escape_text_append): New declaration.
1476 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
1477 New function.
1478 (_initialize_xml_utils): register test_xml_escape_text_append as
1479 a selftest.
1480
1481 2018-03-07 Alan Hayward <alan.hayward@arm.com>
1482
1483 * defs.h: Remove MAX_REGISTER_SIZE.
1484 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
1485 asserts.
1486 * python/py-unwind.c (pyuw_sniffer): Likewise.
1487
1488 2018-03-07 Tom Tromey <tom@tromey.com>
1489
1490 * linux-tdep.c (linux_info_proc): Update.
1491 * target.h (struct target_ops) <to_fileio_readlink>: Return
1492 optional<string>.
1493 (target_fileio_readlink): Return optional<string>.
1494 * remote.c (remote_hostio_readlink): Return optional<string>.
1495 * inf-child.c (inf_child_fileio_readlink): Return
1496 optional<string>.
1497 * target.c (target_fileio_readlink): Return optional<string>.
1498
1499 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
1500
1501 * regcache.c (cooked_read_test): Add riscv to the list of
1502 architectures that have a save_reggroup.
1503
1504 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
1505
1506 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
1507 value is not a dynamic class object.
1508
1509 2018-03-06 Tom Tromey <tom@tromey.com>
1510
1511 * rust-exp.y: Formatting fixes.
1512
1513 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1514
1515 * riscv-tdep.c (riscv_register_name): Remove target description
1516 support.
1517 (riscv_gdbarch_init): Remove target description check.
1518
1519 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1520
1521 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
1522 comment.
1523 * riscv-tdep.h: Likewise.
1524
1525 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1526
1527 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
1528 (riscv_pseudo_register_write): Delete.
1529 (riscv_gdbarch_init): Remove all use of pseudo registers.
1530
1531 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1532
1533 * record-btrace.c (btrace_print_lines): Replace cleanup
1534 parameter with RAII equivalents.
1535 (btrace_insn_history): Replace cleanup with RAII equivalents.
1536 * ui-out.h (make_cleanup_ui_out_list_begin_end,
1537 make_cleanup_ui_out_tuple_begin_end): Remove.
1538 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
1539 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
1540 make_cleanup_ui_out_list_begin_end): Remove.
1541
1542 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1543
1544 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
1545 parameter types to std::vector. Use bool.
1546 (record_btrace_wait): Replace VEC(tp_t) with
1547 std::vector<thread_info *>.
1548 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
1549
1550 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1551
1552 * record-btrace.c (record_btrace_disable_callback): Remove.
1553 (struct scoped_btrace_disable): New.
1554 (record_btrace_open): Use scoped_btrace_disable.
1555
1556 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1557
1558 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
1559 reading values from registers.
1560
1561 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1562
1563 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
1564 where appropriate.
1565
1566 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1567
1568 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
1569 change parameter type. Use GDB's print functions, and use
1570 core_addr_to_string where appropriate.
1571 (riscv_push_dummy_call): Use core_addr_to_string where
1572 appropriate, update call to riscv_print_arg_location, and reindent
1573 a few lines.
1574 (riscv_return_value): Update call to riscv_print_arg_location.
1575
1576 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1577 Tim Newsome <tim@sifive.com>
1578 Albert Ou <a0u@eecs.berkeley.edu>
1579 Darius Rad <darius@bluespec.com>
1580
1581 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
1582 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
1583 (ALLDEPFILES): Add riscv-tdep.c
1584 * configure.tgt: Add riscv support.
1585 * riscv-tdep.c: New file.
1586 * riscv-tdep.h: New file.
1587 * NEWS: Mention new target.
1588 * MAINTAINERS: Add entry for riscv.
1589
1590 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1591
1592 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
1593 fields within aggregates.
1594
1595 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
1596
1597 * record-btrace.c (btrace_print_lines): Change type of flags to
1598 gdb_disassembly_flags.
1599
1600 2018-03-04 John Baldwin <jhb@FreeBSD.org>
1601
1602 * fbsd-nat.c: Include "inf-ptrace.h".
1603 (USE_SIGTRAP_SIGINFO): Conditionally define.
1604 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
1605 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
1606 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
1607 function.
1608 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
1609 Likewise.
1610 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
1611 Likewise.
1612 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
1613 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
1614 "supports_stopped_by_hw_breakpoint" target methods.
1615
1616 2018-03-04 John Baldwin <jhb@FreeBSD.org>
1617
1618 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
1619 * fbsd-nat.c (debug_fbsd_nat): New variable.
1620 (show_fbsd_nat_debug): New function.
1621 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
1622 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
1623
1624 2018-03-04 John Baldwin <jhb@FreeBSD.org>
1625
1626 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
1627 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
1628 prototype.
1629 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
1630 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
1631 method.
1632
1633 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1634
1635 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
1636 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
1637
1638 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1639
1640 * charset.c (struct charset_vector): New.
1641 (charsets): Change type to charset_vector.
1642 (find_charset_names): Adjust.
1643 (add_one): Adjust.
1644 (_initialize_charset): Adjust.
1645
1646 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1647
1648 * progspace.h (struct program_space) <deleted_solibs>: Change
1649 type to std::vector<std::string>.
1650 * progspace.c (clear_program_space_solib_cache): Adjust.
1651 * breakpoint.c (print_solib_event): Adjust.
1652 (check_status_catch_solib): Adjust.
1653 * solib.c (update_solib_list): Adjust.
1654 * ui-out.h (class ui_out) <field_string>: New overload.
1655 * ui-out.c (ui_out::field_string): New overload.
1656
1657 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1658
1659 * progspace.h (struct program_space): Add constructor and
1660 destructor, initialize fields.
1661 (add_program_space): Remove.
1662 * progspace.c (add_program_space): Rename to...
1663 (program_space::program_space): ... this.
1664 (release_program_space): Rename to...
1665 (program_space::~program_space): ... this.
1666 (delete_program_space): Use delete to delete program_space.
1667 (initialize_progspace): Use new to allocate program_space.
1668 * inferior.c (add_inferior_with_spaces): Likewise.
1669 (clone_inferior_command): Likewise.
1670 * infrun.c (follow_fork_inferior): Likewise.
1671 (handle_vfork_child_exec_or_exit): Likewise.
1672
1673 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1674
1675 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
1676 (delim_string_to_char_ptr_vec): Return std::vector of
1677 gdb::unique_xmalloc_ptr.
1678 (dirnames_to_char_ptr_vec_append): Take std::vector of
1679 gdb::unique_xmalloc_ptr.
1680 (dirnames_to_char_ptr_vec): Return std::vector of
1681 gdb::unique_xmalloc_ptr.
1682 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
1683 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
1684 (delim_string_to_char_ptr_vec): Return an std::vector of
1685 gdb::unique_xmalloc_ptr, adjust the code.
1686 (dirnames_to_char_ptr_vec_append): Take an std::vector of
1687 gdb::unique_xmalloc_ptr, adjust the code.
1688 (dirnames_to_char_ptr_vec): Return an std::vector of
1689 gdb::unique_xmalloc_ptr, adjust the code.
1690 * auto-load.c (auto_load_safe_path_vec): Change type to
1691 std::vector of gdb::unique_xmalloc_ptr.
1692 (auto_load_expand_dir_vars): Return an std::vector of
1693 gdb::unique_xmalloc_ptr, adjust the code.
1694 (auto_load_safe_path_vec_update): Adjust.
1695 (filename_is_in_auto_load_safe_path_vec): Adjust.
1696 (auto_load_objfile_script_1): Adjust.
1697 * build-id.c (build_id_to_debug_bfd): Adjust.
1698 * linux-thread-db.c (thread_db_load_search): Adjust.
1699 * source.c (add_path): Adjust.
1700 (openp): Adjust.
1701 * symfile.c (find_separate_debug_file): Adjust.
1702 * utils.c (do_free_char_ptr_vec): Remove.
1703 (make_cleanup_free_char_ptr_vec): Remove.
1704
1705 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
1706
1707 PR gdb/22907
1708 * common/pathstuff.c: Conditionally include "<windows.h>".
1709
1710 2018-03-01 Georg Sauthoff <mail@georg.so>
1711
1712 PR gdb/22888
1713 * gcore.in: Quote variables and switch interpreter to bash.
1714
1715 2018-03-01 Tom Tromey <tom@tromey.com>
1716
1717 * dwarf2read.c (alloc_discriminant_info): Fix default_index
1718 assertion. Add assertion for discriminant_index.
1719 (quirk_rust_enum): Use correct base type name in univariant case.
1720
1721 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
1722
1723 * record.c (get_call_history_modifiers): Return a
1724 record_print_flags.
1725 (cmd_record_call_history): Adjust.
1726 * record-btrace.c (record_btrace_call_history): Adjust.
1727 (record_btrace_call_history_range): Adjust.
1728 (record_btrace_call_history_from): Adjust.
1729 * target-debug.h (target_debug_print_record_print_flags): New.
1730 * target-delegates.c: Re-generate.
1731 * target.c (target_call_history): Change flags type.
1732 (target_call_history_from): Likewise.
1733 (target_call_history_range): Likewise.
1734 * target.h (struct target_ops) <target_call_history>: Likewise.
1735 (target_call_history_from): Likewise.
1736 (target_call_history_range): Likewise.
1737
1738 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1739 Simon Marchi <simon.marchi@polymtl.ca>
1740
1741 * common/common-utils.c: Include "sys/stat.h".
1742 (is_regular_file): Move here from "source.c"; change return
1743 type to "bool".
1744 * common/common-utils.h (is_regular_file): New prototype.
1745 * common/pathstuff.c (contains_dir_separator): New function.
1746 * common/pathstuff.h (contains_dir_separator): New prototype.
1747 * source.c: Don't include "sys/stat.h".
1748 (is_regular_file): Move to "common/common-utils.c".
1749
1750 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1751
1752 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
1753 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
1754 * auto-load.c: Include "common/pathstuff.h".
1755 * common/common-def.h (current_directory): Move here.
1756 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
1757 function.
1758 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
1759 prototype.
1760 * common/pathstuff.c: New file.
1761 * common/pathstuff.h: New file.
1762 * compile/compile.c: Include "common/pathstuff.h".
1763 * defs.h (current_directory): Move to "common/common-defs.h".
1764 * dwarf2read.c: Include "common/pathstuff.h".
1765 * exec.c: Likewise.
1766 * guile/scm-safe-call.c: Likewise.
1767 * linux-thread-db.c: Likewise.
1768 * main.c: Likewise.
1769 * nto-tdep.c: Likewise.
1770 * objfiles.c: Likewise.
1771 * source.c: Likewise.
1772 * symtab.c: Likewise.
1773 * utils.c: Include "common/pathstuff.h".
1774 (gdb_realpath): Move to "common/pathstuff.c".
1775 (gdb_realpath_keepfile): Likewise.
1776 (gdb_abspath): Likewise.
1777 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
1778 (gdb_realpath_keepfile): Likewise.
1779 (gdb_abspath): Likewise.
1780
1781 2018-02-28 John Baldwin <jhb@FreeBSD.org>
1782
1783 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
1784 wildcard process pid for super_resume for kernels with a
1785 specific bug.
1786
1787 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
1788
1789 * compile/compile.c (get_args): Add additional comments
1790 explaining function.
1791
1792 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
1793 Tom Tromey <tom@tromey.com>
1794
1795 * target.h (memory_write_request_s): Remove typedef. Don't define
1796 VEC.
1797 (target_write_memory_blocks): Change argument to std::vector.
1798 (struct memory_write_request): Add constructor.
1799 * target-memory.c (compare_block_starting_address): Return bool.
1800 Change argument types.
1801 (claim_memory): Change arguments to use std::vector.
1802 (split_regular_and_flash_blocks, blocks_to_erase)
1803 (compute_garbled_blocks): Likewise.
1804 (cleanup_request_data, cleanup_write_requests_vector): Remove.
1805 (target_write_memory_blocks): Change argument to std::vector.
1806 * symfile.c (struct load_section_data): Add constructor and
1807 destructor. Use std::vector for "requests".
1808 (struct load_progress_data): Add initializers.
1809 (load_section_callback): Update. Use "new".
1810 (clear_memory_write_data): Remove.
1811 (generic_load): Update.
1812
1813 2018-02-27 Alan Hayward <alan.hayward@arm.com>
1814
1815 * arch/aarch64.h: Use common/tdesc.h.
1816
1817 2018-02-26 Maciej W. Rozycki <macro@mips.com>
1818
1819 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
1820 architecture with a 64-bit ABI.
1821
1822 2018-02-26 Maciej W. Rozycki <macro@mips.com>
1823
1824 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
1825 ahead of target description loading.
1826
1827 2018-02-26 Tom Tromey <tom@tromey.com>
1828
1829 * stack.c (backtrace_command_1): Update.
1830 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
1831 of "flags".
1832 * python/py-framefilter.c (py_print_frame)
1833 (gdbpy_apply_frame_filter): Change type of "flags".
1834 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
1835 of "flags".
1836 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
1837 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
1838 * extension.h (enum frame_filter_flag): Rename from
1839 frame_filter_flags.
1840 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
1841 (apply_ext_lang_frame_filter): Change type of "flags".
1842 * extension.c (apply_ext_lang_frame_filter): Change type of
1843 "flags".
1844 * extension-priv.h (struct extension_language_ops)
1845 <apply_frame_filter>: Change type of "flags".
1846
1847 2018-02-26 Tom Tromey <tom@tromey.com>
1848
1849 PR python/16497:
1850 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
1851 off-by-one in py_end computation.
1852 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
1853 PRINT_MORE_FRAMES.
1854 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
1855 constant.
1856
1857 2018-02-26 Tom Tromey <tom@tromey.com>
1858
1859 * dwarf2read.c (struct variant_field): New.
1860 (struct nextfield) <variant>: New field.
1861 (dwarf2_add_field): Handle DW_TAG_variant_part.
1862 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
1863 discriminated union.
1864 (read_structure_type): Handle DW_TAG_variant_part.
1865 (handle_struct_member_die): New function, extracted from
1866 process_structure_scope. Handle DW_TAG_variant.
1867 (process_structure_scope): Handle discriminated unions. Call
1868 handle_struct_member_die.
1869
1870 2018-02-26 Tom Tromey <tom@tromey.com>
1871
1872 * rust-lang.h (rust_last_path_segment): Declare.
1873 * rust-lang.c (rust_last_path_segment): Now public. Change
1874 contract.
1875 (struct disr_info): Remove.
1876 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
1877 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
1878 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
1879 (rust_enum_p, rust_enum_variant): New function.
1880 (rust_underscore_fields): Remove "offset" parameter.
1881 (rust_print_enum): New function.
1882 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
1883 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
1884 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
1885 enums.
1886 (rust_internal_print_type): New function, from rust_print_type.
1887 Remove enum code.
1888 (rust_print_type): Call rust_internal_print_type.
1889 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
1890 Update enum handling.
1891 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
1892 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
1893 (rust_union_quirks): New functions.
1894 (process_full_comp_unit, process_full_type_unit): Call
1895 rust_union_quirks.
1896 (process_structure_scope): Update rust_unions if necessary.
1897
1898 2018-02-26 Tom Tromey <tom@tromey.com>
1899
1900 * value.h (value_union_variant): Declare.
1901 * valops.c (value_union_variant): New function.
1902 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
1903 (struct discriminant_info): New.
1904 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
1905 enumerator.
1906 (struct main_type) <flag_discriminated_union>: New field.
1907
1908 2018-02-26 Tom Tromey <tom@tromey.com>
1909
1910 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1911 unittests/unpack-selftests.c.
1912 * unittests/unpack-selftests.c: New file.
1913 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
1914
1915 2018-02-26 Yao Qi <yao.qi@linaro.org>
1916
1917 * dwarf2read.c (struct partial_die_info) <read>: New method.
1918 (read_partial_die): Remove the declaration.
1919 (load_partial_dies): Update.
1920 (partial_die_info::partial_die_info):
1921 (read_partial_die): Change it to partial_die_info::read.
1922
1923 2018-02-26 Yao Qi <yao.qi@linaro.org>
1924
1925 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
1926 (fixup_partial_die): Remove declaration.
1927 (scan_partial_symbols): Update.
1928 (partial_die_parent_scope): Likewise.
1929 (partial_die_full_name): Likewise.
1930 (fixup_partial_die): Change it to partial_die_info::fixup.
1931
1932 2018-02-26 Yao Qi <yao.qi@linaro.org>
1933
1934 * dwarf2read.c (read_partial_die): Update the declaration.
1935 (load_partial_dies): Caller update.
1936 (read_partial_die): Remove one argument abbrev_len.
1937
1938 2018-02-26 Yao Qi <yao.qi@linaro.org>
1939
1940 * dwarf2read.c (struct partial_die_info): Add ctor, delete
1941 assignment operator.
1942 (load_partial_dies): Use ctor and copy ctor.
1943 (read_partial_die): Update.
1944 (dwarf2_cu::find_partial_die): Use ctor.
1945
1946 2018-02-26 Yao Qi <yao.qi@linaro.org>
1947
1948 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
1949 (find_partial_die_in_comp_unit): Change it to
1950 dwarf2_cu::find_partial_die.
1951 (find_partial_die): Update.
1952
1953 2018-02-26 Yao Qi <yao.qi@linaro.org>
1954
1955 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
1956 is NULL.
1957
1958 2018-02-26 Yao Qi <yao.qi@linaro.org>
1959
1960 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
1961
1962 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1963
1964 * arch/amd64.h: Use common/tdesc.h.
1965 * arch/i386.c: Likewise.
1966 * arch/i386.h: Likewise.
1967 * arch/tic6x.c: Likewise.
1968 * arch/tdesc.h: Move file from here...
1969 * common/tdesc.h: ...to here.
1970 * features/aarch64-core.c: Regenerate.
1971 * features/aarch64-fpu.c: Regenerate.
1972 * features/i386/32bit-avx.c: Regenerate.
1973 * features/i386/32bit-avx512.c: Regenerate.
1974 * features/i386/32bit-core.c: Regenerate.
1975 * features/i386/32bit-linux.c: Regenerate.
1976 * features/i386/32bit-mpx.c: Regenerate.
1977 * features/i386/32bit-pkeys.c: Regenerate.
1978 * features/i386/32bit-sse.c: Regenerate.
1979 * features/i386/64bit-avx.c: Regenerate.
1980 * features/i386/64bit-avx512.c: Regenerate.
1981 * features/i386/64bit-core.c: Regenerate.
1982 * features/i386/64bit-linux.c: Regenerate.
1983 * features/i386/64bit-mpx.c: Regenerate.
1984 * features/i386/64bit-pkeys.c: Regenerate.
1985 * features/i386/64bit-segments.c: Regenerate.
1986 * features/i386/64bit-sse.c: Regenerate.
1987 * features/i386/x32-core.c: Regenerate.
1988 * features/tic6x-c6xp.c: Regenerate.
1989 * features/tic6x-core.c: Regenerate.
1990 * features/tic6x-gp.c: Regenerate.
1991 * target-descriptions.c: Use common/tdesc.h.
1992 * target-descriptions.h: Likewise.
1993
1994 2018-02-24 Tom Tromey <tom@tromey.com>
1995
1996 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
1997 (try_thread_db_load_from_dir, thread_db_load_search): Use
1998 std::string.
1999 (info_auto_load_libthread_db_compare): Return bool. Change
2000 argument types.
2001 (info_auto_load_libthread_db): Use std::vector, std::string.
2002 Remove cleanups.
2003
2004 2018-02-24 Tom Tromey <tom@tromey.com>
2005
2006 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
2007 std::string.
2008 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
2009 std::string*.
2010 * gdbarch.c: Rebuild.
2011 * gdbarch.h: Rebuild.
2012 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
2013 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
2014 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
2015 std::string*.
2016
2017 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
2018
2019 * gdbtypes.h (sect_offset): Change type to uint64_t.
2020 (sect_offset_str): New function.
2021 * dwarf2read.c (create_addrmap_from_aranges): Use
2022 sect_offset_str.
2023 (error_check_comp_unit_head): Likewise.
2024 (create_debug_type_hash_table): Likewise.
2025 (read_cutu_die_from_dwo): Likewise.
2026 (init_cutu_and_read_dies): Likewise.
2027 (init_cutu_and_read_dies_no_follow): Likewise.
2028 (process_psymtab_comp_unit_reader): Likewise.
2029 (partial_die_parent_scope): Likewise.
2030 (peek_die_abbrev): Likewise.
2031 (process_queue): Likewise.
2032 (dwarf2_physname): Likewise.
2033 (read_namespace_alias): Likewise.
2034 (read_import_statement): Likewise.
2035 (create_dwo_cu_reader): Likewise.
2036 (create_cus_hash_table): Likewise.
2037 (lookup_dwo_cutu): Likewise.
2038 (inherit_abstract_dies): Likewise.
2039 (read_func_scope): Likewise.
2040 (read_call_site_scope): Likewise.
2041 (dwarf2_add_member_fn): Likewise.
2042 (read_common_block): Likewise.
2043 (read_module_type): Likewise.
2044 (read_typedef): Likewise.
2045 (read_subrange_type): Likewise.
2046 (load_partial_dies): Likewise.
2047 (read_partial_die): Likewise.
2048 (find_partial_die): Likewise.
2049 (read_str_index): Likewise.
2050 (dwarf2_string_attr): Likewise.
2051 (build_error_marker_type): Likewise.
2052 (lookup_die_type): Likewise.
2053 (dump_die_shallow): Likewise.
2054 (follow_die_ref): Likewise.
2055 (dwarf2_fetch_die_loc_sect_off): Likewise.
2056 (dwarf2_fetch_constant_bytes): Likewise.
2057 (follow_die_sig): Likewise.
2058 (get_signatured_type): Likewise.
2059 (get_DW_AT_signature_type): Likewise.
2060 (dwarf2_find_containing_comp_unit): Likewise.
2061 (set_die_type): Likewise.
2062
2063 2018-02-21 John Baldwin <jhb@FreeBSD.org>
2064
2065 * arch/aarch64.c: Include "common-defs.h".
2066 * arch/amd64.c: Likewise.
2067 * arch/i386.c: Likewise.
2068
2069 2018-02-21 Tom Tromey <tom@tromey.com>
2070
2071 * value.h: (extract_field_op): Update.
2072 * eval.c (extract_field_op): Return a const char *.
2073 * expression.h (parse_expression_for_completion): Update.
2074 * completer.c (complete_expression): Update.
2075 (add_struct_fields): Make fieldname const.
2076 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
2077 (mark_completion_tag, parse_exp_in_context_1): Update.
2078 (parse_expression_for_completion): Change "name" to
2079 unique_xmalloc_ptr*.
2080
2081 2018-02-21 Tom Tromey <tom@tromey.com>
2082
2083 * infcall.c (call_function_by_hand_dummy): Use std::vector.
2084
2085 2018-02-21 Yao Qi <yao.qi@linaro.org>
2086
2087 * avr-tdep.c (avr_read_pc): Change parameter type to
2088 readable_regcache.
2089 * gdbarch.sh (read_pc): Likewise.
2090 * gdbarch.c: Re-generated.
2091 * gdbarch.h: Re-generated.
2092 * hppa-tdep.c (hppa_read_pc): Change parameter type to
2093 readable_regcache.
2094 * ia64-tdep.c (ia64_read_pc): Likewise.
2095 * mips-tdep.c (mips_read_pc): Likewise.
2096 * spu-tdep.c (spu_read_pc): Likewise.
2097
2098 2018-02-21 Yao Qi <yao.qi@linaro.org>
2099
2100 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
2101 * regcache-dump.c: New file.
2102 * regcache.c: Move register_dump to regcache-dump.c.
2103 (maintenance_print_registers): Likewise.
2104 (maintenance_print_raw_registers): Likewise.
2105 (maintenance_print_cooked_registers): Likewise.
2106 (maintenance_print_register_groups): Likewise.
2107 (maintenance_print_remote_registers): Likewise.
2108 (_initialize_regcache): Likewise.
2109 * regcache.h (register_dump): Moved from regcache.c.
2110
2111 2018-02-21 Yao Qi <yao.qi@linaro.org>
2112
2113 * regcache.c (regcache::regcache): Update.
2114 (regcache::invalidate): Move it to detached_regcache::invalidate.
2115 (get_thread_arch_aspace_regcache): Update.
2116 (regcache::raw_update): Update.
2117 (regcache::cooked_read): Remove some code.
2118 (regcache::cooked_read_value): Likewise.
2119 (regcache::raw_write): Remove assert on m_readonly_p.
2120 (regcache::raw_supply_integer): Move it to
2121 detached_regcache::raw_supply_integer.
2122 (regcache::raw_supply_zeroed): Likewise.
2123 * regcache.h (detached_regcache) <raw_supply_integer>: New
2124 declaration.
2125 <raw_supply_zeroed, invalidate>: Likewise.
2126 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
2127 <invalidate>: Likewise.
2128 <m_readonly_p>: Removed.
2129
2130 2018-02-21 Yao Qi <yao.qi@linaro.org>
2131
2132 * infcmd.c (get_return_value): Let stop_regs point to
2133 get_current_regcache.
2134 * regcache.c (regcache::regcache): Remove.
2135 (register_dump_reg_buffer): New class.
2136 (regcache_print): Adjust.
2137 * regcache.h (regcache): Remove constructors.
2138
2139 2018-02-21 Yao Qi <yao.qi@linaro.org>
2140
2141 * regcache.c (class register_dump): New class.
2142 (register_dump_regcache, register_dump_none): New class.
2143 (register_dump_remote, register_dump_groups): New class.
2144 (regcache_print): Update.
2145 * regcache.h (regcache_dump_what): Move it to regcache.c.
2146 (regcache) <dump>: Remove.
2147
2148 2018-02-21 Yao Qi <yao.qi@linaro.org>
2149
2150 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
2151 reg_buffer_rw *.
2152 (jit_unwind_reg_set_impl): Call raw_supply.
2153 (jit_frame_sniffer): Use reg_buffer_rw.
2154 * record-full.c (record_full_core_regbuf): Change its type.
2155 (record_full_core_open_1): Use reg_buffer_rw.
2156 (record_full_close): Likewise.
2157 (record_full_core_fetch_registers): Use regcache->raw_supply.
2158 (record_full_core_store_registers): Likewise.
2159 * regcache.c (regcache::get_register_status): Move it to
2160 reg_buffer.
2161 (regcache_raw_set_cached_value): Remove.
2162 (regcache::raw_set_cached_value): Remove.
2163 (regcache::raw_write): Call raw_supply.
2164 (regcache::raw_supply): Move it to reg_buffer_rw.
2165 * regcache.h (regcache_raw_set_cached_value): Remove.
2166 (reg_buffer_rw): New class.
2167
2168 2018-02-21 Yao Qi <yao.qi@linaro.org>
2169
2170 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
2171 readonly_detached_regcache.
2172 (dummy_frame_prev_register): Use regcache->cooked_read.
2173 * frame.c (frame_save_as_regcache): Change return type.
2174 (frame_pop): Update.
2175 * frame.h (frame_save_as_regcache): Update declaration.
2176 * inferior.h (get_infcall_suspend_state_regcache): Update
2177 declaration.
2178 * infrun.c (infcall_suspend_state) <registers>: use
2179 readonly_detached_regcache.
2180 (save_infcall_suspend_state): Don't use regcache_dup.
2181 (get_infcall_suspend_state_regcache): Change return type.
2182 * linux-fork.c (struct fork_info) <savedregs>: Change to
2183 readonly_detached_regcache.
2184 <pc>: New field.
2185 (fork_save_infrun_state): Don't use regcache_dup.
2186 (info_checkpoints_command): Adjust.
2187 * mi/mi-main.c (register_changed_p): Update declaration.
2188 (mi_cmd_data_list_changed_registers): Use
2189 readonly_detached_regcache.
2190 (register_changed_p): Change parameter type to
2191 readonly_detached_regcache.
2192 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
2193 readonly_detached_regcache.
2194 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
2195 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
2196 New.
2197 (regcache::save): Move it to reg_buffer.
2198 (regcache::restore): Change parameter type.
2199 (regcache_dup): Remove.
2200 * regcache.h (reg_buffer) <save>: New method.
2201 (readonly_detached_regcache): New class.
2202 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
2203 readonly_detached_regcache.
2204 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
2205
2206 2018-02-21 Yao Qi <yao.qi@linaro.org>
2207
2208 * frame.c (frame_save_as_regcache): Use regcache method save.
2209 (frame_pop): Use regcache method restore.
2210 * infrun.c (restore_infcall_suspend_state): Likewise.
2211 * linux-fork.c (fork_load_infrun_state): Likewise.
2212 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
2213 save.
2214 * regcache.c (regcache_save): Remove.
2215 (regcache::restore): More asserts.
2216 (regcache_cpy): Remove.
2217 * regcache.h (regcache_save): Remove the declaration.
2218 (regcache::restore): Move from private to public.
2219 Remove the friend declaration of regcache_cpy.
2220 (regcache_cpy): Remove declaration.
2221
2222 2018-02-21 Yao Qi <yao.qi@linaro.org>
2223
2224 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
2225 parameter type to 'readable_regcache *'.
2226 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
2227 * arm-tdep.c (arm_neon_quad_read): Likewise.
2228 (arm_pseudo_read): Likewise.
2229 * avr-tdep.c (avr_pseudo_register_read): Likewise.
2230 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
2231 * frv-tdep.c (frv_pseudo_register_read): Likewise.
2232 * gdbarch.c: Re-generated.
2233 * gdbarch.h: Re-generated.
2234 * gdbarch.sh (pseudo_register_read): Change parameter type to
2235 'readable_regcache *'.
2236 (pseudo_register_read_value): Likewise.
2237 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
2238 (h8300_pseudo_register_read): Likewise.
2239 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
2240 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2241 (i386_pseudo_register_read_into_value): Likewise.
2242 (i386_pseudo_register_read_value): Likewise.
2243 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
2244 declaration.
2245 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
2246 * m32c-tdep.c (m32c_raw_read): Likewise.
2247 (m32c_read_flg): Likewise.
2248 (m32c_banked_register): Likewise.
2249 (m32c_banked_read): Likewise.
2250 (m32c_sb_read): Likewise.
2251 (m32c_part_read): Likewise.
2252 (m32c_cat_read): Likewise.
2253 (m32c_r3r2r1r0_read): Likewise.
2254 (m32c_pseudo_register_read): Likewise.
2255 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
2256 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
2257 (mep_pseudo_cr64_read): Likewise.
2258 (mep_pseudo_register_read): Likewise.
2259 * mips-tdep.c (mips_pseudo_register_read): Likewise.
2260 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
2261 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
2262 * regcache.c (regcache::raw_read): Move it to readable_regcache.
2263 (regcache::cooked_read): Likewise.
2264 (regcache::cooked_read_value): Likewise.
2265 (regcache_cooked_read_signed):
2266 (regcache::cooked_read): Likewise.
2267 * regcache.h (readable_regcache): New class.
2268 (regcache): Inherit readable_regcache. Move some methods to
2269 readable_regcache.
2270 * rl78-tdep.c (rl78_pseudo_register_read): Change
2271 parameter type to 'readable_regcache *'.
2272 * rs6000-tdep.c (do_regcache_raw_read): Remove.
2273 (e500_pseudo_register_read): Change parameter type to
2274 'readable_regcache *'.
2275 (dfp_pseudo_register_read): Likewise.
2276 (vsx_pseudo_register_read): Likewise.
2277 (efpr_pseudo_register_read): Likewise.
2278 * s390-tdep.c (s390_pseudo_register_read): Likewise.
2279 * sh-tdep.c (sh_pseudo_register_read): Likewise.
2280 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
2281 (sh64_pseudo_register_read): Likewise.
2282 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
2283 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
2284 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
2285 (spu_pseudo_register_read): Likewise.
2286 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
2287 (xtensa_pseudo_register_read): Likewise.
2288
2289 2018-02-21 Yao Qi <yao.qi@linaro.org>
2290
2291 * regcache.c (regcache::regcache): Call reg_buffer ctor.
2292 (regcache::arch): Move it to reg_buffer::arch.
2293 (regcache::register_buffer): Likewise.
2294 (regcache::assert_regnum): Likewise.
2295 (regcache::num_raw_registers): Likewise.
2296 * regcache.h (reg_buffer): New class.
2297 (regcache): Inherit reg_buffer.
2298
2299 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
2300
2301 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
2302 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
2303
2304 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
2305
2306 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
2307
2308 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2309
2310 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
2311 (SFILES): Remove common/*.c files.
2312 (COMMON_OBS): Remove some *.o files built from common/*.c files.
2313 * common/common.host: Add common reference.
2314 * configure.ac: Likewise.
2315 * configure: Regenerate.
2316
2317 2018-02-16 Yao Qi <yao.qi@linaro.org>
2318
2319 * block.c (block_namespace_info): Inherit allocate_on_obstack.
2320 (block_initialize_namespace): Use new.
2321 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
2322 (dwarf2_free_objfile): Use delete.
2323 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
2324 (copy_type_recursive): Use new.
2325 * gdb_obstack.h (allocate_on_obstack): New.
2326
2327 2018-02-15 Yao Qi <yao.qi@linaro.org>
2328
2329 PR gdb/22849
2330 * inferior.c (exit_inferior_1): Reset inf->control.
2331
2332 2018-02-15 Joel Brobecker <brobecker@adacore.com>
2333
2334 * ada-lang.c (ada_to_fixed_value_create): Delete advance
2335 declaration.
2336
2337 2018-02-14 Pedro Alves <palves@redhat.com>
2338
2339 * frame-unwind.c (frame_unwind_try_unwinder): Always call
2340 frame_cleanup_after_sniffer on exception.
2341
2342 2018-02-14 Tom Tromey <tom@tromey.com>
2343
2344 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
2345 const.
2346 (solib_bfd_open): Make pathname const.
2347 * solib.c (solib_bfd_open): Make pathname const.
2348 * solib-spu.c (spu_bfd_fopen): Make name const.
2349 (spu_bfd_open): Make pathname const.
2350 * solib-darwin.c (darwin_bfd_open): Make pathname const.
2351 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
2352
2353 2018-02-14 Tom Tromey <tom@tromey.com>
2354
2355 * symfile.c (symfile_bfd_open): Update.
2356 * source.h (openp, source_full_path_of, find_and_open_source):
2357 Change argument type to unique_xmalloc_ptr.
2358 * source.c (openp): Take a unique_xmalloc_ptr.
2359 (source_full_path_of, find_and_open_source): Likewise.
2360 (open_source_file, symtab_to_fullname): Update.
2361 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
2362 unique_xmalloc_ptr.
2363 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
2364 (exec_file_find): Update.
2365 * psymtab.c (psymtab_to_fullname): Update.
2366 * nto-tdep.h (nto_find_and_open_solib): Update.
2367 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
2368 unique_xmalloc_ptr.
2369 * exec.c (exec_file_attach): Update.
2370 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
2371 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
2372
2373 2018-02-14 Tom Tromey <tom@tromey.com>
2374
2375 * solib.c: Include source.h.
2376 * nto-tdep.c: Include source.h.
2377 * mi/mi-cmd-env.c: Include source.h.
2378 * infcmd.c: Include source.h.
2379 * exec.c: Include source.h.
2380 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
2381 (add_path, directory_switch, source_path, init_source_path): Move
2382 declarations...
2383 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
2384 (add_path, directory_switch, source_path, init_source_path):
2385 ...here.
2386
2387 2018-02-14 Tom Tromey <tom@tromey.com>
2388
2389 * solist.h (exec_file_find, solib_find): Return
2390 unique_xmalloc_ptr.
2391 (solib_bfd_fopen): Take a const char *.
2392 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
2393 (exec_file_find, solib_find): Likewise.
2394 (solib_bfd_fopen): Do not take ownership of "pathname".
2395 (solib_bfd_open): Use unique_xmalloc_ptr.
2396 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
2397 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
2398 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
2399 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
2400
2401 2018-02-14 Joel Brobecker <brobecker@adacore.com>
2402
2403 * ada-lang.c (name_match_type_from_name): Remove reference to
2404 ada_name_for_lookup in function's documentation.
2405 * ada-lang.h (ada_name_for_lookup): Delete declaration.
2406
2407 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
2408
2409 * defs.h (enum openp_flags): New enum.
2410 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
2411 Move to enum openp_flags.
2412 (openp_flags): New enum flags.
2413 (openp): Change parameter type to openp_flags.
2414 * source.c (openp): Change parameter type to openp_flags.
2415 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
2416 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
2417
2418 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
2419
2420 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
2421 per-command.
2422
2423 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
2424
2425 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
2426 into...
2427 (class dwarf2_queue_guard): ...the destructor of this new class.
2428 (dw2_do_instantiate_symtab): Create instance of the new class
2429 dwarf2_queue_guard, remove cleanup.
2430
2431 2018-02-09 Tom Tromey <tom@tromey.com>
2432
2433 * source.c (find_source_lines): Don't reference past the end of
2434 the vector.
2435
2436 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2437
2438 * remote.c (remote_btrace_maybe_reopen): Change error message.
2439 * btrace.c (btrace_enable): Likewise.
2440 (parse_xml_btrace): Likewise.
2441 (parse_xml_btrace_conf): Likewise.
2442
2443 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2444
2445 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
2446 (linux_enable_pt, linux_enable_bts): Call
2447 diagnose_perf_event_open_fail.
2448
2449 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2450
2451 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
2452 Remove parameter and change return type. Update callers. Move it.
2453 (linux_enable_bts, linux_enable_pt): Improve error message.
2454 (linux_enable_pt): Remove zero buffer size check.
2455 (linux_enable_btrace): Improve error messages. Remove NULL return
2456 check.
2457
2458 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2459
2460 * btrace.c (btrace_enable): Remove target_supports_btrace call.
2461 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
2462 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
2463 (linux_supports_pt, linux_supports_btrace): Remove.
2464 (linux_enable_bts): Call cpu_supports_bts.
2465 * nat/linux-btrace.h (linux_supports_btrace): Remove.
2466 * remote.c (remote_supports_btrace): Remove.
2467 (init_remote_ops): Remove remote_supports_btrace.
2468 * target-delegates.c: Regenerated.
2469 * target.c (target_supports_btrace): Remove.
2470 * target.h (target_ops) <to_supports_btrace>: Remove
2471 (target_supports_btrace): Remove.
2472 * x86-linux-nat.c (x86_linux_create_target): Remove
2473 linux_supports_btrace.
2474
2475 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2476
2477 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
2478 btrace failed.
2479 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
2480 exception and use message in own exception.
2481
2482 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2483
2484 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
2485 (perf_event_pt_event_type): Use gdb_file_up.
2486 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
2487 scoped_fd, and scoped_mmap.
2488
2489 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2490
2491 * common/scoped_mmap.h: New.
2492 * unittests/scoped_mmap-selftest.c: New.
2493 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2494 unittests/scoped_mmap-selftest.c.
2495
2496 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2497
2498 * common/scoped_fd.h: New.
2499 * unittests/scoped_fd-selftest.c: New.
2500 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2501 unittests/scoped_fd-selftest.c.
2502
2503 2018-02-09 Tom Tromey <tom@tromey.com>
2504
2505 * auto-load.c (auto_load_section_scripts): Use
2506 gdb::unique_xmalloc_ptr.
2507
2508 2018-02-09 Tom Tromey <tom@tromey.com>
2509
2510 * auto-load.c (execute_script_contents): Use std::string.
2511
2512 2018-02-09 Joel Brobecker <brobecker@adacore.com>
2513
2514 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
2515 Python function, rather than a new command.
2516
2517 2018-02-08 Tom Tromey <tom@tromey.com>
2518
2519 * solib.c (solib_find_1): Use std::string.
2520 (solib_bfd_fopen): Use unique_xmalloc_ptr.
2521
2522 2018-02-08 Tom Tromey <tom@tromey.com>
2523
2524 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
2525
2526 2018-02-08 Tom Tromey <tom@tromey.com>
2527
2528 * source.c (find_source_lines): Use gdb::def_vector.
2529
2530 2018-02-08 Tom Tromey <tom@tromey.com>
2531
2532 * macrocmd.c (struct temporary_macro_definition): New.
2533 (macro_define_command): Use temporary_macro_definition. Remove
2534 cleanups.
2535 (free_macro_definition_ptr): Remove.
2536
2537 2018-02-08 Tom Tromey <tom@tromey.com>
2538
2539 * macroexp.c (maybe_expand): Use std::string.
2540
2541 2018-02-08 Tom Tromey <tom@tromey.com>
2542
2543 * macroexp.c (struct macro_buffer): Add initializers for some
2544 members.
2545 (init_buffer, init_shared_buffer, free_buffer)
2546 (free_buffer_return_text): Remove.
2547 (macro_buffer): New constructors.
2548 (~macro_buffer): New destructor.
2549 (macro_buffer::set_shared): New method.
2550 (macro_buffer::resize_buffer, macro_buffer::appendc)
2551 (macro_buffer::appendmem): Now methods, not free functions.
2552 (set_token, append_tokens_without_splicing, stringify)
2553 (macro_stringify): Update.
2554 (gather_arguments): Change return type. Remove argc_p argument,
2555 add args_ptr argument. Use std::vector.
2556 (substitute_args): Remove argc argument. Accept std::vector.
2557 (expand): Update. Use std::vector.
2558 (scan, macro_expand, macro_expand_next): Update.
2559
2560 2018-02-08 Tom Tromey <tom@tromey.com>
2561
2562 * symtab.c (default_collect_symbol_completion_matches_break_on):
2563 Use unique_xmalloc_ptr.
2564 * macroscope.h: (sal_macro_scope, user_macro_scope)
2565 (default_macro_scope): Return unique_xmalloc_ptr.
2566 * macroscope.c (sal_macro_scope, user_macro_scope)
2567 (default_macro_scope): Return unique_xmalloc_ptr.
2568 * macroexp.h (macro_expand, macro_expand_once): Return
2569 unique_xmalloc_ptr.
2570 * macroexp.c (macro_expand, macro_expand_once): Return
2571 unique_xmalloc_ptr.
2572 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2573 (info_macro_command, info_macros_command): Use
2574 unique_xmalloc_ptr.
2575 * compile/compile-c-support.c (write_macro_definitions): Use
2576 unique_xmalloc_ptr.
2577 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
2578
2579 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
2580
2581 * value.c (value_static_field): Assign field type instead of
2582 containing type when returning an optimized out value.
2583
2584 2018-02-06 Yao Qi <yao.qi@linaro.org>
2585
2586 * ft32-tdep.c (ft32_read_pc): Remove.
2587 (ft32_write_pc): Remove.
2588 (ft32_gdbarch_init): Update.
2589 * m32r-tdep.c (m32r_read_pc): Remove.
2590 (m32r_gdbarch_init): Update.
2591 * mep-tdep.c (mep_read_pc): Remove.
2592 (mep_gdbarch_init): Update.
2593 * microblaze-tdep.c (microblaze_write_pc): Remove.
2594 (microblaze_gdbarch_init): Update.
2595 * mn10300-tdep.c (mn10300_read_pc): Remove.
2596 (mn10300_write_pc): Remove.
2597 (mn10300_gdbarch_init): Update.
2598 * moxie-tdep.c (moxie_read_pc): Remove.
2599 (moxie_write_pc): Remove.
2600 (moxie_gdbarch_init): Update.
2601
2602 2018-02-06 Yao Qi <yao.qi@linaro.org>
2603
2604 * expprint.c (print_subexp_standard): Handle
2605 OP_F77_UNDETERMINED_ARGLIST.
2606 (dump_subexp_body_standard): Likewise.
2607
2608 2018-02-05 Alan Hayward <alan.hayward@arm.com>
2609
2610 * target-descriptions.c (tdesc_element_visitor) Add empty
2611 implementations.
2612 (tdesc_type): Move make_gdb_type from here.
2613 (tdesc_type_builtin): Likewise.
2614 (tdesc_type_vector): Likewise.
2615 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
2616 (make_gdb_type_struct): Move from tdesc_type_with_fields.
2617 (make_gdb_type_union): Likewise.
2618 (make_gdb_type_flags): Likewise.
2619 (make_gdb_type_enum): Likewise.
2620 (make_gdb_type): New function.
2621 (tdesc_register_type): Use static make_gdb_type.
2622
2623 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
2624
2625 * infcmd.c (default_print_one_register_info): Align natural-format
2626 column values consistently one under another.
2627 (pad_to_column): New function.
2628
2629 2018-02-05 Joel Brobecker <brobecker@adacore.com>
2630
2631 * dwarf2read.c (dwarf2_physname): Move commment.
2632
2633 2018-02-01 Leszek Swirski <leszeks@google.com>
2634
2635 * varobj.c (varobj_formatted_print_options): Allow recursive
2636 pretty printing if pretty printing is enabled.
2637
2638 2018-02-01 Leszek Swirski <leszeks@google.com>
2639
2640 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
2641 names after a structop as a filename.
2642
2643 2018-02-01 Yao Qi <yao.qi@linaro.org>
2644
2645 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
2646 (arm_record_coproc_data_proc): Likewise.
2647
2648 2018-02-01 Yao Qi <yao.qi@linaro.org>
2649
2650 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
2651
2652 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
2653
2654 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
2655 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
2656
2657 2018-01-31 Pedro Alves <palves@redhat.com>
2658
2659 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
2660 * inflow.c (child_terminal_save_inferior): Wrap reference to
2661 tcgetpgrp in HAVE_TERMIOS_H.
2662 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
2663 _WIN32.
2664 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
2665 always iterate over all inferiors.
2666 (gdbsim_cntrl_c): Adjust.
2667 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
2668
2669 2018-01-31 Joel Brobecker <brobecker@adacore.com>
2670
2671 * gdbtypes.c (lookup_array_range_type): Make sure the array's
2672 index type is objfile-owned if the element type is as well.
2673
2674 2018-01-31 Joel Brobecker <brobecker@adacore.com>
2675
2676 GDB 8.1 released.
2677
2678 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
2679
2680 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
2681 "features/s390x-linux64.c".
2682 (_initialize_s390_linux_tdep): Remove initialization of tdescs
2683 s390_linux32 and s390x_linux64.
2684 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
2685 default tdesc.
2686 * s390-tdep.c: Include "features/s390-linux32.c" and
2687 "features/s390x-linux64.c".
2688 (s390_tdesc_valid): Add check for tdesc_has_registers.
2689 (s390_gdbarch_init): Make sure there is always a valid tdesc.
2690 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
2691 tdesc_s390x_linux64.
2692 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
2693 tdesc_s390x_linux64 to...
2694 * s390-tdep.h: ...here.
2695
2696 2018-01-30 Pedro Alves <palves@redhat.com>
2697
2698 PR gdb/13211
2699 * config.in, configure: Regenerate.
2700 * configure.ac: Check for getpgid.
2701 * go32-nat.c (go32_pass_ctrlc): New.
2702 (go32_target): Install it.
2703 * inf-child.c (inf_child_target): Install
2704 child_terminal_save_inferior, child_pass_ctrlc and
2705 child_interrupt.
2706 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
2707 (inf_ptrace_target): No longer install it.
2708 * infcmd.c (interrupt_target_1): Adjust.
2709 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
2710 (child_interrupt): Declare.
2711 (inferior::terminal_state): New.
2712 * inflow.c (struct terminal_info): Update comments.
2713 (inferior_process_group): Delete.
2714 (terminal_is_ours): Delete.
2715 (gdb_tty_state): New.
2716 (child_terminal_init): Adjust.
2717 (is_gdb_terminal, sharing_input_terminal_1)
2718 (sharing_input_terminal): New functions.
2719 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
2720 Set the process's actual process group in the foreground if
2721 possible. Handle is_ours_for_output/is_ours distinction. Don't
2722 mark terminal as the inferior's if not sharing GDB's terminal.
2723 Don't check attach_flag.
2724 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
2725 pass down a target_terminal_state.
2726 (child_terminal_save_inferior): New, factored out from ...
2727 (child_terminal_ours_1): ... this. Handle
2728 target_terminal_state::is_ours_for_output.
2729 (child_interrupt, child_pass_ctrlc): New.
2730 (inflow_inferior_exit): Clear the inferior's terminal_state.
2731 (copy_terminal_info): Copy the inferior's terminal state.
2732 (_initialize_inflow): Remove reference to terminal_is_ours.
2733 * inflow.h (inferior_process_group): Delete.
2734 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
2735 * procfs.c (procfs_target): Don't install procfs_interrupt.
2736 (procfs_interrupt): Delete.
2737 * remote.c (remote_serial_quit_handler): Adjust.
2738 (remote_interrupt): Remove ptid parameter. Adjust.
2739 * target-delegates.c: Regenerate.
2740 * target.c: Include "terminal.h".
2741 (target_terminal::terminal_state): Rename to ...
2742 (target_terminal::m_terminal_state): ... this.
2743 (target_terminal::init): Adjust.
2744 (target_terminal::inferior): Adjust to per-inferior
2745 terminal_state.
2746 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
2747 (target_terminal::ours, target_terminal::ours_for_output): Use
2748 target_terminal_is_ours_kind.
2749 (target_interrupt): Remove ptid parameter. Adjust.
2750 (default_target_pass_ctrlc): Adjust.
2751 * target.h (target_ops::to_terminal_save_inferior): New field.
2752 (target_ops::to_interrupt): Remove ptid_t parameter.
2753 (target_interrupt): Remove ptid_t parameter. Update comment.
2754 (target_pass_ctrlc): Update comment.
2755 * target/target.h (target_terminal_state): New scoped enum,
2756 factored out of ...
2757 (target_terminal::terminal_state): ... here.
2758 (target_terminal::inferior): Update comments.
2759 (target_terminal::restore_inferior): New.
2760 (target_terminal::is_inferior, target_terminal::is_ours)
2761 (target_terminal::is_ours_for_output): Adjust.
2762 (target_terminal::scoped_restore_terminal_state): Adjust to
2763 rename, and call restore_inferior() instead of inferior().
2764 (target_terminal::scoped_restore_terminal_state::m_state): Change
2765 type.
2766 (target_terminal::terminal_state): Rename to ...
2767 (target_terminal::m_terminal_state): ... this and change type.
2768
2769 2018-01-30 Pedro Alves <palves@redhat.com>
2770
2771 * linux-nat.c (wait_for_signal): New function.
2772 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
2773 directly.
2774 (async_terminal_is_ours)
2775 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
2776 (linux_nat_add_target): Don't override
2777 to_terminal_inferior/to_terminal_ours.
2778
2779 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
2780
2781 * remote.c (remote_follow_fork): Don't call "detach_inferior".
2782
2783 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
2784
2785 * dwarf2read.c (free_dwo_files): Add forward-declaration.
2786 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
2787 dwarf2_per_objfile_free here.
2788 (dwarf2_per_objfile_free): Remove.
2789 (_initialize_dwarf2_read): Don't register
2790 dwarf2_per_objfile_free as a registry cleanup.
2791
2792 2018-01-27 Eli Zaretskii <eliz@gnu.org>
2793
2794 Avoid compilation errors in MinGW native builds
2795
2796 The error is triggered by including python-internal.h, and the
2797 error message is:
2798
2799 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
2800 from build-gnulib/import/math.h:27,
2801 from d:/usr/Python26/include/pyport.h:235,
2802 from d:/usr/Python26/include/Python.h:58,
2803 from python/python-internal.h:94,
2804 from python/py-arch.c:24:
2805 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
2806 using ::hypot;
2807 ^~~~~
2808
2809 This happens because Python headers define 'hypot' to expand t
2810 '_hypot' in the Windows builds.
2811 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
2812 'hypoth'. This avoids a compilation error.
2813
2814 2018-01-26 Alan Hayward <alan.hayward@arm.com>
2815
2816 * MAINTAINERS (Write After Approval): Fix ordering.
2817
2818 2018-01-26 Alan Hayward <alan.hayward@arm.com>
2819
2820 * MAINTAINERS (Write After Approval): Add Alan Hayward.
2821
2822 2018-01-26 Alan Modra <amodra@gmail.com>
2823
2824 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
2825 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
2826 Remove nop. Make const. Comment.
2827 (powerpc32_plt_stub_so_2): New.
2828 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
2829 Correct count. Update uses.
2830 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
2831 Move common code reading PLT entry word. Correct
2832 powerpc32_plt_stub PLT address calculation.
2833 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
2834 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
2835 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
2836 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
2837 (ppc64_standard_linkage8): Likewise.
2838 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
2839 Correct insns description.
2840 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
2841
2842 2018-01-24 Pedro Alves <palves@redhat.com>
2843
2844 GCC PR libstdc++/83906
2845 * gdbtypes.c (operator==(const dynamic_prop &,
2846 const dynamic_prop &)): New.
2847 (operator==(const range_bounds &, const range_bounds &)): New.
2848 (check_types_equal): Use them instead of memcmp.
2849 * gdbtypes.h (operator==(const dynamic_prop &,
2850 const dynamic_prop &)): Declare.
2851 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
2852 (operator==(const range_bounds &, const range_bounds &)): Declare.
2853 (operator!=(const range_bounds &, const range_bounds &)): Declare.
2854
2855 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2856
2857 * s390-linux-tdep.c (s390_record_address_mask)
2858 (s390_record_calc_disp_common, s390_record_calc_disp)
2859 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
2860 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
2861 (s390_process_record): Move to s390-tdep.c.
2862 (s390_linux_init_abi_any): Adjust.
2863 * s390-tdep.c (s390_record_address_mask)
2864 (s390_record_calc_disp_common, s390_record_calc_disp)
2865 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
2866 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
2867 (s390_process_record): Moved from s390-linux-tdep.c
2868 (s390_gdbarch_init): Adjust.
2869
2870 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2871
2872 * s390-linux-nat.c (s390-tdep.h): New include.
2873 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
2874 (HFILES_NO_SRCDIR): Add s390-tdep.h.
2875 (ALLDEPFILES): Add s390-tdep.c.
2876 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
2877 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
2878 * s390-tdep.h: ...this. New file.
2879 * s390-linux-tdep.c (s390-tdep.h): New include.
2880 (_initialize_s390_tdep): Rename to...
2881 (_initialize_s390_linux_tdep): ...this and adjust.
2882 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
2883 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
2884 s390-tdep.h.
2885 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
2886 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
2887 (s390_is_partial_instruction, s390_software_single_step)
2888 (is_non_branch_ril, s390_displaced_step_copy_insn)
2889 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
2890 (s390_prologue_data, s390_addr, s390_store, s390_load)
2891 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
2892 (s390_register_call_saved, s390_guess_tracepoint_registers)
2893 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
2894 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
2895 (s390_pseudo_register_name, s390_pseudo_register_type)
2896 (s390_pseudo_register_read, s390_pseudo_register_write)
2897 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
2898 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
2899 (s390_addr_bits_remove, s390_address_class_type_flags)
2900 (s390_address_class_type_flags_to_name)
2901 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
2902 (s390_function_arg_float, s390_function_arg_vector)
2903 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
2904 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
2905 (s390_frame_align, s390_register_return_value, s390_return_value)
2906 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
2907 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
2908 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
2909 (s390_trad_frame_prev_register, s390_unwind_cache)
2910 (s390_prologue_frame_unwind_cache)
2911 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
2912 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
2913 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
2914 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
2915 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
2916 (s390_frame_base_address, s390_local_base_address)
2917 (s390_frame_base, s390_gcc_target_options)
2918 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
2919 (s390_validate_reg_range, s390_tdesc_valid)
2920 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
2921 * s390-tdep.c: ...this. New file.
2922
2923 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2924
2925 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
2926 (s390_process_record, s390_gdbarch_tdep_alloc)
2927 (s390_linux_init_abi_any): Use/set new hook.
2928
2929 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2930
2931 * s390-linux-tdep.c (osabi.h): New include.
2932 (s390_linux_init_abi_31, s390_linux_init_abi_64)
2933 (s390_linux_init_abi_any): New functions.
2934 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
2935
2936 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2937
2938 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
2939 tdesc_has_registers check
2940
2941 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2942
2943 * s390-linux-tdep.c (s390_tdesc_valid): New function.
2944 (s390_validate_reg_range): New macro.
2945 (s390_gdbarch_init): Adjust.
2946
2947 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2948
2949 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
2950 (s390_gdbarch_tdep_alloc): Adjust.
2951 (s390_gdbarch_init): Adjust.
2952
2953 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2954
2955 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
2956 <have_tdb>: Change type to bool.
2957 (s390_gdbarch_tdep_alloc): Adjust.
2958 (s390_gdbarch_init): Adjust.
2959
2960 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2961
2962 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
2963 (gdbarch_tdep) <have_upper, have_vx>: New fields.
2964 (s390_gdbarch_tdep_alloc): New function.
2965 (s390_gdbarch_init): Allocate tdep at start and use its fields
2966 instead of separate variables.
2967
2968 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2969
2970 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
2971 when looking for cached gdbarch and add comment for remaining.
2972
2973 2018-01-22 Pedro Alves <palves@redhat.com>
2974 Sergio Durigan Junior <sergiodj@redhat.com>
2975
2976 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
2977 case.
2978
2979 2018-01-22 Maciej W. Rozycki <macro@mips.com>
2980
2981 * MAINTAINERS: Update my company e-mail address.
2982
2983 2018-01-22 Yao Qi <yao.qi@linaro.org>
2984
2985 * regcache.c (cooked_write_test): New function.
2986 (_initialize_regcache): Register the test.
2987
2988 2018-01-22 Yao Qi <yao.qi@linaro.org>
2989
2990 * ia64-tdep.c (ia64_pseudo_register_read): Call
2991 regcache->cooked_read instead of regcache_cooked_read_unsigned.
2992 * m32c-tdep.c (m32c_cat_read): Likewise.
2993 (m32c_r3r2r1r0_read): Likewise.
2994 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
2995 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
2996
2997 2018-01-22 Yao Qi <yao.qi@linaro.org>
2998
2999 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
3000 method raw_read instead of regcache_raw_read.
3001 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
3002 * arm-tdep.c (arm_neon_quad_read): Likewise.
3003 * avr-tdep.c (avr_pseudo_register_read): Likewise.
3004 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
3005 * frv-tdep.c (frv_pseudo_register_read): Likewise.
3006 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
3007 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3008 (i386_pseudo_register_read_into_value): Likewise.
3009 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
3010 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
3011 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
3012 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
3013 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
3014 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
3015 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
3016 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
3017 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
3018
3019 2018-01-22 Yao Qi <yao.qi@linaro.org>
3020
3021 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
3022 * configure.tgt: Remove target mt.
3023 * mt-tdep.c: Remove.
3024 * regcache.c (cooked_read_test): Remove the check for mt.
3025
3026 2018-01-22 Yao Qi <yao.qi@linaro.org>
3027
3028 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
3029 instead of gdbarch_pseudo_register_read_value.
3030
3031 2018-01-22 Joel Brobecker <brobecker@adacore.com>
3032
3033 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
3034 language is Ada.
3035
3036 2018-01-22 Joel Brobecker <brobecker@adacore.com>
3037
3038 * linespec.c (create_sals_line_offset): Remove code that preserved
3039 the symtab_and_line's line number.
3040
3041 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3042
3043 * varobj.c (varobj_create): Don't set valid_block when creating a
3044 floating varobj.
3045
3046 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3047
3048 * varobj.c (varobj_create): Remove out of date comment.
3049
3050 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3051
3052 PR mi/20395
3053 * ada-exp.y (write_var_from_sym): Pass extra parameter when
3054 updating innermost block.
3055 * parse.c (innermost_block_tracker::update): Take extra type
3056 parameter, and check types match before updating innermost block.
3057 (write_dollar_variable): Update innermost block for registers.
3058 * parser-defs.h (enum innermost_block_tracker_type): New enum.
3059 (innermost_block_tracker::innermost_block_tracker): Initialise
3060 m_types member.
3061 (innermost_block_tracker::reset): Take type parameter.
3062 (innermost_block_tracker::update): Take type parameter, and pass
3063 type through as needed.
3064 (innermost_block_tracker::m_types): New member.
3065 * varobj.c (varobj_create): Pass type when reseting innermost
3066 block.
3067
3068 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3069
3070 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
3071 * ada-lang.c (resolve_subexp): Likewise.
3072 * breakpoint.c (set_breakpoint_condition) Likewise.
3073 (watch_command_1) Likewise.
3074 * c-exp.y (variable): Likewise.
3075 * d-exp.y (PrimaryExpression): Likewise.
3076 * f-exp.y (variable): Likewise.
3077 * go-exp.y (variable): Likewise.
3078 * m2-exp.y (variable): Likewise.
3079 * objfiles.c (objfile::~objfile): Likewise.
3080 * p-exp.y (variable): Likewise.
3081 * parse.c (innermost_block): Change type.
3082 * parser-defs.h (class innermost_block_tracker): New.
3083 (innermost_block): Change to innermost_block_tracker.
3084 * printcmd.c (display_command): Switch to innermost_block API.
3085 (do_one_display): Likewise.
3086 * rust-exp.y (do_one_display): Likewise.
3087 * symfile.c (clear_symtab_users): Likewise.
3088 * varobj.c (varobj_create): Switch to innermost_block API, replace
3089 use of innermost_block with block stored on varobj object.
3090
3091 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3092
3093 * expression.h (innermost_block): Remove declaration.
3094 * varobj.c: Add 'parser-defs.h' include.
3095
3096 2018-01-19 Tom Tromey <tom@tromey.com>
3097
3098 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
3099 symbols in the static and global blocks.
3100
3101 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3102
3103 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
3104 gdb_ptrace.h, and move including gdb_wait.h ...
3105 * nat/linux-ptrace.h: ... to here.
3106
3107 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3108
3109 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
3110 inf_ptrace_detach_success.
3111 (inf_ptrace_detach_success): Add inferior parameter, use it
3112 instead of inferior_ptid, pass it to detach_inferior.
3113 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
3114 parameter.
3115 * inferior.c (detach_inferior): Add overload that takes an
3116 inferior object.
3117 * inferior.h (detach_inferior): Likewise.
3118 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
3119 use inferior_ptid, adjust call to inf_ptrace_detach_success.
3120 * linux-thread-db.c (thread_db_detach): Use inf parameter.
3121
3122 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3123
3124 * target.h (struct target_ops) <to_detach>: Add inferior
3125 parameter.
3126 (target_detach): Likewise.
3127 * target.c (dispose_inferior): Pass inferior down.
3128 (target_detach): Pass inferior down. Assert that it is equal to
3129 the current inferior.
3130 * aix-thread.c (aix_thread_detach): Pass inferior down.
3131 * corefile.c (core_file_command): Pass current_inferior() down.
3132 * corelow.c (core_detach): Add inferior parameter.
3133 * darwin-nat.c (darwin_detach): Likewise.
3134 * gnu-nat.c (gnu_detach): Likewise.
3135 * inf-ptrace.c (inf_ptrace_detach): Likewise.
3136 * infcmd.c (detach_command): Pass current_inferior() down to
3137 target_detach.
3138 * infrun.c (follow_fork_inferior): Pass parent_inf to
3139 target_detach.
3140 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
3141 target_detach.
3142 * linux-nat.c (linux_nat_detach): Add inferior parameter.
3143 * linux-thread-db.c (thread_db_detach): Likewise.
3144 * nto-procfs.c (procfs_detach): Likewise.
3145 * procfs.c (procfs_detach): Likewise.
3146 * record.c (record_detach): Likewise.
3147 * record.h (struct inferior): Forward-declare.
3148 (record_detach): Add inferior parameter.
3149 * remote-sim.c (gdbsim_detach): Likewise.
3150 * remote.c (remote_detach_1): Likewise.
3151 (remote_detach): Likewise.
3152 (extended_remote_detach): Likewise.
3153 * sol-thread.c (sol_thread_detach): Likewise.
3154 * target-debug.h (target_debug_print_inferior_p): New macro.
3155 * target-delegates.c: Re-generate.
3156 * top.c (kill_or_detach): Pass inferior down to target_detach.
3157 * windows-nat.c (windows_detach): Add inferior parameter.
3158
3159 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3160
3161 * target.h (struct target_ops) <to_detach>: Remove args
3162 parameter.
3163 (target_detach): Likewise.
3164 * target.c (dispose_inferior): Adjust.
3165 (target_detach): Remove args parameter, adjust.
3166 * aix-thread.c (aix_thread_detach): Adjust.
3167 * corefile.c (core_file_command): Adjust.
3168 * corelow.c (core_detach): Adjust.
3169 * darwin-nat.c (darwin_detach): Adjust.
3170 * gnu-nat.c (gnu_detach): Adjust.
3171 * inf-ptrace.c (inf_ptrace_detach): Adjust.
3172 * infcmd.c (detach_command): Adjust
3173 * infrun.c (follow_fork_inferior): Adjust.
3174 (handle_vfork_child_exec_or_exit): Adjust.
3175 * linux-fork.c (linux_fork_detach): Remove args parameter.
3176 * linux-fork.h (linux_fork_detach): Likewise.
3177 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
3178 * linux-thread-db.c (thread_db_detach): Likewise.
3179 * nto-procfs.c (procfs_detach): Likewise.
3180 * procfs.c (procfs_detach): Likewise.
3181 (do_detach): Remove signo parameter.
3182 * record.c (record_detach): Remove args parameter.
3183 * record.h (record_detach): Likewise.
3184 * remote-sim.c (gdbsim_detach): Likewise.
3185 * remote.c (remote_detach_1): Likewise.
3186 (remote_detach): Likewise.
3187 (extended_remote_detach): Likewise.
3188 * sol-thread.c (sol_thread_detach): Likewise.
3189 * target-delegates.c: Re-generate.
3190 * top.c (struct qt_args) <args>: Remove field.
3191 (kill_or_detach): Don't pass args.
3192 (quit_force): Don't set args.
3193 * windows-nat.c (windows_detach): Remove args parameter.
3194
3195 2018-01-19 Yao Qi <yao.qi@linaro.org>
3196
3197 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
3198 (arm_linux_init_abi): Install it.
3199
3200 2018-01-19 Yao Qi <yao.qi@linaro.org>
3201
3202 * osabi.c (gdb_osabi_names): Extend the regexp for
3203 arm-linux-gnueabihf.
3204
3205 2018-01-18 Yao Qi <yao.qi@linaro.org>
3206
3207 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
3208 m_abbrevs.
3209 (abbrev_table::add_abbrev): Update.
3210 (abbrev_table::lookup_abbrev): Update.
3211
3212 2018-01-18 Yao Qi <yao.qi@linaro.org>
3213
3214 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
3215
3216 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
3217
3218 * compile/compile.c (compile_to_object): Convert "triplet_rx"
3219 to "std::string".
3220
3221 2018-01-17 Tom Tromey <tom@tromey.com>
3222
3223 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
3224
3225 2018-01-17 Tom Tromey <tom@tromey.com>
3226
3227 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
3228 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
3229 (create_array_type_with_stride): Update.
3230 * dwarf2read.c (set_die_type): Update.
3231
3232 2018-01-17 Tom Tromey <tom@tromey.com>
3233
3234 * dwarf2read.c (delayed_method_info): Remove typedef.
3235 (dwarf2_cu::method_info): Now a std::vector.
3236 (add_to_method_list): Update.
3237 (free_delayed_list): Remove.
3238 (compute_delayed_physnames): Update.
3239 (process_full_comp_unit, process_full_type_unit): Clear the method
3240 list. Remove cleanups.
3241 (psymtab_include_file_name): Add name_holder parameter. Use
3242 unique_xmalloc_ptr.
3243 (dwarf_decode_lines): Update.
3244
3245 2018-01-17 Tom Tromey <tom@tromey.com>
3246 Simon Marchi <simon.marchi@ericsson.com>
3247
3248 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
3249 (dwarf2_per_objfile::free_cached_comp_units)
3250 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3251 (init_cutu_and_read_dies_no_follow): Update.
3252 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
3253 (dwarf2_cu::~dwarf2_cu): New.
3254 (free_heap_comp_unit, free_stack_comp_unit): Remove.
3255 (age_cached_comp_units, free_one_cached_comp_unit): Update.
3256
3257 2018-01-17 Tom Tromey <tom@tromey.com>
3258 Simon Marchi <simon.marchi@ericsson.com>
3259
3260 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
3261 (struct die_reader_specs) <abbrev_table>: New member.
3262 (struct abbrev_table): Add constructor.
3263 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
3264 <abbrev_obstack>: Now an auto_obstack.
3265 (abbrev_table_up): New typedef.
3266 (init_cu_die_reader): Add abbrev_table parameter.
3267 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
3268 Add result_dwo_abbrev_table.
3269 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3270 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
3271 Update.
3272 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
3273 parameter.
3274 (skip_children): Update.
3275 (abbrev_table::alloc_abbrev): Rename from
3276 abbrev_table_alloc_abbrev.
3277 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
3278 (abbrev_table::lookup_abbrev): Rename from
3279 abbrev_table_lookup_abbrev.
3280 (abbrev_table_read_table): Return abbrev_table_up.
3281 (abbrev_table_free, abbrev_table_free_cleanup)
3282 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
3283 (load_partial_dies): Update.
3284
3285 2018-01-17 Tom Tromey <tom@tromey.com>
3286
3287 * dwarf2read.c (dwarf2_compute_name): Update comment.
3288 (read_func_scope, read_variable): Update.
3289 (new_symbol): Remove.
3290 (new_symbol_full): Rename to new_symbol.
3291
3292 2018-01-17 Mike Gulick <mgulick@mathworks.com>
3293
3294 PR gdb/16577
3295 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
3296 a warning instead of throwing an error, set section size to 0 and return
3297 NULL.
3298 * gdb_bfd.h (gdb_bfd_map_section): Update description.
3299
3300 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3301
3302 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
3303 std::string.
3304 (linux_ptrace_attach_fail_reason_string): Likewise.
3305 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
3306 Likewise.
3307 (linux_ptrace_attach_fail_reason_string): Likewise.
3308 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
3309
3310 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3311
3312 * linux-nat.c (linux_nat_attach): Remove xstrdup.
3313
3314 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3315
3316 PR gdb/21559
3317 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3318 checking for fs_base/gs_base fields in struct user_regs_struct.
3319 * configure: Regenerate.
3320
3321 2018-01-17 Yao Qi <yao.qi@linaro.org>
3322
3323 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
3324 function.
3325 (aarch64_linux_init_abi): Install it to gdbarch hook
3326 gcc_target_options.
3327
3328 2018-01-15 Pedro Alves <palves@redhat.com>
3329
3330 * common/signals-state-save-restore.c
3331 (save_original_signals_state): Fix typos.
3332
3333 2017-01-12 Tom Tromey <tom@tromey.com>
3334 Sergio Durigan Junior <sergiodj@redhat.com>
3335
3336 * Makefile.in (install-only): Install gdb-add-index.
3337
3338 2018-01-12 John Baldwin <jhb@FreeBSD.org>
3339
3340 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
3341
3342 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3343
3344 * infrun.c (keep_going_pass_signal): Clear step-over info when
3345 insert_breakpoints fails.
3346
3347 2018-01-11 Pedro Alves <palves@redhat.com>
3348
3349 PR gdb/22583
3350 * infrun.c (resume): Rename to ...
3351 (resume_1): ... this.
3352 (resume): Reimplement as wrapper around resume_1.
3353
3354 2018-01-11 Pedro Alves <palves@redhat.com>
3355
3356 PR remote/22597
3357 * remote.c (remote_parse_stop_reply): Default to the last-set
3358 general thread instead of to 'magic_null_ptid'.
3359
3360 2018-01-10 Pedro Alves <palves@redhat.com>
3361
3362 * language.h (language_get_symbol_name_matcher): Rename ...
3363 (get_symbol_name_matcher): ... this.
3364 * language.c (language_get_symbol_name_matcher): Ditto.
3365 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
3366 callers adjusted.
3367
3368 2018-01-10 Pedro Alves <palves@redhat.com>
3369
3370 PR gdb/22670
3371 * dwarf2read.c
3372 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
3373 Adjust to use language_get_symbol_name_matcher instead of
3374 language_defn::la_get_symbol_name_matcher.
3375 * language.c (language_get_symbol_name_matcher): If in Ada mode
3376 and the lookup name is a verbatim match, return Ada's matcher.
3377 * language.h (language_get_symbol_name_matcher): Adjust comment.
3378 (ada_lookup_name_info::verbatim_p):: New method.
3379
3380 2018-01-10 Pedro Alves <palves@redhat.com>
3381
3382 PR gdb/22670
3383 * ada-lang.c (ada_collect_symbol_completion_matches): If the
3384 minsym's language is language_auto or language_cplus, pass down
3385 language_ada instead.
3386 * symtab.c (compare_symbol_name): Don't frob symbol language here.
3387
3388 2018-01-10 Pedro Alves <palves@redhat.com>
3389
3390 PR gdb/22670
3391 * minsyms.c (linkage_name_str): New function.
3392 (iterate_over_minimal_symbols): Use it.
3393
3394 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3395
3396 * NEWS: Document that 'info proc' now works on FreeBSD.
3397
3398 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3399
3400 * configure.ac: Check for kinfo_getfile in libutil.
3401 * configure: Regenerate.
3402 * config.in: Regenerate.
3403 * fbsd-nat.c: Include "fbsd-tdep.h".
3404 (fbsd_fetch_cmdline): New.
3405 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
3406 rather than calling error.
3407 (fbsd_info_proc): New.
3408 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
3409 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
3410 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
3411
3412 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3413
3414 * fbsd-nat.c (struct free_deleter): Remove.
3415 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
3416
3417 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3418
3419 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
3420 NULL for an empty pathname.
3421
3422 2018-01-09 John Baldwin <jhb@FreeBSD.org>
3423
3424 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
3425 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
3426 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
3427 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
3428 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
3429 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
3430 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
3431 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
3432 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
3433 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
3434 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
3435 (fbsd_core_fetch_timeval, fbsd_print_sigset)
3436 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
3437 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
3438 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
3439
3440 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
3441
3442 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
3443 (gnu_xfer_auxv): New function.
3444 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
3445 TARGET_OBJECT_AUXV.
3446
3447 2018-01-08 Yao Qi <yao.qi@linaro.org>
3448 Simon Marchi <simon.marchi@ericsson.com>
3449
3450 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
3451 common/selftest.c.
3452 (COMMON_OBS): Remove selftest.o.
3453 * configure.ac: Append selftest-arch.c and common/selftest.c to
3454 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
3455 * configure: Re-generated.
3456 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
3457 GDB_SELF_TEST.
3458 (maintenance_info_selftests): Likewise.
3459
3460 2018-01-08 Xavier Roirand <roirand@adacore.com>
3461
3462 * ada-valprint.c (val_print_packed_array_elements): Use
3463 proper number of elements when printing an array indexed
3464 by an enumeration type.
3465
3466 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3467
3468 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
3469 (dw2_get_file_names_reader): Adjust.
3470 (lookup_dwo_signatured_type): Adjust.
3471 (lookup_dwp_signatured_type): Adjust.
3472 (lookup_signatured_type): Adjust.
3473 (create_type_unit_group): Adjust.
3474 (get_type_unit_group): Adjust.
3475 (process_psymtab_comp_unit_reader): Adjust.
3476 (build_type_psymtabs_reader): Adjust.
3477 (scan_partial_symbols): Adjust.
3478 (add_partial_symbol): Adjust.
3479 (add_partial_subprogram): Adjust.
3480 (peek_die_abbrev): Adjust.
3481 (fixup_go_packaging): Adjust.
3482 (process_imported_unit_die): Adjust.
3483 (dwarf2_compute_name): Adjust.
3484 (dwarf2_physname): Adjust.
3485 (read_import_statement): Adjust.
3486 (handle_DW_AT_stmt_list): Adjust.
3487 (read_file_scope): Adjust.
3488 (read_func_scope): Adjust.
3489 (read_lexical_block_scope): Adjust.
3490 (read_call_site_scope): Adjust.
3491 (read_variable): Adjust.
3492 (dwarf2_rnglists_process): Adjust.
3493 (dwarf2_ranges_process): Adjust.
3494 (dwarf2_ranges_read): Adjust.
3495 (dwarf2_get_pc_bounds): Adjust.
3496 (dwarf2_record_block_ranges): Adjust.
3497 (dwarf2_add_field): Adjust.
3498 (dwarf2_add_member_fn): Adjust.
3499 (read_structure_type): Adjust.
3500 (process_structure_scope): Adjust.
3501 (read_enumeration_type): Adjust.
3502 (read_array_type): Adjust.
3503 (mark_common_block_symbol_computed): Adjust.
3504 (read_common_block): Adjust.
3505 (read_namespace_type): Adjust.
3506 (read_namespace): Adjust.
3507 (read_module_type): Adjust.
3508 (read_tag_pointer_type): Adjust.
3509 (read_tag_ptr_to_member_type): Adjust.
3510 (read_tag_string_type): Adjust.
3511 (read_subroutine_type): Adjust.
3512 (read_typedef): Adjust.
3513 (read_base_type): Adjust.
3514 (attr_to_dynamic_prop): Adjust.
3515 (read_subrange_type): Adjust.
3516 (read_unspecified_type): Adjust.
3517 (dwarf2_read_abbrevs): Adjust.
3518 (load_partial_dies): Adjust.
3519 (read_partial_die): Adjust.
3520 (find_partial_die): Adjust.
3521 (guess_partial_die_structure_name): Adjust.
3522 (fixup_partial_die): Adjust.
3523 (read_attribute_value): Adjust.
3524 (read_addr_index): Adjust.
3525 (read_addr_index_from_leb128): Adjust.
3526 (read_str_index): Adjust.
3527 (dwarf2_string_attr): Adjust.
3528 (get_debug_line_section): Adjust.
3529 (dwarf_decode_line_header): Adjust.
3530 (lnp_state_machine::check_line_address): Adjust.
3531 (dwarf_decode_lines_1): Adjust.
3532 (dwarf_decode_lines): Adjust.
3533 (dwarf2_start_symtab): Adjust.
3534 (var_decode_location): Adjust.
3535 (new_symbol_full): Adjust.
3536 (dwarf2_const_value_data): Adjust.
3537 (dwarf2_const_value_attr): Adjust.
3538 (dwarf2_const_value): Adjust.
3539 (die_type): Adjust.
3540 (die_containing_type): Adjust.
3541 (build_error_marker_type): Adjust.
3542 (lookup_die_type): Adjust.
3543 (guess_full_die_structure_name): Adjust.
3544 (anonymous_struct_prefix): Adjust.
3545 (determine_prefix): Adjust.
3546 (dwarf2_name): Adjust.
3547 (follow_die_ref_or_sig): Adjust.
3548 (follow_die_offset): Adjust.
3549 (follow_die_ref): Adjust.
3550 (follow_die_sig_1): Adjust.
3551 (follow_die_sig): Adjust.
3552 (get_signatured_type): Adjust.
3553 (get_DW_AT_signature_type): Adjust.
3554 (decode_locdesc): Adjust.
3555 (dwarf_decode_macros): Adjust.
3556 (cu_debug_loc_section): Adjust.
3557 (fill_in_loclist_baton): Adjust.
3558 (dwarf2_symbol_mark_computed): Adjust.
3559 (init_one_comp_unit): Don't assign
3560 dwarf2_cu::dwarf2_per_objfile.
3561 (set_die_type): Adjust.
3562
3563 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
3564
3565 * dwarf2read.c (struct mapped_debug_names): Add constructor.
3566 <dwarf2_per_objfile>: New field.
3567 (dwarf2_per_objfile): Remove global.
3568 (get_dwarf2_per_objfile): New function.
3569 (set_dwarf2_per_objfile): New function.
3570 (dwarf2_build_psymtabs_hard): Change objfile parameter to
3571 dwarf2_per_objfile.
3572 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
3573 (read_abbrev_offset): Likewise.
3574 (read_indirect_string): Likewise.
3575 (read_indirect_line_string): Likewise.
3576 (read_indirect_string_at_offset): Likewise.
3577 (read_indirect_string_from_dwz): Likewise.
3578 (dwarf2_find_containing_comp_unit): Change objfile parameter to
3579 dwarf2_per_objfile.
3580 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
3581 (create_all_comp_units): Change objfile parameter to
3582 dwarf2_per_objfile.
3583 (create_all_type_units): Likewise.
3584 (process_queue): Add dwarf2_per_objfile parameter.
3585 (read_and_check_comp_unit_head): Likewise.
3586 (lookup_dwo_unit_in_dwp): Likewise.
3587 (get_dwp_file): Likewise.
3588 (process_cu_includes): Likewise.
3589 (struct free_dwo_file_cleanup_data): New struct.
3590 (dwarf2_has_info): Use get_dwarf2_per_objfile and
3591 set_dwarf2_per_objfile.
3592 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
3593 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
3594 context, adjust calls.
3595 (dw2_instantiate_symtab): Likewise.
3596 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
3597 (dw2_get_cu): Likewise.
3598 (create_cu_from_index_list): Change objfile parameter to
3599 dwarf2_per_objfile.
3600 (create_cus_from_index_list): Get dwarf2_per_objfile from
3601 context, adjust calls.
3602 (create_cus_from_index): Likewise.
3603 (create_signatured_type_table_from_index): Change objfile
3604 parameter to dwarf2_per_objfile.
3605 (create_signatured_type_table_from_debug_names): Change objfile
3606 parameter to dwarf2_per_objfile.
3607 (create_addrmap_from_index): Likewise.
3608 (create_addrmap_from_aranges): Likewise.
3609 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
3610 (dw2_setup): Remove.
3611 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
3612 context.
3613 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
3614 get_dwarf2_per_objfile.
3615 (dw2_forget_cached_source_info): Likewise.
3616 (dw2_map_symtabs_matching_filename): Likewise.
3617 (struct dw2_symtab_iterator) <index>: Remove.
3618 <dwarf2_per_objfile>: New field.
3619 (dw2_symtab_iter_init): Replace index parameter with
3620 dwarf2_per_objfile.
3621 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
3622 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
3623 (dw2_print_stats): Likewise.
3624 (dw2_dump): Likewise.
3625 (dw2_expand_symtabs_for_function): Likewise.
3626 (dw2_expand_all_symtabs): Likewise.
3627 (dw2_expand_symtabs_with_fullname): Likewise.
3628 (dw2_expand_marked_cus): Replace index and objfile parameters
3629 with dwarf2_per_objfile.
3630 (dw_expand_symtabs_matching_file_matcher): Add
3631 dwarf2_per_objfile parameter and adjust calls.
3632 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
3633 adjust calls.
3634 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
3635 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
3636 adjust calls.
3637 (create_cus_from_debug_names_list): Replace objfile parameter
3638 with dwarf2_per_objfile and adjust calls.
3639 (create_cus_from_debug_names): Likewise.
3640 (dwarf2_read_debug_names): Likewise.
3641 (mapped_debug_names::namei_to_name): Adjust call.
3642 (dw2_debug_names_iterator::next): Likewise.
3643 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
3644 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
3645 (dw2_debug_names_dump): Likewise.
3646 (dw2_debug_names_expand_symtabs_for_function): Likewise.
3647 (dw2_debug_names_expand_symtabs_matching): Likewise.
3648 (dwarf2_initialize_objfile): Likewise.
3649 (dwarf2_build_psymtabs): Likewise.
3650 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
3651 this_cu.
3652 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
3653 (read_and_check_comp_unit_head): Likewise.
3654 (read_abbrev_offset): Likewise.
3655 (create_debug_type_hash_table): Likewise.
3656 (create_debug_types_hash_table): Likewise.
3657 (create_all_type_units): Replace objfile parameter with
3658 dwarf2_per_objfile.
3659 (add_type_unit): Add dwarf2_per_objfile parameter.
3660 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
3661 with dwarf2_per_objfile.
3662 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
3663 (lookup_dwp_signatured_type): Likewise.
3664 (lookup_signatured_type): Likewise.
3665 (read_cutu_die_from_dwo): Likewise.
3666 (init_tu_and_read_dwo_dies): Likewise.
3667 (init_cutu_and_read_dies): Likewise.
3668 (init_cutu_and_read_dies_no_follow): Likewise.
3669 (allocate_type_unit_groups_table): Add objfile parameter.
3670 (create_type_unit_group): Use dwarf2_per_objfile from cu.
3671 (get_type_unit_group): Likewise.
3672 (process_psymtab_comp_unit): Update call.
3673 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
3674 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
3675 (print_tu_stats): Likewise.
3676 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
3677 in void* parameter.
3678 (build_type_psymtabs): Change objfile parameter to
3679 dwarf2_per_objfile.
3680 (process_skeletonless_type_unit): Use dwarf2_per_objfile
3681 passed in void* parameter.
3682 (process_skeletonless_type_units): Change objfile parameter to
3683 dwarf2_per_objfile.
3684 (set_partial_user): Likewise.
3685 (dwarf2_build_psymtabs_hard): Likewise.
3686 (read_comp_units_from_section): Likewise.
3687 (create_all_comp_units): Likewise.
3688 (scan_partial_symbols): Update calls.
3689 (add_partial_symbol): Likewise.
3690 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
3691 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
3692 (process_queue): Add dwarf2_per_objfile parameter.
3693 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
3694 (compute_compunit_symtab_includes): Likewise.
3695 (process_cu_includes): Add dwarf2_per_objfile parameter.
3696 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
3697 (process_full_type_unit): Likewise.
3698 (process_imported_unit_die): Update call.
3699 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
3700 (read_file_scope): Likewise.
3701 (allocate_dwo_file_hash_table): Add objfile parameter.
3702 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
3703 (create_cus_hash_table): Likewise.
3704 (create_dwp_hash_table): Likewise.
3705 (create_dwo_unit_in_dwp_v1): Likewise.
3706 (create_dwp_v2_section): Likewise.
3707 (create_dwo_unit_in_dwp_v2): Likewise.
3708 (lookup_dwo_unit_in_dwp): Likewise.
3709 (try_open_dwop_file): Likewise.
3710 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
3711 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
3712 cleanup to include a reference to dwarf2_per_objfile.
3713 (open_dwp_file): Add dwarf2_per_objfile parameter.
3714 (open_and_init_dwp_file): Likewise.
3715 (get_dwp_file): Likewise.
3716 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
3717 (queue_and_load_all_dwo_tus): Update call.
3718 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
3719 data.
3720 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
3721 (dwarf2_ranges_process): Likewise.
3722 (dwarf2_get_pc_bounds): Likewise.
3723 (mark_common_block_symbol_computed): Likewise.
3724 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
3725 (dwarf2_read_abbrevs): Update call.
3726 (read_partial_die): Use dwarf2_per_objfile from cu.
3727 (find_partial_die): Likewise.
3728 (fixup_partial_die): Likewise.
3729 (read_attribute_value): Likewise.
3730 (read_indirect_string_at_offset_from): Add objfile parameter.
3731 (read_indirect_string_at_offset): Add dwarf2_per_objfile
3732 parameter.
3733 (read_indirect_string_from_dwz): Add objfile parameter.
3734 (read_indirect_string): Add objfile parameter.
3735 (read_addr_index_1): Add dwarf2_per_objfile parameter.
3736 (read_addr_index): Use dwarf2_per_objfile from cu.
3737 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
3738 call dw2_setup.
3739 (read_str_index): Use dwarf2_per_objfile from cu.
3740 (get_debug_line_section): Likewise.
3741 (read_formatted_entries): Add dwarf2_per_objfile parameter.
3742 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
3743 (new_symbol_full): Use dwarf2_per_objfile from cu.
3744 (build_error_marker_type): Likewise.
3745 (lookup_die_type): Likewise.
3746 (determine_prefix): Likewise.
3747 (follow_die_offset): Likewise.
3748 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
3749 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
3750 (dwarf2_fetch_die_type_sect_off): Likewise.
3751 (dwarf2_get_die_type): Likewise.
3752 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
3753 (get_signatured_type): Likewise.
3754 (get_DW_AT_signature_type): Likewise.
3755 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
3756 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
3757 (cu_debug_loc_section): Likewise.
3758 (fill_in_loclist_baton): Likewise.
3759 (dwarf2_symbol_mark_computed): Likewise.
3760 (dwarf2_find_containing_comp_unit): Change objfile parameter to
3761 dwarf2_per_objfile.
3762 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
3763 parameter.
3764 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
3765 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
3766 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
3767 (set_die_type): Use dwarf2_free_objfile from cu.
3768 (get_die_type_at_offset): Likewise.
3769 (dwarf2_per_objfile_free): Don't assign global variable.
3770 (debug_names) <constructor>: Add dwarf2_per_objfile
3771 parameter, update m_debugstrlookup construction.
3772 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
3773 parameter.
3774 <m_dwarf2_per_objfile>: New field.
3775 <lookup>: Use m_dwarf2_per_objfile.
3776 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
3777 (psyms_seen_size): Likewise.
3778 (write_gdbindex): Replace objfile parameter with
3779 dwarf2_per_objfile.
3780 (write_debug_names): Likewise.
3781 (write_psymtabs_to_index): Likewise.
3782 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
3783 calls.
3784
3785 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
3786
3787 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
3788 <dwarf2_per_objfile>: New field.
3789 (struct dwarf2_per_cu_data) <objfile>: Remove.
3790 <dwarf2_per_objfile>: New field.
3791 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
3792 of objfile.
3793 (create_signatured_type_table_from_index): Likewise.
3794 (create_debug_type_hash_table): Likewise.
3795 (fill_in_sig_entry_from_dwo_entry): Likewise.
3796 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
3797 (create_type_unit_group): Assign dwarf2_per_objfile instead of
3798 objfile.
3799 (create_partial_symtab): Access objfile through
3800 dwarf2_per_objfile.
3801 (process_psymtab_comp_unit_reader): Likewise.
3802 (read_comp_units_from_section): Likewise.
3803 (scan_partial_symbols): Likewise.
3804 (add_partial_symbol): Likewise.
3805 (add_partial_subprogram): Likewise.
3806 (peek_die_abbrev): Likewise.
3807 (fixup_go_packaging): Likewise.
3808 (process_full_comp_unit): Likewise.
3809 (process_full_type_unit): Likewise.
3810 (process_imported_unit_die): Likewise.
3811 (dwarf2_compute_name): Likewise.
3812 (dwarf2_physname): Likewise.
3813 (read_import_statement): Likewise.
3814 (create_cus_hash_table): Assign dwarf2_physname instead of
3815 objfile.
3816 (read_func_scope): Access objfile through dwarf2_per_objfile.
3817 (read_lexical_block_scope): Likewise.
3818 (read_call_site_scope): Likewise.
3819 (read_variable): Likewise.
3820 (dwarf2_rnglists_process): Likewise.
3821 (dwarf2_ranges_process): Likewise.
3822 (dwarf2_ranges_read): Likewise.
3823 (dwarf2_record_block_ranges): Likewise.
3824 (dwarf2_add_field): Likewise.
3825 (dwarf2_add_member_fn): Likewise.
3826 (read_structure_type): Likewise.
3827 (process_structure_scope): Likewise.
3828 (read_enumeration_type): Likewise.
3829 (read_array_type): Likewise.
3830 (read_common_block): Likewise.
3831 (read_namespace_type): Likewise.
3832 (read_namespace): Likewise.
3833 (read_module_type): Likewise.
3834 (read_tag_pointer_type): Likewise.
3835 (read_tag_ptr_to_member_type): Likewise.
3836 (read_tag_string_type): Likewise.
3837 (read_subroutine_type): Likewise.
3838 (read_typedef): Likewise.
3839 (read_base_type): Likewise.
3840 (attr_to_dynamic_prop): Likewise.
3841 (read_subrange_type): Likewise.
3842 (read_unspecified_type): Likewise.
3843 (load_partial_dies): Likewise.
3844 (read_partial_die): Likewise.
3845 (find_partial_die): Likewise.
3846 (guess_partial_die_structure_name): Likewise.
3847 (fixup_partial_die): Likewise.
3848 (read_attribute_value): Likewise.
3849 (read_addr_index_from_leb128): Likewise.
3850 (dwarf2_read_addr_index): Likewise.
3851 (dwarf2_string_attr): Likewise.
3852 (lnp_state_machine::check_line_address): Likewise.
3853 (dwarf_decode_lines_1): Likewise.
3854 (dwarf_decode_lines): Likewise.
3855 (dwarf2_start_symtab): Likewise.
3856 (var_decode_location): Likewise.
3857 (new_symbol_full): Likewise.
3858 (dwarf2_const_value_data): Likewise.
3859 (dwarf2_const_value_attr): Likewise.
3860 (dwarf2_const_value): Likewise.
3861 (die_type): Likewise.
3862 (die_containing_type): Likewise.
3863 (lookup_die_type): Likewise.
3864 (guess_full_die_structure_name): Likewise.
3865 (anonymous_struct_prefix): Likewise.
3866 (dwarf2_name): Likewise.
3867 (follow_die_ref_or_sig): Likewise.
3868 (follow_die_offset): Likewise.
3869 (follow_die_ref): Likewise.
3870 (dwarf2_fetch_die_loc_sect_off): Likewise.
3871 (dwarf2_fetch_constant_bytes): Likewise.
3872 (dwarf2_fetch_die_type_sect_off): Likewise.
3873 (dwarf2_get_die_type): Likewise.
3874 (follow_die_sig): Likewise.
3875 (decode_locdesc): Likewise.
3876 (dwarf2_per_cu_objfile): Likewise.
3877 (dwarf2_per_cu_text_offset): Likewise.
3878 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
3879 objfile.
3880 (set_die_type): Access objfile through
3881 dwarf2_per_objfile.
3882
3883 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
3884
3885 * valprint.c (converted_character_d): Remove typedef.
3886 (DEF_VEC_O (converted_character_d)): Remove.
3887 (count_next_character): Use std::vector.
3888 (print_converted_chars_to_obstack): Likewise.
3889 (generic_printstr): Likewise.
3890
3891 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3892
3893 * xml-support.h (struct gdb_xml_value): Add constructor.
3894 <value>: Change type to unique_xmalloc_ptr.
3895 (gdb_xml_value_s): Remove typedef.
3896 (DEF_VEC_O (gdb_xml_value_s)): Remove.
3897 (gdb_xml_element_start_handler): Change parameter type to
3898 std::vector.
3899 (xml_find_attribute): Likewise.
3900 * xml-support.c (xml_find_attribute): Change parameter type to
3901 std::vector and adjust.
3902 (gdb_xml_values_cleanup): Remove.
3903 (gdb_xml_parser::start_element): Adjust to std::vector.
3904 (xinclude_start_include): Change paraeter type to std::vector
3905 and adjust.
3906 * btrace.c (check_xml_btrace_version): Likewise.
3907 (parse_xml_btrace_block): Likewise.
3908 (parse_xml_btrace_pt_config_cpu): Likewise.
3909 (parse_xml_btrace_pt): Likewise.
3910 (parse_xml_btrace_conf_bts): Likewise.
3911 (parse_xml_btrace_conf_pt): Likewise.
3912 * memory-map.c (memory_map_start_memory): Likewise.
3913 (memory_map_start_property): Likewise.
3914 * osdata.c (osdata_start_osdata): Likewise.
3915 (osdata_start_item): Likewise.
3916 (osdata_start_column): Likewise.
3917 * remote.c (start_thread): Likewise.
3918 * solib-aix.c (library_list_start_library): Likewise.
3919 (library_list_start_list): Likewise.
3920 * solib-svr4.c (library_list_start_library): Likewise.
3921 (svr4_library_list_start_list): Likewise.
3922 * solib-target.c (library_list_start_segment): Likewise.
3923 (library_list_start_section): Likewise.
3924 (library_list_start_library): Likewise.
3925 (library_list_start_list): Likewise.
3926 * tracepoint.c (traceframe_info_start_memory): Likewise.
3927 (traceframe_info_start_tvar): Likewise.
3928 * xml-syscall.c (syscall_start_syscall): Likewise.
3929 * xml-tdesc.c (tdesc_start_target): Likewise.
3930 (tdesc_start_feature): Likewise.
3931 (tdesc_start_reg): Likewise.
3932 (tdesc_start_union): Likewise.
3933 (tdesc_start_struct): Likewise.
3934 (tdesc_start_flags): Likewise.
3935 (tdesc_start_enum): Likewise.
3936 (tdesc_start_field): Likewise.
3937 (tdesc_start_enum_value): Likewise.
3938 (tdesc_start_vector): Likewise.
3939
3940 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3941
3942 * extension.h (struct xmethod_worker) <clone>: Remove.
3943 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
3944 Remove.
3945 (python_xmethod_worker::clone): Remove.
3946 * valops.c (find_overload_match): Use std::move instead of
3947 clone.
3948
3949 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3950
3951 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
3952 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
3953 <free_xmethod_worker_data>: Remove.
3954 <get_matching_xmethod_workers>: Chance VEC to std::vector.
3955 <get_xmethod_arg_types>: Remove.
3956 <get_xmethod_result_type>: Remove.
3957 <invoke_xmethod>: Remove.
3958 * extension.c (new_xmethod_worker): Remove.
3959 (clone_xmethod_worker): Remove.
3960 (get_matching_xmethod_workers): Return void, pass std::vector by
3961 pointer.
3962 (get_xmethod_arg_types): Rename to...
3963 (xmethod_worker::get_arg_types): ... this, and adjust.
3964 (get_xmethod_result_type): Rename to...
3965 (xmethod_worker::get_result_type): ... this, and adjust.
3966 (invoke_xmethod): Remove.
3967 (free_xmethod_worker): Remove.
3968 (free_xmethod_worker_vec): Remove.
3969 * extension.h (enum ext_lang_rc): Move here from
3970 extension-priv.h.
3971 (struct xmethod_worker): Add constructor and destructor.
3972 <data>: Remove.
3973 <value>: Remove.
3974 <invoke, clone, do_get_result_type, do_get_arg_types>: New
3975 virtual pure methods.
3976 <get_arg_types, get_result_type>: New methods.
3977 (xmethod_worker_ptr): Remove typedef.
3978 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
3979 (xmethod_worker_vec): Remove typedef.
3980 (xmethod_worker_up): New typedef.
3981 (invoke_xmethod): Remove.
3982 (clone_xmethod_worker): Remove.
3983 (free_xmethod_worker): Remove.
3984 (free_xmethod_worker_vec): Remove.
3985 (get_xmethod_arg_types): Remove.
3986 (get_xmethod_result_type): Remove.
3987 * valops.c (find_method_list): Use std::vector, don't use
3988 intermediate vector.
3989 (value_find_oload_method_list): Use std::vector.
3990 (find_overload_match): Use std::vector.
3991 (find_oload_champ): Use std::vector.
3992 * value.c (value_free): Use operator delete.
3993 (value_of_xmethod): Rename to...
3994 (value_from_xmethod): ... this. Don't assign
3995 xmethod_worker::value, take rvalue-reference.
3996 (result_type_of_xmethod): Adjust.
3997 (call_xmethod): Adjust.
3998 * value.h: Include extension.h.
3999 (struct xmethod_worker): Don't forward-declare.
4000 (value_of_xmethod): Rename to...
4001 (value_from_xmethod): ... this, take rvalue-reference.
4002 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
4003 (struct python_xmethod_worker): ... this, add constructor and
4004 destructor.
4005 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
4006 (gdbpy_free_xmethod_worker_data): Rename to...
4007 (python_xmethod_worker::~python_xmethod_worker): ... this and
4008 adjust.
4009 (gdbpy_clone_xmethod_worker_data): Rename to...
4010 (python_xmethod_worker::clone): ... this and adjust.
4011 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
4012 temporary vector.
4013 (gdbpy_get_xmethod_arg_types): Rename to...
4014 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
4015 (gdbpy_get_xmethod_result_type): Rename to...
4016 (python_xmethod_worker::do_get_result_type): ... this and
4017 adjust.
4018 (gdbpy_invoke_xmethod): Rename to...
4019 (python_xmethod_worker::invoke): ... this and adjust.
4020 (new_python_xmethod_worker): Rename to...
4021 (python_xmethod_worker::python_xmethod_worker): ... this and
4022 adjust.
4023 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
4024 Remove.
4025 (gdbpy_free_xmethod_worker_data): Remove.
4026 (gdbpy_get_matching_xmethod_workers): Use std::vector.
4027 (gdbpy_get_xmethod_arg_types): Remove.
4028 (gdbpy_get_xmethod_result_type): Remove.
4029 (gdbpy_invoke_xmethod): Remove.
4030 * python/python.c (python_extension_ops): Remove obsolete
4031 callbacks.
4032
4033 2018-01-05 Pedro Alves <palves@redhat.com>
4034
4035 PR gdb/18653
4036 * common/signals-state-save-restore.c
4037 (save_original_signals_state): New parameter 'quiet'. Warn if we
4038 find a custom handler preinstalled, instead of internal erroring.
4039 But only warn if !quiet.
4040 * common/signals-state-save-restore.h
4041 (save_original_signals_state): New parameter 'quiet'.
4042 * main.c (captured_main_1): Move save_original_signals_state call
4043 after option handling, and pass QUIET.
4044
4045 2018-01-05 Pedro Alves <palves@redhat.com>
4046
4047 * spu-tdep.c (spu_catch_start): Pass
4048 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
4049
4050 2018-01-05 Pedro Alves <palves@redhat.com>
4051
4052 PR gdb/22670
4053 * ada-lang.c (literal_symbol_name_matcher): New function.
4054 (ada_get_symbol_name_matcher): Use it for
4055 symbol_name_match_type::SEARCH_NAME.
4056 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
4057 it down instead of assuming symbol_name_match_type::FULL.
4058 * block.h (block_lookup_symbol): New parameter 'match_type'.
4059 * c-valprint.c (print_unpacked_pointer): Use
4060 lookup_symbol_search_name instead of lookup_symbol.
4061 * compile/compile-object-load.c (get_out_value_type): Pass down
4062 symbol_name_match_type::SEARCH_NAME.
4063 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
4064 symbol_name_match_type::FULL.
4065 * cp-support.c (cp_get_symbol_name_matcher): Handle
4066 symbol_name_match_type::SEARCH_NAME.
4067 * infrun.c (insert_exception_resume_breakpoint): Use
4068 lookup_symbol_search_name.
4069 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
4070 * psymtab.c (maintenance_check_psymtabs): Use
4071 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
4072 * stack.c (print_frame_args): Use lookup_symbol_search_name and
4073 SYMBOL_SEARCH_NAME.
4074 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
4075 if symbol_name_match_type::SEARCH_NAME.
4076 (lookup_symbol_in_language): Pass down
4077 symbol_name_match_type::FULL.
4078 (lookup_symbol_search_name): New.
4079 (lookup_language_this): Pass down
4080 symbol_name_match_type::SEARCH_NAME.
4081 (lookup_symbol_aux, lookup_local_symbol): New parameter
4082 'match_type'. Pass it down.
4083 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
4084 (lookup_symbol_search_name): New declaration.
4085 (lookup_symbol_in_block): New 'match_type' parameter.
4086
4087 2018-01-05 Pedro Alves <palves@redhat.com>
4088
4089 PR gdb/22670
4090 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
4091 ada_lookup_symbol.
4092 (ada_lookup_symbol): Reimplement in terms of
4093 ada_lookup_symbol_list, bits factored out from
4094 ada_lookup_encoded_symbol.
4095
4096 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4097
4098 * ada-exp.y (write_object_renaming): When subscripting an array
4099 using a symbol as the index, pass the block in call to
4100 ada_lookup_encoded_symbol when looking that symbol up.
4101
4102 2018-01-05 Jerome Guitton <guitton@adacore.com>
4103
4104 * ada-lang.c (ada_array_length): Use ada_index_type instead of
4105 TYPE_INDEX_TYPE.
4106
4107 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4108
4109 * ada-lang.c (ada_to_fixed_value_create): Add handling of
4110 the case where VALUE_LVAL (val0) is not lval_memory.
4111
4112 2018-01-05 Xavier Roirand <roirand@adacore.com>
4113
4114 * ada-valprint.c (print_optional_low_bound): Handle
4115 character-indexed array printing like boolean-indexed array
4116 printing.
4117
4118 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4119
4120 * NEWS: Create a new section for the next release branch.
4121 Rename the section of the current branch, now that it has
4122 been cut.
4123
4124 2018-01-05 Joel Brobecker <brobecker@adacore.com>
4125
4126 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
4127 * version.in: Bump version to 8.1.50.DATE-git.
4128
4129 2018-01-03 Xavier Roirand <roirand@adacore.com>
4130
4131 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
4132 Add field.
4133 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
4134 Add field.
4135 (default_exception_support_info) <catch_handlers_sym>: Add field.
4136 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
4137 (ada_exception_name_addr_1): Add "catch handlers" handling.
4138 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
4139 Update all callers.
4140 (create_excep_cond_exprs) <ex>: Add parameter.
4141 (re_set_exception): Update create_excep_cond_exprs call.
4142 (print_it_exception, print_one_exception, print_mention_exception)
4143 (print_recreate_exception): Add "catch handler" handling.
4144 (allocate_location_catch_handlers, re_set_catch_handlers)
4145 (check_status_catch_handlers, print_it_catch_handlers)
4146 (print_one_catch_handlers, print_mention_catch_handlers)
4147 (print_recreate_catch_handlers): New function.
4148 (catch_handlers_breakpoint_ops): New variable.
4149 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
4150 Add parameter. Add "catch handler" handling.
4151 (ada_exception_sym_name, ada_exception_breakpoint_ops):
4152 Add "catch handler" handling.
4153 (ada_exception_catchpoint_cond_string): Add "catch handler"
4154 handling.
4155 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
4156 call.
4157 (catch_ada_handlers_command): New function.
4158 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
4159 operations structure.
4160 (_initialize_ada_language): Add "catch handlers" command entry.
4161 * NEWS: Document "catch handlers" feature.
4162
4163 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4164
4165 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
4166 account when creating the array type of the slice.
4167 (ada_value_slice): Likewise.
4168
4169 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4170
4171 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
4172 New enum value.
4173 (create_array_type_with_stride): Add byte_stride_prop parameter.
4174 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
4175 New parameter. Update all callers in this file.
4176 (array_type_has_dynamic_stride): New function.
4177 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
4178 of arrays with dynamic byte strides.
4179 * dwarf2read.c (read_array_type): Add support for dynamic
4180 DW_AT_byte_stride attributes.
4181
4182 2018-01-02 Joel Brobecker <brobecker@adacore.com>
4183
4184 * dwarf2read.c (read_unspecified_type): Treat
4185 DW_TAG_enumeration_type DIEs from Ada units as stubs.
4186
4187 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4188
4189 Update copyright year range in all GDB files.
4190
4191 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4192
4193 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
4194 and gdb/testsuite/gdb.base/step-line.c.
4195
4196 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4197
4198 * copyright.py (main): Dump the contents of
4199 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
4200 even if BY_HAND is empty.
4201
4202 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4203
4204 * top.c (print_gdb_version): Update Copyright year in version
4205 message.
4206
4207 2018-01-01 Joel Brobecker <brobecker@adacore.com>
4208
4209 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
4210
4211 For older changes see ChangeLog-2017.
4212 \f
4213 Local Variables:
4214 mode: change-log
4215 left-margin: 8
4216 fill-column: 74
4217 version-control: never
4218 coding: utf-8
4219 End: