gdb/python: Reuse gdb.RegisterDescriptor objects where possible
[binutils-gdb.git] / gdb / ChangeLog
1 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * python/py-registers.c (gdbpy_register_object_data): New static
4 global.
5 (gdbpy_register_object_data_init): New function.
6 (gdbpy_new_register_descriptor): Renamed to...
7 (gdbpy_get_register_descriptor): ...this, and update to reuse
8 existing register descriptors where possible.
9 (gdbpy_register_descriptor_iter_next): Update.
10 (gdbpy_initialize_registers): Register new gdbarch data.
11
12 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
13
14 * linux-nat.c (stopped_pids): Make static.
15
16 2020-07-21 Simon Marchi <simon.marchi@polymtl.ca>
17
18 PR ada/26235
19 * gdbtypes.c (ada_discrete_type_low_bound,
20 ada_discrete_type_high_bound): Handle undefined bounds.
21
22 2020-07-21 Kamil Rytarowski <n54@gmx.com>
23
24 * nbsd-nat.h (nbsd_nat_target::supports_multi_process): New
25 declaration.
26 * nbsd-nat.c (nbsd_nat_target::supports_multi_process): New
27 function.
28
29 2020-07-20 John Baldwin <jhb@FreeBSD.org>
30
31 * fbsd-tdep.c (fbsd_skip_solib_resolver): New function.
32 (fbsd_init_abi): Install gdbarch "skip_solib_resolver" method.
33 * fbsd-tdep.h (fbsd_skip_solib_resolver): New prototype.
34 * mips-fbsd-tdep.c (mips_fbsd_skip_solib_resolver): New function.
35 (mips_fbsd_init_abi): Install gdbarch "skip_solib_resolver"
36 method.
37
38 2020-07-20 Ludovic Courtès <ludo@gnu.org>
39
40 * guile/scm-math.c (vlscm_integer_fits_p): Use 'uintmax_t'
41 and 'intmax_t' instead of 'scm_t_uintmax' and 'scm_t_intmax',
42 which are deprecated in Guile 3.0.
43 * configure.ac (try_guile_versions): Add "guile-3.0".
44 * configure (try_guile_versions): Regenerate.
45 * NEWS: Update entry.
46
47 2020-07-20 Ludovic Courtès <ludo@gnu.org>
48 Doug Evans <dje@google.com>
49
50 PR gdb/21104
51 * guile/scm-ports.c (USING_GUILE_BEFORE_2_2): New macro.
52 (ioscm_memory_port)[read_buf_size, write_buf_size]: Wrap in #if
53 USING_GUILE_BEFORE_2_2.
54 (stdio_port_desc, memory_port_desc) [!USING_GUILE_BEFORE_2_2]:
55 Change type to 'scm_t_port_type *'.
56 (natural_buffer_size) [!USING_GUILE_BEFORE_2_2]: New variable.
57 (ioscm_open_port) [USING_GUILE_BEFORE_2_2]: Add 'stream'
58 parameter and honor it. Update callers.
59 (ioscm_open_port) [!USING_GUILE_BEFORE_2_2]: New function.
60 (ioscm_read_from_port, ioscm_write) [!USING_GUILE_BEFORE_2_2]: New
61 functions.
62 (ioscm_fill_input, ioscm_input_waiting, ioscm_flush): Wrap in #if
63 USING_GUILE_BEFORE_2_2.
64 (ioscm_init_gdb_stdio_port) [!USING_GUILE_BEFORE_2_2]: Use
65 'ioscm_read_from_port'. Call 'scm_set_port_read_wait_fd'.
66 (ioscm_init_stdio_buffers) [!USING_GUILE_BEFORE_2_2]: New function.
67 (gdbscm_stdio_port_p) [!USING_GUILE_BEFORE_2_2]: Use 'SCM_PORTP'
68 and 'SCM_PORT_TYPE'.
69 (gdbscm_memory_port_end_input, gdbscm_memory_port_seek)
70 (ioscm_reinit_memory_port): Wrap in #if USING_GUILE_BEFORE_2_2.
71 (gdbscm_memory_port_read, gdbscm_memory_port_write)
72 (gdbscm_memory_port_seek, gdbscm_memory_port_close)
73 [!USING_GUILE_BEFORE_2_2]: New functions.
74 (gdbscm_memory_port_print): Remove use of 'SCM_PTOB_NAME'.
75 (ioscm_init_memory_port_type) [!USING_GUILE_BEFORE_2_2]: Use
76 'gdbscm_memory_port_read'.
77 Wrap 'scm_set_port_end_input', 'scm_set_port_flush', and
78 'scm_set_port_free' calls in #if USING_GUILE_BEFORE_2_2.
79 (gdbscm_get_natural_buffer_sizes) [!USING_GUILE_BEFORE_2_2]: New
80 function.
81 (ioscm_init_memory_port): Remove.
82 (ioscm_init_memory_port_stream): New function
83 (ioscm_init_memory_port_buffers) [USING_GUILE_BEFORE_2_2]: New
84 function.
85 (gdbscm_memory_port_read_buffer_size) [!USING_GUILE_BEFORE_2_2]:
86 Return scm_from_uint (0).
87 (gdbscm_set_memory_port_read_buffer_size_x)
88 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
89 (gdbscm_memory_port_write_buffer_size) [!USING_GUILE_BEFORE_2_2]:
90 Return scm_from_uint (0).
91 (gdbscm_set_memory_port_write_buffer_size_x)
92 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
93 * configure.ac (try_guile_versions): Add "guile-2.2".
94 * configure: Regenerate.
95 * NEWS: Add entry.
96
97 2020-07-18 Tom Tromey <tom@tromey.com>
98
99 * linux-nat.c (linux_multi_process): Remove.
100 (linux_nat_target::supports_multi_process): Return true.
101
102 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
103
104 * arch/riscv.c (riscv_tdesc_cache): Change map type.
105 (riscv_lookup_target_description): Return pointer out of
106 unique_ptr.
107 * target-descriptions.c (allocate_target_description): Add
108 comment.
109 (target_desc_deleter::operator()): Likewise.
110 * target-descriptions.h (struct target_desc_deleter): Moved to
111 gdbsupport/tdesc.h.
112 (target_desc_up): Likewise.
113
114 2020-07-17 Tom Tromey <tromey@adacore.com>
115
116 * linux-nat.c (linux_nat_target::supports_non_stop)
117 (linux_nat_target::always_non_stop_p): Use "true".
118 (linux_nat_target::supports_disable_randomization): Use "true" and
119 "false".
120
121 2020-07-16 Caroline Tice <cmtice@google.com>
122
123 * dwarf2/read.c (RNGLIST_HEADER_SIZE32) New constant definition.
124 (RNGLIST_HEADER_SIZE64): New constant definition.
125 (struct dwop_section_names): Add rnglists_dwo.
126 (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo.
127 (struct loclist_header): Rename to 'loclists_rnglists_header'.
128 (struct dwo_sections): Add rnglists field.
129 (read_attribut_reprocess): Add tag parameter.
130 (dwarf2_ranges_read): Add tag parameter & remove forward function decl.
131 (cu_debug_rnglists_section): New function (decl & definition).
132 (dwarf2_locate_dwo_sections): Add code to read rnglists_dwo section.
133 (dwarf2_rnglists_process): Add a dwarf_tag parameter, for the kind of
134 die whose range is being checked; get rnglist section from
135 cu_debug_rnglists_section, to get from either objfile or dwo file as
136 appropriate. Add cases for DW_RLE_base_addressx,
137 DW_RLE_startx_length, DW_RLE_startx_endx. Also, update to only add
138 the base address to DW_RLE_offset_pairs (not to all ranges), moving
139 test inside if-condition and updating complaint message.
140 (dwarf2_ranges_process): Add dwarf tag parameter and pass it to
141 dwarf2_rnglists_process.
142 (dwarf2_ranges_read): Add dwarf tag parameter and pass it to
143 dwarf2_ranges_process.
144 (dwarf2_get_pc_bounds): Check for DW_FORM_rnglistx when setting
145 need_ranges_base and update comment appropriately. Also pass die tag
146 to dwarf2_ranges_read.
147 (dwarf2_record_block_ranges): Check for DW_FORM_rnglistx when setting
148 need_ranges_base and update comment appropriately. Also pass die tag
149 to dwarf2_ranges_process.
150 (read_full_die_1): Add code to read DW_AT_rnglists_base and assign to
151 cu->ranges_base. Also pass die tag to read_attribute_reprocess.
152 (partial_die_info::read): Check for DW_FORM_rnglistx when setting
153 need_ranges_base and update comment appropriately. Also pass die tag
154 to read_attribute_reprocess and dwarf2_ranges_read.
155 (read_loclist_header): Rename function to read_loclists_rnglists_header,
156 and update function comment appropriately.
157 (read_loclist_index): Call read_loclists_rnglists_header instead of
158 read_loclist_header.
159 (read_rnglist_index): New function.
160 (read_attribute_reprocess): Add tag parameter. Add code for
161 DW_FORM_rnglistx, passing tag to read_rnglist_index.
162 (read_attribute_value): Mark DW_FORM_rnglistx with need_reprocess.
163
164 2020-07-15 Andrew Burgess <andrew.burgess@embecosm.com>
165
166 * f-typeprint.c (f_type_print_base): Allow for dynamic types not
167 being resolved.
168
169 2020-07-14 Andrew Burgess <andrew.burgess@embecosm.com>
170
171 * arch-utils.c (show_architecture): Update formatting of messages.
172
173 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
174
175 * gdbtypes.h (struct type) <bounds>: Handle array and string
176 types.
177 * ada-lang.c (assign_aggregate): Use type::bounds on
178 array/string type.
179 * c-typeprint.c (c_type_print_varspec_suffix): Likewise.
180 * c-varobj.c (c_number_of_children): Likewise.
181 (c_describe_child): Likewise.
182 * eval.c (evaluate_subexp_for_sizeof): Likewise.
183 * f-typeprint.c (f_type_print_varspec_suffix): Likewise.
184 (f_type_print_base): Likewise.
185 * f-valprint.c (f77_array_offset_tbl): Likewise.
186 (f77_get_upperbound): Likewise.
187 (f77_print_array_1): Likewise.
188 * guile/scm-type.c (gdbscm_type_range): Likewise.
189 * m2-typeprint.c (m2_array): Likewise.
190 (m2_is_long_set_of_type): Likewise.
191 * m2-valprint.c (get_long_set_bounds): Likewise.
192 * p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
193 * python/py-type.c (typy_range): Likewise.
194 * rust-lang.c (rust_internal_print_type): Likewise.
195 * type-stack.c (type_stack::follow_types): Likewise.
196 * valarith.c (value_subscripted_rvalue): Likewise.
197 * valops.c (value_cast): Likewise.
198
199 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
200
201 * gdbtypes.c (TYPE_ARRAY_BIT_STRIDE): Remove. Update all
202 callers to use the equivalent accessor methods.
203
204 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
205
206 * gdbtypes.h (struct range_bounds) <bit_stride>: New method.
207 (struct type) <bit_stride>: New method.
208 (TYPE_BIT_STRIDE): Remove.
209 * gdbtypes.c (update_static_array_size): Use type::bit_stride.
210
211 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
212
213 * gdbtypes.h (TYPE_ARRAY_LOWER_BOUND_VALUE,
214 TYPE_ARRAY_UPPER_BOUND_VALUE): Remove. Update all
215 callers to use the equivalent accessor methods instead.
216
217 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
218
219 * gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED,
220 TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Remove. Update all
221 callers to use the equivalent accessor methods instead.
222
223 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
224
225 * gdbtypes.h (TYPE_LOW_BOUND_KIND,
226 TYPE_HIGH_BOUND_KIND): Remove. Update all callers
227 to use dynamic_prop::kind.
228
229 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
230
231 * gdbtypes.h (TYPE_LOW_BOUND_UNDEFINED,
232 TYPE_HIGH_BOUND_UNDEFINED): Remove. Update all callers
233 to get the bound property's kind and check against
234 PROP_UNDEFINED.
235
236 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
237
238 * gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND): Remove. Update
239 all callers to use type::range_bounds followed by
240 dynamic_prop::{low,high}.
241
242 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
243
244 * gdbtypes.h (struct dynamic_prop) <kind, set_undefined,
245 const_val, set_const_val, baton, set_locexpr, set_loclist,
246 set_addr_offset, variant_parts, set_variant_parts,
247 original_type, set_original_type>: New methods.
248 <kind>: Rename to...
249 <m_kind>: ... this. Update all users to use the new methods
250 instead.
251 <data>: Rename to...
252 <m_data>: ... this. Update all users to use the new methods
253 instead.
254
255 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
256
257 * gdbtypes.c (get_discrete_bounds): Return failure if
258 the range type's bounds are not both defined and constant
259 values.
260 (get_array_bounds): Update comment. Remove undefined bound check.
261
262 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
263
264 * gdbtypes.h (TYPE_RANGE_DATA): Remove. Update callers to use
265 the type::bounds method directly.
266
267 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
268
269 * gdbtypes.h (struct type) <bounds, set_bounds>: New methods.
270 (TYPE_RANGE_DATA): Use type::bounds. Change all uses that
271 are used to set the range type's bounds to use set_bounds.
272
273 2020-07-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
274
275 * exec.c (_initialize_exec): Update exec-file-mismatch help.
276
277 2020-07-10 Pedro Alves <pedro@palves.net>
278
279 * gdbthread.h (inferior_ref): Define.
280 (scoped_restore_current_thread) <m_thread>: Now a thread_info_ref.
281 (scoped_restore_current_thread) <m_inf>: Now an inferior_ref.
282 * thread.c
283 (scoped_restore_current_thread::restore):
284 Adjust to gdb::ref_ptr.
285 (scoped_restore_current_thread::~scoped_restore_current_thread):
286 Remove manual decref handling.
287 (scoped_restore_current_thread::scoped_restore_current_thread):
288 Adjust to use
289 inferior_ref::new_reference/thread_info_ref::new_reference.
290 Incref the thread before calling get_frame_id instead of after.
291 Let TARGET_CLOSE_ERROR propagate.
292
293 2020-07-10 Pedro Alves <pedro@palves.net>
294
295 * frame-tailcall.c (dwarf2_tailcall_sniffer_first): Only swallow
296 NO_ENTRY_VALUE_ERROR / MEMORY_ERROR / OPTIMIZED_OUT_ERROR /
297 NOT_AVAILABLE_ERROR.
298 * value.c (value_optimized_out): Only swallow MEMORY_ERROR /
299 OPTIMIZED_OUT_ERROR / NOT_AVAILABLE_ERROR.
300
301 2020-07-10 Simon Marchi <simon.marchi@polymtl.ca>
302 Pedro Alves <pedro@palves.net>
303
304 PR gdb/26199
305 * infrun.c (threads_are_resumed_pending_p): Delete.
306 (do_target_wait): Remove threads_are_executing and
307 threads_are_resumed_pending_p checks from the inferior_matches
308 lambda. Update comments.
309
310 2020-07-10 Pedro Alves <pedro@palves.net>
311
312 PR gdb/26199
313 * infrun.c (handle_no_resumed): Transfer terminal to inferior with
314 executing threads.
315
316 2020-07-10 Pedro Alves <pedro@palves.net>
317
318 PR gdb/26199
319 * infrun.c (handle_no_resumed): Handle multiple targets.
320
321 2020-07-10 Pedro Alves <pedro@palves.net>
322
323 PR gdb/26199
324 * infrun.c (prepare_to_wait): Check target_can_async_p instead of
325 target_is_async_p.
326
327 2020-07-10 Pedro Alves <pedro@palves.net>
328
329 PR gdb/26199
330 * target.c (target_pass_ctrlc): Look at the inferior's non-exited
331 threads, not all threads.
332
333 2020-07-10 Pedro Alves <pedro@palves.net>
334
335 PR gdb/26199
336 * remote.c (remote_target::open_1): Pass remote target pointer as
337 data to create_async_event_handler.
338 (remote_async_inferior_event_handler): Mark async event handler
339 before returning if the remote target still has either pending
340 events or unacknowledged notifications.
341
342 2020-07-10 John Baldwin <jhb@FreeBSD.org>
343
344 * fbsd-nat.h (fbsd_nat_target::supports_multi_process): New
345 declaration.
346 * fbsd-nat.c (fbsd_nat_target::supports_multi_process): New
347 function.
348
349 2020-07-09 John Baldwin <jhb@FreeBSD.org>
350
351 * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
352 inferior_ptid.
353
354 2020-07-09 John Baldwin <jhb@FreeBSD.org>
355
356 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_ARGC,
357 AT_FREEBSD_ARGV, AT_FREEBSD_ENVC, AT_FREEBSD_ENVV,
358 AT_FREEBSD_PS_STRINGS.
359
360 2020-07-08 Hannes Domani <ssbssa@yahoo.de>
361
362 * auto-load.c (auto_load_objfile_script_1): Convert drive part
363 of debugfile path on Windows.
364
365 2020-07-08 John Baldwin <jhb@FreeBSD.org>
366
367 * fbsd-nat.c (fbsd_nat_target::find_memory_regions): Rename 'obfd'
368 argument to 'data'.
369
370 2020-07-08 Tom Tromey <tromey@adacore.com>
371
372 * ada-lang.c (ada_exception_message_1): Use read_memory.
373
374 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
375
376 PR python/22748
377 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Remove
378 special handling for inline frames.
379 * findvar.c (value_of_register_lazy): Skip inline frames when
380 creating lazy register values.
381 * frame.c (frame_id_computed_p): Delete definition.
382 * frame.h (frame_id_computed_p): Delete declaration.
383
384 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
385
386 * NEWS: Mention additions to Python API.
387 * python/py-arch.c (archpy_register_groups): New function.
388 (arch_object_methods): Add 'register_groups' method.
389 * python/py-registers.c (reggroup_iterator_object): New struct.
390 (reggroup_object): New struct.
391 (gdbpy_new_reggroup): New function.
392 (gdbpy_reggroup_to_string): New function.
393 (gdbpy_reggroup_name): New function.
394 (gdbpy_reggroup_iter): New function.
395 (gdbpy_reggroup_iter_next): New function.
396 (gdbpy_new_reggroup_iterator): New function
397 (gdbpy_initialize_registers): Register new types.
398 (reggroup_iterator_object_type): Define new Python type.
399 (gdbpy_reggroup_getset): New static global.
400 (reggroup_object_type): Define new Python type.
401 * python/python-internal.h
402
403 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
404
405 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-registers.c
406 * python/py-arch.c (archpy_registers): New function.
407 (arch_object_methods): Add 'registers' method.
408 * python/py-registers.c: New file.
409 * python/python-internal.h
410 (gdbpy_new_register_descriptor_iterator): Declare.
411 (gdbpy_initialize_registers): Declare.
412 * python/python.c (do_start_initialization): Call
413 gdbpy_initialize_registers.
414 * NEWS: Mention additions to the Python API.
415
416 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
417
418 * NEWS: Mention new Python API method.
419 * python/py-unwind.c (pending_framepy_architecture): New function.
420 (pending_frame_object_methods): Add architecture method.
421
422 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
423
424 * gdbarch.c: Regenerate.
425 * gdbarch.h: Regenerate.
426 * gdbarch.sh (deprecated_set_gdbarch_data): Delete.
427 (gdbarch_data): Use internal_error for the case where
428 deprecated_set_gdbarch_data was originally needed.
429 * ia64-libunwind-tdep.c (libunwind_descr_init): Update parameters,
430 and use passed in obstack.
431 (libunwind_frame_set_descr): Should no longer get back NULL from
432 gdbarch_data.
433 (_initialize_libunwind_frame): Register as a pre-init gdbarch data
434 type.
435 * user-regs.c (user_regs_init): Update parameters, and use passed
436 in obstack.
437 (user_reg_add): Should no longer get back NULL from gdbarch_data.
438 (_initialize_user_regs): Register as a pre-init gdbarch data type.
439
440 2020-07-06 Tom de Vries <tdevries@suse.de>
441
442 * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Handle
443 End-Of-Sequence in lte_is_less_than.
444 * symtab.c (find_pc_sect_line): Revert change from commit 3d92a3e313
445 "gdb: Don't reorder line table entries too much when sorting".
446
447 2020-07-06 Tom de Vries <tdevries@suse.de>
448
449 PR tui/26205
450 * tui/tui-win.c (tui_partial_win_by_name): Don't test for NULL name.
451
452 2020-07-05 Tom de Vries <tdevries@suse.de>
453
454 PR build/26187
455 * inferior.h (struct infcall_suspend_state_deleter): If available, use
456 std::uncaught_exceptions instead of deprecated
457 std::uncaught_exception.
458
459 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
460
461 * macroexp.h (macro_stringify): Return
462 gdb::unique_xmalloc_ptr<char>.
463 * macroexp.c (macro_stringify): Likewise.
464 * macrotab.c (fixup_definition): Update.
465
466 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
467
468 * c-exp.y (scan_macro_expansion): Don't free `expansion`.
469 (lex_one_token): Update.
470 * macroexp.c (struct macro_buffer) <release>: Return
471 gdb::unique_xmalloc_ptr<char>.
472 (macro_stringify): Update.
473 (macro_expand): Update.
474 (macro_expand_next): Return gdb::unique_xmalloc_ptr<char>.
475 * macroexp.h (macro_expand_next): Likewise.
476
477 2020-07-02 Simon Marchi <simon.marchi@efficios.com>
478
479 * macroexp.h (macro_lookup_ftype): Remove.
480 (macro_expand, macro_expand_once, macro_expand_next): Remove
481 lookup function parameters, add scope parameter.
482 * macroexp.c (scan, substitute_args, expand, maybe_expand,
483 macro_expand, macro_expand_once, macro_expand_next): Likewise.
484 * macroscope.h (standard_macro_lookup): Change parameter type
485 to macro_scope.
486 * macroscope.c (standard_macro_lookup): Likewise.
487 * c-exp.y (lex_one_token): Update.
488 * macrocmd.c (macro_expand_command): Likewise.
489 (macro_expand_once_command): Likewise.
490
491 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
492
493 * inf-loop.c (inferior_event_handler): Remove client_data param.
494 * inf-loop.h (inferior_event_handler): Likewise.
495 * infcmd.c (step_1): Adjust.
496 * infrun.c (proceed): Adjust.
497 (fetch_inferior_event): Remove client_data param.
498 (infrun_async_inferior_event_handler): Adjust.
499 * infrun.h (fetch_inferior_event): Remove `void *` param.
500 * linux-nat.c (handle_target_event): Adjust.
501 * record-btrace.c (record_btrace_handle_async_inferior_event):
502 Adjust.
503 * record-full.c (record_full_async_inferior_event_handler):
504 Adjust.
505 * remote.c (remote_async_inferior_event_handler): Adjust.
506
507 2020-07-01 Tom Tromey <tom@tromey.com>
508
509 * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
510 * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
511
512 2020-07-01 Tom Tromey <tom@tromey.com>
513
514 * tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from
515 tui_gen_win_info.
516 (tui_win_info::make_window): Merge with
517 tui_gen_win_info::make_window.
518 (tui_win_info::make_visible): Move from tui_gen_win_info.
519 * tui/tui-win.c (tui_win_info::max_width): Move from
520 tui_gen_win_info.
521 * tui/tui-layout.h (class tui_layout_window) <m_window>: Change
522 type.
523 <window_factory>: Likewise.
524 * tui/tui-layout.c (tui_win_info::resize): Move from
525 tui_gen_win_info.
526 (make_standard_window): Change return type.
527 (get_locator_window, tui_get_window_by_name): Likewise.
528 (tui_layout_window::apply): Remove a cast.
529 * tui/tui-data.h (MIN_WIN_HEIGHT): Move earlier.
530 (struct tui_win_info): Merge with tui_gen_win_info.
531 (struct tui_gen_win_info): Remove.
532
533 2020-07-01 Tom Tromey <tom@tromey.com>
534
535 * tui/tui-stack.h (struct tui_locator_window): Derive from
536 tui_win_info.
537 <do_scroll_horizontal, do_scroll_vertical>: New methods.
538 <can_box>: New method.
539
540 2020-07-01 Tom Tromey <tom@tromey.com>
541
542 * tui/tui-stack.h (struct tui_locator_window): Remove body.
543
544 2020-07-01 Tom Tromey <tom@tromey.com>
545
546 * tui/tui-regs.c (tui_data_window::display_registers_from)
547 (tui_data_window::display_registers_from)
548 (tui_data_window::first_data_item_displayed)
549 (tui_data_window::delete_data_content_windows): Update.
550 (tui_data_window::refresh_window, tui_data_window::no_refresh):
551 Remove.
552 (tui_data_window::check_register_values): Update.
553 (tui_data_item_window::rerender): Add parameters. Update.
554 (tui_data_item_window::refresh_window): Remove.
555 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: No longer
556 virtual.
557 * tui/tui-regs.h (struct tui_data_item_window): Don't derive from
558 tui_gen_win_info.
559 <refresh_window, max_height, min_height>: Remove.
560 <rerender>: Add parameters.
561 <x, y, visible>: New members.
562 (struct tui_data_window) <refresh_window, no_refresh>: Remove.
563 <m_item_width>: New member.
564
565 2020-07-01 Tom Tromey <tom@tromey.com>
566
567 * tui/tui-regs.c (tui_data_window::show_register_group)
568 (tui_data_window::check_register_values): Update.
569 * tui/tui-regs.h (struct tui_data_item_window) <regno>: Rename
570 from item_no.
571
572 2020-07-01 Tom Tromey <tom@tromey.com>
573
574 * tui/tui-regs.c (tui_data_window::show_register_group): Remove
575 useless "if".
576
577 2020-07-01 Tom Tromey <tom@tromey.com>
578
579 * tui/tui-regs.c (tui_data_window::show_register_group): Update.
580 * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove.
581
582 2020-07-01 Tom Tromey <tom@tromey.com>
583
584 * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h
585 * tui/tui-winsource.h (enum tui_line_or_address_kind)
586 (struct tui_line_or_address): Move from tui-data.h.
587 * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h.
588 * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c.
589 (tui_cmd_window, tui_source_window_base, tui_source_window)
590 (tui_disasm_window): Don't declare.
591 (enum tui_line_or_address_kind, struct tui_line_or_address): Move
592 to tui-winsource.h.
593 (SINGLE_KEY): Move to tui-stack.c.
594
595 2020-07-01 Tom Tromey <tom@tromey.com>
596
597 * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a
598 std::string.
599 * tui/tui-regs.c (class tab_expansion_file): New.
600 (tab_expansion_file::write): New method.
601 (tui_register_format): Change return type. Use
602 tab_expansion_file.
603 (tui_get_register, tui_data_window::display_registers_from)
604 (tui_data_item_window::rerender): Update.
605 * tui/tui-io.h (tui_expand_tabs): Don't declare.
606 * tui/tui-io.c (tui_expand_tabs): Remove.
607
608 2020-07-01 Tom Tromey <tom@tromey.com>
609
610 * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
611
612 2020-07-01 Fangrui Song <maskray@google.com>
613
614 * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
615
616 2020-07-01 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
617
618 * dwarf2/read.c (set_die_type): Removed conditions to restrict
619 forms for DW_AT_associated and DW_AT_allocated attributes,
620 which is already checked in function attr_to_dynamic_prop.
621
622 2020-06-30 Tom Tromey <tromey@adacore.com>
623
624 * dwarf2/read.c (quirk_rust_enum): Correctly call
625 alloc_rust_variant for default-less enum.
626
627 2020-06-30 Tom Tromey <tromey@adacore.com>
628
629 PR build/26183:
630 * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
631 gdb::to_string.
632
633 2020-06-29 Simon Marchi <simon.marchi@efficios.com>
634
635 * gdbarch.sh (displaced_step_copy_insn): Update doc.
636 * gdbarch.h: Re-generate.
637
638 2020-06-28 Tom Tromey <tom@tromey.com>
639
640 * command.h (cmd_types): Remove.
641 (cmd_type): Don't declare.
642 * cli/cli-decode.h (enum cmd_types): Uncomment. No longer a
643 typedef.
644 * cli/cli-cmds.c (setting_cmd): Use cmd->type directly.
645 * cli/cli-decode.c (cmd_type): Remove.
646
647 2020-06-27 Pedro Alves <palves@redhat.com>
648
649 * fork-child.c (prefork_hook): Adjust.
650 * infcmd.c (set_inferior_io_terminal, get_inferior_io_terminal):
651 Delete.
652 (set_inferior_tty_command, show_inferior_tty_command): Adjust.
653 * inferior.c (inferior::set_tty, inferior::tty): New methods.
654 * inferior.h (set_inferior_io_terminal, get_inferior_io_terminal):
655 Remove declarations.
656 (struct inferior) <set_tty, tty>: New methods.
657 (struct inferior) <terminal>: Rename to ...
658 (struct inferior) <m_terminal>: ... this and make private.
659 * main.c (captured_main_1): Adjust.
660 * mi/mi-cmd-env.c (mi_cmd_inferior_tty_set): Adjust.
661 (mi_cmd_inferior_tty_show): Adjust.
662 * nto-procfs.c (nto_procfs_target::create_inferior): Adjust.
663 * windows-nat.c (windows_nat_target::create_inferior): Adjust.
664
665 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
666
667 * configure.ac: Add --enable-libctf: handle --disable-static
668 properly.
669 * acinclude.m4: sinclude ../config/enable.m4.
670 * Makefile.in (aclocal_m4_deps): Adjust accordingly.
671 (LIBCTF): Substitute in.
672 (CTF_DEPS): New, likewise.
673 (CLIBS): libctf needs symbols from libbfd: move earlier.
674 (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath
675 flags.
676 * ctfread.c: Surround in ENABLE_LIBCTF.
677 (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub.
678 * configure: Regenerate.
679 * config.in: Likewise.
680
681 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
682
683 * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
684
685 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
686
687 * inferior.h (struct inferior) <terminal>: Change type to
688 gdb::unique_xmalloc_ptr<char>.
689 * inferior.c (inferior::~inferior): Don't free inf->terminal.
690 * infcmd.c (set_inferior_io_terminal): Don't free terminal
691 field, adjust to unique pointer.
692 (get_inferior_io_terminal): Adjust to unique pointer.
693
694 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
695
696 * riscv-tdep.c (riscv_print_registers_info): Loop over all
697 registers, not just the known core set of registers.
698
699 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
700
701 * riscv-tdep.c (riscv_register_name): Return NULL for duplicate
702 fflags, frm, and fcsr registers.
703 (riscv_register_reggroup_p): Remove unknown CSRs from save and
704 restore groups.
705 (riscv_tdesc_unknown_reg): New function.
706 (riscv_gdbarch_init): Pass riscv_tdesc_unknown_reg to
707 tdesc_use_registers.
708 * riscv-tdep.h (struct gdbarch_tdep): Add
709 unknown_csrs_first_regnum, unknown_csrs_count,
710 duplicate_fflags_regnum, duplicate_frm_regnum, and
711 duplicate_fcsr_regnum fields.
712
713 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
714
715 * target-descriptions.c (tdesc_use_registers): Add new parameter a
716 callback, use the callback (when not null) to help number unknown
717 registers.
718 * target-descriptions.h (tdesc_unknown_register_ftype): New typedef.
719 (tdesc_use_registers): Add extra parameter to declaration.
720
721 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
722
723 * riscv-tdep.c (value_of_riscv_user_reg): Moved to here from later
724 in the file.
725 (class riscv_pending_register_alias): Likewise.
726 (riscv_register_feature::register_info): Change 'required_p' field
727 to 'required', and change its type. Add 'check' member function.
728 (riscv_register_feature::register_info::check): Define new member
729 function.
730 (riscv_xreg_feature): Change initialisation of 'required' field.
731 (riscv_freg_feature): Likewise.
732 (riscv_virtual_feature): Likewise.
733 (riscv_csr_feature): Likewise.
734 (riscv_check_tdesc_feature): Take extra parameter, the csr
735 tdesc_feature, rewrite the function to use the new
736 riscv_register_feature::register_info::check function.
737 (riscv_gdbarch_init): Pass the csr tdesc_feature where needed.
738
739 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
740
741 * features/Makefile: Remove all references to the deleted files
742 below.
743 * features/riscv/32bit-csr.c: Deleted.
744 * features/riscv/32bit-csr.xml: Deleted.
745 * features/riscv/64bit-csr.c: Deleted.
746 * features/riscv/64bit-csr.xml: Deleted.
747 * features/riscv/rebuild-csr-xml.sh: Deleted.
748
749 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
750
751 * riscv-tdep.c (struct riscv_register_feature::register_info): Fix
752 whitespace error for declaration of names member variable.
753 (struct riscv_register_feature): Add new prefer_first_name member
754 variable, and fix whitespace error in declaration of registers.
755 (riscv_xreg_feature): Initialize prefer_first_name field.
756 (riscv_freg_feature): Likewise.
757 (riscv_virtual_feature): Likewise.
758 (riscv_csr_feature): Likewise.
759 (riscv_register_name): Expand on comments. Remove register name
760 modifications for CSR and virtual registers.
761
762 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
763
764 * riscv-tdep.c (struct riscv_register_feature): Fix whitespace
765 errors.
766
767 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
768
769 * riscv-tdep.c (riscv_create_csr_aliases): Handle csr aliases from
770 riscv-opc.h.
771 (class riscv_pending_register_alias): New class.
772 (riscv_check_tdesc_feature): Take vector of pending aliases and
773 populate it as appropriate.
774 (riscv_setup_register_aliases): Delete.
775 (riscv_gdbarch_init): Create vector of pending aliases and pass it
776 to riscv_check_tdesc_feature in all cases. Use the vector to
777 create the register aliases.
778
779 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
780
781 * sol2-tdep.c (sol2_static_transform_name): Remove.
782 (sol2_init_abi): Don't register it.
783 * gdbarch.sh (static_transform_name): Remove.
784 * gdbarch.c, gdbarch.h: Regenerate.
785
786 * dbxread.c (read_dbx_symtab) <'S'>: Remove call to
787 gdbarch_static_transform_name.
788 * mdebugread.c (parse_partial_symbols) <'S'>: Likewise.
789 * stabsread.c (define_symbol) <'X'>: Remove.
790 (define_symbol) <'S'>: Remove gdbarch_static_transform_name
791 handling.
792 <'V'>: Likewise.
793 * xcoffread.c (scan_xcoff_symtab): Remove gdbarch.
794 <'S'>: Remove call to gdbarch_static_transform_name.
795
796 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
797
798 * procfs.c (procfs_pre_trace): New function.
799 (procfs_target::create_inferior): Pass it to fork_inferior.
800
801 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
802
803 * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove
804 sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o.
805 <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o,
806 sol2-tdep.o, sparc-sol2-tdep.o.
807 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static.
808 * sparc-tdep.h (sparc32_sol2_init_abi): Remove.
809 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static.
810 * sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
811
812 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
813
814 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
815 (amd64_sol2_init_abi): Use sol2_sigtramp_p.
816 Call sol2_init_abi.
817 Remove calls to set_gdbarch_skip_solib_resolver,
818 set_gdbarch_core_pid_to_str.
819 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
820 (i386_sol2_static_transform_name): Remove.
821 (i386_sol2_init_abi): Call sol2_init_abi.
822 Remove calls to set_gdbarch_sofun_address_maybe_missing,
823 set_gdbarch_static_transform_name,
824 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
825 Use sol2_sigtramp_p.
826 * sol2-tdep.c (sol2_pc_in_sigtramp): New function.
827 (sol2_sigtramp_p): New function.
828 (sol2_static_transform_name): New function.
829 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
830 (sol2_init_abi): New function.
831 * sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
832 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
833 * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
834 (sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
835 (sparc_sol2_static_transform_name): Remove.
836 (sparc32_sol2_init_abi): Call sol2_init_abi.
837 Remove calls to set_gdbarch_sofun_address_maybe_missing,
838 set_gdbarch_static_transform_name,
839 set_gdbarch_skip_solib_resolver,
840 set_gdbarch_core_pid_to_str.
841 * sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
842 (sparc_sol2_static_transform_name): Remove
843 * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
844 call sol2_sigtramp_p.
845 (sparc64_sol2_init_abi): Call sol2_init_abi.
846 Remove calls to set_gdbarch_sofun_address_maybe_missing,
847 set_gdbarch_static_transform_name,
848 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
849
850 2020-06-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
851
852 * symfile-add-flags.h: New flag SYMFILE_ALWAYS_CONFIRM.
853 * exec.c (validate_exec_file): If from_tty, set both
854 SYMFILE_VERBOSE (== from_tty) and SYMFILE_ALWAYS_CONFIRM.
855 * symfile.c (symbol_file_add_with_addrs): if always_confirm
856 and from_tty, unconditionally ask a confirmation.
857
858 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
859
860 * target-descriptions.c (tdesc_architecture_name): Protect against
861 NULL pointer dereference.
862 (maint_print_xml_tdesc_cmd): New function.
863 (_initialize_target_descriptions): Register new 'maint print
864 xml-tdesc' command and give it the filename completer.
865 * NEWS: Mention new 'maint print xml-tdesc' command.
866
867 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
868
869 * target-descriptions.c (class tdesc_compatible_info): New class.
870 (struct target_desc): Change type of compatible vector.
871 (tdesc_compatible_p): Update for change in type of
872 target_desc::compatible.
873 (tdesc_compatible_info_list): New function.
874 (tdesc_compatible_info_arch_name): New function.
875 (tdesc_add_compatible): Update for change in type of
876 target_desc::compatible.
877 (print_c_tdesc::visit_pre): Likewise.
878
879 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
880
881 * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
882 whitespace to underscore.
883 (maint_print_c_tdesc_cmd): Use fake filename for target
884 descriptions that came from the target.
885 (_initialize_target_descriptions): Add filename command completion
886 for 'maint print c-tdesc'.
887
888 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
889
890 * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
891 lines.
892
893 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
894
895 * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
896 lines.
897 (dwarf2_find_location_expression): Likewise.
898 (call_site_parameter_matches): Likewise.
899 (dwarf2_compile_expr_to_ax): Likewise.
900 (disassemble_dwarf_expression): Likewise.
901 (loclist_describe_location): Likewise.
902
903 2020-06-23 Pedro Alves <palves@redhat.com>
904
905 * gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
906 progspace-and-thread.h. Include scoped-mock-context.h instead.
907 (register_to_value_test): Use scoped_mock_context.
908 * regcache.c: Include "scoped-mock-context.h".
909 (cooked_read_test): Don't error out if a target is already pushed.
910 Use scoped_mock_context. Adjust.
911 * scoped-mock-context.h: New file.
912
913 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
914
915 * ada-lang.c (ada_language_data): Delete la_is_string_type_p
916 initializer.
917 (ada_language::is_string_type_p): New member function.
918 * c-lang.c (c_language_data): Delete la_is_string_type_p
919 initializer.
920 (cplus_language_data): Likewise.
921 (asm_language_data): Likewise.
922 (minimal_language_data): Likewise.
923 * d-lang.c (d_language_data): Likewise.
924 * f-lang.c (f_is_string_type_p): Delete function, implementation
925 moved to f_language::is_string_type_p.
926 (f_language_data): Delete la_is_string_type_p initializer.
927 (f_language::is_string_type_p): New member function,
928 implementation from f_is_string_type_p.
929 * go-lang.c (go_is_string_type_p): Delete function, implementation
930 moved to go_language::is_string_type_p.
931 (go_language_data): Delete la_is_string_type_p initializer.
932 (go_language::is_string_type_p): New member function,
933 implementation from go_is_string_type_p.
934 * language.c (language_defn::is_string_type_p): Define new member
935 function.
936 (default_is_string_type_p): Make static, add comment copied from
937 header file.
938 (unknown_language_data): Delete la_is_string_type_p initializer.
939 (unknown_language::is_string_type_p): New member function.
940 (auto_language_data): Delete la_is_string_type_p initializer.
941 (auto_language::is_string_type_p): New member function.
942 * language.h (language_data): Delete la_is_string_type_p field.
943 (language_defn::is_string_type_p): Declare new function.
944 (default_is_string_type_p): Delete desclaration, move comment to
945 definition.
946 * m2-lang.c (m2_is_string_type_p): Delete function, implementation
947 moved to m2_language::is_string_type_p.
948 (m2_language_data): Delete la_is_string_type_p initializer.
949 (m2_language::is_string_type_p): New member function,
950 implementation from m2_is_string_type_p.
951 * objc-lang.c (objc_language_data): Delete la_is_string_type_p
952 initializer.
953 * opencl-lang.c (opencl_language_data): Likewise.
954 * p-lang.c (pascal_is_string_type_p): Delete function,
955 implementation moved to pascal_language::is_string_type_p.
956 (pascal_language_data): Delete la_is_string_type_p initializer.
957 (pascal_language::is_string_type_p): New member function,
958 implementation from pascal_is_string_type_p.
959 * rust-lang.c (rust_is_string_type_p): Delete function,
960 implementation moved to rust_language::is_string_type_p.
961 (rust_language_data): Delete la_is_string_type_p initializer.
962 (rust_language::is_string_type_p): New member function,
963 implementation from rust_is_string_type_p.
964 * valprint.c (val_print_scalar_or_string_type_p): Update call to
965 is_string_type_p.
966
967 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
968
969 * ada-lang.c (ada_language_data): Delete la_print_typedef
970 initializer.
971 (ada_language::print_typedef): New member function.
972 * c-lang.c (c_language_data): Delete la_print_typedef initializer.
973 (cplus_language_data): Likewise.
974 (asm_language_data): Likewise.
975 (minimal_language_data): Likewise.
976 * d-lang.c (d_language_data): Likewise.
977 * f-lang.c (f_language_data): Likewise.
978 (f_language::print_typedef): New member function.
979 * go-lang.c (go_language_data): Delete la_print_typedef
980 initializer.
981 * language.c (language_defn::print_typedef): Define member
982 function.
983 (unknown_language_data): Delete la_print_typedef initializer.
984 (unknown_language::print_typedef): New member function.
985 (auto_language_data): Delete la_print_typedef initializer.
986 (auto_language::print_typedef): New member function.
987 * language.h (language_data): Delete la_print_typedef field.
988 (language_defn::print_typedef): Declare new member function.
989 (LA_PRINT_TYPEDEF): Update call to print_typedef.
990 (default_print_typedef): Delete declaration.
991 * m2-lang.c (m2_language_data): Delete la_print_typedef
992 initializer.
993 (m2_language::print_typedef): New member function.
994 * objc-lang.c (objc_language_data): Delete la_print_typedef
995 initializer.
996 * opencl-lang.c (opencl_language_data): Likewise.
997 * p-lang.c (pascal_language_data): Likewise.
998 (pascal_language::print_typedef): New member function.
999 * rust-lang.c (rust_print_typedef): Delete function,
1000 implementation moved to rust_language::print_typedef.
1001 (rust_language): Delete la_print_typedef initializer.
1002 (rust_language::print_typedef): New member function,
1003 implementation from rust_print_typedef.
1004 * typeprint.c (default_print_typedef): Delete.
1005
1006 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1007
1008 * ada-lang.c (ada_language_data): Delete la_printstr initializer.
1009 (ada_language::printstr): New member function.
1010 * c-lang.c (c_language_data): Delete la_printstr initializer.
1011 (cplus_language_data): Likewise.
1012 (asm_language_data): Likewise.
1013 (minimal_language_data): Likewise.
1014 * d-lang.c (d_language_data): Likewise.
1015 * f-lang.c (f_printstr): Rename to f_language::printstr.
1016 (f_language_data): Delete la_printstr initializer.
1017 (f_language::printstr): New member function, implementation from
1018 f_printstr.
1019 * go-lang.c (go_language_data): Delete la_printstr initializer.
1020 * language.c (language_defn::printstr): Define new member
1021 function.
1022 (unk_lang_printstr): Delete.
1023 (unknown_language_data): Delete la_printstr initializer.
1024 (unknown_language::printstr): New member function.
1025 (auto_language_data): Delete la_printstr initializer.
1026 (auto_language::printstr): New member function.
1027 * language.h (language_data): Delete la_printstr field.
1028 (language_defn::printstr): Declare new member function.
1029 (LA_PRINT_STRING): Update call to printstr.
1030 * m2-lang.c (m2_printstr): Rename to m2_language::printstr.
1031 (m2_language_data): Delete la_printstr initializer.
1032 (m2_language::printstr): New member function, implementation from
1033 m2_printstr.
1034 * objc-lang.c (objc_language_data): Delete la_printstr
1035 initializer.
1036 * opencl-lang.c (opencl_language_data): Likewise.
1037 * p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
1038 (pascal_language_data): Delete la_printstr initializer.
1039 (pascal_language::printstr): New member function, implementation
1040 from pascal_printstr.
1041 * p-lang.h (pascal_printstr): Delete declaration.
1042 * rust-lang.c (rust_printstr): Update header comment.
1043 (rust_language_data): Delete la_printstr initializer.
1044 (rust_language::printstr): New member function.
1045
1046 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1047
1048 * ada-lang.c (ada_language_data): Delete la_printchar initializer.
1049 (ada_language::printchar): New member function.
1050 * c-lang.c (c_language_data): Delete la_printchar initializer.
1051 (cplus_language_data): Likewise.
1052 (asm_language_data): Likewise.
1053 (minimal_language_data): Likewise.
1054 * d-lang.c (d_language_data): Likewise.
1055 * f-lang.c (f_printchar): Rename to f_language::printchar.
1056 (f_language_data): Delete la_printchar initializer.
1057 (f_language::printchar): New member function, implementation from
1058 f_printchar.
1059 * go-lang.c (go_language_data): Delete la_printchar initializer.
1060 * language.c (unk_lang_printchar): Delete.
1061 (language_defn::printchar): Define new member function.
1062 (unknown_language_data): Delete la_printchar initializer.
1063 (unknown_language::printchar): New member function.
1064 (auto_language_data): Delete la_printchar initializer.
1065 (auto_language::printchar): New member function.
1066 * language.h (language_data): Delete la_printchar field.
1067 (language_defn::printchar): Declare new member function.
1068 (LA_PRINT_CHAR): Update call to printchar.
1069 * m2-lang.c (m2_language_data): Delete la_printchar initializer.
1070 (m2_language::printchar): New member function.
1071 * objc-lang.c (objc_language_data): Delete la_printchar
1072 initializer.
1073 * opencl-lang.c (opencl_language_data): Likewise.
1074 * p-lang.c (pascal_language_data): Delete la_printchar
1075 initializer.
1076 (pascal_language::printchar): New member function.
1077 * rust-lang.c (rust_printchar): Rename to
1078 rust_language::printchar.
1079 (rust_language_data): Delete la_printchar initializer.
1080 (rust_language::printchar): New member function, implementation
1081 from rust_printchar.
1082
1083 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1084
1085 * ada-lang.c (emit_char): Renamed to ada_language::emitchar.
1086 (ada_language_data): Delete la_emitchar initializer.
1087 (ada_language::emitchar): New member function, implementation from
1088 emit_char.
1089 * c-lang.c (c_language_data): Delete la_emitchar initializer.
1090 (cplus_language_data): Likewise.
1091 (asm_language_data): Likewise.
1092 (minimal_language_data): Likewise.
1093 * d-lang.c (d_language_data): Likewise.
1094 * f-lang.c (f_emit_char): Rename to f_language::emitchar.
1095 (f_language_data): Delete la_emitchar initializer.
1096 (f_language::emitchar): New member function, implementation from
1097 f_emit_char.
1098 * go-lang.c (go_language_data): Delete la_emitchar initializer.
1099 * language.c (unk_lang_emit_char): Delete.
1100 (language_defn::emitchar): New member function definition.
1101 (unknown_language_data): Delete la_emitchar initializer.
1102 (unknown_language::emitchar): New member function.
1103 (auto_language_data): Delete la_emitchar initializer.
1104 (auto_language::emitchar): New member function.
1105 * language.h (language_data): Delete la_emitchar field.
1106 (language_defn::emitchar): New member field declaration.
1107 (LA_EMIT_CHAR): Update call to emitchar.
1108 * m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
1109 (m2_language_data): Delete la_emitchar initializer.
1110 (m2_language::emitchar): New member function, implementation from
1111 m2_emit_char.
1112 * objc-lang.c (objc_language_data): Delete la_emitchar
1113 initializer.
1114 * opencl-lang.c (opencl_language_data): Likewise.
1115 * p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
1116 (pascal_language_data): Delete la_emitchar initializer.
1117 (pascal_language::emitchar): New member function, implementation
1118 from pascal_emit_char.
1119 * rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
1120 (rust_language_data): Delete la_emitchar initializer.
1121 (rust_language::emitchar): New member function, implementation
1122 from rust_emitchar.
1123
1124 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1125
1126 * ada-lang.c (resolve): Rename to ada_language::post_parser.
1127 (ada_language_data): Delete la_post_parser initializer.
1128 (ada_language::post_parser): New member function.
1129 * c-lang.c (c_language_data): Delete la_post_parser initializer.
1130 (cplus_language_data): Likewise.
1131 (asm_language_data): Likewise.
1132 (minimal_language_data): Likewise.
1133 * d-lang.c (d_language_data): Likewise.
1134 * f-lang.c (f_language_data): Likewise.
1135 * go-lang.c (go_language_data): Likewise.
1136 * language.c (unknown_language_data): Likewise.
1137 (auto_language_data): Likewise.
1138 * language.h (language_data): Delete la_post_parser field.
1139 (language_defn::post_parser): New member function.
1140 * m2-lang.c (m2_language_data): Delete la_post_parser initializer.
1141 * objc-lang.c (objc_language_data): Likewise.
1142 * opencl-lang.c (opencl_language_data): Likewise.
1143 * p-lang.c (pascal_language_data): Likewise.
1144 * parse.c (parse_exp_in_context): Update call to post_parser.
1145 (null_post_parser): Delete definition.
1146 * parser-defs.h (null_post_parser): Delete declaration.
1147 * rust-lang.c (rust_language_data): Delete la_post_parser
1148 initializer.
1149
1150 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1151
1152 * ada-lang.c (parse): Rename to ada_language::parser.
1153 (ada_language_data): Delete la_parser initializer.
1154 (ada_language::parser): New member function, implementation from
1155 parse.
1156 * c-lang.c (c_language_data): Delete la_parser initializer.
1157 (cplus_language_data): Likewise.
1158 (asm_language_data): Likewise.
1159 (minimal_language_data): Likewise.
1160 * d-lang.c (d_language_data): Likewise.
1161 (d_language::parser): New member function.
1162 * f-lang.c (f_language_data): Delete la_parser initializer.
1163 (f_language::parser): New member function.
1164 * go-lang.c (go_language_data): Delete la_parser initializer.
1165 (go_language::parser): New member function.
1166 * language.c (unk_lang_parser): Delete.
1167 (language_defn::parser): Define new member function.
1168 (unknown_language_data): Delete la_parser initializer.
1169 (unknown_language::parser): New member function.
1170 (auto_language_data): Delete la_parser initializer.
1171 (auto_language::parser): New member function.
1172 * language.h (language_data): Delete la_parser field.
1173 (language_defn::parser): Declare new member function.
1174 * m2-lang.c (m2_language_data): Delete la_parser initializer.
1175 (m2_language::parser): New member function.
1176 * objc-lang.c (objc_language_data): Delete la_parser initializer.
1177 * opencl-lang.c (opencl_language_data): Likewise.
1178 * p-lang.c (pascal_language_data): Likewise.
1179 (pascal_language::parser): New member function.
1180 * parse.c (parse_exp_in_context): Update call to parser.
1181 * rust-lang.c (rust_language_data): Delete la_parser initializer.
1182 (rust_language::parser): New member function.
1183
1184 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1185
1186 * top.c (print_gdb_configuration): Print --with-python-libdir
1187 configuration value.
1188
1189 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1190
1191 * NEWS: Mention change to the alias command.
1192
1193 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1194
1195 * cli/cli-cmds.c (lookup_cmd_for_default_args)
1196 (alias_command_completer)
1197 (make_alias_options_def_group): New functions.
1198 (alias_opts, alias_option_defs): New struct and array.
1199 (alias_usage_error): Update usage.
1200 (alias_command): Handles optional DEFAULT-ARGS... arguments.
1201 Use option framework.
1202 (_initialize_cli_cmds): Update alias command help.
1203 Update aliases command help.
1204 (show_user):
1205 Add NULL for new default_args lookup_cmd argument.
1206 (valid_command_p): Rename to validate_aliased_command.
1207 Add NULL for new default_args lookup_cmd argument. Verify that the
1208 aliased_command has no default args.
1209 * cli/cli-decode.c (help_cmd): Show aliases definitions.
1210 (lookup_cmd_1, lookup_cmd): New argument default_args.
1211 (add_alias_cmd):
1212 Add NULL for new default_args lookup_cmd argument.
1213 (print_help_for_command): Show default args under the layout
1214 alias some_alias = some_aliased_cmd some_alias_default_arg.
1215 * cli/cli-decode.h (struct cmd_list_element): New member default_args.
1216 xfree default_args in destructor.
1217 * cli/cli-script.c (process_next_line, do_define_command):
1218 Add NULL for new default_args lookup_cmd argument.
1219 * command.h: Declare new default_args argument in lookup_cmd
1220 and lookup_cmd_1.
1221 * completer.c (complete_line_internal_1):
1222 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1223 * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
1224 * guile/scm-param.c (add_setshow_generic, pascm_parameter_defined_p):
1225 Likewise.
1226 * infcmd.c (_initialize_infcmd): Likewise.
1227 * python/py-auto-load.c (gdbpy_initialize_auto_load): Likewise.
1228 * python/py-cmd.c (gdbpy_parse_command_name): Likewise.
1229 * python/py-param.c (add_setshow_generic): Likewise.
1230 * remote.c (_initialize_remote): Likewise.
1231 * top.c (execute_command): Prepend default_args if command has some.
1232 (set_verbose):
1233 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1234 * tracepoint.c (validate_actionline, encode_actions_1):
1235 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1236
1237 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1238
1239 * jit.c (jit_read_descriptor): Use bool as the return type.
1240 (jit_breakpoint_re_set_internal): Use bool as the return type.
1241 Invert the return value logic; return true if the jit breakpoint
1242 has been successfully initialized.
1243 (jit_inferior_init): Update the call to
1244 jit_breakpoint_re_set_internal.
1245
1246 2020-06-22 Pedro Alves <palves@redhat.com>
1247
1248 PR gdb/25939
1249 * procfs.c (procfs_target::wait): Don't reference inferior_ptid.
1250 Use the current inferior instead. Don't return
1251 TARGET_WAITKIND_SPURIOUS/inferior_ptid -- instead continue and
1252 wait again.
1253 * sol-thread.c (sol_thread_target::wait): Don't reference
1254 inferior_ptid.
1255 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs)
1256 (sol_update_thread_list_callback): Use the current inferior's pid
1257 instead of inferior_ptid.
1258
1259 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1260
1261 * procfs.c: Cleanup many comments.
1262
1263 (READ_WATCHFLAG, WRITE_WATCHFLAG, EXEC_WATCHFLAG)
1264 (AFTER_WATCHFLAG): Replace by value.
1265
1266 (MAIN_PROC_NAME_FORMAT): Inline ...
1267 (create_procinfo): ... here.
1268
1269 (procfs_debug_inferior): Remove SYS_exec handling.
1270 (syscall_is_exec): Likewise.
1271 (procfs_set_exec_trap): Likewise.
1272
1273 (syscall_is_lwp_exit): Inline in callers.
1274 (syscall_is_exit): Likewise.
1275 (syscall_is_exec): Likewise.
1276 (syscall_is_lwp_create): Likewise.
1277
1278 (invalidate_cache): Remove #if 0 code.
1279
1280 (make_signal_thread_runnable): Remove.
1281 (procfs_target::resume): Remove #if 0 code.
1282
1283 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1284
1285 PR gdb/25939
1286 * procfs.c (procfs_target::procfs_init_inferior): Move push_target
1287 call ...
1288 (procfs_target::create_inferior): ... here.
1289
1290 2020-06-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1291
1292 * exec.c (validate_exec_file): Ensure the build-id is up to
1293 date by calling reopen_exec_file (that checks file timestamp
1294 to decide to re-read the file).
1295
1296 2020-06-18 Pedro Alves <palves@redhat.com>
1297
1298 PR gdb/25412
1299 * gdbthread.h (delete_thread, delete_thread_silent)
1300 (find_thread_ptid): Update comments.
1301 * thread.c (current_thread_): New global.
1302 (is_current_thread): Move higher, and reimplement.
1303 (inferior_thread): Reimplement.
1304 (set_thread_exited): Use bool. Add assertions.
1305 (add_thread_silent): Simplify thread-reuse handling by always
1306 calling delete_thread.
1307 (delete_thread): Remove intro comment.
1308 (find_thread_ptid): Skip exited threads.
1309 (switch_to_thread_no_regs): Write to current_thread_.
1310 (switch_to_no_thread): Check CURRENT_THREAD_ instead of
1311 INFERIOR_PTID. Clear current_thread_.
1312
1313 2020-06-18 Pedro Alves <palves@redhat.com>
1314
1315 * aix-thread.c (pd_update): Use switch_to_thread.
1316
1317 2020-06-18 Pedro Alves <palves@redhat.com>
1318
1319 * ravenscar-thread.c (ravenscar_thread_target): Update.
1320 (ravenscar_thread_target::update_inferior_ptid): Rename to ...
1321 (ravenscar_thread_target::add_active_thread): ... this. Don't
1322 set m_base_ptid here. Update to avoid referencing inferior_ptid.
1323 (ravenscar_thread_target::wait): Don't write to inferior_ptid.
1324
1325 2020-06-18 Pedro Alves <palves@redhat.com>
1326
1327 * nat/windows-nat.c (current_windows_thread): Remove.
1328 * nat/windows-nat.h (current_windows_thread): Remove.
1329 * windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
1330 Adjust.
1331 (display_selectors): Adjust to fetch the current
1332 windows_thread_info based on inferior_ptid.
1333 (fake_create_process): No longer write to current_windows_thread.
1334 (windows_nat_target::get_windows_debug_event):
1335 Don't set inferior_ptid or current_windows_thread.
1336 (windows_nat_target::wait): Adjust to not rely on
1337 current_windows_thread.
1338 (do_initial_windows_stuff): Now a method of windows_nat_target.
1339 Switch to the last_ptid thread.
1340 (windows_nat_target::attach): Adjust.
1341 (windows_nat_target::detach): Use switch_to_no_thread instead of
1342 writing to inferior_ptid directly.
1343 (windows_nat_target::create_inferior): Adjust.
1344
1345 2020-06-18 Pedro Alves <palves@redhat.com>
1346
1347 * windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
1348
1349 2020-06-18 Pedro Alves <palves@redhat.com>
1350
1351 * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
1352 after creating it, instead of writing to inferior_ptid. Don't
1353 write to inferior_ptid.
1354
1355 2020-06-18 Pedro Alves <palves@redhat.com>
1356
1357 * fork-child.c (postfork_hook): Don't write to inferior_ptid.
1358
1359 2020-06-18 Pedro Alves <palves@redhat.com>
1360
1361 * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
1362 it, instead of writing to inferior_ptid.
1363
1364 2020-06-18 Pedro Alves <palves@redhat.com>
1365
1366 * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
1367 to inferior_ptid.
1368
1369 2020-06-18 Pedro Alves <palves@redhat.com>
1370
1371 * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
1372 instead of writing to inferior_ptid directly.
1373
1374 2020-06-18 Pedro Alves <palves@redhat.com>
1375
1376 * corelow.c (core_target::close): Use switch_to_no_thread instead
1377 of writing to inferior_ptid directly.
1378 (add_to_thread_list, core_target_open): Use switch_to_thread
1379 instead of writing to inferior_ptid directly.
1380
1381 2020-06-18 Pedro Alves <palves@redhat.com>
1382
1383 * darwin-nat.c (darwin_nat_target::decode_message): Don't write to
1384 inferior_ptid.
1385 (darwin_nat_target::stop_inferior, darwin_nat_target::kill): Avoid
1386 inferior_ptid.
1387 (darwin_attach_pid): Use switch_to_no_thread instead of writing to
1388 inferior_ptid directly.
1389 (darwin_nat_target::init_thread_list): Switch to thread, instead
1390 of writing to inferior_ptid.
1391 (darwin_nat_target::attach): Don't write to inferior_ptid.
1392 (darwin_nat_target::get_ada_task_ptid): Avoid inferior_ptid.
1393
1394 2020-06-18 Pedro Alves <palves@redhat.com>
1395
1396 * gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
1397 thread.
1398 (gnu_nat_target::attach): Don't write to inferior_ptid directly.
1399 Instead use switch_to_thread.
1400 (gnu_nat_target::detach): Use switch_to_no_thread
1401 instead of writing to inferior_ptid directly. Used passed-in
1402 inferior instead of looking up the inferior by pid.
1403
1404 2020-06-18 Pedro Alves <palves@redhat.com>
1405
1406 * go32-nat.c (go32_nat_target::create_inferior): Don't write to
1407 inferior_ptid.
1408
1409 2020-06-18 Pedro Alves <palves@redhat.com>
1410
1411 * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
1412 inferior_ptid.
1413 (nto_procfs_target::attach): Avoid inferior_ptid. Switch to
1414 thread.
1415 (nto_procfs_target::detach): Avoid referencing
1416 inferior_ptid. Use switch_to_no_thread instead of writing to
1417 inferior_ptid directly.
1418 (nto_procfs_target::mourn_inferior): Use switch_to_no_thread
1419 instead of writing to inferior_ptid directly.
1420 (nto_procfs_target::create_inferior): Avoid inferior_ptid. Switch
1421 to thread.
1422
1423 2020-06-18 Pedro Alves <palves@redhat.com>
1424
1425 * remote-sim.c (gdbsim_target::create_inferior): Switch to thread
1426 after creating it, instead of writing to inferior_ptid.
1427 (gdbsim_target_open): Use switch_to_no_thread instead of writing
1428 to inferior_ptid directly.
1429 (gdbsim_target::wait): Don't write to inferior_ptid.
1430
1431 2020-06-18 Pedro Alves <palves@redhat.com>
1432
1433 * remote.c (remote_target::remote_notice_new_inferior): Use
1434 switch_to_thread instead of writing to inferior_ptid directly.
1435 (remote_target::add_current_inferior_and_thread): Use
1436 switch_to_no_thread instead of writing to inferior_ptid directly.
1437 (extended_remote_target::attach): Use switch_to_inferior_no_thread
1438 and switch_to_thread instead of using set_current_inferior or
1439 writing to inferior_ptid directly.
1440
1441 2020-06-18 Pedro Alves <palves@redhat.com>
1442
1443 * tracectf.c (ctf_target_open): Switch to added thread instead of
1444 writing to inferior_ptid directly.
1445 (ctf_target::close): Use switch_to_no_thread instead of writing to
1446 inferior_ptid directly.
1447
1448 2020-06-18 Pedro Alves <palves@redhat.com>
1449
1450 * tracefile-tfile.c (tfile_target_open): Don't write to
1451 inferior_ptid directly, instead switch to added thread.
1452 (tfile_target::close): Use switch_to_no_thread instead of writing
1453 to inferior_ptid directly.
1454
1455 2020-06-18 Pedro Alves <palves@redhat.com>
1456
1457 * procfs.c (procfs_target::attach): Don't write to inferior_ptid.
1458 (procfs_target::detach): Use switch_to_no_thread
1459 instead of writing to inferior_ptid directly.
1460 (do_attach): Change return type to void. Switch to the added
1461 thread.
1462 (procfs_target::create_inferior): Switch to the added thread.
1463 (procfs_do_thread_registers): Don't write to inferior_ptid.
1464
1465 2020-06-18 Pedro Alves <palves@redhat.com>
1466
1467 * infrun.c (generic_mourn_inferior): Use switch_to_thread instead
1468 of writing to inferior_ptid.
1469 (scoped_restore_exited_inferior): Delete.
1470 (handle_vfork_child_exec_or_exit): Simplify using
1471 scoped_restore_current_pspace_and_thread. Use switch_to_thread
1472 instead of writing to inferior_ptid.
1473 (THREAD_STOPPED_BY): Delete.
1474 (thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
1475 (thread_stopped_by_hw_breakpoint): Delete.
1476 (save_waitstatus): Use
1477 scoped_restore_current_thread+switch_to_thread, and call
1478 target_stopped_by_watchpoint instead of
1479 thread_stopped_by_watchpoint, target_stopped_by_sw_breakpoint
1480 instead of thread_stopped_by_sw_breakpoint, and
1481 target_stopped_by_hw_breakpoint instead of
1482 thread_stopped_by_hw_breakpoint.
1483 (handle_inferior_event)
1484 <TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Don't write to
1485 inferior_ptid directly, nor
1486 set_current_inferior/set_current_program_space. Use
1487 switch_to_thread / switch_to_inferior_no_thread instead.
1488
1489 2020-06-18 Pedro Alves <palves@redhat.com>
1490
1491 * target.c (generic_mourn_inferior): Use switch_to_no_thread
1492 instead of writing to inferior_ptid.
1493
1494 2020-06-18 Pedro Alves <palves@redhat.com>
1495
1496 * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the
1497 added thread.
1498 (inf_ptrace_target::attach): Don't write to inferior_ptid. Switch
1499 to the added thread.
1500 (inf_ptrace_target::detach_success): Use switch_to_no_thread
1501 instead of writing to inferior_ptid.
1502
1503 2020-06-18 Pedro Alves <palves@redhat.com>
1504
1505 * gdbarch-selftests.c: Include "progspace-and-thread.h".
1506 (register_to_value_test): Mock a program_space too. Heap-allocate
1507 the address space. Don't write to inferior_ptid. Use
1508 switch_to_thread instead.
1509
1510 2020-06-18 Pedro Alves <palves@redhat.com>
1511
1512 * linux-tdep.c (find_signalled_thread(thread_info *,void *)):
1513 Delete.
1514 (find_signalled_thread()): New, factored out from
1515 linux_make_corefile_notes and adjusted to handle exited threads.
1516 (linux_make_corefile_notes): Adjust to use the new
1517 find_signalled_thread.
1518
1519 2020-06-18 Pedro Alves <palves@redhat.com>
1520
1521 * linux-tdep.c (btrace_fetch): Save/restore current thread instead
1522 of saving/restoring inferior_ptid.
1523
1524 2020-06-17 Tom Tromey <tom@tromey.com>
1525
1526 * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
1527 (tui_scroll_left, tui_scroll_right, struct tui_win_info): Don't
1528 declare.
1529 * tui/tui-data.h (MIN_CMD_WIN_HEIGHT): Remove.
1530
1531 2020-06-15 Simon Marchi <simon.marchi@efficios.com>
1532
1533 * dwarf2/read.c (dwarf2_initialize_objfile): Check for presence
1534 of partial symtabs.
1535
1536 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1537
1538 * regformats/reg-arm.dat: Remove.
1539 * regformats/reg-bfin.dat: Remove.
1540 * regformats/reg-cris.dat: Remove.
1541 * regformats/reg-crisv32.dat: Remove.
1542 * regformats/reg-m32r.dat: Remove.
1543 * regformats/reg-tilegx.dat: Remove.
1544 * regformats/reg-tilegx32.dat: Remove.
1545
1546 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1547
1548 * features/Makefile (WHICH): Remove arm files.
1549 * regformats/arm/arm-with-iwmmxt.dat: Remove.
1550 * regformats/arm/arm-with-neon.dat: Remove.
1551 * regformats/arm/arm-with-vfpv2.dat: Remove.
1552 * regformats/arm/arm-with-vfpv3.dat: Remove.
1553
1554 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
1555
1556 * features/Makefile (XMLTOC): Remove rx.xml.
1557
1558 2020-06-17 Pedro Alves <palves@redhat.com>
1559
1560 * gdbthread.h (thread_control_state) <trap_expected> Update
1561 comments.
1562
1563 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1564
1565 * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
1566 ada_language::lookup_symbol_nonlocal.
1567 (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
1568 (ada_language::lookup_symbol_nonlocal): New member function,
1569 implementation from ada_lookup_symbol_nonlocal.
1570 * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
1571 initializer.
1572 (cplus_language_data): Delete la_lookup_symbol_nonlocal
1573 initializer.
1574 (cplus_language::lookup_symbol_nonlocal): New member function.
1575 (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
1576 (minimal_language_data) Likewise.
1577 * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
1578 * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
1579 initializer.
1580 (d_language::lookup_symbol_nonlocal): New member function.
1581 * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
1582 initializer.
1583 (f_language::lookup_symbol_nonlocal): New member function.
1584 * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
1585 initializer.
1586 * language.c (unknown_language_data): Likewise.
1587 (auto_language_data): Likewise.
1588 * language.h (language_data): Delete la_lookup_symbol_nonlocal
1589 field.
1590 (language_defn::lookup_symbol_nonlocal): New member function.
1591 * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
1592 initializer.
1593 * objc-lang.c (objc_language_data): Likewise.
1594 * opencl-lang.c (opencl_language_data): Likewise.
1595 * p-lang.c (pascal_language_data): Likewise.
1596 * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
1597 rust_language::lookup_symbol_nonlocal.
1598 (rust_language_data): Delete la_lookup_symbol_nonlocal
1599 initializer.
1600 (rust_language::lookup_symbol_nonlocal): New member function,
1601 implementation from rust_lookup_symbol_nonlocal.
1602 * symtab.c (lookup_symbol_aux): Update call to
1603 lookup_symbol_nonlocal.
1604 (basic_lookup_symbol_nonlocal): Rename to...
1605 (language_defn::lookup_symbol_nonlocal): ...this, and update
1606 header comment. Remove language_defn parameter, and replace with
1607 uses of `this'.
1608 * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
1609
1610 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1611
1612 * ada-lang.c (ada_language_data): Delete la_value_print_inner
1613 initializer.
1614 (ada_language::value_print_inner): New member function.
1615 * c-lang.c (c_language_data): Delete la_value_print_inner
1616 initializer.
1617 (cplus_language_data): Likewise.
1618 (asm_language_data): Likewise.
1619 (minimal_language_data): Likewise.
1620 * d-lang.c (d_language_data): Likewise.
1621 (d_language::value_print_inner): New member function.
1622 * f-lang.c (f_language_data): Delete la_value_print_inner
1623 initializer.
1624 (f_language::value_print_inner): New member function.
1625 * f-lang.h (f_value_print_innner): Rename to...
1626 (f_value_print_inner): ...this (note spelling of 'inner').
1627 * f-valprint.c (f_value_print_innner): Rename to...
1628 (f_value_print_inner): ...this (note spelling of 'inner').
1629 * go-lang.c (go_language_data): Delete la_value_print_inner
1630 initializer.
1631 (go_language::value_print_inner): New member function.
1632 * language.c (language_defn::value_print_inner): Define new member
1633 function.
1634 (unk_lang_value_print_inner): Delete.
1635 (unknown_language_data): Delete la_value_print_inner initializer.
1636 (unknown_language::value_print_inner): New member function.
1637 (auto_language_data): Delete la_value_print_inner initializer.
1638 (auto_language::value_print_inner): New member function.
1639 * language.h (language_data): Delete la_value_print_inner field.
1640 (language_defn::value_print_inner): Delcare new member function.
1641 * m2-lang.c (m2_language_data): Delete la_value_print_inner
1642 initializer.
1643 (m2_language::value_print_inner): New member function.
1644 * objc-lang.c (objc_language_data): Delete la_value_print_inner
1645 initializer.
1646 * opencl-lang.c (opencl_language_data): Likewise.
1647 * p-lang.c (pascal_language_data): Likewise.
1648 (pascal_language::value_print_inner): New member function.
1649 * rust-lang.c (rust_language_data): Delete la_value_print_inner
1650 initializer.
1651 (rust_language::value_print_inner): New member function.
1652 * valprint.c (do_val_print): Update call to value_print_inner.
1653
1654 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1655
1656 * ada-lang.c (ada_language_data): Delete la_value_print
1657 initializer.
1658 (ada_language::value_print): New member function.
1659 * c-lang.c (c_language_data): Delete la_value_print initializer.
1660 (cplus_language_data): Likewise.
1661 (asm_language_data): Likewise.
1662 (minimal_language_data): Likewise.
1663 * d-lang.c (d_language_data): Likewise.
1664 * f-lang.c (f_language_data): Likewise.
1665 * go-lang.c (go_language_data): Likewise.
1666 * language.c (unk_lang_value_print): Delete.
1667 (language_defn::value_print): Define new member function.
1668 (unknown_language_data): Delete la_value_print initializer.
1669 (unknown_language::value_print): New member function.
1670 (auto_language_data): Delete la_value_print initializer.
1671 (auto_language::value_print): New member function.
1672 * language.h (language_data): Delete la_value_print field.
1673 (language_defn::value_print): Declare new member function.
1674 (LA_VALUE_PRINT): Update call to value_print.
1675 * m2-lang.c (m2_language_data): Delete la_value_print initializer.
1676 * objc-lang.c (objc_language_data): Likewise.
1677 * opencl-lang.c (opencl_language_data): Likewise.
1678 * p-lang.c (pascal_language_data): Likewise.
1679 (pascal_language::value_print): New member function.
1680 * rust-lang.c (rust_language_data): Delete la_value_print
1681 initializer.
1682
1683 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1684
1685 * ada-lang.c (ada_watch_location_expression): Rename to
1686 ada_language::watch_location_expression.
1687 (ada_language_data): Delete la_watch_location_expression
1688 initializer.
1689 (ada_language::watch_location_expression): New member function,
1690 implementation from ada_watch_location_expression.
1691 * breakpoint.c (watch_command_1): Update call to
1692 watch_location_expression.
1693 * c-lang.c (c_watch_location_expression): Rename to
1694 language_defn::watch_location_expression.
1695 (c_language_data): Delete la_watch_location_expression
1696 initializer.
1697 (cplus_language_data): Likewise.
1698 (asm_language_data): Likewise.
1699 (minimal_language_data): Likewise.
1700 * c-lang.h (c_watch_location_expression): Delete declaration.
1701 * d-lang.c (d_language_data): Delete la_watch_location_expression
1702 initializer.
1703 * f-lang.c (f_language_data): Likewise.
1704 * go-lang.c (go_language_data): Likewise.
1705 * language.c (language_defn::watch_location_expression): Member
1706 function implementation from c_watch_location_expression.
1707 (unknown_language_data): Delete la_watch_location_expression
1708 initializer.
1709 (auto_language_data): Likewise.
1710 * language.h (language_data): Delete la_watch_location_expression
1711 field.
1712 (language_defn::watch_location_expression): Declare new member
1713 function.
1714 * m2-lang.c (m2_language_data): Delete
1715 la_watch_location_expression initializer.
1716 * objc-lang.c (objc_language_data): Likewise.
1717 * opencl-lang.c (opencl_language_data): Likewise.
1718 * p-lang.c (pascal_language_data): Likewise.
1719 * rust-lang.c (rust_watch_location_expression): Rename to
1720 rust_language::watch_location_expression.
1721 (rust_language_data): Delete la_watch_location_expression
1722 initializer.
1723 (rust_language::watch_location_expression): New member function,
1724 implementation from rust_watch_location_expression.
1725
1726 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1727
1728 * ada-lang.c (ada_collect_symbol_completion_matches): Rename to
1729 ada_language::collect_symbol_completion_matches.
1730 (ada_language_data): Delete la_collect_symbol_completion_matches
1731 initializer.
1732 (ada_language::collect_symbol_completion_matches): New member
1733 function, implementation from
1734 ada_collect_symbol_completion_matches.
1735 * c-lang.c (c_language_data): Delete
1736 la_collect_symbol_completion_matches initializer.
1737 (cplus_language_data): Likewise.
1738 (asm_language_data): Likewise.
1739 (minimal_language_data): Likewise.
1740 * d-lang.c (d_language_data): Likewise.
1741 * f-lang.c (f_collect_symbol_completion_matches): Rename to
1742 f_language::collect_symbol_completion_matches.
1743 (f_language_data): Delete la_collect_symbol_completion_matches
1744 initializer.
1745 (f_language::collect_symbol_completion_matches) New member
1746 function, implementation from f_collect_symbol_completion_matches.
1747 * go-lang.c (go_language_data): Delete
1748 la_collect_symbol_completion_matches initializer.
1749 * language.c (unknown_language_data): Likewise.
1750 (auto_language_data): Likewise.
1751 * language.h (language_data): Delete
1752 la_collect_symbol_completion_matches field.
1753 (language_defn::collect_symbol_completion_matches): New member
1754 function.
1755 * m2-lang.c (m2_language_data): Delete
1756 la_collect_symbol_completion_matches initializer.
1757 * objc-lang.c (objc_language_data): Likewise.
1758 * opencl-lang.c (opencl_language_data): Likewise.
1759 * p-lang.c (pascal_language_data): Likewise.
1760 * rust-lang.c (rust_language_data): Likewise.
1761 * symtab.c (default_collect_symbol_completion_matches): Delete.
1762 (collect_symbol_completion_matches): Update call to
1763 collect_symbol_completion_matches.
1764 (collect_symbol_completion_matches_type): Likewise.
1765 * symtab.h (default_collect_symbol_completion_matches): Delete
1766 declaration.
1767
1768 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1769
1770 * ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
1771 (ada_language_data): Delete la_word_break_characters initializer.
1772 (ada_language::word_break_characters): New member function.
1773 * c-lang.c (c_language_data): Delete la_word_break_characters
1774 initializer.
1775 (cplus_language_data): Likewise.
1776 (asm_language_data): Likewise.
1777 (minimal_language_data): Likewise.
1778 * completer.c: Update global comment.
1779 (advance_to_expression_complete_word_point): Update call to
1780 word_break_characters.
1781 (complete_files_symbols): Likewise.
1782 (complete_line_internal_1): Likewise.
1783 (default_completer_handle_brkchars): Likewise.
1784 (skip_quoted_chars): Likewise.
1785 * d-lang.c (d_language_data): Delete la_word_break_characters
1786 initializer.
1787 * f-lang.c (f_word_break_characters): Delete.
1788 (f_language_data): Delete la_word_break_characters initializer.
1789 (f_language::word_break_characters): New member function.
1790 * go-lang.c (go_language_data): Delete la_word_break_characters
1791 initializer.
1792 * language.c (unknown_language_data): Likewise.
1793 (auto_language_data): Likewise.
1794 * language.h (default_word_break_characters): Move declaration to
1795 earlier in the file.
1796 (language_data): Delete la_word_break_characters field.
1797 (language_defn::word_break_characters): New member function.
1798 * m2-lang.c (m2_language_data): Delete la_word_break_characters
1799 initializer.
1800 * objc-lang.c (objc_language_data): Likewise.
1801 * opencl-lang.c (opencl_language_data): Likewise.
1802 * p-lang.c (pascal_language_data): Likewise.
1803 * rust-lang.c (rust_language_data): Likewise.
1804
1805 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1806
1807 * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
1808 (ada_language_data): Delete la_get_symbol_name_matcher
1809 initializer.
1810 (language_defn::get_symbol_name_matcher_inner): New member
1811 function.
1812 * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
1813 initializer.
1814 (cplus_language_data): Likewise.
1815 (cplus_language::get_symbol_name_matcher_inner): New member
1816 function.
1817 (asm_language_data): Delete la_get_symbol_name_matcher initializer.
1818 (minimal_language_data): Likewise.
1819 * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
1820 * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
1821 initializer.
1822 * dictionary.c (iter_match_first_hashed): Update call to
1823 get_symbol_name_matcher.
1824 (iter_match_next_hashed): Likewise.
1825 (iter_match_next_linear): Likewise.
1826 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
1827 * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
1828 initializer.
1829 (f_language::get_symbol_name_matcher_inner): New member function.
1830 * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
1831 initializer.
1832 * language.c (default_symbol_name_matcher): Update header comment,
1833 make static.
1834 (language_defn::get_symbol_name_matcher): New definition.
1835 (language_defn::get_symbol_name_matcher_inner): Likewise.
1836 (get_symbol_name_matcher): Delete.
1837 (unknown_language_data): Delete la_get_symbol_name_matcher
1838 initializer.
1839 (auto_language_data): Likewise.
1840 * language.h (language_data): Delete la_get_symbol_name_matcher
1841 field.
1842 (language_defn::get_symbol_name_matcher): New member function.
1843 (language_defn::get_symbol_name_matcher_inner): Likewise.
1844 (default_symbol_name_matcher): Delete declaration.
1845 * linespec.c (find_methods): Update call to
1846 get_symbol_name_matcher.
1847 * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
1848 initializer.
1849 * minsyms.c (lookup_minimal_symbol): Update call to
1850 get_symbol_name_matcher.
1851 (iterate_over_minimal_symbols): Likewise.
1852 * objc-lang.c (objc_language_data): Delete
1853 la_get_symbol_name_matcher initializer.
1854 * opencl-lang.c (opencl_language_data): Likewise.
1855 * p-lang.c (pascal_language_data): Likewise.
1856 * psymtab.c (psymbol_name_matches): Update call to
1857 get_symbol_name_matcher.
1858 * rust-lang.c (rust_language_data): Delete
1859 la_get_symbol_name_matcher initializer.
1860 * symtab.c (symbol_matches_search_name): Update call to
1861 get_symbol_name_matcher.
1862 (compare_symbol_name): Likewise.
1863
1864 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1865
1866 * ada-lang.c (ada_language_data): Delete la_compute_program
1867 initializer.
1868 * c-lang.c (c_language_data): Likewise.
1869 (c_language::compute_program): New member function.
1870 (cplus_language_data): Delete la_compute_program initializer.
1871 (cplus_language::compute_program): New member function.
1872 (asm_language_data): Delete la_compute_program initializer.
1873 (minimal_language_data): Likewise.
1874 * c-lang.h (c_compute_program): Update comment.
1875 (cplus_compute_program): Likewise.
1876 * compile/compile-c-support.c (c_compute_program): Likewise.
1877 (cplus_compute_program): Likewise.
1878 * compile/compile.c (compile_to_object): Update call to
1879 la_compute_program.
1880 * d-lang.c (d_language_data): Delete la_compute_program
1881 initializer.
1882 * f-lang.c (f_language_data): Likewise.
1883 * go-lang.c (go_language_data): Likewise.
1884 * language.c (unknown_language_data): Likewise.
1885 (auto_language_data): Likewise.
1886 * language.h (language_data): Delete la_compute_program field.
1887 (language_defn::compute_program): New member function.
1888 * m2-lang.c (m2_language_data): Delete la_compute_program
1889 initializer.
1890 * objc-lang.c (objc_language_data): Likewise.
1891 * opencl-lang.c (opencl_language_data): Likewise.
1892 * p-lang.c (pascal_language_data): Likewise.
1893 * rust-lang.c (rust_language_data): Likewise.
1894
1895 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1896
1897 * ada-lang.c (ada_language_data) Delete
1898 la_class_name_from_physname initializer.
1899 * c-lang.c (c_language_data): Likewise.
1900 (cplus_language_data): Likewise.
1901 (cplus_language::class_name_from_physname): New member function.
1902 (asm_language_data): Delete la_class_name_from_physname
1903 initializer.
1904 (minimal_language_data): Likewise.
1905 * d-lang.c (d_language_data): Likewise.
1906 * dwarf2/read.c (guess_partial_die_structure_name): Update to call
1907 method on language_defn class.
1908 (guess_full_die_structure_name): Likewise.
1909 * f-lang.c (f_language_data): Delete la_class_name_from_physname
1910 initializer.
1911 * go-lang.c (go_language_data): Likewise.
1912 * language.c (language_class_name_from_physname): Delete.
1913 (unk_lang_class_name): Delete.
1914 (unknown_language_data): Delete la_class_name_from_physname
1915 initializer.
1916 (auto_language_data): Likewise.
1917 * language.h (language_data): Delete la_class_name_from_physname
1918 field.
1919 (language_defn::class_name_from_physname): New function.
1920 (language_class_name_from_physname): Delete declaration.
1921 * m2-lang.c (m2_language_data): Delete la_class_name_from_physname
1922 initializer.
1923 * objc-lang.c (objc_language_data): Likewise.
1924 * opencl-lang.c (opencl_language_data): Likewise.
1925 * p-lang.c (pascal_language_data): Likewise.
1926 * rust-lang.c (rust_language_data): Likewise.
1927
1928 2020-06-16 Tom Tromey <tom@tromey.com>
1929
1930 * tui/tui-data.h (STATUS_NAME): New macro.
1931 * tui/tui-layout.c (tui_remove_some_windows)
1932 (initialize_known_windows, tui_register_window)
1933 (tui_layout_split::remove_windows, initialize_layouts)
1934 (tui_new_layout_command): Don't use hard-coded window names.
1935
1936 2020-06-16 Tom Tromey <tom@tromey.com>
1937
1938 PR tui/25348:
1939 * tui/tui.c (tui_ensure_readline_initialized): Rename from
1940 tui_initialize_readline. Only run once. Call rl_initialize.
1941 * tui/tui.h (tui_ensure_readline_initialized): Rename from
1942 tui_initialize_readline.
1943 * tui/tui-io.c (tui_setup_io): Call
1944 tui_ensure_readline_initialized.
1945 * tui/tui-interp.c (tui_interp::init): Update.
1946
1947 2020-06-16 Tom Tromey <tom@tromey.com>
1948
1949 * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
1950 Also preserve the status window.
1951
1952 2020-06-16 Tom Tromey <tom@tromey.com>
1953
1954 * python/py-tui.c (tui_py_window::~tui_py_window): Handle case
1955 where m_window==nullptr.
1956
1957 2020-06-15 Tom Tromey <tromey@adacore.com>
1958
1959 * windows-nat.c (windows_nat::handle_output_debug_string):
1960 Update.
1961 (windows_nat::handle_ms_vc_exception): Update.
1962 * target.h (target_read_string): Change API.
1963 * target.c (target_read_string): Change API.
1964 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
1965 Update.
1966 * solib-frv.c (frv_current_sos): Update.
1967 * solib-dsbt.c (dsbt_current_sos): Update.
1968 * solib-darwin.c (darwin_current_sos): Update.
1969 * linux-thread-db.c (inferior_has_bug): Update.
1970 * expprint.c (print_subexp_standard): Update.
1971 * ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
1972 (ada_exception_message_1): Update.
1973
1974 2020-06-15 Tom Tromey <tromey@adacore.com>
1975
1976 * linux-tdep.c (dump_mapping_p): Use target_read_memory.
1977
1978 2020-06-15 Tom Tromey <tromey@adacore.com>
1979
1980 * valprint.c (read_string): Update comment.
1981 * target.c (MIN): Remove.
1982 (target_read_string): Rewrite.
1983
1984 2020-06-15 Tom Tromey <tromey@adacore.com>
1985
1986 * corefile.c (read_memory_string): Remove.
1987 * ada-valprint.c (ada_value_print_ptr): Update.
1988 * ada-lang.h (ada_tag_name): Change return type.
1989 * ada-lang.c (type_from_tag): Update.
1990 (ada_tag_name_from_tsd): Change return type. Use
1991 target_read_string.
1992 (ada_tag_name): Likewise.
1993 * gdbcore.h (read_memory_string): Don't declare.
1994
1995 2020-06-14 Hannes Domani <ssbssa@yahoo.de>
1996
1997 * symtab.c (rbreak_command): Ignore Windows drive colon.
1998
1999 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
2000
2001 * NEWS: Mention removed GDBserver host support.
2002
2003 2020-06-12 Nelson Chu <nelson.chu@sifive.com>
2004
2005 * features/riscv/rebuild-csr-xml.sh: Updated.
2006
2007 2020-06-11 Tom Tromey <tom@tromey.com>
2008
2009 PR gdb/18318:
2010 * c-exp.y (lex_one_token): Handle 'p' like 'e'.
2011
2012 2020-06-09 Jonny Grant <jg@jguk.org>
2013 2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
2014
2015 * main.c (captured_main_1): Don't print new line after help.
2016 (print_gdb_help): add mailing list and IRC channel information
2017 to --help. Add new lines between items in the footer. Remove
2018 quotes around bug url.
2019
2020 2020-06-11 Keith Seitz <keiths@redhat.com>
2021
2022 PR gdb/21356
2023 * gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
2024 Resolve typedefs for type length calculations.
2025
2026 2020-06-10 Tom de Vries <tdevries@suse.de>
2027
2028 PR ada/24713
2029 * dwarf2/index-write.c (struct mapped_symtab): Add m_string_obstack.
2030 (write_psymbols): Enable .gdb_index for ada.
2031 * dwarf2/read.c: Remove comment stating .gdb_index is unsupported for
2032 ada.
2033
2034 2020-06-10 Tom de Vries <tdevries@suse.de>
2035
2036 * dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
2037 (dw2_symtab_iter_init): ... here. Add variant with "offset_type
2038 namei" instead of "const char *name" argument.
2039 (dw2_map_matching_symbols): Use "offset_type namei" variant of
2040 dw2_symtab_iter_init.
2041
2042 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2043
2044 * gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
2045 to use type::field and field::type instead.
2046
2047 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2048
2049 * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites
2050 to use field::type instead.
2051
2052 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2053
2054 * gdbtypes.h (struct field) <type, set_type>: New methods.
2055 Rename `type` field to...
2056 <m_type>: ... this. Change references throughout to use type or
2057 set_type methods.
2058 (FIELD_TYPE): Use field::type. Change call sites that modify
2059 the field's type to use field::set_type instead.
2060
2061 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2062
2063 * gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
2064 to use type::index_type instead.
2065
2066 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2067
2068 * gdbtypes.h (struct type) <index_type, set_index_type>: New
2069 methods.
2070 (TYPE_INDEX_TYPE): Use type::index_type.
2071 * gdbtypes.c (create_array_type_with_stride): Likewise.
2072
2073 2020-06-07 Tom Tromey <tom@tromey.com>
2074
2075 * valprint.c (generic_val_print_float): Remove "embedded_offset"
2076 parameter.
2077 (generic_value_print): Update.
2078
2079 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
2080
2081 Revert commit 982a38f60b0.
2082 * python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
2083
2084 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
2085
2086 * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
2087 avoid use after free.
2088
2089 2020-06-05 Tom de Vries <tdevries@suse.de>
2090
2091 * NEWS: Fix typos.
2092
2093 2020-06-04 Simon Marchi <simon.marchi@efficios.com>
2094
2095 * dwarf2/read.c (dwarf2_read_gdb_index): Save partial_symtabs in
2096 the per_bfd object.
2097 (dwarf2_read_debug_names): Likewise.
2098 (dwarf2_initialize_objfile): Use partial_symtabs from per_bfd
2099 object when re-using a per_bfd object with an index.
2100
2101 2020-06-03 Tom de Vries <tdevries@suse.de>
2102
2103 PR symtab/26046
2104 * dwarf2/read.c (scan_partial_symbols): Recurse into DW_TAG_subprogram
2105 children for C++.
2106 (load_partial_dies): Don't skip DW_TAG_inlined_subroutine child of
2107 DW_TAG_subprogram.
2108
2109 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2110
2111 * ada-lang.c (ada_language_data): Delete skip_trampoline
2112 initializer.
2113 * c-lang.c (c_language_data): Likewise.
2114 (cplus_language_data): Likewise.
2115 (cplus_language::skip_trampoline): New member function.
2116 (asm_language_data): Delete skip_trampoline initializer.
2117 (minimal_language_data): Likewise.
2118 * d-lang.c (d_language_data): Likewise.
2119 * f-lang.c (f_language_data): Likewise.
2120 * go-lang.c (go_language_data): Likewise.
2121 * language.c (unk_lang_trampoline): Delete function.
2122 (skip_language_trampoline): Update.
2123 (unknown_language_data): Delete skip_trampoline initializer.
2124 (auto_language_data): Likewise.
2125 * language.h (language_data): Delete skip_trampoline field.
2126 (language_defn::skip_trampoline): New function.
2127 * m2-lang.c (m2_language_data): Delete skip_trampoline
2128 initializer.
2129 * objc-lang.c (objc_skip_trampoline): Delete function, move
2130 implementation to objc_language::skip_trampoline.
2131 (objc_language_data): Delete skip_trampoline initializer.
2132 (objc_language::skip_trampoline): New member function with
2133 implementation from objc_skip_trampoline.
2134 * opencl-lang.c (opencl_language_data): Delete skip_trampoline
2135 initializer.
2136 * p-lang.c (pascal_language_data): Likewise.
2137 * rust-lang.c (rust_language_data): Likewise.
2138
2139 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2140
2141 * ada-lang.c (ada_language_data): Delete la_demangle initializer.
2142 (ada_language::demangle): New member function.
2143 * c-lang.c (c_language_data): Delete la_demangle initializer.
2144 (cplus_language_data): Delete la_demangle initializer.
2145 (cplus_language::demangle): New member function.
2146 (asm_language_data): Delete la_demangle initializer.
2147 (minimal_language_data): Delete la_demangle initializer.
2148 * d-lang.c (d_language_data): Delete la_demangle initializer.
2149 (d_language::demangle): New member function.
2150 * f-lang.c (f_language_data): Delete la_demangle initializer.
2151 (f_language::demangle): New member function.
2152 * go-lang.c (go_language_data): Delete la_demangle initializer.
2153 (go_language::demangle): New member function.
2154 * language.c (language_demangle): Update.
2155 (unk_lang_demangle): Delete.
2156 (unknown_language_data): Delete la_demangle initializer.
2157 (unknown_language::demangle): New member function.
2158 (auto_language_data): Delete la_demangle initializer.
2159 (auto_language::demangle): New member function.
2160 * language.h (language_data): Delete la_demangle field.
2161 (language_defn::demangle): New function.
2162 * m2-lang.c (m2_language_data): Delete la_demangle initializer.
2163 * objc-lang.c (objc_language_data): Delete la_demangle
2164 initializer.
2165 (objc_language::demangle): New member function.
2166 * opencl-lang.c (opencl_language_data): Delete la_demangle
2167 initializer.
2168 * p-lang.c (pascal_language_data): Likewise.
2169 * rust-lang.c (rust_language_data): Likewise.
2170 (rust_language::demangle): New member function.
2171
2172 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2173
2174 * ada-lang.c (ada_language_data): Delete la_print_type
2175 initializer.
2176 (ada_language::print_type): New member function.
2177 * c-lang.c (c_language_data): Delete la_print_type initializer.
2178 (c_language::print_type): New member function.
2179 (cplus_language_data): Delete la_print_type initializer.
2180 (cplus_language::print_type): New member function.
2181 (asm_language_data): Delete la_print_type initializer.
2182 (asm_language::print_type): New member function.
2183 (minimal_language_data): Delete la_print_type initializer.
2184 (minimal_language::print_type): New member function.
2185 * d-lang.c (d_language_data): Delete la_print_type initializer.
2186 (d_language::print_type): New member function.
2187 * f-lang.c (f_language_data): Delete la_print_type initializer.
2188 (f_language::print_type): New member function.
2189 * go-lang.c (go_language_data): Delete la_print_type initializer.
2190 (go_language::print_type): New member function.
2191 * language.c (unk_lang_print_type): Delete.
2192 (unknown_language_data): Delete la_print_type initializer.
2193 (unknown_language::print_type): New member function.
2194 (auto_language_data): Delete la_print_type initializer.
2195 (auto_language::print_type): New member function.
2196 * language.h (language_data): Delete la_print_type field.
2197 (language_defn::print_type): New function.
2198 (LA_PRINT_TYPE): Update.
2199 * m2-lang.c (m2_language_data): Delete la_print_type initializer.
2200 (m2_language::print_type): New member function.
2201 * objc-lang.c (objc_language_data): Delete la_print_type
2202 initializer.
2203 (objc_language::print_type): New member function.
2204 * opencl-lang.c (opencl_print_type): Delete, implementation moved
2205 to opencl_language::print_type.
2206 (opencl_language_data): Delete la_print_type initializer.
2207 (opencl_language::print_type): New member function, implementation
2208 from opencl_print_type.
2209 * p-lang.c (pascal_language_data): Delete la_print_type
2210 initializer.
2211 (pascal_language::print_type): New member function.
2212 * rust-lang.c (rust_print_type): Delete, implementation moved to
2213 rust_language::print_type.
2214 (rust_language_data): Delete la_print_type initializer.
2215 (rust_language::print_type): New member function, implementation
2216 from rust_print_type.
2217
2218 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2219
2220 * ada-lang.c (ada_sniff_from_mangled_name): Delete function,
2221 implementation moves to...
2222 (ada_language::sniff_from_mangled_name): ...here. Update return
2223 type.
2224 (ada_language_data): Delete la_sniff_from_mangled_name
2225 initializer.
2226 * c-lang.c (c_language_data): Likewise.
2227 (cplus_language_data): Likewise.
2228 (cplus_language::sniff_from_mangled_name): New member function,
2229 implementation taken from gdb_sniff_from_mangled_name.
2230 (asm_language_data): Delete la_sniff_from_mangled_name
2231 initializer.
2232 (minimal_language_data): Likewise.
2233 * cp-support.c (gdb_sniff_from_mangled_name): Delete,
2234 implementation moves to cplus_language::sniff_from_mangled_name.
2235 * cp-support.h (gdb_sniff_from_mangled_name): Delete declaration.
2236 * d-lang.c (d_sniff_from_mangled_name): Delete, implementation
2237 moves to...
2238 (d_language::sniff_from_mangled_name): ...here.
2239 (d_language_data): Delete la_sniff_from_mangled_name initializer.
2240 * f-lang.c (f_language_data): Likewise.
2241 * go-lang.c (go_sniff_from_mangled_name): Delete, implementation
2242 moves to...
2243 (go_language::sniff_from_mangled_name): ...here.
2244 (go_language_data): Delete la_sniff_from_mangled_name initializer.
2245 * language.c (language_sniff_from_mangled_name): Delete.
2246 (unknown_language_data): Delete la_sniff_from_mangled_name
2247 initializer.
2248 (auto_language_data): Likewise.
2249 * language.h (language_data): Delete la_sniff_from_mangled_name
2250 field.
2251 (language_defn::sniff_from_mangled_name): New function.
2252 (language_sniff_from_mangled_name): Delete declaration.
2253 * m2-lang.c (m2_language_data): Delete la_sniff_from_mangled_name
2254 field.
2255 * objc-lang.c (objc_sniff_from_mangled_name): Delete,
2256 implementation moves to...
2257 (objc_language::sniff_from_mangled_name): ...here.
2258 (objc_language_data): Delete la_sniff_from_mangled_name initializer.
2259 * opencl-lang.c (opencl_language_data): Likewise.
2260 * p-lang.c (pascal_language_data): Likewise.
2261 * rust-lang.c (rust_sniff_from_mangled_name): Delete,
2262 implementation moves to...
2263 (rust_language::sniff_from_mangled_name): ...here.
2264 (rust_language_data): Delete la_sniff_from_mangled_name
2265 initializer.
2266 * symtab.c (symbol_find_demangled_name): Call
2267 sniff_from_mangled_name member function.
2268
2269 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2270
2271 * ada-lang.c (ada_language_data): Delete la_search_name_hash
2272 initializer.
2273 * c-lang.c (c_language_data): Likewise.
2274 (cplus_language_data): Likewise.
2275 (cplus_language::search_name_hash): New member function.
2276 (asm_language_data): Delete la_search_name_hash initializer.
2277 (minimal_language_data): Likewise.
2278 * d-lang.c (d_language_data): Likewise.
2279 * dictionary.c (default_search_name_hash): Rename to...
2280 (language_defn::search_name_hash): ...this.
2281 * f-lang.c (f_language_data): Likewise.
2282 (f_language::search_name_hash): New member function.
2283 * go-lang.c (go_language_data): Delete la_search_name_hash
2284 initializer.
2285 * language.c (unknown_language_data): Likewise.
2286 (auto_language_data): Likewise.
2287 * language.h (struct language_data): Delete la_search_name_hash
2288 field.
2289 (language_defn::search_name_hash): Declare new member function.
2290 (default_search_name_hash): Delete declaration.
2291 * m2-lang.c (m2_language_data): Delete la_search_name_hash
2292 initializer.
2293 * objc-lang.c (objc_language_data): Likewise.
2294 * opencl-lang.c (opencl_language_data): Likewise.
2295 * p-lang.c (pascal_language_data): Likewise.
2296 * rust-lang.c (rust_language_data): Likewise.
2297 * symtab.c (search_name_hash): Update call.
2298
2299 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2300
2301 * ada-lang.c (ada_language_data): Delete la_get_compile_instance
2302 initializer.
2303 * c-lang.c (class compile_instance): Declare.
2304 (c_language_data): Delete la_get_compile_instance initializer.
2305 (c_language::get_compile_instance): New member function.
2306 (cplus_language_data): Delete la_get_compile_instance initializer.
2307 (cplus_language::get_compile_instance): New member function.
2308 (asm_language_data): Delete la_get_compile_instance initializer.
2309 (minimal_language_data): Likewise.
2310 * c-lang.h (c_get_compile_context): Update comment.
2311 (cplus_get_compile_context): Update comment.
2312 * compile/compile.c (compile_to_object): Update calls, don't rely
2313 on function pointer being NULL.
2314 * d-lang.c (d_language_data): Delete la_get_compile_instance
2315 initializer.
2316 * f-lang.c (f_language_data): Likewise.
2317 * go-lang.c (go_language_data): Likewise.
2318 * language.c (unknown_language_data): Likewise.
2319 (auto_language_data): Likewise.
2320 * language.h (language_data): Delete la_get_compile_instance field.
2321 (language_defn::get_compile_instance): New member function.
2322 * m2-lang.c (m2_language_data): Delete la_get_compile_instance
2323 initializer.
2324 * objc-lang.c (objc_language_data): Likewise.
2325 * opencl-lang.c (opencl_language_data): Likewise.
2326 * p-lang.c (pascal_language_data): Likewise.
2327 * rust-lang.c (rust_language_data): Likewise.
2328
2329 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2330
2331 * ada-lang.c (ada_add_all_symbols): Update comment.
2332 (ada_iterate_over_symbols): Delete, move implementation to...
2333 (ada_language::iterate_over_symbols): ...here, a new member
2334 function, rewrite to use range based for loop.
2335 (ada_language_data): Delete la_iterate_over_symbols initializer.
2336 * c-lang.c (c_language_data): Likewise.
2337 (cplus_language_data): Likewise.
2338 (asm_language_data): Likewise.
2339 (minimal_language_data): Likewise.
2340 * d-lang.c (d_language_data): Likewise.
2341 * f-lang.c (f_language_data): Likewise.
2342 * go-lang.c (go_language_data): Likewise.
2343 * language.c (unknown_language_data): Likewise.
2344 (auto_language_data): Likewise.
2345 * language.h (language_data): Delete la_iterate_over_symbols field.
2346 (language_defn::iterate_over_symbols): New member function.
2347 (LA_ITERATE_OVER_SYMBOLS): Update.
2348 * linespec.c (iterate_over_all_matching_symtabs): Update.
2349 * m2-lang.c (m2_language_data): Delete la_iterate_over_symbols
2350 initializer.
2351 * objc-lang.c (objc_language_data): Likewise.
2352 * opencl-lang.c (opencl_language_data): Likewise.
2353 * p-lang.c (pascal_language_data): Likewise.
2354 * rust-lang.c (rust_language_data): Likewise.
2355
2356 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2357
2358 * ada-lang.c (ada_language_data): Delete
2359 la_lookup_transparent_type initializer.
2360 * c-lang.c (c_language_data): Likewise.
2361 (cplus_language_data): Likewise.
2362 (cplus_language::lookup_transparent_type): New member function.
2363 (asm_language_data): Delete la_lookup_transparent_type
2364 initializer.
2365 (minimal_language_data): Likewise.
2366 * d-lang.c (d_language_data): Likewise.
2367 * f-lang.c (f_language_data): Likewise.
2368 * go-lang.c (go_language_data): Likewise.
2369 * language.c (unknown_language_data): Likewise.
2370 (auto_language_data): Likewise.
2371 * language.h (struct language_data): Delete
2372 la_lookup_transparent_type field.
2373 (language_defn::lookup_transparent_type): New member function.
2374 * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type
2375 initializer.
2376 * objc-lang.c (objc_language_data): Likewise.
2377 * opencl-lang.c (opencl_language_data): Likewise.
2378 * p-lang.c (pascal_language_data): Likewise.
2379 * rust-lang.c (rust_language_data): Likewise.
2380 * symtab.c (symbol_matches_domain): Update call.
2381
2382 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2383
2384 * ada-lang.c (ada_language_arch_info): Delete function, move
2385 implementation to...
2386 (ada_language::language_arch_info): ...here, a new member
2387 function.
2388 (ada_language_data): Delete la_language_arch_info.
2389 * c-lang.c (c_language_data): Likewise.
2390 (c_language::language_arch_info): New member function.
2391 (cplus_language_arch_info): Delete function, move
2392 implementation to...
2393 (cplus_language::language_arch_info): ...here, a new member
2394 function.
2395 (cplus_language_data): Delete la_language_arch_info.
2396 (asm_language_data): Likewise.
2397 (asm_language::language_arch_info): New member function.
2398 (minimal_language_data): Delete la_language_arch_info.
2399 (minimal_language::language_arch_info): New member function.
2400 * d-lang.c (d_language_arch_info): Delete function, move
2401 implementation to...
2402 (d_language::language_arch_info): ...here, a new member
2403 function.
2404 (d_language_data): Delete la_language_arch_info.
2405 * f-lang.c (f_language_arch_info): Delete function, move
2406 implementation to...
2407 (f_language::language_arch_info): ...here, a new member
2408 function.
2409 (f_language_data): Delete la_language_arch_info.
2410 * go-lang.c (go_language_arch_info): Delete function, move
2411 implementation to...
2412 (go_language::language_arch_info): ...here, a new member
2413 function.
2414 (go_language_data): Delete la_language_arch_info.
2415 * language.c (unknown_language_data): Likewise.
2416 (unknown_language::language_arch_info): New member function.
2417 (auto_language_data): Delete la_language_arch_info.
2418 (auto_language::language_arch_info): New member function.
2419 (language_gdbarch_post_init): Update call to
2420 la_language_arch_info.
2421 * language.h (language_data): Delete la_language_arch_info
2422 function pointer.
2423 (language_defn::language_arch_info): New function.
2424 * m2-lang.c (m2_language_arch_info): Delete function, move
2425 implementation to...
2426 (m2_language::language_arch_info): ...here, a new member
2427 function.
2428 (m2_language_data): Delete la_language_arch_info.
2429 * objc-lang.c (objc_language_arch_info): Delete function, move
2430 implementation to...
2431 (objc_language::language_arch_info): ...here, a new member
2432 function.
2433 (objc_language_data): Delete la_language_arch_info.
2434 * opencl-lang.c (opencl_language_arch_info): Delete function, move
2435 implementation to...
2436 (opencl_language::language_arch_info): ...here, a new member
2437 function.
2438 (opencl_language_data): Delete la_language_arch_info.
2439 * p-lang.c (pascal_language_arch_info): Delete function, move
2440 implementation to...
2441 (pascal_language::language_arch_info): ...here, a new member
2442 function.
2443 (pascal_language_data): Delete la_language_arch_info.
2444 * rust-lang.c (rust_language_arch_info): Delete function, move
2445 implementation to...
2446 (rust_language::language_arch_info): ...here, a new member
2447 function.
2448 (rust_language_data): Delete la_language_arch_info.
2449
2450 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2451
2452 * ada-lang.c (ada_language_data): Delete la_pass_by_reference
2453 initializer.
2454 * c-lang.c (c_language_data): Likewise.
2455 (cplus_language_data): Likewise.
2456 (cplus_language::pass_by_reference_info): New method.
2457 (asm_language_data): Delete la_pass_by_reference initializer.
2458 (minimal_language_data): Likewise.
2459 * cp-abi.c (cp_pass_by_reference): Remove use of
2460 default_pass_by_reference.
2461 * d-lang.c (d_language_data): Likewise.
2462 * f-lang.c (f_language_data): Likewise.
2463 * gnu-v3-abi.c (gnuv3_pass_by_reference): Remove use of
2464 default_pass_by_reference.
2465 * go-lang.c (go_language_data): Likewise.
2466 * language.c (language_pass_by_reference): Update.
2467 (default_pass_by_reference): Delete.
2468 (unknown_language_data): Delete la_pass_by_reference
2469 initializer.
2470 (auto_language_data): Likewise.
2471 * language.h (struct language_data): Delete la_pass_by_reference
2472 field.
2473 (language_defn::pass_by_reference_info): New member function.
2474 (default_pass_by_reference): Delete declaration.
2475 * m2-lang.c (m2_language_data): Delete la_pass_by_reference
2476 initializer.
2477 * objc-lang.c (objc_language_data): Likewise.
2478 * opencl-lang.c (opencl_language_data): Likewise.
2479 * p-lang.c (pascal_language_data): Likewise.
2480 * rust-lang.c (rust_language_data): Likewise.
2481
2482 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2483
2484 * ada-lang.c (ada_read_var_value): Delete function, move
2485 implementation to...
2486 (ada_language::read_var_value): ...here.
2487 (ada_language_data): Delete la_read_var_value initializer.
2488 * c-lang.c (c_language_data): Likewise.
2489 (cplus_language_data): Likewise.
2490 (minimal_language_data): Likewise.
2491 * d-lang.c (d_language_data): Likewise.
2492 * f-lang.c (f_language_data): Likewise.
2493 * findvar.c (default_read_var_value): Rename to...
2494 (language_defn::read_var_value): ...this.
2495 * findvar.c (read_var_value): Update header comment, and change to
2496 call member function instead of function pointer.
2497 * go-lang.c (go_language_data): Likewise.
2498 * language.c (unknown_language_data): Delete la_read_var_value
2499 initializer.
2500 (auto_language_data): Likewise.
2501 * language.h (struct language_data): Delete la_read_var_value
2502 field.
2503 (language_defn::read_var_value): New member function.
2504 (default_read_var_value): Delete declaration.
2505 * m2-lang.c (m2_language_data): Delete la_read_var_value
2506 initializer.
2507 * objc-lang.c (objc_language_data): Likewise.
2508 * opencl-lang.c (opencl_language_data): Likewise.
2509 * p-lang.c (pascal_language_data): Likewise.
2510 * rust-lang.c (rust_language_data): Likewise.
2511 * value.h (default_read_var_value): Delete declaration.
2512
2513 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2514
2515 * ada-lang.c (ada_print_array_index): Delete function, move
2516 implementation to...
2517 (ada_language::print_array_index): ...here.
2518 (ada_language_data): Delete la_print_array_index initializer.
2519 * c-lang.c (c_language_data): Likewise.
2520 (cplus_language_data): Likewise.
2521 (minimal_language_data): Likewise.
2522 * d-lang.c (d_language_data): Likewise.
2523 * f-lang.c (f_language_data): Likewise.
2524 * go-lang.c (go_language_data): Likewise.
2525 * language.c (default_print_array_index): Delete function, move
2526 implementation to...
2527 (language_defn::print_array_index): ...here.
2528 (unknown_language_data): Delete la_print_array_index initializer.
2529 (auto_language_data): Likewise.
2530 * language.h (struct language_data): Delete la_print_array_index
2531 field.
2532 (language_defn::print_array_index): New member function.
2533 (LA_PRINT_ARRAY_INDEX): Update.
2534 (default_print_array_index): Delete declaration.
2535 * m2-lang.c (m2_language_data): Delete la_print_array_index
2536 initializer.
2537 * objc-lang.c (objc_language_data): Likewise.
2538 * opencl-lang.c (opencl_language_data): Likewise.
2539 * p-lang.c (pascal_language_data): Likewise.
2540 * rust-lang.c (rust_language_data): Likewise.
2541
2542 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2543
2544 * gdb/ada-lang.c (ada_language_defn): Convert to...
2545 (ada_language_data): ...this.
2546 (class ada_language): New class.
2547 (ada_language_defn): New static global.
2548 * gdb/c-lang.c (c_language_defn): Convert to...
2549 (c_language_data): ...this.
2550 (class c_language): New class.
2551 (c_language_defn): New static global.
2552 (cplus_language_defn): Convert to...
2553 (cplus_language_data): ...this.
2554 (class cplus_language): New class.
2555 (cplus_language_defn): New static global.
2556 (asm_language_defn): Convert to...
2557 (asm_language_data): ...this.
2558 (class asm_language): New class.
2559 (asm_language_defn): New static global.
2560 (minimal_language_defn): Convert to...
2561 (minimal_language_data): ...this.
2562 (class minimal_language): New class.
2563 (minimal_language_defn): New static global.
2564 * gdb/d-lang.c (d_language_defn): Convert to...
2565 (d_language_data): ...this.
2566 (class d_language): New class.
2567 (d_language_defn): New static global.
2568 * gdb/f-lang.c (f_language_defn): Convert to...
2569 (f_language_data): ...this.
2570 (class f_language): New class.
2571 (f_language_defn): New static global.
2572 * gdb/go-lang.c (go_language_defn): Convert to...
2573 (go_language_data): ...this.
2574 (class go_language): New class.
2575 (go_language_defn): New static global.
2576 * gdb/language.c (unknown_language_defn): Remove declaration.
2577 (current_language): Initialize to nullptr, real initialization is
2578 moved to _initialize_language.
2579 (languages): Delete global.
2580 (language_defn::languages): Define.
2581 (set_language_command): Use language_defn::languages.
2582 (set_language): Likewise.
2583 (range_error): Likewise.
2584 (language_enum): Likewise.
2585 (language_def): Likewise.
2586 (add_set_language_command): Use language_def::languages for the
2587 language list, and language_def to lookup language pointers.
2588 (skip_language_trampoline): Use language_defn::languages.
2589 (unknown_language_defn): Convert to...
2590 (unknown_language_data): ...this.
2591 (class unknown_language): New class.
2592 (unknown_language_defn): New static global.
2593 (auto_language_defn): Convert to...
2594 (auto_language_data): ...this.
2595 (class auto_language): New class.
2596 (auto_language_defn): New static global.
2597 (language_gdbarch_post_init): Use language_defn::languages.
2598 (_initialize_language): Initialize current_language.
2599 * gdb/language.h (struct language_defn): Rename to...
2600 (struct language_data): ...this.
2601 (struct language_defn): New.
2602 (auto_language_defn): Delete.
2603 (unknown_language_defn): Delete.
2604 (minimal_language_defn): Delete.
2605 (ada_language_defn): Delete.
2606 (asm_language_defn): Delete.
2607 (c_language_defn): Delete.
2608 (cplus_language_defn): Delete.
2609 (d_language_defn): Delete.
2610 (f_language_defn): Delete.
2611 (go_language_defn): Delete.
2612 (m2_language_defn): Delete.
2613 (objc_language_defn): Delete.
2614 (opencl_language_defn): Delete.
2615 (pascal_language_defn): Delete.
2616 (rust_language_defn): Delete.
2617 * gdb/m2-lang.c (m2_language_defn): Convert to...
2618 (m2_language_data): ...this.
2619 (class m2_language): New class.
2620 (m2_language_defn): New static global.
2621 * gdb/objc-lang.c (objc_language_defn): Convert to...
2622 (objc_language_data): ...this.
2623 (class objc_language): New class.
2624 (objc_language_defn): New static global.
2625 * gdb/opencl-lang.c (opencl_language_defn): Convert to...
2626 (opencl_language_data): ...this.
2627 (class opencl_language): New class.
2628 (opencl_language_defn): New static global.
2629 * gdb/p-lang.c (pascal_language_defn): Convert to...
2630 (pascal_language_data): ...this.
2631 (class pascal_language): New class.
2632 (pascal_language_defn): New static global.
2633 * gdb/rust-exp.y (rust_lex_tests): Use language_def to find
2634 language pointer, update comment format.
2635 * gdb/rust-lang.c (rust_language_defn): Convert to...
2636 (rust_language_data): ...this.
2637 (class rust_language): New class.
2638 (rust_language_defn): New static global.
2639
2640 2020-06-01 Andrew Burgess <andrew.burgess@embecosm.com>
2641
2642 * dwarf2/read.c (class lnp_state_machine) <m_last_address>: New
2643 member variable.
2644 <m_stmt_at_address>: New member variable.
2645 (lnp_state_machine::record_line): Don't record some lines, update
2646 tracking of is_stmt at the same address.
2647 (lnp_state_machine::lnp_state_machine): Initialise new member
2648 variables.
2649
2650 2020-06-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
2651
2652 * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
2653 "-include gnu-nat-mig.h".
2654 * gnu-nat-mig.h: New file.
2655 * gnu-nat.c: Include "gnu-nat-mig.h".
2656 (exc_server, msg_reply_server, notify_server,
2657 process_reply_server): Remove declarations.
2658
2659 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2660
2661 * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced,
2662 steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,
2663 inf_startup, inf_update_suspends, inf_set_pid, inf_steal_exc_ports,
2664 inf_validate_procinfo, inf_validate_task_sc, inf_restore_exc_ports,
2665 inf_set_threads_resume_sc, inf_set_threads_resume_sc_for_signal_thread,
2666 inf_resume, inf_set_step_thread, inf_detach, inf_attach, inf_signal,
2667 inf_continue, make_proc, proc_abort, _proc_free, proc_update_sc,
2668 proc_get_exception_port, proc_set_exception_port, _proc_get_exc_port,
2669 proc_steal_exc_port, proc_restore_exc_port, proc_trace): Move functions
2670 to gnu_nat_target class.
2671 * gnu-nat.c: Likewise.
2672 (inf_update_procs, S_proc_wait_reply, set_task_pause_cmd,
2673 set_task_exc_port_cmd, set_signals_cmd, set_thread_pause_cmd,
2674 set_thread_exc_port_cmd): Call inf_validate_procs through gnu_target
2675 object.
2676 (gnu_nat_target::create_inferior, gnu_nat_target::detach): Pass `this'
2677 instead of `gnu_target'.
2678
2679 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2680
2681 * i386-gnu-tdep.c: Include "gdbcore.h"
2682 (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays.
2683 (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL,
2684 I386_GNU_SIGCONTEXT_THREAD_STATE_OFFSET): New macros
2685 (i386_gnu_sigtramp_start, i386_gnu_sigtramp_p,
2686 i386_gnu_sigcontext_addr): New functions
2687 (i386gnu_init_abi): Register i386_gnu_sigtramp_p,
2688 i386_gnu_sigcontext_addr, and i386_gnu_sc_reg_offset in the gdbarch
2689 tdep.
2690
2691 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2692
2693 * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
2694 before fork_inferior call. Avoid calling it if target_is_pushed returns
2695 true.
2696
2697 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2698
2699 * gnu-nat.h (gnu_target): New variable declaration.
2700 * i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
2701 gnu_target.
2702 * gnu-nat.c (gnu_target): New variable.
2703 (inf_validate_procs): Pass gnu_target to thread_change_ptid,
2704 add_thread_silent, and add_thread calls.
2705 (gnu_nat_target::create_inferior): Pass gnu_target to
2706 add_thread_silent, thread_change_ptid call.
2707 (gnu_nat_target::detach): Pass gnu_target to detach_inferior
2708 call.
2709
2710 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2711
2712 * gnu-nat.c (gnu_xfer_auxv): Remove unused `res' variable.
2713 (gnu_nat_target::find_memory_regions): Remove unused
2714 `old_address' variable.
2715
2716 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2717
2718 * gnu-nat.c: Include "gdbarch.h".
2719
2720 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2721
2722 * reply_mig_hack.awk (Error return): Cast function through
2723 void *, to bypass compiler function call check.
2724
2725 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2726
2727 * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on
2728 $(srcdir)/reply_mig_hack.awk.
2729
2730 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
2731
2732 * gnu-nat.h (gnu_debug_flag): Set type to bool.
2733
2734 2020-05-30 Jonny Grant <jg@jguk.org>
2735
2736 * configure.ac (ACX_BUGURL): change bug URL to https.
2737
2738 2020-05-30 Pedro Alves <palves@redhat.com>
2739
2740 * cp-support.c (replace_typedefs_template): New.
2741 (replace_typedefs_qualified_name): Handle
2742 DEMANGLE_COMPONENT_TEMPLATE.
2743
2744 2020-05-29 Simon Marchi <simon.marchi@efficios.com>
2745
2746 * dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
2747 dwarf2/index-cache.h, dwarf2/index-write.c,
2748 dwarf2/index-write.h, dwarf2/line-header.c,
2749 dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
2750 dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
2751 variables and fields from `dwarf2_per_objfile` to just
2752 `per_objfile` throughout.
2753
2754 2020-05-28 Simon Marchi <simon.marchi@polymtl.ca>
2755
2756 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
2757 <push_dwarf_reg_entry_value>: Add comment.
2758
2759 2020-05-28 Kevin Buettner <kevinb@redhat.com>
2760 Keith Seitz <keiths@redhat.com>
2761
2762 * python/python.c (do_start_initialization): Call PyEval_SaveThread
2763 instead of PyEval_ReleaseLock.
2764 (class gdbpy_gil): Move to earlier in file.
2765 (finalize_python): Set gdb_python_initialized.
2766 (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early
2767 when not initialized.
2768
2769 2020-05-28 Simon Marchi <simon.marchi@efficios.com>
2770
2771 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
2772 <push_dwarf_reg_entry_value>: Remove assert. Override
2773 per_objfile with caller_per_objfile.
2774
2775 2020-05-28 Tom de Vries <tdevries@suse.de>
2776
2777 * dwarf2/read.c (dw2_symtab_iter_next, dw2_expand_marked_cus): Limit
2778 PR gold/15646 workaround to symbol kind "type".
2779
2780 2020-05-27 Tom Tromey <tromey@adacore.com>
2781
2782 * dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
2783
2784 2020-05-27 Tom Tromey <tromey@adacore.com>
2785
2786 * dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
2787 Use htab_find_with_hash.
2788 <add_abbrev>: Remove "abbrev_number" parameter.
2789 * dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
2790 "abbrev_number" parameter. Use htab_find_slot_with_hash.
2791 (hash_abbrev): Add comment.
2792 (abbrev_table::lookup_abbrev): Move to header file.
2793 (abbrev_table::read): Update.
2794
2795 2020-05-27 Tom Tromey <tromey@adacore.com>
2796
2797 * dwarf2/read.c (struct partial_die_info) <name>: Declare new
2798 method.
2799 <canonical_name>: New member.
2800 <raw_name>: Rename from "name".
2801 (partial_die_info): Initialize canonical_name.
2802 (scan_partial_symbols): Check raw_name.
2803 (partial_die_parent_scope, partial_die_full_name)
2804 (add_partial_symbol, add_partial_subprogram)
2805 (add_partial_enumeration, load_partial_dies): Use "name" method.
2806 (partial_die_info::name): New method.
2807 (partial_die_info::read, guess_partial_die_structure_name)
2808 (partial_die_info::fixup): Update.
2809
2810 2020-05-27 Tom Tromey <tromey@adacore.com>
2811
2812 * dwarf2/attribute.h (struct attribute) <form_is_ref>: Inline.
2813 <get_ref_die_offset>: Inline.
2814 <get_ref_die_offset_complaint>: New method.
2815 * dwarf2/attribute.c (attribute::form_is_ref): Move to header.
2816 (attribute::get_ref_die_offset_complaint): Rename from
2817 get_ref_die_offset. Just issue complaint.
2818
2819 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2820
2821 * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
2822
2823 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2824
2825 * exec.c (exec_file_attach): Use errno value of first openp failure.
2826
2827 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
2828
2829 * nat/windows-nat.c (windows_thread_info::~windows_thread_info):
2830 Don't close thread handle.
2831
2832 2020-05-27 Tom Tromey <tom@tromey.com>
2833 Simon Marchi <simon.marchi@efficios.com>
2834
2835 * objfiles.h (struct objfile) <partial_symtabs>: Now a
2836 shared_ptr.
2837 * dwarf2/read.h (struct dwarf2_per_objfile) <partial_symtabs>: New
2838 member.
2839 * dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,
2840 dwarf2_per_bfd_objfile_data_key>: New globals.
2841 (dwarf2_has_info): Use shared dwarf2_per_bfd if possible.
2842 (dwarf2_get_section_info): Use get_dwarf2_per_objfile.
2843 (dwarf2_initialize_objfile): Consider cases where per_bfd can be
2844 shared.
2845 (dwarf2_build_psymtabs): Set objfile::partial_symtabs and
2846 short-circuit when sharing.
2847 (dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.
2848 (dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.
2849
2850 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2851
2852 * dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
2853 to...
2854 (struct dwarf2_per_objfile) <line_header_hash>: ... here.
2855 * dwarf2/read.c (handle_DW_AT_stmt_list): Update.
2856
2857 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2858
2859 * dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
2860 build_name_components, find_name_components_bounds>:
2861 Add per_objfile parameter.
2862 (struct mapped_index) <symbol_name_at>: Likewise.
2863 (struct mapped_debug_names): Remove constructor.
2864 <dwarf2_per_objfile>: Remove field.
2865 <namei_to_name, symbol_name_at>: Add per_objfile parameter.
2866 (mapped_index_base::find_name_components_bounds,
2867 mapped_index_base::build_name_components,
2868 dw2_expand_symtabs_matching_symbol): Likewise.
2869 (class mock_mapped_index) <symbol_name_at>: Likewise.
2870 (check_match): Likewise.
2871 (check_find_bounds_finds): Likewise.
2872 (test_mapped_index_find_name_component_bounds): Update.
2873 (CHECK_MATCH): Update.
2874 (dw2_expand_symtabs_matching): Update.
2875 (class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
2876 per_objfile parameter.
2877 <find_vec_in_debug_names>: Likewise.
2878 <m_per_objfile>: New field.
2879 (mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
2880 parameter.
2881 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2882 (dw2_debug_names_iterator::next): Update.
2883 (dw2_debug_names_lookup_symbol): Update.
2884 (dw2_debug_names_expand_symtabs_for_function): Update.
2885 (dw2_debug_names_map_matching_symbols): Update.
2886 (dw2_debug_names_expand_symtabs_matching): Update.
2887 (dwarf2_read_debug_names): Update.
2888
2889 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2890
2891 * dwarf2/read.h (struct dwarf2_cu): Forward-declare.
2892 (struct dwarf2_per_bfd) <free_cached_comp_units>: Remove,
2893 move to dwarf2_per_objfile.
2894 <read_in_chain>: Remove.
2895 (struct dwarf2_per_objfile) <get_cu, set_cu, remove_cu,
2896 remove_all_cus, age_comp_units>: New methods.
2897 <m_dwarf2_cus>: New member.
2898 (struct dwarf2_per_cu_data) <cu>: Remove.
2899 * dwarf2/read.c (struct dwarf2_cu) <read_in_chain>: Remove.
2900 (age_cached_comp_units, free_one_cached_comp_unit): Remove,
2901 moved to methods of dwarf2_per_objfile.
2902 (dwarf2_clear_marks): Remove.
2903 (dwarf2_queue_item::~dwarf2_queue_item): Update.
2904 (dwarf2_per_bfd::~dwarf2_per_bfd): Don't free dwarf2_cus.
2905 (dwarf2_per_bfd::free_cached_comp_units): Remove.
2906 (dwarf2_per_objfile::remove_all_cus): New.
2907 (class free_cached_comp_units) <~free_cached_comp_units>:
2908 Update.
2909 (load_cu): Update.
2910 (dw2_do_instantiate_symtab): Adjust.
2911 (fill_in_sig_entry_from_dwo_entry): Adjust.
2912 (cutu_reader::init_tu_and_read_dwo_dies): Update.
2913 (cutu_reader::cutu_reader): Likewise.
2914 (cutu_reader::keep): Use dwarf2_per_objfile::set_cu.
2915 (cutu_reader::cutu_reader): Use dwarf2_per_objfile::get_cu.
2916 (process_psymtab_comp_unit): Use dwarf2_per_objfile::remove_cu
2917 and dwarf2_per_objfile::age_comp_units.
2918 (load_partial_comp_unit): Update.
2919 (maybe_queue_comp_unit): Use dwarf2_per_objfile::get_cu.
2920 (process_queue): Likewise.
2921 (find_partial_die): Use dwarf2_per_objfile::get_cu instead of cu
2922 backlink.
2923 (dwarf2_read_addr_index): Likewise.
2924 (follow_die_offset): Likewise.
2925 (dwarf2_fetch_die_loc_sect_off): Likewise.
2926 (dwarf2_fetch_constant_bytes): Likewise.
2927 (dwarf2_fetch_die_type_sect_off): Likewise.
2928 (follow_die_sig_1): Likewise.
2929 (load_full_type_unit): Likewise.
2930 (read_signatured_type): Likewise.
2931 (dwarf2_cu::dwarf2_cu): Don't set cu field.
2932 (dwarf2_cu::~dwarf2_cu): Remove.
2933 (dwarf2_per_objfile::get_cu): New.
2934 (dwarf2_per_objfile::set_cu): New.
2935 (age_cached_comp_units): Rename to...
2936 (dwarf2_per_objfile::age_comp_units): ... this. Adjust
2937 to std::unordered_map.
2938 (free_one_cached_comp_unit): Rename to...
2939 (dwarf2_per_objfile::remove_cu): ... this. Adjust
2940 to std::unordered_map.
2941 (dwarf2_per_objfile::~dwarf2_per_objfile): New.
2942 (dwarf2_mark_helper): Use dwarf2_per_objfile::get_cu, expect
2943 a dwarf2_per_objfile in data.
2944 (dwarf2_mark): Pass dwarf2_per_objfile in data to htab_traverse.
2945 (dwarf2_clear_marks): Remove.
2946
2947 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2948
2949 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Replace
2950 `int use_existing_cu` parameter with `dwarf2_cu *existing_cu`.
2951 (init_tu_and_read_dwo_dies): Likewise.
2952 (cutu_reader::init_tu_and_read_dwo_dies): Likewise.
2953 (cutu_reader::cutu_reader): Likewise.
2954 (load_partial_comp_unit): Likewise.
2955 (process_psymtab_comp_unit): Update.
2956 (build_type_psymtabs_1): Update.
2957 (process_skeletonless_type_unit): Update.
2958 (load_full_comp_unit): Update.
2959 (find_partial_die): Update.
2960 (dwarf2_read_addr_index): Update.
2961 (read_signatured_type): Update.
2962
2963 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2964
2965 * dwarf2/read.h (struct dwarf2_per_cu_data) <m_header,
2966 m_header_read_in>: New fields.
2967 <get_header>: New method.
2968 * dwarf2/read.c (per_cu_header_read_in): Remove.
2969 (dwarf2_per_cu_data::get_header): New.
2970 (dwarf2_per_cu_data::addr_size): Update.
2971 (dwarf2_per_cu_data::offset_size): Update.
2972 (dwarf2_per_cu_data::ref_addr_size): Update.
2973
2974 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2975
2976 * dwarf2/read.c (load_cu): Return dwarf2_cu.
2977 (dw2_do_instantiate_symtab): Update.
2978 (queue_and_load_all_dwo_tus): Change parameter from
2979 dwarf2_per_cu_data to dwarf2_cu.
2980 (dwarf2_fetch_die_loc_sect_off): Update.
2981 (dwarf2_fetch_constant_bytes): Update.
2982 (dwarf2_fetch_die_type_sect_off): Update.
2983
2984 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2985
2986 * dwarf2/read.c (process_full_comp_unit,
2987 process_full_type_unit): Remove per_cu, per_objfile paramters.
2988 Add dwarf2_cu parameter.
2989 (process_queue): Update.
2990
2991 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2992
2993 * dwarf2/read.c (create_cu_from_index_list): Replace
2994 dwarf2_per_objfile parameter with dwarf2_per_bfd.
2995 (create_cus_from_index_list): Likewise.
2996 (create_cus_from_index): Likewise.
2997 (create_signatured_type_table_from_index): Likewise.
2998 (create_cus_from_debug_names_list): Likewise.
2999 (create_cus_from_debug_names): Likewise.
3000 (dwarf2_read_gdb_index): Update.
3001 (dwarf2_read_debug_names): Update.
3002
3003 2020-05-27 Tom Tromey <tom@tromey.com>
3004 Simon Marchi <simon.marchi@efficios.com>
3005
3006 * dwarf2/read.h (struct dwarf2_per_objfile)
3007 <get_type_for_signatured_type, set_type_for_signatured_type>:
3008 New methods.
3009 <m_type_map>: New member.
3010 (struct signatured_type) <type>: Remove.
3011 * dwarf2/read.c
3012 (dwarf2_per_objfile::get_type_for_signatured_type,
3013 dwarf2_per_objfile::set_type_for_signatured_type): New.
3014 (get_signatured_type): Use new methods.
3015
3016 2020-05-27 Tom Tromey <tom@tromey.com>
3017 Simon Marchi <simon.marchi@efficios.com>
3018
3019 * dwarf2/read.h (struct type_unit_group_unshareable): New.
3020 (struct dwarf2_per_objfile) <type_units>: New member.
3021 <get_type_unit_group_unshareable>: New method.
3022 * dwarf2/read.c (struct type_unit_group) <compunit_symtab,
3023 num_symtabs, symtabs>: Remove; move to
3024 type_unit_group_unshareable.
3025 (dwarf2_per_objfile::get_type_unit_group_unshareable): New.
3026 (process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
3027 (dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
3028
3029 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3030
3031 * dwarf2/read.h (struct dwarf2_per_cu_data):
3032 <dwarf2_per_objfile>: Remove.
3033 * dwarf2/read.c (create_cu_from_index_list): Don't assign
3034 dwarf2_per_objfile.
3035 (create_signatured_type_table_from_index): Likewise.
3036 (create_signatured_type_table_from_debug_names): Likewise.
3037 (create_debug_type_hash_table): Likewise.
3038 (fill_in_sig_entry_from_dwo_entry): Likewise.
3039 (create_type_unit_group): Likewise.
3040 (read_comp_units_from_section): Likewise.
3041 (create_cus_hash_table): Likewise.
3042
3043 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3044
3045 * dwarf2/read.c (process_psymtab_comp_unit): Remove reference to
3046 dwarf2_per_cu_data::dwarf2_per_objfile.
3047 (compute_compunit_symtab_includes): Likewise.
3048 (dwarf2_cu::start_symtab): Likewise.
3049
3050 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3051
3052 * dwarf2/read.h (dwarf2_get_die_type): Add dwarf2_per_objfile
3053 parameter.
3054 * dwarf2/read.c (get_die_type_at_offset): Likewise.
3055 (read_namespace_alias): Update.
3056 (lookup_die_type): Update.
3057 (dwarf2_get_die_type): Add dwarf2_per_objfile parameter.
3058 * dwarf2/loc.c (class dwarf_evaluate_loc_desc) <get_base_type>:
3059 Update.
3060 (disassemble_dwarf_expression): Update.
3061
3062 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3063
3064 * dwarf2/read.h (struct dwarf2_queue_item): Add
3065 dwarf2_per_objfile parameter, assign new parameter.
3066 <per_objfile>: New field.
3067 * dwarf2/read.c (free_one_cached_comp_unit): Add
3068 dwarf2_per_objfile parameter.
3069 (queue_comp_unit): Likewise.
3070 (dw2_do_instantiate_symtab): Update.
3071 (process_psymtab_comp_unit): Update.
3072 (maybe_queue_comp_unit): Add dwarf2_per_objfile parameter.
3073 (process_imported_unit_die): Update.
3074 (queue_and_load_dwo_tu): Update.
3075 (follow_die_offset): Update.
3076 (follow_die_sig_1): Update.
3077
3078 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3079
3080 * dwarf2/read.h (struct dwarf2_per_cu_data) <objfile>: Remove.
3081 * dwarf2/read.c (dwarf2_compute_name): Pass per_objfile down.
3082 (read_call_site_scope): Assign per_objfile.
3083 (dwarf2_per_cu_data::objfile): Remove.
3084 * gdbtypes.h (struct call_site) <per_objfile>: New member.
3085 * dwarf2/loc.h (dwarf2_evaluate_loc_desc): Add
3086 dwarf2_per_objfile parameter.
3087 * dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Add
3088 dwarf2_per_objfile parameter.
3089 (dwarf_expr_reg_to_entry_parameter): Add output
3090 dwarf2_per_objfile parameter.
3091 (locexpr_get_frame_base): Update.
3092 (class dwarf_evaluate_loc_desc) <get_tls_address>: Update.
3093 <push_dwarf_reg_entry_value>: Update.
3094 <call_site_to_target_addr>: Update.
3095 (dwarf_entry_parameter_to_value): Add dwarf2_per_objfile
3096 parameter.
3097 (value_of_dwarf_reg_entry): Update.
3098 (rw_pieced_value): Update.
3099 (indirect_synthetic_pointer): Update.
3100 (dwarf2_evaluate_property): Update.
3101 (dwarf2_loc_desc_get_symbol_read_needs): Add dwarf2_per_objfile
3102 parameter.
3103 (locexpr_read_variable): Update.
3104 (locexpr_get_symbol_read_needs): Update.
3105 (loclist_read_variable): Update.
3106
3107 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3108
3109 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
3110 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3111 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
3112 parameter.
3113 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
3114 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3115 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
3116 parameter.
3117 * dwarf2/loc.c (indirect_synthetic_pointer, per_cu_dwarf_call,
3118 sect_variable_value): Add dwarf2_per_objfile parameter.
3119 (class dwarf_evaluate_loc_desc) <dwarf_call,
3120 dwarf_variable_value>: Update.
3121 (fetch_const_value_from_synthetic_pointer): Add
3122 dwarf2_per_objfile parameter.
3123 (fetch_const_value_from_synthetic_pointer): Update.
3124 (coerced_pieced_ref): Update.
3125 (class symbol_needs_eval_context) <dwarf_call,
3126 dwarf_variable_value>: Update.
3127 (dwarf2_compile_expr_to_ax): Update.
3128
3129 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3130
3131 * dwarf2/loc.c (allocate_piece_closure): Add dwarf2_per_objfile
3132 parameter.
3133 (dwarf2_evaluate_loc_desc_full): Update.
3134
3135 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3136
3137 * dwarf2/read.h (dwarf2_read_addr_index): Add dwarf2_per_objfile
3138 parameter.
3139 * dwarf2/read.c (dwarf2_read_addr_index): Likewise.
3140 * dwarf2/loc.c (decode_debug_loclists_addresses): Add
3141 dwarf2_per_objfile parameter.
3142 (decode_debug_loc_dwo_addresses): Likewise.
3143 (dwarf2_find_location_expression): Update.
3144 (class dwarf_evaluate_loc_desc) <get_addr_index>: Update.
3145 (locexpr_describe_location_piece): Add dwarf2_per_objfile
3146 parameter.
3147 (disassemble_dwarf_expression): Add dwarf2_per_objfile
3148 parameter.
3149 (locexpr_describe_location_1): Likewise.
3150 (locexpr_describe_location): Update.
3151
3152 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3153
3154 * dwarf2/read.h (struct dwarf2_per_cu_data) <text_offset>:
3155 Remove.
3156 * dwarf2/read.c (dwarf2_per_cu_data::text_offset): Remove.
3157 * dwarf2/loc.c (dwarf2_find_location_expression): Update.
3158 (dwarf2_compile_property_to_c): Update.
3159 (dwarf2_compile_expr_to_ax): Add dwarf2_per_objfile parameter,
3160 use text offset from objfile.
3161 (locexpr_tracepoint_var_ref): Update.
3162 (locexpr_generate_c_location): Update.
3163 (loclist_describe_location): Update.
3164 (loclist_tracepoint_var_ref): Update.
3165 * dwarf2/compile.h (compile_dwarf_bounds_to_c): Add
3166 dwarf2_per_objfile parameter.
3167 * dwarf2/loc2c.c (do_compile_dwarf_expr_to_c): Likewise,
3168 use text offset from objfile.
3169 (compile_dwarf_expr_to_c): Add dwarf2_per_objfile parameter.
3170
3171 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3172
3173 * dwarf2/expr.h (struct dwarf_expr_context)
3174 <dwarf_expr_context>: Add dwarf2_per_objfile parameter.
3175 <offset>: Remove.
3176 <per_objfile>: New member.
3177 * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
3178 dwarf2_per_objfile parameter. Don't set offset, set
3179 per_objfile.
3180 (dwarf_expr_context::execute_stack_op): Use offset from objfile.
3181 * dwarf2/frame.c (dwarf2_frame_find_fde): Return (by parameter)
3182 a dwarf2_per_objfile object instead of an offset.
3183 (class dwarf_expr_executor) <dwarf_expr_executor>: Add
3184 constructor.
3185 (execute_stack_op): Add dwarf2_per_objfile parameter, pass it
3186 to dwarf2_expr_executor constructor. Don't set offset.
3187 (dwarf2_fetch_cfa_info): Update.
3188 (struct dwarf2_frame_cache) <text_offset>: Remove.
3189 <per_objfile>: New field.
3190 (dwarf2_frame_cache): Update.
3191 (dwarf2_frame_prev_register): Update.
3192 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3193 <dwarf_evaluate_loc_desc>: Add constructor.
3194 (dwarf2_evaluate_loc_desc_full): Update.
3195 (dwarf2_locexpr_baton_eval): Update.
3196 (class symbol_needs_eval_context) <symbol_needs_eval_context>:
3197 Add constructor.
3198 (dwarf2_loc_desc_get_symbol_read_needs): Update.
3199
3200 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3201
3202 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_type,
3203 addr_sized_int_type>: Move to dwarf2_cu.
3204 <int_type>: Move to dwarf2_per_objfile.
3205 (struct dwarf2_per_objfile) <int_type>: Move here.
3206 * dwarf2/read.c (struct dwarf2_cu) <addr_type,
3207 addr_sized_int_type>: Move here.
3208 (read_func_scope): Update.
3209 (read_array_type): Update.
3210 (read_tag_string_type): Update.
3211 (attr_to_dynamic_prop): Update.
3212 (dwarf2_per_cu_data::int_type): Rename to...
3213 (dwarf2_per_objfile::int_type): ... this.
3214 (dwarf2_per_cu_data::addr_sized_int_type): Rename to...
3215 (dwarf2_cu::addr_sized_int_type): ... this.
3216 (read_subrange_type): Update.
3217 (dwarf2_per_cu_data::addr_type): Rename to...
3218 (dwarf2_cu::addr_type): ... this.
3219 (set_die_type): Update.
3220
3221 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3222
3223 * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
3224 data through per_cu->cu.
3225
3226 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3227
3228 * dwarf2/read.c (lookup_dwo_comp_unit): Change
3229 dwarf2_per_cu_data parameter fo dwarf2_cu.
3230 (lookup_dwo_type_unit): Likewise.
3231 (read_cutu_die_from_dwo): Likewise.
3232 (lookup_dwo_unit): Likewise.
3233 (open_and_init_dwo_file): Likewise.
3234 (lookup_dwo_cutu): Likewise.
3235 (lookup_dwo_comp_unit): Likewise.
3236 (lookup_dwo_type_unit): Likewise.
3237 (cutu_reader::init_tu_and_read_dwo_dies): Update.
3238 (cutu_reader::cutu_reader): Update.
3239
3240 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3241
3242 * dwarf2/read.c (process_full_comp_unit): Add dwarf2_per_objfile
3243 parameter.
3244 (process_full_type_unit): Likewise.
3245 (process_queue): Update.
3246
3247 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3248
3249 * dwarf2/read.c (recursively_compute_inclusions): Add
3250 dwarf2_per_objfile parameter.
3251 (compute_compunit_symtab_includes): Likewise.
3252 (process_cu_includes): Update.
3253
3254 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3255
3256 * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
3257 parameter.
3258 (create_type_unit_group): Update.
3259 (process_psymtab_comp_unit_reader): Update.
3260 (build_type_psymtabs_reader): Update.
3261
3262 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3263
3264 * dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
3265 object through m_this_cu->cu.
3266
3267 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3268
3269 * dwarf2/read.c (queue_and_load_dwo_tu): Expect a dwarf2_cu as
3270 the info parameter.
3271 (queue_and_load_all_dwo_tus): Pass per_cu->cu.
3272
3273 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3274
3275 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Add
3276 per_objfile parameter.
3277 (load_full_type_unit): Add per_objfile parameter.
3278 (read_signatured_type): Likewise.
3279 (load_full_comp_unit): Likewise.
3280 (load_cu): Likewise.
3281 (dw2_do_instantiate_symtab): Likewise.
3282 (dw2_get_file_names): Likewise.
3283 (dw2_map_symtabs_matching_filename): Update.
3284 (dw_expand_symtabs_matching_file_matcher): Update.
3285 (dw2_map_symbol_filenames): Update.
3286 (process_psymtab_comp_unit): Add per_objfile parameter.
3287 (build_type_psymtabs_1): Update.
3288 (process_skeletonless_type_unit): Update.
3289 (dwarf2_build_psymtabs_hard): Update.
3290 (load_partial_comp_unit): Add per_objfile parameter.
3291 (scan_partial_symbols): Update.
3292 (load_full_comp_unit): Add per_objfile parameter.
3293 (process_imported_unit_die): Update.
3294 (create_cus_hash_table): Update.
3295 (find_partial_die): Update.
3296 (dwarf2_read_addr_index): Update.
3297 (follow_die_offset): Update.
3298 (dwarf2_fetch_die_loc_sect_off): Update.
3299 (dwarf2_fetch_constant_bytes): Update.
3300 (dwarf2_fetch_die_type_sect_off): Update.
3301 (follow_die_sig_1): Update.
3302 (load_full_type_unit): Add per_objfile parameter.
3303 (read_signatured_type): Likewise.
3304
3305 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3306
3307 * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
3308 of objfile_name.
3309
3310 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3311
3312 * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
3313 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
3314 * dwarf2/read.c (dwarf2_per_bfd::dwarf2_per_bfd): Assign obfd
3315 field.
3316 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
3317 (create_cus_from_index): Update.
3318 (dwarf2_read_gdb_index): Update.
3319 (create_cus_from_debug_names): Update.
3320 (dwarf2_read_debug_names): Update.
3321 (get_abbrev_section_for_cu): Update.
3322 (create_all_comp_units): Update.
3323 (read_attribute_value): Update.
3324 (get_debug_line_section): Update.
3325 * dwarf2/index-cache.c (index_cache::store): Update.
3326 * dwarf2/index-write.c (save_gdb_index_command): Update.
3327 * dwarf2/macro.c (dwarf_decode_macro_bytes): Update.
3328
3329 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3330
3331 * dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
3332 member.
3333 * dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
3334 dwarf2_per_cu_data::per_bfd.
3335 (dwarf2_per_bfd::allocate_signatured_type): Likewise.
3336 (create_type_unit_group): Likewise.
3337 (queue_comp_unit): Remove reference to
3338 per_cu->dwarf2_per_objfile.
3339 (maybe_queue_comp_unit): Likewise.
3340 (fill_in_sig_entry_from_dwo_entry): Assign new field.
3341 (create_cus_hash_table): Assign new field.
3342
3343 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3344
3345 * dwarf2/read.c: Replace
3346 dwarf2_cu->per_cu->dwarf2_per_objfile references with
3347 dwarf2_cu->per_objfile throughout.
3348
3349 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3350
3351 * dwarf2/read.c (dw2_do_instantiate_symtab): Add per_objfile
3352 parameter, don't use per_cu->dwarf2_per_objfile.
3353 (dw2_instantiate_symtab): Likewise.
3354 (dw2_find_last_source_symtab): Update.
3355 (dw2_map_expand_apply): Update.
3356 (dw2_lookup_symbol): Update.
3357 (dw2_expand_symtabs_for_function): Update.
3358 (dw2_expand_all_symtabs): Update.
3359 (dw2_expand_symtabs_with_fullname): Update.
3360 (dw2_expand_symtabs_matching_one): Add per_objfile parameter,
3361 don't use per_cu->dwarf2_per_objfile.
3362 (dw2_expand_marked_cus): Update.
3363 (dw2_find_pc_sect_compunit_symtab): Update.
3364 (dw2_debug_names_lookup_symbol): Update.
3365 (dw2_debug_names_expand_symtabs_for_function): Update.
3366 (dw2_debug_names_map_matching_symbols): Update.
3367 (dwarf2_psymtab::expand_psymtab): Update.
3368
3369 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3370
3371 * dwarf2/read.c (struct dwarf2_cu) <dwarf2_cu>: Add parameter.
3372 <per_objfile>: New member.
3373 (class cutu_reader) <init_tu_and_read_dwo_dies>: Add parameter.
3374 (cutu_reader::init_tu_and_read_dwo_dies): Add parameter, update
3375 call to dwarf2_cu.
3376 (cutu_reader::cutu_reader): Update.
3377 (dwarf2_cu::dwarf2_cu): Add parameter, initialize per_objfile.
3378
3379 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3380
3381 * dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
3382 struct dwarf2_per_objfile.
3383 (struct dwarf2_per_objfile) <die_type_hash>: Move from struct
3384 dwarf2_per_bfd.
3385 * dwarf2/read.c (set_die_type): Update.
3386 (get_die_type_at_offset): Update.
3387
3388 2020-05-27 Tom Tromey <tom@tromey.com>
3389 Simon Marchi <simon.marchi@efficios.com>
3390
3391 * dwarf2/read.h (struct dwarf2_per_bfd) <num_psymtabs>: New
3392 method.
3393 (struct dwarf2_per_objfile) <resize_symtabs, symtab_set_p,
3394 get_symtab, set_symtab>: New methods.
3395 <m_symtabs>: New field.
3396 (struct dwarf2_psymtab): Derive from partial_symtab.
3397 <readin_p, get_compunit_symtab>: Declare methods.
3398 * dwarf2/read.c (dwarf2_per_objfile::symtab_set_p,
3399 dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
3400 New methods.
3401 (struct dwarf2_per_cu_quick_data) <compunit_symtab>: Remove.
3402 (dw2_do_instantiate_symtab, dw2_instantiate_symtab)
3403 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
3404 (dw2_symtab_iter_next, dw2_print_stats)
3405 (dw2_expand_symtabs_with_fullname)
3406 (dw2_expand_symtabs_matching_one)
3407 (dw_expand_symtabs_matching_file_matcher)
3408 (dw2_find_pc_sect_compunit_symtab, dw2_map_symbol_filenames)
3409 (dw2_debug_names_iterator::next)
3410 (dw2_debug_names_map_matching_symbols)
3411 (fill_in_sig_entry_from_dwo_entry, dwarf2_psymtab::read_symtab)
3412 (process_queue, dwarf2_psymtab::expand_psymtab): Update.
3413 (dwarf2_psymtab::readin_p, dwarf2_psymtab::get_compunit_symtab):
3414 New methods.
3415 (get_compunit_symtab, process_full_comp_unit)
3416 (process_full_type_unit): Update.
3417 (dwarf2_build_psymtabs, dwarf2_initialize_objfile, add_type_unit): Call
3418
3419 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3420
3421 * dwarf2/read.h (dwarf2_per_objfile): Rename to dwarf2_per_bfd,
3422 then introduce a new dwarf2_per_objfile type.
3423 <read_line_string>: Move to the new dwarf2_per_objfile type.
3424 <objfile>: Likewise.
3425 (dwarf2_per_bfd): Rename dwarf2_per_objfile to this.
3426 * dwarf2/read.c: Replace references to dwarf2_per_objfile with
3427 dwarf2_per_objfile->per_bfd.
3428 (dwarf2_per_objfile::dwarf2_per_objfile): Rename to...
3429 (dwarf2_per_bfd::dwarf2_per_bfd): ... this.
3430 (dwarf2_per_objfile::free_cached_comp_units): Rename to...
3431 (dwarf2_per_bfd::free_cached_comp_units): ... this.
3432 (dwarf2_has_info): Allocate dwarf2_per_bfd.
3433 (dwarf2_per_objfile::locate_sections): Rename to...
3434 (dwarf2_per_bfd::locate_sections): ... this.
3435 (dwarf2_per_objfile::get_cutu): Rename to...
3436 (dwarf2_per_bfd::get_cutu): ... this.
3437 (dwarf2_per_objfile::get_cu): Rename to...
3438 (dwarf2_per_bfd::get_cu): ... this.
3439 (dwarf2_per_objfile::get_tu): Rename to...
3440 (dwarf2_per_bfd::get_tu): ... this.
3441 (dwarf2_per_objfile::allocate_per_cu): Rename to...
3442 (dwarf2_per_bfd::allocate_per_cu): ... this.
3443 (dwarf2_per_objfile::allocate_signatured_type): Rename to...
3444 (dwarf2_per_bfd::allocate_signatured_type): ... this.
3445 (get_gdb_index_contents_ftype): Change parameter from
3446 dwarf2_per_objfile to dwarf2_per_bfd.
3447 * dwarf2/macro.c, dwarf2/index-write.c: Replace references to
3448 dwarf2_per_objfile with dwarf2_per_objfile->per_bfd.
3449
3450 2020-05-27 Tom Tromey <tom@tromey.com>
3451 Simon Marchi <simon.marchi@efficios.com>
3452
3453 * dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
3454 (allocate_piece_closure): Set "per_objfile" member.
3455 (dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
3456 (locexpr_describe_location, loclist_describe_location): Use new
3457 member.
3458 * dwarf2/read.c (read_call_site_scope)
3459 (mark_common_block_symbol_computed, attr_to_dynamic_prop)
3460 (dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
3461 (fill_in_loclist_baton, dwarf2_symbol_mark_computed,
3462 handle_data_member_location): Set per_objfile member.
3463 * dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
3464 member.
3465 (struct dwarf2_loclist_baton) <per_objfile>: New member.
3466
3467 2020-05-27 Tom Tromey <tom@tromey.com>
3468
3469 * dwarf2/read.h (struct dwarf2_per_objfile) <allocate_per_cu,
3470 allocate_signatured_type>: Declare new methods.
3471 <m_num_psymtabs>: New member.
3472 (struct dwarf2_per_cu_data) <index>: New member.
3473 * dwarf2/read.c (dwarf2_per_objfile::allocate_per_cu)
3474 (dwarf2_per_objfile::allocate_signatured_type): New methods.
3475 (create_cu_from_index_list): Use allocate_per_cu.
3476 (create_signatured_type_table_from_index)
3477 (create_signatured_type_table_from_debug_names)
3478 (create_debug_type_hash_table, add_type_unit)
3479 (read_comp_units_from_section): Use allocate_signatured_type.
3480
3481 2020-05-27 Tom Tromey <tom@tromey.com>
3482
3483 * psymtab.c (partial_map_expand_apply)
3484 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
3485 (psym_lookup_global_symbol_language)
3486 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
3487 (psym_print_stats, psym_expand_symtabs_for_function)
3488 (psym_map_symbol_filenames, psym_map_matching_symbols)
3489 (psym_expand_symtabs_matching)
3490 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
3491 (maintenance_check_psymtabs): Update.
3492 * psympriv.h (struct partial_symtab) <readin_p,
3493 get_compunit_symtab>: Add objfile parameter.
3494 (struct standard_psymtab) <readin_p, get_compunit_symtab>:
3495 Likewise.
3496 * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p,
3497 get_compunit_symtab>: Likewise.
3498 (dwarf2_psymtab::expand_psymtab): Pass objfile argument.
3499
3500 2020-05-27 Tom Tromey <tom@tromey.com>
3501
3502 * dwarf2/read.h (struct dwarf2_per_objfile) <obstack>: New
3503 member.
3504 * dwarf2/read.c (delete_file_name_entry): Fix comment.
3505 (create_cu_from_index_list)
3506 (create_signatured_type_table_from_index)
3507 (create_signatured_type_table_from_debug_names)
3508 (dw2_get_file_names_reader, dwarf2_initialize_objfile)
3509 (dwarf2_create_include_psymtab)
3510 (create_debug_type_hash_table, add_type_unit)
3511 (create_type_unit_group, read_comp_units_from_section)
3512 (dwarf2_compute_name, create_cus_hash_table)
3513 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
3514 (create_dwo_unit_in_dwp_v2, open_and_init_dwp_file): Use new
3515 obstack.
3516 (dw2_get_real_path): Likewise. Change argument to
3517 dwarf2_per_objfile.
3518
3519 2020-05-27 Luis Machado <luis.machado@linaro.org>
3520
3521 PR tdep/26000
3522 * arm-tdep.c (thumb_analyze_prologue): Fix instruction matching
3523 for ldrd (immediate).
3524
3525 2020-05-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3526
3527 * command.h: Add comment giving the name of class_tui.
3528 * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
3529 create the fake command for the help for class_tui.
3530
3531 2020-05-26 Tom Tromey <tromey@adacore.com>
3532
3533 * ada-lang.c (ada_print_array_index): Change type. Call val_atr.
3534 (ada_value_ptr_subscript): Don't call pos_atr on the lower bound.
3535 (val_atr): New function.
3536 (value_val_atr): Use it.
3537 * ada-valprint.c (print_optional_low_bound): Change low bound
3538 handling for enums.
3539 (val_print_packed_array_elements): Don't call discrete_position.
3540 * gdbtypes.c (get_discrete_bounds) <TYPE_CODE_RANGE>: Call
3541 discrete_position for enum types.
3542 * language.c (default_print_array_index): Change type.
3543 * language.h (struct language_defn) <la_print_array_index>: Add
3544 index_type parameter, change type of index_value.
3545 (LA_PRINT_ARRAY_INDEX): Add index_type parameter.
3546 (default_print_array_index): Update.
3547 * valprint.c (maybe_print_array_index): Don't call
3548 value_from_longest. Update.
3549 (value_print_array_elements): Don't call discrete_position.
3550
3551 2020-05-26 Tom Tromey <tromey@adacore.com>
3552
3553 * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE.
3554 * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE.
3555
3556 2020-05-25 Cristiano De Alti <cristiano_dealti@hotmail.com>
3557
3558 PR gdb/13519
3559 * avr-tdep.c (avr_integer_to_address): Return data or code
3560 address accordingly to the second 'type' argument of the
3561 function.
3562
3563 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
3564
3565 * infcmd.c, inferior.h: (construct_inferior_arguments):
3566 Moved function from here to gdbsupport/common-inferior.{h,cc}
3567
3568 2020-05-23 Tom Tromey <tom@tromey.com>
3569
3570 Revert commit eca1f90c:
3571 * NEWS: Remove entry for completion styling.
3572 * completer.c (_rl_completion_prefix_display_length): Move
3573 declaration later.
3574 (gdb_fnprint): Revert.
3575 (gdb_display_match_list_1): Likewise.
3576 * cli/cli-style.c (completion_prefix_style)
3577 (completion_difference_style, completion_suffix_style): Remove.
3578 (_initialize_cli_style): Revert.
3579 * cli/cli-style.h (completion_prefix_style)
3580 (completion_difference_style, completion_suffix_style): Don't
3581 declare.
3582
3583 2020-05-24 Pedro Alves <palves@redhat.com>
3584
3585 * symtab.c (completion_list_add_name): Return boolean indication
3586 of whether the symbol matched.
3587 (completion_list_add_symbol): Don't try to remove C++ aliases if
3588 the symbol didn't match in the first place.
3589 * symtab.h (completion_list_add_name): Return bool.
3590
3591 2020-05-23 Simon Marchi <simon.marchi@polymtl.ca>
3592
3593 * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
3594 type::field.
3595
3596 2020-05-23 Joel Brobecker <brobecker@adacore.com>
3597
3598 GDB 9.2 released.
3599
3600 2020-05-23 Tom Tromey <tom@tromey.com>
3601
3602 * NEWS: Add entry for completion styling.
3603 * completer.c (_rl_completion_prefix_display_length): Move
3604 declaration earlier.
3605 (gdb_fnprint): Use completion_style.
3606 (gdb_display_match_list_1): Likewise.
3607 * cli/cli-style.c (completion_prefix_style)
3608 (completion_difference_style, completion_suffix_style): New
3609 globals.
3610 (_initialize_cli_style): Register new globals.
3611 * cli/cli-style.h (completion_prefix_style)
3612 (completion_difference_style, completion_suffix_style): Declare.
3613
3614 2020-05-23 Pedro Alves <palves@redhat.com>
3615
3616 * utils.c: Include "gdbsupport/gdb-safe-ctype.h".
3617 (parse_escape): Use ISDIGIT instead of isdigit.
3618 (puts_debug): Use gdb_isprint instead of isprint.
3619 (fprintf_symbol_filtered): Use ISALNUM instead of isalnum.
3620 (cp_skip_operator_token, skip_ws, strncmp_iw_with_mode): Use
3621 ISSPACE instead of isspace.
3622 (strncmp_iw_with_mode): Use TOLOWER instead of tolower and ISSPACE
3623 instead of isspace.
3624 (strcmp_iw_ordered): Use ISSPACE instead of isspace.
3625 (string_to_core_addr): Use TOLOWER instead of tolower, ISXDIGIT
3626 instead of isxdigit and ISDIGIT instead of isdigit.
3627
3628 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3629
3630 * gdbtypes.h (struct type) <field>: New method.
3631 (TYPE_FIELDS): Remove, replace all uses with either type::fields
3632 or type::field.
3633
3634 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3635
3636 * gdbtypes.h (struct type) <fields, set_fields>: New methods.
3637 (TYPE_FIELDS): Use type::fields. Change all call sites that
3638 modify the propery to use type::set_fields instead.
3639
3640 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3641
3642 * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
3643 type::num_fields instead.
3644
3645 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
3646
3647 * gdbtypes.h (struct type) <num_fields, set_num_fields>: New
3648 methods.
3649 (TYPE_NFIELDS): Use type::num_fields. Change all call sites
3650 that modify the number of fields to use type::set_num_fields
3651 instead.
3652
3653 2020-05-22 Tom Tromey <tromey@adacore.com>
3654
3655 * compile/compile-object-load.h (munmap_list_free): Don't
3656 declare.
3657
3658 2020-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
3659
3660 * annotate.c (annotate_source_line): Update return type, add call
3661 to update current symtab and line.
3662 * annotate.h (annotate_source_line): Update return type, and
3663 extend header comment.
3664 * source.c (info_line_command): Check annotation_level before
3665 calling annotate_source_line.
3666 * stack.c (print_frame_info): If calling annotate_source_line
3667 returns true, then don't print any other source line information.
3668
3669 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
3670
3671 * lm32-tdep.c (lm32_register_reggroup_p): Fix condition.
3672
3673 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
3674
3675 * coffread.c (patch_type): Remove NULL check before xfree.
3676 * corefile.c (set_gnutarget): Likewise.
3677 * cp-abi.c (set_cp_abi_as_auto_default): Likewise.
3678 * exec.c (build_section_table): Likewise.
3679 * remote.c (remote_target::pass_signals): Likewise.
3680 * utils.c (n_spaces): Likewise.
3681 * cli/cli-script.c (document_command): Likewise.
3682 * i386-windows-tdep.c (core_process_module_section): Likewise.
3683 * linux-fork.c (struct fork_info) <~fork_info>: Likewise.
3684
3685 2020-05-20 Simon Marchi <simon.marchi@efficios.com>
3686
3687 * symfile.c (reread_symbols): Clear objfile's section_offsets
3688 vector and section indices, re-compute them by calling
3689 sym_offsets.
3690
3691 2020-05-20 Tom Tromey <tromey@adacore.com>
3692
3693 * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove.
3694 (desc_one_bound, desc_index_type): Compute field name.
3695
3696 2020-05-20 Tom de Vries <tdevries@suse.de>
3697
3698 PR symtab/25833
3699 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index.
3700
3701 2020-05-20 Alan Modra <amodra@gmail.com>
3702
3703 PR 25993
3704 * solib-darwin.c (darwin_bfd_open): Don't strdup pathname for
3705 bfd_set_filename.
3706 * solib-aix.c (solib_aix_bfd_open): Use std::string for name
3707 passed to bfd_set_filename.
3708 * symfile-mem.c (add_vsyscall_page): Likewise for string
3709 passed to symbol_file_add_from_memory.
3710 (symbol_file_add_from_memory): Make name param a const char* and
3711 don't strdup.
3712
3713 2020-05-20 Alan Modra <amodra@gmail.com>
3714
3715 * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename
3716 rather than accessing bfd->filename directly.
3717 * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise,
3718 and use bfd_section_name.
3719 * dwarf2/frame.c (decode_frame_entry): Likewise.
3720 * exec.c (exec_set_section_address): Likewise.
3721 * solib-aix.c (solib_aix_bfd_open): Likewise.
3722 * stap-probe.c (get_stap_base_address): Likewise.
3723 * symfile.c (reread_symbols): Likewise.
3724
3725 2020-05-19 Tom Tromey <tromey@adacore.com>
3726
3727 * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
3728
3729 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3730
3731 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
3732
3733 2020-05-19 Pedro Alves <palves@redhat.com>
3734
3735 * NEWS (set exec-file-mismatch): Adjust entry.
3736 * exec.c: Include "build-id.h".
3737 (validate_exec_file): Try to match build IDs instead of filenames.
3738 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
3739 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
3740 and pass down 'warn_if_slow'.
3741 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
3742 gdb_bfd_open_closure to pass it down.
3743 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
3744
3745 2020-05-19 Pedro Alves <palves@redhat.com>
3746
3747 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
3748 * target.c (target_fileio_open_1): Rename to target_fileio_open
3749 and make extern. Use bool.
3750 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
3751 (target_fileio_read_alloc_1): Adjust.
3752 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
3753 (target_fileio_open_warn_if_slow): Delete declaration.
3754
3755 2020-05-19 Pedro Alves <palves@redhat.com>
3756
3757 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
3758 Adjust all callers.
3759
3760 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
3761
3762 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
3763 whether disp is negative.
3764
3765 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3766
3767 * symfile.h (struct symfile_segment_data)
3768 <~symfile_segment_data>: Remove.
3769 <segment_info>: Change to std::vector.
3770 * symfile.c (default_symfile_segments): Update.
3771 * elfread.c (elf_symfile_segments): Update.
3772
3773 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3774
3775 * symfile.h (struct symfile_segment_data) <struct segment>: New.
3776 <segments>: New.
3777 <segment_bases, segment_sizes>: Remove.
3778 * symfile.c (default_symfile_segments): Update.
3779 * elfread.c (elf_symfile_segments): Update.
3780 * remote.c (remote_target::get_offsets): Update.
3781 * solib-target.c (solib_target_relocate_section_addresses):
3782 Update.
3783
3784 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
3785
3786 * symfile.h (struct symfile_segment_data): Initialize fields.
3787 <~symfile_segment_data>: Add.
3788 (symfile_segment_data_up): New.
3789 (struct sym_fns) <sym_segments>: Return a
3790 symfile_segment_data_up.
3791 (default_symfile_segments): Return a symfile_segment_data_up.
3792 (free_symfile_segment_data): Remove.
3793 (get_symfile_segment_data): Return a symfile_segment_data_up.
3794 * symfile.c (default_symfile_segments): Likewise.
3795 (get_symfile_segment_data): Likewise.
3796 (free_symfile_segment_data): Remove.
3797 (symfile_find_segment_sections): Update.
3798 * elfread.c (elf_symfile_segments): Return a
3799 symfile_segment_data_up.
3800 * remote.c (remote_target::get_offsets): Update.
3801 * solib-target.c (solib_target_relocate_section_addresses):
3802 Update.
3803 * symfile-debug.c (debug_sym_segments): Return a
3804 symfile_segment_data_up.
3805
3806 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3807
3808 PR build/25981
3809 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
3810 Hardcode register numbers.
3811
3812 PR build/25981
3813 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
3814 procfs_find_LDT_entry): Remove.
3815 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
3816 procfs_find_LDT_entry): Remove.
3817 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
3818 Remove.
3819
3820 2020-05-17 Pedro Alves <palves@redhat.com>
3821 Andrew Burgess <andrew.burgess@embecosm.com>
3822 Keno Fischer <keno@juliacomputing.com>
3823
3824 PR gdb/25741
3825 * breakpoint.c (build_target_condition_list): Update comments.
3826 (build_target_command_list): Update comments and skip matching
3827 locations.
3828 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
3829 a separate function. Simplify "set breakpoint auto-hw off"
3830 handling.
3831 (insert_breakpoints): Update comment.
3832 (tracepoint_locations_match): New parameter. For breakpoints,
3833 compare location types too, if the caller wants to.
3834 (handle_automatic_hardware_breakpoints): New functions.
3835 (bp_location_is_less_than): Also sort by location type and
3836 hardware breakpoint length.
3837 (update_global_location_list): Handle "set breakpoint auto-hw on"
3838 here.
3839 (update_breakpoint_locations): Ask breakpoint_locations_match to
3840 ignore location types.
3841
3842 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3843
3844 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
3845 type::name instead.
3846
3847 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3848
3849 * gdbtypes.h (struct type) <name, set_name>: New methods.
3850 (TYPE_CODE): Use type::name. Change all call sites used to set
3851 the name to use type::set_name instead.
3852
3853 2020-05-16 Tom Tromey <tom@tromey.com>
3854
3855 * top.c (quit_force): Update.
3856 * infrun.c (handle_no_resumed): Update.
3857 * top.h (all_uis): New function.
3858 (ALL_UIS): Remove.
3859
3860 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
3861
3862 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
3863
3864 2020-05-16 Pedro Alves <palves@redhat.com>
3865
3866 * ia64-linux-nat.c
3867 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
3868 Declare method.
3869 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
3870
3871 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
3872
3873 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
3874 (sparc64_adi_info): Likewise.
3875
3876 2020-05-15 Tom Tromey <tom@tromey.com>
3877
3878 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
3879 block_objfile.
3880 (lookup_objfile_from_block): Remove.
3881 (lookup_symbol_in_block, lookup_symbol_in_static_block)
3882 (lookup_global_symbol): Use block_objfile.
3883 * symtab.h (lookup_objfile_from_block): Don't declare.
3884 * printcmd.c (clear_dangling_display_expressions): Use
3885 block_objfile.
3886 * parse.c (operator_check_standard): Use block_objfile.
3887
3888 2020-05-15 Tom Tromey <tom@tromey.com>
3889
3890 * language.c (language_alloc_type_symbol): Set
3891 SYMBOL_SECTION.
3892 * symtab.c (initialize_objfile_symbol): Remove.
3893 (allocate_symbol): Remove.
3894 (allocate_template_symbol): Remove.
3895 * dwarf2/read.c (fixup_go_packaging): Use "new".
3896 (new_symbol): Use "new".
3897 (read_variable): Don't call initialize_objfile_symbol. Use
3898 "new".
3899 (read_func_scope): Use "new".
3900 * xcoffread.c (process_xcoff_symbol): Don't call
3901 initialize_objfile_symbol.
3902 (SYMBOL_DUP): Remove.
3903 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
3904 "new".
3905 * symtab.h (allocate_symbol, initialize_objfile_symbol)
3906 (allocate_template_symbol): Don't declare.
3907 (struct symbol): Add copy constructor. Change defaults.
3908 * jit.c (finalize_symtab): Use "new".
3909 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
3910 Use "new".
3911 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
3912 (common_block_end): Use "new".
3913 * mdebugread.c (parse_symbol): Use "new".
3914 (new_symbol): Likewise.
3915
3916 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3917
3918 * NEWS: Mention changes to help and apropos.
3919
3920 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3921
3922 * command.h (enum command_class): Improve comments, document
3923 that class_alias is for user-defined aliases, give the class
3924 name for each class, remove unused class_xdb.
3925 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
3926 * breakpoint.c (_initialize_breakpoint): Replace class_alias
3927 by a precise class.
3928 * infcmd.c (_initialize_infcmd): Likewise.
3929 * reverse.c (_initialize_reverse): Likewise.
3930 * stack.c (_initialize_stack): Likewise.
3931 * symfile.c (_initialize_symfile): Likewise.
3932 * tracepoint.c (_initialize_tracepoint): Likewise.
3933
3934 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3935
3936 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
3937 when their aliased command is traversed.
3938 (help_cmd): Add fput_command_names_styled call to
3939 output command name and aliases when command has an alias.
3940
3941 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3942
3943 * cli/cli-decode.h (help_cmd_list): Remove declaration.
3944 * cli/cli-decode.c (help_cmd_list): Declare as static,
3945 remove prefix argument, use bool for recurse arg, rework to show the aliases of
3946 a command together with the command.
3947 (fput_command_name_styled, fput_command_names_styled): New functions.
3948 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
3949 fput_command_name_styled.
3950 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
3951 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
3952
3953 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3954
3955 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
3956 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
3957 * command.h (cmd_show_list): Likewise.
3958 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
3959 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
3960
3961 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3962
3963 * unittests/command-def-selftests.c (traverse_command_structure):
3964 Verify all commands of a list have the same prefix command and
3965 that only the top cmdlist commands have a null prefix.
3966
3967 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3968
3969 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
3970 as prefix, not one of its aliases.
3971 (set_cmd_prefix): Remove.
3972 (do_add_cmd): Centralize the setting of the prefix of a command, when
3973 command is defined after its full chain of prefix commands.
3974 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
3975 (add_setshow_cmd_full): Likewise.
3976 (update_prefix_field_of_prefixed_commands): New function.
3977 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
3978 update_prefix_field_of_prefixed_commands.
3979 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
3980 addresses of remote_set_cmdlist and remote_show_cmdlist given
3981 as argument, not the address of an argument.
3982 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
3983 * gdb/remote.c (_initialize_remote): Likewise.
3984
3985 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3986
3987 * cli/cli-cmds.c (alias_command): Check for an existing alias
3988 using lookup_cmd_composition, as valid_command_p is too strict
3989 and forbids aliases that are the prefix of an existing alias
3990 or command.
3991 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
3992 command is properly recognised as a valid command.
3993
3994 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3995
3996 * unittests/help-doc-selftests.c: Rename to
3997 unittests/command-def-selftests.c
3998 * unittests/command-def-selftests.c (help_doc_tests): Update some
3999 comments.
4000 (command_structure_tests, traverse_command_structure): New namespace
4001 and function.
4002 (command_structure_invariants_tests): New function.
4003 (_initialize_command_def_selftests) Renamed from
4004 _initialize_help_doc_selftests, register command_structure_invariants
4005 selftest.
4006
4007 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4008
4009 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
4010 an alias of 'show'.
4011
4012 2020-05-15 Joel Brobecker <brobecker@adacore.com>
4013
4014 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
4015 ada_is_fixed_point_type. Update all callers.
4016 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
4017 all callers.
4018 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
4019 Update all callers.
4020 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
4021 print_fixed_point_type. Update all callers.
4022 * ada-valprint.c (ada_value_print_num): Replace call to
4023 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
4024
4025 2020-05-14 Kevin Buettner <kevinb@redhat.com>
4026
4027 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
4028 processors.
4029 (cpu_supports_bts): Add CV_AMD case.
4030
4031 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
4032 Simon Marchi <simon.marchi@efficios.com>
4033
4034 * infrun.c (stop_all_threads): Collect multiple wait events at
4035 each pass.
4036
4037 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
4038
4039 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
4040 type::code instead.
4041
4042 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
4043
4044 * gdbtypes.h (struct type) <code, set_code>: New methods.
4045 (TYPE_CODE): Use type::code. Change all call sites used to set
4046 the code to use type::set_code instead.
4047
4048 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4049 Tom de Vries <tdevries@suse.de>
4050 Pedro Alves <palves@redhat.com>
4051
4052 PR threads/25478
4053 * infrun.c (stop_all_threads): Do NOT ignore
4054 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
4055 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
4056 received.
4057 (handle_no_resumed): Remove code handling a live inferior with no
4058 threads.
4059 * remote.c (has_single_non_exited_thread): New.
4060 (remote_target::update_thread_list): Do not delete a thread if is
4061 the last thread of the process.
4062 * thread.c (thread_select): Call delete_exited_threads instead of
4063 prune_threads.
4064
4065 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4066
4067 * infrun.c (stop_all_threads): Enable/disable thread events of all
4068 targets. Move a debug message denoting the end of the function
4069 into the SCOPED_EXIT block.
4070
4071 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4072
4073 * process-stratum-target.h: Include <set>.
4074 (all_non_exited_process_targets, switch_to_target_no_thread): New
4075 function declarations.
4076 * process-stratum-target.c (all_non_exited_process_targets)
4077 (switch_to_target_no_thread): New function implementations.
4078
4079 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4080
4081 * infrun.c (handle_inferior_event): Extract out a piece of code
4082 into...
4083 (mark_non_executing_threads): ...this new function.
4084
4085 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4086
4087 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
4088 use.
4089
4090 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4091
4092 * regcache.c (regcache_read_pc_protected): New function
4093 implementation that returns 0 if the PC cannot read via
4094 'regcache_read_pc'.
4095 * infrun.c (proceed): Call 'regcache_read_pc_protected'
4096 instead of 'regcache_read_pc'.
4097 (keep_going_pass_signal): Ditto.
4098
4099 2020-05-13 Tom Tromey <tromey@adacore.com>
4100
4101 * ada-lang.c (align_value): Remove.
4102 (ada_template_to_fixed_record_type_1): Use align_up.
4103
4104 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4105
4106 * async-event.c: Update the copyright year.
4107 * async-event.h: Update the copyright year.
4108
4109 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
4110
4111 * objfiles.h (is_addr_in_objfile,
4112 shared_objfile_contains_address_p): Return bool.
4113 * objfile.c (is_addr_in_objfile,
4114 shared_objfile_contains_address_p): Return bool.
4115
4116 2020-05-11 Tom Tromey <tromey@adacore.com>
4117
4118 * cli/cli-cmds.c (info_command): Restore.
4119 (_initialize_cli_cmds): Use add_prefix_command for "info".
4120 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
4121
4122 2020-05-11 Tom Tromey <tromey@adacore.com>
4123
4124 * ada-lang.c (ada_value_primitive_field): Now public.
4125 * ada-lang.h (ada_value_primitive_field): Declare.
4126 * ada-valprint.c (print_field_values): Use
4127 ada_value_primitive_field for wrapper fields.
4128
4129 2020-05-11 Tom de Vries <tdevries@suse.de>
4130
4131 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
4132 MODULE_DOMAIN.
4133
4134 2020-05-11 Tom de Vries <tdevries@suse.de>
4135
4136 PR symtab/25941
4137 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
4138 with length 0, if not gdb-produced.
4139 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
4140
4141 2020-05-09 Tom de Vries <tdevries@suse.de>
4142
4143 PR gdb/25955
4144 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
4145 calculation.
4146
4147 2020-05-09 Tom Tromey <tom@tromey.com>
4148
4149 * top.c (server_command): Now bool.
4150 * top.h (server_command): Now bool.
4151
4152 2020-05-08 Tom Tromey <tromey@adacore.com>
4153
4154 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
4155 already being processed.
4156
4157 2020-05-08 Tom Tromey <tom@tromey.com>
4158
4159 * printcmd.c (struct display) <next>: Remove.
4160 <display>: New constructor.
4161 <exp_string>: Now a std::string.
4162 <enabled_p>: Now a bool.
4163 (display_number): Move definition earlier.
4164 (displays): Rename from display_chain. Now a std::vector.
4165 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
4166 (display_command): Update.
4167 (do_one_display, disable_display)
4168 (enable_disable_display_command, do_enable_disable_display):
4169 Update.
4170 (free_display): Remove.
4171 (clear_displays): Rewrite.
4172 (delete_display): Update.
4173 (map_display_numbers): Use function_view. Remove "data"
4174 parameter. Update.
4175 (do_delete_display): Remove.
4176 (undisplay_command): Update.
4177 (do_one_display, do_displays, disable_display)
4178 (info_display_command): Update.
4179 (do_enable_disable_display): Remove.
4180 (enable_disable_display_command)
4181 (clear_dangling_display_expressions): Update.
4182
4183 2020-05-08 Tom Tromey <tom@tromey.com>
4184
4185 * symtab.c (set_symbol_cache_size)
4186 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
4187 (maintenance_print_symbol_cache_statistics): Update.
4188 * symmisc.c (print_symbol_bcache_statistics)
4189 (print_objfile_statistics, maintenance_print_objfiles)
4190 (maintenance_info_symtabs, maintenance_check_symtabs)
4191 (maintenance_expand_symtabs, maintenance_info_line_tables):
4192 Update.
4193 * symfile-debug.c (set_debug_symfile): Update.
4194 * source.c (forget_cached_source_info): Update.
4195 * python/python.c (gdbpy_progspaces): Update.
4196 * psymtab.c (maintenance_info_psymtabs): Update.
4197 * probe.c (parse_probes): Update.
4198 * linespec.c (iterate_over_all_matching_symtabs)
4199 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
4200 * guile/scm-progspace.c (gdbscm_progspaces): Update.
4201 * exec.c (exec_target::close): Update.
4202 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
4203 * breakpoint.c (print_one_breakpoint_location)
4204 (create_longjmp_master_breakpoint)
4205 (create_std_terminate_master_breakpoint): Update.
4206 * progspace.c (program_spaces): Now a std::vector.
4207 (maybe_new_address_space): Update.
4208 (add_program_space): Remove.
4209 (program_space::program_space): Update.
4210 (remove_program_space): Update.
4211 (number_of_program_spaces): Remove.
4212 (print_program_space, update_address_spaces): Update.
4213 * progspace.h (program_spaces): Change type.
4214 (ALL_PSPACES): Remove.
4215 (number_of_program_spaces): Don't declare.
4216 (struct program_space) <next>: Remove.
4217
4218 2020-05-08 Tom Tromey <tom@tromey.com>
4219
4220 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
4221 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
4222 (enable_break): Update.
4223 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
4224 (frv_fdpic_find_canonical_descriptor): Update.
4225 (frv_fetch_objfile_link_map): Update.
4226 * progspace.c (program_space::free_all_objfiles): Update.
4227 (program_space::solibs): New method.
4228 * progspace.h (struct program_space) <solibs>: New method.
4229 * solist.h (master_so_list): Don't declare.
4230 (ALL_SO_LIBS): Remove.
4231 * solib.h (so_list_head): Remove.
4232 (update_solib_list): Update comment.
4233 * solib.c (master_so_list): Remove.
4234 (solib_used, update_solib_list, solib_add)
4235 (info_sharedlibrary_command, clear_solib)
4236 (reload_shared_libraries_1, remove_user_added_objfile): Update.
4237
4238 2020-05-08 Tom Tromey <tom@tromey.com>
4239
4240 * extension.c (extension_languages): Now a std::array.
4241 (ALL_EXTENSION_LANGUAGES): Remove.
4242 (get_ext_lang_defn, get_ext_lang_of_file)
4243 (eval_ext_lang_from_control_command): Update.
4244 (finish_ext_lang_initialization)
4245 (auto_load_ext_lang_scripts_for_objfile)
4246 (ext_lang_type_printers::ext_lang_type_printers)
4247 (apply_ext_lang_type_printers)
4248 (ext_lang_type_printers::~ext_lang_type_printers)
4249 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
4250 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
4251 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
4252 (get_matching_xmethod_workers, ext_lang_colorize)
4253 (ext_lang_before_prompt): Update.
4254 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
4255
4256 2020-05-08 Tom Tromey <tom@tromey.com>
4257
4258 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
4259 overload.
4260 <swap_string, m_string>: Remove.
4261 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
4262 Update.
4263 * stabsread.c (define_symbol, read_type): Update.
4264 * linespec.c (find_linespec_symbols): Update.
4265 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
4266 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
4267 * dbxread.c (read_dbx_symtab): Update.
4268 * cp-support.h (cp_canonicalize_string_full)
4269 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
4270 Return unique_xmalloc_ptr.
4271 * cp-support.c (inspect_type): Update.
4272 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
4273 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
4274 Likewise.
4275 * c-typeprint.c (print_name_maybe_canonical): Update.
4276 * break-catch-throw.c (check_status_exception_catchpoint):
4277 Update.
4278
4279 2020-05-08 Tom de Vries <tdevries@suse.de>
4280
4281 * infrun.c (follow_fork): Copy current_line and current_symtab to
4282 child thread.
4283
4284 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4285
4286 * async-event.c (struct async_signal_handler, struct
4287 async_event_handler): Reformat, remove typedef.
4288
4289 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4290
4291 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
4292 access thistype->main_type->dyn_prop_list directly.
4293
4294 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4295
4296 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
4297 (remove_dyn_prop): Remove. Update all users to use
4298 type::remove_dyn_prop.
4299 * gdbtypes.c (remove_dyn_prop): Rename to...
4300 (type::remove_dyn_prop): ... this.
4301
4302 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
4303
4304 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
4305 (add_dyn_prop): Remove. Update all users to use
4306 type::add_dyn_prop.
4307 * gdbtypes.c (add_dyn_prop): Rename to...
4308 (type::add_dyn_prop): ... this.
4309
4310 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4311
4312 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
4313 (get_dyn_prop): Remove. Update all users to use
4314 type::dyn_prop.
4315 * gdbtypes.c (get_dyn_prop): Rename to...
4316 (type::dyn_prop): ... this.
4317
4318 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
4319
4320 * gdbtypes.h (struct main_type) <flag_static>: Remove.
4321
4322 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
4323
4324 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
4325 instruction, skip it if it's there.
4326
4327 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
4328
4329 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
4330
4331 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
4332
4333 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
4334 * gdbtypes.c (recursive_dump_type): Remove use of
4335 TYPE_INCOMPLETE.
4336
4337 2020-05-03 Tom Tromey <tom@tromey.com>
4338
4339 * breakpoint.c (catch_command, tcatch_command): Remove.
4340 (_initialize_breakpoint): Use add_basic_prefix_cmd,
4341 add_show_prefix_cmd.
4342 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
4343 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4344 Remove.
4345 (add_internal_problem_command): Use add_basic_prefix_cmd,
4346 add_show_prefix_cmd.
4347 * mips-tdep.c (set_mipsfpu_command): Remove.
4348 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
4349 * dwarf2/index-cache.c (set_index_cache_command): Remove.
4350 (_initialize_index_cache): Use add_basic_prefix_cmd.
4351 * memattr.c (dummy_cmd): Remove.
4352 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
4353 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
4354 (_initialize_tui_win): Use add_basic_prefix_cmd,
4355 add_show_prefix_cmd.
4356 * cli/cli-logging.c (set_logging_command): Remove.
4357 (_initialize_cli_logging): Use add_basic_prefix_cmd,
4358 add_show_prefix_cmd.
4359 (show_logging_command): Remove.
4360 * target.c (target_command): Remove.
4361 (add_target): Use add_basic_prefix_cmd.
4362
4363 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
4364
4365 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
4366
4367 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4368
4369 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
4370 info_command.
4371
4372 2020-04-30 Kamil Rytarowski <n54@gmx.com>
4373
4374 * nbsd-nat.c (nbsd_enable_proc_events)
4375 (nbsd_nat_target::post_startup_inferior): Add.
4376 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
4377 (nbsd_nat_target::update_thread_list): Rewrite.
4378 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
4379 "PTRACE_LWP_CREATE".
4380 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
4381
4382 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4383
4384 * stack.c (_initialize_stack): Remove duplicated creation
4385 of "frame" command and "f" alias.
4386
4387 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
4388
4389 PR gdb/18706
4390 * gdbtypes.c (check_typedef): Calculate size of array of
4391 stubbed type.
4392
4393 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
4394
4395 PR gdb/15559
4396 * i386-tdep.c (i386_push_dummy_call): Call
4397 i386_thiscall_push_dummy_call.
4398 (i386_thiscall_push_dummy_call): New function.
4399 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
4400 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
4401 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
4402
4403 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4404
4405 * gdbarch.sh (do_read): Add shellcheck disable directive for
4406 warning SC2162.
4407
4408 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4409
4410 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
4411 "referenced but not assigned" warning.
4412
4413 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4414
4415 * gdbarch.sh: Remove code that sets fallbackdefault.
4416
4417 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4418
4419 * gdbarch.sh: Use shell operators && and || instead of
4420 -a and -o.
4421
4422 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4423
4424 * gdbarch.sh: Use $(...) instead of `...`.
4425
4426 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4427
4428 * gdbarch.sh: Use double quotes around variables.
4429
4430 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
4431
4432 * gdbarch.sh: Use %s with printf, instead of variables in the
4433 format string.
4434
4435 2020-04-29 Tom Tromey <tromey@adacore.com>
4436
4437 PR ada/25875:
4438 * dwarf2/read.c (update_enumeration_type_from_children): Compute
4439 type fields here.
4440 (read_enumeration_type): Call
4441 update_enumeration_type_from_children later. Update comments.
4442 (process_enumeration_scope): Don't create type fields.
4443
4444 2020-04-29 Kamil Rytarowski <n54@gmx.com>
4445
4446 * nbsd-tdep.c: Include "xml-syscall.h".
4447 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
4448
4449 2020-04-29 Kamil Rytarowski <n54@gmx.com>
4450
4451 * nbsd-nat.c: Include "sys/wait.h".
4452 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
4453 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
4454 (nbsd_nat_target::remove_exec_catchpoint)
4455 (nbsd_nat_target::set_syscall_catchpoint): Add.
4456 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
4457 (nbsd_nat_target::insert_exec_catchpoint)
4458 (nbsd_nat_target::remove_exec_catchpoint)
4459 (nbsd_nat_target::set_syscall_catchpoint): Add.
4460 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
4461 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
4462 `nbsd_get_syscall_number'.
4463
4464 2020-04-29 Tom Tromey <tom@tromey.com>
4465
4466 * stack.c (print_block_frame_labels): Remove.
4467
4468 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
4469
4470 PR gdb/17320
4471 * ada-valprint.c (val_print_packed_array_elements): Move array
4472 end bracket to new line.
4473 (ada_val_print_string): Remove extra spaces before first array
4474 element.
4475 * c-valprint.c (c_value_print_array): Likewise.
4476 * m2-valprint.c (m2_print_array_contents): Likewise.
4477 (m2_value_print_inner): Likewise.
4478 * p-valprint.c (pascal_value_print_inner): Likewise.
4479 * valprint.c (generic_val_print_array): Likewise.
4480 (value_print_array_elements): Move first array element and array
4481 end bracket to new line.
4482
4483 2020-04-29 Tom de Vries <tdevries@suse.de>
4484
4485 PR symtab/25889
4486 * linespec.c (find_method): Fix ix calculation.
4487
4488 2020-04-28 Kamil Rytarowski <n54@gmx.com>
4489
4490 * syscalls/update-netbsd.sh: New file.
4491 * syscalls/netbsd.xml: Regenerate.
4492 * data-directory/Makefile.in: Register `netbsd.xml' in
4493 `SYSCALLS_FILES'.
4494
4495 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
4496
4497 * syscalls/update-freebsd.sh: Add double quotes.
4498
4499 2020-04-28 Tom Tromey <tom@tromey.com>
4500
4501 * NEWS: Update.
4502 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
4503 (cmdpy_init): Allow class_tui.
4504
4505 2020-04-28 Mark Williams <mark@myosotissp.com>
4506
4507 PR gdb/24480
4508 * dwarf2read.c: Add missing assingments to list_in_scope when
4509 start_symtab was already called.
4510
4511 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
4512
4513 PR gdb/25881
4514 * dwarf2/read.c (offset_map_type): Use
4515 gdb:hash_enum<sect_offset> as hash function.
4516
4517 2020-04-28 Tom de Vries <tdevries@suse.de>
4518
4519 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
4520 with DW_AT_signature.
4521
4522 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
4523
4524 * configure.ac: Remove check for fs_base/gs_base in
4525 user_regs_struct.
4526 * configure: Re-generate.
4527 * config.in: Re-generate.
4528 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
4529 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
4530 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
4531
4532 2020-04-27 Luis Machado <luis.machado@linaro.org>
4533
4534 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
4535 problematic inline frame unwinding situation.
4536 * frame.c (frame_id_computed_p): New function.
4537 * frame.h (frame_id_computed_p): New prototype.
4538
4539 2020-04-26 Tom Tromey <tom@tromey.com>
4540
4541 * command.h (enum command_class) <class_pseudo>: Remove.
4542
4543 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4544
4545 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
4546 and whitespace.
4547
4548 2020-04-25 Kamil Rytarowski <n54@gmx.com>
4549
4550 * inf-ptrace.c (inf_ptrace_target::wait): Remove
4551 `PT_GET_PROCESS_STATE' block.
4552
4553 2020-04-24 Tom Tromey <tom@tromey.com>
4554
4555 * symtab.h (symbol_get_demangled_name): Don't declare.
4556 * symtab.c (symbol_get_demangled_name): Remove.
4557 (general_symbol_info::natural_name)
4558 (general_symbol_info::demangled_name): Update.
4559
4560 2020-04-24 Tom Tromey <tom@tromey.com>
4561
4562 PR rust/25025:
4563 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
4564
4565 2020-04-24 Tom Tromey <tom@tromey.com>
4566
4567 PR symtab/12707:
4568 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
4569 exists.
4570 (new_symbol): Likewise.
4571 * compile/compile-object-load.c (get_out_value_type): Use
4572 symbol_matches_search_name.
4573
4574 2020-04-24 Tom Tromey <tom@tromey.com>
4575
4576 * dwarf2/read.c (add_partial_symbol): Do not call
4577 compute_and_set_names.
4578
4579 2020-04-24 Tom Tromey <tom@tromey.com>
4580
4581 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
4582 overload.
4583
4584 2020-04-24 Tom Tromey <tom@tromey.com>
4585
4586 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
4587 (add_psymbol_to_list): New overload. Make old overload call new
4588 one.
4589 * psympriv.h (add_psymbol_to_list): New overload.
4590
4591 2020-04-24 Tom Tromey <tom@tromey.com>
4592
4593 * dwarf2/read.c (partial_die_info::read) <case
4594 DW_AT_linkage_name>: Use value_as_string.
4595 (dwarf2_string_attr): Use value_as_string.
4596 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
4597 method.
4598 * dwarf2/attribute.c (attribute::value_as_string): New method.
4599
4600 2020-04-24 Tom Tromey <tom@tromey.com>
4601
4602 * symtab.c (general_symbol_info::natural_name)
4603 (general_symbol_info::demangled_name): Check for language_rust.
4604
4605 2020-04-24 Tom Tromey <tom@tromey.com>
4606
4607 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
4608 (dwarf2_physname): ... from here.
4609 (partial_die_info::read): Add Rust "{" hack.
4610
4611 2020-04-24 Tom Tromey <tom@tromey.com>
4612
4613 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
4614 method.
4615 (symbol_set_demangled_name): Don't declare.
4616 * symtab.c (general_symbol_info::set_demangled_name): Rename from
4617 symbol_set_demangled_name.
4618 (general_symbol_info::set_language)
4619 (general_symbol_info::compute_and_set_names): Update.
4620 * minsyms.c (minimal_symbol_reader::install): Update.
4621 * dwarf2/read.c (new_symbol): Update.
4622
4623 2020-04-24 Tom Tromey <tromey@adacore.com>
4624
4625 PR python/23662:
4626 * python/py-type.c (convert_field): Handle
4627 FIELD_LOC_KIND_DWARF_BLOCK.
4628 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
4629 (typy_get_dynamic): Nw function.
4630 (type_object_getset): Add "dynamic".
4631 * NEWS: Add entry.
4632
4633 2020-04-24 Tom Tromey <tromey@adacore.com>
4634
4635 * ada-typeprint.c (print_choices, print_variant_part)
4636 (print_record_field_types_dynamic): New functions.
4637 (print_record_field_types): Use print_record_field_types_dynamic.
4638
4639 2020-04-24 Tom Tromey <tromey@adacore.com>
4640
4641 * dwarf2/read.c (handle_data_member_location): New overload.
4642 (dwarf2_add_field): Use it.
4643 (decode_locdesc): Add "computed" parameter. Update comment.
4644 * gdbtypes.c (is_dynamic_type_internal): Also look for
4645 FIELD_LOC_KIND_DWARF_BLOCK.
4646 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
4647 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
4648 virtual base classes.
4649 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
4650 FIELD_LOC_KIND_DWARF_BLOCK.
4651
4652 2020-04-24 Tom Tromey <tromey@adacore.com>
4653
4654 * dwarf2/read.c (read_structure_type): Handle dynamic length.
4655 * gdbtypes.c (is_dynamic_type_internal): Check
4656 TYPE_HAS_DYNAMIC_LENGTH.
4657 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
4658 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
4659 New macros.
4660 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
4661 constant.
4662
4663 2020-04-24 Tom Tromey <tromey@adacore.com>
4664
4665 * dwarf2/read.c (struct variant_field): Rewrite.
4666 (struct variant_part_builder): New.
4667 (struct nextfield): Remove "variant" field. Add "offset".
4668 (struct field_info): Add "current_variant_part" and
4669 "variant_parts".
4670 (alloc_discriminant_info): Remove.
4671 (alloc_rust_variant): New function.
4672 (quirk_rust_enum): Update.
4673 (dwarf2_add_field): Set "offset" member. Don't handle
4674 DW_TAG_variant_part.
4675 (offset_map_type): New typedef.
4676 (convert_variant_range, create_one_variant)
4677 (create_one_variant_part, create_variant_parts)
4678 (add_variant_property): New functions.
4679 (dwarf2_attach_fields_to_type): Call add_variant_property.
4680 (read_structure_type): Don't handle DW_TAG_variant_part.
4681 (handle_variant_part, handle_variant): New functions.
4682 (handle_struct_member_die): Use them.
4683 (process_structure_scope): Don't handle variant parts.
4684 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
4685 (struct discriminant_info): Remove.
4686 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
4687 (struct main_type) <flag_discriminated_union>: Remove.
4688 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
4689 (rust_enum_variant): Return int. Remove "contents". Rewrite.
4690 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
4691 Update.
4692 * valops.c (value_union_variant): Remove.
4693 * value.h (value_union_variant): Don't declare.
4694
4695 2020-04-24 Tom Tromey <tromey@adacore.com>
4696
4697 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
4698 (ada_value_primitive_packed_val): Update.
4699 * ada-valprint.c (ada_value_print_1): Update.
4700 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
4701 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
4702 just an address. Use evaluate_for_locexpr_baton.
4703 (dwarf2_evaluate_property): Update.
4704 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
4705 array_view.
4706 * findvar.c (default_read_var_value): Update.
4707 * gdbtypes.c (compute_variant_fields_inner)
4708 (resolve_dynamic_type_internal): Update.
4709 (resolve_dynamic_type): Change type of valaddr parameter.
4710 * gdbtypes.h (resolve_dynamic_type): Update.
4711 * valarith.c (value_subscripted_rvalue): Update.
4712 * value.c (value_from_contents_and_address): Update.
4713
4714 2020-04-24 Tom Tromey <tromey@adacore.com>
4715
4716 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
4717 "push_initial_value" parameter.
4718 (dwarf2_evaluate_property): Likewise.
4719 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
4720
4721 2020-04-24 Tom Tromey <tromey@adacore.com>
4722
4723 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
4724 (variant::matches, compute_variant_fields_recurse)
4725 (compute_variant_fields_inner, compute_variant_fields): New
4726 functions.
4727 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
4728 Use resolved_type after type is made.
4729 (operator==): Add new cases.
4730 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
4731 (struct discriminant_range, struct variant, struct variant_part):
4732 New.
4733 (union dynamic_prop_data) <variant_parts, original_type>: New
4734 members.
4735 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
4736 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
4737 constants.
4738 * value.c (unpack_bits_as_long): Now public.
4739 * value.h (unpack_bits_as_long): Declare.
4740
4741 2020-04-24 Tom Tromey <tromey@adacore.com>
4742
4743 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
4744 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
4745
4746 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
4747
4748 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
4749
4750 2020-04-24 Kamil Rytarowski <n54@gmx.com>
4751
4752 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
4753 (remove_fork_catchpoint, post_startup_inferior)
4754 (post_attach): Move...
4755 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
4756 (remove_fork_catchpoint, post_startup_inferior)
4757 (post_attach): ...here.
4758 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
4759 (remove_fork_catchpoint, post_startup_inferior)
4760 (post_attach): Move...
4761 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
4762 (remove_fork_catchpoint, post_startup_inferior)
4763 (post_attach): ...here.
4764
4765 2020-04-24 Tom Tromey <tromey@adacore.com>
4766
4767 * nat/windows-nat.h (struct windows_thread_info)
4768 <pc_adjusted>: New member.
4769 * windows-nat.c (windows_fetch_one_register): Check
4770 pc_adjusted.
4771 (windows_nat_target::get_windows_debug_event)
4772 (windows_nat_target::wait): Set pc_adjusted.
4773
4774 2020-04-24 Tom de Vries <tdevries@suse.de>
4775
4776 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
4777 Run gdb-add-index inside temp dir.
4778
4779 2020-04-23 Tom Tromey <tromey@adacore.com>
4780
4781 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
4782 in loop.
4783
4784 2020-04-23 Luis Machado <luis.machado@linaro.org>
4785
4786 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
4787 get_frame_register instead of gdbarch_unwind_pc.
4788
4789 2020-04-23 Tom de Vries <tdevries@suse.de>
4790
4791 * symtab.c (lookup_global_symbol): Prefer def over decl.
4792
4793 2020-04-23 Tom de Vries <tdevries@suse.de>
4794
4795 PR symtab/25807
4796 * block.c (best_symbol, better_symbol): Promote to external.
4797 * block.h (best_symbol, better_symbol): Declare.
4798 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
4799 decl.
4800
4801 2020-04-23 Tom Tromey <tromey@adacore.com>
4802
4803 PR ada/25837:
4804 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
4805 "const char *", not a "const std::string &".
4806 <name_and_matcher::operator==>: Update.
4807 * unittests/lookup_name_info-selftests.c: Change type of
4808 "result".
4809
4810 2020-04-23 Tom Tromey <tom@tromey.com>
4811
4812 * inferior.h (iterate_over_inferiors): Don't declare.
4813 * inferior.c (iterate_over_inferiors): Remove.
4814 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
4815 Remove.
4816 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
4817 use iterate_over_inferiors.
4818 (darwin_resume_inferior_it)
4819 (struct resume_inferior_threads_param)
4820 (darwin_resume_inferior_threads_it): Remove.
4821 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
4822
4823 2020-04-23 Tom de Vries <tdevries@suse.de>
4824
4825 * blockframe.c (find_pc_partial_function): Use
4826 find_pc_sect_compunit_symtab rather than
4827 objfile->sf->qf->find_pc_sect_compunit_symtab.
4828
4829 2020-04-22 Tom de Vries <tdevries@suse.de>
4830
4831 PR symtab/25764
4832 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
4833 in psymtabs.
4834
4835 2020-04-22 Tom de Vries <tdevries@suse.de>
4836
4837 PR symtab/25801
4838 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
4839 symtabs.
4840
4841 2020-04-22 Tom de Vries <tdevries@suse.de>
4842
4843 PR symtab/25700
4844 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
4845 CU if already created.
4846
4847 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4848
4849 * infrun.c (displaced_step_fixup): Switch to the event_thread
4850 before calling displaced_step_restore, not after.
4851
4852 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4853
4854 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
4855 its inferior is not recorded by us.
4856 (record_btrace_target_open): Replace call to
4857 all_non_exited_threads () with call to current_inferior
4858 ()->non_exited_threads ().
4859 (record_btrace_target::stop_recording): Likewise.
4860 (record_btrace_target::close): Likewise.
4861 (record_btrace_target::wait): Likewise.
4862 (record_btrace_target::record_stop_replaying): Likewise.
4863
4864 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4865
4866 * btrace.c (btrace_enable): Throw an error on double enables and
4867 when enabling recording fails.
4868 (btrace_disable): Throw an error if the thread is not recorded.
4869
4870 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4871
4872 * record-btrace.c (record_btrace_target::fetch_registers): Forward
4873 request if we do not have a thread_info.
4874
4875 2020-04-21 Tom de Vries <tdevries@suse.de>
4876
4877 PR gdb/25471
4878 * thread.c
4879 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
4880 exception in get_frame_id.
4881
4882 2020-04-20 Tom Tromey <tromey@adacore.com>
4883
4884 * python/python.c (struct gdbpy_event): Mark move constructor as
4885 noexcept.
4886 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
4887 constructor as noexcept.
4888 * completer.h (struct completion_result): Mark move constructor as
4889 noexcept.
4890 * completer.c (completion_result::completion_result): Use
4891 initialization style. Don't call reset_match_list.
4892
4893 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
4894
4895 * MAINTAINERS (Write After Approval): Add myself.
4896
4897 2020-04-18 Tom Tromey <tom@tromey.com>
4898
4899 * windows-tdep.c (init_w32_command_list)
4900 (w32_prefix_command_valid): Restore.
4901 (_initialize_windows_tdep): Call init_w32_command_list.
4902
4903 2020-04-18 Tom Tromey <tom@tromey.com>
4904
4905 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
4906 * value.c (value_fn_field): Update.
4907 * valops.c (find_function_in_inferior)
4908 (value_allocate_space_in_inferior): Update.
4909 * tui/tui-winsource.c (tui_update_source_windows_with_line):
4910 Update.
4911 * tui/tui-source.c (tui_source_window::set_contents): Update.
4912 * symtab.c (lookup_global_or_static_symbol)
4913 (find_function_start_sal_1, skip_prologue_sal)
4914 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
4915 * symmisc.c (dump_msymbols, dump_symtab_1)
4916 (maintenance_print_one_line_table): Update.
4917 * symfile.c (init_entry_point_info, section_is_mapped)
4918 (list_overlays_command, simple_read_overlay_table)
4919 (simple_overlay_update_1): Update.
4920 * stap-probe.c (handle_stap_probe): Update.
4921 * stabsread.c (dbx_init_float_type, define_symbol)
4922 (read_one_struct_field, read_enum_type, read_range_type): Update.
4923 * source.c (info_line_command): Update.
4924 * python/python.c (gdbpy_source_objfile_script)
4925 (gdbpy_execute_objfile_script): Update.
4926 * python/py-type.c (save_objfile_types): Update.
4927 * python/py-objfile.c (py_free_objfile): Update.
4928 * python/py-inferior.c (python_new_objfile): Update.
4929 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
4930 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
4931 (maintenance_check_psymtabs): Update.
4932 * printcmd.c (info_address_command): Update.
4933 * objfiles.h (struct objfile) <arch>: New method, from
4934 get_objfile_arch.
4935 (get_objfile_arch): Don't declare.
4936 * objfiles.c (get_objfile_arch): Remove.
4937 (filter_overlapping_sections): Update.
4938 * minsyms.c (msymbol_is_function): Update.
4939 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
4940 (output_nondebug_symbol): Update.
4941 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
4942 (mdebug_expand_psymtab): Update.
4943 * machoread.c (macho_add_oso_symfile): Update.
4944 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
4945 Update.
4946 * linux-fork.c (checkpoint_command): Update.
4947 * linespec.c (convert_linespec_to_sals): Update.
4948 * jit.c (finalize_symtab): Update.
4949 * infrun.c (insert_exception_resume_from_probe): Update.
4950 * ia64-tdep.c (ia64_find_unwind_table): Update.
4951 * hppa-tdep.c (internalize_unwinds): Update.
4952 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
4953 Update.
4954 * gcore.c (call_target_sbrk): Update.
4955 * elfread.c (record_minimal_symbol, elf_symtab_read)
4956 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
4957 (elf_gnu_ifunc_resolve_by_got): Update.
4958 * dwarf2/read.c (create_addrmap_from_index)
4959 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
4960 (read_debug_names_from_section)
4961 (process_psymtab_comp_unit_reader, add_partial_symbol)
4962 (add_partial_subprogram, process_full_comp_unit)
4963 (read_file_scope, read_func_scope, read_lexical_block_scope)
4964 (read_call_site_scope, dwarf2_ranges_read)
4965 (dwarf2_record_block_ranges, dwarf2_add_field)
4966 (mark_common_block_symbol_computed, read_tag_pointer_type)
4967 (read_tag_string_type, dwarf2_init_float_type)
4968 (dwarf2_init_complex_target_type, read_base_type)
4969 (partial_die_info::read, partial_die_info::read)
4970 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
4971 (dwarf2_fetch_die_loc_sect_off): Update.
4972 * dwarf2/loc.c (dwarf2_find_location_expression)
4973 (class dwarf_evaluate_loc_desc, rw_pieced_value)
4974 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
4975 (dwarf2_loc_desc_get_symbol_read_needs)
4976 (locexpr_describe_location_piece, locexpr_describe_location_1)
4977 (loclist_describe_location): Update.
4978 * dwarf2/index-write.c (write_debug_names): Update.
4979 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
4980 * dtrace-probe.c (dtrace_process_dof): Update.
4981 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
4982 (process_one_symbol): Update.
4983 * ctfread.c (ctf_init_float_type, read_base_type): Update.
4984 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
4985 (coff_read_enum_type): Update.
4986 * cli/cli-cmds.c (edit_command, list_command): Update.
4987 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
4988 * breakpoint.c (create_overlay_event_breakpoint)
4989 (create_longjmp_master_breakpoint)
4990 (create_std_terminate_master_breakpoint)
4991 (create_exception_master_breakpoint, get_sal_arch): Update.
4992 * block.c (block_gdbarch): Update.
4993 * annotate.c (annotate_source_line): Update.
4994
4995 2020-04-17 Tom Tromey <tromey@adacore.com>
4996
4997 * auto-load.c (show_auto_load_cmd): Remove.
4998 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
4999 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
5000 (maintenance_print_arc_command): Remove.
5001 * tui/tui-win.c (tui_command): Remove.
5002 (tui_get_cmd_list): Use add_basic_prefix_cmd.
5003 * tui/tui-layout.c (tui_layout_command): Remove.
5004 (_initialize_tui_layout): Use add_basic_prefix_cmd.
5005 * python/python.c (user_set_python, user_show_python): Remove.
5006 (_initialize_python): Use add_basic_prefix_cmd,
5007 add_show_prefix_cmd.
5008 * guile/guile.c (set_guile_command, show_guile_command): Remove.
5009 (install_gdb_commands): Use add_basic_prefix_cmd,
5010 add_show_prefix_cmd.
5011 (info_guile_command): Remove.
5012 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
5013 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
5014 add_show_prefix_cmd.
5015 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
5016 Remove do_set and do_show parameters.
5017 * cli/cli-style.c (set_style, show_style): Remove.
5018 (_initialize_cli_style): Use add_basic_prefix_cmd,
5019 add_show_prefix_cmd.
5020 (cli_style_option::add_setshow_commands): Remove do_set and
5021 do_show parameters.
5022 (cli_style_option::add_setshow_commands): Use
5023 add_basic_prefix_cmd, add_show_prefix_cmd.
5024 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
5025 (set_style_name): Remove.
5026 * cli/cli-dump.c (dump_command, append_command): Remove.
5027 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5028 (tekhex_dump_command, binary_dump_command)
5029 (binary_append_command): Remove.
5030 (_initialize_cli_dump): Use add_basic_prefix_cmd.
5031 * windows-tdep.c (w32_prefix_command_valid): Remove global.
5032 (init_w32_command_list): Remove; move into ...
5033 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
5034 * valprint.c (set_print, show_print, set_print_raw)
5035 (show_print_raw): Remove.
5036 (_initialize_valprint): Use add_basic_prefix_cmd,
5037 add_show_prefix_cmd.
5038 * typeprint.c (set_print_type, show_print_type): Remove.
5039 (_initialize_typeprint): Use add_basic_prefix_cmd,
5040 add_show_prefix_cmd.
5041 * record.c (set_record_command, show_record_command): Remove.
5042 (_initialize_record): Use add_basic_prefix_cmd,
5043 add_show_prefix_cmd.
5044 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
5045 add_show_prefix_cmd.
5046 (info_command, show_command, set_debug, show_debug): Remove.
5047 * top.h (set_history, show_history): Don't declare.
5048 * top.c (set_history, show_history): Remove.
5049 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5050 (unset_tdesc_cmd): Remove.
5051 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
5052 add_show_prefix_cmd.
5053 * symtab.c (info_module_command): Remove.
5054 (_initialize_symtab): Use add_basic_prefix_cmd.
5055 * symfile.c (overlay_command): Remove.
5056 (_initialize_symfile): Use add_basic_prefix_cmd.
5057 * sparc64-tdep.c (info_adi_command): Remove.
5058 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
5059 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
5060 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
5061 add_show_prefix_cmd.
5062 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
5063 (_initialize_serial): Use add_basic_prefix_cmd,
5064 add_show_prefix_cmd.
5065 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
5066 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
5067 add_show_prefix_cmd.
5068 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
5069 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
5070 add_show_prefix_cmd.
5071 * riscv-tdep.c (show_riscv_command, set_riscv_command)
5072 (show_debug_riscv_command, set_debug_riscv_command): Remove.
5073 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
5074 add_show_prefix_cmd.
5075 * remote.c (remote_command, set_remote_cmd): Remove.
5076 (_initialize_remote): Use add_basic_prefix_cmd.
5077 * record-full.c (set_record_full_command)
5078 (show_record_full_command): Remove.
5079 (_initialize_record_full): Use add_basic_prefix_cmd,
5080 add_show_prefix_cmd.
5081 * record-btrace.c (cmd_set_record_btrace)
5082 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
5083 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
5084 (cmd_show_record_btrace_pt): Remove.
5085 (_initialize_record_btrace): Use add_basic_prefix_cmd,
5086 add_show_prefix_cmd.
5087 * ravenscar-thread.c (set_ravenscar_command)
5088 (show_ravenscar_command): Remove.
5089 (_initialize_ravenscar): Use add_basic_prefix_cmd,
5090 add_show_prefix_cmd.
5091 * mips-tdep.c (show_mips_command, set_mips_command)
5092 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
5093 add_show_prefix_cmd.
5094 * maint.c (maintenance_command, maintenance_info_command)
5095 (maintenance_check_command, maintenance_print_command)
5096 (maintenance_set_cmd, maintenance_show_cmd): Remove.
5097 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
5098 add_show_prefix_cmd.
5099 (show_per_command_cmd): Remove.
5100 * maint-test-settings.c (maintenance_set_test_settings_cmd):
5101 Remove.
5102 (maintenance_show_test_settings_cmd): Remove.
5103 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
5104 add_show_prefix_cmd.
5105 * maint-test-options.c (maintenance_test_options_command):
5106 Remove.
5107 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
5108 * macrocmd.c (macro_command): Remove
5109 (_initialize_macrocmd): Use add_basic_prefix_cmd.
5110 * language.c (set_check, show_check): Remove.
5111 (_initialize_language): Use add_basic_prefix_cmd,
5112 add_show_prefix_cmd.
5113 * infcmd.c (unset_command): Remove.
5114 (_initialize_infcmd): Use add_basic_prefix_cmd.
5115 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
5116 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
5117 add_show_prefix_cmd.
5118 * go32-nat.c (go32_info_dos_command): Remove.
5119 (_initialize_go32_nat): Use add_basic_prefix_cmd.
5120 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
5121 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
5122 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
5123 (_initialize_frame): Use add_basic_prefix_cmd,
5124 add_show_prefix_cmd.
5125 * dcache.c (set_dcache_command, show_dcache_command): Remove.
5126 (_initialize_dcache): Use add_basic_prefix_cmd,
5127 add_show_prefix_cmd.
5128 * cp-support.c (maint_cplus_command): Remove.
5129 (_initialize_cp_support): Use add_basic_prefix_cmd.
5130 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5131 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5132 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
5133 add_basic_prefix_cmd, add_show_prefix_cmd.
5134 * breakpoint.c (save_command): Remove.
5135 (_initialize_breakpoint): Use add_basic_prefix_cmd.
5136 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
5137 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
5138 add_show_prefix_cmd.
5139 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
5140 (set_ada_command, show_ada_command): Remove.
5141 (_initialize_ada_language): Use add_basic_prefix_cmd,
5142 add_show_prefix_cmd.
5143 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
5144
5145 2020-04-16 Kamil Rytarowski <n54@gmx.com>
5146
5147 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
5148 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
5149
5150 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
5151
5152 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
5153 warning messages.
5154
5155 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
5156
5157 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
5158 import table is not at beginning of .idata section.
5159
5160 2020-04-16 Pedro Alves <palves@redhat.com>
5161
5162 * inferior.c (delete_inferior): Use delete operator directly
5163 instead of delete_program_space.
5164 * progspace.c (add_program_space): New, factored out from
5165 program_space::program_space.
5166 (remove_program_space): New, factored out from
5167 delete_program_space.
5168 (program_space::program_space): Remove intro comment. Rewrite.
5169 (program_space::~program_space): Remove intro comment. Call
5170 remove_program_space.
5171 (delete_program_space): Delete.
5172 * progspace.h (program_space::program_space): Make explicit. Move
5173 intro comment here, adjusted.
5174 (program_space::~program_space): Move intro comment here,
5175 adjusted.
5176 (delete_program_space): Remove.
5177
5178 2020-04-16 Tom Tromey <tromey@adacore.com>
5179
5180 * windows-nat.c (windows_nat::handle_access_violation): New
5181 function.
5182 * nat/windows-nat.h (handle_access_violation): Declare.
5183 * nat/windows-nat.c (handle_exception): Move Cygwin code to
5184 windows-nat.c. Call handle_access_violation.
5185
5186 2020-04-16 Tom de Vries <tdevries@suse.de>
5187
5188 PR symtab/25791
5189 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
5190 CUs without psymtab.
5191
5192 2020-04-16 Kevin Buettner <kevinb@redhat.com>
5193
5194 * python/python.c (do_start_initialization): Don't call
5195 PyEval_InitThreads for Python 3.9 and beyond.
5196
5197 2020-04-15 Kamil Rytarowski <n54@gmx.com>
5198
5199 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
5200 thread functions.
5201 (obsd_nat_target::wait): Likewise.
5202
5203 2020-04-15 Tom Tromey <tromey@adacore.com>
5204
5205 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
5206 (DEBUG_EXCEPT): Use debug_printf.
5207
5208 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
5209
5210 * completer.c (class completion_tracker::completion_hash_entry)
5211 <hash_name>: New member function.
5212 (completion_tracker::discard_completions): New callback to hash a
5213 completion_hash_entry, pass this to htab_create_alloc.
5214
5215 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
5216
5217 * windows-nat.c (windows_make_so): Warn rather than stopping with
5218 an error if realpath() fails.
5219
5220 2020-04-14 Kamil Rytarowski <n54@gmx.com>
5221
5222 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
5223 (nbsd_nat_target::info_proc): Add do_status.
5224
5225 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
5226 Tom de Vries <tdevries@suse.de>
5227
5228 PR symtab/25718
5229 * psympriv.h (struct partial_symtab::read_symtab)
5230 (struct partial_symtab::expand_psymtab)
5231 (struct partial_symtab::read_dependencies): Update comments.
5232 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
5233 read_symtab for includer.
5234 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
5235 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
5236 (struct dwarf2_include_psymtab::m_readin): Remove.
5237 (struct dwarf2_include_psymtab::includer): New member function.
5238 (dwarf2_psymtab::expand_psymtab): Assert !readin.
5239
5240 2020-04-14 Tom de Vries <tdevries@suse.de>
5241
5242 PR symtab/25720
5243 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
5244 with NULL symbol_matcher and lookup_name.
5245 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
5246 and lookup_name.
5247 * dwarf2/read.c (dw2_expand_symtabs_matching)
5248 (dw2_debug_names_expand_symtabs_matching): Same.
5249 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
5250 Make lookup_name a pointer. Update comment.
5251 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
5252 lookup_name being a pointer.
5253 * symfile.c (expand_symtabs_matching): Same.
5254 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
5255 * linespec.c (iterate_over_all_matching_symtabs): Same.
5256
5257 2020-04-13 Tom Tromey <tom@tromey.com>
5258
5259 * run-on-main-thread.c: Update include.
5260 * unittests/main-thread-selftests.c: Update include.
5261 * tui/tui-win.c: Update include.
5262 * tui/tui-io.c: Update include.
5263 * tui/tui-interp.c: Update include.
5264 * tui/tui-hooks.c: Update include.
5265 * top.h: Update include.
5266 * top.c: Update include.
5267 * ser-base.c: Update include.
5268 * remote.c: Update include.
5269 * remote-notif.c: Update include.
5270 * remote-fileio.c: Update include.
5271 * record-full.c: Update include.
5272 * record-btrace.c: Update include.
5273 * python/python.c: Update include.
5274 * posix-hdep.c: Update include.
5275 * mingw-hdep.c: Update include.
5276 * mi/mi-main.c: Update include.
5277 * mi/mi-interp.c: Update include.
5278 * main.c: Update include.
5279 * linux-nat.c: Update include.
5280 * interps.c: Update include.
5281 * infrun.c: Update include.
5282 * inf-loop.c: Update include.
5283 * event-top.c: Update include.
5284 * event-loop.c: Move to ../gdbsupport/.
5285 * event-loop.h: Move to ../gdbsupport/.
5286 * async-event.h: Update include.
5287 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
5288
5289 2020-04-13 Tom Tromey <tom@tromey.com>
5290
5291 * tui/tui-win.c: Include async-event.h.
5292 * remote.c: Include async-event.h.
5293 * remote-notif.c: Include async-event.h.
5294 * record-full.c: Include async-event.h.
5295 * record-btrace.c: Include async-event.h.
5296 * infrun.c: Include async-event.h.
5297 * event-top.c: Include async-event.h.
5298 * event-loop.h: Move some declarations to async-event.h.
5299 * event-loop.c: Don't include ser-event.h or top.h. Move some
5300 code to async-event.c.
5301 * async-event.h: New file.
5302 * async-event.c: New file.
5303 * Makefile.in (COMMON_SFILES): Add async-event.c.
5304 (HFILES_NO_SRCDIR): Add async-event.h.
5305
5306 2020-04-13 Tom Tromey <tom@tromey.com>
5307
5308 * utils.c (flush_streams): New function.
5309 * event-loop.c (gdb_wait_for_event): Call flush_streams.
5310
5311 2020-04-13 Tom Tromey <tom@tromey.com>
5312
5313 * event-loop.c (handle_file_event): Use warning, not
5314 printf_unfiltered.
5315
5316 2020-04-13 Tom Tromey <tom@tromey.com>
5317
5318 * event-loop.c: Include <chrono>.
5319
5320 2020-04-13 Tom Tromey <tom@tromey.com>
5321
5322 * gdb_select.h: Move to ../gdbsupport/.
5323 * event-loop.c: Update include path.
5324 * top.c: Update include path.
5325 * ser-base.c: Update include path.
5326 * ui-file.c: Update include path.
5327 * ser-tcp.c: Update include path.
5328 * guile/scm-ports.c: Update include path.
5329 * posix-hdep.c: Update include path.
5330 * ser-unix.c: Update include path.
5331 * gdb_usleep.c: Update include path.
5332 * mingw-hdep.c: Update include path.
5333 * inflow.c: Update include path.
5334 * infrun.c: Update include path.
5335 * event-top.c: Update include path.
5336
5337 2020-04-13 Tom Tromey <tom@tromey.com>
5338
5339 * configure: Rebuild.
5340 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
5341
5342 2020-04-13 Tom Tromey <tom@tromey.com>
5343
5344 * event-loop.h (start_event_loop): Don't declare.
5345 * event-loop.c (start_event_loop): Move...
5346 * main.c (start_event_loop): ...here. Now static.
5347
5348 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
5349
5350 * MAINTAINERS: Update my email address.
5351
5352 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5353
5354 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
5355 IP_ALL.
5356
5357 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5358
5359 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
5360 (nbsd_nat_target::info_proc): Add do_cmdline.
5361
5362 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5363
5364 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
5365 (nbsd_nat_target::info_proc): Add do_cwd.
5366
5367 2020-04-12 Kamil Rytarowski <n54@gmx.com>
5368
5369 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
5370
5371 2020-04-11 Kamil Rytarowski <n54@gmx.com>
5372
5373 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
5374 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
5375 (nbsd_nat_target::info_proc): New functions.
5376 * nbsd-nat.c (kinfo_get_vmmap): New function.
5377 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
5378 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
5379 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
5380 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
5381 functions.
5382 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
5383 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
5384 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
5385 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
5386 (KINFO_VME_FLAG_GROWS_DOWN): New.
5387
5388 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
5389
5390 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
5391 bit shift.
5392
5393 2020-04-10 Tom Tromey <tromey@adacore.com>
5394
5395 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
5396
5397 2020-04-10 Tom Tromey <tromey@adacore.com>
5398
5399 * symtab.c (get_symbol_address, get_msymbol_address): Skip
5400 separate debug files.
5401
5402 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
5403
5404 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
5405 Move to...
5406 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
5407 ... here.
5408 * windows-nat.c (windows_nat_target::get_windows_debug_event):
5409 Check for STATUS_WX86_BREAKPOINT.
5410 (windows_nat_target::wait): Same.
5411
5412 2020-04-10 Tom de Vries <tdevries@suse.de>
5413
5414 PR cli/25808
5415 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
5416
5417 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5418
5419 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
5420 (Write After Approval): Remove Tom de Vries.
5421
5422 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
5423
5424 revert partially:
5425 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5426
5427 * buildsym.c (record_line): Fix undefined behavior and preserve
5428 lines at eof.
5429
5430 2020-04-09 Kamil Rytarowski <n54@gmx.com>
5431
5432 * auxv.h (svr4_auxv_parse): New.
5433 * auxv.c (default_auxv_parse): Split into default_auxv_parse
5434 and generic_auxv_parse.
5435 (svr4_auxv_parse): Add.
5436 * obsd-tdep.c: Include "auxv.h".
5437 (obsd_auxv_parse): Remove.
5438 (obsd_init_abi): Remove comment.
5439 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
5440 from `obsd_auxv_parse' to `svr4_auxv_parse'.
5441 * nbsd-tdep.c: Include "auxv.h".
5442 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
5443
5444 2020-04-08 Tom Tromey <tromey@adacore.com>
5445
5446 * nat/windows-nat.h (last_wait_event): Don't declare.
5447 (wait_for_debug_event): Update comment.
5448 * nat/windows-nat.c (last_wait_event): Now static.
5449
5450 2020-04-08 Tom Tromey <tromey@adacore.com>
5451
5452 * windows-nat.c (wait_for_debug_event): Move to
5453 nat/windows-nat.c.
5454 * nat/windows-nat.h (wait_for_debug_event): Declare.
5455 * nat/windows-nat.c (wait_for_debug_event): Move from
5456 windows-nat.c. No longer static.
5457
5458 2020-04-08 Tom Tromey <tromey@adacore.com>
5459
5460 * windows-nat.c (get_windows_debug_event): Use
5461 fetch_pending_stop.
5462 * nat/windows-nat.h (fetch_pending_stop): Declare.
5463 * nat/windows-nat.c (fetch_pending_stop): New function.
5464
5465 2020-04-08 Tom Tromey <tromey@adacore.com>
5466
5467 * windows-nat.c (windows_continue): Use matching_pending_stop and
5468 continue_last_debug_event.
5469 * nat/windows-nat.h (matching_pending_stop)
5470 (continue_last_debug_event): Declare.
5471 * nat/windows-nat.c (DEBUG_EVENTS): New define.
5472 (matching_pending_stop, continue_last_debug_event): New
5473 functions.
5474
5475 2020-04-08 Tom Tromey <tromey@adacore.com>
5476
5477 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
5478 (handle_exception_result): Move to nat/windows-nat.h.
5479 (DEBUG_EXCEPTION_SIMPLE): Remove.
5480 (windows_nat::handle_ms_vc_exception): New function.
5481 (handle_exception): Move to nat/windows-nat.c.
5482 (get_windows_debug_event): Update.
5483 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
5484 nat/windows-nat.c.
5485 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
5486 (handle_exception_result): Move from windows-nat.c.
5487 (handle_exception): Declare.
5488 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
5489 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
5490 windows-nat.c.
5491
5492 2020-04-08 Tom Tromey <tromey@adacore.com>
5493
5494 * windows-nat.c (exception_count, event_count): Remove.
5495 (handle_exception, get_windows_debug_event)
5496 (do_initial_windows_stuff): Update.
5497
5498 2020-04-08 Tom Tromey <tromey@adacore.com>
5499
5500 * windows-nat.c (windows_nat::handle_load_dll)
5501 (windows_nat::handle_unload_dll): Rename. No longer static.
5502 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
5503 Declare.
5504
5505 2020-04-08 Tom Tromey <tromey@adacore.com>
5506
5507 * complaints.h (stop_whining): Declare at top-level.
5508 (complaint): Don't declare stop_whining.
5509
5510 2020-04-08 Tom Tromey <tromey@adacore.com>
5511
5512 * windows-nat.c (windows_nat::handle_output_debug_string):
5513 Rename. No longer static.
5514 * nat/windows-nat.h (handle_output_debug_string): Declare.
5515
5516 2020-04-08 Tom Tromey <tromey@adacore.com>
5517
5518 * windows-nat.c (current_process_handle, current_process_id)
5519 (main_thread_id, last_sig, current_event, last_wait_event)
5520 (current_windows_thread, desired_stop_thread_id, pending_stops)
5521 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
5522 (display_selectors, fake_create_process)
5523 (get_windows_debug_event): Update.
5524 * nat/windows-nat.h (current_process_handle, current_process_id)
5525 (main_thread_id, last_sig, current_event, last_wait_event)
5526 (current_windows_thread, desired_stop_thread_id, pending_stops)
5527 (struct pending_stop, siginfo_er): Move from windows-nat.c.
5528 * nat/windows-nat.c (current_process_handle, current_process_id)
5529 (main_thread_id, last_sig, current_event, last_wait_event)
5530 (current_windows_thread, desired_stop_thread_id, pending_stops)
5531 (siginfo_er): New globals. Move from windows-nat.c.
5532
5533 2020-04-08 Tom Tromey <tromey@adacore.com>
5534
5535 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
5536 (handle_load_dll): Update.
5537 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
5538
5539 2020-04-08 Tom Tromey <tromey@adacore.com>
5540
5541 * windows-nat.c (enum thread_disposition_type): Move to
5542 nat/windows-nat.h.
5543 (windows_nat::thread_rec): Rename from thread_rec. No longer
5544 static.
5545 (windows_add_thread, windows_nat_target::fetch_registers)
5546 (windows_nat_target::store_registers, handle_exception)
5547 (windows_nat_target::resume, get_windows_debug_event)
5548 (windows_nat_target::get_tib_address)
5549 (windows_nat_target::thread_name)
5550 (windows_nat_target::thread_alive): Update.
5551 * nat/windows-nat.h (enum thread_disposition_type): Move from
5552 windows-nat.c.
5553 (thread_rec): Declare.
5554
5555 2020-04-08 Tom Tromey <tromey@adacore.com>
5556
5557 * windows-nat.c: Add "using namespace".
5558 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
5559 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
5560
5561 2020-04-08 Tom Tromey <tromey@adacore.com>
5562
5563 * nat/windows-nat.h (struct windows_thread_info): Declare
5564 destructor.
5565 * nat/windows-nat.c (~windows_thread_info): New.
5566
5567 2020-04-08 Tom Tromey <tromey@adacore.com>
5568
5569 PR gdb/22992
5570 * windows-nat.c (current_event): Update comment.
5571 (last_wait_event, desired_stop_thread_id): New globals.
5572 (struct pending_stop): New.
5573 (pending_stops): New global.
5574 (windows_nat_target) <stopped_by_sw_breakpoint>
5575 <supports_stopped_by_sw_breakpoint>: New methods.
5576 (windows_fetch_one_register): Add assertions. Adjust PC.
5577 (windows_continue): Handle pending stops. Suspend other threads
5578 when stepping. Use last_wait_event
5579 (wait_for_debug_event): New function.
5580 (get_windows_debug_event): Use wait_for_debug_event. Handle
5581 pending stops. Queue spurious stops.
5582 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
5583 (windows_nat_target::kill): Use wait_for_debug_event.
5584 * nat/windows-nat.h (struct windows_thread_info)
5585 <stopped_at_software_breakpoint>: New field.
5586 * nat/windows-nat.c (windows_thread_info::resume): Clear
5587 stopped_at_software_breakpoint.
5588
5589 2020-04-08 Tom Tromey <tromey@adacore.com>
5590
5591 * windows-nat.c (enum thread_disposition_type): New.
5592 (thread_rec): Replace "get_context" parameter with "disposition";
5593 change type.
5594 (windows_add_thread, windows_nat_target::fetch_registers)
5595 (windows_nat_target::store_registers, handle_exception)
5596 (windows_nat_target::resume, get_windows_debug_event)
5597 (windows_nat_target::get_tib_address)
5598 (windows_nat_target::thread_name)
5599 (windows_nat_target::thread_alive): Update.
5600
5601 2020-04-08 Tom Tromey <tromey@adacore.com>
5602
5603 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
5604 (windows_continue): Use windows_continue::resume.
5605 * nat/windows-nat.h (struct windows_thread_info) <suspend,
5606 resume>: Declare new methods.
5607 * nat/windows-nat.c: New file.
5608 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
5609
5610 2020-04-08 Tom Tromey <tromey@adacore.com>
5611
5612 * windows-nat.c (windows_add_thread, windows_delete_thread)
5613 (windows_nat_target::fetch_registers)
5614 (windows_nat_target::store_registers, fake_create_process)
5615 (windows_nat_target::resume, windows_nat_target::resume)
5616 (get_windows_debug_event, windows_nat_target::wait)
5617 (windows_nat_target::pid_to_str)
5618 (windows_nat_target::get_tib_address)
5619 (windows_nat_target::get_ada_task_ptid)
5620 (windows_nat_target::thread_name)
5621 (windows_nat_target::thread_alive): Use lwp, not tid.
5622
5623 2020-04-08 Tom Tromey <tromey@adacore.com>
5624
5625 * windows-nat.c (handle_exception)
5626 (windows_nat_target::thread_name): Update.
5627 * nat/windows-nat.h (windows_thread_info): Remove destructor.
5628 <name>: Now unique_xmalloc_ptr.
5629
5630 2020-04-08 Tom Tromey <tromey@adacore.com>
5631
5632 * windows-nat.c (thread_rec)
5633 (windows_nat_target::fetch_registers): Update.
5634 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
5635 Update comment.
5636 <debug_registers_changed, reload_context>: Now bool.
5637
5638 2020-04-08 Tom Tromey <tromey@adacore.com>
5639
5640 * windows-nat.c (windows_add_thread): Use new.
5641 (windows_init_thread_list, windows_delete_thread): Use delete.
5642 (get_windows_debug_event): Update.
5643 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
5644 destructor, and initializers.
5645
5646 2020-04-08 Tom Tromey <tromey@adacore.com>
5647
5648 * windows-nat.c (struct windows_thread_info): Remove.
5649 * nat/windows-nat.h: New file.
5650
5651 2020-04-08 Tom Tromey <tromey@adacore.com>
5652
5653 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
5654 (thread_rec, windows_add_thread, windows_delete_thread)
5655 (windows_continue): Update.
5656
5657 2020-04-08 Tom Tromey <tromey@adacore.com>
5658
5659 * windows-nat.c (struct windows_thread_info): Remove typedef.
5660 (thread_head): Remove.
5661 (thread_list): New global.
5662 (thread_rec, windows_add_thread, windows_init_thread_list)
5663 (windows_delete_thread, windows_continue): Update.
5664
5665 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
5666
5667 * windows-tdep.h (windows_init_abi): Add comment.
5668 (cygwin_init_abi): New declaration.
5669 * windows-tdep.c: Split signal enumeration in two, one for
5670 Windows and one for Cygwin.
5671 (windows_gdb_signal_to_target): Only deal with signal of the
5672 Windows OS ABI.
5673 (cygwin_gdb_signal_to_target): New function.
5674 (windows_init_abi): Rename to windows_init_abi_common, don't set
5675 gdb_signal_to_target gdbarch method. Add new new function with
5676 this name.
5677 (cygwin_init_abi): New function.
5678 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
5679 comment. Don't call windows_init_abi.
5680 (amd64_windows_init_abi): Add comment, call windows_init_abi.
5681 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
5682 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
5683 i386_windows_init_abi_common, don't call windows_init_abi. Add
5684 a new function of this name.
5685 (i386_cygwin_init_abi): New function.
5686 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
5687 OS ABI Cygwin.
5688
5689 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
5690
5691 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
5692 parameter.c.
5693 (dwarf2_read_gdb_index): Update.
5694
5695 2020-04-07 Kamil Rytarowski <n54@gmx.com>
5696
5697 * nbsd-tdep.c: Include "objfiles.h".
5698 (nbsd_skip_solib_resolver): New.
5699 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
5700
5701 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5702
5703 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
5704 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
5705 with DW_LLE_base_addressx are being emitted in DWARFv5.
5706 Add the newly added kind DW_LOC_OFFSET_PAIR also.
5707 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
5708 unsigned integer.
5709
5710 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5711
5712 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
5713 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
5714 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
5715 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
5716 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
5717 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
5718 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
5719
5720
5721 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
5722
5723 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
5724 (read_loclist_index): New function definition.
5725 (lookup_loclist_base): New function definition.
5726 (read_loclist_header): New function definition.
5727 (dwarf2_cu): Add loclist_base and loclist_header field.
5728 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
5729 (read_full_die_1): Read the value of DW_AT_loclists_base.
5730 (read_attribute_reprocess): Handle DW_FORM_loclistx.
5731 (read_attribute_value): Handle DW_FORM_loclistx.
5732 (skip_one_die): Handle DW_FORM_loclistx.
5733 (loclist_header): New structure declaration.
5734 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
5735
5736 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
5737
5738 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
5739 constructor. Remove `addr` parameter from other constructor and
5740 add `per_cu` parameter.
5741 * dwarf2/read.c (create_partial_symtab): Update.
5742
5743 2020-04-07 Tom de Vries <tdevries@suse.de>
5744
5745 PR symtab/25796
5746 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
5747 (partial_die_info::fixup): Inherit has_const_value.
5748
5749 2020-04-07 Tom de Vries <tdevries@suse.de>
5750
5751 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
5752 symbols without address.
5753
5754 2020-04-06 Kamil Rytarowski <n54@gmx.com>
5755
5756 * nbsd-nat.h (struct thread_info): Add forward declaration.
5757 (nbsd_nat_target::thread_alive): Add.
5758 (nbsd_nat_target::thread_name): Likewise.
5759 (nbsd_nat_target::update_thread_list): Likewise.
5760 (update_thread_list::post_attach): Likewise.
5761 (post_attach::pid_to_str): Likewise.
5762 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
5763 (nbsd_thread_lister): Add.
5764 (nbsd_nat_target::thread_alive): Likewise.
5765 (nbsd_nat_target::thread_name): Likewise.
5766 (nbsd_add_threads): Likewise.
5767 (update_thread_list::post_attach): Likewise.
5768 (nbsd_nat_target::update_thread_list): Likewise.
5769 (post_attach::pid_to_str): Likewise.
5770
5771 2020-04-06 Tom Tromey <tromey@adacore.com>
5772
5773 * ada-valprint.c (print_variant_part): Extract the variant field.
5774 (print_field_values): Use the field as the outer value when
5775 recursing.
5776
5777 2020-04-06 Tom Tromey <tromey@adacore.com>
5778
5779 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
5780 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
5781 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
5782 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
5783 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
5784
5785 2020-04-06 Tom Tromey <tromey@adacore.com>
5786
5787 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
5788 TYPE_CODE_ERROR.
5789
5790 2020-04-06 Kamil Rytarowski <n54@gmx.com>
5791
5792 * nbsd-tdep.c: Include "gdbarch.h".
5793 Define enum with NetBSD signal numbers.
5794 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
5795 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
5796 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5797 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
5798 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
5799 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
5800 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
5801 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
5802 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
5803 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
5804 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
5805 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
5806
5807 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
5808
5809 PR gdb/25325
5810 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
5811
5812 2020-04-03 Tom Tromey <tromey@adacore.com>
5813
5814 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
5815 Read constant block.
5816
5817 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
5818
5819 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
5820 (gdb_bfd_get_full_section_contents): New declaration.
5821 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
5822 * windows-tdep.c (is_linked_with_cygwin_dll): Use
5823 gdb_bfd_get_full_section_contents.
5824
5825 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
5826
5827 * exec.c (build_section_table): Replace internal_error with
5828 gdb_assert.
5829 (section_table_xfer_memory_partial): Likewise.
5830 * mdebugread.c (parse_partial_symbols): Likewise.
5831 * psymtab.c (lookup_partial_symbol): Likewise.
5832 * utils.c (wrap_here): Likewise.
5833
5834 2020-04-02 Tom Tromey <tromey@adacore.com>
5835
5836 * f-lang.c (build_fortran_types): Use arch_type to initialize
5837 builtin_complex_s32 in the TYPE_CODE_ERROR case.
5838
5839 2020-04-02 Tom Tromey <tromey@adacore.com>
5840
5841 * dwarf2/read.c (partial_die_info::read): Do not create a vector
5842 of attributes.
5843
5844 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
5845 Bernd Edlinger <bernd.edlinger@hotmail.de>
5846 Tom Tromey <tromey@adacore.com>
5847
5848 * buildsym.c (buildsym_compunit::record_line): Remove
5849 deduplication code.
5850
5851 2020-04-02 Tom de Vries <tdevries@suse.de>
5852
5853 PR ada/24671
5854 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
5855
5856 2020-04-02 Tom de Vries <tdevries@suse.de>
5857
5858 * dwarf2/read.c (dwarf2_gdb_index_functions,
5859 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
5860 NULL.
5861 * psymtab.c (psym_lookup_global_symbol_language): New function.
5862 (psym_functions): Init psym_lookup_global_symbol_language with
5863 psym_lookup_global_symbol_language.
5864 * symfile-debug.c (debug_sym_quick_functions): Init
5865 lookup_global_symbol_language with NULL.
5866 * symfile.c (set_initial_language): Remove fixme comment.
5867 * symfile.h (struct quick_symbol_functions): Add
5868 lookup_global_symbol_language.
5869 * symtab.c (find_quick_global_symbol_language): New function.
5870 (find_main_name): Use find_quick_global_symbol_language.
5871
5872 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5873
5874 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
5875
5876 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5877
5878 * buildsym.c (record_line): Fix undefined behavior and preserve
5879 lines at eof.
5880
5881 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5882
5883 * buildsym.c (record_line): Fix the resizing condition.
5884
5885 2020-04-01 Tom Tromey <tom@tromey.com>
5886
5887 * value.h (value_literal_complex): Add comment.
5888 * valops.c (value_literal_complex): Refer to value.h.
5889
5890 2020-04-01 Tom Tromey <tom@tromey.com>
5891
5892 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
5893 (scalar_type): New rule, from typebase.
5894 (typebase): Use scalar_type. Recognize complex types.
5895 (field_name): Handle FLOAT_KEYWORD.
5896 (ident_tokens): Add _Complex and __complex__.
5897
5898 2020-04-01 Tom Tromey <tom@tromey.com>
5899
5900 PR exp/25299:
5901 * valarith.c (promotion_type, complex_binop): New functions.
5902 (scalar_binop): Handle complex numbers. Use promotion_type.
5903 (value_pos, value_neg, value_complement): Handle complex numbers.
5904
5905 2020-04-01 Tom Tromey <tom@tromey.com>
5906
5907 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
5908 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
5909 (parse_number): Handle complex numbers.
5910
5911 2020-04-01 Tom Tromey <tom@tromey.com>
5912
5913 * c-valprint.c (c_decorations): Change complex suffix to "i".
5914
5915 2020-04-01 Tom Tromey <tom@tromey.com>
5916
5917 * valprint.c (generic_value_print_complex): Use accessors.
5918 * value.h (value_real_part, value_imaginary_part): Declare.
5919 * valops.c (value_real_part, value_imaginary_part): New
5920 functions.
5921 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
5922
5923 2020-04-01 Tom Tromey <tom@tromey.com>
5924
5925 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
5926 (read_range_type): Update.
5927 * mdebugread.c (basic_type): Update.
5928 * go-lang.c (build_go_types): Use init_complex_type.
5929 * gdbtypes.h (struct main_type) <complex_type>: New member.
5930 (init_complex_type): Update.
5931 (arch_complex_type): Don't declare.
5932 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
5933 Make name if none given. Use alloc_type_copy. Look for cached
5934 complex type.
5935 (arch_complex_type): Remove.
5936 (gdbtypes_post_init): Use init_complex_type.
5937 * f-lang.c (build_fortran_types): Use init_complex_type.
5938 * dwarf2/read.c (read_base_type): Update.
5939 * d-lang.c (build_d_types): Use init_complex_type.
5940 * ctfread.c (read_base_type): Update.
5941
5942 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5943
5944 * infrun.c (stop_all_threads): Update assertion, plus when
5945 stopping threads, take into account that we might be trying
5946 to stop an all-stop target.
5947 (stop_waiting): Call 'stop_all_threads' if there exists a
5948 non-stop target.
5949
5950 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5951
5952 * target.h (exists_non_stop_target): New function declaration.
5953 * target.c (exists_non_stop_target): New function.
5954
5955 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
5956
5957 PR gdb/24789
5958 * eval.c (is_integral_or_integral_reference): New function.
5959 (evaluate_subexp_standard): Allow integer references in
5960 pointer arithmetic.
5961
5962 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5963
5964 * remote.c (remote_target::remote_parse_stop_reply): Remove the
5965 check for no ptid in the stop reply when the target is non-stop.
5966
5967 2020-04-01 Tom Tromey <tromey@adacore.com>
5968
5969 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
5970 "name" parameter to rvalue reference. Initialize m_name_holder.
5971 <lookup_name_info>: New overloads.
5972 <name>: Return gdb::string_view.
5973 <c_str>: New method.
5974 <make_ignore_params>: Update.
5975 <search_name_hash>: Update.
5976 <language_lookup_name>: Return const char *.
5977 <m_name>: Change type.
5978 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
5979 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
5980 (lookup_name_info::match_any): Update.
5981 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
5982 Update.
5983 * minsyms.c (linkage_name_str): Update.
5984 * language.c (default_symbol_name_matcher): Update.
5985 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
5986 Update.
5987 * ada-lang.c (ada_fold_name): Change parameter to string_view.
5988 (ada_lookup_name_info::ada_lookup_name_info): Update.
5989 (literal_symbol_name_matcher): Update.
5990
5991 2020-04-01 Tom Tromey <tromey@adacore.com>
5992
5993 * psymtab.c (psymtab_search_name): Remove function.
5994 (psym_lookup_symbol): Create search name and lookup name here.
5995 (lookup_partial_symbol): Remove "name" parameter; add
5996 lookup_name.
5997 (psym_expand_symtabs_for_function): Update.
5998
5999 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
6000
6001 PR tui/25597:
6002 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
6003
6004 2020-03-31 Tom Tromey <tromey@adacore.com>
6005
6006 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
6007 memcpy.
6008
6009 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
6010
6011 * features/riscv/32bit-csr.xml: Regenerated.
6012 * features/riscv/64bit-csr.xml: Regenerated.
6013
6014 2020-03-30 Tom Tromey <tromey@adacore.com>
6015
6016 * ada-valprint.c (print_variant_part): Update.
6017 * ada-lang.h (ada_which_variant_applies): Update.
6018 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
6019 outer_valaddr parameters; replace with "outer" value parameter.
6020 (to_fixed_variant_branch_type): Update.
6021
6022 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6023
6024 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
6025 <list>. Remove inclusion of observable.h.
6026 (PPC_DEBUG_CURRENT_VERSION): Move up define.
6027 (struct arch_lwp_info): New struct.
6028 (class ppc_linux_dreg_interface): New class.
6029 (struct ppc_linux_process_info): New struct.
6030 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
6031 <low_new_clone, low_forget_process, low_prepare_to_resume>
6032 <copy_thread_dreg_state, mark_thread_stale>
6033 <mark_debug_registers_changed, register_hw_breakpoint>
6034 <clear_hw_breakpoint, register_wp, clear_wp>
6035 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
6036 <num_memory_accesses, get_trigger_type>
6037 <create_watchpoint_request, hwdebug_point_cmp>
6038 <init_arch_lwp_info, get_arch_lwp_info>
6039 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
6040 methods.
6041 <struct ptid_hash>: New inner struct.
6042 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
6043 members.
6044 (saved_dabr_value, hwdebug_info, max_slots_number)
6045 (struct hw_break_tuple, struct thread_points, ppc_threads)
6046 (have_ptrace_hwdebug_interface)
6047 (hwdebug_find_thread_points_by_tid)
6048 (hwdebug_insert_point, hwdebug_remove_point): Remove.
6049 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
6050 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
6051 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
6052 use m_dreg_interface.
6053 (hwdebug_point_cmp): Change to...
6054 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
6055 reference arguments instead of pointers.
6056 (ppc_linux_nat_target::ranged_break_num_registers): Use
6057 m_dreg_interface.
6058 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
6059 m_dreg_interface. Call register_hw_breakpoint.
6060 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
6061 m_dreg_interface. Call clear_hw_breakpoint.
6062 (get_trigger_type): Change to...
6063 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
6064 comment.
6065 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
6066 use m_dreg_interface. Call register_hw_breakpoint.
6067 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
6068 use m_dreg_interface. Call clear_hw_breakpoint.
6069 (can_use_watchpoint_cond_accel): Change to...
6070 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
6071 method. Update comment, use m_dreg_interface and
6072 m_process_info.
6073 (calculate_dvc): Change to...
6074 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
6075 m_dreg_interface.
6076 (num_memory_accesses): Change to...
6077 (ppc_linux_nat_target::num_memory_accesses): ...this method.
6078 (check_condition): Change to...
6079 (ppc_linux_nat_target::check_condition): ...this method.
6080 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
6081 comment, use m_dreg_interface.
6082 (create_watchpoint_request): Change to...
6083 (ppc_linux_nat_target::create_watchpoint_request): ...this
6084 method. Use m_dreg_interface.
6085 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
6086 m_dreg_interface. Call register_hw_breakpoint or register_wp.
6087 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
6088 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
6089 (ppc_linux_nat_target::low_forget_process)
6090 (ppc_linux_nat_target::low_new_fork)
6091 (ppc_linux_nat_target::low_new_clone)
6092 (ppc_linux_nat_target::low_delete_thread)
6093 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
6094 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
6095 only call mark_thread_stale.
6096 (ppc_linux_thread_exit): Remove.
6097 (ppc_linux_nat_target::stopped_data_address): Change to...
6098 (ppc_linux_nat_target::low_stopped_data_address): This. Add
6099 comment, use m_dreg_interface and m_thread_hw_breakpoints.
6100 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
6101 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
6102 comment. Call low_stopped_data_address.
6103 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
6104 m_dreg_interface.
6105 (ppc_linux_nat_target::masked_watch_num_registers): Use
6106 m_dreg_interface.
6107 (ppc_linux_nat_target::copy_thread_dreg_state)
6108 (ppc_linux_nat_target::mark_thread_stale)
6109 (ppc_linux_nat_target::mark_debug_registers_changed)
6110 (ppc_linux_nat_target::register_hw_breakpoint)
6111 (ppc_linux_nat_target::clear_hw_breakpoint)
6112 (ppc_linux_nat_target::register_wp)
6113 (ppc_linux_nat_target::clear_wp)
6114 (ppc_linux_nat_target::init_arch_lwp_info)
6115 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
6116 (_initialize_ppc_linux_nat): Remove observer callback.
6117
6118 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6119
6120 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
6121 (ppc_linux_nat_target::auxv_parse)
6122 (ppc_linux_nat_target::read_description)
6123 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
6124 Move up.
6125
6126 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6127
6128 * linux-nat.h (low_new_clone): New method.
6129 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
6130
6131 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6132
6133 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
6134 (dbx_expand_psymtab): ... this.
6135 (start_psymtab): Update.
6136 * mdebugread.c (psymtab_to_symtab_1): Rename to...
6137 (mdebug_expand_psymtab): ... this.
6138 (parse_partial_symbols): Update.
6139 (new_psymtab): Update.
6140 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
6141 (xcoff_expand_psymtab): ... this.
6142 (xcoff_start_psymtab): Update.
6143
6144 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6145
6146 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
6147 <expand_dependencies>: ... this.
6148 * psymtab.c (partial_symtab::read_dependencies): Rename to...
6149 (partial_symtab::expand_dependencies): ... this.
6150 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
6151 Update.
6152 (dwarf2_psymtab::expand_psymtab): Update.
6153 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
6154 * mdebugread.c (psymtab_to_symtab_1): Update.
6155 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6156
6157 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6158
6159 * psympriv.h (discard_psymtab): Remove.
6160 * dbxread.c (dbx_end_psymtab): Update.
6161 * xcoffread.c (xcoff_end_psymtab): Update.
6162
6163 2020-03-28 Tom Tromey <tom@tromey.com>
6164
6165 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
6166 comment.
6167
6168 2020-03-28 Tom Tromey <tom@tromey.com>
6169
6170 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
6171
6172 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
6173
6174 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
6175
6176 2020-03-26 John Baldwin <jhb@FreeBSD.org>
6177
6178 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
6179
6180 2020-03-26 Tom Tromey <tom@tromey.com>
6181
6182 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
6183 (mark_common_block_symbol_computed, read_tag_string_type)
6184 (attr_to_dynamic_prop, read_subrange_type): Update.
6185 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
6186 to be methods on struct attribute.
6187 (skip_one_die, process_imported_unit_die, read_namespace_alias)
6188 (read_call_site_scope, partial_die_info::read)
6189 (partial_die_info::read, lookup_die_type, follow_die_ref):
6190 Update.
6191 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
6192 from dwarf2_get_ref_die_offset.
6193 (attribute::constant_value): New method, from
6194 dwarf2_get_attr_constant_value.
6195 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
6196 Declare method.
6197 <constant_value>: New method.
6198
6199 2020-03-26 Tom Tromey <tom@tromey.com>
6200
6201 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
6202 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
6203 (dwarf_type_encoding_name): Move to stringify.c.
6204 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
6205 * dwarf2/stringify.c: New file.
6206 * dwarf2/stringify.h: New file.
6207
6208 2020-03-26 Tom Tromey <tom@tromey.com>
6209
6210 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
6211 Rewrite.
6212
6213 2020-03-26 Tom Tromey <tom@tromey.com>
6214
6215 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
6216 methods.
6217 * dwarf2/read.c (lookup_addr_base): Move to die.h.
6218 (lookup_ranges_base): Likewise.
6219 (read_cutu_die_from_dwo, read_full_die_1): Update.
6220
6221 2020-03-26 Tom Tromey <tom@tromey.com>
6222
6223 * dwarf2/read.c (read_import_statement, read_file_scope)
6224 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
6225 (read_lexical_block_scope, read_call_site_scope)
6226 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
6227 (handle_struct_member_die, process_structure_scope)
6228 (update_enumeration_type_from_children)
6229 (process_enumeration_scope, read_array_type, read_common_block)
6230 (read_namespace, read_module, read_subroutine_type): Update.
6231 (sibling_die): Remove.
6232
6233 2020-03-26 Tom Tromey <tom@tromey.com>
6234
6235 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
6236 (build_type_psymtabs_reader, read_structure_type)
6237 (read_enumeration_type, read_full_die_1): Update.
6238 (dwarf2_attr_no_follow): Move to die.h.
6239 * dwarf2/die.h (struct die_info) <attr>: New method.
6240
6241 2020-03-26 Tom Tromey <tom@tromey.com>
6242
6243 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
6244 <base_address>: Now an optional.
6245 (dwarf2_find_base_address, dwarf2_rnglists_process)
6246 (dwarf2_ranges_process, fill_in_loclist_baton)
6247 (dwarf2_symbol_mark_computed): Update.
6248
6249 2020-03-26 Tom Tromey <tom@tromey.com>
6250
6251 * dwarf2/read.c (struct die_info): Move to die.h.
6252 * dwarf2/die.h: New file.
6253
6254 2020-03-26 Tom Tromey <tom@tromey.com>
6255
6256 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
6257 * dwarf2/read.c
6258 (dwarf2_statement_list_fits_in_line_number_section_complaint):
6259 Move to line-header.c.
6260 (read_checked_initial_length_and_offset, read_formatted_entries):
6261 Likewise.
6262 (dwarf_decode_line_header): Split into two.
6263 * dwarf2/line-header.c
6264 (dwarf2_statement_list_fits_in_line_number_section_complaint):
6265 Move from read.c.
6266 (read_checked_initial_length_and_offset, read_formatted_entries):
6267 Likewise.
6268 (dwarf_decode_line_header): New function, split from read.c.
6269
6270 2020-03-26 Tom Tromey <tom@tromey.com>
6271
6272 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
6273 Declare method.
6274 * dwarf2/read.c (read_attribute_value): Update.
6275 (dwarf2_per_objfile::read_line_string): Rename from
6276 read_indirect_line_string.
6277 (read_formatted_entries): Update.
6278
6279 2020-03-26 Tom Tromey <tom@tromey.com>
6280
6281 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
6282 variable.
6283
6284 2020-03-26 Tom Tromey <tom@tromey.com>
6285
6286 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
6287 const.
6288 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
6289 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
6290 parameter const.
6291
6292 2020-03-26 Tom Tromey <tom@tromey.com>
6293
6294 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
6295 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
6296 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
6297 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
6298
6299 2020-03-26 Tom Tromey <tom@tromey.com>
6300
6301 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
6302 file_names_size, file_full_name, file_file_name>: Use const.
6303 <file_name_at, file_names>: Add const overload.
6304 * dwarf2/line-header.c (line_header::file_file_name)
6305 (line_header::file_full_name): Update.
6306
6307 2020-03-26 Tom Tromey <tom@tromey.com>
6308
6309 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
6310 (macro_start_file, consume_improper_spaces)
6311 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
6312 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
6313 (dwarf_decode_macros): Move to macro.c.
6314 * dwarf2/macro.c: New file.
6315 * dwarf2/macro.h: New file.
6316 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
6317
6318 2020-03-26 Tom Tromey <tom@tromey.com>
6319
6320 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
6321 method.
6322 * dwarf2/section.c: New method. From
6323 read_indirect_string_at_offset_from.
6324 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
6325 (read_indirect_string_at_offset_from): Move to section.c.
6326 (read_indirect_string_at_offset): Rewrite.
6327 (read_indirect_line_string_at_offset): Remove.
6328 (read_indirect_string, read_indirect_line_string)
6329 (dwarf_decode_macro_bytes): Update.
6330
6331 2020-03-26 Tom Tromey <tom@tromey.com>
6332
6333 * dwarf2/section.h (struct dwarf2_section_info)
6334 <overload_complaint>: Declare.
6335 (dwarf2_section_buffer_overflow_complaint): Don't declare.
6336 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
6337 Rename from dwarf2_section_buffer_overflow_complaint.
6338 * dwarf2/read.c (skip_one_die, partial_die_info::read)
6339 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
6340
6341 2020-03-26 Tom Tromey <tom@tromey.com>
6342
6343 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
6344 Declare.
6345 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
6346 Move from read.c.
6347 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
6348 to section.c.
6349
6350 2020-03-26 Tom Tromey <tom@tromey.com>
6351
6352 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
6353
6354 2020-03-26 Tom Tromey <tom@tromey.com>
6355
6356 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
6357 "builder".
6358 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
6359 parameter.
6360 (dwarf_decode_macros): Update.
6361
6362 2020-03-26 Tom Tromey <tom@tromey.com>
6363
6364 * dwarf2/read.c (read_attribute_value): Update.
6365 (read_indirect_string_from_dwz): Move to dwz.c; change into
6366 method.
6367 (dwarf_decode_macro_bytes): Update.
6368 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
6369 * dwarf2/dwz.c: New file.
6370 * Makefile.in (COMMON_SFILES): Add dwz.c.
6371
6372 2020-03-26 Tom Tromey <tom@tromey.com>
6373
6374 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
6375 * dwarf2/read.c: Add include.
6376 * dwarf2/index-write.c: Add include.
6377 * dwarf2/index-cache.c: Add include.
6378 * dwarf2/dwz.h: New file.
6379
6380 2020-03-25 Tom Tromey <tom@tromey.com>
6381
6382 * compile/compile-object-load.c (get_out_value_type): Mention
6383 correct symbol name in error message.
6384
6385 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
6386
6387 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
6388
6389 2020-03-25 Tom de Vries <tdevries@suse.de>
6390
6391 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
6392 * symmisc.c (dump_symtab_1): Print user and includes fields.
6393 (maintenance_info_symtabs): Same.
6394
6395 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
6396
6397 PR gdb/25534
6398 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
6399 (riscv_regcache_cooked_write): New function.
6400 (riscv_push_dummy_call): Use new function.
6401 (riscv_return_value): Likewise.
6402
6403 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
6404
6405 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
6406 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
6407 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
6408 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
6409 * infrun.c (follow_fork): Likewise.
6410 (follow_fork_inferior): Likewise.
6411 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
6412 * linux-nat.h (class linux_nat_target): Likewise.
6413 * remote.c (class remote_target) <follow_fork>: Likewise.
6414 (remote_target::follow_fork): Likewise.
6415 * target-delegates.c: Re-generate.
6416 * target.c (default_follow_fork): Likewise.
6417 (target_follow_fork): Likewise.
6418 * target.h (struct target_ops) <follow_fork>: Likewise.
6419 (target_follow_fork): Likewise.
6420
6421 2020-03-24 Tom de Vries <tdevries@suse.de>
6422
6423 * psymtab.c (maintenance_info_psymtabs): Print user field.
6424
6425 2020-03-20 Tom Tromey <tromey@adacore.com>
6426
6427 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
6428 const.
6429 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
6430 const.
6431
6432 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
6433
6434 * ptrace.m4: Don't check for ptrace declaration.
6435 * config.in: Re-generate.
6436 * configure: Re-generate.
6437 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
6438 not defined.
6439
6440 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6441
6442 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
6443 `PTRACE_TYPE_RET'.
6444 * i386-bsd-nat.c (gdb_ptrace): Likewise.
6445 * sparc-nat.c (gdb_ptrace): Likewise.
6446 * x86-bsd-nat.c (gdb_ptrace): Likewise.
6447
6448 2020-03-20 Tom Tromey <tromey@adacore.com>
6449
6450 * c-exp.y (lex_one_token): Fix assert.
6451
6452 2020-03-20 Tom Tromey <tromey@adacore.com>
6453
6454 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
6455 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
6456 strncpy call.
6457
6458 2020-03-20 Tom Tromey <tromey@adacore.com>
6459
6460 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
6461
6462 2020-03-20 Tom Tromey <tromey@adacore.com>
6463
6464 * ada-valprint.c (print_variant_part): Remove parameters; switch
6465 to value-based API.
6466 (print_field_values): Likewise.
6467 (ada_val_print_struct_union): Likewise.
6468 (ada_value_print_1): Update.
6469
6470 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6471
6472 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
6473 nbsd_nat_target instead of inf_ptrace_target.
6474 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6475 nbsd_nat_target.
6476
6477 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6478
6479 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
6480 it to the ptrace call.
6481 * (store_registers): Likewise.
6482
6483 2020-03-20 Kamil Rytarowski <n54@gmx.com>
6484
6485 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
6486 it to the ptrace call.
6487 * (store_registers): Likewise.
6488
6489 2020-03-19 Luis Machado <luis.machado@linaro.org>
6490
6491 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
6492 valid, fetch vg value from ptrace.
6493
6494 2020-03-19 Kamil Rytarowski <n54@gmx.com>
6495 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
6496 * inf-ptrace.c: Likewise.
6497 * (gdb_ptrace): Add.
6498 * (inf_ptrace_target::resume): Update.
6499 * (inf_ptrace_target::xfer_partial): Likewise.
6500 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
6501 * (inf_ptrace_peek_poke): Update.
6502
6503 2020-03-19 Kamil Rytarowski <n54@gmx.com>
6504
6505 * x86-bsd-nat.c (gdb_ptrace): New.
6506 * (x86bsd_dr_set): Add new argument `ptid'.
6507 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
6508 x86bsd_dr_set_addr): Update.
6509
6510 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6511
6512 * remote.c (remote_target::process_stop_reply): Handle events for
6513 all threads differently.
6514
6515 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6516
6517 * completer.c (completion_tracker::remove_completion): Define new
6518 function.
6519 * completer.h (completion_tracker::remove_completion): Declare new
6520 function.
6521 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
6522 when adding a C++ function symbol.
6523
6524 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
6525
6526 * completer.c (completion_tracker::completion_hash_entry): Define
6527 new class.
6528 (advance_to_filename_complete_word_point): Call
6529 recompute_lowest_common_denominator.
6530 (completion_tracker::completion_tracker): Call discard_completions
6531 to setup the hash table.
6532 (completion_tracker::discard_completions): Allow for being called
6533 from the constructor, pass new equal function, and element deleter
6534 when constructing the hash table. Initialise new class member
6535 variables.
6536 (completion_tracker::maybe_add_completion): Remove use of
6537 m_entries_vec, and store more information into m_entries_hash.
6538 (completion_tracker::recompute_lcd_visitor): New function, most
6539 content taken from...
6540 (completion_tracker::recompute_lowest_common_denominator):
6541 ...here, this now just visits each item in the hash calling the
6542 above visitor.
6543 (completion_tracker::build_completion_result): Remove use of
6544 m_entries_vec, call recompute_lowest_common_denominator.
6545 * completer.h (completion_tracker::have_completions): Remove use
6546 of m_entries_vec.
6547 (completion_tracker::completion_hash_entry): Declare new class.
6548 (completion_tracker::recompute_lowest_common_denominator): Change
6549 function signature.
6550 (completion_tracker::recompute_lcd_visitor): Declare new function.
6551 (completion_tracker::m_entries_vec): Delete.
6552 (completion_tracker::m_entries_hash): Initialize to NULL.
6553 (completion_tracker::m_lowest_common_denominator_valid): New
6554 member variable.
6555 (completion_tracker::m_lowest_common_denominator_max_length): New
6556 member variable.
6557
6558 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6559
6560 * regformats/regdef.h: Put reg in gdb namespace.
6561
6562 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6563
6564 * i386-bsd-nat.c (gdb_ptrace): New.
6565 * (i386bsd_fetch_inferior_registers,
6566 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
6567 * (i386bsd_fetch_inferior_registers,
6568 i386bsd_store_inferior_registers) Use gdb_ptrace.
6569
6570 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6571
6572 * amd64-bsd-nat.c (gdb_ptrace): New.
6573 * (amd64bsd_fetch_inferior_registers,
6574 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
6575 * (amd64bsd_fetch_inferior_registers,
6576 amd64bsd_store_inferior_registers) Use gdb_ptrace.
6577
6578 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6579
6580 * user-regs.c (user_reg::read): Rename to...
6581 (user_reg::xread): ...this.
6582 * (append_user_reg): Rename argument `read' to `xread'.
6583 * (user_reg_add_builtin): Likewise.
6584 * (user_reg_add): Likewise.
6585 * (value_of_user_reg): Likewise.
6586
6587 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6588
6589 * sparc-nat.c (gdb_ptrace): New.
6590 * sparc-nat.c (sparc_fetch_inferior_registers)
6591 (sparc_store_inferior_registers) Remove obsolete comment.
6592 * sparc-nat.c (sparc_fetch_inferior_registers)
6593 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
6594 * sparc-nat.c (sparc_fetch_inferior_registers)
6595 (sparc_store_inferior_registers) Use gdb_ptrace.
6596
6597 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6598
6599 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
6600 it to the ptrace call.
6601 * sh-nbsd-nat.c (store_registers): Likewise.
6602
6603 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6604
6605 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
6606 nbsd_nat_target instead of inf_ptrace_target.
6607 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6608 nbsd_nat_target.
6609
6610 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6611
6612 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
6613
6614 2020-03-17 Kamil Rytarowski <n54@gmx.com>
6615
6616 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
6617 <sys/sysctl.h>.
6618 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
6619
6620 2020-03-17 Tom de Vries <tdevries@suse.de>
6621
6622 PR gdb/23710
6623 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
6624 fields.
6625 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
6626 fields.
6627 (process_imported_unit_die): Skip import of c++ CUs.
6628
6629 2020-03-16 Tom Tromey <tom@tromey.com>
6630
6631 * p-valprint.c (pascal_object_print_value): Initialize
6632 base_value.
6633
6634 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
6635 Shahab Vahedi <shahab@synopsys.com>
6636
6637 * Makefile.in: Add arch/arc.o
6638 * configure.tgt: Likewise.
6639 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
6640 (_initialize_arc_tdep): Don't initialize old target descriptions.
6641 (arc_read_description): New function to cache target descriptions.
6642 * arc-tdep.h (arc_read_description): Add proto type.
6643 * arch/arc.c: New file.
6644 * arch/arc.h: Likewise.
6645 * features/Makefile: Replace old target descriptions with new.
6646 * features/arc-arcompact.c: Remove.
6647 * features/arc-arcompact.xml: Likewise.
6648 * features/arc-v2.c: Likewise
6649 * features/arc-v2.xml: Likewise
6650 * features/arc/aux-arcompact.xml: New file.
6651 * features/arc/aux-v2.xml: Likewise.
6652 * features/arc/core-arcompact.xml: Likewise.
6653 * features/arc/core-v2.xml: Likewise.
6654 * features/arc/aux-arcompact.c: Generate.
6655 * features/arc/aux-v2.c: Likewise.
6656 * features/arc/core-arcompact.c: Likewise.
6657 * features/arc/core-v2.c: Likewise.
6658 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
6659
6660 2020-03-16 Tom Tromey <tromey@adacore.com>
6661
6662 PR gdb/25663:
6663 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
6664 putting value into bcache.
6665
6666 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6667
6668 PR gdb/21500
6669 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
6670 to...
6671 (amd64_windows_init_abi_common): ... this. Don't set size of
6672 long type.
6673 (amd64_windows_init_abi): New function.
6674 (amd64_cygwin_init_abi): New function.
6675 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
6676 the Cygwin OS ABI.
6677 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
6678 comment.
6679
6680 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6681
6682 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
6683 * windows-tdep.c (CYGWIN_DLL_NAME): New.
6684 (pe_import_directory_entry): New struct type.
6685 (is_linked_with_cygwin_dll): New function.
6686 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
6687 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
6688 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
6689
6690 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6691
6692 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
6693 i386_cygwin_core_osabi_sniffer.
6694
6695 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6696
6697 * i386-cygwin-tdep.c: Rename to...
6698 * i386-windows-tdep.c: ... this.
6699 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
6700 i386-windows-tdep.c.
6701 * configure.tgt: Likewise.
6702
6703 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6704
6705 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
6706 * osabi.c (gdb_osabi_names): Add "Windows".
6707 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
6708 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
6709 (i386_cygwin_core_osabi_sniffer): New function, extracted from
6710 i386_cygwin_osabi_sniffer.
6711 (_initialize_i386_cygwin_tdep): Register OS ABI
6712 GDB_OSABI_WINDOWS for i386.
6713 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
6714 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
6715 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
6716 for x86-64.
6717 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
6718 when the target matches '*-*-mingw*'.
6719
6720 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6721
6722 * defs.h (enum gdb_osabi): Move to...
6723 * osabi.h (enum gdb_osabi): ... here.
6724 * gdbarch.sh: Include osabi.h in gdbarch.h.
6725 * gdbarch.h: Re-generate.
6726
6727 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
6728
6729 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
6730 function.
6731 (_initialize_amd64_windows_tdep): Register osabi sniffer.
6732
6733 2020-03-14 Tom Tromey <tom@tromey.com>
6734
6735 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
6736 for C++.
6737 (c_type_print_modifier): Likewise. Add "language" parameter.
6738 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
6739 (c_type_print_base_1): Update.
6740 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
6741 constants.
6742 * type-stack.c (type_stack::insert): Handle tp_atomic and
6743 tp_restrict.
6744 (type_stack::follow_type_instance_flags): Likewise.
6745 (type_stack::follow_types): Likewise. Merge type-following code.
6746 * c-exp.y (RESTRICT, ATOMIC): New tokens.
6747 (space_identifier, cv_with_space_id)
6748 (const_or_volatile_or_space_identifier_noopt)
6749 (const_or_volatile_or_space_identifier): Remove.
6750 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
6751 rules.
6752 (ptr_operator, typebase): Update.
6753 (enum token_flag) <FLAG_C>: New constant.
6754 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
6755 "_Atomic".
6756 (lex_one_token): Handle FLAG_C.
6757
6758 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6759
6760 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
6761 it to the ptrace call.
6762 * m68k-bsd-nat.c (store_registers): Likewise.
6763
6764 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6765
6766 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
6767 gdb_byte *.
6768 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
6769 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
6770 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
6771
6772 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6773
6774 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
6775 nbsd_nat_target instead of inf_ptrace_target.
6776 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6777 nbsd_nat_target.
6778
6779 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6780
6781 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
6782 register_t.
6783
6784 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6785
6786 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
6787 it to the ptrace call.
6788 * alpha-bsd-nat.c (store_registers): Likewise.
6789
6790 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6791
6792 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
6793 includes.
6794 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
6795 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
6796 fill_fpregset): Likewise.
6797
6798 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6799
6800 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
6801 nbsd_nat_target instead of inf_ptrace_target.
6802 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6803 nbsd_nat_target.
6804
6805 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6806
6807 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
6808 register_t.
6809
6810 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6811
6812 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
6813 it to the ptrace call.
6814 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
6815 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
6816 * arm-nbsd-nat.c (store_register): Likewise.
6817 * arm-nbsd-nat.c (store_regs): Likewise.
6818 * arm-nbsd-nat.c (store_fp_register): Likewise.
6819 * arm-nbsd-nat.c (store_fp_regs): Likewise.
6820
6821 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6822
6823 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
6824 nbsd_nat_target instead of inf_ptrace_target.
6825 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
6826 nbsd_nat_target.
6827
6828 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6829
6830 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
6831 it to the ptrace call.
6832 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
6833
6834 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6835
6836 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
6837 it to the ptrace call.
6838 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
6839
6840 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6841
6842 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
6843 gdb_byte *.
6844 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
6845
6846 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6847
6848 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
6849 instead of inf_ptrace_target.
6850 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
6851 nbsd_nat_target.
6852
6853 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6854
6855 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
6856 register_t.
6857
6858 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6859
6860 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
6861 register_t.
6862
6863 2020-03-14 Kamil Rytarowski <n54@gmx.com>
6864
6865 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
6866 register_t.
6867
6868 2020-03-13 Tom Tromey <tom@tromey.com>
6869
6870 * value.h (val_print): Don't declare.
6871 * valprint.h (val_print_array_elements)
6872 (val_print_scalar_formatted, generic_val_print): Don't declare.
6873 * valprint.c (generic_val_print_array): Take a struct value.
6874 (generic_val_print_ptr, generic_val_print_memberptr)
6875 (generic_val_print_bool, generic_val_print_int)
6876 (generic_val_print_char, generic_val_print_complex)
6877 (generic_val_print): Remove.
6878 (generic_value_print): Update.
6879 (do_val_print): Remove unused parameters. Don't call
6880 la_val_print.
6881 (val_print): Remove.
6882 (common_val_print): Update. Don't call value_check_printable.
6883 (val_print_scalar_formatted, val_print_array_elements): Remove.
6884 * rust-lang.c (rust_val_print): Remove.
6885 (rust_language_defn): Update.
6886 * p-valprint.c (pascal_val_print): Remove.
6887 (pascal_value_print_inner): Update.
6888 (pascal_object_print_val_fields, pascal_object_print_val):
6889 Remove.
6890 (pascal_object_print_static_field): Update.
6891 * p-lang.h (pascal_val_print): Don't declare.
6892 * p-lang.c (pascal_language_defn): Update.
6893 * opencl-lang.c (opencl_language_defn): Update.
6894 * objc-lang.c (objc_language_defn): Update.
6895 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
6896 * m2-lang.h (m2_val_print): Don't declare.
6897 * m2-lang.c (m2_language_defn): Update.
6898 * language.h (struct language_defn) <la_val_print>: Remove.
6899 * language.c (unk_lang_value_print_inner): Rename. Change
6900 argument types.
6901 (unknown_language_defn, auto_language_defn): Update.
6902 * go-valprint.c (go_val_print): Remove.
6903 * go-lang.h (go_val_print): Don't declare.
6904 * go-lang.c (go_language_defn): Update.
6905 * f-valprint.c (f_val_print): Remove.
6906 * f-lang.h (f_value_print): Don't declare.
6907 * f-lang.c (f_language_defn): Update.
6908 * d-valprint.c (d_val_print): Remove.
6909 * d-lang.h (d_value_print): Don't declare.
6910 * d-lang.c (d_language_defn): Update.
6911 * cp-valprint.c (cp_print_value_fields)
6912 (cp_print_value_fields_rtti, cp_print_value): Remove.
6913 (cp_print_static_field): Update.
6914 * c-valprint.c (c_val_print_array, c_val_print_ptr)
6915 (c_val_print_struct, c_val_print_union, c_val_print_int)
6916 (c_val_print_memberptr, c_val_print): Remove.
6917 * c-lang.h (c_val_print_array, cp_print_value_fields)
6918 (cp_print_value_fields_rtti): Don't declare.
6919 * c-lang.c (c_language_defn, cplus_language_defn)
6920 (asm_language_defn, minimal_language_defn): Update.
6921 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
6922 (ada_val_print_enum): Take a struct value.
6923 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
6924 (ada_val_print): Remove.
6925 (ada_value_print_1): Update.
6926 (printable_val_type): Remove.
6927 * ada-lang.h (ada_val_print): Don't declare.
6928 * ada-lang.c (ada_language_defn): Update.
6929
6930 2020-03-13 Tom Tromey <tom@tromey.com>
6931
6932 * valprint.c (do_val_print): Update.
6933 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
6934 a struct value.
6935 (value_to_value_object_no_release): Declare.
6936 * python/py-value.c (value_to_value_object_no_release): New
6937 function.
6938 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
6939 struct value.
6940 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
6941 function.
6942 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
6943 a struct value.
6944 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
6945 Declare.
6946 (gdbscm_apply_val_pretty_printer): Take a struct value.
6947 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
6948 value.
6949 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
6950 value.
6951 * extension-priv.h (struct extension_language_ops)
6952 <apply_val_pretty_printer>: Take a struct value.
6953 * cp-valprint.c (cp_print_value): Create a struct value.
6954 (cp_print_value): Update.
6955
6956 2020-03-13 Tom Tromey <tom@tromey.com>
6957
6958 * ada-valprint.c (print_field_values): Call common_val_print.
6959
6960 2020-03-13 Tom Tromey <tom@tromey.com>
6961
6962 * ada-valprint.c (val_print_packed_array_elements): Remove
6963 bitoffset and val parameters. Call common_val_print.
6964 (ada_val_print_string): Remove offset, address, and original_value
6965 parameters.
6966 (ada_val_print_array): Update.
6967 (ada_value_print_array): New function.
6968 (ada_value_print_1): Call it.
6969
6970 2020-03-13 Tom Tromey <tom@tromey.com>
6971
6972 * ada-valprint.c (ada_value_print): Use common_val_print.
6973
6974 2020-03-13 Tom Tromey <tom@tromey.com>
6975
6976 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
6977
6978 2020-03-13 Tom Tromey <tom@tromey.com>
6979
6980 * ada-valprint.c (ada_value_print_num): New function.
6981 (ada_value_print_1): Use it.
6982
6983 2020-03-13 Tom Tromey <tom@tromey.com>
6984
6985 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
6986
6987 2020-03-13 Tom Tromey <tom@tromey.com>
6988
6989 * ada-valprint.c (ada_value_print_ptr): New function.
6990 (ada_value_print_1): Use it.
6991
6992 2020-03-13 Tom Tromey <tom@tromey.com>
6993
6994 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
6995 call common_val_print.
6996 (ada_val_print_1): Update.
6997 (ada_value_print_1): New function.
6998 (ada_value_print_inner): Rewrite.
6999
7000 2020-03-13 Tom Tromey <tom@tromey.com>
7001
7002 * cp-valprint.c (cp_print_value_fields): Update.
7003 (cp_print_value): New function.
7004
7005 2020-03-13 Tom Tromey <tom@tromey.com>
7006
7007 * m2-valprint.c (m2_value_print_inner): Use
7008 cp_print_value_fields.
7009 * cp-valprint.c (cp_print_value_fields): New function.
7010 * c-valprint.c (c_value_print_struct): New function.
7011 (c_value_print_inner): Use c_value_print_struct.
7012 * c-lang.h (cp_print_value_fields): Declare.
7013
7014 2020-03-13 Tom Tromey <tom@tromey.com>
7015
7016 * c-valprint.c (c_value_print_array): New function.
7017 (c_value_print_inner): Use it.
7018
7019 2020-03-13 Tom Tromey <tom@tromey.com>
7020
7021 * c-valprint.c (c_value_print_memberptr): New function.
7022 (c_value_print_inner): Use it.
7023
7024 2020-03-13 Tom Tromey <tom@tromey.com>
7025
7026 * c-valprint.c (c_value_print_int): New function.
7027 (c_value_print_inner): Use it.
7028
7029 2020-03-13 Tom Tromey <tom@tromey.com>
7030
7031 * c-valprint.c (c_value_print_ptr): New function.
7032 (c_value_print_inner): Use it.
7033
7034 2020-03-13 Tom Tromey <tom@tromey.com>
7035
7036 * c-valprint.c (c_value_print_inner): Rewrite.
7037
7038 2020-03-13 Tom Tromey <tom@tromey.com>
7039
7040 * valprint.c (generic_value_print_complex): New function.
7041 (generic_value_print): Use it.
7042
7043 2020-03-13 Tom Tromey <tom@tromey.com>
7044
7045 * valprint.c (generic_val_print_float): Don't call
7046 val_print_scalar_formatted.
7047 (generic_val_print, generic_value_print): Update.
7048
7049 2020-03-13 Tom Tromey <tom@tromey.com>
7050
7051 * valprint.c (generic_value_print_char): New function
7052 (generic_value_print): Use it.
7053
7054 2020-03-13 Tom Tromey <tom@tromey.com>
7055
7056 * valprint.c (generic_value_print_int): New function.
7057 (generic_value_print): Use it.
7058
7059 2020-03-13 Tom Tromey <tom@tromey.com>
7060
7061 * valprint.c (generic_value_print_bool): New function.
7062 (generic_value_print): Use it.
7063
7064 2020-03-13 Tom Tromey <tom@tromey.com>
7065
7066 * valprint.c (generic_val_print_func): Simplify.
7067 (generic_val_print, generic_value_print): Update.
7068
7069 2020-03-13 Tom Tromey <tom@tromey.com>
7070
7071 * valprint.c (generic_val_print_flags): Remove.
7072 (generic_val_print, generic_value_print): Update.
7073 (val_print_type_code_flags): Add original_value parameter.
7074
7075 2020-03-13 Tom Tromey <tom@tromey.com>
7076
7077 * valprint.c (generic_val_print): Update.
7078 (generic_value_print): Update.
7079 * valprint.c (generic_val_print_enum): Don't call
7080 val_print_scalar_formatted.
7081
7082 2020-03-13 Tom Tromey <tom@tromey.com>
7083
7084 * valprint.c (generic_value_print): Call generic_value_print_ptr.
7085 * valprint.c (generic_value_print_ptr): New function.
7086
7087 2020-03-13 Tom Tromey <tom@tromey.com>
7088
7089 * valprint.c (generic_value_print): Rewrite.
7090
7091 2020-03-13 Tom Tromey <tom@tromey.com>
7092
7093 * p-valprint.c (pascal_object_print_value_fields)
7094 (pascal_object_print_value): New functions.
7095
7096 2020-03-13 Tom Tromey <tom@tromey.com>
7097
7098 * p-valprint.c (pascal_value_print_inner): Rewrite.
7099
7100 2020-03-13 Tom Tromey <tom@tromey.com>
7101
7102 * f-valprint.c (f_value_print_innner): Rewrite.
7103
7104 2020-03-13 Tom Tromey <tom@tromey.com>
7105
7106 * m2-valprint.c (m2_print_unbounded_array): New overload.
7107 (m2_print_unbounded_array): Update.
7108 (m2_print_array_contents): Take a struct value.
7109 (m2_value_print_inner): Rewrite.
7110
7111 2020-03-13 Tom Tromey <tom@tromey.com>
7112
7113 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
7114 (d_value_print_inner): New function.
7115 * d-lang.h (d_value_print_inner): Declare.
7116 * d-lang.c (d_language_defn): Use d_value_print_inner.
7117
7118 2020-03-13 Tom Tromey <tom@tromey.com>
7119
7120 * go-valprint.c (go_value_print_inner): New function.
7121 * go-lang.h (go_value_print_inner): Declare.
7122 * go-lang.c (go_language_defn): Use go_value_print_inner.
7123
7124 2020-03-13 Tom Tromey <tom@tromey.com>
7125
7126 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
7127 API.
7128 (rust_val_print): Rewrite.
7129 (rust_value_print_inner): New function, from rust_val_print.
7130 (rust_language_defn): Use rust_value_print_inner.
7131
7132 2020-03-13 Tom Tromey <tom@tromey.com>
7133
7134 * ada-valprint.c (ada_value_print_inner): New function.
7135 * ada-lang.h (ada_value_print_inner): Declare.
7136 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
7137
7138 2020-03-13 Tom Tromey <tom@tromey.com>
7139
7140 * f-valprint.c (f_value_print_innner): New function.
7141 * f-lang.h (f_value_print_innner): Declare.
7142 * f-lang.c (f_language_defn): Use f_value_print_innner.
7143
7144 2020-03-13 Tom Tromey <tom@tromey.com>
7145
7146 * p-valprint.c (pascal_value_print_inner): New function.
7147 * p-lang.h (pascal_value_print_inner): Declare.
7148 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
7149
7150 2020-03-13 Tom Tromey <tom@tromey.com>
7151
7152 * m2-valprint.c (m2_value_print_inner): New function.
7153 * m2-lang.h (m2_value_print_inner): Declare.
7154 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
7155
7156 2020-03-13 Tom Tromey <tom@tromey.com>
7157
7158 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
7159 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
7160 * c-valprint.c (c_value_print_inner): New function.
7161 * c-lang.h (c_value_print_inner): Declare.
7162 * c-lang.c (c_language_defn, cplus_language_defn)
7163 (asm_language_defn, minimal_language_defn): Use
7164 c_value_print_inner.
7165
7166 2020-03-13 Tom Tromey <tom@tromey.com>
7167
7168 * p-valprint.c (pascal_object_print_value_fields): Now static.
7169 * p-lang.h (pascal_object_print_value_fields): Don't declare.
7170
7171 2020-03-13 Tom Tromey <tom@tromey.com>
7172
7173 * c-valprint.c (c_val_print_array): Simplify.
7174
7175 2020-03-13 Tom Tromey <tom@tromey.com>
7176
7177 * valprint.c (value_print_array_elements): New function.
7178 * valprint.h (value_print_array_elements): Declare.
7179
7180 2020-03-13 Tom Tromey <tom@tromey.com>
7181
7182 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
7183 * mips-tdep.c (mips_print_register): Use
7184 value_print_scalar_formatted.
7185
7186 2020-03-13 Tom Tromey <tom@tromey.com>
7187
7188 * valprint.h (value_print_scalar_formatted): Declare.
7189 * valprint.c (value_print_scalar_formatted): New function.
7190
7191 2020-03-13 Tom Tromey <tom@tromey.com>
7192
7193 * valprint.h (generic_value_print): Declare.
7194 * valprint.c (generic_value_print): New function.
7195
7196 2020-03-13 Tom Tromey <tom@tromey.com>
7197
7198 * valprint.c (do_val_print): Call la_value_print_inner, if
7199 available.
7200 * rust-lang.c (rust_language_defn): Update.
7201 * p-lang.c (pascal_language_defn): Update.
7202 * opencl-lang.c (opencl_language_defn): Update.
7203 * objc-lang.c (objc_language_defn): Update.
7204 * m2-lang.c (m2_language_defn): Update.
7205 * language.h (struct language_defn) <la_value_print_inner>: New
7206 member.
7207 * language.c (unknown_language_defn, auto_language_defn): Update.
7208 * go-lang.c (go_language_defn): Update.
7209 * f-lang.c (f_language_defn): Update.
7210 * d-lang.c (d_language_defn): Update.
7211 * c-lang.c (c_language_defn, cplus_language_defn)
7212 (asm_language_defn, minimal_language_defn): Update.
7213 * ada-lang.c (ada_language_defn): Update.
7214
7215 2020-03-13 Tom Tromey <tom@tromey.com>
7216
7217 * c-valprint.c (c_value_print): Use common_val_print.
7218
7219 2020-03-13 Tom Tromey <tom@tromey.com>
7220
7221 * cp-valprint.c (cp_print_static_field): Use common_val_print.
7222
7223 2020-03-13 Tom Tromey <tom@tromey.com>
7224
7225 * f-valprint.c (f77_print_array_1, f_val_print): Use
7226 common_val_print.
7227
7228 2020-03-13 Tom Tromey <tom@tromey.com>
7229
7230 * riscv-tdep.c (riscv_print_one_register_info): Use
7231 common_val_print.
7232
7233 2020-03-13 Tom Tromey <tom@tromey.com>
7234
7235 * mi/mi-main.c (output_register): Use common_val_print.
7236
7237 2020-03-13 Tom Tromey <tom@tromey.com>
7238
7239 * infcmd.c (default_print_one_register_info): Use
7240 common_val_print.
7241
7242 2020-03-13 Tom Tromey <tom@tromey.com>
7243
7244 * valprint.h (common_val_print_checked): Declare.
7245 * valprint.c (common_val_print_checked): New function.
7246 * stack.c (print_frame_arg): Use common_val_print_checked.
7247
7248 2020-03-13 Tom Tromey <tom@tromey.com>
7249
7250 * valprint.c (do_val_print): New function, from val_print.
7251 (val_print): Use do_val_print.
7252 (common_val_print): Use do_val_print.
7253
7254 2020-03-13 Tom Tromey <tom@tromey.com>
7255
7256 * valprint.c (value_print): Use scoped_value_mark.
7257
7258 2020-03-13 Tom de Vries <tdevries@suse.de>
7259
7260 PR symtab/25646
7261 * psymtab.c (partial_symtab::partial_symtab): Don't set
7262 globals_offset and statics_offset. Push element onto
7263 current_global_psymbols and current_static_psymbols stacks.
7264 (concat): New function.
7265 (end_psymtab_common): Set globals_offset and statics_offset. Pop
7266 element from current_global_psymbols and current_static_psymbols
7267 stacks. Concat popped elements to global_psymbols and
7268 static_symbols.
7269 (add_psymbol_to_list): Use current_global_psymbols and
7270 current_static_psymbols stacks.
7271 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
7272 current_static_psymbols fields.
7273
7274 2020-03-12 Christian Biesinger <cbiesinger@google.com>
7275
7276 * corelow.c (sniff_core_bfd): Remove.
7277 (class core_target) <m_core_vec>: Remove.
7278 (core_target::core_target): Update.
7279 (core_file_fns): Remove.
7280 (deprecated_add_core_fns): Remove.
7281 (default_core_sniffer): Remove.
7282 (sniff_core_bfd): Remove.
7283 (default_check_format): Remove.
7284 (gdb_check_format): Remove.
7285 (core_target_open): Update.
7286 (core_target::get_core_register_section): Update.
7287 (get_core_registers_cb): Update.
7288 (core_target::fetch_registers): Update.
7289 * gdbcore.h (struct core_fns): Remove.
7290 (deprecated_add_core_fns): Remove.
7291 (default_core_sniffer): Remove.
7292 (default_check_format): Remove.
7293
7294 2020-03-12 Tom Tromey <tom@tromey.com>
7295
7296 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
7297 CORE_ADDR.
7298 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
7299
7300 2020-03-12 Tom Tromey <tom@tromey.com>
7301
7302 * remote.c (remote_target::download_tracepoint)
7303 (remote_target::enable_tracepoint)
7304 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
7305 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
7306 sprintf_vma.
7307
7308 2020-03-12 Tom Tromey <tom@tromey.com>
7309
7310 * symfile-mem.c: Update CORE_ADDR size assert.
7311
7312 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7313
7314 * selftest.m4: Move to gdbsupport/.
7315 * acinclude.m4: Update path to selftest.m4.
7316
7317 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7318
7319 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
7320 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
7321 gdbarch-selfselftests.c and selftest-arch.c.
7322 (SUBDIR_UNITTESTS_OBS): Rename to...
7323 (SELFTESTS_OBS): ... this.
7324 (COMMON_SFILES): Remove disasm-selftests.c and
7325 gdbarch-selftests.c.
7326 * configure.ac: Don't add selftest-arch.{c,o} to
7327 CONFIG_{SRCS,OBS}.
7328 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
7329 preprocessor conditions.
7330
7331 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7332
7333 * configure.ac: Don't source bfd/development.sh.
7334 * selftest.m4: Modify comment.
7335 * configure: Re-generate.
7336
7337 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7338
7339 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
7340 not "true" or "false".
7341 * configure: Re-generate.
7342
7343 2020-03-12 Christian Biesinger <cbiesinger@google.com>
7344
7345 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
7346 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
7347 renamed to arm_nbsd_supply_gregset.
7348 (fetch_register): Update to call arm_nbsd_supply_gregset.
7349 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
7350 (arm_netbsd_nat_target::fetch_registers): Update.
7351 (fetch_elfcore_registers): Removed.
7352 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
7353 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
7354 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
7355 not require NetBSD system headers.
7356 (arm_nbsd_regset): New struct.
7357 (arm_nbsd_iterate_over_regset_sections): New function.
7358 (arm_netbsd_init_abi_common): Updated to call
7359 set_gdbarch_iterate_over_regset_sections.
7360 * arm-nbsd-tdep.h: New file.
7361
7362 2020-03-11 Kevin Buettner <kevinb@redhat.com>
7363
7364 * symtab.c (find_pc_sect_line): Add check which prevents infinite
7365 recursion.
7366
7367 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
7368
7369 * configure: Re-generate.
7370
7371 2020-03-11 Tom Tromey <tromey@adacore.com>
7372
7373 * ada-typeprint.c (print_choices): Fix comment.
7374
7375 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
7376
7377 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
7378 previous item in the list, when the list has no items.
7379
7380 2020-03-11 Tom de Vries <tdevries@suse.de>
7381
7382 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
7383 PROP_LOCLIST handling code.
7384
7385 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
7386
7387 * buildsym-legacy.c (record_line): Pass extra parameter to
7388 record_line.
7389 * buildsym.c (buildsym_compunit::record_line): Take an extra
7390 parameter, reduce duplication in the line table, and record the
7391 is_stmt flag in the line table.
7392 * buildsym.h (buildsym_compunit::record_line): Add extra
7393 parameter.
7394 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
7395 non-statement lines.
7396 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
7397 this to the symtab builder.
7398 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
7399 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
7400 through to dwarf_record_line_1.
7401 * infrun.c (process_event_stop_test): When stepping, don't stop at
7402 a non-statement instruction, and only refresh the step info when
7403 we land in the middle of a line's range. Also add an extra
7404 comment.
7405 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
7406 field.
7407 * record-btrace.c (btrace_find_line_range): Only record lines
7408 marked as is-statement.
7409 * stack.c (frame_show_address): Show the frame address if we are
7410 in a non-statement sal.
7411 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
7412 (maintenance_print_one_line_table): Print a header for the is_stmt
7413 column, and include is_stmt information in the output.
7414 * symtab.c (find_pc_sect_line): Find lines marked as statements in
7415 preference to non-statements.
7416 (find_pcs_for_symtab_line): Prefer is-statement entries.
7417 (find_line_common): Likewise.
7418 * symtab.h (struct linetable_entry): Add is_stmt field.
7419 (struct symtab_and_line): Likewise.
7420 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
7421 arranging the line table.
7422
7423 2020-03-07 Tom de Vries <tdevries@suse.de>
7424
7425 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
7426 DIE.
7427
7428 2020-03-07 Tom Tromey <tom@tromey.com>
7429
7430 * valops.c (value_literal_complex): Remove obsolete comment.
7431 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
7432 comment.
7433
7434 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7435
7436 * infrun.h: Forward-declare thread_info.
7437 (set_step_info): Add thread_info parameter, add doc.
7438 * infrun.c (set_step_info): Add thread_info parameter, move doc
7439 to header.
7440 * infrun.c (process_event_stop_test): Pass thread to
7441 set_step_info call.
7442 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
7443 set_step_info.
7444 (prepare_one_step): Add thread_info parameter, pass it to
7445 set_step_frame and prepare_one_step (recursive) call.
7446 (step_1): Pass thread to prepare_one_step call.
7447 (step_command_fsm::should_stop): Pass thread to
7448 prepare_one_step.
7449 (until_next_fsm): Pass thread to set_step_frame call.
7450 (finish_command): Pass thread to set_step_info call.
7451
7452 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
7453
7454 * windows-tdep.c (windows_solib_create_inferior_hook):
7455 Check if inferior is running.
7456
7457 2020-03-06 Tom de Vries <tdevries@suse.de>
7458
7459 * NEWS: Fix "the the".
7460 * ctfread.c: Same.
7461
7462 2020-03-06 Tom de Vries <tdevries@suse.de>
7463
7464 * psymtab.c (psymtab_to_symtab): Don't print "done.".
7465
7466 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7467
7468 * .dir-locals.el: Add a comment referencing the other copies of
7469 this file.
7470
7471 2020-03-05 John Baldwin <jhb@FreeBSD.org>
7472
7473 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
7474 psargs.
7475
7476 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7477
7478 * .gitattributes: New file.
7479
7480 2020-03-04 Tom Tromey <tom@tromey.com>
7481
7482 * symmisc.c (print_symbol_bcache_statistics)
7483 (print_objfile_statistics): Update.
7484 * symfile.c (allocate_symtab): Use intern.
7485 * psymtab.c (partial_symtab::partial_symtab): Use intern.
7486 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
7487 macro_cache>: Remove.
7488 <string_cache>: New member.
7489 (struct objfile) <intern>: New methods.
7490 * elfread.c (elf_symtab_read): Use intern.
7491 * dwarf2/read.c (fixup_go_packaging): Intern package name.
7492 (dwarf2_compute_name, dwarf2_physname)
7493 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
7494 names.
7495 (guess_partial_die_structure_name): Update.
7496 (partial_die_info::fixup): Intern name.
7497 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
7498 name.
7499 (dwarf2_name): Intern name. Update.
7500 * buildsym.c (buildsym_compunit::get_macro_table): Use
7501 string_cache.
7502
7503 2020-03-04 Tom Tromey <tom@tromey.com>
7504
7505 * jit.c (bfd_open_from_target_memory): Make "target" const.
7506 * corefile.c (gnutarget): Now const.
7507 * gdbcore.h (gnutarget): Now const.
7508
7509 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
7510
7511 * NEWS: Mention support for WOW64 processes.
7512 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
7513 (amd64_windows_segment_register_p): Remove static.
7514 (_initialize_amd64_windows_nat): Update.
7515 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
7516 * i386-windows-nat.c (context_offset): Update.
7517 (i386_mappings): Rename and remove static.
7518 (i386_windows_segment_register_p): Remove static.
7519 (_initialize_i386_windows_nat): Update.
7520 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
7521 (STATUS_WX86_SINGLE_STEP): New macro.
7522 (EnumProcessModulesEx): New macro.
7523 (Wow64SuspendThread): New macro.
7524 (Wow64GetThreadContext): New macro.
7525 (Wow64SetThreadContext): New macro.
7526 (Wow64GetThreadSelectorEntry): New macro.
7527 (windows_set_context_register_offsets): Add static.
7528 (windows_set_segment_register_p): Likewise.
7529 (windows_add_thread): Adapt for WOW64 processes.
7530 (windows_fetch_one_register): Likewise.
7531 (windows_nat_target::fetch_registers): Likewise.
7532 (windows_store_one_register): Likewise.
7533 (display_selector): Likewise.
7534 (display_selectors): Likewise.
7535 (handle_exception): Likewise.
7536 (windows_continue): Likewise.
7537 (windows_nat_target::resume): Likewise.
7538 (windows_add_all_dlls): Likewise.
7539 (do_initial_windows_stuff): Likewise.
7540 (windows_nat_target::attach): Likewise.
7541 (windows_get_exec_module_filename): Likewise.
7542 (windows_nat_target::create_inferior): Likewise.
7543 (windows_xfer_siginfo): Likewise.
7544 (_initialize_loadable): Initialize Wow64SuspendThread,
7545 Wow64GetThreadContext, Wow64SetThreadContext,
7546 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
7547 * windows-nat.h (windows_set_context_register_offsets):
7548 Remove declaration.
7549 (windows_set_segment_register_p): Likewise.
7550 (i386_windows_segment_register_p): Add declaration.
7551 (amd64_windows_segment_register_p): Likewise.
7552
7553 2020-03-04 Luis Machado <luis.machado@linaro.org>
7554
7555 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
7556 in "info registers" for AArch64/ARM.
7557
7558 The change caused "info registers" to not print GPR's.
7559
7560 gdb/ChangeLog:
7561
7562 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
7563
7564 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
7565 when reg->group is empty and reggroup is not.
7566
7567 2020-03-03 Tom Tromey <tromey@adacore.com>
7568
7569 * dwarf2/frame.c (struct dwarf2_frame_cache)
7570 <checked_tailcall_bottom, entry_cfa_sp_offset,
7571 entry_cfa_sp_offset_p>: Remove members.
7572 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
7573 (dwarf2_frame_prev_register): Don't call
7574 dwarf2_tailcall_sniffer_first.
7575 (dwarf2_append_unwinders): Don't append tailcall unwinder.
7576 * frame-unwind.c (add_unwinder): New fuction.
7577 (frame_unwind_init): Use it. Add tailcall unwinder.
7578
7579 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
7580 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
7581
7582 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
7583 value should be printed as true.
7584
7585 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
7586
7587 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
7588 (windows_init_abi): Set and use windows_so_ops.
7589
7590 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
7591
7592 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
7593 when verifying if dealing with a convenience variable.
7594
7595 2020-03-03 Luis Machado <luis.machado@linaro.org>
7596
7597 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
7598
7599 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7600
7601 * infrun.c (gdbarch_supports_displaced_stepping): New.
7602 (use_displaced_stepping): Break up conditions in smaller pieces.
7603 Use gdbarch_supports_displaced_stepping.
7604 (displaced_step_prepare_throw): Use
7605 gdbarch_supports_displaced_stepping.
7606
7607 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
7608
7609 * NEWS: Mention new behaviour of the history filename.
7610 * top.c (write_history_p): Add comment.
7611 (show_write_history_p): Add header comment, give a different
7612 message when history writing is on, but the history filename is
7613 empty.
7614 (history_filename): Add comment.
7615 (history_filename_empty): New function.
7616 (show_history_filename): Add header comment, give a different
7617 message when the filename is empty.
7618 (init_history): Compare history_filename against nullptr, and only
7619 read history if the filename is not empty.
7620 (set_history_filename): Add header comment, and only make
7621 non-empty filenames absolute.
7622 (init_main): Make the filename argument to 'set history filename'
7623 optional.
7624
7625 2020-03-02 Christian Biesinger <cbiesinger@google.com>
7626
7627 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
7628 (arm_supply_vfpregset): ...this, and update to use VFP registers.
7629 (fetch_fp_register): Update.
7630 (fetch_fp_regs): Update.
7631 (store_fp_register): Update.
7632 (store_fp_regs): Update.
7633 (arm_netbsd_nat_target::read_description): New function.
7634 (fetch_elfcore_registers): Update.
7635
7636 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
7637
7638 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
7639 general_thread if the stop reply is missing a thread-id.
7640 (remote_target::process_stop_reply): Use the first non-exited
7641 thread if the target didn't pass a thread-id.
7642 * infrun.c (do_target_wait): Move call to
7643 switch_to_inferior_no_thread to ....
7644 (do_target_wait_1): ... here.
7645
7646 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
7647
7648 * debuginfod-support.c: Include defs.h first.
7649
7650 2020-02-28 Tom de Vries <tdevries@suse.de>
7651
7652 * symfile.c (set_initial_language): Use default language for lookup.
7653
7654 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
7655
7656 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
7657 reader variable, pass `this` to read_cutu_die_from_dwo.
7658
7659 2020-02-27 Aaron Merey <amerey@redhat.com>
7660
7661 * source.c (open_source_file): Check for nullptr when computing
7662 srcpath.
7663
7664 2020-02-27 Tom Tromey <tromey@adacore.com>
7665
7666 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
7667 member.
7668 (dwarf2_add_field): Don't update nfields.
7669 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
7670
7671 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
7672
7673 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
7674 abs.
7675
7676 2020-02-26 Tom Tromey <tom@tromey.com>
7677
7678 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
7679 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
7680 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
7681 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
7682 per_cu_data.
7683
7684 2020-02-26 Tom Tromey <tom@tromey.com>
7685
7686 * dwarf2/index-write.c (psym_index_map): Change type.
7687 (add_address_entry_worker, write_one_signatured_type)
7688 (recursively_count_psymbols, recursively_write_psymbols)
7689 (class debug_names, psyms_seen_size, write_gdbindex)
7690 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
7691
7692 2020-02-26 Aaron Merey <amerey@redhat.com>
7693
7694 * Makefile.in: Handle optional debuginfod support.
7695 * NEWS: Update.
7696 * README: Add --with-debuginfod summary.
7697 * config.in: Regenerate.
7698 * configure: Regenerate.
7699 * configure.ac: Handle optional debuginfod support.
7700 * debuginfod-support.c: debuginfod helper functions.
7701 * debuginfod-support.h: Ditto.
7702 * doc/gdb.texinfo: Add --with-debuginfod to configure options
7703 summary.
7704 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
7705 when a dwz file cannot be found.
7706 * elfread.c (elf_symfile_read): Query debuginfod servers when a
7707 debuginfo file cannot be found.
7708 * source.c (open_source_file): Query debuginfod servers when a
7709 source file cannot be found.
7710 * top.c (print_gdb_configuration): Include
7711 --{with,without}-debuginfod in the output.
7712
7713 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7714
7715 * thread.c (thr_try_catch_cmd): Print thread name.
7716
7717 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
7718
7719 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
7720 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7721 dwarf2_fetch_die_type_sect_off): Move to...
7722 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
7723 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7724 dwarf2_fetch_die_type_sect_off): ... here.
7725 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
7726 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
7727 dwarf2_fetch_die_type_sect_off): Move doc to header file.
7728
7729 2020-02-26 Tom de Vries <tdevries@suse.de>
7730
7731 PR gdb/25603
7732 * symfile.c (set_initial_language): Exit-early if
7733 language_mode == language_mode_manual.
7734
7735 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
7736
7737 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
7738 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
7739 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
7740
7741 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
7742
7743 * gdbtypes.c (create_array_type_with_stride): Handle negative
7744 array strides.
7745 * valarith.c (value_subscripted_rvalue): Likewise.
7746
7747 2020-02-25 Luis Machado <luis.machado@linaro.org>
7748
7749 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
7750
7751 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
7752
7753 * loc.h (dwarf2_get_die_type): Move to...
7754 * read.h (dwarf2_get_die_type): ... here.
7755 * read.c (dwarf2_get_die_type): Move doc to header.
7756
7757 2020-02-25 Joel Brobecker <brobecker@adacore.com>
7758
7759 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
7760 'gnulib/Makefile.in' to the list.
7761
7762 2020-02-24 Tom Tromey <tom@tromey.com>
7763
7764 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
7765 Remove.
7766 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
7767 XOBNEWVEC.
7768
7769 2020-02-24 Tom Tromey <tom@tromey.com>
7770
7771 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
7772 New method.
7773 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
7774 (dw2_do_instantiate_symtab, dw2_get_file_names)
7775 (build_type_psymtab_dependencies, load_full_type_unit): Update.
7776
7777 2020-02-24 Tom Tromey <tom@tromey.com>
7778
7779 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
7780 make_scoped_restore.
7781 (dwarf2_psymtab::read_symtab): Don't clear
7782 reading_partial_symbols.
7783
7784 2020-02-24 Tom de Vries <tdevries@suse.de>
7785
7786 PR gdb/25592
7787 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
7788
7789 2020-02-24 Tom de Vries <tdevries@suse.de>
7790
7791 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
7792 commands layout next/prev/regs.
7793
7794 2020-02-22 Tom Tromey <tom@tromey.com>
7795
7796 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
7797 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
7798
7799 2020-02-22 Tom Tromey <tom@tromey.com>
7800
7801 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
7802
7803 2020-02-22 Tom Tromey <tom@tromey.com>
7804
7805 * tui/tui-win.c (_initialize_tui_win): Add usage text.
7806 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
7807 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
7808 * tui/tui.c (_initialize_tui): Add usage text.
7809
7810 2020-02-22 Tom Tromey <tom@tromey.com>
7811
7812 * tui/tui-win.c (tui_set_focus_command)
7813 (tui_set_win_height_command): Use error_no_arg.
7814 (_initialize_tui_win): Update help text.
7815 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
7816
7817 2020-02-22 Tom Tromey <tom@tromey.com>
7818
7819 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
7820 * tui/tui-disasm.h (struct tui_disasm_window)
7821 <display_start_addr>: Declare.
7822 * tui/tui-source.h (struct tui_source_window)
7823 <display_start_addr>: Declare.
7824 * tui/tui-winsource.h (struct tui_source_window_base)
7825 <show_source_line, display_start_addr>: New methods.
7826 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
7827 Rename and move to protected section.
7828 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
7829 (tui_source_window_base::do_erase_source_content): Update.
7830 (tui_source_window_base::show_source_line): Now a method.
7831 (tui_source_window_base::show_source_content)
7832 (tui_source_window_base::tui_source_window_base)
7833 (tui_source_window_base::rerender)
7834 (tui_source_window_base::refill)
7835 (tui_source_window_base::do_scroll_horizontal)
7836 (tui_source_window_base::set_is_exec_point_at)
7837 (tui_source_window_base::update_breakpoint_info)
7838 (tui_source_window_base::update_exec_info): Update.
7839 * tui/tui-source.c (tui_source_window::set_contents)
7840 (tui_source_window::showing_source_p)
7841 (tui_source_window::do_scroll_vertical)
7842 (tui_source_window::location_matches_p)
7843 (tui_source_window::line_is_displayed): Update.
7844 (tui_source_window::display_start_addr): New method.
7845 * tui/tui-disasm.c (tui_disasm_window::set_contents)
7846 (tui_disasm_window::do_scroll_vertical)
7847 (tui_disasm_window::location_matches_p): Update.
7848 (tui_disasm_window::display_start_addr): New method.
7849
7850 2020-02-22 Tom Tromey <tom@tromey.com>
7851
7852 * NEWS: Add entry for gdb.register_window_type.
7853 * tui/tui-layout.h (window_factory): New typedef.
7854 (tui_register_window): Declare.
7855 * tui/tui-layout.c (saved_tui_windows): New global.
7856 (tui_apply_current_layout): Use it.
7857 (tui_register_window): New function.
7858 * python/python.c (do_start_initialization): Call
7859 gdbpy_initialize_tui.
7860 (python_GdbMethods): Add "register_window_type" function.
7861 * python/python-internal.h (gdbpy_register_tui_window)
7862 (gdbpy_initialize_tui): Declare.
7863 * python/py-tui.c: New file.
7864 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
7865
7866 2020-02-22 Tom Tromey <tom@tromey.com>
7867
7868 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
7869
7870 2020-02-22 Tom Tromey <tom@tromey.com>
7871
7872 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
7873 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
7874 * tui/tui-data.c (tui_set_win_with_focus): Remove.
7875 (tui_set_win_focus_to): Move from tui-win.c.
7876
7877 2020-02-22 Tom Tromey <tom@tromey.com>
7878
7879 * tui/tui-layout.c (make_standard_window, get_locator_window): New
7880 functions.
7881 (known_window_types): New global.
7882 (tui_get_window_by_name): Reimplement.
7883 (initialize_known_windows): New function.
7884 (validate_window_name): Rewrite.
7885 (_initialize_tui_layout): Call initialize_known_windows.
7886
7887 2020-02-22 Tom Tromey <tom@tromey.com>
7888
7889 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
7890 Remove constants.
7891 * tui/tui-winsource.h (struct tui_source_window_base)
7892 <tui_source_window_base>: Remove parameter.
7893 * tui/tui-winsource.c
7894 (tui_source_window_base::tui_source_window_base): Remove
7895 parameter.
7896 (tui_source_window_base::refill): Update.
7897 * tui/tui-stack.h (struct tui_locator_window)
7898 <tui_locator_window>: Update.
7899 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
7900 Default the constructor.
7901 * tui/tui-regs.h (struct tui_data_item_window)
7902 <tui_data_item_window>: Default the constructor.
7903 (struct tui_data_window) <tui_data_window>: Likewise.
7904 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
7905 Default the constructor.
7906 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
7907 Default the constructor.
7908 <type>: Remove.
7909 (struct tui_win_info) <tui_win_info>: Default the constructor.
7910 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
7911 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
7912 Default the constructor.
7913
7914 2020-02-22 Tom Tromey <tom@tromey.com>
7915
7916 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
7917 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
7918 * tui/tui-win.c (tui_resize_all): Don't call
7919 tui_delete_invisible_windows.
7920 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
7921 done.
7922 (tui_set_layout): Update.
7923 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
7924 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
7925 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
7926
7927 2020-02-22 Tom Tromey <tom@tromey.com>
7928
7929 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
7930 correctly.
7931
7932 2020-02-22 Tom Tromey <tom@tromey.com>
7933
7934 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
7935
7936 2020-02-22 Tom Tromey <tom@tromey.com>
7937
7938 * tui/tui-winsource.h (struct tui_source_window_iterator)
7939 <inner_iterator>: New etytypedef.
7940 <tui_source_window_iterator>: Take "end" parameter.
7941 <tui_source_window_iterator>: Take iterator.
7942 <operator*, advance>: Update.
7943 <m_iter>: Change type.
7944 <m_end>: New field.
7945 (struct tui_source_windows) <begin, end>: Update.
7946 * tui/tui-layout.c (tui_windows): New global.
7947 (tui_apply_current_layout): Clear tui_windows.
7948 (tui_layout_window::apply): Update tui_windows.
7949 * tui/tui-data.h (tui_windows): Declare.
7950 (all_tui_windows): Now inline function.
7951 (class tui_window_iterator, struct all_tui_windows): Remove.
7952
7953 2020-02-22 Tom Tromey <tom@tromey.com>
7954
7955 PR tui/17850:
7956 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
7957 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
7958 "height" argument.
7959 (class tui_layout_window) <get_sizes>: Likewise.
7960 (class tui_layout_split) <tui_layout_split>: Add "vertical"
7961 argument.
7962 <get_sizes>: Add "height" argument.
7963 <m_vertical>: New field.
7964 * tui/tui-layout.c (tui_layout_split::clone): Update.
7965 (tui_layout_split::get_sizes): Add "height" argument.
7966 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
7967 (tui_new_layout_command): Parse "-horizontal".
7968 (_initialize_tui_layout): Update help string.
7969 (tui_layout_split::specification): Add "-horizontal" when needed.
7970 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
7971 argument.
7972 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
7973 New methods.
7974
7975 2020-02-22 Tom Tromey <tom@tromey.com>
7976
7977 * tui/tui-layout.h (enum tui_adjust_result): New.
7978 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
7979 (class tui_layout_window) <adjust_size>: Return
7980 tui_adjust_result. Rewrite.
7981 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
7982 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
7983
7984 2020-02-22 Tom Tromey <tom@tromey.com>
7985
7986 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
7987 parameter and return types.
7988 (class tui_layout_base) <specification>: Add "depth".
7989 (class tui_layout_window) <specification>: Add "depth".
7990 (class tui_layout_split) <specification>: Add "depth".
7991 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
7992 and return types.
7993 (tui_new_layout_command): Parse sub-layouts.
7994 (_initialize_tui_layout): Update help string.
7995 (tui_layout_window::specification): Add "depth".
7996 (add_layout_command): Update.
7997
7998 2020-02-22 Tom Tromey <tom@tromey.com>
7999
8000 * NEWS: Add "tui new-layout" item.
8001 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
8002 Add new-layout command to help text.
8003 (validate_window_name): New function.
8004 (tui_new_layout_command): New function.
8005 (_initialize_tui_layout): Register "new-layout".
8006 (tui_layout_window::specification): New method.
8007 (tui_layout_window::specification): New method.
8008 * tui/tui-layout.h (class tui_layout_base) <specification>: New
8009 method.
8010 (class tui_layout_window) <specification>: New method.
8011 (class tui_layout_split) <specification>: New method.
8012
8013 2020-02-22 Tom Tromey <tom@tromey.com>
8014
8015 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
8016 * tui/tui-win.c (window_name_completer): Update comment.
8017 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
8018 Declare method.
8019 (class tui_layout_window) <replace_window>: Likewise.
8020 (class tui_layout_split) <replace_window>: Likewise.
8021 (tui_set_layout): Don't declare.
8022 (tui_set_initial_layout): Declare function.
8023 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
8024 (asm_regs_layout): New globals.
8025 (tui_current_layout, show_layout): Remove.
8026 (tui_set_layout, tui_add_win_to_layout): Rewrite.
8027 (find_layout, tui_apply_layout): New function.
8028 (layout_completer): Remove.
8029 (tui_next_layout): Reimplement.
8030 (tui_next_layout_command): New function.
8031 (tui_set_initial_layout, tui_prev_layout_command): New functions.
8032 (tui_regs_layout): Reimplement.
8033 (tui_regs_layout_command): New function.
8034 (extract_display_start_addr): Rewrite.
8035 (next_layout, prev_layout): Remove.
8036 (tui_layout_window::replace_window): New method.
8037 (tui_layout_split::replace_window): New method.
8038 (destroy_layout): New function.
8039 (layout_list): New global.
8040 (add_layout_command): New function.
8041 (initialize_layouts): Update.
8042 (tui_layout_command): New function.
8043 (_initialize_tui_layout): Install "layout" commands.
8044 * tui/tui-data.h (enum tui_layout_type): Remove.
8045 (tui_current_layout): Don't declare.
8046
8047 2020-02-22 Tom Tromey <tom@tromey.com>
8048
8049 * tui/tui-regs.c (tui_reg_layout): Remove.
8050 (tui_reg_command): Use tui_regs_layout.
8051 * tui/tui-layout.h (tui_reg_command): Declare.
8052 * tui/tui-layout.c (tui_reg_command): New function.
8053
8054 2020-02-22 Tom Tromey <tom@tromey.com>
8055
8056 * tui/tui.c (tui_rl_delete_other_windows): Call
8057 tui_remove_some_windows.
8058 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
8059 Declare method.
8060 (class tui_layout_window) <remove_windows>: New method.
8061 (class tui_layout_split) <remove_windows>: Declare.
8062 (tui_remove_some_windows): Declare.
8063 * tui/tui-layout.c (tui_remove_some_windows): New function.
8064 (tui_layout_split::remove_windows): New method.
8065
8066 2020-02-22 Tom Tromey <tom@tromey.com>
8067
8068 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
8069 * tui/tui-layout.h (tui_next_layout): Declare.
8070 * tui/tui-layout.c (tui_next_layout): New function.
8071
8072 2020-02-22 Tom Tromey <tom@tromey.com>
8073
8074 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
8075 correct coordinates.
8076
8077 2020-02-22 Tom Tromey <tom@tromey.com>
8078
8079 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
8080 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
8081 DATA_WIN case.
8082
8083 2020-02-22 Tom Tromey <tom@tromey.com>
8084
8085 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
8086 TUI_DISASM_WIN, not tui_win_list.
8087
8088 2020-02-22 Tom Tromey <tom@tromey.com>
8089
8090 * valprint.c (generic_val_print_enum_1)
8091 (val_print_type_code_flags): Style member names.
8092 * rust-lang.c (val_print_struct, rust_print_enum)
8093 (rust_print_struct_def, rust_internal_print_type): Style member
8094 names.
8095 * p-valprint.c (pascal_object_print_value_fields): Style member
8096 names. Only call fprintf_symbol_filtered for static members.
8097 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
8098 * f-valprint.c (f_val_print): Style member names.
8099 * f-typeprint.c (f_type_print_base): Style member names.
8100 * cp-valprint.c (cp_print_value_fields): Style member names. Only
8101 call fprintf_symbol_filtered for static members.
8102 (cp_print_class_member): Style member names.
8103 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
8104 member names.
8105 * ada-valprint.c (ada_print_scalar): Style enum names.
8106 (ada_val_print_enum): Likewise.
8107 * ada-typeprint.c (print_enum_type): Style enum names.
8108
8109 2020-02-21 Tom Tromey <tom@tromey.com>
8110
8111 * psympriv.h (struct partial_symtab): Update comment.
8112
8113 2020-02-21 Tom Tromey <tromey@adacore.com>
8114
8115 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
8116 type is CORE_ADDR.
8117
8118 2020-02-21 Tom de Vries <tdevries@suse.de>
8119
8120 PR gdb/25534
8121 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
8122 if dependencies[i]->user != NULL.
8123
8124 2020-02-21 Ali Tamur <tamur@google.com>
8125
8126 * dwarf2/read.c (dwarf2_name): Add null check.
8127
8128 2020-02-20 Tom Tromey <tom@tromey.com>
8129
8130 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
8131 ">=", in binary search.
8132 (dwarf2_find_containing_comp_unit): New overload.
8133 (run_test): New self-test.
8134 (_initialize_dwarf2_read): Register new test.
8135
8136 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
8137
8138 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
8139 * riscv-tdep.h: Likewise.
8140 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
8141 rv32-only CSR.
8142 * features/riscv/64bit-csr.xml: Regenerated.
8143
8144 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8145 Tom Tromey <tom@tromey.com>
8146
8147 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
8148 of 'fputc_unfiltered'.
8149 (putchar_unfiltered): Call 'fputc_unfiltered'.
8150 (fputc_unfiltered): Call 'fputs_unfiltered'.
8151
8152 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
8153
8154 * config.in: Regenerate.
8155 * configure: Regenerate.
8156 * configure.ac: Add --with-python-libdir option.
8157 * main.c: Use WITH_PYTHON_LIBDIR.
8158
8159 2020-02-19 Tom Tromey <tom@tromey.com>
8160
8161 * symtab.c (general_symbol_info::compute_and_set_names): Use
8162 obstack_strndup. Simplify call to symbol_set_demangled_name.
8163
8164 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
8165
8166 * dwarf2/read.c (allocate_signatured_type_table,
8167 allocate_dwo_unit_table, allocate_type_unit_groups_table,
8168 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
8169 Remove objfile parameter, update all callers.
8170
8171 2020-02-19 Doug Evans <dje@google.com>
8172
8173 PR rust/25535
8174 * rust-lang.c (rust_print_enum): Apply embedded_offset to
8175 rust_enum_variant calculation.
8176
8177 2020-02-19 Tom Tromey <tromey@adacore.com>
8178
8179 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
8180
8181 2020-02-19 Tom Tromey <tromey@adacore.com>
8182
8183 * ada-lang.c (cache_symbol): Use obstack_strdup.
8184
8185 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
8186
8187 * configure: Regenerate.
8188
8189 2020-02-19 Tom Tromey <tromey@adacore.com>
8190
8191 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
8192 NULL check.
8193
8194 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
8195
8196 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
8197
8198 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
8199
8200 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
8201 if GDBSERVER is not defined.
8202 (riscv_tdesc_cache): Likewise, also store const target_desc.
8203 (STATIC_IN_GDB): Define.
8204 (riscv_create_target_description): Update declaration with
8205 STATIC_IN_GDB.
8206 (riscv_lookup_target_description): New function, only define if
8207 GDBSERVER is not defined.
8208 * arch/riscv.h (riscv_create_target_description): Declare only
8209 when GDBSERVER is defined.
8210 (riscv_lookup_target_description): New declaration when GDBSERVER
8211 is not defined.
8212 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
8213 (riscv_linux_read_features): ...this, and return
8214 riscv_gdbarch_features instead of target_desc.
8215 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
8216 (riscv_linux_read_description): Rename to...
8217 (riscv_linux_read_features): ...this.
8218 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
8219 Update to use riscv_gdbarch_features and
8220 riscv_lookup_target_description.
8221 * riscv-tdep.c (riscv_find_default_target_description): Use
8222 riscv_lookup_target_description instead of
8223 riscv_create_target_description.
8224
8225 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8226
8227 * valprint.c (generic_val_print_enum_1): When printing a flag
8228 enum with value 0 and there is no enumerator with value 0, print
8229 just "0" instead of "(unknown: 0x0)".
8230
8231 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8232
8233 * valprint.c (generic_val_print_enum_1): Print unknown part of
8234 flag enum in hex.
8235
8236 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8237
8238 * dwarf2/read.c (update_enumeration_type_from_children): Allow
8239 flag enums to contain duplicate enumerators.
8240 * valprint.c (generic_val_print_enum_1): Update comment.
8241
8242 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8243
8244 * dwarf2/read.c: Include "count-one-bits.h".
8245 (update_enumeration_type_from_children): If an enumerator has
8246 multiple bits set, don't treat the enumeration as a "flag enum".
8247 * valprint.c (generic_val_print_enum_1): Assert that enumerators
8248 of flag enums have 0 or 1 bit set.
8249
8250 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
8251
8252 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
8253 conversion.
8254 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8255 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
8256 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8257 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
8258 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8259
8260 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8261
8262 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
8263
8264 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8265
8266 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
8267 displaced_step_closure_up.
8268 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
8269 (struct displaced_step_closure_up):
8270 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8271 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
8272 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
8273 Likewise.
8274 * gdbarch.sh (displaced_step_copy_insn): Likewise.
8275 * gdbarch.c, gdbarch.h: Re-generate.
8276 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
8277 displaced_step_closure_up.
8278 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8279 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
8280 * infrun.h (displaced_step_closure_up): New type alias.
8281 (struct displaced_step_inferior_state) <step_closure>: Change
8282 type to displaced_step_closure_up.
8283 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
8284 displaced_step_closure_up.
8285 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8286
8287 2020-02-14 Tom Tromey <tom@tromey.com>
8288
8289 * minidebug.c (gnu_debug_key): New global.
8290 (find_separate_debug_file_in_section): Use it.
8291
8292 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8293
8294 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
8295 std::unique_ptr.
8296 * gdbarch.c: Re-generate.
8297 * gdbarch.h: Re-generate.
8298 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
8299 change.
8300 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
8301 type to std::unique_ptr.
8302 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
8303 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8304 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
8305 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
8306 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
8307 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8308 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
8309 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
8310 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8311
8312 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8313
8314 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
8315 std::unique_ptr.
8316 (displaced_step_clear): Rename to...
8317 (displaced_step_reset): ... this. Just call displaced->reset ().
8318 (displaced_step_clear_cleanup): Rename to...
8319 (displaced_step_reset_cleanup): ... this.
8320 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
8321 (displaced_step_fixup): Likewise.
8322 (resume_1): Likewise.
8323 (handle_inferior_event): Restore child's memory before calling
8324 displaced_step_fixup on the parent.
8325 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
8326 to std::unique_ptr.
8327 <step_closure>: Change type to std::unique_ptr.
8328
8329 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8330
8331 * arm-tdep.c: Include count-one-bits.h.
8332 (cleanup_block_store_pc): Use count_one_bits.
8333 (cleanup_block_load_pc): Use count_one_bits.
8334 (arm_copy_block_xfer): Use count_one_bits.
8335 (thumb2_copy_block_xfer): Use count_one_bits.
8336 (thumb_copy_pop_pc_16bit): Use count_one_bits.
8337 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
8338 (thumb_get_next_pcs_raw): Use count_one_bits.
8339 (arm_get_next_pcs_raw): Use count_one_bits_l.
8340 * arch/arm.c (bitcount): Remove.
8341 * arch/arm.h (bitcount): Remove.
8342
8343 2020-02-14 Tom Tromey <tromey@adacore.com>
8344
8345 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
8346 Update.
8347 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
8348 * dwarf2/loc.c (call_site_find_chain_1): Return
8349 unique_xmalloc_ptr.
8350 (call_site_find_chain): Likewise.
8351
8352 2020-02-14 Richard Biener <rguenther@suse.de>
8353
8354 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
8355 on expression with division operators.
8356
8357 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8358
8359 * MAINTAINERS (Write After Approval): Adding myself.
8360
8361 2020-02-12 Tom Tromey <tom@tromey.com>
8362
8363 * event-loop.c (event_data, gdb_event, event_handler_func):
8364 Remove.
8365
8366 2020-02-12 Tom Tromey <tom@tromey.com>
8367
8368 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
8369 (dwarf2_frame_objfile_data): Add comment.
8370 (find_comp_unit, set_comp_unit): New functions.
8371 (dwarf2_frame_find_fde): Use find_comp_unit.
8372 (dwarf2_build_frame_info): Use set_comp_unit.
8373
8374 2020-02-12 Tom Tromey <tom@tromey.com>
8375
8376 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
8377 (comp_unit): Don't initialize objfile.
8378 (execute_cfa_program): Add text_offset parameter.
8379 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
8380 (dwarf2_frame_cache): Update.
8381 (dwarf2_build_frame_info): Don't set "objfile" member.
8382
8383 2020-02-12 Tom Tromey <tom@tromey.com>
8384
8385 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
8386 (decode_frame_entry): Likewise.
8387 (dwarf2_build_frame_info): Update.
8388
8389 2020-02-12 Tom Tromey <tom@tromey.com>
8390
8391 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
8392 (decode_frame_entry_1): Use the comp_unit obstack.
8393
8394 2020-02-12 Tom Tromey <tom@tromey.com>
8395
8396 * dwarf2/frame.c (struct comp_unit): Add initializers and
8397 constructor.
8398 (dwarf2_frame_objfile_data): Store a comp_unit.
8399 (dwarf2_frame_find_fde): Update.
8400 (dwarf2_build_frame_info): Use "new".
8401
8402 2020-02-12 Tom Tromey <tom@tromey.com>
8403
8404 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
8405 (dwarf2_fde_table): Typedef for std::vector.
8406 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
8407 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
8408 (decode_frame_entry): Update.
8409 (dwarf2_build_frame_info): Use "new".
8410
8411 2020-02-12 Christian Biesinger <cbiesinger@google.com>
8412
8413 * arm-tdep.c (arm_gdbarch_init): Update.
8414 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
8415 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
8416 have_neon, is_m>: Change to bool.
8417
8418 2020-02-12 Christian Biesinger <cbiesinger@google.com>
8419
8420 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
8421
8422 2020-02-12 Tom Tromey <tom@tromey.com>
8423
8424 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
8425
8426 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
8427
8428 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
8429 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
8430
8431 2020-02-11 Tom Tromey <tom@tromey.com>
8432
8433 * psymtab.h: Update comment.
8434
8435 2020-02-11 Tom Tromey <tom@tromey.com>
8436
8437 * gdb_obstack.h (struct auto_obstack): Use
8438 DISABLE_COPY_AND_ASSIGN.
8439
8440 2020-02-11 Tom Tromey <tom@tromey.com>
8441
8442 * dwarf2/frame.h (struct objfile): Don't forward declare.
8443
8444 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8445
8446 * cris-tdep.c (cris_supply_gregset): Change signature to match
8447 what struct regset expects.
8448 (cris_regset): New struct.
8449 (fetch_core_registers): Remove.
8450 (cris_iterate_over_regset_sections): New function.
8451 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
8452 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
8453
8454 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8455
8456 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
8457 registers.
8458
8459 2020-02-11 Christian Biesinger <cbiesinger@google.com>
8460
8461 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
8462
8463 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8464
8465 * configure: Re-generate.
8466
8467 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8468
8469 * configure: Re-generate.
8470
8471 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
8472
8473 * acinclude: Update warning.m4 path.
8474 * warning.m4: Move to gdbsupport.
8475
8476 2020-02-11 Tom Tromey <tromey@adacore.com>
8477
8478 * remote.c (remote_console_output): Update.
8479 * printcmd.c (printf_command): Update.
8480 * event-loop.c (gdb_wait_for_event): Update.
8481 * linux-nat.c (sigchld_handler): Update.
8482 * remote-sim.c (gdb_os_write_stdout): Update.
8483 (gdb_os_flush_stdout): Update.
8484 (gdb_os_flush_stderr): Update.
8485 (gdb_os_write_stderr): Update.
8486 * exceptions.c (print_exception): Update.
8487 * remote-fileio.c (remote_fileio_func_read): Update.
8488 (remote_fileio_func_write): Update.
8489 * tui/tui.c (tui_enable): Update.
8490 * tui/tui-interp.c (tui_interp::init): Update.
8491 * utils.c (init_page_info): Update.
8492 (putchar_unfiltered, fputc_unfiltered): Update.
8493 (gdb_flush): Update.
8494 (emit_style_escape): Update.
8495 (flush_wrap_buffer, fputs_maybe_filtered): Update.
8496 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
8497 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
8498 (stderr_file::write): Update.
8499 (stderr_file::puts): Update.
8500 * ui-file.h (ui_file_isatty, ui_file_write)
8501 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
8502 (ui_file_puts): Don't declare.
8503
8504 2020-02-10 Tom de Vries <tdevries@suse.de>
8505
8506 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
8507 sentinel to char *.
8508
8509 2020-02-09 Tom de Vries <tdevries@suse.de>
8510
8511 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
8512 filename if it matches "<artificial>".
8513
8514 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
8515
8516 * windows-tdep.c (struct enum_value_name): New struct.
8517 (create_enum): New function.
8518 (windows_get_siginfo_type): Create and use enum types.
8519
8520 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
8521
8522 * NEWS: Mention $_siginfo support for Windows.
8523 * windows-nat.c (handle_exception): Set siginfo_er.
8524 (windows_nat_target::mourn_inferior): Reset siginfo_er.
8525 (windows_xfer_siginfo): New function.
8526 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
8527 * windows-tdep.c (struct windows_gdbarch_data): New struct.
8528 (init_windows_gdbarch_data): New function.
8529 (get_windows_gdbarch_data): New function.
8530 (windows_get_siginfo_type): New function.
8531 (windows_init_abi): Register windows_get_siginfo_type.
8532 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
8533
8534 2020-02-08 Tom Tromey <tom@tromey.com>
8535
8536 * dwarf2/read.c (class cutu_reader) <cutu_reader,
8537 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
8538 <keep>: Declare method.
8539 <m_keep>: Remove member.
8540 <~cutu_reader>: Remove.
8541 (cutu_reader::init_tu_and_read_dwo_dies): Update.
8542 (cutu_reader::cutu_reader): Update.
8543 (cutu_reader::keep): Rename from ~cutu_reader.
8544 (process_psymtab_comp_unit, build_type_psymtabs_1)
8545 (process_skeletonless_type_unit, load_partial_comp_unit)
8546 (load_full_comp_unit, dwarf2_read_addr_index)
8547 (read_signatured_type): Update.
8548
8549 2020-02-08 Tom Tromey <tom@tromey.com>
8550
8551 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
8552 "want_partial_unit" parameter.
8553 (process_psymtab_comp_unit): Change want_partial_unit to bool.
8554 Inline check for DW_TAG_partial_unit.
8555 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
8556
8557 2020-02-08 Tom Tromey <tom@tromey.com>
8558
8559 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
8560 read.c.
8561 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
8562 read.c.
8563
8564 2020-02-08 Tom Tromey <tom@tromey.com>
8565
8566 * dwarf2/read.c (read_address): Move to comp-unit.c.
8567 (dwarf2_rnglists_process, dwarf2_ranges_process)
8568 (read_attribute_value, dwarf_decode_lines_1)
8569 (var_decode_location, decode_locdesc): Update.
8570 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
8571 read.c. Remove "cu" parameter.
8572 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
8573 method.
8574
8575 2020-02-08 Tom Tromey <tom@tromey.com>
8576
8577 * dwarf2/read.c (read_attribute_value, read_indirect_string)
8578 (read_indirect_line_string): Update.
8579 * dwarf2/comp-unit.c (read_offset): Remove.
8580 (read_comp_unit_head): Update.
8581 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
8582 method.
8583 (read_offset): Don't declare.
8584
8585 2020-02-08 Tom Tromey <tom@tromey.com>
8586
8587 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
8588 * dwarf2/read.c (struct comp_unit_head): Move to
8589 dwarf2/comp-unit.h.
8590 (enum class rcuh_kind): Move to comp-unit.h.
8591 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
8592 (read_comp_unit_head, error_check_comp_unit_head)
8593 (read_and_check_comp_unit_head): Move to comp-unit.c.
8594 (read_offset, dwarf_unit_type_name): Likewise.
8595 (create_debug_type_hash_table, read_cutu_die_from_dwo)
8596 (cutu_reader::cutu_reader, read_call_site_scope)
8597 (find_partial_die, follow_die_offset): Update.
8598 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
8599
8600 2020-02-08 Tom Tromey <tom@tromey.com>
8601
8602 * dwarf2/read.c (read_offset_1): Move to leb.c.
8603 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
8604 (dwarf_decode_macro_bytes): Update.
8605 * dwarf2/leb.c (read_offset): Rename; move from read.c.
8606 * dwarf2/leb.h (read_offset): Declare.
8607
8608 2020-02-08 Tom Tromey <tom@tromey.com>
8609
8610 * dwarf2/read.c (dwarf2_section_size): Remove.
8611 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
8612 Update.
8613 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
8614
8615 2020-02-08 Tom Tromey <tom@tromey.com>
8616
8617 * dwarf2/read.c (read_initial_length): Move to leb.c.
8618 * dwarf2/leb.h (read_initial_length): Declare.
8619 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
8620 handle_nonstd parameter.
8621 * dwarf2/frame.c (read_initial_length): Remove.
8622 (decode_frame_entry_1): Update.
8623
8624 2020-02-08 Tom Tromey <tom@tromey.com>
8625
8626 * dwarf2/loc.c (dwarf2_find_location_expression)
8627 (dwarf_evaluate_loc_desc::get_tls_address)
8628 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
8629 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
8630 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
8631 (dwarf2_compile_property_to_c)
8632 (dwarf2_loc_desc_get_symbol_read_needs)
8633 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
8634 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
8635 (loclist_describe_location, loclist_tracepoint_var_ref)
8636 (loclist_generate_c_location): Update.
8637 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
8638 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
8639 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
8640 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
8641 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
8642 (dwarf2_per_cu_data::addr_size)
8643 (dwarf2_per_cu_data::ref_addr_size)
8644 (dwarf2_per_cu_data::text_offset)
8645 (dwarf2_per_cu_data::addr_type): Now methods.
8646 (per_cu_header_read_in): Make per_cu "const".
8647 (dwarf2_version): Remove.
8648 (dwarf2_per_cu_data::int_type): Now a method.
8649 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
8650 (set_die_type, read_array_type, read_subrange_index_type)
8651 (read_tag_string_type, read_subrange_type): Update.
8652 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
8653 offset_size, ref_addr_size, text_offset, addr_type, version,
8654 objfile, int_type, addr_sized_int_type>: Declare methods.
8655
8656 2020-02-08 Tom Tromey <tom@tromey.com>
8657
8658 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
8659 Move earlier.
8660
8661 2020-02-08 Tom Tromey <tom@tromey.com>
8662
8663 * dwarf2/read.h (dwarf_line_debug): Declare.
8664 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
8665 * dwarf2/read.c: Move line_header code to new files.
8666 (dwarf_line_debug): No longer static.
8667 * dwarf2/line-header.c: New file.
8668 * dwarf2/line-header.h: New file.
8669
8670 2020-02-08 Tom Tromey <tom@tromey.com>
8671
8672 * dwarf2/read.c (struct line_header) <file_full_name,
8673 file_file_name>: Return unique_xmalloc_ptr.
8674 (line_header::file_file_name): Update.
8675 (line_header::file_full_name): Update.
8676 (dw2_get_file_names_reader): Update.
8677 (macro_start_file): Update.
8678
8679 2020-02-08 Tom Tromey <tom@tromey.com>
8680
8681 * dwarf2/read.c (struct line_header) <file_full_name,
8682 file_file_name>: Declare methods.
8683 (dw2_get_file_names_reader): Update.
8684 (file_file_name): Now a method.
8685 (file_full_name): Likewise.
8686 (macro_start_file): Update.
8687
8688 2020-02-08 Tom Tromey <tom@tromey.com>
8689
8690 * dwarf2/read.c (dwarf_always_disassemble)
8691 (show_dwarf_always_disassemble): Move to loc.c.
8692 (_initialize_dwarf2_read): Move "always-disassemble" registration
8693 to loc.c.
8694 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
8695 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
8696 static.
8697 (show_dwarf_always_disassemble): Move from read.c.
8698 (_initialize_dwarf2loc): Move always-disassemble from read.c.
8699
8700 2020-02-08 Tom Tromey <tom@tromey.com>
8701
8702 * dwarf2/read.c (~dwarf2_per_objfile): Update.
8703 (create_quick_file_names_table): Return htab_up.
8704 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
8705 Update.
8706 * dwarf2/read.h (struct dwarf2_per_objfile)
8707 <quick_file_names_table>: Now htab_up.
8708
8709 2020-02-08 Tom Tromey <tom@tromey.com>
8710
8711 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
8712
8713 2020-02-08 Tom Tromey <tom@tromey.com>
8714
8715 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
8716 Rewrite.
8717 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
8718 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
8719 (abbrev_table::abbrev_table): No longer inline.
8720 (ABBREV_HASH_SIZE): Remove.
8721 (abbrev_table::m_abbrevs): Now an htab_up.
8722
8723 2020-02-08 Tom Tromey <tom@tromey.com>
8724
8725 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
8726 (cutu_reader): Update.
8727 (build_type_psymtabs_1): Update.
8728 * dwarf2/abbrev.c (abbrev_table::read): Rename.
8729 (abbrev_table::alloc_abbrev): Update.
8730 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
8731 (abbrev_table::read): New static method, renamed from
8732 abbrev_table_read_table.
8733 (abbrev_table::alloc_abbrev)
8734 (abbrev_table::add_abbrev): Now private.
8735 (abbrev_table::abbrev_table): Now private.
8736 (abbrev_table::m_abbrev_obstack): Now private. Rename.
8737
8738 2020-02-08 Tom Tromey <tom@tromey.com>
8739
8740 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
8741 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
8742 htab_up.
8743
8744 2020-02-08 Tom Tromey <tom@tromey.com>
8745
8746 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
8747 htab_up.
8748 (lookup_dwo_unit_in_dwp): Update.
8749 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
8750 on obstack.
8751
8752 2020-02-08 Tom Tromey <tom@tromey.com>
8753
8754 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
8755 obstack.
8756
8757 2020-02-08 Tom Tromey <tom@tromey.com>
8758
8759 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
8760 line_header_hash.
8761 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
8762 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
8763 Change type to htab_up.
8764
8765 2020-02-08 Tom Tromey <tom@tromey.com>
8766
8767 * dwarf2/read.c (allocate_type_unit_groups_table): Return
8768 htab_up. Don't allocate on obstack.
8769 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
8770 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
8771 Change type to htab_up.
8772
8773 2020-02-08 Tom Tromey <tom@tromey.com>
8774
8775 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
8776 Change type to htab_up.
8777 * dwarf2/read.c (create_signatured_type_table_from_index)
8778 (create_signatured_type_table_from_debug_names)
8779 (create_all_type_units, add_type_unit)
8780 (lookup_dwo_signatured_type, lookup_signatured_type)
8781 (process_skeletonless_type_unit): Update.
8782 (create_debug_type_hash_table, create_debug_types_hash_table):
8783 Change type of types_htab.
8784 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
8785 htab_up. Don't allocate on obstack.
8786 (create_cus_hash_table): Change type of cus_htab parameter.
8787 (struct dwo_file) <cus, tus>: Now htab_up.
8788 (lookup_dwo_signatured_type, lookup_dwo_cutu)
8789 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
8790 (queue_and_load_all_dwo_tus): Update.
8791 * dwarf2/index-write.c (write_gdbindex): Update.
8792 (write_debug_names): Update.
8793
8794 2020-02-08 Tom Tromey <tom@tromey.com>
8795
8796 * dwarf2/read.h (struct dwarf2_queue_item): Move from
8797 dwarf2/read.c. Remove "next" member. Add constructor ntad
8798 destructor.
8799 (struct dwarf2_per_objfile) <queue>: New member.
8800 * dwarf2/read.c (struct dwarf2_queue_item): Move to
8801 dwarf2/read.h.
8802 (dwarf2_queue, dwarf2_queue_tail): Remove.
8803 (class dwarf2_queue_guard): Add parameter to constructor. Use
8804 DISABLE_COPY_AND_ASSIGN.
8805 <m_per_objfile>: New member.
8806 <~dwarf2_queue_guard>: Rewrite.
8807 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
8808 Update.
8809 (~dwarf2_queue_item): New.
8810
8811 2020-02-08 Tom Tromey <tom@tromey.com>
8812
8813 * dwarf2/read.c (struct die_info) <has_children>: New member.
8814 (dw2_get_file_names_reader): Remove has_children.
8815 (dw2_get_file_names): Update.
8816 (read_cutu_die_from_dwo): Remove has_children.
8817 (cutu_reader::init_tu_and_read_dwo_dies)
8818 (cutu_reader::cutu_reader): Update.
8819 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
8820 Remove has_children.
8821 (build_type_psymtabs_1, process_skeletonless_type_unit)
8822 (load_partial_comp_unit, load_full_comp_unit): Update.
8823 (create_dwo_cu_reader): Remove has_children.
8824 (create_cus_hash_table, read_die_and_children): Update.
8825 (read_full_die_1,read_full_die): Remove has_children.
8826 (read_signatured_type): Update.
8827 (class cutu_reader) <has_children>: Remove.
8828
8829 2020-02-08 Tom Tromey <tom@tromey.com>
8830
8831 * dwarf2/expr.c: Rename from dwarf2expr.c.
8832 * dwarf2/expr.h: Rename from dwarf2expr.h.
8833 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
8834 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
8835 * dwarf2/frame.c: Rename from dwarf2-frame.c.
8836 * dwarf2/frame.h: Rename from dwarf2-frame.h.
8837 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
8838 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
8839 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
8840 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
8841 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
8842 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
8843 * dwarf2/loc.c: Rename from dwarf2loc.c.
8844 * dwarf2/loc.h: Rename from dwarf2loc.h.
8845 * dwarf2/read.c: Rename from dwarf2read.c.
8846 * dwarf2/read.h: Rename from dwarf2read.h.
8847 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
8848 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
8849 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
8850 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
8851 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
8852 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
8853 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
8854 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
8855 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
8856 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
8857 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
8858 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
8859 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
8860 Update.
8861 * Makefile.in (COMMON_SFILES): Update.
8862 (HFILES_NO_SRCDIR): Update.
8863
8864 2020-02-08 Tom Tromey <tom@tromey.com>
8865
8866 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
8867 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
8868
8869 2020-02-08 Tom Tromey <tom@tromey.com>
8870
8871 * dwarf2read.h (struct die_info): Don't declare.
8872
8873 2020-02-08 Tom Tromey <tom@tromey.com>
8874
8875 * dwarf2read.h (die_info_ptr): Remove typedef.
8876
8877 2020-02-08 Tom Tromey <tom@tromey.com>
8878
8879 * dwarf2read.c (read_call_site_scope)
8880 (handle_data_member_location, dwarf2_add_member_fn)
8881 (mark_common_block_symbol_computed, read_common_block)
8882 (attr_to_dynamic_prop, partial_die_info::read)
8883 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
8884 (dwarf2_symbol_mark_computed, set_die_type): Update.
8885 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
8886 method.
8887 (attr_form_is_block): Don't declare.
8888 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
8889
8890 2020-02-08 Tom Tromey <tom@tromey.com>
8891
8892 * dwarf2read.c (dwarf2_find_base_address, )
8893 (read_call_site_scope, rust_containing_type)
8894 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
8895 (handle_data_member_location, dwarf2_add_member_fn)
8896 (get_alignment, read_structure_type, process_structure_scope)
8897 (mark_common_block_symbol_computed, read_common_block)
8898 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
8899 (partial_die_info::read, read_attribute_value, new_symbol)
8900 (lookup_die_type, dwarf2_get_ref_die_offset)
8901 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
8902 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
8903 (dwarf2_symbol_mark_computed): Update.
8904 * dwarf2/attribute.h (struct attribute) <value_as_address,
8905 form_is_section_offset, form_is_constant, form_is_ref>: Declare
8906 methods.
8907 (value_as_address, attr_form_is_section_offset)
8908 (attr_form_is_constant, attr_form_is_ref): Don't declare.
8909 * dwarf2/attribute.c (attribute::value_as_address)
8910 (attribute::form_is_section_offset, attribute::form_is_constant)
8911 (attribute::form_is_ref): Now methods.
8912
8913 2020-02-08 Tom Tromey <tom@tromey.com>
8914
8915 * dwarf2read.c (struct attribute, DW_STRING)
8916 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
8917 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
8918 (attr_form_is_block, attr_form_is_section_offset)
8919 (attr_form_is_constant, attr_form_is_ref): Move.
8920 * dwarf2/attribute.h: New file.
8921 * dwarf2/attribute.c: New file, from dwarf2read.c.
8922 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
8923
8924 2020-02-08 Tom Tromey <tom@tromey.com>
8925
8926 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
8927 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
8928 Move.
8929 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
8930 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
8931 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
8932 abbrev.c.
8933 * dwarf2/abbrev.h: New file.
8934 * dwarf2/abbrev.c: New file, from dwarf2read.c.
8935 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
8936
8937 2020-02-08 Tom Tromey <tom@tromey.com>
8938
8939 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
8940 (dwarf2_section_size, dwarf2_get_section_info)
8941 (create_signatured_type_table_from_debug_names)
8942 (create_addrmap_from_aranges, read_debug_names_from_section)
8943 (get_gdb_index_contents_from_section, read_comp_unit_head)
8944 (error_check_comp_unit_head, read_abbrev_offset)
8945 (create_debug_type_hash_table, init_cu_die_reader)
8946 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
8947 (read_comp_units_from_section, create_cus_hash_table)
8948 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
8949 (create_dwp_v2_section, dwarf2_rnglists_process)
8950 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
8951 (abbrev_table_read_table, read_indirect_string_at_offset_from)
8952 (read_indirect_string_from_dwz, read_addr_index_1)
8953 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
8954 (dwarf_decode_macro_bytes, dwarf_decode_macros)
8955 (fill_in_loclist_baton): Update.
8956 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
8957 get_containing_section, get_bfd_owner, get_bfd_section,
8958 get_file_name, get_id, get_flags, empty, read>: Declare methods.
8959 (dwarf2_read_section, get_section_name, get_section_file_name)
8960 (get_containing_section, get_section_bfd_owner)
8961 (get_section_bfd_section, get_section_name, get_section_file_name)
8962 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
8963 declare.
8964 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
8965 (dwarf2_section_info::get_bfd_owner)
8966 (dwarf2_section_info::get_bfd_section)
8967 (dwarf2_section_info::get_name)
8968 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
8969 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
8970 (dwarf2_section_info::read): Now methods.
8971 * dwarf-index-write.c (class debug_names): Update.
8972
8973 2020-02-08 Tom Tromey <tom@tromey.com>
8974
8975 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
8976 Move to dwarf2/section.h.
8977 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
8978 (get_section_bfd_section, get_section_name)
8979 (get_section_file_name, get_section_id, get_section_flags)
8980 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
8981 dwarf2/section.c.
8982 * dwarf2/section.h: New file.
8983 * dwarf2/section.c: New file, from dwarf2read.c.
8984 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
8985
8986 2020-02-08 Tom Tromey <tom@tromey.com>
8987
8988 * dwarf2read.h (read_unsigned_leb128): Don't declare.
8989 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
8990 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
8991 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
8992 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
8993 * dwarf2/leb.h: New file, from dwarf2read.c.
8994 * dwarf2/leb.c: New file, from dwarf2read.c.
8995 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
8996 Remove.
8997 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
8998 (COMMON_SFILES): Add dwarf2/leb.c.
8999
9000 2020-02-08 Joel Brobecker <brobecker@adacore.com>
9001
9002 GDB 9.1 released.
9003
9004 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
9005
9006 PR gdb/25190:
9007 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
9008 * gdb/remote.c (remote_console_output): Update.
9009 * gdb/ui-file.c (fputs_unfiltered): Rename to...
9010 (ui_file_puts): ...this.
9011 * gdb/ui-file.h (ui_file_puts): Add declaration.
9012 * gdb/utils.c (emit_style_escape): Update.
9013 (flush_wrap_buffer): Update.
9014 (fputs_maybe_filtered): Update.
9015 (fputs_unfiltered): Add function.
9016
9017 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
9018
9019 * gdb/event-loop.c (gdb_wait_for_event): Update.
9020 * gdb/printcmd.c (printf_command): Update.
9021 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
9022 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
9023 (gdb_os_flush_stderr): Update.
9024 * gdb/remote.c (remote_console_output): Update.
9025 * gdb/ui-file.c (gdb_flush): Rename to...
9026 (ui_file_flush): ...this.
9027 (stderr_file::write): Update.
9028 (stderr_file::puts): Update.
9029 * gdb/ui-file.h (gdb_flush): Rename to...
9030 (ui_file_flush): ...this.
9031 * gdb/utils.c (gdb_flush): Add function.
9032 * gdb/utils.h (gdb_flush): Add declaration.
9033
9034 2020-02-07 Tom Tromey <tromey@adacore.com>
9035
9036 PR breakpoints/24915:
9037 * source.c (find_and_open_source): Do not check basenames_may_differ.
9038
9039 2020-02-07 Tom Tromey <tom@tromey.com>
9040
9041 * README: Update gdbserver documentation.
9042 * gdbserver: Move to top level.
9043 * configure.tgt (build_gdbserver): Remove.
9044 * configure.ac: Remove --enable-gdbserver.
9045 * configure: Rebuild.
9046 * Makefile.in (distclean): Don't mention gdbserver.
9047
9048 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
9049
9050 * source-cache.c (source_cache::ensure): Surround
9051 get_plain_source_lines with a try/catch.
9052 (source_cache::get_line_charpos): Get rid of try/catch
9053 and only check for the return value of "ensure".
9054 * tui/tui-source.c (tui_source_window::set_contents):
9055 Simplify "nlines" calculation.
9056
9057 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
9058
9059 * MAINTAINERS (Write After Approval): Add myself.
9060
9061 2020-02-05 Christian Biesinger <cbiesinger@google.com>
9062
9063 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
9064 function call.
9065
9066 2020-02-05 Christian Biesinger <cbiesinger@google.com>
9067
9068 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
9069
9070 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
9071
9072 * nat/riscv-linux-tdesc.h: New file.
9073 * nat/riscv-linux-tdesc.c: New file, taking code from...
9074 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
9075 ... here.
9076 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
9077 NATDEPFILES.
9078
9079 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
9080
9081 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
9082 we don't set the fake simulator ptid to the null_ptid.
9083
9084 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
9085
9086 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
9087 * gdbthread.h (class thread_info) <resumed>: Likewise.
9088 * infrun.c (resume_1): Likewise.
9089 (proceed): Likewise.
9090 (infrun_thread_stop_requested): Likewise.
9091 (stop_all_threads): Likewise.
9092 (handle_inferior_event): Likewise.
9093 (restart_threads): Likewise.
9094 (finish_step_over): Likewise.
9095 (keep_going_stepped_thread): Likewise.
9096 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
9097 (linux_handle_extended_wait): Likewise.
9098 * record-btrace.c (get_thread_current_frame_id): Likewise.
9099 * record-full.c (record_full_wait_1): Likewise.
9100 * remote.c (remote_target::process_initial_stop_replies): Likewise.
9101 * target.c (target_resume): Likewise.
9102 * thread.c (set_running_thread): Likewise.
9103
9104 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
9105
9106 * f-valprint.c (f77_print_array_1): Changed datatype of index
9107 variable to LONGEST from int to enable it to contain bound
9108 values correctly.
9109
9110 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
9111
9112 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
9113 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
9114 offsets according to FLEN determined.
9115 (riscv_linux_nat_target::read_description): Determine FLEN
9116 dynamically.
9117 (riscv_linux_nat_target::fetch_registers): Size regset buffer
9118 according to FLEN determined.
9119 (riscv_linux_nat_target::store_registers): Likewise.
9120
9121 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
9122
9123 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
9124 when reg->group is empty and reggroup is not.
9125
9126 2020-01-31 Tom Tromey <tromey@adacore.com>
9127
9128 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
9129 Call beneath target's mourn_inferior after unpushing.
9130
9131 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
9132
9133 PR tui/9765
9134 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
9135 have enough lines to fill the screen, still return the lowest
9136 address we found.
9137
9138 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
9139
9140 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
9141 '-', '<', and '>' commands.
9142
9143 2020-01-29 Pedro Alves <palves@redhat.com>
9144 Sergio Durigan Junior <sergiodj@redhat.com>
9145
9146 * infcmd.c (construct_inferior_arguments): Assert that
9147 'argc' is greater than 0.
9148
9149 2020-01-29 Luis Machado <luis.machado@linaro.org>
9150
9151 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
9152 (BRK_INSN_MASK): Define to 0xd4200000.
9153 (aarch64_program_breakpoint_here_p): New function.
9154 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
9155 * arch-utils.c (default_program_breakpoint_here_p): Moved from
9156 breakpoint.c.
9157 * arch-utils.h (default_program_breakpoint_here_p): Moved from
9158 breakpoint.h
9159 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
9160 call gdbarch_program_breakpoint_here_p.
9161 (program_breakpoint_here): Moved to arch-utils.c, renamed to
9162 default_program_breakpoint_here_p, changed return type to bool and
9163 simplified.
9164 * breakpoint.h (program_breakpoint_here): Moved prototype to
9165 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
9166 return type to bool.
9167 * gdbarch.c: Regenerate.
9168 * gdbarch.h: Regenerate.
9169 * gdbarch.sh (program_breakpoint_here_p): New method.
9170 * infrun.c (handle_signal_stop): Call
9171 gdbarch_program_breakpoint_here_p.
9172
9173 2020-01-26 Tom Tromey <tom@tromey.com>
9174
9175 * ctfread.c (struct ctf_fp_info): Reindent.
9176 (_initialize_ctfread): Remove.
9177
9178 2020-01-26 Tom Tromey <tom@tromey.com>
9179
9180 * psymtab.c (partial_map_expand_apply)
9181 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
9182 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
9183 (psym_print_stats, psym_expand_symtabs_for_function)
9184 (psym_map_symbol_filenames, psym_map_matching_symbols)
9185 (psym_expand_symtabs_matching)
9186 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
9187 (maintenance_check_psymtabs): Use new methods.
9188 * psympriv.h (struct partial_symtab) <readin_p,
9189 get_compunit_symtab>: New methods.
9190 <readin, compunit_symtab>: Remove members.
9191 (struct standard_psymtab): New.
9192 (struct legacy_psymtab): Derive from standard_psymtab.
9193 * dwarf2read.h (struct dwarf2_psymtab): Derive from
9194 standard_psymtab.
9195 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
9196
9197 2020-01-26 Tom Tromey <tom@tromey.com>
9198
9199 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
9200 read_dependencies. Add assert.
9201 * psymtab.c (partial_symtab::read_dependencies): New method.
9202 * psympriv.h (struct partial_symtab) <read_dependencies>: New
9203 method.
9204 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
9205 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
9206 read_dependencies.
9207 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
9208 Add assert.
9209
9210 2020-01-26 Tom Tromey <tom@tromey.com>
9211
9212 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
9213 Call expand_psymtab.
9214 (xcoff_read_symtab): Call expand_psymtab.
9215 (xcoff_start_psymtab, xcoff_end_psymtab): Set
9216 legacy_expand_psymtab.
9217 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
9218 method.
9219 (struct legacy_psymtab) <expand_psymtab>: Implement.
9220 <legacy_expand_psymtab>: New member.
9221 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
9222 (parse_partial_symbols): Set legacy_expand_psymtab.
9223 (psymtab_to_symtab_1): Change argument order. Call
9224 expand_psymtab.
9225 (new_psymtab): Set legacy_expand_psymtab.
9226 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
9227 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
9228 expand_psymtab.
9229 (dwarf2_psymtab::expand_psymtab): Rename from
9230 psymtab_to_symtab_1. Call expand_psymtab.
9231 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
9232 (dbx_end_psymtab): Likewise.
9233 (dbx_psymtab_to_symtab_1): Change argument order. Call
9234 expand_psymtab.
9235 (dbx_read_symtab): Call expand_psymtab.
9236 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
9237 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
9238 (ctf_psymtab::read_symtab): Call expand_psymtab.
9239
9240 2020-01-26 Tom Tromey <tom@tromey.com>
9241
9242 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
9243 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
9244 messages.
9245 * mdebugread.c (mdebug_read_symtab): Remove prints.
9246 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
9247 assert.
9248 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
9249
9250 2020-01-26 Tom Tromey <tom@tromey.com>
9251
9252 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
9253 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
9254 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
9255 legacy_symtab.
9256 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
9257 * psymtab.c (psymtab_to_symtab): Call method.
9258 (dump_psymtab): Update.
9259 * psympriv.h (struct partial_symtab): Add virtual destructor.
9260 <read_symtab>: New method.
9261 (struct legacy_symtab): New.
9262 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
9263 (struct pst_map) <pst>: Now a legacy_psymtab.
9264 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
9265 (new_psymtab): Use legacy_psymtab.
9266 * dwarf2read.h (struct dwarf2_psymtab): New.
9267 (struct dwarf2_per_cu_data) <psymtab>: Use it.
9268 * dwarf2read.c (dwarf2_create_include_psymtab)
9269 (dwarf2_build_include_psymtabs, create_type_unit_group)
9270 (create_partial_symtab, process_psymtab_comp_unit_reader)
9271 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
9272 (set_partial_user): Use dwarf2_psymtab.
9273 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
9274 (psymtab_to_symtab_1, process_full_comp_unit)
9275 (process_full_type_unit, dwarf2_ranges_read)
9276 (dwarf2_get_pc_bounds, psymtab_include_file_name)
9277 (dwarf_decode_lines): Use dwarf2_psymtab.
9278 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
9279 (add_address_entry_worker, write_one_signatured_type)
9280 (recursively_count_psymbols, recursively_write_psymbols)
9281 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
9282 (write_debug_names): Likewise.
9283 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
9284 <pst>: Now a legacy_psymtab.
9285 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
9286 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
9287 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
9288 * ctfread.c (struct ctf_psymtab): New.
9289 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
9290 ctf_psymtab.
9291 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
9292 (create_partial_symtab): Return a ctf_psymtab.
9293 (scan_partial_symbols): Update.
9294
9295 2020-01-26 Tom Tromey <tom@tromey.com>
9296
9297 * xcoffread.c (xcoff_start_psymtab): Use new.
9298 * psymtab.c (partial_symtab::partial_symtab): New constructor,
9299 renamed from start_psymtab_common.
9300 * psympriv.h (struct partial_symtab): Add new constructor.
9301 (start_psymtab_common): Don't declare.
9302 * mdebugread.c (parse_partial_symbols): Use new.
9303 * dwarf2read.c (create_partial_symtab): Use new.
9304 * dbxread.c (start_psymtab): Use new.
9305 * ctfread.c (create_partial_symtab): Use new.
9306
9307 2020-01-26 Tom Tromey <tom@tromey.com>
9308
9309 * xcoffread.c (xcoff_end_psymtab): Use new.
9310 * psymtab.c (start_psymtab_common): Use new.
9311 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
9312 Update.
9313 * psympriv.h (struct partial_symtab): Add parameters to
9314 constructor. Don't inline.
9315 (allocate_psymtab): Don't declare.
9316 * mdebugread.c (new_psymtab): Use new.
9317 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
9318 * dbxread.c (dbx_end_psymtab): Use new.
9319
9320 2020-01-26 Tom Tromey <tom@tromey.com>
9321
9322 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
9323 allocate_psymtab. Update documentation.
9324 * psymtab.c (psymtab_storage::install_psymtab): Rename from
9325 allocate_psymtab. Do not use new.
9326 (allocate_psymtab): Use new. Update.
9327
9328 2020-01-26 Tom Tromey <tom@tromey.com>
9329
9330 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
9331 * psymtab.c (psym_print_stats): Update.
9332 * psympriv.h (struct partial_symtab) <readin,
9333 psymtabs_addrmap_supported, anonymous>: Now bool.
9334 * mdebugread.c (psymtab_to_symtab_1): Update.
9335 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
9336 (build_type_psymtabs_reader, psymtab_to_symtab_1)
9337 (process_full_comp_unit, process_full_type_unit): Update.
9338 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
9339 * ctfread.c (psymtab_to_symtab): Update.
9340
9341 2020-01-26 Tom Tromey <tom@tromey.com>
9342
9343 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
9344 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
9345 * psymtab.c (psymtab_storage): Delete psymtabs.
9346 (psymtab_storage::allocate_psymtab): Use new.
9347 (psymtab_storage::discard_psymtab): Use delete.
9348 * psympriv.h (struct partial_symtab): Add constructor and
9349 initializers.
9350
9351 2020-01-26 Tom Tromey <tom@tromey.com>
9352
9353 * machoread.c: Do not include psympriv.h.
9354
9355 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9356
9357 * NEWS: Mention the new option and the set/show commands.
9358
9359 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9360
9361 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
9362 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
9363 (validate_exec_file): New variables, enums, functions.
9364 (exec_file_locate_attach, print_section_info): Style the filenames.
9365 (_initialize_exec): Install show_exec_file_mismatch_command and
9366 set_exec_file_mismatch_command.
9367 * gdbcore.h (validate_exec_file): Declare.
9368 * infcmd.c (attach_command): Call validate_exec_file.
9369 * remote.c ( remote_target::remote_add_inferior): Likewise.
9370
9371 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9372
9373 * frame.c (find_frame_sal): Move call to get_next_frame into more
9374 inner scope.
9375 * inline-frame.c (inilne_state) <inline_state>: Update argument
9376 types.
9377 (inilne_state) <skipped_symbol>: Rename to...
9378 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
9379 (skip_inline_frames): Build vector of skipped symbols and use this
9380 to reate the inline_state.
9381 (inline_skipped_symbol): Add a comment and some assertions, fetch
9382 skipped symbol from the list.
9383
9384 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9385
9386 * buildsym.c (lte_is_less_than): Delete.
9387 (buildsym_compunit::end_symtab_with_blockvector): Create local
9388 lambda function to sort line table entries, and use
9389 std::stable_sort instead of std::sort.
9390 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
9391 markers when looking for a previous line.
9392
9393 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9394
9395 * dwarf2read.c (lnp_state_machine::record_line): Include
9396 end_sequence parameter in debug print out. Record the line if we
9397 are at an end_sequence marker even if it's not the start of a
9398 statement.
9399 * symmisc.c (maintenance_print_one_line_table): Print end of
9400 sequence markers with 'END' not '0'.
9401
9402 2020-01-24 Pedro Alves <palves@redhat.com>
9403
9404 PR gdb/25410
9405 * thread.c (scoped_restore_current_thread::restore): Use
9406 switch_to_inferior_no_thread.
9407 * exec.c: Include "progspace-and-thread.h".
9408 (add_target_sections, remove_target_sections):
9409 scoped_restore_current_pspace_and_thread instead of
9410 scoped_restore_current_thread.
9411 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
9412 and aspace to the inferior before calling clone_program_space.
9413 Remove stale comment.
9414
9415 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9416
9417 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
9418 (arm_netbsd_nat_target::fetch_registers): ...this.
9419 (arm_nbsd_nat_target::store_registers): Rename to...
9420 (arm_netbsd_nat_target::store_registers): ...this.
9421
9422 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9423
9424 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
9425 register_t.
9426
9427 2020-01-24 Christian Biesinger <cbiesinger@google.com>
9428
9429 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
9430 Update comment.
9431 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
9432 Likewise.
9433 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
9434 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
9435 the correct replacement (iterate_over_regset_sections).
9436 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
9437 Update comment.
9438
9439 2020-01-24 Graham Markall <graham.markall@embecosm.com>
9440
9441 PR gdb/23718
9442 * gdb/python/python.c (execute_gdb_command): Call
9443 async_enable_stdin in catch block.
9444
9445 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9446
9447 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
9448 SWITCH_THRU_ALL_UIS.
9449
9450 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
9451
9452 PR tui/9765
9453 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
9454 comment, add extra parameter, and update to store previous symbol
9455 when appropriate.
9456 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
9457 add extra parameter.
9458 * tui/tui-disasm.c (tui_disassemble): Update header comment,
9459 remove unneeded parameter, add try/catch around gdb_print_insn,
9460 rewrite to add items to asm_lines vector.
9461 (tui_find_backward_disassembly_start_address): New function.
9462 (tui_find_disassembly_address): Updated throughout.
9463 (tui_disasm_window::set_contents): Update for changes to
9464 tui_disassemble.
9465 (tui_disasm_window::do_scroll_vertical): No need to adjust the
9466 number of lines to scroll.
9467
9468 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
9469
9470 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
9471 (SECT_OFF_DATA): Likewise.
9472 (SECT_OFF_RODATA): Likewise.
9473 (SECT_OFF_TEXT): Likewise.
9474 (SECT_OFF_BSS): Likewise.
9475 (struct objfile) <text_section_offset, data_section_offset>: New
9476 methods.
9477 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
9478 objfile::text_section_offset.
9479 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
9480 * coffread.c (coff_symtab_read): Likewise.
9481 (enter_linenos): Likewise.
9482 (process_coff_symbol): Likewise.
9483 * ctfread.c (get_objfile_text_range): Likewise.
9484 * dtrace-probe.c (dtrace_probe::get_relocated_address):
9485 Use objfile::data_section_offset.
9486 * dwarf2-frame.c (execute_cfa_program): Use
9487 objfile::text_section_offset.
9488 (dwarf2_frame_find_fde): Likewise.
9489 * dwarf2read.c (create_addrmap_from_index): Likewise.
9490 (create_addrmap_from_aranges): Likewise.
9491 (dw2_find_pc_sect_compunit_symtab): Likewise.
9492 (process_psymtab_comp_unit_reader): Likewise.
9493 (add_partial_symbol): Likewise.
9494 (add_partial_subprogram): Likewise.
9495 (process_full_comp_unit): Likewise.
9496 (read_file_scope): Likewise.
9497 (read_func_scope): Likewise.
9498 (read_lexical_block_scope): Likewise.
9499 (read_call_site_scope): Likewise.
9500 (dwarf2_rnglists_process): Likewise.
9501 (dwarf2_ranges_process): Likewise.
9502 (dwarf2_ranges_read): Likewise.
9503 (dwarf_decode_lines_1): Likewise.
9504 (new_symbol): Likewise.
9505 (dwarf2_fetch_die_loc_sect_off): Likewise.
9506 (dwarf2_per_cu_text_offset): Likewise.
9507 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
9508 * hppa-tdep.c (read_unwind_info): Likewise.
9509 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
9510 * psympriv.h (struct partial_symtab): Likewise.
9511 * psymtab.c (find_pc_sect_psymtab): Likewise.
9512 * solib-svr4.c (enable_break): Likewise.
9513 * stap-probe.c (relocate_address): Use
9514 objfile::data_section_offset.
9515 * xcoffread.c (enter_line_range): Use
9516 objfile::text_section_offset.
9517 (read_xcoff_symtab): Likewise.
9518
9519 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
9520
9521 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
9522 declaration to narrower scopes.
9523
9524 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
9525
9526 * darwin-nat.h (struct darwin_exception_msg, enum
9527 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
9528 Move up.
9529 (class darwin_nat_target) <wait_1, check_new_threads,
9530 decode_exception_message, decode_message, stop_inferior,
9531 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
9532 * darwin-nat.c (darwin_check_new_threads): Rename to...
9533 (darwin_nat_target::check_new_threads): ... this.
9534 (darwin_suspend_inferior_it): Remove.
9535 (darwin_decode_exception_message): Rename to...
9536 (darwin_nat_target::decode_exception_message): ... this.
9537 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
9538 (darwin_decode_message): Rename to...
9539 (darwin_nat_target::decode_message): ... this.
9540 (cancel_breakpoint): Rename to...
9541 (darwin_nat_target::cancel_breakpoint): ... this.
9542 (darwin_wait): Rename to...
9543 (darwin_nat_target::wait_1): ... this. Use range-based for loop
9544 instead of iterate_over_inferiors.
9545 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
9546 (darwin_stop_inferior): Rename to...
9547 (darwin_nat_target::stop_inferior): ... this.
9548 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
9549 (darwin_init_thread_list): Rename to...
9550 (darwin_nat_target::init_thread_list): ... this.
9551 (darwin_ptrace_him): Rename to...
9552 (darwin_nat_target::ptrace_him): ... this.
9553 (darwin_nat_target::create_inferior): Pass lambda function to
9554 fork_inferior.
9555 (darwin_nat_target::detach): Call stop_inferior instead of
9556 darwin_stop_inferior.
9557 * fork-inferior.h (fork_inferior): Change init_trace_fun
9558 parameter to gdb::function_view.
9559 * fork-inferior.c (fork_inferior): Likewise.
9560
9561 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
9562
9563 * i386-cygwin-tdep.c (core_process_module_section): Update.
9564 * windows-nat.c (struct lm_info_windows): Add text_offset.
9565 (windows_xfer_shared_libraries): Update.
9566 * windows-tdep.c (windows_xfer_shared_library):
9567 Add text_offset_cached argument.
9568 * windows-tdep.h (windows_xfer_shared_library): Update.
9569
9570 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9571
9572 * gdbarch.sh: Add declaration for _initialize_gdbarch.
9573
9574 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9575
9576 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
9577 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
9578 replace with range-based for.
9579 (gdbsim_interrupt_inferior): Remove.
9580 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
9581 with a range-based for. Inline code from
9582 gdbsim_interrupt_inferior.
9583
9584 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
9585
9586 * infrun.c (proceed): Fix indentation.
9587
9588 2020-01-21 Tom Tromey <tromey@adacore.com>
9589
9590 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
9591 * python/python.c (python_extension_ops): Update.
9592 (gdbpy_colorize): New function.
9593 * python/lib/gdb/__init__.py (colorize): New function.
9594 * extension.h (ext_lang_colorize): Declare.
9595 * extension.c (ext_lang_colorize): New function.
9596 * extension-priv.h (struct extension_language_ops) <colorize>: New
9597 member.
9598 * cli/cli-style.c (_initialize_cli_style): Update help text.
9599
9600 2020-01-21 Luis Machado <luis.machado@linaro.org>
9601
9602 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
9603 <cond>: Change type to bool.
9604 (aarch64_displaced_step_b_cond): Update cond to use bool type.
9605 (aarch64_displaced_step_cb): Likewise.
9606 (aarch64_displaced_step_tb): Likewise.
9607
9608 2020-01-21 Luis Machado <luis.machado@linaro.org>
9609
9610 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
9611 output.
9612
9613 2020-01-21 Luis Machado <luis.machado@linaro.org>
9614
9615 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
9616 <pc_adjust>: Adjust the documentation.
9617 (aarch64_displaced_step_fixup): Check if PC really moved before
9618 adjusting it.
9619
9620 2020-01-19 Tom Tromey <tom@tromey.com>
9621
9622 * disasm.c (~gdb_disassembler): New destructor.
9623 (gdb_buffered_insn_length): Call disassemble_free_target.
9624 * disasm.h (class gdb_disassembler): Declare destructor. Use
9625 DISABLE_COPY_AND_ASSIGN.
9626
9627 2020-01-19 Tom Tromey <tom@tromey.com>
9628
9629 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
9630 (die_reader_func_ftype): Remove.
9631 (cutu_reader): New class.
9632 (dw2_get_file_names_reader): Remove "data" parameter.
9633 (dw2_get_file_names): Use cutu_reader.
9634 (create_debug_type_hash_table): Update.
9635 (read_cutu_die_from_dwo): Update comment.
9636 (lookup_dwo_unit): Add dwo_name parameter.
9637 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
9638 die_reader_func_ftype and data parameters.
9639 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
9640 Remove die_reader_func_ftype and data parameters.
9641 (~cutu_reader): New; from init_cutu_and_read_dies.
9642 (cutu_reader::cutu_reader): Rename from
9643 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
9644 and data parameters.
9645 (init_cutu_and_read_dies_simple): Remove.
9646 (struct process_psymtab_comp_unit_data): Remove.
9647 (process_psymtab_comp_unit_reader): Remove data parameter; add
9648 want_partial_unit and pretend_language parameters.
9649 (process_psymtab_comp_unit): Use cutu_reader.
9650 (build_type_psymtabs_reader): Remove data parameter.
9651 (build_type_psymtabs_1): Use cutu_reader.
9652 (process_skeletonless_type_unit): Likewise.
9653 (load_partial_comp_unit_reader): Remove.
9654 (load_partial_comp_unit): Use cutu_reader.
9655 (load_full_comp_unit_reader): Remove.
9656 (load_full_comp_unit): Use cutu_reader.
9657 (struct create_dwo_cu_data): Remove.
9658 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
9659 dwo_unit parameters.
9660 (create_cus_hash_table): Use cutu_reader.
9661 (struct dwarf2_read_addr_index_data): Remove.
9662 (dwarf2_read_addr_index_reader): Remove.
9663 (dwarf2_read_addr_index): Use cutu_reader.
9664 (read_signatured_type_reader): Remove.
9665 (read_signatured_type): Use cutu_reader.
9666
9667 2020-01-19 Tom Tromey <tom@tromey.com>
9668
9669 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
9670 * tui/tui-wingeneral.h (class tui_suppress_output): New.
9671 (tui_wrefresh): Declare.
9672 * tui/tui-wingeneral.c (suppress_output): New global.
9673 (tui_suppress_output, ~tui_suppress_output): New constructor and
9674 destructor.
9675 (tui_wrefresh): New function.
9676 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
9677 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
9678 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
9679 method.
9680 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
9681 tui_wrefresh.
9682 (tui_data_window::no_refresh): New method.
9683 (tui_data_item_window::refresh_window): Call tui_wrefresh.
9684 (tui_reg_command): Use tui_suppress_output
9685 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
9686 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
9687 method.
9688 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
9689
9690 2020-01-19 Tom Tromey <tom@tromey.com>
9691
9692 * tui/tui-winsource.c (tui_update_source_windows_with_line):
9693 Handle case where symtab is null.
9694
9695 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
9696
9697 * linux-fork.c (one_fork_p): Simplify.
9698
9699 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9700
9701 * top.c (struct qt_args): Remove.
9702 (kill_or_detach): Change return type to void, replace `void *`
9703 parameter with a proper one.
9704 (print_inferior_quit_action): Likewise.
9705 (quit_confirm): Use range-based for loop to iterate over inferiors.
9706 (quit_force): Likewise.
9707
9708 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9709
9710 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
9711 `void *` parameter with proper parameters.
9712 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
9713 (print_one_inferior): Change return type to void, replace `void *`
9714 parameter with proper parameters.
9715 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
9716 inferiors.
9717 (get_other_inferior): Remove.
9718 (mi_cmd_remove_inferior): Use range-based loop to iterate over
9719 inferiors.
9720
9721 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9722
9723 * mi/mi-interp.c (report_initial_inferior): Remove.
9724 (mi_interp::init): Use range-based for to iterate over inferiors.
9725
9726 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
9727
9728 * python/py-inferior.c (build_inferior_list): Remove.
9729 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
9730
9731 2020-01-16 Christian Biesinger <cbiesinger@google.com>
9732
9733 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
9734 (btrace_stitch_trace): Likewise.
9735 * charset.c (intermediate_encoding): Likewise (vaild).
9736 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
9737 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
9738 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
9739
9740 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
9741
9742 * windows-tdep.c (windows_get_tlb_type):
9743 Add rtl_user_process_parameters type.
9744
9745 2020-01-16 Pedro Alves <palves@redhat.com>
9746 Norbert Lange <nolange79@gmail.com>
9747
9748 PR build/24805
9749 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
9750 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
9751 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
9752 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
9753 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
9754 (ps_plog): Redeclare exported functions with default visibility.
9755
9756 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
9757
9758 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
9759 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
9760
9761 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
9762
9763 * infcmd.c (post_create_inferior): Use get_thread_regcache
9764 instead of get_current_regcache.
9765
9766 2020-01-14 Tom Tromey <tom@tromey.com>
9767
9768 PR symtab/12535:
9769 * python/python.c (gdbpy_decode_line): Treat empty string the same
9770 as no argument.
9771
9772 2020-01-14 Tom Tromey <tom@tromey.com>
9773
9774 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
9775
9776 2020-01-14 Tom Tromey <tom@tromey.com>
9777
9778 * nat/linux-btrace.c: Don't include <config.h>.
9779 * nat/linux-ptrace.c: Don't include <config.h>.
9780 * nat/x86-linux-dregs.c: Don't include <config.h>.
9781
9782 2020-01-14 Tom Tromey <tom@tromey.com>
9783
9784 * configure: Rebuild.
9785 * configure.ac: Move many checks to ../gdbsupport/common.m4.
9786
9787 2020-01-14 Tom Tromey <tom@tromey.com>
9788
9789 * nat/x86-linux-dregs.c: Include configh.h.
9790 * nat/linux-ptrace.c: Include configh.h.
9791 * nat/linux-btrace.c: Include configh.h.
9792 * defs.h: Include config.h, bfd.h.
9793 * configure.ac: Don't source common.host.
9794 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
9795 * configure: Rebuild.
9796 * acinclude.m4: Update path.
9797 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
9798 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
9799 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
9800 (CLIBS): Add LIBSUPPORT.
9801 (CDEPS): Likewise.
9802 (COMMON_SFILES): Remove gdbsupport files.
9803 (HFILES_NO_SRCDIR): Likewise.
9804 (stamp-version): Update path to create-version.sh.
9805 (ALLDEPFILES): Remove gdbsupport files.
9806
9807 2020-01-14 Tom Tromey <tom@tromey.com>
9808
9809 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
9810 USE_WIN32API when needed.
9811 * configure.ac (USE_WIN32API): Don't define.
9812 (WIN32LIBS): Use WIN32APILIBS.
9813 * configure: Rebuild.
9814
9815 2020-01-14 Tom Tromey <tom@tromey.com>
9816
9817 * configure: Rebuild.
9818 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
9819
9820 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9821
9822 * skip.c (skip_function_command): Make skip w/o arguments use the
9823 name of the inlined function if pc is inside any inlined function.
9824
9825 2020-01-14 Luis Machado <luis.machado@linaro.org>
9826
9827 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
9828 * infrun.c (resume_1): Likewise.
9829 (handle_inferior_event): Remove stale comment.
9830 * linux-nat.c (linux_nat_target::resume): Update comments.
9831 (save_stop_reason): Likewise.
9832 (linux_nat_filter_event): Likewise.
9833 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
9834
9835 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
9836
9837 * elfread.c (record_minimal_symbol): Set section index to 0 for
9838 non-allocatable sections.
9839
9840
9841 2020-01-13 Ali Tamur <tamur@google.com>
9842
9843 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
9844 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
9845 to gdb::optional. Update comments.
9846 (dwo_file): Update comments.
9847 (read_attribute): Update API to take an additional out parameter,
9848 need_reprocess. This is used to mark attributes that need other
9849 attributes (e.g. str_offsets_base) for correct computation which may not
9850 have been read yet.
9851 (read_attribute_reprocess): New function declaration.
9852 (read_addr_index): Likewise.
9853 (read_dwo_str_index): Likewise.
9854 (read_stub_str_index): Likewise.
9855 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
9856 (lookup_addr_base): New function definition.
9857 (lookup_ranges_base): Likewise.
9858 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
9859 lookup_ranges_base.
9860 (init_cutu_and_read_dies): Update comments.
9861 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
9862 unit. This is used to inherit parent's str_offsets_base and addr_base.
9863 Update comments.
9864 (init_cutu_and_read_dies_simple): Reflect API changes.
9865 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
9866 (create_cus_hash_table): Change API to take parent compile unit.
9867 Reflect API changes.
9868 (open_and_init_dwo_file): Reflect API changes.
9869 (dwarf2_get_pc_bounds): Update comments.
9870 (dwarf2_record_block_ranges): Likewise.
9871 (read_full_die_1): Change implementation to reprocess attributes that
9872 need str_offsets_base and addr_base.
9873 (partial_die_info::read): Likewise.
9874 (read_attribute_reprocess): New function definition.
9875 (read_attribute_value): Change API to take an additional out parameter,
9876 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
9877 when a non-dwo compile unit has index based attributes.
9878 (read_attribute): Reflect API changes.
9879 (read_addr_index_1): Reflect API changes. Update comments.
9880 (dwarf2_read_addr_index_data): Reflect API changes.
9881 (dwarf2_read_addr_index): Likewise.
9882 (read_str_index): Change API and implementation. This becomes a helper
9883 to be used by the new string index related methods. Update error
9884 message and comments.
9885 (read_dwo_str_index): New function definition.
9886 (read_stub_str_index): Likewise.
9887 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
9888 * symfile.h (dwarf2_debug_sections): Likewise.
9889 * xcoffread.c (dwarf2_debug_sections): Likewise.
9890
9891 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9892
9893 * gdbcore.h (struct core_fns) <core_read_registers>: Change
9894 core_reg_sect type to gdb_byte *.
9895 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
9896 * cris-tdep.c (fetch_core_registers): Likewise.
9897 * corelow.c (core_target::get_core_register_section): Change
9898 type of `contents` to gdb::byte_vector.
9899
9900 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
9901
9902 * tui/tui-wingeneral.c (box_win): Position the title in the center
9903 of the border.
9904
9905 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
9906
9907 * corelow.c (core_target::get_core_register_section): Use
9908 std::vector instead of alloca.
9909
9910 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9911
9912 * warning.m4: Add -Wmissing-declarations to build_warnings.
9913 * configure: Re-generate.
9914
9915 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9916
9917 * python/python.c (init__gdb_module): Add declaration.
9918
9919 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9920
9921 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
9922 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
9923 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
9924 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
9925 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
9926 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
9927 * ada-exp.y (_initialize_ada_exp): Add declaration.
9928 * ada-lang.c (_initialize_ada_language): Add declaration.
9929 * ada-tasks.c (_initialize_tasks): Add declaration.
9930 * agent.c (_initialize_agent): Add declaration.
9931 * aix-thread.c (_initialize_aix_thread): Add declaration.
9932 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
9933 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
9934 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
9935 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
9936 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
9937 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
9938 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
9939 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
9940 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
9941 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
9942 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
9943 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
9944 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
9945 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
9946 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
9947 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
9948 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
9949 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
9950 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
9951 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
9952 * annotate.c (_initialize_annotate): Add declaration.
9953 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
9954 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
9955 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
9956 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
9957 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
9958 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
9959 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
9960 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
9961 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
9962 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
9963 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
9964 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
9965 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
9966 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
9967 * auto-load.c (_initialize_auto_load): Add declaration.
9968 * auxv.c (_initialize_auxv): Add declaration.
9969 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
9970 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
9971 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
9972 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
9973 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
9974 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
9975 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
9976 * breakpoint.c (_initialize_breakpoint): Add declaration.
9977 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
9978 * btrace.c (_initialize_btrace): Add declaration.
9979 * charset.c (_initialize_charset): Add declaration.
9980 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
9981 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
9982 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
9983 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
9984 * cli/cli-script.c (_initialize_cli_script): Add declaration.
9985 * cli/cli-style.c (_initialize_cli_style): Add declaration.
9986 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
9987 * coffread.c (_initialize_coffread): Add declaration.
9988 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
9989 * compile/compile.c (_initialize_compile): Add declaration.
9990 * complaints.c (_initialize_complaints): Add declaration.
9991 * completer.c (_initialize_completer): Add declaration.
9992 * copying.c (_initialize_copying): Add declaration.
9993 * corefile.c (_initialize_core): Add declaration.
9994 * corelow.c (_initialize_corelow): Add declaration.
9995 * cp-abi.c (_initialize_cp_abi): Add declaration.
9996 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
9997 * cp-support.c (_initialize_cp_support): Add declaration.
9998 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
9999 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
10000 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
10001 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
10002 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
10003 * ctfread.c (_initialize_ctfread): Add declaration.
10004 * d-lang.c (_initialize_d_language): Add declaration.
10005 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
10006 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
10007 * dbxread.c (_initialize_dbxread): Add declaration.
10008 * dcache.c (_initialize_dcache): Add declaration.
10009 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
10010 * disasm.c (_initialize_disasm): Add declaration.
10011 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
10012 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
10013 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
10014 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
10015 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
10016 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
10017 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
10018 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
10019 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
10020 * elfread.c (_initialize_elfread): Add declaration.
10021 * exec.c (_initialize_exec): Add declaration.
10022 * extension.c (_initialize_extension): Add declaration.
10023 * f-lang.c (_initialize_f_language): Add declaration.
10024 * f-valprint.c (_initialize_f_valprint): Add declaration.
10025 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
10026 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
10027 * filesystem.c (_initialize_filesystem): Add declaration.
10028 * findcmd.c (_initialize_mem_search): Add declaration.
10029 * findvar.c (_initialize_findvar): Add declaration.
10030 * fork-child.c (_initialize_fork_child): Add declaration.
10031 * frame-base.c (_initialize_frame_base): Add declaration.
10032 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
10033 * frame.c (_initialize_frame): Add declaration.
10034 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
10035 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
10036 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
10037 * gcore.c (_initialize_gcore): Add declaration.
10038 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
10039 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
10040 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
10041 * gdbarch.c (_initialize_gdbarch): Add declaration.
10042 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
10043 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
10044 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
10045 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
10046 * go-lang.c (_initialize_go_language): Add declaration.
10047 * go32-nat.c (_initialize_go32_nat): Add declaration.
10048 * guile/guile.c (_initialize_guile): Add declaration.
10049 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
10050 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
10051 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
10052 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
10053 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
10054 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
10055 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
10056 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
10057 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
10058 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
10059 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
10060 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
10061 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
10062 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
10063 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
10064 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
10065 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
10066 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
10067 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
10068 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
10069 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
10070 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
10071 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
10072 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
10073 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
10074 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
10075 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
10076 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
10077 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
10078 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
10079 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
10080 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
10081 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
10082 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
10083 * infcall.c (_initialize_infcall): Add declaration.
10084 * infcmd.c (_initialize_infcmd): Add declaration.
10085 * inflow.c (_initialize_inflow): Add declaration.
10086 * infrun.c (_initialize_infrun): Add declaration.
10087 * interps.c (_initialize_interpreter): Add declaration.
10088 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
10089 * jit.c (_initialize_jit): Add declaration.
10090 * language.c (_initialize_language): Add declaration.
10091 * linux-fork.c (_initialize_linux_fork): Add declaration.
10092 * linux-nat.c (_initialize_linux_nat): Add declaration.
10093 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
10094 * linux-thread-db.c (_initialize_thread_db): Add declaration.
10095 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
10096 * m2-lang.c (_initialize_m2_language): Add declaration.
10097 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
10098 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
10099 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
10100 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
10101 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
10102 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
10103 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
10104 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
10105 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
10106 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
10107 * machoread.c (_initialize_machoread): Add declaration.
10108 * macrocmd.c (_initialize_macrocmd): Add declaration.
10109 * macroscope.c (_initialize_macroscope): Add declaration.
10110 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
10111 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
10112 * maint.c (_initialize_maint_cmds): Add declaration.
10113 * mdebugread.c (_initialize_mdebugread): Add declaration.
10114 * memattr.c (_initialize_mem): Add declaration.
10115 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
10116 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
10117 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
10118 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
10119 * mi/mi-main.c (_initialize_mi_main): Add declaration.
10120 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
10121 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
10122 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
10123 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
10124 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
10125 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
10126 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
10127 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
10128 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
10129 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
10130 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
10131 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
10132 * mipsread.c (_initialize_mipsread): Add declaration.
10133 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
10134 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
10135 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
10136 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
10137 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
10138 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
10139 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
10140 * nto-procfs.c (_initialize_procfs): Add declaration.
10141 * objc-lang.c (_initialize_objc_language): Add declaration.
10142 * observable.c (_initialize_observer): Add declaration.
10143 * opencl-lang.c (_initialize_opencl_language): Add declaration.
10144 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
10145 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
10146 * osabi.c (_initialize_gdb_osabi): Add declaration.
10147 * osdata.c (_initialize_osdata): Add declaration.
10148 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
10149 * parse.c (_initialize_parse): Add declaration.
10150 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
10151 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
10152 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
10153 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
10154 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
10155 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
10156 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
10157 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
10158 * printcmd.c (_initialize_printcmd): Add declaration.
10159 * probe.c (_initialize_probe): Add declaration.
10160 * proc-api.c (_initialize_proc_api): Add declaration.
10161 * proc-events.c (_initialize_proc_events): Add declaration.
10162 * proc-service.c (_initialize_proc_service): Add declaration.
10163 * procfs.c (_initialize_procfs): Add declaration.
10164 * producer.c (_initialize_producer): Add declaration.
10165 * psymtab.c (_initialize_psymtab): Add declaration.
10166 * python/python.c (_initialize_python): Add declaration.
10167 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
10168 * record-btrace.c (_initialize_record_btrace): Add declaration.
10169 * record-full.c (_initialize_record_full): Add declaration.
10170 * record.c (_initialize_record): Add declaration.
10171 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
10172 * regcache.c (_initialize_regcache): Add declaration.
10173 * reggroups.c (_initialize_reggroup): Add declaration.
10174 * remote-notif.c (_initialize_notif): Add declaration.
10175 * remote-sim.c (_initialize_remote_sim): Add declaration.
10176 * remote.c (_initialize_remote): Add declaration.
10177 * reverse.c (_initialize_reverse): Add declaration.
10178 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
10179 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
10180 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
10181 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
10182 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
10183 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
10184 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
10185 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
10186 Add declaration.
10187 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
10188 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
10189 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
10190 * rust-exp.y (_initialize_rust_exp): Add declaration.
10191 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
10192 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
10193 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
10194 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
10195 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
10196 * score-tdep.c (_initialize_score_tdep): Add declaration.
10197 * ser-go32.c (_initialize_ser_dos): Add declaration.
10198 * ser-mingw.c (_initialize_ser_windows): Add declaration.
10199 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
10200 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
10201 * ser-uds.c (_initialize_ser_socket): Add declaration.
10202 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
10203 * serial.c (_initialize_serial): Add declaration.
10204 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
10205 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
10206 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
10207 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
10208 * skip.c (_initialize_step_skip): Add declaration.
10209 * sol-thread.c (_initialize_sol_thread): Add declaration.
10210 * solib-aix.c (_initialize_solib_aix): Add declaration.
10211 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
10212 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
10213 * solib-frv.c (_initialize_frv_solib): Add declaration.
10214 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
10215 * solib-target.c (_initialize_solib_target): Add declaration.
10216 * solib.c (_initialize_solib): Add declaration.
10217 * source-cache.c (_initialize_source_cache): Add declaration.
10218 * source.c (_initialize_source): Add declaration.
10219 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
10220 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
10221 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
10222 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
10223 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
10224 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
10225 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
10226 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
10227 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
10228 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
10229 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
10230 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
10231 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
10232 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
10233 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
10234 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
10235 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
10236 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
10237 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
10238 * stabsread.c (_initialize_stabsread): Add declaration.
10239 * stack.c (_initialize_stack): Add declaration.
10240 * stap-probe.c (_initialize_stap_probe): Add declaration.
10241 * std-regs.c (_initialize_frame_reg): Add declaration.
10242 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
10243 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
10244 * symfile.c (_initialize_symfile): Add declaration.
10245 * symmisc.c (_initialize_symmisc): Add declaration.
10246 * symtab.c (_initialize_symtab): Add declaration.
10247 * target.c (_initialize_target): Add declaration.
10248 * target-connection.c (_initialize_target_connection): Add
10249 declaration.
10250 * target-dcache.c (_initialize_target_dcache): Add declaration.
10251 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
10252 * thread.c (_initialize_thread): Add declaration.
10253 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
10254 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
10255 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
10256 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
10257 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
10258 * tracectf.c (_initialize_ctf): Add declaration.
10259 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
10260 * tracefile.c (_initialize_tracefile): Add declaration.
10261 * tracepoint.c (_initialize_tracepoint): Add declaration.
10262 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
10263 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
10264 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
10265 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
10266 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
10267 * tui/tui-win.c (_initialize_tui_win): Add declaration.
10268 * tui/tui.c (_initialize_tui): Add declaration.
10269 * typeprint.c (_initialize_typeprint): Add declaration.
10270 * ui-style.c (_initialize_ui_style): Add declaration.
10271 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
10272 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
10273 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
10274 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
10275 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
10276 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
10277 * unittests/filtered_iterator-selftests.c
10278 (_initialize_filtered_iterator_selftests): Add declaration.
10279 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
10280 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
10281 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
10282 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
10283 * unittests/main-thread-selftests.c
10284 (_initialize_main_thread_selftests): Add declaration.
10285 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
10286 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
10287 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
10288 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
10289 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
10290 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
10291 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
10292 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
10293 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
10294 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
10295 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
10296 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
10297 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
10298 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
10299 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
10300 declaration.
10301 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
10302 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
10303 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
10304 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
10305 * user-regs.c (_initialize_user_regs): Add declaration.
10306 * utils.c (_initialize_utils): Add declaration.
10307 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
10308 * valops.c (_initialize_valops): Add declaration.
10309 * valprint.c (_initialize_valprint): Add declaration.
10310 * value.c (_initialize_values): Add declaration.
10311 * varobj.c (_initialize_varobj): Add declaration.
10312 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
10313 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
10314 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
10315 * windows-nat.c (_initialize_windows_nat): Add declaration.
10316 (_initialize_check_for_gdb_ini): Add declaration.
10317 (_initialize_loadable): Add declaration.
10318 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
10319 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
10320 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
10321 * xcoffread.c (_initialize_xcoffread): Add declaration.
10322 * xml-support.c (_initialize_xml_support): Add declaration.
10323 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
10324 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
10325 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
10326 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
10327
10328 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10329
10330 * regformats/regdat.sh: Generate declaration for init function.
10331
10332 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10333
10334 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
10335 up.
10336 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
10337 close_one_inferior>: New methods.
10338 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
10339 pass down target to find_inferior_pid.
10340 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
10341 Pass down target to find_inferior_ptid.
10342 (gdbsim_target::create_inferior): Pass down target to
10343 add_thread_silent.
10344 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
10345 target down to find_inferior_ptid and switch_to_thread.
10346 (gdbsim_target::close): Update to call close_one_inferior.
10347 (struct resume_data): Remove.
10348 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
10349 directly, rather than through a void pointer.
10350 (gdbsim_target::resume): Update to call resume_one_inferior.
10351
10352 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
10353
10354 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
10355
10356 2020-01-12 Pedro Alves <palves@redhat.com>
10357
10358 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
10359 directly for the current inferior instead of
10360 discard_all_inferiors.
10361 (discard_all_inferiors): Delete.
10362
10363 2020-01-11 Tom Tromey <tom@tromey.com>
10364
10365 * tui/tui-wingeneral.c (box_win): Check cli_styling.
10366 * tui/tui-winsource.c (tui_source_window_base::refill): Use
10367 deprecated_safe_get_selected_frame.
10368
10369 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
10370
10371 * inferior.c (print_inferior): Switch inferior before printing it.
10372
10373 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
10374 Pedro Alves <palves@redhat.com>
10375
10376 * progspace-and-thread.c (switch_to_program_space_and_thread):
10377 Assert there's an inferior for PSPACE. Use
10378 switch_to_inferior_no_thread to switch the inferior too.
10379 * progspace.c (program_space::~program_space): Call
10380 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
10381 (program_space::free_all_objfiles): Don't call clear_symtab_users
10382 here.
10383 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
10384
10385 2020-01-10 Pedro Alves <palves@redhat.com>
10386
10387 * NEWS: Mention multi-target debugging, "info connections", and
10388 "add-inferior -no-connection".
10389
10390 2020-01-10 Pedro Alves <palves@redhat.com>
10391
10392 * infrun.c: Include "target-connection.h".
10393 (check_multi_target_resumption): New.
10394 (proceed): Call it.
10395 * target-connection.c (make_target_connection_string): Make
10396 extern.
10397 * target-connection.h (make_target_connection_string): Declare.
10398
10399 2020-01-10 Pedro Alves <palves@redhat.com>
10400
10401 * Makefile.in (COMMON_SFILES): Add target-connection.c.
10402 * inferior.c (uiout_field_connection): New function.
10403 (print_inferior): Add new "connection-id" column.
10404 (add_inferior_command): Show connection number/string of added
10405 inferior.
10406 * process-stratum-target.h
10407 (process_stratum_target::connection_string): New virtual method.
10408 (process_stratum_target::connection_number): New field.
10409 * remote.c (remote_target::connection_string): New override.
10410 * target-connection.c: New file.
10411 * target-connection.h: New file.
10412 * target.c (decref_target): Remove process_stratum targets from
10413 the connection list.
10414 (target_stack::push): Add process_stratum targets to the
10415 connection list.
10416
10417 2020-01-10 Pedro Alves <palves@redhat.com>
10418
10419 Revert:
10420 2016-04-12 Pedro Alves <palves@redhat.com>
10421 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
10422 Remove references to name.
10423 * serial.h (struct serial) <name>: Delete.
10424
10425 2020-01-10 Pedro Alves <palves@redhat.com>
10426
10427 * gdbarch-selftests.c (register_to_value_test): Remove "target
10428 already pushed" check.
10429
10430 2020-01-10 Pedro Alves <palves@redhat.com>
10431 John Baldwin <jhb@FreeBSD.org>
10432
10433 * aarch64-linux-nat.c
10434 (aarch64_linux_nat_target::thread_architecture): Adjust.
10435 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
10436 (task_command_1): Likewise.
10437 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
10438 (aix_thread_target::wait, aix_thread_target::fetch_registers)
10439 (aix_thread_target::store_registers)
10440 (aix_thread_target::thread_alive): Adjust.
10441 * amd64-fbsd-tdep.c: Include "inferior.h".
10442 (amd64fbsd_get_thread_local_address): Pass down target.
10443 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
10444 thread's gdbarch instead of target_gdbarch.
10445 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
10446 get_last_target_status.
10447 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
10448 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
10449 inferiors.
10450 (update_inserted_breakpoint_locations): Skip if inferiors with no
10451 execution.
10452 (update_global_location_list): When handling moribund locations,
10453 find representative inferior for location's pspace, and use thread
10454 count of its process_stratum target.
10455 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
10456 * bsd-uthread.c (bsd_uthread_target::wait): Use
10457 as_process_stratum_target and adjust thread_change_ptid and
10458 add_thread calls.
10459 (bsd_uthread_target::update_thread_list): Use
10460 as_process_stratum_target and adjust find_thread_ptid,
10461 thread_change_ptid and add_thread calls.
10462 * btrace.c (maint_btrace_packet_history_cmd): Adjust
10463 find_thread_ptid call.
10464 * corelow.c (add_to_thread_list): Adjust add_thread call.
10465 (core_target_open): Adjust add_thread_silent and thread_count
10466 calls.
10467 (core_target::pid_to_str): Adjust find_inferior_ptid call.
10468 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
10469 * event-top.c (async_disconnect): Pop targets from all inferiors.
10470 * exec.c (add_target_sections): Push exec target on all inferiors
10471 sharing the program space.
10472 (remove_target_sections): Remove the exec target from all
10473 inferiors sharing the program space.
10474 (exec_on_vfork): New.
10475 * exec.h (exec_on_vfork): Declare.
10476 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
10477 Pass it down.
10478 (fbsd_nat_target::update_thread_list): Adjust.
10479 (fbsd_nat_target::resume): Adjust.
10480 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
10481 down.
10482 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
10483 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
10484 get_thread_arch_regcache call.
10485 * fork-child.c (gdb_startup_inferior): Pass target down to
10486 startup_inferior and set_executing.
10487 * gdbthread.h (struct process_stratum_target): Forward declare.
10488 (add_thread, add_thread_silent, add_thread_with_info)
10489 (in_thread_list): Add process_stratum_target parameter.
10490 (find_thread_ptid(inferior*, ptid_t)): New overload.
10491 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
10492 parameter.
10493 (all_threads()): Delete overload.
10494 (all_threads, all_non_exited_threads): Add process_stratum_target
10495 parameter.
10496 (all_threads_safe): Use brace initialization.
10497 (thread_count): Add process_stratum_target parameter.
10498 (set_resumed, set_running, set_stop_requested, set_executing)
10499 (threads_are_executing, finish_thread_state): Add
10500 process_stratum_target parameter.
10501 (switch_to_thread): Use is_current_thread.
10502 * i386-fbsd-tdep.c: Include "inferior.h".
10503 (i386fbsd_get_thread_local_address): Pass down target.
10504 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
10505 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
10506 have_inferiors check.
10507 * inf-ptrace.c (inf_ptrace_target::create_inferior)
10508 (inf_ptrace_target::attach): Adjust.
10509 * infcall.c (run_inferior_call): Adjust.
10510 * infcmd.c (run_command_1): Pass target to
10511 scoped_finish_thread_state.
10512 (proceed_thread_callback): Skip inferiors with no execution.
10513 (continue_command): Rename 'all_threads' local to avoid hiding
10514 'all_threads' function. Adjust get_last_target_status call.
10515 (prepare_one_step): Adjust set_running call.
10516 (signal_command): Use user_visible_resume_target. Compare thread
10517 pointers instead of inferior_ptid.
10518 (info_program_command): Adjust to pass down target.
10519 (attach_command): Mark target's 'thread_executing' flag.
10520 (stop_current_target_threads_ns): New, factored out from ...
10521 (interrupt_target_1): ... this. Switch inferior before making
10522 target calls.
10523 * inferior-iter.h
10524 (struct all_inferiors_iterator, struct all_inferiors_range)
10525 (struct all_inferiors_safe_range)
10526 (struct all_non_exited_inferiors_range): Filter on
10527 process_stratum_target too. Remove explicit.
10528 * inferior.c (inferior::inferior): Push dummy target on target
10529 stack.
10530 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
10531 Add process_stratum_target parameter, and pass it down.
10532 (have_live_inferiors): Adjust.
10533 (switch_to_inferior_and_push_target): New.
10534 (add_inferior_command, clone_inferior_command): Handle
10535 "-no-connection" parameter. Use
10536 switch_to_inferior_and_push_target.
10537 (_initialize_inferior): Mention "-no-connection" option in
10538 the help of "add-inferior" and "clone-inferior" commands.
10539 * inferior.h: Include "process-stratum-target.h".
10540 (interrupt_target_1): Use bool.
10541 (struct inferior) <push_target, unpush_target, target_is_pushed,
10542 find_target_beneath, top_target, process_target, target_at,
10543 m_stack>: New.
10544 (discard_all_inferiors): Delete.
10545 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
10546 (all_inferiors, all_non_exited_inferiors): Add
10547 process_stratum_target parameter.
10548 * infrun.c: Include "gdb_select.h" and <unordered_map>.
10549 (target_last_proc_target): New global.
10550 (follow_fork_inferior): Push target on new inferior. Pass target
10551 to add_thread_silent. Call exec_on_vfork. Handle target's
10552 reference count.
10553 (follow_fork): Adjust get_last_target_status call. Also consider
10554 target.
10555 (follow_exec): Push target on new inferior.
10556 (struct execution_control_state) <target>: New field.
10557 (user_visible_resume_target): New.
10558 (do_target_resume): Call target_async.
10559 (resume_1): Set target's threads_executing flag. Consider resume
10560 target.
10561 (commit_resume_all_targets): New.
10562 (proceed): Also consider resume target. Skip threads of inferiors
10563 with no execution. Commit resumtion in all targets.
10564 (start_remote): Pass current inferior to wait_for_inferior.
10565 (infrun_thread_stop_requested): Consider target as well. Pass
10566 thread_info pointer to clear_inline_frame_state instead of ptid.
10567 (infrun_thread_thread_exit): Consider target as well.
10568 (random_pending_event_thread): New inferior parameter. Use it.
10569 (do_target_wait): Rename to ...
10570 (do_target_wait_1): ... this. Add inferior parameter, and pass it
10571 down.
10572 (threads_are_resumed_pending_p, do_target_wait): New.
10573 (prepare_for_detach): Adjust calls.
10574 (wait_for_inferior): New inferior parameter. Handle it. Use
10575 do_target_wait_1 instead of do_target_wait.
10576 (fetch_inferior_event): Adjust. Switch to representative
10577 inferior. Pass target down.
10578 (set_last_target_status): Add process_stratum_target parameter.
10579 Save target in global.
10580 (get_last_target_status): Add process_stratum_target parameter and
10581 handle it.
10582 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
10583 (context_switch): Check inferior_ptid == null_ptid before calling
10584 inferior_thread().
10585 (get_inferior_stop_soon): Pass down target.
10586 (wait_one): Rename to ...
10587 (poll_one_curr_target): ... this.
10588 (struct wait_one_event): New.
10589 (wait_one): New.
10590 (stop_all_threads): Adjust.
10591 (handle_no_resumed, handle_inferior_event): Adjust to consider the
10592 event's target.
10593 (switch_back_to_stepped_thread): Also consider target.
10594 (print_stop_event): Update.
10595 (normal_stop): Update. Also consider the resume target.
10596 * infrun.h (wait_for_inferior): Remove declaration.
10597 (user_visible_resume_target): New declaration.
10598 (get_last_target_status, set_last_target_status): New
10599 process_stratum_target parameter.
10600 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
10601 process_stratum_target parameter, and use it.
10602 (clear_inline_frame_state (thread_info*)): New.
10603 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
10604 process_stratum_target parameter.
10605 (clear_inline_frame_state (thread_info*)): Declare.
10606 * linux-fork.c (delete_checkpoint_command): Pass target down to
10607 find_thread_ptid.
10608 (checkpoint_command): Adjust.
10609 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
10610 instead of just tweaking inferior_ptid.
10611 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
10612 (exit_lwp): Pass target down to find_thread_ptid.
10613 (attach_proc_task_lwp_callback): Pass target down to
10614 add_thread/set_running/set_executing.
10615 (linux_nat_target::attach): Pass target down to
10616 thread_change_ptid.
10617 (get_detach_signal): Pass target down to find_thread_ptid.
10618 Consider last target status's target.
10619 (linux_resume_one_lwp_throw, resume_lwp)
10620 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
10621 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
10622 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
10623 (linux_nat_target::async_wait_fd): New.
10624 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
10625 target down.
10626 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
10627 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
10628 * linux-thread-db.c (struct thread_db_info::process_target): New
10629 field.
10630 (add_thread_db_info): Save target.
10631 (get_thread_db_info): New process_stratum_target parameter. Also
10632 match target.
10633 (delete_thread_db_info): New process_stratum_target parameter.
10634 Also match target.
10635 (thread_from_lwp): Adjust to pass down target.
10636 (thread_db_notice_clone): Pass down target.
10637 (check_thread_db_callback): Pass down target.
10638 (try_thread_db_load_1): Always push the thread_db target.
10639 (try_thread_db_load, record_thread): Pass target down.
10640 (thread_db_target::detach): Pass target down. Always unpush the
10641 thread_db target.
10642 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
10643 target down. Always unpush the thread_db target.
10644 (find_new_threads_callback, thread_db_find_new_threads_2)
10645 (thread_db_target::update_thread_list): Pass target down.
10646 (thread_db_target::pid_to_str): Pass current inferior down.
10647 (thread_db_target::get_thread_local_address): Pass target down.
10648 (thread_db_target::resume, maintenance_check_libthread_db): Pass
10649 target down.
10650 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
10651 * procfs.c (procfs_target::procfs_init_inferior): Declare.
10652 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
10653 (procfs_init_inferior): Rename to ...
10654 (procfs_target::procfs_init_inferior): ... this and adjust.
10655 (procfs_target::create_inferior, procfs_notice_thread)
10656 (procfs_do_thread_registers): Adjust.
10657 * ppc-fbsd-tdep.c: Include "inferior.h".
10658 (ppcfbsd_get_thread_local_address): Pass down target.
10659 * proc-service.c (ps_xfer_memory): Switch current inferior and
10660 program space as well.
10661 (get_ps_regcache): Pass target down.
10662 * process-stratum-target.c
10663 (process_stratum_target::thread_address_space)
10664 (process_stratum_target::thread_architecture): Pass target down.
10665 * process-stratum-target.h
10666 (process_stratum_target::threads_executing): New field.
10667 (as_process_stratum_target): New.
10668 * ravenscar-thread.c
10669 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
10670 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
10671 down.
10672 * record-btrace.c (record_btrace_target::info_record): Adjust.
10673 (record_btrace_target::record_method)
10674 (record_btrace_target::record_is_replaying)
10675 (record_btrace_target::fetch_registers)
10676 (get_thread_current_frame_id, record_btrace_target::resume)
10677 (record_btrace_target::wait, record_btrace_target::stop): Pass
10678 target down.
10679 * record-full.c (record_full_wait_1): Switch to event thread.
10680 Pass target down.
10681 * regcache.c (regcache::regcache)
10682 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
10683 process_stratum_target parameter and handle it.
10684 (current_thread_target): New global.
10685 (get_thread_regcache): Add process_stratum_target parameter and
10686 handle it. Switch inferior before calling target method.
10687 (get_thread_regcache): Pass target down.
10688 (get_thread_regcache_for_ptid): Pass target down.
10689 (registers_changed_ptid): Add process_stratum_target parameter and
10690 handle it.
10691 (registers_changed_thread, registers_changed): Pass target down.
10692 (test_get_thread_arch_aspace_regcache): New.
10693 (current_regcache_test): Define a couple local test_target_ops
10694 instances and use them for testing.
10695 (readwrite_regcache): Pass process_stratum_target parameter.
10696 (cooked_read_test, cooked_write_test): Pass mock_target down.
10697 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
10698 (get_thread_arch_aspace_regcache): Add process_stratum_target
10699 parameter.
10700 (regcache::target): New method.
10701 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
10702 (regcache::registers_changed_ptid): Add process_stratum_target
10703 parameter.
10704 (regcache::m_target): New field.
10705 (registers_changed_ptid): Add process_stratum_target parameter.
10706 * remote.c (remote_state::supports_vCont_probed): New field.
10707 (remote_target::async_wait_fd): New method.
10708 (remote_unpush_and_throw): Add remote_target parameter.
10709 (get_current_remote_target): Adjust.
10710 (remote_target::remote_add_inferior): Push target.
10711 (remote_target::remote_add_thread)
10712 (remote_target::remote_notice_new_inferior)
10713 (get_remote_thread_info): Pass target down.
10714 (remote_target::update_thread_list): Skip threads of inferiors
10715 bound to other targets. (remote_target::close): Don't discard
10716 inferiors. (remote_target::add_current_inferior_and_thread)
10717 (remote_target::process_initial_stop_replies)
10718 (remote_target::start_remote)
10719 (remote_target::remote_serial_quit_handler): Pass down target.
10720 (remote_target::remote_unpush_target): New remote_target
10721 parameter. Unpush the target from all inferiors.
10722 (remote_target::remote_unpush_and_throw): New remote_target
10723 parameter. Pass it down.
10724 (remote_target::open_1): Check whether the current inferior has
10725 execution instead of checking whether any inferior is live. Pass
10726 target down.
10727 (remote_target::remote_detach_1): Pass down target. Use
10728 remote_unpush_target.
10729 (extended_remote_target::attach): Pass down target.
10730 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
10731 (remote_target::append_resumption): Pass down target.
10732 (remote_target::append_pending_thread_resumptions)
10733 (remote_target::remote_resume_with_hc, remote_target::resume)
10734 (remote_target::commit_resume): Pass down target.
10735 (remote_target::remote_stop_ns): Check supports_vCont_probed.
10736 (remote_target::interrupt_query)
10737 (remote_target::remove_new_fork_children)
10738 (remote_target::check_pending_events_prevent_wildcard_vcont)
10739 (remote_target::remote_parse_stop_reply)
10740 (remote_target::process_stop_reply): Pass down target.
10741 (first_remote_resumed_thread): New remote_target parameter. Pass
10742 it down.
10743 (remote_target::wait_as): Pass down target.
10744 (unpush_and_perror): New remote_target parameter. Pass it down.
10745 (remote_target::readchar, remote_target::remote_serial_write)
10746 (remote_target::getpkt_or_notif_sane_1)
10747 (remote_target::kill_new_fork_children, remote_target::kill): Pass
10748 down target.
10749 (remote_target::mourn_inferior): Pass down target. Use
10750 remote_unpush_target.
10751 (remote_target::core_of_thread)
10752 (remote_target::remote_btrace_maybe_reopen): Pass down target.
10753 (remote_target::pid_to_exec_file)
10754 (remote_target::thread_handle_to_thread_info): Pass down target.
10755 (remote_target::async_wait_fd): New.
10756 * riscv-fbsd-tdep.c: Include "inferior.h".
10757 (riscv_fbsd_get_thread_local_address): Pass down target.
10758 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
10759 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
10760 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
10761 Adjust.
10762 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
10763 * solib-svr4.c (enable_break): Pass down target.
10764 * spu-multiarch.c (parse_spufs_run): Pass down target.
10765 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
10766 * target-delegates.c: Regenerate.
10767 * target.c (g_target_stack): Delete.
10768 (current_top_target): Return the current inferior's top target.
10769 (target_has_execution_1): Refer to the passed-in inferior's top
10770 target.
10771 (target_supports_terminal_ours): Check whether the initial
10772 inferior was already created.
10773 (decref_target): New.
10774 (target_stack::push): Incref/decref the target.
10775 (push_target, push_target, unpush_target): Adjust.
10776 (target_stack::unpush): Defref target.
10777 (target_is_pushed): Return bool. Adjust to refer to the current
10778 inferior's target stack.
10779 (dispose_inferior): Delete, and inline parts ...
10780 (target_preopen): ... here. Only dispose of the current inferior.
10781 (target_detach): Hold strong target reference while detaching.
10782 Pass target down.
10783 (target_thread_name): Add assertion.
10784 (target_resume): Pass down target.
10785 (target_ops::beneath, find_target_at): Adjust to refer to the
10786 current inferior's target stack.
10787 (get_dummy_target): New.
10788 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
10789 has a thread running.
10790 (initialize_targets): Rename to ...
10791 (_initialize_target): ... this.
10792 * target.h: Include "gdbsupport/refcounted-object.h".
10793 (struct target_ops): Inherit refcounted_object.
10794 (target_ops::shortname, target_ops::longname): Make const.
10795 (target_ops::async_wait_fd): New method.
10796 (decref_target): Declare.
10797 (struct target_ops_ref_policy): New.
10798 (target_ops_ref): New typedef.
10799 (get_dummy_target): Declare function.
10800 (target_is_pushed): Return bool.
10801 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
10802 (all_matching_threads_iterator::all_matching_threads_iterator):
10803 Handle filter target.
10804 * thread-iter.h (struct all_matching_threads_iterator, struct
10805 all_matching_threads_range, class all_non_exited_threads_range):
10806 Filter by target too. Remove explicit.
10807 * thread.c (threads_executing): Delete.
10808 (inferior_thread): Pass down current inferior.
10809 (clear_thread_inferior_resources): Pass down thread pointer
10810 instead of ptid_t.
10811 (add_thread_silent, add_thread_with_info, add_thread): Add
10812 process_stratum_target parameter. Use it for thread and inferior
10813 searches.
10814 (is_current_thread): New.
10815 (thread_info::deletable): Use it.
10816 (find_thread_ptid, thread_count, in_thread_list)
10817 (thread_change_ptid, set_resumed, set_running): New
10818 process_stratum_target parameter. Pass it down.
10819 (set_executing): New process_stratum_target parameter. Pass it
10820 down. Adjust reference to 'threads_executing'.
10821 (threads_are_executing): New process_stratum_target parameter.
10822 Adjust reference to 'threads_executing'.
10823 (set_stop_requested, finish_thread_state): New
10824 process_stratum_target parameter. Pass it down.
10825 (switch_to_thread): Also match inferior.
10826 (switch_to_thread): New process_stratum_target parameter. Pass it
10827 down.
10828 (update_threads_executing): Reimplement.
10829 * top.c (quit_force): Pop targets from all inferior.
10830 (gdb_init): Don't call initialize_targets.
10831 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
10832 Declare.
10833 (windows_add_thread, windows_delete_thread): Adjust.
10834 (get_windows_debug_event): Rename to ...
10835 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
10836 * tracefile-tfile.c (tfile_target_open): Pass down target.
10837 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
10838 Forward declare.
10839 (switch_to_thread): Add process_stratum_target parameter.
10840 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
10841 parameter. Use it.
10842 (mi_on_resume): Pass target down.
10843 * nat/fork-inferior.c (startup_inferior): Add
10844 process_stratum_target parameter. Pass it down.
10845 * nat/fork-inferior.h (startup_inferior): Add
10846 process_stratum_target parameter.
10847 * python/py-threadevent.c (py_get_event_thread): Pass target down.
10848
10849 2020-01-10 Pedro Alves <palves@redhat.com>
10850
10851 * remote.c (remote_target::start_remote): Don't set inferior_ptid
10852 directly. Instead find the first thread in the thread list and
10853 use switch_to_thread.
10854
10855 2020-01-10 Pedro Alves <palves@redhat.com>
10856
10857 * remote.c (remote_target::remote_add_inferior): Don't bind a
10858 process to the current inferior if the current inferior is already
10859 bound to a process.
10860
10861 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
10862 Pedro Alves <palves@redhat.com>
10863
10864 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
10865 If no process is specified, return null_ptid instead of
10866 inferior_ptid.
10867 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
10868 TARGET_WAITKIND_SIGNALLED with no pid.
10869
10870 2020-01-10 Pedro Alves <palves@redhat.com>
10871
10872 * remote.c (first_remote_resumed_thread): New.
10873 (remote_target::wait_as): Use it as default event_ptid instead of
10874 inferior_ptid.
10875
10876 2020-01-10 Pedro Alves <palves@redhat.com>
10877
10878 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
10879
10880 2020-01-10 Pedro Alves <palves@redhat.com>
10881
10882 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
10883 not -1.
10884
10885 2020-01-10 Pedro Alves <palves@redhat.com>
10886
10887 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
10888 ptid to get_last_target_status.
10889 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
10890 ptid to get_last_target_status.
10891 * infcmd.c (continue_command): Don't pass a target_waitstatus to
10892 get_last_target_status.
10893 (info_program_command): Don't pass a target_waitstatus to
10894 get_last_target_status.
10895 * infrun.c (init_wait_for_inferior): Use
10896 nullify_last_target_wait_ptid.
10897 (get_last_target_status): Handle nullptr arguments.
10898 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
10899 (print_stop_event): Don't pass a ptid to get_last_target_status.
10900 (normal_stop): Don't pass a ptid to get_last_target_status.
10901 * infrun.h (get_last_target_status, set_last_target_status): Move
10902 comments here and update.
10903 (nullify_last_target_wait_ptid): Declare.
10904 * linux-fork.c (fork_load_infrun_state): Remove local extern
10905 declaration of nullify_last_target_wait_ptid.
10906 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
10907 to get_last_target_status.
10908
10909 2020-01-10 Pedro Alves <palves@redhat.com>
10910
10911 * gdbthread.h (scoped_restore_current_thread)
10912 <dont_restore, restore, m_dont_restore>: Declare.
10913 * thread.c (thread_alive): Add assertion. Return bool.
10914 (switch_to_thread_if_alive): New.
10915 (prune_threads): Switch inferior/thread.
10916 (print_thread_info_1): Switch thread before calling target methods.
10917 (scoped_restore_current_thread::restore): New, factored out from
10918 ...
10919 (scoped_restore_current_thread::~scoped_restore_current_thread):
10920 ... this.
10921 (scoped_restore_current_thread::scoped_restore_current_thread):
10922 Add assertion.
10923 (thread_apply_all_command, thread_select): Use
10924 switch_to_thread_if_alive.
10925 * infrun.c (proceed, restart_threads, handle_signal_stop)
10926 (switch_back_to_stepped_thread): Switch current thread before
10927 calling target methods.
10928
10929 2020-01-10 Pedro Alves <palves@redhat.com>
10930
10931 * inferior.c (switch_to_inferior_no_thread): New function,
10932 factored out from ...
10933 (inferior_command): ... here.
10934 * inferior.h (switch_to_inferior_no_thread): Declare.
10935 * mi/mi-main.c (run_one_inferior): Use
10936 switch_to_inferior_no_thread.
10937
10938 2020-01-10 Pedro Alves <palves@redhat.com>
10939
10940 * infcmd.c (kill_command): Remove dead code.
10941
10942 2020-01-10 Pedro Alves <palves@redhat.com>
10943
10944 * remote.c (remote_target::mourn_inferior): No longer check
10945 whether the target is running.
10946
10947 2020-01-10 Pedro Alves <palves@redhat.com>
10948
10949 * corelow.c (core_target::has_execution): Change parameter type to
10950 inferior pointer.
10951 * inferior.c (number_of_live_inferiors): Use
10952 inferior::has_execution instead of target_has_execution_1.
10953 * inferior.h (inferior::has_execution): New.
10954 * linux-thread-db.c (thread_db_target::update_thread_list): Use
10955 inferior::has_execution instead of target_has_execution_1.
10956 * process-stratum-target.c
10957 (process_stratum_target::has_execution): Change parameter type to
10958 inferior pointer. Check the inferior's PID instead of
10959 inferior_ptid.
10960 * process-stratum-target.h
10961 (process_stratum_target::has_execution): Change parameter type to
10962 inferior pointer.
10963 * record-full.c (record_full_core_target::has_execution): Change
10964 parameter type to inferior pointer.
10965 * target.c (target_has_execution_1): Change parameter type to
10966 inferior pointer.
10967 (target_has_execution_current): Adjust.
10968 * target.h (target_ops::has_execution): Change parameter type to
10969 inferior pointer.
10970 (target_has_execution_1): Change parameter type to inferior
10971 pointer. Change return type to bool.
10972 * tracefile.h (tracefile_target::has_execution): Change parameter
10973 type to inferior pointer.
10974
10975 2020-01-10 Pedro Alves <palves@redhat.com>
10976
10977 * exceptions.c (print_flush): Remove current_top_target() check.
10978
10979 2020-01-10 Pedro Alves <palves@redhat.com>
10980
10981 * remote.c (show_remote_exec_file): Show the current inferior's
10982 exec-file instead of the command variable's value.
10983
10984 2020-01-10 Pedro Alves <palves@redhat.com>
10985
10986 * record-full.c (record_full_resume_ptid): New global.
10987 (record_full_target::resume): Set it.
10988 (record_full_wait_1): Use record_full_resume_ptid instead of
10989 inferior_ptid.
10990
10991 2020-01-10 Pedro Alves <palves@redhat.com>
10992
10993 * gdbthread.h (scoped_restore_current_thread)
10994 <dont_restore, restore, m_dont_restore>: Declare.
10995 * thread.c (thread_alive): Add assertion. Return bool.
10996 (switch_to_thread_if_alive): New.
10997 (prune_threads): Switch inferior/thread.
10998 (print_thread_info_1): Switch thread before calling target methods.
10999 (scoped_restore_current_thread::restore): New, factored out from
11000 ...
11001 (scoped_restore_current_thread::~scoped_restore_current_thread):
11002 ... this.
11003 (scoped_restore_current_thread::scoped_restore_current_thread):
11004 Add assertion.
11005 (thread_apply_all_command, thread_select): Use
11006 switch_to_thread_if_alive.
11007
11008 2020-01-10 George Barrett <bob@bob131.so>
11009
11010 * stap-probe.c (stap_modify_semaphore): Don't check for null
11011 semaphores.
11012 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
11013 for null semaphores.
11014
11015 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
11016
11017 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
11018 all source windows, and maintain horizontal scroll status while
11019 doing so.
11020
11021 2020-01-09 Tom Tromey <tom@tromey.com>
11022
11023 PR tui/18932:
11024 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
11025 update_source_window, not print_source_lines.
11026
11027 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
11028
11029 * tui/tui.c (tui_enable): Register tui hooks after calling
11030 tui_display_main.
11031
11032 2020-01-09 Christian Biesinger <cbiesinger@google.com>
11033
11034 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
11035
11036 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
11037
11038 * thread.c (print_thread_info_1): Fix indentation.
11039
11040 2020-01-09 Christian Biesinger <cbiesinger@google.com>
11041
11042 * symtab.c (general_symbol_info::compute_and_set_names): Move the
11043 unique_xmalloc_ptr outside the if to always free the demangled name.
11044
11045 2020-01-08 Tom Tromey <tromey@adacore.com>
11046
11047 * xcoffread.c (enter_line_range, read_xcoff_symtab)
11048 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
11049 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
11050 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
11051 Remove.
11052 (section_offsets): New typedef.
11053 * symtab.c (fixup_section, get_msymbol_address): Update.
11054 * symmisc.c (dump_msymbols): Update.
11055 * symfile.h (relative_addr_info_to_section_offsets)
11056 (symfile_map_offsets_to_segments): Update.
11057 * symfile.c (build_section_addr_info_from_objfile)
11058 (init_objfile_sect_indices): Update.
11059 (struct place_section_arg): Change type of "offsets".
11060 (place_section): Update.
11061 (relative_addr_info_to_section_offsets): Change type of
11062 "section_offsets". Remove "num_sections" parameter.
11063 (default_symfile_offsets, syms_from_objfile_1)
11064 (set_objfile_default_section_offset): Update.
11065 (reread_symbols): No need to preserve section offsets by hand.
11066 (symfile_map_offsets_to_segments): Change type of "offsets".
11067 * stap-probe.c (relocate_address): Update.
11068 * stabsread.h (process_one_symbol): Update.
11069 * solib-target.c (struct lm_info_target) <offsets>: Change type.
11070 (solib_target_relocate_section_addresses): Update.
11071 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
11072 Update.
11073 * solib-frv.c (frv_relocate_main_executable): Update.
11074 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
11075 * solib-aix.c (solib_aix_get_section_offsets): Change return
11076 type.
11077 (solib_aix_solib_create_inferior_hook): Update.
11078 * remote.c (remote_target::get_offsets): Update.
11079 * psymtab.c (find_pc_sect_psymtab): Update.
11080 * psympriv.h (struct partial_symbol) <address, text_low,
11081 text_high>: Update.
11082 * objfiles.h (obj_section_offset): Update.
11083 (struct objfile) <section_offsets>: Change type.
11084 <num_sections>: Remove.
11085 (objfile_relocate): Update.
11086 * objfiles.c (entry_point_address_query): Update
11087 (relocate_one_symbol): Change type of "section_offsets".
11088 (objfile_relocate1, objfile_relocate1): Change type of
11089 "new_offsets".
11090 (objfile_rebase1): Update.
11091 * mipsread.c (mipscoff_symfile_read): Update.
11092 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
11093 parameter.
11094 * mdebugread.c (parse_symbol): Change type of "section_offsets".
11095 (parse_external, psymtab_to_symtab_1): Update.
11096 * machoread.c (macho_symfile_offsets): Update.
11097 * ia64-tdep.c (ia64_find_unwind_table): Update.
11098 * hppa-tdep.c (read_unwind_info): Update.
11099 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
11100 * dwarf2read.c (create_addrmap_from_index)
11101 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
11102 (process_psymtab_comp_unit_reader, add_partial_symbol)
11103 (add_partial_subprogram, process_full_comp_unit)
11104 (read_file_scope, read_func_scope, read_lexical_block_scope)
11105 (read_call_site_scope, dwarf2_rnglists_process)
11106 (dwarf2_ranges_process, dwarf2_ranges_read)
11107 (dwarf_decode_lines_1, var_decode_location, new_symbol)
11108 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
11109 Update.
11110 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
11111 Update.
11112 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
11113 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
11114 (process_one_symbol): Change type of "section_offsets".
11115 * ctfread.c (get_objfile_text_range): Update.
11116 * coffread.c (coff_symtab_read, enter_linenos)
11117 (process_coff_symbol): Update.
11118 * coff-pe-read.c (add_pe_forwarded_sym): Update.
11119 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
11120
11121 2020-01-08 Tom Tromey <tromey@adacore.com>
11122
11123 * dwarf2read.c (parse_macro_definition): Use std::string.
11124 (parse_macro_definition): Likewise.
11125
11126 2020-01-08 Tom Tromey <tromey@adacore.com>
11127
11128 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
11129 (ATTR_ALLOC_CHUNK): Remove.
11130
11131 2020-01-08 Tom Tromey <tromey@adacore.com>
11132
11133 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
11134
11135 2020-01-08 Tom Tromey <tromey@adacore.com>
11136
11137 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
11138 (dwarf2_compute_name, open_dwo_file): Likewise.
11139 (process_enumeration_scope): Use std::vector.
11140 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
11141 (partial_die_info::fixup, dwarf2_start_subfile)
11142 (guess_full_die_structure_name, dwarf2_name): Likewise.
11143 (determine_prefix): Update.
11144 (guess_full_die_structure_name): Make return type const.
11145 (partial_die_full_name): Return unique_xmalloc_ptr.
11146 (DW_FIELD_ALLOC_CHUNK): Remove.
11147
11148 2020-01-07 Tom Tromey <tromey@adacore.com>
11149
11150 PR build/24937:
11151 * stap-probe.c (class stap_static_probe_ops): Add constructor.
11152
11153 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
11154
11155 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
11156
11157 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
11158
11159 * stack.c (print_frame_info): Move disassemble_next_line code
11160 inside source_print block.
11161
11162 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11163
11164 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
11165 gdb/signals.h, as we are now using native signal symbols.
11166
11167 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
11168
11169 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
11170 overflow by an early check of content vs threshold.
11171 * tui/tui-source.c (tui_source_window::line_is_displayed):
11172 Likewise.
11173
11174 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11175
11176 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
11177
11178 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
11179
11180 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
11181 export table if no section contains it's RVA.
11182
11183 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11184
11185 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
11186
11187 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
11188
11189 * source.c (print_source_lines_base): Set last_line_listed.
11190
11191 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
11192
11193 * tui/tui-disasm.c: Remove trailing spaces.
11194
11195 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11196 Pedro Alves <palves@redhat.com>
11197
11198 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
11199 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
11200 (windows_gdb_signal_to_target): New function, uses the above
11201 enumeration to convert GDB internal signal codes to equivalent
11202 Windows codes.
11203 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
11204 * windows-nat.c: Include "gdb_wait.h".
11205 (get_windows_debug_event): Extract the fatal exception from the
11206 exit status and convert to the equivalent Posix signal number.
11207 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
11208 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
11209 * gdbsupport/gdb_wait.c: New file, implements
11210 windows_status_to_termsig.
11211 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
11212 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
11213
11214 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
11215
11216 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
11217 show_layout.
11218
11219 2020-01-05 Luis Machado <luis.machado@linaro.org>
11220
11221 * aarch64-linux-nat.c
11222 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
11223 and bfd_mach_aarch64.
11224
11225 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11226
11227 * ui-file.c (stdio_file::can_emit_style_escape)
11228 (tee_file::can_emit_style_escape): Ensure style is used also on
11229 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
11230 to gdb_stdout.
11231 * main.c (set_gdb_data_directory): Use file style to output the
11232 warning that the given pathname is not a directory.
11233 * top.c (show_history_filename, gdb_safe_append_history)
11234 (show_gdb_datadir): Use file style.
11235
11236 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
11237
11238 * solib-target.c (struct lm_info_target):
11239 Change offsets to be a unique_xmalloc_ptr.
11240 (solib_target_relocate_section_addresses): Update.
11241
11242 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
11243
11244 * windows-nat.c (windows_clear_solib): Free so_list linked list.
11245
11246 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
11247
11248 * MAINTAINERS (Write After Approval): Add myself.
11249
11250 2020-01-02 Luis Machado <luis.machado@linaro.org>
11251
11252 * proc-service.c (get_ps_regcache): Remove reference to obsolete
11253 Cell BE architecture.
11254 * target.h (struct target_ops) <thread_architecture>: Likewise.
11255
11256 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11257
11258 * Makefile.in: Use INSTALL_PROGRAM_ENV.
11259
11260 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11261
11262 * MAINTAINERS (Write After Approval): Add myself.
11263
11264 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11265
11266 * gdbarch.sh: Update copyright year range of generated files.
11267
11268 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11269
11270 Update copyright year range in all GDB files.
11271
11272 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11273
11274 * copyright.py: Convert to Python 3.
11275
11276 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11277
11278 * copyright.py: Adapt after move of gnulib directory from gdb
11279 directory to toplevel directory.
11280
11281 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11282
11283 * copyright.py (main): Exit if run from the wrong directory.
11284
11285 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11286
11287 * top.c (print_gdb_version): Change copyright year to 2020.
11288
11289 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11290
11291 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
11292
11293 For older changes see ChangeLog-2019.
11294 \f
11295 Local Variables:
11296 mode: change-log
11297 left-margin: 8
11298 fill-column: 74
11299 version-control: never
11300 coding: utf-8
11301 End: