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