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