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