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