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