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