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