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