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