gdb/jit: move cached_code_address and jit_breakpoint to jiter_objfile_data
[binutils-gdb.git] / gdb / ChangeLog
1 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * jit.h (struct jiter_objfile_data) <cached_code_address,
4 jit_breakpoint>: Move to here from ...
5 * jit.c (jit_program_space_data): ... here.
6 (jiter_objfile_data::~jiter_objfile_data): Update.
7 (jit_breakpoint_deleted): Update.
8 (jit_breakpoint_re_set_internal): Update.
9
10 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
11
12 * jit.c (jiter_objfile_data::~jiter_objfile_data): Remove some
13 checks.
14 (jit_read_descriptor): Remove NULL check.
15 (jit_event_handler): Add an assertion.
16
17 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
18
19 * jit.h (struct jit_objfile_data): Split into...
20 (struct jiter_objfile_data): ... this ...
21 (struct jited_objfile_data): ... and this.
22 * objfiles.h (struct objfile) <jit_data>: Remove.
23 <jiter_data, jited_data>: New fields.
24 * jit.c (jit_objfile_data::~jit_objfile_data): Rename to ...
25 (jiter_objfile_data::~jiter_objfile_data): ... this.
26 (get_jit_objfile_data): Rename to ...
27 (get_jiter_objfile_data): ... this.
28 (add_objfile_entry): Update.
29 (jit_read_descriptor): Use get_jiter_objfile_data.
30 (jit_find_objf_with_entry_addr): Use objfile's jited_data field.
31 (jit_breakpoint_re_set_internal): Use get_jiter_objfile_data.
32 (jit_inferior_exit_hook): Use objfile's jited_data field.
33
34 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
35
36 * jit.h: Forward-declare `struct minimal_symbol`.
37 (struct jit_objfile_data): Migrate to here from jit.c; also add a
38 constructor, destructor, and an objfile* field.
39 * jit.c (jit_objfile_data): Remove.
40 (struct jit_objfile_data): Migrate from here to jit.h.
41 (jit_objfile_data::~jit_objfile_data): New destructor
42 implementation with code moved from free_objfile_data.
43 (free_objfile_data): Delete.
44 (get_jit_objfile_data): Update to use the jit_data field of objfile.
45 (jit_find_objf_with_entry_addr): Ditto.
46 (jit_inferior_exit_hook): Ditto.
47 (_initialize_jit): Remove the call to
48 register_objfile_data_with_cleanup.
49 * objfiles.h (struct objfile) <jit_data>: New field.
50
51 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
52
53 * jit.h: Forward-declare `struct objfile`.
54 (jit_event_handler): Add a second parameter, the JITer objfile.
55 * jit.c (jit_read_descriptor): Change the signature to take the
56 JITer objfile as an argument instead of the jit_program_space_data.
57 (jit_inferior_init): Update the call to jit_read_descriptor.
58 (jit_event_handler): Use the new JITer objfile argument when calling
59 jit_read_descriptor.
60 * breakpoint.c (handle_jit_event): Update the call to
61 jit_event_handler to pass the JITer objfile.
62
63 2020-07-21 John Baldwin <jhb@FreeBSD.org>
64
65 * gdbarch.c: Regenerate.
66 * gdbarch.h: Regenerate.
67 * gdbarch.sh (handle_segmentation_fault): Remove method.
68 * infrun.c (handle_segmentation_fault): Remove.
69 (print_signal_received_reason): Remove call to
70 handle_segmentation_fault.
71
72 2020-07-21 John Baldwin <jhb@FreeBSD.org>
73
74 * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
75 Rename to sparc64_linux_report_signal_info and add siggnal
76 argument.
77 (sparc64_linux_init_abi): Use sparc64_linux_report_signal_info
78 instead of sparc64_linux_handle_segmentation_fault.
79
80 2020-07-21 John Baldwin <jhb@FreeBSD.org>
81
82 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Use
83 i386_linux_report_signal_info instead of
84 i386_linux_handle_segmentation_fault.
85 * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Rename
86 to i386_linux_report_signal_info and add siggnal argument.
87 (i386_linux_init_abi): Use i386_linux_report_signal_info instead
88 of i386_linux_handle_segmentation_fault.
89 * i386-linux-tdep.h (i386_linux_handle_segmentation_fault): Rename
90 to i386_linux_report_signal_info and add siggnal argument.
91
92 2020-07-21 John Baldwin <jhb@FreeBSD.org>
93
94 * corelow.c (core_target_open): Invoke gdbarch report_signal_info
95 hook if present.
96
97 2020-07-21 John Baldwin <jhb@FreeBSD.org>
98
99 * gdbarch.c: Regenerate.
100 * gdbarch.h: Regenerate.
101 * gdbarch.sh (report_signal_info): New method.
102 * infrun.c (print_signal_received_reason): Invoke gdbarch
103 report_signal_info hook if present.
104
105 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
106
107 * python/py-registers.c : Add 'unordered_map' include.
108 (gdbpy_new_reggroup): Renamed to...
109 (gdbpy_get_reggroup): ...this. Update to only create register
110 group descriptors when needed.
111 (gdbpy_reggroup_iter_next): Update.
112
113 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
114
115 * python/py-registers.c (gdbpy_register_object_data): New static
116 global.
117 (gdbpy_register_object_data_init): New function.
118 (gdbpy_new_register_descriptor): Renamed to...
119 (gdbpy_get_register_descriptor): ...this, and update to reuse
120 existing register descriptors where possible.
121 (gdbpy_register_descriptor_iter_next): Update.
122 (gdbpy_initialize_registers): Register new gdbarch data.
123
124 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
125
126 * linux-nat.c (stopped_pids): Make static.
127
128 2020-07-21 Simon Marchi <simon.marchi@polymtl.ca>
129
130 PR ada/26235
131 * gdbtypes.c (ada_discrete_type_low_bound,
132 ada_discrete_type_high_bound): Handle undefined bounds.
133
134 2020-07-21 Kamil Rytarowski <n54@gmx.com>
135
136 * nbsd-nat.h (nbsd_nat_target::supports_multi_process): New
137 declaration.
138 * nbsd-nat.c (nbsd_nat_target::supports_multi_process): New
139 function.
140
141 2020-07-20 John Baldwin <jhb@FreeBSD.org>
142
143 * fbsd-tdep.c (fbsd_skip_solib_resolver): New function.
144 (fbsd_init_abi): Install gdbarch "skip_solib_resolver" method.
145 * fbsd-tdep.h (fbsd_skip_solib_resolver): New prototype.
146 * mips-fbsd-tdep.c (mips_fbsd_skip_solib_resolver): New function.
147 (mips_fbsd_init_abi): Install gdbarch "skip_solib_resolver"
148 method.
149
150 2020-07-20 Ludovic Courtès <ludo@gnu.org>
151
152 * guile/scm-math.c (vlscm_integer_fits_p): Use 'uintmax_t'
153 and 'intmax_t' instead of 'scm_t_uintmax' and 'scm_t_intmax',
154 which are deprecated in Guile 3.0.
155 * configure.ac (try_guile_versions): Add "guile-3.0".
156 * configure (try_guile_versions): Regenerate.
157 * NEWS: Update entry.
158
159 2020-07-20 Ludovic Courtès <ludo@gnu.org>
160 Doug Evans <dje@google.com>
161
162 PR gdb/21104
163 * guile/scm-ports.c (USING_GUILE_BEFORE_2_2): New macro.
164 (ioscm_memory_port)[read_buf_size, write_buf_size]: Wrap in #if
165 USING_GUILE_BEFORE_2_2.
166 (stdio_port_desc, memory_port_desc) [!USING_GUILE_BEFORE_2_2]:
167 Change type to 'scm_t_port_type *'.
168 (natural_buffer_size) [!USING_GUILE_BEFORE_2_2]: New variable.
169 (ioscm_open_port) [USING_GUILE_BEFORE_2_2]: Add 'stream'
170 parameter and honor it. Update callers.
171 (ioscm_open_port) [!USING_GUILE_BEFORE_2_2]: New function.
172 (ioscm_read_from_port, ioscm_write) [!USING_GUILE_BEFORE_2_2]: New
173 functions.
174 (ioscm_fill_input, ioscm_input_waiting, ioscm_flush): Wrap in #if
175 USING_GUILE_BEFORE_2_2.
176 (ioscm_init_gdb_stdio_port) [!USING_GUILE_BEFORE_2_2]: Use
177 'ioscm_read_from_port'. Call 'scm_set_port_read_wait_fd'.
178 (ioscm_init_stdio_buffers) [!USING_GUILE_BEFORE_2_2]: New function.
179 (gdbscm_stdio_port_p) [!USING_GUILE_BEFORE_2_2]: Use 'SCM_PORTP'
180 and 'SCM_PORT_TYPE'.
181 (gdbscm_memory_port_end_input, gdbscm_memory_port_seek)
182 (ioscm_reinit_memory_port): Wrap in #if USING_GUILE_BEFORE_2_2.
183 (gdbscm_memory_port_read, gdbscm_memory_port_write)
184 (gdbscm_memory_port_seek, gdbscm_memory_port_close)
185 [!USING_GUILE_BEFORE_2_2]: New functions.
186 (gdbscm_memory_port_print): Remove use of 'SCM_PTOB_NAME'.
187 (ioscm_init_memory_port_type) [!USING_GUILE_BEFORE_2_2]: Use
188 'gdbscm_memory_port_read'.
189 Wrap 'scm_set_port_end_input', 'scm_set_port_flush', and
190 'scm_set_port_free' calls in #if USING_GUILE_BEFORE_2_2.
191 (gdbscm_get_natural_buffer_sizes) [!USING_GUILE_BEFORE_2_2]: New
192 function.
193 (ioscm_init_memory_port): Remove.
194 (ioscm_init_memory_port_stream): New function
195 (ioscm_init_memory_port_buffers) [USING_GUILE_BEFORE_2_2]: New
196 function.
197 (gdbscm_memory_port_read_buffer_size) [!USING_GUILE_BEFORE_2_2]:
198 Return scm_from_uint (0).
199 (gdbscm_set_memory_port_read_buffer_size_x)
200 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
201 (gdbscm_memory_port_write_buffer_size) [!USING_GUILE_BEFORE_2_2]:
202 Return scm_from_uint (0).
203 (gdbscm_set_memory_port_write_buffer_size_x)
204 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
205 * configure.ac (try_guile_versions): Add "guile-2.2".
206 * configure: Regenerate.
207 * NEWS: Add entry.
208
209 2020-07-18 Tom Tromey <tom@tromey.com>
210
211 * linux-nat.c (linux_multi_process): Remove.
212 (linux_nat_target::supports_multi_process): Return true.
213
214 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
215
216 * arch/riscv.c (riscv_tdesc_cache): Change map type.
217 (riscv_lookup_target_description): Return pointer out of
218 unique_ptr.
219 * target-descriptions.c (allocate_target_description): Add
220 comment.
221 (target_desc_deleter::operator()): Likewise.
222 * target-descriptions.h (struct target_desc_deleter): Moved to
223 gdbsupport/tdesc.h.
224 (target_desc_up): Likewise.
225
226 2020-07-17 Tom Tromey <tromey@adacore.com>
227
228 * linux-nat.c (linux_nat_target::supports_non_stop)
229 (linux_nat_target::always_non_stop_p): Use "true".
230 (linux_nat_target::supports_disable_randomization): Use "true" and
231 "false".
232
233 2020-07-16 Caroline Tice <cmtice@google.com>
234
235 * dwarf2/read.c (RNGLIST_HEADER_SIZE32) New constant definition.
236 (RNGLIST_HEADER_SIZE64): New constant definition.
237 (struct dwop_section_names): Add rnglists_dwo.
238 (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo.
239 (struct loclist_header): Rename to 'loclists_rnglists_header'.
240 (struct dwo_sections): Add rnglists field.
241 (read_attribut_reprocess): Add tag parameter.
242 (dwarf2_ranges_read): Add tag parameter & remove forward function decl.
243 (cu_debug_rnglists_section): New function (decl & definition).
244 (dwarf2_locate_dwo_sections): Add code to read rnglists_dwo section.
245 (dwarf2_rnglists_process): Add a dwarf_tag parameter, for the kind of
246 die whose range is being checked; get rnglist section from
247 cu_debug_rnglists_section, to get from either objfile or dwo file as
248 appropriate. Add cases for DW_RLE_base_addressx,
249 DW_RLE_startx_length, DW_RLE_startx_endx. Also, update to only add
250 the base address to DW_RLE_offset_pairs (not to all ranges), moving
251 test inside if-condition and updating complaint message.
252 (dwarf2_ranges_process): Add dwarf tag parameter and pass it to
253 dwarf2_rnglists_process.
254 (dwarf2_ranges_read): Add dwarf tag parameter and pass it to
255 dwarf2_ranges_process.
256 (dwarf2_get_pc_bounds): Check for DW_FORM_rnglistx when setting
257 need_ranges_base and update comment appropriately. Also pass die tag
258 to dwarf2_ranges_read.
259 (dwarf2_record_block_ranges): Check for DW_FORM_rnglistx when setting
260 need_ranges_base and update comment appropriately. Also pass die tag
261 to dwarf2_ranges_process.
262 (read_full_die_1): Add code to read DW_AT_rnglists_base and assign to
263 cu->ranges_base. Also pass die tag to read_attribute_reprocess.
264 (partial_die_info::read): Check for DW_FORM_rnglistx when setting
265 need_ranges_base and update comment appropriately. Also pass die tag
266 to read_attribute_reprocess and dwarf2_ranges_read.
267 (read_loclist_header): Rename function to read_loclists_rnglists_header,
268 and update function comment appropriately.
269 (read_loclist_index): Call read_loclists_rnglists_header instead of
270 read_loclist_header.
271 (read_rnglist_index): New function.
272 (read_attribute_reprocess): Add tag parameter. Add code for
273 DW_FORM_rnglistx, passing tag to read_rnglist_index.
274 (read_attribute_value): Mark DW_FORM_rnglistx with need_reprocess.
275
276 2020-07-15 Andrew Burgess <andrew.burgess@embecosm.com>
277
278 * f-typeprint.c (f_type_print_base): Allow for dynamic types not
279 being resolved.
280
281 2020-07-14 Andrew Burgess <andrew.burgess@embecosm.com>
282
283 * arch-utils.c (show_architecture): Update formatting of messages.
284
285 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
286
287 * gdbtypes.h (struct type) <bounds>: Handle array and string
288 types.
289 * ada-lang.c (assign_aggregate): Use type::bounds on
290 array/string type.
291 * c-typeprint.c (c_type_print_varspec_suffix): Likewise.
292 * c-varobj.c (c_number_of_children): Likewise.
293 (c_describe_child): Likewise.
294 * eval.c (evaluate_subexp_for_sizeof): Likewise.
295 * f-typeprint.c (f_type_print_varspec_suffix): Likewise.
296 (f_type_print_base): Likewise.
297 * f-valprint.c (f77_array_offset_tbl): Likewise.
298 (f77_get_upperbound): Likewise.
299 (f77_print_array_1): Likewise.
300 * guile/scm-type.c (gdbscm_type_range): Likewise.
301 * m2-typeprint.c (m2_array): Likewise.
302 (m2_is_long_set_of_type): Likewise.
303 * m2-valprint.c (get_long_set_bounds): Likewise.
304 * p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
305 * python/py-type.c (typy_range): Likewise.
306 * rust-lang.c (rust_internal_print_type): Likewise.
307 * type-stack.c (type_stack::follow_types): Likewise.
308 * valarith.c (value_subscripted_rvalue): Likewise.
309 * valops.c (value_cast): Likewise.
310
311 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
312
313 * gdbtypes.c (TYPE_ARRAY_BIT_STRIDE): Remove. Update all
314 callers to use the equivalent accessor methods.
315
316 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
317
318 * gdbtypes.h (struct range_bounds) <bit_stride>: New method.
319 (struct type) <bit_stride>: New method.
320 (TYPE_BIT_STRIDE): Remove.
321 * gdbtypes.c (update_static_array_size): Use type::bit_stride.
322
323 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
324
325 * gdbtypes.h (TYPE_ARRAY_LOWER_BOUND_VALUE,
326 TYPE_ARRAY_UPPER_BOUND_VALUE): Remove. Update all
327 callers to use the equivalent accessor methods instead.
328
329 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
330
331 * gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED,
332 TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Remove. Update all
333 callers to use the equivalent accessor methods instead.
334
335 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
336
337 * gdbtypes.h (TYPE_LOW_BOUND_KIND,
338 TYPE_HIGH_BOUND_KIND): Remove. Update all callers
339 to use dynamic_prop::kind.
340
341 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
342
343 * gdbtypes.h (TYPE_LOW_BOUND_UNDEFINED,
344 TYPE_HIGH_BOUND_UNDEFINED): Remove. Update all callers
345 to get the bound property's kind and check against
346 PROP_UNDEFINED.
347
348 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
349
350 * gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND): Remove. Update
351 all callers to use type::range_bounds followed by
352 dynamic_prop::{low,high}.
353
354 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
355
356 * gdbtypes.h (struct dynamic_prop) <kind, set_undefined,
357 const_val, set_const_val, baton, set_locexpr, set_loclist,
358 set_addr_offset, variant_parts, set_variant_parts,
359 original_type, set_original_type>: New methods.
360 <kind>: Rename to...
361 <m_kind>: ... this. Update all users to use the new methods
362 instead.
363 <data>: Rename to...
364 <m_data>: ... this. Update all users to use the new methods
365 instead.
366
367 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
368
369 * gdbtypes.c (get_discrete_bounds): Return failure if
370 the range type's bounds are not both defined and constant
371 values.
372 (get_array_bounds): Update comment. Remove undefined bound check.
373
374 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
375
376 * gdbtypes.h (TYPE_RANGE_DATA): Remove. Update callers to use
377 the type::bounds method directly.
378
379 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
380
381 * gdbtypes.h (struct type) <bounds, set_bounds>: New methods.
382 (TYPE_RANGE_DATA): Use type::bounds. Change all uses that
383 are used to set the range type's bounds to use set_bounds.
384
385 2020-07-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
386
387 * exec.c (_initialize_exec): Update exec-file-mismatch help.
388
389 2020-07-10 Pedro Alves <pedro@palves.net>
390
391 * gdbthread.h (inferior_ref): Define.
392 (scoped_restore_current_thread) <m_thread>: Now a thread_info_ref.
393 (scoped_restore_current_thread) <m_inf>: Now an inferior_ref.
394 * thread.c
395 (scoped_restore_current_thread::restore):
396 Adjust to gdb::ref_ptr.
397 (scoped_restore_current_thread::~scoped_restore_current_thread):
398 Remove manual decref handling.
399 (scoped_restore_current_thread::scoped_restore_current_thread):
400 Adjust to use
401 inferior_ref::new_reference/thread_info_ref::new_reference.
402 Incref the thread before calling get_frame_id instead of after.
403 Let TARGET_CLOSE_ERROR propagate.
404
405 2020-07-10 Pedro Alves <pedro@palves.net>
406
407 * frame-tailcall.c (dwarf2_tailcall_sniffer_first): Only swallow
408 NO_ENTRY_VALUE_ERROR / MEMORY_ERROR / OPTIMIZED_OUT_ERROR /
409 NOT_AVAILABLE_ERROR.
410 * value.c (value_optimized_out): Only swallow MEMORY_ERROR /
411 OPTIMIZED_OUT_ERROR / NOT_AVAILABLE_ERROR.
412
413 2020-07-10 Simon Marchi <simon.marchi@polymtl.ca>
414 Pedro Alves <pedro@palves.net>
415
416 PR gdb/26199
417 * infrun.c (threads_are_resumed_pending_p): Delete.
418 (do_target_wait): Remove threads_are_executing and
419 threads_are_resumed_pending_p checks from the inferior_matches
420 lambda. Update comments.
421
422 2020-07-10 Pedro Alves <pedro@palves.net>
423
424 PR gdb/26199
425 * infrun.c (handle_no_resumed): Transfer terminal to inferior with
426 executing threads.
427
428 2020-07-10 Pedro Alves <pedro@palves.net>
429
430 PR gdb/26199
431 * infrun.c (handle_no_resumed): Handle multiple targets.
432
433 2020-07-10 Pedro Alves <pedro@palves.net>
434
435 PR gdb/26199
436 * infrun.c (prepare_to_wait): Check target_can_async_p instead of
437 target_is_async_p.
438
439 2020-07-10 Pedro Alves <pedro@palves.net>
440
441 PR gdb/26199
442 * target.c (target_pass_ctrlc): Look at the inferior's non-exited
443 threads, not all threads.
444
445 2020-07-10 Pedro Alves <pedro@palves.net>
446
447 PR gdb/26199
448 * remote.c (remote_target::open_1): Pass remote target pointer as
449 data to create_async_event_handler.
450 (remote_async_inferior_event_handler): Mark async event handler
451 before returning if the remote target still has either pending
452 events or unacknowledged notifications.
453
454 2020-07-10 John Baldwin <jhb@FreeBSD.org>
455
456 * fbsd-nat.h (fbsd_nat_target::supports_multi_process): New
457 declaration.
458 * fbsd-nat.c (fbsd_nat_target::supports_multi_process): New
459 function.
460
461 2020-07-09 John Baldwin <jhb@FreeBSD.org>
462
463 * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
464 inferior_ptid.
465
466 2020-07-09 John Baldwin <jhb@FreeBSD.org>
467
468 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_ARGC,
469 AT_FREEBSD_ARGV, AT_FREEBSD_ENVC, AT_FREEBSD_ENVV,
470 AT_FREEBSD_PS_STRINGS.
471
472 2020-07-08 Hannes Domani <ssbssa@yahoo.de>
473
474 * auto-load.c (auto_load_objfile_script_1): Convert drive part
475 of debugfile path on Windows.
476
477 2020-07-08 John Baldwin <jhb@FreeBSD.org>
478
479 * fbsd-nat.c (fbsd_nat_target::find_memory_regions): Rename 'obfd'
480 argument to 'data'.
481
482 2020-07-08 Tom Tromey <tromey@adacore.com>
483
484 * ada-lang.c (ada_exception_message_1): Use read_memory.
485
486 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
487
488 PR python/22748
489 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Remove
490 special handling for inline frames.
491 * findvar.c (value_of_register_lazy): Skip inline frames when
492 creating lazy register values.
493 * frame.c (frame_id_computed_p): Delete definition.
494 * frame.h (frame_id_computed_p): Delete declaration.
495
496 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
497
498 * NEWS: Mention additions to Python API.
499 * python/py-arch.c (archpy_register_groups): New function.
500 (arch_object_methods): Add 'register_groups' method.
501 * python/py-registers.c (reggroup_iterator_object): New struct.
502 (reggroup_object): New struct.
503 (gdbpy_new_reggroup): New function.
504 (gdbpy_reggroup_to_string): New function.
505 (gdbpy_reggroup_name): New function.
506 (gdbpy_reggroup_iter): New function.
507 (gdbpy_reggroup_iter_next): New function.
508 (gdbpy_new_reggroup_iterator): New function
509 (gdbpy_initialize_registers): Register new types.
510 (reggroup_iterator_object_type): Define new Python type.
511 (gdbpy_reggroup_getset): New static global.
512 (reggroup_object_type): Define new Python type.
513 * python/python-internal.h
514
515 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
516
517 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-registers.c
518 * python/py-arch.c (archpy_registers): New function.
519 (arch_object_methods): Add 'registers' method.
520 * python/py-registers.c: New file.
521 * python/python-internal.h
522 (gdbpy_new_register_descriptor_iterator): Declare.
523 (gdbpy_initialize_registers): Declare.
524 * python/python.c (do_start_initialization): Call
525 gdbpy_initialize_registers.
526 * NEWS: Mention additions to the Python API.
527
528 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
529
530 * NEWS: Mention new Python API method.
531 * python/py-unwind.c (pending_framepy_architecture): New function.
532 (pending_frame_object_methods): Add architecture method.
533
534 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
535
536 * gdbarch.c: Regenerate.
537 * gdbarch.h: Regenerate.
538 * gdbarch.sh (deprecated_set_gdbarch_data): Delete.
539 (gdbarch_data): Use internal_error for the case where
540 deprecated_set_gdbarch_data was originally needed.
541 * ia64-libunwind-tdep.c (libunwind_descr_init): Update parameters,
542 and use passed in obstack.
543 (libunwind_frame_set_descr): Should no longer get back NULL from
544 gdbarch_data.
545 (_initialize_libunwind_frame): Register as a pre-init gdbarch data
546 type.
547 * user-regs.c (user_regs_init): Update parameters, and use passed
548 in obstack.
549 (user_reg_add): Should no longer get back NULL from gdbarch_data.
550 (_initialize_user_regs): Register as a pre-init gdbarch data type.
551
552 2020-07-06 Tom de Vries <tdevries@suse.de>
553
554 * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Handle
555 End-Of-Sequence in lte_is_less_than.
556 * symtab.c (find_pc_sect_line): Revert change from commit 3d92a3e313
557 "gdb: Don't reorder line table entries too much when sorting".
558
559 2020-07-06 Tom de Vries <tdevries@suse.de>
560
561 PR tui/26205
562 * tui/tui-win.c (tui_partial_win_by_name): Don't test for NULL name.
563
564 2020-07-05 Tom de Vries <tdevries@suse.de>
565
566 PR build/26187
567 * inferior.h (struct infcall_suspend_state_deleter): If available, use
568 std::uncaught_exceptions instead of deprecated
569 std::uncaught_exception.
570
571 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
572
573 * macroexp.h (macro_stringify): Return
574 gdb::unique_xmalloc_ptr<char>.
575 * macroexp.c (macro_stringify): Likewise.
576 * macrotab.c (fixup_definition): Update.
577
578 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
579
580 * c-exp.y (scan_macro_expansion): Don't free `expansion`.
581 (lex_one_token): Update.
582 * macroexp.c (struct macro_buffer) <release>: Return
583 gdb::unique_xmalloc_ptr<char>.
584 (macro_stringify): Update.
585 (macro_expand): Update.
586 (macro_expand_next): Return gdb::unique_xmalloc_ptr<char>.
587 * macroexp.h (macro_expand_next): Likewise.
588
589 2020-07-02 Simon Marchi <simon.marchi@efficios.com>
590
591 * macroexp.h (macro_lookup_ftype): Remove.
592 (macro_expand, macro_expand_once, macro_expand_next): Remove
593 lookup function parameters, add scope parameter.
594 * macroexp.c (scan, substitute_args, expand, maybe_expand,
595 macro_expand, macro_expand_once, macro_expand_next): Likewise.
596 * macroscope.h (standard_macro_lookup): Change parameter type
597 to macro_scope.
598 * macroscope.c (standard_macro_lookup): Likewise.
599 * c-exp.y (lex_one_token): Update.
600 * macrocmd.c (macro_expand_command): Likewise.
601 (macro_expand_once_command): Likewise.
602
603 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
604
605 * inf-loop.c (inferior_event_handler): Remove client_data param.
606 * inf-loop.h (inferior_event_handler): Likewise.
607 * infcmd.c (step_1): Adjust.
608 * infrun.c (proceed): Adjust.
609 (fetch_inferior_event): Remove client_data param.
610 (infrun_async_inferior_event_handler): Adjust.
611 * infrun.h (fetch_inferior_event): Remove `void *` param.
612 * linux-nat.c (handle_target_event): Adjust.
613 * record-btrace.c (record_btrace_handle_async_inferior_event):
614 Adjust.
615 * record-full.c (record_full_async_inferior_event_handler):
616 Adjust.
617 * remote.c (remote_async_inferior_event_handler): Adjust.
618
619 2020-07-01 Tom Tromey <tom@tromey.com>
620
621 * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
622 * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
623
624 2020-07-01 Tom Tromey <tom@tromey.com>
625
626 * tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from
627 tui_gen_win_info.
628 (tui_win_info::make_window): Merge with
629 tui_gen_win_info::make_window.
630 (tui_win_info::make_visible): Move from tui_gen_win_info.
631 * tui/tui-win.c (tui_win_info::max_width): Move from
632 tui_gen_win_info.
633 * tui/tui-layout.h (class tui_layout_window) <m_window>: Change
634 type.
635 <window_factory>: Likewise.
636 * tui/tui-layout.c (tui_win_info::resize): Move from
637 tui_gen_win_info.
638 (make_standard_window): Change return type.
639 (get_locator_window, tui_get_window_by_name): Likewise.
640 (tui_layout_window::apply): Remove a cast.
641 * tui/tui-data.h (MIN_WIN_HEIGHT): Move earlier.
642 (struct tui_win_info): Merge with tui_gen_win_info.
643 (struct tui_gen_win_info): Remove.
644
645 2020-07-01 Tom Tromey <tom@tromey.com>
646
647 * tui/tui-stack.h (struct tui_locator_window): Derive from
648 tui_win_info.
649 <do_scroll_horizontal, do_scroll_vertical>: New methods.
650 <can_box>: New method.
651
652 2020-07-01 Tom Tromey <tom@tromey.com>
653
654 * tui/tui-stack.h (struct tui_locator_window): Remove body.
655
656 2020-07-01 Tom Tromey <tom@tromey.com>
657
658 * tui/tui-regs.c (tui_data_window::display_registers_from)
659 (tui_data_window::display_registers_from)
660 (tui_data_window::first_data_item_displayed)
661 (tui_data_window::delete_data_content_windows): Update.
662 (tui_data_window::refresh_window, tui_data_window::no_refresh):
663 Remove.
664 (tui_data_window::check_register_values): Update.
665 (tui_data_item_window::rerender): Add parameters. Update.
666 (tui_data_item_window::refresh_window): Remove.
667 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: No longer
668 virtual.
669 * tui/tui-regs.h (struct tui_data_item_window): Don't derive from
670 tui_gen_win_info.
671 <refresh_window, max_height, min_height>: Remove.
672 <rerender>: Add parameters.
673 <x, y, visible>: New members.
674 (struct tui_data_window) <refresh_window, no_refresh>: Remove.
675 <m_item_width>: New member.
676
677 2020-07-01 Tom Tromey <tom@tromey.com>
678
679 * tui/tui-regs.c (tui_data_window::show_register_group)
680 (tui_data_window::check_register_values): Update.
681 * tui/tui-regs.h (struct tui_data_item_window) <regno>: Rename
682 from item_no.
683
684 2020-07-01 Tom Tromey <tom@tromey.com>
685
686 * tui/tui-regs.c (tui_data_window::show_register_group): Remove
687 useless "if".
688
689 2020-07-01 Tom Tromey <tom@tromey.com>
690
691 * tui/tui-regs.c (tui_data_window::show_register_group): Update.
692 * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove.
693
694 2020-07-01 Tom Tromey <tom@tromey.com>
695
696 * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h
697 * tui/tui-winsource.h (enum tui_line_or_address_kind)
698 (struct tui_line_or_address): Move from tui-data.h.
699 * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h.
700 * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c.
701 (tui_cmd_window, tui_source_window_base, tui_source_window)
702 (tui_disasm_window): Don't declare.
703 (enum tui_line_or_address_kind, struct tui_line_or_address): Move
704 to tui-winsource.h.
705 (SINGLE_KEY): Move to tui-stack.c.
706
707 2020-07-01 Tom Tromey <tom@tromey.com>
708
709 * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a
710 std::string.
711 * tui/tui-regs.c (class tab_expansion_file): New.
712 (tab_expansion_file::write): New method.
713 (tui_register_format): Change return type. Use
714 tab_expansion_file.
715 (tui_get_register, tui_data_window::display_registers_from)
716 (tui_data_item_window::rerender): Update.
717 * tui/tui-io.h (tui_expand_tabs): Don't declare.
718 * tui/tui-io.c (tui_expand_tabs): Remove.
719
720 2020-07-01 Tom Tromey <tom@tromey.com>
721
722 * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
723
724 2020-07-01 Fangrui Song <maskray@google.com>
725
726 * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
727
728 2020-07-01 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
729
730 * dwarf2/read.c (set_die_type): Removed conditions to restrict
731 forms for DW_AT_associated and DW_AT_allocated attributes,
732 which is already checked in function attr_to_dynamic_prop.
733
734 2020-06-30 Tom Tromey <tromey@adacore.com>
735
736 * dwarf2/read.c (quirk_rust_enum): Correctly call
737 alloc_rust_variant for default-less enum.
738
739 2020-06-30 Tom Tromey <tromey@adacore.com>
740
741 PR build/26183:
742 * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
743 gdb::to_string.
744
745 2020-06-29 Simon Marchi <simon.marchi@efficios.com>
746
747 * gdbarch.sh (displaced_step_copy_insn): Update doc.
748 * gdbarch.h: Re-generate.
749
750 2020-06-28 Tom Tromey <tom@tromey.com>
751
752 * command.h (cmd_types): Remove.
753 (cmd_type): Don't declare.
754 * cli/cli-decode.h (enum cmd_types): Uncomment. No longer a
755 typedef.
756 * cli/cli-cmds.c (setting_cmd): Use cmd->type directly.
757 * cli/cli-decode.c (cmd_type): Remove.
758
759 2020-06-27 Pedro Alves <palves@redhat.com>
760
761 * fork-child.c (prefork_hook): Adjust.
762 * infcmd.c (set_inferior_io_terminal, get_inferior_io_terminal):
763 Delete.
764 (set_inferior_tty_command, show_inferior_tty_command): Adjust.
765 * inferior.c (inferior::set_tty, inferior::tty): New methods.
766 * inferior.h (set_inferior_io_terminal, get_inferior_io_terminal):
767 Remove declarations.
768 (struct inferior) <set_tty, tty>: New methods.
769 (struct inferior) <terminal>: Rename to ...
770 (struct inferior) <m_terminal>: ... this and make private.
771 * main.c (captured_main_1): Adjust.
772 * mi/mi-cmd-env.c (mi_cmd_inferior_tty_set): Adjust.
773 (mi_cmd_inferior_tty_show): Adjust.
774 * nto-procfs.c (nto_procfs_target::create_inferior): Adjust.
775 * windows-nat.c (windows_nat_target::create_inferior): Adjust.
776
777 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
778
779 * configure.ac: Add --enable-libctf: handle --disable-static
780 properly.
781 * acinclude.m4: sinclude ../config/enable.m4.
782 * Makefile.in (aclocal_m4_deps): Adjust accordingly.
783 (LIBCTF): Substitute in.
784 (CTF_DEPS): New, likewise.
785 (CLIBS): libctf needs symbols from libbfd: move earlier.
786 (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath
787 flags.
788 * ctfread.c: Surround in ENABLE_LIBCTF.
789 (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub.
790 * configure: Regenerate.
791 * config.in: Likewise.
792
793 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
794
795 * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
796
797 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
798
799 * inferior.h (struct inferior) <terminal>: Change type to
800 gdb::unique_xmalloc_ptr<char>.
801 * inferior.c (inferior::~inferior): Don't free inf->terminal.
802 * infcmd.c (set_inferior_io_terminal): Don't free terminal
803 field, adjust to unique pointer.
804 (get_inferior_io_terminal): Adjust to unique pointer.
805
806 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
807
808 * riscv-tdep.c (riscv_print_registers_info): Loop over all
809 registers, not just the known core set of registers.
810
811 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
812
813 * riscv-tdep.c (riscv_register_name): Return NULL for duplicate
814 fflags, frm, and fcsr registers.
815 (riscv_register_reggroup_p): Remove unknown CSRs from save and
816 restore groups.
817 (riscv_tdesc_unknown_reg): New function.
818 (riscv_gdbarch_init): Pass riscv_tdesc_unknown_reg to
819 tdesc_use_registers.
820 * riscv-tdep.h (struct gdbarch_tdep): Add
821 unknown_csrs_first_regnum, unknown_csrs_count,
822 duplicate_fflags_regnum, duplicate_frm_regnum, and
823 duplicate_fcsr_regnum fields.
824
825 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
826
827 * target-descriptions.c (tdesc_use_registers): Add new parameter a
828 callback, use the callback (when not null) to help number unknown
829 registers.
830 * target-descriptions.h (tdesc_unknown_register_ftype): New typedef.
831 (tdesc_use_registers): Add extra parameter to declaration.
832
833 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
834
835 * riscv-tdep.c (value_of_riscv_user_reg): Moved to here from later
836 in the file.
837 (class riscv_pending_register_alias): Likewise.
838 (riscv_register_feature::register_info): Change 'required_p' field
839 to 'required', and change its type. Add 'check' member function.
840 (riscv_register_feature::register_info::check): Define new member
841 function.
842 (riscv_xreg_feature): Change initialisation of 'required' field.
843 (riscv_freg_feature): Likewise.
844 (riscv_virtual_feature): Likewise.
845 (riscv_csr_feature): Likewise.
846 (riscv_check_tdesc_feature): Take extra parameter, the csr
847 tdesc_feature, rewrite the function to use the new
848 riscv_register_feature::register_info::check function.
849 (riscv_gdbarch_init): Pass the csr tdesc_feature where needed.
850
851 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
852
853 * features/Makefile: Remove all references to the deleted files
854 below.
855 * features/riscv/32bit-csr.c: Deleted.
856 * features/riscv/32bit-csr.xml: Deleted.
857 * features/riscv/64bit-csr.c: Deleted.
858 * features/riscv/64bit-csr.xml: Deleted.
859 * features/riscv/rebuild-csr-xml.sh: Deleted.
860
861 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
862
863 * riscv-tdep.c (struct riscv_register_feature::register_info): Fix
864 whitespace error for declaration of names member variable.
865 (struct riscv_register_feature): Add new prefer_first_name member
866 variable, and fix whitespace error in declaration of registers.
867 (riscv_xreg_feature): Initialize prefer_first_name field.
868 (riscv_freg_feature): Likewise.
869 (riscv_virtual_feature): Likewise.
870 (riscv_csr_feature): Likewise.
871 (riscv_register_name): Expand on comments. Remove register name
872 modifications for CSR and virtual registers.
873
874 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
875
876 * riscv-tdep.c (struct riscv_register_feature): Fix whitespace
877 errors.
878
879 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
880
881 * riscv-tdep.c (riscv_create_csr_aliases): Handle csr aliases from
882 riscv-opc.h.
883 (class riscv_pending_register_alias): New class.
884 (riscv_check_tdesc_feature): Take vector of pending aliases and
885 populate it as appropriate.
886 (riscv_setup_register_aliases): Delete.
887 (riscv_gdbarch_init): Create vector of pending aliases and pass it
888 to riscv_check_tdesc_feature in all cases. Use the vector to
889 create the register aliases.
890
891 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
892
893 * sol2-tdep.c (sol2_static_transform_name): Remove.
894 (sol2_init_abi): Don't register it.
895 * gdbarch.sh (static_transform_name): Remove.
896 * gdbarch.c, gdbarch.h: Regenerate.
897
898 * dbxread.c (read_dbx_symtab) <'S'>: Remove call to
899 gdbarch_static_transform_name.
900 * mdebugread.c (parse_partial_symbols) <'S'>: Likewise.
901 * stabsread.c (define_symbol) <'X'>: Remove.
902 (define_symbol) <'S'>: Remove gdbarch_static_transform_name
903 handling.
904 <'V'>: Likewise.
905 * xcoffread.c (scan_xcoff_symtab): Remove gdbarch.
906 <'S'>: Remove call to gdbarch_static_transform_name.
907
908 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
909
910 * procfs.c (procfs_pre_trace): New function.
911 (procfs_target::create_inferior): Pass it to fork_inferior.
912
913 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
914
915 * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove
916 sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o.
917 <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o,
918 sol2-tdep.o, sparc-sol2-tdep.o.
919 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static.
920 * sparc-tdep.h (sparc32_sol2_init_abi): Remove.
921 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static.
922 * sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
923
924 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
925
926 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
927 (amd64_sol2_init_abi): Use sol2_sigtramp_p.
928 Call sol2_init_abi.
929 Remove calls to set_gdbarch_skip_solib_resolver,
930 set_gdbarch_core_pid_to_str.
931 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
932 (i386_sol2_static_transform_name): Remove.
933 (i386_sol2_init_abi): Call sol2_init_abi.
934 Remove calls to set_gdbarch_sofun_address_maybe_missing,
935 set_gdbarch_static_transform_name,
936 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
937 Use sol2_sigtramp_p.
938 * sol2-tdep.c (sol2_pc_in_sigtramp): New function.
939 (sol2_sigtramp_p): New function.
940 (sol2_static_transform_name): New function.
941 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
942 (sol2_init_abi): New function.
943 * sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
944 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
945 * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
946 (sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
947 (sparc_sol2_static_transform_name): Remove.
948 (sparc32_sol2_init_abi): Call sol2_init_abi.
949 Remove calls to set_gdbarch_sofun_address_maybe_missing,
950 set_gdbarch_static_transform_name,
951 set_gdbarch_skip_solib_resolver,
952 set_gdbarch_core_pid_to_str.
953 * sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
954 (sparc_sol2_static_transform_name): Remove
955 * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
956 call sol2_sigtramp_p.
957 (sparc64_sol2_init_abi): Call sol2_init_abi.
958 Remove calls to set_gdbarch_sofun_address_maybe_missing,
959 set_gdbarch_static_transform_name,
960 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
961
962 2020-06-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
963
964 * symfile-add-flags.h: New flag SYMFILE_ALWAYS_CONFIRM.
965 * exec.c (validate_exec_file): If from_tty, set both
966 SYMFILE_VERBOSE (== from_tty) and SYMFILE_ALWAYS_CONFIRM.
967 * symfile.c (symbol_file_add_with_addrs): if always_confirm
968 and from_tty, unconditionally ask a confirmation.
969
970 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
971
972 * target-descriptions.c (tdesc_architecture_name): Protect against
973 NULL pointer dereference.
974 (maint_print_xml_tdesc_cmd): New function.
975 (_initialize_target_descriptions): Register new 'maint print
976 xml-tdesc' command and give it the filename completer.
977 * NEWS: Mention new 'maint print xml-tdesc' command.
978
979 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
980
981 * target-descriptions.c (class tdesc_compatible_info): New class.
982 (struct target_desc): Change type of compatible vector.
983 (tdesc_compatible_p): Update for change in type of
984 target_desc::compatible.
985 (tdesc_compatible_info_list): New function.
986 (tdesc_compatible_info_arch_name): New function.
987 (tdesc_add_compatible): Update for change in type of
988 target_desc::compatible.
989 (print_c_tdesc::visit_pre): Likewise.
990
991 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
992
993 * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
994 whitespace to underscore.
995 (maint_print_c_tdesc_cmd): Use fake filename for target
996 descriptions that came from the target.
997 (_initialize_target_descriptions): Add filename command completion
998 for 'maint print c-tdesc'.
999
1000 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
1001
1002 * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
1003 lines.
1004
1005 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
1006
1007 * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
1008 lines.
1009 (dwarf2_find_location_expression): Likewise.
1010 (call_site_parameter_matches): Likewise.
1011 (dwarf2_compile_expr_to_ax): Likewise.
1012 (disassemble_dwarf_expression): Likewise.
1013 (loclist_describe_location): Likewise.
1014
1015 2020-06-23 Pedro Alves <palves@redhat.com>
1016
1017 * gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
1018 progspace-and-thread.h. Include scoped-mock-context.h instead.
1019 (register_to_value_test): Use scoped_mock_context.
1020 * regcache.c: Include "scoped-mock-context.h".
1021 (cooked_read_test): Don't error out if a target is already pushed.
1022 Use scoped_mock_context. Adjust.
1023 * scoped-mock-context.h: New file.
1024
1025 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1026
1027 * ada-lang.c (ada_language_data): Delete la_is_string_type_p
1028 initializer.
1029 (ada_language::is_string_type_p): New member function.
1030 * c-lang.c (c_language_data): Delete la_is_string_type_p
1031 initializer.
1032 (cplus_language_data): Likewise.
1033 (asm_language_data): Likewise.
1034 (minimal_language_data): Likewise.
1035 * d-lang.c (d_language_data): Likewise.
1036 * f-lang.c (f_is_string_type_p): Delete function, implementation
1037 moved to f_language::is_string_type_p.
1038 (f_language_data): Delete la_is_string_type_p initializer.
1039 (f_language::is_string_type_p): New member function,
1040 implementation from f_is_string_type_p.
1041 * go-lang.c (go_is_string_type_p): Delete function, implementation
1042 moved to go_language::is_string_type_p.
1043 (go_language_data): Delete la_is_string_type_p initializer.
1044 (go_language::is_string_type_p): New member function,
1045 implementation from go_is_string_type_p.
1046 * language.c (language_defn::is_string_type_p): Define new member
1047 function.
1048 (default_is_string_type_p): Make static, add comment copied from
1049 header file.
1050 (unknown_language_data): Delete la_is_string_type_p initializer.
1051 (unknown_language::is_string_type_p): New member function.
1052 (auto_language_data): Delete la_is_string_type_p initializer.
1053 (auto_language::is_string_type_p): New member function.
1054 * language.h (language_data): Delete la_is_string_type_p field.
1055 (language_defn::is_string_type_p): Declare new function.
1056 (default_is_string_type_p): Delete desclaration, move comment to
1057 definition.
1058 * m2-lang.c (m2_is_string_type_p): Delete function, implementation
1059 moved to m2_language::is_string_type_p.
1060 (m2_language_data): Delete la_is_string_type_p initializer.
1061 (m2_language::is_string_type_p): New member function,
1062 implementation from m2_is_string_type_p.
1063 * objc-lang.c (objc_language_data): Delete la_is_string_type_p
1064 initializer.
1065 * opencl-lang.c (opencl_language_data): Likewise.
1066 * p-lang.c (pascal_is_string_type_p): Delete function,
1067 implementation moved to pascal_language::is_string_type_p.
1068 (pascal_language_data): Delete la_is_string_type_p initializer.
1069 (pascal_language::is_string_type_p): New member function,
1070 implementation from pascal_is_string_type_p.
1071 * rust-lang.c (rust_is_string_type_p): Delete function,
1072 implementation moved to rust_language::is_string_type_p.
1073 (rust_language_data): Delete la_is_string_type_p initializer.
1074 (rust_language::is_string_type_p): New member function,
1075 implementation from rust_is_string_type_p.
1076 * valprint.c (val_print_scalar_or_string_type_p): Update call to
1077 is_string_type_p.
1078
1079 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1080
1081 * ada-lang.c (ada_language_data): Delete la_print_typedef
1082 initializer.
1083 (ada_language::print_typedef): New member function.
1084 * c-lang.c (c_language_data): Delete la_print_typedef initializer.
1085 (cplus_language_data): Likewise.
1086 (asm_language_data): Likewise.
1087 (minimal_language_data): Likewise.
1088 * d-lang.c (d_language_data): Likewise.
1089 * f-lang.c (f_language_data): Likewise.
1090 (f_language::print_typedef): New member function.
1091 * go-lang.c (go_language_data): Delete la_print_typedef
1092 initializer.
1093 * language.c (language_defn::print_typedef): Define member
1094 function.
1095 (unknown_language_data): Delete la_print_typedef initializer.
1096 (unknown_language::print_typedef): New member function.
1097 (auto_language_data): Delete la_print_typedef initializer.
1098 (auto_language::print_typedef): New member function.
1099 * language.h (language_data): Delete la_print_typedef field.
1100 (language_defn::print_typedef): Declare new member function.
1101 (LA_PRINT_TYPEDEF): Update call to print_typedef.
1102 (default_print_typedef): Delete declaration.
1103 * m2-lang.c (m2_language_data): Delete la_print_typedef
1104 initializer.
1105 (m2_language::print_typedef): New member function.
1106 * objc-lang.c (objc_language_data): Delete la_print_typedef
1107 initializer.
1108 * opencl-lang.c (opencl_language_data): Likewise.
1109 * p-lang.c (pascal_language_data): Likewise.
1110 (pascal_language::print_typedef): New member function.
1111 * rust-lang.c (rust_print_typedef): Delete function,
1112 implementation moved to rust_language::print_typedef.
1113 (rust_language): Delete la_print_typedef initializer.
1114 (rust_language::print_typedef): New member function,
1115 implementation from rust_print_typedef.
1116 * typeprint.c (default_print_typedef): Delete.
1117
1118 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1119
1120 * ada-lang.c (ada_language_data): Delete la_printstr initializer.
1121 (ada_language::printstr): New member function.
1122 * c-lang.c (c_language_data): Delete la_printstr initializer.
1123 (cplus_language_data): Likewise.
1124 (asm_language_data): Likewise.
1125 (minimal_language_data): Likewise.
1126 * d-lang.c (d_language_data): Likewise.
1127 * f-lang.c (f_printstr): Rename to f_language::printstr.
1128 (f_language_data): Delete la_printstr initializer.
1129 (f_language::printstr): New member function, implementation from
1130 f_printstr.
1131 * go-lang.c (go_language_data): Delete la_printstr initializer.
1132 * language.c (language_defn::printstr): Define new member
1133 function.
1134 (unk_lang_printstr): Delete.
1135 (unknown_language_data): Delete la_printstr initializer.
1136 (unknown_language::printstr): New member function.
1137 (auto_language_data): Delete la_printstr initializer.
1138 (auto_language::printstr): New member function.
1139 * language.h (language_data): Delete la_printstr field.
1140 (language_defn::printstr): Declare new member function.
1141 (LA_PRINT_STRING): Update call to printstr.
1142 * m2-lang.c (m2_printstr): Rename to m2_language::printstr.
1143 (m2_language_data): Delete la_printstr initializer.
1144 (m2_language::printstr): New member function, implementation from
1145 m2_printstr.
1146 * objc-lang.c (objc_language_data): Delete la_printstr
1147 initializer.
1148 * opencl-lang.c (opencl_language_data): Likewise.
1149 * p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
1150 (pascal_language_data): Delete la_printstr initializer.
1151 (pascal_language::printstr): New member function, implementation
1152 from pascal_printstr.
1153 * p-lang.h (pascal_printstr): Delete declaration.
1154 * rust-lang.c (rust_printstr): Update header comment.
1155 (rust_language_data): Delete la_printstr initializer.
1156 (rust_language::printstr): New member function.
1157
1158 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1159
1160 * ada-lang.c (ada_language_data): Delete la_printchar initializer.
1161 (ada_language::printchar): New member function.
1162 * c-lang.c (c_language_data): Delete la_printchar initializer.
1163 (cplus_language_data): Likewise.
1164 (asm_language_data): Likewise.
1165 (minimal_language_data): Likewise.
1166 * d-lang.c (d_language_data): Likewise.
1167 * f-lang.c (f_printchar): Rename to f_language::printchar.
1168 (f_language_data): Delete la_printchar initializer.
1169 (f_language::printchar): New member function, implementation from
1170 f_printchar.
1171 * go-lang.c (go_language_data): Delete la_printchar initializer.
1172 * language.c (unk_lang_printchar): Delete.
1173 (language_defn::printchar): Define new member function.
1174 (unknown_language_data): Delete la_printchar initializer.
1175 (unknown_language::printchar): New member function.
1176 (auto_language_data): Delete la_printchar initializer.
1177 (auto_language::printchar): New member function.
1178 * language.h (language_data): Delete la_printchar field.
1179 (language_defn::printchar): Declare new member function.
1180 (LA_PRINT_CHAR): Update call to printchar.
1181 * m2-lang.c (m2_language_data): Delete la_printchar initializer.
1182 (m2_language::printchar): New member function.
1183 * objc-lang.c (objc_language_data): Delete la_printchar
1184 initializer.
1185 * opencl-lang.c (opencl_language_data): Likewise.
1186 * p-lang.c (pascal_language_data): Delete la_printchar
1187 initializer.
1188 (pascal_language::printchar): New member function.
1189 * rust-lang.c (rust_printchar): Rename to
1190 rust_language::printchar.
1191 (rust_language_data): Delete la_printchar initializer.
1192 (rust_language::printchar): New member function, implementation
1193 from rust_printchar.
1194
1195 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1196
1197 * ada-lang.c (emit_char): Renamed to ada_language::emitchar.
1198 (ada_language_data): Delete la_emitchar initializer.
1199 (ada_language::emitchar): New member function, implementation from
1200 emit_char.
1201 * c-lang.c (c_language_data): Delete la_emitchar initializer.
1202 (cplus_language_data): Likewise.
1203 (asm_language_data): Likewise.
1204 (minimal_language_data): Likewise.
1205 * d-lang.c (d_language_data): Likewise.
1206 * f-lang.c (f_emit_char): Rename to f_language::emitchar.
1207 (f_language_data): Delete la_emitchar initializer.
1208 (f_language::emitchar): New member function, implementation from
1209 f_emit_char.
1210 * go-lang.c (go_language_data): Delete la_emitchar initializer.
1211 * language.c (unk_lang_emit_char): Delete.
1212 (language_defn::emitchar): New member function definition.
1213 (unknown_language_data): Delete la_emitchar initializer.
1214 (unknown_language::emitchar): New member function.
1215 (auto_language_data): Delete la_emitchar initializer.
1216 (auto_language::emitchar): New member function.
1217 * language.h (language_data): Delete la_emitchar field.
1218 (language_defn::emitchar): New member field declaration.
1219 (LA_EMIT_CHAR): Update call to emitchar.
1220 * m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
1221 (m2_language_data): Delete la_emitchar initializer.
1222 (m2_language::emitchar): New member function, implementation from
1223 m2_emit_char.
1224 * objc-lang.c (objc_language_data): Delete la_emitchar
1225 initializer.
1226 * opencl-lang.c (opencl_language_data): Likewise.
1227 * p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
1228 (pascal_language_data): Delete la_emitchar initializer.
1229 (pascal_language::emitchar): New member function, implementation
1230 from pascal_emit_char.
1231 * rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
1232 (rust_language_data): Delete la_emitchar initializer.
1233 (rust_language::emitchar): New member function, implementation
1234 from rust_emitchar.
1235
1236 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1237
1238 * ada-lang.c (resolve): Rename to ada_language::post_parser.
1239 (ada_language_data): Delete la_post_parser initializer.
1240 (ada_language::post_parser): New member function.
1241 * c-lang.c (c_language_data): Delete la_post_parser initializer.
1242 (cplus_language_data): Likewise.
1243 (asm_language_data): Likewise.
1244 (minimal_language_data): Likewise.
1245 * d-lang.c (d_language_data): Likewise.
1246 * f-lang.c (f_language_data): Likewise.
1247 * go-lang.c (go_language_data): Likewise.
1248 * language.c (unknown_language_data): Likewise.
1249 (auto_language_data): Likewise.
1250 * language.h (language_data): Delete la_post_parser field.
1251 (language_defn::post_parser): New member function.
1252 * m2-lang.c (m2_language_data): Delete la_post_parser initializer.
1253 * objc-lang.c (objc_language_data): Likewise.
1254 * opencl-lang.c (opencl_language_data): Likewise.
1255 * p-lang.c (pascal_language_data): Likewise.
1256 * parse.c (parse_exp_in_context): Update call to post_parser.
1257 (null_post_parser): Delete definition.
1258 * parser-defs.h (null_post_parser): Delete declaration.
1259 * rust-lang.c (rust_language_data): Delete la_post_parser
1260 initializer.
1261
1262 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1263
1264 * ada-lang.c (parse): Rename to ada_language::parser.
1265 (ada_language_data): Delete la_parser initializer.
1266 (ada_language::parser): New member function, implementation from
1267 parse.
1268 * c-lang.c (c_language_data): Delete la_parser initializer.
1269 (cplus_language_data): Likewise.
1270 (asm_language_data): Likewise.
1271 (minimal_language_data): Likewise.
1272 * d-lang.c (d_language_data): Likewise.
1273 (d_language::parser): New member function.
1274 * f-lang.c (f_language_data): Delete la_parser initializer.
1275 (f_language::parser): New member function.
1276 * go-lang.c (go_language_data): Delete la_parser initializer.
1277 (go_language::parser): New member function.
1278 * language.c (unk_lang_parser): Delete.
1279 (language_defn::parser): Define new member function.
1280 (unknown_language_data): Delete la_parser initializer.
1281 (unknown_language::parser): New member function.
1282 (auto_language_data): Delete la_parser initializer.
1283 (auto_language::parser): New member function.
1284 * language.h (language_data): Delete la_parser field.
1285 (language_defn::parser): Declare new member function.
1286 * m2-lang.c (m2_language_data): Delete la_parser initializer.
1287 (m2_language::parser): New member function.
1288 * objc-lang.c (objc_language_data): Delete la_parser initializer.
1289 * opencl-lang.c (opencl_language_data): Likewise.
1290 * p-lang.c (pascal_language_data): Likewise.
1291 (pascal_language::parser): New member function.
1292 * parse.c (parse_exp_in_context): Update call to parser.
1293 * rust-lang.c (rust_language_data): Delete la_parser initializer.
1294 (rust_language::parser): New member function.
1295
1296 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1297
1298 * top.c (print_gdb_configuration): Print --with-python-libdir
1299 configuration value.
1300
1301 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1302
1303 * NEWS: Mention change to the alias command.
1304
1305 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1306
1307 * cli/cli-cmds.c (lookup_cmd_for_default_args)
1308 (alias_command_completer)
1309 (make_alias_options_def_group): New functions.
1310 (alias_opts, alias_option_defs): New struct and array.
1311 (alias_usage_error): Update usage.
1312 (alias_command): Handles optional DEFAULT-ARGS... arguments.
1313 Use option framework.
1314 (_initialize_cli_cmds): Update alias command help.
1315 Update aliases command help.
1316 (show_user):
1317 Add NULL for new default_args lookup_cmd argument.
1318 (valid_command_p): Rename to validate_aliased_command.
1319 Add NULL for new default_args lookup_cmd argument. Verify that the
1320 aliased_command has no default args.
1321 * cli/cli-decode.c (help_cmd): Show aliases definitions.
1322 (lookup_cmd_1, lookup_cmd): New argument default_args.
1323 (add_alias_cmd):
1324 Add NULL for new default_args lookup_cmd argument.
1325 (print_help_for_command): Show default args under the layout
1326 alias some_alias = some_aliased_cmd some_alias_default_arg.
1327 * cli/cli-decode.h (struct cmd_list_element): New member default_args.
1328 xfree default_args in destructor.
1329 * cli/cli-script.c (process_next_line, do_define_command):
1330 Add NULL for new default_args lookup_cmd argument.
1331 * command.h: Declare new default_args argument in lookup_cmd
1332 and lookup_cmd_1.
1333 * completer.c (complete_line_internal_1):
1334 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1335 * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
1336 * guile/scm-param.c (add_setshow_generic, pascm_parameter_defined_p):
1337 Likewise.
1338 * infcmd.c (_initialize_infcmd): Likewise.
1339 * python/py-auto-load.c (gdbpy_initialize_auto_load): Likewise.
1340 * python/py-cmd.c (gdbpy_parse_command_name): Likewise.
1341 * python/py-param.c (add_setshow_generic): Likewise.
1342 * remote.c (_initialize_remote): Likewise.
1343 * top.c (execute_command): Prepend default_args if command has some.
1344 (set_verbose):
1345 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1346 * tracepoint.c (validate_actionline, encode_actions_1):
1347 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1348
1349 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1350
1351 * jit.c (jit_read_descriptor): Use bool as the return type.
1352 (jit_breakpoint_re_set_internal): Use bool as the return type.
1353 Invert the return value logic; return true if the jit breakpoint
1354 has been successfully initialized.
1355 (jit_inferior_init): Update the call to
1356 jit_breakpoint_re_set_internal.
1357
1358 2020-06-22 Pedro Alves <palves@redhat.com>
1359
1360 PR gdb/25939
1361 * procfs.c (procfs_target::wait): Don't reference inferior_ptid.
1362 Use the current inferior instead. Don't return
1363 TARGET_WAITKIND_SPURIOUS/inferior_ptid -- instead continue and
1364 wait again.
1365 * sol-thread.c (sol_thread_target::wait): Don't reference
1366 inferior_ptid.
1367 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs)
1368 (sol_update_thread_list_callback): Use the current inferior's pid
1369 instead of inferior_ptid.
1370
1371 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1372
1373 * procfs.c: Cleanup many comments.
1374
1375 (READ_WATCHFLAG, WRITE_WATCHFLAG, EXEC_WATCHFLAG)
1376 (AFTER_WATCHFLAG): Replace by value.
1377
1378 (MAIN_PROC_NAME_FORMAT): Inline ...
1379 (create_procinfo): ... here.
1380
1381 (procfs_debug_inferior): Remove SYS_exec handling.
1382 (syscall_is_exec): Likewise.
1383 (procfs_set_exec_trap): Likewise.
1384
1385 (syscall_is_lwp_exit): Inline in callers.
1386 (syscall_is_exit): Likewise.
1387 (syscall_is_exec): Likewise.
1388 (syscall_is_lwp_create): Likewise.
1389
1390 (invalidate_cache): Remove #if 0 code.
1391
1392 (make_signal_thread_runnable): Remove.
1393 (procfs_target::resume): Remove #if 0 code.
1394
1395 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1396
1397 PR gdb/25939
1398 * procfs.c (procfs_target::procfs_init_inferior): Move push_target
1399 call ...
1400 (procfs_target::create_inferior): ... here.
1401
1402 2020-06-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1403
1404 * exec.c (validate_exec_file): Ensure the build-id is up to
1405 date by calling reopen_exec_file (that checks file timestamp
1406 to decide to re-read the file).
1407
1408 2020-06-18 Pedro Alves <palves@redhat.com>
1409
1410 PR gdb/25412
1411 * gdbthread.h (delete_thread, delete_thread_silent)
1412 (find_thread_ptid): Update comments.
1413 * thread.c (current_thread_): New global.
1414 (is_current_thread): Move higher, and reimplement.
1415 (inferior_thread): Reimplement.
1416 (set_thread_exited): Use bool. Add assertions.
1417 (add_thread_silent): Simplify thread-reuse handling by always
1418 calling delete_thread.
1419 (delete_thread): Remove intro comment.
1420 (find_thread_ptid): Skip exited threads.
1421 (switch_to_thread_no_regs): Write to current_thread_.
1422 (switch_to_no_thread): Check CURRENT_THREAD_ instead of
1423 INFERIOR_PTID. Clear current_thread_.
1424
1425 2020-06-18 Pedro Alves <palves@redhat.com>
1426
1427 * aix-thread.c (pd_update): Use switch_to_thread.
1428
1429 2020-06-18 Pedro Alves <palves@redhat.com>
1430
1431 * ravenscar-thread.c (ravenscar_thread_target): Update.
1432 (ravenscar_thread_target::update_inferior_ptid): Rename to ...
1433 (ravenscar_thread_target::add_active_thread): ... this. Don't
1434 set m_base_ptid here. Update to avoid referencing inferior_ptid.
1435 (ravenscar_thread_target::wait): Don't write to inferior_ptid.
1436
1437 2020-06-18 Pedro Alves <palves@redhat.com>
1438
1439 * nat/windows-nat.c (current_windows_thread): Remove.
1440 * nat/windows-nat.h (current_windows_thread): Remove.
1441 * windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
1442 Adjust.
1443 (display_selectors): Adjust to fetch the current
1444 windows_thread_info based on inferior_ptid.
1445 (fake_create_process): No longer write to current_windows_thread.
1446 (windows_nat_target::get_windows_debug_event):
1447 Don't set inferior_ptid or current_windows_thread.
1448 (windows_nat_target::wait): Adjust to not rely on
1449 current_windows_thread.
1450 (do_initial_windows_stuff): Now a method of windows_nat_target.
1451 Switch to the last_ptid thread.
1452 (windows_nat_target::attach): Adjust.
1453 (windows_nat_target::detach): Use switch_to_no_thread instead of
1454 writing to inferior_ptid directly.
1455 (windows_nat_target::create_inferior): Adjust.
1456
1457 2020-06-18 Pedro Alves <palves@redhat.com>
1458
1459 * windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
1460
1461 2020-06-18 Pedro Alves <palves@redhat.com>
1462
1463 * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
1464 after creating it, instead of writing to inferior_ptid. Don't
1465 write to inferior_ptid.
1466
1467 2020-06-18 Pedro Alves <palves@redhat.com>
1468
1469 * fork-child.c (postfork_hook): Don't write to inferior_ptid.
1470
1471 2020-06-18 Pedro Alves <palves@redhat.com>
1472
1473 * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
1474 it, instead of writing to inferior_ptid.
1475
1476 2020-06-18 Pedro Alves <palves@redhat.com>
1477
1478 * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
1479 to inferior_ptid.
1480
1481 2020-06-18 Pedro Alves <palves@redhat.com>
1482
1483 * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
1484 instead of writing to inferior_ptid directly.
1485
1486 2020-06-18 Pedro Alves <palves@redhat.com>
1487
1488 * corelow.c (core_target::close): Use switch_to_no_thread instead
1489 of writing to inferior_ptid directly.
1490 (add_to_thread_list, core_target_open): Use switch_to_thread
1491 instead of writing to inferior_ptid directly.
1492
1493 2020-06-18 Pedro Alves <palves@redhat.com>
1494
1495 * darwin-nat.c (darwin_nat_target::decode_message): Don't write to
1496 inferior_ptid.
1497 (darwin_nat_target::stop_inferior, darwin_nat_target::kill): Avoid
1498 inferior_ptid.
1499 (darwin_attach_pid): Use switch_to_no_thread instead of writing to
1500 inferior_ptid directly.
1501 (darwin_nat_target::init_thread_list): Switch to thread, instead
1502 of writing to inferior_ptid.
1503 (darwin_nat_target::attach): Don't write to inferior_ptid.
1504 (darwin_nat_target::get_ada_task_ptid): Avoid inferior_ptid.
1505
1506 2020-06-18 Pedro Alves <palves@redhat.com>
1507
1508 * gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
1509 thread.
1510 (gnu_nat_target::attach): Don't write to inferior_ptid directly.
1511 Instead use switch_to_thread.
1512 (gnu_nat_target::detach): Use switch_to_no_thread
1513 instead of writing to inferior_ptid directly. Used passed-in
1514 inferior instead of looking up the inferior by pid.
1515
1516 2020-06-18 Pedro Alves <palves@redhat.com>
1517
1518 * go32-nat.c (go32_nat_target::create_inferior): Don't write to
1519 inferior_ptid.
1520
1521 2020-06-18 Pedro Alves <palves@redhat.com>
1522
1523 * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
1524 inferior_ptid.
1525 (nto_procfs_target::attach): Avoid inferior_ptid. Switch to
1526 thread.
1527 (nto_procfs_target::detach): Avoid referencing
1528 inferior_ptid. Use switch_to_no_thread instead of writing to
1529 inferior_ptid directly.
1530 (nto_procfs_target::mourn_inferior): Use switch_to_no_thread
1531 instead of writing to inferior_ptid directly.
1532 (nto_procfs_target::create_inferior): Avoid inferior_ptid. Switch
1533 to thread.
1534
1535 2020-06-18 Pedro Alves <palves@redhat.com>
1536
1537 * remote-sim.c (gdbsim_target::create_inferior): Switch to thread
1538 after creating it, instead of writing to inferior_ptid.
1539 (gdbsim_target_open): Use switch_to_no_thread instead of writing
1540 to inferior_ptid directly.
1541 (gdbsim_target::wait): Don't write to inferior_ptid.
1542
1543 2020-06-18 Pedro Alves <palves@redhat.com>
1544
1545 * remote.c (remote_target::remote_notice_new_inferior): Use
1546 switch_to_thread instead of writing to inferior_ptid directly.
1547 (remote_target::add_current_inferior_and_thread): Use
1548 switch_to_no_thread instead of writing to inferior_ptid directly.
1549 (extended_remote_target::attach): Use switch_to_inferior_no_thread
1550 and switch_to_thread instead of using set_current_inferior or
1551 writing to inferior_ptid directly.
1552
1553 2020-06-18 Pedro Alves <palves@redhat.com>
1554
1555 * tracectf.c (ctf_target_open): Switch to added thread instead of
1556 writing to inferior_ptid directly.
1557 (ctf_target::close): Use switch_to_no_thread instead of writing to
1558 inferior_ptid directly.
1559
1560 2020-06-18 Pedro Alves <palves@redhat.com>
1561
1562 * tracefile-tfile.c (tfile_target_open): Don't write to
1563 inferior_ptid directly, instead switch to added thread.
1564 (tfile_target::close): Use switch_to_no_thread instead of writing
1565 to inferior_ptid directly.
1566
1567 2020-06-18 Pedro Alves <palves@redhat.com>
1568
1569 * procfs.c (procfs_target::attach): Don't write to inferior_ptid.
1570 (procfs_target::detach): Use switch_to_no_thread
1571 instead of writing to inferior_ptid directly.
1572 (do_attach): Change return type to void. Switch to the added
1573 thread.
1574 (procfs_target::create_inferior): Switch to the added thread.
1575 (procfs_do_thread_registers): Don't write to inferior_ptid.
1576
1577 2020-06-18 Pedro Alves <palves@redhat.com>
1578
1579 * infrun.c (generic_mourn_inferior): Use switch_to_thread instead
1580 of writing to inferior_ptid.
1581 (scoped_restore_exited_inferior): Delete.
1582 (handle_vfork_child_exec_or_exit): Simplify using
1583 scoped_restore_current_pspace_and_thread. Use switch_to_thread
1584 instead of writing to inferior_ptid.
1585 (THREAD_STOPPED_BY): Delete.
1586 (thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
1587 (thread_stopped_by_hw_breakpoint): Delete.
1588 (save_waitstatus): Use
1589 scoped_restore_current_thread+switch_to_thread, and call
1590 target_stopped_by_watchpoint instead of
1591 thread_stopped_by_watchpoint, target_stopped_by_sw_breakpoint
1592 instead of thread_stopped_by_sw_breakpoint, and
1593 target_stopped_by_hw_breakpoint instead of
1594 thread_stopped_by_hw_breakpoint.
1595 (handle_inferior_event)
1596 <TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Don't write to
1597 inferior_ptid directly, nor
1598 set_current_inferior/set_current_program_space. Use
1599 switch_to_thread / switch_to_inferior_no_thread instead.
1600
1601 2020-06-18 Pedro Alves <palves@redhat.com>
1602
1603 * target.c (generic_mourn_inferior): Use switch_to_no_thread
1604 instead of writing to inferior_ptid.
1605
1606 2020-06-18 Pedro Alves <palves@redhat.com>
1607
1608 * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the
1609 added thread.
1610 (inf_ptrace_target::attach): Don't write to inferior_ptid. Switch
1611 to the added thread.
1612 (inf_ptrace_target::detach_success): Use switch_to_no_thread
1613 instead of writing to inferior_ptid.
1614
1615 2020-06-18 Pedro Alves <palves@redhat.com>
1616
1617 * gdbarch-selftests.c: Include "progspace-and-thread.h".
1618 (register_to_value_test): Mock a program_space too. Heap-allocate
1619 the address space. Don't write to inferior_ptid. Use
1620 switch_to_thread instead.
1621
1622 2020-06-18 Pedro Alves <palves@redhat.com>
1623
1624 * linux-tdep.c (find_signalled_thread(thread_info *,void *)):
1625 Delete.
1626 (find_signalled_thread()): New, factored out from
1627 linux_make_corefile_notes and adjusted to handle exited threads.
1628 (linux_make_corefile_notes): Adjust to use the new
1629 find_signalled_thread.
1630
1631 2020-06-18 Pedro Alves <palves@redhat.com>
1632
1633 * linux-tdep.c (btrace_fetch): Save/restore current thread instead
1634 of saving/restoring inferior_ptid.
1635
1636 2020-06-17 Tom Tromey <tom@tromey.com>
1637
1638 * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
1639 (tui_scroll_left, tui_scroll_right, struct tui_win_info): Don't
1640 declare.
1641 * tui/tui-data.h (MIN_CMD_WIN_HEIGHT): Remove.
1642
1643 2020-06-15 Simon Marchi <simon.marchi@efficios.com>
1644
1645 * dwarf2/read.c (dwarf2_initialize_objfile): Check for presence
1646 of partial symtabs.
1647
1648 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1649
1650 * regformats/reg-arm.dat: Remove.
1651 * regformats/reg-bfin.dat: Remove.
1652 * regformats/reg-cris.dat: Remove.
1653 * regformats/reg-crisv32.dat: Remove.
1654 * regformats/reg-m32r.dat: Remove.
1655 * regformats/reg-tilegx.dat: Remove.
1656 * regformats/reg-tilegx32.dat: Remove.
1657
1658 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1659
1660 * features/Makefile (WHICH): Remove arm files.
1661 * regformats/arm/arm-with-iwmmxt.dat: Remove.
1662 * regformats/arm/arm-with-neon.dat: Remove.
1663 * regformats/arm/arm-with-vfpv2.dat: Remove.
1664 * regformats/arm/arm-with-vfpv3.dat: Remove.
1665
1666 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1667
1668 * features/Makefile (XMLTOC): Remove rx.xml.
1669
1670 2020-06-17 Pedro Alves <palves@redhat.com>
1671
1672 * gdbthread.h (thread_control_state) <trap_expected> Update
1673 comments.
1674
1675 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1676
1677 * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
1678 ada_language::lookup_symbol_nonlocal.
1679 (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
1680 (ada_language::lookup_symbol_nonlocal): New member function,
1681 implementation from ada_lookup_symbol_nonlocal.
1682 * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
1683 initializer.
1684 (cplus_language_data): Delete la_lookup_symbol_nonlocal
1685 initializer.
1686 (cplus_language::lookup_symbol_nonlocal): New member function.
1687 (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
1688 (minimal_language_data) Likewise.
1689 * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
1690 * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
1691 initializer.
1692 (d_language::lookup_symbol_nonlocal): New member function.
1693 * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
1694 initializer.
1695 (f_language::lookup_symbol_nonlocal): New member function.
1696 * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
1697 initializer.
1698 * language.c (unknown_language_data): Likewise.
1699 (auto_language_data): Likewise.
1700 * language.h (language_data): Delete la_lookup_symbol_nonlocal
1701 field.
1702 (language_defn::lookup_symbol_nonlocal): New member function.
1703 * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
1704 initializer.
1705 * objc-lang.c (objc_language_data): Likewise.
1706 * opencl-lang.c (opencl_language_data): Likewise.
1707 * p-lang.c (pascal_language_data): Likewise.
1708 * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
1709 rust_language::lookup_symbol_nonlocal.
1710 (rust_language_data): Delete la_lookup_symbol_nonlocal
1711 initializer.
1712 (rust_language::lookup_symbol_nonlocal): New member function,
1713 implementation from rust_lookup_symbol_nonlocal.
1714 * symtab.c (lookup_symbol_aux): Update call to
1715 lookup_symbol_nonlocal.
1716 (basic_lookup_symbol_nonlocal): Rename to...
1717 (language_defn::lookup_symbol_nonlocal): ...this, and update
1718 header comment. Remove language_defn parameter, and replace with
1719 uses of `this'.
1720 * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
1721
1722 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1723
1724 * ada-lang.c (ada_language_data): Delete la_value_print_inner
1725 initializer.
1726 (ada_language::value_print_inner): New member function.
1727 * c-lang.c (c_language_data): Delete la_value_print_inner
1728 initializer.
1729 (cplus_language_data): Likewise.
1730 (asm_language_data): Likewise.
1731 (minimal_language_data): Likewise.
1732 * d-lang.c (d_language_data): Likewise.
1733 (d_language::value_print_inner): New member function.
1734 * f-lang.c (f_language_data): Delete la_value_print_inner
1735 initializer.
1736 (f_language::value_print_inner): New member function.
1737 * f-lang.h (f_value_print_innner): Rename to...
1738 (f_value_print_inner): ...this (note spelling of 'inner').
1739 * f-valprint.c (f_value_print_innner): Rename to...
1740 (f_value_print_inner): ...this (note spelling of 'inner').
1741 * go-lang.c (go_language_data): Delete la_value_print_inner
1742 initializer.
1743 (go_language::value_print_inner): New member function.
1744 * language.c (language_defn::value_print_inner): Define new member
1745 function.
1746 (unk_lang_value_print_inner): Delete.
1747 (unknown_language_data): Delete la_value_print_inner initializer.
1748 (unknown_language::value_print_inner): New member function.
1749 (auto_language_data): Delete la_value_print_inner initializer.
1750 (auto_language::value_print_inner): New member function.
1751 * language.h (language_data): Delete la_value_print_inner field.
1752 (language_defn::value_print_inner): Delcare new member function.
1753 * m2-lang.c (m2_language_data): Delete la_value_print_inner
1754 initializer.
1755 (m2_language::value_print_inner): New member function.
1756 * objc-lang.c (objc_language_data): Delete la_value_print_inner
1757 initializer.
1758 * opencl-lang.c (opencl_language_data): Likewise.
1759 * p-lang.c (pascal_language_data): Likewise.
1760 (pascal_language::value_print_inner): New member function.
1761 * rust-lang.c (rust_language_data): Delete la_value_print_inner
1762 initializer.
1763 (rust_language::value_print_inner): New member function.
1764 * valprint.c (do_val_print): Update call to value_print_inner.
1765
1766 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1767
1768 * ada-lang.c (ada_language_data): Delete la_value_print
1769 initializer.
1770 (ada_language::value_print): New member function.
1771 * c-lang.c (c_language_data): Delete la_value_print initializer.
1772 (cplus_language_data): Likewise.
1773 (asm_language_data): Likewise.
1774 (minimal_language_data): Likewise.
1775 * d-lang.c (d_language_data): Likewise.
1776 * f-lang.c (f_language_data): Likewise.
1777 * go-lang.c (go_language_data): Likewise.
1778 * language.c (unk_lang_value_print): Delete.
1779 (language_defn::value_print): Define new member function.
1780 (unknown_language_data): Delete la_value_print initializer.
1781 (unknown_language::value_print): New member function.
1782 (auto_language_data): Delete la_value_print initializer.
1783 (auto_language::value_print): New member function.
1784 * language.h (language_data): Delete la_value_print field.
1785 (language_defn::value_print): Declare new member function.
1786 (LA_VALUE_PRINT): Update call to value_print.
1787 * m2-lang.c (m2_language_data): Delete la_value_print initializer.
1788 * objc-lang.c (objc_language_data): Likewise.
1789 * opencl-lang.c (opencl_language_data): Likewise.
1790 * p-lang.c (pascal_language_data): Likewise.
1791 (pascal_language::value_print): New member function.
1792 * rust-lang.c (rust_language_data): Delete la_value_print
1793 initializer.
1794
1795 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1796
1797 * ada-lang.c (ada_watch_location_expression): Rename to
1798 ada_language::watch_location_expression.
1799 (ada_language_data): Delete la_watch_location_expression
1800 initializer.
1801 (ada_language::watch_location_expression): New member function,
1802 implementation from ada_watch_location_expression.
1803 * breakpoint.c (watch_command_1): Update call to
1804 watch_location_expression.
1805 * c-lang.c (c_watch_location_expression): Rename to
1806 language_defn::watch_location_expression.
1807 (c_language_data): Delete la_watch_location_expression
1808 initializer.
1809 (cplus_language_data): Likewise.
1810 (asm_language_data): Likewise.
1811 (minimal_language_data): Likewise.
1812 * c-lang.h (c_watch_location_expression): Delete declaration.
1813 * d-lang.c (d_language_data): Delete la_watch_location_expression
1814 initializer.
1815 * f-lang.c (f_language_data): Likewise.
1816 * go-lang.c (go_language_data): Likewise.
1817 * language.c (language_defn::watch_location_expression): Member
1818 function implementation from c_watch_location_expression.
1819 (unknown_language_data): Delete la_watch_location_expression
1820 initializer.
1821 (auto_language_data): Likewise.
1822 * language.h (language_data): Delete la_watch_location_expression
1823 field.
1824 (language_defn::watch_location_expression): Declare new member
1825 function.
1826 * m2-lang.c (m2_language_data): Delete
1827 la_watch_location_expression initializer.
1828 * objc-lang.c (objc_language_data): Likewise.
1829 * opencl-lang.c (opencl_language_data): Likewise.
1830 * p-lang.c (pascal_language_data): Likewise.
1831 * rust-lang.c (rust_watch_location_expression): Rename to
1832 rust_language::watch_location_expression.
1833 (rust_language_data): Delete la_watch_location_expression
1834 initializer.
1835 (rust_language::watch_location_expression): New member function,
1836 implementation from rust_watch_location_expression.
1837
1838 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1839
1840 * ada-lang.c (ada_collect_symbol_completion_matches): Rename to
1841 ada_language::collect_symbol_completion_matches.
1842 (ada_language_data): Delete la_collect_symbol_completion_matches
1843 initializer.
1844 (ada_language::collect_symbol_completion_matches): New member
1845 function, implementation from
1846 ada_collect_symbol_completion_matches.
1847 * c-lang.c (c_language_data): Delete
1848 la_collect_symbol_completion_matches initializer.
1849 (cplus_language_data): Likewise.
1850 (asm_language_data): Likewise.
1851 (minimal_language_data): Likewise.
1852 * d-lang.c (d_language_data): Likewise.
1853 * f-lang.c (f_collect_symbol_completion_matches): Rename to
1854 f_language::collect_symbol_completion_matches.
1855 (f_language_data): Delete la_collect_symbol_completion_matches
1856 initializer.
1857 (f_language::collect_symbol_completion_matches) New member
1858 function, implementation from f_collect_symbol_completion_matches.
1859 * go-lang.c (go_language_data): Delete
1860 la_collect_symbol_completion_matches initializer.
1861 * language.c (unknown_language_data): Likewise.
1862 (auto_language_data): Likewise.
1863 * language.h (language_data): Delete
1864 la_collect_symbol_completion_matches field.
1865 (language_defn::collect_symbol_completion_matches): New member
1866 function.
1867 * m2-lang.c (m2_language_data): Delete
1868 la_collect_symbol_completion_matches initializer.
1869 * objc-lang.c (objc_language_data): Likewise.
1870 * opencl-lang.c (opencl_language_data): Likewise.
1871 * p-lang.c (pascal_language_data): Likewise.
1872 * rust-lang.c (rust_language_data): Likewise.
1873 * symtab.c (default_collect_symbol_completion_matches): Delete.
1874 (collect_symbol_completion_matches): Update call to
1875 collect_symbol_completion_matches.
1876 (collect_symbol_completion_matches_type): Likewise.
1877 * symtab.h (default_collect_symbol_completion_matches): Delete
1878 declaration.
1879
1880 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1881
1882 * ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
1883 (ada_language_data): Delete la_word_break_characters initializer.
1884 (ada_language::word_break_characters): New member function.
1885 * c-lang.c (c_language_data): Delete la_word_break_characters
1886 initializer.
1887 (cplus_language_data): Likewise.
1888 (asm_language_data): Likewise.
1889 (minimal_language_data): Likewise.
1890 * completer.c: Update global comment.
1891 (advance_to_expression_complete_word_point): Update call to
1892 word_break_characters.
1893 (complete_files_symbols): Likewise.
1894 (complete_line_internal_1): Likewise.
1895 (default_completer_handle_brkchars): Likewise.
1896 (skip_quoted_chars): Likewise.
1897 * d-lang.c (d_language_data): Delete la_word_break_characters
1898 initializer.
1899 * f-lang.c (f_word_break_characters): Delete.
1900 (f_language_data): Delete la_word_break_characters initializer.
1901 (f_language::word_break_characters): New member function.
1902 * go-lang.c (go_language_data): Delete la_word_break_characters
1903 initializer.
1904 * language.c (unknown_language_data): Likewise.
1905 (auto_language_data): Likewise.
1906 * language.h (default_word_break_characters): Move declaration to
1907 earlier in the file.
1908 (language_data): Delete la_word_break_characters field.
1909 (language_defn::word_break_characters): New member function.
1910 * m2-lang.c (m2_language_data): Delete la_word_break_characters
1911 initializer.
1912 * objc-lang.c (objc_language_data): Likewise.
1913 * opencl-lang.c (opencl_language_data): Likewise.
1914 * p-lang.c (pascal_language_data): Likewise.
1915 * rust-lang.c (rust_language_data): Likewise.
1916
1917 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1918
1919 * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
1920 (ada_language_data): Delete la_get_symbol_name_matcher
1921 initializer.
1922 (language_defn::get_symbol_name_matcher_inner): New member
1923 function.
1924 * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
1925 initializer.
1926 (cplus_language_data): Likewise.
1927 (cplus_language::get_symbol_name_matcher_inner): New member
1928 function.
1929 (asm_language_data): Delete la_get_symbol_name_matcher initializer.
1930 (minimal_language_data): Likewise.
1931 * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
1932 * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
1933 initializer.
1934 * dictionary.c (iter_match_first_hashed): Update call to
1935 get_symbol_name_matcher.
1936 (iter_match_next_hashed): Likewise.
1937 (iter_match_next_linear): Likewise.
1938 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
1939 * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
1940 initializer.
1941 (f_language::get_symbol_name_matcher_inner): New member function.
1942 * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
1943 initializer.
1944 * language.c (default_symbol_name_matcher): Update header comment,
1945 make static.
1946 (language_defn::get_symbol_name_matcher): New definition.
1947 (language_defn::get_symbol_name_matcher_inner): Likewise.
1948 (get_symbol_name_matcher): Delete.
1949 (unknown_language_data): Delete la_get_symbol_name_matcher
1950 initializer.
1951 (auto_language_data): Likewise.
1952 * language.h (language_data): Delete la_get_symbol_name_matcher
1953 field.
1954 (language_defn::get_symbol_name_matcher): New member function.
1955 (language_defn::get_symbol_name_matcher_inner): Likewise.
1956 (default_symbol_name_matcher): Delete declaration.
1957 * linespec.c (find_methods): Update call to
1958 get_symbol_name_matcher.
1959 * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
1960 initializer.
1961 * minsyms.c (lookup_minimal_symbol): Update call to
1962 get_symbol_name_matcher.
1963 (iterate_over_minimal_symbols): Likewise.
1964 * objc-lang.c (objc_language_data): Delete
1965 la_get_symbol_name_matcher initializer.
1966 * opencl-lang.c (opencl_language_data): Likewise.
1967 * p-lang.c (pascal_language_data): Likewise.
1968 * psymtab.c (psymbol_name_matches): Update call to
1969 get_symbol_name_matcher.
1970 * rust-lang.c (rust_language_data): Delete
1971 la_get_symbol_name_matcher initializer.
1972 * symtab.c (symbol_matches_search_name): Update call to
1973 get_symbol_name_matcher.
1974 (compare_symbol_name): Likewise.
1975
1976 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1977
1978 * ada-lang.c (ada_language_data): Delete la_compute_program
1979 initializer.
1980 * c-lang.c (c_language_data): Likewise.
1981 (c_language::compute_program): New member function.
1982 (cplus_language_data): Delete la_compute_program initializer.
1983 (cplus_language::compute_program): New member function.
1984 (asm_language_data): Delete la_compute_program initializer.
1985 (minimal_language_data): Likewise.
1986 * c-lang.h (c_compute_program): Update comment.
1987 (cplus_compute_program): Likewise.
1988 * compile/compile-c-support.c (c_compute_program): Likewise.
1989 (cplus_compute_program): Likewise.
1990 * compile/compile.c (compile_to_object): Update call to
1991 la_compute_program.
1992 * d-lang.c (d_language_data): Delete la_compute_program
1993 initializer.
1994 * f-lang.c (f_language_data): Likewise.
1995 * go-lang.c (go_language_data): Likewise.
1996 * language.c (unknown_language_data): Likewise.
1997 (auto_language_data): Likewise.
1998 * language.h (language_data): Delete la_compute_program field.
1999 (language_defn::compute_program): New member function.
2000 * m2-lang.c (m2_language_data): Delete la_compute_program
2001 initializer.
2002 * objc-lang.c (objc_language_data): Likewise.
2003 * opencl-lang.c (opencl_language_data): Likewise.
2004 * p-lang.c (pascal_language_data): Likewise.
2005 * rust-lang.c (rust_language_data): Likewise.
2006
2007 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2008
2009 * ada-lang.c (ada_language_data) Delete
2010 la_class_name_from_physname initializer.
2011 * c-lang.c (c_language_data): Likewise.
2012 (cplus_language_data): Likewise.
2013 (cplus_language::class_name_from_physname): New member function.
2014 (asm_language_data): Delete la_class_name_from_physname
2015 initializer.
2016 (minimal_language_data): Likewise.
2017 * d-lang.c (d_language_data): Likewise.
2018 * dwarf2/read.c (guess_partial_die_structure_name): Update to call
2019 method on language_defn class.
2020 (guess_full_die_structure_name): Likewise.
2021 * f-lang.c (f_language_data): Delete la_class_name_from_physname
2022 initializer.
2023 * go-lang.c (go_language_data): Likewise.
2024 * language.c (language_class_name_from_physname): Delete.
2025 (unk_lang_class_name): Delete.
2026 (unknown_language_data): Delete la_class_name_from_physname
2027 initializer.
2028 (auto_language_data): Likewise.
2029 * language.h (language_data): Delete la_class_name_from_physname
2030 field.
2031 (language_defn::class_name_from_physname): New function.
2032 (language_class_name_from_physname): Delete declaration.
2033 * m2-lang.c (m2_language_data): Delete la_class_name_from_physname
2034 initializer.
2035 * objc-lang.c (objc_language_data): Likewise.
2036 * opencl-lang.c (opencl_language_data): Likewise.
2037 * p-lang.c (pascal_language_data): Likewise.
2038 * rust-lang.c (rust_language_data): Likewise.
2039
2040 2020-06-16 Tom Tromey <tom@tromey.com>
2041
2042 * tui/tui-data.h (STATUS_NAME): New macro.
2043 * tui/tui-layout.c (tui_remove_some_windows)
2044 (initialize_known_windows, tui_register_window)
2045 (tui_layout_split::remove_windows, initialize_layouts)
2046 (tui_new_layout_command): Don't use hard-coded window names.
2047
2048 2020-06-16 Tom Tromey <tom@tromey.com>
2049
2050 PR tui/25348:
2051 * tui/tui.c (tui_ensure_readline_initialized): Rename from
2052 tui_initialize_readline. Only run once. Call rl_initialize.
2053 * tui/tui.h (tui_ensure_readline_initialized): Rename from
2054 tui_initialize_readline.
2055 * tui/tui-io.c (tui_setup_io): Call
2056 tui_ensure_readline_initialized.
2057 * tui/tui-interp.c (tui_interp::init): Update.
2058
2059 2020-06-16 Tom Tromey <tom@tromey.com>
2060
2061 * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
2062 Also preserve the status window.
2063
2064 2020-06-16 Tom Tromey <tom@tromey.com>
2065
2066 * python/py-tui.c (tui_py_window::~tui_py_window): Handle case
2067 where m_window==nullptr.
2068
2069 2020-06-15 Tom Tromey <tromey@adacore.com>
2070
2071 * windows-nat.c (windows_nat::handle_output_debug_string):
2072 Update.
2073 (windows_nat::handle_ms_vc_exception): Update.
2074 * target.h (target_read_string): Change API.
2075 * target.c (target_read_string): Change API.
2076 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
2077 Update.
2078 * solib-frv.c (frv_current_sos): Update.
2079 * solib-dsbt.c (dsbt_current_sos): Update.
2080 * solib-darwin.c (darwin_current_sos): Update.
2081 * linux-thread-db.c (inferior_has_bug): Update.
2082 * expprint.c (print_subexp_standard): Update.
2083 * ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
2084 (ada_exception_message_1): Update.
2085
2086 2020-06-15 Tom Tromey <tromey@adacore.com>
2087
2088 * linux-tdep.c (dump_mapping_p): Use target_read_memory.
2089
2090 2020-06-15 Tom Tromey <tromey@adacore.com>
2091
2092 * valprint.c (read_string): Update comment.
2093 * target.c (MIN): Remove.
2094 (target_read_string): Rewrite.
2095
2096 2020-06-15 Tom Tromey <tromey@adacore.com>
2097
2098 * corefile.c (read_memory_string): Remove.
2099 * ada-valprint.c (ada_value_print_ptr): Update.
2100 * ada-lang.h (ada_tag_name): Change return type.
2101 * ada-lang.c (type_from_tag): Update.
2102 (ada_tag_name_from_tsd): Change return type. Use
2103 target_read_string.
2104 (ada_tag_name): Likewise.
2105 * gdbcore.h (read_memory_string): Don't declare.
2106
2107 2020-06-14 Hannes Domani <ssbssa@yahoo.de>
2108
2109 * symtab.c (rbreak_command): Ignore Windows drive colon.
2110
2111 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
2112
2113 * NEWS: Mention removed GDBserver host support.
2114
2115 2020-06-12 Nelson Chu <nelson.chu@sifive.com>
2116
2117 * features/riscv/rebuild-csr-xml.sh: Updated.
2118
2119 2020-06-11 Tom Tromey <tom@tromey.com>
2120
2121 PR gdb/18318:
2122 * c-exp.y (lex_one_token): Handle 'p' like 'e'.
2123
2124 2020-06-09 Jonny Grant <jg@jguk.org>
2125 2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
2126
2127 * main.c (captured_main_1): Don't print new line after help.
2128 (print_gdb_help): add mailing list and IRC channel information
2129 to --help. Add new lines between items in the footer. Remove
2130 quotes around bug url.
2131
2132 2020-06-11 Keith Seitz <keiths@redhat.com>
2133
2134 PR gdb/21356
2135 * gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
2136 Resolve typedefs for type length calculations.
2137
2138 2020-06-10 Tom de Vries <tdevries@suse.de>
2139
2140 PR ada/24713
2141 * dwarf2/index-write.c (struct mapped_symtab): Add m_string_obstack.
2142 (write_psymbols): Enable .gdb_index for ada.
2143 * dwarf2/read.c: Remove comment stating .gdb_index is unsupported for
2144 ada.
2145
2146 2020-06-10 Tom de Vries <tdevries@suse.de>
2147
2148 * dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
2149 (dw2_symtab_iter_init): ... here. Add variant with "offset_type
2150 namei" instead of "const char *name" argument.
2151 (dw2_map_matching_symbols): Use "offset_type namei" variant of
2152 dw2_symtab_iter_init.
2153
2154 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2155
2156 * gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
2157 to use type::field and field::type instead.
2158
2159 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2160
2161 * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites
2162 to use field::type instead.
2163
2164 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2165
2166 * gdbtypes.h (struct field) <type, set_type>: New methods.
2167 Rename `type` field to...
2168 <m_type>: ... this. Change references throughout to use type or
2169 set_type methods.
2170 (FIELD_TYPE): Use field::type. Change call sites that modify
2171 the field's type to use field::set_type instead.
2172
2173 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2174
2175 * gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
2176 to use type::index_type instead.
2177
2178 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2179
2180 * gdbtypes.h (struct type) <index_type, set_index_type>: New
2181 methods.
2182 (TYPE_INDEX_TYPE): Use type::index_type.
2183 * gdbtypes.c (create_array_type_with_stride): Likewise.
2184
2185 2020-06-07 Tom Tromey <tom@tromey.com>
2186
2187 * valprint.c (generic_val_print_float): Remove "embedded_offset"
2188 parameter.
2189 (generic_value_print): Update.
2190
2191 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
2192
2193 Revert commit 982a38f60b0.
2194 * python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
2195
2196 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
2197
2198 * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
2199 avoid use after free.
2200
2201 2020-06-05 Tom de Vries <tdevries@suse.de>
2202
2203 * NEWS: Fix typos.
2204
2205 2020-06-04 Simon Marchi <simon.marchi@efficios.com>
2206
2207 * dwarf2/read.c (dwarf2_read_gdb_index): Save partial_symtabs in
2208 the per_bfd object.
2209 (dwarf2_read_debug_names): Likewise.
2210 (dwarf2_initialize_objfile): Use partial_symtabs from per_bfd
2211 object when re-using a per_bfd object with an index.
2212
2213 2020-06-03 Tom de Vries <tdevries@suse.de>
2214
2215 PR symtab/26046
2216 * dwarf2/read.c (scan_partial_symbols): Recurse into DW_TAG_subprogram
2217 children for C++.
2218 (load_partial_dies): Don't skip DW_TAG_inlined_subroutine child of
2219 DW_TAG_subprogram.
2220
2221 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2222
2223 * ada-lang.c (ada_language_data): Delete skip_trampoline
2224 initializer.
2225 * c-lang.c (c_language_data): Likewise.
2226 (cplus_language_data): Likewise.
2227 (cplus_language::skip_trampoline): New member function.
2228 (asm_language_data): Delete skip_trampoline initializer.
2229 (minimal_language_data): Likewise.
2230 * d-lang.c (d_language_data): Likewise.
2231 * f-lang.c (f_language_data): Likewise.
2232 * go-lang.c (go_language_data): Likewise.
2233 * language.c (unk_lang_trampoline): Delete function.
2234 (skip_language_trampoline): Update.
2235 (unknown_language_data): Delete skip_trampoline initializer.
2236 (auto_language_data): Likewise.
2237 * language.h (language_data): Delete skip_trampoline field.
2238 (language_defn::skip_trampoline): New function.
2239 * m2-lang.c (m2_language_data): Delete skip_trampoline
2240 initializer.
2241 * objc-lang.c (objc_skip_trampoline): Delete function, move
2242 implementation to objc_language::skip_trampoline.
2243 (objc_language_data): Delete skip_trampoline initializer.
2244 (objc_language::skip_trampoline): New member function with
2245 implementation from objc_skip_trampoline.
2246 * opencl-lang.c (opencl_language_data): Delete skip_trampoline
2247 initializer.
2248 * p-lang.c (pascal_language_data): Likewise.
2249 * rust-lang.c (rust_language_data): Likewise.
2250
2251 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2252
2253 * ada-lang.c (ada_language_data): Delete la_demangle initializer.
2254 (ada_language::demangle): New member function.
2255 * c-lang.c (c_language_data): Delete la_demangle initializer.
2256 (cplus_language_data): Delete la_demangle initializer.
2257 (cplus_language::demangle): New member function.
2258 (asm_language_data): Delete la_demangle initializer.
2259 (minimal_language_data): Delete la_demangle initializer.
2260 * d-lang.c (d_language_data): Delete la_demangle initializer.
2261 (d_language::demangle): New member function.
2262 * f-lang.c (f_language_data): Delete la_demangle initializer.
2263 (f_language::demangle): New member function.
2264 * go-lang.c (go_language_data): Delete la_demangle initializer.
2265 (go_language::demangle): New member function.
2266 * language.c (language_demangle): Update.
2267 (unk_lang_demangle): Delete.
2268 (unknown_language_data): Delete la_demangle initializer.
2269 (unknown_language::demangle): New member function.
2270 (auto_language_data): Delete la_demangle initializer.
2271 (auto_language::demangle): New member function.
2272 * language.h (language_data): Delete la_demangle field.
2273 (language_defn::demangle): New function.
2274 * m2-lang.c (m2_language_data): Delete la_demangle initializer.
2275 * objc-lang.c (objc_language_data): Delete la_demangle
2276 initializer.
2277 (objc_language::demangle): New member function.
2278 * opencl-lang.c (opencl_language_data): Delete la_demangle
2279 initializer.
2280 * p-lang.c (pascal_language_data): Likewise.
2281 * rust-lang.c (rust_language_data): Likewise.
2282 (rust_language::demangle): New member function.
2283
2284 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2285
2286 * ada-lang.c (ada_language_data): Delete la_print_type
2287 initializer.
2288 (ada_language::print_type): New member function.
2289 * c-lang.c (c_language_data): Delete la_print_type initializer.
2290 (c_language::print_type): New member function.
2291 (cplus_language_data): Delete la_print_type initializer.
2292 (cplus_language::print_type): New member function.
2293 (asm_language_data): Delete la_print_type initializer.
2294 (asm_language::print_type): New member function.
2295 (minimal_language_data): Delete la_print_type initializer.
2296 (minimal_language::print_type): New member function.
2297 * d-lang.c (d_language_data): Delete la_print_type initializer.
2298 (d_language::print_type): New member function.
2299 * f-lang.c (f_language_data): Delete la_print_type initializer.
2300 (f_language::print_type): New member function.
2301 * go-lang.c (go_language_data): Delete la_print_type initializer.
2302 (go_language::print_type): New member function.
2303 * language.c (unk_lang_print_type): Delete.
2304 (unknown_language_data): Delete la_print_type initializer.
2305 (unknown_language::print_type): New member function.
2306 (auto_language_data): Delete la_print_type initializer.
2307 (auto_language::print_type): New member function.
2308 * language.h (language_data): Delete la_print_type field.
2309 (language_defn::print_type): New function.
2310 (LA_PRINT_TYPE): Update.
2311 * m2-lang.c (m2_language_data): Delete la_print_type initializer.
2312 (m2_language::print_type): New member function.
2313 * objc-lang.c (objc_language_data): Delete la_print_type
2314 initializer.
2315 (objc_language::print_type): New member function.
2316 * opencl-lang.c (opencl_print_type): Delete, implementation moved
2317 to opencl_language::print_type.
2318 (opencl_language_data): Delete la_print_type initializer.
2319 (opencl_language::print_type): New member function, implementation
2320 from opencl_print_type.
2321 * p-lang.c (pascal_language_data): Delete la_print_type
2322 initializer.
2323 (pascal_language::print_type): New member function.
2324 * rust-lang.c (rust_print_type): Delete, implementation moved to
2325 rust_language::print_type.
2326 (rust_language_data): Delete la_print_type initializer.
2327 (rust_language::print_type): New member function, implementation
2328 from rust_print_type.
2329
2330 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2331
2332 * ada-lang.c (ada_sniff_from_mangled_name): Delete function,
2333 implementation moves to...
2334 (ada_language::sniff_from_mangled_name): ...here. Update return
2335 type.
2336 (ada_language_data): Delete la_sniff_from_mangled_name
2337 initializer.
2338 * c-lang.c (c_language_data): Likewise.
2339 (cplus_language_data): Likewise.
2340 (cplus_language::sniff_from_mangled_name): New member function,
2341 implementation taken from gdb_sniff_from_mangled_name.
2342 (asm_language_data): Delete la_sniff_from_mangled_name
2343 initializer.
2344 (minimal_language_data): Likewise.
2345 * cp-support.c (gdb_sniff_from_mangled_name): Delete,
2346 implementation moves to cplus_language::sniff_from_mangled_name.
2347 * cp-support.h (gdb_sniff_from_mangled_name): Delete declaration.
2348 * d-lang.c (d_sniff_from_mangled_name): Delete, implementation
2349 moves to...
2350 (d_language::sniff_from_mangled_name): ...here.
2351 (d_language_data): Delete la_sniff_from_mangled_name initializer.
2352 * f-lang.c (f_language_data): Likewise.
2353 * go-lang.c (go_sniff_from_mangled_name): Delete, implementation
2354 moves to...
2355 (go_language::sniff_from_mangled_name): ...here.
2356 (go_language_data): Delete la_sniff_from_mangled_name initializer.
2357 * language.c (language_sniff_from_mangled_name): Delete.
2358 (unknown_language_data): Delete la_sniff_from_mangled_name
2359 initializer.
2360 (auto_language_data): Likewise.
2361 * language.h (language_data): Delete la_sniff_from_mangled_name
2362 field.
2363 (language_defn::sniff_from_mangled_name): New function.
2364 (language_sniff_from_mangled_name): Delete declaration.
2365 * m2-lang.c (m2_language_data): Delete la_sniff_from_mangled_name
2366 field.
2367 * objc-lang.c (objc_sniff_from_mangled_name): Delete,
2368 implementation moves to...
2369 (objc_language::sniff_from_mangled_name): ...here.
2370 (objc_language_data): Delete la_sniff_from_mangled_name initializer.
2371 * opencl-lang.c (opencl_language_data): Likewise.
2372 * p-lang.c (pascal_language_data): Likewise.
2373 * rust-lang.c (rust_sniff_from_mangled_name): Delete,
2374 implementation moves to...
2375 (rust_language::sniff_from_mangled_name): ...here.
2376 (rust_language_data): Delete la_sniff_from_mangled_name
2377 initializer.
2378 * symtab.c (symbol_find_demangled_name): Call
2379 sniff_from_mangled_name member function.
2380
2381 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2382
2383 * ada-lang.c (ada_language_data): Delete la_search_name_hash
2384 initializer.
2385 * c-lang.c (c_language_data): Likewise.
2386 (cplus_language_data): Likewise.
2387 (cplus_language::search_name_hash): New member function.
2388 (asm_language_data): Delete la_search_name_hash initializer.
2389 (minimal_language_data): Likewise.
2390 * d-lang.c (d_language_data): Likewise.
2391 * dictionary.c (default_search_name_hash): Rename to...
2392 (language_defn::search_name_hash): ...this.
2393 * f-lang.c (f_language_data): Likewise.
2394 (f_language::search_name_hash): New member function.
2395 * go-lang.c (go_language_data): Delete la_search_name_hash
2396 initializer.
2397 * language.c (unknown_language_data): Likewise.
2398 (auto_language_data): Likewise.
2399 * language.h (struct language_data): Delete la_search_name_hash
2400 field.
2401 (language_defn::search_name_hash): Declare new member function.
2402 (default_search_name_hash): Delete declaration.
2403 * m2-lang.c (m2_language_data): Delete la_search_name_hash
2404 initializer.
2405 * objc-lang.c (objc_language_data): Likewise.
2406 * opencl-lang.c (opencl_language_data): Likewise.
2407 * p-lang.c (pascal_language_data): Likewise.
2408 * rust-lang.c (rust_language_data): Likewise.
2409 * symtab.c (search_name_hash): Update call.
2410
2411 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2412
2413 * ada-lang.c (ada_language_data): Delete la_get_compile_instance
2414 initializer.
2415 * c-lang.c (class compile_instance): Declare.
2416 (c_language_data): Delete la_get_compile_instance initializer.
2417 (c_language::get_compile_instance): New member function.
2418 (cplus_language_data): Delete la_get_compile_instance initializer.
2419 (cplus_language::get_compile_instance): New member function.
2420 (asm_language_data): Delete la_get_compile_instance initializer.
2421 (minimal_language_data): Likewise.
2422 * c-lang.h (c_get_compile_context): Update comment.
2423 (cplus_get_compile_context): Update comment.
2424 * compile/compile.c (compile_to_object): Update calls, don't rely
2425 on function pointer being NULL.
2426 * d-lang.c (d_language_data): Delete la_get_compile_instance
2427 initializer.
2428 * f-lang.c (f_language_data): Likewise.
2429 * go-lang.c (go_language_data): Likewise.
2430 * language.c (unknown_language_data): Likewise.
2431 (auto_language_data): Likewise.
2432 * language.h (language_data): Delete la_get_compile_instance field.
2433 (language_defn::get_compile_instance): New member function.
2434 * m2-lang.c (m2_language_data): Delete la_get_compile_instance
2435 initializer.
2436 * objc-lang.c (objc_language_data): Likewise.
2437 * opencl-lang.c (opencl_language_data): Likewise.
2438 * p-lang.c (pascal_language_data): Likewise.
2439 * rust-lang.c (rust_language_data): Likewise.
2440
2441 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2442
2443 * ada-lang.c (ada_add_all_symbols): Update comment.
2444 (ada_iterate_over_symbols): Delete, move implementation to...
2445 (ada_language::iterate_over_symbols): ...here, a new member
2446 function, rewrite to use range based for loop.
2447 (ada_language_data): Delete la_iterate_over_symbols initializer.
2448 * c-lang.c (c_language_data): Likewise.
2449 (cplus_language_data): Likewise.
2450 (asm_language_data): Likewise.
2451 (minimal_language_data): Likewise.
2452 * d-lang.c (d_language_data): Likewise.
2453 * f-lang.c (f_language_data): Likewise.
2454 * go-lang.c (go_language_data): Likewise.
2455 * language.c (unknown_language_data): Likewise.
2456 (auto_language_data): Likewise.
2457 * language.h (language_data): Delete la_iterate_over_symbols field.
2458 (language_defn::iterate_over_symbols): New member function.
2459 (LA_ITERATE_OVER_SYMBOLS): Update.
2460 * linespec.c (iterate_over_all_matching_symtabs): Update.
2461 * m2-lang.c (m2_language_data): Delete la_iterate_over_symbols
2462 initializer.
2463 * objc-lang.c (objc_language_data): Likewise.
2464 * opencl-lang.c (opencl_language_data): Likewise.
2465 * p-lang.c (pascal_language_data): Likewise.
2466 * rust-lang.c (rust_language_data): Likewise.
2467
2468 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2469
2470 * ada-lang.c (ada_language_data): Delete
2471 la_lookup_transparent_type initializer.
2472 * c-lang.c (c_language_data): Likewise.
2473 (cplus_language_data): Likewise.
2474 (cplus_language::lookup_transparent_type): New member function.
2475 (asm_language_data): Delete la_lookup_transparent_type
2476 initializer.
2477 (minimal_language_data): Likewise.
2478 * d-lang.c (d_language_data): Likewise.
2479 * f-lang.c (f_language_data): Likewise.
2480 * go-lang.c (go_language_data): Likewise.
2481 * language.c (unknown_language_data): Likewise.
2482 (auto_language_data): Likewise.
2483 * language.h (struct language_data): Delete
2484 la_lookup_transparent_type field.
2485 (language_defn::lookup_transparent_type): New member function.
2486 * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type
2487 initializer.
2488 * objc-lang.c (objc_language_data): Likewise.
2489 * opencl-lang.c (opencl_language_data): Likewise.
2490 * p-lang.c (pascal_language_data): Likewise.
2491 * rust-lang.c (rust_language_data): Likewise.
2492 * symtab.c (symbol_matches_domain): Update call.
2493
2494 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2495
2496 * ada-lang.c (ada_language_arch_info): Delete function, move
2497 implementation to...
2498 (ada_language::language_arch_info): ...here, a new member
2499 function.
2500 (ada_language_data): Delete la_language_arch_info.
2501 * c-lang.c (c_language_data): Likewise.
2502 (c_language::language_arch_info): New member function.
2503 (cplus_language_arch_info): Delete function, move
2504 implementation to...
2505 (cplus_language::language_arch_info): ...here, a new member
2506 function.
2507 (cplus_language_data): Delete la_language_arch_info.
2508 (asm_language_data): Likewise.
2509 (asm_language::language_arch_info): New member function.
2510 (minimal_language_data): Delete la_language_arch_info.
2511 (minimal_language::language_arch_info): New member function.
2512 * d-lang.c (d_language_arch_info): Delete function, move
2513 implementation to...
2514 (d_language::language_arch_info): ...here, a new member
2515 function.
2516 (d_language_data): Delete la_language_arch_info.
2517 * f-lang.c (f_language_arch_info): Delete function, move
2518 implementation to...
2519 (f_language::language_arch_info): ...here, a new member
2520 function.
2521 (f_language_data): Delete la_language_arch_info.
2522 * go-lang.c (go_language_arch_info): Delete function, move
2523 implementation to...
2524 (go_language::language_arch_info): ...here, a new member
2525 function.
2526 (go_language_data): Delete la_language_arch_info.
2527 * language.c (unknown_language_data): Likewise.
2528 (unknown_language::language_arch_info): New member function.
2529 (auto_language_data): Delete la_language_arch_info.
2530 (auto_language::language_arch_info): New member function.
2531 (language_gdbarch_post_init): Update call to
2532 la_language_arch_info.
2533 * language.h (language_data): Delete la_language_arch_info
2534 function pointer.
2535 (language_defn::language_arch_info): New function.
2536 * m2-lang.c (m2_language_arch_info): Delete function, move
2537 implementation to...
2538 (m2_language::language_arch_info): ...here, a new member
2539 function.
2540 (m2_language_data): Delete la_language_arch_info.
2541 * objc-lang.c (objc_language_arch_info): Delete function, move
2542 implementation to...
2543 (objc_language::language_arch_info): ...here, a new member
2544 function.
2545 (objc_language_data): Delete la_language_arch_info.
2546 * opencl-lang.c (opencl_language_arch_info): Delete function, move
2547 implementation to...
2548 (opencl_language::language_arch_info): ...here, a new member
2549 function.
2550 (opencl_language_data): Delete la_language_arch_info.
2551 * p-lang.c (pascal_language_arch_info): Delete function, move
2552 implementation to...
2553 (pascal_language::language_arch_info): ...here, a new member
2554 function.
2555 (pascal_language_data): Delete la_language_arch_info.
2556 * rust-lang.c (rust_language_arch_info): Delete function, move
2557 implementation to...
2558 (rust_language::language_arch_info): ...here, a new member
2559 function.
2560 (rust_language_data): Delete la_language_arch_info.
2561
2562 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2563
2564 * ada-lang.c (ada_language_data): Delete la_pass_by_reference
2565 initializer.
2566 * c-lang.c (c_language_data): Likewise.
2567 (cplus_language_data): Likewise.
2568 (cplus_language::pass_by_reference_info): New method.
2569 (asm_language_data): Delete la_pass_by_reference initializer.
2570 (minimal_language_data): Likewise.
2571 * cp-abi.c (cp_pass_by_reference): Remove use of
2572 default_pass_by_reference.
2573 * d-lang.c (d_language_data): Likewise.
2574 * f-lang.c (f_language_data): Likewise.
2575 * gnu-v3-abi.c (gnuv3_pass_by_reference): Remove use of
2576 default_pass_by_reference.
2577 * go-lang.c (go_language_data): Likewise.
2578 * language.c (language_pass_by_reference): Update.
2579 (default_pass_by_reference): Delete.
2580 (unknown_language_data): Delete la_pass_by_reference
2581 initializer.
2582 (auto_language_data): Likewise.
2583 * language.h (struct language_data): Delete la_pass_by_reference
2584 field.
2585 (language_defn::pass_by_reference_info): New member function.
2586 (default_pass_by_reference): Delete declaration.
2587 * m2-lang.c (m2_language_data): Delete la_pass_by_reference
2588 initializer.
2589 * objc-lang.c (objc_language_data): Likewise.
2590 * opencl-lang.c (opencl_language_data): Likewise.
2591 * p-lang.c (pascal_language_data): Likewise.
2592 * rust-lang.c (rust_language_data): Likewise.
2593
2594 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2595
2596 * ada-lang.c (ada_read_var_value): Delete function, move
2597 implementation to...
2598 (ada_language::read_var_value): ...here.
2599 (ada_language_data): Delete la_read_var_value initializer.
2600 * c-lang.c (c_language_data): Likewise.
2601 (cplus_language_data): Likewise.
2602 (minimal_language_data): Likewise.
2603 * d-lang.c (d_language_data): Likewise.
2604 * f-lang.c (f_language_data): Likewise.
2605 * findvar.c (default_read_var_value): Rename to...
2606 (language_defn::read_var_value): ...this.
2607 * findvar.c (read_var_value): Update header comment, and change to
2608 call member function instead of function pointer.
2609 * go-lang.c (go_language_data): Likewise.
2610 * language.c (unknown_language_data): Delete la_read_var_value
2611 initializer.
2612 (auto_language_data): Likewise.
2613 * language.h (struct language_data): Delete la_read_var_value
2614 field.
2615 (language_defn::read_var_value): New member function.
2616 (default_read_var_value): Delete declaration.
2617 * m2-lang.c (m2_language_data): Delete la_read_var_value
2618 initializer.
2619 * objc-lang.c (objc_language_data): Likewise.
2620 * opencl-lang.c (opencl_language_data): Likewise.
2621 * p-lang.c (pascal_language_data): Likewise.
2622 * rust-lang.c (rust_language_data): Likewise.
2623 * value.h (default_read_var_value): Delete declaration.
2624
2625 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2626
2627 * ada-lang.c (ada_print_array_index): Delete function, move
2628 implementation to...
2629 (ada_language::print_array_index): ...here.
2630 (ada_language_data): Delete la_print_array_index initializer.
2631 * c-lang.c (c_language_data): Likewise.
2632 (cplus_language_data): Likewise.
2633 (minimal_language_data): Likewise.
2634 * d-lang.c (d_language_data): Likewise.
2635 * f-lang.c (f_language_data): Likewise.
2636 * go-lang.c (go_language_data): Likewise.
2637 * language.c (default_print_array_index): Delete function, move
2638 implementation to...
2639 (language_defn::print_array_index): ...here.
2640 (unknown_language_data): Delete la_print_array_index initializer.
2641 (auto_language_data): Likewise.
2642 * language.h (struct language_data): Delete la_print_array_index
2643 field.
2644 (language_defn::print_array_index): New member function.
2645 (LA_PRINT_ARRAY_INDEX): Update.
2646 (default_print_array_index): Delete declaration.
2647 * m2-lang.c (m2_language_data): Delete la_print_array_index
2648 initializer.
2649 * objc-lang.c (objc_language_data): Likewise.
2650 * opencl-lang.c (opencl_language_data): Likewise.
2651 * p-lang.c (pascal_language_data): Likewise.
2652 * rust-lang.c (rust_language_data): Likewise.
2653
2654 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2655
2656 * gdb/ada-lang.c (ada_language_defn): Convert to...
2657 (ada_language_data): ...this.
2658 (class ada_language): New class.
2659 (ada_language_defn): New static global.
2660 * gdb/c-lang.c (c_language_defn): Convert to...
2661 (c_language_data): ...this.
2662 (class c_language): New class.
2663 (c_language_defn): New static global.
2664 (cplus_language_defn): Convert to...
2665 (cplus_language_data): ...this.
2666 (class cplus_language): New class.
2667 (cplus_language_defn): New static global.
2668 (asm_language_defn): Convert to...
2669 (asm_language_data): ...this.
2670 (class asm_language): New class.
2671 (asm_language_defn): New static global.
2672 (minimal_language_defn): Convert to...
2673 (minimal_language_data): ...this.
2674 (class minimal_language): New class.
2675 (minimal_language_defn): New static global.
2676 * gdb/d-lang.c (d_language_defn): Convert to...
2677 (d_language_data): ...this.
2678 (class d_language): New class.
2679 (d_language_defn): New static global.
2680 * gdb/f-lang.c (f_language_defn): Convert to...
2681 (f_language_data): ...this.
2682 (class f_language): New class.
2683 (f_language_defn): New static global.
2684 * gdb/go-lang.c (go_language_defn): Convert to...
2685 (go_language_data): ...this.
2686 (class go_language): New class.
2687 (go_language_defn): New static global.
2688 * gdb/language.c (unknown_language_defn): Remove declaration.
2689 (current_language): Initialize to nullptr, real initialization is
2690 moved to _initialize_language.
2691 (languages): Delete global.
2692 (language_defn::languages): Define.
2693 (set_language_command): Use language_defn::languages.
2694 (set_language): Likewise.
2695 (range_error): Likewise.
2696 (language_enum): Likewise.
2697 (language_def): Likewise.
2698 (add_set_language_command): Use language_def::languages for the
2699 language list, and language_def to lookup language pointers.
2700 (skip_language_trampoline): Use language_defn::languages.
2701 (unknown_language_defn): Convert to...
2702 (unknown_language_data): ...this.
2703 (class unknown_language): New class.
2704 (unknown_language_defn): New static global.
2705 (auto_language_defn): Convert to...
2706 (auto_language_data): ...this.
2707 (class auto_language): New class.
2708 (auto_language_defn): New static global.
2709 (language_gdbarch_post_init): Use language_defn::languages.
2710 (_initialize_language): Initialize current_language.
2711 * gdb/language.h (struct language_defn): Rename to...
2712 (struct language_data): ...this.
2713 (struct language_defn): New.
2714 (auto_language_defn): Delete.
2715 (unknown_language_defn): Delete.
2716 (minimal_language_defn): Delete.
2717 (ada_language_defn): Delete.
2718 (asm_language_defn): Delete.
2719 (c_language_defn): Delete.
2720 (cplus_language_defn): Delete.
2721 (d_language_defn): Delete.
2722 (f_language_defn): Delete.
2723 (go_language_defn): Delete.
2724 (m2_language_defn): Delete.
2725 (objc_language_defn): Delete.
2726 (opencl_language_defn): Delete.
2727 (pascal_language_defn): Delete.
2728 (rust_language_defn): Delete.
2729 * gdb/m2-lang.c (m2_language_defn): Convert to...
2730 (m2_language_data): ...this.
2731 (class m2_language): New class.
2732 (m2_language_defn): New static global.
2733 * gdb/objc-lang.c (objc_language_defn): Convert to...
2734 (objc_language_data): ...this.
2735 (class objc_language): New class.
2736 (objc_language_defn): New static global.
2737 * gdb/opencl-lang.c (opencl_language_defn): Convert to...
2738 (opencl_language_data): ...this.
2739 (class opencl_language): New class.
2740 (opencl_language_defn): New static global.
2741 * gdb/p-lang.c (pascal_language_defn): Convert to...
2742 (pascal_language_data): ...this.
2743 (class pascal_language): New class.
2744 (pascal_language_defn): New static global.
2745 * gdb/rust-exp.y (rust_lex_tests): Use language_def to find
2746 language pointer, update comment format.
2747 * gdb/rust-lang.c (rust_language_defn): Convert to...
2748 (rust_language_data): ...this.
2749 (class rust_language): New class.
2750 (rust_language_defn): New static global.
2751
2752 2020-06-01 Andrew Burgess <andrew.burgess@embecosm.com>
2753
2754 * dwarf2/read.c (class lnp_state_machine) <m_last_address>: New
2755 member variable.
2756 <m_stmt_at_address>: New member variable.
2757 (lnp_state_machine::record_line): Don't record some lines, update
2758 tracking of is_stmt at the same address.
2759 (lnp_state_machine::lnp_state_machine): Initialise new member
2760 variables.
2761
2762 2020-06-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
2763
2764 * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
2765 "-include gnu-nat-mig.h".
2766 * gnu-nat-mig.h: New file.
2767 * gnu-nat.c: Include "gnu-nat-mig.h".
2768 (exc_server, msg_reply_server, notify_server,
2769 process_reply_server): Remove declarations.
2770
2771 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2772
2773 * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced,
2774 steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,
2775 inf_startup, inf_update_suspends, inf_set_pid, inf_steal_exc_ports,
2776 inf_validate_procinfo, inf_validate_task_sc, inf_restore_exc_ports,
2777 inf_set_threads_resume_sc, inf_set_threads_resume_sc_for_signal_thread,
2778 inf_resume, inf_set_step_thread, inf_detach, inf_attach, inf_signal,
2779 inf_continue, make_proc, proc_abort, _proc_free, proc_update_sc,
2780 proc_get_exception_port, proc_set_exception_port, _proc_get_exc_port,
2781 proc_steal_exc_port, proc_restore_exc_port, proc_trace): Move functions
2782 to gnu_nat_target class.
2783 * gnu-nat.c: Likewise.
2784 (inf_update_procs, S_proc_wait_reply, set_task_pause_cmd,
2785 set_task_exc_port_cmd, set_signals_cmd, set_thread_pause_cmd,
2786 set_thread_exc_port_cmd): Call inf_validate_procs through gnu_target
2787 object.
2788 (gnu_nat_target::create_inferior, gnu_nat_target::detach): Pass `this'
2789 instead of `gnu_target'.
2790
2791 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2792
2793 * i386-gnu-tdep.c: Include "gdbcore.h"
2794 (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays.
2795 (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL,
2796 I386_GNU_SIGCONTEXT_THREAD_STATE_OFFSET): New macros
2797 (i386_gnu_sigtramp_start, i386_gnu_sigtramp_p,
2798 i386_gnu_sigcontext_addr): New functions
2799 (i386gnu_init_abi): Register i386_gnu_sigtramp_p,
2800 i386_gnu_sigcontext_addr, and i386_gnu_sc_reg_offset in the gdbarch
2801 tdep.
2802
2803 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2804
2805 * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
2806 before fork_inferior call. Avoid calling it if target_is_pushed returns
2807 true.
2808
2809 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2810
2811 * gnu-nat.h (gnu_target): New variable declaration.
2812 * i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
2813 gnu_target.
2814 * gnu-nat.c (gnu_target): New variable.
2815 (inf_validate_procs): Pass gnu_target to thread_change_ptid,
2816 add_thread_silent, and add_thread calls.
2817 (gnu_nat_target::create_inferior): Pass gnu_target to
2818 add_thread_silent, thread_change_ptid call.
2819 (gnu_nat_target::detach): Pass gnu_target to detach_inferior
2820 call.
2821
2822 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2823
2824 * gnu-nat.c (gnu_xfer_auxv): Remove unused `res' variable.
2825 (gnu_nat_target::find_memory_regions): Remove unused
2826 `old_address' variable.
2827
2828 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2829
2830 * gnu-nat.c: Include "gdbarch.h".
2831
2832 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2833
2834 * reply_mig_hack.awk (Error return): Cast function through
2835 void *, to bypass compiler function call check.
2836
2837 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2838
2839 * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on
2840 $(srcdir)/reply_mig_hack.awk.
2841
2842 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2843
2844 * gnu-nat.h (gnu_debug_flag): Set type to bool.
2845
2846 2020-05-30 Jonny Grant <jg@jguk.org>
2847
2848 * configure.ac (ACX_BUGURL): change bug URL to https.
2849
2850 2020-05-30 Pedro Alves <palves@redhat.com>
2851
2852 * cp-support.c (replace_typedefs_template): New.
2853 (replace_typedefs_qualified_name): Handle
2854 DEMANGLE_COMPONENT_TEMPLATE.
2855
2856 2020-05-29 Simon Marchi <simon.marchi@efficios.com>
2857
2858 * dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
2859 dwarf2/index-cache.h, dwarf2/index-write.c,
2860 dwarf2/index-write.h, dwarf2/line-header.c,
2861 dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
2862 dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
2863 variables and fields from `dwarf2_per_objfile` to just
2864 `per_objfile` throughout.
2865
2866 2020-05-28 Simon Marchi <simon.marchi@polymtl.ca>
2867
2868 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
2869 <push_dwarf_reg_entry_value>: Add comment.
2870
2871 2020-05-28 Kevin Buettner <kevinb@redhat.com>
2872 Keith Seitz <keiths@redhat.com>
2873
2874 * python/python.c (do_start_initialization): Call PyEval_SaveThread
2875 instead of PyEval_ReleaseLock.
2876 (class gdbpy_gil): Move to earlier in file.
2877 (finalize_python): Set gdb_python_initialized.
2878 (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early
2879 when not initialized.
2880
2881 2020-05-28 Simon Marchi <simon.marchi@efficios.com>
2882
2883 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
2884 <push_dwarf_reg_entry_value>: Remove assert. Override
2885 per_objfile with caller_per_objfile.
2886
2887 2020-05-28 Tom de Vries <tdevries@suse.de>
2888
2889 * dwarf2/read.c (dw2_symtab_iter_next, dw2_expand_marked_cus): Limit
2890 PR gold/15646 workaround to symbol kind "type".
2891
2892 2020-05-27 Tom Tromey <tromey@adacore.com>
2893
2894 * dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
2895
2896 2020-05-27 Tom Tromey <tromey@adacore.com>
2897
2898 * dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
2899 Use htab_find_with_hash.
2900 <add_abbrev>: Remove "abbrev_number" parameter.
2901 * dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
2902 "abbrev_number" parameter. Use htab_find_slot_with_hash.
2903 (hash_abbrev): Add comment.
2904 (abbrev_table::lookup_abbrev): Move to header file.
2905 (abbrev_table::read): Update.
2906
2907 2020-05-27 Tom Tromey <tromey@adacore.com>
2908
2909 * dwarf2/read.c (struct partial_die_info) <name>: Declare new
2910 method.
2911 <canonical_name>: New member.
2912 <raw_name>: Rename from "name".
2913 (partial_die_info): Initialize canonical_name.
2914 (scan_partial_symbols): Check raw_name.
2915 (partial_die_parent_scope, partial_die_full_name)
2916 (add_partial_symbol, add_partial_subprogram)
2917 (add_partial_enumeration, load_partial_dies): Use "name" method.
2918 (partial_die_info::name): New method.
2919 (partial_die_info::read, guess_partial_die_structure_name)
2920 (partial_die_info::fixup): Update.
2921
2922 2020-05-27 Tom Tromey <tromey@adacore.com>
2923
2924 * dwarf2/attribute.h (struct attribute) <form_is_ref>: Inline.
2925 <get_ref_die_offset>: Inline.
2926 <get_ref_die_offset_complaint>: New method.
2927 * dwarf2/attribute.c (attribute::form_is_ref): Move to header.
2928 (attribute::get_ref_die_offset_complaint): Rename from
2929 get_ref_die_offset. Just issue complaint.
2930
2931 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2932
2933 * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
2934
2935 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2936
2937 * exec.c (exec_file_attach): Use errno value of first openp failure.
2938
2939 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2940
2941 * nat/windows-nat.c (windows_thread_info::~windows_thread_info):
2942 Don't close thread handle.
2943
2944 2020-05-27 Tom Tromey <tom@tromey.com>
2945 Simon Marchi <simon.marchi@efficios.com>
2946
2947 * objfiles.h (struct objfile) <partial_symtabs>: Now a
2948 shared_ptr.
2949 * dwarf2/read.h (struct dwarf2_per_objfile) <partial_symtabs>: New
2950 member.
2951 * dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,
2952 dwarf2_per_bfd_objfile_data_key>: New globals.
2953 (dwarf2_has_info): Use shared dwarf2_per_bfd if possible.
2954 (dwarf2_get_section_info): Use get_dwarf2_per_objfile.
2955 (dwarf2_initialize_objfile): Consider cases where per_bfd can be
2956 shared.
2957 (dwarf2_build_psymtabs): Set objfile::partial_symtabs and
2958 short-circuit when sharing.
2959 (dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.
2960 (dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.
2961
2962 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2963
2964 * dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
2965 to...
2966 (struct dwarf2_per_objfile) <line_header_hash>: ... here.
2967 * dwarf2/read.c (handle_DW_AT_stmt_list): Update.
2968
2969 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2970
2971 * dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
2972 build_name_components, find_name_components_bounds>:
2973 Add per_objfile parameter.
2974 (struct mapped_index) <symbol_name_at>: Likewise.
2975 (struct mapped_debug_names): Remove constructor.
2976 <dwarf2_per_objfile>: Remove field.
2977 <namei_to_name, symbol_name_at>: Add per_objfile parameter.
2978 (mapped_index_base::find_name_components_bounds,
2979 mapped_index_base::build_name_components,
2980 dw2_expand_symtabs_matching_symbol): Likewise.
2981 (class mock_mapped_index) <symbol_name_at>: Likewise.
2982 (check_match): Likewise.
2983 (check_find_bounds_finds): Likewise.
2984 (test_mapped_index_find_name_component_bounds): Update.
2985 (CHECK_MATCH): Update.
2986 (dw2_expand_symtabs_matching): Update.
2987 (class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
2988 per_objfile parameter.
2989 <find_vec_in_debug_names>: Likewise.
2990 <m_per_objfile>: New field.
2991 (mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
2992 parameter.
2993 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2994 (dw2_debug_names_iterator::next): Update.
2995 (dw2_debug_names_lookup_symbol): Update.
2996 (dw2_debug_names_expand_symtabs_for_function): Update.
2997 (dw2_debug_names_map_matching_symbols): Update.
2998 (dw2_debug_names_expand_symtabs_matching): Update.
2999 (dwarf2_read_debug_names): Update.
3000
3001 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3002
3003 * dwarf2/read.h (struct dwarf2_cu): Forward-declare.
3004 (struct dwarf2_per_bfd) <free_cached_comp_units>: Remove,
3005 move to dwarf2_per_objfile.
3006 <read_in_chain>: Remove.
3007 (struct dwarf2_per_objfile) <get_cu, set_cu, remove_cu,
3008 remove_all_cus, age_comp_units>: New methods.
3009 <m_dwarf2_cus>: New member.
3010 (struct dwarf2_per_cu_data) <cu>: Remove.
3011 * dwarf2/read.c (struct dwarf2_cu) <read_in_chain>: Remove.
3012 (age_cached_comp_units, free_one_cached_comp_unit): Remove,
3013 moved to methods of dwarf2_per_objfile.
3014 (dwarf2_clear_marks): Remove.
3015 (dwarf2_queue_item::~dwarf2_queue_item): Update.
3016 (dwarf2_per_bfd::~dwarf2_per_bfd): Don't free dwarf2_cus.
3017 (dwarf2_per_bfd::free_cached_comp_units): Remove.
3018 (dwarf2_per_objfile::remove_all_cus): New.
3019 (class free_cached_comp_units) <~free_cached_comp_units>:
3020 Update.
3021 (load_cu): Update.
3022 (dw2_do_instantiate_symtab): Adjust.
3023 (fill_in_sig_entry_from_dwo_entry): Adjust.
3024 (cutu_reader::init_tu_and_read_dwo_dies): Update.
3025 (cutu_reader::cutu_reader): Likewise.
3026 (cutu_reader::keep): Use dwarf2_per_objfile::set_cu.
3027 (cutu_reader::cutu_reader): Use dwarf2_per_objfile::get_cu.
3028 (process_psymtab_comp_unit): Use dwarf2_per_objfile::remove_cu
3029 and dwarf2_per_objfile::age_comp_units.
3030 (load_partial_comp_unit): Update.
3031 (maybe_queue_comp_unit): Use dwarf2_per_objfile::get_cu.
3032 (process_queue): Likewise.
3033 (find_partial_die): Use dwarf2_per_objfile::get_cu instead of cu
3034 backlink.
3035 (dwarf2_read_addr_index): Likewise.
3036 (follow_die_offset): Likewise.
3037 (dwarf2_fetch_die_loc_sect_off): Likewise.
3038 (dwarf2_fetch_constant_bytes): Likewise.
3039 (dwarf2_fetch_die_type_sect_off): Likewise.
3040 (follow_die_sig_1): Likewise.
3041 (load_full_type_unit): Likewise.
3042 (read_signatured_type): Likewise.
3043 (dwarf2_cu::dwarf2_cu): Don't set cu field.
3044 (dwarf2_cu::~dwarf2_cu): Remove.
3045 (dwarf2_per_objfile::get_cu): New.
3046 (dwarf2_per_objfile::set_cu): New.
3047 (age_cached_comp_units): Rename to...
3048 (dwarf2_per_objfile::age_comp_units): ... this. Adjust
3049 to std::unordered_map.
3050 (free_one_cached_comp_unit): Rename to...
3051 (dwarf2_per_objfile::remove_cu): ... this. Adjust
3052 to std::unordered_map.
3053 (dwarf2_per_objfile::~dwarf2_per_objfile): New.
3054 (dwarf2_mark_helper): Use dwarf2_per_objfile::get_cu, expect
3055 a dwarf2_per_objfile in data.
3056 (dwarf2_mark): Pass dwarf2_per_objfile in data to htab_traverse.
3057 (dwarf2_clear_marks): Remove.
3058
3059 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3060
3061 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Replace
3062 `int use_existing_cu` parameter with `dwarf2_cu *existing_cu`.
3063 (init_tu_and_read_dwo_dies): Likewise.
3064 (cutu_reader::init_tu_and_read_dwo_dies): Likewise.
3065 (cutu_reader::cutu_reader): Likewise.
3066 (load_partial_comp_unit): Likewise.
3067 (process_psymtab_comp_unit): Update.
3068 (build_type_psymtabs_1): Update.
3069 (process_skeletonless_type_unit): Update.
3070 (load_full_comp_unit): Update.
3071 (find_partial_die): Update.
3072 (dwarf2_read_addr_index): Update.
3073 (read_signatured_type): Update.
3074
3075 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3076
3077 * dwarf2/read.h (struct dwarf2_per_cu_data) <m_header,
3078 m_header_read_in>: New fields.
3079 <get_header>: New method.
3080 * dwarf2/read.c (per_cu_header_read_in): Remove.
3081 (dwarf2_per_cu_data::get_header): New.
3082 (dwarf2_per_cu_data::addr_size): Update.
3083 (dwarf2_per_cu_data::offset_size): Update.
3084 (dwarf2_per_cu_data::ref_addr_size): Update.
3085
3086 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3087
3088 * dwarf2/read.c (load_cu): Return dwarf2_cu.
3089 (dw2_do_instantiate_symtab): Update.
3090 (queue_and_load_all_dwo_tus): Change parameter from
3091 dwarf2_per_cu_data to dwarf2_cu.
3092 (dwarf2_fetch_die_loc_sect_off): Update.
3093 (dwarf2_fetch_constant_bytes): Update.
3094 (dwarf2_fetch_die_type_sect_off): Update.
3095
3096 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3097
3098 * dwarf2/read.c (process_full_comp_unit,
3099 process_full_type_unit): Remove per_cu, per_objfile paramters.
3100 Add dwarf2_cu parameter.
3101 (process_queue): Update.
3102
3103 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3104
3105 * dwarf2/read.c (create_cu_from_index_list): Replace
3106 dwarf2_per_objfile parameter with dwarf2_per_bfd.
3107 (create_cus_from_index_list): Likewise.
3108 (create_cus_from_index): Likewise.
3109 (create_signatured_type_table_from_index): Likewise.
3110 (create_cus_from_debug_names_list): Likewise.
3111 (create_cus_from_debug_names): Likewise.
3112 (dwarf2_read_gdb_index): Update.
3113 (dwarf2_read_debug_names): Update.
3114
3115 2020-05-27 Tom Tromey <tom@tromey.com>
3116 Simon Marchi <simon.marchi@efficios.com>
3117
3118 * dwarf2/read.h (struct dwarf2_per_objfile)
3119 <get_type_for_signatured_type, set_type_for_signatured_type>:
3120 New methods.
3121 <m_type_map>: New member.
3122 (struct signatured_type) <type>: Remove.
3123 * dwarf2/read.c
3124 (dwarf2_per_objfile::get_type_for_signatured_type,
3125 dwarf2_per_objfile::set_type_for_signatured_type): New.
3126 (get_signatured_type): Use new methods.
3127
3128 2020-05-27 Tom Tromey <tom@tromey.com>
3129 Simon Marchi <simon.marchi@efficios.com>
3130
3131 * dwarf2/read.h (struct type_unit_group_unshareable): New.
3132 (struct dwarf2_per_objfile) <type_units>: New member.
3133 <get_type_unit_group_unshareable>: New method.
3134 * dwarf2/read.c (struct type_unit_group) <compunit_symtab,
3135 num_symtabs, symtabs>: Remove; move to
3136 type_unit_group_unshareable.
3137 (dwarf2_per_objfile::get_type_unit_group_unshareable): New.
3138 (process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
3139 (dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
3140
3141 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3142
3143 * dwarf2/read.h (struct dwarf2_per_cu_data):
3144 <dwarf2_per_objfile>: Remove.
3145 * dwarf2/read.c (create_cu_from_index_list): Don't assign
3146 dwarf2_per_objfile.
3147 (create_signatured_type_table_from_index): Likewise.
3148 (create_signatured_type_table_from_debug_names): Likewise.
3149 (create_debug_type_hash_table): Likewise.
3150 (fill_in_sig_entry_from_dwo_entry): Likewise.
3151 (create_type_unit_group): Likewise.
3152 (read_comp_units_from_section): Likewise.
3153 (create_cus_hash_table): Likewise.
3154
3155 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3156
3157 * dwarf2/read.c (process_psymtab_comp_unit): Remove reference to
3158 dwarf2_per_cu_data::dwarf2_per_objfile.
3159 (compute_compunit_symtab_includes): Likewise.
3160 (dwarf2_cu::start_symtab): Likewise.
3161
3162 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3163
3164 * dwarf2/read.h (dwarf2_get_die_type): Add dwarf2_per_objfile
3165 parameter.
3166 * dwarf2/read.c (get_die_type_at_offset): Likewise.
3167 (read_namespace_alias): Update.
3168 (lookup_die_type): Update.
3169 (dwarf2_get_die_type): Add dwarf2_per_objfile parameter.
3170 * dwarf2/loc.c (class dwarf_evaluate_loc_desc) <get_base_type>:
3171 Update.
3172 (disassemble_dwarf_expression): Update.
3173
3174 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3175
3176 * dwarf2/read.h (struct dwarf2_queue_item): Add
3177 dwarf2_per_objfile parameter, assign new parameter.
3178 <per_objfile>: New field.
3179 * dwarf2/read.c (free_one_cached_comp_unit): Add
3180 dwarf2_per_objfile parameter.
3181 (queue_comp_unit): Likewise.
3182 (dw2_do_instantiate_symtab): Update.
3183 (process_psymtab_comp_unit): Update.
3184 (maybe_queue_comp_unit): Add dwarf2_per_objfile parameter.
3185 (process_imported_unit_die): Update.
3186 (queue_and_load_dwo_tu): Update.
3187 (follow_die_offset): Update.
3188 (follow_die_sig_1): Update.
3189
3190 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3191
3192 * dwarf2/read.h (struct dwarf2_per_cu_data) <objfile>: Remove.
3193 * dwarf2/read.c (dwarf2_compute_name): Pass per_objfile down.
3194 (read_call_site_scope): Assign per_objfile.
3195 (dwarf2_per_cu_data::objfile): Remove.
3196 * gdbtypes.h (struct call_site) <per_objfile>: New member.
3197 * dwarf2/loc.h (dwarf2_evaluate_loc_desc): Add
3198 dwarf2_per_objfile parameter.
3199 * dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Add
3200 dwarf2_per_objfile parameter.
3201 (dwarf_expr_reg_to_entry_parameter): Add output
3202 dwarf2_per_objfile parameter.
3203 (locexpr_get_frame_base): Update.
3204 (class dwarf_evaluate_loc_desc) <get_tls_address>: Update.
3205 <push_dwarf_reg_entry_value>: Update.
3206 <call_site_to_target_addr>: Update.
3207 (dwarf_entry_parameter_to_value): Add dwarf2_per_objfile
3208 parameter.
3209 (value_of_dwarf_reg_entry): Update.
3210 (rw_pieced_value): Update.
3211 (indirect_synthetic_pointer): Update.
3212 (dwarf2_evaluate_property): Update.
3213 (dwarf2_loc_desc_get_symbol_read_needs): Add dwarf2_per_objfile
3214 parameter.
3215 (locexpr_read_variable): Update.
3216 (locexpr_get_symbol_read_needs): Update.
3217 (loclist_read_variable): Update.
3218
3219 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3220
3221 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
3222 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3223 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
3224 parameter.
3225 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
3226 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3227 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
3228 parameter.
3229 * dwarf2/loc.c (indirect_synthetic_pointer, per_cu_dwarf_call,
3230 sect_variable_value): Add dwarf2_per_objfile parameter.
3231 (class dwarf_evaluate_loc_desc) <dwarf_call,
3232 dwarf_variable_value>: Update.
3233 (fetch_const_value_from_synthetic_pointer): Add
3234 dwarf2_per_objfile parameter.
3235 (fetch_const_value_from_synthetic_pointer): Update.
3236 (coerced_pieced_ref): Update.
3237 (class symbol_needs_eval_context) <dwarf_call,
3238 dwarf_variable_value>: Update.
3239 (dwarf2_compile_expr_to_ax): Update.
3240
3241 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3242
3243 * dwarf2/loc.c (allocate_piece_closure): Add dwarf2_per_objfile
3244 parameter.
3245 (dwarf2_evaluate_loc_desc_full): Update.
3246
3247 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3248
3249 * dwarf2/read.h (dwarf2_read_addr_index): Add dwarf2_per_objfile
3250 parameter.
3251 * dwarf2/read.c (dwarf2_read_addr_index): Likewise.
3252 * dwarf2/loc.c (decode_debug_loclists_addresses): Add
3253 dwarf2_per_objfile parameter.
3254 (decode_debug_loc_dwo_addresses): Likewise.
3255 (dwarf2_find_location_expression): Update.
3256 (class dwarf_evaluate_loc_desc) <get_addr_index>: Update.
3257 (locexpr_describe_location_piece): Add dwarf2_per_objfile
3258 parameter.
3259 (disassemble_dwarf_expression): Add dwarf2_per_objfile
3260 parameter.
3261 (locexpr_describe_location_1): Likewise.
3262 (locexpr_describe_location): Update.
3263
3264 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3265
3266 * dwarf2/read.h (struct dwarf2_per_cu_data) <text_offset>:
3267 Remove.
3268 * dwarf2/read.c (dwarf2_per_cu_data::text_offset): Remove.
3269 * dwarf2/loc.c (dwarf2_find_location_expression): Update.
3270 (dwarf2_compile_property_to_c): Update.
3271 (dwarf2_compile_expr_to_ax): Add dwarf2_per_objfile parameter,
3272 use text offset from objfile.
3273 (locexpr_tracepoint_var_ref): Update.
3274 (locexpr_generate_c_location): Update.
3275 (loclist_describe_location): Update.
3276 (loclist_tracepoint_var_ref): Update.
3277 * dwarf2/compile.h (compile_dwarf_bounds_to_c): Add
3278 dwarf2_per_objfile parameter.
3279 * dwarf2/loc2c.c (do_compile_dwarf_expr_to_c): Likewise,
3280 use text offset from objfile.
3281 (compile_dwarf_expr_to_c): Add dwarf2_per_objfile parameter.
3282
3283 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3284
3285 * dwarf2/expr.h (struct dwarf_expr_context)
3286 <dwarf_expr_context>: Add dwarf2_per_objfile parameter.
3287 <offset>: Remove.
3288 <per_objfile>: New member.
3289 * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
3290 dwarf2_per_objfile parameter. Don't set offset, set
3291 per_objfile.
3292 (dwarf_expr_context::execute_stack_op): Use offset from objfile.
3293 * dwarf2/frame.c (dwarf2_frame_find_fde): Return (by parameter)
3294 a dwarf2_per_objfile object instead of an offset.
3295 (class dwarf_expr_executor) <dwarf_expr_executor>: Add
3296 constructor.
3297 (execute_stack_op): Add dwarf2_per_objfile parameter, pass it
3298 to dwarf2_expr_executor constructor. Don't set offset.
3299 (dwarf2_fetch_cfa_info): Update.
3300 (struct dwarf2_frame_cache) <text_offset>: Remove.
3301 <per_objfile>: New field.
3302 (dwarf2_frame_cache): Update.
3303 (dwarf2_frame_prev_register): Update.
3304 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3305 <dwarf_evaluate_loc_desc>: Add constructor.
3306 (dwarf2_evaluate_loc_desc_full): Update.
3307 (dwarf2_locexpr_baton_eval): Update.
3308 (class symbol_needs_eval_context) <symbol_needs_eval_context>:
3309 Add constructor.
3310 (dwarf2_loc_desc_get_symbol_read_needs): Update.
3311
3312 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3313
3314 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_type,
3315 addr_sized_int_type>: Move to dwarf2_cu.
3316 <int_type>: Move to dwarf2_per_objfile.
3317 (struct dwarf2_per_objfile) <int_type>: Move here.
3318 * dwarf2/read.c (struct dwarf2_cu) <addr_type,
3319 addr_sized_int_type>: Move here.
3320 (read_func_scope): Update.
3321 (read_array_type): Update.
3322 (read_tag_string_type): Update.
3323 (attr_to_dynamic_prop): Update.
3324 (dwarf2_per_cu_data::int_type): Rename to...
3325 (dwarf2_per_objfile::int_type): ... this.
3326 (dwarf2_per_cu_data::addr_sized_int_type): Rename to...
3327 (dwarf2_cu::addr_sized_int_type): ... this.
3328 (read_subrange_type): Update.
3329 (dwarf2_per_cu_data::addr_type): Rename to...
3330 (dwarf2_cu::addr_type): ... this.
3331 (set_die_type): Update.
3332
3333 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3334
3335 * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
3336 data through per_cu->cu.
3337
3338 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3339
3340 * dwarf2/read.c (lookup_dwo_comp_unit): Change
3341 dwarf2_per_cu_data parameter fo dwarf2_cu.
3342 (lookup_dwo_type_unit): Likewise.
3343 (read_cutu_die_from_dwo): Likewise.
3344 (lookup_dwo_unit): Likewise.
3345 (open_and_init_dwo_file): Likewise.
3346 (lookup_dwo_cutu): Likewise.
3347 (lookup_dwo_comp_unit): Likewise.
3348 (lookup_dwo_type_unit): Likewise.
3349 (cutu_reader::init_tu_and_read_dwo_dies): Update.
3350 (cutu_reader::cutu_reader): Update.
3351
3352 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3353
3354 * dwarf2/read.c (process_full_comp_unit): Add dwarf2_per_objfile
3355 parameter.
3356 (process_full_type_unit): Likewise.
3357 (process_queue): Update.
3358
3359 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3360
3361 * dwarf2/read.c (recursively_compute_inclusions): Add
3362 dwarf2_per_objfile parameter.
3363 (compute_compunit_symtab_includes): Likewise.
3364 (process_cu_includes): Update.
3365
3366 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3367
3368 * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
3369 parameter.
3370 (create_type_unit_group): Update.
3371 (process_psymtab_comp_unit_reader): Update.
3372 (build_type_psymtabs_reader): Update.
3373
3374 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3375
3376 * dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
3377 object through m_this_cu->cu.
3378
3379 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3380
3381 * dwarf2/read.c (queue_and_load_dwo_tu): Expect a dwarf2_cu as
3382 the info parameter.
3383 (queue_and_load_all_dwo_tus): Pass per_cu->cu.
3384
3385 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3386
3387 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Add
3388 per_objfile parameter.
3389 (load_full_type_unit): Add per_objfile parameter.
3390 (read_signatured_type): Likewise.
3391 (load_full_comp_unit): Likewise.
3392 (load_cu): Likewise.
3393 (dw2_do_instantiate_symtab): Likewise.
3394 (dw2_get_file_names): Likewise.
3395 (dw2_map_symtabs_matching_filename): Update.
3396 (dw_expand_symtabs_matching_file_matcher): Update.
3397 (dw2_map_symbol_filenames): Update.
3398 (process_psymtab_comp_unit): Add per_objfile parameter.
3399 (build_type_psymtabs_1): Update.
3400 (process_skeletonless_type_unit): Update.
3401 (dwarf2_build_psymtabs_hard): Update.
3402 (load_partial_comp_unit): Add per_objfile parameter.
3403 (scan_partial_symbols): Update.
3404 (load_full_comp_unit): Add per_objfile parameter.
3405 (process_imported_unit_die): Update.
3406 (create_cus_hash_table): Update.
3407 (find_partial_die): Update.
3408 (dwarf2_read_addr_index): Update.
3409 (follow_die_offset): Update.
3410 (dwarf2_fetch_die_loc_sect_off): Update.
3411 (dwarf2_fetch_constant_bytes): Update.
3412 (dwarf2_fetch_die_type_sect_off): Update.
3413 (follow_die_sig_1): Update.
3414 (load_full_type_unit): Add per_objfile parameter.
3415 (read_signatured_type): Likewise.
3416
3417 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3418
3419 * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
3420 of objfile_name.
3421
3422 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3423
3424 * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
3425 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
3426 * dwarf2/read.c (dwarf2_per_bfd::dwarf2_per_bfd): Assign obfd
3427 field.
3428 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
3429 (create_cus_from_index): Update.
3430 (dwarf2_read_gdb_index): Update.
3431 (create_cus_from_debug_names): Update.
3432 (dwarf2_read_debug_names): Update.
3433 (get_abbrev_section_for_cu): Update.
3434 (create_all_comp_units): Update.
3435 (read_attribute_value): Update.
3436 (get_debug_line_section): Update.
3437 * dwarf2/index-cache.c (index_cache::store): Update.
3438 * dwarf2/index-write.c (save_gdb_index_command): Update.
3439 * dwarf2/macro.c (dwarf_decode_macro_bytes): Update.
3440
3441 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3442
3443 * dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
3444 member.
3445 * dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
3446 dwarf2_per_cu_data::per_bfd.
3447 (dwarf2_per_bfd::allocate_signatured_type): Likewise.
3448 (create_type_unit_group): Likewise.
3449 (queue_comp_unit): Remove reference to
3450 per_cu->dwarf2_per_objfile.
3451 (maybe_queue_comp_unit): Likewise.
3452 (fill_in_sig_entry_from_dwo_entry): Assign new field.
3453 (create_cus_hash_table): Assign new field.
3454
3455 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3456
3457 * dwarf2/read.c: Replace
3458 dwarf2_cu->per_cu->dwarf2_per_objfile references with
3459 dwarf2_cu->per_objfile throughout.
3460
3461 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3462
3463 * dwarf2/read.c (dw2_do_instantiate_symtab): Add per_objfile
3464 parameter, don't use per_cu->dwarf2_per_objfile.
3465 (dw2_instantiate_symtab): Likewise.
3466 (dw2_find_last_source_symtab): Update.
3467 (dw2_map_expand_apply): Update.
3468 (dw2_lookup_symbol): Update.
3469 (dw2_expand_symtabs_for_function): Update.
3470 (dw2_expand_all_symtabs): Update.
3471 (dw2_expand_symtabs_with_fullname): Update.
3472 (dw2_expand_symtabs_matching_one): Add per_objfile parameter,
3473 don't use per_cu->dwarf2_per_objfile.
3474 (dw2_expand_marked_cus): Update.
3475 (dw2_find_pc_sect_compunit_symtab): Update.
3476 (dw2_debug_names_lookup_symbol): Update.
3477 (dw2_debug_names_expand_symtabs_for_function): Update.
3478 (dw2_debug_names_map_matching_symbols): Update.
3479 (dwarf2_psymtab::expand_psymtab): Update.
3480
3481 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3482
3483 * dwarf2/read.c (struct dwarf2_cu) <dwarf2_cu>: Add parameter.
3484 <per_objfile>: New member.
3485 (class cutu_reader) <init_tu_and_read_dwo_dies>: Add parameter.
3486 (cutu_reader::init_tu_and_read_dwo_dies): Add parameter, update
3487 call to dwarf2_cu.
3488 (cutu_reader::cutu_reader): Update.
3489 (dwarf2_cu::dwarf2_cu): Add parameter, initialize per_objfile.
3490
3491 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3492
3493 * dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
3494 struct dwarf2_per_objfile.
3495 (struct dwarf2_per_objfile) <die_type_hash>: Move from struct
3496 dwarf2_per_bfd.
3497 * dwarf2/read.c (set_die_type): Update.
3498 (get_die_type_at_offset): Update.
3499
3500 2020-05-27 Tom Tromey <tom@tromey.com>
3501 Simon Marchi <simon.marchi@efficios.com>
3502
3503 * dwarf2/read.h (struct dwarf2_per_bfd) <num_psymtabs>: New
3504 method.
3505 (struct dwarf2_per_objfile) <resize_symtabs, symtab_set_p,
3506 get_symtab, set_symtab>: New methods.
3507 <m_symtabs>: New field.
3508 (struct dwarf2_psymtab): Derive from partial_symtab.
3509 <readin_p, get_compunit_symtab>: Declare methods.
3510 * dwarf2/read.c (dwarf2_per_objfile::symtab_set_p,
3511 dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
3512 New methods.
3513 (struct dwarf2_per_cu_quick_data) <compunit_symtab>: Remove.
3514 (dw2_do_instantiate_symtab, dw2_instantiate_symtab)
3515 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
3516 (dw2_symtab_iter_next, dw2_print_stats)
3517 (dw2_expand_symtabs_with_fullname)
3518 (dw2_expand_symtabs_matching_one)
3519 (dw_expand_symtabs_matching_file_matcher)
3520 (dw2_find_pc_sect_compunit_symtab, dw2_map_symbol_filenames)
3521 (dw2_debug_names_iterator::next)
3522 (dw2_debug_names_map_matching_symbols)
3523 (fill_in_sig_entry_from_dwo_entry, dwarf2_psymtab::read_symtab)
3524 (process_queue, dwarf2_psymtab::expand_psymtab): Update.
3525 (dwarf2_psymtab::readin_p, dwarf2_psymtab::get_compunit_symtab):
3526 New methods.
3527 (get_compunit_symtab, process_full_comp_unit)
3528 (process_full_type_unit): Update.
3529 (dwarf2_build_psymtabs, dwarf2_initialize_objfile, add_type_unit): Call
3530
3531 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3532
3533 * dwarf2/read.h (dwarf2_per_objfile): Rename to dwarf2_per_bfd,
3534 then introduce a new dwarf2_per_objfile type.
3535 <read_line_string>: Move to the new dwarf2_per_objfile type.
3536 <objfile>: Likewise.
3537 (dwarf2_per_bfd): Rename dwarf2_per_objfile to this.
3538 * dwarf2/read.c: Replace references to dwarf2_per_objfile with
3539 dwarf2_per_objfile->per_bfd.
3540 (dwarf2_per_objfile::dwarf2_per_objfile): Rename to...
3541 (dwarf2_per_bfd::dwarf2_per_bfd): ... this.
3542 (dwarf2_per_objfile::free_cached_comp_units): Rename to...
3543 (dwarf2_per_bfd::free_cached_comp_units): ... this.
3544 (dwarf2_has_info): Allocate dwarf2_per_bfd.
3545 (dwarf2_per_objfile::locate_sections): Rename to...
3546 (dwarf2_per_bfd::locate_sections): ... this.
3547 (dwarf2_per_objfile::get_cutu): Rename to...
3548 (dwarf2_per_bfd::get_cutu): ... this.
3549 (dwarf2_per_objfile::get_cu): Rename to...
3550 (dwarf2_per_bfd::get_cu): ... this.
3551 (dwarf2_per_objfile::get_tu): Rename to...
3552 (dwarf2_per_bfd::get_tu): ... this.
3553 (dwarf2_per_objfile::allocate_per_cu): Rename to...
3554 (dwarf2_per_bfd::allocate_per_cu): ... this.
3555 (dwarf2_per_objfile::allocate_signatured_type): Rename to...
3556 (dwarf2_per_bfd::allocate_signatured_type): ... this.
3557 (get_gdb_index_contents_ftype): Change parameter from
3558 dwarf2_per_objfile to dwarf2_per_bfd.
3559 * dwarf2/macro.c, dwarf2/index-write.c: Replace references to
3560 dwarf2_per_objfile with dwarf2_per_objfile->per_bfd.
3561
3562 2020-05-27 Tom Tromey <tom@tromey.com>
3563 Simon Marchi <simon.marchi@efficios.com>
3564
3565 * dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
3566 (allocate_piece_closure): Set "per_objfile" member.
3567 (dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
3568 (locexpr_describe_location, loclist_describe_location): Use new
3569 member.
3570 * dwarf2/read.c (read_call_site_scope)
3571 (mark_common_block_symbol_computed, attr_to_dynamic_prop)
3572 (dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
3573 (fill_in_loclist_baton, dwarf2_symbol_mark_computed,
3574 handle_data_member_location): Set per_objfile member.
3575 * dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
3576 member.
3577 (struct dwarf2_loclist_baton) <per_objfile>: New member.
3578
3579 2020-05-27 Tom Tromey <tom@tromey.com>
3580
3581 * dwarf2/read.h (struct dwarf2_per_objfile) <allocate_per_cu,
3582 allocate_signatured_type>: Declare new methods.
3583 <m_num_psymtabs>: New member.
3584 (struct dwarf2_per_cu_data) <index>: New member.
3585 * dwarf2/read.c (dwarf2_per_objfile::allocate_per_cu)
3586 (dwarf2_per_objfile::allocate_signatured_type): New methods.
3587 (create_cu_from_index_list): Use allocate_per_cu.
3588 (create_signatured_type_table_from_index)
3589 (create_signatured_type_table_from_debug_names)
3590 (create_debug_type_hash_table, add_type_unit)
3591 (read_comp_units_from_section): Use allocate_signatured_type.
3592
3593 2020-05-27 Tom Tromey <tom@tromey.com>
3594
3595 * psymtab.c (partial_map_expand_apply)
3596 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
3597 (psym_lookup_global_symbol_language)
3598 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
3599 (psym_print_stats, psym_expand_symtabs_for_function)
3600 (psym_map_symbol_filenames, psym_map_matching_symbols)
3601 (psym_expand_symtabs_matching)
3602 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
3603 (maintenance_check_psymtabs): Update.
3604 * psympriv.h (struct partial_symtab) <readin_p,
3605 get_compunit_symtab>: Add objfile parameter.
3606 (struct standard_psymtab) <readin_p, get_compunit_symtab>:
3607 Likewise.
3608 * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p,
3609 get_compunit_symtab>: Likewise.
3610 (dwarf2_psymtab::expand_psymtab): Pass objfile argument.
3611
3612 2020-05-27 Tom Tromey <tom@tromey.com>
3613
3614 * dwarf2/read.h (struct dwarf2_per_objfile) <obstack>: New
3615 member.
3616 * dwarf2/read.c (delete_file_name_entry): Fix comment.
3617 (create_cu_from_index_list)
3618 (create_signatured_type_table_from_index)
3619 (create_signatured_type_table_from_debug_names)
3620 (dw2_get_file_names_reader, dwarf2_initialize_objfile)
3621 (dwarf2_create_include_psymtab)
3622 (create_debug_type_hash_table, add_type_unit)
3623 (create_type_unit_group, read_comp_units_from_section)
3624 (dwarf2_compute_name, create_cus_hash_table)
3625 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
3626 (create_dwo_unit_in_dwp_v2, open_and_init_dwp_file): Use new
3627 obstack.
3628 (dw2_get_real_path): Likewise. Change argument to
3629 dwarf2_per_objfile.
3630
3631 2020-05-27 Luis Machado <luis.machado@linaro.org>
3632
3633 PR tdep/26000
3634 * arm-tdep.c (thumb_analyze_prologue): Fix instruction matching
3635 for ldrd (immediate).
3636
3637 2020-05-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3638
3639 * command.h: Add comment giving the name of class_tui.
3640 * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
3641 create the fake command for the help for class_tui.
3642
3643 2020-05-26 Tom Tromey <tromey@adacore.com>
3644
3645 * ada-lang.c (ada_print_array_index): Change type. Call val_atr.
3646 (ada_value_ptr_subscript): Don't call pos_atr on the lower bound.
3647 (val_atr): New function.
3648 (value_val_atr): Use it.
3649 * ada-valprint.c (print_optional_low_bound): Change low bound
3650 handling for enums.
3651 (val_print_packed_array_elements): Don't call discrete_position.
3652 * gdbtypes.c (get_discrete_bounds) <TYPE_CODE_RANGE>: Call
3653 discrete_position for enum types.
3654 * language.c (default_print_array_index): Change type.
3655 * language.h (struct language_defn) <la_print_array_index>: Add
3656 index_type parameter, change type of index_value.
3657 (LA_PRINT_ARRAY_INDEX): Add index_type parameter.
3658 (default_print_array_index): Update.
3659 * valprint.c (maybe_print_array_index): Don't call
3660 value_from_longest. Update.
3661 (value_print_array_elements): Don't call discrete_position.
3662
3663 2020-05-26 Tom Tromey <tromey@adacore.com>
3664
3665 * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE.
3666 * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE.
3667
3668 2020-05-25 Cristiano De Alti <cristiano_dealti@hotmail.com>
3669
3670 PR gdb/13519
3671 * avr-tdep.c (avr_integer_to_address): Return data or code
3672 address accordingly to the second 'type' argument of the
3673 function.
3674
3675 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
3676
3677 * infcmd.c, inferior.h: (construct_inferior_arguments):
3678 Moved function from here to gdbsupport/common-inferior.{h,cc}
3679
3680 2020-05-23 Tom Tromey <tom@tromey.com>
3681
3682 Revert commit eca1f90c:
3683 * NEWS: Remove entry for completion styling.
3684 * completer.c (_rl_completion_prefix_display_length): Move
3685 declaration later.
3686 (gdb_fnprint): Revert.
3687 (gdb_display_match_list_1): Likewise.
3688 * cli/cli-style.c (completion_prefix_style)
3689 (completion_difference_style, completion_suffix_style): Remove.
3690 (_initialize_cli_style): Revert.
3691 * cli/cli-style.h (completion_prefix_style)
3692 (completion_difference_style, completion_suffix_style): Don't
3693 declare.
3694
3695 2020-05-24 Pedro Alves <palves@redhat.com>
3696
3697 * symtab.c (completion_list_add_name): Return boolean indication
3698 of whether the symbol matched.
3699 (completion_list_add_symbol): Don't try to remove C++ aliases if
3700 the symbol didn't match in the first place.
3701 * symtab.h (completion_list_add_name): Return bool.
3702
3703 2020-05-23 Simon Marchi <simon.marchi@polymtl.ca>
3704
3705 * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
3706 type::field.
3707
3708 2020-05-23 Joel Brobecker <brobecker@adacore.com>
3709
3710 GDB 9.2 released.
3711
3712 2020-05-23 Tom Tromey <tom@tromey.com>
3713
3714 * NEWS: Add entry for completion styling.
3715 * completer.c (_rl_completion_prefix_display_length): Move
3716 declaration earlier.
3717 (gdb_fnprint): Use completion_style.
3718 (gdb_display_match_list_1): Likewise.
3719 * cli/cli-style.c (completion_prefix_style)
3720 (completion_difference_style, completion_suffix_style): New
3721 globals.
3722 (_initialize_cli_style): Register new globals.
3723 * cli/cli-style.h (completion_prefix_style)
3724 (completion_difference_style, completion_suffix_style): Declare.
3725
3726 2020-05-23 Pedro Alves <palves@redhat.com>
3727
3728 * utils.c: Include "gdbsupport/gdb-safe-ctype.h".
3729 (parse_escape): Use ISDIGIT instead of isdigit.
3730 (puts_debug): Use gdb_isprint instead of isprint.
3731 (fprintf_symbol_filtered): Use ISALNUM instead of isalnum.
3732 (cp_skip_operator_token, skip_ws, strncmp_iw_with_mode): Use
3733 ISSPACE instead of isspace.
3734 (strncmp_iw_with_mode): Use TOLOWER instead of tolower and ISSPACE
3735 instead of isspace.
3736 (strcmp_iw_ordered): Use ISSPACE instead of isspace.
3737 (string_to_core_addr): Use TOLOWER instead of tolower, ISXDIGIT
3738 instead of isxdigit and ISDIGIT instead of isdigit.
3739
3740 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3741
3742 * gdbtypes.h (struct type) <field>: New method.
3743 (TYPE_FIELDS): Remove, replace all uses with either type::fields
3744 or type::field.
3745
3746 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3747
3748 * gdbtypes.h (struct type) <fields, set_fields>: New methods.
3749 (TYPE_FIELDS): Use type::fields. Change all call sites that
3750 modify the propery to use type::set_fields instead.
3751
3752 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3753
3754 * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
3755 type::num_fields instead.
3756
3757 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3758
3759 * gdbtypes.h (struct type) <num_fields, set_num_fields>: New
3760 methods.
3761 (TYPE_NFIELDS): Use type::num_fields. Change all call sites
3762 that modify the number of fields to use type::set_num_fields
3763 instead.
3764
3765 2020-05-22 Tom Tromey <tromey@adacore.com>
3766
3767 * compile/compile-object-load.h (munmap_list_free): Don't
3768 declare.
3769
3770 2020-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
3771
3772 * annotate.c (annotate_source_line): Update return type, add call
3773 to update current symtab and line.
3774 * annotate.h (annotate_source_line): Update return type, and
3775 extend header comment.
3776 * source.c (info_line_command): Check annotation_level before
3777 calling annotate_source_line.
3778 * stack.c (print_frame_info): If calling annotate_source_line
3779 returns true, then don't print any other source line information.
3780
3781 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
3782
3783 * lm32-tdep.c (lm32_register_reggroup_p): Fix condition.
3784
3785 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
3786
3787 * coffread.c (patch_type): Remove NULL check before xfree.
3788 * corefile.c (set_gnutarget): Likewise.
3789 * cp-abi.c (set_cp_abi_as_auto_default): Likewise.
3790 * exec.c (build_section_table): Likewise.
3791 * remote.c (remote_target::pass_signals): Likewise.
3792 * utils.c (n_spaces): Likewise.
3793 * cli/cli-script.c (document_command): Likewise.
3794 * i386-windows-tdep.c (core_process_module_section): Likewise.
3795 * linux-fork.c (struct fork_info) <~fork_info>: Likewise.
3796
3797 2020-05-20 Simon Marchi <simon.marchi@efficios.com>
3798
3799 * symfile.c (reread_symbols): Clear objfile's section_offsets
3800 vector and section indices, re-compute them by calling
3801 sym_offsets.
3802
3803 2020-05-20 Tom Tromey <tromey@adacore.com>
3804
3805 * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove.
3806 (desc_one_bound, desc_index_type): Compute field name.
3807
3808 2020-05-20 Tom de Vries <tdevries@suse.de>
3809
3810 PR symtab/25833
3811 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index.
3812
3813 2020-05-20 Alan Modra <amodra@gmail.com>
3814
3815 PR 25993
3816 * solib-darwin.c (darwin_bfd_open): Don't strdup pathname for
3817 bfd_set_filename.
3818 * solib-aix.c (solib_aix_bfd_open): Use std::string for name
3819 passed to bfd_set_filename.
3820 * symfile-mem.c (add_vsyscall_page): Likewise for string
3821 passed to symbol_file_add_from_memory.
3822 (symbol_file_add_from_memory): Make name param a const char* and
3823 don't strdup.
3824
3825 2020-05-20 Alan Modra <amodra@gmail.com>
3826
3827 * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename
3828 rather than accessing bfd->filename directly.
3829 * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise,
3830 and use bfd_section_name.
3831 * dwarf2/frame.c (decode_frame_entry): Likewise.
3832 * exec.c (exec_set_section_address): Likewise.
3833 * solib-aix.c (solib_aix_bfd_open): Likewise.
3834 * stap-probe.c (get_stap_base_address): Likewise.
3835 * symfile.c (reread_symbols): Likewise.
3836
3837 2020-05-19 Tom Tromey <tromey@adacore.com>
3838
3839 * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
3840
3841 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3842
3843 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
3844
3845 2020-05-19 Pedro Alves <palves@redhat.com>
3846
3847 * NEWS (set exec-file-mismatch): Adjust entry.
3848 * exec.c: Include "build-id.h".
3849 (validate_exec_file): Try to match build IDs instead of filenames.
3850 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
3851 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
3852 and pass down 'warn_if_slow'.
3853 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
3854 gdb_bfd_open_closure to pass it down.
3855 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
3856
3857 2020-05-19 Pedro Alves <palves@redhat.com>
3858
3859 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
3860 * target.c (target_fileio_open_1): Rename to target_fileio_open
3861 and make extern. Use bool.
3862 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
3863 (target_fileio_read_alloc_1): Adjust.
3864 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
3865 (target_fileio_open_warn_if_slow): Delete declaration.
3866
3867 2020-05-19 Pedro Alves <palves@redhat.com>
3868
3869 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
3870 Adjust all callers.
3871
3872 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
3873
3874 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
3875 whether disp is negative.
3876
3877 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3878
3879 * symfile.h (struct symfile_segment_data)
3880 <~symfile_segment_data>: Remove.
3881 <segment_info>: Change to std::vector.
3882 * symfile.c (default_symfile_segments): Update.
3883 * elfread.c (elf_symfile_segments): Update.
3884
3885 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3886
3887 * symfile.h (struct symfile_segment_data) <struct segment>: New.
3888 <segments>: New.
3889 <segment_bases, segment_sizes>: Remove.
3890 * symfile.c (default_symfile_segments): Update.
3891 * elfread.c (elf_symfile_segments): Update.
3892 * remote.c (remote_target::get_offsets): Update.
3893 * solib-target.c (solib_target_relocate_section_addresses):
3894 Update.
3895
3896 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3897
3898 * symfile.h (struct symfile_segment_data): Initialize fields.
3899 <~symfile_segment_data>: Add.
3900 (symfile_segment_data_up): New.
3901 (struct sym_fns) <sym_segments>: Return a
3902 symfile_segment_data_up.
3903 (default_symfile_segments): Return a symfile_segment_data_up.
3904 (free_symfile_segment_data): Remove.
3905 (get_symfile_segment_data): Return a symfile_segment_data_up.
3906 * symfile.c (default_symfile_segments): Likewise.
3907 (get_symfile_segment_data): Likewise.
3908 (free_symfile_segment_data): Remove.
3909 (symfile_find_segment_sections): Update.
3910 * elfread.c (elf_symfile_segments): Return a
3911 symfile_segment_data_up.
3912 * remote.c (remote_target::get_offsets): Update.
3913 * solib-target.c (solib_target_relocate_section_addresses):
3914 Update.
3915 * symfile-debug.c (debug_sym_segments): Return a
3916 symfile_segment_data_up.
3917
3918 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3919
3920 PR build/25981
3921 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
3922 Hardcode register numbers.
3923
3924 PR build/25981
3925 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
3926 procfs_find_LDT_entry): Remove.
3927 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
3928 procfs_find_LDT_entry): Remove.
3929 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
3930 Remove.
3931
3932 2020-05-17 Pedro Alves <palves@redhat.com>
3933 Andrew Burgess <andrew.burgess@embecosm.com>
3934 Keno Fischer <keno@juliacomputing.com>
3935
3936 PR gdb/25741
3937 * breakpoint.c (build_target_condition_list): Update comments.
3938 (build_target_command_list): Update comments and skip matching
3939 locations.
3940 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
3941 a separate function. Simplify "set breakpoint auto-hw off"
3942 handling.
3943 (insert_breakpoints): Update comment.
3944 (tracepoint_locations_match): New parameter. For breakpoints,
3945 compare location types too, if the caller wants to.
3946 (handle_automatic_hardware_breakpoints): New functions.
3947 (bp_location_is_less_than): Also sort by location type and
3948 hardware breakpoint length.
3949 (update_global_location_list): Handle "set breakpoint auto-hw on"
3950 here.
3951 (update_breakpoint_locations): Ask breakpoint_locations_match to
3952 ignore location types.
3953
3954 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3955
3956 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
3957 type::name instead.
3958
3959 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3960
3961 * gdbtypes.h (struct type) <name, set_name>: New methods.
3962 (TYPE_CODE): Use type::name. Change all call sites used to set
3963 the name to use type::set_name instead.
3964
3965 2020-05-16 Tom Tromey <tom@tromey.com>
3966
3967 * top.c (quit_force): Update.
3968 * infrun.c (handle_no_resumed): Update.
3969 * top.h (all_uis): New function.
3970 (ALL_UIS): Remove.
3971
3972 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3973
3974 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
3975
3976 2020-05-16 Pedro Alves <palves@redhat.com>
3977
3978 * ia64-linux-nat.c
3979 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
3980 Declare method.
3981 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
3982
3983 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
3984
3985 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
3986 (sparc64_adi_info): Likewise.
3987
3988 2020-05-15 Tom Tromey <tom@tromey.com>
3989
3990 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
3991 block_objfile.
3992 (lookup_objfile_from_block): Remove.
3993 (lookup_symbol_in_block, lookup_symbol_in_static_block)
3994 (lookup_global_symbol): Use block_objfile.
3995 * symtab.h (lookup_objfile_from_block): Don't declare.
3996 * printcmd.c (clear_dangling_display_expressions): Use
3997 block_objfile.
3998 * parse.c (operator_check_standard): Use block_objfile.
3999
4000 2020-05-15 Tom Tromey <tom@tromey.com>
4001
4002 * language.c (language_alloc_type_symbol): Set
4003 SYMBOL_SECTION.
4004 * symtab.c (initialize_objfile_symbol): Remove.
4005 (allocate_symbol): Remove.
4006 (allocate_template_symbol): Remove.
4007 * dwarf2/read.c (fixup_go_packaging): Use "new".
4008 (new_symbol): Use "new".
4009 (read_variable): Don't call initialize_objfile_symbol. Use
4010 "new".
4011 (read_func_scope): Use "new".
4012 * xcoffread.c (process_xcoff_symbol): Don't call
4013 initialize_objfile_symbol.
4014 (SYMBOL_DUP): Remove.
4015 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
4016 "new".
4017 * symtab.h (allocate_symbol, initialize_objfile_symbol)
4018 (allocate_template_symbol): Don't declare.
4019 (struct symbol): Add copy constructor. Change defaults.
4020 * jit.c (finalize_symtab): Use "new".
4021 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
4022 Use "new".
4023 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
4024 (common_block_end): Use "new".
4025 * mdebugread.c (parse_symbol): Use "new".
4026 (new_symbol): Likewise.
4027
4028 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4029
4030 * NEWS: Mention changes to help and apropos.
4031
4032 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4033
4034 * command.h (enum command_class): Improve comments, document
4035 that class_alias is for user-defined aliases, give the class
4036 name for each class, remove unused class_xdb.
4037 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
4038 * breakpoint.c (_initialize_breakpoint): Replace class_alias
4039 by a precise class.
4040 * infcmd.c (_initialize_infcmd): Likewise.
4041 * reverse.c (_initialize_reverse): Likewise.
4042 * stack.c (_initialize_stack): Likewise.
4043 * symfile.c (_initialize_symfile): Likewise.
4044 * tracepoint.c (_initialize_tracepoint): Likewise.
4045
4046 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4047
4048 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
4049 when their aliased command is traversed.
4050 (help_cmd): Add fput_command_names_styled call to
4051 output command name and aliases when command has an alias.
4052
4053 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4054
4055 * cli/cli-decode.h (help_cmd_list): Remove declaration.
4056 * cli/cli-decode.c (help_cmd_list): Declare as static,
4057 remove prefix argument, use bool for recurse arg, rework to show the aliases of
4058 a command together with the command.
4059 (fput_command_name_styled, fput_command_names_styled): New functions.
4060 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
4061 fput_command_name_styled.
4062 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
4063 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
4064
4065 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4066
4067 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
4068 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
4069 * command.h (cmd_show_list): Likewise.
4070 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
4071 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
4072
4073 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4074
4075 * unittests/command-def-selftests.c (traverse_command_structure):
4076 Verify all commands of a list have the same prefix command and
4077 that only the top cmdlist commands have a null prefix.
4078
4079 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4080
4081 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
4082 as prefix, not one of its aliases.
4083 (set_cmd_prefix): Remove.
4084 (do_add_cmd): Centralize the setting of the prefix of a command, when
4085 command is defined after its full chain of prefix commands.
4086 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
4087 (add_setshow_cmd_full): Likewise.
4088 (update_prefix_field_of_prefixed_commands): New function.
4089 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
4090 update_prefix_field_of_prefixed_commands.
4091 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
4092 addresses of remote_set_cmdlist and remote_show_cmdlist given
4093 as argument, not the address of an argument.
4094 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
4095 * gdb/remote.c (_initialize_remote): Likewise.
4096
4097 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4098
4099 * cli/cli-cmds.c (alias_command): Check for an existing alias
4100 using lookup_cmd_composition, as valid_command_p is too strict
4101 and forbids aliases that are the prefix of an existing alias
4102 or command.
4103 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
4104 command is properly recognised as a valid command.
4105
4106 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4107
4108 * unittests/help-doc-selftests.c: Rename to
4109 unittests/command-def-selftests.c
4110 * unittests/command-def-selftests.c (help_doc_tests): Update some
4111 comments.
4112 (command_structure_tests, traverse_command_structure): New namespace
4113 and function.
4114 (command_structure_invariants_tests): New function.
4115 (_initialize_command_def_selftests) Renamed from
4116 _initialize_help_doc_selftests, register command_structure_invariants
4117 selftest.
4118
4119 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4120
4121 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
4122 an alias of 'show'.
4123
4124 2020-05-15 Joel Brobecker <brobecker@adacore.com>
4125
4126 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
4127 ada_is_fixed_point_type. Update all callers.
4128 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
4129 all callers.
4130 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
4131 Update all callers.
4132 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
4133 print_fixed_point_type. Update all callers.
4134 * ada-valprint.c (ada_value_print_num): Replace call to
4135 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
4136
4137 2020-05-14 Kevin Buettner <kevinb@redhat.com>
4138
4139 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
4140 processors.
4141 (cpu_supports_bts): Add CV_AMD case.
4142
4143 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
4144 Simon Marchi <simon.marchi@efficios.com>
4145
4146 * infrun.c (stop_all_threads): Collect multiple wait events at
4147 each pass.
4148
4149 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
4150
4151 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
4152 type::code instead.
4153
4154 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
4155
4156 * gdbtypes.h (struct type) <code, set_code>: New methods.
4157 (TYPE_CODE): Use type::code. Change all call sites used to set
4158 the code to use type::set_code instead.
4159
4160 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4161 Tom de Vries <tdevries@suse.de>
4162 Pedro Alves <palves@redhat.com>
4163
4164 PR threads/25478
4165 * infrun.c (stop_all_threads): Do NOT ignore
4166 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
4167 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
4168 received.
4169 (handle_no_resumed): Remove code handling a live inferior with no
4170 threads.
4171 * remote.c (has_single_non_exited_thread): New.
4172 (remote_target::update_thread_list): Do not delete a thread if is
4173 the last thread of the process.
4174 * thread.c (thread_select): Call delete_exited_threads instead of
4175 prune_threads.
4176
4177 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4178
4179 * infrun.c (stop_all_threads): Enable/disable thread events of all
4180 targets. Move a debug message denoting the end of the function
4181 into the SCOPED_EXIT block.
4182
4183 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4184
4185 * process-stratum-target.h: Include <set>.
4186 (all_non_exited_process_targets, switch_to_target_no_thread): New
4187 function declarations.
4188 * process-stratum-target.c (all_non_exited_process_targets)
4189 (switch_to_target_no_thread): New function implementations.
4190
4191 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4192
4193 * infrun.c (handle_inferior_event): Extract out a piece of code
4194 into...
4195 (mark_non_executing_threads): ...this new function.
4196
4197 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4198
4199 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
4200 use.
4201
4202 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4203
4204 * regcache.c (regcache_read_pc_protected): New function
4205 implementation that returns 0 if the PC cannot read via
4206 'regcache_read_pc'.
4207 * infrun.c (proceed): Call 'regcache_read_pc_protected'
4208 instead of 'regcache_read_pc'.
4209 (keep_going_pass_signal): Ditto.
4210
4211 2020-05-13 Tom Tromey <tromey@adacore.com>
4212
4213 * ada-lang.c (align_value): Remove.
4214 (ada_template_to_fixed_record_type_1): Use align_up.
4215
4216 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4217
4218 * async-event.c: Update the copyright year.
4219 * async-event.h: Update the copyright year.
4220
4221 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
4222
4223 * objfiles.h (is_addr_in_objfile,
4224 shared_objfile_contains_address_p): Return bool.
4225 * objfile.c (is_addr_in_objfile,
4226 shared_objfile_contains_address_p): Return bool.
4227
4228 2020-05-11 Tom Tromey <tromey@adacore.com>
4229
4230 * cli/cli-cmds.c (info_command): Restore.
4231 (_initialize_cli_cmds): Use add_prefix_command for "info".
4232 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
4233
4234 2020-05-11 Tom Tromey <tromey@adacore.com>
4235
4236 * ada-lang.c (ada_value_primitive_field): Now public.
4237 * ada-lang.h (ada_value_primitive_field): Declare.
4238 * ada-valprint.c (print_field_values): Use
4239 ada_value_primitive_field for wrapper fields.
4240
4241 2020-05-11 Tom de Vries <tdevries@suse.de>
4242
4243 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
4244 MODULE_DOMAIN.
4245
4246 2020-05-11 Tom de Vries <tdevries@suse.de>
4247
4248 PR symtab/25941
4249 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
4250 with length 0, if not gdb-produced.
4251 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
4252
4253 2020-05-09 Tom de Vries <tdevries@suse.de>
4254
4255 PR gdb/25955
4256 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
4257 calculation.
4258
4259 2020-05-09 Tom Tromey <tom@tromey.com>
4260
4261 * top.c (server_command): Now bool.
4262 * top.h (server_command): Now bool.
4263
4264 2020-05-08 Tom Tromey <tromey@adacore.com>
4265
4266 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
4267 already being processed.
4268
4269 2020-05-08 Tom Tromey <tom@tromey.com>
4270
4271 * printcmd.c (struct display) <next>: Remove.
4272 <display>: New constructor.
4273 <exp_string>: Now a std::string.
4274 <enabled_p>: Now a bool.
4275 (display_number): Move definition earlier.
4276 (displays): Rename from display_chain. Now a std::vector.
4277 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
4278 (display_command): Update.
4279 (do_one_display, disable_display)
4280 (enable_disable_display_command, do_enable_disable_display):
4281 Update.
4282 (free_display): Remove.
4283 (clear_displays): Rewrite.
4284 (delete_display): Update.
4285 (map_display_numbers): Use function_view. Remove "data"
4286 parameter. Update.
4287 (do_delete_display): Remove.
4288 (undisplay_command): Update.
4289 (do_one_display, do_displays, disable_display)
4290 (info_display_command): Update.
4291 (do_enable_disable_display): Remove.
4292 (enable_disable_display_command)
4293 (clear_dangling_display_expressions): Update.
4294
4295 2020-05-08 Tom Tromey <tom@tromey.com>
4296
4297 * symtab.c (set_symbol_cache_size)
4298 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
4299 (maintenance_print_symbol_cache_statistics): Update.
4300 * symmisc.c (print_symbol_bcache_statistics)
4301 (print_objfile_statistics, maintenance_print_objfiles)
4302 (maintenance_info_symtabs, maintenance_check_symtabs)
4303 (maintenance_expand_symtabs, maintenance_info_line_tables):
4304 Update.
4305 * symfile-debug.c (set_debug_symfile): Update.
4306 * source.c (forget_cached_source_info): Update.
4307 * python/python.c (gdbpy_progspaces): Update.
4308 * psymtab.c (maintenance_info_psymtabs): Update.
4309 * probe.c (parse_probes): Update.
4310 * linespec.c (iterate_over_all_matching_symtabs)
4311 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
4312 * guile/scm-progspace.c (gdbscm_progspaces): Update.
4313 * exec.c (exec_target::close): Update.
4314 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
4315 * breakpoint.c (print_one_breakpoint_location)
4316 (create_longjmp_master_breakpoint)
4317 (create_std_terminate_master_breakpoint): Update.
4318 * progspace.c (program_spaces): Now a std::vector.
4319 (maybe_new_address_space): Update.
4320 (add_program_space): Remove.
4321 (program_space::program_space): Update.
4322 (remove_program_space): Update.
4323 (number_of_program_spaces): Remove.
4324 (print_program_space, update_address_spaces): Update.
4325 * progspace.h (program_spaces): Change type.
4326 (ALL_PSPACES): Remove.
4327 (number_of_program_spaces): Don't declare.
4328 (struct program_space) <next>: Remove.
4329
4330 2020-05-08 Tom Tromey <tom@tromey.com>
4331
4332 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
4333 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
4334 (enable_break): Update.
4335 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
4336 (frv_fdpic_find_canonical_descriptor): Update.
4337 (frv_fetch_objfile_link_map): Update.
4338 * progspace.c (program_space::free_all_objfiles): Update.
4339 (program_space::solibs): New method.
4340 * progspace.h (struct program_space) <solibs>: New method.
4341 * solist.h (master_so_list): Don't declare.
4342 (ALL_SO_LIBS): Remove.
4343 * solib.h (so_list_head): Remove.
4344 (update_solib_list): Update comment.
4345 * solib.c (master_so_list): Remove.
4346 (solib_used, update_solib_list, solib_add)
4347 (info_sharedlibrary_command, clear_solib)
4348 (reload_shared_libraries_1, remove_user_added_objfile): Update.
4349
4350 2020-05-08 Tom Tromey <tom@tromey.com>
4351
4352 * extension.c (extension_languages): Now a std::array.
4353 (ALL_EXTENSION_LANGUAGES): Remove.
4354 (get_ext_lang_defn, get_ext_lang_of_file)
4355 (eval_ext_lang_from_control_command): Update.
4356 (finish_ext_lang_initialization)
4357 (auto_load_ext_lang_scripts_for_objfile)
4358 (ext_lang_type_printers::ext_lang_type_printers)
4359 (apply_ext_lang_type_printers)
4360 (ext_lang_type_printers::~ext_lang_type_printers)
4361 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
4362 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
4363 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
4364 (get_matching_xmethod_workers, ext_lang_colorize)
4365 (ext_lang_before_prompt): Update.
4366 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
4367
4368 2020-05-08 Tom Tromey <tom@tromey.com>
4369
4370 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
4371 overload.
4372 <swap_string, m_string>: Remove.
4373 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
4374 Update.
4375 * stabsread.c (define_symbol, read_type): Update.
4376 * linespec.c (find_linespec_symbols): Update.
4377 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
4378 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
4379 * dbxread.c (read_dbx_symtab): Update.
4380 * cp-support.h (cp_canonicalize_string_full)
4381 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
4382 Return unique_xmalloc_ptr.
4383 * cp-support.c (inspect_type): Update.
4384 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
4385 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
4386 Likewise.
4387 * c-typeprint.c (print_name_maybe_canonical): Update.
4388 * break-catch-throw.c (check_status_exception_catchpoint):
4389 Update.
4390
4391 2020-05-08 Tom de Vries <tdevries@suse.de>
4392
4393 * infrun.c (follow_fork): Copy current_line and current_symtab to
4394 child thread.
4395
4396 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4397
4398 * async-event.c (struct async_signal_handler, struct
4399 async_event_handler): Reformat, remove typedef.
4400
4401 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4402
4403 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
4404 access thistype->main_type->dyn_prop_list directly.
4405
4406 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4407
4408 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
4409 (remove_dyn_prop): Remove. Update all users to use
4410 type::remove_dyn_prop.
4411 * gdbtypes.c (remove_dyn_prop): Rename to...
4412 (type::remove_dyn_prop): ... this.
4413
4414 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
4415
4416 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
4417 (add_dyn_prop): Remove. Update all users to use
4418 type::add_dyn_prop.
4419 * gdbtypes.c (add_dyn_prop): Rename to...
4420 (type::add_dyn_prop): ... this.
4421
4422 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4423
4424 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
4425 (get_dyn_prop): Remove. Update all users to use
4426 type::dyn_prop.
4427 * gdbtypes.c (get_dyn_prop): Rename to...
4428 (type::dyn_prop): ... this.
4429
4430 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
4431
4432 * gdbtypes.h (struct main_type) <flag_static>: Remove.
4433
4434 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
4435
4436 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
4437 instruction, skip it if it's there.
4438
4439 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
4440
4441 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
4442
4443 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
4444
4445 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
4446 * gdbtypes.c (recursive_dump_type): Remove use of
4447 TYPE_INCOMPLETE.
4448
4449 2020-05-03 Tom Tromey <tom@tromey.com>
4450
4451 * breakpoint.c (catch_command, tcatch_command): Remove.
4452 (_initialize_breakpoint): Use add_basic_prefix_cmd,
4453 add_show_prefix_cmd.
4454 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
4455 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4456 Remove.
4457 (add_internal_problem_command): Use add_basic_prefix_cmd,
4458 add_show_prefix_cmd.
4459 * mips-tdep.c (set_mipsfpu_command): Remove.
4460 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
4461 * dwarf2/index-cache.c (set_index_cache_command): Remove.
4462 (_initialize_index_cache): Use add_basic_prefix_cmd.
4463 * memattr.c (dummy_cmd): Remove.
4464 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
4465 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
4466 (_initialize_tui_win): Use add_basic_prefix_cmd,
4467 add_show_prefix_cmd.
4468 * cli/cli-logging.c (set_logging_command): Remove.
4469 (_initialize_cli_logging): Use add_basic_prefix_cmd,
4470 add_show_prefix_cmd.
4471 (show_logging_command): Remove.
4472 * target.c (target_command): Remove.
4473 (add_target): Use add_basic_prefix_cmd.
4474
4475 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
4476
4477 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
4478
4479 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4480
4481 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
4482 info_command.
4483
4484 2020-04-30 Kamil Rytarowski <n54@gmx.com>
4485
4486 * nbsd-nat.c (nbsd_enable_proc_events)
4487 (nbsd_nat_target::post_startup_inferior): Add.
4488 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
4489 (nbsd_nat_target::update_thread_list): Rewrite.
4490 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
4491 "PTRACE_LWP_CREATE".
4492 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
4493
4494 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4495
4496 * stack.c (_initialize_stack): Remove duplicated creation
4497 of "frame" command and "f" alias.
4498
4499 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
4500
4501 PR gdb/18706
4502 * gdbtypes.c (check_typedef): Calculate size of array of
4503 stubbed type.
4504
4505 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
4506
4507 PR gdb/15559
4508 * i386-tdep.c (i386_push_dummy_call): Call
4509 i386_thiscall_push_dummy_call.
4510 (i386_thiscall_push_dummy_call): New function.
4511 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
4512 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
4513 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
4514
4515 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4516
4517 * gdbarch.sh (do_read): Add shellcheck disable directive for
4518 warning SC2162.
4519
4520 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4521
4522 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
4523 "referenced but not assigned" warning.
4524
4525 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4526
4527 * gdbarch.sh: Remove code that sets fallbackdefault.
4528
4529 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4530
4531 * gdbarch.sh: Use shell operators && and || instead of
4532 -a and -o.
4533
4534 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4535
4536 * gdbarch.sh: Use $(...) instead of `...`.
4537
4538 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4539
4540 * gdbarch.sh: Use double quotes around variables.
4541
4542 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4543
4544 * gdbarch.sh: Use %s with printf, instead of variables in the
4545 format string.
4546
4547 2020-04-29 Tom Tromey <tromey@adacore.com>
4548
4549 PR ada/25875:
4550 * dwarf2/read.c (update_enumeration_type_from_children): Compute
4551 type fields here.
4552 (read_enumeration_type): Call
4553 update_enumeration_type_from_children later. Update comments.
4554 (process_enumeration_scope): Don't create type fields.
4555
4556 2020-04-29 Kamil Rytarowski <n54@gmx.com>
4557
4558 * nbsd-tdep.c: Include "xml-syscall.h".
4559 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
4560
4561 2020-04-29 Kamil Rytarowski <n54@gmx.com>
4562
4563 * nbsd-nat.c: Include "sys/wait.h".
4564 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
4565 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
4566 (nbsd_nat_target::remove_exec_catchpoint)
4567 (nbsd_nat_target::set_syscall_catchpoint): Add.
4568 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
4569 (nbsd_nat_target::insert_exec_catchpoint)
4570 (nbsd_nat_target::remove_exec_catchpoint)
4571 (nbsd_nat_target::set_syscall_catchpoint): Add.
4572 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
4573 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
4574 `nbsd_get_syscall_number'.
4575
4576 2020-04-29 Tom Tromey <tom@tromey.com>
4577
4578 * stack.c (print_block_frame_labels): Remove.
4579
4580 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
4581
4582 PR gdb/17320
4583 * ada-valprint.c (val_print_packed_array_elements): Move array
4584 end bracket to new line.
4585 (ada_val_print_string): Remove extra spaces before first array
4586 element.
4587 * c-valprint.c (c_value_print_array): Likewise.
4588 * m2-valprint.c (m2_print_array_contents): Likewise.
4589 (m2_value_print_inner): Likewise.
4590 * p-valprint.c (pascal_value_print_inner): Likewise.
4591 * valprint.c (generic_val_print_array): Likewise.
4592 (value_print_array_elements): Move first array element and array
4593 end bracket to new line.
4594
4595 2020-04-29 Tom de Vries <tdevries@suse.de>
4596
4597 PR symtab/25889
4598 * linespec.c (find_method): Fix ix calculation.
4599
4600 2020-04-28 Kamil Rytarowski <n54@gmx.com>
4601
4602 * syscalls/update-netbsd.sh: New file.
4603 * syscalls/netbsd.xml: Regenerate.
4604 * data-directory/Makefile.in: Register `netbsd.xml' in
4605 `SYSCALLS_FILES'.
4606
4607 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
4608
4609 * syscalls/update-freebsd.sh: Add double quotes.
4610
4611 2020-04-28 Tom Tromey <tom@tromey.com>
4612
4613 * NEWS: Update.
4614 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
4615 (cmdpy_init): Allow class_tui.
4616
4617 2020-04-28 Mark Williams <mark@myosotissp.com>
4618
4619 PR gdb/24480
4620 * dwarf2read.c: Add missing assingments to list_in_scope when
4621 start_symtab was already called.
4622
4623 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
4624
4625 PR gdb/25881
4626 * dwarf2/read.c (offset_map_type): Use
4627 gdb:hash_enum<sect_offset> as hash function.
4628
4629 2020-04-28 Tom de Vries <tdevries@suse.de>
4630
4631 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
4632 with DW_AT_signature.
4633
4634 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
4635
4636 * configure.ac: Remove check for fs_base/gs_base in
4637 user_regs_struct.
4638 * configure: Re-generate.
4639 * config.in: Re-generate.
4640 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
4641 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
4642 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
4643
4644 2020-04-27 Luis Machado <luis.machado@linaro.org>
4645
4646 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
4647 problematic inline frame unwinding situation.
4648 * frame.c (frame_id_computed_p): New function.
4649 * frame.h (frame_id_computed_p): New prototype.
4650
4651 2020-04-26 Tom Tromey <tom@tromey.com>
4652
4653 * command.h (enum command_class) <class_pseudo>: Remove.
4654
4655 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4656
4657 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
4658 and whitespace.
4659
4660 2020-04-25 Kamil Rytarowski <n54@gmx.com>
4661
4662 * inf-ptrace.c (inf_ptrace_target::wait): Remove
4663 `PT_GET_PROCESS_STATE' block.
4664
4665 2020-04-24 Tom Tromey <tom@tromey.com>
4666
4667 * symtab.h (symbol_get_demangled_name): Don't declare.
4668 * symtab.c (symbol_get_demangled_name): Remove.
4669 (general_symbol_info::natural_name)
4670 (general_symbol_info::demangled_name): Update.
4671
4672 2020-04-24 Tom Tromey <tom@tromey.com>
4673
4674 PR rust/25025:
4675 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
4676
4677 2020-04-24 Tom Tromey <tom@tromey.com>
4678
4679 PR symtab/12707:
4680 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
4681 exists.
4682 (new_symbol): Likewise.
4683 * compile/compile-object-load.c (get_out_value_type): Use
4684 symbol_matches_search_name.
4685
4686 2020-04-24 Tom Tromey <tom@tromey.com>
4687
4688 * dwarf2/read.c (add_partial_symbol): Do not call
4689 compute_and_set_names.
4690
4691 2020-04-24 Tom Tromey <tom@tromey.com>
4692
4693 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
4694 overload.
4695
4696 2020-04-24 Tom Tromey <tom@tromey.com>
4697
4698 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
4699 (add_psymbol_to_list): New overload. Make old overload call new
4700 one.
4701 * psympriv.h (add_psymbol_to_list): New overload.
4702
4703 2020-04-24 Tom Tromey <tom@tromey.com>
4704
4705 * dwarf2/read.c (partial_die_info::read) <case
4706 DW_AT_linkage_name>: Use value_as_string.
4707 (dwarf2_string_attr): Use value_as_string.
4708 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
4709 method.
4710 * dwarf2/attribute.c (attribute::value_as_string): New method.
4711
4712 2020-04-24 Tom Tromey <tom@tromey.com>
4713
4714 * symtab.c (general_symbol_info::natural_name)
4715 (general_symbol_info::demangled_name): Check for language_rust.
4716
4717 2020-04-24 Tom Tromey <tom@tromey.com>
4718
4719 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
4720 (dwarf2_physname): ... from here.
4721 (partial_die_info::read): Add Rust "{" hack.
4722
4723 2020-04-24 Tom Tromey <tom@tromey.com>
4724
4725 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
4726 method.
4727 (symbol_set_demangled_name): Don't declare.
4728 * symtab.c (general_symbol_info::set_demangled_name): Rename from
4729 symbol_set_demangled_name.
4730 (general_symbol_info::set_language)
4731 (general_symbol_info::compute_and_set_names): Update.
4732 * minsyms.c (minimal_symbol_reader::install): Update.
4733 * dwarf2/read.c (new_symbol): Update.
4734
4735 2020-04-24 Tom Tromey <tromey@adacore.com>
4736
4737 PR python/23662:
4738 * python/py-type.c (convert_field): Handle
4739 FIELD_LOC_KIND_DWARF_BLOCK.
4740 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
4741 (typy_get_dynamic): Nw function.
4742 (type_object_getset): Add "dynamic".
4743 * NEWS: Add entry.
4744
4745 2020-04-24 Tom Tromey <tromey@adacore.com>
4746
4747 * ada-typeprint.c (print_choices, print_variant_part)
4748 (print_record_field_types_dynamic): New functions.
4749 (print_record_field_types): Use print_record_field_types_dynamic.
4750
4751 2020-04-24 Tom Tromey <tromey@adacore.com>
4752
4753 * dwarf2/read.c (handle_data_member_location): New overload.
4754 (dwarf2_add_field): Use it.
4755 (decode_locdesc): Add "computed" parameter. Update comment.
4756 * gdbtypes.c (is_dynamic_type_internal): Also look for
4757 FIELD_LOC_KIND_DWARF_BLOCK.
4758 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
4759 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
4760 virtual base classes.
4761 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
4762 FIELD_LOC_KIND_DWARF_BLOCK.
4763
4764 2020-04-24 Tom Tromey <tromey@adacore.com>
4765
4766 * dwarf2/read.c (read_structure_type): Handle dynamic length.
4767 * gdbtypes.c (is_dynamic_type_internal): Check
4768 TYPE_HAS_DYNAMIC_LENGTH.
4769 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
4770 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
4771 New macros.
4772 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
4773 constant.
4774
4775 2020-04-24 Tom Tromey <tromey@adacore.com>
4776
4777 * dwarf2/read.c (struct variant_field): Rewrite.
4778 (struct variant_part_builder): New.
4779 (struct nextfield): Remove "variant" field. Add "offset".
4780 (struct field_info): Add "current_variant_part" and
4781 "variant_parts".
4782 (alloc_discriminant_info): Remove.
4783 (alloc_rust_variant): New function.
4784 (quirk_rust_enum): Update.
4785 (dwarf2_add_field): Set "offset" member. Don't handle
4786 DW_TAG_variant_part.
4787 (offset_map_type): New typedef.
4788 (convert_variant_range, create_one_variant)
4789 (create_one_variant_part, create_variant_parts)
4790 (add_variant_property): New functions.
4791 (dwarf2_attach_fields_to_type): Call add_variant_property.
4792 (read_structure_type): Don't handle DW_TAG_variant_part.
4793 (handle_variant_part, handle_variant): New functions.
4794 (handle_struct_member_die): Use them.
4795 (process_structure_scope): Don't handle variant parts.
4796 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
4797 (struct discriminant_info): Remove.
4798 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
4799 (struct main_type) <flag_discriminated_union>: Remove.
4800 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
4801 (rust_enum_variant): Return int. Remove "contents". Rewrite.
4802 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
4803 Update.
4804 * valops.c (value_union_variant): Remove.
4805 * value.h (value_union_variant): Don't declare.
4806
4807 2020-04-24 Tom Tromey <tromey@adacore.com>
4808
4809 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
4810 (ada_value_primitive_packed_val): Update.
4811 * ada-valprint.c (ada_value_print_1): Update.
4812 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
4813 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
4814 just an address. Use evaluate_for_locexpr_baton.
4815 (dwarf2_evaluate_property): Update.
4816 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
4817 array_view.
4818 * findvar.c (default_read_var_value): Update.
4819 * gdbtypes.c (compute_variant_fields_inner)
4820 (resolve_dynamic_type_internal): Update.
4821 (resolve_dynamic_type): Change type of valaddr parameter.
4822 * gdbtypes.h (resolve_dynamic_type): Update.
4823 * valarith.c (value_subscripted_rvalue): Update.
4824 * value.c (value_from_contents_and_address): Update.
4825
4826 2020-04-24 Tom Tromey <tromey@adacore.com>
4827
4828 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
4829 "push_initial_value" parameter.
4830 (dwarf2_evaluate_property): Likewise.
4831 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
4832
4833 2020-04-24 Tom Tromey <tromey@adacore.com>
4834
4835 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
4836 (variant::matches, compute_variant_fields_recurse)
4837 (compute_variant_fields_inner, compute_variant_fields): New
4838 functions.
4839 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
4840 Use resolved_type after type is made.
4841 (operator==): Add new cases.
4842 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
4843 (struct discriminant_range, struct variant, struct variant_part):
4844 New.
4845 (union dynamic_prop_data) <variant_parts, original_type>: New
4846 members.
4847 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
4848 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
4849 constants.
4850 * value.c (unpack_bits_as_long): Now public.
4851 * value.h (unpack_bits_as_long): Declare.
4852
4853 2020-04-24 Tom Tromey <tromey@adacore.com>
4854
4855 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
4856 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
4857
4858 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
4859
4860 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
4861
4862 2020-04-24 Kamil Rytarowski <n54@gmx.com>
4863
4864 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
4865 (remove_fork_catchpoint, post_startup_inferior)
4866 (post_attach): Move...
4867 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
4868 (remove_fork_catchpoint, post_startup_inferior)
4869 (post_attach): ...here.
4870 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
4871 (remove_fork_catchpoint, post_startup_inferior)
4872 (post_attach): Move...
4873 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
4874 (remove_fork_catchpoint, post_startup_inferior)
4875 (post_attach): ...here.
4876
4877 2020-04-24 Tom Tromey <tromey@adacore.com>
4878
4879 * nat/windows-nat.h (struct windows_thread_info)
4880 <pc_adjusted>: New member.
4881 * windows-nat.c (windows_fetch_one_register): Check
4882 pc_adjusted.
4883 (windows_nat_target::get_windows_debug_event)
4884 (windows_nat_target::wait): Set pc_adjusted.
4885
4886 2020-04-24 Tom de Vries <tdevries@suse.de>
4887
4888 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
4889 Run gdb-add-index inside temp dir.
4890
4891 2020-04-23 Tom Tromey <tromey@adacore.com>
4892
4893 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
4894 in loop.
4895
4896 2020-04-23 Luis Machado <luis.machado@linaro.org>
4897
4898 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
4899 get_frame_register instead of gdbarch_unwind_pc.
4900
4901 2020-04-23 Tom de Vries <tdevries@suse.de>
4902
4903 * symtab.c (lookup_global_symbol): Prefer def over decl.
4904
4905 2020-04-23 Tom de Vries <tdevries@suse.de>
4906
4907 PR symtab/25807
4908 * block.c (best_symbol, better_symbol): Promote to external.
4909 * block.h (best_symbol, better_symbol): Declare.
4910 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
4911 decl.
4912
4913 2020-04-23 Tom Tromey <tromey@adacore.com>
4914
4915 PR ada/25837:
4916 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
4917 "const char *", not a "const std::string &".
4918 <name_and_matcher::operator==>: Update.
4919 * unittests/lookup_name_info-selftests.c: Change type of
4920 "result".
4921
4922 2020-04-23 Tom Tromey <tom@tromey.com>
4923
4924 * inferior.h (iterate_over_inferiors): Don't declare.
4925 * inferior.c (iterate_over_inferiors): Remove.
4926 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
4927 Remove.
4928 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
4929 use iterate_over_inferiors.
4930 (darwin_resume_inferior_it)
4931 (struct resume_inferior_threads_param)
4932 (darwin_resume_inferior_threads_it): Remove.
4933 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
4934
4935 2020-04-23 Tom de Vries <tdevries@suse.de>
4936
4937 * blockframe.c (find_pc_partial_function): Use
4938 find_pc_sect_compunit_symtab rather than
4939 objfile->sf->qf->find_pc_sect_compunit_symtab.
4940
4941 2020-04-22 Tom de Vries <tdevries@suse.de>
4942
4943 PR symtab/25764
4944 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
4945 in psymtabs.
4946
4947 2020-04-22 Tom de Vries <tdevries@suse.de>
4948
4949 PR symtab/25801
4950 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
4951 symtabs.
4952
4953 2020-04-22 Tom de Vries <tdevries@suse.de>
4954
4955 PR symtab/25700
4956 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
4957 CU if already created.
4958
4959 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4960
4961 * infrun.c (displaced_step_fixup): Switch to the event_thread
4962 before calling displaced_step_restore, not after.
4963
4964 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4965
4966 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
4967 its inferior is not recorded by us.
4968 (record_btrace_target_open): Replace call to
4969 all_non_exited_threads () with call to current_inferior
4970 ()->non_exited_threads ().
4971 (record_btrace_target::stop_recording): Likewise.
4972 (record_btrace_target::close): Likewise.
4973 (record_btrace_target::wait): Likewise.
4974 (record_btrace_target::record_stop_replaying): Likewise.
4975
4976 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4977
4978 * btrace.c (btrace_enable): Throw an error on double enables and
4979 when enabling recording fails.
4980 (btrace_disable): Throw an error if the thread is not recorded.
4981
4982 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4983
4984 * record-btrace.c (record_btrace_target::fetch_registers): Forward
4985 request if we do not have a thread_info.
4986
4987 2020-04-21 Tom de Vries <tdevries@suse.de>
4988
4989 PR gdb/25471
4990 * thread.c
4991 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
4992 exception in get_frame_id.
4993
4994 2020-04-20 Tom Tromey <tromey@adacore.com>
4995
4996 * python/python.c (struct gdbpy_event): Mark move constructor as
4997 noexcept.
4998 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
4999 constructor as noexcept.
5000 * completer.h (struct completion_result): Mark move constructor as
5001 noexcept.
5002 * completer.c (completion_result::completion_result): Use
5003 initialization style. Don't call reset_match_list.
5004
5005 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
5006
5007 * MAINTAINERS (Write After Approval): Add myself.
5008
5009 2020-04-18 Tom Tromey <tom@tromey.com>
5010
5011 * windows-tdep.c (init_w32_command_list)
5012 (w32_prefix_command_valid): Restore.
5013 (_initialize_windows_tdep): Call init_w32_command_list.
5014
5015 2020-04-18 Tom Tromey <tom@tromey.com>
5016
5017 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
5018 * value.c (value_fn_field): Update.
5019 * valops.c (find_function_in_inferior)
5020 (value_allocate_space_in_inferior): Update.
5021 * tui/tui-winsource.c (tui_update_source_windows_with_line):
5022 Update.
5023 * tui/tui-source.c (tui_source_window::set_contents): Update.
5024 * symtab.c (lookup_global_or_static_symbol)
5025 (find_function_start_sal_1, skip_prologue_sal)
5026 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
5027 * symmisc.c (dump_msymbols, dump_symtab_1)
5028 (maintenance_print_one_line_table): Update.
5029 * symfile.c (init_entry_point_info, section_is_mapped)
5030 (list_overlays_command, simple_read_overlay_table)
5031 (simple_overlay_update_1): Update.
5032 * stap-probe.c (handle_stap_probe): Update.
5033 * stabsread.c (dbx_init_float_type, define_symbol)
5034 (read_one_struct_field, read_enum_type, read_range_type): Update.
5035 * source.c (info_line_command): Update.
5036 * python/python.c (gdbpy_source_objfile_script)
5037 (gdbpy_execute_objfile_script): Update.
5038 * python/py-type.c (save_objfile_types): Update.
5039 * python/py-objfile.c (py_free_objfile): Update.
5040 * python/py-inferior.c (python_new_objfile): Update.
5041 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
5042 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
5043 (maintenance_check_psymtabs): Update.
5044 * printcmd.c (info_address_command): Update.
5045 * objfiles.h (struct objfile) <arch>: New method, from
5046 get_objfile_arch.
5047 (get_objfile_arch): Don't declare.
5048 * objfiles.c (get_objfile_arch): Remove.
5049 (filter_overlapping_sections): Update.
5050 * minsyms.c (msymbol_is_function): Update.
5051 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
5052 (output_nondebug_symbol): Update.
5053 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
5054 (mdebug_expand_psymtab): Update.
5055 * machoread.c (macho_add_oso_symfile): Update.
5056 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
5057 Update.
5058 * linux-fork.c (checkpoint_command): Update.
5059 * linespec.c (convert_linespec_to_sals): Update.
5060 * jit.c (finalize_symtab): Update.
5061 * infrun.c (insert_exception_resume_from_probe): Update.
5062 * ia64-tdep.c (ia64_find_unwind_table): Update.
5063 * hppa-tdep.c (internalize_unwinds): Update.
5064 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
5065 Update.
5066 * gcore.c (call_target_sbrk): Update.
5067 * elfread.c (record_minimal_symbol, elf_symtab_read)
5068 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
5069 (elf_gnu_ifunc_resolve_by_got): Update.
5070 * dwarf2/read.c (create_addrmap_from_index)
5071 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
5072 (read_debug_names_from_section)
5073 (process_psymtab_comp_unit_reader, add_partial_symbol)
5074 (add_partial_subprogram, process_full_comp_unit)
5075 (read_file_scope, read_func_scope, read_lexical_block_scope)
5076 (read_call_site_scope, dwarf2_ranges_read)
5077 (dwarf2_record_block_ranges, dwarf2_add_field)
5078 (mark_common_block_symbol_computed, read_tag_pointer_type)
5079 (read_tag_string_type, dwarf2_init_float_type)
5080 (dwarf2_init_complex_target_type, read_base_type)
5081 (partial_die_info::read, partial_die_info::read)
5082 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
5083 (dwarf2_fetch_die_loc_sect_off): Update.
5084 * dwarf2/loc.c (dwarf2_find_location_expression)
5085 (class dwarf_evaluate_loc_desc, rw_pieced_value)
5086 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
5087 (dwarf2_loc_desc_get_symbol_read_needs)
5088 (locexpr_describe_location_piece, locexpr_describe_location_1)
5089 (loclist_describe_location): Update.
5090 * dwarf2/index-write.c (write_debug_names): Update.
5091 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
5092 * dtrace-probe.c (dtrace_process_dof): Update.
5093 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
5094 (process_one_symbol): Update.
5095 * ctfread.c (ctf_init_float_type, read_base_type): Update.
5096 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
5097 (coff_read_enum_type): Update.
5098 * cli/cli-cmds.c (edit_command, list_command): Update.
5099 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
5100 * breakpoint.c (create_overlay_event_breakpoint)
5101 (create_longjmp_master_breakpoint)
5102 (create_std_terminate_master_breakpoint)
5103 (create_exception_master_breakpoint, get_sal_arch): Update.
5104 * block.c (block_gdbarch): Update.
5105 * annotate.c (annotate_source_line): Update.
5106
5107 2020-04-17 Tom Tromey <tromey@adacore.com>
5108
5109 * auto-load.c (show_auto_load_cmd): Remove.
5110 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
5111 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
5112 (maintenance_print_arc_command): Remove.
5113 * tui/tui-win.c (tui_command): Remove.
5114 (tui_get_cmd_list): Use add_basic_prefix_cmd.
5115 * tui/tui-layout.c (tui_layout_command): Remove.
5116 (_initialize_tui_layout): Use add_basic_prefix_cmd.
5117 * python/python.c (user_set_python, user_show_python): Remove.
5118 (_initialize_python): Use add_basic_prefix_cmd,
5119 add_show_prefix_cmd.
5120 * guile/guile.c (set_guile_command, show_guile_command): Remove.
5121 (install_gdb_commands): Use add_basic_prefix_cmd,
5122 add_show_prefix_cmd.
5123 (info_guile_command): Remove.
5124 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
5125 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
5126 add_show_prefix_cmd.
5127 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
5128 Remove do_set and do_show parameters.
5129 * cli/cli-style.c (set_style, show_style): Remove.
5130 (_initialize_cli_style): Use add_basic_prefix_cmd,
5131 add_show_prefix_cmd.
5132 (cli_style_option::add_setshow_commands): Remove do_set and
5133 do_show parameters.
5134 (cli_style_option::add_setshow_commands): Use
5135 add_basic_prefix_cmd, add_show_prefix_cmd.
5136 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
5137 (set_style_name): Remove.
5138 * cli/cli-dump.c (dump_command, append_command): Remove.
5139 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5140 (tekhex_dump_command, binary_dump_command)
5141 (binary_append_command): Remove.
5142 (_initialize_cli_dump): Use add_basic_prefix_cmd.
5143 * windows-tdep.c (w32_prefix_command_valid): Remove global.
5144 (init_w32_command_list): Remove; move into ...
5145 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
5146 * valprint.c (set_print, show_print, set_print_raw)
5147 (show_print_raw): Remove.
5148 (_initialize_valprint): Use add_basic_prefix_cmd,
5149 add_show_prefix_cmd.
5150 * typeprint.c (set_print_type, show_print_type): Remove.
5151 (_initialize_typeprint): Use add_basic_prefix_cmd,
5152 add_show_prefix_cmd.
5153 * record.c (set_record_command, show_record_command): Remove.
5154 (_initialize_record): Use add_basic_prefix_cmd,
5155 add_show_prefix_cmd.
5156 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
5157 add_show_prefix_cmd.
5158 (info_command, show_command, set_debug, show_debug): Remove.
5159 * top.h (set_history, show_history): Don't declare.
5160 * top.c (set_history, show_history): Remove.
5161 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5162 (unset_tdesc_cmd): Remove.
5163 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
5164 add_show_prefix_cmd.
5165 * symtab.c (info_module_command): Remove.
5166 (_initialize_symtab): Use add_basic_prefix_cmd.
5167 * symfile.c (overlay_command): Remove.
5168 (_initialize_symfile): Use add_basic_prefix_cmd.
5169 * sparc64-tdep.c (info_adi_command): Remove.
5170 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
5171 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
5172 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
5173 add_show_prefix_cmd.
5174 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
5175 (_initialize_serial): Use add_basic_prefix_cmd,
5176 add_show_prefix_cmd.
5177 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
5178 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
5179 add_show_prefix_cmd.
5180 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
5181 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
5182 add_show_prefix_cmd.
5183 * riscv-tdep.c (show_riscv_command, set_riscv_command)
5184 (show_debug_riscv_command, set_debug_riscv_command): Remove.
5185 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
5186 add_show_prefix_cmd.
5187 * remote.c (remote_command, set_remote_cmd): Remove.
5188 (_initialize_remote): Use add_basic_prefix_cmd.
5189 * record-full.c (set_record_full_command)
5190 (show_record_full_command): Remove.
5191 (_initialize_record_full): Use add_basic_prefix_cmd,
5192 add_show_prefix_cmd.
5193 * record-btrace.c (cmd_set_record_btrace)
5194 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
5195 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
5196 (cmd_show_record_btrace_pt): Remove.
5197 (_initialize_record_btrace): Use add_basic_prefix_cmd,
5198 add_show_prefix_cmd.
5199 * ravenscar-thread.c (set_ravenscar_command)
5200 (show_ravenscar_command): Remove.
5201 (_initialize_ravenscar): Use add_basic_prefix_cmd,
5202 add_show_prefix_cmd.
5203 * mips-tdep.c (show_mips_command, set_mips_command)
5204 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
5205 add_show_prefix_cmd.
5206 * maint.c (maintenance_command, maintenance_info_command)
5207 (maintenance_check_command, maintenance_print_command)
5208 (maintenance_set_cmd, maintenance_show_cmd): Remove.
5209 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
5210 add_show_prefix_cmd.
5211 (show_per_command_cmd): Remove.
5212 * maint-test-settings.c (maintenance_set_test_settings_cmd):
5213 Remove.
5214 (maintenance_show_test_settings_cmd): Remove.
5215 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
5216 add_show_prefix_cmd.
5217 * maint-test-options.c (maintenance_test_options_command):
5218 Remove.
5219 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
5220 * macrocmd.c (macro_command): Remove
5221 (_initialize_macrocmd): Use add_basic_prefix_cmd.
5222 * language.c (set_check, show_check): Remove.
5223 (_initialize_language): Use add_basic_prefix_cmd,
5224 add_show_prefix_cmd.
5225 * infcmd.c (unset_command): Remove.
5226 (_initialize_infcmd): Use add_basic_prefix_cmd.
5227 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
5228 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
5229 add_show_prefix_cmd.
5230 * go32-nat.c (go32_info_dos_command): Remove.
5231 (_initialize_go32_nat): Use add_basic_prefix_cmd.
5232 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
5233 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
5234 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
5235 (_initialize_frame): Use add_basic_prefix_cmd,
5236 add_show_prefix_cmd.
5237 * dcache.c (set_dcache_command, show_dcache_command): Remove.
5238 (_initialize_dcache): Use add_basic_prefix_cmd,
5239 add_show_prefix_cmd.
5240 * cp-support.c (maint_cplus_command): Remove.
5241 (_initialize_cp_support): Use add_basic_prefix_cmd.
5242 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5243 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5244 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
5245 add_basic_prefix_cmd, add_show_prefix_cmd.
5246 * breakpoint.c (save_command): Remove.
5247 (_initialize_breakpoint): Use add_basic_prefix_cmd.
5248 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
5249 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
5250 add_show_prefix_cmd.
5251 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
5252 (set_ada_command, show_ada_command): Remove.
5253 (_initialize_ada_language): Use add_basic_prefix_cmd,
5254 add_show_prefix_cmd.
5255 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
5256
5257 2020-04-16 Kamil Rytarowski <n54@gmx.com>
5258
5259 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
5260 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
5261
5262 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
5263
5264 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
5265 warning messages.
5266
5267 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
5268
5269 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
5270 import table is not at beginning of .idata section.
5271
5272 2020-04-16 Pedro Alves <palves@redhat.com>
5273
5274 * inferior.c (delete_inferior): Use delete operator directly
5275 instead of delete_program_space.
5276 * progspace.c (add_program_space): New, factored out from
5277 program_space::program_space.
5278 (remove_program_space): New, factored out from
5279 delete_program_space.
5280 (program_space::program_space): Remove intro comment. Rewrite.
5281 (program_space::~program_space): Remove intro comment. Call
5282 remove_program_space.
5283 (delete_program_space): Delete.
5284 * progspace.h (program_space::program_space): Make explicit. Move
5285 intro comment here, adjusted.
5286 (program_space::~program_space): Move intro comment here,
5287 adjusted.
5288 (delete_program_space): Remove.
5289
5290 2020-04-16 Tom Tromey <tromey@adacore.com>
5291
5292 * windows-nat.c (windows_nat::handle_access_violation): New
5293 function.
5294 * nat/windows-nat.h (handle_access_violation): Declare.
5295 * nat/windows-nat.c (handle_exception): Move Cygwin code to
5296 windows-nat.c. Call handle_access_violation.
5297
5298 2020-04-16 Tom de Vries <tdevries@suse.de>
5299
5300 PR symtab/25791
5301 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
5302 CUs without psymtab.
5303
5304 2020-04-16 Kevin Buettner <kevinb@redhat.com>
5305
5306 * python/python.c (do_start_initialization): Don't call
5307 PyEval_InitThreads for Python 3.9 and beyond.
5308
5309 2020-04-15 Kamil Rytarowski <n54@gmx.com>
5310
5311 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
5312 thread functions.
5313 (obsd_nat_target::wait): Likewise.
5314
5315 2020-04-15 Tom Tromey <tromey@adacore.com>
5316
5317 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
5318 (DEBUG_EXCEPT): Use debug_printf.
5319
5320 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
5321
5322 * completer.c (class completion_tracker::completion_hash_entry)
5323 <hash_name>: New member function.
5324 (completion_tracker::discard_completions): New callback to hash a
5325 completion_hash_entry, pass this to htab_create_alloc.
5326
5327 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
5328
5329 * windows-nat.c (windows_make_so): Warn rather than stopping with
5330 an error if realpath() fails.
5331
5332 2020-04-14 Kamil Rytarowski <n54@gmx.com>
5333
5334 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
5335 (nbsd_nat_target::info_proc): Add do_status.
5336
5337 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
5338 Tom de Vries <tdevries@suse.de>
5339
5340 PR symtab/25718
5341 * psympriv.h (struct partial_symtab::read_symtab)
5342 (struct partial_symtab::expand_psymtab)
5343 (struct partial_symtab::read_dependencies): Update comments.
5344 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
5345 read_symtab for includer.
5346 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
5347 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
5348 (struct dwarf2_include_psymtab::m_readin): Remove.
5349 (struct dwarf2_include_psymtab::includer): New member function.
5350 (dwarf2_psymtab::expand_psymtab): Assert !readin.
5351
5352 2020-04-14 Tom de Vries <tdevries@suse.de>
5353
5354 PR symtab/25720
5355 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
5356 with NULL symbol_matcher and lookup_name.
5357 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
5358 and lookup_name.
5359 * dwarf2/read.c (dw2_expand_symtabs_matching)
5360 (dw2_debug_names_expand_symtabs_matching): Same.
5361 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
5362 Make lookup_name a pointer. Update comment.
5363 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
5364 lookup_name being a pointer.
5365 * symfile.c (expand_symtabs_matching): Same.
5366 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
5367 * linespec.c (iterate_over_all_matching_symtabs): Same.
5368
5369 2020-04-13 Tom Tromey <tom@tromey.com>
5370
5371 * run-on-main-thread.c: Update include.
5372 * unittests/main-thread-selftests.c: Update include.
5373 * tui/tui-win.c: Update include.
5374 * tui/tui-io.c: Update include.
5375 * tui/tui-interp.c: Update include.
5376 * tui/tui-hooks.c: Update include.
5377 * top.h: Update include.
5378 * top.c: Update include.
5379 * ser-base.c: Update include.
5380 * remote.c: Update include.
5381 * remote-notif.c: Update include.
5382 * remote-fileio.c: Update include.
5383 * record-full.c: Update include.
5384 * record-btrace.c: Update include.
5385 * python/python.c: Update include.
5386 * posix-hdep.c: Update include.
5387 * mingw-hdep.c: Update include.
5388 * mi/mi-main.c: Update include.
5389 * mi/mi-interp.c: Update include.
5390 * main.c: Update include.
5391 * linux-nat.c: Update include.
5392 * interps.c: Update include.
5393 * infrun.c: Update include.
5394 * inf-loop.c: Update include.
5395 * event-top.c: Update include.
5396 * event-loop.c: Move to ../gdbsupport/.
5397 * event-loop.h: Move to ../gdbsupport/.
5398 * async-event.h: Update include.
5399 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
5400
5401 2020-04-13 Tom Tromey <tom@tromey.com>
5402
5403 * tui/tui-win.c: Include async-event.h.
5404 * remote.c: Include async-event.h.
5405 * remote-notif.c: Include async-event.h.
5406 * record-full.c: Include async-event.h.
5407 * record-btrace.c: Include async-event.h.
5408 * infrun.c: Include async-event.h.
5409 * event-top.c: Include async-event.h.
5410 * event-loop.h: Move some declarations to async-event.h.
5411 * event-loop.c: Don't include ser-event.h or top.h. Move some
5412 code to async-event.c.
5413 * async-event.h: New file.
5414 * async-event.c: New file.
5415 * Makefile.in (COMMON_SFILES): Add async-event.c.
5416 (HFILES_NO_SRCDIR): Add async-event.h.
5417
5418 2020-04-13 Tom Tromey <tom@tromey.com>
5419
5420 * utils.c (flush_streams): New function.
5421 * event-loop.c (gdb_wait_for_event): Call flush_streams.
5422
5423 2020-04-13 Tom Tromey <tom@tromey.com>
5424
5425 * event-loop.c (handle_file_event): Use warning, not
5426 printf_unfiltered.
5427
5428 2020-04-13 Tom Tromey <tom@tromey.com>
5429
5430 * event-loop.c: Include <chrono>.
5431
5432 2020-04-13 Tom Tromey <tom@tromey.com>
5433
5434 * gdb_select.h: Move to ../gdbsupport/.
5435 * event-loop.c: Update include path.
5436 * top.c: Update include path.
5437 * ser-base.c: Update include path.
5438 * ui-file.c: Update include path.
5439 * ser-tcp.c: Update include path.
5440 * guile/scm-ports.c: Update include path.
5441 * posix-hdep.c: Update include path.
5442 * ser-unix.c: Update include path.
5443 * gdb_usleep.c: Update include path.
5444 * mingw-hdep.c: Update include path.
5445 * inflow.c: Update include path.
5446 * infrun.c: Update include path.
5447 * event-top.c: Update include path.
5448
5449 2020-04-13 Tom Tromey <tom@tromey.com>
5450
5451 * configure: Rebuild.
5452 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
5453
5454 2020-04-13 Tom Tromey <tom@tromey.com>
5455
5456 * event-loop.h (start_event_loop): Don't declare.
5457 * event-loop.c (start_event_loop): Move...
5458 * main.c (start_event_loop): ...here. Now static.
5459
5460 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
5461
5462 * MAINTAINERS: Update my email address.
5463
5464 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5465
5466 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
5467 IP_ALL.
5468
5469 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5470
5471 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
5472 (nbsd_nat_target::info_proc): Add do_cmdline.
5473
5474 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5475
5476 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
5477 (nbsd_nat_target::info_proc): Add do_cwd.
5478
5479 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5480
5481 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
5482
5483 2020-04-11 Kamil Rytarowski <n54@gmx.com>
5484
5485 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
5486 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
5487 (nbsd_nat_target::info_proc): New functions.
5488 * nbsd-nat.c (kinfo_get_vmmap): New function.
5489 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
5490 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
5491 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
5492 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
5493 functions.
5494 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
5495 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5496 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5497 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
5498 (KINFO_VME_FLAG_GROWS_DOWN): New.
5499
5500 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
5501
5502 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
5503 bit shift.
5504
5505 2020-04-10 Tom Tromey <tromey@adacore.com>
5506
5507 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
5508
5509 2020-04-10 Tom Tromey <tromey@adacore.com>
5510
5511 * symtab.c (get_symbol_address, get_msymbol_address): Skip
5512 separate debug files.
5513
5514 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
5515
5516 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
5517 Move to...
5518 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
5519 ... here.
5520 * windows-nat.c (windows_nat_target::get_windows_debug_event):
5521 Check for STATUS_WX86_BREAKPOINT.
5522 (windows_nat_target::wait): Same.
5523
5524 2020-04-10 Tom de Vries <tdevries@suse.de>
5525
5526 PR cli/25808
5527 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
5528
5529 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5530
5531 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
5532 (Write After Approval): Remove Tom de Vries.
5533
5534 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
5535
5536 revert partially:
5537 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5538
5539 * buildsym.c (record_line): Fix undefined behavior and preserve
5540 lines at eof.
5541
5542 2020-04-09 Kamil Rytarowski <n54@gmx.com>
5543
5544 * auxv.h (svr4_auxv_parse): New.
5545 * auxv.c (default_auxv_parse): Split into default_auxv_parse
5546 and generic_auxv_parse.
5547 (svr4_auxv_parse): Add.
5548 * obsd-tdep.c: Include "auxv.h".
5549 (obsd_auxv_parse): Remove.
5550 (obsd_init_abi): Remove comment.
5551 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
5552 from `obsd_auxv_parse' to `svr4_auxv_parse'.
5553 * nbsd-tdep.c: Include "auxv.h".
5554 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
5555
5556 2020-04-08 Tom Tromey <tromey@adacore.com>
5557
5558 * nat/windows-nat.h (last_wait_event): Don't declare.
5559 (wait_for_debug_event): Update comment.
5560 * nat/windows-nat.c (last_wait_event): Now static.
5561
5562 2020-04-08 Tom Tromey <tromey@adacore.com>
5563
5564 * windows-nat.c (wait_for_debug_event): Move to
5565 nat/windows-nat.c.
5566 * nat/windows-nat.h (wait_for_debug_event): Declare.
5567 * nat/windows-nat.c (wait_for_debug_event): Move from
5568 windows-nat.c. No longer static.
5569
5570 2020-04-08 Tom Tromey <tromey@adacore.com>
5571
5572 * windows-nat.c (get_windows_debug_event): Use
5573 fetch_pending_stop.
5574 * nat/windows-nat.h (fetch_pending_stop): Declare.
5575 * nat/windows-nat.c (fetch_pending_stop): New function.
5576
5577 2020-04-08 Tom Tromey <tromey@adacore.com>
5578
5579 * windows-nat.c (windows_continue): Use matching_pending_stop and
5580 continue_last_debug_event.
5581 * nat/windows-nat.h (matching_pending_stop)
5582 (continue_last_debug_event): Declare.
5583 * nat/windows-nat.c (DEBUG_EVENTS): New define.
5584 (matching_pending_stop, continue_last_debug_event): New
5585 functions.
5586
5587 2020-04-08 Tom Tromey <tromey@adacore.com>
5588
5589 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
5590 (handle_exception_result): Move to nat/windows-nat.h.
5591 (DEBUG_EXCEPTION_SIMPLE): Remove.
5592 (windows_nat::handle_ms_vc_exception): New function.
5593 (handle_exception): Move to nat/windows-nat.c.
5594 (get_windows_debug_event): Update.
5595 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
5596 nat/windows-nat.c.
5597 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
5598 (handle_exception_result): Move from windows-nat.c.
5599 (handle_exception): Declare.
5600 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
5601 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
5602 windows-nat.c.
5603
5604 2020-04-08 Tom Tromey <tromey@adacore.com>
5605
5606 * windows-nat.c (exception_count, event_count): Remove.
5607 (handle_exception, get_windows_debug_event)
5608 (do_initial_windows_stuff): Update.
5609
5610 2020-04-08 Tom Tromey <tromey@adacore.com>
5611
5612 * windows-nat.c (windows_nat::handle_load_dll)
5613 (windows_nat::handle_unload_dll): Rename. No longer static.
5614 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
5615 Declare.
5616
5617 2020-04-08 Tom Tromey <tromey@adacore.com>
5618
5619 * complaints.h (stop_whining): Declare at top-level.
5620 (complaint): Don't declare stop_whining.
5621
5622 2020-04-08 Tom Tromey <tromey@adacore.com>
5623
5624 * windows-nat.c (windows_nat::handle_output_debug_string):
5625 Rename. No longer static.
5626 * nat/windows-nat.h (handle_output_debug_string): Declare.
5627
5628 2020-04-08 Tom Tromey <tromey@adacore.com>
5629
5630 * windows-nat.c (current_process_handle, current_process_id)
5631 (main_thread_id, last_sig, current_event, last_wait_event)
5632 (current_windows_thread, desired_stop_thread_id, pending_stops)
5633 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
5634 (display_selectors, fake_create_process)
5635 (get_windows_debug_event): Update.
5636 * nat/windows-nat.h (current_process_handle, current_process_id)
5637 (main_thread_id, last_sig, current_event, last_wait_event)
5638 (current_windows_thread, desired_stop_thread_id, pending_stops)
5639 (struct pending_stop, siginfo_er): Move from windows-nat.c.
5640 * nat/windows-nat.c (current_process_handle, current_process_id)
5641 (main_thread_id, last_sig, current_event, last_wait_event)
5642 (current_windows_thread, desired_stop_thread_id, pending_stops)
5643 (siginfo_er): New globals. Move from windows-nat.c.
5644
5645 2020-04-08 Tom Tromey <tromey@adacore.com>
5646
5647 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
5648 (handle_load_dll): Update.
5649 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
5650
5651 2020-04-08 Tom Tromey <tromey@adacore.com>
5652
5653 * windows-nat.c (enum thread_disposition_type): Move to
5654 nat/windows-nat.h.
5655 (windows_nat::thread_rec): Rename from thread_rec. No longer
5656 static.
5657 (windows_add_thread, windows_nat_target::fetch_registers)
5658 (windows_nat_target::store_registers, handle_exception)
5659 (windows_nat_target::resume, get_windows_debug_event)
5660 (windows_nat_target::get_tib_address)
5661 (windows_nat_target::thread_name)
5662 (windows_nat_target::thread_alive): Update.
5663 * nat/windows-nat.h (enum thread_disposition_type): Move from
5664 windows-nat.c.
5665 (thread_rec): Declare.
5666
5667 2020-04-08 Tom Tromey <tromey@adacore.com>
5668
5669 * windows-nat.c: Add "using namespace".
5670 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
5671 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
5672
5673 2020-04-08 Tom Tromey <tromey@adacore.com>
5674
5675 * nat/windows-nat.h (struct windows_thread_info): Declare
5676 destructor.
5677 * nat/windows-nat.c (~windows_thread_info): New.
5678
5679 2020-04-08 Tom Tromey <tromey@adacore.com>
5680
5681 PR gdb/22992
5682 * windows-nat.c (current_event): Update comment.
5683 (last_wait_event, desired_stop_thread_id): New globals.
5684 (struct pending_stop): New.
5685 (pending_stops): New global.
5686 (windows_nat_target) <stopped_by_sw_breakpoint>
5687 <supports_stopped_by_sw_breakpoint>: New methods.
5688 (windows_fetch_one_register): Add assertions. Adjust PC.
5689 (windows_continue): Handle pending stops. Suspend other threads
5690 when stepping. Use last_wait_event
5691 (wait_for_debug_event): New function.
5692 (get_windows_debug_event): Use wait_for_debug_event. Handle
5693 pending stops. Queue spurious stops.
5694 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
5695 (windows_nat_target::kill): Use wait_for_debug_event.
5696 * nat/windows-nat.h (struct windows_thread_info)
5697 <stopped_at_software_breakpoint>: New field.
5698 * nat/windows-nat.c (windows_thread_info::resume): Clear
5699 stopped_at_software_breakpoint.
5700
5701 2020-04-08 Tom Tromey <tromey@adacore.com>
5702
5703 * windows-nat.c (enum thread_disposition_type): New.
5704 (thread_rec): Replace "get_context" parameter with "disposition";
5705 change type.
5706 (windows_add_thread, windows_nat_target::fetch_registers)
5707 (windows_nat_target::store_registers, handle_exception)
5708 (windows_nat_target::resume, get_windows_debug_event)
5709 (windows_nat_target::get_tib_address)
5710 (windows_nat_target::thread_name)
5711 (windows_nat_target::thread_alive): Update.
5712
5713 2020-04-08 Tom Tromey <tromey@adacore.com>
5714
5715 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
5716 (windows_continue): Use windows_continue::resume.
5717 * nat/windows-nat.h (struct windows_thread_info) <suspend,
5718 resume>: Declare new methods.
5719 * nat/windows-nat.c: New file.
5720 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
5721
5722 2020-04-08 Tom Tromey <tromey@adacore.com>
5723
5724 * windows-nat.c (windows_add_thread, windows_delete_thread)
5725 (windows_nat_target::fetch_registers)
5726 (windows_nat_target::store_registers, fake_create_process)
5727 (windows_nat_target::resume, windows_nat_target::resume)
5728 (get_windows_debug_event, windows_nat_target::wait)
5729 (windows_nat_target::pid_to_str)
5730 (windows_nat_target::get_tib_address)
5731 (windows_nat_target::get_ada_task_ptid)
5732 (windows_nat_target::thread_name)
5733 (windows_nat_target::thread_alive): Use lwp, not tid.
5734
5735 2020-04-08 Tom Tromey <tromey@adacore.com>
5736
5737 * windows-nat.c (handle_exception)
5738 (windows_nat_target::thread_name): Update.
5739 * nat/windows-nat.h (windows_thread_info): Remove destructor.
5740 <name>: Now unique_xmalloc_ptr.
5741
5742 2020-04-08 Tom Tromey <tromey@adacore.com>
5743
5744 * windows-nat.c (thread_rec)
5745 (windows_nat_target::fetch_registers): Update.
5746 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
5747 Update comment.
5748 <debug_registers_changed, reload_context>: Now bool.
5749
5750 2020-04-08 Tom Tromey <tromey@adacore.com>
5751
5752 * windows-nat.c (windows_add_thread): Use new.
5753 (windows_init_thread_list, windows_delete_thread): Use delete.
5754 (get_windows_debug_event): Update.
5755 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
5756 destructor, and initializers.
5757
5758 2020-04-08 Tom Tromey <tromey@adacore.com>
5759
5760 * windows-nat.c (struct windows_thread_info): Remove.
5761 * nat/windows-nat.h: New file.
5762
5763 2020-04-08 Tom Tromey <tromey@adacore.com>
5764
5765 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
5766 (thread_rec, windows_add_thread, windows_delete_thread)
5767 (windows_continue): Update.
5768
5769 2020-04-08 Tom Tromey <tromey@adacore.com>
5770
5771 * windows-nat.c (struct windows_thread_info): Remove typedef.
5772 (thread_head): Remove.
5773 (thread_list): New global.
5774 (thread_rec, windows_add_thread, windows_init_thread_list)
5775 (windows_delete_thread, windows_continue): Update.
5776
5777 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
5778
5779 * windows-tdep.h (windows_init_abi): Add comment.
5780 (cygwin_init_abi): New declaration.
5781 * windows-tdep.c: Split signal enumeration in two, one for
5782 Windows and one for Cygwin.
5783 (windows_gdb_signal_to_target): Only deal with signal of the
5784 Windows OS ABI.
5785 (cygwin_gdb_signal_to_target): New function.
5786 (windows_init_abi): Rename to windows_init_abi_common, don't set
5787 gdb_signal_to_target gdbarch method. Add new new function with
5788 this name.
5789 (cygwin_init_abi): New function.
5790 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
5791 comment. Don't call windows_init_abi.
5792 (amd64_windows_init_abi): Add comment, call windows_init_abi.
5793 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
5794 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
5795 i386_windows_init_abi_common, don't call windows_init_abi. Add
5796 a new function of this name.
5797 (i386_cygwin_init_abi): New function.
5798 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
5799 OS ABI Cygwin.
5800
5801 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
5802
5803 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
5804 parameter.c.
5805 (dwarf2_read_gdb_index): Update.
5806
5807 2020-04-07 Kamil Rytarowski <n54@gmx.com>
5808
5809 * nbsd-tdep.c: Include "objfiles.h".
5810 (nbsd_skip_solib_resolver): New.
5811 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
5812
5813 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5814
5815 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
5816 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
5817 with DW_LLE_base_addressx are being emitted in DWARFv5.
5818 Add the newly added kind DW_LOC_OFFSET_PAIR also.
5819 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
5820 unsigned integer.
5821
5822 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5823
5824 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
5825 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
5826 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
5827 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
5828 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
5829 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
5830 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
5831
5832
5833 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5834
5835 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
5836 (read_loclist_index): New function definition.
5837 (lookup_loclist_base): New function definition.
5838 (read_loclist_header): New function definition.
5839 (dwarf2_cu): Add loclist_base and loclist_header field.
5840 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
5841 (read_full_die_1): Read the value of DW_AT_loclists_base.
5842 (read_attribute_reprocess): Handle DW_FORM_loclistx.
5843 (read_attribute_value): Handle DW_FORM_loclistx.
5844 (skip_one_die): Handle DW_FORM_loclistx.
5845 (loclist_header): New structure declaration.
5846 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
5847
5848 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5849
5850 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
5851 constructor. Remove `addr` parameter from other constructor and
5852 add `per_cu` parameter.
5853 * dwarf2/read.c (create_partial_symtab): Update.
5854
5855 2020-04-07 Tom de Vries <tdevries@suse.de>
5856
5857 PR symtab/25796
5858 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
5859 (partial_die_info::fixup): Inherit has_const_value.
5860
5861 2020-04-07 Tom de Vries <tdevries@suse.de>
5862
5863 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
5864 symbols without address.
5865
5866 2020-04-06 Kamil Rytarowski <n54@gmx.com>
5867
5868 * nbsd-nat.h (struct thread_info): Add forward declaration.
5869 (nbsd_nat_target::thread_alive): Add.
5870 (nbsd_nat_target::thread_name): Likewise.
5871 (nbsd_nat_target::update_thread_list): Likewise.
5872 (update_thread_list::post_attach): Likewise.
5873 (post_attach::pid_to_str): Likewise.
5874 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
5875 (nbsd_thread_lister): Add.
5876 (nbsd_nat_target::thread_alive): Likewise.
5877 (nbsd_nat_target::thread_name): Likewise.
5878 (nbsd_add_threads): Likewise.
5879 (update_thread_list::post_attach): Likewise.
5880 (nbsd_nat_target::update_thread_list): Likewise.
5881 (post_attach::pid_to_str): Likewise.
5882
5883 2020-04-06 Tom Tromey <tromey@adacore.com>
5884
5885 * ada-valprint.c (print_variant_part): Extract the variant field.
5886 (print_field_values): Use the field as the outer value when
5887 recursing.
5888
5889 2020-04-06 Tom Tromey <tromey@adacore.com>
5890
5891 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
5892 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
5893 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
5894 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
5895 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
5896
5897 2020-04-06 Tom Tromey <tromey@adacore.com>
5898
5899 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
5900 TYPE_CODE_ERROR.
5901
5902 2020-04-06 Kamil Rytarowski <n54@gmx.com>
5903
5904 * nbsd-tdep.c: Include "gdbarch.h".
5905 Define enum with NetBSD signal numbers.
5906 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
5907 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
5908 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5909 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
5910 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
5911 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
5912 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
5913 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
5914 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
5915 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
5916 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
5917 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
5918
5919 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
5920
5921 PR gdb/25325
5922 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
5923
5924 2020-04-03 Tom Tromey <tromey@adacore.com>
5925
5926 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
5927 Read constant block.
5928
5929 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
5930
5931 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
5932 (gdb_bfd_get_full_section_contents): New declaration.
5933 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
5934 * windows-tdep.c (is_linked_with_cygwin_dll): Use
5935 gdb_bfd_get_full_section_contents.
5936
5937 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
5938
5939 * exec.c (build_section_table): Replace internal_error with
5940 gdb_assert.
5941 (section_table_xfer_memory_partial): Likewise.
5942 * mdebugread.c (parse_partial_symbols): Likewise.
5943 * psymtab.c (lookup_partial_symbol): Likewise.
5944 * utils.c (wrap_here): Likewise.
5945
5946 2020-04-02 Tom Tromey <tromey@adacore.com>
5947
5948 * f-lang.c (build_fortran_types): Use arch_type to initialize
5949 builtin_complex_s32 in the TYPE_CODE_ERROR case.
5950
5951 2020-04-02 Tom Tromey <tromey@adacore.com>
5952
5953 * dwarf2/read.c (partial_die_info::read): Do not create a vector
5954 of attributes.
5955
5956 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
5957 Bernd Edlinger <bernd.edlinger@hotmail.de>
5958 Tom Tromey <tromey@adacore.com>
5959
5960 * buildsym.c (buildsym_compunit::record_line): Remove
5961 deduplication code.
5962
5963 2020-04-02 Tom de Vries <tdevries@suse.de>
5964
5965 PR ada/24671
5966 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
5967
5968 2020-04-02 Tom de Vries <tdevries@suse.de>
5969
5970 * dwarf2/read.c (dwarf2_gdb_index_functions,
5971 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
5972 NULL.
5973 * psymtab.c (psym_lookup_global_symbol_language): New function.
5974 (psym_functions): Init psym_lookup_global_symbol_language with
5975 psym_lookup_global_symbol_language.
5976 * symfile-debug.c (debug_sym_quick_functions): Init
5977 lookup_global_symbol_language with NULL.
5978 * symfile.c (set_initial_language): Remove fixme comment.
5979 * symfile.h (struct quick_symbol_functions): Add
5980 lookup_global_symbol_language.
5981 * symtab.c (find_quick_global_symbol_language): New function.
5982 (find_main_name): Use find_quick_global_symbol_language.
5983
5984 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5985
5986 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
5987
5988 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5989
5990 * buildsym.c (record_line): Fix undefined behavior and preserve
5991 lines at eof.
5992
5993 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5994
5995 * buildsym.c (record_line): Fix the resizing condition.
5996
5997 2020-04-01 Tom Tromey <tom@tromey.com>
5998
5999 * value.h (value_literal_complex): Add comment.
6000 * valops.c (value_literal_complex): Refer to value.h.
6001
6002 2020-04-01 Tom Tromey <tom@tromey.com>
6003
6004 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
6005 (scalar_type): New rule, from typebase.
6006 (typebase): Use scalar_type. Recognize complex types.
6007 (field_name): Handle FLOAT_KEYWORD.
6008 (ident_tokens): Add _Complex and __complex__.
6009
6010 2020-04-01 Tom Tromey <tom@tromey.com>
6011
6012 PR exp/25299:
6013 * valarith.c (promotion_type, complex_binop): New functions.
6014 (scalar_binop): Handle complex numbers. Use promotion_type.
6015 (value_pos, value_neg, value_complement): Handle complex numbers.
6016
6017 2020-04-01 Tom Tromey <tom@tromey.com>
6018
6019 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
6020 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
6021 (parse_number): Handle complex numbers.
6022
6023 2020-04-01 Tom Tromey <tom@tromey.com>
6024
6025 * c-valprint.c (c_decorations): Change complex suffix to "i".
6026
6027 2020-04-01 Tom Tromey <tom@tromey.com>
6028
6029 * valprint.c (generic_value_print_complex): Use accessors.
6030 * value.h (value_real_part, value_imaginary_part): Declare.
6031 * valops.c (value_real_part, value_imaginary_part): New
6032 functions.
6033 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
6034
6035 2020-04-01 Tom Tromey <tom@tromey.com>
6036
6037 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
6038 (read_range_type): Update.
6039 * mdebugread.c (basic_type): Update.
6040 * go-lang.c (build_go_types): Use init_complex_type.
6041 * gdbtypes.h (struct main_type) <complex_type>: New member.
6042 (init_complex_type): Update.
6043 (arch_complex_type): Don't declare.
6044 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
6045 Make name if none given. Use alloc_type_copy. Look for cached
6046 complex type.
6047 (arch_complex_type): Remove.
6048 (gdbtypes_post_init): Use init_complex_type.
6049 * f-lang.c (build_fortran_types): Use init_complex_type.
6050 * dwarf2/read.c (read_base_type): Update.
6051 * d-lang.c (build_d_types): Use init_complex_type.
6052 * ctfread.c (read_base_type): Update.
6053
6054 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6055
6056 * infrun.c (stop_all_threads): Update assertion, plus when
6057 stopping threads, take into account that we might be trying
6058 to stop an all-stop target.
6059 (stop_waiting): Call 'stop_all_threads' if there exists a
6060 non-stop target.
6061
6062 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6063
6064 * target.h (exists_non_stop_target): New function declaration.
6065 * target.c (exists_non_stop_target): New function.
6066
6067 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
6068
6069 PR gdb/24789
6070 * eval.c (is_integral_or_integral_reference): New function.
6071 (evaluate_subexp_standard): Allow integer references in
6072 pointer arithmetic.
6073
6074 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6075
6076 * remote.c (remote_target::remote_parse_stop_reply): Remove the
6077 check for no ptid in the stop reply when the target is non-stop.
6078
6079 2020-04-01 Tom Tromey <tromey@adacore.com>
6080
6081 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
6082 "name" parameter to rvalue reference. Initialize m_name_holder.
6083 <lookup_name_info>: New overloads.
6084 <name>: Return gdb::string_view.
6085 <c_str>: New method.
6086 <make_ignore_params>: Update.
6087 <search_name_hash>: Update.
6088 <language_lookup_name>: Return const char *.
6089 <m_name>: Change type.
6090 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
6091 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
6092 (lookup_name_info::match_any): Update.
6093 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
6094 Update.
6095 * minsyms.c (linkage_name_str): Update.
6096 * language.c (default_symbol_name_matcher): Update.
6097 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
6098 Update.
6099 * ada-lang.c (ada_fold_name): Change parameter to string_view.
6100 (ada_lookup_name_info::ada_lookup_name_info): Update.
6101 (literal_symbol_name_matcher): Update.
6102
6103 2020-04-01 Tom Tromey <tromey@adacore.com>
6104
6105 * psymtab.c (psymtab_search_name): Remove function.
6106 (psym_lookup_symbol): Create search name and lookup name here.
6107 (lookup_partial_symbol): Remove "name" parameter; add
6108 lookup_name.
6109 (psym_expand_symtabs_for_function): Update.
6110
6111 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
6112
6113 PR tui/25597:
6114 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
6115
6116 2020-03-31 Tom Tromey <tromey@adacore.com>
6117
6118 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
6119 memcpy.
6120
6121 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
6122
6123 * features/riscv/32bit-csr.xml: Regenerated.
6124 * features/riscv/64bit-csr.xml: Regenerated.
6125
6126 2020-03-30 Tom Tromey <tromey@adacore.com>
6127
6128 * ada-valprint.c (print_variant_part): Update.
6129 * ada-lang.h (ada_which_variant_applies): Update.
6130 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
6131 outer_valaddr parameters; replace with "outer" value parameter.
6132 (to_fixed_variant_branch_type): Update.
6133
6134 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6135
6136 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
6137 <list>. Remove inclusion of observable.h.
6138 (PPC_DEBUG_CURRENT_VERSION): Move up define.
6139 (struct arch_lwp_info): New struct.
6140 (class ppc_linux_dreg_interface): New class.
6141 (struct ppc_linux_process_info): New struct.
6142 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
6143 <low_new_clone, low_forget_process, low_prepare_to_resume>
6144 <copy_thread_dreg_state, mark_thread_stale>
6145 <mark_debug_registers_changed, register_hw_breakpoint>
6146 <clear_hw_breakpoint, register_wp, clear_wp>
6147 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
6148 <num_memory_accesses, get_trigger_type>
6149 <create_watchpoint_request, hwdebug_point_cmp>
6150 <init_arch_lwp_info, get_arch_lwp_info>
6151 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
6152 methods.
6153 <struct ptid_hash>: New inner struct.
6154 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
6155 members.
6156 (saved_dabr_value, hwdebug_info, max_slots_number)
6157 (struct hw_break_tuple, struct thread_points, ppc_threads)
6158 (have_ptrace_hwdebug_interface)
6159 (hwdebug_find_thread_points_by_tid)
6160 (hwdebug_insert_point, hwdebug_remove_point): Remove.
6161 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
6162 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
6163 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
6164 use m_dreg_interface.
6165 (hwdebug_point_cmp): Change to...
6166 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
6167 reference arguments instead of pointers.
6168 (ppc_linux_nat_target::ranged_break_num_registers): Use
6169 m_dreg_interface.
6170 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
6171 m_dreg_interface. Call register_hw_breakpoint.
6172 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
6173 m_dreg_interface. Call clear_hw_breakpoint.
6174 (get_trigger_type): Change to...
6175 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
6176 comment.
6177 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
6178 use m_dreg_interface. Call register_hw_breakpoint.
6179 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
6180 use m_dreg_interface. Call clear_hw_breakpoint.
6181 (can_use_watchpoint_cond_accel): Change to...
6182 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
6183 method. Update comment, use m_dreg_interface and
6184 m_process_info.
6185 (calculate_dvc): Change to...
6186 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
6187 m_dreg_interface.
6188 (num_memory_accesses): Change to...
6189 (ppc_linux_nat_target::num_memory_accesses): ...this method.
6190 (check_condition): Change to...
6191 (ppc_linux_nat_target::check_condition): ...this method.
6192 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
6193 comment, use m_dreg_interface.
6194 (create_watchpoint_request): Change to...
6195 (ppc_linux_nat_target::create_watchpoint_request): ...this
6196 method. Use m_dreg_interface.
6197 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
6198 m_dreg_interface. Call register_hw_breakpoint or register_wp.
6199 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
6200 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
6201 (ppc_linux_nat_target::low_forget_process)
6202 (ppc_linux_nat_target::low_new_fork)
6203 (ppc_linux_nat_target::low_new_clone)
6204 (ppc_linux_nat_target::low_delete_thread)
6205 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
6206 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
6207 only call mark_thread_stale.
6208 (ppc_linux_thread_exit): Remove.
6209 (ppc_linux_nat_target::stopped_data_address): Change to...
6210 (ppc_linux_nat_target::low_stopped_data_address): This. Add
6211 comment, use m_dreg_interface and m_thread_hw_breakpoints.
6212 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
6213 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
6214 comment. Call low_stopped_data_address.
6215 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
6216 m_dreg_interface.
6217 (ppc_linux_nat_target::masked_watch_num_registers): Use
6218 m_dreg_interface.
6219 (ppc_linux_nat_target::copy_thread_dreg_state)
6220 (ppc_linux_nat_target::mark_thread_stale)
6221 (ppc_linux_nat_target::mark_debug_registers_changed)
6222 (ppc_linux_nat_target::register_hw_breakpoint)
6223 (ppc_linux_nat_target::clear_hw_breakpoint)
6224 (ppc_linux_nat_target::register_wp)
6225 (ppc_linux_nat_target::clear_wp)
6226 (ppc_linux_nat_target::init_arch_lwp_info)
6227 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
6228 (_initialize_ppc_linux_nat): Remove observer callback.
6229
6230 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6231
6232 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
6233 (ppc_linux_nat_target::auxv_parse)
6234 (ppc_linux_nat_target::read_description)
6235 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
6236 Move up.
6237
6238 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6239
6240 * linux-nat.h (low_new_clone): New method.
6241 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
6242
6243 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6244
6245 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
6246 (dbx_expand_psymtab): ... this.
6247 (start_psymtab): Update.
6248 * mdebugread.c (psymtab_to_symtab_1): Rename to...
6249 (mdebug_expand_psymtab): ... this.
6250 (parse_partial_symbols): Update.
6251 (new_psymtab): Update.
6252 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
6253 (xcoff_expand_psymtab): ... this.
6254 (xcoff_start_psymtab): Update.
6255
6256 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6257
6258 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
6259 <expand_dependencies>: ... this.
6260 * psymtab.c (partial_symtab::read_dependencies): Rename to...
6261 (partial_symtab::expand_dependencies): ... this.
6262 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
6263 Update.
6264 (dwarf2_psymtab::expand_psymtab): Update.
6265 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
6266 * mdebugread.c (psymtab_to_symtab_1): Update.
6267 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6268
6269 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6270
6271 * psympriv.h (discard_psymtab): Remove.
6272 * dbxread.c (dbx_end_psymtab): Update.
6273 * xcoffread.c (xcoff_end_psymtab): Update.
6274
6275 2020-03-28 Tom Tromey <tom@tromey.com>
6276
6277 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
6278 comment.
6279
6280 2020-03-28 Tom Tromey <tom@tromey.com>
6281
6282 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
6283
6284 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
6285
6286 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
6287
6288 2020-03-26 John Baldwin <jhb@FreeBSD.org>
6289
6290 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
6291
6292 2020-03-26 Tom Tromey <tom@tromey.com>
6293
6294 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
6295 (mark_common_block_symbol_computed, read_tag_string_type)
6296 (attr_to_dynamic_prop, read_subrange_type): Update.
6297 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
6298 to be methods on struct attribute.
6299 (skip_one_die, process_imported_unit_die, read_namespace_alias)
6300 (read_call_site_scope, partial_die_info::read)
6301 (partial_die_info::read, lookup_die_type, follow_die_ref):
6302 Update.
6303 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
6304 from dwarf2_get_ref_die_offset.
6305 (attribute::constant_value): New method, from
6306 dwarf2_get_attr_constant_value.
6307 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
6308 Declare method.
6309 <constant_value>: New method.
6310
6311 2020-03-26 Tom Tromey <tom@tromey.com>
6312
6313 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
6314 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
6315 (dwarf_type_encoding_name): Move to stringify.c.
6316 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
6317 * dwarf2/stringify.c: New file.
6318 * dwarf2/stringify.h: New file.
6319
6320 2020-03-26 Tom Tromey <tom@tromey.com>
6321
6322 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
6323 Rewrite.
6324
6325 2020-03-26 Tom Tromey <tom@tromey.com>
6326
6327 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
6328 methods.
6329 * dwarf2/read.c (lookup_addr_base): Move to die.h.
6330 (lookup_ranges_base): Likewise.
6331 (read_cutu_die_from_dwo, read_full_die_1): Update.
6332
6333 2020-03-26 Tom Tromey <tom@tromey.com>
6334
6335 * dwarf2/read.c (read_import_statement, read_file_scope)
6336 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
6337 (read_lexical_block_scope, read_call_site_scope)
6338 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
6339 (handle_struct_member_die, process_structure_scope)
6340 (update_enumeration_type_from_children)
6341 (process_enumeration_scope, read_array_type, read_common_block)
6342 (read_namespace, read_module, read_subroutine_type): Update.
6343 (sibling_die): Remove.
6344
6345 2020-03-26 Tom Tromey <tom@tromey.com>
6346
6347 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
6348 (build_type_psymtabs_reader, read_structure_type)
6349 (read_enumeration_type, read_full_die_1): Update.
6350 (dwarf2_attr_no_follow): Move to die.h.
6351 * dwarf2/die.h (struct die_info) <attr>: New method.
6352
6353 2020-03-26 Tom Tromey <tom@tromey.com>
6354
6355 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
6356 <base_address>: Now an optional.
6357 (dwarf2_find_base_address, dwarf2_rnglists_process)
6358 (dwarf2_ranges_process, fill_in_loclist_baton)
6359 (dwarf2_symbol_mark_computed): Update.
6360
6361 2020-03-26 Tom Tromey <tom@tromey.com>
6362
6363 * dwarf2/read.c (struct die_info): Move to die.h.
6364 * dwarf2/die.h: New file.
6365
6366 2020-03-26 Tom Tromey <tom@tromey.com>
6367
6368 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
6369 * dwarf2/read.c
6370 (dwarf2_statement_list_fits_in_line_number_section_complaint):
6371 Move to line-header.c.
6372 (read_checked_initial_length_and_offset, read_formatted_entries):
6373 Likewise.
6374 (dwarf_decode_line_header): Split into two.
6375 * dwarf2/line-header.c
6376 (dwarf2_statement_list_fits_in_line_number_section_complaint):
6377 Move from read.c.
6378 (read_checked_initial_length_and_offset, read_formatted_entries):
6379 Likewise.
6380 (dwarf_decode_line_header): New function, split from read.c.
6381
6382 2020-03-26 Tom Tromey <tom@tromey.com>
6383
6384 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
6385 Declare method.
6386 * dwarf2/read.c (read_attribute_value): Update.
6387 (dwarf2_per_objfile::read_line_string): Rename from
6388 read_indirect_line_string.
6389 (read_formatted_entries): Update.
6390
6391 2020-03-26 Tom Tromey <tom@tromey.com>
6392
6393 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
6394 variable.
6395
6396 2020-03-26 Tom Tromey <tom@tromey.com>
6397
6398 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
6399 const.
6400 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
6401 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
6402 parameter const.
6403
6404 2020-03-26 Tom Tromey <tom@tromey.com>
6405
6406 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
6407 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
6408 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
6409 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
6410
6411 2020-03-26 Tom Tromey <tom@tromey.com>
6412
6413 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
6414 file_names_size, file_full_name, file_file_name>: Use const.
6415 <file_name_at, file_names>: Add const overload.
6416 * dwarf2/line-header.c (line_header::file_file_name)
6417 (line_header::file_full_name): Update.
6418
6419 2020-03-26 Tom Tromey <tom@tromey.com>
6420
6421 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
6422 (macro_start_file, consume_improper_spaces)
6423 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
6424 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
6425 (dwarf_decode_macros): Move to macro.c.
6426 * dwarf2/macro.c: New file.
6427 * dwarf2/macro.h: New file.
6428 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
6429
6430 2020-03-26 Tom Tromey <tom@tromey.com>
6431
6432 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
6433 method.
6434 * dwarf2/section.c: New method. From
6435 read_indirect_string_at_offset_from.
6436 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
6437 (read_indirect_string_at_offset_from): Move to section.c.
6438 (read_indirect_string_at_offset): Rewrite.
6439 (read_indirect_line_string_at_offset): Remove.
6440 (read_indirect_string, read_indirect_line_string)
6441 (dwarf_decode_macro_bytes): Update.
6442
6443 2020-03-26 Tom Tromey <tom@tromey.com>
6444
6445 * dwarf2/section.h (struct dwarf2_section_info)
6446 <overload_complaint>: Declare.
6447 (dwarf2_section_buffer_overflow_complaint): Don't declare.
6448 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
6449 Rename from dwarf2_section_buffer_overflow_complaint.
6450 * dwarf2/read.c (skip_one_die, partial_die_info::read)
6451 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
6452
6453 2020-03-26 Tom Tromey <tom@tromey.com>
6454
6455 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
6456 Declare.
6457 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
6458 Move from read.c.
6459 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
6460 to section.c.
6461
6462 2020-03-26 Tom Tromey <tom@tromey.com>
6463
6464 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
6465
6466 2020-03-26 Tom Tromey <tom@tromey.com>
6467
6468 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
6469 "builder".
6470 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
6471 parameter.
6472 (dwarf_decode_macros): Update.
6473
6474 2020-03-26 Tom Tromey <tom@tromey.com>
6475
6476 * dwarf2/read.c (read_attribute_value): Update.
6477 (read_indirect_string_from_dwz): Move to dwz.c; change into
6478 method.
6479 (dwarf_decode_macro_bytes): Update.
6480 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
6481 * dwarf2/dwz.c: New file.
6482 * Makefile.in (COMMON_SFILES): Add dwz.c.
6483
6484 2020-03-26 Tom Tromey <tom@tromey.com>
6485
6486 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
6487 * dwarf2/read.c: Add include.
6488 * dwarf2/index-write.c: Add include.
6489 * dwarf2/index-cache.c: Add include.
6490 * dwarf2/dwz.h: New file.
6491
6492 2020-03-25 Tom Tromey <tom@tromey.com>
6493
6494 * compile/compile-object-load.c (get_out_value_type): Mention
6495 correct symbol name in error message.
6496
6497 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
6498
6499 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
6500
6501 2020-03-25 Tom de Vries <tdevries@suse.de>
6502
6503 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
6504 * symmisc.c (dump_symtab_1): Print user and includes fields.
6505 (maintenance_info_symtabs): Same.
6506
6507 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
6508
6509 PR gdb/25534
6510 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
6511 (riscv_regcache_cooked_write): New function.
6512 (riscv_push_dummy_call): Use new function.
6513 (riscv_return_value): Likewise.
6514
6515 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
6516
6517 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
6518 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
6519 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
6520 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
6521 * infrun.c (follow_fork): Likewise.
6522 (follow_fork_inferior): Likewise.
6523 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
6524 * linux-nat.h (class linux_nat_target): Likewise.
6525 * remote.c (class remote_target) <follow_fork>: Likewise.
6526 (remote_target::follow_fork): Likewise.
6527 * target-delegates.c: Re-generate.
6528 * target.c (default_follow_fork): Likewise.
6529 (target_follow_fork): Likewise.
6530 * target.h (struct target_ops) <follow_fork>: Likewise.
6531 (target_follow_fork): Likewise.
6532
6533 2020-03-24 Tom de Vries <tdevries@suse.de>
6534
6535 * psymtab.c (maintenance_info_psymtabs): Print user field.
6536
6537 2020-03-20 Tom Tromey <tromey@adacore.com>
6538
6539 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
6540 const.
6541 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
6542 const.
6543
6544 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
6545
6546 * ptrace.m4: Don't check for ptrace declaration.
6547 * config.in: Re-generate.
6548 * configure: Re-generate.
6549 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
6550 not defined.
6551
6552 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6553
6554 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
6555 `PTRACE_TYPE_RET'.
6556 * i386-bsd-nat.c (gdb_ptrace): Likewise.
6557 * sparc-nat.c (gdb_ptrace): Likewise.
6558 * x86-bsd-nat.c (gdb_ptrace): Likewise.
6559
6560 2020-03-20 Tom Tromey <tromey@adacore.com>
6561
6562 * c-exp.y (lex_one_token): Fix assert.
6563
6564 2020-03-20 Tom Tromey <tromey@adacore.com>
6565
6566 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
6567 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
6568 strncpy call.
6569
6570 2020-03-20 Tom Tromey <tromey@adacore.com>
6571
6572 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
6573
6574 2020-03-20 Tom Tromey <tromey@adacore.com>
6575
6576 * ada-valprint.c (print_variant_part): Remove parameters; switch
6577 to value-based API.
6578 (print_field_values): Likewise.
6579 (ada_val_print_struct_union): Likewise.
6580 (ada_value_print_1): Update.
6581
6582 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6583
6584 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
6585 nbsd_nat_target instead of inf_ptrace_target.
6586 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6587 nbsd_nat_target.
6588
6589 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6590
6591 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
6592 it to the ptrace call.
6593 * (store_registers): Likewise.
6594
6595 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6596
6597 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
6598 it to the ptrace call.
6599 * (store_registers): Likewise.
6600
6601 2020-03-19 Luis Machado <luis.machado@linaro.org>
6602
6603 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
6604 valid, fetch vg value from ptrace.
6605
6606 2020-03-19 Kamil Rytarowski <n54@gmx.com>
6607 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
6608 * inf-ptrace.c: Likewise.
6609 * (gdb_ptrace): Add.
6610 * (inf_ptrace_target::resume): Update.
6611 * (inf_ptrace_target::xfer_partial): Likewise.
6612 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
6613 * (inf_ptrace_peek_poke): Update.
6614
6615 2020-03-19 Kamil Rytarowski <n54@gmx.com>
6616
6617 * x86-bsd-nat.c (gdb_ptrace): New.
6618 * (x86bsd_dr_set): Add new argument `ptid'.
6619 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
6620 x86bsd_dr_set_addr): Update.
6621
6622 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6623
6624 * remote.c (remote_target::process_stop_reply): Handle events for
6625 all threads differently.
6626
6627 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6628
6629 * completer.c (completion_tracker::remove_completion): Define new
6630 function.
6631 * completer.h (completion_tracker::remove_completion): Declare new
6632 function.
6633 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
6634 when adding a C++ function symbol.
6635
6636 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6637
6638 * completer.c (completion_tracker::completion_hash_entry): Define
6639 new class.
6640 (advance_to_filename_complete_word_point): Call
6641 recompute_lowest_common_denominator.
6642 (completion_tracker::completion_tracker): Call discard_completions
6643 to setup the hash table.
6644 (completion_tracker::discard_completions): Allow for being called
6645 from the constructor, pass new equal function, and element deleter
6646 when constructing the hash table. Initialise new class member
6647 variables.
6648 (completion_tracker::maybe_add_completion): Remove use of
6649 m_entries_vec, and store more information into m_entries_hash.
6650 (completion_tracker::recompute_lcd_visitor): New function, most
6651 content taken from...
6652 (completion_tracker::recompute_lowest_common_denominator):
6653 ...here, this now just visits each item in the hash calling the
6654 above visitor.
6655 (completion_tracker::build_completion_result): Remove use of
6656 m_entries_vec, call recompute_lowest_common_denominator.
6657 * completer.h (completion_tracker::have_completions): Remove use
6658 of m_entries_vec.
6659 (completion_tracker::completion_hash_entry): Declare new class.
6660 (completion_tracker::recompute_lowest_common_denominator): Change
6661 function signature.
6662 (completion_tracker::recompute_lcd_visitor): Declare new function.
6663 (completion_tracker::m_entries_vec): Delete.
6664 (completion_tracker::m_entries_hash): Initialize to NULL.
6665 (completion_tracker::m_lowest_common_denominator_valid): New
6666 member variable.
6667 (completion_tracker::m_lowest_common_denominator_max_length): New
6668 member variable.
6669
6670 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6671
6672 * regformats/regdef.h: Put reg in gdb namespace.
6673
6674 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6675
6676 * i386-bsd-nat.c (gdb_ptrace): New.
6677 * (i386bsd_fetch_inferior_registers,
6678 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
6679 * (i386bsd_fetch_inferior_registers,
6680 i386bsd_store_inferior_registers) Use gdb_ptrace.
6681
6682 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6683
6684 * amd64-bsd-nat.c (gdb_ptrace): New.
6685 * (amd64bsd_fetch_inferior_registers,
6686 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
6687 * (amd64bsd_fetch_inferior_registers,
6688 amd64bsd_store_inferior_registers) Use gdb_ptrace.
6689
6690 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6691
6692 * user-regs.c (user_reg::read): Rename to...
6693 (user_reg::xread): ...this.
6694 * (append_user_reg): Rename argument `read' to `xread'.
6695 * (user_reg_add_builtin): Likewise.
6696 * (user_reg_add): Likewise.
6697 * (value_of_user_reg): Likewise.
6698
6699 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6700
6701 * sparc-nat.c (gdb_ptrace): New.
6702 * sparc-nat.c (sparc_fetch_inferior_registers)
6703 (sparc_store_inferior_registers) Remove obsolete comment.
6704 * sparc-nat.c (sparc_fetch_inferior_registers)
6705 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
6706 * sparc-nat.c (sparc_fetch_inferior_registers)
6707 (sparc_store_inferior_registers) Use gdb_ptrace.
6708
6709 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6710
6711 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
6712 it to the ptrace call.
6713 * sh-nbsd-nat.c (store_registers): Likewise.
6714
6715 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6716
6717 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
6718 nbsd_nat_target instead of inf_ptrace_target.
6719 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6720 nbsd_nat_target.
6721
6722 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6723
6724 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
6725
6726 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6727
6728 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
6729 <sys/sysctl.h>.
6730 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
6731
6732 2020-03-17 Tom de Vries <tdevries@suse.de>
6733
6734 PR gdb/23710
6735 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
6736 fields.
6737 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
6738 fields.
6739 (process_imported_unit_die): Skip import of c++ CUs.
6740
6741 2020-03-16 Tom Tromey <tom@tromey.com>
6742
6743 * p-valprint.c (pascal_object_print_value): Initialize
6744 base_value.
6745
6746 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
6747 Shahab Vahedi <shahab@synopsys.com>
6748
6749 * Makefile.in: Add arch/arc.o
6750 * configure.tgt: Likewise.
6751 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
6752 (_initialize_arc_tdep): Don't initialize old target descriptions.
6753 (arc_read_description): New function to cache target descriptions.
6754 * arc-tdep.h (arc_read_description): Add proto type.
6755 * arch/arc.c: New file.
6756 * arch/arc.h: Likewise.
6757 * features/Makefile: Replace old target descriptions with new.
6758 * features/arc-arcompact.c: Remove.
6759 * features/arc-arcompact.xml: Likewise.
6760 * features/arc-v2.c: Likewise
6761 * features/arc-v2.xml: Likewise
6762 * features/arc/aux-arcompact.xml: New file.
6763 * features/arc/aux-v2.xml: Likewise.
6764 * features/arc/core-arcompact.xml: Likewise.
6765 * features/arc/core-v2.xml: Likewise.
6766 * features/arc/aux-arcompact.c: Generate.
6767 * features/arc/aux-v2.c: Likewise.
6768 * features/arc/core-arcompact.c: Likewise.
6769 * features/arc/core-v2.c: Likewise.
6770 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
6771
6772 2020-03-16 Tom Tromey <tromey@adacore.com>
6773
6774 PR gdb/25663:
6775 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
6776 putting value into bcache.
6777
6778 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6779
6780 PR gdb/21500
6781 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
6782 to...
6783 (amd64_windows_init_abi_common): ... this. Don't set size of
6784 long type.
6785 (amd64_windows_init_abi): New function.
6786 (amd64_cygwin_init_abi): New function.
6787 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
6788 the Cygwin OS ABI.
6789 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
6790 comment.
6791
6792 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6793
6794 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
6795 * windows-tdep.c (CYGWIN_DLL_NAME): New.
6796 (pe_import_directory_entry): New struct type.
6797 (is_linked_with_cygwin_dll): New function.
6798 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
6799 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
6800 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
6801
6802 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6803
6804 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
6805 i386_cygwin_core_osabi_sniffer.
6806
6807 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6808
6809 * i386-cygwin-tdep.c: Rename to...
6810 * i386-windows-tdep.c: ... this.
6811 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
6812 i386-windows-tdep.c.
6813 * configure.tgt: Likewise.
6814
6815 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6816
6817 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
6818 * osabi.c (gdb_osabi_names): Add "Windows".
6819 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
6820 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
6821 (i386_cygwin_core_osabi_sniffer): New function, extracted from
6822 i386_cygwin_osabi_sniffer.
6823 (_initialize_i386_cygwin_tdep): Register OS ABI
6824 GDB_OSABI_WINDOWS for i386.
6825 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
6826 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
6827 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
6828 for x86-64.
6829 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
6830 when the target matches '*-*-mingw*'.
6831
6832 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6833
6834 * defs.h (enum gdb_osabi): Move to...
6835 * osabi.h (enum gdb_osabi): ... here.
6836 * gdbarch.sh: Include osabi.h in gdbarch.h.
6837 * gdbarch.h: Re-generate.
6838
6839 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6840
6841 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
6842 function.
6843 (_initialize_amd64_windows_tdep): Register osabi sniffer.
6844
6845 2020-03-14 Tom Tromey <tom@tromey.com>
6846
6847 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
6848 for C++.
6849 (c_type_print_modifier): Likewise. Add "language" parameter.
6850 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
6851 (c_type_print_base_1): Update.
6852 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
6853 constants.
6854 * type-stack.c (type_stack::insert): Handle tp_atomic and
6855 tp_restrict.
6856 (type_stack::follow_type_instance_flags): Likewise.
6857 (type_stack::follow_types): Likewise. Merge type-following code.
6858 * c-exp.y (RESTRICT, ATOMIC): New tokens.
6859 (space_identifier, cv_with_space_id)
6860 (const_or_volatile_or_space_identifier_noopt)
6861 (const_or_volatile_or_space_identifier): Remove.
6862 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
6863 rules.
6864 (ptr_operator, typebase): Update.
6865 (enum token_flag) <FLAG_C>: New constant.
6866 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
6867 "_Atomic".
6868 (lex_one_token): Handle FLAG_C.
6869
6870 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6871
6872 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
6873 it to the ptrace call.
6874 * m68k-bsd-nat.c (store_registers): Likewise.
6875
6876 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6877
6878 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
6879 gdb_byte *.
6880 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
6881 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
6882 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
6883
6884 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6885
6886 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
6887 nbsd_nat_target instead of inf_ptrace_target.
6888 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6889 nbsd_nat_target.
6890
6891 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6892
6893 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
6894 register_t.
6895
6896 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6897
6898 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
6899 it to the ptrace call.
6900 * alpha-bsd-nat.c (store_registers): Likewise.
6901
6902 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6903
6904 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
6905 includes.
6906 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
6907 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
6908 fill_fpregset): Likewise.
6909
6910 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6911
6912 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
6913 nbsd_nat_target instead of inf_ptrace_target.
6914 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6915 nbsd_nat_target.
6916
6917 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6918
6919 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
6920 register_t.
6921
6922 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6923
6924 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
6925 it to the ptrace call.
6926 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
6927 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
6928 * arm-nbsd-nat.c (store_register): Likewise.
6929 * arm-nbsd-nat.c (store_regs): Likewise.
6930 * arm-nbsd-nat.c (store_fp_register): Likewise.
6931 * arm-nbsd-nat.c (store_fp_regs): Likewise.
6932
6933 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6934
6935 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
6936 nbsd_nat_target instead of inf_ptrace_target.
6937 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6938 nbsd_nat_target.
6939
6940 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6941
6942 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
6943 it to the ptrace call.
6944 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
6945
6946 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6947
6948 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
6949 it to the ptrace call.
6950 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
6951
6952 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6953
6954 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
6955 gdb_byte *.
6956 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
6957
6958 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6959
6960 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
6961 instead of inf_ptrace_target.
6962 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6963 nbsd_nat_target.
6964
6965 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6966
6967 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
6968 register_t.
6969
6970 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6971
6972 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
6973 register_t.
6974
6975 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6976
6977 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
6978 register_t.
6979
6980 2020-03-13 Tom Tromey <tom@tromey.com>
6981
6982 * value.h (val_print): Don't declare.
6983 * valprint.h (val_print_array_elements)
6984 (val_print_scalar_formatted, generic_val_print): Don't declare.
6985 * valprint.c (generic_val_print_array): Take a struct value.
6986 (generic_val_print_ptr, generic_val_print_memberptr)
6987 (generic_val_print_bool, generic_val_print_int)
6988 (generic_val_print_char, generic_val_print_complex)
6989 (generic_val_print): Remove.
6990 (generic_value_print): Update.
6991 (do_val_print): Remove unused parameters. Don't call
6992 la_val_print.
6993 (val_print): Remove.
6994 (common_val_print): Update. Don't call value_check_printable.
6995 (val_print_scalar_formatted, val_print_array_elements): Remove.
6996 * rust-lang.c (rust_val_print): Remove.
6997 (rust_language_defn): Update.
6998 * p-valprint.c (pascal_val_print): Remove.
6999 (pascal_value_print_inner): Update.
7000 (pascal_object_print_val_fields, pascal_object_print_val):
7001 Remove.
7002 (pascal_object_print_static_field): Update.
7003 * p-lang.h (pascal_val_print): Don't declare.
7004 * p-lang.c (pascal_language_defn): Update.
7005 * opencl-lang.c (opencl_language_defn): Update.
7006 * objc-lang.c (objc_language_defn): Update.
7007 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
7008 * m2-lang.h (m2_val_print): Don't declare.
7009 * m2-lang.c (m2_language_defn): Update.
7010 * language.h (struct language_defn) <la_val_print>: Remove.
7011 * language.c (unk_lang_value_print_inner): Rename. Change
7012 argument types.
7013 (unknown_language_defn, auto_language_defn): Update.
7014 * go-valprint.c (go_val_print): Remove.
7015 * go-lang.h (go_val_print): Don't declare.
7016 * go-lang.c (go_language_defn): Update.
7017 * f-valprint.c (f_val_print): Remove.
7018 * f-lang.h (f_value_print): Don't declare.
7019 * f-lang.c (f_language_defn): Update.
7020 * d-valprint.c (d_val_print): Remove.
7021 * d-lang.h (d_value_print): Don't declare.
7022 * d-lang.c (d_language_defn): Update.
7023 * cp-valprint.c (cp_print_value_fields)
7024 (cp_print_value_fields_rtti, cp_print_value): Remove.
7025 (cp_print_static_field): Update.
7026 * c-valprint.c (c_val_print_array, c_val_print_ptr)
7027 (c_val_print_struct, c_val_print_union, c_val_print_int)
7028 (c_val_print_memberptr, c_val_print): Remove.
7029 * c-lang.h (c_val_print_array, cp_print_value_fields)
7030 (cp_print_value_fields_rtti): Don't declare.
7031 * c-lang.c (c_language_defn, cplus_language_defn)
7032 (asm_language_defn, minimal_language_defn): Update.
7033 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
7034 (ada_val_print_enum): Take a struct value.
7035 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
7036 (ada_val_print): Remove.
7037 (ada_value_print_1): Update.
7038 (printable_val_type): Remove.
7039 * ada-lang.h (ada_val_print): Don't declare.
7040 * ada-lang.c (ada_language_defn): Update.
7041
7042 2020-03-13 Tom Tromey <tom@tromey.com>
7043
7044 * valprint.c (do_val_print): Update.
7045 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
7046 a struct value.
7047 (value_to_value_object_no_release): Declare.
7048 * python/py-value.c (value_to_value_object_no_release): New
7049 function.
7050 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
7051 struct value.
7052 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
7053 function.
7054 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
7055 a struct value.
7056 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
7057 Declare.
7058 (gdbscm_apply_val_pretty_printer): Take a struct value.
7059 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
7060 value.
7061 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
7062 value.
7063 * extension-priv.h (struct extension_language_ops)
7064 <apply_val_pretty_printer>: Take a struct value.
7065 * cp-valprint.c (cp_print_value): Create a struct value.
7066 (cp_print_value): Update.
7067
7068 2020-03-13 Tom Tromey <tom@tromey.com>
7069
7070 * ada-valprint.c (print_field_values): Call common_val_print.
7071
7072 2020-03-13 Tom Tromey <tom@tromey.com>
7073
7074 * ada-valprint.c (val_print_packed_array_elements): Remove
7075 bitoffset and val parameters. Call common_val_print.
7076 (ada_val_print_string): Remove offset, address, and original_value
7077 parameters.
7078 (ada_val_print_array): Update.
7079 (ada_value_print_array): New function.
7080 (ada_value_print_1): Call it.
7081
7082 2020-03-13 Tom Tromey <tom@tromey.com>
7083
7084 * ada-valprint.c (ada_value_print): Use common_val_print.
7085
7086 2020-03-13 Tom Tromey <tom@tromey.com>
7087
7088 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
7089
7090 2020-03-13 Tom Tromey <tom@tromey.com>
7091
7092 * ada-valprint.c (ada_value_print_num): New function.
7093 (ada_value_print_1): Use it.
7094
7095 2020-03-13 Tom Tromey <tom@tromey.com>
7096
7097 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
7098
7099 2020-03-13 Tom Tromey <tom@tromey.com>
7100
7101 * ada-valprint.c (ada_value_print_ptr): New function.
7102 (ada_value_print_1): Use it.
7103
7104 2020-03-13 Tom Tromey <tom@tromey.com>
7105
7106 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
7107 call common_val_print.
7108 (ada_val_print_1): Update.
7109 (ada_value_print_1): New function.
7110 (ada_value_print_inner): Rewrite.
7111
7112 2020-03-13 Tom Tromey <tom@tromey.com>
7113
7114 * cp-valprint.c (cp_print_value_fields): Update.
7115 (cp_print_value): New function.
7116
7117 2020-03-13 Tom Tromey <tom@tromey.com>
7118
7119 * m2-valprint.c (m2_value_print_inner): Use
7120 cp_print_value_fields.
7121 * cp-valprint.c (cp_print_value_fields): New function.
7122 * c-valprint.c (c_value_print_struct): New function.
7123 (c_value_print_inner): Use c_value_print_struct.
7124 * c-lang.h (cp_print_value_fields): Declare.
7125
7126 2020-03-13 Tom Tromey <tom@tromey.com>
7127
7128 * c-valprint.c (c_value_print_array): New function.
7129 (c_value_print_inner): Use it.
7130
7131 2020-03-13 Tom Tromey <tom@tromey.com>
7132
7133 * c-valprint.c (c_value_print_memberptr): New function.
7134 (c_value_print_inner): Use it.
7135
7136 2020-03-13 Tom Tromey <tom@tromey.com>
7137
7138 * c-valprint.c (c_value_print_int): New function.
7139 (c_value_print_inner): Use it.
7140
7141 2020-03-13 Tom Tromey <tom@tromey.com>
7142
7143 * c-valprint.c (c_value_print_ptr): New function.
7144 (c_value_print_inner): Use it.
7145
7146 2020-03-13 Tom Tromey <tom@tromey.com>
7147
7148 * c-valprint.c (c_value_print_inner): Rewrite.
7149
7150 2020-03-13 Tom Tromey <tom@tromey.com>
7151
7152 * valprint.c (generic_value_print_complex): New function.
7153 (generic_value_print): Use it.
7154
7155 2020-03-13 Tom Tromey <tom@tromey.com>
7156
7157 * valprint.c (generic_val_print_float): Don't call
7158 val_print_scalar_formatted.
7159 (generic_val_print, generic_value_print): Update.
7160
7161 2020-03-13 Tom Tromey <tom@tromey.com>
7162
7163 * valprint.c (generic_value_print_char): New function
7164 (generic_value_print): Use it.
7165
7166 2020-03-13 Tom Tromey <tom@tromey.com>
7167
7168 * valprint.c (generic_value_print_int): New function.
7169 (generic_value_print): Use it.
7170
7171 2020-03-13 Tom Tromey <tom@tromey.com>
7172
7173 * valprint.c (generic_value_print_bool): New function.
7174 (generic_value_print): Use it.
7175
7176 2020-03-13 Tom Tromey <tom@tromey.com>
7177
7178 * valprint.c (generic_val_print_func): Simplify.
7179 (generic_val_print, generic_value_print): Update.
7180
7181 2020-03-13 Tom Tromey <tom@tromey.com>
7182
7183 * valprint.c (generic_val_print_flags): Remove.
7184 (generic_val_print, generic_value_print): Update.
7185 (val_print_type_code_flags): Add original_value parameter.
7186
7187 2020-03-13 Tom Tromey <tom@tromey.com>
7188
7189 * valprint.c (generic_val_print): Update.
7190 (generic_value_print): Update.
7191 * valprint.c (generic_val_print_enum): Don't call
7192 val_print_scalar_formatted.
7193
7194 2020-03-13 Tom Tromey <tom@tromey.com>
7195
7196 * valprint.c (generic_value_print): Call generic_value_print_ptr.
7197 * valprint.c (generic_value_print_ptr): New function.
7198
7199 2020-03-13 Tom Tromey <tom@tromey.com>
7200
7201 * valprint.c (generic_value_print): Rewrite.
7202
7203 2020-03-13 Tom Tromey <tom@tromey.com>
7204
7205 * p-valprint.c (pascal_object_print_value_fields)
7206 (pascal_object_print_value): New functions.
7207
7208 2020-03-13 Tom Tromey <tom@tromey.com>
7209
7210 * p-valprint.c (pascal_value_print_inner): Rewrite.
7211
7212 2020-03-13 Tom Tromey <tom@tromey.com>
7213
7214 * f-valprint.c (f_value_print_innner): Rewrite.
7215
7216 2020-03-13 Tom Tromey <tom@tromey.com>
7217
7218 * m2-valprint.c (m2_print_unbounded_array): New overload.
7219 (m2_print_unbounded_array): Update.
7220 (m2_print_array_contents): Take a struct value.
7221 (m2_value_print_inner): Rewrite.
7222
7223 2020-03-13 Tom Tromey <tom@tromey.com>
7224
7225 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
7226 (d_value_print_inner): New function.
7227 * d-lang.h (d_value_print_inner): Declare.
7228 * d-lang.c (d_language_defn): Use d_value_print_inner.
7229
7230 2020-03-13 Tom Tromey <tom@tromey.com>
7231
7232 * go-valprint.c (go_value_print_inner): New function.
7233 * go-lang.h (go_value_print_inner): Declare.
7234 * go-lang.c (go_language_defn): Use go_value_print_inner.
7235
7236 2020-03-13 Tom Tromey <tom@tromey.com>
7237
7238 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
7239 API.
7240 (rust_val_print): Rewrite.
7241 (rust_value_print_inner): New function, from rust_val_print.
7242 (rust_language_defn): Use rust_value_print_inner.
7243
7244 2020-03-13 Tom Tromey <tom@tromey.com>
7245
7246 * ada-valprint.c (ada_value_print_inner): New function.
7247 * ada-lang.h (ada_value_print_inner): Declare.
7248 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
7249
7250 2020-03-13 Tom Tromey <tom@tromey.com>
7251
7252 * f-valprint.c (f_value_print_innner): New function.
7253 * f-lang.h (f_value_print_innner): Declare.
7254 * f-lang.c (f_language_defn): Use f_value_print_innner.
7255
7256 2020-03-13 Tom Tromey <tom@tromey.com>
7257
7258 * p-valprint.c (pascal_value_print_inner): New function.
7259 * p-lang.h (pascal_value_print_inner): Declare.
7260 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
7261
7262 2020-03-13 Tom Tromey <tom@tromey.com>
7263
7264 * m2-valprint.c (m2_value_print_inner): New function.
7265 * m2-lang.h (m2_value_print_inner): Declare.
7266 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
7267
7268 2020-03-13 Tom Tromey <tom@tromey.com>
7269
7270 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
7271 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
7272 * c-valprint.c (c_value_print_inner): New function.
7273 * c-lang.h (c_value_print_inner): Declare.
7274 * c-lang.c (c_language_defn, cplus_language_defn)
7275 (asm_language_defn, minimal_language_defn): Use
7276 c_value_print_inner.
7277
7278 2020-03-13 Tom Tromey <tom@tromey.com>
7279
7280 * p-valprint.c (pascal_object_print_value_fields): Now static.
7281 * p-lang.h (pascal_object_print_value_fields): Don't declare.
7282
7283 2020-03-13 Tom Tromey <tom@tromey.com>
7284
7285 * c-valprint.c (c_val_print_array): Simplify.
7286
7287 2020-03-13 Tom Tromey <tom@tromey.com>
7288
7289 * valprint.c (value_print_array_elements): New function.
7290 * valprint.h (value_print_array_elements): Declare.
7291
7292 2020-03-13 Tom Tromey <tom@tromey.com>
7293
7294 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
7295 * mips-tdep.c (mips_print_register): Use
7296 value_print_scalar_formatted.
7297
7298 2020-03-13 Tom Tromey <tom@tromey.com>
7299
7300 * valprint.h (value_print_scalar_formatted): Declare.
7301 * valprint.c (value_print_scalar_formatted): New function.
7302
7303 2020-03-13 Tom Tromey <tom@tromey.com>
7304
7305 * valprint.h (generic_value_print): Declare.
7306 * valprint.c (generic_value_print): New function.
7307
7308 2020-03-13 Tom Tromey <tom@tromey.com>
7309
7310 * valprint.c (do_val_print): Call la_value_print_inner, if
7311 available.
7312 * rust-lang.c (rust_language_defn): Update.
7313 * p-lang.c (pascal_language_defn): Update.
7314 * opencl-lang.c (opencl_language_defn): Update.
7315 * objc-lang.c (objc_language_defn): Update.
7316 * m2-lang.c (m2_language_defn): Update.
7317 * language.h (struct language_defn) <la_value_print_inner>: New
7318 member.
7319 * language.c (unknown_language_defn, auto_language_defn): Update.
7320 * go-lang.c (go_language_defn): Update.
7321 * f-lang.c (f_language_defn): Update.
7322 * d-lang.c (d_language_defn): Update.
7323 * c-lang.c (c_language_defn, cplus_language_defn)
7324 (asm_language_defn, minimal_language_defn): Update.
7325 * ada-lang.c (ada_language_defn): Update.
7326
7327 2020-03-13 Tom Tromey <tom@tromey.com>
7328
7329 * c-valprint.c (c_value_print): Use common_val_print.
7330
7331 2020-03-13 Tom Tromey <tom@tromey.com>
7332
7333 * cp-valprint.c (cp_print_static_field): Use common_val_print.
7334
7335 2020-03-13 Tom Tromey <tom@tromey.com>
7336
7337 * f-valprint.c (f77_print_array_1, f_val_print): Use
7338 common_val_print.
7339
7340 2020-03-13 Tom Tromey <tom@tromey.com>
7341
7342 * riscv-tdep.c (riscv_print_one_register_info): Use
7343 common_val_print.
7344
7345 2020-03-13 Tom Tromey <tom@tromey.com>
7346
7347 * mi/mi-main.c (output_register): Use common_val_print.
7348
7349 2020-03-13 Tom Tromey <tom@tromey.com>
7350
7351 * infcmd.c (default_print_one_register_info): Use
7352 common_val_print.
7353
7354 2020-03-13 Tom Tromey <tom@tromey.com>
7355
7356 * valprint.h (common_val_print_checked): Declare.
7357 * valprint.c (common_val_print_checked): New function.
7358 * stack.c (print_frame_arg): Use common_val_print_checked.
7359
7360 2020-03-13 Tom Tromey <tom@tromey.com>
7361
7362 * valprint.c (do_val_print): New function, from val_print.
7363 (val_print): Use do_val_print.
7364 (common_val_print): Use do_val_print.
7365
7366 2020-03-13 Tom Tromey <tom@tromey.com>
7367
7368 * valprint.c (value_print): Use scoped_value_mark.
7369
7370 2020-03-13 Tom de Vries <tdevries@suse.de>
7371
7372 PR symtab/25646
7373 * psymtab.c (partial_symtab::partial_symtab): Don't set
7374 globals_offset and statics_offset. Push element onto
7375 current_global_psymbols and current_static_psymbols stacks.
7376 (concat): New function.
7377 (end_psymtab_common): Set globals_offset and statics_offset. Pop
7378 element from current_global_psymbols and current_static_psymbols
7379 stacks. Concat popped elements to global_psymbols and
7380 static_symbols.
7381 (add_psymbol_to_list): Use current_global_psymbols and
7382 current_static_psymbols stacks.
7383 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
7384 current_static_psymbols fields.
7385
7386 2020-03-12 Christian Biesinger <cbiesinger@google.com>
7387
7388 * corelow.c (sniff_core_bfd): Remove.
7389 (class core_target) <m_core_vec>: Remove.
7390 (core_target::core_target): Update.
7391 (core_file_fns): Remove.
7392 (deprecated_add_core_fns): Remove.
7393 (default_core_sniffer): Remove.
7394 (sniff_core_bfd): Remove.
7395 (default_check_format): Remove.
7396 (gdb_check_format): Remove.
7397 (core_target_open): Update.
7398 (core_target::get_core_register_section): Update.
7399 (get_core_registers_cb): Update.
7400 (core_target::fetch_registers): Update.
7401 * gdbcore.h (struct core_fns): Remove.
7402 (deprecated_add_core_fns): Remove.
7403 (default_core_sniffer): Remove.
7404 (default_check_format): Remove.
7405
7406 2020-03-12 Tom Tromey <tom@tromey.com>
7407
7408 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
7409 CORE_ADDR.
7410 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
7411
7412 2020-03-12 Tom Tromey <tom@tromey.com>
7413
7414 * remote.c (remote_target::download_tracepoint)
7415 (remote_target::enable_tracepoint)
7416 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
7417 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
7418 sprintf_vma.
7419
7420 2020-03-12 Tom Tromey <tom@tromey.com>
7421
7422 * symfile-mem.c: Update CORE_ADDR size assert.
7423
7424 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7425
7426 * selftest.m4: Move to gdbsupport/.
7427 * acinclude.m4: Update path to selftest.m4.
7428
7429 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7430
7431 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
7432 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
7433 gdbarch-selfselftests.c and selftest-arch.c.
7434 (SUBDIR_UNITTESTS_OBS): Rename to...
7435 (SELFTESTS_OBS): ... this.
7436 (COMMON_SFILES): Remove disasm-selftests.c and
7437 gdbarch-selftests.c.
7438 * configure.ac: Don't add selftest-arch.{c,o} to
7439 CONFIG_{SRCS,OBS}.
7440 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
7441 preprocessor conditions.
7442
7443 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7444
7445 * configure.ac: Don't source bfd/development.sh.
7446 * selftest.m4: Modify comment.
7447 * configure: Re-generate.
7448
7449 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7450
7451 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
7452 not "true" or "false".
7453 * configure: Re-generate.
7454
7455 2020-03-12 Christian Biesinger <cbiesinger@google.com>
7456
7457 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
7458 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
7459 renamed to arm_nbsd_supply_gregset.
7460 (fetch_register): Update to call arm_nbsd_supply_gregset.
7461 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
7462 (arm_netbsd_nat_target::fetch_registers): Update.
7463 (fetch_elfcore_registers): Removed.
7464 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
7465 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
7466 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
7467 not require NetBSD system headers.
7468 (arm_nbsd_regset): New struct.
7469 (arm_nbsd_iterate_over_regset_sections): New function.
7470 (arm_netbsd_init_abi_common): Updated to call
7471 set_gdbarch_iterate_over_regset_sections.
7472 * arm-nbsd-tdep.h: New file.
7473
7474 2020-03-11 Kevin Buettner <kevinb@redhat.com>
7475
7476 * symtab.c (find_pc_sect_line): Add check which prevents infinite
7477 recursion.
7478
7479 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
7480
7481 * configure: Re-generate.
7482
7483 2020-03-11 Tom Tromey <tromey@adacore.com>
7484
7485 * ada-typeprint.c (print_choices): Fix comment.
7486
7487 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
7488
7489 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
7490 previous item in the list, when the list has no items.
7491
7492 2020-03-11 Tom de Vries <tdevries@suse.de>
7493
7494 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
7495 PROP_LOCLIST handling code.
7496
7497 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
7498
7499 * buildsym-legacy.c (record_line): Pass extra parameter to
7500 record_line.
7501 * buildsym.c (buildsym_compunit::record_line): Take an extra
7502 parameter, reduce duplication in the line table, and record the
7503 is_stmt flag in the line table.
7504 * buildsym.h (buildsym_compunit::record_line): Add extra
7505 parameter.
7506 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
7507 non-statement lines.
7508 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
7509 this to the symtab builder.
7510 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
7511 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
7512 through to dwarf_record_line_1.
7513 * infrun.c (process_event_stop_test): When stepping, don't stop at
7514 a non-statement instruction, and only refresh the step info when
7515 we land in the middle of a line's range. Also add an extra
7516 comment.
7517 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
7518 field.
7519 * record-btrace.c (btrace_find_line_range): Only record lines
7520 marked as is-statement.
7521 * stack.c (frame_show_address): Show the frame address if we are
7522 in a non-statement sal.
7523 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
7524 (maintenance_print_one_line_table): Print a header for the is_stmt
7525 column, and include is_stmt information in the output.
7526 * symtab.c (find_pc_sect_line): Find lines marked as statements in
7527 preference to non-statements.
7528 (find_pcs_for_symtab_line): Prefer is-statement entries.
7529 (find_line_common): Likewise.
7530 * symtab.h (struct linetable_entry): Add is_stmt field.
7531 (struct symtab_and_line): Likewise.
7532 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
7533 arranging the line table.
7534
7535 2020-03-07 Tom de Vries <tdevries@suse.de>
7536
7537 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
7538 DIE.
7539
7540 2020-03-07 Tom Tromey <tom@tromey.com>
7541
7542 * valops.c (value_literal_complex): Remove obsolete comment.
7543 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
7544 comment.
7545
7546 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7547
7548 * infrun.h: Forward-declare thread_info.
7549 (set_step_info): Add thread_info parameter, add doc.
7550 * infrun.c (set_step_info): Add thread_info parameter, move doc
7551 to header.
7552 * infrun.c (process_event_stop_test): Pass thread to
7553 set_step_info call.
7554 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
7555 set_step_info.
7556 (prepare_one_step): Add thread_info parameter, pass it to
7557 set_step_frame and prepare_one_step (recursive) call.
7558 (step_1): Pass thread to prepare_one_step call.
7559 (step_command_fsm::should_stop): Pass thread to
7560 prepare_one_step.
7561 (until_next_fsm): Pass thread to set_step_frame call.
7562 (finish_command): Pass thread to set_step_info call.
7563
7564 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
7565
7566 * windows-tdep.c (windows_solib_create_inferior_hook):
7567 Check if inferior is running.
7568
7569 2020-03-06 Tom de Vries <tdevries@suse.de>
7570
7571 * NEWS: Fix "the the".
7572 * ctfread.c: Same.
7573
7574 2020-03-06 Tom de Vries <tdevries@suse.de>
7575
7576 * psymtab.c (psymtab_to_symtab): Don't print "done.".
7577
7578 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7579
7580 * .dir-locals.el: Add a comment referencing the other copies of
7581 this file.
7582
7583 2020-03-05 John Baldwin <jhb@FreeBSD.org>
7584
7585 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
7586 psargs.
7587
7588 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7589
7590 * .gitattributes: New file.
7591
7592 2020-03-04 Tom Tromey <tom@tromey.com>
7593
7594 * symmisc.c (print_symbol_bcache_statistics)
7595 (print_objfile_statistics): Update.
7596 * symfile.c (allocate_symtab): Use intern.
7597 * psymtab.c (partial_symtab::partial_symtab): Use intern.
7598 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
7599 macro_cache>: Remove.
7600 <string_cache>: New member.
7601 (struct objfile) <intern>: New methods.
7602 * elfread.c (elf_symtab_read): Use intern.
7603 * dwarf2/read.c (fixup_go_packaging): Intern package name.
7604 (dwarf2_compute_name, dwarf2_physname)
7605 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
7606 names.
7607 (guess_partial_die_structure_name): Update.
7608 (partial_die_info::fixup): Intern name.
7609 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
7610 name.
7611 (dwarf2_name): Intern name. Update.
7612 * buildsym.c (buildsym_compunit::get_macro_table): Use
7613 string_cache.
7614
7615 2020-03-04 Tom Tromey <tom@tromey.com>
7616
7617 * jit.c (bfd_open_from_target_memory): Make "target" const.
7618 * corefile.c (gnutarget): Now const.
7619 * gdbcore.h (gnutarget): Now const.
7620
7621 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
7622
7623 * NEWS: Mention support for WOW64 processes.
7624 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
7625 (amd64_windows_segment_register_p): Remove static.
7626 (_initialize_amd64_windows_nat): Update.
7627 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
7628 * i386-windows-nat.c (context_offset): Update.
7629 (i386_mappings): Rename and remove static.
7630 (i386_windows_segment_register_p): Remove static.
7631 (_initialize_i386_windows_nat): Update.
7632 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
7633 (STATUS_WX86_SINGLE_STEP): New macro.
7634 (EnumProcessModulesEx): New macro.
7635 (Wow64SuspendThread): New macro.
7636 (Wow64GetThreadContext): New macro.
7637 (Wow64SetThreadContext): New macro.
7638 (Wow64GetThreadSelectorEntry): New macro.
7639 (windows_set_context_register_offsets): Add static.
7640 (windows_set_segment_register_p): Likewise.
7641 (windows_add_thread): Adapt for WOW64 processes.
7642 (windows_fetch_one_register): Likewise.
7643 (windows_nat_target::fetch_registers): Likewise.
7644 (windows_store_one_register): Likewise.
7645 (display_selector): Likewise.
7646 (display_selectors): Likewise.
7647 (handle_exception): Likewise.
7648 (windows_continue): Likewise.
7649 (windows_nat_target::resume): Likewise.
7650 (windows_add_all_dlls): Likewise.
7651 (do_initial_windows_stuff): Likewise.
7652 (windows_nat_target::attach): Likewise.
7653 (windows_get_exec_module_filename): Likewise.
7654 (windows_nat_target::create_inferior): Likewise.
7655 (windows_xfer_siginfo): Likewise.
7656 (_initialize_loadable): Initialize Wow64SuspendThread,
7657 Wow64GetThreadContext, Wow64SetThreadContext,
7658 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
7659 * windows-nat.h (windows_set_context_register_offsets):
7660 Remove declaration.
7661 (windows_set_segment_register_p): Likewise.
7662 (i386_windows_segment_register_p): Add declaration.
7663 (amd64_windows_segment_register_p): Likewise.
7664
7665 2020-03-04 Luis Machado <luis.machado@linaro.org>
7666
7667 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
7668 in "info registers" for AArch64/ARM.
7669
7670 The change caused "info registers" to not print GPR's.
7671
7672 gdb/ChangeLog:
7673
7674 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
7675
7676 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
7677 when reg->group is empty and reggroup is not.
7678
7679 2020-03-03 Tom Tromey <tromey@adacore.com>
7680
7681 * dwarf2/frame.c (struct dwarf2_frame_cache)
7682 <checked_tailcall_bottom, entry_cfa_sp_offset,
7683 entry_cfa_sp_offset_p>: Remove members.
7684 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
7685 (dwarf2_frame_prev_register): Don't call
7686 dwarf2_tailcall_sniffer_first.
7687 (dwarf2_append_unwinders): Don't append tailcall unwinder.
7688 * frame-unwind.c (add_unwinder): New fuction.
7689 (frame_unwind_init): Use it. Add tailcall unwinder.
7690
7691 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
7692 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
7693
7694 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
7695 value should be printed as true.
7696
7697 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
7698
7699 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
7700 (windows_init_abi): Set and use windows_so_ops.
7701
7702 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
7703
7704 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
7705 when verifying if dealing with a convenience variable.
7706
7707 2020-03-03 Luis Machado <luis.machado@linaro.org>
7708
7709 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
7710
7711 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7712
7713 * infrun.c (gdbarch_supports_displaced_stepping): New.
7714 (use_displaced_stepping): Break up conditions in smaller pieces.
7715 Use gdbarch_supports_displaced_stepping.
7716 (displaced_step_prepare_throw): Use
7717 gdbarch_supports_displaced_stepping.
7718
7719 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
7720
7721 * NEWS: Mention new behaviour of the history filename.
7722 * top.c (write_history_p): Add comment.
7723 (show_write_history_p): Add header comment, give a different
7724 message when history writing is on, but the history filename is
7725 empty.
7726 (history_filename): Add comment.
7727 (history_filename_empty): New function.
7728 (show_history_filename): Add header comment, give a different
7729 message when the filename is empty.
7730 (init_history): Compare history_filename against nullptr, and only
7731 read history if the filename is not empty.
7732 (set_history_filename): Add header comment, and only make
7733 non-empty filenames absolute.
7734 (init_main): Make the filename argument to 'set history filename'
7735 optional.
7736
7737 2020-03-02 Christian Biesinger <cbiesinger@google.com>
7738
7739 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
7740 (arm_supply_vfpregset): ...this, and update to use VFP registers.
7741 (fetch_fp_register): Update.
7742 (fetch_fp_regs): Update.
7743 (store_fp_register): Update.
7744 (store_fp_regs): Update.
7745 (arm_netbsd_nat_target::read_description): New function.
7746 (fetch_elfcore_registers): Update.
7747
7748 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
7749
7750 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
7751 general_thread if the stop reply is missing a thread-id.
7752 (remote_target::process_stop_reply): Use the first non-exited
7753 thread if the target didn't pass a thread-id.
7754 * infrun.c (do_target_wait): Move call to
7755 switch_to_inferior_no_thread to ....
7756 (do_target_wait_1): ... here.
7757
7758 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
7759
7760 * debuginfod-support.c: Include defs.h first.
7761
7762 2020-02-28 Tom de Vries <tdevries@suse.de>
7763
7764 * symfile.c (set_initial_language): Use default language for lookup.
7765
7766 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
7767
7768 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
7769 reader variable, pass `this` to read_cutu_die_from_dwo.
7770
7771 2020-02-27 Aaron Merey <amerey@redhat.com>
7772
7773 * source.c (open_source_file): Check for nullptr when computing
7774 srcpath.
7775
7776 2020-02-27 Tom Tromey <tromey@adacore.com>
7777
7778 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
7779 member.
7780 (dwarf2_add_field): Don't update nfields.
7781 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
7782
7783 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
7784
7785 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
7786 abs.
7787
7788 2020-02-26 Tom Tromey <tom@tromey.com>
7789
7790 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
7791 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
7792 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
7793 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
7794 per_cu_data.
7795
7796 2020-02-26 Tom Tromey <tom@tromey.com>
7797
7798 * dwarf2/index-write.c (psym_index_map): Change type.
7799 (add_address_entry_worker, write_one_signatured_type)
7800 (recursively_count_psymbols, recursively_write_psymbols)
7801 (class debug_names, psyms_seen_size, write_gdbindex)
7802 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
7803
7804 2020-02-26 Aaron Merey <amerey@redhat.com>
7805
7806 * Makefile.in: Handle optional debuginfod support.
7807 * NEWS: Update.
7808 * README: Add --with-debuginfod summary.
7809 * config.in: Regenerate.
7810 * configure: Regenerate.
7811 * configure.ac: Handle optional debuginfod support.
7812 * debuginfod-support.c: debuginfod helper functions.
7813 * debuginfod-support.h: Ditto.
7814 * doc/gdb.texinfo: Add --with-debuginfod to configure options
7815 summary.
7816 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
7817 when a dwz file cannot be found.
7818 * elfread.c (elf_symfile_read): Query debuginfod servers when a
7819 debuginfo file cannot be found.
7820 * source.c (open_source_file): Query debuginfod servers when a
7821 source file cannot be found.
7822 * top.c (print_gdb_configuration): Include
7823 --{with,without}-debuginfod in the output.
7824
7825 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7826
7827 * thread.c (thr_try_catch_cmd): Print thread name.
7828
7829 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
7830
7831 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
7832 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7833 dwarf2_fetch_die_type_sect_off): Move to...
7834 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
7835 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7836 dwarf2_fetch_die_type_sect_off): ... here.
7837 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
7838 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7839 dwarf2_fetch_die_type_sect_off): Move doc to header file.
7840
7841 2020-02-26 Tom de Vries <tdevries@suse.de>
7842
7843 PR gdb/25603
7844 * symfile.c (set_initial_language): Exit-early if
7845 language_mode == language_mode_manual.
7846
7847 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
7848
7849 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
7850 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
7851 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
7852
7853 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
7854
7855 * gdbtypes.c (create_array_type_with_stride): Handle negative
7856 array strides.
7857 * valarith.c (value_subscripted_rvalue): Likewise.
7858
7859 2020-02-25 Luis Machado <luis.machado@linaro.org>
7860
7861 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
7862
7863 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
7864
7865 * loc.h (dwarf2_get_die_type): Move to...
7866 * read.h (dwarf2_get_die_type): ... here.
7867 * read.c (dwarf2_get_die_type): Move doc to header.
7868
7869 2020-02-25 Joel Brobecker <brobecker@adacore.com>
7870
7871 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
7872 'gnulib/Makefile.in' to the list.
7873
7874 2020-02-24 Tom Tromey <tom@tromey.com>
7875
7876 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
7877 Remove.
7878 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
7879 XOBNEWVEC.
7880
7881 2020-02-24 Tom Tromey <tom@tromey.com>
7882
7883 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
7884 New method.
7885 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
7886 (dw2_do_instantiate_symtab, dw2_get_file_names)
7887 (build_type_psymtab_dependencies, load_full_type_unit): Update.
7888
7889 2020-02-24 Tom Tromey <tom@tromey.com>
7890
7891 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
7892 make_scoped_restore.
7893 (dwarf2_psymtab::read_symtab): Don't clear
7894 reading_partial_symbols.
7895
7896 2020-02-24 Tom de Vries <tdevries@suse.de>
7897
7898 PR gdb/25592
7899 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
7900
7901 2020-02-24 Tom de Vries <tdevries@suse.de>
7902
7903 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
7904 commands layout next/prev/regs.
7905
7906 2020-02-22 Tom Tromey <tom@tromey.com>
7907
7908 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
7909 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
7910
7911 2020-02-22 Tom Tromey <tom@tromey.com>
7912
7913 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
7914
7915 2020-02-22 Tom Tromey <tom@tromey.com>
7916
7917 * tui/tui-win.c (_initialize_tui_win): Add usage text.
7918 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
7919 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
7920 * tui/tui.c (_initialize_tui): Add usage text.
7921
7922 2020-02-22 Tom Tromey <tom@tromey.com>
7923
7924 * tui/tui-win.c (tui_set_focus_command)
7925 (tui_set_win_height_command): Use error_no_arg.
7926 (_initialize_tui_win): Update help text.
7927 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
7928
7929 2020-02-22 Tom Tromey <tom@tromey.com>
7930
7931 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
7932 * tui/tui-disasm.h (struct tui_disasm_window)
7933 <display_start_addr>: Declare.
7934 * tui/tui-source.h (struct tui_source_window)
7935 <display_start_addr>: Declare.
7936 * tui/tui-winsource.h (struct tui_source_window_base)
7937 <show_source_line, display_start_addr>: New methods.
7938 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
7939 Rename and move to protected section.
7940 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
7941 (tui_source_window_base::do_erase_source_content): Update.
7942 (tui_source_window_base::show_source_line): Now a method.
7943 (tui_source_window_base::show_source_content)
7944 (tui_source_window_base::tui_source_window_base)
7945 (tui_source_window_base::rerender)
7946 (tui_source_window_base::refill)
7947 (tui_source_window_base::do_scroll_horizontal)
7948 (tui_source_window_base::set_is_exec_point_at)
7949 (tui_source_window_base::update_breakpoint_info)
7950 (tui_source_window_base::update_exec_info): Update.
7951 * tui/tui-source.c (tui_source_window::set_contents)
7952 (tui_source_window::showing_source_p)
7953 (tui_source_window::do_scroll_vertical)
7954 (tui_source_window::location_matches_p)
7955 (tui_source_window::line_is_displayed): Update.
7956 (tui_source_window::display_start_addr): New method.
7957 * tui/tui-disasm.c (tui_disasm_window::set_contents)
7958 (tui_disasm_window::do_scroll_vertical)
7959 (tui_disasm_window::location_matches_p): Update.
7960 (tui_disasm_window::display_start_addr): New method.
7961
7962 2020-02-22 Tom Tromey <tom@tromey.com>
7963
7964 * NEWS: Add entry for gdb.register_window_type.
7965 * tui/tui-layout.h (window_factory): New typedef.
7966 (tui_register_window): Declare.
7967 * tui/tui-layout.c (saved_tui_windows): New global.
7968 (tui_apply_current_layout): Use it.
7969 (tui_register_window): New function.
7970 * python/python.c (do_start_initialization): Call
7971 gdbpy_initialize_tui.
7972 (python_GdbMethods): Add "register_window_type" function.
7973 * python/python-internal.h (gdbpy_register_tui_window)
7974 (gdbpy_initialize_tui): Declare.
7975 * python/py-tui.c: New file.
7976 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
7977
7978 2020-02-22 Tom Tromey <tom@tromey.com>
7979
7980 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
7981
7982 2020-02-22 Tom Tromey <tom@tromey.com>
7983
7984 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
7985 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
7986 * tui/tui-data.c (tui_set_win_with_focus): Remove.
7987 (tui_set_win_focus_to): Move from tui-win.c.
7988
7989 2020-02-22 Tom Tromey <tom@tromey.com>
7990
7991 * tui/tui-layout.c (make_standard_window, get_locator_window): New
7992 functions.
7993 (known_window_types): New global.
7994 (tui_get_window_by_name): Reimplement.
7995 (initialize_known_windows): New function.
7996 (validate_window_name): Rewrite.
7997 (_initialize_tui_layout): Call initialize_known_windows.
7998
7999 2020-02-22 Tom Tromey <tom@tromey.com>
8000
8001 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
8002 Remove constants.
8003 * tui/tui-winsource.h (struct tui_source_window_base)
8004 <tui_source_window_base>: Remove parameter.
8005 * tui/tui-winsource.c
8006 (tui_source_window_base::tui_source_window_base): Remove
8007 parameter.
8008 (tui_source_window_base::refill): Update.
8009 * tui/tui-stack.h (struct tui_locator_window)
8010 <tui_locator_window>: Update.
8011 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
8012 Default the constructor.
8013 * tui/tui-regs.h (struct tui_data_item_window)
8014 <tui_data_item_window>: Default the constructor.
8015 (struct tui_data_window) <tui_data_window>: Likewise.
8016 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
8017 Default the constructor.
8018 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
8019 Default the constructor.
8020 <type>: Remove.
8021 (struct tui_win_info) <tui_win_info>: Default the constructor.
8022 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
8023 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
8024 Default the constructor.
8025
8026 2020-02-22 Tom Tromey <tom@tromey.com>
8027
8028 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
8029 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
8030 * tui/tui-win.c (tui_resize_all): Don't call
8031 tui_delete_invisible_windows.
8032 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
8033 done.
8034 (tui_set_layout): Update.
8035 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
8036 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
8037 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
8038
8039 2020-02-22 Tom Tromey <tom@tromey.com>
8040
8041 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
8042 correctly.
8043
8044 2020-02-22 Tom Tromey <tom@tromey.com>
8045
8046 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
8047
8048 2020-02-22 Tom Tromey <tom@tromey.com>
8049
8050 * tui/tui-winsource.h (struct tui_source_window_iterator)
8051 <inner_iterator>: New etytypedef.
8052 <tui_source_window_iterator>: Take "end" parameter.
8053 <tui_source_window_iterator>: Take iterator.
8054 <operator*, advance>: Update.
8055 <m_iter>: Change type.
8056 <m_end>: New field.
8057 (struct tui_source_windows) <begin, end>: Update.
8058 * tui/tui-layout.c (tui_windows): New global.
8059 (tui_apply_current_layout): Clear tui_windows.
8060 (tui_layout_window::apply): Update tui_windows.
8061 * tui/tui-data.h (tui_windows): Declare.
8062 (all_tui_windows): Now inline function.
8063 (class tui_window_iterator, struct all_tui_windows): Remove.
8064
8065 2020-02-22 Tom Tromey <tom@tromey.com>
8066
8067 PR tui/17850:
8068 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
8069 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
8070 "height" argument.
8071 (class tui_layout_window) <get_sizes>: Likewise.
8072 (class tui_layout_split) <tui_layout_split>: Add "vertical"
8073 argument.
8074 <get_sizes>: Add "height" argument.
8075 <m_vertical>: New field.
8076 * tui/tui-layout.c (tui_layout_split::clone): Update.
8077 (tui_layout_split::get_sizes): Add "height" argument.
8078 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
8079 (tui_new_layout_command): Parse "-horizontal".
8080 (_initialize_tui_layout): Update help string.
8081 (tui_layout_split::specification): Add "-horizontal" when needed.
8082 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
8083 argument.
8084 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
8085 New methods.
8086
8087 2020-02-22 Tom Tromey <tom@tromey.com>
8088
8089 * tui/tui-layout.h (enum tui_adjust_result): New.
8090 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
8091 (class tui_layout_window) <adjust_size>: Return
8092 tui_adjust_result. Rewrite.
8093 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
8094 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
8095
8096 2020-02-22 Tom Tromey <tom@tromey.com>
8097
8098 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
8099 parameter and return types.
8100 (class tui_layout_base) <specification>: Add "depth".
8101 (class tui_layout_window) <specification>: Add "depth".
8102 (class tui_layout_split) <specification>: Add "depth".
8103 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
8104 and return types.
8105 (tui_new_layout_command): Parse sub-layouts.
8106 (_initialize_tui_layout): Update help string.
8107 (tui_layout_window::specification): Add "depth".
8108 (add_layout_command): Update.
8109
8110 2020-02-22 Tom Tromey <tom@tromey.com>
8111
8112 * NEWS: Add "tui new-layout" item.
8113 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
8114 Add new-layout command to help text.
8115 (validate_window_name): New function.
8116 (tui_new_layout_command): New function.
8117 (_initialize_tui_layout): Register "new-layout".
8118 (tui_layout_window::specification): New method.
8119 (tui_layout_window::specification): New method.
8120 * tui/tui-layout.h (class tui_layout_base) <specification>: New
8121 method.
8122 (class tui_layout_window) <specification>: New method.
8123 (class tui_layout_split) <specification>: New method.
8124
8125 2020-02-22 Tom Tromey <tom@tromey.com>
8126
8127 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
8128 * tui/tui-win.c (window_name_completer): Update comment.
8129 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
8130 Declare method.
8131 (class tui_layout_window) <replace_window>: Likewise.
8132 (class tui_layout_split) <replace_window>: Likewise.
8133 (tui_set_layout): Don't declare.
8134 (tui_set_initial_layout): Declare function.
8135 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
8136 (asm_regs_layout): New globals.
8137 (tui_current_layout, show_layout): Remove.
8138 (tui_set_layout, tui_add_win_to_layout): Rewrite.
8139 (find_layout, tui_apply_layout): New function.
8140 (layout_completer): Remove.
8141 (tui_next_layout): Reimplement.
8142 (tui_next_layout_command): New function.
8143 (tui_set_initial_layout, tui_prev_layout_command): New functions.
8144 (tui_regs_layout): Reimplement.
8145 (tui_regs_layout_command): New function.
8146 (extract_display_start_addr): Rewrite.
8147 (next_layout, prev_layout): Remove.
8148 (tui_layout_window::replace_window): New method.
8149 (tui_layout_split::replace_window): New method.
8150 (destroy_layout): New function.
8151 (layout_list): New global.
8152 (add_layout_command): New function.
8153 (initialize_layouts): Update.
8154 (tui_layout_command): New function.
8155 (_initialize_tui_layout): Install "layout" commands.
8156 * tui/tui-data.h (enum tui_layout_type): Remove.
8157 (tui_current_layout): Don't declare.
8158
8159 2020-02-22 Tom Tromey <tom@tromey.com>
8160
8161 * tui/tui-regs.c (tui_reg_layout): Remove.
8162 (tui_reg_command): Use tui_regs_layout.
8163 * tui/tui-layout.h (tui_reg_command): Declare.
8164 * tui/tui-layout.c (tui_reg_command): New function.
8165
8166 2020-02-22 Tom Tromey <tom@tromey.com>
8167
8168 * tui/tui.c (tui_rl_delete_other_windows): Call
8169 tui_remove_some_windows.
8170 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
8171 Declare method.
8172 (class tui_layout_window) <remove_windows>: New method.
8173 (class tui_layout_split) <remove_windows>: Declare.
8174 (tui_remove_some_windows): Declare.
8175 * tui/tui-layout.c (tui_remove_some_windows): New function.
8176 (tui_layout_split::remove_windows): New method.
8177
8178 2020-02-22 Tom Tromey <tom@tromey.com>
8179
8180 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
8181 * tui/tui-layout.h (tui_next_layout): Declare.
8182 * tui/tui-layout.c (tui_next_layout): New function.
8183
8184 2020-02-22 Tom Tromey <tom@tromey.com>
8185
8186 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
8187 correct coordinates.
8188
8189 2020-02-22 Tom Tromey <tom@tromey.com>
8190
8191 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
8192 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
8193 DATA_WIN case.
8194
8195 2020-02-22 Tom Tromey <tom@tromey.com>
8196
8197 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
8198 TUI_DISASM_WIN, not tui_win_list.
8199
8200 2020-02-22 Tom Tromey <tom@tromey.com>
8201
8202 * valprint.c (generic_val_print_enum_1)
8203 (val_print_type_code_flags): Style member names.
8204 * rust-lang.c (val_print_struct, rust_print_enum)
8205 (rust_print_struct_def, rust_internal_print_type): Style member
8206 names.
8207 * p-valprint.c (pascal_object_print_value_fields): Style member
8208 names. Only call fprintf_symbol_filtered for static members.
8209 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
8210 * f-valprint.c (f_val_print): Style member names.
8211 * f-typeprint.c (f_type_print_base): Style member names.
8212 * cp-valprint.c (cp_print_value_fields): Style member names. Only
8213 call fprintf_symbol_filtered for static members.
8214 (cp_print_class_member): Style member names.
8215 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
8216 member names.
8217 * ada-valprint.c (ada_print_scalar): Style enum names.
8218 (ada_val_print_enum): Likewise.
8219 * ada-typeprint.c (print_enum_type): Style enum names.
8220
8221 2020-02-21 Tom Tromey <tom@tromey.com>
8222
8223 * psympriv.h (struct partial_symtab): Update comment.
8224
8225 2020-02-21 Tom Tromey <tromey@adacore.com>
8226
8227 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
8228 type is CORE_ADDR.
8229
8230 2020-02-21 Tom de Vries <tdevries@suse.de>
8231
8232 PR gdb/25534
8233 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
8234 if dependencies[i]->user != NULL.
8235
8236 2020-02-21 Ali Tamur <tamur@google.com>
8237
8238 * dwarf2/read.c (dwarf2_name): Add null check.
8239
8240 2020-02-20 Tom Tromey <tom@tromey.com>
8241
8242 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
8243 ">=", in binary search.
8244 (dwarf2_find_containing_comp_unit): New overload.
8245 (run_test): New self-test.
8246 (_initialize_dwarf2_read): Register new test.
8247
8248 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
8249
8250 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
8251 * riscv-tdep.h: Likewise.
8252 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
8253 rv32-only CSR.
8254 * features/riscv/64bit-csr.xml: Regenerated.
8255
8256 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8257 Tom Tromey <tom@tromey.com>
8258
8259 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
8260 of 'fputc_unfiltered'.
8261 (putchar_unfiltered): Call 'fputc_unfiltered'.
8262 (fputc_unfiltered): Call 'fputs_unfiltered'.
8263
8264 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
8265
8266 * config.in: Regenerate.
8267 * configure: Regenerate.
8268 * configure.ac: Add --with-python-libdir option.
8269 * main.c: Use WITH_PYTHON_LIBDIR.
8270
8271 2020-02-19 Tom Tromey <tom@tromey.com>
8272
8273 * symtab.c (general_symbol_info::compute_and_set_names): Use
8274 obstack_strndup. Simplify call to symbol_set_demangled_name.
8275
8276 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
8277
8278 * dwarf2/read.c (allocate_signatured_type_table,
8279 allocate_dwo_unit_table, allocate_type_unit_groups_table,
8280 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
8281 Remove objfile parameter, update all callers.
8282
8283 2020-02-19 Doug Evans <dje@google.com>
8284
8285 PR rust/25535
8286 * rust-lang.c (rust_print_enum): Apply embedded_offset to
8287 rust_enum_variant calculation.
8288
8289 2020-02-19 Tom Tromey <tromey@adacore.com>
8290
8291 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
8292
8293 2020-02-19 Tom Tromey <tromey@adacore.com>
8294
8295 * ada-lang.c (cache_symbol): Use obstack_strdup.
8296
8297 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
8298
8299 * configure: Regenerate.
8300
8301 2020-02-19 Tom Tromey <tromey@adacore.com>
8302
8303 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
8304 NULL check.
8305
8306 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
8307
8308 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
8309
8310 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
8311
8312 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
8313 if GDBSERVER is not defined.
8314 (riscv_tdesc_cache): Likewise, also store const target_desc.
8315 (STATIC_IN_GDB): Define.
8316 (riscv_create_target_description): Update declaration with
8317 STATIC_IN_GDB.
8318 (riscv_lookup_target_description): New function, only define if
8319 GDBSERVER is not defined.
8320 * arch/riscv.h (riscv_create_target_description): Declare only
8321 when GDBSERVER is defined.
8322 (riscv_lookup_target_description): New declaration when GDBSERVER
8323 is not defined.
8324 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
8325 (riscv_linux_read_features): ...this, and return
8326 riscv_gdbarch_features instead of target_desc.
8327 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
8328 (riscv_linux_read_description): Rename to...
8329 (riscv_linux_read_features): ...this.
8330 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
8331 Update to use riscv_gdbarch_features and
8332 riscv_lookup_target_description.
8333 * riscv-tdep.c (riscv_find_default_target_description): Use
8334 riscv_lookup_target_description instead of
8335 riscv_create_target_description.
8336
8337 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8338
8339 * valprint.c (generic_val_print_enum_1): When printing a flag
8340 enum with value 0 and there is no enumerator with value 0, print
8341 just "0" instead of "(unknown: 0x0)".
8342
8343 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8344
8345 * valprint.c (generic_val_print_enum_1): Print unknown part of
8346 flag enum in hex.
8347
8348 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8349
8350 * dwarf2/read.c (update_enumeration_type_from_children): Allow
8351 flag enums to contain duplicate enumerators.
8352 * valprint.c (generic_val_print_enum_1): Update comment.
8353
8354 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8355
8356 * dwarf2/read.c: Include "count-one-bits.h".
8357 (update_enumeration_type_from_children): If an enumerator has
8358 multiple bits set, don't treat the enumeration as a "flag enum".
8359 * valprint.c (generic_val_print_enum_1): Assert that enumerators
8360 of flag enums have 0 or 1 bit set.
8361
8362 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
8363
8364 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
8365 conversion.
8366 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8367 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
8368 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8369 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
8370 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8371
8372 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8373
8374 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
8375
8376 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8377
8378 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
8379 displaced_step_closure_up.
8380 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
8381 (struct displaced_step_closure_up):
8382 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8383 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
8384 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
8385 Likewise.
8386 * gdbarch.sh (displaced_step_copy_insn): Likewise.
8387 * gdbarch.c, gdbarch.h: Re-generate.
8388 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
8389 displaced_step_closure_up.
8390 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8391 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
8392 * infrun.h (displaced_step_closure_up): New type alias.
8393 (struct displaced_step_inferior_state) <step_closure>: Change
8394 type to displaced_step_closure_up.
8395 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
8396 displaced_step_closure_up.
8397 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8398
8399 2020-02-14 Tom Tromey <tom@tromey.com>
8400
8401 * minidebug.c (gnu_debug_key): New global.
8402 (find_separate_debug_file_in_section): Use it.
8403
8404 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8405
8406 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
8407 std::unique_ptr.
8408 * gdbarch.c: Re-generate.
8409 * gdbarch.h: Re-generate.
8410 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
8411 change.
8412 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
8413 type to std::unique_ptr.
8414 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
8415 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8416 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
8417 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
8418 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
8419 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8420 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
8421 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
8422 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8423
8424 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8425
8426 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
8427 std::unique_ptr.
8428 (displaced_step_clear): Rename to...
8429 (displaced_step_reset): ... this. Just call displaced->reset ().
8430 (displaced_step_clear_cleanup): Rename to...
8431 (displaced_step_reset_cleanup): ... this.
8432 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
8433 (displaced_step_fixup): Likewise.
8434 (resume_1): Likewise.
8435 (handle_inferior_event): Restore child's memory before calling
8436 displaced_step_fixup on the parent.
8437 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
8438 to std::unique_ptr.
8439 <step_closure>: Change type to std::unique_ptr.
8440
8441 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8442
8443 * arm-tdep.c: Include count-one-bits.h.
8444 (cleanup_block_store_pc): Use count_one_bits.
8445 (cleanup_block_load_pc): Use count_one_bits.
8446 (arm_copy_block_xfer): Use count_one_bits.
8447 (thumb2_copy_block_xfer): Use count_one_bits.
8448 (thumb_copy_pop_pc_16bit): Use count_one_bits.
8449 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
8450 (thumb_get_next_pcs_raw): Use count_one_bits.
8451 (arm_get_next_pcs_raw): Use count_one_bits_l.
8452 * arch/arm.c (bitcount): Remove.
8453 * arch/arm.h (bitcount): Remove.
8454
8455 2020-02-14 Tom Tromey <tromey@adacore.com>
8456
8457 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
8458 Update.
8459 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
8460 * dwarf2/loc.c (call_site_find_chain_1): Return
8461 unique_xmalloc_ptr.
8462 (call_site_find_chain): Likewise.
8463
8464 2020-02-14 Richard Biener <rguenther@suse.de>
8465
8466 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
8467 on expression with division operators.
8468
8469 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8470
8471 * MAINTAINERS (Write After Approval): Adding myself.
8472
8473 2020-02-12 Tom Tromey <tom@tromey.com>
8474
8475 * event-loop.c (event_data, gdb_event, event_handler_func):
8476 Remove.
8477
8478 2020-02-12 Tom Tromey <tom@tromey.com>
8479
8480 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
8481 (dwarf2_frame_objfile_data): Add comment.
8482 (find_comp_unit, set_comp_unit): New functions.
8483 (dwarf2_frame_find_fde): Use find_comp_unit.
8484 (dwarf2_build_frame_info): Use set_comp_unit.
8485
8486 2020-02-12 Tom Tromey <tom@tromey.com>
8487
8488 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
8489 (comp_unit): Don't initialize objfile.
8490 (execute_cfa_program): Add text_offset parameter.
8491 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
8492 (dwarf2_frame_cache): Update.
8493 (dwarf2_build_frame_info): Don't set "objfile" member.
8494
8495 2020-02-12 Tom Tromey <tom@tromey.com>
8496
8497 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
8498 (decode_frame_entry): Likewise.
8499 (dwarf2_build_frame_info): Update.
8500
8501 2020-02-12 Tom Tromey <tom@tromey.com>
8502
8503 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
8504 (decode_frame_entry_1): Use the comp_unit obstack.
8505
8506 2020-02-12 Tom Tromey <tom@tromey.com>
8507
8508 * dwarf2/frame.c (struct comp_unit): Add initializers and
8509 constructor.
8510 (dwarf2_frame_objfile_data): Store a comp_unit.
8511 (dwarf2_frame_find_fde): Update.
8512 (dwarf2_build_frame_info): Use "new".
8513
8514 2020-02-12 Tom Tromey <tom@tromey.com>
8515
8516 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
8517 (dwarf2_fde_table): Typedef for std::vector.
8518 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
8519 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
8520 (decode_frame_entry): Update.
8521 (dwarf2_build_frame_info): Use "new".
8522
8523 2020-02-12 Christian Biesinger <cbiesinger@google.com>
8524
8525 * arm-tdep.c (arm_gdbarch_init): Update.
8526 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
8527 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
8528 have_neon, is_m>: Change to bool.
8529
8530 2020-02-12 Christian Biesinger <cbiesinger@google.com>
8531
8532 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
8533
8534 2020-02-12 Tom Tromey <tom@tromey.com>
8535
8536 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
8537
8538 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
8539
8540 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
8541 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
8542
8543 2020-02-11 Tom Tromey <tom@tromey.com>
8544
8545 * psymtab.h: Update comment.
8546
8547 2020-02-11 Tom Tromey <tom@tromey.com>
8548
8549 * gdb_obstack.h (struct auto_obstack): Use
8550 DISABLE_COPY_AND_ASSIGN.
8551
8552 2020-02-11 Tom Tromey <tom@tromey.com>
8553
8554 * dwarf2/frame.h (struct objfile): Don't forward declare.
8555
8556 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8557
8558 * cris-tdep.c (cris_supply_gregset): Change signature to match
8559 what struct regset expects.
8560 (cris_regset): New struct.
8561 (fetch_core_registers): Remove.
8562 (cris_iterate_over_regset_sections): New function.
8563 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
8564 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
8565
8566 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8567
8568 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
8569 registers.
8570
8571 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8572
8573 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
8574
8575 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8576
8577 * configure: Re-generate.
8578
8579 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8580
8581 * configure: Re-generate.
8582
8583 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8584
8585 * acinclude: Update warning.m4 path.
8586 * warning.m4: Move to gdbsupport.
8587
8588 2020-02-11 Tom Tromey <tromey@adacore.com>
8589
8590 * remote.c (remote_console_output): Update.
8591 * printcmd.c (printf_command): Update.
8592 * event-loop.c (gdb_wait_for_event): Update.
8593 * linux-nat.c (sigchld_handler): Update.
8594 * remote-sim.c (gdb_os_write_stdout): Update.
8595 (gdb_os_flush_stdout): Update.
8596 (gdb_os_flush_stderr): Update.
8597 (gdb_os_write_stderr): Update.
8598 * exceptions.c (print_exception): Update.
8599 * remote-fileio.c (remote_fileio_func_read): Update.
8600 (remote_fileio_func_write): Update.
8601 * tui/tui.c (tui_enable): Update.
8602 * tui/tui-interp.c (tui_interp::init): Update.
8603 * utils.c (init_page_info): Update.
8604 (putchar_unfiltered, fputc_unfiltered): Update.
8605 (gdb_flush): Update.
8606 (emit_style_escape): Update.
8607 (flush_wrap_buffer, fputs_maybe_filtered): Update.
8608 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
8609 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
8610 (stderr_file::write): Update.
8611 (stderr_file::puts): Update.
8612 * ui-file.h (ui_file_isatty, ui_file_write)
8613 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
8614 (ui_file_puts): Don't declare.
8615
8616 2020-02-10 Tom de Vries <tdevries@suse.de>
8617
8618 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
8619 sentinel to char *.
8620
8621 2020-02-09 Tom de Vries <tdevries@suse.de>
8622
8623 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
8624 filename if it matches "<artificial>".
8625
8626 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
8627
8628 * windows-tdep.c (struct enum_value_name): New struct.
8629 (create_enum): New function.
8630 (windows_get_siginfo_type): Create and use enum types.
8631
8632 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
8633
8634 * NEWS: Mention $_siginfo support for Windows.
8635 * windows-nat.c (handle_exception): Set siginfo_er.
8636 (windows_nat_target::mourn_inferior): Reset siginfo_er.
8637 (windows_xfer_siginfo): New function.
8638 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
8639 * windows-tdep.c (struct windows_gdbarch_data): New struct.
8640 (init_windows_gdbarch_data): New function.
8641 (get_windows_gdbarch_data): New function.
8642 (windows_get_siginfo_type): New function.
8643 (windows_init_abi): Register windows_get_siginfo_type.
8644 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
8645
8646 2020-02-08 Tom Tromey <tom@tromey.com>
8647
8648 * dwarf2/read.c (class cutu_reader) <cutu_reader,
8649 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
8650 <keep>: Declare method.
8651 <m_keep>: Remove member.
8652 <~cutu_reader>: Remove.
8653 (cutu_reader::init_tu_and_read_dwo_dies): Update.
8654 (cutu_reader::cutu_reader): Update.
8655 (cutu_reader::keep): Rename from ~cutu_reader.
8656 (process_psymtab_comp_unit, build_type_psymtabs_1)
8657 (process_skeletonless_type_unit, load_partial_comp_unit)
8658 (load_full_comp_unit, dwarf2_read_addr_index)
8659 (read_signatured_type): Update.
8660
8661 2020-02-08 Tom Tromey <tom@tromey.com>
8662
8663 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
8664 "want_partial_unit" parameter.
8665 (process_psymtab_comp_unit): Change want_partial_unit to bool.
8666 Inline check for DW_TAG_partial_unit.
8667 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
8668
8669 2020-02-08 Tom Tromey <tom@tromey.com>
8670
8671 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
8672 read.c.
8673 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
8674 read.c.
8675
8676 2020-02-08 Tom Tromey <tom@tromey.com>
8677
8678 * dwarf2/read.c (read_address): Move to comp-unit.c.
8679 (dwarf2_rnglists_process, dwarf2_ranges_process)
8680 (read_attribute_value, dwarf_decode_lines_1)
8681 (var_decode_location, decode_locdesc): Update.
8682 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
8683 read.c. Remove "cu" parameter.
8684 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
8685 method.
8686
8687 2020-02-08 Tom Tromey <tom@tromey.com>
8688
8689 * dwarf2/read.c (read_attribute_value, read_indirect_string)
8690 (read_indirect_line_string): Update.
8691 * dwarf2/comp-unit.c (read_offset): Remove.
8692 (read_comp_unit_head): Update.
8693 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
8694 method.
8695 (read_offset): Don't declare.
8696
8697 2020-02-08 Tom Tromey <tom@tromey.com>
8698
8699 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
8700 * dwarf2/read.c (struct comp_unit_head): Move to
8701 dwarf2/comp-unit.h.
8702 (enum class rcuh_kind): Move to comp-unit.h.
8703 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
8704 (read_comp_unit_head, error_check_comp_unit_head)
8705 (read_and_check_comp_unit_head): Move to comp-unit.c.
8706 (read_offset, dwarf_unit_type_name): Likewise.
8707 (create_debug_type_hash_table, read_cutu_die_from_dwo)
8708 (cutu_reader::cutu_reader, read_call_site_scope)
8709 (find_partial_die, follow_die_offset): Update.
8710 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
8711
8712 2020-02-08 Tom Tromey <tom@tromey.com>
8713
8714 * dwarf2/read.c (read_offset_1): Move to leb.c.
8715 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
8716 (dwarf_decode_macro_bytes): Update.
8717 * dwarf2/leb.c (read_offset): Rename; move from read.c.
8718 * dwarf2/leb.h (read_offset): Declare.
8719
8720 2020-02-08 Tom Tromey <tom@tromey.com>
8721
8722 * dwarf2/read.c (dwarf2_section_size): Remove.
8723 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
8724 Update.
8725 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
8726
8727 2020-02-08 Tom Tromey <tom@tromey.com>
8728
8729 * dwarf2/read.c (read_initial_length): Move to leb.c.
8730 * dwarf2/leb.h (read_initial_length): Declare.
8731 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
8732 handle_nonstd parameter.
8733 * dwarf2/frame.c (read_initial_length): Remove.
8734 (decode_frame_entry_1): Update.
8735
8736 2020-02-08 Tom Tromey <tom@tromey.com>
8737
8738 * dwarf2/loc.c (dwarf2_find_location_expression)
8739 (dwarf_evaluate_loc_desc::get_tls_address)
8740 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
8741 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
8742 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
8743 (dwarf2_compile_property_to_c)
8744 (dwarf2_loc_desc_get_symbol_read_needs)
8745 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
8746 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
8747 (loclist_describe_location, loclist_tracepoint_var_ref)
8748 (loclist_generate_c_location): Update.
8749 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
8750 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
8751 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
8752 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
8753 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
8754 (dwarf2_per_cu_data::addr_size)
8755 (dwarf2_per_cu_data::ref_addr_size)
8756 (dwarf2_per_cu_data::text_offset)
8757 (dwarf2_per_cu_data::addr_type): Now methods.
8758 (per_cu_header_read_in): Make per_cu "const".
8759 (dwarf2_version): Remove.
8760 (dwarf2_per_cu_data::int_type): Now a method.
8761 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
8762 (set_die_type, read_array_type, read_subrange_index_type)
8763 (read_tag_string_type, read_subrange_type): Update.
8764 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
8765 offset_size, ref_addr_size, text_offset, addr_type, version,
8766 objfile, int_type, addr_sized_int_type>: Declare methods.
8767
8768 2020-02-08 Tom Tromey <tom@tromey.com>
8769
8770 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
8771 Move earlier.
8772
8773 2020-02-08 Tom Tromey <tom@tromey.com>
8774
8775 * dwarf2/read.h (dwarf_line_debug): Declare.
8776 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
8777 * dwarf2/read.c: Move line_header code to new files.
8778 (dwarf_line_debug): No longer static.
8779 * dwarf2/line-header.c: New file.
8780 * dwarf2/line-header.h: New file.
8781
8782 2020-02-08 Tom Tromey <tom@tromey.com>
8783
8784 * dwarf2/read.c (struct line_header) <file_full_name,
8785 file_file_name>: Return unique_xmalloc_ptr.
8786 (line_header::file_file_name): Update.
8787 (line_header::file_full_name): Update.
8788 (dw2_get_file_names_reader): Update.
8789 (macro_start_file): Update.
8790
8791 2020-02-08 Tom Tromey <tom@tromey.com>
8792
8793 * dwarf2/read.c (struct line_header) <file_full_name,
8794 file_file_name>: Declare methods.
8795 (dw2_get_file_names_reader): Update.
8796 (file_file_name): Now a method.
8797 (file_full_name): Likewise.
8798 (macro_start_file): Update.
8799
8800 2020-02-08 Tom Tromey <tom@tromey.com>
8801
8802 * dwarf2/read.c (dwarf_always_disassemble)
8803 (show_dwarf_always_disassemble): Move to loc.c.
8804 (_initialize_dwarf2_read): Move "always-disassemble" registration
8805 to loc.c.
8806 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
8807 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
8808 static.
8809 (show_dwarf_always_disassemble): Move from read.c.
8810 (_initialize_dwarf2loc): Move always-disassemble from read.c.
8811
8812 2020-02-08 Tom Tromey <tom@tromey.com>
8813
8814 * dwarf2/read.c (~dwarf2_per_objfile): Update.
8815 (create_quick_file_names_table): Return htab_up.
8816 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
8817 Update.
8818 * dwarf2/read.h (struct dwarf2_per_objfile)
8819 <quick_file_names_table>: Now htab_up.
8820
8821 2020-02-08 Tom Tromey <tom@tromey.com>
8822
8823 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
8824
8825 2020-02-08 Tom Tromey <tom@tromey.com>
8826
8827 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
8828 Rewrite.
8829 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
8830 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
8831 (abbrev_table::abbrev_table): No longer inline.
8832 (ABBREV_HASH_SIZE): Remove.
8833 (abbrev_table::m_abbrevs): Now an htab_up.
8834
8835 2020-02-08 Tom Tromey <tom@tromey.com>
8836
8837 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
8838 (cutu_reader): Update.
8839 (build_type_psymtabs_1): Update.
8840 * dwarf2/abbrev.c (abbrev_table::read): Rename.
8841 (abbrev_table::alloc_abbrev): Update.
8842 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
8843 (abbrev_table::read): New static method, renamed from
8844 abbrev_table_read_table.
8845 (abbrev_table::alloc_abbrev)
8846 (abbrev_table::add_abbrev): Now private.
8847 (abbrev_table::abbrev_table): Now private.
8848 (abbrev_table::m_abbrev_obstack): Now private. Rename.
8849
8850 2020-02-08 Tom Tromey <tom@tromey.com>
8851
8852 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
8853 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
8854 htab_up.
8855
8856 2020-02-08 Tom Tromey <tom@tromey.com>
8857
8858 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
8859 htab_up.
8860 (lookup_dwo_unit_in_dwp): Update.
8861 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
8862 on obstack.
8863
8864 2020-02-08 Tom Tromey <tom@tromey.com>
8865
8866 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
8867 obstack.
8868
8869 2020-02-08 Tom Tromey <tom@tromey.com>
8870
8871 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
8872 line_header_hash.
8873 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
8874 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
8875 Change type to htab_up.
8876
8877 2020-02-08 Tom Tromey <tom@tromey.com>
8878
8879 * dwarf2/read.c (allocate_type_unit_groups_table): Return
8880 htab_up. Don't allocate on obstack.
8881 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
8882 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
8883 Change type to htab_up.
8884
8885 2020-02-08 Tom Tromey <tom@tromey.com>
8886
8887 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
8888 Change type to htab_up.
8889 * dwarf2/read.c (create_signatured_type_table_from_index)
8890 (create_signatured_type_table_from_debug_names)
8891 (create_all_type_units, add_type_unit)
8892 (lookup_dwo_signatured_type, lookup_signatured_type)
8893 (process_skeletonless_type_unit): Update.
8894 (create_debug_type_hash_table, create_debug_types_hash_table):
8895 Change type of types_htab.
8896 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
8897 htab_up. Don't allocate on obstack.
8898 (create_cus_hash_table): Change type of cus_htab parameter.
8899 (struct dwo_file) <cus, tus>: Now htab_up.
8900 (lookup_dwo_signatured_type, lookup_dwo_cutu)
8901 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
8902 (queue_and_load_all_dwo_tus): Update.
8903 * dwarf2/index-write.c (write_gdbindex): Update.
8904 (write_debug_names): Update.
8905
8906 2020-02-08 Tom Tromey <tom@tromey.com>
8907
8908 * dwarf2/read.h (struct dwarf2_queue_item): Move from
8909 dwarf2/read.c. Remove "next" member. Add constructor ntad
8910 destructor.
8911 (struct dwarf2_per_objfile) <queue>: New member.
8912 * dwarf2/read.c (struct dwarf2_queue_item): Move to
8913 dwarf2/read.h.
8914 (dwarf2_queue, dwarf2_queue_tail): Remove.
8915 (class dwarf2_queue_guard): Add parameter to constructor. Use
8916 DISABLE_COPY_AND_ASSIGN.
8917 <m_per_objfile>: New member.
8918 <~dwarf2_queue_guard>: Rewrite.
8919 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
8920 Update.
8921 (~dwarf2_queue_item): New.
8922
8923 2020-02-08 Tom Tromey <tom@tromey.com>
8924
8925 * dwarf2/read.c (struct die_info) <has_children>: New member.
8926 (dw2_get_file_names_reader): Remove has_children.
8927 (dw2_get_file_names): Update.
8928 (read_cutu_die_from_dwo): Remove has_children.
8929 (cutu_reader::init_tu_and_read_dwo_dies)
8930 (cutu_reader::cutu_reader): Update.
8931 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
8932 Remove has_children.
8933 (build_type_psymtabs_1, process_skeletonless_type_unit)
8934 (load_partial_comp_unit, load_full_comp_unit): Update.
8935 (create_dwo_cu_reader): Remove has_children.
8936 (create_cus_hash_table, read_die_and_children): Update.
8937 (read_full_die_1,read_full_die): Remove has_children.
8938 (read_signatured_type): Update.
8939 (class cutu_reader) <has_children>: Remove.
8940
8941 2020-02-08 Tom Tromey <tom@tromey.com>
8942
8943 * dwarf2/expr.c: Rename from dwarf2expr.c.
8944 * dwarf2/expr.h: Rename from dwarf2expr.h.
8945 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
8946 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
8947 * dwarf2/frame.c: Rename from dwarf2-frame.c.
8948 * dwarf2/frame.h: Rename from dwarf2-frame.h.
8949 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
8950 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
8951 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
8952 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
8953 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
8954 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
8955 * dwarf2/loc.c: Rename from dwarf2loc.c.
8956 * dwarf2/loc.h: Rename from dwarf2loc.h.
8957 * dwarf2/read.c: Rename from dwarf2read.c.
8958 * dwarf2/read.h: Rename from dwarf2read.h.
8959 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
8960 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
8961 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
8962 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
8963 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
8964 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
8965 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
8966 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
8967 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
8968 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
8969 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
8970 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
8971 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
8972 Update.
8973 * Makefile.in (COMMON_SFILES): Update.
8974 (HFILES_NO_SRCDIR): Update.
8975
8976 2020-02-08 Tom Tromey <tom@tromey.com>
8977
8978 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
8979 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
8980
8981 2020-02-08 Tom Tromey <tom@tromey.com>
8982
8983 * dwarf2read.h (struct die_info): Don't declare.
8984
8985 2020-02-08 Tom Tromey <tom@tromey.com>
8986
8987 * dwarf2read.h (die_info_ptr): Remove typedef.
8988
8989 2020-02-08 Tom Tromey <tom@tromey.com>
8990
8991 * dwarf2read.c (read_call_site_scope)
8992 (handle_data_member_location, dwarf2_add_member_fn)
8993 (mark_common_block_symbol_computed, read_common_block)
8994 (attr_to_dynamic_prop, partial_die_info::read)
8995 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
8996 (dwarf2_symbol_mark_computed, set_die_type): Update.
8997 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
8998 method.
8999 (attr_form_is_block): Don't declare.
9000 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
9001
9002 2020-02-08 Tom Tromey <tom@tromey.com>
9003
9004 * dwarf2read.c (dwarf2_find_base_address, )
9005 (read_call_site_scope, rust_containing_type)
9006 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
9007 (handle_data_member_location, dwarf2_add_member_fn)
9008 (get_alignment, read_structure_type, process_structure_scope)
9009 (mark_common_block_symbol_computed, read_common_block)
9010 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
9011 (partial_die_info::read, read_attribute_value, new_symbol)
9012 (lookup_die_type, dwarf2_get_ref_die_offset)
9013 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
9014 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
9015 (dwarf2_symbol_mark_computed): Update.
9016 * dwarf2/attribute.h (struct attribute) <value_as_address,
9017 form_is_section_offset, form_is_constant, form_is_ref>: Declare
9018 methods.
9019 (value_as_address, attr_form_is_section_offset)
9020 (attr_form_is_constant, attr_form_is_ref): Don't declare.
9021 * dwarf2/attribute.c (attribute::value_as_address)
9022 (attribute::form_is_section_offset, attribute::form_is_constant)
9023 (attribute::form_is_ref): Now methods.
9024
9025 2020-02-08 Tom Tromey <tom@tromey.com>
9026
9027 * dwarf2read.c (struct attribute, DW_STRING)
9028 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
9029 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
9030 (attr_form_is_block, attr_form_is_section_offset)
9031 (attr_form_is_constant, attr_form_is_ref): Move.
9032 * dwarf2/attribute.h: New file.
9033 * dwarf2/attribute.c: New file, from dwarf2read.c.
9034 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
9035
9036 2020-02-08 Tom Tromey <tom@tromey.com>
9037
9038 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
9039 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
9040 Move.
9041 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
9042 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
9043 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
9044 abbrev.c.
9045 * dwarf2/abbrev.h: New file.
9046 * dwarf2/abbrev.c: New file, from dwarf2read.c.
9047 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
9048
9049 2020-02-08 Tom Tromey <tom@tromey.com>
9050
9051 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
9052 (dwarf2_section_size, dwarf2_get_section_info)
9053 (create_signatured_type_table_from_debug_names)
9054 (create_addrmap_from_aranges, read_debug_names_from_section)
9055 (get_gdb_index_contents_from_section, read_comp_unit_head)
9056 (error_check_comp_unit_head, read_abbrev_offset)
9057 (create_debug_type_hash_table, init_cu_die_reader)
9058 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
9059 (read_comp_units_from_section, create_cus_hash_table)
9060 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
9061 (create_dwp_v2_section, dwarf2_rnglists_process)
9062 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
9063 (abbrev_table_read_table, read_indirect_string_at_offset_from)
9064 (read_indirect_string_from_dwz, read_addr_index_1)
9065 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
9066 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9067 (fill_in_loclist_baton): Update.
9068 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
9069 get_containing_section, get_bfd_owner, get_bfd_section,
9070 get_file_name, get_id, get_flags, empty, read>: Declare methods.
9071 (dwarf2_read_section, get_section_name, get_section_file_name)
9072 (get_containing_section, get_section_bfd_owner)
9073 (get_section_bfd_section, get_section_name, get_section_file_name)
9074 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
9075 declare.
9076 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
9077 (dwarf2_section_info::get_bfd_owner)
9078 (dwarf2_section_info::get_bfd_section)
9079 (dwarf2_section_info::get_name)
9080 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
9081 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
9082 (dwarf2_section_info::read): Now methods.
9083 * dwarf-index-write.c (class debug_names): Update.
9084
9085 2020-02-08 Tom Tromey <tom@tromey.com>
9086
9087 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
9088 Move to dwarf2/section.h.
9089 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
9090 (get_section_bfd_section, get_section_name)
9091 (get_section_file_name, get_section_id, get_section_flags)
9092 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
9093 dwarf2/section.c.
9094 * dwarf2/section.h: New file.
9095 * dwarf2/section.c: New file, from dwarf2read.c.
9096 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
9097
9098 2020-02-08 Tom Tromey <tom@tromey.com>
9099
9100 * dwarf2read.h (read_unsigned_leb128): Don't declare.
9101 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
9102 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
9103 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
9104 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
9105 * dwarf2/leb.h: New file, from dwarf2read.c.
9106 * dwarf2/leb.c: New file, from dwarf2read.c.
9107 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
9108 Remove.
9109 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
9110 (COMMON_SFILES): Add dwarf2/leb.c.
9111
9112 2020-02-08 Joel Brobecker <brobecker@adacore.com>
9113
9114 GDB 9.1 released.
9115
9116 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
9117
9118 PR gdb/25190:
9119 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
9120 * gdb/remote.c (remote_console_output): Update.
9121 * gdb/ui-file.c (fputs_unfiltered): Rename to...
9122 (ui_file_puts): ...this.
9123 * gdb/ui-file.h (ui_file_puts): Add declaration.
9124 * gdb/utils.c (emit_style_escape): Update.
9125 (flush_wrap_buffer): Update.
9126 (fputs_maybe_filtered): Update.
9127 (fputs_unfiltered): Add function.
9128
9129 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
9130
9131 * gdb/event-loop.c (gdb_wait_for_event): Update.
9132 * gdb/printcmd.c (printf_command): Update.
9133 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
9134 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
9135 (gdb_os_flush_stderr): Update.
9136 * gdb/remote.c (remote_console_output): Update.
9137 * gdb/ui-file.c (gdb_flush): Rename to...
9138 (ui_file_flush): ...this.
9139 (stderr_file::write): Update.
9140 (stderr_file::puts): Update.
9141 * gdb/ui-file.h (gdb_flush): Rename to...
9142 (ui_file_flush): ...this.
9143 * gdb/utils.c (gdb_flush): Add function.
9144 * gdb/utils.h (gdb_flush): Add declaration.
9145
9146 2020-02-07 Tom Tromey <tromey@adacore.com>
9147
9148 PR breakpoints/24915:
9149 * source.c (find_and_open_source): Do not check basenames_may_differ.
9150
9151 2020-02-07 Tom Tromey <tom@tromey.com>
9152
9153 * README: Update gdbserver documentation.
9154 * gdbserver: Move to top level.
9155 * configure.tgt (build_gdbserver): Remove.
9156 * configure.ac: Remove --enable-gdbserver.
9157 * configure: Rebuild.
9158 * Makefile.in (distclean): Don't mention gdbserver.
9159
9160 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
9161
9162 * source-cache.c (source_cache::ensure): Surround
9163 get_plain_source_lines with a try/catch.
9164 (source_cache::get_line_charpos): Get rid of try/catch
9165 and only check for the return value of "ensure".
9166 * tui/tui-source.c (tui_source_window::set_contents):
9167 Simplify "nlines" calculation.
9168
9169 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
9170
9171 * MAINTAINERS (Write After Approval): Add myself.
9172
9173 2020-02-05 Christian Biesinger <cbiesinger@google.com>
9174
9175 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
9176 function call.
9177
9178 2020-02-05 Christian Biesinger <cbiesinger@google.com>
9179
9180 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
9181
9182 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
9183
9184 * nat/riscv-linux-tdesc.h: New file.
9185 * nat/riscv-linux-tdesc.c: New file, taking code from...
9186 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
9187 ... here.
9188 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
9189 NATDEPFILES.
9190
9191 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
9192
9193 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
9194 we don't set the fake simulator ptid to the null_ptid.
9195
9196 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
9197
9198 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
9199 * gdbthread.h (class thread_info) <resumed>: Likewise.
9200 * infrun.c (resume_1): Likewise.
9201 (proceed): Likewise.
9202 (infrun_thread_stop_requested): Likewise.
9203 (stop_all_threads): Likewise.
9204 (handle_inferior_event): Likewise.
9205 (restart_threads): Likewise.
9206 (finish_step_over): Likewise.
9207 (keep_going_stepped_thread): Likewise.
9208 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
9209 (linux_handle_extended_wait): Likewise.
9210 * record-btrace.c (get_thread_current_frame_id): Likewise.
9211 * record-full.c (record_full_wait_1): Likewise.
9212 * remote.c (remote_target::process_initial_stop_replies): Likewise.
9213 * target.c (target_resume): Likewise.
9214 * thread.c (set_running_thread): Likewise.
9215
9216 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
9217
9218 * f-valprint.c (f77_print_array_1): Changed datatype of index
9219 variable to LONGEST from int to enable it to contain bound
9220 values correctly.
9221
9222 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
9223
9224 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
9225 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
9226 offsets according to FLEN determined.
9227 (riscv_linux_nat_target::read_description): Determine FLEN
9228 dynamically.
9229 (riscv_linux_nat_target::fetch_registers): Size regset buffer
9230 according to FLEN determined.
9231 (riscv_linux_nat_target::store_registers): Likewise.
9232
9233 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
9234
9235 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
9236 when reg->group is empty and reggroup is not.
9237
9238 2020-01-31 Tom Tromey <tromey@adacore.com>
9239
9240 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
9241 Call beneath target's mourn_inferior after unpushing.
9242
9243 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
9244
9245 PR tui/9765
9246 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
9247 have enough lines to fill the screen, still return the lowest
9248 address we found.
9249
9250 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
9251
9252 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
9253 '-', '<', and '>' commands.
9254
9255 2020-01-29 Pedro Alves <palves@redhat.com>
9256 Sergio Durigan Junior <sergiodj@redhat.com>
9257
9258 * infcmd.c (construct_inferior_arguments): Assert that
9259 'argc' is greater than 0.
9260
9261 2020-01-29 Luis Machado <luis.machado@linaro.org>
9262
9263 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
9264 (BRK_INSN_MASK): Define to 0xd4200000.
9265 (aarch64_program_breakpoint_here_p): New function.
9266 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
9267 * arch-utils.c (default_program_breakpoint_here_p): Moved from
9268 breakpoint.c.
9269 * arch-utils.h (default_program_breakpoint_here_p): Moved from
9270 breakpoint.h
9271 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
9272 call gdbarch_program_breakpoint_here_p.
9273 (program_breakpoint_here): Moved to arch-utils.c, renamed to
9274 default_program_breakpoint_here_p, changed return type to bool and
9275 simplified.
9276 * breakpoint.h (program_breakpoint_here): Moved prototype to
9277 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
9278 return type to bool.
9279 * gdbarch.c: Regenerate.
9280 * gdbarch.h: Regenerate.
9281 * gdbarch.sh (program_breakpoint_here_p): New method.
9282 * infrun.c (handle_signal_stop): Call
9283 gdbarch_program_breakpoint_here_p.
9284
9285 2020-01-26 Tom Tromey <tom@tromey.com>
9286
9287 * ctfread.c (struct ctf_fp_info): Reindent.
9288 (_initialize_ctfread): Remove.
9289
9290 2020-01-26 Tom Tromey <tom@tromey.com>
9291
9292 * psymtab.c (partial_map_expand_apply)
9293 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
9294 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
9295 (psym_print_stats, psym_expand_symtabs_for_function)
9296 (psym_map_symbol_filenames, psym_map_matching_symbols)
9297 (psym_expand_symtabs_matching)
9298 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
9299 (maintenance_check_psymtabs): Use new methods.
9300 * psympriv.h (struct partial_symtab) <readin_p,
9301 get_compunit_symtab>: New methods.
9302 <readin, compunit_symtab>: Remove members.
9303 (struct standard_psymtab): New.
9304 (struct legacy_psymtab): Derive from standard_psymtab.
9305 * dwarf2read.h (struct dwarf2_psymtab): Derive from
9306 standard_psymtab.
9307 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
9308
9309 2020-01-26 Tom Tromey <tom@tromey.com>
9310
9311 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
9312 read_dependencies. Add assert.
9313 * psymtab.c (partial_symtab::read_dependencies): New method.
9314 * psympriv.h (struct partial_symtab) <read_dependencies>: New
9315 method.
9316 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
9317 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
9318 read_dependencies.
9319 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
9320 Add assert.
9321
9322 2020-01-26 Tom Tromey <tom@tromey.com>
9323
9324 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
9325 Call expand_psymtab.
9326 (xcoff_read_symtab): Call expand_psymtab.
9327 (xcoff_start_psymtab, xcoff_end_psymtab): Set
9328 legacy_expand_psymtab.
9329 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
9330 method.
9331 (struct legacy_psymtab) <expand_psymtab>: Implement.
9332 <legacy_expand_psymtab>: New member.
9333 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
9334 (parse_partial_symbols): Set legacy_expand_psymtab.
9335 (psymtab_to_symtab_1): Change argument order. Call
9336 expand_psymtab.
9337 (new_psymtab): Set legacy_expand_psymtab.
9338 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
9339 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
9340 expand_psymtab.
9341 (dwarf2_psymtab::expand_psymtab): Rename from
9342 psymtab_to_symtab_1. Call expand_psymtab.
9343 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
9344 (dbx_end_psymtab): Likewise.
9345 (dbx_psymtab_to_symtab_1): Change argument order. Call
9346 expand_psymtab.
9347 (dbx_read_symtab): Call expand_psymtab.
9348 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
9349 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
9350 (ctf_psymtab::read_symtab): Call expand_psymtab.
9351
9352 2020-01-26 Tom Tromey <tom@tromey.com>
9353
9354 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
9355 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
9356 messages.
9357 * mdebugread.c (mdebug_read_symtab): Remove prints.
9358 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
9359 assert.
9360 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
9361
9362 2020-01-26 Tom Tromey <tom@tromey.com>
9363
9364 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
9365 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
9366 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
9367 legacy_symtab.
9368 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
9369 * psymtab.c (psymtab_to_symtab): Call method.
9370 (dump_psymtab): Update.
9371 * psympriv.h (struct partial_symtab): Add virtual destructor.
9372 <read_symtab>: New method.
9373 (struct legacy_symtab): New.
9374 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
9375 (struct pst_map) <pst>: Now a legacy_psymtab.
9376 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
9377 (new_psymtab): Use legacy_psymtab.
9378 * dwarf2read.h (struct dwarf2_psymtab): New.
9379 (struct dwarf2_per_cu_data) <psymtab>: Use it.
9380 * dwarf2read.c (dwarf2_create_include_psymtab)
9381 (dwarf2_build_include_psymtabs, create_type_unit_group)
9382 (create_partial_symtab, process_psymtab_comp_unit_reader)
9383 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
9384 (set_partial_user): Use dwarf2_psymtab.
9385 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
9386 (psymtab_to_symtab_1, process_full_comp_unit)
9387 (process_full_type_unit, dwarf2_ranges_read)
9388 (dwarf2_get_pc_bounds, psymtab_include_file_name)
9389 (dwarf_decode_lines): Use dwarf2_psymtab.
9390 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
9391 (add_address_entry_worker, write_one_signatured_type)
9392 (recursively_count_psymbols, recursively_write_psymbols)
9393 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
9394 (write_debug_names): Likewise.
9395 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
9396 <pst>: Now a legacy_psymtab.
9397 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
9398 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
9399 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
9400 * ctfread.c (struct ctf_psymtab): New.
9401 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
9402 ctf_psymtab.
9403 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
9404 (create_partial_symtab): Return a ctf_psymtab.
9405 (scan_partial_symbols): Update.
9406
9407 2020-01-26 Tom Tromey <tom@tromey.com>
9408
9409 * xcoffread.c (xcoff_start_psymtab): Use new.
9410 * psymtab.c (partial_symtab::partial_symtab): New constructor,
9411 renamed from start_psymtab_common.
9412 * psympriv.h (struct partial_symtab): Add new constructor.
9413 (start_psymtab_common): Don't declare.
9414 * mdebugread.c (parse_partial_symbols): Use new.
9415 * dwarf2read.c (create_partial_symtab): Use new.
9416 * dbxread.c (start_psymtab): Use new.
9417 * ctfread.c (create_partial_symtab): Use new.
9418
9419 2020-01-26 Tom Tromey <tom@tromey.com>
9420
9421 * xcoffread.c (xcoff_end_psymtab): Use new.
9422 * psymtab.c (start_psymtab_common): Use new.
9423 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
9424 Update.
9425 * psympriv.h (struct partial_symtab): Add parameters to
9426 constructor. Don't inline.
9427 (allocate_psymtab): Don't declare.
9428 * mdebugread.c (new_psymtab): Use new.
9429 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
9430 * dbxread.c (dbx_end_psymtab): Use new.
9431
9432 2020-01-26 Tom Tromey <tom@tromey.com>
9433
9434 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
9435 allocate_psymtab. Update documentation.
9436 * psymtab.c (psymtab_storage::install_psymtab): Rename from
9437 allocate_psymtab. Do not use new.
9438 (allocate_psymtab): Use new. Update.
9439
9440 2020-01-26 Tom Tromey <tom@tromey.com>
9441
9442 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
9443 * psymtab.c (psym_print_stats): Update.
9444 * psympriv.h (struct partial_symtab) <readin,
9445 psymtabs_addrmap_supported, anonymous>: Now bool.
9446 * mdebugread.c (psymtab_to_symtab_1): Update.
9447 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
9448 (build_type_psymtabs_reader, psymtab_to_symtab_1)
9449 (process_full_comp_unit, process_full_type_unit): Update.
9450 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
9451 * ctfread.c (psymtab_to_symtab): Update.
9452
9453 2020-01-26 Tom Tromey <tom@tromey.com>
9454
9455 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
9456 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
9457 * psymtab.c (psymtab_storage): Delete psymtabs.
9458 (psymtab_storage::allocate_psymtab): Use new.
9459 (psymtab_storage::discard_psymtab): Use delete.
9460 * psympriv.h (struct partial_symtab): Add constructor and
9461 initializers.
9462
9463 2020-01-26 Tom Tromey <tom@tromey.com>
9464
9465 * machoread.c: Do not include psympriv.h.
9466
9467 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9468
9469 * NEWS: Mention the new option and the set/show commands.
9470
9471 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9472
9473 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
9474 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
9475 (validate_exec_file): New variables, enums, functions.
9476 (exec_file_locate_attach, print_section_info): Style the filenames.
9477 (_initialize_exec): Install show_exec_file_mismatch_command and
9478 set_exec_file_mismatch_command.
9479 * gdbcore.h (validate_exec_file): Declare.
9480 * infcmd.c (attach_command): Call validate_exec_file.
9481 * remote.c ( remote_target::remote_add_inferior): Likewise.
9482
9483 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9484
9485 * frame.c (find_frame_sal): Move call to get_next_frame into more
9486 inner scope.
9487 * inline-frame.c (inilne_state) <inline_state>: Update argument
9488 types.
9489 (inilne_state) <skipped_symbol>: Rename to...
9490 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
9491 (skip_inline_frames): Build vector of skipped symbols and use this
9492 to reate the inline_state.
9493 (inline_skipped_symbol): Add a comment and some assertions, fetch
9494 skipped symbol from the list.
9495
9496 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9497
9498 * buildsym.c (lte_is_less_than): Delete.
9499 (buildsym_compunit::end_symtab_with_blockvector): Create local
9500 lambda function to sort line table entries, and use
9501 std::stable_sort instead of std::sort.
9502 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
9503 markers when looking for a previous line.
9504
9505 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9506
9507 * dwarf2read.c (lnp_state_machine::record_line): Include
9508 end_sequence parameter in debug print out. Record the line if we
9509 are at an end_sequence marker even if it's not the start of a
9510 statement.
9511 * symmisc.c (maintenance_print_one_line_table): Print end of
9512 sequence markers with 'END' not '0'.
9513
9514 2020-01-24 Pedro Alves <palves@redhat.com>
9515
9516 PR gdb/25410
9517 * thread.c (scoped_restore_current_thread::restore): Use
9518 switch_to_inferior_no_thread.
9519 * exec.c: Include "progspace-and-thread.h".
9520 (add_target_sections, remove_target_sections):
9521 scoped_restore_current_pspace_and_thread instead of
9522 scoped_restore_current_thread.
9523 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
9524 and aspace to the inferior before calling clone_program_space.
9525 Remove stale comment.
9526
9527 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9528
9529 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
9530 (arm_netbsd_nat_target::fetch_registers): ...this.
9531 (arm_nbsd_nat_target::store_registers): Rename to...
9532 (arm_netbsd_nat_target::store_registers): ...this.
9533
9534 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9535
9536 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
9537 register_t.
9538
9539 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9540
9541 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
9542 Update comment.
9543 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
9544 Likewise.
9545 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
9546 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
9547 the correct replacement (iterate_over_regset_sections).
9548 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
9549 Update comment.
9550
9551 2020-01-24 Graham Markall <graham.markall@embecosm.com>
9552
9553 PR gdb/23718
9554 * gdb/python/python.c (execute_gdb_command): Call
9555 async_enable_stdin in catch block.
9556
9557 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9558
9559 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
9560 SWITCH_THRU_ALL_UIS.
9561
9562 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9563
9564 PR tui/9765
9565 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
9566 comment, add extra parameter, and update to store previous symbol
9567 when appropriate.
9568 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
9569 add extra parameter.
9570 * tui/tui-disasm.c (tui_disassemble): Update header comment,
9571 remove unneeded parameter, add try/catch around gdb_print_insn,
9572 rewrite to add items to asm_lines vector.
9573 (tui_find_backward_disassembly_start_address): New function.
9574 (tui_find_disassembly_address): Updated throughout.
9575 (tui_disasm_window::set_contents): Update for changes to
9576 tui_disassemble.
9577 (tui_disasm_window::do_scroll_vertical): No need to adjust the
9578 number of lines to scroll.
9579
9580 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
9581
9582 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
9583 (SECT_OFF_DATA): Likewise.
9584 (SECT_OFF_RODATA): Likewise.
9585 (SECT_OFF_TEXT): Likewise.
9586 (SECT_OFF_BSS): Likewise.
9587 (struct objfile) <text_section_offset, data_section_offset>: New
9588 methods.
9589 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
9590 objfile::text_section_offset.
9591 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
9592 * coffread.c (coff_symtab_read): Likewise.
9593 (enter_linenos): Likewise.
9594 (process_coff_symbol): Likewise.
9595 * ctfread.c (get_objfile_text_range): Likewise.
9596 * dtrace-probe.c (dtrace_probe::get_relocated_address):
9597 Use objfile::data_section_offset.
9598 * dwarf2-frame.c (execute_cfa_program): Use
9599 objfile::text_section_offset.
9600 (dwarf2_frame_find_fde): Likewise.
9601 * dwarf2read.c (create_addrmap_from_index): Likewise.
9602 (create_addrmap_from_aranges): Likewise.
9603 (dw2_find_pc_sect_compunit_symtab): Likewise.
9604 (process_psymtab_comp_unit_reader): Likewise.
9605 (add_partial_symbol): Likewise.
9606 (add_partial_subprogram): Likewise.
9607 (process_full_comp_unit): Likewise.
9608 (read_file_scope): Likewise.
9609 (read_func_scope): Likewise.
9610 (read_lexical_block_scope): Likewise.
9611 (read_call_site_scope): Likewise.
9612 (dwarf2_rnglists_process): Likewise.
9613 (dwarf2_ranges_process): Likewise.
9614 (dwarf2_ranges_read): Likewise.
9615 (dwarf_decode_lines_1): Likewise.
9616 (new_symbol): Likewise.
9617 (dwarf2_fetch_die_loc_sect_off): Likewise.
9618 (dwarf2_per_cu_text_offset): Likewise.
9619 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
9620 * hppa-tdep.c (read_unwind_info): Likewise.
9621 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
9622 * psympriv.h (struct partial_symtab): Likewise.
9623 * psymtab.c (find_pc_sect_psymtab): Likewise.
9624 * solib-svr4.c (enable_break): Likewise.
9625 * stap-probe.c (relocate_address): Use
9626 objfile::data_section_offset.
9627 * xcoffread.c (enter_line_range): Use
9628 objfile::text_section_offset.
9629 (read_xcoff_symtab): Likewise.
9630
9631 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
9632
9633 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
9634 declaration to narrower scopes.
9635
9636 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
9637
9638 * darwin-nat.h (struct darwin_exception_msg, enum
9639 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
9640 Move up.
9641 (class darwin_nat_target) <wait_1, check_new_threads,
9642 decode_exception_message, decode_message, stop_inferior,
9643 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
9644 * darwin-nat.c (darwin_check_new_threads): Rename to...
9645 (darwin_nat_target::check_new_threads): ... this.
9646 (darwin_suspend_inferior_it): Remove.
9647 (darwin_decode_exception_message): Rename to...
9648 (darwin_nat_target::decode_exception_message): ... this.
9649 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
9650 (darwin_decode_message): Rename to...
9651 (darwin_nat_target::decode_message): ... this.
9652 (cancel_breakpoint): Rename to...
9653 (darwin_nat_target::cancel_breakpoint): ... this.
9654 (darwin_wait): Rename to...
9655 (darwin_nat_target::wait_1): ... this. Use range-based for loop
9656 instead of iterate_over_inferiors.
9657 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
9658 (darwin_stop_inferior): Rename to...
9659 (darwin_nat_target::stop_inferior): ... this.
9660 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
9661 (darwin_init_thread_list): Rename to...
9662 (darwin_nat_target::init_thread_list): ... this.
9663 (darwin_ptrace_him): Rename to...
9664 (darwin_nat_target::ptrace_him): ... this.
9665 (darwin_nat_target::create_inferior): Pass lambda function to
9666 fork_inferior.
9667 (darwin_nat_target::detach): Call stop_inferior instead of
9668 darwin_stop_inferior.
9669 * fork-inferior.h (fork_inferior): Change init_trace_fun
9670 parameter to gdb::function_view.
9671 * fork-inferior.c (fork_inferior): Likewise.
9672
9673 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
9674
9675 * i386-cygwin-tdep.c (core_process_module_section): Update.
9676 * windows-nat.c (struct lm_info_windows): Add text_offset.
9677 (windows_xfer_shared_libraries): Update.
9678 * windows-tdep.c (windows_xfer_shared_library):
9679 Add text_offset_cached argument.
9680 * windows-tdep.h (windows_xfer_shared_library): Update.
9681
9682 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9683
9684 * gdbarch.sh: Add declaration for _initialize_gdbarch.
9685
9686 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9687
9688 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
9689 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
9690 replace with range-based for.
9691 (gdbsim_interrupt_inferior): Remove.
9692 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
9693 with a range-based for. Inline code from
9694 gdbsim_interrupt_inferior.
9695
9696 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9697
9698 * infrun.c (proceed): Fix indentation.
9699
9700 2020-01-21 Tom Tromey <tromey@adacore.com>
9701
9702 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
9703 * python/python.c (python_extension_ops): Update.
9704 (gdbpy_colorize): New function.
9705 * python/lib/gdb/__init__.py (colorize): New function.
9706 * extension.h (ext_lang_colorize): Declare.
9707 * extension.c (ext_lang_colorize): New function.
9708 * extension-priv.h (struct extension_language_ops) <colorize>: New
9709 member.
9710 * cli/cli-style.c (_initialize_cli_style): Update help text.
9711
9712 2020-01-21 Luis Machado <luis.machado@linaro.org>
9713
9714 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
9715 <cond>: Change type to bool.
9716 (aarch64_displaced_step_b_cond): Update cond to use bool type.
9717 (aarch64_displaced_step_cb): Likewise.
9718 (aarch64_displaced_step_tb): Likewise.
9719
9720 2020-01-21 Luis Machado <luis.machado@linaro.org>
9721
9722 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
9723 output.
9724
9725 2020-01-21 Luis Machado <luis.machado@linaro.org>
9726
9727 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
9728 <pc_adjust>: Adjust the documentation.
9729 (aarch64_displaced_step_fixup): Check if PC really moved before
9730 adjusting it.
9731
9732 2020-01-19 Tom Tromey <tom@tromey.com>
9733
9734 * disasm.c (~gdb_disassembler): New destructor.
9735 (gdb_buffered_insn_length): Call disassemble_free_target.
9736 * disasm.h (class gdb_disassembler): Declare destructor. Use
9737 DISABLE_COPY_AND_ASSIGN.
9738
9739 2020-01-19 Tom Tromey <tom@tromey.com>
9740
9741 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
9742 (die_reader_func_ftype): Remove.
9743 (cutu_reader): New class.
9744 (dw2_get_file_names_reader): Remove "data" parameter.
9745 (dw2_get_file_names): Use cutu_reader.
9746 (create_debug_type_hash_table): Update.
9747 (read_cutu_die_from_dwo): Update comment.
9748 (lookup_dwo_unit): Add dwo_name parameter.
9749 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
9750 die_reader_func_ftype and data parameters.
9751 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
9752 Remove die_reader_func_ftype and data parameters.
9753 (~cutu_reader): New; from init_cutu_and_read_dies.
9754 (cutu_reader::cutu_reader): Rename from
9755 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
9756 and data parameters.
9757 (init_cutu_and_read_dies_simple): Remove.
9758 (struct process_psymtab_comp_unit_data): Remove.
9759 (process_psymtab_comp_unit_reader): Remove data parameter; add
9760 want_partial_unit and pretend_language parameters.
9761 (process_psymtab_comp_unit): Use cutu_reader.
9762 (build_type_psymtabs_reader): Remove data parameter.
9763 (build_type_psymtabs_1): Use cutu_reader.
9764 (process_skeletonless_type_unit): Likewise.
9765 (load_partial_comp_unit_reader): Remove.
9766 (load_partial_comp_unit): Use cutu_reader.
9767 (load_full_comp_unit_reader): Remove.
9768 (load_full_comp_unit): Use cutu_reader.
9769 (struct create_dwo_cu_data): Remove.
9770 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
9771 dwo_unit parameters.
9772 (create_cus_hash_table): Use cutu_reader.
9773 (struct dwarf2_read_addr_index_data): Remove.
9774 (dwarf2_read_addr_index_reader): Remove.
9775 (dwarf2_read_addr_index): Use cutu_reader.
9776 (read_signatured_type_reader): Remove.
9777 (read_signatured_type): Use cutu_reader.
9778
9779 2020-01-19 Tom Tromey <tom@tromey.com>
9780
9781 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
9782 * tui/tui-wingeneral.h (class tui_suppress_output): New.
9783 (tui_wrefresh): Declare.
9784 * tui/tui-wingeneral.c (suppress_output): New global.
9785 (tui_suppress_output, ~tui_suppress_output): New constructor and
9786 destructor.
9787 (tui_wrefresh): New function.
9788 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
9789 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
9790 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
9791 method.
9792 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
9793 tui_wrefresh.
9794 (tui_data_window::no_refresh): New method.
9795 (tui_data_item_window::refresh_window): Call tui_wrefresh.
9796 (tui_reg_command): Use tui_suppress_output
9797 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
9798 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
9799 method.
9800 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
9801
9802 2020-01-19 Tom Tromey <tom@tromey.com>
9803
9804 * tui/tui-winsource.c (tui_update_source_windows_with_line):
9805 Handle case where symtab is null.
9806
9807 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
9808
9809 * linux-fork.c (one_fork_p): Simplify.
9810
9811 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9812
9813 * top.c (struct qt_args): Remove.
9814 (kill_or_detach): Change return type to void, replace `void *`
9815 parameter with a proper one.
9816 (print_inferior_quit_action): Likewise.
9817 (quit_confirm): Use range-based for loop to iterate over inferiors.
9818 (quit_force): Likewise.
9819
9820 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9821
9822 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
9823 `void *` parameter with proper parameters.
9824 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
9825 (print_one_inferior): Change return type to void, replace `void *`
9826 parameter with proper parameters.
9827 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
9828 inferiors.
9829 (get_other_inferior): Remove.
9830 (mi_cmd_remove_inferior): Use range-based loop to iterate over
9831 inferiors.
9832
9833 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9834
9835 * mi/mi-interp.c (report_initial_inferior): Remove.
9836 (mi_interp::init): Use range-based for to iterate over inferiors.
9837
9838 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9839
9840 * python/py-inferior.c (build_inferior_list): Remove.
9841 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
9842
9843 2020-01-16 Christian Biesinger <cbiesinger@google.com>
9844
9845 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
9846 (btrace_stitch_trace): Likewise.
9847 * charset.c (intermediate_encoding): Likewise (vaild).
9848 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
9849 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
9850 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
9851
9852 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
9853
9854 * windows-tdep.c (windows_get_tlb_type):
9855 Add rtl_user_process_parameters type.
9856
9857 2020-01-16 Pedro Alves <palves@redhat.com>
9858 Norbert Lange <nolange79@gmail.com>
9859
9860 PR build/24805
9861 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
9862 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
9863 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
9864 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
9865 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
9866 (ps_plog): Redeclare exported functions with default visibility.
9867
9868 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
9869
9870 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
9871 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
9872
9873 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
9874
9875 * infcmd.c (post_create_inferior): Use get_thread_regcache
9876 instead of get_current_regcache.
9877
9878 2020-01-14 Tom Tromey <tom@tromey.com>
9879
9880 PR symtab/12535:
9881 * python/python.c (gdbpy_decode_line): Treat empty string the same
9882 as no argument.
9883
9884 2020-01-14 Tom Tromey <tom@tromey.com>
9885
9886 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
9887
9888 2020-01-14 Tom Tromey <tom@tromey.com>
9889
9890 * nat/linux-btrace.c: Don't include <config.h>.
9891 * nat/linux-ptrace.c: Don't include <config.h>.
9892 * nat/x86-linux-dregs.c: Don't include <config.h>.
9893
9894 2020-01-14 Tom Tromey <tom@tromey.com>
9895
9896 * configure: Rebuild.
9897 * configure.ac: Move many checks to ../gdbsupport/common.m4.
9898
9899 2020-01-14 Tom Tromey <tom@tromey.com>
9900
9901 * nat/x86-linux-dregs.c: Include configh.h.
9902 * nat/linux-ptrace.c: Include configh.h.
9903 * nat/linux-btrace.c: Include configh.h.
9904 * defs.h: Include config.h, bfd.h.
9905 * configure.ac: Don't source common.host.
9906 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
9907 * configure: Rebuild.
9908 * acinclude.m4: Update path.
9909 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
9910 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
9911 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
9912 (CLIBS): Add LIBSUPPORT.
9913 (CDEPS): Likewise.
9914 (COMMON_SFILES): Remove gdbsupport files.
9915 (HFILES_NO_SRCDIR): Likewise.
9916 (stamp-version): Update path to create-version.sh.
9917 (ALLDEPFILES): Remove gdbsupport files.
9918
9919 2020-01-14 Tom Tromey <tom@tromey.com>
9920
9921 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
9922 USE_WIN32API when needed.
9923 * configure.ac (USE_WIN32API): Don't define.
9924 (WIN32LIBS): Use WIN32APILIBS.
9925 * configure: Rebuild.
9926
9927 2020-01-14 Tom Tromey <tom@tromey.com>
9928
9929 * configure: Rebuild.
9930 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
9931
9932 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9933
9934 * skip.c (skip_function_command): Make skip w/o arguments use the
9935 name of the inlined function if pc is inside any inlined function.
9936
9937 2020-01-14 Luis Machado <luis.machado@linaro.org>
9938
9939 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
9940 * infrun.c (resume_1): Likewise.
9941 (handle_inferior_event): Remove stale comment.
9942 * linux-nat.c (linux_nat_target::resume): Update comments.
9943 (save_stop_reason): Likewise.
9944 (linux_nat_filter_event): Likewise.
9945 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
9946
9947 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
9948
9949 * elfread.c (record_minimal_symbol): Set section index to 0 for
9950 non-allocatable sections.
9951
9952
9953 2020-01-13 Ali Tamur <tamur@google.com>
9954
9955 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
9956 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
9957 to gdb::optional. Update comments.
9958 (dwo_file): Update comments.
9959 (read_attribute): Update API to take an additional out parameter,
9960 need_reprocess. This is used to mark attributes that need other
9961 attributes (e.g. str_offsets_base) for correct computation which may not
9962 have been read yet.
9963 (read_attribute_reprocess): New function declaration.
9964 (read_addr_index): Likewise.
9965 (read_dwo_str_index): Likewise.
9966 (read_stub_str_index): Likewise.
9967 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
9968 (lookup_addr_base): New function definition.
9969 (lookup_ranges_base): Likewise.
9970 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
9971 lookup_ranges_base.
9972 (init_cutu_and_read_dies): Update comments.
9973 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
9974 unit. This is used to inherit parent's str_offsets_base and addr_base.
9975 Update comments.
9976 (init_cutu_and_read_dies_simple): Reflect API changes.
9977 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
9978 (create_cus_hash_table): Change API to take parent compile unit.
9979 Reflect API changes.
9980 (open_and_init_dwo_file): Reflect API changes.
9981 (dwarf2_get_pc_bounds): Update comments.
9982 (dwarf2_record_block_ranges): Likewise.
9983 (read_full_die_1): Change implementation to reprocess attributes that
9984 need str_offsets_base and addr_base.
9985 (partial_die_info::read): Likewise.
9986 (read_attribute_reprocess): New function definition.
9987 (read_attribute_value): Change API to take an additional out parameter,
9988 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
9989 when a non-dwo compile unit has index based attributes.
9990 (read_attribute): Reflect API changes.
9991 (read_addr_index_1): Reflect API changes. Update comments.
9992 (dwarf2_read_addr_index_data): Reflect API changes.
9993 (dwarf2_read_addr_index): Likewise.
9994 (read_str_index): Change API and implementation. This becomes a helper
9995 to be used by the new string index related methods. Update error
9996 message and comments.
9997 (read_dwo_str_index): New function definition.
9998 (read_stub_str_index): Likewise.
9999 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
10000 * symfile.h (dwarf2_debug_sections): Likewise.
10001 * xcoffread.c (dwarf2_debug_sections): Likewise.
10002
10003 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10004
10005 * gdbcore.h (struct core_fns) <core_read_registers>: Change
10006 core_reg_sect type to gdb_byte *.
10007 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
10008 * cris-tdep.c (fetch_core_registers): Likewise.
10009 * corelow.c (core_target::get_core_register_section): Change
10010 type of `contents` to gdb::byte_vector.
10011
10012 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
10013
10014 * tui/tui-wingeneral.c (box_win): Position the title in the center
10015 of the border.
10016
10017 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10018
10019 * corelow.c (core_target::get_core_register_section): Use
10020 std::vector instead of alloca.
10021
10022 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10023
10024 * warning.m4: Add -Wmissing-declarations to build_warnings.
10025 * configure: Re-generate.
10026
10027 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10028
10029 * python/python.c (init__gdb_module): Add declaration.
10030
10031 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10032
10033 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
10034 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
10035 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
10036 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
10037 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
10038 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
10039 * ada-exp.y (_initialize_ada_exp): Add declaration.
10040 * ada-lang.c (_initialize_ada_language): Add declaration.
10041 * ada-tasks.c (_initialize_tasks): Add declaration.
10042 * agent.c (_initialize_agent): Add declaration.
10043 * aix-thread.c (_initialize_aix_thread): Add declaration.
10044 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
10045 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
10046 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
10047 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
10048 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
10049 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
10050 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
10051 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
10052 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
10053 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
10054 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
10055 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
10056 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
10057 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
10058 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
10059 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
10060 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
10061 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
10062 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
10063 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
10064 * annotate.c (_initialize_annotate): Add declaration.
10065 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
10066 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
10067 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
10068 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
10069 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
10070 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
10071 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
10072 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
10073 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
10074 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
10075 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
10076 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
10077 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
10078 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
10079 * auto-load.c (_initialize_auto_load): Add declaration.
10080 * auxv.c (_initialize_auxv): Add declaration.
10081 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
10082 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
10083 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
10084 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
10085 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
10086 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
10087 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
10088 * breakpoint.c (_initialize_breakpoint): Add declaration.
10089 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
10090 * btrace.c (_initialize_btrace): Add declaration.
10091 * charset.c (_initialize_charset): Add declaration.
10092 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
10093 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
10094 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
10095 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
10096 * cli/cli-script.c (_initialize_cli_script): Add declaration.
10097 * cli/cli-style.c (_initialize_cli_style): Add declaration.
10098 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
10099 * coffread.c (_initialize_coffread): Add declaration.
10100 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
10101 * compile/compile.c (_initialize_compile): Add declaration.
10102 * complaints.c (_initialize_complaints): Add declaration.
10103 * completer.c (_initialize_completer): Add declaration.
10104 * copying.c (_initialize_copying): Add declaration.
10105 * corefile.c (_initialize_core): Add declaration.
10106 * corelow.c (_initialize_corelow): Add declaration.
10107 * cp-abi.c (_initialize_cp_abi): Add declaration.
10108 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
10109 * cp-support.c (_initialize_cp_support): Add declaration.
10110 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
10111 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
10112 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
10113 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
10114 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
10115 * ctfread.c (_initialize_ctfread): Add declaration.
10116 * d-lang.c (_initialize_d_language): Add declaration.
10117 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
10118 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
10119 * dbxread.c (_initialize_dbxread): Add declaration.
10120 * dcache.c (_initialize_dcache): Add declaration.
10121 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
10122 * disasm.c (_initialize_disasm): Add declaration.
10123 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
10124 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
10125 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
10126 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
10127 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
10128 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
10129 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
10130 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
10131 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
10132 * elfread.c (_initialize_elfread): Add declaration.
10133 * exec.c (_initialize_exec): Add declaration.
10134 * extension.c (_initialize_extension): Add declaration.
10135 * f-lang.c (_initialize_f_language): Add declaration.
10136 * f-valprint.c (_initialize_f_valprint): Add declaration.
10137 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
10138 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
10139 * filesystem.c (_initialize_filesystem): Add declaration.
10140 * findcmd.c (_initialize_mem_search): Add declaration.
10141 * findvar.c (_initialize_findvar): Add declaration.
10142 * fork-child.c (_initialize_fork_child): Add declaration.
10143 * frame-base.c (_initialize_frame_base): Add declaration.
10144 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
10145 * frame.c (_initialize_frame): Add declaration.
10146 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
10147 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
10148 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
10149 * gcore.c (_initialize_gcore): Add declaration.
10150 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
10151 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
10152 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
10153 * gdbarch.c (_initialize_gdbarch): Add declaration.
10154 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
10155 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
10156 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
10157 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
10158 * go-lang.c (_initialize_go_language): Add declaration.
10159 * go32-nat.c (_initialize_go32_nat): Add declaration.
10160 * guile/guile.c (_initialize_guile): Add declaration.
10161 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
10162 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
10163 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
10164 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
10165 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
10166 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
10167 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
10168 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
10169 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
10170 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
10171 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
10172 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
10173 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
10174 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
10175 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
10176 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
10177 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
10178 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
10179 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
10180 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
10181 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
10182 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
10183 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
10184 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
10185 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
10186 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
10187 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
10188 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
10189 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
10190 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
10191 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
10192 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
10193 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
10194 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
10195 * infcall.c (_initialize_infcall): Add declaration.
10196 * infcmd.c (_initialize_infcmd): Add declaration.
10197 * inflow.c (_initialize_inflow): Add declaration.
10198 * infrun.c (_initialize_infrun): Add declaration.
10199 * interps.c (_initialize_interpreter): Add declaration.
10200 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
10201 * jit.c (_initialize_jit): Add declaration.
10202 * language.c (_initialize_language): Add declaration.
10203 * linux-fork.c (_initialize_linux_fork): Add declaration.
10204 * linux-nat.c (_initialize_linux_nat): Add declaration.
10205 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
10206 * linux-thread-db.c (_initialize_thread_db): Add declaration.
10207 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
10208 * m2-lang.c (_initialize_m2_language): Add declaration.
10209 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
10210 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
10211 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
10212 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
10213 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
10214 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
10215 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
10216 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
10217 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
10218 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
10219 * machoread.c (_initialize_machoread): Add declaration.
10220 * macrocmd.c (_initialize_macrocmd): Add declaration.
10221 * macroscope.c (_initialize_macroscope): Add declaration.
10222 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
10223 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
10224 * maint.c (_initialize_maint_cmds): Add declaration.
10225 * mdebugread.c (_initialize_mdebugread): Add declaration.
10226 * memattr.c (_initialize_mem): Add declaration.
10227 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
10228 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
10229 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
10230 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
10231 * mi/mi-main.c (_initialize_mi_main): Add declaration.
10232 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
10233 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
10234 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
10235 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
10236 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
10237 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
10238 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
10239 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
10240 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
10241 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
10242 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
10243 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
10244 * mipsread.c (_initialize_mipsread): Add declaration.
10245 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
10246 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
10247 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
10248 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
10249 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
10250 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
10251 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
10252 * nto-procfs.c (_initialize_procfs): Add declaration.
10253 * objc-lang.c (_initialize_objc_language): Add declaration.
10254 * observable.c (_initialize_observer): Add declaration.
10255 * opencl-lang.c (_initialize_opencl_language): Add declaration.
10256 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
10257 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
10258 * osabi.c (_initialize_gdb_osabi): Add declaration.
10259 * osdata.c (_initialize_osdata): Add declaration.
10260 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
10261 * parse.c (_initialize_parse): Add declaration.
10262 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
10263 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
10264 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
10265 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
10266 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
10267 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
10268 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
10269 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
10270 * printcmd.c (_initialize_printcmd): Add declaration.
10271 * probe.c (_initialize_probe): Add declaration.
10272 * proc-api.c (_initialize_proc_api): Add declaration.
10273 * proc-events.c (_initialize_proc_events): Add declaration.
10274 * proc-service.c (_initialize_proc_service): Add declaration.
10275 * procfs.c (_initialize_procfs): Add declaration.
10276 * producer.c (_initialize_producer): Add declaration.
10277 * psymtab.c (_initialize_psymtab): Add declaration.
10278 * python/python.c (_initialize_python): Add declaration.
10279 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
10280 * record-btrace.c (_initialize_record_btrace): Add declaration.
10281 * record-full.c (_initialize_record_full): Add declaration.
10282 * record.c (_initialize_record): Add declaration.
10283 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
10284 * regcache.c (_initialize_regcache): Add declaration.
10285 * reggroups.c (_initialize_reggroup): Add declaration.
10286 * remote-notif.c (_initialize_notif): Add declaration.
10287 * remote-sim.c (_initialize_remote_sim): Add declaration.
10288 * remote.c (_initialize_remote): Add declaration.
10289 * reverse.c (_initialize_reverse): Add declaration.
10290 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
10291 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
10292 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
10293 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
10294 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
10295 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
10296 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
10297 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
10298 Add declaration.
10299 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
10300 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
10301 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
10302 * rust-exp.y (_initialize_rust_exp): Add declaration.
10303 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
10304 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
10305 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
10306 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
10307 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
10308 * score-tdep.c (_initialize_score_tdep): Add declaration.
10309 * ser-go32.c (_initialize_ser_dos): Add declaration.
10310 * ser-mingw.c (_initialize_ser_windows): Add declaration.
10311 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
10312 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
10313 * ser-uds.c (_initialize_ser_socket): Add declaration.
10314 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
10315 * serial.c (_initialize_serial): Add declaration.
10316 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
10317 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
10318 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
10319 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
10320 * skip.c (_initialize_step_skip): Add declaration.
10321 * sol-thread.c (_initialize_sol_thread): Add declaration.
10322 * solib-aix.c (_initialize_solib_aix): Add declaration.
10323 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
10324 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
10325 * solib-frv.c (_initialize_frv_solib): Add declaration.
10326 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
10327 * solib-target.c (_initialize_solib_target): Add declaration.
10328 * solib.c (_initialize_solib): Add declaration.
10329 * source-cache.c (_initialize_source_cache): Add declaration.
10330 * source.c (_initialize_source): Add declaration.
10331 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
10332 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
10333 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
10334 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
10335 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
10336 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
10337 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
10338 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
10339 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
10340 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
10341 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
10342 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
10343 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
10344 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
10345 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
10346 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
10347 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
10348 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
10349 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
10350 * stabsread.c (_initialize_stabsread): Add declaration.
10351 * stack.c (_initialize_stack): Add declaration.
10352 * stap-probe.c (_initialize_stap_probe): Add declaration.
10353 * std-regs.c (_initialize_frame_reg): Add declaration.
10354 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
10355 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
10356 * symfile.c (_initialize_symfile): Add declaration.
10357 * symmisc.c (_initialize_symmisc): Add declaration.
10358 * symtab.c (_initialize_symtab): Add declaration.
10359 * target.c (_initialize_target): Add declaration.
10360 * target-connection.c (_initialize_target_connection): Add
10361 declaration.
10362 * target-dcache.c (_initialize_target_dcache): Add declaration.
10363 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
10364 * thread.c (_initialize_thread): Add declaration.
10365 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
10366 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
10367 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
10368 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
10369 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
10370 * tracectf.c (_initialize_ctf): Add declaration.
10371 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
10372 * tracefile.c (_initialize_tracefile): Add declaration.
10373 * tracepoint.c (_initialize_tracepoint): Add declaration.
10374 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
10375 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
10376 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
10377 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
10378 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
10379 * tui/tui-win.c (_initialize_tui_win): Add declaration.
10380 * tui/tui.c (_initialize_tui): Add declaration.
10381 * typeprint.c (_initialize_typeprint): Add declaration.
10382 * ui-style.c (_initialize_ui_style): Add declaration.
10383 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
10384 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
10385 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
10386 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
10387 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
10388 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
10389 * unittests/filtered_iterator-selftests.c
10390 (_initialize_filtered_iterator_selftests): Add declaration.
10391 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
10392 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
10393 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
10394 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
10395 * unittests/main-thread-selftests.c
10396 (_initialize_main_thread_selftests): Add declaration.
10397 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
10398 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
10399 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
10400 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
10401 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
10402 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
10403 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
10404 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
10405 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
10406 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
10407 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
10408 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
10409 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
10410 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
10411 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
10412 declaration.
10413 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
10414 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
10415 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
10416 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
10417 * user-regs.c (_initialize_user_regs): Add declaration.
10418 * utils.c (_initialize_utils): Add declaration.
10419 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
10420 * valops.c (_initialize_valops): Add declaration.
10421 * valprint.c (_initialize_valprint): Add declaration.
10422 * value.c (_initialize_values): Add declaration.
10423 * varobj.c (_initialize_varobj): Add declaration.
10424 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
10425 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
10426 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
10427 * windows-nat.c (_initialize_windows_nat): Add declaration.
10428 (_initialize_check_for_gdb_ini): Add declaration.
10429 (_initialize_loadable): Add declaration.
10430 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
10431 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
10432 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
10433 * xcoffread.c (_initialize_xcoffread): Add declaration.
10434 * xml-support.c (_initialize_xml_support): Add declaration.
10435 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
10436 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
10437 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
10438 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
10439
10440 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10441
10442 * regformats/regdat.sh: Generate declaration for init function.
10443
10444 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10445
10446 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
10447 up.
10448 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
10449 close_one_inferior>: New methods.
10450 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
10451 pass down target to find_inferior_pid.
10452 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
10453 Pass down target to find_inferior_ptid.
10454 (gdbsim_target::create_inferior): Pass down target to
10455 add_thread_silent.
10456 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
10457 target down to find_inferior_ptid and switch_to_thread.
10458 (gdbsim_target::close): Update to call close_one_inferior.
10459 (struct resume_data): Remove.
10460 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
10461 directly, rather than through a void pointer.
10462 (gdbsim_target::resume): Update to call resume_one_inferior.
10463
10464 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
10465
10466 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
10467
10468 2020-01-12 Pedro Alves <palves@redhat.com>
10469
10470 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
10471 directly for the current inferior instead of
10472 discard_all_inferiors.
10473 (discard_all_inferiors): Delete.
10474
10475 2020-01-11 Tom Tromey <tom@tromey.com>
10476
10477 * tui/tui-wingeneral.c (box_win): Check cli_styling.
10478 * tui/tui-winsource.c (tui_source_window_base::refill): Use
10479 deprecated_safe_get_selected_frame.
10480
10481 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
10482
10483 * inferior.c (print_inferior): Switch inferior before printing it.
10484
10485 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
10486 Pedro Alves <palves@redhat.com>
10487
10488 * progspace-and-thread.c (switch_to_program_space_and_thread):
10489 Assert there's an inferior for PSPACE. Use
10490 switch_to_inferior_no_thread to switch the inferior too.
10491 * progspace.c (program_space::~program_space): Call
10492 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
10493 (program_space::free_all_objfiles): Don't call clear_symtab_users
10494 here.
10495 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
10496
10497 2020-01-10 Pedro Alves <palves@redhat.com>
10498
10499 * NEWS: Mention multi-target debugging, "info connections", and
10500 "add-inferior -no-connection".
10501
10502 2020-01-10 Pedro Alves <palves@redhat.com>
10503
10504 * infrun.c: Include "target-connection.h".
10505 (check_multi_target_resumption): New.
10506 (proceed): Call it.
10507 * target-connection.c (make_target_connection_string): Make
10508 extern.
10509 * target-connection.h (make_target_connection_string): Declare.
10510
10511 2020-01-10 Pedro Alves <palves@redhat.com>
10512
10513 * Makefile.in (COMMON_SFILES): Add target-connection.c.
10514 * inferior.c (uiout_field_connection): New function.
10515 (print_inferior): Add new "connection-id" column.
10516 (add_inferior_command): Show connection number/string of added
10517 inferior.
10518 * process-stratum-target.h
10519 (process_stratum_target::connection_string): New virtual method.
10520 (process_stratum_target::connection_number): New field.
10521 * remote.c (remote_target::connection_string): New override.
10522 * target-connection.c: New file.
10523 * target-connection.h: New file.
10524 * target.c (decref_target): Remove process_stratum targets from
10525 the connection list.
10526 (target_stack::push): Add process_stratum targets to the
10527 connection list.
10528
10529 2020-01-10 Pedro Alves <palves@redhat.com>
10530
10531 Revert:
10532 2016-04-12 Pedro Alves <palves@redhat.com>
10533 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
10534 Remove references to name.
10535 * serial.h (struct serial) <name>: Delete.
10536
10537 2020-01-10 Pedro Alves <palves@redhat.com>
10538
10539 * gdbarch-selftests.c (register_to_value_test): Remove "target
10540 already pushed" check.
10541
10542 2020-01-10 Pedro Alves <palves@redhat.com>
10543 John Baldwin <jhb@FreeBSD.org>
10544
10545 * aarch64-linux-nat.c
10546 (aarch64_linux_nat_target::thread_architecture): Adjust.
10547 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
10548 (task_command_1): Likewise.
10549 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
10550 (aix_thread_target::wait, aix_thread_target::fetch_registers)
10551 (aix_thread_target::store_registers)
10552 (aix_thread_target::thread_alive): Adjust.
10553 * amd64-fbsd-tdep.c: Include "inferior.h".
10554 (amd64fbsd_get_thread_local_address): Pass down target.
10555 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
10556 thread's gdbarch instead of target_gdbarch.
10557 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
10558 get_last_target_status.
10559 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
10560 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
10561 inferiors.
10562 (update_inserted_breakpoint_locations): Skip if inferiors with no
10563 execution.
10564 (update_global_location_list): When handling moribund locations,
10565 find representative inferior for location's pspace, and use thread
10566 count of its process_stratum target.
10567 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
10568 * bsd-uthread.c (bsd_uthread_target::wait): Use
10569 as_process_stratum_target and adjust thread_change_ptid and
10570 add_thread calls.
10571 (bsd_uthread_target::update_thread_list): Use
10572 as_process_stratum_target and adjust find_thread_ptid,
10573 thread_change_ptid and add_thread calls.
10574 * btrace.c (maint_btrace_packet_history_cmd): Adjust
10575 find_thread_ptid call.
10576 * corelow.c (add_to_thread_list): Adjust add_thread call.
10577 (core_target_open): Adjust add_thread_silent and thread_count
10578 calls.
10579 (core_target::pid_to_str): Adjust find_inferior_ptid call.
10580 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
10581 * event-top.c (async_disconnect): Pop targets from all inferiors.
10582 * exec.c (add_target_sections): Push exec target on all inferiors
10583 sharing the program space.
10584 (remove_target_sections): Remove the exec target from all
10585 inferiors sharing the program space.
10586 (exec_on_vfork): New.
10587 * exec.h (exec_on_vfork): Declare.
10588 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
10589 Pass it down.
10590 (fbsd_nat_target::update_thread_list): Adjust.
10591 (fbsd_nat_target::resume): Adjust.
10592 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
10593 down.
10594 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
10595 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
10596 get_thread_arch_regcache call.
10597 * fork-child.c (gdb_startup_inferior): Pass target down to
10598 startup_inferior and set_executing.
10599 * gdbthread.h (struct process_stratum_target): Forward declare.
10600 (add_thread, add_thread_silent, add_thread_with_info)
10601 (in_thread_list): Add process_stratum_target parameter.
10602 (find_thread_ptid(inferior*, ptid_t)): New overload.
10603 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
10604 parameter.
10605 (all_threads()): Delete overload.
10606 (all_threads, all_non_exited_threads): Add process_stratum_target
10607 parameter.
10608 (all_threads_safe): Use brace initialization.
10609 (thread_count): Add process_stratum_target parameter.
10610 (set_resumed, set_running, set_stop_requested, set_executing)
10611 (threads_are_executing, finish_thread_state): Add
10612 process_stratum_target parameter.
10613 (switch_to_thread): Use is_current_thread.
10614 * i386-fbsd-tdep.c: Include "inferior.h".
10615 (i386fbsd_get_thread_local_address): Pass down target.
10616 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
10617 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
10618 have_inferiors check.
10619 * inf-ptrace.c (inf_ptrace_target::create_inferior)
10620 (inf_ptrace_target::attach): Adjust.
10621 * infcall.c (run_inferior_call): Adjust.
10622 * infcmd.c (run_command_1): Pass target to
10623 scoped_finish_thread_state.
10624 (proceed_thread_callback): Skip inferiors with no execution.
10625 (continue_command): Rename 'all_threads' local to avoid hiding
10626 'all_threads' function. Adjust get_last_target_status call.
10627 (prepare_one_step): Adjust set_running call.
10628 (signal_command): Use user_visible_resume_target. Compare thread
10629 pointers instead of inferior_ptid.
10630 (info_program_command): Adjust to pass down target.
10631 (attach_command): Mark target's 'thread_executing' flag.
10632 (stop_current_target_threads_ns): New, factored out from ...
10633 (interrupt_target_1): ... this. Switch inferior before making
10634 target calls.
10635 * inferior-iter.h
10636 (struct all_inferiors_iterator, struct all_inferiors_range)
10637 (struct all_inferiors_safe_range)
10638 (struct all_non_exited_inferiors_range): Filter on
10639 process_stratum_target too. Remove explicit.
10640 * inferior.c (inferior::inferior): Push dummy target on target
10641 stack.
10642 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
10643 Add process_stratum_target parameter, and pass it down.
10644 (have_live_inferiors): Adjust.
10645 (switch_to_inferior_and_push_target): New.
10646 (add_inferior_command, clone_inferior_command): Handle
10647 "-no-connection" parameter. Use
10648 switch_to_inferior_and_push_target.
10649 (_initialize_inferior): Mention "-no-connection" option in
10650 the help of "add-inferior" and "clone-inferior" commands.
10651 * inferior.h: Include "process-stratum-target.h".
10652 (interrupt_target_1): Use bool.
10653 (struct inferior) <push_target, unpush_target, target_is_pushed,
10654 find_target_beneath, top_target, process_target, target_at,
10655 m_stack>: New.
10656 (discard_all_inferiors): Delete.
10657 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
10658 (all_inferiors, all_non_exited_inferiors): Add
10659 process_stratum_target parameter.
10660 * infrun.c: Include "gdb_select.h" and <unordered_map>.
10661 (target_last_proc_target): New global.
10662 (follow_fork_inferior): Push target on new inferior. Pass target
10663 to add_thread_silent. Call exec_on_vfork. Handle target's
10664 reference count.
10665 (follow_fork): Adjust get_last_target_status call. Also consider
10666 target.
10667 (follow_exec): Push target on new inferior.
10668 (struct execution_control_state) <target>: New field.
10669 (user_visible_resume_target): New.
10670 (do_target_resume): Call target_async.
10671 (resume_1): Set target's threads_executing flag. Consider resume
10672 target.
10673 (commit_resume_all_targets): New.
10674 (proceed): Also consider resume target. Skip threads of inferiors
10675 with no execution. Commit resumtion in all targets.
10676 (start_remote): Pass current inferior to wait_for_inferior.
10677 (infrun_thread_stop_requested): Consider target as well. Pass
10678 thread_info pointer to clear_inline_frame_state instead of ptid.
10679 (infrun_thread_thread_exit): Consider target as well.
10680 (random_pending_event_thread): New inferior parameter. Use it.
10681 (do_target_wait): Rename to ...
10682 (do_target_wait_1): ... this. Add inferior parameter, and pass it
10683 down.
10684 (threads_are_resumed_pending_p, do_target_wait): New.
10685 (prepare_for_detach): Adjust calls.
10686 (wait_for_inferior): New inferior parameter. Handle it. Use
10687 do_target_wait_1 instead of do_target_wait.
10688 (fetch_inferior_event): Adjust. Switch to representative
10689 inferior. Pass target down.
10690 (set_last_target_status): Add process_stratum_target parameter.
10691 Save target in global.
10692 (get_last_target_status): Add process_stratum_target parameter and
10693 handle it.
10694 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
10695 (context_switch): Check inferior_ptid == null_ptid before calling
10696 inferior_thread().
10697 (get_inferior_stop_soon): Pass down target.
10698 (wait_one): Rename to ...
10699 (poll_one_curr_target): ... this.
10700 (struct wait_one_event): New.
10701 (wait_one): New.
10702 (stop_all_threads): Adjust.
10703 (handle_no_resumed, handle_inferior_event): Adjust to consider the
10704 event's target.
10705 (switch_back_to_stepped_thread): Also consider target.
10706 (print_stop_event): Update.
10707 (normal_stop): Update. Also consider the resume target.
10708 * infrun.h (wait_for_inferior): Remove declaration.
10709 (user_visible_resume_target): New declaration.
10710 (get_last_target_status, set_last_target_status): New
10711 process_stratum_target parameter.
10712 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
10713 process_stratum_target parameter, and use it.
10714 (clear_inline_frame_state (thread_info*)): New.
10715 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
10716 process_stratum_target parameter.
10717 (clear_inline_frame_state (thread_info*)): Declare.
10718 * linux-fork.c (delete_checkpoint_command): Pass target down to
10719 find_thread_ptid.
10720 (checkpoint_command): Adjust.
10721 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
10722 instead of just tweaking inferior_ptid.
10723 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
10724 (exit_lwp): Pass target down to find_thread_ptid.
10725 (attach_proc_task_lwp_callback): Pass target down to
10726 add_thread/set_running/set_executing.
10727 (linux_nat_target::attach): Pass target down to
10728 thread_change_ptid.
10729 (get_detach_signal): Pass target down to find_thread_ptid.
10730 Consider last target status's target.
10731 (linux_resume_one_lwp_throw, resume_lwp)
10732 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
10733 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
10734 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
10735 (linux_nat_target::async_wait_fd): New.
10736 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
10737 target down.
10738 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
10739 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
10740 * linux-thread-db.c (struct thread_db_info::process_target): New
10741 field.
10742 (add_thread_db_info): Save target.
10743 (get_thread_db_info): New process_stratum_target parameter. Also
10744 match target.
10745 (delete_thread_db_info): New process_stratum_target parameter.
10746 Also match target.
10747 (thread_from_lwp): Adjust to pass down target.
10748 (thread_db_notice_clone): Pass down target.
10749 (check_thread_db_callback): Pass down target.
10750 (try_thread_db_load_1): Always push the thread_db target.
10751 (try_thread_db_load, record_thread): Pass target down.
10752 (thread_db_target::detach): Pass target down. Always unpush the
10753 thread_db target.
10754 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
10755 target down. Always unpush the thread_db target.
10756 (find_new_threads_callback, thread_db_find_new_threads_2)
10757 (thread_db_target::update_thread_list): Pass target down.
10758 (thread_db_target::pid_to_str): Pass current inferior down.
10759 (thread_db_target::get_thread_local_address): Pass target down.
10760 (thread_db_target::resume, maintenance_check_libthread_db): Pass
10761 target down.
10762 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
10763 * procfs.c (procfs_target::procfs_init_inferior): Declare.
10764 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
10765 (procfs_init_inferior): Rename to ...
10766 (procfs_target::procfs_init_inferior): ... this and adjust.
10767 (procfs_target::create_inferior, procfs_notice_thread)
10768 (procfs_do_thread_registers): Adjust.
10769 * ppc-fbsd-tdep.c: Include "inferior.h".
10770 (ppcfbsd_get_thread_local_address): Pass down target.
10771 * proc-service.c (ps_xfer_memory): Switch current inferior and
10772 program space as well.
10773 (get_ps_regcache): Pass target down.
10774 * process-stratum-target.c
10775 (process_stratum_target::thread_address_space)
10776 (process_stratum_target::thread_architecture): Pass target down.
10777 * process-stratum-target.h
10778 (process_stratum_target::threads_executing): New field.
10779 (as_process_stratum_target): New.
10780 * ravenscar-thread.c
10781 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
10782 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
10783 down.
10784 * record-btrace.c (record_btrace_target::info_record): Adjust.
10785 (record_btrace_target::record_method)
10786 (record_btrace_target::record_is_replaying)
10787 (record_btrace_target::fetch_registers)
10788 (get_thread_current_frame_id, record_btrace_target::resume)
10789 (record_btrace_target::wait, record_btrace_target::stop): Pass
10790 target down.
10791 * record-full.c (record_full_wait_1): Switch to event thread.
10792 Pass target down.
10793 * regcache.c (regcache::regcache)
10794 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
10795 process_stratum_target parameter and handle it.
10796 (current_thread_target): New global.
10797 (get_thread_regcache): Add process_stratum_target parameter and
10798 handle it. Switch inferior before calling target method.
10799 (get_thread_regcache): Pass target down.
10800 (get_thread_regcache_for_ptid): Pass target down.
10801 (registers_changed_ptid): Add process_stratum_target parameter and
10802 handle it.
10803 (registers_changed_thread, registers_changed): Pass target down.
10804 (test_get_thread_arch_aspace_regcache): New.
10805 (current_regcache_test): Define a couple local test_target_ops
10806 instances and use them for testing.
10807 (readwrite_regcache): Pass process_stratum_target parameter.
10808 (cooked_read_test, cooked_write_test): Pass mock_target down.
10809 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
10810 (get_thread_arch_aspace_regcache): Add process_stratum_target
10811 parameter.
10812 (regcache::target): New method.
10813 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
10814 (regcache::registers_changed_ptid): Add process_stratum_target
10815 parameter.
10816 (regcache::m_target): New field.
10817 (registers_changed_ptid): Add process_stratum_target parameter.
10818 * remote.c (remote_state::supports_vCont_probed): New field.
10819 (remote_target::async_wait_fd): New method.
10820 (remote_unpush_and_throw): Add remote_target parameter.
10821 (get_current_remote_target): Adjust.
10822 (remote_target::remote_add_inferior): Push target.
10823 (remote_target::remote_add_thread)
10824 (remote_target::remote_notice_new_inferior)
10825 (get_remote_thread_info): Pass target down.
10826 (remote_target::update_thread_list): Skip threads of inferiors
10827 bound to other targets. (remote_target::close): Don't discard
10828 inferiors. (remote_target::add_current_inferior_and_thread)
10829 (remote_target::process_initial_stop_replies)
10830 (remote_target::start_remote)
10831 (remote_target::remote_serial_quit_handler): Pass down target.
10832 (remote_target::remote_unpush_target): New remote_target
10833 parameter. Unpush the target from all inferiors.
10834 (remote_target::remote_unpush_and_throw): New remote_target
10835 parameter. Pass it down.
10836 (remote_target::open_1): Check whether the current inferior has
10837 execution instead of checking whether any inferior is live. Pass
10838 target down.
10839 (remote_target::remote_detach_1): Pass down target. Use
10840 remote_unpush_target.
10841 (extended_remote_target::attach): Pass down target.
10842 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
10843 (remote_target::append_resumption): Pass down target.
10844 (remote_target::append_pending_thread_resumptions)
10845 (remote_target::remote_resume_with_hc, remote_target::resume)
10846 (remote_target::commit_resume): Pass down target.
10847 (remote_target::remote_stop_ns): Check supports_vCont_probed.
10848 (remote_target::interrupt_query)
10849 (remote_target::remove_new_fork_children)
10850 (remote_target::check_pending_events_prevent_wildcard_vcont)
10851 (remote_target::remote_parse_stop_reply)
10852 (remote_target::process_stop_reply): Pass down target.
10853 (first_remote_resumed_thread): New remote_target parameter. Pass
10854 it down.
10855 (remote_target::wait_as): Pass down target.
10856 (unpush_and_perror): New remote_target parameter. Pass it down.
10857 (remote_target::readchar, remote_target::remote_serial_write)
10858 (remote_target::getpkt_or_notif_sane_1)
10859 (remote_target::kill_new_fork_children, remote_target::kill): Pass
10860 down target.
10861 (remote_target::mourn_inferior): Pass down target. Use
10862 remote_unpush_target.
10863 (remote_target::core_of_thread)
10864 (remote_target::remote_btrace_maybe_reopen): Pass down target.
10865 (remote_target::pid_to_exec_file)
10866 (remote_target::thread_handle_to_thread_info): Pass down target.
10867 (remote_target::async_wait_fd): New.
10868 * riscv-fbsd-tdep.c: Include "inferior.h".
10869 (riscv_fbsd_get_thread_local_address): Pass down target.
10870 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
10871 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
10872 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
10873 Adjust.
10874 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
10875 * solib-svr4.c (enable_break): Pass down target.
10876 * spu-multiarch.c (parse_spufs_run): Pass down target.
10877 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
10878 * target-delegates.c: Regenerate.
10879 * target.c (g_target_stack): Delete.
10880 (current_top_target): Return the current inferior's top target.
10881 (target_has_execution_1): Refer to the passed-in inferior's top
10882 target.
10883 (target_supports_terminal_ours): Check whether the initial
10884 inferior was already created.
10885 (decref_target): New.
10886 (target_stack::push): Incref/decref the target.
10887 (push_target, push_target, unpush_target): Adjust.
10888 (target_stack::unpush): Defref target.
10889 (target_is_pushed): Return bool. Adjust to refer to the current
10890 inferior's target stack.
10891 (dispose_inferior): Delete, and inline parts ...
10892 (target_preopen): ... here. Only dispose of the current inferior.
10893 (target_detach): Hold strong target reference while detaching.
10894 Pass target down.
10895 (target_thread_name): Add assertion.
10896 (target_resume): Pass down target.
10897 (target_ops::beneath, find_target_at): Adjust to refer to the
10898 current inferior's target stack.
10899 (get_dummy_target): New.
10900 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
10901 has a thread running.
10902 (initialize_targets): Rename to ...
10903 (_initialize_target): ... this.
10904 * target.h: Include "gdbsupport/refcounted-object.h".
10905 (struct target_ops): Inherit refcounted_object.
10906 (target_ops::shortname, target_ops::longname): Make const.
10907 (target_ops::async_wait_fd): New method.
10908 (decref_target): Declare.
10909 (struct target_ops_ref_policy): New.
10910 (target_ops_ref): New typedef.
10911 (get_dummy_target): Declare function.
10912 (target_is_pushed): Return bool.
10913 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
10914 (all_matching_threads_iterator::all_matching_threads_iterator):
10915 Handle filter target.
10916 * thread-iter.h (struct all_matching_threads_iterator, struct
10917 all_matching_threads_range, class all_non_exited_threads_range):
10918 Filter by target too. Remove explicit.
10919 * thread.c (threads_executing): Delete.
10920 (inferior_thread): Pass down current inferior.
10921 (clear_thread_inferior_resources): Pass down thread pointer
10922 instead of ptid_t.
10923 (add_thread_silent, add_thread_with_info, add_thread): Add
10924 process_stratum_target parameter. Use it for thread and inferior
10925 searches.
10926 (is_current_thread): New.
10927 (thread_info::deletable): Use it.
10928 (find_thread_ptid, thread_count, in_thread_list)
10929 (thread_change_ptid, set_resumed, set_running): New
10930 process_stratum_target parameter. Pass it down.
10931 (set_executing): New process_stratum_target parameter. Pass it
10932 down. Adjust reference to 'threads_executing'.
10933 (threads_are_executing): New process_stratum_target parameter.
10934 Adjust reference to 'threads_executing'.
10935 (set_stop_requested, finish_thread_state): New
10936 process_stratum_target parameter. Pass it down.
10937 (switch_to_thread): Also match inferior.
10938 (switch_to_thread): New process_stratum_target parameter. Pass it
10939 down.
10940 (update_threads_executing): Reimplement.
10941 * top.c (quit_force): Pop targets from all inferior.
10942 (gdb_init): Don't call initialize_targets.
10943 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
10944 Declare.
10945 (windows_add_thread, windows_delete_thread): Adjust.
10946 (get_windows_debug_event): Rename to ...
10947 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
10948 * tracefile-tfile.c (tfile_target_open): Pass down target.
10949 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
10950 Forward declare.
10951 (switch_to_thread): Add process_stratum_target parameter.
10952 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
10953 parameter. Use it.
10954 (mi_on_resume): Pass target down.
10955 * nat/fork-inferior.c (startup_inferior): Add
10956 process_stratum_target parameter. Pass it down.
10957 * nat/fork-inferior.h (startup_inferior): Add
10958 process_stratum_target parameter.
10959 * python/py-threadevent.c (py_get_event_thread): Pass target down.
10960
10961 2020-01-10 Pedro Alves <palves@redhat.com>
10962
10963 * remote.c (remote_target::start_remote): Don't set inferior_ptid
10964 directly. Instead find the first thread in the thread list and
10965 use switch_to_thread.
10966
10967 2020-01-10 Pedro Alves <palves@redhat.com>
10968
10969 * remote.c (remote_target::remote_add_inferior): Don't bind a
10970 process to the current inferior if the current inferior is already
10971 bound to a process.
10972
10973 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
10974 Pedro Alves <palves@redhat.com>
10975
10976 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
10977 If no process is specified, return null_ptid instead of
10978 inferior_ptid.
10979 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
10980 TARGET_WAITKIND_SIGNALLED with no pid.
10981
10982 2020-01-10 Pedro Alves <palves@redhat.com>
10983
10984 * remote.c (first_remote_resumed_thread): New.
10985 (remote_target::wait_as): Use it as default event_ptid instead of
10986 inferior_ptid.
10987
10988 2020-01-10 Pedro Alves <palves@redhat.com>
10989
10990 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
10991
10992 2020-01-10 Pedro Alves <palves@redhat.com>
10993
10994 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
10995 not -1.
10996
10997 2020-01-10 Pedro Alves <palves@redhat.com>
10998
10999 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
11000 ptid to get_last_target_status.
11001 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
11002 ptid to get_last_target_status.
11003 * infcmd.c (continue_command): Don't pass a target_waitstatus to
11004 get_last_target_status.
11005 (info_program_command): Don't pass a target_waitstatus to
11006 get_last_target_status.
11007 * infrun.c (init_wait_for_inferior): Use
11008 nullify_last_target_wait_ptid.
11009 (get_last_target_status): Handle nullptr arguments.
11010 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
11011 (print_stop_event): Don't pass a ptid to get_last_target_status.
11012 (normal_stop): Don't pass a ptid to get_last_target_status.
11013 * infrun.h (get_last_target_status, set_last_target_status): Move
11014 comments here and update.
11015 (nullify_last_target_wait_ptid): Declare.
11016 * linux-fork.c (fork_load_infrun_state): Remove local extern
11017 declaration of nullify_last_target_wait_ptid.
11018 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
11019 to get_last_target_status.
11020
11021 2020-01-10 Pedro Alves <palves@redhat.com>
11022
11023 * gdbthread.h (scoped_restore_current_thread)
11024 <dont_restore, restore, m_dont_restore>: Declare.
11025 * thread.c (thread_alive): Add assertion. Return bool.
11026 (switch_to_thread_if_alive): New.
11027 (prune_threads): Switch inferior/thread.
11028 (print_thread_info_1): Switch thread before calling target methods.
11029 (scoped_restore_current_thread::restore): New, factored out from
11030 ...
11031 (scoped_restore_current_thread::~scoped_restore_current_thread):
11032 ... this.
11033 (scoped_restore_current_thread::scoped_restore_current_thread):
11034 Add assertion.
11035 (thread_apply_all_command, thread_select): Use
11036 switch_to_thread_if_alive.
11037 * infrun.c (proceed, restart_threads, handle_signal_stop)
11038 (switch_back_to_stepped_thread): Switch current thread before
11039 calling target methods.
11040
11041 2020-01-10 Pedro Alves <palves@redhat.com>
11042
11043 * inferior.c (switch_to_inferior_no_thread): New function,
11044 factored out from ...
11045 (inferior_command): ... here.
11046 * inferior.h (switch_to_inferior_no_thread): Declare.
11047 * mi/mi-main.c (run_one_inferior): Use
11048 switch_to_inferior_no_thread.
11049
11050 2020-01-10 Pedro Alves <palves@redhat.com>
11051
11052 * infcmd.c (kill_command): Remove dead code.
11053
11054 2020-01-10 Pedro Alves <palves@redhat.com>
11055
11056 * remote.c (remote_target::mourn_inferior): No longer check
11057 whether the target is running.
11058
11059 2020-01-10 Pedro Alves <palves@redhat.com>
11060
11061 * corelow.c (core_target::has_execution): Change parameter type to
11062 inferior pointer.
11063 * inferior.c (number_of_live_inferiors): Use
11064 inferior::has_execution instead of target_has_execution_1.
11065 * inferior.h (inferior::has_execution): New.
11066 * linux-thread-db.c (thread_db_target::update_thread_list): Use
11067 inferior::has_execution instead of target_has_execution_1.
11068 * process-stratum-target.c
11069 (process_stratum_target::has_execution): Change parameter type to
11070 inferior pointer. Check the inferior's PID instead of
11071 inferior_ptid.
11072 * process-stratum-target.h
11073 (process_stratum_target::has_execution): Change parameter type to
11074 inferior pointer.
11075 * record-full.c (record_full_core_target::has_execution): Change
11076 parameter type to inferior pointer.
11077 * target.c (target_has_execution_1): Change parameter type to
11078 inferior pointer.
11079 (target_has_execution_current): Adjust.
11080 * target.h (target_ops::has_execution): Change parameter type to
11081 inferior pointer.
11082 (target_has_execution_1): Change parameter type to inferior
11083 pointer. Change return type to bool.
11084 * tracefile.h (tracefile_target::has_execution): Change parameter
11085 type to inferior pointer.
11086
11087 2020-01-10 Pedro Alves <palves@redhat.com>
11088
11089 * exceptions.c (print_flush): Remove current_top_target() check.
11090
11091 2020-01-10 Pedro Alves <palves@redhat.com>
11092
11093 * remote.c (show_remote_exec_file): Show the current inferior's
11094 exec-file instead of the command variable's value.
11095
11096 2020-01-10 Pedro Alves <palves@redhat.com>
11097
11098 * record-full.c (record_full_resume_ptid): New global.
11099 (record_full_target::resume): Set it.
11100 (record_full_wait_1): Use record_full_resume_ptid instead of
11101 inferior_ptid.
11102
11103 2020-01-10 Pedro Alves <palves@redhat.com>
11104
11105 * gdbthread.h (scoped_restore_current_thread)
11106 <dont_restore, restore, m_dont_restore>: Declare.
11107 * thread.c (thread_alive): Add assertion. Return bool.
11108 (switch_to_thread_if_alive): New.
11109 (prune_threads): Switch inferior/thread.
11110 (print_thread_info_1): Switch thread before calling target methods.
11111 (scoped_restore_current_thread::restore): New, factored out from
11112 ...
11113 (scoped_restore_current_thread::~scoped_restore_current_thread):
11114 ... this.
11115 (scoped_restore_current_thread::scoped_restore_current_thread):
11116 Add assertion.
11117 (thread_apply_all_command, thread_select): Use
11118 switch_to_thread_if_alive.
11119
11120 2020-01-10 George Barrett <bob@bob131.so>
11121
11122 * stap-probe.c (stap_modify_semaphore): Don't check for null
11123 semaphores.
11124 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
11125 for null semaphores.
11126
11127 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
11128
11129 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
11130 all source windows, and maintain horizontal scroll status while
11131 doing so.
11132
11133 2020-01-09 Tom Tromey <tom@tromey.com>
11134
11135 PR tui/18932:
11136 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
11137 update_source_window, not print_source_lines.
11138
11139 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
11140
11141 * tui/tui.c (tui_enable): Register tui hooks after calling
11142 tui_display_main.
11143
11144 2020-01-09 Christian Biesinger <cbiesinger@google.com>
11145
11146 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
11147
11148 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
11149
11150 * thread.c (print_thread_info_1): Fix indentation.
11151
11152 2020-01-09 Christian Biesinger <cbiesinger@google.com>
11153
11154 * symtab.c (general_symbol_info::compute_and_set_names): Move the
11155 unique_xmalloc_ptr outside the if to always free the demangled name.
11156
11157 2020-01-08 Tom Tromey <tromey@adacore.com>
11158
11159 * xcoffread.c (enter_line_range, read_xcoff_symtab)
11160 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
11161 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
11162 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
11163 Remove.
11164 (section_offsets): New typedef.
11165 * symtab.c (fixup_section, get_msymbol_address): Update.
11166 * symmisc.c (dump_msymbols): Update.
11167 * symfile.h (relative_addr_info_to_section_offsets)
11168 (symfile_map_offsets_to_segments): Update.
11169 * symfile.c (build_section_addr_info_from_objfile)
11170 (init_objfile_sect_indices): Update.
11171 (struct place_section_arg): Change type of "offsets".
11172 (place_section): Update.
11173 (relative_addr_info_to_section_offsets): Change type of
11174 "section_offsets". Remove "num_sections" parameter.
11175 (default_symfile_offsets, syms_from_objfile_1)
11176 (set_objfile_default_section_offset): Update.
11177 (reread_symbols): No need to preserve section offsets by hand.
11178 (symfile_map_offsets_to_segments): Change type of "offsets".
11179 * stap-probe.c (relocate_address): Update.
11180 * stabsread.h (process_one_symbol): Update.
11181 * solib-target.c (struct lm_info_target) <offsets>: Change type.
11182 (solib_target_relocate_section_addresses): Update.
11183 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
11184 Update.
11185 * solib-frv.c (frv_relocate_main_executable): Update.
11186 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
11187 * solib-aix.c (solib_aix_get_section_offsets): Change return
11188 type.
11189 (solib_aix_solib_create_inferior_hook): Update.
11190 * remote.c (remote_target::get_offsets): Update.
11191 * psymtab.c (find_pc_sect_psymtab): Update.
11192 * psympriv.h (struct partial_symbol) <address, text_low,
11193 text_high>: Update.
11194 * objfiles.h (obj_section_offset): Update.
11195 (struct objfile) <section_offsets>: Change type.
11196 <num_sections>: Remove.
11197 (objfile_relocate): Update.
11198 * objfiles.c (entry_point_address_query): Update
11199 (relocate_one_symbol): Change type of "section_offsets".
11200 (objfile_relocate1, objfile_relocate1): Change type of
11201 "new_offsets".
11202 (objfile_rebase1): Update.
11203 * mipsread.c (mipscoff_symfile_read): Update.
11204 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
11205 parameter.
11206 * mdebugread.c (parse_symbol): Change type of "section_offsets".
11207 (parse_external, psymtab_to_symtab_1): Update.
11208 * machoread.c (macho_symfile_offsets): Update.
11209 * ia64-tdep.c (ia64_find_unwind_table): Update.
11210 * hppa-tdep.c (read_unwind_info): Update.
11211 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
11212 * dwarf2read.c (create_addrmap_from_index)
11213 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
11214 (process_psymtab_comp_unit_reader, add_partial_symbol)
11215 (add_partial_subprogram, process_full_comp_unit)
11216 (read_file_scope, read_func_scope, read_lexical_block_scope)
11217 (read_call_site_scope, dwarf2_rnglists_process)
11218 (dwarf2_ranges_process, dwarf2_ranges_read)
11219 (dwarf_decode_lines_1, var_decode_location, new_symbol)
11220 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
11221 Update.
11222 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
11223 Update.
11224 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
11225 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
11226 (process_one_symbol): Change type of "section_offsets".
11227 * ctfread.c (get_objfile_text_range): Update.
11228 * coffread.c (coff_symtab_read, enter_linenos)
11229 (process_coff_symbol): Update.
11230 * coff-pe-read.c (add_pe_forwarded_sym): Update.
11231 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
11232
11233 2020-01-08 Tom Tromey <tromey@adacore.com>
11234
11235 * dwarf2read.c (parse_macro_definition): Use std::string.
11236 (parse_macro_definition): Likewise.
11237
11238 2020-01-08 Tom Tromey <tromey@adacore.com>
11239
11240 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
11241 (ATTR_ALLOC_CHUNK): Remove.
11242
11243 2020-01-08 Tom Tromey <tromey@adacore.com>
11244
11245 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
11246
11247 2020-01-08 Tom Tromey <tromey@adacore.com>
11248
11249 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
11250 (dwarf2_compute_name, open_dwo_file): Likewise.
11251 (process_enumeration_scope): Use std::vector.
11252 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
11253 (partial_die_info::fixup, dwarf2_start_subfile)
11254 (guess_full_die_structure_name, dwarf2_name): Likewise.
11255 (determine_prefix): Update.
11256 (guess_full_die_structure_name): Make return type const.
11257 (partial_die_full_name): Return unique_xmalloc_ptr.
11258 (DW_FIELD_ALLOC_CHUNK): Remove.
11259
11260 2020-01-07 Tom Tromey <tromey@adacore.com>
11261
11262 PR build/24937:
11263 * stap-probe.c (class stap_static_probe_ops): Add constructor.
11264
11265 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
11266
11267 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
11268
11269 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
11270
11271 * stack.c (print_frame_info): Move disassemble_next_line code
11272 inside source_print block.
11273
11274 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11275
11276 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
11277 gdb/signals.h, as we are now using native signal symbols.
11278
11279 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
11280
11281 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
11282 overflow by an early check of content vs threshold.
11283 * tui/tui-source.c (tui_source_window::line_is_displayed):
11284 Likewise.
11285
11286 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11287
11288 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
11289
11290 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
11291
11292 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
11293 export table if no section contains it's RVA.
11294
11295 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11296
11297 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
11298
11299 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
11300
11301 * source.c (print_source_lines_base): Set last_line_listed.
11302
11303 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
11304
11305 * tui/tui-disasm.c: Remove trailing spaces.
11306
11307 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11308 Pedro Alves <palves@redhat.com>
11309
11310 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
11311 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
11312 (windows_gdb_signal_to_target): New function, uses the above
11313 enumeration to convert GDB internal signal codes to equivalent
11314 Windows codes.
11315 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
11316 * windows-nat.c: Include "gdb_wait.h".
11317 (get_windows_debug_event): Extract the fatal exception from the
11318 exit status and convert to the equivalent Posix signal number.
11319 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
11320 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
11321 * gdbsupport/gdb_wait.c: New file, implements
11322 windows_status_to_termsig.
11323 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
11324 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
11325
11326 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
11327
11328 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
11329 show_layout.
11330
11331 2020-01-05 Luis Machado <luis.machado@linaro.org>
11332
11333 * aarch64-linux-nat.c
11334 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
11335 and bfd_mach_aarch64.
11336
11337 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11338
11339 * ui-file.c (stdio_file::can_emit_style_escape)
11340 (tee_file::can_emit_style_escape): Ensure style is used also on
11341 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
11342 to gdb_stdout.
11343 * main.c (set_gdb_data_directory): Use file style to output the
11344 warning that the given pathname is not a directory.
11345 * top.c (show_history_filename, gdb_safe_append_history)
11346 (show_gdb_datadir): Use file style.
11347
11348 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
11349
11350 * solib-target.c (struct lm_info_target):
11351 Change offsets to be a unique_xmalloc_ptr.
11352 (solib_target_relocate_section_addresses): Update.
11353
11354 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
11355
11356 * windows-nat.c (windows_clear_solib): Free so_list linked list.
11357
11358 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
11359
11360 * MAINTAINERS (Write After Approval): Add myself.
11361
11362 2020-01-02 Luis Machado <luis.machado@linaro.org>
11363
11364 * proc-service.c (get_ps_regcache): Remove reference to obsolete
11365 Cell BE architecture.
11366 * target.h (struct target_ops) <thread_architecture>: Likewise.
11367
11368 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11369
11370 * Makefile.in: Use INSTALL_PROGRAM_ENV.
11371
11372 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11373
11374 * MAINTAINERS (Write After Approval): Add myself.
11375
11376 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11377
11378 * gdbarch.sh: Update copyright year range of generated files.
11379
11380 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11381
11382 Update copyright year range in all GDB files.
11383
11384 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11385
11386 * copyright.py: Convert to Python 3.
11387
11388 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11389
11390 * copyright.py: Adapt after move of gnulib directory from gdb
11391 directory to toplevel directory.
11392
11393 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11394
11395 * copyright.py (main): Exit if run from the wrong directory.
11396
11397 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11398
11399 * top.c (print_gdb_version): Change copyright year to 2020.
11400
11401 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11402
11403 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
11404
11405 For older changes see ChangeLog-2019.
11406 \f
11407 Local Variables:
11408 mode: change-log
11409 left-margin: 8
11410 fill-column: 74
11411 version-control: never
11412 coding: utf-8
11413 End: