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