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