702d827a955bd95e24005a3daca088871c3295f9
[binutils-gdb.git] / gdb / ChangeLog
1 2020-08-07 Tom Tromey <tromey@adacore.com>
2
3 * ravenscar-thread.c (ravenscar_thread_target::wait): Return
4 event_ptid.
5
6 2020-08-07 Tom Tromey <tromey@adacore.com>
7
8 * ravenscar-thread.c (ravenscar_thread_target::wait): Check
9 runtime_initialized.
10
11 2020-08-07 Tom Tromey <tromey@adacore.com>
12
13 * ravenscar-thread.c (ravenscar_thread_target): Don't call
14 add_active_thread.
15 (ravenscar_thread_target::add_active_thread): Now public.
16 (ravenscar_inferior_created): Call add_active_thread after pushing
17 the target.
18
19 2020-08-07 Simon Marchi <simon.marchi@polymtl.ca>
20
21 * regcache.c (ptid_regcache_map): New type.
22 (target_ptid_regcache_map): New type.
23 (regcaches): Change type to target_ptid_regcache_map.
24 (get_thread_arch_aspace_regcache): Update to regcaches' new
25 type.
26 (regcache_thread_ptid_changed): Likewise.
27 (registers_changed_ptid): Likewise.
28 (regcaches_size): Likewise.
29 (regcaches_test): Update.
30 (regcache_thread_ptid_changed): Update.
31 * regcache.h (regcache_up): New type.
32 * gdbsupport/ptid.h (hash_ptid): New struct.
33
34 2020-08-07 Simon Marchi <simon.marchi@efficios.com>
35
36 * observable.h (thread_ptid_changed): Add parameter
37 `process_stratum_target *`.
38 * infrun.c (infrun_thread_ptid_changed): Add parameter
39 `process_stratum_target *` and use it.
40 (selftests): New namespace.
41 (infrun_thread_ptid_changed): New function.
42 (_initialize_infrun): Register selftest.
43 * regcache.c (regcache_thread_ptid_changed): Add parameter
44 `process_stratum_target *` and use it.
45 (regcache_thread_ptid_changed): New function.
46 (_initialize_regcache): Register selftest.
47 * thread.c (thread_change_ptid): Pass target to
48 thread_ptid_changed observable.
49
50 2020-08-06 Caroline Tice <cmtice@google.com>
51
52 * dwarf2/read.c (struct dwo_file): Update comment on 'sections' field.
53 (struct dwp_sections): Update field comments. Add loclists and
54 rnglists fields.
55 (struct virtual_v2_dwo_sections): Rename struct to
56 'virtual_v2_or_v5_dwo_sections'; update comments at top of struct; add
57 size & offset fields for loclists and rnglists.
58 (struct dwp_hash_table): Add a 'v5' struct field to the union section.
59 (create_debug_type_hash_table): Add 'DW_UT_split_type' to the check for
60 skipping dummy type units.
61 (create_dwp_hash_table): Update the large comment above the function to
62 discuss Version 5 DWP files as well, with references. Update all the
63 version checks in the function to check for version 5 as well. Add new
64 section at the end to create dwp hash table for version 5.
65 (create_dwp_v2_section): Rename function to
66 'create_dwp_v2_or_v5_section'. Update function comment appropriately.
67 Add V5 to error message text.
68 (create_dwo_unit_in_dwp_v2): Change calls to create_dwp_v2_section
69 into calls to create_dwp_v2_or_v5_section.
70 (create_dwo_unit_in_dwp_v5): New function.
71 (lookup_dwo_unit_in_dwp): Update conditional statement to explicitly
72 check for version2; add else clause to handle version 5.
73 (open_and_init_dwo_file): Add code to check dwarf version & only call
74 create_debug_types_hash_table (with sections.types) if version is not 5;
75 else call create_debug_type_hash_table, with sections.info.
76 (dwarf2_locate_v2_dwp_sections): Update function comment to mention
77 version 5.
78 (dwarf2_locate_v5_dwp_sections): New function.
79 (open_and_init_dwp_file): Add else-if clause for version 5 to call
80 bfd_map_over_sections with dwarf2_locate_v5_dwp_sections.
81
82 2020-08-06 Simon Marchi <simon.marchi@efficios.com>
83
84 * regcache.h (class regcache): Remove friend
85 registers_changed_ptid.
86 <regcache_thread_ptid_changed>: Remove.
87 <regcaches>: Remove.
88 * regcache.c (regcache::regcaches): Rename to...
89 (regcaches): ... this. Make static.
90 (get_thread_arch_aspace_regcache): Update.
91 (regcache::regcache_thread_ptid_changed): Rename to...
92 (regcache_thread_ptid_changed): ... this. Update.
93 (class regcache_access): Remove.
94 (regcaches_test): Update.
95 (_initialize_regcache): Update.
96 * sparc64-tdep.c, dwarf2/index-write.c, record-btrace.c: Include
97 <forward_list>.
98
99 2020-08-06 Simon Marchi <simon.marchi@efficios.com>
100
101 * regcache.h (class regcache) <current_regcache>: Rename to...
102 <regcaches>: ... this. Move doc here.
103 * regcache.c (regcache::current_regcache) Rename to...
104 (regcache::regcaches): ... this. Move doc to header.
105 (get_thread_arch_aspace_regcache): Update.
106 (regcache::regcache_thread_ptid_changed): Update.
107 (registers_changed_ptid): Update.
108 (class regcache_access) <current_regcache_size>: Rename to...
109 <regcaches_size>: ... this.
110 (current_regcache_test): Rename to...
111 (regcaches_test): ... this.
112 (_initialize_regcache): Update.
113
114 2020-08-06 Victor Collod <vcollod@nvidia.com>
115
116 * amd64-tdep.c (amd64_analyze_prologue): Fix incorrect comment.
117
118 2020-08-05 Kevin Buettner <kevinb@redhat.com>
119
120 * corelow.c (core_target::build_file_mappings): Don't output
121 null pathname in warning.
122
123 2020-08-05 Simon Marchi <simon.marchi@polymtl.ca>
124
125 * gdb.dwarf2/clztest.exp, gdb.dwarf2/dw2-common-block.exp,
126 gdb.dwarf2/dw2-dup-frame.exp, gdb.dwarf2/dw2-reg-undefined.exp,
127 gdb.dwarf2/dw2-single-line-discriminators.exp,
128 dw2-undefined-ret-addr.exp: Pass nopie to compilation options.
129
130 2020-08-05 Tom Tromey <tromey@adacore.com>
131
132 PR rust/26197:
133 * dwarf2/read.c (alloc_rust_variant): Handle univariant case.
134 (quirk_rust_enum): Call alloc_rust_variant for univariant case.
135 Fix off-by-one and type size errors in ordinary case.
136
137 2020-08-05 Tom de Vries <tdevries@suse.de>
138
139 * gdbtypes.c (type_not_allocated, type_not_associated): Use
140 "prop->const_val () == 0" instead of "prop->const_val () != 0".
141
142 2020-08-04 Simon Marchi <simon.marchi@efficios.com>
143
144 * frame.h (frame_id_p): Return bool.
145 (frame_id_artificial_p): Return bool.
146 (frame_id_eq): Return bool.
147 (has_stack_frames): Return bool.
148 (get_selected_frame): Fix typo in comment.
149 (get_frame_pc_if_available): Return bool.
150 (get_frame_address_in_block_if_available): Return bool.
151 (get_frame_func_if_available): Return bool.
152 (read_frame_register_unsigned): Return bool.
153 (get_frame_register_bytes): Return bool.
154 (safe_frame_unwind_memory): Return bool.
155 (deprecated_frame_register_read): Return bool.
156 (frame_unwinder_is): Return bool.
157 * frame.c (struct frame_info) <prev_arch::p>: Change type to
158 bool.
159 <this_id::p>: Likewise.
160 <prev_p>: Likewise.
161 (frame_stash_add): Return bool.
162 (get_frame_id): Use bool.
163 (frame_id_build_special) Use bool.
164 (frame_id_build_unavailable_stack): Use bool.
165 (frame_id_build): Use bool.
166 (frame_id_p): Return bool, use true/false instead of 1/0.
167 (frame_id_artificial_p): Likewise.
168 (frame_id_eq): Likewise.
169 (frame_id_inner): Likewise.
170 (get_frame_func_if_available): Likewise.
171 (read_frame_register_unsigned): Likewise.
172 (deprecated_frame_register_read): Likewise.
173 (get_frame_register_bytes): Likewise.
174 (has_stack_frames): Likewise.
175 (inside_main_func): Likewise.
176 (inside_entry_func): Likewise.
177 (get_frame_pc_if_available): Likewise.
178 (get_frame_address_in_block_if_available): Likewise.
179 (frame_unwinder_is): Likewise.
180 (safe_frame_unwind_memory): Likewise.
181 (frame_unwind_arch): Likewise.
182
183 2020-08-04 Simon Marchi <simon.marchi@efficios.com>
184
185 * frame.c (frame_info) <prev_func> <p>: Rename to status, change
186 type to cached_copy_status.
187 (fprintf_frame): Adjust.
188 (get_frame_func_if_available): Adjust.
189 (frame_cleanup_after_sniffer): Adjust.
190
191 2020-08-04 Mark Wielaard <mark@klomp.org>
192
193 * MAINTAINERS (Write After Approval): Update email address.
194
195 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
196
197 * gdbtypes.h (TYPE_DYN_PROP_ADDR): Remove, replace uses with
198 dynamic_prop::const_val.
199
200 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
201
202 * gdbtypes.h (TYPE_DYN_PROP_KIND): Remove, replace uses with
203 dynamic_prop::kind.
204
205 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * gdbtypes.h (TYPE_DYN_PROP_BATON): Remove.
208
209 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com>
210
211 * configure.tgt: Set gdb_sim for bpf-*-* targets.
212
213 2020-08-04 Weimin Pan <weimin.pan@oracle.com>
214 Jose E. Marchesi <jose.marchesi@oracle.com>
215
216 * configure.tgt: Add entry for bpf-*-*.
217 * Makefile.in (ALL_TARGET_OBS): Add bpf-tdep.o
218 (ALLDEPFILES): Add bpf-tdep.c.
219 * bpf-tdep.c: New file.
220 * MAINTAINERS: Add bpf target and maintainer.
221 * NEWS: Mention the support for the new target.
222
223 2020-08-04 Tom de Vries <tdevries@suse.de>
224
225 PR symtab/23270
226 * dwarf2/read.c (find_partial_die): Change internal error into Dwarf
227 Error.
228
229 2020-08-03 John Baldwin <jhb@FreeBSD.org>
230
231 * syscalls/freebsd.xml: Regenerate.
232
233 2020-08-03 John Baldwin <jhb@FreeBSD.org>
234
235 * syscalls/update-freebsd.sh: Fix usage and year range.
236
237 2020-08-03 Tom de Vries <tdevries@suse.de>
238
239 PR symtab/26333
240 * dwarf2/read.c (dwarf_decode_lines_1): Ignore
241 DW_LNE_lo_user/DW_LNE_hi_user range.
242
243 2020-07-30 Simon Marchi <simon.marchi@polymtl.ca>
244
245 PR ada/26318
246 * ada-lang.c (ada_modulus): Return 0 if property is not of const
247 kind.
248
249 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
250
251 * breakpoint.c (set_breakpoint_condition): Do minor refactoring.
252
253 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
254
255 * breakpoint.c (set_breakpoint_condition): Update the condition
256 expressions after checking that the input condition string parses
257 successfully and does not contain junk at the end.
258
259 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
260
261 * breakpoint.c (set_breakpoint_condition): Update the
262 condition string after parsing the new condition successfully.
263
264 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
265
266 * proc-api.c (_STRUCTURED_PROC): Don't define.
267 * proc-events.c: Likewise.
268 * proc-flags.c: Likewise.
269 * proc-why.c: Likewise.
270 * procfs.c: Likewise.
271
272 * Makefile.in (INTERNAL_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
273 * configure, config.in: Regenerate.
274
275 2020-07-30 Tom de Vries <tdevries@suse.de>
276
277 PR build/26320
278 * ui-style.h (struct ui_file_style::color): Wrap m_value and
279 m_red/m_green/m_blue in a union.
280
281 2020-07-29 Tom de Vries <tdevries@suse.de>
282
283 PR tdep/26280
284 * s390-tdep.c (s390_displaced_step_fixup): Fix Wmaybe-uninitialized.
285
286 2020-07-28 Tom Tromey <tromey@adacore.com>
287
288 PR symtab/26270:
289 * symtab.h (find_pc_partial_function_sym): Declare.
290 * cli/cli-cmds.c (disassemble_command): Use
291 find_pc_partial_function_sym. Check asm_demangle.
292 * blockframe.c (cache_pc_function_sym): New global.
293 (cache_pc_function_name): Remove.
294 (clear_pc_function_cache): Update.
295 (find_pc_partial_function_sym): New function, from
296 find_pc_partial_function.
297 (find_pc_partial_function): Rewrite using
298 find_pc_partial_function_sym.
299
300 2020-07-28 Tom Tromey <tromey@adacore.com>
301
302 * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble"
303 help. Add usage.
304
305 2020-07-28 Tom Tromey <tromey@adacore.com>
306
307 * dwarf2/expr.c (dwarf_expr_context::execute_stack_op)
308 <DW_OP_GNU_variable_value>: Cast to address type.
309
310 2020-07-28 Kamil Rytarowski <n54@gmx.com>
311
312 * nbsd-nat.h (nbsd_nat_target::xfer_partial): New declaration.
313 * nbsd-nat.c (nbsd_nat_target::xfer_partial): New function.
314 * nbsd-tdep.c (nbsd_gdbarch_data_handle, struct nbsd_gdbarch_data)
315 (init_nbsd_gdbarch_data, get_nbsd_gdbarch_data)
316 (nbsd_get_siginfo_type): New.
317 (nbsd_init_abi): Install gdbarch "get_siginfo_type" method.
318 (_initialize_nbsd_tdep): New.
319
320 2020-07-28 H.J. Lu <hongjiu.lu@intel.com>
321
322 PR binutils/26301
323 * configure: Regenerated.
324
325 2020-07-28 H.J. Lu <hongjiu.lu@intel.com>
326
327 PR binutils/26301
328 * configure: Regenerated.
329
330 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
331
332 * python/py-frame.c: Remove 'user-regs.h' include.
333 (frapy_read_register): Rewrite to make use of
334 gdbpy_parse_register_id.
335 * python/py-registers.c (gdbpy_parse_register_id): New function,
336 moved here from python/py-unwind.c. Updated the return type, and
337 also accepts register descriptor objects.
338 * python/py-unwind.c: Remove 'user-regs.h' include.
339 (pyuw_parse_register_id): Moved to python/py-registers.c.
340 (unwind_infopy_add_saved_register): Update to use
341 gdbpy_parse_register_id.
342 (pending_framepy_read_register): Likewise.
343 * python/python-internal.h (gdbpy_parse_register_id): Declare.
344
345 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
346
347 * python/py-registers.c: Add 'user-regs.h' include.
348 (register_descriptor_iter_find): New function.
349 (register_descriptor_iterator_object_methods): New static global
350 methods array.
351 (register_descriptor_iterator_object_type): Add pointer to methods
352 array.
353
354 2020-07-27 John Baldwin <jhb@FreeBSD.org>
355
356 * fbsd-nat.h: Include <osreldate.h>. Define USE_SIGTRAP_SIGINFO
357 for all architectures on FreeBSD 11.3 and later.
358
359 2020-07-27 Tom Tromey <tromey@adacore.com>
360
361 * gcore.h (load_corefile): Don't declare.
362
363 2020-07-27 Tom de Vries <tdevries@suse.de>
364
365 * configure.ac: Fix sys/sockets.h -> sys/socket.h typo.
366 * config.in: Regenerate.
367 * configure: Regenerate.
368
369 2020-07-26 Eli Zaretskii <eliz@gnu.org>
370
371 * configure.ac (AC_CHECK_HEADERS): Check for sys/socket.h and
372 ws2tcpip.h. When checking whether socklen_t type is defined, use
373 ws2tcpip.h if it is available and sys/socket.h isn't.
374 * configure: Regenerate.
375 * config.in: Regenerate.
376
377 2020-07-25 Andrew Burgess <andrew.burgess@embecosm.com>
378
379 PR fortran/23051
380 PR fortran/26139
381 * valops.c (value_ind): Pass address to
382 readjust_indirect_value_type.
383 * value.c (readjust_indirect_value_type): Make parameter
384 non-const, and add extra address parameter. Resolve original type
385 before using it.
386 * value.h (readjust_indirect_value_type): Update function
387 signature and comment.
388
389 2020-07-25 Tom de Vries <tdevries@suse.de>
390
391 PR symtab/26243
392 * dwarf2/read.c (lnp_state_machine::record_line): Ignore zero line
393 entries.
394
395 2020-07-24 Aaron Merey <amerey@redhat.com>
396
397 * Makefile.in: Replace LIBDEBUGINFOD with DEBUGINFOD_LIBS.
398 * configure: Rebuild.
399
400 2020-07-23 Kevin Buettner <kevinb@redhat.com>
401
402 PR corefiles/26294
403 * corelow.c (_initialize_corelow): Add period to help text
404 for "maintenance print core-file-backed-mappings".
405
406 2020-07-23 Pedro Alves <pedro@palves.net>
407
408 * frame-unwind.c (frame_unwind_try_unwinder): On exception, don't
409 touch THIS_CACHE/THIS_FRAME if the frame cache was cleared
410 meanwhile.
411 * frame.c (frame_cache_generation, get_frame_cache_generation):
412 New.
413 (reinit_frame_cache): Increment FRAME_CACHE_GENERATION.
414 (get_prev_frame_if_no_cycle): On exception, don't touch
415 PREV_FRAME/THIS_FRAME if the frame cache was cleared meanwhile.
416 * frame.h (get_frame_cache_generation): Declare.
417
418 2020-07-23 Tom de Vries <tdevries@suse.de>
419
420 PR tui/26282
421 * tui/tui-winsource.h (struct tui_source_windows::tui_source_windows):
422 New default constructor.
423
424 2020-07-23 Andrew Burgess <andrew.burgess@embecosm.com>
425
426 * disasm.c (do_mixed_source_and_assembly_deprecated): Don't
427 exclude non-statement entries.
428
429 2020-07-22 Kevin Buettner <kevinb@redhat.com>
430
431 * NEWS (New commands): Mention new command
432 "maintenance print core-file-backed-mappings".
433
434 2020-07-22 Kevin Buettner <kevinb@redhat.com>
435
436 * corelow.c (gdbcmd.h): Include.
437 (core_target::info_proc_mappings): New method.
438 (get_current_core_target): New function.
439 (maintenance_print_core_file_backed_mappings): New function.
440 (_initialize_corelow): Add core-file-backed-mappings to
441 "maint print" commands.
442
443 2020-07-22 Kevin Buettner <kevinb@redhat.com>
444
445 * linux-tdep.c (dump_note_entry_p): New function.
446 (linux_dump_mapping_p_ftype): New typedef.
447 (linux_find_memory_regions_full): Add new parameter,
448 should_dump_mapping_p.
449 (linux_find_memory_regions): Adjust call to
450 linux_find_memory_regions_full.
451 (linux_make_mappings_core_file_notes): Use dump_note_entry_p in
452 call to linux_find_memory_regions_full.
453
454 2020-07-22 Kevin Buettner <kevinb@redhat.com>
455
456 * corelow.c (solist.h, unordered_map): Include.
457 (class core_target): Add field m_core_file_mappings and
458 method build_file_mappings.
459 (core_target::core_target): Call build_file_mappings.
460 (core_target::~core_target): Free memory associated with
461 m_core_file_mappings.
462 (core_target::build_file_mappings): New method.
463 (core_target::xfer_partial): Use m_core_file_mappings
464 for memory transfers.
465 * linux-tdep.c (linux_read_core_file_mappings): New
466 function.
467 (linux_core_info_proc_mappings): Rewrite to use
468 linux_read_core_file_mappings.
469 (linux_init_abi): Register linux_read_core_file_mappings.
470
471 2020-07-22 Kevin Buettner <kevinb@redhat.com>
472
473 * arch-utils.c (default_read_core_file_mappings): New function.
474 * arch-utils.c (default_read_core_file_mappings): Declare.
475 * gdbarch.sh (read_core_file_mappings): New gdbarch method.
476 * gdbarch.h, gdbarch.c: Regenerate.
477
478 2020-07-22 Kevin Buettner <kevinb@redhat.com>
479
480 PR corefiles/25631
481 * corelow.c (core_target:xfer_partial): Revise
482 TARGET_OBJECT_MEMORY case to consider non-SEC_HAS_CONTENTS
483 case after first checking the stratum beneath the core
484 target.
485 (has_all_memory): Return true.
486 * target.c (raw_memory_xfer_partial): Revise comment
487 regarding use of has_all_memory.
488
489 2020-07-22 Kevin Buettner <kevinb@redhat.com>
490
491 * exec.h (section_table_xfer_memory): Revise declaration,
492 replacing section name parameter with an optional callback
493 predicate.
494 * exec.c (section_table_xfer_memory): Likewise.
495 * bfd-target.c, exec.c, target.c, corelow.c: Adjust all callers
496 of section_table_xfer_memory.
497
498 2020-07-22 Tom Tromey <tromey@adacore.com>
499
500 * mi/mi-cmd-stack.c (list_args_or_locals): Use
501 lookup_symbol_search_name.
502
503 2020-07-22 Andrew Burgess <andrew.burgess@embecosm.com>
504
505 * python/py-registers.c (gdbpy_register_object_data_init): Remove
506 redundant local variable.
507 (gdbpy_get_register_descriptor): Extract descriptor vector as a
508 reference, not pointer, update code accordingly.
509
510 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
511 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
512
513 * objfiles.h (struct objfile) <skip_jit_symbol_lookup>: New field.
514 * jit.c (jit_breakpoint_re_set_internal): Use the
515 `skip_jit_symbol_lookup` field.
516
517 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
518 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
519
520 * jit.c (jit_read_descriptor): Define the descriptor address once,
521 use twice.
522 (jit_breakpoint_deleted): Move the declaration of the loop variable
523 `iter` into the loop header.
524 (jit_breakpoint_re_set_internal): Move the declaration of the local
525 variable `objf_data` to the first point of definition.
526 (jit_event_handler): Move the declaration of local variables
527 `code_entry`, `entry_addr`, and `objf` to their first point of use.
528 Rename `objf` to `jited`.
529
530 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
531
532 * jit.h (struct jiter_objfile_data) <jiter_objfile_data, objfile>:
533 Remove.
534 * jit.c (get_jiter_objfile_data): Update.
535
536 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
537 Simon Marchi <simon.marchi@polymtl.ca>
538
539 * jit.c (struct jit_program_space_data): Remove.
540 (jit_program_space_key): Remove.
541 (jiter_objfile_data::~jiter_objfile_data): Remove program space
542 stuff.
543 (get_jit_program_space_data): Remove.
544 (jit_breakpoint_deleted): Iterate on all of the program space's
545 objfiles.
546 (jit_inferior_init): Likewise.
547 (jit_breakpoint_re_set_internal): Likewise. Also change return
548 type to void.
549 (jit_breakpoint_re_set): Pass current_program_space to
550 jit_breakpoint_re_set_internal.
551
552 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
553
554 * jit.h (struct jiter_objfile_data) <cached_code_address,
555 jit_breakpoint>: Move to here from ...
556 * jit.c (jit_program_space_data): ... here.
557 (jiter_objfile_data::~jiter_objfile_data): Update.
558 (jit_breakpoint_deleted): Update.
559 (jit_breakpoint_re_set_internal): Update.
560
561 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
562
563 * jit.c (jiter_objfile_data::~jiter_objfile_data): Remove some
564 checks.
565 (jit_read_descriptor): Remove NULL check.
566 (jit_event_handler): Add an assertion.
567
568 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
569
570 * jit.h (struct jit_objfile_data): Split into...
571 (struct jiter_objfile_data): ... this ...
572 (struct jited_objfile_data): ... and this.
573 * objfiles.h (struct objfile) <jit_data>: Remove.
574 <jiter_data, jited_data>: New fields.
575 * jit.c (jit_objfile_data::~jit_objfile_data): Rename to ...
576 (jiter_objfile_data::~jiter_objfile_data): ... this.
577 (get_jit_objfile_data): Rename to ...
578 (get_jiter_objfile_data): ... this.
579 (add_objfile_entry): Update.
580 (jit_read_descriptor): Use get_jiter_objfile_data.
581 (jit_find_objf_with_entry_addr): Use objfile's jited_data field.
582 (jit_breakpoint_re_set_internal): Use get_jiter_objfile_data.
583 (jit_inferior_exit_hook): Use objfile's jited_data field.
584
585 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
586
587 * jit.h: Forward-declare `struct minimal_symbol`.
588 (struct jit_objfile_data): Migrate to here from jit.c; also add a
589 constructor, destructor, and an objfile* field.
590 * jit.c (jit_objfile_data): Remove.
591 (struct jit_objfile_data): Migrate from here to jit.h.
592 (jit_objfile_data::~jit_objfile_data): New destructor
593 implementation with code moved from free_objfile_data.
594 (free_objfile_data): Delete.
595 (get_jit_objfile_data): Update to use the jit_data field of objfile.
596 (jit_find_objf_with_entry_addr): Ditto.
597 (jit_inferior_exit_hook): Ditto.
598 (_initialize_jit): Remove the call to
599 register_objfile_data_with_cleanup.
600 * objfiles.h (struct objfile) <jit_data>: New field.
601
602 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
603
604 * jit.h: Forward-declare `struct objfile`.
605 (jit_event_handler): Add a second parameter, the JITer objfile.
606 * jit.c (jit_read_descriptor): Change the signature to take the
607 JITer objfile as an argument instead of the jit_program_space_data.
608 (jit_inferior_init): Update the call to jit_read_descriptor.
609 (jit_event_handler): Use the new JITer objfile argument when calling
610 jit_read_descriptor.
611 * breakpoint.c (handle_jit_event): Update the call to
612 jit_event_handler to pass the JITer objfile.
613
614 2020-07-21 John Baldwin <jhb@FreeBSD.org>
615
616 * gdbarch.c: Regenerate.
617 * gdbarch.h: Regenerate.
618 * gdbarch.sh (handle_segmentation_fault): Remove method.
619 * infrun.c (handle_segmentation_fault): Remove.
620 (print_signal_received_reason): Remove call to
621 handle_segmentation_fault.
622
623 2020-07-21 John Baldwin <jhb@FreeBSD.org>
624
625 * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
626 Rename to sparc64_linux_report_signal_info and add siggnal
627 argument.
628 (sparc64_linux_init_abi): Use sparc64_linux_report_signal_info
629 instead of sparc64_linux_handle_segmentation_fault.
630
631 2020-07-21 John Baldwin <jhb@FreeBSD.org>
632
633 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Use
634 i386_linux_report_signal_info instead of
635 i386_linux_handle_segmentation_fault.
636 * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Rename
637 to i386_linux_report_signal_info and add siggnal argument.
638 (i386_linux_init_abi): Use i386_linux_report_signal_info instead
639 of i386_linux_handle_segmentation_fault.
640 * i386-linux-tdep.h (i386_linux_handle_segmentation_fault): Rename
641 to i386_linux_report_signal_info and add siggnal argument.
642
643 2020-07-21 John Baldwin <jhb@FreeBSD.org>
644
645 * corelow.c (core_target_open): Invoke gdbarch report_signal_info
646 hook if present.
647
648 2020-07-21 John Baldwin <jhb@FreeBSD.org>
649
650 * gdbarch.c: Regenerate.
651 * gdbarch.h: Regenerate.
652 * gdbarch.sh (report_signal_info): New method.
653 * infrun.c (print_signal_received_reason): Invoke gdbarch
654 report_signal_info hook if present.
655
656 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
657
658 * python/py-registers.c : Add 'unordered_map' include.
659 (gdbpy_new_reggroup): Renamed to...
660 (gdbpy_get_reggroup): ...this. Update to only create register
661 group descriptors when needed.
662 (gdbpy_reggroup_iter_next): Update.
663
664 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
665
666 * python/py-registers.c (gdbpy_register_object_data): New static
667 global.
668 (gdbpy_register_object_data_init): New function.
669 (gdbpy_new_register_descriptor): Renamed to...
670 (gdbpy_get_register_descriptor): ...this, and update to reuse
671 existing register descriptors where possible.
672 (gdbpy_register_descriptor_iter_next): Update.
673 (gdbpy_initialize_registers): Register new gdbarch data.
674
675 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
676
677 * linux-nat.c (stopped_pids): Make static.
678
679 2020-07-21 Simon Marchi <simon.marchi@polymtl.ca>
680
681 PR ada/26235
682 * gdbtypes.c (ada_discrete_type_low_bound,
683 ada_discrete_type_high_bound): Handle undefined bounds.
684
685 2020-07-21 Kamil Rytarowski <n54@gmx.com>
686
687 * nbsd-nat.h (nbsd_nat_target::supports_multi_process): New
688 declaration.
689 * nbsd-nat.c (nbsd_nat_target::supports_multi_process): New
690 function.
691
692 2020-07-20 John Baldwin <jhb@FreeBSD.org>
693
694 * fbsd-tdep.c (fbsd_skip_solib_resolver): New function.
695 (fbsd_init_abi): Install gdbarch "skip_solib_resolver" method.
696 * fbsd-tdep.h (fbsd_skip_solib_resolver): New prototype.
697 * mips-fbsd-tdep.c (mips_fbsd_skip_solib_resolver): New function.
698 (mips_fbsd_init_abi): Install gdbarch "skip_solib_resolver"
699 method.
700
701 2020-07-20 Ludovic Courtès <ludo@gnu.org>
702
703 * guile/scm-math.c (vlscm_integer_fits_p): Use 'uintmax_t'
704 and 'intmax_t' instead of 'scm_t_uintmax' and 'scm_t_intmax',
705 which are deprecated in Guile 3.0.
706 * configure.ac (try_guile_versions): Add "guile-3.0".
707 * configure (try_guile_versions): Regenerate.
708 * NEWS: Update entry.
709
710 2020-07-20 Ludovic Courtès <ludo@gnu.org>
711 Doug Evans <dje@google.com>
712
713 PR gdb/21104
714 * guile/scm-ports.c (USING_GUILE_BEFORE_2_2): New macro.
715 (ioscm_memory_port)[read_buf_size, write_buf_size]: Wrap in #if
716 USING_GUILE_BEFORE_2_2.
717 (stdio_port_desc, memory_port_desc) [!USING_GUILE_BEFORE_2_2]:
718 Change type to 'scm_t_port_type *'.
719 (natural_buffer_size) [!USING_GUILE_BEFORE_2_2]: New variable.
720 (ioscm_open_port) [USING_GUILE_BEFORE_2_2]: Add 'stream'
721 parameter and honor it. Update callers.
722 (ioscm_open_port) [!USING_GUILE_BEFORE_2_2]: New function.
723 (ioscm_read_from_port, ioscm_write) [!USING_GUILE_BEFORE_2_2]: New
724 functions.
725 (ioscm_fill_input, ioscm_input_waiting, ioscm_flush): Wrap in #if
726 USING_GUILE_BEFORE_2_2.
727 (ioscm_init_gdb_stdio_port) [!USING_GUILE_BEFORE_2_2]: Use
728 'ioscm_read_from_port'. Call 'scm_set_port_read_wait_fd'.
729 (ioscm_init_stdio_buffers) [!USING_GUILE_BEFORE_2_2]: New function.
730 (gdbscm_stdio_port_p) [!USING_GUILE_BEFORE_2_2]: Use 'SCM_PORTP'
731 and 'SCM_PORT_TYPE'.
732 (gdbscm_memory_port_end_input, gdbscm_memory_port_seek)
733 (ioscm_reinit_memory_port): Wrap in #if USING_GUILE_BEFORE_2_2.
734 (gdbscm_memory_port_read, gdbscm_memory_port_write)
735 (gdbscm_memory_port_seek, gdbscm_memory_port_close)
736 [!USING_GUILE_BEFORE_2_2]: New functions.
737 (gdbscm_memory_port_print): Remove use of 'SCM_PTOB_NAME'.
738 (ioscm_init_memory_port_type) [!USING_GUILE_BEFORE_2_2]: Use
739 'gdbscm_memory_port_read'.
740 Wrap 'scm_set_port_end_input', 'scm_set_port_flush', and
741 'scm_set_port_free' calls in #if USING_GUILE_BEFORE_2_2.
742 (gdbscm_get_natural_buffer_sizes) [!USING_GUILE_BEFORE_2_2]: New
743 function.
744 (ioscm_init_memory_port): Remove.
745 (ioscm_init_memory_port_stream): New function
746 (ioscm_init_memory_port_buffers) [USING_GUILE_BEFORE_2_2]: New
747 function.
748 (gdbscm_memory_port_read_buffer_size) [!USING_GUILE_BEFORE_2_2]:
749 Return scm_from_uint (0).
750 (gdbscm_set_memory_port_read_buffer_size_x)
751 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
752 (gdbscm_memory_port_write_buffer_size) [!USING_GUILE_BEFORE_2_2]:
753 Return scm_from_uint (0).
754 (gdbscm_set_memory_port_write_buffer_size_x)
755 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
756 * configure.ac (try_guile_versions): Add "guile-2.2".
757 * configure: Regenerate.
758 * NEWS: Add entry.
759
760 2020-07-18 Tom Tromey <tom@tromey.com>
761
762 * linux-nat.c (linux_multi_process): Remove.
763 (linux_nat_target::supports_multi_process): Return true.
764
765 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
766
767 * arch/riscv.c (riscv_tdesc_cache): Change map type.
768 (riscv_lookup_target_description): Return pointer out of
769 unique_ptr.
770 * target-descriptions.c (allocate_target_description): Add
771 comment.
772 (target_desc_deleter::operator()): Likewise.
773 * target-descriptions.h (struct target_desc_deleter): Moved to
774 gdbsupport/tdesc.h.
775 (target_desc_up): Likewise.
776
777 2020-07-17 Tom Tromey <tromey@adacore.com>
778
779 * linux-nat.c (linux_nat_target::supports_non_stop)
780 (linux_nat_target::always_non_stop_p): Use "true".
781 (linux_nat_target::supports_disable_randomization): Use "true" and
782 "false".
783
784 2020-07-16 Caroline Tice <cmtice@google.com>
785
786 * dwarf2/read.c (RNGLIST_HEADER_SIZE32) New constant definition.
787 (RNGLIST_HEADER_SIZE64): New constant definition.
788 (struct dwop_section_names): Add rnglists_dwo.
789 (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo.
790 (struct loclist_header): Rename to 'loclists_rnglists_header'.
791 (struct dwo_sections): Add rnglists field.
792 (read_attribut_reprocess): Add tag parameter.
793 (dwarf2_ranges_read): Add tag parameter & remove forward function decl.
794 (cu_debug_rnglists_section): New function (decl & definition).
795 (dwarf2_locate_dwo_sections): Add code to read rnglists_dwo section.
796 (dwarf2_rnglists_process): Add a dwarf_tag parameter, for the kind of
797 die whose range is being checked; get rnglist section from
798 cu_debug_rnglists_section, to get from either objfile or dwo file as
799 appropriate. Add cases for DW_RLE_base_addressx,
800 DW_RLE_startx_length, DW_RLE_startx_endx. Also, update to only add
801 the base address to DW_RLE_offset_pairs (not to all ranges), moving
802 test inside if-condition and updating complaint message.
803 (dwarf2_ranges_process): Add dwarf tag parameter and pass it to
804 dwarf2_rnglists_process.
805 (dwarf2_ranges_read): Add dwarf tag parameter and pass it to
806 dwarf2_ranges_process.
807 (dwarf2_get_pc_bounds): Check for DW_FORM_rnglistx when setting
808 need_ranges_base and update comment appropriately. Also pass die tag
809 to dwarf2_ranges_read.
810 (dwarf2_record_block_ranges): Check for DW_FORM_rnglistx when setting
811 need_ranges_base and update comment appropriately. Also pass die tag
812 to dwarf2_ranges_process.
813 (read_full_die_1): Add code to read DW_AT_rnglists_base and assign to
814 cu->ranges_base. Also pass die tag to read_attribute_reprocess.
815 (partial_die_info::read): Check for DW_FORM_rnglistx when setting
816 need_ranges_base and update comment appropriately. Also pass die tag
817 to read_attribute_reprocess and dwarf2_ranges_read.
818 (read_loclist_header): Rename function to read_loclists_rnglists_header,
819 and update function comment appropriately.
820 (read_loclist_index): Call read_loclists_rnglists_header instead of
821 read_loclist_header.
822 (read_rnglist_index): New function.
823 (read_attribute_reprocess): Add tag parameter. Add code for
824 DW_FORM_rnglistx, passing tag to read_rnglist_index.
825 (read_attribute_value): Mark DW_FORM_rnglistx with need_reprocess.
826
827 2020-07-15 Andrew Burgess <andrew.burgess@embecosm.com>
828
829 * f-typeprint.c (f_type_print_base): Allow for dynamic types not
830 being resolved.
831
832 2020-07-14 Andrew Burgess <andrew.burgess@embecosm.com>
833
834 * arch-utils.c (show_architecture): Update formatting of messages.
835
836 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
837
838 * gdbtypes.h (struct type) <bounds>: Handle array and string
839 types.
840 * ada-lang.c (assign_aggregate): Use type::bounds on
841 array/string type.
842 * c-typeprint.c (c_type_print_varspec_suffix): Likewise.
843 * c-varobj.c (c_number_of_children): Likewise.
844 (c_describe_child): Likewise.
845 * eval.c (evaluate_subexp_for_sizeof): Likewise.
846 * f-typeprint.c (f_type_print_varspec_suffix): Likewise.
847 (f_type_print_base): Likewise.
848 * f-valprint.c (f77_array_offset_tbl): Likewise.
849 (f77_get_upperbound): Likewise.
850 (f77_print_array_1): Likewise.
851 * guile/scm-type.c (gdbscm_type_range): Likewise.
852 * m2-typeprint.c (m2_array): Likewise.
853 (m2_is_long_set_of_type): Likewise.
854 * m2-valprint.c (get_long_set_bounds): Likewise.
855 * p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
856 * python/py-type.c (typy_range): Likewise.
857 * rust-lang.c (rust_internal_print_type): Likewise.
858 * type-stack.c (type_stack::follow_types): Likewise.
859 * valarith.c (value_subscripted_rvalue): Likewise.
860 * valops.c (value_cast): Likewise.
861
862 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
863
864 * gdbtypes.c (TYPE_ARRAY_BIT_STRIDE): Remove. Update all
865 callers to use the equivalent accessor methods.
866
867 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
868
869 * gdbtypes.h (struct range_bounds) <bit_stride>: New method.
870 (struct type) <bit_stride>: New method.
871 (TYPE_BIT_STRIDE): Remove.
872 * gdbtypes.c (update_static_array_size): Use type::bit_stride.
873
874 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
875
876 * gdbtypes.h (TYPE_ARRAY_LOWER_BOUND_VALUE,
877 TYPE_ARRAY_UPPER_BOUND_VALUE): Remove. Update all
878 callers to use the equivalent accessor methods instead.
879
880 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
881
882 * gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED,
883 TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Remove. Update all
884 callers to use the equivalent accessor methods instead.
885
886 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
887
888 * gdbtypes.h (TYPE_LOW_BOUND_KIND,
889 TYPE_HIGH_BOUND_KIND): Remove. Update all callers
890 to use dynamic_prop::kind.
891
892 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
893
894 * gdbtypes.h (TYPE_LOW_BOUND_UNDEFINED,
895 TYPE_HIGH_BOUND_UNDEFINED): Remove. Update all callers
896 to get the bound property's kind and check against
897 PROP_UNDEFINED.
898
899 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
900
901 * gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND): Remove. Update
902 all callers to use type::range_bounds followed by
903 dynamic_prop::{low,high}.
904
905 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
906
907 * gdbtypes.h (struct dynamic_prop) <kind, set_undefined,
908 const_val, set_const_val, baton, set_locexpr, set_loclist,
909 set_addr_offset, variant_parts, set_variant_parts,
910 original_type, set_original_type>: New methods.
911 <kind>: Rename to...
912 <m_kind>: ... this. Update all users to use the new methods
913 instead.
914 <data>: Rename to...
915 <m_data>: ... this. Update all users to use the new methods
916 instead.
917
918 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
919
920 * gdbtypes.c (get_discrete_bounds): Return failure if
921 the range type's bounds are not both defined and constant
922 values.
923 (get_array_bounds): Update comment. Remove undefined bound check.
924
925 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
926
927 * gdbtypes.h (TYPE_RANGE_DATA): Remove. Update callers to use
928 the type::bounds method directly.
929
930 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
931
932 * gdbtypes.h (struct type) <bounds, set_bounds>: New methods.
933 (TYPE_RANGE_DATA): Use type::bounds. Change all uses that
934 are used to set the range type's bounds to use set_bounds.
935
936 2020-07-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
937
938 * exec.c (_initialize_exec): Update exec-file-mismatch help.
939
940 2020-07-10 Pedro Alves <pedro@palves.net>
941
942 * gdbthread.h (inferior_ref): Define.
943 (scoped_restore_current_thread) <m_thread>: Now a thread_info_ref.
944 (scoped_restore_current_thread) <m_inf>: Now an inferior_ref.
945 * thread.c
946 (scoped_restore_current_thread::restore):
947 Adjust to gdb::ref_ptr.
948 (scoped_restore_current_thread::~scoped_restore_current_thread):
949 Remove manual decref handling.
950 (scoped_restore_current_thread::scoped_restore_current_thread):
951 Adjust to use
952 inferior_ref::new_reference/thread_info_ref::new_reference.
953 Incref the thread before calling get_frame_id instead of after.
954 Let TARGET_CLOSE_ERROR propagate.
955
956 2020-07-10 Pedro Alves <pedro@palves.net>
957
958 * frame-tailcall.c (dwarf2_tailcall_sniffer_first): Only swallow
959 NO_ENTRY_VALUE_ERROR / MEMORY_ERROR / OPTIMIZED_OUT_ERROR /
960 NOT_AVAILABLE_ERROR.
961 * value.c (value_optimized_out): Only swallow MEMORY_ERROR /
962 OPTIMIZED_OUT_ERROR / NOT_AVAILABLE_ERROR.
963
964 2020-07-10 Simon Marchi <simon.marchi@polymtl.ca>
965 Pedro Alves <pedro@palves.net>
966
967 PR gdb/26199
968 * infrun.c (threads_are_resumed_pending_p): Delete.
969 (do_target_wait): Remove threads_are_executing and
970 threads_are_resumed_pending_p checks from the inferior_matches
971 lambda. Update comments.
972
973 2020-07-10 Pedro Alves <pedro@palves.net>
974
975 PR gdb/26199
976 * infrun.c (handle_no_resumed): Transfer terminal to inferior with
977 executing threads.
978
979 2020-07-10 Pedro Alves <pedro@palves.net>
980
981 PR gdb/26199
982 * infrun.c (handle_no_resumed): Handle multiple targets.
983
984 2020-07-10 Pedro Alves <pedro@palves.net>
985
986 PR gdb/26199
987 * infrun.c (prepare_to_wait): Check target_can_async_p instead of
988 target_is_async_p.
989
990 2020-07-10 Pedro Alves <pedro@palves.net>
991
992 PR gdb/26199
993 * target.c (target_pass_ctrlc): Look at the inferior's non-exited
994 threads, not all threads.
995
996 2020-07-10 Pedro Alves <pedro@palves.net>
997
998 PR gdb/26199
999 * remote.c (remote_target::open_1): Pass remote target pointer as
1000 data to create_async_event_handler.
1001 (remote_async_inferior_event_handler): Mark async event handler
1002 before returning if the remote target still has either pending
1003 events or unacknowledged notifications.
1004
1005 2020-07-10 John Baldwin <jhb@FreeBSD.org>
1006
1007 * fbsd-nat.h (fbsd_nat_target::supports_multi_process): New
1008 declaration.
1009 * fbsd-nat.c (fbsd_nat_target::supports_multi_process): New
1010 function.
1011
1012 2020-07-09 John Baldwin <jhb@FreeBSD.org>
1013
1014 * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
1015 inferior_ptid.
1016
1017 2020-07-09 John Baldwin <jhb@FreeBSD.org>
1018
1019 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_ARGC,
1020 AT_FREEBSD_ARGV, AT_FREEBSD_ENVC, AT_FREEBSD_ENVV,
1021 AT_FREEBSD_PS_STRINGS.
1022
1023 2020-07-08 Hannes Domani <ssbssa@yahoo.de>
1024
1025 * auto-load.c (auto_load_objfile_script_1): Convert drive part
1026 of debugfile path on Windows.
1027
1028 2020-07-08 John Baldwin <jhb@FreeBSD.org>
1029
1030 * fbsd-nat.c (fbsd_nat_target::find_memory_regions): Rename 'obfd'
1031 argument to 'data'.
1032
1033 2020-07-08 Tom Tromey <tromey@adacore.com>
1034
1035 * ada-lang.c (ada_exception_message_1): Use read_memory.
1036
1037 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1038
1039 PR python/22748
1040 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Remove
1041 special handling for inline frames.
1042 * findvar.c (value_of_register_lazy): Skip inline frames when
1043 creating lazy register values.
1044 * frame.c (frame_id_computed_p): Delete definition.
1045 * frame.h (frame_id_computed_p): Delete declaration.
1046
1047 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1048
1049 * NEWS: Mention additions to Python API.
1050 * python/py-arch.c (archpy_register_groups): New function.
1051 (arch_object_methods): Add 'register_groups' method.
1052 * python/py-registers.c (reggroup_iterator_object): New struct.
1053 (reggroup_object): New struct.
1054 (gdbpy_new_reggroup): New function.
1055 (gdbpy_reggroup_to_string): New function.
1056 (gdbpy_reggroup_name): New function.
1057 (gdbpy_reggroup_iter): New function.
1058 (gdbpy_reggroup_iter_next): New function.
1059 (gdbpy_new_reggroup_iterator): New function
1060 (gdbpy_initialize_registers): Register new types.
1061 (reggroup_iterator_object_type): Define new Python type.
1062 (gdbpy_reggroup_getset): New static global.
1063 (reggroup_object_type): Define new Python type.
1064 * python/python-internal.h
1065
1066 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1067
1068 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-registers.c
1069 * python/py-arch.c (archpy_registers): New function.
1070 (arch_object_methods): Add 'registers' method.
1071 * python/py-registers.c: New file.
1072 * python/python-internal.h
1073 (gdbpy_new_register_descriptor_iterator): Declare.
1074 (gdbpy_initialize_registers): Declare.
1075 * python/python.c (do_start_initialization): Call
1076 gdbpy_initialize_registers.
1077 * NEWS: Mention additions to the Python API.
1078
1079 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1080
1081 * NEWS: Mention new Python API method.
1082 * python/py-unwind.c (pending_framepy_architecture): New function.
1083 (pending_frame_object_methods): Add architecture method.
1084
1085 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1086
1087 * gdbarch.c: Regenerate.
1088 * gdbarch.h: Regenerate.
1089 * gdbarch.sh (deprecated_set_gdbarch_data): Delete.
1090 (gdbarch_data): Use internal_error for the case where
1091 deprecated_set_gdbarch_data was originally needed.
1092 * ia64-libunwind-tdep.c (libunwind_descr_init): Update parameters,
1093 and use passed in obstack.
1094 (libunwind_frame_set_descr): Should no longer get back NULL from
1095 gdbarch_data.
1096 (_initialize_libunwind_frame): Register as a pre-init gdbarch data
1097 type.
1098 * user-regs.c (user_regs_init): Update parameters, and use passed
1099 in obstack.
1100 (user_reg_add): Should no longer get back NULL from gdbarch_data.
1101 (_initialize_user_regs): Register as a pre-init gdbarch data type.
1102
1103 2020-07-06 Tom de Vries <tdevries@suse.de>
1104
1105 * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Handle
1106 End-Of-Sequence in lte_is_less_than.
1107 * symtab.c (find_pc_sect_line): Revert change from commit 3d92a3e313
1108 "gdb: Don't reorder line table entries too much when sorting".
1109
1110 2020-07-06 Tom de Vries <tdevries@suse.de>
1111
1112 PR tui/26205
1113 * tui/tui-win.c (tui_partial_win_by_name): Don't test for NULL name.
1114
1115 2020-07-05 Tom de Vries <tdevries@suse.de>
1116
1117 PR build/26187
1118 * inferior.h (struct infcall_suspend_state_deleter): If available, use
1119 std::uncaught_exceptions instead of deprecated
1120 std::uncaught_exception.
1121
1122 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1123
1124 * macroexp.h (macro_stringify): Return
1125 gdb::unique_xmalloc_ptr<char>.
1126 * macroexp.c (macro_stringify): Likewise.
1127 * macrotab.c (fixup_definition): Update.
1128
1129 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1130
1131 * c-exp.y (scan_macro_expansion): Don't free `expansion`.
1132 (lex_one_token): Update.
1133 * macroexp.c (struct macro_buffer) <release>: Return
1134 gdb::unique_xmalloc_ptr<char>.
1135 (macro_stringify): Update.
1136 (macro_expand): Update.
1137 (macro_expand_next): Return gdb::unique_xmalloc_ptr<char>.
1138 * macroexp.h (macro_expand_next): Likewise.
1139
1140 2020-07-02 Simon Marchi <simon.marchi@efficios.com>
1141
1142 * macroexp.h (macro_lookup_ftype): Remove.
1143 (macro_expand, macro_expand_once, macro_expand_next): Remove
1144 lookup function parameters, add scope parameter.
1145 * macroexp.c (scan, substitute_args, expand, maybe_expand,
1146 macro_expand, macro_expand_once, macro_expand_next): Likewise.
1147 * macroscope.h (standard_macro_lookup): Change parameter type
1148 to macro_scope.
1149 * macroscope.c (standard_macro_lookup): Likewise.
1150 * c-exp.y (lex_one_token): Update.
1151 * macrocmd.c (macro_expand_command): Likewise.
1152 (macro_expand_once_command): Likewise.
1153
1154 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1155
1156 * inf-loop.c (inferior_event_handler): Remove client_data param.
1157 * inf-loop.h (inferior_event_handler): Likewise.
1158 * infcmd.c (step_1): Adjust.
1159 * infrun.c (proceed): Adjust.
1160 (fetch_inferior_event): Remove client_data param.
1161 (infrun_async_inferior_event_handler): Adjust.
1162 * infrun.h (fetch_inferior_event): Remove `void *` param.
1163 * linux-nat.c (handle_target_event): Adjust.
1164 * record-btrace.c (record_btrace_handle_async_inferior_event):
1165 Adjust.
1166 * record-full.c (record_full_async_inferior_event_handler):
1167 Adjust.
1168 * remote.c (remote_async_inferior_event_handler): Adjust.
1169
1170 2020-07-01 Tom Tromey <tom@tromey.com>
1171
1172 * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
1173 * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
1174
1175 2020-07-01 Tom Tromey <tom@tromey.com>
1176
1177 * tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from
1178 tui_gen_win_info.
1179 (tui_win_info::make_window): Merge with
1180 tui_gen_win_info::make_window.
1181 (tui_win_info::make_visible): Move from tui_gen_win_info.
1182 * tui/tui-win.c (tui_win_info::max_width): Move from
1183 tui_gen_win_info.
1184 * tui/tui-layout.h (class tui_layout_window) <m_window>: Change
1185 type.
1186 <window_factory>: Likewise.
1187 * tui/tui-layout.c (tui_win_info::resize): Move from
1188 tui_gen_win_info.
1189 (make_standard_window): Change return type.
1190 (get_locator_window, tui_get_window_by_name): Likewise.
1191 (tui_layout_window::apply): Remove a cast.
1192 * tui/tui-data.h (MIN_WIN_HEIGHT): Move earlier.
1193 (struct tui_win_info): Merge with tui_gen_win_info.
1194 (struct tui_gen_win_info): Remove.
1195
1196 2020-07-01 Tom Tromey <tom@tromey.com>
1197
1198 * tui/tui-stack.h (struct tui_locator_window): Derive from
1199 tui_win_info.
1200 <do_scroll_horizontal, do_scroll_vertical>: New methods.
1201 <can_box>: New method.
1202
1203 2020-07-01 Tom Tromey <tom@tromey.com>
1204
1205 * tui/tui-stack.h (struct tui_locator_window): Remove body.
1206
1207 2020-07-01 Tom Tromey <tom@tromey.com>
1208
1209 * tui/tui-regs.c (tui_data_window::display_registers_from)
1210 (tui_data_window::display_registers_from)
1211 (tui_data_window::first_data_item_displayed)
1212 (tui_data_window::delete_data_content_windows): Update.
1213 (tui_data_window::refresh_window, tui_data_window::no_refresh):
1214 Remove.
1215 (tui_data_window::check_register_values): Update.
1216 (tui_data_item_window::rerender): Add parameters. Update.
1217 (tui_data_item_window::refresh_window): Remove.
1218 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: No longer
1219 virtual.
1220 * tui/tui-regs.h (struct tui_data_item_window): Don't derive from
1221 tui_gen_win_info.
1222 <refresh_window, max_height, min_height>: Remove.
1223 <rerender>: Add parameters.
1224 <x, y, visible>: New members.
1225 (struct tui_data_window) <refresh_window, no_refresh>: Remove.
1226 <m_item_width>: New member.
1227
1228 2020-07-01 Tom Tromey <tom@tromey.com>
1229
1230 * tui/tui-regs.c (tui_data_window::show_register_group)
1231 (tui_data_window::check_register_values): Update.
1232 * tui/tui-regs.h (struct tui_data_item_window) <regno>: Rename
1233 from item_no.
1234
1235 2020-07-01 Tom Tromey <tom@tromey.com>
1236
1237 * tui/tui-regs.c (tui_data_window::show_register_group): Remove
1238 useless "if".
1239
1240 2020-07-01 Tom Tromey <tom@tromey.com>
1241
1242 * tui/tui-regs.c (tui_data_window::show_register_group): Update.
1243 * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove.
1244
1245 2020-07-01 Tom Tromey <tom@tromey.com>
1246
1247 * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h
1248 * tui/tui-winsource.h (enum tui_line_or_address_kind)
1249 (struct tui_line_or_address): Move from tui-data.h.
1250 * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h.
1251 * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c.
1252 (tui_cmd_window, tui_source_window_base, tui_source_window)
1253 (tui_disasm_window): Don't declare.
1254 (enum tui_line_or_address_kind, struct tui_line_or_address): Move
1255 to tui-winsource.h.
1256 (SINGLE_KEY): Move to tui-stack.c.
1257
1258 2020-07-01 Tom Tromey <tom@tromey.com>
1259
1260 * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a
1261 std::string.
1262 * tui/tui-regs.c (class tab_expansion_file): New.
1263 (tab_expansion_file::write): New method.
1264 (tui_register_format): Change return type. Use
1265 tab_expansion_file.
1266 (tui_get_register, tui_data_window::display_registers_from)
1267 (tui_data_item_window::rerender): Update.
1268 * tui/tui-io.h (tui_expand_tabs): Don't declare.
1269 * tui/tui-io.c (tui_expand_tabs): Remove.
1270
1271 2020-07-01 Tom Tromey <tom@tromey.com>
1272
1273 * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
1274
1275 2020-07-01 Fangrui Song <maskray@google.com>
1276
1277 * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
1278
1279 2020-07-01 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1280
1281 * dwarf2/read.c (set_die_type): Removed conditions to restrict
1282 forms for DW_AT_associated and DW_AT_allocated attributes,
1283 which is already checked in function attr_to_dynamic_prop.
1284
1285 2020-06-30 Tom Tromey <tromey@adacore.com>
1286
1287 * dwarf2/read.c (quirk_rust_enum): Correctly call
1288 alloc_rust_variant for default-less enum.
1289
1290 2020-06-30 Tom Tromey <tromey@adacore.com>
1291
1292 PR build/26183:
1293 * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
1294 gdb::to_string.
1295
1296 2020-06-29 Simon Marchi <simon.marchi@efficios.com>
1297
1298 * gdbarch.sh (displaced_step_copy_insn): Update doc.
1299 * gdbarch.h: Re-generate.
1300
1301 2020-06-28 Tom Tromey <tom@tromey.com>
1302
1303 * command.h (cmd_types): Remove.
1304 (cmd_type): Don't declare.
1305 * cli/cli-decode.h (enum cmd_types): Uncomment. No longer a
1306 typedef.
1307 * cli/cli-cmds.c (setting_cmd): Use cmd->type directly.
1308 * cli/cli-decode.c (cmd_type): Remove.
1309
1310 2020-06-27 Pedro Alves <palves@redhat.com>
1311
1312 * fork-child.c (prefork_hook): Adjust.
1313 * infcmd.c (set_inferior_io_terminal, get_inferior_io_terminal):
1314 Delete.
1315 (set_inferior_tty_command, show_inferior_tty_command): Adjust.
1316 * inferior.c (inferior::set_tty, inferior::tty): New methods.
1317 * inferior.h (set_inferior_io_terminal, get_inferior_io_terminal):
1318 Remove declarations.
1319 (struct inferior) <set_tty, tty>: New methods.
1320 (struct inferior) <terminal>: Rename to ...
1321 (struct inferior) <m_terminal>: ... this and make private.
1322 * main.c (captured_main_1): Adjust.
1323 * mi/mi-cmd-env.c (mi_cmd_inferior_tty_set): Adjust.
1324 (mi_cmd_inferior_tty_show): Adjust.
1325 * nto-procfs.c (nto_procfs_target::create_inferior): Adjust.
1326 * windows-nat.c (windows_nat_target::create_inferior): Adjust.
1327
1328 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
1329
1330 * configure.ac: Add --enable-libctf: handle --disable-static
1331 properly.
1332 * acinclude.m4: sinclude ../config/enable.m4.
1333 * Makefile.in (aclocal_m4_deps): Adjust accordingly.
1334 (LIBCTF): Substitute in.
1335 (CTF_DEPS): New, likewise.
1336 (CLIBS): libctf needs symbols from libbfd: move earlier.
1337 (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath
1338 flags.
1339 * ctfread.c: Surround in ENABLE_LIBCTF.
1340 (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub.
1341 * configure: Regenerate.
1342 * config.in: Likewise.
1343
1344 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
1345
1346 * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
1347
1348 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
1349
1350 * inferior.h (struct inferior) <terminal>: Change type to
1351 gdb::unique_xmalloc_ptr<char>.
1352 * inferior.c (inferior::~inferior): Don't free inf->terminal.
1353 * infcmd.c (set_inferior_io_terminal): Don't free terminal
1354 field, adjust to unique pointer.
1355 (get_inferior_io_terminal): Adjust to unique pointer.
1356
1357 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1358
1359 * riscv-tdep.c (riscv_print_registers_info): Loop over all
1360 registers, not just the known core set of registers.
1361
1362 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1363
1364 * riscv-tdep.c (riscv_register_name): Return NULL for duplicate
1365 fflags, frm, and fcsr registers.
1366 (riscv_register_reggroup_p): Remove unknown CSRs from save and
1367 restore groups.
1368 (riscv_tdesc_unknown_reg): New function.
1369 (riscv_gdbarch_init): Pass riscv_tdesc_unknown_reg to
1370 tdesc_use_registers.
1371 * riscv-tdep.h (struct gdbarch_tdep): Add
1372 unknown_csrs_first_regnum, unknown_csrs_count,
1373 duplicate_fflags_regnum, duplicate_frm_regnum, and
1374 duplicate_fcsr_regnum fields.
1375
1376 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1377
1378 * target-descriptions.c (tdesc_use_registers): Add new parameter a
1379 callback, use the callback (when not null) to help number unknown
1380 registers.
1381 * target-descriptions.h (tdesc_unknown_register_ftype): New typedef.
1382 (tdesc_use_registers): Add extra parameter to declaration.
1383
1384 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1385
1386 * riscv-tdep.c (value_of_riscv_user_reg): Moved to here from later
1387 in the file.
1388 (class riscv_pending_register_alias): Likewise.
1389 (riscv_register_feature::register_info): Change 'required_p' field
1390 to 'required', and change its type. Add 'check' member function.
1391 (riscv_register_feature::register_info::check): Define new member
1392 function.
1393 (riscv_xreg_feature): Change initialisation of 'required' field.
1394 (riscv_freg_feature): Likewise.
1395 (riscv_virtual_feature): Likewise.
1396 (riscv_csr_feature): Likewise.
1397 (riscv_check_tdesc_feature): Take extra parameter, the csr
1398 tdesc_feature, rewrite the function to use the new
1399 riscv_register_feature::register_info::check function.
1400 (riscv_gdbarch_init): Pass the csr tdesc_feature where needed.
1401
1402 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1403
1404 * features/Makefile: Remove all references to the deleted files
1405 below.
1406 * features/riscv/32bit-csr.c: Deleted.
1407 * features/riscv/32bit-csr.xml: Deleted.
1408 * features/riscv/64bit-csr.c: Deleted.
1409 * features/riscv/64bit-csr.xml: Deleted.
1410 * features/riscv/rebuild-csr-xml.sh: Deleted.
1411
1412 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1413
1414 * riscv-tdep.c (struct riscv_register_feature::register_info): Fix
1415 whitespace error for declaration of names member variable.
1416 (struct riscv_register_feature): Add new prefer_first_name member
1417 variable, and fix whitespace error in declaration of registers.
1418 (riscv_xreg_feature): Initialize prefer_first_name field.
1419 (riscv_freg_feature): Likewise.
1420 (riscv_virtual_feature): Likewise.
1421 (riscv_csr_feature): Likewise.
1422 (riscv_register_name): Expand on comments. Remove register name
1423 modifications for CSR and virtual registers.
1424
1425 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1426
1427 * riscv-tdep.c (struct riscv_register_feature): Fix whitespace
1428 errors.
1429
1430 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1431
1432 * riscv-tdep.c (riscv_create_csr_aliases): Handle csr aliases from
1433 riscv-opc.h.
1434 (class riscv_pending_register_alias): New class.
1435 (riscv_check_tdesc_feature): Take vector of pending aliases and
1436 populate it as appropriate.
1437 (riscv_setup_register_aliases): Delete.
1438 (riscv_gdbarch_init): Create vector of pending aliases and pass it
1439 to riscv_check_tdesc_feature in all cases. Use the vector to
1440 create the register aliases.
1441
1442 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1443
1444 * sol2-tdep.c (sol2_static_transform_name): Remove.
1445 (sol2_init_abi): Don't register it.
1446 * gdbarch.sh (static_transform_name): Remove.
1447 * gdbarch.c, gdbarch.h: Regenerate.
1448
1449 * dbxread.c (read_dbx_symtab) <'S'>: Remove call to
1450 gdbarch_static_transform_name.
1451 * mdebugread.c (parse_partial_symbols) <'S'>: Likewise.
1452 * stabsread.c (define_symbol) <'X'>: Remove.
1453 (define_symbol) <'S'>: Remove gdbarch_static_transform_name
1454 handling.
1455 <'V'>: Likewise.
1456 * xcoffread.c (scan_xcoff_symtab): Remove gdbarch.
1457 <'S'>: Remove call to gdbarch_static_transform_name.
1458
1459 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1460
1461 * procfs.c (procfs_pre_trace): New function.
1462 (procfs_target::create_inferior): Pass it to fork_inferior.
1463
1464 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1465
1466 * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove
1467 sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o.
1468 <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o,
1469 sol2-tdep.o, sparc-sol2-tdep.o.
1470 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static.
1471 * sparc-tdep.h (sparc32_sol2_init_abi): Remove.
1472 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static.
1473 * sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
1474
1475 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1476
1477 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
1478 (amd64_sol2_init_abi): Use sol2_sigtramp_p.
1479 Call sol2_init_abi.
1480 Remove calls to set_gdbarch_skip_solib_resolver,
1481 set_gdbarch_core_pid_to_str.
1482 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
1483 (i386_sol2_static_transform_name): Remove.
1484 (i386_sol2_init_abi): Call sol2_init_abi.
1485 Remove calls to set_gdbarch_sofun_address_maybe_missing,
1486 set_gdbarch_static_transform_name,
1487 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
1488 Use sol2_sigtramp_p.
1489 * sol2-tdep.c (sol2_pc_in_sigtramp): New function.
1490 (sol2_sigtramp_p): New function.
1491 (sol2_static_transform_name): New function.
1492 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
1493 (sol2_init_abi): New function.
1494 * sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
1495 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
1496 * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
1497 (sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
1498 (sparc_sol2_static_transform_name): Remove.
1499 (sparc32_sol2_init_abi): Call sol2_init_abi.
1500 Remove calls to set_gdbarch_sofun_address_maybe_missing,
1501 set_gdbarch_static_transform_name,
1502 set_gdbarch_skip_solib_resolver,
1503 set_gdbarch_core_pid_to_str.
1504 * sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
1505 (sparc_sol2_static_transform_name): Remove
1506 * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
1507 call sol2_sigtramp_p.
1508 (sparc64_sol2_init_abi): Call sol2_init_abi.
1509 Remove calls to set_gdbarch_sofun_address_maybe_missing,
1510 set_gdbarch_static_transform_name,
1511 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
1512
1513 2020-06-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1514
1515 * symfile-add-flags.h: New flag SYMFILE_ALWAYS_CONFIRM.
1516 * exec.c (validate_exec_file): If from_tty, set both
1517 SYMFILE_VERBOSE (== from_tty) and SYMFILE_ALWAYS_CONFIRM.
1518 * symfile.c (symbol_file_add_with_addrs): if always_confirm
1519 and from_tty, unconditionally ask a confirmation.
1520
1521 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1522
1523 * target-descriptions.c (tdesc_architecture_name): Protect against
1524 NULL pointer dereference.
1525 (maint_print_xml_tdesc_cmd): New function.
1526 (_initialize_target_descriptions): Register new 'maint print
1527 xml-tdesc' command and give it the filename completer.
1528 * NEWS: Mention new 'maint print xml-tdesc' command.
1529
1530 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1531
1532 * target-descriptions.c (class tdesc_compatible_info): New class.
1533 (struct target_desc): Change type of compatible vector.
1534 (tdesc_compatible_p): Update for change in type of
1535 target_desc::compatible.
1536 (tdesc_compatible_info_list): New function.
1537 (tdesc_compatible_info_arch_name): New function.
1538 (tdesc_add_compatible): Update for change in type of
1539 target_desc::compatible.
1540 (print_c_tdesc::visit_pre): Likewise.
1541
1542 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1543
1544 * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
1545 whitespace to underscore.
1546 (maint_print_c_tdesc_cmd): Use fake filename for target
1547 descriptions that came from the target.
1548 (_initialize_target_descriptions): Add filename command completion
1549 for 'maint print c-tdesc'.
1550
1551 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
1552
1553 * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
1554 lines.
1555
1556 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
1557
1558 * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
1559 lines.
1560 (dwarf2_find_location_expression): Likewise.
1561 (call_site_parameter_matches): Likewise.
1562 (dwarf2_compile_expr_to_ax): Likewise.
1563 (disassemble_dwarf_expression): Likewise.
1564 (loclist_describe_location): Likewise.
1565
1566 2020-06-23 Pedro Alves <palves@redhat.com>
1567
1568 * gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
1569 progspace-and-thread.h. Include scoped-mock-context.h instead.
1570 (register_to_value_test): Use scoped_mock_context.
1571 * regcache.c: Include "scoped-mock-context.h".
1572 (cooked_read_test): Don't error out if a target is already pushed.
1573 Use scoped_mock_context. Adjust.
1574 * scoped-mock-context.h: New file.
1575
1576 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1577
1578 * ada-lang.c (ada_language_data): Delete la_is_string_type_p
1579 initializer.
1580 (ada_language::is_string_type_p): New member function.
1581 * c-lang.c (c_language_data): Delete la_is_string_type_p
1582 initializer.
1583 (cplus_language_data): Likewise.
1584 (asm_language_data): Likewise.
1585 (minimal_language_data): Likewise.
1586 * d-lang.c (d_language_data): Likewise.
1587 * f-lang.c (f_is_string_type_p): Delete function, implementation
1588 moved to f_language::is_string_type_p.
1589 (f_language_data): Delete la_is_string_type_p initializer.
1590 (f_language::is_string_type_p): New member function,
1591 implementation from f_is_string_type_p.
1592 * go-lang.c (go_is_string_type_p): Delete function, implementation
1593 moved to go_language::is_string_type_p.
1594 (go_language_data): Delete la_is_string_type_p initializer.
1595 (go_language::is_string_type_p): New member function,
1596 implementation from go_is_string_type_p.
1597 * language.c (language_defn::is_string_type_p): Define new member
1598 function.
1599 (default_is_string_type_p): Make static, add comment copied from
1600 header file.
1601 (unknown_language_data): Delete la_is_string_type_p initializer.
1602 (unknown_language::is_string_type_p): New member function.
1603 (auto_language_data): Delete la_is_string_type_p initializer.
1604 (auto_language::is_string_type_p): New member function.
1605 * language.h (language_data): Delete la_is_string_type_p field.
1606 (language_defn::is_string_type_p): Declare new function.
1607 (default_is_string_type_p): Delete desclaration, move comment to
1608 definition.
1609 * m2-lang.c (m2_is_string_type_p): Delete function, implementation
1610 moved to m2_language::is_string_type_p.
1611 (m2_language_data): Delete la_is_string_type_p initializer.
1612 (m2_language::is_string_type_p): New member function,
1613 implementation from m2_is_string_type_p.
1614 * objc-lang.c (objc_language_data): Delete la_is_string_type_p
1615 initializer.
1616 * opencl-lang.c (opencl_language_data): Likewise.
1617 * p-lang.c (pascal_is_string_type_p): Delete function,
1618 implementation moved to pascal_language::is_string_type_p.
1619 (pascal_language_data): Delete la_is_string_type_p initializer.
1620 (pascal_language::is_string_type_p): New member function,
1621 implementation from pascal_is_string_type_p.
1622 * rust-lang.c (rust_is_string_type_p): Delete function,
1623 implementation moved to rust_language::is_string_type_p.
1624 (rust_language_data): Delete la_is_string_type_p initializer.
1625 (rust_language::is_string_type_p): New member function,
1626 implementation from rust_is_string_type_p.
1627 * valprint.c (val_print_scalar_or_string_type_p): Update call to
1628 is_string_type_p.
1629
1630 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1631
1632 * ada-lang.c (ada_language_data): Delete la_print_typedef
1633 initializer.
1634 (ada_language::print_typedef): New member function.
1635 * c-lang.c (c_language_data): Delete la_print_typedef initializer.
1636 (cplus_language_data): Likewise.
1637 (asm_language_data): Likewise.
1638 (minimal_language_data): Likewise.
1639 * d-lang.c (d_language_data): Likewise.
1640 * f-lang.c (f_language_data): Likewise.
1641 (f_language::print_typedef): New member function.
1642 * go-lang.c (go_language_data): Delete la_print_typedef
1643 initializer.
1644 * language.c (language_defn::print_typedef): Define member
1645 function.
1646 (unknown_language_data): Delete la_print_typedef initializer.
1647 (unknown_language::print_typedef): New member function.
1648 (auto_language_data): Delete la_print_typedef initializer.
1649 (auto_language::print_typedef): New member function.
1650 * language.h (language_data): Delete la_print_typedef field.
1651 (language_defn::print_typedef): Declare new member function.
1652 (LA_PRINT_TYPEDEF): Update call to print_typedef.
1653 (default_print_typedef): Delete declaration.
1654 * m2-lang.c (m2_language_data): Delete la_print_typedef
1655 initializer.
1656 (m2_language::print_typedef): New member function.
1657 * objc-lang.c (objc_language_data): Delete la_print_typedef
1658 initializer.
1659 * opencl-lang.c (opencl_language_data): Likewise.
1660 * p-lang.c (pascal_language_data): Likewise.
1661 (pascal_language::print_typedef): New member function.
1662 * rust-lang.c (rust_print_typedef): Delete function,
1663 implementation moved to rust_language::print_typedef.
1664 (rust_language): Delete la_print_typedef initializer.
1665 (rust_language::print_typedef): New member function,
1666 implementation from rust_print_typedef.
1667 * typeprint.c (default_print_typedef): Delete.
1668
1669 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1670
1671 * ada-lang.c (ada_language_data): Delete la_printstr initializer.
1672 (ada_language::printstr): New member function.
1673 * c-lang.c (c_language_data): Delete la_printstr initializer.
1674 (cplus_language_data): Likewise.
1675 (asm_language_data): Likewise.
1676 (minimal_language_data): Likewise.
1677 * d-lang.c (d_language_data): Likewise.
1678 * f-lang.c (f_printstr): Rename to f_language::printstr.
1679 (f_language_data): Delete la_printstr initializer.
1680 (f_language::printstr): New member function, implementation from
1681 f_printstr.
1682 * go-lang.c (go_language_data): Delete la_printstr initializer.
1683 * language.c (language_defn::printstr): Define new member
1684 function.
1685 (unk_lang_printstr): Delete.
1686 (unknown_language_data): Delete la_printstr initializer.
1687 (unknown_language::printstr): New member function.
1688 (auto_language_data): Delete la_printstr initializer.
1689 (auto_language::printstr): New member function.
1690 * language.h (language_data): Delete la_printstr field.
1691 (language_defn::printstr): Declare new member function.
1692 (LA_PRINT_STRING): Update call to printstr.
1693 * m2-lang.c (m2_printstr): Rename to m2_language::printstr.
1694 (m2_language_data): Delete la_printstr initializer.
1695 (m2_language::printstr): New member function, implementation from
1696 m2_printstr.
1697 * objc-lang.c (objc_language_data): Delete la_printstr
1698 initializer.
1699 * opencl-lang.c (opencl_language_data): Likewise.
1700 * p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
1701 (pascal_language_data): Delete la_printstr initializer.
1702 (pascal_language::printstr): New member function, implementation
1703 from pascal_printstr.
1704 * p-lang.h (pascal_printstr): Delete declaration.
1705 * rust-lang.c (rust_printstr): Update header comment.
1706 (rust_language_data): Delete la_printstr initializer.
1707 (rust_language::printstr): New member function.
1708
1709 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1710
1711 * ada-lang.c (ada_language_data): Delete la_printchar initializer.
1712 (ada_language::printchar): New member function.
1713 * c-lang.c (c_language_data): Delete la_printchar initializer.
1714 (cplus_language_data): Likewise.
1715 (asm_language_data): Likewise.
1716 (minimal_language_data): Likewise.
1717 * d-lang.c (d_language_data): Likewise.
1718 * f-lang.c (f_printchar): Rename to f_language::printchar.
1719 (f_language_data): Delete la_printchar initializer.
1720 (f_language::printchar): New member function, implementation from
1721 f_printchar.
1722 * go-lang.c (go_language_data): Delete la_printchar initializer.
1723 * language.c (unk_lang_printchar): Delete.
1724 (language_defn::printchar): Define new member function.
1725 (unknown_language_data): Delete la_printchar initializer.
1726 (unknown_language::printchar): New member function.
1727 (auto_language_data): Delete la_printchar initializer.
1728 (auto_language::printchar): New member function.
1729 * language.h (language_data): Delete la_printchar field.
1730 (language_defn::printchar): Declare new member function.
1731 (LA_PRINT_CHAR): Update call to printchar.
1732 * m2-lang.c (m2_language_data): Delete la_printchar initializer.
1733 (m2_language::printchar): New member function.
1734 * objc-lang.c (objc_language_data): Delete la_printchar
1735 initializer.
1736 * opencl-lang.c (opencl_language_data): Likewise.
1737 * p-lang.c (pascal_language_data): Delete la_printchar
1738 initializer.
1739 (pascal_language::printchar): New member function.
1740 * rust-lang.c (rust_printchar): Rename to
1741 rust_language::printchar.
1742 (rust_language_data): Delete la_printchar initializer.
1743 (rust_language::printchar): New member function, implementation
1744 from rust_printchar.
1745
1746 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1747
1748 * ada-lang.c (emit_char): Renamed to ada_language::emitchar.
1749 (ada_language_data): Delete la_emitchar initializer.
1750 (ada_language::emitchar): New member function, implementation from
1751 emit_char.
1752 * c-lang.c (c_language_data): Delete la_emitchar initializer.
1753 (cplus_language_data): Likewise.
1754 (asm_language_data): Likewise.
1755 (minimal_language_data): Likewise.
1756 * d-lang.c (d_language_data): Likewise.
1757 * f-lang.c (f_emit_char): Rename to f_language::emitchar.
1758 (f_language_data): Delete la_emitchar initializer.
1759 (f_language::emitchar): New member function, implementation from
1760 f_emit_char.
1761 * go-lang.c (go_language_data): Delete la_emitchar initializer.
1762 * language.c (unk_lang_emit_char): Delete.
1763 (language_defn::emitchar): New member function definition.
1764 (unknown_language_data): Delete la_emitchar initializer.
1765 (unknown_language::emitchar): New member function.
1766 (auto_language_data): Delete la_emitchar initializer.
1767 (auto_language::emitchar): New member function.
1768 * language.h (language_data): Delete la_emitchar field.
1769 (language_defn::emitchar): New member field declaration.
1770 (LA_EMIT_CHAR): Update call to emitchar.
1771 * m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
1772 (m2_language_data): Delete la_emitchar initializer.
1773 (m2_language::emitchar): New member function, implementation from
1774 m2_emit_char.
1775 * objc-lang.c (objc_language_data): Delete la_emitchar
1776 initializer.
1777 * opencl-lang.c (opencl_language_data): Likewise.
1778 * p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
1779 (pascal_language_data): Delete la_emitchar initializer.
1780 (pascal_language::emitchar): New member function, implementation
1781 from pascal_emit_char.
1782 * rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
1783 (rust_language_data): Delete la_emitchar initializer.
1784 (rust_language::emitchar): New member function, implementation
1785 from rust_emitchar.
1786
1787 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1788
1789 * ada-lang.c (resolve): Rename to ada_language::post_parser.
1790 (ada_language_data): Delete la_post_parser initializer.
1791 (ada_language::post_parser): New member function.
1792 * c-lang.c (c_language_data): Delete la_post_parser initializer.
1793 (cplus_language_data): Likewise.
1794 (asm_language_data): Likewise.
1795 (minimal_language_data): Likewise.
1796 * d-lang.c (d_language_data): Likewise.
1797 * f-lang.c (f_language_data): Likewise.
1798 * go-lang.c (go_language_data): Likewise.
1799 * language.c (unknown_language_data): Likewise.
1800 (auto_language_data): Likewise.
1801 * language.h (language_data): Delete la_post_parser field.
1802 (language_defn::post_parser): New member function.
1803 * m2-lang.c (m2_language_data): Delete la_post_parser initializer.
1804 * objc-lang.c (objc_language_data): Likewise.
1805 * opencl-lang.c (opencl_language_data): Likewise.
1806 * p-lang.c (pascal_language_data): Likewise.
1807 * parse.c (parse_exp_in_context): Update call to post_parser.
1808 (null_post_parser): Delete definition.
1809 * parser-defs.h (null_post_parser): Delete declaration.
1810 * rust-lang.c (rust_language_data): Delete la_post_parser
1811 initializer.
1812
1813 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1814
1815 * ada-lang.c (parse): Rename to ada_language::parser.
1816 (ada_language_data): Delete la_parser initializer.
1817 (ada_language::parser): New member function, implementation from
1818 parse.
1819 * c-lang.c (c_language_data): Delete la_parser initializer.
1820 (cplus_language_data): Likewise.
1821 (asm_language_data): Likewise.
1822 (minimal_language_data): Likewise.
1823 * d-lang.c (d_language_data): Likewise.
1824 (d_language::parser): New member function.
1825 * f-lang.c (f_language_data): Delete la_parser initializer.
1826 (f_language::parser): New member function.
1827 * go-lang.c (go_language_data): Delete la_parser initializer.
1828 (go_language::parser): New member function.
1829 * language.c (unk_lang_parser): Delete.
1830 (language_defn::parser): Define new member function.
1831 (unknown_language_data): Delete la_parser initializer.
1832 (unknown_language::parser): New member function.
1833 (auto_language_data): Delete la_parser initializer.
1834 (auto_language::parser): New member function.
1835 * language.h (language_data): Delete la_parser field.
1836 (language_defn::parser): Declare new member function.
1837 * m2-lang.c (m2_language_data): Delete la_parser initializer.
1838 (m2_language::parser): New member function.
1839 * objc-lang.c (objc_language_data): Delete la_parser initializer.
1840 * opencl-lang.c (opencl_language_data): Likewise.
1841 * p-lang.c (pascal_language_data): Likewise.
1842 (pascal_language::parser): New member function.
1843 * parse.c (parse_exp_in_context): Update call to parser.
1844 * rust-lang.c (rust_language_data): Delete la_parser initializer.
1845 (rust_language::parser): New member function.
1846
1847 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1848
1849 * top.c (print_gdb_configuration): Print --with-python-libdir
1850 configuration value.
1851
1852 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1853
1854 * NEWS: Mention change to the alias command.
1855
1856 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1857
1858 * cli/cli-cmds.c (lookup_cmd_for_default_args)
1859 (alias_command_completer)
1860 (make_alias_options_def_group): New functions.
1861 (alias_opts, alias_option_defs): New struct and array.
1862 (alias_usage_error): Update usage.
1863 (alias_command): Handles optional DEFAULT-ARGS... arguments.
1864 Use option framework.
1865 (_initialize_cli_cmds): Update alias command help.
1866 Update aliases command help.
1867 (show_user):
1868 Add NULL for new default_args lookup_cmd argument.
1869 (valid_command_p): Rename to validate_aliased_command.
1870 Add NULL for new default_args lookup_cmd argument. Verify that the
1871 aliased_command has no default args.
1872 * cli/cli-decode.c (help_cmd): Show aliases definitions.
1873 (lookup_cmd_1, lookup_cmd): New argument default_args.
1874 (add_alias_cmd):
1875 Add NULL for new default_args lookup_cmd argument.
1876 (print_help_for_command): Show default args under the layout
1877 alias some_alias = some_aliased_cmd some_alias_default_arg.
1878 * cli/cli-decode.h (struct cmd_list_element): New member default_args.
1879 xfree default_args in destructor.
1880 * cli/cli-script.c (process_next_line, do_define_command):
1881 Add NULL for new default_args lookup_cmd argument.
1882 * command.h: Declare new default_args argument in lookup_cmd
1883 and lookup_cmd_1.
1884 * completer.c (complete_line_internal_1):
1885 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1886 * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
1887 * guile/scm-param.c (add_setshow_generic, pascm_parameter_defined_p):
1888 Likewise.
1889 * infcmd.c (_initialize_infcmd): Likewise.
1890 * python/py-auto-load.c (gdbpy_initialize_auto_load): Likewise.
1891 * python/py-cmd.c (gdbpy_parse_command_name): Likewise.
1892 * python/py-param.c (add_setshow_generic): Likewise.
1893 * remote.c (_initialize_remote): Likewise.
1894 * top.c (execute_command): Prepend default_args if command has some.
1895 (set_verbose):
1896 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1897 * tracepoint.c (validate_actionline, encode_actions_1):
1898 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1899
1900 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1901
1902 * jit.c (jit_read_descriptor): Use bool as the return type.
1903 (jit_breakpoint_re_set_internal): Use bool as the return type.
1904 Invert the return value logic; return true if the jit breakpoint
1905 has been successfully initialized.
1906 (jit_inferior_init): Update the call to
1907 jit_breakpoint_re_set_internal.
1908
1909 2020-06-22 Pedro Alves <palves@redhat.com>
1910
1911 PR gdb/25939
1912 * procfs.c (procfs_target::wait): Don't reference inferior_ptid.
1913 Use the current inferior instead. Don't return
1914 TARGET_WAITKIND_SPURIOUS/inferior_ptid -- instead continue and
1915 wait again.
1916 * sol-thread.c (sol_thread_target::wait): Don't reference
1917 inferior_ptid.
1918 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs)
1919 (sol_update_thread_list_callback): Use the current inferior's pid
1920 instead of inferior_ptid.
1921
1922 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1923
1924 * procfs.c: Cleanup many comments.
1925
1926 (READ_WATCHFLAG, WRITE_WATCHFLAG, EXEC_WATCHFLAG)
1927 (AFTER_WATCHFLAG): Replace by value.
1928
1929 (MAIN_PROC_NAME_FORMAT): Inline ...
1930 (create_procinfo): ... here.
1931
1932 (procfs_debug_inferior): Remove SYS_exec handling.
1933 (syscall_is_exec): Likewise.
1934 (procfs_set_exec_trap): Likewise.
1935
1936 (syscall_is_lwp_exit): Inline in callers.
1937 (syscall_is_exit): Likewise.
1938 (syscall_is_exec): Likewise.
1939 (syscall_is_lwp_create): Likewise.
1940
1941 (invalidate_cache): Remove #if 0 code.
1942
1943 (make_signal_thread_runnable): Remove.
1944 (procfs_target::resume): Remove #if 0 code.
1945
1946 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1947
1948 PR gdb/25939
1949 * procfs.c (procfs_target::procfs_init_inferior): Move push_target
1950 call ...
1951 (procfs_target::create_inferior): ... here.
1952
1953 2020-06-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1954
1955 * exec.c (validate_exec_file): Ensure the build-id is up to
1956 date by calling reopen_exec_file (that checks file timestamp
1957 to decide to re-read the file).
1958
1959 2020-06-18 Pedro Alves <palves@redhat.com>
1960
1961 PR gdb/25412
1962 * gdbthread.h (delete_thread, delete_thread_silent)
1963 (find_thread_ptid): Update comments.
1964 * thread.c (current_thread_): New global.
1965 (is_current_thread): Move higher, and reimplement.
1966 (inferior_thread): Reimplement.
1967 (set_thread_exited): Use bool. Add assertions.
1968 (add_thread_silent): Simplify thread-reuse handling by always
1969 calling delete_thread.
1970 (delete_thread): Remove intro comment.
1971 (find_thread_ptid): Skip exited threads.
1972 (switch_to_thread_no_regs): Write to current_thread_.
1973 (switch_to_no_thread): Check CURRENT_THREAD_ instead of
1974 INFERIOR_PTID. Clear current_thread_.
1975
1976 2020-06-18 Pedro Alves <palves@redhat.com>
1977
1978 * aix-thread.c (pd_update): Use switch_to_thread.
1979
1980 2020-06-18 Pedro Alves <palves@redhat.com>
1981
1982 * ravenscar-thread.c (ravenscar_thread_target): Update.
1983 (ravenscar_thread_target::update_inferior_ptid): Rename to ...
1984 (ravenscar_thread_target::add_active_thread): ... this. Don't
1985 set m_base_ptid here. Update to avoid referencing inferior_ptid.
1986 (ravenscar_thread_target::wait): Don't write to inferior_ptid.
1987
1988 2020-06-18 Pedro Alves <palves@redhat.com>
1989
1990 * nat/windows-nat.c (current_windows_thread): Remove.
1991 * nat/windows-nat.h (current_windows_thread): Remove.
1992 * windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
1993 Adjust.
1994 (display_selectors): Adjust to fetch the current
1995 windows_thread_info based on inferior_ptid.
1996 (fake_create_process): No longer write to current_windows_thread.
1997 (windows_nat_target::get_windows_debug_event):
1998 Don't set inferior_ptid or current_windows_thread.
1999 (windows_nat_target::wait): Adjust to not rely on
2000 current_windows_thread.
2001 (do_initial_windows_stuff): Now a method of windows_nat_target.
2002 Switch to the last_ptid thread.
2003 (windows_nat_target::attach): Adjust.
2004 (windows_nat_target::detach): Use switch_to_no_thread instead of
2005 writing to inferior_ptid directly.
2006 (windows_nat_target::create_inferior): Adjust.
2007
2008 2020-06-18 Pedro Alves <palves@redhat.com>
2009
2010 * windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
2011
2012 2020-06-18 Pedro Alves <palves@redhat.com>
2013
2014 * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
2015 after creating it, instead of writing to inferior_ptid. Don't
2016 write to inferior_ptid.
2017
2018 2020-06-18 Pedro Alves <palves@redhat.com>
2019
2020 * fork-child.c (postfork_hook): Don't write to inferior_ptid.
2021
2022 2020-06-18 Pedro Alves <palves@redhat.com>
2023
2024 * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
2025 it, instead of writing to inferior_ptid.
2026
2027 2020-06-18 Pedro Alves <palves@redhat.com>
2028
2029 * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
2030 to inferior_ptid.
2031
2032 2020-06-18 Pedro Alves <palves@redhat.com>
2033
2034 * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
2035 instead of writing to inferior_ptid directly.
2036
2037 2020-06-18 Pedro Alves <palves@redhat.com>
2038
2039 * corelow.c (core_target::close): Use switch_to_no_thread instead
2040 of writing to inferior_ptid directly.
2041 (add_to_thread_list, core_target_open): Use switch_to_thread
2042 instead of writing to inferior_ptid directly.
2043
2044 2020-06-18 Pedro Alves <palves@redhat.com>
2045
2046 * darwin-nat.c (darwin_nat_target::decode_message): Don't write to
2047 inferior_ptid.
2048 (darwin_nat_target::stop_inferior, darwin_nat_target::kill): Avoid
2049 inferior_ptid.
2050 (darwin_attach_pid): Use switch_to_no_thread instead of writing to
2051 inferior_ptid directly.
2052 (darwin_nat_target::init_thread_list): Switch to thread, instead
2053 of writing to inferior_ptid.
2054 (darwin_nat_target::attach): Don't write to inferior_ptid.
2055 (darwin_nat_target::get_ada_task_ptid): Avoid inferior_ptid.
2056
2057 2020-06-18 Pedro Alves <palves@redhat.com>
2058
2059 * gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
2060 thread.
2061 (gnu_nat_target::attach): Don't write to inferior_ptid directly.
2062 Instead use switch_to_thread.
2063 (gnu_nat_target::detach): Use switch_to_no_thread
2064 instead of writing to inferior_ptid directly. Used passed-in
2065 inferior instead of looking up the inferior by pid.
2066
2067 2020-06-18 Pedro Alves <palves@redhat.com>
2068
2069 * go32-nat.c (go32_nat_target::create_inferior): Don't write to
2070 inferior_ptid.
2071
2072 2020-06-18 Pedro Alves <palves@redhat.com>
2073
2074 * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
2075 inferior_ptid.
2076 (nto_procfs_target::attach): Avoid inferior_ptid. Switch to
2077 thread.
2078 (nto_procfs_target::detach): Avoid referencing
2079 inferior_ptid. Use switch_to_no_thread instead of writing to
2080 inferior_ptid directly.
2081 (nto_procfs_target::mourn_inferior): Use switch_to_no_thread
2082 instead of writing to inferior_ptid directly.
2083 (nto_procfs_target::create_inferior): Avoid inferior_ptid. Switch
2084 to thread.
2085
2086 2020-06-18 Pedro Alves <palves@redhat.com>
2087
2088 * remote-sim.c (gdbsim_target::create_inferior): Switch to thread
2089 after creating it, instead of writing to inferior_ptid.
2090 (gdbsim_target_open): Use switch_to_no_thread instead of writing
2091 to inferior_ptid directly.
2092 (gdbsim_target::wait): Don't write to inferior_ptid.
2093
2094 2020-06-18 Pedro Alves <palves@redhat.com>
2095
2096 * remote.c (remote_target::remote_notice_new_inferior): Use
2097 switch_to_thread instead of writing to inferior_ptid directly.
2098 (remote_target::add_current_inferior_and_thread): Use
2099 switch_to_no_thread instead of writing to inferior_ptid directly.
2100 (extended_remote_target::attach): Use switch_to_inferior_no_thread
2101 and switch_to_thread instead of using set_current_inferior or
2102 writing to inferior_ptid directly.
2103
2104 2020-06-18 Pedro Alves <palves@redhat.com>
2105
2106 * tracectf.c (ctf_target_open): Switch to added thread instead of
2107 writing to inferior_ptid directly.
2108 (ctf_target::close): Use switch_to_no_thread instead of writing to
2109 inferior_ptid directly.
2110
2111 2020-06-18 Pedro Alves <palves@redhat.com>
2112
2113 * tracefile-tfile.c (tfile_target_open): Don't write to
2114 inferior_ptid directly, instead switch to added thread.
2115 (tfile_target::close): Use switch_to_no_thread instead of writing
2116 to inferior_ptid directly.
2117
2118 2020-06-18 Pedro Alves <palves@redhat.com>
2119
2120 * procfs.c (procfs_target::attach): Don't write to inferior_ptid.
2121 (procfs_target::detach): Use switch_to_no_thread
2122 instead of writing to inferior_ptid directly.
2123 (do_attach): Change return type to void. Switch to the added
2124 thread.
2125 (procfs_target::create_inferior): Switch to the added thread.
2126 (procfs_do_thread_registers): Don't write to inferior_ptid.
2127
2128 2020-06-18 Pedro Alves <palves@redhat.com>
2129
2130 * infrun.c (generic_mourn_inferior): Use switch_to_thread instead
2131 of writing to inferior_ptid.
2132 (scoped_restore_exited_inferior): Delete.
2133 (handle_vfork_child_exec_or_exit): Simplify using
2134 scoped_restore_current_pspace_and_thread. Use switch_to_thread
2135 instead of writing to inferior_ptid.
2136 (THREAD_STOPPED_BY): Delete.
2137 (thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
2138 (thread_stopped_by_hw_breakpoint): Delete.
2139 (save_waitstatus): Use
2140 scoped_restore_current_thread+switch_to_thread, and call
2141 target_stopped_by_watchpoint instead of
2142 thread_stopped_by_watchpoint, target_stopped_by_sw_breakpoint
2143 instead of thread_stopped_by_sw_breakpoint, and
2144 target_stopped_by_hw_breakpoint instead of
2145 thread_stopped_by_hw_breakpoint.
2146 (handle_inferior_event)
2147 <TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Don't write to
2148 inferior_ptid directly, nor
2149 set_current_inferior/set_current_program_space. Use
2150 switch_to_thread / switch_to_inferior_no_thread instead.
2151
2152 2020-06-18 Pedro Alves <palves@redhat.com>
2153
2154 * target.c (generic_mourn_inferior): Use switch_to_no_thread
2155 instead of writing to inferior_ptid.
2156
2157 2020-06-18 Pedro Alves <palves@redhat.com>
2158
2159 * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the
2160 added thread.
2161 (inf_ptrace_target::attach): Don't write to inferior_ptid. Switch
2162 to the added thread.
2163 (inf_ptrace_target::detach_success): Use switch_to_no_thread
2164 instead of writing to inferior_ptid.
2165
2166 2020-06-18 Pedro Alves <palves@redhat.com>
2167
2168 * gdbarch-selftests.c: Include "progspace-and-thread.h".
2169 (register_to_value_test): Mock a program_space too. Heap-allocate
2170 the address space. Don't write to inferior_ptid. Use
2171 switch_to_thread instead.
2172
2173 2020-06-18 Pedro Alves <palves@redhat.com>
2174
2175 * linux-tdep.c (find_signalled_thread(thread_info *,void *)):
2176 Delete.
2177 (find_signalled_thread()): New, factored out from
2178 linux_make_corefile_notes and adjusted to handle exited threads.
2179 (linux_make_corefile_notes): Adjust to use the new
2180 find_signalled_thread.
2181
2182 2020-06-18 Pedro Alves <palves@redhat.com>
2183
2184 * linux-tdep.c (btrace_fetch): Save/restore current thread instead
2185 of saving/restoring inferior_ptid.
2186
2187 2020-06-17 Tom Tromey <tom@tromey.com>
2188
2189 * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
2190 (tui_scroll_left, tui_scroll_right, struct tui_win_info): Don't
2191 declare.
2192 * tui/tui-data.h (MIN_CMD_WIN_HEIGHT): Remove.
2193
2194 2020-06-15 Simon Marchi <simon.marchi@efficios.com>
2195
2196 * dwarf2/read.c (dwarf2_initialize_objfile): Check for presence
2197 of partial symtabs.
2198
2199 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2200
2201 * regformats/reg-arm.dat: Remove.
2202 * regformats/reg-bfin.dat: Remove.
2203 * regformats/reg-cris.dat: Remove.
2204 * regformats/reg-crisv32.dat: Remove.
2205 * regformats/reg-m32r.dat: Remove.
2206 * regformats/reg-tilegx.dat: Remove.
2207 * regformats/reg-tilegx32.dat: Remove.
2208
2209 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2210
2211 * features/Makefile (WHICH): Remove arm files.
2212 * regformats/arm/arm-with-iwmmxt.dat: Remove.
2213 * regformats/arm/arm-with-neon.dat: Remove.
2214 * regformats/arm/arm-with-vfpv2.dat: Remove.
2215 * regformats/arm/arm-with-vfpv3.dat: Remove.
2216
2217 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2218
2219 * features/Makefile (XMLTOC): Remove rx.xml.
2220
2221 2020-06-17 Pedro Alves <palves@redhat.com>
2222
2223 * gdbthread.h (thread_control_state) <trap_expected> Update
2224 comments.
2225
2226 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2227
2228 * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
2229 ada_language::lookup_symbol_nonlocal.
2230 (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
2231 (ada_language::lookup_symbol_nonlocal): New member function,
2232 implementation from ada_lookup_symbol_nonlocal.
2233 * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
2234 initializer.
2235 (cplus_language_data): Delete la_lookup_symbol_nonlocal
2236 initializer.
2237 (cplus_language::lookup_symbol_nonlocal): New member function.
2238 (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
2239 (minimal_language_data) Likewise.
2240 * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
2241 * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
2242 initializer.
2243 (d_language::lookup_symbol_nonlocal): New member function.
2244 * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
2245 initializer.
2246 (f_language::lookup_symbol_nonlocal): New member function.
2247 * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
2248 initializer.
2249 * language.c (unknown_language_data): Likewise.
2250 (auto_language_data): Likewise.
2251 * language.h (language_data): Delete la_lookup_symbol_nonlocal
2252 field.
2253 (language_defn::lookup_symbol_nonlocal): New member function.
2254 * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
2255 initializer.
2256 * objc-lang.c (objc_language_data): Likewise.
2257 * opencl-lang.c (opencl_language_data): Likewise.
2258 * p-lang.c (pascal_language_data): Likewise.
2259 * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
2260 rust_language::lookup_symbol_nonlocal.
2261 (rust_language_data): Delete la_lookup_symbol_nonlocal
2262 initializer.
2263 (rust_language::lookup_symbol_nonlocal): New member function,
2264 implementation from rust_lookup_symbol_nonlocal.
2265 * symtab.c (lookup_symbol_aux): Update call to
2266 lookup_symbol_nonlocal.
2267 (basic_lookup_symbol_nonlocal): Rename to...
2268 (language_defn::lookup_symbol_nonlocal): ...this, and update
2269 header comment. Remove language_defn parameter, and replace with
2270 uses of `this'.
2271 * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
2272
2273 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2274
2275 * ada-lang.c (ada_language_data): Delete la_value_print_inner
2276 initializer.
2277 (ada_language::value_print_inner): New member function.
2278 * c-lang.c (c_language_data): Delete la_value_print_inner
2279 initializer.
2280 (cplus_language_data): Likewise.
2281 (asm_language_data): Likewise.
2282 (minimal_language_data): Likewise.
2283 * d-lang.c (d_language_data): Likewise.
2284 (d_language::value_print_inner): New member function.
2285 * f-lang.c (f_language_data): Delete la_value_print_inner
2286 initializer.
2287 (f_language::value_print_inner): New member function.
2288 * f-lang.h (f_value_print_innner): Rename to...
2289 (f_value_print_inner): ...this (note spelling of 'inner').
2290 * f-valprint.c (f_value_print_innner): Rename to...
2291 (f_value_print_inner): ...this (note spelling of 'inner').
2292 * go-lang.c (go_language_data): Delete la_value_print_inner
2293 initializer.
2294 (go_language::value_print_inner): New member function.
2295 * language.c (language_defn::value_print_inner): Define new member
2296 function.
2297 (unk_lang_value_print_inner): Delete.
2298 (unknown_language_data): Delete la_value_print_inner initializer.
2299 (unknown_language::value_print_inner): New member function.
2300 (auto_language_data): Delete la_value_print_inner initializer.
2301 (auto_language::value_print_inner): New member function.
2302 * language.h (language_data): Delete la_value_print_inner field.
2303 (language_defn::value_print_inner): Delcare new member function.
2304 * m2-lang.c (m2_language_data): Delete la_value_print_inner
2305 initializer.
2306 (m2_language::value_print_inner): New member function.
2307 * objc-lang.c (objc_language_data): Delete la_value_print_inner
2308 initializer.
2309 * opencl-lang.c (opencl_language_data): Likewise.
2310 * p-lang.c (pascal_language_data): Likewise.
2311 (pascal_language::value_print_inner): New member function.
2312 * rust-lang.c (rust_language_data): Delete la_value_print_inner
2313 initializer.
2314 (rust_language::value_print_inner): New member function.
2315 * valprint.c (do_val_print): Update call to value_print_inner.
2316
2317 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2318
2319 * ada-lang.c (ada_language_data): Delete la_value_print
2320 initializer.
2321 (ada_language::value_print): New member function.
2322 * c-lang.c (c_language_data): Delete la_value_print initializer.
2323 (cplus_language_data): Likewise.
2324 (asm_language_data): Likewise.
2325 (minimal_language_data): Likewise.
2326 * d-lang.c (d_language_data): Likewise.
2327 * f-lang.c (f_language_data): Likewise.
2328 * go-lang.c (go_language_data): Likewise.
2329 * language.c (unk_lang_value_print): Delete.
2330 (language_defn::value_print): Define new member function.
2331 (unknown_language_data): Delete la_value_print initializer.
2332 (unknown_language::value_print): New member function.
2333 (auto_language_data): Delete la_value_print initializer.
2334 (auto_language::value_print): New member function.
2335 * language.h (language_data): Delete la_value_print field.
2336 (language_defn::value_print): Declare new member function.
2337 (LA_VALUE_PRINT): Update call to value_print.
2338 * m2-lang.c (m2_language_data): Delete la_value_print initializer.
2339 * objc-lang.c (objc_language_data): Likewise.
2340 * opencl-lang.c (opencl_language_data): Likewise.
2341 * p-lang.c (pascal_language_data): Likewise.
2342 (pascal_language::value_print): New member function.
2343 * rust-lang.c (rust_language_data): Delete la_value_print
2344 initializer.
2345
2346 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2347
2348 * ada-lang.c (ada_watch_location_expression): Rename to
2349 ada_language::watch_location_expression.
2350 (ada_language_data): Delete la_watch_location_expression
2351 initializer.
2352 (ada_language::watch_location_expression): New member function,
2353 implementation from ada_watch_location_expression.
2354 * breakpoint.c (watch_command_1): Update call to
2355 watch_location_expression.
2356 * c-lang.c (c_watch_location_expression): Rename to
2357 language_defn::watch_location_expression.
2358 (c_language_data): Delete la_watch_location_expression
2359 initializer.
2360 (cplus_language_data): Likewise.
2361 (asm_language_data): Likewise.
2362 (minimal_language_data): Likewise.
2363 * c-lang.h (c_watch_location_expression): Delete declaration.
2364 * d-lang.c (d_language_data): Delete la_watch_location_expression
2365 initializer.
2366 * f-lang.c (f_language_data): Likewise.
2367 * go-lang.c (go_language_data): Likewise.
2368 * language.c (language_defn::watch_location_expression): Member
2369 function implementation from c_watch_location_expression.
2370 (unknown_language_data): Delete la_watch_location_expression
2371 initializer.
2372 (auto_language_data): Likewise.
2373 * language.h (language_data): Delete la_watch_location_expression
2374 field.
2375 (language_defn::watch_location_expression): Declare new member
2376 function.
2377 * m2-lang.c (m2_language_data): Delete
2378 la_watch_location_expression initializer.
2379 * objc-lang.c (objc_language_data): Likewise.
2380 * opencl-lang.c (opencl_language_data): Likewise.
2381 * p-lang.c (pascal_language_data): Likewise.
2382 * rust-lang.c (rust_watch_location_expression): Rename to
2383 rust_language::watch_location_expression.
2384 (rust_language_data): Delete la_watch_location_expression
2385 initializer.
2386 (rust_language::watch_location_expression): New member function,
2387 implementation from rust_watch_location_expression.
2388
2389 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2390
2391 * ada-lang.c (ada_collect_symbol_completion_matches): Rename to
2392 ada_language::collect_symbol_completion_matches.
2393 (ada_language_data): Delete la_collect_symbol_completion_matches
2394 initializer.
2395 (ada_language::collect_symbol_completion_matches): New member
2396 function, implementation from
2397 ada_collect_symbol_completion_matches.
2398 * c-lang.c (c_language_data): Delete
2399 la_collect_symbol_completion_matches initializer.
2400 (cplus_language_data): Likewise.
2401 (asm_language_data): Likewise.
2402 (minimal_language_data): Likewise.
2403 * d-lang.c (d_language_data): Likewise.
2404 * f-lang.c (f_collect_symbol_completion_matches): Rename to
2405 f_language::collect_symbol_completion_matches.
2406 (f_language_data): Delete la_collect_symbol_completion_matches
2407 initializer.
2408 (f_language::collect_symbol_completion_matches) New member
2409 function, implementation from f_collect_symbol_completion_matches.
2410 * go-lang.c (go_language_data): Delete
2411 la_collect_symbol_completion_matches initializer.
2412 * language.c (unknown_language_data): Likewise.
2413 (auto_language_data): Likewise.
2414 * language.h (language_data): Delete
2415 la_collect_symbol_completion_matches field.
2416 (language_defn::collect_symbol_completion_matches): New member
2417 function.
2418 * m2-lang.c (m2_language_data): Delete
2419 la_collect_symbol_completion_matches initializer.
2420 * objc-lang.c (objc_language_data): Likewise.
2421 * opencl-lang.c (opencl_language_data): Likewise.
2422 * p-lang.c (pascal_language_data): Likewise.
2423 * rust-lang.c (rust_language_data): Likewise.
2424 * symtab.c (default_collect_symbol_completion_matches): Delete.
2425 (collect_symbol_completion_matches): Update call to
2426 collect_symbol_completion_matches.
2427 (collect_symbol_completion_matches_type): Likewise.
2428 * symtab.h (default_collect_symbol_completion_matches): Delete
2429 declaration.
2430
2431 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2432
2433 * ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
2434 (ada_language_data): Delete la_word_break_characters initializer.
2435 (ada_language::word_break_characters): New member function.
2436 * c-lang.c (c_language_data): Delete la_word_break_characters
2437 initializer.
2438 (cplus_language_data): Likewise.
2439 (asm_language_data): Likewise.
2440 (minimal_language_data): Likewise.
2441 * completer.c: Update global comment.
2442 (advance_to_expression_complete_word_point): Update call to
2443 word_break_characters.
2444 (complete_files_symbols): Likewise.
2445 (complete_line_internal_1): Likewise.
2446 (default_completer_handle_brkchars): Likewise.
2447 (skip_quoted_chars): Likewise.
2448 * d-lang.c (d_language_data): Delete la_word_break_characters
2449 initializer.
2450 * f-lang.c (f_word_break_characters): Delete.
2451 (f_language_data): Delete la_word_break_characters initializer.
2452 (f_language::word_break_characters): New member function.
2453 * go-lang.c (go_language_data): Delete la_word_break_characters
2454 initializer.
2455 * language.c (unknown_language_data): Likewise.
2456 (auto_language_data): Likewise.
2457 * language.h (default_word_break_characters): Move declaration to
2458 earlier in the file.
2459 (language_data): Delete la_word_break_characters field.
2460 (language_defn::word_break_characters): New member function.
2461 * m2-lang.c (m2_language_data): Delete la_word_break_characters
2462 initializer.
2463 * objc-lang.c (objc_language_data): Likewise.
2464 * opencl-lang.c (opencl_language_data): Likewise.
2465 * p-lang.c (pascal_language_data): Likewise.
2466 * rust-lang.c (rust_language_data): Likewise.
2467
2468 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2469
2470 * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
2471 (ada_language_data): Delete la_get_symbol_name_matcher
2472 initializer.
2473 (language_defn::get_symbol_name_matcher_inner): New member
2474 function.
2475 * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
2476 initializer.
2477 (cplus_language_data): Likewise.
2478 (cplus_language::get_symbol_name_matcher_inner): New member
2479 function.
2480 (asm_language_data): Delete la_get_symbol_name_matcher initializer.
2481 (minimal_language_data): Likewise.
2482 * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
2483 * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
2484 initializer.
2485 * dictionary.c (iter_match_first_hashed): Update call to
2486 get_symbol_name_matcher.
2487 (iter_match_next_hashed): Likewise.
2488 (iter_match_next_linear): Likewise.
2489 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
2490 * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
2491 initializer.
2492 (f_language::get_symbol_name_matcher_inner): New member function.
2493 * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
2494 initializer.
2495 * language.c (default_symbol_name_matcher): Update header comment,
2496 make static.
2497 (language_defn::get_symbol_name_matcher): New definition.
2498 (language_defn::get_symbol_name_matcher_inner): Likewise.
2499 (get_symbol_name_matcher): Delete.
2500 (unknown_language_data): Delete la_get_symbol_name_matcher
2501 initializer.
2502 (auto_language_data): Likewise.
2503 * language.h (language_data): Delete la_get_symbol_name_matcher
2504 field.
2505 (language_defn::get_symbol_name_matcher): New member function.
2506 (language_defn::get_symbol_name_matcher_inner): Likewise.
2507 (default_symbol_name_matcher): Delete declaration.
2508 * linespec.c (find_methods): Update call to
2509 get_symbol_name_matcher.
2510 * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
2511 initializer.
2512 * minsyms.c (lookup_minimal_symbol): Update call to
2513 get_symbol_name_matcher.
2514 (iterate_over_minimal_symbols): Likewise.
2515 * objc-lang.c (objc_language_data): Delete
2516 la_get_symbol_name_matcher initializer.
2517 * opencl-lang.c (opencl_language_data): Likewise.
2518 * p-lang.c (pascal_language_data): Likewise.
2519 * psymtab.c (psymbol_name_matches): Update call to
2520 get_symbol_name_matcher.
2521 * rust-lang.c (rust_language_data): Delete
2522 la_get_symbol_name_matcher initializer.
2523 * symtab.c (symbol_matches_search_name): Update call to
2524 get_symbol_name_matcher.
2525 (compare_symbol_name): Likewise.
2526
2527 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2528
2529 * ada-lang.c (ada_language_data): Delete la_compute_program
2530 initializer.
2531 * c-lang.c (c_language_data): Likewise.
2532 (c_language::compute_program): New member function.
2533 (cplus_language_data): Delete la_compute_program initializer.
2534 (cplus_language::compute_program): New member function.
2535 (asm_language_data): Delete la_compute_program initializer.
2536 (minimal_language_data): Likewise.
2537 * c-lang.h (c_compute_program): Update comment.
2538 (cplus_compute_program): Likewise.
2539 * compile/compile-c-support.c (c_compute_program): Likewise.
2540 (cplus_compute_program): Likewise.
2541 * compile/compile.c (compile_to_object): Update call to
2542 la_compute_program.
2543 * d-lang.c (d_language_data): Delete la_compute_program
2544 initializer.
2545 * f-lang.c (f_language_data): Likewise.
2546 * go-lang.c (go_language_data): Likewise.
2547 * language.c (unknown_language_data): Likewise.
2548 (auto_language_data): Likewise.
2549 * language.h (language_data): Delete la_compute_program field.
2550 (language_defn::compute_program): New member function.
2551 * m2-lang.c (m2_language_data): Delete la_compute_program
2552 initializer.
2553 * objc-lang.c (objc_language_data): Likewise.
2554 * opencl-lang.c (opencl_language_data): Likewise.
2555 * p-lang.c (pascal_language_data): Likewise.
2556 * rust-lang.c (rust_language_data): Likewise.
2557
2558 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2559
2560 * ada-lang.c (ada_language_data) Delete
2561 la_class_name_from_physname initializer.
2562 * c-lang.c (c_language_data): Likewise.
2563 (cplus_language_data): Likewise.
2564 (cplus_language::class_name_from_physname): New member function.
2565 (asm_language_data): Delete la_class_name_from_physname
2566 initializer.
2567 (minimal_language_data): Likewise.
2568 * d-lang.c (d_language_data): Likewise.
2569 * dwarf2/read.c (guess_partial_die_structure_name): Update to call
2570 method on language_defn class.
2571 (guess_full_die_structure_name): Likewise.
2572 * f-lang.c (f_language_data): Delete la_class_name_from_physname
2573 initializer.
2574 * go-lang.c (go_language_data): Likewise.
2575 * language.c (language_class_name_from_physname): Delete.
2576 (unk_lang_class_name): Delete.
2577 (unknown_language_data): Delete la_class_name_from_physname
2578 initializer.
2579 (auto_language_data): Likewise.
2580 * language.h (language_data): Delete la_class_name_from_physname
2581 field.
2582 (language_defn::class_name_from_physname): New function.
2583 (language_class_name_from_physname): Delete declaration.
2584 * m2-lang.c (m2_language_data): Delete la_class_name_from_physname
2585 initializer.
2586 * objc-lang.c (objc_language_data): Likewise.
2587 * opencl-lang.c (opencl_language_data): Likewise.
2588 * p-lang.c (pascal_language_data): Likewise.
2589 * rust-lang.c (rust_language_data): Likewise.
2590
2591 2020-06-16 Tom Tromey <tom@tromey.com>
2592
2593 * tui/tui-data.h (STATUS_NAME): New macro.
2594 * tui/tui-layout.c (tui_remove_some_windows)
2595 (initialize_known_windows, tui_register_window)
2596 (tui_layout_split::remove_windows, initialize_layouts)
2597 (tui_new_layout_command): Don't use hard-coded window names.
2598
2599 2020-06-16 Tom Tromey <tom@tromey.com>
2600
2601 PR tui/25348:
2602 * tui/tui.c (tui_ensure_readline_initialized): Rename from
2603 tui_initialize_readline. Only run once. Call rl_initialize.
2604 * tui/tui.h (tui_ensure_readline_initialized): Rename from
2605 tui_initialize_readline.
2606 * tui/tui-io.c (tui_setup_io): Call
2607 tui_ensure_readline_initialized.
2608 * tui/tui-interp.c (tui_interp::init): Update.
2609
2610 2020-06-16 Tom Tromey <tom@tromey.com>
2611
2612 * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
2613 Also preserve the status window.
2614
2615 2020-06-16 Tom Tromey <tom@tromey.com>
2616
2617 * python/py-tui.c (tui_py_window::~tui_py_window): Handle case
2618 where m_window==nullptr.
2619
2620 2020-06-15 Tom Tromey <tromey@adacore.com>
2621
2622 * windows-nat.c (windows_nat::handle_output_debug_string):
2623 Update.
2624 (windows_nat::handle_ms_vc_exception): Update.
2625 * target.h (target_read_string): Change API.
2626 * target.c (target_read_string): Change API.
2627 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
2628 Update.
2629 * solib-frv.c (frv_current_sos): Update.
2630 * solib-dsbt.c (dsbt_current_sos): Update.
2631 * solib-darwin.c (darwin_current_sos): Update.
2632 * linux-thread-db.c (inferior_has_bug): Update.
2633 * expprint.c (print_subexp_standard): Update.
2634 * ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
2635 (ada_exception_message_1): Update.
2636
2637 2020-06-15 Tom Tromey <tromey@adacore.com>
2638
2639 * linux-tdep.c (dump_mapping_p): Use target_read_memory.
2640
2641 2020-06-15 Tom Tromey <tromey@adacore.com>
2642
2643 * valprint.c (read_string): Update comment.
2644 * target.c (MIN): Remove.
2645 (target_read_string): Rewrite.
2646
2647 2020-06-15 Tom Tromey <tromey@adacore.com>
2648
2649 * corefile.c (read_memory_string): Remove.
2650 * ada-valprint.c (ada_value_print_ptr): Update.
2651 * ada-lang.h (ada_tag_name): Change return type.
2652 * ada-lang.c (type_from_tag): Update.
2653 (ada_tag_name_from_tsd): Change return type. Use
2654 target_read_string.
2655 (ada_tag_name): Likewise.
2656 * gdbcore.h (read_memory_string): Don't declare.
2657
2658 2020-06-14 Hannes Domani <ssbssa@yahoo.de>
2659
2660 * symtab.c (rbreak_command): Ignore Windows drive colon.
2661
2662 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
2663
2664 * NEWS: Mention removed GDBserver host support.
2665
2666 2020-06-12 Nelson Chu <nelson.chu@sifive.com>
2667
2668 * features/riscv/rebuild-csr-xml.sh: Updated.
2669
2670 2020-06-11 Tom Tromey <tom@tromey.com>
2671
2672 PR gdb/18318:
2673 * c-exp.y (lex_one_token): Handle 'p' like 'e'.
2674
2675 2020-06-09 Jonny Grant <jg@jguk.org>
2676 2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
2677
2678 * main.c (captured_main_1): Don't print new line after help.
2679 (print_gdb_help): add mailing list and IRC channel information
2680 to --help. Add new lines between items in the footer. Remove
2681 quotes around bug url.
2682
2683 2020-06-11 Keith Seitz <keiths@redhat.com>
2684
2685 PR gdb/21356
2686 * gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
2687 Resolve typedefs for type length calculations.
2688
2689 2020-06-10 Tom de Vries <tdevries@suse.de>
2690
2691 PR ada/24713
2692 * dwarf2/index-write.c (struct mapped_symtab): Add m_string_obstack.
2693 (write_psymbols): Enable .gdb_index for ada.
2694 * dwarf2/read.c: Remove comment stating .gdb_index is unsupported for
2695 ada.
2696
2697 2020-06-10 Tom de Vries <tdevries@suse.de>
2698
2699 * dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
2700 (dw2_symtab_iter_init): ... here. Add variant with "offset_type
2701 namei" instead of "const char *name" argument.
2702 (dw2_map_matching_symbols): Use "offset_type namei" variant of
2703 dw2_symtab_iter_init.
2704
2705 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2706
2707 * gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
2708 to use type::field and field::type instead.
2709
2710 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2711
2712 * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites
2713 to use field::type instead.
2714
2715 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2716
2717 * gdbtypes.h (struct field) <type, set_type>: New methods.
2718 Rename `type` field to...
2719 <m_type>: ... this. Change references throughout to use type or
2720 set_type methods.
2721 (FIELD_TYPE): Use field::type. Change call sites that modify
2722 the field's type to use field::set_type instead.
2723
2724 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2725
2726 * gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
2727 to use type::index_type instead.
2728
2729 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2730
2731 * gdbtypes.h (struct type) <index_type, set_index_type>: New
2732 methods.
2733 (TYPE_INDEX_TYPE): Use type::index_type.
2734 * gdbtypes.c (create_array_type_with_stride): Likewise.
2735
2736 2020-06-07 Tom Tromey <tom@tromey.com>
2737
2738 * valprint.c (generic_val_print_float): Remove "embedded_offset"
2739 parameter.
2740 (generic_value_print): Update.
2741
2742 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
2743
2744 Revert commit 982a38f60b0.
2745 * python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
2746
2747 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
2748
2749 * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
2750 avoid use after free.
2751
2752 2020-06-05 Tom de Vries <tdevries@suse.de>
2753
2754 * NEWS: Fix typos.
2755
2756 2020-06-04 Simon Marchi <simon.marchi@efficios.com>
2757
2758 * dwarf2/read.c (dwarf2_read_gdb_index): Save partial_symtabs in
2759 the per_bfd object.
2760 (dwarf2_read_debug_names): Likewise.
2761 (dwarf2_initialize_objfile): Use partial_symtabs from per_bfd
2762 object when re-using a per_bfd object with an index.
2763
2764 2020-06-03 Tom de Vries <tdevries@suse.de>
2765
2766 PR symtab/26046
2767 * dwarf2/read.c (scan_partial_symbols): Recurse into DW_TAG_subprogram
2768 children for C++.
2769 (load_partial_dies): Don't skip DW_TAG_inlined_subroutine child of
2770 DW_TAG_subprogram.
2771
2772 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2773
2774 * ada-lang.c (ada_language_data): Delete skip_trampoline
2775 initializer.
2776 * c-lang.c (c_language_data): Likewise.
2777 (cplus_language_data): Likewise.
2778 (cplus_language::skip_trampoline): New member function.
2779 (asm_language_data): Delete skip_trampoline initializer.
2780 (minimal_language_data): Likewise.
2781 * d-lang.c (d_language_data): Likewise.
2782 * f-lang.c (f_language_data): Likewise.
2783 * go-lang.c (go_language_data): Likewise.
2784 * language.c (unk_lang_trampoline): Delete function.
2785 (skip_language_trampoline): Update.
2786 (unknown_language_data): Delete skip_trampoline initializer.
2787 (auto_language_data): Likewise.
2788 * language.h (language_data): Delete skip_trampoline field.
2789 (language_defn::skip_trampoline): New function.
2790 * m2-lang.c (m2_language_data): Delete skip_trampoline
2791 initializer.
2792 * objc-lang.c (objc_skip_trampoline): Delete function, move
2793 implementation to objc_language::skip_trampoline.
2794 (objc_language_data): Delete skip_trampoline initializer.
2795 (objc_language::skip_trampoline): New member function with
2796 implementation from objc_skip_trampoline.
2797 * opencl-lang.c (opencl_language_data): Delete skip_trampoline
2798 initializer.
2799 * p-lang.c (pascal_language_data): Likewise.
2800 * rust-lang.c (rust_language_data): Likewise.
2801
2802 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2803
2804 * ada-lang.c (ada_language_data): Delete la_demangle initializer.
2805 (ada_language::demangle): New member function.
2806 * c-lang.c (c_language_data): Delete la_demangle initializer.
2807 (cplus_language_data): Delete la_demangle initializer.
2808 (cplus_language::demangle): New member function.
2809 (asm_language_data): Delete la_demangle initializer.
2810 (minimal_language_data): Delete la_demangle initializer.
2811 * d-lang.c (d_language_data): Delete la_demangle initializer.
2812 (d_language::demangle): New member function.
2813 * f-lang.c (f_language_data): Delete la_demangle initializer.
2814 (f_language::demangle): New member function.
2815 * go-lang.c (go_language_data): Delete la_demangle initializer.
2816 (go_language::demangle): New member function.
2817 * language.c (language_demangle): Update.
2818 (unk_lang_demangle): Delete.
2819 (unknown_language_data): Delete la_demangle initializer.
2820 (unknown_language::demangle): New member function.
2821 (auto_language_data): Delete la_demangle initializer.
2822 (auto_language::demangle): New member function.
2823 * language.h (language_data): Delete la_demangle field.
2824 (language_defn::demangle): New function.
2825 * m2-lang.c (m2_language_data): Delete la_demangle initializer.
2826 * objc-lang.c (objc_language_data): Delete la_demangle
2827 initializer.
2828 (objc_language::demangle): New member function.
2829 * opencl-lang.c (opencl_language_data): Delete la_demangle
2830 initializer.
2831 * p-lang.c (pascal_language_data): Likewise.
2832 * rust-lang.c (rust_language_data): Likewise.
2833 (rust_language::demangle): New member function.
2834
2835 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2836
2837 * ada-lang.c (ada_language_data): Delete la_print_type
2838 initializer.
2839 (ada_language::print_type): New member function.
2840 * c-lang.c (c_language_data): Delete la_print_type initializer.
2841 (c_language::print_type): New member function.
2842 (cplus_language_data): Delete la_print_type initializer.
2843 (cplus_language::print_type): New member function.
2844 (asm_language_data): Delete la_print_type initializer.
2845 (asm_language::print_type): New member function.
2846 (minimal_language_data): Delete la_print_type initializer.
2847 (minimal_language::print_type): New member function.
2848 * d-lang.c (d_language_data): Delete la_print_type initializer.
2849 (d_language::print_type): New member function.
2850 * f-lang.c (f_language_data): Delete la_print_type initializer.
2851 (f_language::print_type): New member function.
2852 * go-lang.c (go_language_data): Delete la_print_type initializer.
2853 (go_language::print_type): New member function.
2854 * language.c (unk_lang_print_type): Delete.
2855 (unknown_language_data): Delete la_print_type initializer.
2856 (unknown_language::print_type): New member function.
2857 (auto_language_data): Delete la_print_type initializer.
2858 (auto_language::print_type): New member function.
2859 * language.h (language_data): Delete la_print_type field.
2860 (language_defn::print_type): New function.
2861 (LA_PRINT_TYPE): Update.
2862 * m2-lang.c (m2_language_data): Delete la_print_type initializer.
2863 (m2_language::print_type): New member function.
2864 * objc-lang.c (objc_language_data): Delete la_print_type
2865 initializer.
2866 (objc_language::print_type): New member function.
2867 * opencl-lang.c (opencl_print_type): Delete, implementation moved
2868 to opencl_language::print_type.
2869 (opencl_language_data): Delete la_print_type initializer.
2870 (opencl_language::print_type): New member function, implementation
2871 from opencl_print_type.
2872 * p-lang.c (pascal_language_data): Delete la_print_type
2873 initializer.
2874 (pascal_language::print_type): New member function.
2875 * rust-lang.c (rust_print_type): Delete, implementation moved to
2876 rust_language::print_type.
2877 (rust_language_data): Delete la_print_type initializer.
2878 (rust_language::print_type): New member function, implementation
2879 from rust_print_type.
2880
2881 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2882
2883 * ada-lang.c (ada_sniff_from_mangled_name): Delete function,
2884 implementation moves to...
2885 (ada_language::sniff_from_mangled_name): ...here. Update return
2886 type.
2887 (ada_language_data): Delete la_sniff_from_mangled_name
2888 initializer.
2889 * c-lang.c (c_language_data): Likewise.
2890 (cplus_language_data): Likewise.
2891 (cplus_language::sniff_from_mangled_name): New member function,
2892 implementation taken from gdb_sniff_from_mangled_name.
2893 (asm_language_data): Delete la_sniff_from_mangled_name
2894 initializer.
2895 (minimal_language_data): Likewise.
2896 * cp-support.c (gdb_sniff_from_mangled_name): Delete,
2897 implementation moves to cplus_language::sniff_from_mangled_name.
2898 * cp-support.h (gdb_sniff_from_mangled_name): Delete declaration.
2899 * d-lang.c (d_sniff_from_mangled_name): Delete, implementation
2900 moves to...
2901 (d_language::sniff_from_mangled_name): ...here.
2902 (d_language_data): Delete la_sniff_from_mangled_name initializer.
2903 * f-lang.c (f_language_data): Likewise.
2904 * go-lang.c (go_sniff_from_mangled_name): Delete, implementation
2905 moves to...
2906 (go_language::sniff_from_mangled_name): ...here.
2907 (go_language_data): Delete la_sniff_from_mangled_name initializer.
2908 * language.c (language_sniff_from_mangled_name): Delete.
2909 (unknown_language_data): Delete la_sniff_from_mangled_name
2910 initializer.
2911 (auto_language_data): Likewise.
2912 * language.h (language_data): Delete la_sniff_from_mangled_name
2913 field.
2914 (language_defn::sniff_from_mangled_name): New function.
2915 (language_sniff_from_mangled_name): Delete declaration.
2916 * m2-lang.c (m2_language_data): Delete la_sniff_from_mangled_name
2917 field.
2918 * objc-lang.c (objc_sniff_from_mangled_name): Delete,
2919 implementation moves to...
2920 (objc_language::sniff_from_mangled_name): ...here.
2921 (objc_language_data): Delete la_sniff_from_mangled_name initializer.
2922 * opencl-lang.c (opencl_language_data): Likewise.
2923 * p-lang.c (pascal_language_data): Likewise.
2924 * rust-lang.c (rust_sniff_from_mangled_name): Delete,
2925 implementation moves to...
2926 (rust_language::sniff_from_mangled_name): ...here.
2927 (rust_language_data): Delete la_sniff_from_mangled_name
2928 initializer.
2929 * symtab.c (symbol_find_demangled_name): Call
2930 sniff_from_mangled_name member function.
2931
2932 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2933
2934 * ada-lang.c (ada_language_data): Delete la_search_name_hash
2935 initializer.
2936 * c-lang.c (c_language_data): Likewise.
2937 (cplus_language_data): Likewise.
2938 (cplus_language::search_name_hash): New member function.
2939 (asm_language_data): Delete la_search_name_hash initializer.
2940 (minimal_language_data): Likewise.
2941 * d-lang.c (d_language_data): Likewise.
2942 * dictionary.c (default_search_name_hash): Rename to...
2943 (language_defn::search_name_hash): ...this.
2944 * f-lang.c (f_language_data): Likewise.
2945 (f_language::search_name_hash): New member function.
2946 * go-lang.c (go_language_data): Delete la_search_name_hash
2947 initializer.
2948 * language.c (unknown_language_data): Likewise.
2949 (auto_language_data): Likewise.
2950 * language.h (struct language_data): Delete la_search_name_hash
2951 field.
2952 (language_defn::search_name_hash): Declare new member function.
2953 (default_search_name_hash): Delete declaration.
2954 * m2-lang.c (m2_language_data): Delete la_search_name_hash
2955 initializer.
2956 * objc-lang.c (objc_language_data): Likewise.
2957 * opencl-lang.c (opencl_language_data): Likewise.
2958 * p-lang.c (pascal_language_data): Likewise.
2959 * rust-lang.c (rust_language_data): Likewise.
2960 * symtab.c (search_name_hash): Update call.
2961
2962 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2963
2964 * ada-lang.c (ada_language_data): Delete la_get_compile_instance
2965 initializer.
2966 * c-lang.c (class compile_instance): Declare.
2967 (c_language_data): Delete la_get_compile_instance initializer.
2968 (c_language::get_compile_instance): New member function.
2969 (cplus_language_data): Delete la_get_compile_instance initializer.
2970 (cplus_language::get_compile_instance): New member function.
2971 (asm_language_data): Delete la_get_compile_instance initializer.
2972 (minimal_language_data): Likewise.
2973 * c-lang.h (c_get_compile_context): Update comment.
2974 (cplus_get_compile_context): Update comment.
2975 * compile/compile.c (compile_to_object): Update calls, don't rely
2976 on function pointer being NULL.
2977 * d-lang.c (d_language_data): Delete la_get_compile_instance
2978 initializer.
2979 * f-lang.c (f_language_data): Likewise.
2980 * go-lang.c (go_language_data): Likewise.
2981 * language.c (unknown_language_data): Likewise.
2982 (auto_language_data): Likewise.
2983 * language.h (language_data): Delete la_get_compile_instance field.
2984 (language_defn::get_compile_instance): New member function.
2985 * m2-lang.c (m2_language_data): Delete la_get_compile_instance
2986 initializer.
2987 * objc-lang.c (objc_language_data): Likewise.
2988 * opencl-lang.c (opencl_language_data): Likewise.
2989 * p-lang.c (pascal_language_data): Likewise.
2990 * rust-lang.c (rust_language_data): Likewise.
2991
2992 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2993
2994 * ada-lang.c (ada_add_all_symbols): Update comment.
2995 (ada_iterate_over_symbols): Delete, move implementation to...
2996 (ada_language::iterate_over_symbols): ...here, a new member
2997 function, rewrite to use range based for loop.
2998 (ada_language_data): Delete la_iterate_over_symbols initializer.
2999 * c-lang.c (c_language_data): Likewise.
3000 (cplus_language_data): Likewise.
3001 (asm_language_data): Likewise.
3002 (minimal_language_data): Likewise.
3003 * d-lang.c (d_language_data): Likewise.
3004 * f-lang.c (f_language_data): Likewise.
3005 * go-lang.c (go_language_data): Likewise.
3006 * language.c (unknown_language_data): Likewise.
3007 (auto_language_data): Likewise.
3008 * language.h (language_data): Delete la_iterate_over_symbols field.
3009 (language_defn::iterate_over_symbols): New member function.
3010 (LA_ITERATE_OVER_SYMBOLS): Update.
3011 * linespec.c (iterate_over_all_matching_symtabs): Update.
3012 * m2-lang.c (m2_language_data): Delete la_iterate_over_symbols
3013 initializer.
3014 * objc-lang.c (objc_language_data): Likewise.
3015 * opencl-lang.c (opencl_language_data): Likewise.
3016 * p-lang.c (pascal_language_data): Likewise.
3017 * rust-lang.c (rust_language_data): Likewise.
3018
3019 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3020
3021 * ada-lang.c (ada_language_data): Delete
3022 la_lookup_transparent_type initializer.
3023 * c-lang.c (c_language_data): Likewise.
3024 (cplus_language_data): Likewise.
3025 (cplus_language::lookup_transparent_type): New member function.
3026 (asm_language_data): Delete la_lookup_transparent_type
3027 initializer.
3028 (minimal_language_data): Likewise.
3029 * d-lang.c (d_language_data): Likewise.
3030 * f-lang.c (f_language_data): Likewise.
3031 * go-lang.c (go_language_data): Likewise.
3032 * language.c (unknown_language_data): Likewise.
3033 (auto_language_data): Likewise.
3034 * language.h (struct language_data): Delete
3035 la_lookup_transparent_type field.
3036 (language_defn::lookup_transparent_type): New member function.
3037 * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type
3038 initializer.
3039 * objc-lang.c (objc_language_data): Likewise.
3040 * opencl-lang.c (opencl_language_data): Likewise.
3041 * p-lang.c (pascal_language_data): Likewise.
3042 * rust-lang.c (rust_language_data): Likewise.
3043 * symtab.c (symbol_matches_domain): Update call.
3044
3045 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3046
3047 * ada-lang.c (ada_language_arch_info): Delete function, move
3048 implementation to...
3049 (ada_language::language_arch_info): ...here, a new member
3050 function.
3051 (ada_language_data): Delete la_language_arch_info.
3052 * c-lang.c (c_language_data): Likewise.
3053 (c_language::language_arch_info): New member function.
3054 (cplus_language_arch_info): Delete function, move
3055 implementation to...
3056 (cplus_language::language_arch_info): ...here, a new member
3057 function.
3058 (cplus_language_data): Delete la_language_arch_info.
3059 (asm_language_data): Likewise.
3060 (asm_language::language_arch_info): New member function.
3061 (minimal_language_data): Delete la_language_arch_info.
3062 (minimal_language::language_arch_info): New member function.
3063 * d-lang.c (d_language_arch_info): Delete function, move
3064 implementation to...
3065 (d_language::language_arch_info): ...here, a new member
3066 function.
3067 (d_language_data): Delete la_language_arch_info.
3068 * f-lang.c (f_language_arch_info): Delete function, move
3069 implementation to...
3070 (f_language::language_arch_info): ...here, a new member
3071 function.
3072 (f_language_data): Delete la_language_arch_info.
3073 * go-lang.c (go_language_arch_info): Delete function, move
3074 implementation to...
3075 (go_language::language_arch_info): ...here, a new member
3076 function.
3077 (go_language_data): Delete la_language_arch_info.
3078 * language.c (unknown_language_data): Likewise.
3079 (unknown_language::language_arch_info): New member function.
3080 (auto_language_data): Delete la_language_arch_info.
3081 (auto_language::language_arch_info): New member function.
3082 (language_gdbarch_post_init): Update call to
3083 la_language_arch_info.
3084 * language.h (language_data): Delete la_language_arch_info
3085 function pointer.
3086 (language_defn::language_arch_info): New function.
3087 * m2-lang.c (m2_language_arch_info): Delete function, move
3088 implementation to...
3089 (m2_language::language_arch_info): ...here, a new member
3090 function.
3091 (m2_language_data): Delete la_language_arch_info.
3092 * objc-lang.c (objc_language_arch_info): Delete function, move
3093 implementation to...
3094 (objc_language::language_arch_info): ...here, a new member
3095 function.
3096 (objc_language_data): Delete la_language_arch_info.
3097 * opencl-lang.c (opencl_language_arch_info): Delete function, move
3098 implementation to...
3099 (opencl_language::language_arch_info): ...here, a new member
3100 function.
3101 (opencl_language_data): Delete la_language_arch_info.
3102 * p-lang.c (pascal_language_arch_info): Delete function, move
3103 implementation to...
3104 (pascal_language::language_arch_info): ...here, a new member
3105 function.
3106 (pascal_language_data): Delete la_language_arch_info.
3107 * rust-lang.c (rust_language_arch_info): Delete function, move
3108 implementation to...
3109 (rust_language::language_arch_info): ...here, a new member
3110 function.
3111 (rust_language_data): Delete la_language_arch_info.
3112
3113 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3114
3115 * ada-lang.c (ada_language_data): Delete la_pass_by_reference
3116 initializer.
3117 * c-lang.c (c_language_data): Likewise.
3118 (cplus_language_data): Likewise.
3119 (cplus_language::pass_by_reference_info): New method.
3120 (asm_language_data): Delete la_pass_by_reference initializer.
3121 (minimal_language_data): Likewise.
3122 * cp-abi.c (cp_pass_by_reference): Remove use of
3123 default_pass_by_reference.
3124 * d-lang.c (d_language_data): Likewise.
3125 * f-lang.c (f_language_data): Likewise.
3126 * gnu-v3-abi.c (gnuv3_pass_by_reference): Remove use of
3127 default_pass_by_reference.
3128 * go-lang.c (go_language_data): Likewise.
3129 * language.c (language_pass_by_reference): Update.
3130 (default_pass_by_reference): Delete.
3131 (unknown_language_data): Delete la_pass_by_reference
3132 initializer.
3133 (auto_language_data): Likewise.
3134 * language.h (struct language_data): Delete la_pass_by_reference
3135 field.
3136 (language_defn::pass_by_reference_info): New member function.
3137 (default_pass_by_reference): Delete declaration.
3138 * m2-lang.c (m2_language_data): Delete la_pass_by_reference
3139 initializer.
3140 * objc-lang.c (objc_language_data): Likewise.
3141 * opencl-lang.c (opencl_language_data): Likewise.
3142 * p-lang.c (pascal_language_data): Likewise.
3143 * rust-lang.c (rust_language_data): Likewise.
3144
3145 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3146
3147 * ada-lang.c (ada_read_var_value): Delete function, move
3148 implementation to...
3149 (ada_language::read_var_value): ...here.
3150 (ada_language_data): Delete la_read_var_value initializer.
3151 * c-lang.c (c_language_data): Likewise.
3152 (cplus_language_data): Likewise.
3153 (minimal_language_data): Likewise.
3154 * d-lang.c (d_language_data): Likewise.
3155 * f-lang.c (f_language_data): Likewise.
3156 * findvar.c (default_read_var_value): Rename to...
3157 (language_defn::read_var_value): ...this.
3158 * findvar.c (read_var_value): Update header comment, and change to
3159 call member function instead of function pointer.
3160 * go-lang.c (go_language_data): Likewise.
3161 * language.c (unknown_language_data): Delete la_read_var_value
3162 initializer.
3163 (auto_language_data): Likewise.
3164 * language.h (struct language_data): Delete la_read_var_value
3165 field.
3166 (language_defn::read_var_value): New member function.
3167 (default_read_var_value): Delete declaration.
3168 * m2-lang.c (m2_language_data): Delete la_read_var_value
3169 initializer.
3170 * objc-lang.c (objc_language_data): Likewise.
3171 * opencl-lang.c (opencl_language_data): Likewise.
3172 * p-lang.c (pascal_language_data): Likewise.
3173 * rust-lang.c (rust_language_data): Likewise.
3174 * value.h (default_read_var_value): Delete declaration.
3175
3176 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3177
3178 * ada-lang.c (ada_print_array_index): Delete function, move
3179 implementation to...
3180 (ada_language::print_array_index): ...here.
3181 (ada_language_data): Delete la_print_array_index initializer.
3182 * c-lang.c (c_language_data): Likewise.
3183 (cplus_language_data): Likewise.
3184 (minimal_language_data): Likewise.
3185 * d-lang.c (d_language_data): Likewise.
3186 * f-lang.c (f_language_data): Likewise.
3187 * go-lang.c (go_language_data): Likewise.
3188 * language.c (default_print_array_index): Delete function, move
3189 implementation to...
3190 (language_defn::print_array_index): ...here.
3191 (unknown_language_data): Delete la_print_array_index initializer.
3192 (auto_language_data): Likewise.
3193 * language.h (struct language_data): Delete la_print_array_index
3194 field.
3195 (language_defn::print_array_index): New member function.
3196 (LA_PRINT_ARRAY_INDEX): Update.
3197 (default_print_array_index): Delete declaration.
3198 * m2-lang.c (m2_language_data): Delete la_print_array_index
3199 initializer.
3200 * objc-lang.c (objc_language_data): Likewise.
3201 * opencl-lang.c (opencl_language_data): Likewise.
3202 * p-lang.c (pascal_language_data): Likewise.
3203 * rust-lang.c (rust_language_data): Likewise.
3204
3205 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3206
3207 * gdb/ada-lang.c (ada_language_defn): Convert to...
3208 (ada_language_data): ...this.
3209 (class ada_language): New class.
3210 (ada_language_defn): New static global.
3211 * gdb/c-lang.c (c_language_defn): Convert to...
3212 (c_language_data): ...this.
3213 (class c_language): New class.
3214 (c_language_defn): New static global.
3215 (cplus_language_defn): Convert to...
3216 (cplus_language_data): ...this.
3217 (class cplus_language): New class.
3218 (cplus_language_defn): New static global.
3219 (asm_language_defn): Convert to...
3220 (asm_language_data): ...this.
3221 (class asm_language): New class.
3222 (asm_language_defn): New static global.
3223 (minimal_language_defn): Convert to...
3224 (minimal_language_data): ...this.
3225 (class minimal_language): New class.
3226 (minimal_language_defn): New static global.
3227 * gdb/d-lang.c (d_language_defn): Convert to...
3228 (d_language_data): ...this.
3229 (class d_language): New class.
3230 (d_language_defn): New static global.
3231 * gdb/f-lang.c (f_language_defn): Convert to...
3232 (f_language_data): ...this.
3233 (class f_language): New class.
3234 (f_language_defn): New static global.
3235 * gdb/go-lang.c (go_language_defn): Convert to...
3236 (go_language_data): ...this.
3237 (class go_language): New class.
3238 (go_language_defn): New static global.
3239 * gdb/language.c (unknown_language_defn): Remove declaration.
3240 (current_language): Initialize to nullptr, real initialization is
3241 moved to _initialize_language.
3242 (languages): Delete global.
3243 (language_defn::languages): Define.
3244 (set_language_command): Use language_defn::languages.
3245 (set_language): Likewise.
3246 (range_error): Likewise.
3247 (language_enum): Likewise.
3248 (language_def): Likewise.
3249 (add_set_language_command): Use language_def::languages for the
3250 language list, and language_def to lookup language pointers.
3251 (skip_language_trampoline): Use language_defn::languages.
3252 (unknown_language_defn): Convert to...
3253 (unknown_language_data): ...this.
3254 (class unknown_language): New class.
3255 (unknown_language_defn): New static global.
3256 (auto_language_defn): Convert to...
3257 (auto_language_data): ...this.
3258 (class auto_language): New class.
3259 (auto_language_defn): New static global.
3260 (language_gdbarch_post_init): Use language_defn::languages.
3261 (_initialize_language): Initialize current_language.
3262 * gdb/language.h (struct language_defn): Rename to...
3263 (struct language_data): ...this.
3264 (struct language_defn): New.
3265 (auto_language_defn): Delete.
3266 (unknown_language_defn): Delete.
3267 (minimal_language_defn): Delete.
3268 (ada_language_defn): Delete.
3269 (asm_language_defn): Delete.
3270 (c_language_defn): Delete.
3271 (cplus_language_defn): Delete.
3272 (d_language_defn): Delete.
3273 (f_language_defn): Delete.
3274 (go_language_defn): Delete.
3275 (m2_language_defn): Delete.
3276 (objc_language_defn): Delete.
3277 (opencl_language_defn): Delete.
3278 (pascal_language_defn): Delete.
3279 (rust_language_defn): Delete.
3280 * gdb/m2-lang.c (m2_language_defn): Convert to...
3281 (m2_language_data): ...this.
3282 (class m2_language): New class.
3283 (m2_language_defn): New static global.
3284 * gdb/objc-lang.c (objc_language_defn): Convert to...
3285 (objc_language_data): ...this.
3286 (class objc_language): New class.
3287 (objc_language_defn): New static global.
3288 * gdb/opencl-lang.c (opencl_language_defn): Convert to...
3289 (opencl_language_data): ...this.
3290 (class opencl_language): New class.
3291 (opencl_language_defn): New static global.
3292 * gdb/p-lang.c (pascal_language_defn): Convert to...
3293 (pascal_language_data): ...this.
3294 (class pascal_language): New class.
3295 (pascal_language_defn): New static global.
3296 * gdb/rust-exp.y (rust_lex_tests): Use language_def to find
3297 language pointer, update comment format.
3298 * gdb/rust-lang.c (rust_language_defn): Convert to...
3299 (rust_language_data): ...this.
3300 (class rust_language): New class.
3301 (rust_language_defn): New static global.
3302
3303 2020-06-01 Andrew Burgess <andrew.burgess@embecosm.com>
3304
3305 * dwarf2/read.c (class lnp_state_machine) <m_last_address>: New
3306 member variable.
3307 <m_stmt_at_address>: New member variable.
3308 (lnp_state_machine::record_line): Don't record some lines, update
3309 tracking of is_stmt at the same address.
3310 (lnp_state_machine::lnp_state_machine): Initialise new member
3311 variables.
3312
3313 2020-06-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
3314
3315 * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
3316 "-include gnu-nat-mig.h".
3317 * gnu-nat-mig.h: New file.
3318 * gnu-nat.c: Include "gnu-nat-mig.h".
3319 (exc_server, msg_reply_server, notify_server,
3320 process_reply_server): Remove declarations.
3321
3322 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3323
3324 * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced,
3325 steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,
3326 inf_startup, inf_update_suspends, inf_set_pid, inf_steal_exc_ports,
3327 inf_validate_procinfo, inf_validate_task_sc, inf_restore_exc_ports,
3328 inf_set_threads_resume_sc, inf_set_threads_resume_sc_for_signal_thread,
3329 inf_resume, inf_set_step_thread, inf_detach, inf_attach, inf_signal,
3330 inf_continue, make_proc, proc_abort, _proc_free, proc_update_sc,
3331 proc_get_exception_port, proc_set_exception_port, _proc_get_exc_port,
3332 proc_steal_exc_port, proc_restore_exc_port, proc_trace): Move functions
3333 to gnu_nat_target class.
3334 * gnu-nat.c: Likewise.
3335 (inf_update_procs, S_proc_wait_reply, set_task_pause_cmd,
3336 set_task_exc_port_cmd, set_signals_cmd, set_thread_pause_cmd,
3337 set_thread_exc_port_cmd): Call inf_validate_procs through gnu_target
3338 object.
3339 (gnu_nat_target::create_inferior, gnu_nat_target::detach): Pass `this'
3340 instead of `gnu_target'.
3341
3342 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3343
3344 * i386-gnu-tdep.c: Include "gdbcore.h"
3345 (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays.
3346 (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL,
3347 I386_GNU_SIGCONTEXT_THREAD_STATE_OFFSET): New macros
3348 (i386_gnu_sigtramp_start, i386_gnu_sigtramp_p,
3349 i386_gnu_sigcontext_addr): New functions
3350 (i386gnu_init_abi): Register i386_gnu_sigtramp_p,
3351 i386_gnu_sigcontext_addr, and i386_gnu_sc_reg_offset in the gdbarch
3352 tdep.
3353
3354 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3355
3356 * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
3357 before fork_inferior call. Avoid calling it if target_is_pushed returns
3358 true.
3359
3360 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3361
3362 * gnu-nat.h (gnu_target): New variable declaration.
3363 * i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
3364 gnu_target.
3365 * gnu-nat.c (gnu_target): New variable.
3366 (inf_validate_procs): Pass gnu_target to thread_change_ptid,
3367 add_thread_silent, and add_thread calls.
3368 (gnu_nat_target::create_inferior): Pass gnu_target to
3369 add_thread_silent, thread_change_ptid call.
3370 (gnu_nat_target::detach): Pass gnu_target to detach_inferior
3371 call.
3372
3373 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3374
3375 * gnu-nat.c (gnu_xfer_auxv): Remove unused `res' variable.
3376 (gnu_nat_target::find_memory_regions): Remove unused
3377 `old_address' variable.
3378
3379 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3380
3381 * gnu-nat.c: Include "gdbarch.h".
3382
3383 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3384
3385 * reply_mig_hack.awk (Error return): Cast function through
3386 void *, to bypass compiler function call check.
3387
3388 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3389
3390 * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on
3391 $(srcdir)/reply_mig_hack.awk.
3392
3393 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3394
3395 * gnu-nat.h (gnu_debug_flag): Set type to bool.
3396
3397 2020-05-30 Jonny Grant <jg@jguk.org>
3398
3399 * configure.ac (ACX_BUGURL): change bug URL to https.
3400
3401 2020-05-30 Pedro Alves <palves@redhat.com>
3402
3403 * cp-support.c (replace_typedefs_template): New.
3404 (replace_typedefs_qualified_name): Handle
3405 DEMANGLE_COMPONENT_TEMPLATE.
3406
3407 2020-05-29 Simon Marchi <simon.marchi@efficios.com>
3408
3409 * dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
3410 dwarf2/index-cache.h, dwarf2/index-write.c,
3411 dwarf2/index-write.h, dwarf2/line-header.c,
3412 dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
3413 dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
3414 variables and fields from `dwarf2_per_objfile` to just
3415 `per_objfile` throughout.
3416
3417 2020-05-28 Simon Marchi <simon.marchi@polymtl.ca>
3418
3419 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3420 <push_dwarf_reg_entry_value>: Add comment.
3421
3422 2020-05-28 Kevin Buettner <kevinb@redhat.com>
3423 Keith Seitz <keiths@redhat.com>
3424
3425 * python/python.c (do_start_initialization): Call PyEval_SaveThread
3426 instead of PyEval_ReleaseLock.
3427 (class gdbpy_gil): Move to earlier in file.
3428 (finalize_python): Set gdb_python_initialized.
3429 (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early
3430 when not initialized.
3431
3432 2020-05-28 Simon Marchi <simon.marchi@efficios.com>
3433
3434 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3435 <push_dwarf_reg_entry_value>: Remove assert. Override
3436 per_objfile with caller_per_objfile.
3437
3438 2020-05-28 Tom de Vries <tdevries@suse.de>
3439
3440 * dwarf2/read.c (dw2_symtab_iter_next, dw2_expand_marked_cus): Limit
3441 PR gold/15646 workaround to symbol kind "type".
3442
3443 2020-05-27 Tom Tromey <tromey@adacore.com>
3444
3445 * dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
3446
3447 2020-05-27 Tom Tromey <tromey@adacore.com>
3448
3449 * dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
3450 Use htab_find_with_hash.
3451 <add_abbrev>: Remove "abbrev_number" parameter.
3452 * dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
3453 "abbrev_number" parameter. Use htab_find_slot_with_hash.
3454 (hash_abbrev): Add comment.
3455 (abbrev_table::lookup_abbrev): Move to header file.
3456 (abbrev_table::read): Update.
3457
3458 2020-05-27 Tom Tromey <tromey@adacore.com>
3459
3460 * dwarf2/read.c (struct partial_die_info) <name>: Declare new
3461 method.
3462 <canonical_name>: New member.
3463 <raw_name>: Rename from "name".
3464 (partial_die_info): Initialize canonical_name.
3465 (scan_partial_symbols): Check raw_name.
3466 (partial_die_parent_scope, partial_die_full_name)
3467 (add_partial_symbol, add_partial_subprogram)
3468 (add_partial_enumeration, load_partial_dies): Use "name" method.
3469 (partial_die_info::name): New method.
3470 (partial_die_info::read, guess_partial_die_structure_name)
3471 (partial_die_info::fixup): Update.
3472
3473 2020-05-27 Tom Tromey <tromey@adacore.com>
3474
3475 * dwarf2/attribute.h (struct attribute) <form_is_ref>: Inline.
3476 <get_ref_die_offset>: Inline.
3477 <get_ref_die_offset_complaint>: New method.
3478 * dwarf2/attribute.c (attribute::form_is_ref): Move to header.
3479 (attribute::get_ref_die_offset_complaint): Rename from
3480 get_ref_die_offset. Just issue complaint.
3481
3482 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
3483
3484 * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
3485
3486 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
3487
3488 * exec.c (exec_file_attach): Use errno value of first openp failure.
3489
3490 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
3491
3492 * nat/windows-nat.c (windows_thread_info::~windows_thread_info):
3493 Don't close thread handle.
3494
3495 2020-05-27 Tom Tromey <tom@tromey.com>
3496 Simon Marchi <simon.marchi@efficios.com>
3497
3498 * objfiles.h (struct objfile) <partial_symtabs>: Now a
3499 shared_ptr.
3500 * dwarf2/read.h (struct dwarf2_per_objfile) <partial_symtabs>: New
3501 member.
3502 * dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,
3503 dwarf2_per_bfd_objfile_data_key>: New globals.
3504 (dwarf2_has_info): Use shared dwarf2_per_bfd if possible.
3505 (dwarf2_get_section_info): Use get_dwarf2_per_objfile.
3506 (dwarf2_initialize_objfile): Consider cases where per_bfd can be
3507 shared.
3508 (dwarf2_build_psymtabs): Set objfile::partial_symtabs and
3509 short-circuit when sharing.
3510 (dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.
3511 (dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.
3512
3513 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3514
3515 * dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
3516 to...
3517 (struct dwarf2_per_objfile) <line_header_hash>: ... here.
3518 * dwarf2/read.c (handle_DW_AT_stmt_list): Update.
3519
3520 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3521
3522 * dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
3523 build_name_components, find_name_components_bounds>:
3524 Add per_objfile parameter.
3525 (struct mapped_index) <symbol_name_at>: Likewise.
3526 (struct mapped_debug_names): Remove constructor.
3527 <dwarf2_per_objfile>: Remove field.
3528 <namei_to_name, symbol_name_at>: Add per_objfile parameter.
3529 (mapped_index_base::find_name_components_bounds,
3530 mapped_index_base::build_name_components,
3531 dw2_expand_symtabs_matching_symbol): Likewise.
3532 (class mock_mapped_index) <symbol_name_at>: Likewise.
3533 (check_match): Likewise.
3534 (check_find_bounds_finds): Likewise.
3535 (test_mapped_index_find_name_component_bounds): Update.
3536 (CHECK_MATCH): Update.
3537 (dw2_expand_symtabs_matching): Update.
3538 (class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
3539 per_objfile parameter.
3540 <find_vec_in_debug_names>: Likewise.
3541 <m_per_objfile>: New field.
3542 (mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
3543 parameter.
3544 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
3545 (dw2_debug_names_iterator::next): Update.
3546 (dw2_debug_names_lookup_symbol): Update.
3547 (dw2_debug_names_expand_symtabs_for_function): Update.
3548 (dw2_debug_names_map_matching_symbols): Update.
3549 (dw2_debug_names_expand_symtabs_matching): Update.
3550 (dwarf2_read_debug_names): Update.
3551
3552 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3553
3554 * dwarf2/read.h (struct dwarf2_cu): Forward-declare.
3555 (struct dwarf2_per_bfd) <free_cached_comp_units>: Remove,
3556 move to dwarf2_per_objfile.
3557 <read_in_chain>: Remove.
3558 (struct dwarf2_per_objfile) <get_cu, set_cu, remove_cu,
3559 remove_all_cus, age_comp_units>: New methods.
3560 <m_dwarf2_cus>: New member.
3561 (struct dwarf2_per_cu_data) <cu>: Remove.
3562 * dwarf2/read.c (struct dwarf2_cu) <read_in_chain>: Remove.
3563 (age_cached_comp_units, free_one_cached_comp_unit): Remove,
3564 moved to methods of dwarf2_per_objfile.
3565 (dwarf2_clear_marks): Remove.
3566 (dwarf2_queue_item::~dwarf2_queue_item): Update.
3567 (dwarf2_per_bfd::~dwarf2_per_bfd): Don't free dwarf2_cus.
3568 (dwarf2_per_bfd::free_cached_comp_units): Remove.
3569 (dwarf2_per_objfile::remove_all_cus): New.
3570 (class free_cached_comp_units) <~free_cached_comp_units>:
3571 Update.
3572 (load_cu): Update.
3573 (dw2_do_instantiate_symtab): Adjust.
3574 (fill_in_sig_entry_from_dwo_entry): Adjust.
3575 (cutu_reader::init_tu_and_read_dwo_dies): Update.
3576 (cutu_reader::cutu_reader): Likewise.
3577 (cutu_reader::keep): Use dwarf2_per_objfile::set_cu.
3578 (cutu_reader::cutu_reader): Use dwarf2_per_objfile::get_cu.
3579 (process_psymtab_comp_unit): Use dwarf2_per_objfile::remove_cu
3580 and dwarf2_per_objfile::age_comp_units.
3581 (load_partial_comp_unit): Update.
3582 (maybe_queue_comp_unit): Use dwarf2_per_objfile::get_cu.
3583 (process_queue): Likewise.
3584 (find_partial_die): Use dwarf2_per_objfile::get_cu instead of cu
3585 backlink.
3586 (dwarf2_read_addr_index): Likewise.
3587 (follow_die_offset): Likewise.
3588 (dwarf2_fetch_die_loc_sect_off): Likewise.
3589 (dwarf2_fetch_constant_bytes): Likewise.
3590 (dwarf2_fetch_die_type_sect_off): Likewise.
3591 (follow_die_sig_1): Likewise.
3592 (load_full_type_unit): Likewise.
3593 (read_signatured_type): Likewise.
3594 (dwarf2_cu::dwarf2_cu): Don't set cu field.
3595 (dwarf2_cu::~dwarf2_cu): Remove.
3596 (dwarf2_per_objfile::get_cu): New.
3597 (dwarf2_per_objfile::set_cu): New.
3598 (age_cached_comp_units): Rename to...
3599 (dwarf2_per_objfile::age_comp_units): ... this. Adjust
3600 to std::unordered_map.
3601 (free_one_cached_comp_unit): Rename to...
3602 (dwarf2_per_objfile::remove_cu): ... this. Adjust
3603 to std::unordered_map.
3604 (dwarf2_per_objfile::~dwarf2_per_objfile): New.
3605 (dwarf2_mark_helper): Use dwarf2_per_objfile::get_cu, expect
3606 a dwarf2_per_objfile in data.
3607 (dwarf2_mark): Pass dwarf2_per_objfile in data to htab_traverse.
3608 (dwarf2_clear_marks): Remove.
3609
3610 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3611
3612 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Replace
3613 `int use_existing_cu` parameter with `dwarf2_cu *existing_cu`.
3614 (init_tu_and_read_dwo_dies): Likewise.
3615 (cutu_reader::init_tu_and_read_dwo_dies): Likewise.
3616 (cutu_reader::cutu_reader): Likewise.
3617 (load_partial_comp_unit): Likewise.
3618 (process_psymtab_comp_unit): Update.
3619 (build_type_psymtabs_1): Update.
3620 (process_skeletonless_type_unit): Update.
3621 (load_full_comp_unit): Update.
3622 (find_partial_die): Update.
3623 (dwarf2_read_addr_index): Update.
3624 (read_signatured_type): Update.
3625
3626 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3627
3628 * dwarf2/read.h (struct dwarf2_per_cu_data) <m_header,
3629 m_header_read_in>: New fields.
3630 <get_header>: New method.
3631 * dwarf2/read.c (per_cu_header_read_in): Remove.
3632 (dwarf2_per_cu_data::get_header): New.
3633 (dwarf2_per_cu_data::addr_size): Update.
3634 (dwarf2_per_cu_data::offset_size): Update.
3635 (dwarf2_per_cu_data::ref_addr_size): Update.
3636
3637 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3638
3639 * dwarf2/read.c (load_cu): Return dwarf2_cu.
3640 (dw2_do_instantiate_symtab): Update.
3641 (queue_and_load_all_dwo_tus): Change parameter from
3642 dwarf2_per_cu_data to dwarf2_cu.
3643 (dwarf2_fetch_die_loc_sect_off): Update.
3644 (dwarf2_fetch_constant_bytes): Update.
3645 (dwarf2_fetch_die_type_sect_off): Update.
3646
3647 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3648
3649 * dwarf2/read.c (process_full_comp_unit,
3650 process_full_type_unit): Remove per_cu, per_objfile paramters.
3651 Add dwarf2_cu parameter.
3652 (process_queue): Update.
3653
3654 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3655
3656 * dwarf2/read.c (create_cu_from_index_list): Replace
3657 dwarf2_per_objfile parameter with dwarf2_per_bfd.
3658 (create_cus_from_index_list): Likewise.
3659 (create_cus_from_index): Likewise.
3660 (create_signatured_type_table_from_index): Likewise.
3661 (create_cus_from_debug_names_list): Likewise.
3662 (create_cus_from_debug_names): Likewise.
3663 (dwarf2_read_gdb_index): Update.
3664 (dwarf2_read_debug_names): Update.
3665
3666 2020-05-27 Tom Tromey <tom@tromey.com>
3667 Simon Marchi <simon.marchi@efficios.com>
3668
3669 * dwarf2/read.h (struct dwarf2_per_objfile)
3670 <get_type_for_signatured_type, set_type_for_signatured_type>:
3671 New methods.
3672 <m_type_map>: New member.
3673 (struct signatured_type) <type>: Remove.
3674 * dwarf2/read.c
3675 (dwarf2_per_objfile::get_type_for_signatured_type,
3676 dwarf2_per_objfile::set_type_for_signatured_type): New.
3677 (get_signatured_type): Use new methods.
3678
3679 2020-05-27 Tom Tromey <tom@tromey.com>
3680 Simon Marchi <simon.marchi@efficios.com>
3681
3682 * dwarf2/read.h (struct type_unit_group_unshareable): New.
3683 (struct dwarf2_per_objfile) <type_units>: New member.
3684 <get_type_unit_group_unshareable>: New method.
3685 * dwarf2/read.c (struct type_unit_group) <compunit_symtab,
3686 num_symtabs, symtabs>: Remove; move to
3687 type_unit_group_unshareable.
3688 (dwarf2_per_objfile::get_type_unit_group_unshareable): New.
3689 (process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
3690 (dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
3691
3692 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3693
3694 * dwarf2/read.h (struct dwarf2_per_cu_data):
3695 <dwarf2_per_objfile>: Remove.
3696 * dwarf2/read.c (create_cu_from_index_list): Don't assign
3697 dwarf2_per_objfile.
3698 (create_signatured_type_table_from_index): Likewise.
3699 (create_signatured_type_table_from_debug_names): Likewise.
3700 (create_debug_type_hash_table): Likewise.
3701 (fill_in_sig_entry_from_dwo_entry): Likewise.
3702 (create_type_unit_group): Likewise.
3703 (read_comp_units_from_section): Likewise.
3704 (create_cus_hash_table): Likewise.
3705
3706 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3707
3708 * dwarf2/read.c (process_psymtab_comp_unit): Remove reference to
3709 dwarf2_per_cu_data::dwarf2_per_objfile.
3710 (compute_compunit_symtab_includes): Likewise.
3711 (dwarf2_cu::start_symtab): Likewise.
3712
3713 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3714
3715 * dwarf2/read.h (dwarf2_get_die_type): Add dwarf2_per_objfile
3716 parameter.
3717 * dwarf2/read.c (get_die_type_at_offset): Likewise.
3718 (read_namespace_alias): Update.
3719 (lookup_die_type): Update.
3720 (dwarf2_get_die_type): Add dwarf2_per_objfile parameter.
3721 * dwarf2/loc.c (class dwarf_evaluate_loc_desc) <get_base_type>:
3722 Update.
3723 (disassemble_dwarf_expression): Update.
3724
3725 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3726
3727 * dwarf2/read.h (struct dwarf2_queue_item): Add
3728 dwarf2_per_objfile parameter, assign new parameter.
3729 <per_objfile>: New field.
3730 * dwarf2/read.c (free_one_cached_comp_unit): Add
3731 dwarf2_per_objfile parameter.
3732 (queue_comp_unit): Likewise.
3733 (dw2_do_instantiate_symtab): Update.
3734 (process_psymtab_comp_unit): Update.
3735 (maybe_queue_comp_unit): Add dwarf2_per_objfile parameter.
3736 (process_imported_unit_die): Update.
3737 (queue_and_load_dwo_tu): Update.
3738 (follow_die_offset): Update.
3739 (follow_die_sig_1): Update.
3740
3741 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3742
3743 * dwarf2/read.h (struct dwarf2_per_cu_data) <objfile>: Remove.
3744 * dwarf2/read.c (dwarf2_compute_name): Pass per_objfile down.
3745 (read_call_site_scope): Assign per_objfile.
3746 (dwarf2_per_cu_data::objfile): Remove.
3747 * gdbtypes.h (struct call_site) <per_objfile>: New member.
3748 * dwarf2/loc.h (dwarf2_evaluate_loc_desc): Add
3749 dwarf2_per_objfile parameter.
3750 * dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Add
3751 dwarf2_per_objfile parameter.
3752 (dwarf_expr_reg_to_entry_parameter): Add output
3753 dwarf2_per_objfile parameter.
3754 (locexpr_get_frame_base): Update.
3755 (class dwarf_evaluate_loc_desc) <get_tls_address>: Update.
3756 <push_dwarf_reg_entry_value>: Update.
3757 <call_site_to_target_addr>: Update.
3758 (dwarf_entry_parameter_to_value): Add dwarf2_per_objfile
3759 parameter.
3760 (value_of_dwarf_reg_entry): Update.
3761 (rw_pieced_value): Update.
3762 (indirect_synthetic_pointer): Update.
3763 (dwarf2_evaluate_property): Update.
3764 (dwarf2_loc_desc_get_symbol_read_needs): Add dwarf2_per_objfile
3765 parameter.
3766 (locexpr_read_variable): Update.
3767 (locexpr_get_symbol_read_needs): Update.
3768 (loclist_read_variable): Update.
3769
3770 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3771
3772 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
3773 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3774 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
3775 parameter.
3776 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
3777 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3778 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
3779 parameter.
3780 * dwarf2/loc.c (indirect_synthetic_pointer, per_cu_dwarf_call,
3781 sect_variable_value): Add dwarf2_per_objfile parameter.
3782 (class dwarf_evaluate_loc_desc) <dwarf_call,
3783 dwarf_variable_value>: Update.
3784 (fetch_const_value_from_synthetic_pointer): Add
3785 dwarf2_per_objfile parameter.
3786 (fetch_const_value_from_synthetic_pointer): Update.
3787 (coerced_pieced_ref): Update.
3788 (class symbol_needs_eval_context) <dwarf_call,
3789 dwarf_variable_value>: Update.
3790 (dwarf2_compile_expr_to_ax): Update.
3791
3792 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3793
3794 * dwarf2/loc.c (allocate_piece_closure): Add dwarf2_per_objfile
3795 parameter.
3796 (dwarf2_evaluate_loc_desc_full): Update.
3797
3798 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3799
3800 * dwarf2/read.h (dwarf2_read_addr_index): Add dwarf2_per_objfile
3801 parameter.
3802 * dwarf2/read.c (dwarf2_read_addr_index): Likewise.
3803 * dwarf2/loc.c (decode_debug_loclists_addresses): Add
3804 dwarf2_per_objfile parameter.
3805 (decode_debug_loc_dwo_addresses): Likewise.
3806 (dwarf2_find_location_expression): Update.
3807 (class dwarf_evaluate_loc_desc) <get_addr_index>: Update.
3808 (locexpr_describe_location_piece): Add dwarf2_per_objfile
3809 parameter.
3810 (disassemble_dwarf_expression): Add dwarf2_per_objfile
3811 parameter.
3812 (locexpr_describe_location_1): Likewise.
3813 (locexpr_describe_location): Update.
3814
3815 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3816
3817 * dwarf2/read.h (struct dwarf2_per_cu_data) <text_offset>:
3818 Remove.
3819 * dwarf2/read.c (dwarf2_per_cu_data::text_offset): Remove.
3820 * dwarf2/loc.c (dwarf2_find_location_expression): Update.
3821 (dwarf2_compile_property_to_c): Update.
3822 (dwarf2_compile_expr_to_ax): Add dwarf2_per_objfile parameter,
3823 use text offset from objfile.
3824 (locexpr_tracepoint_var_ref): Update.
3825 (locexpr_generate_c_location): Update.
3826 (loclist_describe_location): Update.
3827 (loclist_tracepoint_var_ref): Update.
3828 * dwarf2/compile.h (compile_dwarf_bounds_to_c): Add
3829 dwarf2_per_objfile parameter.
3830 * dwarf2/loc2c.c (do_compile_dwarf_expr_to_c): Likewise,
3831 use text offset from objfile.
3832 (compile_dwarf_expr_to_c): Add dwarf2_per_objfile parameter.
3833
3834 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3835
3836 * dwarf2/expr.h (struct dwarf_expr_context)
3837 <dwarf_expr_context>: Add dwarf2_per_objfile parameter.
3838 <offset>: Remove.
3839 <per_objfile>: New member.
3840 * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
3841 dwarf2_per_objfile parameter. Don't set offset, set
3842 per_objfile.
3843 (dwarf_expr_context::execute_stack_op): Use offset from objfile.
3844 * dwarf2/frame.c (dwarf2_frame_find_fde): Return (by parameter)
3845 a dwarf2_per_objfile object instead of an offset.
3846 (class dwarf_expr_executor) <dwarf_expr_executor>: Add
3847 constructor.
3848 (execute_stack_op): Add dwarf2_per_objfile parameter, pass it
3849 to dwarf2_expr_executor constructor. Don't set offset.
3850 (dwarf2_fetch_cfa_info): Update.
3851 (struct dwarf2_frame_cache) <text_offset>: Remove.
3852 <per_objfile>: New field.
3853 (dwarf2_frame_cache): Update.
3854 (dwarf2_frame_prev_register): Update.
3855 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3856 <dwarf_evaluate_loc_desc>: Add constructor.
3857 (dwarf2_evaluate_loc_desc_full): Update.
3858 (dwarf2_locexpr_baton_eval): Update.
3859 (class symbol_needs_eval_context) <symbol_needs_eval_context>:
3860 Add constructor.
3861 (dwarf2_loc_desc_get_symbol_read_needs): Update.
3862
3863 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3864
3865 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_type,
3866 addr_sized_int_type>: Move to dwarf2_cu.
3867 <int_type>: Move to dwarf2_per_objfile.
3868 (struct dwarf2_per_objfile) <int_type>: Move here.
3869 * dwarf2/read.c (struct dwarf2_cu) <addr_type,
3870 addr_sized_int_type>: Move here.
3871 (read_func_scope): Update.
3872 (read_array_type): Update.
3873 (read_tag_string_type): Update.
3874 (attr_to_dynamic_prop): Update.
3875 (dwarf2_per_cu_data::int_type): Rename to...
3876 (dwarf2_per_objfile::int_type): ... this.
3877 (dwarf2_per_cu_data::addr_sized_int_type): Rename to...
3878 (dwarf2_cu::addr_sized_int_type): ... this.
3879 (read_subrange_type): Update.
3880 (dwarf2_per_cu_data::addr_type): Rename to...
3881 (dwarf2_cu::addr_type): ... this.
3882 (set_die_type): Update.
3883
3884 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3885
3886 * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
3887 data through per_cu->cu.
3888
3889 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3890
3891 * dwarf2/read.c (lookup_dwo_comp_unit): Change
3892 dwarf2_per_cu_data parameter fo dwarf2_cu.
3893 (lookup_dwo_type_unit): Likewise.
3894 (read_cutu_die_from_dwo): Likewise.
3895 (lookup_dwo_unit): Likewise.
3896 (open_and_init_dwo_file): Likewise.
3897 (lookup_dwo_cutu): Likewise.
3898 (lookup_dwo_comp_unit): Likewise.
3899 (lookup_dwo_type_unit): Likewise.
3900 (cutu_reader::init_tu_and_read_dwo_dies): Update.
3901 (cutu_reader::cutu_reader): Update.
3902
3903 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3904
3905 * dwarf2/read.c (process_full_comp_unit): Add dwarf2_per_objfile
3906 parameter.
3907 (process_full_type_unit): Likewise.
3908 (process_queue): Update.
3909
3910 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3911
3912 * dwarf2/read.c (recursively_compute_inclusions): Add
3913 dwarf2_per_objfile parameter.
3914 (compute_compunit_symtab_includes): Likewise.
3915 (process_cu_includes): Update.
3916
3917 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3918
3919 * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
3920 parameter.
3921 (create_type_unit_group): Update.
3922 (process_psymtab_comp_unit_reader): Update.
3923 (build_type_psymtabs_reader): Update.
3924
3925 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3926
3927 * dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
3928 object through m_this_cu->cu.
3929
3930 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3931
3932 * dwarf2/read.c (queue_and_load_dwo_tu): Expect a dwarf2_cu as
3933 the info parameter.
3934 (queue_and_load_all_dwo_tus): Pass per_cu->cu.
3935
3936 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3937
3938 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Add
3939 per_objfile parameter.
3940 (load_full_type_unit): Add per_objfile parameter.
3941 (read_signatured_type): Likewise.
3942 (load_full_comp_unit): Likewise.
3943 (load_cu): Likewise.
3944 (dw2_do_instantiate_symtab): Likewise.
3945 (dw2_get_file_names): Likewise.
3946 (dw2_map_symtabs_matching_filename): Update.
3947 (dw_expand_symtabs_matching_file_matcher): Update.
3948 (dw2_map_symbol_filenames): Update.
3949 (process_psymtab_comp_unit): Add per_objfile parameter.
3950 (build_type_psymtabs_1): Update.
3951 (process_skeletonless_type_unit): Update.
3952 (dwarf2_build_psymtabs_hard): Update.
3953 (load_partial_comp_unit): Add per_objfile parameter.
3954 (scan_partial_symbols): Update.
3955 (load_full_comp_unit): Add per_objfile parameter.
3956 (process_imported_unit_die): Update.
3957 (create_cus_hash_table): Update.
3958 (find_partial_die): Update.
3959 (dwarf2_read_addr_index): Update.
3960 (follow_die_offset): Update.
3961 (dwarf2_fetch_die_loc_sect_off): Update.
3962 (dwarf2_fetch_constant_bytes): Update.
3963 (dwarf2_fetch_die_type_sect_off): Update.
3964 (follow_die_sig_1): Update.
3965 (load_full_type_unit): Add per_objfile parameter.
3966 (read_signatured_type): Likewise.
3967
3968 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3969
3970 * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
3971 of objfile_name.
3972
3973 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3974
3975 * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
3976 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
3977 * dwarf2/read.c (dwarf2_per_bfd::dwarf2_per_bfd): Assign obfd
3978 field.
3979 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
3980 (create_cus_from_index): Update.
3981 (dwarf2_read_gdb_index): Update.
3982 (create_cus_from_debug_names): Update.
3983 (dwarf2_read_debug_names): Update.
3984 (get_abbrev_section_for_cu): Update.
3985 (create_all_comp_units): Update.
3986 (read_attribute_value): Update.
3987 (get_debug_line_section): Update.
3988 * dwarf2/index-cache.c (index_cache::store): Update.
3989 * dwarf2/index-write.c (save_gdb_index_command): Update.
3990 * dwarf2/macro.c (dwarf_decode_macro_bytes): Update.
3991
3992 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3993
3994 * dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
3995 member.
3996 * dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
3997 dwarf2_per_cu_data::per_bfd.
3998 (dwarf2_per_bfd::allocate_signatured_type): Likewise.
3999 (create_type_unit_group): Likewise.
4000 (queue_comp_unit): Remove reference to
4001 per_cu->dwarf2_per_objfile.
4002 (maybe_queue_comp_unit): Likewise.
4003 (fill_in_sig_entry_from_dwo_entry): Assign new field.
4004 (create_cus_hash_table): Assign new field.
4005
4006 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4007
4008 * dwarf2/read.c: Replace
4009 dwarf2_cu->per_cu->dwarf2_per_objfile references with
4010 dwarf2_cu->per_objfile throughout.
4011
4012 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4013
4014 * dwarf2/read.c (dw2_do_instantiate_symtab): Add per_objfile
4015 parameter, don't use per_cu->dwarf2_per_objfile.
4016 (dw2_instantiate_symtab): Likewise.
4017 (dw2_find_last_source_symtab): Update.
4018 (dw2_map_expand_apply): Update.
4019 (dw2_lookup_symbol): Update.
4020 (dw2_expand_symtabs_for_function): Update.
4021 (dw2_expand_all_symtabs): Update.
4022 (dw2_expand_symtabs_with_fullname): Update.
4023 (dw2_expand_symtabs_matching_one): Add per_objfile parameter,
4024 don't use per_cu->dwarf2_per_objfile.
4025 (dw2_expand_marked_cus): Update.
4026 (dw2_find_pc_sect_compunit_symtab): Update.
4027 (dw2_debug_names_lookup_symbol): Update.
4028 (dw2_debug_names_expand_symtabs_for_function): Update.
4029 (dw2_debug_names_map_matching_symbols): Update.
4030 (dwarf2_psymtab::expand_psymtab): Update.
4031
4032 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4033
4034 * dwarf2/read.c (struct dwarf2_cu) <dwarf2_cu>: Add parameter.
4035 <per_objfile>: New member.
4036 (class cutu_reader) <init_tu_and_read_dwo_dies>: Add parameter.
4037 (cutu_reader::init_tu_and_read_dwo_dies): Add parameter, update
4038 call to dwarf2_cu.
4039 (cutu_reader::cutu_reader): Update.
4040 (dwarf2_cu::dwarf2_cu): Add parameter, initialize per_objfile.
4041
4042 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4043
4044 * dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
4045 struct dwarf2_per_objfile.
4046 (struct dwarf2_per_objfile) <die_type_hash>: Move from struct
4047 dwarf2_per_bfd.
4048 * dwarf2/read.c (set_die_type): Update.
4049 (get_die_type_at_offset): Update.
4050
4051 2020-05-27 Tom Tromey <tom@tromey.com>
4052 Simon Marchi <simon.marchi@efficios.com>
4053
4054 * dwarf2/read.h (struct dwarf2_per_bfd) <num_psymtabs>: New
4055 method.
4056 (struct dwarf2_per_objfile) <resize_symtabs, symtab_set_p,
4057 get_symtab, set_symtab>: New methods.
4058 <m_symtabs>: New field.
4059 (struct dwarf2_psymtab): Derive from partial_symtab.
4060 <readin_p, get_compunit_symtab>: Declare methods.
4061 * dwarf2/read.c (dwarf2_per_objfile::symtab_set_p,
4062 dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
4063 New methods.
4064 (struct dwarf2_per_cu_quick_data) <compunit_symtab>: Remove.
4065 (dw2_do_instantiate_symtab, dw2_instantiate_symtab)
4066 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
4067 (dw2_symtab_iter_next, dw2_print_stats)
4068 (dw2_expand_symtabs_with_fullname)
4069 (dw2_expand_symtabs_matching_one)
4070 (dw_expand_symtabs_matching_file_matcher)
4071 (dw2_find_pc_sect_compunit_symtab, dw2_map_symbol_filenames)
4072 (dw2_debug_names_iterator::next)
4073 (dw2_debug_names_map_matching_symbols)
4074 (fill_in_sig_entry_from_dwo_entry, dwarf2_psymtab::read_symtab)
4075 (process_queue, dwarf2_psymtab::expand_psymtab): Update.
4076 (dwarf2_psymtab::readin_p, dwarf2_psymtab::get_compunit_symtab):
4077 New methods.
4078 (get_compunit_symtab, process_full_comp_unit)
4079 (process_full_type_unit): Update.
4080 (dwarf2_build_psymtabs, dwarf2_initialize_objfile, add_type_unit): Call
4081
4082 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4083
4084 * dwarf2/read.h (dwarf2_per_objfile): Rename to dwarf2_per_bfd,
4085 then introduce a new dwarf2_per_objfile type.
4086 <read_line_string>: Move to the new dwarf2_per_objfile type.
4087 <objfile>: Likewise.
4088 (dwarf2_per_bfd): Rename dwarf2_per_objfile to this.
4089 * dwarf2/read.c: Replace references to dwarf2_per_objfile with
4090 dwarf2_per_objfile->per_bfd.
4091 (dwarf2_per_objfile::dwarf2_per_objfile): Rename to...
4092 (dwarf2_per_bfd::dwarf2_per_bfd): ... this.
4093 (dwarf2_per_objfile::free_cached_comp_units): Rename to...
4094 (dwarf2_per_bfd::free_cached_comp_units): ... this.
4095 (dwarf2_has_info): Allocate dwarf2_per_bfd.
4096 (dwarf2_per_objfile::locate_sections): Rename to...
4097 (dwarf2_per_bfd::locate_sections): ... this.
4098 (dwarf2_per_objfile::get_cutu): Rename to...
4099 (dwarf2_per_bfd::get_cutu): ... this.
4100 (dwarf2_per_objfile::get_cu): Rename to...
4101 (dwarf2_per_bfd::get_cu): ... this.
4102 (dwarf2_per_objfile::get_tu): Rename to...
4103 (dwarf2_per_bfd::get_tu): ... this.
4104 (dwarf2_per_objfile::allocate_per_cu): Rename to...
4105 (dwarf2_per_bfd::allocate_per_cu): ... this.
4106 (dwarf2_per_objfile::allocate_signatured_type): Rename to...
4107 (dwarf2_per_bfd::allocate_signatured_type): ... this.
4108 (get_gdb_index_contents_ftype): Change parameter from
4109 dwarf2_per_objfile to dwarf2_per_bfd.
4110 * dwarf2/macro.c, dwarf2/index-write.c: Replace references to
4111 dwarf2_per_objfile with dwarf2_per_objfile->per_bfd.
4112
4113 2020-05-27 Tom Tromey <tom@tromey.com>
4114 Simon Marchi <simon.marchi@efficios.com>
4115
4116 * dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
4117 (allocate_piece_closure): Set "per_objfile" member.
4118 (dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
4119 (locexpr_describe_location, loclist_describe_location): Use new
4120 member.
4121 * dwarf2/read.c (read_call_site_scope)
4122 (mark_common_block_symbol_computed, attr_to_dynamic_prop)
4123 (dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
4124 (fill_in_loclist_baton, dwarf2_symbol_mark_computed,
4125 handle_data_member_location): Set per_objfile member.
4126 * dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
4127 member.
4128 (struct dwarf2_loclist_baton) <per_objfile>: New member.
4129
4130 2020-05-27 Tom Tromey <tom@tromey.com>
4131
4132 * dwarf2/read.h (struct dwarf2_per_objfile) <allocate_per_cu,
4133 allocate_signatured_type>: Declare new methods.
4134 <m_num_psymtabs>: New member.
4135 (struct dwarf2_per_cu_data) <index>: New member.
4136 * dwarf2/read.c (dwarf2_per_objfile::allocate_per_cu)
4137 (dwarf2_per_objfile::allocate_signatured_type): New methods.
4138 (create_cu_from_index_list): Use allocate_per_cu.
4139 (create_signatured_type_table_from_index)
4140 (create_signatured_type_table_from_debug_names)
4141 (create_debug_type_hash_table, add_type_unit)
4142 (read_comp_units_from_section): Use allocate_signatured_type.
4143
4144 2020-05-27 Tom Tromey <tom@tromey.com>
4145
4146 * psymtab.c (partial_map_expand_apply)
4147 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
4148 (psym_lookup_global_symbol_language)
4149 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
4150 (psym_print_stats, psym_expand_symtabs_for_function)
4151 (psym_map_symbol_filenames, psym_map_matching_symbols)
4152 (psym_expand_symtabs_matching)
4153 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
4154 (maintenance_check_psymtabs): Update.
4155 * psympriv.h (struct partial_symtab) <readin_p,
4156 get_compunit_symtab>: Add objfile parameter.
4157 (struct standard_psymtab) <readin_p, get_compunit_symtab>:
4158 Likewise.
4159 * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p,
4160 get_compunit_symtab>: Likewise.
4161 (dwarf2_psymtab::expand_psymtab): Pass objfile argument.
4162
4163 2020-05-27 Tom Tromey <tom@tromey.com>
4164
4165 * dwarf2/read.h (struct dwarf2_per_objfile) <obstack>: New
4166 member.
4167 * dwarf2/read.c (delete_file_name_entry): Fix comment.
4168 (create_cu_from_index_list)
4169 (create_signatured_type_table_from_index)
4170 (create_signatured_type_table_from_debug_names)
4171 (dw2_get_file_names_reader, dwarf2_initialize_objfile)
4172 (dwarf2_create_include_psymtab)
4173 (create_debug_type_hash_table, add_type_unit)
4174 (create_type_unit_group, read_comp_units_from_section)
4175 (dwarf2_compute_name, create_cus_hash_table)
4176 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
4177 (create_dwo_unit_in_dwp_v2, open_and_init_dwp_file): Use new
4178 obstack.
4179 (dw2_get_real_path): Likewise. Change argument to
4180 dwarf2_per_objfile.
4181
4182 2020-05-27 Luis Machado <luis.machado@linaro.org>
4183
4184 PR tdep/26000
4185 * arm-tdep.c (thumb_analyze_prologue): Fix instruction matching
4186 for ldrd (immediate).
4187
4188 2020-05-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4189
4190 * command.h: Add comment giving the name of class_tui.
4191 * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
4192 create the fake command for the help for class_tui.
4193
4194 2020-05-26 Tom Tromey <tromey@adacore.com>
4195
4196 * ada-lang.c (ada_print_array_index): Change type. Call val_atr.
4197 (ada_value_ptr_subscript): Don't call pos_atr on the lower bound.
4198 (val_atr): New function.
4199 (value_val_atr): Use it.
4200 * ada-valprint.c (print_optional_low_bound): Change low bound
4201 handling for enums.
4202 (val_print_packed_array_elements): Don't call discrete_position.
4203 * gdbtypes.c (get_discrete_bounds) <TYPE_CODE_RANGE>: Call
4204 discrete_position for enum types.
4205 * language.c (default_print_array_index): Change type.
4206 * language.h (struct language_defn) <la_print_array_index>: Add
4207 index_type parameter, change type of index_value.
4208 (LA_PRINT_ARRAY_INDEX): Add index_type parameter.
4209 (default_print_array_index): Update.
4210 * valprint.c (maybe_print_array_index): Don't call
4211 value_from_longest. Update.
4212 (value_print_array_elements): Don't call discrete_position.
4213
4214 2020-05-26 Tom Tromey <tromey@adacore.com>
4215
4216 * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE.
4217 * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE.
4218
4219 2020-05-25 Cristiano De Alti <cristiano_dealti@hotmail.com>
4220
4221 PR gdb/13519
4222 * avr-tdep.c (avr_integer_to_address): Return data or code
4223 address accordingly to the second 'type' argument of the
4224 function.
4225
4226 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
4227
4228 * infcmd.c, inferior.h: (construct_inferior_arguments):
4229 Moved function from here to gdbsupport/common-inferior.{h,cc}
4230
4231 2020-05-23 Tom Tromey <tom@tromey.com>
4232
4233 Revert commit eca1f90c:
4234 * NEWS: Remove entry for completion styling.
4235 * completer.c (_rl_completion_prefix_display_length): Move
4236 declaration later.
4237 (gdb_fnprint): Revert.
4238 (gdb_display_match_list_1): Likewise.
4239 * cli/cli-style.c (completion_prefix_style)
4240 (completion_difference_style, completion_suffix_style): Remove.
4241 (_initialize_cli_style): Revert.
4242 * cli/cli-style.h (completion_prefix_style)
4243 (completion_difference_style, completion_suffix_style): Don't
4244 declare.
4245
4246 2020-05-24 Pedro Alves <palves@redhat.com>
4247
4248 * symtab.c (completion_list_add_name): Return boolean indication
4249 of whether the symbol matched.
4250 (completion_list_add_symbol): Don't try to remove C++ aliases if
4251 the symbol didn't match in the first place.
4252 * symtab.h (completion_list_add_name): Return bool.
4253
4254 2020-05-23 Simon Marchi <simon.marchi@polymtl.ca>
4255
4256 * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
4257 type::field.
4258
4259 2020-05-23 Joel Brobecker <brobecker@adacore.com>
4260
4261 GDB 9.2 released.
4262
4263 2020-05-23 Tom Tromey <tom@tromey.com>
4264
4265 * NEWS: Add entry for completion styling.
4266 * completer.c (_rl_completion_prefix_display_length): Move
4267 declaration earlier.
4268 (gdb_fnprint): Use completion_style.
4269 (gdb_display_match_list_1): Likewise.
4270 * cli/cli-style.c (completion_prefix_style)
4271 (completion_difference_style, completion_suffix_style): New
4272 globals.
4273 (_initialize_cli_style): Register new globals.
4274 * cli/cli-style.h (completion_prefix_style)
4275 (completion_difference_style, completion_suffix_style): Declare.
4276
4277 2020-05-23 Pedro Alves <palves@redhat.com>
4278
4279 * utils.c: Include "gdbsupport/gdb-safe-ctype.h".
4280 (parse_escape): Use ISDIGIT instead of isdigit.
4281 (puts_debug): Use gdb_isprint instead of isprint.
4282 (fprintf_symbol_filtered): Use ISALNUM instead of isalnum.
4283 (cp_skip_operator_token, skip_ws, strncmp_iw_with_mode): Use
4284 ISSPACE instead of isspace.
4285 (strncmp_iw_with_mode): Use TOLOWER instead of tolower and ISSPACE
4286 instead of isspace.
4287 (strcmp_iw_ordered): Use ISSPACE instead of isspace.
4288 (string_to_core_addr): Use TOLOWER instead of tolower, ISXDIGIT
4289 instead of isxdigit and ISDIGIT instead of isdigit.
4290
4291 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4292
4293 * gdbtypes.h (struct type) <field>: New method.
4294 (TYPE_FIELDS): Remove, replace all uses with either type::fields
4295 or type::field.
4296
4297 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4298
4299 * gdbtypes.h (struct type) <fields, set_fields>: New methods.
4300 (TYPE_FIELDS): Use type::fields. Change all call sites that
4301 modify the propery to use type::set_fields instead.
4302
4303 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4304
4305 * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
4306 type::num_fields instead.
4307
4308 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4309
4310 * gdbtypes.h (struct type) <num_fields, set_num_fields>: New
4311 methods.
4312 (TYPE_NFIELDS): Use type::num_fields. Change all call sites
4313 that modify the number of fields to use type::set_num_fields
4314 instead.
4315
4316 2020-05-22 Tom Tromey <tromey@adacore.com>
4317
4318 * compile/compile-object-load.h (munmap_list_free): Don't
4319 declare.
4320
4321 2020-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
4322
4323 * annotate.c (annotate_source_line): Update return type, add call
4324 to update current symtab and line.
4325 * annotate.h (annotate_source_line): Update return type, and
4326 extend header comment.
4327 * source.c (info_line_command): Check annotation_level before
4328 calling annotate_source_line.
4329 * stack.c (print_frame_info): If calling annotate_source_line
4330 returns true, then don't print any other source line information.
4331
4332 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
4333
4334 * lm32-tdep.c (lm32_register_reggroup_p): Fix condition.
4335
4336 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
4337
4338 * coffread.c (patch_type): Remove NULL check before xfree.
4339 * corefile.c (set_gnutarget): Likewise.
4340 * cp-abi.c (set_cp_abi_as_auto_default): Likewise.
4341 * exec.c (build_section_table): Likewise.
4342 * remote.c (remote_target::pass_signals): Likewise.
4343 * utils.c (n_spaces): Likewise.
4344 * cli/cli-script.c (document_command): Likewise.
4345 * i386-windows-tdep.c (core_process_module_section): Likewise.
4346 * linux-fork.c (struct fork_info) <~fork_info>: Likewise.
4347
4348 2020-05-20 Simon Marchi <simon.marchi@efficios.com>
4349
4350 * symfile.c (reread_symbols): Clear objfile's section_offsets
4351 vector and section indices, re-compute them by calling
4352 sym_offsets.
4353
4354 2020-05-20 Tom Tromey <tromey@adacore.com>
4355
4356 * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove.
4357 (desc_one_bound, desc_index_type): Compute field name.
4358
4359 2020-05-20 Tom de Vries <tdevries@suse.de>
4360
4361 PR symtab/25833
4362 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index.
4363
4364 2020-05-20 Alan Modra <amodra@gmail.com>
4365
4366 PR 25993
4367 * solib-darwin.c (darwin_bfd_open): Don't strdup pathname for
4368 bfd_set_filename.
4369 * solib-aix.c (solib_aix_bfd_open): Use std::string for name
4370 passed to bfd_set_filename.
4371 * symfile-mem.c (add_vsyscall_page): Likewise for string
4372 passed to symbol_file_add_from_memory.
4373 (symbol_file_add_from_memory): Make name param a const char* and
4374 don't strdup.
4375
4376 2020-05-20 Alan Modra <amodra@gmail.com>
4377
4378 * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename
4379 rather than accessing bfd->filename directly.
4380 * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise,
4381 and use bfd_section_name.
4382 * dwarf2/frame.c (decode_frame_entry): Likewise.
4383 * exec.c (exec_set_section_address): Likewise.
4384 * solib-aix.c (solib_aix_bfd_open): Likewise.
4385 * stap-probe.c (get_stap_base_address): Likewise.
4386 * symfile.c (reread_symbols): Likewise.
4387
4388 2020-05-19 Tom Tromey <tromey@adacore.com>
4389
4390 * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
4391
4392 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4393
4394 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
4395
4396 2020-05-19 Pedro Alves <palves@redhat.com>
4397
4398 * NEWS (set exec-file-mismatch): Adjust entry.
4399 * exec.c: Include "build-id.h".
4400 (validate_exec_file): Try to match build IDs instead of filenames.
4401 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
4402 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
4403 and pass down 'warn_if_slow'.
4404 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
4405 gdb_bfd_open_closure to pass it down.
4406 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
4407
4408 2020-05-19 Pedro Alves <palves@redhat.com>
4409
4410 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
4411 * target.c (target_fileio_open_1): Rename to target_fileio_open
4412 and make extern. Use bool.
4413 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
4414 (target_fileio_read_alloc_1): Adjust.
4415 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
4416 (target_fileio_open_warn_if_slow): Delete declaration.
4417
4418 2020-05-19 Pedro Alves <palves@redhat.com>
4419
4420 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
4421 Adjust all callers.
4422
4423 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
4424
4425 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
4426 whether disp is negative.
4427
4428 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4429
4430 * symfile.h (struct symfile_segment_data)
4431 <~symfile_segment_data>: Remove.
4432 <segment_info>: Change to std::vector.
4433 * symfile.c (default_symfile_segments): Update.
4434 * elfread.c (elf_symfile_segments): Update.
4435
4436 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4437
4438 * symfile.h (struct symfile_segment_data) <struct segment>: New.
4439 <segments>: New.
4440 <segment_bases, segment_sizes>: Remove.
4441 * symfile.c (default_symfile_segments): Update.
4442 * elfread.c (elf_symfile_segments): Update.
4443 * remote.c (remote_target::get_offsets): Update.
4444 * solib-target.c (solib_target_relocate_section_addresses):
4445 Update.
4446
4447 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4448
4449 * symfile.h (struct symfile_segment_data): Initialize fields.
4450 <~symfile_segment_data>: Add.
4451 (symfile_segment_data_up): New.
4452 (struct sym_fns) <sym_segments>: Return a
4453 symfile_segment_data_up.
4454 (default_symfile_segments): Return a symfile_segment_data_up.
4455 (free_symfile_segment_data): Remove.
4456 (get_symfile_segment_data): Return a symfile_segment_data_up.
4457 * symfile.c (default_symfile_segments): Likewise.
4458 (get_symfile_segment_data): Likewise.
4459 (free_symfile_segment_data): Remove.
4460 (symfile_find_segment_sections): Update.
4461 * elfread.c (elf_symfile_segments): Return a
4462 symfile_segment_data_up.
4463 * remote.c (remote_target::get_offsets): Update.
4464 * solib-target.c (solib_target_relocate_section_addresses):
4465 Update.
4466 * symfile-debug.c (debug_sym_segments): Return a
4467 symfile_segment_data_up.
4468
4469 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4470
4471 PR build/25981
4472 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
4473 Hardcode register numbers.
4474
4475 PR build/25981
4476 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
4477 procfs_find_LDT_entry): Remove.
4478 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
4479 procfs_find_LDT_entry): Remove.
4480 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
4481 Remove.
4482
4483 2020-05-17 Pedro Alves <palves@redhat.com>
4484 Andrew Burgess <andrew.burgess@embecosm.com>
4485 Keno Fischer <keno@juliacomputing.com>
4486
4487 PR gdb/25741
4488 * breakpoint.c (build_target_condition_list): Update comments.
4489 (build_target_command_list): Update comments and skip matching
4490 locations.
4491 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
4492 a separate function. Simplify "set breakpoint auto-hw off"
4493 handling.
4494 (insert_breakpoints): Update comment.
4495 (tracepoint_locations_match): New parameter. For breakpoints,
4496 compare location types too, if the caller wants to.
4497 (handle_automatic_hardware_breakpoints): New functions.
4498 (bp_location_is_less_than): Also sort by location type and
4499 hardware breakpoint length.
4500 (update_global_location_list): Handle "set breakpoint auto-hw on"
4501 here.
4502 (update_breakpoint_locations): Ask breakpoint_locations_match to
4503 ignore location types.
4504
4505 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
4506
4507 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
4508 type::name instead.
4509
4510 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
4511
4512 * gdbtypes.h (struct type) <name, set_name>: New methods.
4513 (TYPE_CODE): Use type::name. Change all call sites used to set
4514 the name to use type::set_name instead.
4515
4516 2020-05-16 Tom Tromey <tom@tromey.com>
4517
4518 * top.c (quit_force): Update.
4519 * infrun.c (handle_no_resumed): Update.
4520 * top.h (all_uis): New function.
4521 (ALL_UIS): Remove.
4522
4523 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
4524
4525 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
4526
4527 2020-05-16 Pedro Alves <palves@redhat.com>
4528
4529 * ia64-linux-nat.c
4530 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
4531 Declare method.
4532 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
4533
4534 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
4535
4536 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
4537 (sparc64_adi_info): Likewise.
4538
4539 2020-05-15 Tom Tromey <tom@tromey.com>
4540
4541 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
4542 block_objfile.
4543 (lookup_objfile_from_block): Remove.
4544 (lookup_symbol_in_block, lookup_symbol_in_static_block)
4545 (lookup_global_symbol): Use block_objfile.
4546 * symtab.h (lookup_objfile_from_block): Don't declare.
4547 * printcmd.c (clear_dangling_display_expressions): Use
4548 block_objfile.
4549 * parse.c (operator_check_standard): Use block_objfile.
4550
4551 2020-05-15 Tom Tromey <tom@tromey.com>
4552
4553 * language.c (language_alloc_type_symbol): Set
4554 SYMBOL_SECTION.
4555 * symtab.c (initialize_objfile_symbol): Remove.
4556 (allocate_symbol): Remove.
4557 (allocate_template_symbol): Remove.
4558 * dwarf2/read.c (fixup_go_packaging): Use "new".
4559 (new_symbol): Use "new".
4560 (read_variable): Don't call initialize_objfile_symbol. Use
4561 "new".
4562 (read_func_scope): Use "new".
4563 * xcoffread.c (process_xcoff_symbol): Don't call
4564 initialize_objfile_symbol.
4565 (SYMBOL_DUP): Remove.
4566 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
4567 "new".
4568 * symtab.h (allocate_symbol, initialize_objfile_symbol)
4569 (allocate_template_symbol): Don't declare.
4570 (struct symbol): Add copy constructor. Change defaults.
4571 * jit.c (finalize_symtab): Use "new".
4572 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
4573 Use "new".
4574 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
4575 (common_block_end): Use "new".
4576 * mdebugread.c (parse_symbol): Use "new".
4577 (new_symbol): Likewise.
4578
4579 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4580
4581 * NEWS: Mention changes to help and apropos.
4582
4583 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4584
4585 * command.h (enum command_class): Improve comments, document
4586 that class_alias is for user-defined aliases, give the class
4587 name for each class, remove unused class_xdb.
4588 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
4589 * breakpoint.c (_initialize_breakpoint): Replace class_alias
4590 by a precise class.
4591 * infcmd.c (_initialize_infcmd): Likewise.
4592 * reverse.c (_initialize_reverse): Likewise.
4593 * stack.c (_initialize_stack): Likewise.
4594 * symfile.c (_initialize_symfile): Likewise.
4595 * tracepoint.c (_initialize_tracepoint): Likewise.
4596
4597 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4598
4599 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
4600 when their aliased command is traversed.
4601 (help_cmd): Add fput_command_names_styled call to
4602 output command name and aliases when command has an alias.
4603
4604 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4605
4606 * cli/cli-decode.h (help_cmd_list): Remove declaration.
4607 * cli/cli-decode.c (help_cmd_list): Declare as static,
4608 remove prefix argument, use bool for recurse arg, rework to show the aliases of
4609 a command together with the command.
4610 (fput_command_name_styled, fput_command_names_styled): New functions.
4611 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
4612 fput_command_name_styled.
4613 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
4614 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
4615
4616 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4617
4618 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
4619 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
4620 * command.h (cmd_show_list): Likewise.
4621 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
4622 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
4623
4624 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4625
4626 * unittests/command-def-selftests.c (traverse_command_structure):
4627 Verify all commands of a list have the same prefix command and
4628 that only the top cmdlist commands have a null prefix.
4629
4630 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4631
4632 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
4633 as prefix, not one of its aliases.
4634 (set_cmd_prefix): Remove.
4635 (do_add_cmd): Centralize the setting of the prefix of a command, when
4636 command is defined after its full chain of prefix commands.
4637 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
4638 (add_setshow_cmd_full): Likewise.
4639 (update_prefix_field_of_prefixed_commands): New function.
4640 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
4641 update_prefix_field_of_prefixed_commands.
4642 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
4643 addresses of remote_set_cmdlist and remote_show_cmdlist given
4644 as argument, not the address of an argument.
4645 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
4646 * gdb/remote.c (_initialize_remote): Likewise.
4647
4648 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4649
4650 * cli/cli-cmds.c (alias_command): Check for an existing alias
4651 using lookup_cmd_composition, as valid_command_p is too strict
4652 and forbids aliases that are the prefix of an existing alias
4653 or command.
4654 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
4655 command is properly recognised as a valid command.
4656
4657 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4658
4659 * unittests/help-doc-selftests.c: Rename to
4660 unittests/command-def-selftests.c
4661 * unittests/command-def-selftests.c (help_doc_tests): Update some
4662 comments.
4663 (command_structure_tests, traverse_command_structure): New namespace
4664 and function.
4665 (command_structure_invariants_tests): New function.
4666 (_initialize_command_def_selftests) Renamed from
4667 _initialize_help_doc_selftests, register command_structure_invariants
4668 selftest.
4669
4670 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4671
4672 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
4673 an alias of 'show'.
4674
4675 2020-05-15 Joel Brobecker <brobecker@adacore.com>
4676
4677 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
4678 ada_is_fixed_point_type. Update all callers.
4679 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
4680 all callers.
4681 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
4682 Update all callers.
4683 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
4684 print_fixed_point_type. Update all callers.
4685 * ada-valprint.c (ada_value_print_num): Replace call to
4686 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
4687
4688 2020-05-14 Kevin Buettner <kevinb@redhat.com>
4689
4690 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
4691 processors.
4692 (cpu_supports_bts): Add CV_AMD case.
4693
4694 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
4695 Simon Marchi <simon.marchi@efficios.com>
4696
4697 * infrun.c (stop_all_threads): Collect multiple wait events at
4698 each pass.
4699
4700 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
4701
4702 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
4703 type::code instead.
4704
4705 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
4706
4707 * gdbtypes.h (struct type) <code, set_code>: New methods.
4708 (TYPE_CODE): Use type::code. Change all call sites used to set
4709 the code to use type::set_code instead.
4710
4711 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4712 Tom de Vries <tdevries@suse.de>
4713 Pedro Alves <palves@redhat.com>
4714
4715 PR threads/25478
4716 * infrun.c (stop_all_threads): Do NOT ignore
4717 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
4718 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
4719 received.
4720 (handle_no_resumed): Remove code handling a live inferior with no
4721 threads.
4722 * remote.c (has_single_non_exited_thread): New.
4723 (remote_target::update_thread_list): Do not delete a thread if is
4724 the last thread of the process.
4725 * thread.c (thread_select): Call delete_exited_threads instead of
4726 prune_threads.
4727
4728 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4729
4730 * infrun.c (stop_all_threads): Enable/disable thread events of all
4731 targets. Move a debug message denoting the end of the function
4732 into the SCOPED_EXIT block.
4733
4734 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4735
4736 * process-stratum-target.h: Include <set>.
4737 (all_non_exited_process_targets, switch_to_target_no_thread): New
4738 function declarations.
4739 * process-stratum-target.c (all_non_exited_process_targets)
4740 (switch_to_target_no_thread): New function implementations.
4741
4742 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4743
4744 * infrun.c (handle_inferior_event): Extract out a piece of code
4745 into...
4746 (mark_non_executing_threads): ...this new function.
4747
4748 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4749
4750 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
4751 use.
4752
4753 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4754
4755 * regcache.c (regcache_read_pc_protected): New function
4756 implementation that returns 0 if the PC cannot read via
4757 'regcache_read_pc'.
4758 * infrun.c (proceed): Call 'regcache_read_pc_protected'
4759 instead of 'regcache_read_pc'.
4760 (keep_going_pass_signal): Ditto.
4761
4762 2020-05-13 Tom Tromey <tromey@adacore.com>
4763
4764 * ada-lang.c (align_value): Remove.
4765 (ada_template_to_fixed_record_type_1): Use align_up.
4766
4767 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4768
4769 * async-event.c: Update the copyright year.
4770 * async-event.h: Update the copyright year.
4771
4772 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
4773
4774 * objfiles.h (is_addr_in_objfile,
4775 shared_objfile_contains_address_p): Return bool.
4776 * objfile.c (is_addr_in_objfile,
4777 shared_objfile_contains_address_p): Return bool.
4778
4779 2020-05-11 Tom Tromey <tromey@adacore.com>
4780
4781 * cli/cli-cmds.c (info_command): Restore.
4782 (_initialize_cli_cmds): Use add_prefix_command for "info".
4783 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
4784
4785 2020-05-11 Tom Tromey <tromey@adacore.com>
4786
4787 * ada-lang.c (ada_value_primitive_field): Now public.
4788 * ada-lang.h (ada_value_primitive_field): Declare.
4789 * ada-valprint.c (print_field_values): Use
4790 ada_value_primitive_field for wrapper fields.
4791
4792 2020-05-11 Tom de Vries <tdevries@suse.de>
4793
4794 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
4795 MODULE_DOMAIN.
4796
4797 2020-05-11 Tom de Vries <tdevries@suse.de>
4798
4799 PR symtab/25941
4800 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
4801 with length 0, if not gdb-produced.
4802 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
4803
4804 2020-05-09 Tom de Vries <tdevries@suse.de>
4805
4806 PR gdb/25955
4807 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
4808 calculation.
4809
4810 2020-05-09 Tom Tromey <tom@tromey.com>
4811
4812 * top.c (server_command): Now bool.
4813 * top.h (server_command): Now bool.
4814
4815 2020-05-08 Tom Tromey <tromey@adacore.com>
4816
4817 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
4818 already being processed.
4819
4820 2020-05-08 Tom Tromey <tom@tromey.com>
4821
4822 * printcmd.c (struct display) <next>: Remove.
4823 <display>: New constructor.
4824 <exp_string>: Now a std::string.
4825 <enabled_p>: Now a bool.
4826 (display_number): Move definition earlier.
4827 (displays): Rename from display_chain. Now a std::vector.
4828 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
4829 (display_command): Update.
4830 (do_one_display, disable_display)
4831 (enable_disable_display_command, do_enable_disable_display):
4832 Update.
4833 (free_display): Remove.
4834 (clear_displays): Rewrite.
4835 (delete_display): Update.
4836 (map_display_numbers): Use function_view. Remove "data"
4837 parameter. Update.
4838 (do_delete_display): Remove.
4839 (undisplay_command): Update.
4840 (do_one_display, do_displays, disable_display)
4841 (info_display_command): Update.
4842 (do_enable_disable_display): Remove.
4843 (enable_disable_display_command)
4844 (clear_dangling_display_expressions): Update.
4845
4846 2020-05-08 Tom Tromey <tom@tromey.com>
4847
4848 * symtab.c (set_symbol_cache_size)
4849 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
4850 (maintenance_print_symbol_cache_statistics): Update.
4851 * symmisc.c (print_symbol_bcache_statistics)
4852 (print_objfile_statistics, maintenance_print_objfiles)
4853 (maintenance_info_symtabs, maintenance_check_symtabs)
4854 (maintenance_expand_symtabs, maintenance_info_line_tables):
4855 Update.
4856 * symfile-debug.c (set_debug_symfile): Update.
4857 * source.c (forget_cached_source_info): Update.
4858 * python/python.c (gdbpy_progspaces): Update.
4859 * psymtab.c (maintenance_info_psymtabs): Update.
4860 * probe.c (parse_probes): Update.
4861 * linespec.c (iterate_over_all_matching_symtabs)
4862 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
4863 * guile/scm-progspace.c (gdbscm_progspaces): Update.
4864 * exec.c (exec_target::close): Update.
4865 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
4866 * breakpoint.c (print_one_breakpoint_location)
4867 (create_longjmp_master_breakpoint)
4868 (create_std_terminate_master_breakpoint): Update.
4869 * progspace.c (program_spaces): Now a std::vector.
4870 (maybe_new_address_space): Update.
4871 (add_program_space): Remove.
4872 (program_space::program_space): Update.
4873 (remove_program_space): Update.
4874 (number_of_program_spaces): Remove.
4875 (print_program_space, update_address_spaces): Update.
4876 * progspace.h (program_spaces): Change type.
4877 (ALL_PSPACES): Remove.
4878 (number_of_program_spaces): Don't declare.
4879 (struct program_space) <next>: Remove.
4880
4881 2020-05-08 Tom Tromey <tom@tromey.com>
4882
4883 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
4884 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
4885 (enable_break): Update.
4886 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
4887 (frv_fdpic_find_canonical_descriptor): Update.
4888 (frv_fetch_objfile_link_map): Update.
4889 * progspace.c (program_space::free_all_objfiles): Update.
4890 (program_space::solibs): New method.
4891 * progspace.h (struct program_space) <solibs>: New method.
4892 * solist.h (master_so_list): Don't declare.
4893 (ALL_SO_LIBS): Remove.
4894 * solib.h (so_list_head): Remove.
4895 (update_solib_list): Update comment.
4896 * solib.c (master_so_list): Remove.
4897 (solib_used, update_solib_list, solib_add)
4898 (info_sharedlibrary_command, clear_solib)
4899 (reload_shared_libraries_1, remove_user_added_objfile): Update.
4900
4901 2020-05-08 Tom Tromey <tom@tromey.com>
4902
4903 * extension.c (extension_languages): Now a std::array.
4904 (ALL_EXTENSION_LANGUAGES): Remove.
4905 (get_ext_lang_defn, get_ext_lang_of_file)
4906 (eval_ext_lang_from_control_command): Update.
4907 (finish_ext_lang_initialization)
4908 (auto_load_ext_lang_scripts_for_objfile)
4909 (ext_lang_type_printers::ext_lang_type_printers)
4910 (apply_ext_lang_type_printers)
4911 (ext_lang_type_printers::~ext_lang_type_printers)
4912 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
4913 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
4914 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
4915 (get_matching_xmethod_workers, ext_lang_colorize)
4916 (ext_lang_before_prompt): Update.
4917 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
4918
4919 2020-05-08 Tom Tromey <tom@tromey.com>
4920
4921 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
4922 overload.
4923 <swap_string, m_string>: Remove.
4924 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
4925 Update.
4926 * stabsread.c (define_symbol, read_type): Update.
4927 * linespec.c (find_linespec_symbols): Update.
4928 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
4929 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
4930 * dbxread.c (read_dbx_symtab): Update.
4931 * cp-support.h (cp_canonicalize_string_full)
4932 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
4933 Return unique_xmalloc_ptr.
4934 * cp-support.c (inspect_type): Update.
4935 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
4936 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
4937 Likewise.
4938 * c-typeprint.c (print_name_maybe_canonical): Update.
4939 * break-catch-throw.c (check_status_exception_catchpoint):
4940 Update.
4941
4942 2020-05-08 Tom de Vries <tdevries@suse.de>
4943
4944 * infrun.c (follow_fork): Copy current_line and current_symtab to
4945 child thread.
4946
4947 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4948
4949 * async-event.c (struct async_signal_handler, struct
4950 async_event_handler): Reformat, remove typedef.
4951
4952 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4953
4954 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
4955 access thistype->main_type->dyn_prop_list directly.
4956
4957 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4958
4959 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
4960 (remove_dyn_prop): Remove. Update all users to use
4961 type::remove_dyn_prop.
4962 * gdbtypes.c (remove_dyn_prop): Rename to...
4963 (type::remove_dyn_prop): ... this.
4964
4965 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
4966
4967 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
4968 (add_dyn_prop): Remove. Update all users to use
4969 type::add_dyn_prop.
4970 * gdbtypes.c (add_dyn_prop): Rename to...
4971 (type::add_dyn_prop): ... this.
4972
4973 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4974
4975 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
4976 (get_dyn_prop): Remove. Update all users to use
4977 type::dyn_prop.
4978 * gdbtypes.c (get_dyn_prop): Rename to...
4979 (type::dyn_prop): ... this.
4980
4981 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
4982
4983 * gdbtypes.h (struct main_type) <flag_static>: Remove.
4984
4985 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
4986
4987 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
4988 instruction, skip it if it's there.
4989
4990 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
4991
4992 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
4993
4994 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
4995
4996 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
4997 * gdbtypes.c (recursive_dump_type): Remove use of
4998 TYPE_INCOMPLETE.
4999
5000 2020-05-03 Tom Tromey <tom@tromey.com>
5001
5002 * breakpoint.c (catch_command, tcatch_command): Remove.
5003 (_initialize_breakpoint): Use add_basic_prefix_cmd,
5004 add_show_prefix_cmd.
5005 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
5006 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5007 Remove.
5008 (add_internal_problem_command): Use add_basic_prefix_cmd,
5009 add_show_prefix_cmd.
5010 * mips-tdep.c (set_mipsfpu_command): Remove.
5011 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
5012 * dwarf2/index-cache.c (set_index_cache_command): Remove.
5013 (_initialize_index_cache): Use add_basic_prefix_cmd.
5014 * memattr.c (dummy_cmd): Remove.
5015 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
5016 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
5017 (_initialize_tui_win): Use add_basic_prefix_cmd,
5018 add_show_prefix_cmd.
5019 * cli/cli-logging.c (set_logging_command): Remove.
5020 (_initialize_cli_logging): Use add_basic_prefix_cmd,
5021 add_show_prefix_cmd.
5022 (show_logging_command): Remove.
5023 * target.c (target_command): Remove.
5024 (add_target): Use add_basic_prefix_cmd.
5025
5026 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
5027
5028 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
5029
5030 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5031
5032 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
5033 info_command.
5034
5035 2020-04-30 Kamil Rytarowski <n54@gmx.com>
5036
5037 * nbsd-nat.c (nbsd_enable_proc_events)
5038 (nbsd_nat_target::post_startup_inferior): Add.
5039 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
5040 (nbsd_nat_target::update_thread_list): Rewrite.
5041 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
5042 "PTRACE_LWP_CREATE".
5043 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
5044
5045 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5046
5047 * stack.c (_initialize_stack): Remove duplicated creation
5048 of "frame" command and "f" alias.
5049
5050 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
5051
5052 PR gdb/18706
5053 * gdbtypes.c (check_typedef): Calculate size of array of
5054 stubbed type.
5055
5056 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
5057
5058 PR gdb/15559
5059 * i386-tdep.c (i386_push_dummy_call): Call
5060 i386_thiscall_push_dummy_call.
5061 (i386_thiscall_push_dummy_call): New function.
5062 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
5063 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
5064 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
5065
5066 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5067
5068 * gdbarch.sh (do_read): Add shellcheck disable directive for
5069 warning SC2162.
5070
5071 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5072
5073 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
5074 "referenced but not assigned" warning.
5075
5076 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5077
5078 * gdbarch.sh: Remove code that sets fallbackdefault.
5079
5080 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5081
5082 * gdbarch.sh: Use shell operators && and || instead of
5083 -a and -o.
5084
5085 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5086
5087 * gdbarch.sh: Use $(...) instead of `...`.
5088
5089 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5090
5091 * gdbarch.sh: Use double quotes around variables.
5092
5093 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5094
5095 * gdbarch.sh: Use %s with printf, instead of variables in the
5096 format string.
5097
5098 2020-04-29 Tom Tromey <tromey@adacore.com>
5099
5100 PR ada/25875:
5101 * dwarf2/read.c (update_enumeration_type_from_children): Compute
5102 type fields here.
5103 (read_enumeration_type): Call
5104 update_enumeration_type_from_children later. Update comments.
5105 (process_enumeration_scope): Don't create type fields.
5106
5107 2020-04-29 Kamil Rytarowski <n54@gmx.com>
5108
5109 * nbsd-tdep.c: Include "xml-syscall.h".
5110 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
5111
5112 2020-04-29 Kamil Rytarowski <n54@gmx.com>
5113
5114 * nbsd-nat.c: Include "sys/wait.h".
5115 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
5116 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
5117 (nbsd_nat_target::remove_exec_catchpoint)
5118 (nbsd_nat_target::set_syscall_catchpoint): Add.
5119 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
5120 (nbsd_nat_target::insert_exec_catchpoint)
5121 (nbsd_nat_target::remove_exec_catchpoint)
5122 (nbsd_nat_target::set_syscall_catchpoint): Add.
5123 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
5124 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
5125 `nbsd_get_syscall_number'.
5126
5127 2020-04-29 Tom Tromey <tom@tromey.com>
5128
5129 * stack.c (print_block_frame_labels): Remove.
5130
5131 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
5132
5133 PR gdb/17320
5134 * ada-valprint.c (val_print_packed_array_elements): Move array
5135 end bracket to new line.
5136 (ada_val_print_string): Remove extra spaces before first array
5137 element.
5138 * c-valprint.c (c_value_print_array): Likewise.
5139 * m2-valprint.c (m2_print_array_contents): Likewise.
5140 (m2_value_print_inner): Likewise.
5141 * p-valprint.c (pascal_value_print_inner): Likewise.
5142 * valprint.c (generic_val_print_array): Likewise.
5143 (value_print_array_elements): Move first array element and array
5144 end bracket to new line.
5145
5146 2020-04-29 Tom de Vries <tdevries@suse.de>
5147
5148 PR symtab/25889
5149 * linespec.c (find_method): Fix ix calculation.
5150
5151 2020-04-28 Kamil Rytarowski <n54@gmx.com>
5152
5153 * syscalls/update-netbsd.sh: New file.
5154 * syscalls/netbsd.xml: Regenerate.
5155 * data-directory/Makefile.in: Register `netbsd.xml' in
5156 `SYSCALLS_FILES'.
5157
5158 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
5159
5160 * syscalls/update-freebsd.sh: Add double quotes.
5161
5162 2020-04-28 Tom Tromey <tom@tromey.com>
5163
5164 * NEWS: Update.
5165 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
5166 (cmdpy_init): Allow class_tui.
5167
5168 2020-04-28 Mark Williams <mark@myosotissp.com>
5169
5170 PR gdb/24480
5171 * dwarf2read.c: Add missing assingments to list_in_scope when
5172 start_symtab was already called.
5173
5174 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
5175
5176 PR gdb/25881
5177 * dwarf2/read.c (offset_map_type): Use
5178 gdb:hash_enum<sect_offset> as hash function.
5179
5180 2020-04-28 Tom de Vries <tdevries@suse.de>
5181
5182 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
5183 with DW_AT_signature.
5184
5185 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
5186
5187 * configure.ac: Remove check for fs_base/gs_base in
5188 user_regs_struct.
5189 * configure: Re-generate.
5190 * config.in: Re-generate.
5191 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
5192 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
5193 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
5194
5195 2020-04-27 Luis Machado <luis.machado@linaro.org>
5196
5197 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
5198 problematic inline frame unwinding situation.
5199 * frame.c (frame_id_computed_p): New function.
5200 * frame.h (frame_id_computed_p): New prototype.
5201
5202 2020-04-26 Tom Tromey <tom@tromey.com>
5203
5204 * command.h (enum command_class) <class_pseudo>: Remove.
5205
5206 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5207
5208 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
5209 and whitespace.
5210
5211 2020-04-25 Kamil Rytarowski <n54@gmx.com>
5212
5213 * inf-ptrace.c (inf_ptrace_target::wait): Remove
5214 `PT_GET_PROCESS_STATE' block.
5215
5216 2020-04-24 Tom Tromey <tom@tromey.com>
5217
5218 * symtab.h (symbol_get_demangled_name): Don't declare.
5219 * symtab.c (symbol_get_demangled_name): Remove.
5220 (general_symbol_info::natural_name)
5221 (general_symbol_info::demangled_name): Update.
5222
5223 2020-04-24 Tom Tromey <tom@tromey.com>
5224
5225 PR rust/25025:
5226 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
5227
5228 2020-04-24 Tom Tromey <tom@tromey.com>
5229
5230 PR symtab/12707:
5231 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
5232 exists.
5233 (new_symbol): Likewise.
5234 * compile/compile-object-load.c (get_out_value_type): Use
5235 symbol_matches_search_name.
5236
5237 2020-04-24 Tom Tromey <tom@tromey.com>
5238
5239 * dwarf2/read.c (add_partial_symbol): Do not call
5240 compute_and_set_names.
5241
5242 2020-04-24 Tom Tromey <tom@tromey.com>
5243
5244 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
5245 overload.
5246
5247 2020-04-24 Tom Tromey <tom@tromey.com>
5248
5249 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
5250 (add_psymbol_to_list): New overload. Make old overload call new
5251 one.
5252 * psympriv.h (add_psymbol_to_list): New overload.
5253
5254 2020-04-24 Tom Tromey <tom@tromey.com>
5255
5256 * dwarf2/read.c (partial_die_info::read) <case
5257 DW_AT_linkage_name>: Use value_as_string.
5258 (dwarf2_string_attr): Use value_as_string.
5259 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
5260 method.
5261 * dwarf2/attribute.c (attribute::value_as_string): New method.
5262
5263 2020-04-24 Tom Tromey <tom@tromey.com>
5264
5265 * symtab.c (general_symbol_info::natural_name)
5266 (general_symbol_info::demangled_name): Check for language_rust.
5267
5268 2020-04-24 Tom Tromey <tom@tromey.com>
5269
5270 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
5271 (dwarf2_physname): ... from here.
5272 (partial_die_info::read): Add Rust "{" hack.
5273
5274 2020-04-24 Tom Tromey <tom@tromey.com>
5275
5276 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
5277 method.
5278 (symbol_set_demangled_name): Don't declare.
5279 * symtab.c (general_symbol_info::set_demangled_name): Rename from
5280 symbol_set_demangled_name.
5281 (general_symbol_info::set_language)
5282 (general_symbol_info::compute_and_set_names): Update.
5283 * minsyms.c (minimal_symbol_reader::install): Update.
5284 * dwarf2/read.c (new_symbol): Update.
5285
5286 2020-04-24 Tom Tromey <tromey@adacore.com>
5287
5288 PR python/23662:
5289 * python/py-type.c (convert_field): Handle
5290 FIELD_LOC_KIND_DWARF_BLOCK.
5291 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
5292 (typy_get_dynamic): Nw function.
5293 (type_object_getset): Add "dynamic".
5294 * NEWS: Add entry.
5295
5296 2020-04-24 Tom Tromey <tromey@adacore.com>
5297
5298 * ada-typeprint.c (print_choices, print_variant_part)
5299 (print_record_field_types_dynamic): New functions.
5300 (print_record_field_types): Use print_record_field_types_dynamic.
5301
5302 2020-04-24 Tom Tromey <tromey@adacore.com>
5303
5304 * dwarf2/read.c (handle_data_member_location): New overload.
5305 (dwarf2_add_field): Use it.
5306 (decode_locdesc): Add "computed" parameter. Update comment.
5307 * gdbtypes.c (is_dynamic_type_internal): Also look for
5308 FIELD_LOC_KIND_DWARF_BLOCK.
5309 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
5310 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
5311 virtual base classes.
5312 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
5313 FIELD_LOC_KIND_DWARF_BLOCK.
5314
5315 2020-04-24 Tom Tromey <tromey@adacore.com>
5316
5317 * dwarf2/read.c (read_structure_type): Handle dynamic length.
5318 * gdbtypes.c (is_dynamic_type_internal): Check
5319 TYPE_HAS_DYNAMIC_LENGTH.
5320 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
5321 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
5322 New macros.
5323 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
5324 constant.
5325
5326 2020-04-24 Tom Tromey <tromey@adacore.com>
5327
5328 * dwarf2/read.c (struct variant_field): Rewrite.
5329 (struct variant_part_builder): New.
5330 (struct nextfield): Remove "variant" field. Add "offset".
5331 (struct field_info): Add "current_variant_part" and
5332 "variant_parts".
5333 (alloc_discriminant_info): Remove.
5334 (alloc_rust_variant): New function.
5335 (quirk_rust_enum): Update.
5336 (dwarf2_add_field): Set "offset" member. Don't handle
5337 DW_TAG_variant_part.
5338 (offset_map_type): New typedef.
5339 (convert_variant_range, create_one_variant)
5340 (create_one_variant_part, create_variant_parts)
5341 (add_variant_property): New functions.
5342 (dwarf2_attach_fields_to_type): Call add_variant_property.
5343 (read_structure_type): Don't handle DW_TAG_variant_part.
5344 (handle_variant_part, handle_variant): New functions.
5345 (handle_struct_member_die): Use them.
5346 (process_structure_scope): Don't handle variant parts.
5347 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
5348 (struct discriminant_info): Remove.
5349 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
5350 (struct main_type) <flag_discriminated_union>: Remove.
5351 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
5352 (rust_enum_variant): Return int. Remove "contents". Rewrite.
5353 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
5354 Update.
5355 * valops.c (value_union_variant): Remove.
5356 * value.h (value_union_variant): Don't declare.
5357
5358 2020-04-24 Tom Tromey <tromey@adacore.com>
5359
5360 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
5361 (ada_value_primitive_packed_val): Update.
5362 * ada-valprint.c (ada_value_print_1): Update.
5363 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
5364 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
5365 just an address. Use evaluate_for_locexpr_baton.
5366 (dwarf2_evaluate_property): Update.
5367 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
5368 array_view.
5369 * findvar.c (default_read_var_value): Update.
5370 * gdbtypes.c (compute_variant_fields_inner)
5371 (resolve_dynamic_type_internal): Update.
5372 (resolve_dynamic_type): Change type of valaddr parameter.
5373 * gdbtypes.h (resolve_dynamic_type): Update.
5374 * valarith.c (value_subscripted_rvalue): Update.
5375 * value.c (value_from_contents_and_address): Update.
5376
5377 2020-04-24 Tom Tromey <tromey@adacore.com>
5378
5379 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
5380 "push_initial_value" parameter.
5381 (dwarf2_evaluate_property): Likewise.
5382 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
5383
5384 2020-04-24 Tom Tromey <tromey@adacore.com>
5385
5386 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
5387 (variant::matches, compute_variant_fields_recurse)
5388 (compute_variant_fields_inner, compute_variant_fields): New
5389 functions.
5390 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
5391 Use resolved_type after type is made.
5392 (operator==): Add new cases.
5393 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
5394 (struct discriminant_range, struct variant, struct variant_part):
5395 New.
5396 (union dynamic_prop_data) <variant_parts, original_type>: New
5397 members.
5398 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
5399 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
5400 constants.
5401 * value.c (unpack_bits_as_long): Now public.
5402 * value.h (unpack_bits_as_long): Declare.
5403
5404 2020-04-24 Tom Tromey <tromey@adacore.com>
5405
5406 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
5407 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
5408
5409 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
5410
5411 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
5412
5413 2020-04-24 Kamil Rytarowski <n54@gmx.com>
5414
5415 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
5416 (remove_fork_catchpoint, post_startup_inferior)
5417 (post_attach): Move...
5418 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
5419 (remove_fork_catchpoint, post_startup_inferior)
5420 (post_attach): ...here.
5421 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
5422 (remove_fork_catchpoint, post_startup_inferior)
5423 (post_attach): Move...
5424 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
5425 (remove_fork_catchpoint, post_startup_inferior)
5426 (post_attach): ...here.
5427
5428 2020-04-24 Tom Tromey <tromey@adacore.com>
5429
5430 * nat/windows-nat.h (struct windows_thread_info)
5431 <pc_adjusted>: New member.
5432 * windows-nat.c (windows_fetch_one_register): Check
5433 pc_adjusted.
5434 (windows_nat_target::get_windows_debug_event)
5435 (windows_nat_target::wait): Set pc_adjusted.
5436
5437 2020-04-24 Tom de Vries <tdevries@suse.de>
5438
5439 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
5440 Run gdb-add-index inside temp dir.
5441
5442 2020-04-23 Tom Tromey <tromey@adacore.com>
5443
5444 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
5445 in loop.
5446
5447 2020-04-23 Luis Machado <luis.machado@linaro.org>
5448
5449 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
5450 get_frame_register instead of gdbarch_unwind_pc.
5451
5452 2020-04-23 Tom de Vries <tdevries@suse.de>
5453
5454 * symtab.c (lookup_global_symbol): Prefer def over decl.
5455
5456 2020-04-23 Tom de Vries <tdevries@suse.de>
5457
5458 PR symtab/25807
5459 * block.c (best_symbol, better_symbol): Promote to external.
5460 * block.h (best_symbol, better_symbol): Declare.
5461 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
5462 decl.
5463
5464 2020-04-23 Tom Tromey <tromey@adacore.com>
5465
5466 PR ada/25837:
5467 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
5468 "const char *", not a "const std::string &".
5469 <name_and_matcher::operator==>: Update.
5470 * unittests/lookup_name_info-selftests.c: Change type of
5471 "result".
5472
5473 2020-04-23 Tom Tromey <tom@tromey.com>
5474
5475 * inferior.h (iterate_over_inferiors): Don't declare.
5476 * inferior.c (iterate_over_inferiors): Remove.
5477 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
5478 Remove.
5479 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
5480 use iterate_over_inferiors.
5481 (darwin_resume_inferior_it)
5482 (struct resume_inferior_threads_param)
5483 (darwin_resume_inferior_threads_it): Remove.
5484 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
5485
5486 2020-04-23 Tom de Vries <tdevries@suse.de>
5487
5488 * blockframe.c (find_pc_partial_function): Use
5489 find_pc_sect_compunit_symtab rather than
5490 objfile->sf->qf->find_pc_sect_compunit_symtab.
5491
5492 2020-04-22 Tom de Vries <tdevries@suse.de>
5493
5494 PR symtab/25764
5495 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
5496 in psymtabs.
5497
5498 2020-04-22 Tom de Vries <tdevries@suse.de>
5499
5500 PR symtab/25801
5501 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
5502 symtabs.
5503
5504 2020-04-22 Tom de Vries <tdevries@suse.de>
5505
5506 PR symtab/25700
5507 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
5508 CU if already created.
5509
5510 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5511
5512 * infrun.c (displaced_step_fixup): Switch to the event_thread
5513 before calling displaced_step_restore, not after.
5514
5515 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
5516
5517 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
5518 its inferior is not recorded by us.
5519 (record_btrace_target_open): Replace call to
5520 all_non_exited_threads () with call to current_inferior
5521 ()->non_exited_threads ().
5522 (record_btrace_target::stop_recording): Likewise.
5523 (record_btrace_target::close): Likewise.
5524 (record_btrace_target::wait): Likewise.
5525 (record_btrace_target::record_stop_replaying): Likewise.
5526
5527 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
5528
5529 * btrace.c (btrace_enable): Throw an error on double enables and
5530 when enabling recording fails.
5531 (btrace_disable): Throw an error if the thread is not recorded.
5532
5533 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
5534
5535 * record-btrace.c (record_btrace_target::fetch_registers): Forward
5536 request if we do not have a thread_info.
5537
5538 2020-04-21 Tom de Vries <tdevries@suse.de>
5539
5540 PR gdb/25471
5541 * thread.c
5542 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
5543 exception in get_frame_id.
5544
5545 2020-04-20 Tom Tromey <tromey@adacore.com>
5546
5547 * python/python.c (struct gdbpy_event): Mark move constructor as
5548 noexcept.
5549 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
5550 constructor as noexcept.
5551 * completer.h (struct completion_result): Mark move constructor as
5552 noexcept.
5553 * completer.c (completion_result::completion_result): Use
5554 initialization style. Don't call reset_match_list.
5555
5556 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
5557
5558 * MAINTAINERS (Write After Approval): Add myself.
5559
5560 2020-04-18 Tom Tromey <tom@tromey.com>
5561
5562 * windows-tdep.c (init_w32_command_list)
5563 (w32_prefix_command_valid): Restore.
5564 (_initialize_windows_tdep): Call init_w32_command_list.
5565
5566 2020-04-18 Tom Tromey <tom@tromey.com>
5567
5568 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
5569 * value.c (value_fn_field): Update.
5570 * valops.c (find_function_in_inferior)
5571 (value_allocate_space_in_inferior): Update.
5572 * tui/tui-winsource.c (tui_update_source_windows_with_line):
5573 Update.
5574 * tui/tui-source.c (tui_source_window::set_contents): Update.
5575 * symtab.c (lookup_global_or_static_symbol)
5576 (find_function_start_sal_1, skip_prologue_sal)
5577 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
5578 * symmisc.c (dump_msymbols, dump_symtab_1)
5579 (maintenance_print_one_line_table): Update.
5580 * symfile.c (init_entry_point_info, section_is_mapped)
5581 (list_overlays_command, simple_read_overlay_table)
5582 (simple_overlay_update_1): Update.
5583 * stap-probe.c (handle_stap_probe): Update.
5584 * stabsread.c (dbx_init_float_type, define_symbol)
5585 (read_one_struct_field, read_enum_type, read_range_type): Update.
5586 * source.c (info_line_command): Update.
5587 * python/python.c (gdbpy_source_objfile_script)
5588 (gdbpy_execute_objfile_script): Update.
5589 * python/py-type.c (save_objfile_types): Update.
5590 * python/py-objfile.c (py_free_objfile): Update.
5591 * python/py-inferior.c (python_new_objfile): Update.
5592 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
5593 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
5594 (maintenance_check_psymtabs): Update.
5595 * printcmd.c (info_address_command): Update.
5596 * objfiles.h (struct objfile) <arch>: New method, from
5597 get_objfile_arch.
5598 (get_objfile_arch): Don't declare.
5599 * objfiles.c (get_objfile_arch): Remove.
5600 (filter_overlapping_sections): Update.
5601 * minsyms.c (msymbol_is_function): Update.
5602 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
5603 (output_nondebug_symbol): Update.
5604 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
5605 (mdebug_expand_psymtab): Update.
5606 * machoread.c (macho_add_oso_symfile): Update.
5607 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
5608 Update.
5609 * linux-fork.c (checkpoint_command): Update.
5610 * linespec.c (convert_linespec_to_sals): Update.
5611 * jit.c (finalize_symtab): Update.
5612 * infrun.c (insert_exception_resume_from_probe): Update.
5613 * ia64-tdep.c (ia64_find_unwind_table): Update.
5614 * hppa-tdep.c (internalize_unwinds): Update.
5615 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
5616 Update.
5617 * gcore.c (call_target_sbrk): Update.
5618 * elfread.c (record_minimal_symbol, elf_symtab_read)
5619 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
5620 (elf_gnu_ifunc_resolve_by_got): Update.
5621 * dwarf2/read.c (create_addrmap_from_index)
5622 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
5623 (read_debug_names_from_section)
5624 (process_psymtab_comp_unit_reader, add_partial_symbol)
5625 (add_partial_subprogram, process_full_comp_unit)
5626 (read_file_scope, read_func_scope, read_lexical_block_scope)
5627 (read_call_site_scope, dwarf2_ranges_read)
5628 (dwarf2_record_block_ranges, dwarf2_add_field)
5629 (mark_common_block_symbol_computed, read_tag_pointer_type)
5630 (read_tag_string_type, dwarf2_init_float_type)
5631 (dwarf2_init_complex_target_type, read_base_type)
5632 (partial_die_info::read, partial_die_info::read)
5633 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
5634 (dwarf2_fetch_die_loc_sect_off): Update.
5635 * dwarf2/loc.c (dwarf2_find_location_expression)
5636 (class dwarf_evaluate_loc_desc, rw_pieced_value)
5637 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
5638 (dwarf2_loc_desc_get_symbol_read_needs)
5639 (locexpr_describe_location_piece, locexpr_describe_location_1)
5640 (loclist_describe_location): Update.
5641 * dwarf2/index-write.c (write_debug_names): Update.
5642 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
5643 * dtrace-probe.c (dtrace_process_dof): Update.
5644 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
5645 (process_one_symbol): Update.
5646 * ctfread.c (ctf_init_float_type, read_base_type): Update.
5647 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
5648 (coff_read_enum_type): Update.
5649 * cli/cli-cmds.c (edit_command, list_command): Update.
5650 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
5651 * breakpoint.c (create_overlay_event_breakpoint)
5652 (create_longjmp_master_breakpoint)
5653 (create_std_terminate_master_breakpoint)
5654 (create_exception_master_breakpoint, get_sal_arch): Update.
5655 * block.c (block_gdbarch): Update.
5656 * annotate.c (annotate_source_line): Update.
5657
5658 2020-04-17 Tom Tromey <tromey@adacore.com>
5659
5660 * auto-load.c (show_auto_load_cmd): Remove.
5661 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
5662 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
5663 (maintenance_print_arc_command): Remove.
5664 * tui/tui-win.c (tui_command): Remove.
5665 (tui_get_cmd_list): Use add_basic_prefix_cmd.
5666 * tui/tui-layout.c (tui_layout_command): Remove.
5667 (_initialize_tui_layout): Use add_basic_prefix_cmd.
5668 * python/python.c (user_set_python, user_show_python): Remove.
5669 (_initialize_python): Use add_basic_prefix_cmd,
5670 add_show_prefix_cmd.
5671 * guile/guile.c (set_guile_command, show_guile_command): Remove.
5672 (install_gdb_commands): Use add_basic_prefix_cmd,
5673 add_show_prefix_cmd.
5674 (info_guile_command): Remove.
5675 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
5676 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
5677 add_show_prefix_cmd.
5678 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
5679 Remove do_set and do_show parameters.
5680 * cli/cli-style.c (set_style, show_style): Remove.
5681 (_initialize_cli_style): Use add_basic_prefix_cmd,
5682 add_show_prefix_cmd.
5683 (cli_style_option::add_setshow_commands): Remove do_set and
5684 do_show parameters.
5685 (cli_style_option::add_setshow_commands): Use
5686 add_basic_prefix_cmd, add_show_prefix_cmd.
5687 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
5688 (set_style_name): Remove.
5689 * cli/cli-dump.c (dump_command, append_command): Remove.
5690 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5691 (tekhex_dump_command, binary_dump_command)
5692 (binary_append_command): Remove.
5693 (_initialize_cli_dump): Use add_basic_prefix_cmd.
5694 * windows-tdep.c (w32_prefix_command_valid): Remove global.
5695 (init_w32_command_list): Remove; move into ...
5696 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
5697 * valprint.c (set_print, show_print, set_print_raw)
5698 (show_print_raw): Remove.
5699 (_initialize_valprint): Use add_basic_prefix_cmd,
5700 add_show_prefix_cmd.
5701 * typeprint.c (set_print_type, show_print_type): Remove.
5702 (_initialize_typeprint): Use add_basic_prefix_cmd,
5703 add_show_prefix_cmd.
5704 * record.c (set_record_command, show_record_command): Remove.
5705 (_initialize_record): Use add_basic_prefix_cmd,
5706 add_show_prefix_cmd.
5707 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
5708 add_show_prefix_cmd.
5709 (info_command, show_command, set_debug, show_debug): Remove.
5710 * top.h (set_history, show_history): Don't declare.
5711 * top.c (set_history, show_history): Remove.
5712 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5713 (unset_tdesc_cmd): Remove.
5714 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
5715 add_show_prefix_cmd.
5716 * symtab.c (info_module_command): Remove.
5717 (_initialize_symtab): Use add_basic_prefix_cmd.
5718 * symfile.c (overlay_command): Remove.
5719 (_initialize_symfile): Use add_basic_prefix_cmd.
5720 * sparc64-tdep.c (info_adi_command): Remove.
5721 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
5722 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
5723 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
5724 add_show_prefix_cmd.
5725 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
5726 (_initialize_serial): Use add_basic_prefix_cmd,
5727 add_show_prefix_cmd.
5728 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
5729 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
5730 add_show_prefix_cmd.
5731 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
5732 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
5733 add_show_prefix_cmd.
5734 * riscv-tdep.c (show_riscv_command, set_riscv_command)
5735 (show_debug_riscv_command, set_debug_riscv_command): Remove.
5736 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
5737 add_show_prefix_cmd.
5738 * remote.c (remote_command, set_remote_cmd): Remove.
5739 (_initialize_remote): Use add_basic_prefix_cmd.
5740 * record-full.c (set_record_full_command)
5741 (show_record_full_command): Remove.
5742 (_initialize_record_full): Use add_basic_prefix_cmd,
5743 add_show_prefix_cmd.
5744 * record-btrace.c (cmd_set_record_btrace)
5745 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
5746 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
5747 (cmd_show_record_btrace_pt): Remove.
5748 (_initialize_record_btrace): Use add_basic_prefix_cmd,
5749 add_show_prefix_cmd.
5750 * ravenscar-thread.c (set_ravenscar_command)
5751 (show_ravenscar_command): Remove.
5752 (_initialize_ravenscar): Use add_basic_prefix_cmd,
5753 add_show_prefix_cmd.
5754 * mips-tdep.c (show_mips_command, set_mips_command)
5755 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
5756 add_show_prefix_cmd.
5757 * maint.c (maintenance_command, maintenance_info_command)
5758 (maintenance_check_command, maintenance_print_command)
5759 (maintenance_set_cmd, maintenance_show_cmd): Remove.
5760 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
5761 add_show_prefix_cmd.
5762 (show_per_command_cmd): Remove.
5763 * maint-test-settings.c (maintenance_set_test_settings_cmd):
5764 Remove.
5765 (maintenance_show_test_settings_cmd): Remove.
5766 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
5767 add_show_prefix_cmd.
5768 * maint-test-options.c (maintenance_test_options_command):
5769 Remove.
5770 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
5771 * macrocmd.c (macro_command): Remove
5772 (_initialize_macrocmd): Use add_basic_prefix_cmd.
5773 * language.c (set_check, show_check): Remove.
5774 (_initialize_language): Use add_basic_prefix_cmd,
5775 add_show_prefix_cmd.
5776 * infcmd.c (unset_command): Remove.
5777 (_initialize_infcmd): Use add_basic_prefix_cmd.
5778 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
5779 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
5780 add_show_prefix_cmd.
5781 * go32-nat.c (go32_info_dos_command): Remove.
5782 (_initialize_go32_nat): Use add_basic_prefix_cmd.
5783 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
5784 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
5785 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
5786 (_initialize_frame): Use add_basic_prefix_cmd,
5787 add_show_prefix_cmd.
5788 * dcache.c (set_dcache_command, show_dcache_command): Remove.
5789 (_initialize_dcache): Use add_basic_prefix_cmd,
5790 add_show_prefix_cmd.
5791 * cp-support.c (maint_cplus_command): Remove.
5792 (_initialize_cp_support): Use add_basic_prefix_cmd.
5793 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5794 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5795 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
5796 add_basic_prefix_cmd, add_show_prefix_cmd.
5797 * breakpoint.c (save_command): Remove.
5798 (_initialize_breakpoint): Use add_basic_prefix_cmd.
5799 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
5800 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
5801 add_show_prefix_cmd.
5802 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
5803 (set_ada_command, show_ada_command): Remove.
5804 (_initialize_ada_language): Use add_basic_prefix_cmd,
5805 add_show_prefix_cmd.
5806 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
5807
5808 2020-04-16 Kamil Rytarowski <n54@gmx.com>
5809
5810 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
5811 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
5812
5813 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
5814
5815 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
5816 warning messages.
5817
5818 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
5819
5820 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
5821 import table is not at beginning of .idata section.
5822
5823 2020-04-16 Pedro Alves <palves@redhat.com>
5824
5825 * inferior.c (delete_inferior): Use delete operator directly
5826 instead of delete_program_space.
5827 * progspace.c (add_program_space): New, factored out from
5828 program_space::program_space.
5829 (remove_program_space): New, factored out from
5830 delete_program_space.
5831 (program_space::program_space): Remove intro comment. Rewrite.
5832 (program_space::~program_space): Remove intro comment. Call
5833 remove_program_space.
5834 (delete_program_space): Delete.
5835 * progspace.h (program_space::program_space): Make explicit. Move
5836 intro comment here, adjusted.
5837 (program_space::~program_space): Move intro comment here,
5838 adjusted.
5839 (delete_program_space): Remove.
5840
5841 2020-04-16 Tom Tromey <tromey@adacore.com>
5842
5843 * windows-nat.c (windows_nat::handle_access_violation): New
5844 function.
5845 * nat/windows-nat.h (handle_access_violation): Declare.
5846 * nat/windows-nat.c (handle_exception): Move Cygwin code to
5847 windows-nat.c. Call handle_access_violation.
5848
5849 2020-04-16 Tom de Vries <tdevries@suse.de>
5850
5851 PR symtab/25791
5852 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
5853 CUs without psymtab.
5854
5855 2020-04-16 Kevin Buettner <kevinb@redhat.com>
5856
5857 * python/python.c (do_start_initialization): Don't call
5858 PyEval_InitThreads for Python 3.9 and beyond.
5859
5860 2020-04-15 Kamil Rytarowski <n54@gmx.com>
5861
5862 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
5863 thread functions.
5864 (obsd_nat_target::wait): Likewise.
5865
5866 2020-04-15 Tom Tromey <tromey@adacore.com>
5867
5868 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
5869 (DEBUG_EXCEPT): Use debug_printf.
5870
5871 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
5872
5873 * completer.c (class completion_tracker::completion_hash_entry)
5874 <hash_name>: New member function.
5875 (completion_tracker::discard_completions): New callback to hash a
5876 completion_hash_entry, pass this to htab_create_alloc.
5877
5878 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
5879
5880 * windows-nat.c (windows_make_so): Warn rather than stopping with
5881 an error if realpath() fails.
5882
5883 2020-04-14 Kamil Rytarowski <n54@gmx.com>
5884
5885 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
5886 (nbsd_nat_target::info_proc): Add do_status.
5887
5888 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
5889 Tom de Vries <tdevries@suse.de>
5890
5891 PR symtab/25718
5892 * psympriv.h (struct partial_symtab::read_symtab)
5893 (struct partial_symtab::expand_psymtab)
5894 (struct partial_symtab::read_dependencies): Update comments.
5895 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
5896 read_symtab for includer.
5897 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
5898 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
5899 (struct dwarf2_include_psymtab::m_readin): Remove.
5900 (struct dwarf2_include_psymtab::includer): New member function.
5901 (dwarf2_psymtab::expand_psymtab): Assert !readin.
5902
5903 2020-04-14 Tom de Vries <tdevries@suse.de>
5904
5905 PR symtab/25720
5906 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
5907 with NULL symbol_matcher and lookup_name.
5908 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
5909 and lookup_name.
5910 * dwarf2/read.c (dw2_expand_symtabs_matching)
5911 (dw2_debug_names_expand_symtabs_matching): Same.
5912 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
5913 Make lookup_name a pointer. Update comment.
5914 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
5915 lookup_name being a pointer.
5916 * symfile.c (expand_symtabs_matching): Same.
5917 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
5918 * linespec.c (iterate_over_all_matching_symtabs): Same.
5919
5920 2020-04-13 Tom Tromey <tom@tromey.com>
5921
5922 * run-on-main-thread.c: Update include.
5923 * unittests/main-thread-selftests.c: Update include.
5924 * tui/tui-win.c: Update include.
5925 * tui/tui-io.c: Update include.
5926 * tui/tui-interp.c: Update include.
5927 * tui/tui-hooks.c: Update include.
5928 * top.h: Update include.
5929 * top.c: Update include.
5930 * ser-base.c: Update include.
5931 * remote.c: Update include.
5932 * remote-notif.c: Update include.
5933 * remote-fileio.c: Update include.
5934 * record-full.c: Update include.
5935 * record-btrace.c: Update include.
5936 * python/python.c: Update include.
5937 * posix-hdep.c: Update include.
5938 * mingw-hdep.c: Update include.
5939 * mi/mi-main.c: Update include.
5940 * mi/mi-interp.c: Update include.
5941 * main.c: Update include.
5942 * linux-nat.c: Update include.
5943 * interps.c: Update include.
5944 * infrun.c: Update include.
5945 * inf-loop.c: Update include.
5946 * event-top.c: Update include.
5947 * event-loop.c: Move to ../gdbsupport/.
5948 * event-loop.h: Move to ../gdbsupport/.
5949 * async-event.h: Update include.
5950 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
5951
5952 2020-04-13 Tom Tromey <tom@tromey.com>
5953
5954 * tui/tui-win.c: Include async-event.h.
5955 * remote.c: Include async-event.h.
5956 * remote-notif.c: Include async-event.h.
5957 * record-full.c: Include async-event.h.
5958 * record-btrace.c: Include async-event.h.
5959 * infrun.c: Include async-event.h.
5960 * event-top.c: Include async-event.h.
5961 * event-loop.h: Move some declarations to async-event.h.
5962 * event-loop.c: Don't include ser-event.h or top.h. Move some
5963 code to async-event.c.
5964 * async-event.h: New file.
5965 * async-event.c: New file.
5966 * Makefile.in (COMMON_SFILES): Add async-event.c.
5967 (HFILES_NO_SRCDIR): Add async-event.h.
5968
5969 2020-04-13 Tom Tromey <tom@tromey.com>
5970
5971 * utils.c (flush_streams): New function.
5972 * event-loop.c (gdb_wait_for_event): Call flush_streams.
5973
5974 2020-04-13 Tom Tromey <tom@tromey.com>
5975
5976 * event-loop.c (handle_file_event): Use warning, not
5977 printf_unfiltered.
5978
5979 2020-04-13 Tom Tromey <tom@tromey.com>
5980
5981 * event-loop.c: Include <chrono>.
5982
5983 2020-04-13 Tom Tromey <tom@tromey.com>
5984
5985 * gdb_select.h: Move to ../gdbsupport/.
5986 * event-loop.c: Update include path.
5987 * top.c: Update include path.
5988 * ser-base.c: Update include path.
5989 * ui-file.c: Update include path.
5990 * ser-tcp.c: Update include path.
5991 * guile/scm-ports.c: Update include path.
5992 * posix-hdep.c: Update include path.
5993 * ser-unix.c: Update include path.
5994 * gdb_usleep.c: Update include path.
5995 * mingw-hdep.c: Update include path.
5996 * inflow.c: Update include path.
5997 * infrun.c: Update include path.
5998 * event-top.c: Update include path.
5999
6000 2020-04-13 Tom Tromey <tom@tromey.com>
6001
6002 * configure: Rebuild.
6003 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
6004
6005 2020-04-13 Tom Tromey <tom@tromey.com>
6006
6007 * event-loop.h (start_event_loop): Don't declare.
6008 * event-loop.c (start_event_loop): Move...
6009 * main.c (start_event_loop): ...here. Now static.
6010
6011 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
6012
6013 * MAINTAINERS: Update my email address.
6014
6015 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6016
6017 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
6018 IP_ALL.
6019
6020 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6021
6022 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
6023 (nbsd_nat_target::info_proc): Add do_cmdline.
6024
6025 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6026
6027 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
6028 (nbsd_nat_target::info_proc): Add do_cwd.
6029
6030 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6031
6032 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
6033
6034 2020-04-11 Kamil Rytarowski <n54@gmx.com>
6035
6036 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
6037 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
6038 (nbsd_nat_target::info_proc): New functions.
6039 * nbsd-nat.c (kinfo_get_vmmap): New function.
6040 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
6041 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
6042 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
6043 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
6044 functions.
6045 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
6046 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6047 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6048 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
6049 (KINFO_VME_FLAG_GROWS_DOWN): New.
6050
6051 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
6052
6053 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
6054 bit shift.
6055
6056 2020-04-10 Tom Tromey <tromey@adacore.com>
6057
6058 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
6059
6060 2020-04-10 Tom Tromey <tromey@adacore.com>
6061
6062 * symtab.c (get_symbol_address, get_msymbol_address): Skip
6063 separate debug files.
6064
6065 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
6066
6067 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
6068 Move to...
6069 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
6070 ... here.
6071 * windows-nat.c (windows_nat_target::get_windows_debug_event):
6072 Check for STATUS_WX86_BREAKPOINT.
6073 (windows_nat_target::wait): Same.
6074
6075 2020-04-10 Tom de Vries <tdevries@suse.de>
6076
6077 PR cli/25808
6078 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
6079
6080 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6081
6082 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
6083 (Write After Approval): Remove Tom de Vries.
6084
6085 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
6086
6087 revert partially:
6088 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
6089
6090 * buildsym.c (record_line): Fix undefined behavior and preserve
6091 lines at eof.
6092
6093 2020-04-09 Kamil Rytarowski <n54@gmx.com>
6094
6095 * auxv.h (svr4_auxv_parse): New.
6096 * auxv.c (default_auxv_parse): Split into default_auxv_parse
6097 and generic_auxv_parse.
6098 (svr4_auxv_parse): Add.
6099 * obsd-tdep.c: Include "auxv.h".
6100 (obsd_auxv_parse): Remove.
6101 (obsd_init_abi): Remove comment.
6102 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
6103 from `obsd_auxv_parse' to `svr4_auxv_parse'.
6104 * nbsd-tdep.c: Include "auxv.h".
6105 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
6106
6107 2020-04-08 Tom Tromey <tromey@adacore.com>
6108
6109 * nat/windows-nat.h (last_wait_event): Don't declare.
6110 (wait_for_debug_event): Update comment.
6111 * nat/windows-nat.c (last_wait_event): Now static.
6112
6113 2020-04-08 Tom Tromey <tromey@adacore.com>
6114
6115 * windows-nat.c (wait_for_debug_event): Move to
6116 nat/windows-nat.c.
6117 * nat/windows-nat.h (wait_for_debug_event): Declare.
6118 * nat/windows-nat.c (wait_for_debug_event): Move from
6119 windows-nat.c. No longer static.
6120
6121 2020-04-08 Tom Tromey <tromey@adacore.com>
6122
6123 * windows-nat.c (get_windows_debug_event): Use
6124 fetch_pending_stop.
6125 * nat/windows-nat.h (fetch_pending_stop): Declare.
6126 * nat/windows-nat.c (fetch_pending_stop): New function.
6127
6128 2020-04-08 Tom Tromey <tromey@adacore.com>
6129
6130 * windows-nat.c (windows_continue): Use matching_pending_stop and
6131 continue_last_debug_event.
6132 * nat/windows-nat.h (matching_pending_stop)
6133 (continue_last_debug_event): Declare.
6134 * nat/windows-nat.c (DEBUG_EVENTS): New define.
6135 (matching_pending_stop, continue_last_debug_event): New
6136 functions.
6137
6138 2020-04-08 Tom Tromey <tromey@adacore.com>
6139
6140 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
6141 (handle_exception_result): Move to nat/windows-nat.h.
6142 (DEBUG_EXCEPTION_SIMPLE): Remove.
6143 (windows_nat::handle_ms_vc_exception): New function.
6144 (handle_exception): Move to nat/windows-nat.c.
6145 (get_windows_debug_event): Update.
6146 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
6147 nat/windows-nat.c.
6148 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
6149 (handle_exception_result): Move from windows-nat.c.
6150 (handle_exception): Declare.
6151 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
6152 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
6153 windows-nat.c.
6154
6155 2020-04-08 Tom Tromey <tromey@adacore.com>
6156
6157 * windows-nat.c (exception_count, event_count): Remove.
6158 (handle_exception, get_windows_debug_event)
6159 (do_initial_windows_stuff): Update.
6160
6161 2020-04-08 Tom Tromey <tromey@adacore.com>
6162
6163 * windows-nat.c (windows_nat::handle_load_dll)
6164 (windows_nat::handle_unload_dll): Rename. No longer static.
6165 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
6166 Declare.
6167
6168 2020-04-08 Tom Tromey <tromey@adacore.com>
6169
6170 * complaints.h (stop_whining): Declare at top-level.
6171 (complaint): Don't declare stop_whining.
6172
6173 2020-04-08 Tom Tromey <tromey@adacore.com>
6174
6175 * windows-nat.c (windows_nat::handle_output_debug_string):
6176 Rename. No longer static.
6177 * nat/windows-nat.h (handle_output_debug_string): Declare.
6178
6179 2020-04-08 Tom Tromey <tromey@adacore.com>
6180
6181 * windows-nat.c (current_process_handle, current_process_id)
6182 (main_thread_id, last_sig, current_event, last_wait_event)
6183 (current_windows_thread, desired_stop_thread_id, pending_stops)
6184 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
6185 (display_selectors, fake_create_process)
6186 (get_windows_debug_event): Update.
6187 * nat/windows-nat.h (current_process_handle, current_process_id)
6188 (main_thread_id, last_sig, current_event, last_wait_event)
6189 (current_windows_thread, desired_stop_thread_id, pending_stops)
6190 (struct pending_stop, siginfo_er): Move from windows-nat.c.
6191 * nat/windows-nat.c (current_process_handle, current_process_id)
6192 (main_thread_id, last_sig, current_event, last_wait_event)
6193 (current_windows_thread, desired_stop_thread_id, pending_stops)
6194 (siginfo_er): New globals. Move from windows-nat.c.
6195
6196 2020-04-08 Tom Tromey <tromey@adacore.com>
6197
6198 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
6199 (handle_load_dll): Update.
6200 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
6201
6202 2020-04-08 Tom Tromey <tromey@adacore.com>
6203
6204 * windows-nat.c (enum thread_disposition_type): Move to
6205 nat/windows-nat.h.
6206 (windows_nat::thread_rec): Rename from thread_rec. No longer
6207 static.
6208 (windows_add_thread, windows_nat_target::fetch_registers)
6209 (windows_nat_target::store_registers, handle_exception)
6210 (windows_nat_target::resume, get_windows_debug_event)
6211 (windows_nat_target::get_tib_address)
6212 (windows_nat_target::thread_name)
6213 (windows_nat_target::thread_alive): Update.
6214 * nat/windows-nat.h (enum thread_disposition_type): Move from
6215 windows-nat.c.
6216 (thread_rec): Declare.
6217
6218 2020-04-08 Tom Tromey <tromey@adacore.com>
6219
6220 * windows-nat.c: Add "using namespace".
6221 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
6222 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
6223
6224 2020-04-08 Tom Tromey <tromey@adacore.com>
6225
6226 * nat/windows-nat.h (struct windows_thread_info): Declare
6227 destructor.
6228 * nat/windows-nat.c (~windows_thread_info): New.
6229
6230 2020-04-08 Tom Tromey <tromey@adacore.com>
6231
6232 PR gdb/22992
6233 * windows-nat.c (current_event): Update comment.
6234 (last_wait_event, desired_stop_thread_id): New globals.
6235 (struct pending_stop): New.
6236 (pending_stops): New global.
6237 (windows_nat_target) <stopped_by_sw_breakpoint>
6238 <supports_stopped_by_sw_breakpoint>: New methods.
6239 (windows_fetch_one_register): Add assertions. Adjust PC.
6240 (windows_continue): Handle pending stops. Suspend other threads
6241 when stepping. Use last_wait_event
6242 (wait_for_debug_event): New function.
6243 (get_windows_debug_event): Use wait_for_debug_event. Handle
6244 pending stops. Queue spurious stops.
6245 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
6246 (windows_nat_target::kill): Use wait_for_debug_event.
6247 * nat/windows-nat.h (struct windows_thread_info)
6248 <stopped_at_software_breakpoint>: New field.
6249 * nat/windows-nat.c (windows_thread_info::resume): Clear
6250 stopped_at_software_breakpoint.
6251
6252 2020-04-08 Tom Tromey <tromey@adacore.com>
6253
6254 * windows-nat.c (enum thread_disposition_type): New.
6255 (thread_rec): Replace "get_context" parameter with "disposition";
6256 change type.
6257 (windows_add_thread, windows_nat_target::fetch_registers)
6258 (windows_nat_target::store_registers, handle_exception)
6259 (windows_nat_target::resume, get_windows_debug_event)
6260 (windows_nat_target::get_tib_address)
6261 (windows_nat_target::thread_name)
6262 (windows_nat_target::thread_alive): Update.
6263
6264 2020-04-08 Tom Tromey <tromey@adacore.com>
6265
6266 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
6267 (windows_continue): Use windows_continue::resume.
6268 * nat/windows-nat.h (struct windows_thread_info) <suspend,
6269 resume>: Declare new methods.
6270 * nat/windows-nat.c: New file.
6271 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
6272
6273 2020-04-08 Tom Tromey <tromey@adacore.com>
6274
6275 * windows-nat.c (windows_add_thread, windows_delete_thread)
6276 (windows_nat_target::fetch_registers)
6277 (windows_nat_target::store_registers, fake_create_process)
6278 (windows_nat_target::resume, windows_nat_target::resume)
6279 (get_windows_debug_event, windows_nat_target::wait)
6280 (windows_nat_target::pid_to_str)
6281 (windows_nat_target::get_tib_address)
6282 (windows_nat_target::get_ada_task_ptid)
6283 (windows_nat_target::thread_name)
6284 (windows_nat_target::thread_alive): Use lwp, not tid.
6285
6286 2020-04-08 Tom Tromey <tromey@adacore.com>
6287
6288 * windows-nat.c (handle_exception)
6289 (windows_nat_target::thread_name): Update.
6290 * nat/windows-nat.h (windows_thread_info): Remove destructor.
6291 <name>: Now unique_xmalloc_ptr.
6292
6293 2020-04-08 Tom Tromey <tromey@adacore.com>
6294
6295 * windows-nat.c (thread_rec)
6296 (windows_nat_target::fetch_registers): Update.
6297 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
6298 Update comment.
6299 <debug_registers_changed, reload_context>: Now bool.
6300
6301 2020-04-08 Tom Tromey <tromey@adacore.com>
6302
6303 * windows-nat.c (windows_add_thread): Use new.
6304 (windows_init_thread_list, windows_delete_thread): Use delete.
6305 (get_windows_debug_event): Update.
6306 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
6307 destructor, and initializers.
6308
6309 2020-04-08 Tom Tromey <tromey@adacore.com>
6310
6311 * windows-nat.c (struct windows_thread_info): Remove.
6312 * nat/windows-nat.h: New file.
6313
6314 2020-04-08 Tom Tromey <tromey@adacore.com>
6315
6316 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
6317 (thread_rec, windows_add_thread, windows_delete_thread)
6318 (windows_continue): Update.
6319
6320 2020-04-08 Tom Tromey <tromey@adacore.com>
6321
6322 * windows-nat.c (struct windows_thread_info): Remove typedef.
6323 (thread_head): Remove.
6324 (thread_list): New global.
6325 (thread_rec, windows_add_thread, windows_init_thread_list)
6326 (windows_delete_thread, windows_continue): Update.
6327
6328 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
6329
6330 * windows-tdep.h (windows_init_abi): Add comment.
6331 (cygwin_init_abi): New declaration.
6332 * windows-tdep.c: Split signal enumeration in two, one for
6333 Windows and one for Cygwin.
6334 (windows_gdb_signal_to_target): Only deal with signal of the
6335 Windows OS ABI.
6336 (cygwin_gdb_signal_to_target): New function.
6337 (windows_init_abi): Rename to windows_init_abi_common, don't set
6338 gdb_signal_to_target gdbarch method. Add new new function with
6339 this name.
6340 (cygwin_init_abi): New function.
6341 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
6342 comment. Don't call windows_init_abi.
6343 (amd64_windows_init_abi): Add comment, call windows_init_abi.
6344 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
6345 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
6346 i386_windows_init_abi_common, don't call windows_init_abi. Add
6347 a new function of this name.
6348 (i386_cygwin_init_abi): New function.
6349 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
6350 OS ABI Cygwin.
6351
6352 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
6353
6354 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
6355 parameter.c.
6356 (dwarf2_read_gdb_index): Update.
6357
6358 2020-04-07 Kamil Rytarowski <n54@gmx.com>
6359
6360 * nbsd-tdep.c: Include "objfiles.h".
6361 (nbsd_skip_solib_resolver): New.
6362 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
6363
6364 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6365
6366 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
6367 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
6368 with DW_LLE_base_addressx are being emitted in DWARFv5.
6369 Add the newly added kind DW_LOC_OFFSET_PAIR also.
6370 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
6371 unsigned integer.
6372
6373 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6374
6375 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
6376 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
6377 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
6378 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
6379 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
6380 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
6381 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
6382
6383
6384 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6385
6386 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
6387 (read_loclist_index): New function definition.
6388 (lookup_loclist_base): New function definition.
6389 (read_loclist_header): New function definition.
6390 (dwarf2_cu): Add loclist_base and loclist_header field.
6391 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
6392 (read_full_die_1): Read the value of DW_AT_loclists_base.
6393 (read_attribute_reprocess): Handle DW_FORM_loclistx.
6394 (read_attribute_value): Handle DW_FORM_loclistx.
6395 (skip_one_die): Handle DW_FORM_loclistx.
6396 (loclist_header): New structure declaration.
6397 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
6398
6399 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6400
6401 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
6402 constructor. Remove `addr` parameter from other constructor and
6403 add `per_cu` parameter.
6404 * dwarf2/read.c (create_partial_symtab): Update.
6405
6406 2020-04-07 Tom de Vries <tdevries@suse.de>
6407
6408 PR symtab/25796
6409 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
6410 (partial_die_info::fixup): Inherit has_const_value.
6411
6412 2020-04-07 Tom de Vries <tdevries@suse.de>
6413
6414 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
6415 symbols without address.
6416
6417 2020-04-06 Kamil Rytarowski <n54@gmx.com>
6418
6419 * nbsd-nat.h (struct thread_info): Add forward declaration.
6420 (nbsd_nat_target::thread_alive): Add.
6421 (nbsd_nat_target::thread_name): Likewise.
6422 (nbsd_nat_target::update_thread_list): Likewise.
6423 (update_thread_list::post_attach): Likewise.
6424 (post_attach::pid_to_str): Likewise.
6425 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
6426 (nbsd_thread_lister): Add.
6427 (nbsd_nat_target::thread_alive): Likewise.
6428 (nbsd_nat_target::thread_name): Likewise.
6429 (nbsd_add_threads): Likewise.
6430 (update_thread_list::post_attach): Likewise.
6431 (nbsd_nat_target::update_thread_list): Likewise.
6432 (post_attach::pid_to_str): Likewise.
6433
6434 2020-04-06 Tom Tromey <tromey@adacore.com>
6435
6436 * ada-valprint.c (print_variant_part): Extract the variant field.
6437 (print_field_values): Use the field as the outer value when
6438 recursing.
6439
6440 2020-04-06 Tom Tromey <tromey@adacore.com>
6441
6442 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
6443 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
6444 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
6445 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
6446 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
6447
6448 2020-04-06 Tom Tromey <tromey@adacore.com>
6449
6450 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
6451 TYPE_CODE_ERROR.
6452
6453 2020-04-06 Kamil Rytarowski <n54@gmx.com>
6454
6455 * nbsd-tdep.c: Include "gdbarch.h".
6456 Define enum with NetBSD signal numbers.
6457 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
6458 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
6459 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6460 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
6461 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
6462 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
6463 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
6464 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
6465 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
6466 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
6467 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
6468 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
6469
6470 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
6471
6472 PR gdb/25325
6473 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
6474
6475 2020-04-03 Tom Tromey <tromey@adacore.com>
6476
6477 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
6478 Read constant block.
6479
6480 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
6481
6482 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
6483 (gdb_bfd_get_full_section_contents): New declaration.
6484 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
6485 * windows-tdep.c (is_linked_with_cygwin_dll): Use
6486 gdb_bfd_get_full_section_contents.
6487
6488 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
6489
6490 * exec.c (build_section_table): Replace internal_error with
6491 gdb_assert.
6492 (section_table_xfer_memory_partial): Likewise.
6493 * mdebugread.c (parse_partial_symbols): Likewise.
6494 * psymtab.c (lookup_partial_symbol): Likewise.
6495 * utils.c (wrap_here): Likewise.
6496
6497 2020-04-02 Tom Tromey <tromey@adacore.com>
6498
6499 * f-lang.c (build_fortran_types): Use arch_type to initialize
6500 builtin_complex_s32 in the TYPE_CODE_ERROR case.
6501
6502 2020-04-02 Tom Tromey <tromey@adacore.com>
6503
6504 * dwarf2/read.c (partial_die_info::read): Do not create a vector
6505 of attributes.
6506
6507 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
6508 Bernd Edlinger <bernd.edlinger@hotmail.de>
6509 Tom Tromey <tromey@adacore.com>
6510
6511 * buildsym.c (buildsym_compunit::record_line): Remove
6512 deduplication code.
6513
6514 2020-04-02 Tom de Vries <tdevries@suse.de>
6515
6516 PR ada/24671
6517 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
6518
6519 2020-04-02 Tom de Vries <tdevries@suse.de>
6520
6521 * dwarf2/read.c (dwarf2_gdb_index_functions,
6522 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
6523 NULL.
6524 * psymtab.c (psym_lookup_global_symbol_language): New function.
6525 (psym_functions): Init psym_lookup_global_symbol_language with
6526 psym_lookup_global_symbol_language.
6527 * symfile-debug.c (debug_sym_quick_functions): Init
6528 lookup_global_symbol_language with NULL.
6529 * symfile.c (set_initial_language): Remove fixme comment.
6530 * symfile.h (struct quick_symbol_functions): Add
6531 lookup_global_symbol_language.
6532 * symtab.c (find_quick_global_symbol_language): New function.
6533 (find_main_name): Use find_quick_global_symbol_language.
6534
6535 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6536
6537 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
6538
6539 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
6540
6541 * buildsym.c (record_line): Fix undefined behavior and preserve
6542 lines at eof.
6543
6544 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
6545
6546 * buildsym.c (record_line): Fix the resizing condition.
6547
6548 2020-04-01 Tom Tromey <tom@tromey.com>
6549
6550 * value.h (value_literal_complex): Add comment.
6551 * valops.c (value_literal_complex): Refer to value.h.
6552
6553 2020-04-01 Tom Tromey <tom@tromey.com>
6554
6555 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
6556 (scalar_type): New rule, from typebase.
6557 (typebase): Use scalar_type. Recognize complex types.
6558 (field_name): Handle FLOAT_KEYWORD.
6559 (ident_tokens): Add _Complex and __complex__.
6560
6561 2020-04-01 Tom Tromey <tom@tromey.com>
6562
6563 PR exp/25299:
6564 * valarith.c (promotion_type, complex_binop): New functions.
6565 (scalar_binop): Handle complex numbers. Use promotion_type.
6566 (value_pos, value_neg, value_complement): Handle complex numbers.
6567
6568 2020-04-01 Tom Tromey <tom@tromey.com>
6569
6570 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
6571 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
6572 (parse_number): Handle complex numbers.
6573
6574 2020-04-01 Tom Tromey <tom@tromey.com>
6575
6576 * c-valprint.c (c_decorations): Change complex suffix to "i".
6577
6578 2020-04-01 Tom Tromey <tom@tromey.com>
6579
6580 * valprint.c (generic_value_print_complex): Use accessors.
6581 * value.h (value_real_part, value_imaginary_part): Declare.
6582 * valops.c (value_real_part, value_imaginary_part): New
6583 functions.
6584 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
6585
6586 2020-04-01 Tom Tromey <tom@tromey.com>
6587
6588 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
6589 (read_range_type): Update.
6590 * mdebugread.c (basic_type): Update.
6591 * go-lang.c (build_go_types): Use init_complex_type.
6592 * gdbtypes.h (struct main_type) <complex_type>: New member.
6593 (init_complex_type): Update.
6594 (arch_complex_type): Don't declare.
6595 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
6596 Make name if none given. Use alloc_type_copy. Look for cached
6597 complex type.
6598 (arch_complex_type): Remove.
6599 (gdbtypes_post_init): Use init_complex_type.
6600 * f-lang.c (build_fortran_types): Use init_complex_type.
6601 * dwarf2/read.c (read_base_type): Update.
6602 * d-lang.c (build_d_types): Use init_complex_type.
6603 * ctfread.c (read_base_type): Update.
6604
6605 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6606
6607 * infrun.c (stop_all_threads): Update assertion, plus when
6608 stopping threads, take into account that we might be trying
6609 to stop an all-stop target.
6610 (stop_waiting): Call 'stop_all_threads' if there exists a
6611 non-stop target.
6612
6613 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6614
6615 * target.h (exists_non_stop_target): New function declaration.
6616 * target.c (exists_non_stop_target): New function.
6617
6618 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
6619
6620 PR gdb/24789
6621 * eval.c (is_integral_or_integral_reference): New function.
6622 (evaluate_subexp_standard): Allow integer references in
6623 pointer arithmetic.
6624
6625 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6626
6627 * remote.c (remote_target::remote_parse_stop_reply): Remove the
6628 check for no ptid in the stop reply when the target is non-stop.
6629
6630 2020-04-01 Tom Tromey <tromey@adacore.com>
6631
6632 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
6633 "name" parameter to rvalue reference. Initialize m_name_holder.
6634 <lookup_name_info>: New overloads.
6635 <name>: Return gdb::string_view.
6636 <c_str>: New method.
6637 <make_ignore_params>: Update.
6638 <search_name_hash>: Update.
6639 <language_lookup_name>: Return const char *.
6640 <m_name>: Change type.
6641 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
6642 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
6643 (lookup_name_info::match_any): Update.
6644 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
6645 Update.
6646 * minsyms.c (linkage_name_str): Update.
6647 * language.c (default_symbol_name_matcher): Update.
6648 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
6649 Update.
6650 * ada-lang.c (ada_fold_name): Change parameter to string_view.
6651 (ada_lookup_name_info::ada_lookup_name_info): Update.
6652 (literal_symbol_name_matcher): Update.
6653
6654 2020-04-01 Tom Tromey <tromey@adacore.com>
6655
6656 * psymtab.c (psymtab_search_name): Remove function.
6657 (psym_lookup_symbol): Create search name and lookup name here.
6658 (lookup_partial_symbol): Remove "name" parameter; add
6659 lookup_name.
6660 (psym_expand_symtabs_for_function): Update.
6661
6662 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
6663
6664 PR tui/25597:
6665 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
6666
6667 2020-03-31 Tom Tromey <tromey@adacore.com>
6668
6669 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
6670 memcpy.
6671
6672 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
6673
6674 * features/riscv/32bit-csr.xml: Regenerated.
6675 * features/riscv/64bit-csr.xml: Regenerated.
6676
6677 2020-03-30 Tom Tromey <tromey@adacore.com>
6678
6679 * ada-valprint.c (print_variant_part): Update.
6680 * ada-lang.h (ada_which_variant_applies): Update.
6681 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
6682 outer_valaddr parameters; replace with "outer" value parameter.
6683 (to_fixed_variant_branch_type): Update.
6684
6685 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6686
6687 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
6688 <list>. Remove inclusion of observable.h.
6689 (PPC_DEBUG_CURRENT_VERSION): Move up define.
6690 (struct arch_lwp_info): New struct.
6691 (class ppc_linux_dreg_interface): New class.
6692 (struct ppc_linux_process_info): New struct.
6693 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
6694 <low_new_clone, low_forget_process, low_prepare_to_resume>
6695 <copy_thread_dreg_state, mark_thread_stale>
6696 <mark_debug_registers_changed, register_hw_breakpoint>
6697 <clear_hw_breakpoint, register_wp, clear_wp>
6698 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
6699 <num_memory_accesses, get_trigger_type>
6700 <create_watchpoint_request, hwdebug_point_cmp>
6701 <init_arch_lwp_info, get_arch_lwp_info>
6702 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
6703 methods.
6704 <struct ptid_hash>: New inner struct.
6705 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
6706 members.
6707 (saved_dabr_value, hwdebug_info, max_slots_number)
6708 (struct hw_break_tuple, struct thread_points, ppc_threads)
6709 (have_ptrace_hwdebug_interface)
6710 (hwdebug_find_thread_points_by_tid)
6711 (hwdebug_insert_point, hwdebug_remove_point): Remove.
6712 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
6713 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
6714 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
6715 use m_dreg_interface.
6716 (hwdebug_point_cmp): Change to...
6717 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
6718 reference arguments instead of pointers.
6719 (ppc_linux_nat_target::ranged_break_num_registers): Use
6720 m_dreg_interface.
6721 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
6722 m_dreg_interface. Call register_hw_breakpoint.
6723 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
6724 m_dreg_interface. Call clear_hw_breakpoint.
6725 (get_trigger_type): Change to...
6726 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
6727 comment.
6728 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
6729 use m_dreg_interface. Call register_hw_breakpoint.
6730 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
6731 use m_dreg_interface. Call clear_hw_breakpoint.
6732 (can_use_watchpoint_cond_accel): Change to...
6733 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
6734 method. Update comment, use m_dreg_interface and
6735 m_process_info.
6736 (calculate_dvc): Change to...
6737 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
6738 m_dreg_interface.
6739 (num_memory_accesses): Change to...
6740 (ppc_linux_nat_target::num_memory_accesses): ...this method.
6741 (check_condition): Change to...
6742 (ppc_linux_nat_target::check_condition): ...this method.
6743 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
6744 comment, use m_dreg_interface.
6745 (create_watchpoint_request): Change to...
6746 (ppc_linux_nat_target::create_watchpoint_request): ...this
6747 method. Use m_dreg_interface.
6748 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
6749 m_dreg_interface. Call register_hw_breakpoint or register_wp.
6750 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
6751 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
6752 (ppc_linux_nat_target::low_forget_process)
6753 (ppc_linux_nat_target::low_new_fork)
6754 (ppc_linux_nat_target::low_new_clone)
6755 (ppc_linux_nat_target::low_delete_thread)
6756 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
6757 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
6758 only call mark_thread_stale.
6759 (ppc_linux_thread_exit): Remove.
6760 (ppc_linux_nat_target::stopped_data_address): Change to...
6761 (ppc_linux_nat_target::low_stopped_data_address): This. Add
6762 comment, use m_dreg_interface and m_thread_hw_breakpoints.
6763 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
6764 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
6765 comment. Call low_stopped_data_address.
6766 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
6767 m_dreg_interface.
6768 (ppc_linux_nat_target::masked_watch_num_registers): Use
6769 m_dreg_interface.
6770 (ppc_linux_nat_target::copy_thread_dreg_state)
6771 (ppc_linux_nat_target::mark_thread_stale)
6772 (ppc_linux_nat_target::mark_debug_registers_changed)
6773 (ppc_linux_nat_target::register_hw_breakpoint)
6774 (ppc_linux_nat_target::clear_hw_breakpoint)
6775 (ppc_linux_nat_target::register_wp)
6776 (ppc_linux_nat_target::clear_wp)
6777 (ppc_linux_nat_target::init_arch_lwp_info)
6778 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
6779 (_initialize_ppc_linux_nat): Remove observer callback.
6780
6781 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6782
6783 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
6784 (ppc_linux_nat_target::auxv_parse)
6785 (ppc_linux_nat_target::read_description)
6786 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
6787 Move up.
6788
6789 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6790
6791 * linux-nat.h (low_new_clone): New method.
6792 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
6793
6794 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6795
6796 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
6797 (dbx_expand_psymtab): ... this.
6798 (start_psymtab): Update.
6799 * mdebugread.c (psymtab_to_symtab_1): Rename to...
6800 (mdebug_expand_psymtab): ... this.
6801 (parse_partial_symbols): Update.
6802 (new_psymtab): Update.
6803 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
6804 (xcoff_expand_psymtab): ... this.
6805 (xcoff_start_psymtab): Update.
6806
6807 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6808
6809 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
6810 <expand_dependencies>: ... this.
6811 * psymtab.c (partial_symtab::read_dependencies): Rename to...
6812 (partial_symtab::expand_dependencies): ... this.
6813 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
6814 Update.
6815 (dwarf2_psymtab::expand_psymtab): Update.
6816 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
6817 * mdebugread.c (psymtab_to_symtab_1): Update.
6818 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6819
6820 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6821
6822 * psympriv.h (discard_psymtab): Remove.
6823 * dbxread.c (dbx_end_psymtab): Update.
6824 * xcoffread.c (xcoff_end_psymtab): Update.
6825
6826 2020-03-28 Tom Tromey <tom@tromey.com>
6827
6828 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
6829 comment.
6830
6831 2020-03-28 Tom Tromey <tom@tromey.com>
6832
6833 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
6834
6835 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
6836
6837 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
6838
6839 2020-03-26 John Baldwin <jhb@FreeBSD.org>
6840
6841 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
6842
6843 2020-03-26 Tom Tromey <tom@tromey.com>
6844
6845 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
6846 (mark_common_block_symbol_computed, read_tag_string_type)
6847 (attr_to_dynamic_prop, read_subrange_type): Update.
6848 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
6849 to be methods on struct attribute.
6850 (skip_one_die, process_imported_unit_die, read_namespace_alias)
6851 (read_call_site_scope, partial_die_info::read)
6852 (partial_die_info::read, lookup_die_type, follow_die_ref):
6853 Update.
6854 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
6855 from dwarf2_get_ref_die_offset.
6856 (attribute::constant_value): New method, from
6857 dwarf2_get_attr_constant_value.
6858 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
6859 Declare method.
6860 <constant_value>: New method.
6861
6862 2020-03-26 Tom Tromey <tom@tromey.com>
6863
6864 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
6865 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
6866 (dwarf_type_encoding_name): Move to stringify.c.
6867 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
6868 * dwarf2/stringify.c: New file.
6869 * dwarf2/stringify.h: New file.
6870
6871 2020-03-26 Tom Tromey <tom@tromey.com>
6872
6873 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
6874 Rewrite.
6875
6876 2020-03-26 Tom Tromey <tom@tromey.com>
6877
6878 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
6879 methods.
6880 * dwarf2/read.c (lookup_addr_base): Move to die.h.
6881 (lookup_ranges_base): Likewise.
6882 (read_cutu_die_from_dwo, read_full_die_1): Update.
6883
6884 2020-03-26 Tom Tromey <tom@tromey.com>
6885
6886 * dwarf2/read.c (read_import_statement, read_file_scope)
6887 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
6888 (read_lexical_block_scope, read_call_site_scope)
6889 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
6890 (handle_struct_member_die, process_structure_scope)
6891 (update_enumeration_type_from_children)
6892 (process_enumeration_scope, read_array_type, read_common_block)
6893 (read_namespace, read_module, read_subroutine_type): Update.
6894 (sibling_die): Remove.
6895
6896 2020-03-26 Tom Tromey <tom@tromey.com>
6897
6898 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
6899 (build_type_psymtabs_reader, read_structure_type)
6900 (read_enumeration_type, read_full_die_1): Update.
6901 (dwarf2_attr_no_follow): Move to die.h.
6902 * dwarf2/die.h (struct die_info) <attr>: New method.
6903
6904 2020-03-26 Tom Tromey <tom@tromey.com>
6905
6906 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
6907 <base_address>: Now an optional.
6908 (dwarf2_find_base_address, dwarf2_rnglists_process)
6909 (dwarf2_ranges_process, fill_in_loclist_baton)
6910 (dwarf2_symbol_mark_computed): Update.
6911
6912 2020-03-26 Tom Tromey <tom@tromey.com>
6913
6914 * dwarf2/read.c (struct die_info): Move to die.h.
6915 * dwarf2/die.h: New file.
6916
6917 2020-03-26 Tom Tromey <tom@tromey.com>
6918
6919 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
6920 * dwarf2/read.c
6921 (dwarf2_statement_list_fits_in_line_number_section_complaint):
6922 Move to line-header.c.
6923 (read_checked_initial_length_and_offset, read_formatted_entries):
6924 Likewise.
6925 (dwarf_decode_line_header): Split into two.
6926 * dwarf2/line-header.c
6927 (dwarf2_statement_list_fits_in_line_number_section_complaint):
6928 Move from read.c.
6929 (read_checked_initial_length_and_offset, read_formatted_entries):
6930 Likewise.
6931 (dwarf_decode_line_header): New function, split from read.c.
6932
6933 2020-03-26 Tom Tromey <tom@tromey.com>
6934
6935 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
6936 Declare method.
6937 * dwarf2/read.c (read_attribute_value): Update.
6938 (dwarf2_per_objfile::read_line_string): Rename from
6939 read_indirect_line_string.
6940 (read_formatted_entries): Update.
6941
6942 2020-03-26 Tom Tromey <tom@tromey.com>
6943
6944 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
6945 variable.
6946
6947 2020-03-26 Tom Tromey <tom@tromey.com>
6948
6949 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
6950 const.
6951 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
6952 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
6953 parameter const.
6954
6955 2020-03-26 Tom Tromey <tom@tromey.com>
6956
6957 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
6958 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
6959 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
6960 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
6961
6962 2020-03-26 Tom Tromey <tom@tromey.com>
6963
6964 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
6965 file_names_size, file_full_name, file_file_name>: Use const.
6966 <file_name_at, file_names>: Add const overload.
6967 * dwarf2/line-header.c (line_header::file_file_name)
6968 (line_header::file_full_name): Update.
6969
6970 2020-03-26 Tom Tromey <tom@tromey.com>
6971
6972 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
6973 (macro_start_file, consume_improper_spaces)
6974 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
6975 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
6976 (dwarf_decode_macros): Move to macro.c.
6977 * dwarf2/macro.c: New file.
6978 * dwarf2/macro.h: New file.
6979 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
6980
6981 2020-03-26 Tom Tromey <tom@tromey.com>
6982
6983 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
6984 method.
6985 * dwarf2/section.c: New method. From
6986 read_indirect_string_at_offset_from.
6987 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
6988 (read_indirect_string_at_offset_from): Move to section.c.
6989 (read_indirect_string_at_offset): Rewrite.
6990 (read_indirect_line_string_at_offset): Remove.
6991 (read_indirect_string, read_indirect_line_string)
6992 (dwarf_decode_macro_bytes): Update.
6993
6994 2020-03-26 Tom Tromey <tom@tromey.com>
6995
6996 * dwarf2/section.h (struct dwarf2_section_info)
6997 <overload_complaint>: Declare.
6998 (dwarf2_section_buffer_overflow_complaint): Don't declare.
6999 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
7000 Rename from dwarf2_section_buffer_overflow_complaint.
7001 * dwarf2/read.c (skip_one_die, partial_die_info::read)
7002 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
7003
7004 2020-03-26 Tom Tromey <tom@tromey.com>
7005
7006 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
7007 Declare.
7008 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
7009 Move from read.c.
7010 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
7011 to section.c.
7012
7013 2020-03-26 Tom Tromey <tom@tromey.com>
7014
7015 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
7016
7017 2020-03-26 Tom Tromey <tom@tromey.com>
7018
7019 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
7020 "builder".
7021 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
7022 parameter.
7023 (dwarf_decode_macros): Update.
7024
7025 2020-03-26 Tom Tromey <tom@tromey.com>
7026
7027 * dwarf2/read.c (read_attribute_value): Update.
7028 (read_indirect_string_from_dwz): Move to dwz.c; change into
7029 method.
7030 (dwarf_decode_macro_bytes): Update.
7031 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
7032 * dwarf2/dwz.c: New file.
7033 * Makefile.in (COMMON_SFILES): Add dwz.c.
7034
7035 2020-03-26 Tom Tromey <tom@tromey.com>
7036
7037 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
7038 * dwarf2/read.c: Add include.
7039 * dwarf2/index-write.c: Add include.
7040 * dwarf2/index-cache.c: Add include.
7041 * dwarf2/dwz.h: New file.
7042
7043 2020-03-25 Tom Tromey <tom@tromey.com>
7044
7045 * compile/compile-object-load.c (get_out_value_type): Mention
7046 correct symbol name in error message.
7047
7048 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
7049
7050 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
7051
7052 2020-03-25 Tom de Vries <tdevries@suse.de>
7053
7054 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
7055 * symmisc.c (dump_symtab_1): Print user and includes fields.
7056 (maintenance_info_symtabs): Same.
7057
7058 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
7059
7060 PR gdb/25534
7061 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
7062 (riscv_regcache_cooked_write): New function.
7063 (riscv_push_dummy_call): Use new function.
7064 (riscv_return_value): Likewise.
7065
7066 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
7067
7068 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
7069 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
7070 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
7071 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
7072 * infrun.c (follow_fork): Likewise.
7073 (follow_fork_inferior): Likewise.
7074 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
7075 * linux-nat.h (class linux_nat_target): Likewise.
7076 * remote.c (class remote_target) <follow_fork>: Likewise.
7077 (remote_target::follow_fork): Likewise.
7078 * target-delegates.c: Re-generate.
7079 * target.c (default_follow_fork): Likewise.
7080 (target_follow_fork): Likewise.
7081 * target.h (struct target_ops) <follow_fork>: Likewise.
7082 (target_follow_fork): Likewise.
7083
7084 2020-03-24 Tom de Vries <tdevries@suse.de>
7085
7086 * psymtab.c (maintenance_info_psymtabs): Print user field.
7087
7088 2020-03-20 Tom Tromey <tromey@adacore.com>
7089
7090 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
7091 const.
7092 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
7093 const.
7094
7095 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
7096
7097 * ptrace.m4: Don't check for ptrace declaration.
7098 * config.in: Re-generate.
7099 * configure: Re-generate.
7100 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
7101 not defined.
7102
7103 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7104
7105 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
7106 `PTRACE_TYPE_RET'.
7107 * i386-bsd-nat.c (gdb_ptrace): Likewise.
7108 * sparc-nat.c (gdb_ptrace): Likewise.
7109 * x86-bsd-nat.c (gdb_ptrace): Likewise.
7110
7111 2020-03-20 Tom Tromey <tromey@adacore.com>
7112
7113 * c-exp.y (lex_one_token): Fix assert.
7114
7115 2020-03-20 Tom Tromey <tromey@adacore.com>
7116
7117 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
7118 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
7119 strncpy call.
7120
7121 2020-03-20 Tom Tromey <tromey@adacore.com>
7122
7123 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
7124
7125 2020-03-20 Tom Tromey <tromey@adacore.com>
7126
7127 * ada-valprint.c (print_variant_part): Remove parameters; switch
7128 to value-based API.
7129 (print_field_values): Likewise.
7130 (ada_val_print_struct_union): Likewise.
7131 (ada_value_print_1): Update.
7132
7133 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7134
7135 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
7136 nbsd_nat_target instead of inf_ptrace_target.
7137 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7138 nbsd_nat_target.
7139
7140 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7141
7142 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
7143 it to the ptrace call.
7144 * (store_registers): Likewise.
7145
7146 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7147
7148 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
7149 it to the ptrace call.
7150 * (store_registers): Likewise.
7151
7152 2020-03-19 Luis Machado <luis.machado@linaro.org>
7153
7154 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
7155 valid, fetch vg value from ptrace.
7156
7157 2020-03-19 Kamil Rytarowski <n54@gmx.com>
7158 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
7159 * inf-ptrace.c: Likewise.
7160 * (gdb_ptrace): Add.
7161 * (inf_ptrace_target::resume): Update.
7162 * (inf_ptrace_target::xfer_partial): Likewise.
7163 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
7164 * (inf_ptrace_peek_poke): Update.
7165
7166 2020-03-19 Kamil Rytarowski <n54@gmx.com>
7167
7168 * x86-bsd-nat.c (gdb_ptrace): New.
7169 * (x86bsd_dr_set): Add new argument `ptid'.
7170 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
7171 x86bsd_dr_set_addr): Update.
7172
7173 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7174
7175 * remote.c (remote_target::process_stop_reply): Handle events for
7176 all threads differently.
7177
7178 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7179
7180 * completer.c (completion_tracker::remove_completion): Define new
7181 function.
7182 * completer.h (completion_tracker::remove_completion): Declare new
7183 function.
7184 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
7185 when adding a C++ function symbol.
7186
7187 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7188
7189 * completer.c (completion_tracker::completion_hash_entry): Define
7190 new class.
7191 (advance_to_filename_complete_word_point): Call
7192 recompute_lowest_common_denominator.
7193 (completion_tracker::completion_tracker): Call discard_completions
7194 to setup the hash table.
7195 (completion_tracker::discard_completions): Allow for being called
7196 from the constructor, pass new equal function, and element deleter
7197 when constructing the hash table. Initialise new class member
7198 variables.
7199 (completion_tracker::maybe_add_completion): Remove use of
7200 m_entries_vec, and store more information into m_entries_hash.
7201 (completion_tracker::recompute_lcd_visitor): New function, most
7202 content taken from...
7203 (completion_tracker::recompute_lowest_common_denominator):
7204 ...here, this now just visits each item in the hash calling the
7205 above visitor.
7206 (completion_tracker::build_completion_result): Remove use of
7207 m_entries_vec, call recompute_lowest_common_denominator.
7208 * completer.h (completion_tracker::have_completions): Remove use
7209 of m_entries_vec.
7210 (completion_tracker::completion_hash_entry): Declare new class.
7211 (completion_tracker::recompute_lowest_common_denominator): Change
7212 function signature.
7213 (completion_tracker::recompute_lcd_visitor): Declare new function.
7214 (completion_tracker::m_entries_vec): Delete.
7215 (completion_tracker::m_entries_hash): Initialize to NULL.
7216 (completion_tracker::m_lowest_common_denominator_valid): New
7217 member variable.
7218 (completion_tracker::m_lowest_common_denominator_max_length): New
7219 member variable.
7220
7221 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7222
7223 * regformats/regdef.h: Put reg in gdb namespace.
7224
7225 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7226
7227 * i386-bsd-nat.c (gdb_ptrace): New.
7228 * (i386bsd_fetch_inferior_registers,
7229 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
7230 * (i386bsd_fetch_inferior_registers,
7231 i386bsd_store_inferior_registers) Use gdb_ptrace.
7232
7233 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7234
7235 * amd64-bsd-nat.c (gdb_ptrace): New.
7236 * (amd64bsd_fetch_inferior_registers,
7237 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
7238 * (amd64bsd_fetch_inferior_registers,
7239 amd64bsd_store_inferior_registers) Use gdb_ptrace.
7240
7241 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7242
7243 * user-regs.c (user_reg::read): Rename to...
7244 (user_reg::xread): ...this.
7245 * (append_user_reg): Rename argument `read' to `xread'.
7246 * (user_reg_add_builtin): Likewise.
7247 * (user_reg_add): Likewise.
7248 * (value_of_user_reg): Likewise.
7249
7250 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7251
7252 * sparc-nat.c (gdb_ptrace): New.
7253 * sparc-nat.c (sparc_fetch_inferior_registers)
7254 (sparc_store_inferior_registers) Remove obsolete comment.
7255 * sparc-nat.c (sparc_fetch_inferior_registers)
7256 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
7257 * sparc-nat.c (sparc_fetch_inferior_registers)
7258 (sparc_store_inferior_registers) Use gdb_ptrace.
7259
7260 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7261
7262 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
7263 it to the ptrace call.
7264 * sh-nbsd-nat.c (store_registers): Likewise.
7265
7266 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7267
7268 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
7269 nbsd_nat_target instead of inf_ptrace_target.
7270 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7271 nbsd_nat_target.
7272
7273 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7274
7275 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
7276
7277 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7278
7279 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
7280 <sys/sysctl.h>.
7281 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
7282
7283 2020-03-17 Tom de Vries <tdevries@suse.de>
7284
7285 PR gdb/23710
7286 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
7287 fields.
7288 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
7289 fields.
7290 (process_imported_unit_die): Skip import of c++ CUs.
7291
7292 2020-03-16 Tom Tromey <tom@tromey.com>
7293
7294 * p-valprint.c (pascal_object_print_value): Initialize
7295 base_value.
7296
7297 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
7298 Shahab Vahedi <shahab@synopsys.com>
7299
7300 * Makefile.in: Add arch/arc.o
7301 * configure.tgt: Likewise.
7302 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
7303 (_initialize_arc_tdep): Don't initialize old target descriptions.
7304 (arc_read_description): New function to cache target descriptions.
7305 * arc-tdep.h (arc_read_description): Add proto type.
7306 * arch/arc.c: New file.
7307 * arch/arc.h: Likewise.
7308 * features/Makefile: Replace old target descriptions with new.
7309 * features/arc-arcompact.c: Remove.
7310 * features/arc-arcompact.xml: Likewise.
7311 * features/arc-v2.c: Likewise
7312 * features/arc-v2.xml: Likewise
7313 * features/arc/aux-arcompact.xml: New file.
7314 * features/arc/aux-v2.xml: Likewise.
7315 * features/arc/core-arcompact.xml: Likewise.
7316 * features/arc/core-v2.xml: Likewise.
7317 * features/arc/aux-arcompact.c: Generate.
7318 * features/arc/aux-v2.c: Likewise.
7319 * features/arc/core-arcompact.c: Likewise.
7320 * features/arc/core-v2.c: Likewise.
7321 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
7322
7323 2020-03-16 Tom Tromey <tromey@adacore.com>
7324
7325 PR gdb/25663:
7326 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
7327 putting value into bcache.
7328
7329 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7330
7331 PR gdb/21500
7332 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
7333 to...
7334 (amd64_windows_init_abi_common): ... this. Don't set size of
7335 long type.
7336 (amd64_windows_init_abi): New function.
7337 (amd64_cygwin_init_abi): New function.
7338 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
7339 the Cygwin OS ABI.
7340 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
7341 comment.
7342
7343 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7344
7345 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
7346 * windows-tdep.c (CYGWIN_DLL_NAME): New.
7347 (pe_import_directory_entry): New struct type.
7348 (is_linked_with_cygwin_dll): New function.
7349 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
7350 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
7351 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
7352
7353 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7354
7355 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
7356 i386_cygwin_core_osabi_sniffer.
7357
7358 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7359
7360 * i386-cygwin-tdep.c: Rename to...
7361 * i386-windows-tdep.c: ... this.
7362 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
7363 i386-windows-tdep.c.
7364 * configure.tgt: Likewise.
7365
7366 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7367
7368 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
7369 * osabi.c (gdb_osabi_names): Add "Windows".
7370 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
7371 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
7372 (i386_cygwin_core_osabi_sniffer): New function, extracted from
7373 i386_cygwin_osabi_sniffer.
7374 (_initialize_i386_cygwin_tdep): Register OS ABI
7375 GDB_OSABI_WINDOWS for i386.
7376 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
7377 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
7378 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
7379 for x86-64.
7380 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
7381 when the target matches '*-*-mingw*'.
7382
7383 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7384
7385 * defs.h (enum gdb_osabi): Move to...
7386 * osabi.h (enum gdb_osabi): ... here.
7387 * gdbarch.sh: Include osabi.h in gdbarch.h.
7388 * gdbarch.h: Re-generate.
7389
7390 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7391
7392 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
7393 function.
7394 (_initialize_amd64_windows_tdep): Register osabi sniffer.
7395
7396 2020-03-14 Tom Tromey <tom@tromey.com>
7397
7398 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
7399 for C++.
7400 (c_type_print_modifier): Likewise. Add "language" parameter.
7401 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
7402 (c_type_print_base_1): Update.
7403 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
7404 constants.
7405 * type-stack.c (type_stack::insert): Handle tp_atomic and
7406 tp_restrict.
7407 (type_stack::follow_type_instance_flags): Likewise.
7408 (type_stack::follow_types): Likewise. Merge type-following code.
7409 * c-exp.y (RESTRICT, ATOMIC): New tokens.
7410 (space_identifier, cv_with_space_id)
7411 (const_or_volatile_or_space_identifier_noopt)
7412 (const_or_volatile_or_space_identifier): Remove.
7413 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
7414 rules.
7415 (ptr_operator, typebase): Update.
7416 (enum token_flag) <FLAG_C>: New constant.
7417 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
7418 "_Atomic".
7419 (lex_one_token): Handle FLAG_C.
7420
7421 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7422
7423 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
7424 it to the ptrace call.
7425 * m68k-bsd-nat.c (store_registers): Likewise.
7426
7427 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7428
7429 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
7430 gdb_byte *.
7431 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
7432 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
7433 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
7434
7435 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7436
7437 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
7438 nbsd_nat_target instead of inf_ptrace_target.
7439 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
7440 nbsd_nat_target.
7441
7442 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7443
7444 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
7445 register_t.
7446
7447 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7448
7449 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
7450 it to the ptrace call.
7451 * alpha-bsd-nat.c (store_registers): Likewise.
7452
7453 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7454
7455 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
7456 includes.
7457 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
7458 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
7459 fill_fpregset): Likewise.
7460
7461 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7462
7463 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
7464 nbsd_nat_target instead of inf_ptrace_target.
7465 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
7466 nbsd_nat_target.
7467
7468 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7469
7470 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
7471 register_t.
7472
7473 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7474
7475 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
7476 it to the ptrace call.
7477 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
7478 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
7479 * arm-nbsd-nat.c (store_register): Likewise.
7480 * arm-nbsd-nat.c (store_regs): Likewise.
7481 * arm-nbsd-nat.c (store_fp_register): Likewise.
7482 * arm-nbsd-nat.c (store_fp_regs): Likewise.
7483
7484 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7485
7486 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
7487 nbsd_nat_target instead of inf_ptrace_target.
7488 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7489 nbsd_nat_target.
7490
7491 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7492
7493 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
7494 it to the ptrace call.
7495 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
7496
7497 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7498
7499 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
7500 it to the ptrace call.
7501 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
7502
7503 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7504
7505 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
7506 gdb_byte *.
7507 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
7508
7509 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7510
7511 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
7512 instead of inf_ptrace_target.
7513 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
7514 nbsd_nat_target.
7515
7516 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7517
7518 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
7519 register_t.
7520
7521 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7522
7523 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
7524 register_t.
7525
7526 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7527
7528 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
7529 register_t.
7530
7531 2020-03-13 Tom Tromey <tom@tromey.com>
7532
7533 * value.h (val_print): Don't declare.
7534 * valprint.h (val_print_array_elements)
7535 (val_print_scalar_formatted, generic_val_print): Don't declare.
7536 * valprint.c (generic_val_print_array): Take a struct value.
7537 (generic_val_print_ptr, generic_val_print_memberptr)
7538 (generic_val_print_bool, generic_val_print_int)
7539 (generic_val_print_char, generic_val_print_complex)
7540 (generic_val_print): Remove.
7541 (generic_value_print): Update.
7542 (do_val_print): Remove unused parameters. Don't call
7543 la_val_print.
7544 (val_print): Remove.
7545 (common_val_print): Update. Don't call value_check_printable.
7546 (val_print_scalar_formatted, val_print_array_elements): Remove.
7547 * rust-lang.c (rust_val_print): Remove.
7548 (rust_language_defn): Update.
7549 * p-valprint.c (pascal_val_print): Remove.
7550 (pascal_value_print_inner): Update.
7551 (pascal_object_print_val_fields, pascal_object_print_val):
7552 Remove.
7553 (pascal_object_print_static_field): Update.
7554 * p-lang.h (pascal_val_print): Don't declare.
7555 * p-lang.c (pascal_language_defn): Update.
7556 * opencl-lang.c (opencl_language_defn): Update.
7557 * objc-lang.c (objc_language_defn): Update.
7558 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
7559 * m2-lang.h (m2_val_print): Don't declare.
7560 * m2-lang.c (m2_language_defn): Update.
7561 * language.h (struct language_defn) <la_val_print>: Remove.
7562 * language.c (unk_lang_value_print_inner): Rename. Change
7563 argument types.
7564 (unknown_language_defn, auto_language_defn): Update.
7565 * go-valprint.c (go_val_print): Remove.
7566 * go-lang.h (go_val_print): Don't declare.
7567 * go-lang.c (go_language_defn): Update.
7568 * f-valprint.c (f_val_print): Remove.
7569 * f-lang.h (f_value_print): Don't declare.
7570 * f-lang.c (f_language_defn): Update.
7571 * d-valprint.c (d_val_print): Remove.
7572 * d-lang.h (d_value_print): Don't declare.
7573 * d-lang.c (d_language_defn): Update.
7574 * cp-valprint.c (cp_print_value_fields)
7575 (cp_print_value_fields_rtti, cp_print_value): Remove.
7576 (cp_print_static_field): Update.
7577 * c-valprint.c (c_val_print_array, c_val_print_ptr)
7578 (c_val_print_struct, c_val_print_union, c_val_print_int)
7579 (c_val_print_memberptr, c_val_print): Remove.
7580 * c-lang.h (c_val_print_array, cp_print_value_fields)
7581 (cp_print_value_fields_rtti): Don't declare.
7582 * c-lang.c (c_language_defn, cplus_language_defn)
7583 (asm_language_defn, minimal_language_defn): Update.
7584 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
7585 (ada_val_print_enum): Take a struct value.
7586 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
7587 (ada_val_print): Remove.
7588 (ada_value_print_1): Update.
7589 (printable_val_type): Remove.
7590 * ada-lang.h (ada_val_print): Don't declare.
7591 * ada-lang.c (ada_language_defn): Update.
7592
7593 2020-03-13 Tom Tromey <tom@tromey.com>
7594
7595 * valprint.c (do_val_print): Update.
7596 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
7597 a struct value.
7598 (value_to_value_object_no_release): Declare.
7599 * python/py-value.c (value_to_value_object_no_release): New
7600 function.
7601 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
7602 struct value.
7603 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
7604 function.
7605 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
7606 a struct value.
7607 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
7608 Declare.
7609 (gdbscm_apply_val_pretty_printer): Take a struct value.
7610 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
7611 value.
7612 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
7613 value.
7614 * extension-priv.h (struct extension_language_ops)
7615 <apply_val_pretty_printer>: Take a struct value.
7616 * cp-valprint.c (cp_print_value): Create a struct value.
7617 (cp_print_value): Update.
7618
7619 2020-03-13 Tom Tromey <tom@tromey.com>
7620
7621 * ada-valprint.c (print_field_values): Call common_val_print.
7622
7623 2020-03-13 Tom Tromey <tom@tromey.com>
7624
7625 * ada-valprint.c (val_print_packed_array_elements): Remove
7626 bitoffset and val parameters. Call common_val_print.
7627 (ada_val_print_string): Remove offset, address, and original_value
7628 parameters.
7629 (ada_val_print_array): Update.
7630 (ada_value_print_array): New function.
7631 (ada_value_print_1): Call it.
7632
7633 2020-03-13 Tom Tromey <tom@tromey.com>
7634
7635 * ada-valprint.c (ada_value_print): Use common_val_print.
7636
7637 2020-03-13 Tom Tromey <tom@tromey.com>
7638
7639 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
7640
7641 2020-03-13 Tom Tromey <tom@tromey.com>
7642
7643 * ada-valprint.c (ada_value_print_num): New function.
7644 (ada_value_print_1): Use it.
7645
7646 2020-03-13 Tom Tromey <tom@tromey.com>
7647
7648 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
7649
7650 2020-03-13 Tom Tromey <tom@tromey.com>
7651
7652 * ada-valprint.c (ada_value_print_ptr): New function.
7653 (ada_value_print_1): Use it.
7654
7655 2020-03-13 Tom Tromey <tom@tromey.com>
7656
7657 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
7658 call common_val_print.
7659 (ada_val_print_1): Update.
7660 (ada_value_print_1): New function.
7661 (ada_value_print_inner): Rewrite.
7662
7663 2020-03-13 Tom Tromey <tom@tromey.com>
7664
7665 * cp-valprint.c (cp_print_value_fields): Update.
7666 (cp_print_value): New function.
7667
7668 2020-03-13 Tom Tromey <tom@tromey.com>
7669
7670 * m2-valprint.c (m2_value_print_inner): Use
7671 cp_print_value_fields.
7672 * cp-valprint.c (cp_print_value_fields): New function.
7673 * c-valprint.c (c_value_print_struct): New function.
7674 (c_value_print_inner): Use c_value_print_struct.
7675 * c-lang.h (cp_print_value_fields): Declare.
7676
7677 2020-03-13 Tom Tromey <tom@tromey.com>
7678
7679 * c-valprint.c (c_value_print_array): New function.
7680 (c_value_print_inner): Use it.
7681
7682 2020-03-13 Tom Tromey <tom@tromey.com>
7683
7684 * c-valprint.c (c_value_print_memberptr): New function.
7685 (c_value_print_inner): Use it.
7686
7687 2020-03-13 Tom Tromey <tom@tromey.com>
7688
7689 * c-valprint.c (c_value_print_int): New function.
7690 (c_value_print_inner): Use it.
7691
7692 2020-03-13 Tom Tromey <tom@tromey.com>
7693
7694 * c-valprint.c (c_value_print_ptr): New function.
7695 (c_value_print_inner): Use it.
7696
7697 2020-03-13 Tom Tromey <tom@tromey.com>
7698
7699 * c-valprint.c (c_value_print_inner): Rewrite.
7700
7701 2020-03-13 Tom Tromey <tom@tromey.com>
7702
7703 * valprint.c (generic_value_print_complex): New function.
7704 (generic_value_print): Use it.
7705
7706 2020-03-13 Tom Tromey <tom@tromey.com>
7707
7708 * valprint.c (generic_val_print_float): Don't call
7709 val_print_scalar_formatted.
7710 (generic_val_print, generic_value_print): Update.
7711
7712 2020-03-13 Tom Tromey <tom@tromey.com>
7713
7714 * valprint.c (generic_value_print_char): New function
7715 (generic_value_print): Use it.
7716
7717 2020-03-13 Tom Tromey <tom@tromey.com>
7718
7719 * valprint.c (generic_value_print_int): New function.
7720 (generic_value_print): Use it.
7721
7722 2020-03-13 Tom Tromey <tom@tromey.com>
7723
7724 * valprint.c (generic_value_print_bool): New function.
7725 (generic_value_print): Use it.
7726
7727 2020-03-13 Tom Tromey <tom@tromey.com>
7728
7729 * valprint.c (generic_val_print_func): Simplify.
7730 (generic_val_print, generic_value_print): Update.
7731
7732 2020-03-13 Tom Tromey <tom@tromey.com>
7733
7734 * valprint.c (generic_val_print_flags): Remove.
7735 (generic_val_print, generic_value_print): Update.
7736 (val_print_type_code_flags): Add original_value parameter.
7737
7738 2020-03-13 Tom Tromey <tom@tromey.com>
7739
7740 * valprint.c (generic_val_print): Update.
7741 (generic_value_print): Update.
7742 * valprint.c (generic_val_print_enum): Don't call
7743 val_print_scalar_formatted.
7744
7745 2020-03-13 Tom Tromey <tom@tromey.com>
7746
7747 * valprint.c (generic_value_print): Call generic_value_print_ptr.
7748 * valprint.c (generic_value_print_ptr): New function.
7749
7750 2020-03-13 Tom Tromey <tom@tromey.com>
7751
7752 * valprint.c (generic_value_print): Rewrite.
7753
7754 2020-03-13 Tom Tromey <tom@tromey.com>
7755
7756 * p-valprint.c (pascal_object_print_value_fields)
7757 (pascal_object_print_value): New functions.
7758
7759 2020-03-13 Tom Tromey <tom@tromey.com>
7760
7761 * p-valprint.c (pascal_value_print_inner): Rewrite.
7762
7763 2020-03-13 Tom Tromey <tom@tromey.com>
7764
7765 * f-valprint.c (f_value_print_innner): Rewrite.
7766
7767 2020-03-13 Tom Tromey <tom@tromey.com>
7768
7769 * m2-valprint.c (m2_print_unbounded_array): New overload.
7770 (m2_print_unbounded_array): Update.
7771 (m2_print_array_contents): Take a struct value.
7772 (m2_value_print_inner): Rewrite.
7773
7774 2020-03-13 Tom Tromey <tom@tromey.com>
7775
7776 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
7777 (d_value_print_inner): New function.
7778 * d-lang.h (d_value_print_inner): Declare.
7779 * d-lang.c (d_language_defn): Use d_value_print_inner.
7780
7781 2020-03-13 Tom Tromey <tom@tromey.com>
7782
7783 * go-valprint.c (go_value_print_inner): New function.
7784 * go-lang.h (go_value_print_inner): Declare.
7785 * go-lang.c (go_language_defn): Use go_value_print_inner.
7786
7787 2020-03-13 Tom Tromey <tom@tromey.com>
7788
7789 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
7790 API.
7791 (rust_val_print): Rewrite.
7792 (rust_value_print_inner): New function, from rust_val_print.
7793 (rust_language_defn): Use rust_value_print_inner.
7794
7795 2020-03-13 Tom Tromey <tom@tromey.com>
7796
7797 * ada-valprint.c (ada_value_print_inner): New function.
7798 * ada-lang.h (ada_value_print_inner): Declare.
7799 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
7800
7801 2020-03-13 Tom Tromey <tom@tromey.com>
7802
7803 * f-valprint.c (f_value_print_innner): New function.
7804 * f-lang.h (f_value_print_innner): Declare.
7805 * f-lang.c (f_language_defn): Use f_value_print_innner.
7806
7807 2020-03-13 Tom Tromey <tom@tromey.com>
7808
7809 * p-valprint.c (pascal_value_print_inner): New function.
7810 * p-lang.h (pascal_value_print_inner): Declare.
7811 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
7812
7813 2020-03-13 Tom Tromey <tom@tromey.com>
7814
7815 * m2-valprint.c (m2_value_print_inner): New function.
7816 * m2-lang.h (m2_value_print_inner): Declare.
7817 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
7818
7819 2020-03-13 Tom Tromey <tom@tromey.com>
7820
7821 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
7822 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
7823 * c-valprint.c (c_value_print_inner): New function.
7824 * c-lang.h (c_value_print_inner): Declare.
7825 * c-lang.c (c_language_defn, cplus_language_defn)
7826 (asm_language_defn, minimal_language_defn): Use
7827 c_value_print_inner.
7828
7829 2020-03-13 Tom Tromey <tom@tromey.com>
7830
7831 * p-valprint.c (pascal_object_print_value_fields): Now static.
7832 * p-lang.h (pascal_object_print_value_fields): Don't declare.
7833
7834 2020-03-13 Tom Tromey <tom@tromey.com>
7835
7836 * c-valprint.c (c_val_print_array): Simplify.
7837
7838 2020-03-13 Tom Tromey <tom@tromey.com>
7839
7840 * valprint.c (value_print_array_elements): New function.
7841 * valprint.h (value_print_array_elements): Declare.
7842
7843 2020-03-13 Tom Tromey <tom@tromey.com>
7844
7845 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
7846 * mips-tdep.c (mips_print_register): Use
7847 value_print_scalar_formatted.
7848
7849 2020-03-13 Tom Tromey <tom@tromey.com>
7850
7851 * valprint.h (value_print_scalar_formatted): Declare.
7852 * valprint.c (value_print_scalar_formatted): New function.
7853
7854 2020-03-13 Tom Tromey <tom@tromey.com>
7855
7856 * valprint.h (generic_value_print): Declare.
7857 * valprint.c (generic_value_print): New function.
7858
7859 2020-03-13 Tom Tromey <tom@tromey.com>
7860
7861 * valprint.c (do_val_print): Call la_value_print_inner, if
7862 available.
7863 * rust-lang.c (rust_language_defn): Update.
7864 * p-lang.c (pascal_language_defn): Update.
7865 * opencl-lang.c (opencl_language_defn): Update.
7866 * objc-lang.c (objc_language_defn): Update.
7867 * m2-lang.c (m2_language_defn): Update.
7868 * language.h (struct language_defn) <la_value_print_inner>: New
7869 member.
7870 * language.c (unknown_language_defn, auto_language_defn): Update.
7871 * go-lang.c (go_language_defn): Update.
7872 * f-lang.c (f_language_defn): Update.
7873 * d-lang.c (d_language_defn): Update.
7874 * c-lang.c (c_language_defn, cplus_language_defn)
7875 (asm_language_defn, minimal_language_defn): Update.
7876 * ada-lang.c (ada_language_defn): Update.
7877
7878 2020-03-13 Tom Tromey <tom@tromey.com>
7879
7880 * c-valprint.c (c_value_print): Use common_val_print.
7881
7882 2020-03-13 Tom Tromey <tom@tromey.com>
7883
7884 * cp-valprint.c (cp_print_static_field): Use common_val_print.
7885
7886 2020-03-13 Tom Tromey <tom@tromey.com>
7887
7888 * f-valprint.c (f77_print_array_1, f_val_print): Use
7889 common_val_print.
7890
7891 2020-03-13 Tom Tromey <tom@tromey.com>
7892
7893 * riscv-tdep.c (riscv_print_one_register_info): Use
7894 common_val_print.
7895
7896 2020-03-13 Tom Tromey <tom@tromey.com>
7897
7898 * mi/mi-main.c (output_register): Use common_val_print.
7899
7900 2020-03-13 Tom Tromey <tom@tromey.com>
7901
7902 * infcmd.c (default_print_one_register_info): Use
7903 common_val_print.
7904
7905 2020-03-13 Tom Tromey <tom@tromey.com>
7906
7907 * valprint.h (common_val_print_checked): Declare.
7908 * valprint.c (common_val_print_checked): New function.
7909 * stack.c (print_frame_arg): Use common_val_print_checked.
7910
7911 2020-03-13 Tom Tromey <tom@tromey.com>
7912
7913 * valprint.c (do_val_print): New function, from val_print.
7914 (val_print): Use do_val_print.
7915 (common_val_print): Use do_val_print.
7916
7917 2020-03-13 Tom Tromey <tom@tromey.com>
7918
7919 * valprint.c (value_print): Use scoped_value_mark.
7920
7921 2020-03-13 Tom de Vries <tdevries@suse.de>
7922
7923 PR symtab/25646
7924 * psymtab.c (partial_symtab::partial_symtab): Don't set
7925 globals_offset and statics_offset. Push element onto
7926 current_global_psymbols and current_static_psymbols stacks.
7927 (concat): New function.
7928 (end_psymtab_common): Set globals_offset and statics_offset. Pop
7929 element from current_global_psymbols and current_static_psymbols
7930 stacks. Concat popped elements to global_psymbols and
7931 static_symbols.
7932 (add_psymbol_to_list): Use current_global_psymbols and
7933 current_static_psymbols stacks.
7934 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
7935 current_static_psymbols fields.
7936
7937 2020-03-12 Christian Biesinger <cbiesinger@google.com>
7938
7939 * corelow.c (sniff_core_bfd): Remove.
7940 (class core_target) <m_core_vec>: Remove.
7941 (core_target::core_target): Update.
7942 (core_file_fns): Remove.
7943 (deprecated_add_core_fns): Remove.
7944 (default_core_sniffer): Remove.
7945 (sniff_core_bfd): Remove.
7946 (default_check_format): Remove.
7947 (gdb_check_format): Remove.
7948 (core_target_open): Update.
7949 (core_target::get_core_register_section): Update.
7950 (get_core_registers_cb): Update.
7951 (core_target::fetch_registers): Update.
7952 * gdbcore.h (struct core_fns): Remove.
7953 (deprecated_add_core_fns): Remove.
7954 (default_core_sniffer): Remove.
7955 (default_check_format): Remove.
7956
7957 2020-03-12 Tom Tromey <tom@tromey.com>
7958
7959 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
7960 CORE_ADDR.
7961 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
7962
7963 2020-03-12 Tom Tromey <tom@tromey.com>
7964
7965 * remote.c (remote_target::download_tracepoint)
7966 (remote_target::enable_tracepoint)
7967 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
7968 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
7969 sprintf_vma.
7970
7971 2020-03-12 Tom Tromey <tom@tromey.com>
7972
7973 * symfile-mem.c: Update CORE_ADDR size assert.
7974
7975 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7976
7977 * selftest.m4: Move to gdbsupport/.
7978 * acinclude.m4: Update path to selftest.m4.
7979
7980 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7981
7982 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
7983 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
7984 gdbarch-selfselftests.c and selftest-arch.c.
7985 (SUBDIR_UNITTESTS_OBS): Rename to...
7986 (SELFTESTS_OBS): ... this.
7987 (COMMON_SFILES): Remove disasm-selftests.c and
7988 gdbarch-selftests.c.
7989 * configure.ac: Don't add selftest-arch.{c,o} to
7990 CONFIG_{SRCS,OBS}.
7991 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
7992 preprocessor conditions.
7993
7994 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7995
7996 * configure.ac: Don't source bfd/development.sh.
7997 * selftest.m4: Modify comment.
7998 * configure: Re-generate.
7999
8000 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8001
8002 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
8003 not "true" or "false".
8004 * configure: Re-generate.
8005
8006 2020-03-12 Christian Biesinger <cbiesinger@google.com>
8007
8008 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
8009 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
8010 renamed to arm_nbsd_supply_gregset.
8011 (fetch_register): Update to call arm_nbsd_supply_gregset.
8012 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
8013 (arm_netbsd_nat_target::fetch_registers): Update.
8014 (fetch_elfcore_registers): Removed.
8015 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
8016 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
8017 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
8018 not require NetBSD system headers.
8019 (arm_nbsd_regset): New struct.
8020 (arm_nbsd_iterate_over_regset_sections): New function.
8021 (arm_netbsd_init_abi_common): Updated to call
8022 set_gdbarch_iterate_over_regset_sections.
8023 * arm-nbsd-tdep.h: New file.
8024
8025 2020-03-11 Kevin Buettner <kevinb@redhat.com>
8026
8027 * symtab.c (find_pc_sect_line): Add check which prevents infinite
8028 recursion.
8029
8030 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
8031
8032 * configure: Re-generate.
8033
8034 2020-03-11 Tom Tromey <tromey@adacore.com>
8035
8036 * ada-typeprint.c (print_choices): Fix comment.
8037
8038 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
8039
8040 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
8041 previous item in the list, when the list has no items.
8042
8043 2020-03-11 Tom de Vries <tdevries@suse.de>
8044
8045 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
8046 PROP_LOCLIST handling code.
8047
8048 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
8049
8050 * buildsym-legacy.c (record_line): Pass extra parameter to
8051 record_line.
8052 * buildsym.c (buildsym_compunit::record_line): Take an extra
8053 parameter, reduce duplication in the line table, and record the
8054 is_stmt flag in the line table.
8055 * buildsym.h (buildsym_compunit::record_line): Add extra
8056 parameter.
8057 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
8058 non-statement lines.
8059 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
8060 this to the symtab builder.
8061 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
8062 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
8063 through to dwarf_record_line_1.
8064 * infrun.c (process_event_stop_test): When stepping, don't stop at
8065 a non-statement instruction, and only refresh the step info when
8066 we land in the middle of a line's range. Also add an extra
8067 comment.
8068 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
8069 field.
8070 * record-btrace.c (btrace_find_line_range): Only record lines
8071 marked as is-statement.
8072 * stack.c (frame_show_address): Show the frame address if we are
8073 in a non-statement sal.
8074 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
8075 (maintenance_print_one_line_table): Print a header for the is_stmt
8076 column, and include is_stmt information in the output.
8077 * symtab.c (find_pc_sect_line): Find lines marked as statements in
8078 preference to non-statements.
8079 (find_pcs_for_symtab_line): Prefer is-statement entries.
8080 (find_line_common): Likewise.
8081 * symtab.h (struct linetable_entry): Add is_stmt field.
8082 (struct symtab_and_line): Likewise.
8083 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
8084 arranging the line table.
8085
8086 2020-03-07 Tom de Vries <tdevries@suse.de>
8087
8088 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
8089 DIE.
8090
8091 2020-03-07 Tom Tromey <tom@tromey.com>
8092
8093 * valops.c (value_literal_complex): Remove obsolete comment.
8094 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
8095 comment.
8096
8097 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8098
8099 * infrun.h: Forward-declare thread_info.
8100 (set_step_info): Add thread_info parameter, add doc.
8101 * infrun.c (set_step_info): Add thread_info parameter, move doc
8102 to header.
8103 * infrun.c (process_event_stop_test): Pass thread to
8104 set_step_info call.
8105 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
8106 set_step_info.
8107 (prepare_one_step): Add thread_info parameter, pass it to
8108 set_step_frame and prepare_one_step (recursive) call.
8109 (step_1): Pass thread to prepare_one_step call.
8110 (step_command_fsm::should_stop): Pass thread to
8111 prepare_one_step.
8112 (until_next_fsm): Pass thread to set_step_frame call.
8113 (finish_command): Pass thread to set_step_info call.
8114
8115 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
8116
8117 * windows-tdep.c (windows_solib_create_inferior_hook):
8118 Check if inferior is running.
8119
8120 2020-03-06 Tom de Vries <tdevries@suse.de>
8121
8122 * NEWS: Fix "the the".
8123 * ctfread.c: Same.
8124
8125 2020-03-06 Tom de Vries <tdevries@suse.de>
8126
8127 * psymtab.c (psymtab_to_symtab): Don't print "done.".
8128
8129 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8130
8131 * .dir-locals.el: Add a comment referencing the other copies of
8132 this file.
8133
8134 2020-03-05 John Baldwin <jhb@FreeBSD.org>
8135
8136 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
8137 psargs.
8138
8139 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
8140
8141 * .gitattributes: New file.
8142
8143 2020-03-04 Tom Tromey <tom@tromey.com>
8144
8145 * symmisc.c (print_symbol_bcache_statistics)
8146 (print_objfile_statistics): Update.
8147 * symfile.c (allocate_symtab): Use intern.
8148 * psymtab.c (partial_symtab::partial_symtab): Use intern.
8149 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
8150 macro_cache>: Remove.
8151 <string_cache>: New member.
8152 (struct objfile) <intern>: New methods.
8153 * elfread.c (elf_symtab_read): Use intern.
8154 * dwarf2/read.c (fixup_go_packaging): Intern package name.
8155 (dwarf2_compute_name, dwarf2_physname)
8156 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
8157 names.
8158 (guess_partial_die_structure_name): Update.
8159 (partial_die_info::fixup): Intern name.
8160 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
8161 name.
8162 (dwarf2_name): Intern name. Update.
8163 * buildsym.c (buildsym_compunit::get_macro_table): Use
8164 string_cache.
8165
8166 2020-03-04 Tom Tromey <tom@tromey.com>
8167
8168 * jit.c (bfd_open_from_target_memory): Make "target" const.
8169 * corefile.c (gnutarget): Now const.
8170 * gdbcore.h (gnutarget): Now const.
8171
8172 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
8173
8174 * NEWS: Mention support for WOW64 processes.
8175 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
8176 (amd64_windows_segment_register_p): Remove static.
8177 (_initialize_amd64_windows_nat): Update.
8178 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
8179 * i386-windows-nat.c (context_offset): Update.
8180 (i386_mappings): Rename and remove static.
8181 (i386_windows_segment_register_p): Remove static.
8182 (_initialize_i386_windows_nat): Update.
8183 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
8184 (STATUS_WX86_SINGLE_STEP): New macro.
8185 (EnumProcessModulesEx): New macro.
8186 (Wow64SuspendThread): New macro.
8187 (Wow64GetThreadContext): New macro.
8188 (Wow64SetThreadContext): New macro.
8189 (Wow64GetThreadSelectorEntry): New macro.
8190 (windows_set_context_register_offsets): Add static.
8191 (windows_set_segment_register_p): Likewise.
8192 (windows_add_thread): Adapt for WOW64 processes.
8193 (windows_fetch_one_register): Likewise.
8194 (windows_nat_target::fetch_registers): Likewise.
8195 (windows_store_one_register): Likewise.
8196 (display_selector): Likewise.
8197 (display_selectors): Likewise.
8198 (handle_exception): Likewise.
8199 (windows_continue): Likewise.
8200 (windows_nat_target::resume): Likewise.
8201 (windows_add_all_dlls): Likewise.
8202 (do_initial_windows_stuff): Likewise.
8203 (windows_nat_target::attach): Likewise.
8204 (windows_get_exec_module_filename): Likewise.
8205 (windows_nat_target::create_inferior): Likewise.
8206 (windows_xfer_siginfo): Likewise.
8207 (_initialize_loadable): Initialize Wow64SuspendThread,
8208 Wow64GetThreadContext, Wow64SetThreadContext,
8209 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
8210 * windows-nat.h (windows_set_context_register_offsets):
8211 Remove declaration.
8212 (windows_set_segment_register_p): Likewise.
8213 (i386_windows_segment_register_p): Add declaration.
8214 (amd64_windows_segment_register_p): Likewise.
8215
8216 2020-03-04 Luis Machado <luis.machado@linaro.org>
8217
8218 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
8219 in "info registers" for AArch64/ARM.
8220
8221 The change caused "info registers" to not print GPR's.
8222
8223 gdb/ChangeLog:
8224
8225 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
8226
8227 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
8228 when reg->group is empty and reggroup is not.
8229
8230 2020-03-03 Tom Tromey <tromey@adacore.com>
8231
8232 * dwarf2/frame.c (struct dwarf2_frame_cache)
8233 <checked_tailcall_bottom, entry_cfa_sp_offset,
8234 entry_cfa_sp_offset_p>: Remove members.
8235 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
8236 (dwarf2_frame_prev_register): Don't call
8237 dwarf2_tailcall_sniffer_first.
8238 (dwarf2_append_unwinders): Don't append tailcall unwinder.
8239 * frame-unwind.c (add_unwinder): New fuction.
8240 (frame_unwind_init): Use it. Add tailcall unwinder.
8241
8242 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
8243 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8244
8245 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
8246 value should be printed as true.
8247
8248 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
8249
8250 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
8251 (windows_init_abi): Set and use windows_so_ops.
8252
8253 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
8254
8255 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
8256 when verifying if dealing with a convenience variable.
8257
8258 2020-03-03 Luis Machado <luis.machado@linaro.org>
8259
8260 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
8261
8262 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8263
8264 * infrun.c (gdbarch_supports_displaced_stepping): New.
8265 (use_displaced_stepping): Break up conditions in smaller pieces.
8266 Use gdbarch_supports_displaced_stepping.
8267 (displaced_step_prepare_throw): Use
8268 gdbarch_supports_displaced_stepping.
8269
8270 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
8271
8272 * NEWS: Mention new behaviour of the history filename.
8273 * top.c (write_history_p): Add comment.
8274 (show_write_history_p): Add header comment, give a different
8275 message when history writing is on, but the history filename is
8276 empty.
8277 (history_filename): Add comment.
8278 (history_filename_empty): New function.
8279 (show_history_filename): Add header comment, give a different
8280 message when the filename is empty.
8281 (init_history): Compare history_filename against nullptr, and only
8282 read history if the filename is not empty.
8283 (set_history_filename): Add header comment, and only make
8284 non-empty filenames absolute.
8285 (init_main): Make the filename argument to 'set history filename'
8286 optional.
8287
8288 2020-03-02 Christian Biesinger <cbiesinger@google.com>
8289
8290 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
8291 (arm_supply_vfpregset): ...this, and update to use VFP registers.
8292 (fetch_fp_register): Update.
8293 (fetch_fp_regs): Update.
8294 (store_fp_register): Update.
8295 (store_fp_regs): Update.
8296 (arm_netbsd_nat_target::read_description): New function.
8297 (fetch_elfcore_registers): Update.
8298
8299 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
8300
8301 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
8302 general_thread if the stop reply is missing a thread-id.
8303 (remote_target::process_stop_reply): Use the first non-exited
8304 thread if the target didn't pass a thread-id.
8305 * infrun.c (do_target_wait): Move call to
8306 switch_to_inferior_no_thread to ....
8307 (do_target_wait_1): ... here.
8308
8309 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
8310
8311 * debuginfod-support.c: Include defs.h first.
8312
8313 2020-02-28 Tom de Vries <tdevries@suse.de>
8314
8315 * symfile.c (set_initial_language): Use default language for lookup.
8316
8317 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
8318
8319 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
8320 reader variable, pass `this` to read_cutu_die_from_dwo.
8321
8322 2020-02-27 Aaron Merey <amerey@redhat.com>
8323
8324 * source.c (open_source_file): Check for nullptr when computing
8325 srcpath.
8326
8327 2020-02-27 Tom Tromey <tromey@adacore.com>
8328
8329 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
8330 member.
8331 (dwarf2_add_field): Don't update nfields.
8332 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
8333
8334 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
8335
8336 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
8337 abs.
8338
8339 2020-02-26 Tom Tromey <tom@tromey.com>
8340
8341 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
8342 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
8343 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
8344 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
8345 per_cu_data.
8346
8347 2020-02-26 Tom Tromey <tom@tromey.com>
8348
8349 * dwarf2/index-write.c (psym_index_map): Change type.
8350 (add_address_entry_worker, write_one_signatured_type)
8351 (recursively_count_psymbols, recursively_write_psymbols)
8352 (class debug_names, psyms_seen_size, write_gdbindex)
8353 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
8354
8355 2020-02-26 Aaron Merey <amerey@redhat.com>
8356
8357 * Makefile.in: Handle optional debuginfod support.
8358 * NEWS: Update.
8359 * README: Add --with-debuginfod summary.
8360 * config.in: Regenerate.
8361 * configure: Regenerate.
8362 * configure.ac: Handle optional debuginfod support.
8363 * debuginfod-support.c: debuginfod helper functions.
8364 * debuginfod-support.h: Ditto.
8365 * doc/gdb.texinfo: Add --with-debuginfod to configure options
8366 summary.
8367 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
8368 when a dwz file cannot be found.
8369 * elfread.c (elf_symfile_read): Query debuginfod servers when a
8370 debuginfo file cannot be found.
8371 * source.c (open_source_file): Query debuginfod servers when a
8372 source file cannot be found.
8373 * top.c (print_gdb_configuration): Include
8374 --{with,without}-debuginfod in the output.
8375
8376 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8377
8378 * thread.c (thr_try_catch_cmd): Print thread name.
8379
8380 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
8381
8382 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
8383 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8384 dwarf2_fetch_die_type_sect_off): Move to...
8385 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
8386 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8387 dwarf2_fetch_die_type_sect_off): ... here.
8388 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
8389 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8390 dwarf2_fetch_die_type_sect_off): Move doc to header file.
8391
8392 2020-02-26 Tom de Vries <tdevries@suse.de>
8393
8394 PR gdb/25603
8395 * symfile.c (set_initial_language): Exit-early if
8396 language_mode == language_mode_manual.
8397
8398 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
8399
8400 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
8401 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
8402 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
8403
8404 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
8405
8406 * gdbtypes.c (create_array_type_with_stride): Handle negative
8407 array strides.
8408 * valarith.c (value_subscripted_rvalue): Likewise.
8409
8410 2020-02-25 Luis Machado <luis.machado@linaro.org>
8411
8412 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
8413
8414 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
8415
8416 * loc.h (dwarf2_get_die_type): Move to...
8417 * read.h (dwarf2_get_die_type): ... here.
8418 * read.c (dwarf2_get_die_type): Move doc to header.
8419
8420 2020-02-25 Joel Brobecker <brobecker@adacore.com>
8421
8422 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
8423 'gnulib/Makefile.in' to the list.
8424
8425 2020-02-24 Tom Tromey <tom@tromey.com>
8426
8427 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
8428 Remove.
8429 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
8430 XOBNEWVEC.
8431
8432 2020-02-24 Tom Tromey <tom@tromey.com>
8433
8434 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
8435 New method.
8436 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
8437 (dw2_do_instantiate_symtab, dw2_get_file_names)
8438 (build_type_psymtab_dependencies, load_full_type_unit): Update.
8439
8440 2020-02-24 Tom Tromey <tom@tromey.com>
8441
8442 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
8443 make_scoped_restore.
8444 (dwarf2_psymtab::read_symtab): Don't clear
8445 reading_partial_symbols.
8446
8447 2020-02-24 Tom de Vries <tdevries@suse.de>
8448
8449 PR gdb/25592
8450 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
8451
8452 2020-02-24 Tom de Vries <tdevries@suse.de>
8453
8454 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
8455 commands layout next/prev/regs.
8456
8457 2020-02-22 Tom Tromey <tom@tromey.com>
8458
8459 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
8460 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
8461
8462 2020-02-22 Tom Tromey <tom@tromey.com>
8463
8464 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
8465
8466 2020-02-22 Tom Tromey <tom@tromey.com>
8467
8468 * tui/tui-win.c (_initialize_tui_win): Add usage text.
8469 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
8470 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
8471 * tui/tui.c (_initialize_tui): Add usage text.
8472
8473 2020-02-22 Tom Tromey <tom@tromey.com>
8474
8475 * tui/tui-win.c (tui_set_focus_command)
8476 (tui_set_win_height_command): Use error_no_arg.
8477 (_initialize_tui_win): Update help text.
8478 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
8479
8480 2020-02-22 Tom Tromey <tom@tromey.com>
8481
8482 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
8483 * tui/tui-disasm.h (struct tui_disasm_window)
8484 <display_start_addr>: Declare.
8485 * tui/tui-source.h (struct tui_source_window)
8486 <display_start_addr>: Declare.
8487 * tui/tui-winsource.h (struct tui_source_window_base)
8488 <show_source_line, display_start_addr>: New methods.
8489 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
8490 Rename and move to protected section.
8491 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
8492 (tui_source_window_base::do_erase_source_content): Update.
8493 (tui_source_window_base::show_source_line): Now a method.
8494 (tui_source_window_base::show_source_content)
8495 (tui_source_window_base::tui_source_window_base)
8496 (tui_source_window_base::rerender)
8497 (tui_source_window_base::refill)
8498 (tui_source_window_base::do_scroll_horizontal)
8499 (tui_source_window_base::set_is_exec_point_at)
8500 (tui_source_window_base::update_breakpoint_info)
8501 (tui_source_window_base::update_exec_info): Update.
8502 * tui/tui-source.c (tui_source_window::set_contents)
8503 (tui_source_window::showing_source_p)
8504 (tui_source_window::do_scroll_vertical)
8505 (tui_source_window::location_matches_p)
8506 (tui_source_window::line_is_displayed): Update.
8507 (tui_source_window::display_start_addr): New method.
8508 * tui/tui-disasm.c (tui_disasm_window::set_contents)
8509 (tui_disasm_window::do_scroll_vertical)
8510 (tui_disasm_window::location_matches_p): Update.
8511 (tui_disasm_window::display_start_addr): New method.
8512
8513 2020-02-22 Tom Tromey <tom@tromey.com>
8514
8515 * NEWS: Add entry for gdb.register_window_type.
8516 * tui/tui-layout.h (window_factory): New typedef.
8517 (tui_register_window): Declare.
8518 * tui/tui-layout.c (saved_tui_windows): New global.
8519 (tui_apply_current_layout): Use it.
8520 (tui_register_window): New function.
8521 * python/python.c (do_start_initialization): Call
8522 gdbpy_initialize_tui.
8523 (python_GdbMethods): Add "register_window_type" function.
8524 * python/python-internal.h (gdbpy_register_tui_window)
8525 (gdbpy_initialize_tui): Declare.
8526 * python/py-tui.c: New file.
8527 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
8528
8529 2020-02-22 Tom Tromey <tom@tromey.com>
8530
8531 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
8532
8533 2020-02-22 Tom Tromey <tom@tromey.com>
8534
8535 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
8536 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
8537 * tui/tui-data.c (tui_set_win_with_focus): Remove.
8538 (tui_set_win_focus_to): Move from tui-win.c.
8539
8540 2020-02-22 Tom Tromey <tom@tromey.com>
8541
8542 * tui/tui-layout.c (make_standard_window, get_locator_window): New
8543 functions.
8544 (known_window_types): New global.
8545 (tui_get_window_by_name): Reimplement.
8546 (initialize_known_windows): New function.
8547 (validate_window_name): Rewrite.
8548 (_initialize_tui_layout): Call initialize_known_windows.
8549
8550 2020-02-22 Tom Tromey <tom@tromey.com>
8551
8552 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
8553 Remove constants.
8554 * tui/tui-winsource.h (struct tui_source_window_base)
8555 <tui_source_window_base>: Remove parameter.
8556 * tui/tui-winsource.c
8557 (tui_source_window_base::tui_source_window_base): Remove
8558 parameter.
8559 (tui_source_window_base::refill): Update.
8560 * tui/tui-stack.h (struct tui_locator_window)
8561 <tui_locator_window>: Update.
8562 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
8563 Default the constructor.
8564 * tui/tui-regs.h (struct tui_data_item_window)
8565 <tui_data_item_window>: Default the constructor.
8566 (struct tui_data_window) <tui_data_window>: Likewise.
8567 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
8568 Default the constructor.
8569 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
8570 Default the constructor.
8571 <type>: Remove.
8572 (struct tui_win_info) <tui_win_info>: Default the constructor.
8573 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
8574 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
8575 Default the constructor.
8576
8577 2020-02-22 Tom Tromey <tom@tromey.com>
8578
8579 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
8580 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
8581 * tui/tui-win.c (tui_resize_all): Don't call
8582 tui_delete_invisible_windows.
8583 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
8584 done.
8585 (tui_set_layout): Update.
8586 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
8587 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
8588 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
8589
8590 2020-02-22 Tom Tromey <tom@tromey.com>
8591
8592 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
8593 correctly.
8594
8595 2020-02-22 Tom Tromey <tom@tromey.com>
8596
8597 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
8598
8599 2020-02-22 Tom Tromey <tom@tromey.com>
8600
8601 * tui/tui-winsource.h (struct tui_source_window_iterator)
8602 <inner_iterator>: New etytypedef.
8603 <tui_source_window_iterator>: Take "end" parameter.
8604 <tui_source_window_iterator>: Take iterator.
8605 <operator*, advance>: Update.
8606 <m_iter>: Change type.
8607 <m_end>: New field.
8608 (struct tui_source_windows) <begin, end>: Update.
8609 * tui/tui-layout.c (tui_windows): New global.
8610 (tui_apply_current_layout): Clear tui_windows.
8611 (tui_layout_window::apply): Update tui_windows.
8612 * tui/tui-data.h (tui_windows): Declare.
8613 (all_tui_windows): Now inline function.
8614 (class tui_window_iterator, struct all_tui_windows): Remove.
8615
8616 2020-02-22 Tom Tromey <tom@tromey.com>
8617
8618 PR tui/17850:
8619 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
8620 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
8621 "height" argument.
8622 (class tui_layout_window) <get_sizes>: Likewise.
8623 (class tui_layout_split) <tui_layout_split>: Add "vertical"
8624 argument.
8625 <get_sizes>: Add "height" argument.
8626 <m_vertical>: New field.
8627 * tui/tui-layout.c (tui_layout_split::clone): Update.
8628 (tui_layout_split::get_sizes): Add "height" argument.
8629 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
8630 (tui_new_layout_command): Parse "-horizontal".
8631 (_initialize_tui_layout): Update help string.
8632 (tui_layout_split::specification): Add "-horizontal" when needed.
8633 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
8634 argument.
8635 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
8636 New methods.
8637
8638 2020-02-22 Tom Tromey <tom@tromey.com>
8639
8640 * tui/tui-layout.h (enum tui_adjust_result): New.
8641 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
8642 (class tui_layout_window) <adjust_size>: Return
8643 tui_adjust_result. Rewrite.
8644 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
8645 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
8646
8647 2020-02-22 Tom Tromey <tom@tromey.com>
8648
8649 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
8650 parameter and return types.
8651 (class tui_layout_base) <specification>: Add "depth".
8652 (class tui_layout_window) <specification>: Add "depth".
8653 (class tui_layout_split) <specification>: Add "depth".
8654 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
8655 and return types.
8656 (tui_new_layout_command): Parse sub-layouts.
8657 (_initialize_tui_layout): Update help string.
8658 (tui_layout_window::specification): Add "depth".
8659 (add_layout_command): Update.
8660
8661 2020-02-22 Tom Tromey <tom@tromey.com>
8662
8663 * NEWS: Add "tui new-layout" item.
8664 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
8665 Add new-layout command to help text.
8666 (validate_window_name): New function.
8667 (tui_new_layout_command): New function.
8668 (_initialize_tui_layout): Register "new-layout".
8669 (tui_layout_window::specification): New method.
8670 (tui_layout_window::specification): New method.
8671 * tui/tui-layout.h (class tui_layout_base) <specification>: New
8672 method.
8673 (class tui_layout_window) <specification>: New method.
8674 (class tui_layout_split) <specification>: New method.
8675
8676 2020-02-22 Tom Tromey <tom@tromey.com>
8677
8678 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
8679 * tui/tui-win.c (window_name_completer): Update comment.
8680 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
8681 Declare method.
8682 (class tui_layout_window) <replace_window>: Likewise.
8683 (class tui_layout_split) <replace_window>: Likewise.
8684 (tui_set_layout): Don't declare.
8685 (tui_set_initial_layout): Declare function.
8686 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
8687 (asm_regs_layout): New globals.
8688 (tui_current_layout, show_layout): Remove.
8689 (tui_set_layout, tui_add_win_to_layout): Rewrite.
8690 (find_layout, tui_apply_layout): New function.
8691 (layout_completer): Remove.
8692 (tui_next_layout): Reimplement.
8693 (tui_next_layout_command): New function.
8694 (tui_set_initial_layout, tui_prev_layout_command): New functions.
8695 (tui_regs_layout): Reimplement.
8696 (tui_regs_layout_command): New function.
8697 (extract_display_start_addr): Rewrite.
8698 (next_layout, prev_layout): Remove.
8699 (tui_layout_window::replace_window): New method.
8700 (tui_layout_split::replace_window): New method.
8701 (destroy_layout): New function.
8702 (layout_list): New global.
8703 (add_layout_command): New function.
8704 (initialize_layouts): Update.
8705 (tui_layout_command): New function.
8706 (_initialize_tui_layout): Install "layout" commands.
8707 * tui/tui-data.h (enum tui_layout_type): Remove.
8708 (tui_current_layout): Don't declare.
8709
8710 2020-02-22 Tom Tromey <tom@tromey.com>
8711
8712 * tui/tui-regs.c (tui_reg_layout): Remove.
8713 (tui_reg_command): Use tui_regs_layout.
8714 * tui/tui-layout.h (tui_reg_command): Declare.
8715 * tui/tui-layout.c (tui_reg_command): New function.
8716
8717 2020-02-22 Tom Tromey <tom@tromey.com>
8718
8719 * tui/tui.c (tui_rl_delete_other_windows): Call
8720 tui_remove_some_windows.
8721 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
8722 Declare method.
8723 (class tui_layout_window) <remove_windows>: New method.
8724 (class tui_layout_split) <remove_windows>: Declare.
8725 (tui_remove_some_windows): Declare.
8726 * tui/tui-layout.c (tui_remove_some_windows): New function.
8727 (tui_layout_split::remove_windows): New method.
8728
8729 2020-02-22 Tom Tromey <tom@tromey.com>
8730
8731 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
8732 * tui/tui-layout.h (tui_next_layout): Declare.
8733 * tui/tui-layout.c (tui_next_layout): New function.
8734
8735 2020-02-22 Tom Tromey <tom@tromey.com>
8736
8737 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
8738 correct coordinates.
8739
8740 2020-02-22 Tom Tromey <tom@tromey.com>
8741
8742 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
8743 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
8744 DATA_WIN case.
8745
8746 2020-02-22 Tom Tromey <tom@tromey.com>
8747
8748 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
8749 TUI_DISASM_WIN, not tui_win_list.
8750
8751 2020-02-22 Tom Tromey <tom@tromey.com>
8752
8753 * valprint.c (generic_val_print_enum_1)
8754 (val_print_type_code_flags): Style member names.
8755 * rust-lang.c (val_print_struct, rust_print_enum)
8756 (rust_print_struct_def, rust_internal_print_type): Style member
8757 names.
8758 * p-valprint.c (pascal_object_print_value_fields): Style member
8759 names. Only call fprintf_symbol_filtered for static members.
8760 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
8761 * f-valprint.c (f_val_print): Style member names.
8762 * f-typeprint.c (f_type_print_base): Style member names.
8763 * cp-valprint.c (cp_print_value_fields): Style member names. Only
8764 call fprintf_symbol_filtered for static members.
8765 (cp_print_class_member): Style member names.
8766 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
8767 member names.
8768 * ada-valprint.c (ada_print_scalar): Style enum names.
8769 (ada_val_print_enum): Likewise.
8770 * ada-typeprint.c (print_enum_type): Style enum names.
8771
8772 2020-02-21 Tom Tromey <tom@tromey.com>
8773
8774 * psympriv.h (struct partial_symtab): Update comment.
8775
8776 2020-02-21 Tom Tromey <tromey@adacore.com>
8777
8778 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
8779 type is CORE_ADDR.
8780
8781 2020-02-21 Tom de Vries <tdevries@suse.de>
8782
8783 PR gdb/25534
8784 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
8785 if dependencies[i]->user != NULL.
8786
8787 2020-02-21 Ali Tamur <tamur@google.com>
8788
8789 * dwarf2/read.c (dwarf2_name): Add null check.
8790
8791 2020-02-20 Tom Tromey <tom@tromey.com>
8792
8793 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
8794 ">=", in binary search.
8795 (dwarf2_find_containing_comp_unit): New overload.
8796 (run_test): New self-test.
8797 (_initialize_dwarf2_read): Register new test.
8798
8799 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
8800
8801 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
8802 * riscv-tdep.h: Likewise.
8803 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
8804 rv32-only CSR.
8805 * features/riscv/64bit-csr.xml: Regenerated.
8806
8807 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8808 Tom Tromey <tom@tromey.com>
8809
8810 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
8811 of 'fputc_unfiltered'.
8812 (putchar_unfiltered): Call 'fputc_unfiltered'.
8813 (fputc_unfiltered): Call 'fputs_unfiltered'.
8814
8815 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
8816
8817 * config.in: Regenerate.
8818 * configure: Regenerate.
8819 * configure.ac: Add --with-python-libdir option.
8820 * main.c: Use WITH_PYTHON_LIBDIR.
8821
8822 2020-02-19 Tom Tromey <tom@tromey.com>
8823
8824 * symtab.c (general_symbol_info::compute_and_set_names): Use
8825 obstack_strndup. Simplify call to symbol_set_demangled_name.
8826
8827 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
8828
8829 * dwarf2/read.c (allocate_signatured_type_table,
8830 allocate_dwo_unit_table, allocate_type_unit_groups_table,
8831 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
8832 Remove objfile parameter, update all callers.
8833
8834 2020-02-19 Doug Evans <dje@google.com>
8835
8836 PR rust/25535
8837 * rust-lang.c (rust_print_enum): Apply embedded_offset to
8838 rust_enum_variant calculation.
8839
8840 2020-02-19 Tom Tromey <tromey@adacore.com>
8841
8842 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
8843
8844 2020-02-19 Tom Tromey <tromey@adacore.com>
8845
8846 * ada-lang.c (cache_symbol): Use obstack_strdup.
8847
8848 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
8849
8850 * configure: Regenerate.
8851
8852 2020-02-19 Tom Tromey <tromey@adacore.com>
8853
8854 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
8855 NULL check.
8856
8857 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
8858
8859 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
8860
8861 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
8862
8863 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
8864 if GDBSERVER is not defined.
8865 (riscv_tdesc_cache): Likewise, also store const target_desc.
8866 (STATIC_IN_GDB): Define.
8867 (riscv_create_target_description): Update declaration with
8868 STATIC_IN_GDB.
8869 (riscv_lookup_target_description): New function, only define if
8870 GDBSERVER is not defined.
8871 * arch/riscv.h (riscv_create_target_description): Declare only
8872 when GDBSERVER is defined.
8873 (riscv_lookup_target_description): New declaration when GDBSERVER
8874 is not defined.
8875 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
8876 (riscv_linux_read_features): ...this, and return
8877 riscv_gdbarch_features instead of target_desc.
8878 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
8879 (riscv_linux_read_description): Rename to...
8880 (riscv_linux_read_features): ...this.
8881 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
8882 Update to use riscv_gdbarch_features and
8883 riscv_lookup_target_description.
8884 * riscv-tdep.c (riscv_find_default_target_description): Use
8885 riscv_lookup_target_description instead of
8886 riscv_create_target_description.
8887
8888 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8889
8890 * valprint.c (generic_val_print_enum_1): When printing a flag
8891 enum with value 0 and there is no enumerator with value 0, print
8892 just "0" instead of "(unknown: 0x0)".
8893
8894 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8895
8896 * valprint.c (generic_val_print_enum_1): Print unknown part of
8897 flag enum in hex.
8898
8899 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8900
8901 * dwarf2/read.c (update_enumeration_type_from_children): Allow
8902 flag enums to contain duplicate enumerators.
8903 * valprint.c (generic_val_print_enum_1): Update comment.
8904
8905 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8906
8907 * dwarf2/read.c: Include "count-one-bits.h".
8908 (update_enumeration_type_from_children): If an enumerator has
8909 multiple bits set, don't treat the enumeration as a "flag enum".
8910 * valprint.c (generic_val_print_enum_1): Assert that enumerators
8911 of flag enums have 0 or 1 bit set.
8912
8913 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
8914
8915 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
8916 conversion.
8917 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8918 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
8919 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8920 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
8921 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8922
8923 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8924
8925 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
8926
8927 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8928
8929 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
8930 displaced_step_closure_up.
8931 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
8932 (struct displaced_step_closure_up):
8933 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8934 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
8935 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
8936 Likewise.
8937 * gdbarch.sh (displaced_step_copy_insn): Likewise.
8938 * gdbarch.c, gdbarch.h: Re-generate.
8939 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
8940 displaced_step_closure_up.
8941 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8942 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
8943 * infrun.h (displaced_step_closure_up): New type alias.
8944 (struct displaced_step_inferior_state) <step_closure>: Change
8945 type to displaced_step_closure_up.
8946 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
8947 displaced_step_closure_up.
8948 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8949
8950 2020-02-14 Tom Tromey <tom@tromey.com>
8951
8952 * minidebug.c (gnu_debug_key): New global.
8953 (find_separate_debug_file_in_section): Use it.
8954
8955 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8956
8957 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
8958 std::unique_ptr.
8959 * gdbarch.c: Re-generate.
8960 * gdbarch.h: Re-generate.
8961 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
8962 change.
8963 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
8964 type to std::unique_ptr.
8965 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
8966 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8967 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
8968 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
8969 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
8970 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8971 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
8972 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
8973 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8974
8975 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8976
8977 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
8978 std::unique_ptr.
8979 (displaced_step_clear): Rename to...
8980 (displaced_step_reset): ... this. Just call displaced->reset ().
8981 (displaced_step_clear_cleanup): Rename to...
8982 (displaced_step_reset_cleanup): ... this.
8983 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
8984 (displaced_step_fixup): Likewise.
8985 (resume_1): Likewise.
8986 (handle_inferior_event): Restore child's memory before calling
8987 displaced_step_fixup on the parent.
8988 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
8989 to std::unique_ptr.
8990 <step_closure>: Change type to std::unique_ptr.
8991
8992 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8993
8994 * arm-tdep.c: Include count-one-bits.h.
8995 (cleanup_block_store_pc): Use count_one_bits.
8996 (cleanup_block_load_pc): Use count_one_bits.
8997 (arm_copy_block_xfer): Use count_one_bits.
8998 (thumb2_copy_block_xfer): Use count_one_bits.
8999 (thumb_copy_pop_pc_16bit): Use count_one_bits.
9000 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
9001 (thumb_get_next_pcs_raw): Use count_one_bits.
9002 (arm_get_next_pcs_raw): Use count_one_bits_l.
9003 * arch/arm.c (bitcount): Remove.
9004 * arch/arm.h (bitcount): Remove.
9005
9006 2020-02-14 Tom Tromey <tromey@adacore.com>
9007
9008 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
9009 Update.
9010 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
9011 * dwarf2/loc.c (call_site_find_chain_1): Return
9012 unique_xmalloc_ptr.
9013 (call_site_find_chain): Likewise.
9014
9015 2020-02-14 Richard Biener <rguenther@suse.de>
9016
9017 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
9018 on expression with division operators.
9019
9020 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
9021
9022 * MAINTAINERS (Write After Approval): Adding myself.
9023
9024 2020-02-12 Tom Tromey <tom@tromey.com>
9025
9026 * event-loop.c (event_data, gdb_event, event_handler_func):
9027 Remove.
9028
9029 2020-02-12 Tom Tromey <tom@tromey.com>
9030
9031 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
9032 (dwarf2_frame_objfile_data): Add comment.
9033 (find_comp_unit, set_comp_unit): New functions.
9034 (dwarf2_frame_find_fde): Use find_comp_unit.
9035 (dwarf2_build_frame_info): Use set_comp_unit.
9036
9037 2020-02-12 Tom Tromey <tom@tromey.com>
9038
9039 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
9040 (comp_unit): Don't initialize objfile.
9041 (execute_cfa_program): Add text_offset parameter.
9042 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
9043 (dwarf2_frame_cache): Update.
9044 (dwarf2_build_frame_info): Don't set "objfile" member.
9045
9046 2020-02-12 Tom Tromey <tom@tromey.com>
9047
9048 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
9049 (decode_frame_entry): Likewise.
9050 (dwarf2_build_frame_info): Update.
9051
9052 2020-02-12 Tom Tromey <tom@tromey.com>
9053
9054 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
9055 (decode_frame_entry_1): Use the comp_unit obstack.
9056
9057 2020-02-12 Tom Tromey <tom@tromey.com>
9058
9059 * dwarf2/frame.c (struct comp_unit): Add initializers and
9060 constructor.
9061 (dwarf2_frame_objfile_data): Store a comp_unit.
9062 (dwarf2_frame_find_fde): Update.
9063 (dwarf2_build_frame_info): Use "new".
9064
9065 2020-02-12 Tom Tromey <tom@tromey.com>
9066
9067 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
9068 (dwarf2_fde_table): Typedef for std::vector.
9069 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
9070 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
9071 (decode_frame_entry): Update.
9072 (dwarf2_build_frame_info): Use "new".
9073
9074 2020-02-12 Christian Biesinger <cbiesinger@google.com>
9075
9076 * arm-tdep.c (arm_gdbarch_init): Update.
9077 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
9078 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
9079 have_neon, is_m>: Change to bool.
9080
9081 2020-02-12 Christian Biesinger <cbiesinger@google.com>
9082
9083 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
9084
9085 2020-02-12 Tom Tromey <tom@tromey.com>
9086
9087 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
9088
9089 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
9090
9091 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
9092 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
9093
9094 2020-02-11 Tom Tromey <tom@tromey.com>
9095
9096 * psymtab.h: Update comment.
9097
9098 2020-02-11 Tom Tromey <tom@tromey.com>
9099
9100 * gdb_obstack.h (struct auto_obstack): Use
9101 DISABLE_COPY_AND_ASSIGN.
9102
9103 2020-02-11 Tom Tromey <tom@tromey.com>
9104
9105 * dwarf2/frame.h (struct objfile): Don't forward declare.
9106
9107 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9108
9109 * cris-tdep.c (cris_supply_gregset): Change signature to match
9110 what struct regset expects.
9111 (cris_regset): New struct.
9112 (fetch_core_registers): Remove.
9113 (cris_iterate_over_regset_sections): New function.
9114 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
9115 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
9116
9117 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9118
9119 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
9120 registers.
9121
9122 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9123
9124 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
9125
9126 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9127
9128 * configure: Re-generate.
9129
9130 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9131
9132 * configure: Re-generate.
9133
9134 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9135
9136 * acinclude: Update warning.m4 path.
9137 * warning.m4: Move to gdbsupport.
9138
9139 2020-02-11 Tom Tromey <tromey@adacore.com>
9140
9141 * remote.c (remote_console_output): Update.
9142 * printcmd.c (printf_command): Update.
9143 * event-loop.c (gdb_wait_for_event): Update.
9144 * linux-nat.c (sigchld_handler): Update.
9145 * remote-sim.c (gdb_os_write_stdout): Update.
9146 (gdb_os_flush_stdout): Update.
9147 (gdb_os_flush_stderr): Update.
9148 (gdb_os_write_stderr): Update.
9149 * exceptions.c (print_exception): Update.
9150 * remote-fileio.c (remote_fileio_func_read): Update.
9151 (remote_fileio_func_write): Update.
9152 * tui/tui.c (tui_enable): Update.
9153 * tui/tui-interp.c (tui_interp::init): Update.
9154 * utils.c (init_page_info): Update.
9155 (putchar_unfiltered, fputc_unfiltered): Update.
9156 (gdb_flush): Update.
9157 (emit_style_escape): Update.
9158 (flush_wrap_buffer, fputs_maybe_filtered): Update.
9159 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
9160 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
9161 (stderr_file::write): Update.
9162 (stderr_file::puts): Update.
9163 * ui-file.h (ui_file_isatty, ui_file_write)
9164 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
9165 (ui_file_puts): Don't declare.
9166
9167 2020-02-10 Tom de Vries <tdevries@suse.de>
9168
9169 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
9170 sentinel to char *.
9171
9172 2020-02-09 Tom de Vries <tdevries@suse.de>
9173
9174 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
9175 filename if it matches "<artificial>".
9176
9177 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
9178
9179 * windows-tdep.c (struct enum_value_name): New struct.
9180 (create_enum): New function.
9181 (windows_get_siginfo_type): Create and use enum types.
9182
9183 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
9184
9185 * NEWS: Mention $_siginfo support for Windows.
9186 * windows-nat.c (handle_exception): Set siginfo_er.
9187 (windows_nat_target::mourn_inferior): Reset siginfo_er.
9188 (windows_xfer_siginfo): New function.
9189 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
9190 * windows-tdep.c (struct windows_gdbarch_data): New struct.
9191 (init_windows_gdbarch_data): New function.
9192 (get_windows_gdbarch_data): New function.
9193 (windows_get_siginfo_type): New function.
9194 (windows_init_abi): Register windows_get_siginfo_type.
9195 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
9196
9197 2020-02-08 Tom Tromey <tom@tromey.com>
9198
9199 * dwarf2/read.c (class cutu_reader) <cutu_reader,
9200 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
9201 <keep>: Declare method.
9202 <m_keep>: Remove member.
9203 <~cutu_reader>: Remove.
9204 (cutu_reader::init_tu_and_read_dwo_dies): Update.
9205 (cutu_reader::cutu_reader): Update.
9206 (cutu_reader::keep): Rename from ~cutu_reader.
9207 (process_psymtab_comp_unit, build_type_psymtabs_1)
9208 (process_skeletonless_type_unit, load_partial_comp_unit)
9209 (load_full_comp_unit, dwarf2_read_addr_index)
9210 (read_signatured_type): Update.
9211
9212 2020-02-08 Tom Tromey <tom@tromey.com>
9213
9214 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
9215 "want_partial_unit" parameter.
9216 (process_psymtab_comp_unit): Change want_partial_unit to bool.
9217 Inline check for DW_TAG_partial_unit.
9218 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
9219
9220 2020-02-08 Tom Tromey <tom@tromey.com>
9221
9222 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
9223 read.c.
9224 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
9225 read.c.
9226
9227 2020-02-08 Tom Tromey <tom@tromey.com>
9228
9229 * dwarf2/read.c (read_address): Move to comp-unit.c.
9230 (dwarf2_rnglists_process, dwarf2_ranges_process)
9231 (read_attribute_value, dwarf_decode_lines_1)
9232 (var_decode_location, decode_locdesc): Update.
9233 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
9234 read.c. Remove "cu" parameter.
9235 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
9236 method.
9237
9238 2020-02-08 Tom Tromey <tom@tromey.com>
9239
9240 * dwarf2/read.c (read_attribute_value, read_indirect_string)
9241 (read_indirect_line_string): Update.
9242 * dwarf2/comp-unit.c (read_offset): Remove.
9243 (read_comp_unit_head): Update.
9244 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
9245 method.
9246 (read_offset): Don't declare.
9247
9248 2020-02-08 Tom Tromey <tom@tromey.com>
9249
9250 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
9251 * dwarf2/read.c (struct comp_unit_head): Move to
9252 dwarf2/comp-unit.h.
9253 (enum class rcuh_kind): Move to comp-unit.h.
9254 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
9255 (read_comp_unit_head, error_check_comp_unit_head)
9256 (read_and_check_comp_unit_head): Move to comp-unit.c.
9257 (read_offset, dwarf_unit_type_name): Likewise.
9258 (create_debug_type_hash_table, read_cutu_die_from_dwo)
9259 (cutu_reader::cutu_reader, read_call_site_scope)
9260 (find_partial_die, follow_die_offset): Update.
9261 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
9262
9263 2020-02-08 Tom Tromey <tom@tromey.com>
9264
9265 * dwarf2/read.c (read_offset_1): Move to leb.c.
9266 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
9267 (dwarf_decode_macro_bytes): Update.
9268 * dwarf2/leb.c (read_offset): Rename; move from read.c.
9269 * dwarf2/leb.h (read_offset): Declare.
9270
9271 2020-02-08 Tom Tromey <tom@tromey.com>
9272
9273 * dwarf2/read.c (dwarf2_section_size): Remove.
9274 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
9275 Update.
9276 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
9277
9278 2020-02-08 Tom Tromey <tom@tromey.com>
9279
9280 * dwarf2/read.c (read_initial_length): Move to leb.c.
9281 * dwarf2/leb.h (read_initial_length): Declare.
9282 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
9283 handle_nonstd parameter.
9284 * dwarf2/frame.c (read_initial_length): Remove.
9285 (decode_frame_entry_1): Update.
9286
9287 2020-02-08 Tom Tromey <tom@tromey.com>
9288
9289 * dwarf2/loc.c (dwarf2_find_location_expression)
9290 (dwarf_evaluate_loc_desc::get_tls_address)
9291 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9292 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
9293 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
9294 (dwarf2_compile_property_to_c)
9295 (dwarf2_loc_desc_get_symbol_read_needs)
9296 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
9297 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
9298 (loclist_describe_location, loclist_tracepoint_var_ref)
9299 (loclist_generate_c_location): Update.
9300 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
9301 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
9302 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
9303 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
9304 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
9305 (dwarf2_per_cu_data::addr_size)
9306 (dwarf2_per_cu_data::ref_addr_size)
9307 (dwarf2_per_cu_data::text_offset)
9308 (dwarf2_per_cu_data::addr_type): Now methods.
9309 (per_cu_header_read_in): Make per_cu "const".
9310 (dwarf2_version): Remove.
9311 (dwarf2_per_cu_data::int_type): Now a method.
9312 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
9313 (set_die_type, read_array_type, read_subrange_index_type)
9314 (read_tag_string_type, read_subrange_type): Update.
9315 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
9316 offset_size, ref_addr_size, text_offset, addr_type, version,
9317 objfile, int_type, addr_sized_int_type>: Declare methods.
9318
9319 2020-02-08 Tom Tromey <tom@tromey.com>
9320
9321 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
9322 Move earlier.
9323
9324 2020-02-08 Tom Tromey <tom@tromey.com>
9325
9326 * dwarf2/read.h (dwarf_line_debug): Declare.
9327 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
9328 * dwarf2/read.c: Move line_header code to new files.
9329 (dwarf_line_debug): No longer static.
9330 * dwarf2/line-header.c: New file.
9331 * dwarf2/line-header.h: New file.
9332
9333 2020-02-08 Tom Tromey <tom@tromey.com>
9334
9335 * dwarf2/read.c (struct line_header) <file_full_name,
9336 file_file_name>: Return unique_xmalloc_ptr.
9337 (line_header::file_file_name): Update.
9338 (line_header::file_full_name): Update.
9339 (dw2_get_file_names_reader): Update.
9340 (macro_start_file): Update.
9341
9342 2020-02-08 Tom Tromey <tom@tromey.com>
9343
9344 * dwarf2/read.c (struct line_header) <file_full_name,
9345 file_file_name>: Declare methods.
9346 (dw2_get_file_names_reader): Update.
9347 (file_file_name): Now a method.
9348 (file_full_name): Likewise.
9349 (macro_start_file): Update.
9350
9351 2020-02-08 Tom Tromey <tom@tromey.com>
9352
9353 * dwarf2/read.c (dwarf_always_disassemble)
9354 (show_dwarf_always_disassemble): Move to loc.c.
9355 (_initialize_dwarf2_read): Move "always-disassemble" registration
9356 to loc.c.
9357 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
9358 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
9359 static.
9360 (show_dwarf_always_disassemble): Move from read.c.
9361 (_initialize_dwarf2loc): Move always-disassemble from read.c.
9362
9363 2020-02-08 Tom Tromey <tom@tromey.com>
9364
9365 * dwarf2/read.c (~dwarf2_per_objfile): Update.
9366 (create_quick_file_names_table): Return htab_up.
9367 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
9368 Update.
9369 * dwarf2/read.h (struct dwarf2_per_objfile)
9370 <quick_file_names_table>: Now htab_up.
9371
9372 2020-02-08 Tom Tromey <tom@tromey.com>
9373
9374 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
9375
9376 2020-02-08 Tom Tromey <tom@tromey.com>
9377
9378 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
9379 Rewrite.
9380 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
9381 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
9382 (abbrev_table::abbrev_table): No longer inline.
9383 (ABBREV_HASH_SIZE): Remove.
9384 (abbrev_table::m_abbrevs): Now an htab_up.
9385
9386 2020-02-08 Tom Tromey <tom@tromey.com>
9387
9388 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
9389 (cutu_reader): Update.
9390 (build_type_psymtabs_1): Update.
9391 * dwarf2/abbrev.c (abbrev_table::read): Rename.
9392 (abbrev_table::alloc_abbrev): Update.
9393 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
9394 (abbrev_table::read): New static method, renamed from
9395 abbrev_table_read_table.
9396 (abbrev_table::alloc_abbrev)
9397 (abbrev_table::add_abbrev): Now private.
9398 (abbrev_table::abbrev_table): Now private.
9399 (abbrev_table::m_abbrev_obstack): Now private. Rename.
9400
9401 2020-02-08 Tom Tromey <tom@tromey.com>
9402
9403 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
9404 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
9405 htab_up.
9406
9407 2020-02-08 Tom Tromey <tom@tromey.com>
9408
9409 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
9410 htab_up.
9411 (lookup_dwo_unit_in_dwp): Update.
9412 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
9413 on obstack.
9414
9415 2020-02-08 Tom Tromey <tom@tromey.com>
9416
9417 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
9418 obstack.
9419
9420 2020-02-08 Tom Tromey <tom@tromey.com>
9421
9422 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
9423 line_header_hash.
9424 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
9425 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
9426 Change type to htab_up.
9427
9428 2020-02-08 Tom Tromey <tom@tromey.com>
9429
9430 * dwarf2/read.c (allocate_type_unit_groups_table): Return
9431 htab_up. Don't allocate on obstack.
9432 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
9433 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
9434 Change type to htab_up.
9435
9436 2020-02-08 Tom Tromey <tom@tromey.com>
9437
9438 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
9439 Change type to htab_up.
9440 * dwarf2/read.c (create_signatured_type_table_from_index)
9441 (create_signatured_type_table_from_debug_names)
9442 (create_all_type_units, add_type_unit)
9443 (lookup_dwo_signatured_type, lookup_signatured_type)
9444 (process_skeletonless_type_unit): Update.
9445 (create_debug_type_hash_table, create_debug_types_hash_table):
9446 Change type of types_htab.
9447 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
9448 htab_up. Don't allocate on obstack.
9449 (create_cus_hash_table): Change type of cus_htab parameter.
9450 (struct dwo_file) <cus, tus>: Now htab_up.
9451 (lookup_dwo_signatured_type, lookup_dwo_cutu)
9452 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
9453 (queue_and_load_all_dwo_tus): Update.
9454 * dwarf2/index-write.c (write_gdbindex): Update.
9455 (write_debug_names): Update.
9456
9457 2020-02-08 Tom Tromey <tom@tromey.com>
9458
9459 * dwarf2/read.h (struct dwarf2_queue_item): Move from
9460 dwarf2/read.c. Remove "next" member. Add constructor ntad
9461 destructor.
9462 (struct dwarf2_per_objfile) <queue>: New member.
9463 * dwarf2/read.c (struct dwarf2_queue_item): Move to
9464 dwarf2/read.h.
9465 (dwarf2_queue, dwarf2_queue_tail): Remove.
9466 (class dwarf2_queue_guard): Add parameter to constructor. Use
9467 DISABLE_COPY_AND_ASSIGN.
9468 <m_per_objfile>: New member.
9469 <~dwarf2_queue_guard>: Rewrite.
9470 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
9471 Update.
9472 (~dwarf2_queue_item): New.
9473
9474 2020-02-08 Tom Tromey <tom@tromey.com>
9475
9476 * dwarf2/read.c (struct die_info) <has_children>: New member.
9477 (dw2_get_file_names_reader): Remove has_children.
9478 (dw2_get_file_names): Update.
9479 (read_cutu_die_from_dwo): Remove has_children.
9480 (cutu_reader::init_tu_and_read_dwo_dies)
9481 (cutu_reader::cutu_reader): Update.
9482 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
9483 Remove has_children.
9484 (build_type_psymtabs_1, process_skeletonless_type_unit)
9485 (load_partial_comp_unit, load_full_comp_unit): Update.
9486 (create_dwo_cu_reader): Remove has_children.
9487 (create_cus_hash_table, read_die_and_children): Update.
9488 (read_full_die_1,read_full_die): Remove has_children.
9489 (read_signatured_type): Update.
9490 (class cutu_reader) <has_children>: Remove.
9491
9492 2020-02-08 Tom Tromey <tom@tromey.com>
9493
9494 * dwarf2/expr.c: Rename from dwarf2expr.c.
9495 * dwarf2/expr.h: Rename from dwarf2expr.h.
9496 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
9497 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
9498 * dwarf2/frame.c: Rename from dwarf2-frame.c.
9499 * dwarf2/frame.h: Rename from dwarf2-frame.h.
9500 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
9501 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
9502 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
9503 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
9504 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
9505 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
9506 * dwarf2/loc.c: Rename from dwarf2loc.c.
9507 * dwarf2/loc.h: Rename from dwarf2loc.h.
9508 * dwarf2/read.c: Rename from dwarf2read.c.
9509 * dwarf2/read.h: Rename from dwarf2read.h.
9510 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
9511 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
9512 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
9513 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
9514 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
9515 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
9516 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
9517 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
9518 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
9519 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
9520 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
9521 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
9522 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
9523 Update.
9524 * Makefile.in (COMMON_SFILES): Update.
9525 (HFILES_NO_SRCDIR): Update.
9526
9527 2020-02-08 Tom Tromey <tom@tromey.com>
9528
9529 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
9530 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
9531
9532 2020-02-08 Tom Tromey <tom@tromey.com>
9533
9534 * dwarf2read.h (struct die_info): Don't declare.
9535
9536 2020-02-08 Tom Tromey <tom@tromey.com>
9537
9538 * dwarf2read.h (die_info_ptr): Remove typedef.
9539
9540 2020-02-08 Tom Tromey <tom@tromey.com>
9541
9542 * dwarf2read.c (read_call_site_scope)
9543 (handle_data_member_location, dwarf2_add_member_fn)
9544 (mark_common_block_symbol_computed, read_common_block)
9545 (attr_to_dynamic_prop, partial_die_info::read)
9546 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
9547 (dwarf2_symbol_mark_computed, set_die_type): Update.
9548 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
9549 method.
9550 (attr_form_is_block): Don't declare.
9551 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
9552
9553 2020-02-08 Tom Tromey <tom@tromey.com>
9554
9555 * dwarf2read.c (dwarf2_find_base_address, )
9556 (read_call_site_scope, rust_containing_type)
9557 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
9558 (handle_data_member_location, dwarf2_add_member_fn)
9559 (get_alignment, read_structure_type, process_structure_scope)
9560 (mark_common_block_symbol_computed, read_common_block)
9561 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
9562 (partial_die_info::read, read_attribute_value, new_symbol)
9563 (lookup_die_type, dwarf2_get_ref_die_offset)
9564 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
9565 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
9566 (dwarf2_symbol_mark_computed): Update.
9567 * dwarf2/attribute.h (struct attribute) <value_as_address,
9568 form_is_section_offset, form_is_constant, form_is_ref>: Declare
9569 methods.
9570 (value_as_address, attr_form_is_section_offset)
9571 (attr_form_is_constant, attr_form_is_ref): Don't declare.
9572 * dwarf2/attribute.c (attribute::value_as_address)
9573 (attribute::form_is_section_offset, attribute::form_is_constant)
9574 (attribute::form_is_ref): Now methods.
9575
9576 2020-02-08 Tom Tromey <tom@tromey.com>
9577
9578 * dwarf2read.c (struct attribute, DW_STRING)
9579 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
9580 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
9581 (attr_form_is_block, attr_form_is_section_offset)
9582 (attr_form_is_constant, attr_form_is_ref): Move.
9583 * dwarf2/attribute.h: New file.
9584 * dwarf2/attribute.c: New file, from dwarf2read.c.
9585 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
9586
9587 2020-02-08 Tom Tromey <tom@tromey.com>
9588
9589 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
9590 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
9591 Move.
9592 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
9593 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
9594 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
9595 abbrev.c.
9596 * dwarf2/abbrev.h: New file.
9597 * dwarf2/abbrev.c: New file, from dwarf2read.c.
9598 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
9599
9600 2020-02-08 Tom Tromey <tom@tromey.com>
9601
9602 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
9603 (dwarf2_section_size, dwarf2_get_section_info)
9604 (create_signatured_type_table_from_debug_names)
9605 (create_addrmap_from_aranges, read_debug_names_from_section)
9606 (get_gdb_index_contents_from_section, read_comp_unit_head)
9607 (error_check_comp_unit_head, read_abbrev_offset)
9608 (create_debug_type_hash_table, init_cu_die_reader)
9609 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
9610 (read_comp_units_from_section, create_cus_hash_table)
9611 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
9612 (create_dwp_v2_section, dwarf2_rnglists_process)
9613 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
9614 (abbrev_table_read_table, read_indirect_string_at_offset_from)
9615 (read_indirect_string_from_dwz, read_addr_index_1)
9616 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
9617 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9618 (fill_in_loclist_baton): Update.
9619 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
9620 get_containing_section, get_bfd_owner, get_bfd_section,
9621 get_file_name, get_id, get_flags, empty, read>: Declare methods.
9622 (dwarf2_read_section, get_section_name, get_section_file_name)
9623 (get_containing_section, get_section_bfd_owner)
9624 (get_section_bfd_section, get_section_name, get_section_file_name)
9625 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
9626 declare.
9627 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
9628 (dwarf2_section_info::get_bfd_owner)
9629 (dwarf2_section_info::get_bfd_section)
9630 (dwarf2_section_info::get_name)
9631 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
9632 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
9633 (dwarf2_section_info::read): Now methods.
9634 * dwarf-index-write.c (class debug_names): Update.
9635
9636 2020-02-08 Tom Tromey <tom@tromey.com>
9637
9638 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
9639 Move to dwarf2/section.h.
9640 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
9641 (get_section_bfd_section, get_section_name)
9642 (get_section_file_name, get_section_id, get_section_flags)
9643 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
9644 dwarf2/section.c.
9645 * dwarf2/section.h: New file.
9646 * dwarf2/section.c: New file, from dwarf2read.c.
9647 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
9648
9649 2020-02-08 Tom Tromey <tom@tromey.com>
9650
9651 * dwarf2read.h (read_unsigned_leb128): Don't declare.
9652 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
9653 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
9654 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
9655 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
9656 * dwarf2/leb.h: New file, from dwarf2read.c.
9657 * dwarf2/leb.c: New file, from dwarf2read.c.
9658 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
9659 Remove.
9660 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
9661 (COMMON_SFILES): Add dwarf2/leb.c.
9662
9663 2020-02-08 Joel Brobecker <brobecker@adacore.com>
9664
9665 GDB 9.1 released.
9666
9667 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
9668
9669 PR gdb/25190:
9670 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
9671 * gdb/remote.c (remote_console_output): Update.
9672 * gdb/ui-file.c (fputs_unfiltered): Rename to...
9673 (ui_file_puts): ...this.
9674 * gdb/ui-file.h (ui_file_puts): Add declaration.
9675 * gdb/utils.c (emit_style_escape): Update.
9676 (flush_wrap_buffer): Update.
9677 (fputs_maybe_filtered): Update.
9678 (fputs_unfiltered): Add function.
9679
9680 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
9681
9682 * gdb/event-loop.c (gdb_wait_for_event): Update.
9683 * gdb/printcmd.c (printf_command): Update.
9684 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
9685 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
9686 (gdb_os_flush_stderr): Update.
9687 * gdb/remote.c (remote_console_output): Update.
9688 * gdb/ui-file.c (gdb_flush): Rename to...
9689 (ui_file_flush): ...this.
9690 (stderr_file::write): Update.
9691 (stderr_file::puts): Update.
9692 * gdb/ui-file.h (gdb_flush): Rename to...
9693 (ui_file_flush): ...this.
9694 * gdb/utils.c (gdb_flush): Add function.
9695 * gdb/utils.h (gdb_flush): Add declaration.
9696
9697 2020-02-07 Tom Tromey <tromey@adacore.com>
9698
9699 PR breakpoints/24915:
9700 * source.c (find_and_open_source): Do not check basenames_may_differ.
9701
9702 2020-02-07 Tom Tromey <tom@tromey.com>
9703
9704 * README: Update gdbserver documentation.
9705 * gdbserver: Move to top level.
9706 * configure.tgt (build_gdbserver): Remove.
9707 * configure.ac: Remove --enable-gdbserver.
9708 * configure: Rebuild.
9709 * Makefile.in (distclean): Don't mention gdbserver.
9710
9711 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
9712
9713 * source-cache.c (source_cache::ensure): Surround
9714 get_plain_source_lines with a try/catch.
9715 (source_cache::get_line_charpos): Get rid of try/catch
9716 and only check for the return value of "ensure".
9717 * tui/tui-source.c (tui_source_window::set_contents):
9718 Simplify "nlines" calculation.
9719
9720 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
9721
9722 * MAINTAINERS (Write After Approval): Add myself.
9723
9724 2020-02-05 Christian Biesinger <cbiesinger@google.com>
9725
9726 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
9727 function call.
9728
9729 2020-02-05 Christian Biesinger <cbiesinger@google.com>
9730
9731 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
9732
9733 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
9734
9735 * nat/riscv-linux-tdesc.h: New file.
9736 * nat/riscv-linux-tdesc.c: New file, taking code from...
9737 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
9738 ... here.
9739 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
9740 NATDEPFILES.
9741
9742 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
9743
9744 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
9745 we don't set the fake simulator ptid to the null_ptid.
9746
9747 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
9748
9749 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
9750 * gdbthread.h (class thread_info) <resumed>: Likewise.
9751 * infrun.c (resume_1): Likewise.
9752 (proceed): Likewise.
9753 (infrun_thread_stop_requested): Likewise.
9754 (stop_all_threads): Likewise.
9755 (handle_inferior_event): Likewise.
9756 (restart_threads): Likewise.
9757 (finish_step_over): Likewise.
9758 (keep_going_stepped_thread): Likewise.
9759 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
9760 (linux_handle_extended_wait): Likewise.
9761 * record-btrace.c (get_thread_current_frame_id): Likewise.
9762 * record-full.c (record_full_wait_1): Likewise.
9763 * remote.c (remote_target::process_initial_stop_replies): Likewise.
9764 * target.c (target_resume): Likewise.
9765 * thread.c (set_running_thread): Likewise.
9766
9767 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
9768
9769 * f-valprint.c (f77_print_array_1): Changed datatype of index
9770 variable to LONGEST from int to enable it to contain bound
9771 values correctly.
9772
9773 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
9774
9775 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
9776 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
9777 offsets according to FLEN determined.
9778 (riscv_linux_nat_target::read_description): Determine FLEN
9779 dynamically.
9780 (riscv_linux_nat_target::fetch_registers): Size regset buffer
9781 according to FLEN determined.
9782 (riscv_linux_nat_target::store_registers): Likewise.
9783
9784 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
9785
9786 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
9787 when reg->group is empty and reggroup is not.
9788
9789 2020-01-31 Tom Tromey <tromey@adacore.com>
9790
9791 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
9792 Call beneath target's mourn_inferior after unpushing.
9793
9794 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
9795
9796 PR tui/9765
9797 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
9798 have enough lines to fill the screen, still return the lowest
9799 address we found.
9800
9801 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
9802
9803 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
9804 '-', '<', and '>' commands.
9805
9806 2020-01-29 Pedro Alves <palves@redhat.com>
9807 Sergio Durigan Junior <sergiodj@redhat.com>
9808
9809 * infcmd.c (construct_inferior_arguments): Assert that
9810 'argc' is greater than 0.
9811
9812 2020-01-29 Luis Machado <luis.machado@linaro.org>
9813
9814 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
9815 (BRK_INSN_MASK): Define to 0xd4200000.
9816 (aarch64_program_breakpoint_here_p): New function.
9817 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
9818 * arch-utils.c (default_program_breakpoint_here_p): Moved from
9819 breakpoint.c.
9820 * arch-utils.h (default_program_breakpoint_here_p): Moved from
9821 breakpoint.h
9822 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
9823 call gdbarch_program_breakpoint_here_p.
9824 (program_breakpoint_here): Moved to arch-utils.c, renamed to
9825 default_program_breakpoint_here_p, changed return type to bool and
9826 simplified.
9827 * breakpoint.h (program_breakpoint_here): Moved prototype to
9828 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
9829 return type to bool.
9830 * gdbarch.c: Regenerate.
9831 * gdbarch.h: Regenerate.
9832 * gdbarch.sh (program_breakpoint_here_p): New method.
9833 * infrun.c (handle_signal_stop): Call
9834 gdbarch_program_breakpoint_here_p.
9835
9836 2020-01-26 Tom Tromey <tom@tromey.com>
9837
9838 * ctfread.c (struct ctf_fp_info): Reindent.
9839 (_initialize_ctfread): Remove.
9840
9841 2020-01-26 Tom Tromey <tom@tromey.com>
9842
9843 * psymtab.c (partial_map_expand_apply)
9844 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
9845 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
9846 (psym_print_stats, psym_expand_symtabs_for_function)
9847 (psym_map_symbol_filenames, psym_map_matching_symbols)
9848 (psym_expand_symtabs_matching)
9849 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
9850 (maintenance_check_psymtabs): Use new methods.
9851 * psympriv.h (struct partial_symtab) <readin_p,
9852 get_compunit_symtab>: New methods.
9853 <readin, compunit_symtab>: Remove members.
9854 (struct standard_psymtab): New.
9855 (struct legacy_psymtab): Derive from standard_psymtab.
9856 * dwarf2read.h (struct dwarf2_psymtab): Derive from
9857 standard_psymtab.
9858 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
9859
9860 2020-01-26 Tom Tromey <tom@tromey.com>
9861
9862 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
9863 read_dependencies. Add assert.
9864 * psymtab.c (partial_symtab::read_dependencies): New method.
9865 * psympriv.h (struct partial_symtab) <read_dependencies>: New
9866 method.
9867 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
9868 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
9869 read_dependencies.
9870 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
9871 Add assert.
9872
9873 2020-01-26 Tom Tromey <tom@tromey.com>
9874
9875 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
9876 Call expand_psymtab.
9877 (xcoff_read_symtab): Call expand_psymtab.
9878 (xcoff_start_psymtab, xcoff_end_psymtab): Set
9879 legacy_expand_psymtab.
9880 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
9881 method.
9882 (struct legacy_psymtab) <expand_psymtab>: Implement.
9883 <legacy_expand_psymtab>: New member.
9884 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
9885 (parse_partial_symbols): Set legacy_expand_psymtab.
9886 (psymtab_to_symtab_1): Change argument order. Call
9887 expand_psymtab.
9888 (new_psymtab): Set legacy_expand_psymtab.
9889 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
9890 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
9891 expand_psymtab.
9892 (dwarf2_psymtab::expand_psymtab): Rename from
9893 psymtab_to_symtab_1. Call expand_psymtab.
9894 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
9895 (dbx_end_psymtab): Likewise.
9896 (dbx_psymtab_to_symtab_1): Change argument order. Call
9897 expand_psymtab.
9898 (dbx_read_symtab): Call expand_psymtab.
9899 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
9900 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
9901 (ctf_psymtab::read_symtab): Call expand_psymtab.
9902
9903 2020-01-26 Tom Tromey <tom@tromey.com>
9904
9905 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
9906 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
9907 messages.
9908 * mdebugread.c (mdebug_read_symtab): Remove prints.
9909 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
9910 assert.
9911 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
9912
9913 2020-01-26 Tom Tromey <tom@tromey.com>
9914
9915 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
9916 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
9917 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
9918 legacy_symtab.
9919 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
9920 * psymtab.c (psymtab_to_symtab): Call method.
9921 (dump_psymtab): Update.
9922 * psympriv.h (struct partial_symtab): Add virtual destructor.
9923 <read_symtab>: New method.
9924 (struct legacy_symtab): New.
9925 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
9926 (struct pst_map) <pst>: Now a legacy_psymtab.
9927 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
9928 (new_psymtab): Use legacy_psymtab.
9929 * dwarf2read.h (struct dwarf2_psymtab): New.
9930 (struct dwarf2_per_cu_data) <psymtab>: Use it.
9931 * dwarf2read.c (dwarf2_create_include_psymtab)
9932 (dwarf2_build_include_psymtabs, create_type_unit_group)
9933 (create_partial_symtab, process_psymtab_comp_unit_reader)
9934 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
9935 (set_partial_user): Use dwarf2_psymtab.
9936 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
9937 (psymtab_to_symtab_1, process_full_comp_unit)
9938 (process_full_type_unit, dwarf2_ranges_read)
9939 (dwarf2_get_pc_bounds, psymtab_include_file_name)
9940 (dwarf_decode_lines): Use dwarf2_psymtab.
9941 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
9942 (add_address_entry_worker, write_one_signatured_type)
9943 (recursively_count_psymbols, recursively_write_psymbols)
9944 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
9945 (write_debug_names): Likewise.
9946 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
9947 <pst>: Now a legacy_psymtab.
9948 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
9949 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
9950 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
9951 * ctfread.c (struct ctf_psymtab): New.
9952 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
9953 ctf_psymtab.
9954 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
9955 (create_partial_symtab): Return a ctf_psymtab.
9956 (scan_partial_symbols): Update.
9957
9958 2020-01-26 Tom Tromey <tom@tromey.com>
9959
9960 * xcoffread.c (xcoff_start_psymtab): Use new.
9961 * psymtab.c (partial_symtab::partial_symtab): New constructor,
9962 renamed from start_psymtab_common.
9963 * psympriv.h (struct partial_symtab): Add new constructor.
9964 (start_psymtab_common): Don't declare.
9965 * mdebugread.c (parse_partial_symbols): Use new.
9966 * dwarf2read.c (create_partial_symtab): Use new.
9967 * dbxread.c (start_psymtab): Use new.
9968 * ctfread.c (create_partial_symtab): Use new.
9969
9970 2020-01-26 Tom Tromey <tom@tromey.com>
9971
9972 * xcoffread.c (xcoff_end_psymtab): Use new.
9973 * psymtab.c (start_psymtab_common): Use new.
9974 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
9975 Update.
9976 * psympriv.h (struct partial_symtab): Add parameters to
9977 constructor. Don't inline.
9978 (allocate_psymtab): Don't declare.
9979 * mdebugread.c (new_psymtab): Use new.
9980 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
9981 * dbxread.c (dbx_end_psymtab): Use new.
9982
9983 2020-01-26 Tom Tromey <tom@tromey.com>
9984
9985 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
9986 allocate_psymtab. Update documentation.
9987 * psymtab.c (psymtab_storage::install_psymtab): Rename from
9988 allocate_psymtab. Do not use new.
9989 (allocate_psymtab): Use new. Update.
9990
9991 2020-01-26 Tom Tromey <tom@tromey.com>
9992
9993 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
9994 * psymtab.c (psym_print_stats): Update.
9995 * psympriv.h (struct partial_symtab) <readin,
9996 psymtabs_addrmap_supported, anonymous>: Now bool.
9997 * mdebugread.c (psymtab_to_symtab_1): Update.
9998 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
9999 (build_type_psymtabs_reader, psymtab_to_symtab_1)
10000 (process_full_comp_unit, process_full_type_unit): Update.
10001 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
10002 * ctfread.c (psymtab_to_symtab): Update.
10003
10004 2020-01-26 Tom Tromey <tom@tromey.com>
10005
10006 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
10007 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
10008 * psymtab.c (psymtab_storage): Delete psymtabs.
10009 (psymtab_storage::allocate_psymtab): Use new.
10010 (psymtab_storage::discard_psymtab): Use delete.
10011 * psympriv.h (struct partial_symtab): Add constructor and
10012 initializers.
10013
10014 2020-01-26 Tom Tromey <tom@tromey.com>
10015
10016 * machoread.c: Do not include psympriv.h.
10017
10018 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10019
10020 * NEWS: Mention the new option and the set/show commands.
10021
10022 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10023
10024 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
10025 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
10026 (validate_exec_file): New variables, enums, functions.
10027 (exec_file_locate_attach, print_section_info): Style the filenames.
10028 (_initialize_exec): Install show_exec_file_mismatch_command and
10029 set_exec_file_mismatch_command.
10030 * gdbcore.h (validate_exec_file): Declare.
10031 * infcmd.c (attach_command): Call validate_exec_file.
10032 * remote.c ( remote_target::remote_add_inferior): Likewise.
10033
10034 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10035
10036 * frame.c (find_frame_sal): Move call to get_next_frame into more
10037 inner scope.
10038 * inline-frame.c (inilne_state) <inline_state>: Update argument
10039 types.
10040 (inilne_state) <skipped_symbol>: Rename to...
10041 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
10042 (skip_inline_frames): Build vector of skipped symbols and use this
10043 to reate the inline_state.
10044 (inline_skipped_symbol): Add a comment and some assertions, fetch
10045 skipped symbol from the list.
10046
10047 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10048
10049 * buildsym.c (lte_is_less_than): Delete.
10050 (buildsym_compunit::end_symtab_with_blockvector): Create local
10051 lambda function to sort line table entries, and use
10052 std::stable_sort instead of std::sort.
10053 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
10054 markers when looking for a previous line.
10055
10056 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10057
10058 * dwarf2read.c (lnp_state_machine::record_line): Include
10059 end_sequence parameter in debug print out. Record the line if we
10060 are at an end_sequence marker even if it's not the start of a
10061 statement.
10062 * symmisc.c (maintenance_print_one_line_table): Print end of
10063 sequence markers with 'END' not '0'.
10064
10065 2020-01-24 Pedro Alves <palves@redhat.com>
10066
10067 PR gdb/25410
10068 * thread.c (scoped_restore_current_thread::restore): Use
10069 switch_to_inferior_no_thread.
10070 * exec.c: Include "progspace-and-thread.h".
10071 (add_target_sections, remove_target_sections):
10072 scoped_restore_current_pspace_and_thread instead of
10073 scoped_restore_current_thread.
10074 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
10075 and aspace to the inferior before calling clone_program_space.
10076 Remove stale comment.
10077
10078 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10079
10080 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
10081 (arm_netbsd_nat_target::fetch_registers): ...this.
10082 (arm_nbsd_nat_target::store_registers): Rename to...
10083 (arm_netbsd_nat_target::store_registers): ...this.
10084
10085 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10086
10087 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
10088 register_t.
10089
10090 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10091
10092 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
10093 Update comment.
10094 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
10095 Likewise.
10096 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
10097 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
10098 the correct replacement (iterate_over_regset_sections).
10099 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
10100 Update comment.
10101
10102 2020-01-24 Graham Markall <graham.markall@embecosm.com>
10103
10104 PR gdb/23718
10105 * gdb/python/python.c (execute_gdb_command): Call
10106 async_enable_stdin in catch block.
10107
10108 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10109
10110 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
10111 SWITCH_THRU_ALL_UIS.
10112
10113 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10114
10115 PR tui/9765
10116 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
10117 comment, add extra parameter, and update to store previous symbol
10118 when appropriate.
10119 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
10120 add extra parameter.
10121 * tui/tui-disasm.c (tui_disassemble): Update header comment,
10122 remove unneeded parameter, add try/catch around gdb_print_insn,
10123 rewrite to add items to asm_lines vector.
10124 (tui_find_backward_disassembly_start_address): New function.
10125 (tui_find_disassembly_address): Updated throughout.
10126 (tui_disasm_window::set_contents): Update for changes to
10127 tui_disassemble.
10128 (tui_disasm_window::do_scroll_vertical): No need to adjust the
10129 number of lines to scroll.
10130
10131 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10132
10133 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
10134 (SECT_OFF_DATA): Likewise.
10135 (SECT_OFF_RODATA): Likewise.
10136 (SECT_OFF_TEXT): Likewise.
10137 (SECT_OFF_BSS): Likewise.
10138 (struct objfile) <text_section_offset, data_section_offset>: New
10139 methods.
10140 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
10141 objfile::text_section_offset.
10142 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
10143 * coffread.c (coff_symtab_read): Likewise.
10144 (enter_linenos): Likewise.
10145 (process_coff_symbol): Likewise.
10146 * ctfread.c (get_objfile_text_range): Likewise.
10147 * dtrace-probe.c (dtrace_probe::get_relocated_address):
10148 Use objfile::data_section_offset.
10149 * dwarf2-frame.c (execute_cfa_program): Use
10150 objfile::text_section_offset.
10151 (dwarf2_frame_find_fde): Likewise.
10152 * dwarf2read.c (create_addrmap_from_index): Likewise.
10153 (create_addrmap_from_aranges): Likewise.
10154 (dw2_find_pc_sect_compunit_symtab): Likewise.
10155 (process_psymtab_comp_unit_reader): Likewise.
10156 (add_partial_symbol): Likewise.
10157 (add_partial_subprogram): Likewise.
10158 (process_full_comp_unit): Likewise.
10159 (read_file_scope): Likewise.
10160 (read_func_scope): Likewise.
10161 (read_lexical_block_scope): Likewise.
10162 (read_call_site_scope): Likewise.
10163 (dwarf2_rnglists_process): Likewise.
10164 (dwarf2_ranges_process): Likewise.
10165 (dwarf2_ranges_read): Likewise.
10166 (dwarf_decode_lines_1): Likewise.
10167 (new_symbol): Likewise.
10168 (dwarf2_fetch_die_loc_sect_off): Likewise.
10169 (dwarf2_per_cu_text_offset): Likewise.
10170 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
10171 * hppa-tdep.c (read_unwind_info): Likewise.
10172 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
10173 * psympriv.h (struct partial_symtab): Likewise.
10174 * psymtab.c (find_pc_sect_psymtab): Likewise.
10175 * solib-svr4.c (enable_break): Likewise.
10176 * stap-probe.c (relocate_address): Use
10177 objfile::data_section_offset.
10178 * xcoffread.c (enter_line_range): Use
10179 objfile::text_section_offset.
10180 (read_xcoff_symtab): Likewise.
10181
10182 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
10183
10184 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
10185 declaration to narrower scopes.
10186
10187 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
10188
10189 * darwin-nat.h (struct darwin_exception_msg, enum
10190 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
10191 Move up.
10192 (class darwin_nat_target) <wait_1, check_new_threads,
10193 decode_exception_message, decode_message, stop_inferior,
10194 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
10195 * darwin-nat.c (darwin_check_new_threads): Rename to...
10196 (darwin_nat_target::check_new_threads): ... this.
10197 (darwin_suspend_inferior_it): Remove.
10198 (darwin_decode_exception_message): Rename to...
10199 (darwin_nat_target::decode_exception_message): ... this.
10200 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
10201 (darwin_decode_message): Rename to...
10202 (darwin_nat_target::decode_message): ... this.
10203 (cancel_breakpoint): Rename to...
10204 (darwin_nat_target::cancel_breakpoint): ... this.
10205 (darwin_wait): Rename to...
10206 (darwin_nat_target::wait_1): ... this. Use range-based for loop
10207 instead of iterate_over_inferiors.
10208 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
10209 (darwin_stop_inferior): Rename to...
10210 (darwin_nat_target::stop_inferior): ... this.
10211 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
10212 (darwin_init_thread_list): Rename to...
10213 (darwin_nat_target::init_thread_list): ... this.
10214 (darwin_ptrace_him): Rename to...
10215 (darwin_nat_target::ptrace_him): ... this.
10216 (darwin_nat_target::create_inferior): Pass lambda function to
10217 fork_inferior.
10218 (darwin_nat_target::detach): Call stop_inferior instead of
10219 darwin_stop_inferior.
10220 * fork-inferior.h (fork_inferior): Change init_trace_fun
10221 parameter to gdb::function_view.
10222 * fork-inferior.c (fork_inferior): Likewise.
10223
10224 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
10225
10226 * i386-cygwin-tdep.c (core_process_module_section): Update.
10227 * windows-nat.c (struct lm_info_windows): Add text_offset.
10228 (windows_xfer_shared_libraries): Update.
10229 * windows-tdep.c (windows_xfer_shared_library):
10230 Add text_offset_cached argument.
10231 * windows-tdep.h (windows_xfer_shared_library): Update.
10232
10233 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10234
10235 * gdbarch.sh: Add declaration for _initialize_gdbarch.
10236
10237 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10238
10239 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
10240 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
10241 replace with range-based for.
10242 (gdbsim_interrupt_inferior): Remove.
10243 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
10244 with a range-based for. Inline code from
10245 gdbsim_interrupt_inferior.
10246
10247 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10248
10249 * infrun.c (proceed): Fix indentation.
10250
10251 2020-01-21 Tom Tromey <tromey@adacore.com>
10252
10253 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
10254 * python/python.c (python_extension_ops): Update.
10255 (gdbpy_colorize): New function.
10256 * python/lib/gdb/__init__.py (colorize): New function.
10257 * extension.h (ext_lang_colorize): Declare.
10258 * extension.c (ext_lang_colorize): New function.
10259 * extension-priv.h (struct extension_language_ops) <colorize>: New
10260 member.
10261 * cli/cli-style.c (_initialize_cli_style): Update help text.
10262
10263 2020-01-21 Luis Machado <luis.machado@linaro.org>
10264
10265 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
10266 <cond>: Change type to bool.
10267 (aarch64_displaced_step_b_cond): Update cond to use bool type.
10268 (aarch64_displaced_step_cb): Likewise.
10269 (aarch64_displaced_step_tb): Likewise.
10270
10271 2020-01-21 Luis Machado <luis.machado@linaro.org>
10272
10273 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
10274 output.
10275
10276 2020-01-21 Luis Machado <luis.machado@linaro.org>
10277
10278 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
10279 <pc_adjust>: Adjust the documentation.
10280 (aarch64_displaced_step_fixup): Check if PC really moved before
10281 adjusting it.
10282
10283 2020-01-19 Tom Tromey <tom@tromey.com>
10284
10285 * disasm.c (~gdb_disassembler): New destructor.
10286 (gdb_buffered_insn_length): Call disassemble_free_target.
10287 * disasm.h (class gdb_disassembler): Declare destructor. Use
10288 DISABLE_COPY_AND_ASSIGN.
10289
10290 2020-01-19 Tom Tromey <tom@tromey.com>
10291
10292 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
10293 (die_reader_func_ftype): Remove.
10294 (cutu_reader): New class.
10295 (dw2_get_file_names_reader): Remove "data" parameter.
10296 (dw2_get_file_names): Use cutu_reader.
10297 (create_debug_type_hash_table): Update.
10298 (read_cutu_die_from_dwo): Update comment.
10299 (lookup_dwo_unit): Add dwo_name parameter.
10300 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
10301 die_reader_func_ftype and data parameters.
10302 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
10303 Remove die_reader_func_ftype and data parameters.
10304 (~cutu_reader): New; from init_cutu_and_read_dies.
10305 (cutu_reader::cutu_reader): Rename from
10306 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
10307 and data parameters.
10308 (init_cutu_and_read_dies_simple): Remove.
10309 (struct process_psymtab_comp_unit_data): Remove.
10310 (process_psymtab_comp_unit_reader): Remove data parameter; add
10311 want_partial_unit and pretend_language parameters.
10312 (process_psymtab_comp_unit): Use cutu_reader.
10313 (build_type_psymtabs_reader): Remove data parameter.
10314 (build_type_psymtabs_1): Use cutu_reader.
10315 (process_skeletonless_type_unit): Likewise.
10316 (load_partial_comp_unit_reader): Remove.
10317 (load_partial_comp_unit): Use cutu_reader.
10318 (load_full_comp_unit_reader): Remove.
10319 (load_full_comp_unit): Use cutu_reader.
10320 (struct create_dwo_cu_data): Remove.
10321 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
10322 dwo_unit parameters.
10323 (create_cus_hash_table): Use cutu_reader.
10324 (struct dwarf2_read_addr_index_data): Remove.
10325 (dwarf2_read_addr_index_reader): Remove.
10326 (dwarf2_read_addr_index): Use cutu_reader.
10327 (read_signatured_type_reader): Remove.
10328 (read_signatured_type): Use cutu_reader.
10329
10330 2020-01-19 Tom Tromey <tom@tromey.com>
10331
10332 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
10333 * tui/tui-wingeneral.h (class tui_suppress_output): New.
10334 (tui_wrefresh): Declare.
10335 * tui/tui-wingeneral.c (suppress_output): New global.
10336 (tui_suppress_output, ~tui_suppress_output): New constructor and
10337 destructor.
10338 (tui_wrefresh): New function.
10339 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
10340 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
10341 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
10342 method.
10343 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
10344 tui_wrefresh.
10345 (tui_data_window::no_refresh): New method.
10346 (tui_data_item_window::refresh_window): Call tui_wrefresh.
10347 (tui_reg_command): Use tui_suppress_output
10348 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
10349 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
10350 method.
10351 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
10352
10353 2020-01-19 Tom Tromey <tom@tromey.com>
10354
10355 * tui/tui-winsource.c (tui_update_source_windows_with_line):
10356 Handle case where symtab is null.
10357
10358 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
10359
10360 * linux-fork.c (one_fork_p): Simplify.
10361
10362 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10363
10364 * top.c (struct qt_args): Remove.
10365 (kill_or_detach): Change return type to void, replace `void *`
10366 parameter with a proper one.
10367 (print_inferior_quit_action): Likewise.
10368 (quit_confirm): Use range-based for loop to iterate over inferiors.
10369 (quit_force): Likewise.
10370
10371 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10372
10373 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
10374 `void *` parameter with proper parameters.
10375 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
10376 (print_one_inferior): Change return type to void, replace `void *`
10377 parameter with proper parameters.
10378 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
10379 inferiors.
10380 (get_other_inferior): Remove.
10381 (mi_cmd_remove_inferior): Use range-based loop to iterate over
10382 inferiors.
10383
10384 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10385
10386 * mi/mi-interp.c (report_initial_inferior): Remove.
10387 (mi_interp::init): Use range-based for to iterate over inferiors.
10388
10389 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10390
10391 * python/py-inferior.c (build_inferior_list): Remove.
10392 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
10393
10394 2020-01-16 Christian Biesinger <cbiesinger@google.com>
10395
10396 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
10397 (btrace_stitch_trace): Likewise.
10398 * charset.c (intermediate_encoding): Likewise (vaild).
10399 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
10400 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
10401 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
10402
10403 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
10404
10405 * windows-tdep.c (windows_get_tlb_type):
10406 Add rtl_user_process_parameters type.
10407
10408 2020-01-16 Pedro Alves <palves@redhat.com>
10409 Norbert Lange <nolange79@gmail.com>
10410
10411 PR build/24805
10412 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
10413 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
10414 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
10415 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
10416 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
10417 (ps_plog): Redeclare exported functions with default visibility.
10418
10419 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
10420
10421 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
10422 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
10423
10424 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
10425
10426 * infcmd.c (post_create_inferior): Use get_thread_regcache
10427 instead of get_current_regcache.
10428
10429 2020-01-14 Tom Tromey <tom@tromey.com>
10430
10431 PR symtab/12535:
10432 * python/python.c (gdbpy_decode_line): Treat empty string the same
10433 as no argument.
10434
10435 2020-01-14 Tom Tromey <tom@tromey.com>
10436
10437 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
10438
10439 2020-01-14 Tom Tromey <tom@tromey.com>
10440
10441 * nat/linux-btrace.c: Don't include <config.h>.
10442 * nat/linux-ptrace.c: Don't include <config.h>.
10443 * nat/x86-linux-dregs.c: Don't include <config.h>.
10444
10445 2020-01-14 Tom Tromey <tom@tromey.com>
10446
10447 * configure: Rebuild.
10448 * configure.ac: Move many checks to ../gdbsupport/common.m4.
10449
10450 2020-01-14 Tom Tromey <tom@tromey.com>
10451
10452 * nat/x86-linux-dregs.c: Include configh.h.
10453 * nat/linux-ptrace.c: Include configh.h.
10454 * nat/linux-btrace.c: Include configh.h.
10455 * defs.h: Include config.h, bfd.h.
10456 * configure.ac: Don't source common.host.
10457 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
10458 * configure: Rebuild.
10459 * acinclude.m4: Update path.
10460 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
10461 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
10462 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
10463 (CLIBS): Add LIBSUPPORT.
10464 (CDEPS): Likewise.
10465 (COMMON_SFILES): Remove gdbsupport files.
10466 (HFILES_NO_SRCDIR): Likewise.
10467 (stamp-version): Update path to create-version.sh.
10468 (ALLDEPFILES): Remove gdbsupport files.
10469
10470 2020-01-14 Tom Tromey <tom@tromey.com>
10471
10472 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
10473 USE_WIN32API when needed.
10474 * configure.ac (USE_WIN32API): Don't define.
10475 (WIN32LIBS): Use WIN32APILIBS.
10476 * configure: Rebuild.
10477
10478 2020-01-14 Tom Tromey <tom@tromey.com>
10479
10480 * configure: Rebuild.
10481 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
10482
10483 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10484
10485 * skip.c (skip_function_command): Make skip w/o arguments use the
10486 name of the inlined function if pc is inside any inlined function.
10487
10488 2020-01-14 Luis Machado <luis.machado@linaro.org>
10489
10490 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
10491 * infrun.c (resume_1): Likewise.
10492 (handle_inferior_event): Remove stale comment.
10493 * linux-nat.c (linux_nat_target::resume): Update comments.
10494 (save_stop_reason): Likewise.
10495 (linux_nat_filter_event): Likewise.
10496 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
10497
10498 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
10499
10500 * elfread.c (record_minimal_symbol): Set section index to 0 for
10501 non-allocatable sections.
10502
10503
10504 2020-01-13 Ali Tamur <tamur@google.com>
10505
10506 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
10507 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
10508 to gdb::optional. Update comments.
10509 (dwo_file): Update comments.
10510 (read_attribute): Update API to take an additional out parameter,
10511 need_reprocess. This is used to mark attributes that need other
10512 attributes (e.g. str_offsets_base) for correct computation which may not
10513 have been read yet.
10514 (read_attribute_reprocess): New function declaration.
10515 (read_addr_index): Likewise.
10516 (read_dwo_str_index): Likewise.
10517 (read_stub_str_index): Likewise.
10518 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
10519 (lookup_addr_base): New function definition.
10520 (lookup_ranges_base): Likewise.
10521 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
10522 lookup_ranges_base.
10523 (init_cutu_and_read_dies): Update comments.
10524 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
10525 unit. This is used to inherit parent's str_offsets_base and addr_base.
10526 Update comments.
10527 (init_cutu_and_read_dies_simple): Reflect API changes.
10528 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
10529 (create_cus_hash_table): Change API to take parent compile unit.
10530 Reflect API changes.
10531 (open_and_init_dwo_file): Reflect API changes.
10532 (dwarf2_get_pc_bounds): Update comments.
10533 (dwarf2_record_block_ranges): Likewise.
10534 (read_full_die_1): Change implementation to reprocess attributes that
10535 need str_offsets_base and addr_base.
10536 (partial_die_info::read): Likewise.
10537 (read_attribute_reprocess): New function definition.
10538 (read_attribute_value): Change API to take an additional out parameter,
10539 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
10540 when a non-dwo compile unit has index based attributes.
10541 (read_attribute): Reflect API changes.
10542 (read_addr_index_1): Reflect API changes. Update comments.
10543 (dwarf2_read_addr_index_data): Reflect API changes.
10544 (dwarf2_read_addr_index): Likewise.
10545 (read_str_index): Change API and implementation. This becomes a helper
10546 to be used by the new string index related methods. Update error
10547 message and comments.
10548 (read_dwo_str_index): New function definition.
10549 (read_stub_str_index): Likewise.
10550 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
10551 * symfile.h (dwarf2_debug_sections): Likewise.
10552 * xcoffread.c (dwarf2_debug_sections): Likewise.
10553
10554 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10555
10556 * gdbcore.h (struct core_fns) <core_read_registers>: Change
10557 core_reg_sect type to gdb_byte *.
10558 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
10559 * cris-tdep.c (fetch_core_registers): Likewise.
10560 * corelow.c (core_target::get_core_register_section): Change
10561 type of `contents` to gdb::byte_vector.
10562
10563 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
10564
10565 * tui/tui-wingeneral.c (box_win): Position the title in the center
10566 of the border.
10567
10568 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10569
10570 * corelow.c (core_target::get_core_register_section): Use
10571 std::vector instead of alloca.
10572
10573 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10574
10575 * warning.m4: Add -Wmissing-declarations to build_warnings.
10576 * configure: Re-generate.
10577
10578 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10579
10580 * python/python.c (init__gdb_module): Add declaration.
10581
10582 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10583
10584 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
10585 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
10586 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
10587 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
10588 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
10589 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
10590 * ada-exp.y (_initialize_ada_exp): Add declaration.
10591 * ada-lang.c (_initialize_ada_language): Add declaration.
10592 * ada-tasks.c (_initialize_tasks): Add declaration.
10593 * agent.c (_initialize_agent): Add declaration.
10594 * aix-thread.c (_initialize_aix_thread): Add declaration.
10595 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
10596 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
10597 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
10598 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
10599 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
10600 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
10601 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
10602 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
10603 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
10604 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
10605 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
10606 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
10607 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
10608 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
10609 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
10610 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
10611 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
10612 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
10613 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
10614 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
10615 * annotate.c (_initialize_annotate): Add declaration.
10616 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
10617 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
10618 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
10619 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
10620 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
10621 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
10622 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
10623 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
10624 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
10625 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
10626 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
10627 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
10628 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
10629 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
10630 * auto-load.c (_initialize_auto_load): Add declaration.
10631 * auxv.c (_initialize_auxv): Add declaration.
10632 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
10633 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
10634 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
10635 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
10636 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
10637 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
10638 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
10639 * breakpoint.c (_initialize_breakpoint): Add declaration.
10640 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
10641 * btrace.c (_initialize_btrace): Add declaration.
10642 * charset.c (_initialize_charset): Add declaration.
10643 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
10644 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
10645 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
10646 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
10647 * cli/cli-script.c (_initialize_cli_script): Add declaration.
10648 * cli/cli-style.c (_initialize_cli_style): Add declaration.
10649 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
10650 * coffread.c (_initialize_coffread): Add declaration.
10651 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
10652 * compile/compile.c (_initialize_compile): Add declaration.
10653 * complaints.c (_initialize_complaints): Add declaration.
10654 * completer.c (_initialize_completer): Add declaration.
10655 * copying.c (_initialize_copying): Add declaration.
10656 * corefile.c (_initialize_core): Add declaration.
10657 * corelow.c (_initialize_corelow): Add declaration.
10658 * cp-abi.c (_initialize_cp_abi): Add declaration.
10659 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
10660 * cp-support.c (_initialize_cp_support): Add declaration.
10661 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
10662 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
10663 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
10664 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
10665 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
10666 * ctfread.c (_initialize_ctfread): Add declaration.
10667 * d-lang.c (_initialize_d_language): Add declaration.
10668 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
10669 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
10670 * dbxread.c (_initialize_dbxread): Add declaration.
10671 * dcache.c (_initialize_dcache): Add declaration.
10672 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
10673 * disasm.c (_initialize_disasm): Add declaration.
10674 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
10675 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
10676 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
10677 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
10678 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
10679 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
10680 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
10681 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
10682 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
10683 * elfread.c (_initialize_elfread): Add declaration.
10684 * exec.c (_initialize_exec): Add declaration.
10685 * extension.c (_initialize_extension): Add declaration.
10686 * f-lang.c (_initialize_f_language): Add declaration.
10687 * f-valprint.c (_initialize_f_valprint): Add declaration.
10688 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
10689 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
10690 * filesystem.c (_initialize_filesystem): Add declaration.
10691 * findcmd.c (_initialize_mem_search): Add declaration.
10692 * findvar.c (_initialize_findvar): Add declaration.
10693 * fork-child.c (_initialize_fork_child): Add declaration.
10694 * frame-base.c (_initialize_frame_base): Add declaration.
10695 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
10696 * frame.c (_initialize_frame): Add declaration.
10697 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
10698 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
10699 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
10700 * gcore.c (_initialize_gcore): Add declaration.
10701 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
10702 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
10703 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
10704 * gdbarch.c (_initialize_gdbarch): Add declaration.
10705 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
10706 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
10707 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
10708 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
10709 * go-lang.c (_initialize_go_language): Add declaration.
10710 * go32-nat.c (_initialize_go32_nat): Add declaration.
10711 * guile/guile.c (_initialize_guile): Add declaration.
10712 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
10713 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
10714 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
10715 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
10716 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
10717 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
10718 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
10719 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
10720 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
10721 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
10722 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
10723 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
10724 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
10725 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
10726 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
10727 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
10728 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
10729 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
10730 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
10731 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
10732 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
10733 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
10734 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
10735 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
10736 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
10737 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
10738 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
10739 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
10740 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
10741 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
10742 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
10743 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
10744 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
10745 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
10746 * infcall.c (_initialize_infcall): Add declaration.
10747 * infcmd.c (_initialize_infcmd): Add declaration.
10748 * inflow.c (_initialize_inflow): Add declaration.
10749 * infrun.c (_initialize_infrun): Add declaration.
10750 * interps.c (_initialize_interpreter): Add declaration.
10751 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
10752 * jit.c (_initialize_jit): Add declaration.
10753 * language.c (_initialize_language): Add declaration.
10754 * linux-fork.c (_initialize_linux_fork): Add declaration.
10755 * linux-nat.c (_initialize_linux_nat): Add declaration.
10756 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
10757 * linux-thread-db.c (_initialize_thread_db): Add declaration.
10758 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
10759 * m2-lang.c (_initialize_m2_language): Add declaration.
10760 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
10761 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
10762 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
10763 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
10764 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
10765 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
10766 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
10767 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
10768 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
10769 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
10770 * machoread.c (_initialize_machoread): Add declaration.
10771 * macrocmd.c (_initialize_macrocmd): Add declaration.
10772 * macroscope.c (_initialize_macroscope): Add declaration.
10773 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
10774 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
10775 * maint.c (_initialize_maint_cmds): Add declaration.
10776 * mdebugread.c (_initialize_mdebugread): Add declaration.
10777 * memattr.c (_initialize_mem): Add declaration.
10778 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
10779 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
10780 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
10781 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
10782 * mi/mi-main.c (_initialize_mi_main): Add declaration.
10783 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
10784 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
10785 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
10786 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
10787 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
10788 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
10789 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
10790 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
10791 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
10792 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
10793 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
10794 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
10795 * mipsread.c (_initialize_mipsread): Add declaration.
10796 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
10797 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
10798 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
10799 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
10800 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
10801 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
10802 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
10803 * nto-procfs.c (_initialize_procfs): Add declaration.
10804 * objc-lang.c (_initialize_objc_language): Add declaration.
10805 * observable.c (_initialize_observer): Add declaration.
10806 * opencl-lang.c (_initialize_opencl_language): Add declaration.
10807 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
10808 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
10809 * osabi.c (_initialize_gdb_osabi): Add declaration.
10810 * osdata.c (_initialize_osdata): Add declaration.
10811 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
10812 * parse.c (_initialize_parse): Add declaration.
10813 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
10814 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
10815 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
10816 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
10817 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
10818 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
10819 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
10820 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
10821 * printcmd.c (_initialize_printcmd): Add declaration.
10822 * probe.c (_initialize_probe): Add declaration.
10823 * proc-api.c (_initialize_proc_api): Add declaration.
10824 * proc-events.c (_initialize_proc_events): Add declaration.
10825 * proc-service.c (_initialize_proc_service): Add declaration.
10826 * procfs.c (_initialize_procfs): Add declaration.
10827 * producer.c (_initialize_producer): Add declaration.
10828 * psymtab.c (_initialize_psymtab): Add declaration.
10829 * python/python.c (_initialize_python): Add declaration.
10830 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
10831 * record-btrace.c (_initialize_record_btrace): Add declaration.
10832 * record-full.c (_initialize_record_full): Add declaration.
10833 * record.c (_initialize_record): Add declaration.
10834 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
10835 * regcache.c (_initialize_regcache): Add declaration.
10836 * reggroups.c (_initialize_reggroup): Add declaration.
10837 * remote-notif.c (_initialize_notif): Add declaration.
10838 * remote-sim.c (_initialize_remote_sim): Add declaration.
10839 * remote.c (_initialize_remote): Add declaration.
10840 * reverse.c (_initialize_reverse): Add declaration.
10841 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
10842 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
10843 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
10844 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
10845 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
10846 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
10847 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
10848 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
10849 Add declaration.
10850 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
10851 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
10852 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
10853 * rust-exp.y (_initialize_rust_exp): Add declaration.
10854 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
10855 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
10856 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
10857 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
10858 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
10859 * score-tdep.c (_initialize_score_tdep): Add declaration.
10860 * ser-go32.c (_initialize_ser_dos): Add declaration.
10861 * ser-mingw.c (_initialize_ser_windows): Add declaration.
10862 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
10863 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
10864 * ser-uds.c (_initialize_ser_socket): Add declaration.
10865 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
10866 * serial.c (_initialize_serial): Add declaration.
10867 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
10868 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
10869 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
10870 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
10871 * skip.c (_initialize_step_skip): Add declaration.
10872 * sol-thread.c (_initialize_sol_thread): Add declaration.
10873 * solib-aix.c (_initialize_solib_aix): Add declaration.
10874 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
10875 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
10876 * solib-frv.c (_initialize_frv_solib): Add declaration.
10877 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
10878 * solib-target.c (_initialize_solib_target): Add declaration.
10879 * solib.c (_initialize_solib): Add declaration.
10880 * source-cache.c (_initialize_source_cache): Add declaration.
10881 * source.c (_initialize_source): Add declaration.
10882 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
10883 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
10884 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
10885 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
10886 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
10887 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
10888 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
10889 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
10890 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
10891 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
10892 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
10893 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
10894 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
10895 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
10896 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
10897 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
10898 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
10899 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
10900 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
10901 * stabsread.c (_initialize_stabsread): Add declaration.
10902 * stack.c (_initialize_stack): Add declaration.
10903 * stap-probe.c (_initialize_stap_probe): Add declaration.
10904 * std-regs.c (_initialize_frame_reg): Add declaration.
10905 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
10906 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
10907 * symfile.c (_initialize_symfile): Add declaration.
10908 * symmisc.c (_initialize_symmisc): Add declaration.
10909 * symtab.c (_initialize_symtab): Add declaration.
10910 * target.c (_initialize_target): Add declaration.
10911 * target-connection.c (_initialize_target_connection): Add
10912 declaration.
10913 * target-dcache.c (_initialize_target_dcache): Add declaration.
10914 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
10915 * thread.c (_initialize_thread): Add declaration.
10916 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
10917 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
10918 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
10919 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
10920 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
10921 * tracectf.c (_initialize_ctf): Add declaration.
10922 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
10923 * tracefile.c (_initialize_tracefile): Add declaration.
10924 * tracepoint.c (_initialize_tracepoint): Add declaration.
10925 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
10926 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
10927 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
10928 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
10929 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
10930 * tui/tui-win.c (_initialize_tui_win): Add declaration.
10931 * tui/tui.c (_initialize_tui): Add declaration.
10932 * typeprint.c (_initialize_typeprint): Add declaration.
10933 * ui-style.c (_initialize_ui_style): Add declaration.
10934 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
10935 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
10936 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
10937 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
10938 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
10939 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
10940 * unittests/filtered_iterator-selftests.c
10941 (_initialize_filtered_iterator_selftests): Add declaration.
10942 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
10943 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
10944 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
10945 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
10946 * unittests/main-thread-selftests.c
10947 (_initialize_main_thread_selftests): Add declaration.
10948 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
10949 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
10950 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
10951 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
10952 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
10953 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
10954 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
10955 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
10956 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
10957 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
10958 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
10959 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
10960 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
10961 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
10962 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
10963 declaration.
10964 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
10965 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
10966 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
10967 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
10968 * user-regs.c (_initialize_user_regs): Add declaration.
10969 * utils.c (_initialize_utils): Add declaration.
10970 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
10971 * valops.c (_initialize_valops): Add declaration.
10972 * valprint.c (_initialize_valprint): Add declaration.
10973 * value.c (_initialize_values): Add declaration.
10974 * varobj.c (_initialize_varobj): Add declaration.
10975 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
10976 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
10977 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
10978 * windows-nat.c (_initialize_windows_nat): Add declaration.
10979 (_initialize_check_for_gdb_ini): Add declaration.
10980 (_initialize_loadable): Add declaration.
10981 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
10982 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
10983 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
10984 * xcoffread.c (_initialize_xcoffread): Add declaration.
10985 * xml-support.c (_initialize_xml_support): Add declaration.
10986 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
10987 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
10988 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
10989 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
10990
10991 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10992
10993 * regformats/regdat.sh: Generate declaration for init function.
10994
10995 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10996
10997 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
10998 up.
10999 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
11000 close_one_inferior>: New methods.
11001 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
11002 pass down target to find_inferior_pid.
11003 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
11004 Pass down target to find_inferior_ptid.
11005 (gdbsim_target::create_inferior): Pass down target to
11006 add_thread_silent.
11007 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
11008 target down to find_inferior_ptid and switch_to_thread.
11009 (gdbsim_target::close): Update to call close_one_inferior.
11010 (struct resume_data): Remove.
11011 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
11012 directly, rather than through a void pointer.
11013 (gdbsim_target::resume): Update to call resume_one_inferior.
11014
11015 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
11016
11017 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
11018
11019 2020-01-12 Pedro Alves <palves@redhat.com>
11020
11021 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
11022 directly for the current inferior instead of
11023 discard_all_inferiors.
11024 (discard_all_inferiors): Delete.
11025
11026 2020-01-11 Tom Tromey <tom@tromey.com>
11027
11028 * tui/tui-wingeneral.c (box_win): Check cli_styling.
11029 * tui/tui-winsource.c (tui_source_window_base::refill): Use
11030 deprecated_safe_get_selected_frame.
11031
11032 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
11033
11034 * inferior.c (print_inferior): Switch inferior before printing it.
11035
11036 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
11037 Pedro Alves <palves@redhat.com>
11038
11039 * progspace-and-thread.c (switch_to_program_space_and_thread):
11040 Assert there's an inferior for PSPACE. Use
11041 switch_to_inferior_no_thread to switch the inferior too.
11042 * progspace.c (program_space::~program_space): Call
11043 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
11044 (program_space::free_all_objfiles): Don't call clear_symtab_users
11045 here.
11046 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
11047
11048 2020-01-10 Pedro Alves <palves@redhat.com>
11049
11050 * NEWS: Mention multi-target debugging, "info connections", and
11051 "add-inferior -no-connection".
11052
11053 2020-01-10 Pedro Alves <palves@redhat.com>
11054
11055 * infrun.c: Include "target-connection.h".
11056 (check_multi_target_resumption): New.
11057 (proceed): Call it.
11058 * target-connection.c (make_target_connection_string): Make
11059 extern.
11060 * target-connection.h (make_target_connection_string): Declare.
11061
11062 2020-01-10 Pedro Alves <palves@redhat.com>
11063
11064 * Makefile.in (COMMON_SFILES): Add target-connection.c.
11065 * inferior.c (uiout_field_connection): New function.
11066 (print_inferior): Add new "connection-id" column.
11067 (add_inferior_command): Show connection number/string of added
11068 inferior.
11069 * process-stratum-target.h
11070 (process_stratum_target::connection_string): New virtual method.
11071 (process_stratum_target::connection_number): New field.
11072 * remote.c (remote_target::connection_string): New override.
11073 * target-connection.c: New file.
11074 * target-connection.h: New file.
11075 * target.c (decref_target): Remove process_stratum targets from
11076 the connection list.
11077 (target_stack::push): Add process_stratum targets to the
11078 connection list.
11079
11080 2020-01-10 Pedro Alves <palves@redhat.com>
11081
11082 Revert:
11083 2016-04-12 Pedro Alves <palves@redhat.com>
11084 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
11085 Remove references to name.
11086 * serial.h (struct serial) <name>: Delete.
11087
11088 2020-01-10 Pedro Alves <palves@redhat.com>
11089
11090 * gdbarch-selftests.c (register_to_value_test): Remove "target
11091 already pushed" check.
11092
11093 2020-01-10 Pedro Alves <palves@redhat.com>
11094 John Baldwin <jhb@FreeBSD.org>
11095
11096 * aarch64-linux-nat.c
11097 (aarch64_linux_nat_target::thread_architecture): Adjust.
11098 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
11099 (task_command_1): Likewise.
11100 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
11101 (aix_thread_target::wait, aix_thread_target::fetch_registers)
11102 (aix_thread_target::store_registers)
11103 (aix_thread_target::thread_alive): Adjust.
11104 * amd64-fbsd-tdep.c: Include "inferior.h".
11105 (amd64fbsd_get_thread_local_address): Pass down target.
11106 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
11107 thread's gdbarch instead of target_gdbarch.
11108 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
11109 get_last_target_status.
11110 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
11111 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
11112 inferiors.
11113 (update_inserted_breakpoint_locations): Skip if inferiors with no
11114 execution.
11115 (update_global_location_list): When handling moribund locations,
11116 find representative inferior for location's pspace, and use thread
11117 count of its process_stratum target.
11118 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
11119 * bsd-uthread.c (bsd_uthread_target::wait): Use
11120 as_process_stratum_target and adjust thread_change_ptid and
11121 add_thread calls.
11122 (bsd_uthread_target::update_thread_list): Use
11123 as_process_stratum_target and adjust find_thread_ptid,
11124 thread_change_ptid and add_thread calls.
11125 * btrace.c (maint_btrace_packet_history_cmd): Adjust
11126 find_thread_ptid call.
11127 * corelow.c (add_to_thread_list): Adjust add_thread call.
11128 (core_target_open): Adjust add_thread_silent and thread_count
11129 calls.
11130 (core_target::pid_to_str): Adjust find_inferior_ptid call.
11131 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
11132 * event-top.c (async_disconnect): Pop targets from all inferiors.
11133 * exec.c (add_target_sections): Push exec target on all inferiors
11134 sharing the program space.
11135 (remove_target_sections): Remove the exec target from all
11136 inferiors sharing the program space.
11137 (exec_on_vfork): New.
11138 * exec.h (exec_on_vfork): Declare.
11139 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
11140 Pass it down.
11141 (fbsd_nat_target::update_thread_list): Adjust.
11142 (fbsd_nat_target::resume): Adjust.
11143 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
11144 down.
11145 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
11146 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
11147 get_thread_arch_regcache call.
11148 * fork-child.c (gdb_startup_inferior): Pass target down to
11149 startup_inferior and set_executing.
11150 * gdbthread.h (struct process_stratum_target): Forward declare.
11151 (add_thread, add_thread_silent, add_thread_with_info)
11152 (in_thread_list): Add process_stratum_target parameter.
11153 (find_thread_ptid(inferior*, ptid_t)): New overload.
11154 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
11155 parameter.
11156 (all_threads()): Delete overload.
11157 (all_threads, all_non_exited_threads): Add process_stratum_target
11158 parameter.
11159 (all_threads_safe): Use brace initialization.
11160 (thread_count): Add process_stratum_target parameter.
11161 (set_resumed, set_running, set_stop_requested, set_executing)
11162 (threads_are_executing, finish_thread_state): Add
11163 process_stratum_target parameter.
11164 (switch_to_thread): Use is_current_thread.
11165 * i386-fbsd-tdep.c: Include "inferior.h".
11166 (i386fbsd_get_thread_local_address): Pass down target.
11167 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
11168 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
11169 have_inferiors check.
11170 * inf-ptrace.c (inf_ptrace_target::create_inferior)
11171 (inf_ptrace_target::attach): Adjust.
11172 * infcall.c (run_inferior_call): Adjust.
11173 * infcmd.c (run_command_1): Pass target to
11174 scoped_finish_thread_state.
11175 (proceed_thread_callback): Skip inferiors with no execution.
11176 (continue_command): Rename 'all_threads' local to avoid hiding
11177 'all_threads' function. Adjust get_last_target_status call.
11178 (prepare_one_step): Adjust set_running call.
11179 (signal_command): Use user_visible_resume_target. Compare thread
11180 pointers instead of inferior_ptid.
11181 (info_program_command): Adjust to pass down target.
11182 (attach_command): Mark target's 'thread_executing' flag.
11183 (stop_current_target_threads_ns): New, factored out from ...
11184 (interrupt_target_1): ... this. Switch inferior before making
11185 target calls.
11186 * inferior-iter.h
11187 (struct all_inferiors_iterator, struct all_inferiors_range)
11188 (struct all_inferiors_safe_range)
11189 (struct all_non_exited_inferiors_range): Filter on
11190 process_stratum_target too. Remove explicit.
11191 * inferior.c (inferior::inferior): Push dummy target on target
11192 stack.
11193 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
11194 Add process_stratum_target parameter, and pass it down.
11195 (have_live_inferiors): Adjust.
11196 (switch_to_inferior_and_push_target): New.
11197 (add_inferior_command, clone_inferior_command): Handle
11198 "-no-connection" parameter. Use
11199 switch_to_inferior_and_push_target.
11200 (_initialize_inferior): Mention "-no-connection" option in
11201 the help of "add-inferior" and "clone-inferior" commands.
11202 * inferior.h: Include "process-stratum-target.h".
11203 (interrupt_target_1): Use bool.
11204 (struct inferior) <push_target, unpush_target, target_is_pushed,
11205 find_target_beneath, top_target, process_target, target_at,
11206 m_stack>: New.
11207 (discard_all_inferiors): Delete.
11208 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
11209 (all_inferiors, all_non_exited_inferiors): Add
11210 process_stratum_target parameter.
11211 * infrun.c: Include "gdb_select.h" and <unordered_map>.
11212 (target_last_proc_target): New global.
11213 (follow_fork_inferior): Push target on new inferior. Pass target
11214 to add_thread_silent. Call exec_on_vfork. Handle target's
11215 reference count.
11216 (follow_fork): Adjust get_last_target_status call. Also consider
11217 target.
11218 (follow_exec): Push target on new inferior.
11219 (struct execution_control_state) <target>: New field.
11220 (user_visible_resume_target): New.
11221 (do_target_resume): Call target_async.
11222 (resume_1): Set target's threads_executing flag. Consider resume
11223 target.
11224 (commit_resume_all_targets): New.
11225 (proceed): Also consider resume target. Skip threads of inferiors
11226 with no execution. Commit resumtion in all targets.
11227 (start_remote): Pass current inferior to wait_for_inferior.
11228 (infrun_thread_stop_requested): Consider target as well. Pass
11229 thread_info pointer to clear_inline_frame_state instead of ptid.
11230 (infrun_thread_thread_exit): Consider target as well.
11231 (random_pending_event_thread): New inferior parameter. Use it.
11232 (do_target_wait): Rename to ...
11233 (do_target_wait_1): ... this. Add inferior parameter, and pass it
11234 down.
11235 (threads_are_resumed_pending_p, do_target_wait): New.
11236 (prepare_for_detach): Adjust calls.
11237 (wait_for_inferior): New inferior parameter. Handle it. Use
11238 do_target_wait_1 instead of do_target_wait.
11239 (fetch_inferior_event): Adjust. Switch to representative
11240 inferior. Pass target down.
11241 (set_last_target_status): Add process_stratum_target parameter.
11242 Save target in global.
11243 (get_last_target_status): Add process_stratum_target parameter and
11244 handle it.
11245 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
11246 (context_switch): Check inferior_ptid == null_ptid before calling
11247 inferior_thread().
11248 (get_inferior_stop_soon): Pass down target.
11249 (wait_one): Rename to ...
11250 (poll_one_curr_target): ... this.
11251 (struct wait_one_event): New.
11252 (wait_one): New.
11253 (stop_all_threads): Adjust.
11254 (handle_no_resumed, handle_inferior_event): Adjust to consider the
11255 event's target.
11256 (switch_back_to_stepped_thread): Also consider target.
11257 (print_stop_event): Update.
11258 (normal_stop): Update. Also consider the resume target.
11259 * infrun.h (wait_for_inferior): Remove declaration.
11260 (user_visible_resume_target): New declaration.
11261 (get_last_target_status, set_last_target_status): New
11262 process_stratum_target parameter.
11263 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
11264 process_stratum_target parameter, and use it.
11265 (clear_inline_frame_state (thread_info*)): New.
11266 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
11267 process_stratum_target parameter.
11268 (clear_inline_frame_state (thread_info*)): Declare.
11269 * linux-fork.c (delete_checkpoint_command): Pass target down to
11270 find_thread_ptid.
11271 (checkpoint_command): Adjust.
11272 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
11273 instead of just tweaking inferior_ptid.
11274 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
11275 (exit_lwp): Pass target down to find_thread_ptid.
11276 (attach_proc_task_lwp_callback): Pass target down to
11277 add_thread/set_running/set_executing.
11278 (linux_nat_target::attach): Pass target down to
11279 thread_change_ptid.
11280 (get_detach_signal): Pass target down to find_thread_ptid.
11281 Consider last target status's target.
11282 (linux_resume_one_lwp_throw, resume_lwp)
11283 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
11284 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
11285 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
11286 (linux_nat_target::async_wait_fd): New.
11287 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
11288 target down.
11289 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
11290 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
11291 * linux-thread-db.c (struct thread_db_info::process_target): New
11292 field.
11293 (add_thread_db_info): Save target.
11294 (get_thread_db_info): New process_stratum_target parameter. Also
11295 match target.
11296 (delete_thread_db_info): New process_stratum_target parameter.
11297 Also match target.
11298 (thread_from_lwp): Adjust to pass down target.
11299 (thread_db_notice_clone): Pass down target.
11300 (check_thread_db_callback): Pass down target.
11301 (try_thread_db_load_1): Always push the thread_db target.
11302 (try_thread_db_load, record_thread): Pass target down.
11303 (thread_db_target::detach): Pass target down. Always unpush the
11304 thread_db target.
11305 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
11306 target down. Always unpush the thread_db target.
11307 (find_new_threads_callback, thread_db_find_new_threads_2)
11308 (thread_db_target::update_thread_list): Pass target down.
11309 (thread_db_target::pid_to_str): Pass current inferior down.
11310 (thread_db_target::get_thread_local_address): Pass target down.
11311 (thread_db_target::resume, maintenance_check_libthread_db): Pass
11312 target down.
11313 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
11314 * procfs.c (procfs_target::procfs_init_inferior): Declare.
11315 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
11316 (procfs_init_inferior): Rename to ...
11317 (procfs_target::procfs_init_inferior): ... this and adjust.
11318 (procfs_target::create_inferior, procfs_notice_thread)
11319 (procfs_do_thread_registers): Adjust.
11320 * ppc-fbsd-tdep.c: Include "inferior.h".
11321 (ppcfbsd_get_thread_local_address): Pass down target.
11322 * proc-service.c (ps_xfer_memory): Switch current inferior and
11323 program space as well.
11324 (get_ps_regcache): Pass target down.
11325 * process-stratum-target.c
11326 (process_stratum_target::thread_address_space)
11327 (process_stratum_target::thread_architecture): Pass target down.
11328 * process-stratum-target.h
11329 (process_stratum_target::threads_executing): New field.
11330 (as_process_stratum_target): New.
11331 * ravenscar-thread.c
11332 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
11333 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
11334 down.
11335 * record-btrace.c (record_btrace_target::info_record): Adjust.
11336 (record_btrace_target::record_method)
11337 (record_btrace_target::record_is_replaying)
11338 (record_btrace_target::fetch_registers)
11339 (get_thread_current_frame_id, record_btrace_target::resume)
11340 (record_btrace_target::wait, record_btrace_target::stop): Pass
11341 target down.
11342 * record-full.c (record_full_wait_1): Switch to event thread.
11343 Pass target down.
11344 * regcache.c (regcache::regcache)
11345 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
11346 process_stratum_target parameter and handle it.
11347 (current_thread_target): New global.
11348 (get_thread_regcache): Add process_stratum_target parameter and
11349 handle it. Switch inferior before calling target method.
11350 (get_thread_regcache): Pass target down.
11351 (get_thread_regcache_for_ptid): Pass target down.
11352 (registers_changed_ptid): Add process_stratum_target parameter and
11353 handle it.
11354 (registers_changed_thread, registers_changed): Pass target down.
11355 (test_get_thread_arch_aspace_regcache): New.
11356 (current_regcache_test): Define a couple local test_target_ops
11357 instances and use them for testing.
11358 (readwrite_regcache): Pass process_stratum_target parameter.
11359 (cooked_read_test, cooked_write_test): Pass mock_target down.
11360 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
11361 (get_thread_arch_aspace_regcache): Add process_stratum_target
11362 parameter.
11363 (regcache::target): New method.
11364 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
11365 (regcache::registers_changed_ptid): Add process_stratum_target
11366 parameter.
11367 (regcache::m_target): New field.
11368 (registers_changed_ptid): Add process_stratum_target parameter.
11369 * remote.c (remote_state::supports_vCont_probed): New field.
11370 (remote_target::async_wait_fd): New method.
11371 (remote_unpush_and_throw): Add remote_target parameter.
11372 (get_current_remote_target): Adjust.
11373 (remote_target::remote_add_inferior): Push target.
11374 (remote_target::remote_add_thread)
11375 (remote_target::remote_notice_new_inferior)
11376 (get_remote_thread_info): Pass target down.
11377 (remote_target::update_thread_list): Skip threads of inferiors
11378 bound to other targets. (remote_target::close): Don't discard
11379 inferiors. (remote_target::add_current_inferior_and_thread)
11380 (remote_target::process_initial_stop_replies)
11381 (remote_target::start_remote)
11382 (remote_target::remote_serial_quit_handler): Pass down target.
11383 (remote_target::remote_unpush_target): New remote_target
11384 parameter. Unpush the target from all inferiors.
11385 (remote_target::remote_unpush_and_throw): New remote_target
11386 parameter. Pass it down.
11387 (remote_target::open_1): Check whether the current inferior has
11388 execution instead of checking whether any inferior is live. Pass
11389 target down.
11390 (remote_target::remote_detach_1): Pass down target. Use
11391 remote_unpush_target.
11392 (extended_remote_target::attach): Pass down target.
11393 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
11394 (remote_target::append_resumption): Pass down target.
11395 (remote_target::append_pending_thread_resumptions)
11396 (remote_target::remote_resume_with_hc, remote_target::resume)
11397 (remote_target::commit_resume): Pass down target.
11398 (remote_target::remote_stop_ns): Check supports_vCont_probed.
11399 (remote_target::interrupt_query)
11400 (remote_target::remove_new_fork_children)
11401 (remote_target::check_pending_events_prevent_wildcard_vcont)
11402 (remote_target::remote_parse_stop_reply)
11403 (remote_target::process_stop_reply): Pass down target.
11404 (first_remote_resumed_thread): New remote_target parameter. Pass
11405 it down.
11406 (remote_target::wait_as): Pass down target.
11407 (unpush_and_perror): New remote_target parameter. Pass it down.
11408 (remote_target::readchar, remote_target::remote_serial_write)
11409 (remote_target::getpkt_or_notif_sane_1)
11410 (remote_target::kill_new_fork_children, remote_target::kill): Pass
11411 down target.
11412 (remote_target::mourn_inferior): Pass down target. Use
11413 remote_unpush_target.
11414 (remote_target::core_of_thread)
11415 (remote_target::remote_btrace_maybe_reopen): Pass down target.
11416 (remote_target::pid_to_exec_file)
11417 (remote_target::thread_handle_to_thread_info): Pass down target.
11418 (remote_target::async_wait_fd): New.
11419 * riscv-fbsd-tdep.c: Include "inferior.h".
11420 (riscv_fbsd_get_thread_local_address): Pass down target.
11421 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
11422 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
11423 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
11424 Adjust.
11425 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
11426 * solib-svr4.c (enable_break): Pass down target.
11427 * spu-multiarch.c (parse_spufs_run): Pass down target.
11428 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
11429 * target-delegates.c: Regenerate.
11430 * target.c (g_target_stack): Delete.
11431 (current_top_target): Return the current inferior's top target.
11432 (target_has_execution_1): Refer to the passed-in inferior's top
11433 target.
11434 (target_supports_terminal_ours): Check whether the initial
11435 inferior was already created.
11436 (decref_target): New.
11437 (target_stack::push): Incref/decref the target.
11438 (push_target, push_target, unpush_target): Adjust.
11439 (target_stack::unpush): Defref target.
11440 (target_is_pushed): Return bool. Adjust to refer to the current
11441 inferior's target stack.
11442 (dispose_inferior): Delete, and inline parts ...
11443 (target_preopen): ... here. Only dispose of the current inferior.
11444 (target_detach): Hold strong target reference while detaching.
11445 Pass target down.
11446 (target_thread_name): Add assertion.
11447 (target_resume): Pass down target.
11448 (target_ops::beneath, find_target_at): Adjust to refer to the
11449 current inferior's target stack.
11450 (get_dummy_target): New.
11451 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
11452 has a thread running.
11453 (initialize_targets): Rename to ...
11454 (_initialize_target): ... this.
11455 * target.h: Include "gdbsupport/refcounted-object.h".
11456 (struct target_ops): Inherit refcounted_object.
11457 (target_ops::shortname, target_ops::longname): Make const.
11458 (target_ops::async_wait_fd): New method.
11459 (decref_target): Declare.
11460 (struct target_ops_ref_policy): New.
11461 (target_ops_ref): New typedef.
11462 (get_dummy_target): Declare function.
11463 (target_is_pushed): Return bool.
11464 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
11465 (all_matching_threads_iterator::all_matching_threads_iterator):
11466 Handle filter target.
11467 * thread-iter.h (struct all_matching_threads_iterator, struct
11468 all_matching_threads_range, class all_non_exited_threads_range):
11469 Filter by target too. Remove explicit.
11470 * thread.c (threads_executing): Delete.
11471 (inferior_thread): Pass down current inferior.
11472 (clear_thread_inferior_resources): Pass down thread pointer
11473 instead of ptid_t.
11474 (add_thread_silent, add_thread_with_info, add_thread): Add
11475 process_stratum_target parameter. Use it for thread and inferior
11476 searches.
11477 (is_current_thread): New.
11478 (thread_info::deletable): Use it.
11479 (find_thread_ptid, thread_count, in_thread_list)
11480 (thread_change_ptid, set_resumed, set_running): New
11481 process_stratum_target parameter. Pass it down.
11482 (set_executing): New process_stratum_target parameter. Pass it
11483 down. Adjust reference to 'threads_executing'.
11484 (threads_are_executing): New process_stratum_target parameter.
11485 Adjust reference to 'threads_executing'.
11486 (set_stop_requested, finish_thread_state): New
11487 process_stratum_target parameter. Pass it down.
11488 (switch_to_thread): Also match inferior.
11489 (switch_to_thread): New process_stratum_target parameter. Pass it
11490 down.
11491 (update_threads_executing): Reimplement.
11492 * top.c (quit_force): Pop targets from all inferior.
11493 (gdb_init): Don't call initialize_targets.
11494 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
11495 Declare.
11496 (windows_add_thread, windows_delete_thread): Adjust.
11497 (get_windows_debug_event): Rename to ...
11498 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
11499 * tracefile-tfile.c (tfile_target_open): Pass down target.
11500 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
11501 Forward declare.
11502 (switch_to_thread): Add process_stratum_target parameter.
11503 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
11504 parameter. Use it.
11505 (mi_on_resume): Pass target down.
11506 * nat/fork-inferior.c (startup_inferior): Add
11507 process_stratum_target parameter. Pass it down.
11508 * nat/fork-inferior.h (startup_inferior): Add
11509 process_stratum_target parameter.
11510 * python/py-threadevent.c (py_get_event_thread): Pass target down.
11511
11512 2020-01-10 Pedro Alves <palves@redhat.com>
11513
11514 * remote.c (remote_target::start_remote): Don't set inferior_ptid
11515 directly. Instead find the first thread in the thread list and
11516 use switch_to_thread.
11517
11518 2020-01-10 Pedro Alves <palves@redhat.com>
11519
11520 * remote.c (remote_target::remote_add_inferior): Don't bind a
11521 process to the current inferior if the current inferior is already
11522 bound to a process.
11523
11524 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
11525 Pedro Alves <palves@redhat.com>
11526
11527 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
11528 If no process is specified, return null_ptid instead of
11529 inferior_ptid.
11530 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
11531 TARGET_WAITKIND_SIGNALLED with no pid.
11532
11533 2020-01-10 Pedro Alves <palves@redhat.com>
11534
11535 * remote.c (first_remote_resumed_thread): New.
11536 (remote_target::wait_as): Use it as default event_ptid instead of
11537 inferior_ptid.
11538
11539 2020-01-10 Pedro Alves <palves@redhat.com>
11540
11541 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
11542
11543 2020-01-10 Pedro Alves <palves@redhat.com>
11544
11545 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
11546 not -1.
11547
11548 2020-01-10 Pedro Alves <palves@redhat.com>
11549
11550 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
11551 ptid to get_last_target_status.
11552 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
11553 ptid to get_last_target_status.
11554 * infcmd.c (continue_command): Don't pass a target_waitstatus to
11555 get_last_target_status.
11556 (info_program_command): Don't pass a target_waitstatus to
11557 get_last_target_status.
11558 * infrun.c (init_wait_for_inferior): Use
11559 nullify_last_target_wait_ptid.
11560 (get_last_target_status): Handle nullptr arguments.
11561 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
11562 (print_stop_event): Don't pass a ptid to get_last_target_status.
11563 (normal_stop): Don't pass a ptid to get_last_target_status.
11564 * infrun.h (get_last_target_status, set_last_target_status): Move
11565 comments here and update.
11566 (nullify_last_target_wait_ptid): Declare.
11567 * linux-fork.c (fork_load_infrun_state): Remove local extern
11568 declaration of nullify_last_target_wait_ptid.
11569 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
11570 to get_last_target_status.
11571
11572 2020-01-10 Pedro Alves <palves@redhat.com>
11573
11574 * gdbthread.h (scoped_restore_current_thread)
11575 <dont_restore, restore, m_dont_restore>: Declare.
11576 * thread.c (thread_alive): Add assertion. Return bool.
11577 (switch_to_thread_if_alive): New.
11578 (prune_threads): Switch inferior/thread.
11579 (print_thread_info_1): Switch thread before calling target methods.
11580 (scoped_restore_current_thread::restore): New, factored out from
11581 ...
11582 (scoped_restore_current_thread::~scoped_restore_current_thread):
11583 ... this.
11584 (scoped_restore_current_thread::scoped_restore_current_thread):
11585 Add assertion.
11586 (thread_apply_all_command, thread_select): Use
11587 switch_to_thread_if_alive.
11588 * infrun.c (proceed, restart_threads, handle_signal_stop)
11589 (switch_back_to_stepped_thread): Switch current thread before
11590 calling target methods.
11591
11592 2020-01-10 Pedro Alves <palves@redhat.com>
11593
11594 * inferior.c (switch_to_inferior_no_thread): New function,
11595 factored out from ...
11596 (inferior_command): ... here.
11597 * inferior.h (switch_to_inferior_no_thread): Declare.
11598 * mi/mi-main.c (run_one_inferior): Use
11599 switch_to_inferior_no_thread.
11600
11601 2020-01-10 Pedro Alves <palves@redhat.com>
11602
11603 * infcmd.c (kill_command): Remove dead code.
11604
11605 2020-01-10 Pedro Alves <palves@redhat.com>
11606
11607 * remote.c (remote_target::mourn_inferior): No longer check
11608 whether the target is running.
11609
11610 2020-01-10 Pedro Alves <palves@redhat.com>
11611
11612 * corelow.c (core_target::has_execution): Change parameter type to
11613 inferior pointer.
11614 * inferior.c (number_of_live_inferiors): Use
11615 inferior::has_execution instead of target_has_execution_1.
11616 * inferior.h (inferior::has_execution): New.
11617 * linux-thread-db.c (thread_db_target::update_thread_list): Use
11618 inferior::has_execution instead of target_has_execution_1.
11619 * process-stratum-target.c
11620 (process_stratum_target::has_execution): Change parameter type to
11621 inferior pointer. Check the inferior's PID instead of
11622 inferior_ptid.
11623 * process-stratum-target.h
11624 (process_stratum_target::has_execution): Change parameter type to
11625 inferior pointer.
11626 * record-full.c (record_full_core_target::has_execution): Change
11627 parameter type to inferior pointer.
11628 * target.c (target_has_execution_1): Change parameter type to
11629 inferior pointer.
11630 (target_has_execution_current): Adjust.
11631 * target.h (target_ops::has_execution): Change parameter type to
11632 inferior pointer.
11633 (target_has_execution_1): Change parameter type to inferior
11634 pointer. Change return type to bool.
11635 * tracefile.h (tracefile_target::has_execution): Change parameter
11636 type to inferior pointer.
11637
11638 2020-01-10 Pedro Alves <palves@redhat.com>
11639
11640 * exceptions.c (print_flush): Remove current_top_target() check.
11641
11642 2020-01-10 Pedro Alves <palves@redhat.com>
11643
11644 * remote.c (show_remote_exec_file): Show the current inferior's
11645 exec-file instead of the command variable's value.
11646
11647 2020-01-10 Pedro Alves <palves@redhat.com>
11648
11649 * record-full.c (record_full_resume_ptid): New global.
11650 (record_full_target::resume): Set it.
11651 (record_full_wait_1): Use record_full_resume_ptid instead of
11652 inferior_ptid.
11653
11654 2020-01-10 Pedro Alves <palves@redhat.com>
11655
11656 * gdbthread.h (scoped_restore_current_thread)
11657 <dont_restore, restore, m_dont_restore>: Declare.
11658 * thread.c (thread_alive): Add assertion. Return bool.
11659 (switch_to_thread_if_alive): New.
11660 (prune_threads): Switch inferior/thread.
11661 (print_thread_info_1): Switch thread before calling target methods.
11662 (scoped_restore_current_thread::restore): New, factored out from
11663 ...
11664 (scoped_restore_current_thread::~scoped_restore_current_thread):
11665 ... this.
11666 (scoped_restore_current_thread::scoped_restore_current_thread):
11667 Add assertion.
11668 (thread_apply_all_command, thread_select): Use
11669 switch_to_thread_if_alive.
11670
11671 2020-01-10 George Barrett <bob@bob131.so>
11672
11673 * stap-probe.c (stap_modify_semaphore): Don't check for null
11674 semaphores.
11675 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
11676 for null semaphores.
11677
11678 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
11679
11680 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
11681 all source windows, and maintain horizontal scroll status while
11682 doing so.
11683
11684 2020-01-09 Tom Tromey <tom@tromey.com>
11685
11686 PR tui/18932:
11687 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
11688 update_source_window, not print_source_lines.
11689
11690 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
11691
11692 * tui/tui.c (tui_enable): Register tui hooks after calling
11693 tui_display_main.
11694
11695 2020-01-09 Christian Biesinger <cbiesinger@google.com>
11696
11697 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
11698
11699 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
11700
11701 * thread.c (print_thread_info_1): Fix indentation.
11702
11703 2020-01-09 Christian Biesinger <cbiesinger@google.com>
11704
11705 * symtab.c (general_symbol_info::compute_and_set_names): Move the
11706 unique_xmalloc_ptr outside the if to always free the demangled name.
11707
11708 2020-01-08 Tom Tromey <tromey@adacore.com>
11709
11710 * xcoffread.c (enter_line_range, read_xcoff_symtab)
11711 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
11712 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
11713 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
11714 Remove.
11715 (section_offsets): New typedef.
11716 * symtab.c (fixup_section, get_msymbol_address): Update.
11717 * symmisc.c (dump_msymbols): Update.
11718 * symfile.h (relative_addr_info_to_section_offsets)
11719 (symfile_map_offsets_to_segments): Update.
11720 * symfile.c (build_section_addr_info_from_objfile)
11721 (init_objfile_sect_indices): Update.
11722 (struct place_section_arg): Change type of "offsets".
11723 (place_section): Update.
11724 (relative_addr_info_to_section_offsets): Change type of
11725 "section_offsets". Remove "num_sections" parameter.
11726 (default_symfile_offsets, syms_from_objfile_1)
11727 (set_objfile_default_section_offset): Update.
11728 (reread_symbols): No need to preserve section offsets by hand.
11729 (symfile_map_offsets_to_segments): Change type of "offsets".
11730 * stap-probe.c (relocate_address): Update.
11731 * stabsread.h (process_one_symbol): Update.
11732 * solib-target.c (struct lm_info_target) <offsets>: Change type.
11733 (solib_target_relocate_section_addresses): Update.
11734 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
11735 Update.
11736 * solib-frv.c (frv_relocate_main_executable): Update.
11737 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
11738 * solib-aix.c (solib_aix_get_section_offsets): Change return
11739 type.
11740 (solib_aix_solib_create_inferior_hook): Update.
11741 * remote.c (remote_target::get_offsets): Update.
11742 * psymtab.c (find_pc_sect_psymtab): Update.
11743 * psympriv.h (struct partial_symbol) <address, text_low,
11744 text_high>: Update.
11745 * objfiles.h (obj_section_offset): Update.
11746 (struct objfile) <section_offsets>: Change type.
11747 <num_sections>: Remove.
11748 (objfile_relocate): Update.
11749 * objfiles.c (entry_point_address_query): Update
11750 (relocate_one_symbol): Change type of "section_offsets".
11751 (objfile_relocate1, objfile_relocate1): Change type of
11752 "new_offsets".
11753 (objfile_rebase1): Update.
11754 * mipsread.c (mipscoff_symfile_read): Update.
11755 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
11756 parameter.
11757 * mdebugread.c (parse_symbol): Change type of "section_offsets".
11758 (parse_external, psymtab_to_symtab_1): Update.
11759 * machoread.c (macho_symfile_offsets): Update.
11760 * ia64-tdep.c (ia64_find_unwind_table): Update.
11761 * hppa-tdep.c (read_unwind_info): Update.
11762 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
11763 * dwarf2read.c (create_addrmap_from_index)
11764 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
11765 (process_psymtab_comp_unit_reader, add_partial_symbol)
11766 (add_partial_subprogram, process_full_comp_unit)
11767 (read_file_scope, read_func_scope, read_lexical_block_scope)
11768 (read_call_site_scope, dwarf2_rnglists_process)
11769 (dwarf2_ranges_process, dwarf2_ranges_read)
11770 (dwarf_decode_lines_1, var_decode_location, new_symbol)
11771 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
11772 Update.
11773 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
11774 Update.
11775 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
11776 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
11777 (process_one_symbol): Change type of "section_offsets".
11778 * ctfread.c (get_objfile_text_range): Update.
11779 * coffread.c (coff_symtab_read, enter_linenos)
11780 (process_coff_symbol): Update.
11781 * coff-pe-read.c (add_pe_forwarded_sym): Update.
11782 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
11783
11784 2020-01-08 Tom Tromey <tromey@adacore.com>
11785
11786 * dwarf2read.c (parse_macro_definition): Use std::string.
11787 (parse_macro_definition): Likewise.
11788
11789 2020-01-08 Tom Tromey <tromey@adacore.com>
11790
11791 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
11792 (ATTR_ALLOC_CHUNK): Remove.
11793
11794 2020-01-08 Tom Tromey <tromey@adacore.com>
11795
11796 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
11797
11798 2020-01-08 Tom Tromey <tromey@adacore.com>
11799
11800 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
11801 (dwarf2_compute_name, open_dwo_file): Likewise.
11802 (process_enumeration_scope): Use std::vector.
11803 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
11804 (partial_die_info::fixup, dwarf2_start_subfile)
11805 (guess_full_die_structure_name, dwarf2_name): Likewise.
11806 (determine_prefix): Update.
11807 (guess_full_die_structure_name): Make return type const.
11808 (partial_die_full_name): Return unique_xmalloc_ptr.
11809 (DW_FIELD_ALLOC_CHUNK): Remove.
11810
11811 2020-01-07 Tom Tromey <tromey@adacore.com>
11812
11813 PR build/24937:
11814 * stap-probe.c (class stap_static_probe_ops): Add constructor.
11815
11816 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
11817
11818 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
11819
11820 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
11821
11822 * stack.c (print_frame_info): Move disassemble_next_line code
11823 inside source_print block.
11824
11825 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11826
11827 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
11828 gdb/signals.h, as we are now using native signal symbols.
11829
11830 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
11831
11832 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
11833 overflow by an early check of content vs threshold.
11834 * tui/tui-source.c (tui_source_window::line_is_displayed):
11835 Likewise.
11836
11837 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11838
11839 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
11840
11841 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
11842
11843 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
11844 export table if no section contains it's RVA.
11845
11846 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11847
11848 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
11849
11850 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
11851
11852 * source.c (print_source_lines_base): Set last_line_listed.
11853
11854 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
11855
11856 * tui/tui-disasm.c: Remove trailing spaces.
11857
11858 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11859 Pedro Alves <palves@redhat.com>
11860
11861 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
11862 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
11863 (windows_gdb_signal_to_target): New function, uses the above
11864 enumeration to convert GDB internal signal codes to equivalent
11865 Windows codes.
11866 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
11867 * windows-nat.c: Include "gdb_wait.h".
11868 (get_windows_debug_event): Extract the fatal exception from the
11869 exit status and convert to the equivalent Posix signal number.
11870 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
11871 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
11872 * gdbsupport/gdb_wait.c: New file, implements
11873 windows_status_to_termsig.
11874 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
11875 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
11876
11877 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
11878
11879 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
11880 show_layout.
11881
11882 2020-01-05 Luis Machado <luis.machado@linaro.org>
11883
11884 * aarch64-linux-nat.c
11885 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
11886 and bfd_mach_aarch64.
11887
11888 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11889
11890 * ui-file.c (stdio_file::can_emit_style_escape)
11891 (tee_file::can_emit_style_escape): Ensure style is used also on
11892 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
11893 to gdb_stdout.
11894 * main.c (set_gdb_data_directory): Use file style to output the
11895 warning that the given pathname is not a directory.
11896 * top.c (show_history_filename, gdb_safe_append_history)
11897 (show_gdb_datadir): Use file style.
11898
11899 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
11900
11901 * solib-target.c (struct lm_info_target):
11902 Change offsets to be a unique_xmalloc_ptr.
11903 (solib_target_relocate_section_addresses): Update.
11904
11905 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
11906
11907 * windows-nat.c (windows_clear_solib): Free so_list linked list.
11908
11909 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
11910
11911 * MAINTAINERS (Write After Approval): Add myself.
11912
11913 2020-01-02 Luis Machado <luis.machado@linaro.org>
11914
11915 * proc-service.c (get_ps_regcache): Remove reference to obsolete
11916 Cell BE architecture.
11917 * target.h (struct target_ops) <thread_architecture>: Likewise.
11918
11919 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11920
11921 * Makefile.in: Use INSTALL_PROGRAM_ENV.
11922
11923 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11924
11925 * MAINTAINERS (Write After Approval): Add myself.
11926
11927 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11928
11929 * gdbarch.sh: Update copyright year range of generated files.
11930
11931 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11932
11933 Update copyright year range in all GDB files.
11934
11935 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11936
11937 * copyright.py: Convert to Python 3.
11938
11939 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11940
11941 * copyright.py: Adapt after move of gnulib directory from gdb
11942 directory to toplevel directory.
11943
11944 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11945
11946 * copyright.py (main): Exit if run from the wrong directory.
11947
11948 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11949
11950 * top.c (print_gdb_version): Change copyright year to 2020.
11951
11952 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11953
11954 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
11955
11956 For older changes see ChangeLog-2019.
11957 \f
11958 Local Variables:
11959 mode: change-log
11960 left-margin: 8
11961 fill-column: 74
11962 version-control: never
11963 coding: utf-8
11964 End: