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