Call add_active_thread after pushing the ravenscar target
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2020-08-07 Tom Tromey <tromey@adacore.com>
2
3 * ravenscar-thread.c (ravenscar_thread_target): Don't call
4 add_active_thread.
5 (ravenscar_thread_target::add_active_thread): Now public.
6 (ravenscar_inferior_created): Call add_active_thread after pushing
7 the target.
8
9 2020-08-07 Simon Marchi <simon.marchi@polymtl.ca>
10
11 * regcache.c (ptid_regcache_map): New type.
12 (target_ptid_regcache_map): New type.
13 (regcaches): Change type to target_ptid_regcache_map.
14 (get_thread_arch_aspace_regcache): Update to regcaches' new
15 type.
16 (regcache_thread_ptid_changed): Likewise.
17 (registers_changed_ptid): Likewise.
18 (regcaches_size): Likewise.
19 (regcaches_test): Update.
20 (regcache_thread_ptid_changed): Update.
21 * regcache.h (regcache_up): New type.
22 * gdbsupport/ptid.h (hash_ptid): New struct.
23
24 2020-08-07 Simon Marchi <simon.marchi@efficios.com>
25
26 * observable.h (thread_ptid_changed): Add parameter
27 `process_stratum_target *`.
28 * infrun.c (infrun_thread_ptid_changed): Add parameter
29 `process_stratum_target *` and use it.
30 (selftests): New namespace.
31 (infrun_thread_ptid_changed): New function.
32 (_initialize_infrun): Register selftest.
33 * regcache.c (regcache_thread_ptid_changed): Add parameter
34 `process_stratum_target *` and use it.
35 (regcache_thread_ptid_changed): New function.
36 (_initialize_regcache): Register selftest.
37 * thread.c (thread_change_ptid): Pass target to
38 thread_ptid_changed observable.
39
40 2020-08-06 Caroline Tice <cmtice@google.com>
41
42 * dwarf2/read.c (struct dwo_file): Update comment on 'sections' field.
43 (struct dwp_sections): Update field comments. Add loclists and
44 rnglists fields.
45 (struct virtual_v2_dwo_sections): Rename struct to
46 'virtual_v2_or_v5_dwo_sections'; update comments at top of struct; add
47 size & offset fields for loclists and rnglists.
48 (struct dwp_hash_table): Add a 'v5' struct field to the union section.
49 (create_debug_type_hash_table): Add 'DW_UT_split_type' to the check for
50 skipping dummy type units.
51 (create_dwp_hash_table): Update the large comment above the function to
52 discuss Version 5 DWP files as well, with references. Update all the
53 version checks in the function to check for version 5 as well. Add new
54 section at the end to create dwp hash table for version 5.
55 (create_dwp_v2_section): Rename function to
56 'create_dwp_v2_or_v5_section'. Update function comment appropriately.
57 Add V5 to error message text.
58 (create_dwo_unit_in_dwp_v2): Change calls to create_dwp_v2_section
59 into calls to create_dwp_v2_or_v5_section.
60 (create_dwo_unit_in_dwp_v5): New function.
61 (lookup_dwo_unit_in_dwp): Update conditional statement to explicitly
62 check for version2; add else clause to handle version 5.
63 (open_and_init_dwo_file): Add code to check dwarf version & only call
64 create_debug_types_hash_table (with sections.types) if version is not 5;
65 else call create_debug_type_hash_table, with sections.info.
66 (dwarf2_locate_v2_dwp_sections): Update function comment to mention
67 version 5.
68 (dwarf2_locate_v5_dwp_sections): New function.
69 (open_and_init_dwp_file): Add else-if clause for version 5 to call
70 bfd_map_over_sections with dwarf2_locate_v5_dwp_sections.
71
72 2020-08-06 Simon Marchi <simon.marchi@efficios.com>
73
74 * regcache.h (class regcache): Remove friend
75 registers_changed_ptid.
76 <regcache_thread_ptid_changed>: Remove.
77 <regcaches>: Remove.
78 * regcache.c (regcache::regcaches): Rename to...
79 (regcaches): ... this. Make static.
80 (get_thread_arch_aspace_regcache): Update.
81 (regcache::regcache_thread_ptid_changed): Rename to...
82 (regcache_thread_ptid_changed): ... this. Update.
83 (class regcache_access): Remove.
84 (regcaches_test): Update.
85 (_initialize_regcache): Update.
86 * sparc64-tdep.c, dwarf2/index-write.c, record-btrace.c: Include
87 <forward_list>.
88
89 2020-08-06 Simon Marchi <simon.marchi@efficios.com>
90
91 * regcache.h (class regcache) <current_regcache>: Rename to...
92 <regcaches>: ... this. Move doc here.
93 * regcache.c (regcache::current_regcache) Rename to...
94 (regcache::regcaches): ... this. Move doc to header.
95 (get_thread_arch_aspace_regcache): Update.
96 (regcache::regcache_thread_ptid_changed): Update.
97 (registers_changed_ptid): Update.
98 (class regcache_access) <current_regcache_size>: Rename to...
99 <regcaches_size>: ... this.
100 (current_regcache_test): Rename to...
101 (regcaches_test): ... this.
102 (_initialize_regcache): Update.
103
104 2020-08-06 Victor Collod <vcollod@nvidia.com>
105
106 * amd64-tdep.c (amd64_analyze_prologue): Fix incorrect comment.
107
108 2020-08-05 Kevin Buettner <kevinb@redhat.com>
109
110 * corelow.c (core_target::build_file_mappings): Don't output
111 null pathname in warning.
112
113 2020-08-05 Simon Marchi <simon.marchi@polymtl.ca>
114
115 * gdb.dwarf2/clztest.exp, gdb.dwarf2/dw2-common-block.exp,
116 gdb.dwarf2/dw2-dup-frame.exp, gdb.dwarf2/dw2-reg-undefined.exp,
117 gdb.dwarf2/dw2-single-line-discriminators.exp,
118 dw2-undefined-ret-addr.exp: Pass nopie to compilation options.
119
120 2020-08-05 Tom Tromey <tromey@adacore.com>
121
122 PR rust/26197:
123 * dwarf2/read.c (alloc_rust_variant): Handle univariant case.
124 (quirk_rust_enum): Call alloc_rust_variant for univariant case.
125 Fix off-by-one and type size errors in ordinary case.
126
127 2020-08-05 Tom de Vries <tdevries@suse.de>
128
129 * gdbtypes.c (type_not_allocated, type_not_associated): Use
130 "prop->const_val () == 0" instead of "prop->const_val () != 0".
131
132 2020-08-04 Simon Marchi <simon.marchi@efficios.com>
133
134 * frame.h (frame_id_p): Return bool.
135 (frame_id_artificial_p): Return bool.
136 (frame_id_eq): Return bool.
137 (has_stack_frames): Return bool.
138 (get_selected_frame): Fix typo in comment.
139 (get_frame_pc_if_available): Return bool.
140 (get_frame_address_in_block_if_available): Return bool.
141 (get_frame_func_if_available): Return bool.
142 (read_frame_register_unsigned): Return bool.
143 (get_frame_register_bytes): Return bool.
144 (safe_frame_unwind_memory): Return bool.
145 (deprecated_frame_register_read): Return bool.
146 (frame_unwinder_is): Return bool.
147 * frame.c (struct frame_info) <prev_arch::p>: Change type to
148 bool.
149 <this_id::p>: Likewise.
150 <prev_p>: Likewise.
151 (frame_stash_add): Return bool.
152 (get_frame_id): Use bool.
153 (frame_id_build_special) Use bool.
154 (frame_id_build_unavailable_stack): Use bool.
155 (frame_id_build): Use bool.
156 (frame_id_p): Return bool, use true/false instead of 1/0.
157 (frame_id_artificial_p): Likewise.
158 (frame_id_eq): Likewise.
159 (frame_id_inner): Likewise.
160 (get_frame_func_if_available): Likewise.
161 (read_frame_register_unsigned): Likewise.
162 (deprecated_frame_register_read): Likewise.
163 (get_frame_register_bytes): Likewise.
164 (has_stack_frames): Likewise.
165 (inside_main_func): Likewise.
166 (inside_entry_func): Likewise.
167 (get_frame_pc_if_available): Likewise.
168 (get_frame_address_in_block_if_available): Likewise.
169 (frame_unwinder_is): Likewise.
170 (safe_frame_unwind_memory): Likewise.
171 (frame_unwind_arch): Likewise.
172
173 2020-08-04 Simon Marchi <simon.marchi@efficios.com>
174
175 * frame.c (frame_info) <prev_func> <p>: Rename to status, change
176 type to cached_copy_status.
177 (fprintf_frame): Adjust.
178 (get_frame_func_if_available): Adjust.
179 (frame_cleanup_after_sniffer): Adjust.
180
181 2020-08-04 Mark Wielaard <mark@klomp.org>
182
183 * MAINTAINERS (Write After Approval): Update email address.
184
185 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
186
187 * gdbtypes.h (TYPE_DYN_PROP_ADDR): Remove, replace uses with
188 dynamic_prop::const_val.
189
190 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
191
192 * gdbtypes.h (TYPE_DYN_PROP_KIND): Remove, replace uses with
193 dynamic_prop::kind.
194
195 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
196
197 * gdbtypes.h (TYPE_DYN_PROP_BATON): Remove.
198
199 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com>
200
201 * configure.tgt: Set gdb_sim for bpf-*-* targets.
202
203 2020-08-04 Weimin Pan <weimin.pan@oracle.com>
204 Jose E. Marchesi <jose.marchesi@oracle.com>
205
206 * configure.tgt: Add entry for bpf-*-*.
207 * Makefile.in (ALL_TARGET_OBS): Add bpf-tdep.o
208 (ALLDEPFILES): Add bpf-tdep.c.
209 * bpf-tdep.c: New file.
210 * MAINTAINERS: Add bpf target and maintainer.
211 * NEWS: Mention the support for the new target.
212
213 2020-08-04 Tom de Vries <tdevries@suse.de>
214
215 PR symtab/23270
216 * dwarf2/read.c (find_partial_die): Change internal error into Dwarf
217 Error.
218
219 2020-08-03 John Baldwin <jhb@FreeBSD.org>
220
221 * syscalls/freebsd.xml: Regenerate.
222
223 2020-08-03 John Baldwin <jhb@FreeBSD.org>
224
225 * syscalls/update-freebsd.sh: Fix usage and year range.
226
227 2020-08-03 Tom de Vries <tdevries@suse.de>
228
229 PR symtab/26333
230 * dwarf2/read.c (dwarf_decode_lines_1): Ignore
231 DW_LNE_lo_user/DW_LNE_hi_user range.
232
233 2020-07-30 Simon Marchi <simon.marchi@polymtl.ca>
234
235 PR ada/26318
236 * ada-lang.c (ada_modulus): Return 0 if property is not of const
237 kind.
238
239 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
240
241 * breakpoint.c (set_breakpoint_condition): Do minor refactoring.
242
243 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
244
245 * breakpoint.c (set_breakpoint_condition): Update the condition
246 expressions after checking that the input condition string parses
247 successfully and does not contain junk at the end.
248
249 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
250
251 * breakpoint.c (set_breakpoint_condition): Update the
252 condition string after parsing the new condition successfully.
253
254 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
255
256 * proc-api.c (_STRUCTURED_PROC): Don't define.
257 * proc-events.c: Likewise.
258 * proc-flags.c: Likewise.
259 * proc-why.c: Likewise.
260 * procfs.c: Likewise.
261
262 * Makefile.in (INTERNAL_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
263 * configure, config.in: Regenerate.
264
265 2020-07-30 Tom de Vries <tdevries@suse.de>
266
267 PR build/26320
268 * ui-style.h (struct ui_file_style::color): Wrap m_value and
269 m_red/m_green/m_blue in a union.
270
271 2020-07-29 Tom de Vries <tdevries@suse.de>
272
273 PR tdep/26280
274 * s390-tdep.c (s390_displaced_step_fixup): Fix Wmaybe-uninitialized.
275
276 2020-07-28 Tom Tromey <tromey@adacore.com>
277
278 PR symtab/26270:
279 * symtab.h (find_pc_partial_function_sym): Declare.
280 * cli/cli-cmds.c (disassemble_command): Use
281 find_pc_partial_function_sym. Check asm_demangle.
282 * blockframe.c (cache_pc_function_sym): New global.
283 (cache_pc_function_name): Remove.
284 (clear_pc_function_cache): Update.
285 (find_pc_partial_function_sym): New function, from
286 find_pc_partial_function.
287 (find_pc_partial_function): Rewrite using
288 find_pc_partial_function_sym.
289
290 2020-07-28 Tom Tromey <tromey@adacore.com>
291
292 * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble"
293 help. Add usage.
294
295 2020-07-28 Tom Tromey <tromey@adacore.com>
296
297 * dwarf2/expr.c (dwarf_expr_context::execute_stack_op)
298 <DW_OP_GNU_variable_value>: Cast to address type.
299
300 2020-07-28 Kamil Rytarowski <n54@gmx.com>
301
302 * nbsd-nat.h (nbsd_nat_target::xfer_partial): New declaration.
303 * nbsd-nat.c (nbsd_nat_target::xfer_partial): New function.
304 * nbsd-tdep.c (nbsd_gdbarch_data_handle, struct nbsd_gdbarch_data)
305 (init_nbsd_gdbarch_data, get_nbsd_gdbarch_data)
306 (nbsd_get_siginfo_type): New.
307 (nbsd_init_abi): Install gdbarch "get_siginfo_type" method.
308 (_initialize_nbsd_tdep): New.
309
310 2020-07-28 H.J. Lu <hongjiu.lu@intel.com>
311
312 PR binutils/26301
313 * configure: Regenerated.
314
315 2020-07-28 H.J. Lu <hongjiu.lu@intel.com>
316
317 PR binutils/26301
318 * configure: Regenerated.
319
320 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
321
322 * python/py-frame.c: Remove 'user-regs.h' include.
323 (frapy_read_register): Rewrite to make use of
324 gdbpy_parse_register_id.
325 * python/py-registers.c (gdbpy_parse_register_id): New function,
326 moved here from python/py-unwind.c. Updated the return type, and
327 also accepts register descriptor objects.
328 * python/py-unwind.c: Remove 'user-regs.h' include.
329 (pyuw_parse_register_id): Moved to python/py-registers.c.
330 (unwind_infopy_add_saved_register): Update to use
331 gdbpy_parse_register_id.
332 (pending_framepy_read_register): Likewise.
333 * python/python-internal.h (gdbpy_parse_register_id): Declare.
334
335 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
336
337 * python/py-registers.c: Add 'user-regs.h' include.
338 (register_descriptor_iter_find): New function.
339 (register_descriptor_iterator_object_methods): New static global
340 methods array.
341 (register_descriptor_iterator_object_type): Add pointer to methods
342 array.
343
344 2020-07-27 John Baldwin <jhb@FreeBSD.org>
345
346 * fbsd-nat.h: Include <osreldate.h>. Define USE_SIGTRAP_SIGINFO
347 for all architectures on FreeBSD 11.3 and later.
348
349 2020-07-27 Tom Tromey <tromey@adacore.com>
350
351 * gcore.h (load_corefile): Don't declare.
352
353 2020-07-27 Tom de Vries <tdevries@suse.de>
354
355 * configure.ac: Fix sys/sockets.h -> sys/socket.h typo.
356 * config.in: Regenerate.
357 * configure: Regenerate.
358
359 2020-07-26 Eli Zaretskii <eliz@gnu.org>
360
361 * configure.ac (AC_CHECK_HEADERS): Check for sys/socket.h and
362 ws2tcpip.h. When checking whether socklen_t type is defined, use
363 ws2tcpip.h if it is available and sys/socket.h isn't.
364 * configure: Regenerate.
365 * config.in: Regenerate.
366
367 2020-07-25 Andrew Burgess <andrew.burgess@embecosm.com>
368
369 PR fortran/23051
370 PR fortran/26139
371 * valops.c (value_ind): Pass address to
372 readjust_indirect_value_type.
373 * value.c (readjust_indirect_value_type): Make parameter
374 non-const, and add extra address parameter. Resolve original type
375 before using it.
376 * value.h (readjust_indirect_value_type): Update function
377 signature and comment.
378
379 2020-07-25 Tom de Vries <tdevries@suse.de>
380
381 PR symtab/26243
382 * dwarf2/read.c (lnp_state_machine::record_line): Ignore zero line
383 entries.
384
385 2020-07-24 Aaron Merey <amerey@redhat.com>
386
387 * Makefile.in: Replace LIBDEBUGINFOD with DEBUGINFOD_LIBS.
388 * configure: Rebuild.
389
390 2020-07-23 Kevin Buettner <kevinb@redhat.com>
391
392 PR corefiles/26294
393 * corelow.c (_initialize_corelow): Add period to help text
394 for "maintenance print core-file-backed-mappings".
395
396 2020-07-23 Pedro Alves <pedro@palves.net>
397
398 * frame-unwind.c (frame_unwind_try_unwinder): On exception, don't
399 touch THIS_CACHE/THIS_FRAME if the frame cache was cleared
400 meanwhile.
401 * frame.c (frame_cache_generation, get_frame_cache_generation):
402 New.
403 (reinit_frame_cache): Increment FRAME_CACHE_GENERATION.
404 (get_prev_frame_if_no_cycle): On exception, don't touch
405 PREV_FRAME/THIS_FRAME if the frame cache was cleared meanwhile.
406 * frame.h (get_frame_cache_generation): Declare.
407
408 2020-07-23 Tom de Vries <tdevries@suse.de>
409
410 PR tui/26282
411 * tui/tui-winsource.h (struct tui_source_windows::tui_source_windows):
412 New default constructor.
413
414 2020-07-23 Andrew Burgess <andrew.burgess@embecosm.com>
415
416 * disasm.c (do_mixed_source_and_assembly_deprecated): Don't
417 exclude non-statement entries.
418
419 2020-07-22 Kevin Buettner <kevinb@redhat.com>
420
421 * NEWS (New commands): Mention new command
422 "maintenance print core-file-backed-mappings".
423
424 2020-07-22 Kevin Buettner <kevinb@redhat.com>
425
426 * corelow.c (gdbcmd.h): Include.
427 (core_target::info_proc_mappings): New method.
428 (get_current_core_target): New function.
429 (maintenance_print_core_file_backed_mappings): New function.
430 (_initialize_corelow): Add core-file-backed-mappings to
431 "maint print" commands.
432
433 2020-07-22 Kevin Buettner <kevinb@redhat.com>
434
435 * linux-tdep.c (dump_note_entry_p): New function.
436 (linux_dump_mapping_p_ftype): New typedef.
437 (linux_find_memory_regions_full): Add new parameter,
438 should_dump_mapping_p.
439 (linux_find_memory_regions): Adjust call to
440 linux_find_memory_regions_full.
441 (linux_make_mappings_core_file_notes): Use dump_note_entry_p in
442 call to linux_find_memory_regions_full.
443
444 2020-07-22 Kevin Buettner <kevinb@redhat.com>
445
446 * corelow.c (solist.h, unordered_map): Include.
447 (class core_target): Add field m_core_file_mappings and
448 method build_file_mappings.
449 (core_target::core_target): Call build_file_mappings.
450 (core_target::~core_target): Free memory associated with
451 m_core_file_mappings.
452 (core_target::build_file_mappings): New method.
453 (core_target::xfer_partial): Use m_core_file_mappings
454 for memory transfers.
455 * linux-tdep.c (linux_read_core_file_mappings): New
456 function.
457 (linux_core_info_proc_mappings): Rewrite to use
458 linux_read_core_file_mappings.
459 (linux_init_abi): Register linux_read_core_file_mappings.
460
461 2020-07-22 Kevin Buettner <kevinb@redhat.com>
462
463 * arch-utils.c (default_read_core_file_mappings): New function.
464 * arch-utils.c (default_read_core_file_mappings): Declare.
465 * gdbarch.sh (read_core_file_mappings): New gdbarch method.
466 * gdbarch.h, gdbarch.c: Regenerate.
467
468 2020-07-22 Kevin Buettner <kevinb@redhat.com>
469
470 PR corefiles/25631
471 * corelow.c (core_target:xfer_partial): Revise
472 TARGET_OBJECT_MEMORY case to consider non-SEC_HAS_CONTENTS
473 case after first checking the stratum beneath the core
474 target.
475 (has_all_memory): Return true.
476 * target.c (raw_memory_xfer_partial): Revise comment
477 regarding use of has_all_memory.
478
479 2020-07-22 Kevin Buettner <kevinb@redhat.com>
480
481 * exec.h (section_table_xfer_memory): Revise declaration,
482 replacing section name parameter with an optional callback
483 predicate.
484 * exec.c (section_table_xfer_memory): Likewise.
485 * bfd-target.c, exec.c, target.c, corelow.c: Adjust all callers
486 of section_table_xfer_memory.
487
488 2020-07-22 Tom Tromey <tromey@adacore.com>
489
490 * mi/mi-cmd-stack.c (list_args_or_locals): Use
491 lookup_symbol_search_name.
492
493 2020-07-22 Andrew Burgess <andrew.burgess@embecosm.com>
494
495 * python/py-registers.c (gdbpy_register_object_data_init): Remove
496 redundant local variable.
497 (gdbpy_get_register_descriptor): Extract descriptor vector as a
498 reference, not pointer, update code accordingly.
499
500 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
501 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
502
503 * objfiles.h (struct objfile) <skip_jit_symbol_lookup>: New field.
504 * jit.c (jit_breakpoint_re_set_internal): Use the
505 `skip_jit_symbol_lookup` field.
506
507 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
508 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
509
510 * jit.c (jit_read_descriptor): Define the descriptor address once,
511 use twice.
512 (jit_breakpoint_deleted): Move the declaration of the loop variable
513 `iter` into the loop header.
514 (jit_breakpoint_re_set_internal): Move the declaration of the local
515 variable `objf_data` to the first point of definition.
516 (jit_event_handler): Move the declaration of local variables
517 `code_entry`, `entry_addr`, and `objf` to their first point of use.
518 Rename `objf` to `jited`.
519
520 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
521
522 * jit.h (struct jiter_objfile_data) <jiter_objfile_data, objfile>:
523 Remove.
524 * jit.c (get_jiter_objfile_data): Update.
525
526 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
527 Simon Marchi <simon.marchi@polymtl.ca>
528
529 * jit.c (struct jit_program_space_data): Remove.
530 (jit_program_space_key): Remove.
531 (jiter_objfile_data::~jiter_objfile_data): Remove program space
532 stuff.
533 (get_jit_program_space_data): Remove.
534 (jit_breakpoint_deleted): Iterate on all of the program space's
535 objfiles.
536 (jit_inferior_init): Likewise.
537 (jit_breakpoint_re_set_internal): Likewise. Also change return
538 type to void.
539 (jit_breakpoint_re_set): Pass current_program_space to
540 jit_breakpoint_re_set_internal.
541
542 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
543
544 * jit.h (struct jiter_objfile_data) <cached_code_address,
545 jit_breakpoint>: Move to here from ...
546 * jit.c (jit_program_space_data): ... here.
547 (jiter_objfile_data::~jiter_objfile_data): Update.
548 (jit_breakpoint_deleted): Update.
549 (jit_breakpoint_re_set_internal): Update.
550
551 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
552
553 * jit.c (jiter_objfile_data::~jiter_objfile_data): Remove some
554 checks.
555 (jit_read_descriptor): Remove NULL check.
556 (jit_event_handler): Add an assertion.
557
558 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
559
560 * jit.h (struct jit_objfile_data): Split into...
561 (struct jiter_objfile_data): ... this ...
562 (struct jited_objfile_data): ... and this.
563 * objfiles.h (struct objfile) <jit_data>: Remove.
564 <jiter_data, jited_data>: New fields.
565 * jit.c (jit_objfile_data::~jit_objfile_data): Rename to ...
566 (jiter_objfile_data::~jiter_objfile_data): ... this.
567 (get_jit_objfile_data): Rename to ...
568 (get_jiter_objfile_data): ... this.
569 (add_objfile_entry): Update.
570 (jit_read_descriptor): Use get_jiter_objfile_data.
571 (jit_find_objf_with_entry_addr): Use objfile's jited_data field.
572 (jit_breakpoint_re_set_internal): Use get_jiter_objfile_data.
573 (jit_inferior_exit_hook): Use objfile's jited_data field.
574
575 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
576
577 * jit.h: Forward-declare `struct minimal_symbol`.
578 (struct jit_objfile_data): Migrate to here from jit.c; also add a
579 constructor, destructor, and an objfile* field.
580 * jit.c (jit_objfile_data): Remove.
581 (struct jit_objfile_data): Migrate from here to jit.h.
582 (jit_objfile_data::~jit_objfile_data): New destructor
583 implementation with code moved from free_objfile_data.
584 (free_objfile_data): Delete.
585 (get_jit_objfile_data): Update to use the jit_data field of objfile.
586 (jit_find_objf_with_entry_addr): Ditto.
587 (jit_inferior_exit_hook): Ditto.
588 (_initialize_jit): Remove the call to
589 register_objfile_data_with_cleanup.
590 * objfiles.h (struct objfile) <jit_data>: New field.
591
592 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
593
594 * jit.h: Forward-declare `struct objfile`.
595 (jit_event_handler): Add a second parameter, the JITer objfile.
596 * jit.c (jit_read_descriptor): Change the signature to take the
597 JITer objfile as an argument instead of the jit_program_space_data.
598 (jit_inferior_init): Update the call to jit_read_descriptor.
599 (jit_event_handler): Use the new JITer objfile argument when calling
600 jit_read_descriptor.
601 * breakpoint.c (handle_jit_event): Update the call to
602 jit_event_handler to pass the JITer objfile.
603
604 2020-07-21 John Baldwin <jhb@FreeBSD.org>
605
606 * gdbarch.c: Regenerate.
607 * gdbarch.h: Regenerate.
608 * gdbarch.sh (handle_segmentation_fault): Remove method.
609 * infrun.c (handle_segmentation_fault): Remove.
610 (print_signal_received_reason): Remove call to
611 handle_segmentation_fault.
612
613 2020-07-21 John Baldwin <jhb@FreeBSD.org>
614
615 * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
616 Rename to sparc64_linux_report_signal_info and add siggnal
617 argument.
618 (sparc64_linux_init_abi): Use sparc64_linux_report_signal_info
619 instead of sparc64_linux_handle_segmentation_fault.
620
621 2020-07-21 John Baldwin <jhb@FreeBSD.org>
622
623 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Use
624 i386_linux_report_signal_info instead of
625 i386_linux_handle_segmentation_fault.
626 * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Rename
627 to i386_linux_report_signal_info and add siggnal argument.
628 (i386_linux_init_abi): Use i386_linux_report_signal_info instead
629 of i386_linux_handle_segmentation_fault.
630 * i386-linux-tdep.h (i386_linux_handle_segmentation_fault): Rename
631 to i386_linux_report_signal_info and add siggnal argument.
632
633 2020-07-21 John Baldwin <jhb@FreeBSD.org>
634
635 * corelow.c (core_target_open): Invoke gdbarch report_signal_info
636 hook if present.
637
638 2020-07-21 John Baldwin <jhb@FreeBSD.org>
639
640 * gdbarch.c: Regenerate.
641 * gdbarch.h: Regenerate.
642 * gdbarch.sh (report_signal_info): New method.
643 * infrun.c (print_signal_received_reason): Invoke gdbarch
644 report_signal_info hook if present.
645
646 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
647
648 * python/py-registers.c : Add 'unordered_map' include.
649 (gdbpy_new_reggroup): Renamed to...
650 (gdbpy_get_reggroup): ...this. Update to only create register
651 group descriptors when needed.
652 (gdbpy_reggroup_iter_next): Update.
653
654 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
655
656 * python/py-registers.c (gdbpy_register_object_data): New static
657 global.
658 (gdbpy_register_object_data_init): New function.
659 (gdbpy_new_register_descriptor): Renamed to...
660 (gdbpy_get_register_descriptor): ...this, and update to reuse
661 existing register descriptors where possible.
662 (gdbpy_register_descriptor_iter_next): Update.
663 (gdbpy_initialize_registers): Register new gdbarch data.
664
665 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
666
667 * linux-nat.c (stopped_pids): Make static.
668
669 2020-07-21 Simon Marchi <simon.marchi@polymtl.ca>
670
671 PR ada/26235
672 * gdbtypes.c (ada_discrete_type_low_bound,
673 ada_discrete_type_high_bound): Handle undefined bounds.
674
675 2020-07-21 Kamil Rytarowski <n54@gmx.com>
676
677 * nbsd-nat.h (nbsd_nat_target::supports_multi_process): New
678 declaration.
679 * nbsd-nat.c (nbsd_nat_target::supports_multi_process): New
680 function.
681
682 2020-07-20 John Baldwin <jhb@FreeBSD.org>
683
684 * fbsd-tdep.c (fbsd_skip_solib_resolver): New function.
685 (fbsd_init_abi): Install gdbarch "skip_solib_resolver" method.
686 * fbsd-tdep.h (fbsd_skip_solib_resolver): New prototype.
687 * mips-fbsd-tdep.c (mips_fbsd_skip_solib_resolver): New function.
688 (mips_fbsd_init_abi): Install gdbarch "skip_solib_resolver"
689 method.
690
691 2020-07-20 Ludovic Courtès <ludo@gnu.org>
692
693 * guile/scm-math.c (vlscm_integer_fits_p): Use 'uintmax_t'
694 and 'intmax_t' instead of 'scm_t_uintmax' and 'scm_t_intmax',
695 which are deprecated in Guile 3.0.
696 * configure.ac (try_guile_versions): Add "guile-3.0".
697 * configure (try_guile_versions): Regenerate.
698 * NEWS: Update entry.
699
700 2020-07-20 Ludovic Courtès <ludo@gnu.org>
701 Doug Evans <dje@google.com>
702
703 PR gdb/21104
704 * guile/scm-ports.c (USING_GUILE_BEFORE_2_2): New macro.
705 (ioscm_memory_port)[read_buf_size, write_buf_size]: Wrap in #if
706 USING_GUILE_BEFORE_2_2.
707 (stdio_port_desc, memory_port_desc) [!USING_GUILE_BEFORE_2_2]:
708 Change type to 'scm_t_port_type *'.
709 (natural_buffer_size) [!USING_GUILE_BEFORE_2_2]: New variable.
710 (ioscm_open_port) [USING_GUILE_BEFORE_2_2]: Add 'stream'
711 parameter and honor it. Update callers.
712 (ioscm_open_port) [!USING_GUILE_BEFORE_2_2]: New function.
713 (ioscm_read_from_port, ioscm_write) [!USING_GUILE_BEFORE_2_2]: New
714 functions.
715 (ioscm_fill_input, ioscm_input_waiting, ioscm_flush): Wrap in #if
716 USING_GUILE_BEFORE_2_2.
717 (ioscm_init_gdb_stdio_port) [!USING_GUILE_BEFORE_2_2]: Use
718 'ioscm_read_from_port'. Call 'scm_set_port_read_wait_fd'.
719 (ioscm_init_stdio_buffers) [!USING_GUILE_BEFORE_2_2]: New function.
720 (gdbscm_stdio_port_p) [!USING_GUILE_BEFORE_2_2]: Use 'SCM_PORTP'
721 and 'SCM_PORT_TYPE'.
722 (gdbscm_memory_port_end_input, gdbscm_memory_port_seek)
723 (ioscm_reinit_memory_port): Wrap in #if USING_GUILE_BEFORE_2_2.
724 (gdbscm_memory_port_read, gdbscm_memory_port_write)
725 (gdbscm_memory_port_seek, gdbscm_memory_port_close)
726 [!USING_GUILE_BEFORE_2_2]: New functions.
727 (gdbscm_memory_port_print): Remove use of 'SCM_PTOB_NAME'.
728 (ioscm_init_memory_port_type) [!USING_GUILE_BEFORE_2_2]: Use
729 'gdbscm_memory_port_read'.
730 Wrap 'scm_set_port_end_input', 'scm_set_port_flush', and
731 'scm_set_port_free' calls in #if USING_GUILE_BEFORE_2_2.
732 (gdbscm_get_natural_buffer_sizes) [!USING_GUILE_BEFORE_2_2]: New
733 function.
734 (ioscm_init_memory_port): Remove.
735 (ioscm_init_memory_port_stream): New function
736 (ioscm_init_memory_port_buffers) [USING_GUILE_BEFORE_2_2]: New
737 function.
738 (gdbscm_memory_port_read_buffer_size) [!USING_GUILE_BEFORE_2_2]:
739 Return scm_from_uint (0).
740 (gdbscm_set_memory_port_read_buffer_size_x)
741 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
742 (gdbscm_memory_port_write_buffer_size) [!USING_GUILE_BEFORE_2_2]:
743 Return scm_from_uint (0).
744 (gdbscm_set_memory_port_write_buffer_size_x)
745 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
746 * configure.ac (try_guile_versions): Add "guile-2.2".
747 * configure: Regenerate.
748 * NEWS: Add entry.
749
750 2020-07-18 Tom Tromey <tom@tromey.com>
751
752 * linux-nat.c (linux_multi_process): Remove.
753 (linux_nat_target::supports_multi_process): Return true.
754
755 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
756
757 * arch/riscv.c (riscv_tdesc_cache): Change map type.
758 (riscv_lookup_target_description): Return pointer out of
759 unique_ptr.
760 * target-descriptions.c (allocate_target_description): Add
761 comment.
762 (target_desc_deleter::operator()): Likewise.
763 * target-descriptions.h (struct target_desc_deleter): Moved to
764 gdbsupport/tdesc.h.
765 (target_desc_up): Likewise.
766
767 2020-07-17 Tom Tromey <tromey@adacore.com>
768
769 * linux-nat.c (linux_nat_target::supports_non_stop)
770 (linux_nat_target::always_non_stop_p): Use "true".
771 (linux_nat_target::supports_disable_randomization): Use "true" and
772 "false".
773
774 2020-07-16 Caroline Tice <cmtice@google.com>
775
776 * dwarf2/read.c (RNGLIST_HEADER_SIZE32) New constant definition.
777 (RNGLIST_HEADER_SIZE64): New constant definition.
778 (struct dwop_section_names): Add rnglists_dwo.
779 (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo.
780 (struct loclist_header): Rename to 'loclists_rnglists_header'.
781 (struct dwo_sections): Add rnglists field.
782 (read_attribut_reprocess): Add tag parameter.
783 (dwarf2_ranges_read): Add tag parameter & remove forward function decl.
784 (cu_debug_rnglists_section): New function (decl & definition).
785 (dwarf2_locate_dwo_sections): Add code to read rnglists_dwo section.
786 (dwarf2_rnglists_process): Add a dwarf_tag parameter, for the kind of
787 die whose range is being checked; get rnglist section from
788 cu_debug_rnglists_section, to get from either objfile or dwo file as
789 appropriate. Add cases for DW_RLE_base_addressx,
790 DW_RLE_startx_length, DW_RLE_startx_endx. Also, update to only add
791 the base address to DW_RLE_offset_pairs (not to all ranges), moving
792 test inside if-condition and updating complaint message.
793 (dwarf2_ranges_process): Add dwarf tag parameter and pass it to
794 dwarf2_rnglists_process.
795 (dwarf2_ranges_read): Add dwarf tag parameter and pass it to
796 dwarf2_ranges_process.
797 (dwarf2_get_pc_bounds): Check for DW_FORM_rnglistx when setting
798 need_ranges_base and update comment appropriately. Also pass die tag
799 to dwarf2_ranges_read.
800 (dwarf2_record_block_ranges): Check for DW_FORM_rnglistx when setting
801 need_ranges_base and update comment appropriately. Also pass die tag
802 to dwarf2_ranges_process.
803 (read_full_die_1): Add code to read DW_AT_rnglists_base and assign to
804 cu->ranges_base. Also pass die tag to read_attribute_reprocess.
805 (partial_die_info::read): Check for DW_FORM_rnglistx when setting
806 need_ranges_base and update comment appropriately. Also pass die tag
807 to read_attribute_reprocess and dwarf2_ranges_read.
808 (read_loclist_header): Rename function to read_loclists_rnglists_header,
809 and update function comment appropriately.
810 (read_loclist_index): Call read_loclists_rnglists_header instead of
811 read_loclist_header.
812 (read_rnglist_index): New function.
813 (read_attribute_reprocess): Add tag parameter. Add code for
814 DW_FORM_rnglistx, passing tag to read_rnglist_index.
815 (read_attribute_value): Mark DW_FORM_rnglistx with need_reprocess.
816
817 2020-07-15 Andrew Burgess <andrew.burgess@embecosm.com>
818
819 * f-typeprint.c (f_type_print_base): Allow for dynamic types not
820 being resolved.
821
822 2020-07-14 Andrew Burgess <andrew.burgess@embecosm.com>
823
824 * arch-utils.c (show_architecture): Update formatting of messages.
825
826 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
827
828 * gdbtypes.h (struct type) <bounds>: Handle array and string
829 types.
830 * ada-lang.c (assign_aggregate): Use type::bounds on
831 array/string type.
832 * c-typeprint.c (c_type_print_varspec_suffix): Likewise.
833 * c-varobj.c (c_number_of_children): Likewise.
834 (c_describe_child): Likewise.
835 * eval.c (evaluate_subexp_for_sizeof): Likewise.
836 * f-typeprint.c (f_type_print_varspec_suffix): Likewise.
837 (f_type_print_base): Likewise.
838 * f-valprint.c (f77_array_offset_tbl): Likewise.
839 (f77_get_upperbound): Likewise.
840 (f77_print_array_1): Likewise.
841 * guile/scm-type.c (gdbscm_type_range): Likewise.
842 * m2-typeprint.c (m2_array): Likewise.
843 (m2_is_long_set_of_type): Likewise.
844 * m2-valprint.c (get_long_set_bounds): Likewise.
845 * p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
846 * python/py-type.c (typy_range): Likewise.
847 * rust-lang.c (rust_internal_print_type): Likewise.
848 * type-stack.c (type_stack::follow_types): Likewise.
849 * valarith.c (value_subscripted_rvalue): Likewise.
850 * valops.c (value_cast): Likewise.
851
852 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
853
854 * gdbtypes.c (TYPE_ARRAY_BIT_STRIDE): Remove. Update all
855 callers to use the equivalent accessor methods.
856
857 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
858
859 * gdbtypes.h (struct range_bounds) <bit_stride>: New method.
860 (struct type) <bit_stride>: New method.
861 (TYPE_BIT_STRIDE): Remove.
862 * gdbtypes.c (update_static_array_size): Use type::bit_stride.
863
864 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
865
866 * gdbtypes.h (TYPE_ARRAY_LOWER_BOUND_VALUE,
867 TYPE_ARRAY_UPPER_BOUND_VALUE): Remove. Update all
868 callers to use the equivalent accessor methods instead.
869
870 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
871
872 * gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED,
873 TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Remove. Update all
874 callers to use the equivalent accessor methods instead.
875
876 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
877
878 * gdbtypes.h (TYPE_LOW_BOUND_KIND,
879 TYPE_HIGH_BOUND_KIND): Remove. Update all callers
880 to use dynamic_prop::kind.
881
882 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
883
884 * gdbtypes.h (TYPE_LOW_BOUND_UNDEFINED,
885 TYPE_HIGH_BOUND_UNDEFINED): Remove. Update all callers
886 to get the bound property's kind and check against
887 PROP_UNDEFINED.
888
889 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
890
891 * gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND): Remove. Update
892 all callers to use type::range_bounds followed by
893 dynamic_prop::{low,high}.
894
895 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
896
897 * gdbtypes.h (struct dynamic_prop) <kind, set_undefined,
898 const_val, set_const_val, baton, set_locexpr, set_loclist,
899 set_addr_offset, variant_parts, set_variant_parts,
900 original_type, set_original_type>: New methods.
901 <kind>: Rename to...
902 <m_kind>: ... this. Update all users to use the new methods
903 instead.
904 <data>: Rename to...
905 <m_data>: ... this. Update all users to use the new methods
906 instead.
907
908 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
909
910 * gdbtypes.c (get_discrete_bounds): Return failure if
911 the range type's bounds are not both defined and constant
912 values.
913 (get_array_bounds): Update comment. Remove undefined bound check.
914
915 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
916
917 * gdbtypes.h (TYPE_RANGE_DATA): Remove. Update callers to use
918 the type::bounds method directly.
919
920 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
921
922 * gdbtypes.h (struct type) <bounds, set_bounds>: New methods.
923 (TYPE_RANGE_DATA): Use type::bounds. Change all uses that
924 are used to set the range type's bounds to use set_bounds.
925
926 2020-07-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
927
928 * exec.c (_initialize_exec): Update exec-file-mismatch help.
929
930 2020-07-10 Pedro Alves <pedro@palves.net>
931
932 * gdbthread.h (inferior_ref): Define.
933 (scoped_restore_current_thread) <m_thread>: Now a thread_info_ref.
934 (scoped_restore_current_thread) <m_inf>: Now an inferior_ref.
935 * thread.c
936 (scoped_restore_current_thread::restore):
937 Adjust to gdb::ref_ptr.
938 (scoped_restore_current_thread::~scoped_restore_current_thread):
939 Remove manual decref handling.
940 (scoped_restore_current_thread::scoped_restore_current_thread):
941 Adjust to use
942 inferior_ref::new_reference/thread_info_ref::new_reference.
943 Incref the thread before calling get_frame_id instead of after.
944 Let TARGET_CLOSE_ERROR propagate.
945
946 2020-07-10 Pedro Alves <pedro@palves.net>
947
948 * frame-tailcall.c (dwarf2_tailcall_sniffer_first): Only swallow
949 NO_ENTRY_VALUE_ERROR / MEMORY_ERROR / OPTIMIZED_OUT_ERROR /
950 NOT_AVAILABLE_ERROR.
951 * value.c (value_optimized_out): Only swallow MEMORY_ERROR /
952 OPTIMIZED_OUT_ERROR / NOT_AVAILABLE_ERROR.
953
954 2020-07-10 Simon Marchi <simon.marchi@polymtl.ca>
955 Pedro Alves <pedro@palves.net>
956
957 PR gdb/26199
958 * infrun.c (threads_are_resumed_pending_p): Delete.
959 (do_target_wait): Remove threads_are_executing and
960 threads_are_resumed_pending_p checks from the inferior_matches
961 lambda. Update comments.
962
963 2020-07-10 Pedro Alves <pedro@palves.net>
964
965 PR gdb/26199
966 * infrun.c (handle_no_resumed): Transfer terminal to inferior with
967 executing threads.
968
969 2020-07-10 Pedro Alves <pedro@palves.net>
970
971 PR gdb/26199
972 * infrun.c (handle_no_resumed): Handle multiple targets.
973
974 2020-07-10 Pedro Alves <pedro@palves.net>
975
976 PR gdb/26199
977 * infrun.c (prepare_to_wait): Check target_can_async_p instead of
978 target_is_async_p.
979
980 2020-07-10 Pedro Alves <pedro@palves.net>
981
982 PR gdb/26199
983 * target.c (target_pass_ctrlc): Look at the inferior's non-exited
984 threads, not all threads.
985
986 2020-07-10 Pedro Alves <pedro@palves.net>
987
988 PR gdb/26199
989 * remote.c (remote_target::open_1): Pass remote target pointer as
990 data to create_async_event_handler.
991 (remote_async_inferior_event_handler): Mark async event handler
992 before returning if the remote target still has either pending
993 events or unacknowledged notifications.
994
995 2020-07-10 John Baldwin <jhb@FreeBSD.org>
996
997 * fbsd-nat.h (fbsd_nat_target::supports_multi_process): New
998 declaration.
999 * fbsd-nat.c (fbsd_nat_target::supports_multi_process): New
1000 function.
1001
1002 2020-07-09 John Baldwin <jhb@FreeBSD.org>
1003
1004 * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
1005 inferior_ptid.
1006
1007 2020-07-09 John Baldwin <jhb@FreeBSD.org>
1008
1009 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_ARGC,
1010 AT_FREEBSD_ARGV, AT_FREEBSD_ENVC, AT_FREEBSD_ENVV,
1011 AT_FREEBSD_PS_STRINGS.
1012
1013 2020-07-08 Hannes Domani <ssbssa@yahoo.de>
1014
1015 * auto-load.c (auto_load_objfile_script_1): Convert drive part
1016 of debugfile path on Windows.
1017
1018 2020-07-08 John Baldwin <jhb@FreeBSD.org>
1019
1020 * fbsd-nat.c (fbsd_nat_target::find_memory_regions): Rename 'obfd'
1021 argument to 'data'.
1022
1023 2020-07-08 Tom Tromey <tromey@adacore.com>
1024
1025 * ada-lang.c (ada_exception_message_1): Use read_memory.
1026
1027 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1028
1029 PR python/22748
1030 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Remove
1031 special handling for inline frames.
1032 * findvar.c (value_of_register_lazy): Skip inline frames when
1033 creating lazy register values.
1034 * frame.c (frame_id_computed_p): Delete definition.
1035 * frame.h (frame_id_computed_p): Delete declaration.
1036
1037 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1038
1039 * NEWS: Mention additions to Python API.
1040 * python/py-arch.c (archpy_register_groups): New function.
1041 (arch_object_methods): Add 'register_groups' method.
1042 * python/py-registers.c (reggroup_iterator_object): New struct.
1043 (reggroup_object): New struct.
1044 (gdbpy_new_reggroup): New function.
1045 (gdbpy_reggroup_to_string): New function.
1046 (gdbpy_reggroup_name): New function.
1047 (gdbpy_reggroup_iter): New function.
1048 (gdbpy_reggroup_iter_next): New function.
1049 (gdbpy_new_reggroup_iterator): New function
1050 (gdbpy_initialize_registers): Register new types.
1051 (reggroup_iterator_object_type): Define new Python type.
1052 (gdbpy_reggroup_getset): New static global.
1053 (reggroup_object_type): Define new Python type.
1054 * python/python-internal.h
1055
1056 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1057
1058 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-registers.c
1059 * python/py-arch.c (archpy_registers): New function.
1060 (arch_object_methods): Add 'registers' method.
1061 * python/py-registers.c: New file.
1062 * python/python-internal.h
1063 (gdbpy_new_register_descriptor_iterator): Declare.
1064 (gdbpy_initialize_registers): Declare.
1065 * python/python.c (do_start_initialization): Call
1066 gdbpy_initialize_registers.
1067 * NEWS: Mention additions to the Python API.
1068
1069 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1070
1071 * NEWS: Mention new Python API method.
1072 * python/py-unwind.c (pending_framepy_architecture): New function.
1073 (pending_frame_object_methods): Add architecture method.
1074
1075 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1076
1077 * gdbarch.c: Regenerate.
1078 * gdbarch.h: Regenerate.
1079 * gdbarch.sh (deprecated_set_gdbarch_data): Delete.
1080 (gdbarch_data): Use internal_error for the case where
1081 deprecated_set_gdbarch_data was originally needed.
1082 * ia64-libunwind-tdep.c (libunwind_descr_init): Update parameters,
1083 and use passed in obstack.
1084 (libunwind_frame_set_descr): Should no longer get back NULL from
1085 gdbarch_data.
1086 (_initialize_libunwind_frame): Register as a pre-init gdbarch data
1087 type.
1088 * user-regs.c (user_regs_init): Update parameters, and use passed
1089 in obstack.
1090 (user_reg_add): Should no longer get back NULL from gdbarch_data.
1091 (_initialize_user_regs): Register as a pre-init gdbarch data type.
1092
1093 2020-07-06 Tom de Vries <tdevries@suse.de>
1094
1095 * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Handle
1096 End-Of-Sequence in lte_is_less_than.
1097 * symtab.c (find_pc_sect_line): Revert change from commit 3d92a3e313
1098 "gdb: Don't reorder line table entries too much when sorting".
1099
1100 2020-07-06 Tom de Vries <tdevries@suse.de>
1101
1102 PR tui/26205
1103 * tui/tui-win.c (tui_partial_win_by_name): Don't test for NULL name.
1104
1105 2020-07-05 Tom de Vries <tdevries@suse.de>
1106
1107 PR build/26187
1108 * inferior.h (struct infcall_suspend_state_deleter): If available, use
1109 std::uncaught_exceptions instead of deprecated
1110 std::uncaught_exception.
1111
1112 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1113
1114 * macroexp.h (macro_stringify): Return
1115 gdb::unique_xmalloc_ptr<char>.
1116 * macroexp.c (macro_stringify): Likewise.
1117 * macrotab.c (fixup_definition): Update.
1118
1119 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1120
1121 * c-exp.y (scan_macro_expansion): Don't free `expansion`.
1122 (lex_one_token): Update.
1123 * macroexp.c (struct macro_buffer) <release>: Return
1124 gdb::unique_xmalloc_ptr<char>.
1125 (macro_stringify): Update.
1126 (macro_expand): Update.
1127 (macro_expand_next): Return gdb::unique_xmalloc_ptr<char>.
1128 * macroexp.h (macro_expand_next): Likewise.
1129
1130 2020-07-02 Simon Marchi <simon.marchi@efficios.com>
1131
1132 * macroexp.h (macro_lookup_ftype): Remove.
1133 (macro_expand, macro_expand_once, macro_expand_next): Remove
1134 lookup function parameters, add scope parameter.
1135 * macroexp.c (scan, substitute_args, expand, maybe_expand,
1136 macro_expand, macro_expand_once, macro_expand_next): Likewise.
1137 * macroscope.h (standard_macro_lookup): Change parameter type
1138 to macro_scope.
1139 * macroscope.c (standard_macro_lookup): Likewise.
1140 * c-exp.y (lex_one_token): Update.
1141 * macrocmd.c (macro_expand_command): Likewise.
1142 (macro_expand_once_command): Likewise.
1143
1144 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1145
1146 * inf-loop.c (inferior_event_handler): Remove client_data param.
1147 * inf-loop.h (inferior_event_handler): Likewise.
1148 * infcmd.c (step_1): Adjust.
1149 * infrun.c (proceed): Adjust.
1150 (fetch_inferior_event): Remove client_data param.
1151 (infrun_async_inferior_event_handler): Adjust.
1152 * infrun.h (fetch_inferior_event): Remove `void *` param.
1153 * linux-nat.c (handle_target_event): Adjust.
1154 * record-btrace.c (record_btrace_handle_async_inferior_event):
1155 Adjust.
1156 * record-full.c (record_full_async_inferior_event_handler):
1157 Adjust.
1158 * remote.c (remote_async_inferior_event_handler): Adjust.
1159
1160 2020-07-01 Tom Tromey <tom@tromey.com>
1161
1162 * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
1163 * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
1164
1165 2020-07-01 Tom Tromey <tom@tromey.com>
1166
1167 * tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from
1168 tui_gen_win_info.
1169 (tui_win_info::make_window): Merge with
1170 tui_gen_win_info::make_window.
1171 (tui_win_info::make_visible): Move from tui_gen_win_info.
1172 * tui/tui-win.c (tui_win_info::max_width): Move from
1173 tui_gen_win_info.
1174 * tui/tui-layout.h (class tui_layout_window) <m_window>: Change
1175 type.
1176 <window_factory>: Likewise.
1177 * tui/tui-layout.c (tui_win_info::resize): Move from
1178 tui_gen_win_info.
1179 (make_standard_window): Change return type.
1180 (get_locator_window, tui_get_window_by_name): Likewise.
1181 (tui_layout_window::apply): Remove a cast.
1182 * tui/tui-data.h (MIN_WIN_HEIGHT): Move earlier.
1183 (struct tui_win_info): Merge with tui_gen_win_info.
1184 (struct tui_gen_win_info): Remove.
1185
1186 2020-07-01 Tom Tromey <tom@tromey.com>
1187
1188 * tui/tui-stack.h (struct tui_locator_window): Derive from
1189 tui_win_info.
1190 <do_scroll_horizontal, do_scroll_vertical>: New methods.
1191 <can_box>: New method.
1192
1193 2020-07-01 Tom Tromey <tom@tromey.com>
1194
1195 * tui/tui-stack.h (struct tui_locator_window): Remove body.
1196
1197 2020-07-01 Tom Tromey <tom@tromey.com>
1198
1199 * tui/tui-regs.c (tui_data_window::display_registers_from)
1200 (tui_data_window::display_registers_from)
1201 (tui_data_window::first_data_item_displayed)
1202 (tui_data_window::delete_data_content_windows): Update.
1203 (tui_data_window::refresh_window, tui_data_window::no_refresh):
1204 Remove.
1205 (tui_data_window::check_register_values): Update.
1206 (tui_data_item_window::rerender): Add parameters. Update.
1207 (tui_data_item_window::refresh_window): Remove.
1208 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: No longer
1209 virtual.
1210 * tui/tui-regs.h (struct tui_data_item_window): Don't derive from
1211 tui_gen_win_info.
1212 <refresh_window, max_height, min_height>: Remove.
1213 <rerender>: Add parameters.
1214 <x, y, visible>: New members.
1215 (struct tui_data_window) <refresh_window, no_refresh>: Remove.
1216 <m_item_width>: New member.
1217
1218 2020-07-01 Tom Tromey <tom@tromey.com>
1219
1220 * tui/tui-regs.c (tui_data_window::show_register_group)
1221 (tui_data_window::check_register_values): Update.
1222 * tui/tui-regs.h (struct tui_data_item_window) <regno>: Rename
1223 from item_no.
1224
1225 2020-07-01 Tom Tromey <tom@tromey.com>
1226
1227 * tui/tui-regs.c (tui_data_window::show_register_group): Remove
1228 useless "if".
1229
1230 2020-07-01 Tom Tromey <tom@tromey.com>
1231
1232 * tui/tui-regs.c (tui_data_window::show_register_group): Update.
1233 * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove.
1234
1235 2020-07-01 Tom Tromey <tom@tromey.com>
1236
1237 * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h
1238 * tui/tui-winsource.h (enum tui_line_or_address_kind)
1239 (struct tui_line_or_address): Move from tui-data.h.
1240 * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h.
1241 * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c.
1242 (tui_cmd_window, tui_source_window_base, tui_source_window)
1243 (tui_disasm_window): Don't declare.
1244 (enum tui_line_or_address_kind, struct tui_line_or_address): Move
1245 to tui-winsource.h.
1246 (SINGLE_KEY): Move to tui-stack.c.
1247
1248 2020-07-01 Tom Tromey <tom@tromey.com>
1249
1250 * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a
1251 std::string.
1252 * tui/tui-regs.c (class tab_expansion_file): New.
1253 (tab_expansion_file::write): New method.
1254 (tui_register_format): Change return type. Use
1255 tab_expansion_file.
1256 (tui_get_register, tui_data_window::display_registers_from)
1257 (tui_data_item_window::rerender): Update.
1258 * tui/tui-io.h (tui_expand_tabs): Don't declare.
1259 * tui/tui-io.c (tui_expand_tabs): Remove.
1260
1261 2020-07-01 Tom Tromey <tom@tromey.com>
1262
1263 * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
1264
1265 2020-07-01 Fangrui Song <maskray@google.com>
1266
1267 * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
1268
1269 2020-07-01 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1270
1271 * dwarf2/read.c (set_die_type): Removed conditions to restrict
1272 forms for DW_AT_associated and DW_AT_allocated attributes,
1273 which is already checked in function attr_to_dynamic_prop.
1274
1275 2020-06-30 Tom Tromey <tromey@adacore.com>
1276
1277 * dwarf2/read.c (quirk_rust_enum): Correctly call
1278 alloc_rust_variant for default-less enum.
1279
1280 2020-06-30 Tom Tromey <tromey@adacore.com>
1281
1282 PR build/26183:
1283 * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
1284 gdb::to_string.
1285
1286 2020-06-29 Simon Marchi <simon.marchi@efficios.com>
1287
1288 * gdbarch.sh (displaced_step_copy_insn): Update doc.
1289 * gdbarch.h: Re-generate.
1290
1291 2020-06-28 Tom Tromey <tom@tromey.com>
1292
1293 * command.h (cmd_types): Remove.
1294 (cmd_type): Don't declare.
1295 * cli/cli-decode.h (enum cmd_types): Uncomment. No longer a
1296 typedef.
1297 * cli/cli-cmds.c (setting_cmd): Use cmd->type directly.
1298 * cli/cli-decode.c (cmd_type): Remove.
1299
1300 2020-06-27 Pedro Alves <palves@redhat.com>
1301
1302 * fork-child.c (prefork_hook): Adjust.
1303 * infcmd.c (set_inferior_io_terminal, get_inferior_io_terminal):
1304 Delete.
1305 (set_inferior_tty_command, show_inferior_tty_command): Adjust.
1306 * inferior.c (inferior::set_tty, inferior::tty): New methods.
1307 * inferior.h (set_inferior_io_terminal, get_inferior_io_terminal):
1308 Remove declarations.
1309 (struct inferior) <set_tty, tty>: New methods.
1310 (struct inferior) <terminal>: Rename to ...
1311 (struct inferior) <m_terminal>: ... this and make private.
1312 * main.c (captured_main_1): Adjust.
1313 * mi/mi-cmd-env.c (mi_cmd_inferior_tty_set): Adjust.
1314 (mi_cmd_inferior_tty_show): Adjust.
1315 * nto-procfs.c (nto_procfs_target::create_inferior): Adjust.
1316 * windows-nat.c (windows_nat_target::create_inferior): Adjust.
1317
1318 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
1319
1320 * configure.ac: Add --enable-libctf: handle --disable-static
1321 properly.
1322 * acinclude.m4: sinclude ../config/enable.m4.
1323 * Makefile.in (aclocal_m4_deps): Adjust accordingly.
1324 (LIBCTF): Substitute in.
1325 (CTF_DEPS): New, likewise.
1326 (CLIBS): libctf needs symbols from libbfd: move earlier.
1327 (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath
1328 flags.
1329 * ctfread.c: Surround in ENABLE_LIBCTF.
1330 (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub.
1331 * configure: Regenerate.
1332 * config.in: Likewise.
1333
1334 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
1335
1336 * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
1337
1338 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
1339
1340 * inferior.h (struct inferior) <terminal>: Change type to
1341 gdb::unique_xmalloc_ptr<char>.
1342 * inferior.c (inferior::~inferior): Don't free inf->terminal.
1343 * infcmd.c (set_inferior_io_terminal): Don't free terminal
1344 field, adjust to unique pointer.
1345 (get_inferior_io_terminal): Adjust to unique pointer.
1346
1347 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1348
1349 * riscv-tdep.c (riscv_print_registers_info): Loop over all
1350 registers, not just the known core set of registers.
1351
1352 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1353
1354 * riscv-tdep.c (riscv_register_name): Return NULL for duplicate
1355 fflags, frm, and fcsr registers.
1356 (riscv_register_reggroup_p): Remove unknown CSRs from save and
1357 restore groups.
1358 (riscv_tdesc_unknown_reg): New function.
1359 (riscv_gdbarch_init): Pass riscv_tdesc_unknown_reg to
1360 tdesc_use_registers.
1361 * riscv-tdep.h (struct gdbarch_tdep): Add
1362 unknown_csrs_first_regnum, unknown_csrs_count,
1363 duplicate_fflags_regnum, duplicate_frm_regnum, and
1364 duplicate_fcsr_regnum fields.
1365
1366 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1367
1368 * target-descriptions.c (tdesc_use_registers): Add new parameter a
1369 callback, use the callback (when not null) to help number unknown
1370 registers.
1371 * target-descriptions.h (tdesc_unknown_register_ftype): New typedef.
1372 (tdesc_use_registers): Add extra parameter to declaration.
1373
1374 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1375
1376 * riscv-tdep.c (value_of_riscv_user_reg): Moved to here from later
1377 in the file.
1378 (class riscv_pending_register_alias): Likewise.
1379 (riscv_register_feature::register_info): Change 'required_p' field
1380 to 'required', and change its type. Add 'check' member function.
1381 (riscv_register_feature::register_info::check): Define new member
1382 function.
1383 (riscv_xreg_feature): Change initialisation of 'required' field.
1384 (riscv_freg_feature): Likewise.
1385 (riscv_virtual_feature): Likewise.
1386 (riscv_csr_feature): Likewise.
1387 (riscv_check_tdesc_feature): Take extra parameter, the csr
1388 tdesc_feature, rewrite the function to use the new
1389 riscv_register_feature::register_info::check function.
1390 (riscv_gdbarch_init): Pass the csr tdesc_feature where needed.
1391
1392 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1393
1394 * features/Makefile: Remove all references to the deleted files
1395 below.
1396 * features/riscv/32bit-csr.c: Deleted.
1397 * features/riscv/32bit-csr.xml: Deleted.
1398 * features/riscv/64bit-csr.c: Deleted.
1399 * features/riscv/64bit-csr.xml: Deleted.
1400 * features/riscv/rebuild-csr-xml.sh: Deleted.
1401
1402 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1403
1404 * riscv-tdep.c (struct riscv_register_feature::register_info): Fix
1405 whitespace error for declaration of names member variable.
1406 (struct riscv_register_feature): Add new prefer_first_name member
1407 variable, and fix whitespace error in declaration of registers.
1408 (riscv_xreg_feature): Initialize prefer_first_name field.
1409 (riscv_freg_feature): Likewise.
1410 (riscv_virtual_feature): Likewise.
1411 (riscv_csr_feature): Likewise.
1412 (riscv_register_name): Expand on comments. Remove register name
1413 modifications for CSR and virtual registers.
1414
1415 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1416
1417 * riscv-tdep.c (struct riscv_register_feature): Fix whitespace
1418 errors.
1419
1420 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1421
1422 * riscv-tdep.c (riscv_create_csr_aliases): Handle csr aliases from
1423 riscv-opc.h.
1424 (class riscv_pending_register_alias): New class.
1425 (riscv_check_tdesc_feature): Take vector of pending aliases and
1426 populate it as appropriate.
1427 (riscv_setup_register_aliases): Delete.
1428 (riscv_gdbarch_init): Create vector of pending aliases and pass it
1429 to riscv_check_tdesc_feature in all cases. Use the vector to
1430 create the register aliases.
1431
1432 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1433
1434 * sol2-tdep.c (sol2_static_transform_name): Remove.
1435 (sol2_init_abi): Don't register it.
1436 * gdbarch.sh (static_transform_name): Remove.
1437 * gdbarch.c, gdbarch.h: Regenerate.
1438
1439 * dbxread.c (read_dbx_symtab) <'S'>: Remove call to
1440 gdbarch_static_transform_name.
1441 * mdebugread.c (parse_partial_symbols) <'S'>: Likewise.
1442 * stabsread.c (define_symbol) <'X'>: Remove.
1443 (define_symbol) <'S'>: Remove gdbarch_static_transform_name
1444 handling.
1445 <'V'>: Likewise.
1446 * xcoffread.c (scan_xcoff_symtab): Remove gdbarch.
1447 <'S'>: Remove call to gdbarch_static_transform_name.
1448
1449 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1450
1451 * procfs.c (procfs_pre_trace): New function.
1452 (procfs_target::create_inferior): Pass it to fork_inferior.
1453
1454 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1455
1456 * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove
1457 sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o.
1458 <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o,
1459 sol2-tdep.o, sparc-sol2-tdep.o.
1460 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static.
1461 * sparc-tdep.h (sparc32_sol2_init_abi): Remove.
1462 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static.
1463 * sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
1464
1465 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1466
1467 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
1468 (amd64_sol2_init_abi): Use sol2_sigtramp_p.
1469 Call sol2_init_abi.
1470 Remove calls to set_gdbarch_skip_solib_resolver,
1471 set_gdbarch_core_pid_to_str.
1472 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
1473 (i386_sol2_static_transform_name): Remove.
1474 (i386_sol2_init_abi): Call sol2_init_abi.
1475 Remove calls to set_gdbarch_sofun_address_maybe_missing,
1476 set_gdbarch_static_transform_name,
1477 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
1478 Use sol2_sigtramp_p.
1479 * sol2-tdep.c (sol2_pc_in_sigtramp): New function.
1480 (sol2_sigtramp_p): New function.
1481 (sol2_static_transform_name): New function.
1482 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
1483 (sol2_init_abi): New function.
1484 * sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
1485 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
1486 * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
1487 (sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
1488 (sparc_sol2_static_transform_name): Remove.
1489 (sparc32_sol2_init_abi): Call sol2_init_abi.
1490 Remove calls to set_gdbarch_sofun_address_maybe_missing,
1491 set_gdbarch_static_transform_name,
1492 set_gdbarch_skip_solib_resolver,
1493 set_gdbarch_core_pid_to_str.
1494 * sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
1495 (sparc_sol2_static_transform_name): Remove
1496 * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
1497 call sol2_sigtramp_p.
1498 (sparc64_sol2_init_abi): Call sol2_init_abi.
1499 Remove calls to set_gdbarch_sofun_address_maybe_missing,
1500 set_gdbarch_static_transform_name,
1501 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
1502
1503 2020-06-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1504
1505 * symfile-add-flags.h: New flag SYMFILE_ALWAYS_CONFIRM.
1506 * exec.c (validate_exec_file): If from_tty, set both
1507 SYMFILE_VERBOSE (== from_tty) and SYMFILE_ALWAYS_CONFIRM.
1508 * symfile.c (symbol_file_add_with_addrs): if always_confirm
1509 and from_tty, unconditionally ask a confirmation.
1510
1511 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1512
1513 * target-descriptions.c (tdesc_architecture_name): Protect against
1514 NULL pointer dereference.
1515 (maint_print_xml_tdesc_cmd): New function.
1516 (_initialize_target_descriptions): Register new 'maint print
1517 xml-tdesc' command and give it the filename completer.
1518 * NEWS: Mention new 'maint print xml-tdesc' command.
1519
1520 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1521
1522 * target-descriptions.c (class tdesc_compatible_info): New class.
1523 (struct target_desc): Change type of compatible vector.
1524 (tdesc_compatible_p): Update for change in type of
1525 target_desc::compatible.
1526 (tdesc_compatible_info_list): New function.
1527 (tdesc_compatible_info_arch_name): New function.
1528 (tdesc_add_compatible): Update for change in type of
1529 target_desc::compatible.
1530 (print_c_tdesc::visit_pre): Likewise.
1531
1532 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1533
1534 * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
1535 whitespace to underscore.
1536 (maint_print_c_tdesc_cmd): Use fake filename for target
1537 descriptions that came from the target.
1538 (_initialize_target_descriptions): Add filename command completion
1539 for 'maint print c-tdesc'.
1540
1541 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
1542
1543 * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
1544 lines.
1545
1546 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
1547
1548 * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
1549 lines.
1550 (dwarf2_find_location_expression): Likewise.
1551 (call_site_parameter_matches): Likewise.
1552 (dwarf2_compile_expr_to_ax): Likewise.
1553 (disassemble_dwarf_expression): Likewise.
1554 (loclist_describe_location): Likewise.
1555
1556 2020-06-23 Pedro Alves <palves@redhat.com>
1557
1558 * gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
1559 progspace-and-thread.h. Include scoped-mock-context.h instead.
1560 (register_to_value_test): Use scoped_mock_context.
1561 * regcache.c: Include "scoped-mock-context.h".
1562 (cooked_read_test): Don't error out if a target is already pushed.
1563 Use scoped_mock_context. Adjust.
1564 * scoped-mock-context.h: New file.
1565
1566 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1567
1568 * ada-lang.c (ada_language_data): Delete la_is_string_type_p
1569 initializer.
1570 (ada_language::is_string_type_p): New member function.
1571 * c-lang.c (c_language_data): Delete la_is_string_type_p
1572 initializer.
1573 (cplus_language_data): Likewise.
1574 (asm_language_data): Likewise.
1575 (minimal_language_data): Likewise.
1576 * d-lang.c (d_language_data): Likewise.
1577 * f-lang.c (f_is_string_type_p): Delete function, implementation
1578 moved to f_language::is_string_type_p.
1579 (f_language_data): Delete la_is_string_type_p initializer.
1580 (f_language::is_string_type_p): New member function,
1581 implementation from f_is_string_type_p.
1582 * go-lang.c (go_is_string_type_p): Delete function, implementation
1583 moved to go_language::is_string_type_p.
1584 (go_language_data): Delete la_is_string_type_p initializer.
1585 (go_language::is_string_type_p): New member function,
1586 implementation from go_is_string_type_p.
1587 * language.c (language_defn::is_string_type_p): Define new member
1588 function.
1589 (default_is_string_type_p): Make static, add comment copied from
1590 header file.
1591 (unknown_language_data): Delete la_is_string_type_p initializer.
1592 (unknown_language::is_string_type_p): New member function.
1593 (auto_language_data): Delete la_is_string_type_p initializer.
1594 (auto_language::is_string_type_p): New member function.
1595 * language.h (language_data): Delete la_is_string_type_p field.
1596 (language_defn::is_string_type_p): Declare new function.
1597 (default_is_string_type_p): Delete desclaration, move comment to
1598 definition.
1599 * m2-lang.c (m2_is_string_type_p): Delete function, implementation
1600 moved to m2_language::is_string_type_p.
1601 (m2_language_data): Delete la_is_string_type_p initializer.
1602 (m2_language::is_string_type_p): New member function,
1603 implementation from m2_is_string_type_p.
1604 * objc-lang.c (objc_language_data): Delete la_is_string_type_p
1605 initializer.
1606 * opencl-lang.c (opencl_language_data): Likewise.
1607 * p-lang.c (pascal_is_string_type_p): Delete function,
1608 implementation moved to pascal_language::is_string_type_p.
1609 (pascal_language_data): Delete la_is_string_type_p initializer.
1610 (pascal_language::is_string_type_p): New member function,
1611 implementation from pascal_is_string_type_p.
1612 * rust-lang.c (rust_is_string_type_p): Delete function,
1613 implementation moved to rust_language::is_string_type_p.
1614 (rust_language_data): Delete la_is_string_type_p initializer.
1615 (rust_language::is_string_type_p): New member function,
1616 implementation from rust_is_string_type_p.
1617 * valprint.c (val_print_scalar_or_string_type_p): Update call to
1618 is_string_type_p.
1619
1620 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1621
1622 * ada-lang.c (ada_language_data): Delete la_print_typedef
1623 initializer.
1624 (ada_language::print_typedef): New member function.
1625 * c-lang.c (c_language_data): Delete la_print_typedef initializer.
1626 (cplus_language_data): Likewise.
1627 (asm_language_data): Likewise.
1628 (minimal_language_data): Likewise.
1629 * d-lang.c (d_language_data): Likewise.
1630 * f-lang.c (f_language_data): Likewise.
1631 (f_language::print_typedef): New member function.
1632 * go-lang.c (go_language_data): Delete la_print_typedef
1633 initializer.
1634 * language.c (language_defn::print_typedef): Define member
1635 function.
1636 (unknown_language_data): Delete la_print_typedef initializer.
1637 (unknown_language::print_typedef): New member function.
1638 (auto_language_data): Delete la_print_typedef initializer.
1639 (auto_language::print_typedef): New member function.
1640 * language.h (language_data): Delete la_print_typedef field.
1641 (language_defn::print_typedef): Declare new member function.
1642 (LA_PRINT_TYPEDEF): Update call to print_typedef.
1643 (default_print_typedef): Delete declaration.
1644 * m2-lang.c (m2_language_data): Delete la_print_typedef
1645 initializer.
1646 (m2_language::print_typedef): New member function.
1647 * objc-lang.c (objc_language_data): Delete la_print_typedef
1648 initializer.
1649 * opencl-lang.c (opencl_language_data): Likewise.
1650 * p-lang.c (pascal_language_data): Likewise.
1651 (pascal_language::print_typedef): New member function.
1652 * rust-lang.c (rust_print_typedef): Delete function,
1653 implementation moved to rust_language::print_typedef.
1654 (rust_language): Delete la_print_typedef initializer.
1655 (rust_language::print_typedef): New member function,
1656 implementation from rust_print_typedef.
1657 * typeprint.c (default_print_typedef): Delete.
1658
1659 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1660
1661 * ada-lang.c (ada_language_data): Delete la_printstr initializer.
1662 (ada_language::printstr): New member function.
1663 * c-lang.c (c_language_data): Delete la_printstr initializer.
1664 (cplus_language_data): Likewise.
1665 (asm_language_data): Likewise.
1666 (minimal_language_data): Likewise.
1667 * d-lang.c (d_language_data): Likewise.
1668 * f-lang.c (f_printstr): Rename to f_language::printstr.
1669 (f_language_data): Delete la_printstr initializer.
1670 (f_language::printstr): New member function, implementation from
1671 f_printstr.
1672 * go-lang.c (go_language_data): Delete la_printstr initializer.
1673 * language.c (language_defn::printstr): Define new member
1674 function.
1675 (unk_lang_printstr): Delete.
1676 (unknown_language_data): Delete la_printstr initializer.
1677 (unknown_language::printstr): New member function.
1678 (auto_language_data): Delete la_printstr initializer.
1679 (auto_language::printstr): New member function.
1680 * language.h (language_data): Delete la_printstr field.
1681 (language_defn::printstr): Declare new member function.
1682 (LA_PRINT_STRING): Update call to printstr.
1683 * m2-lang.c (m2_printstr): Rename to m2_language::printstr.
1684 (m2_language_data): Delete la_printstr initializer.
1685 (m2_language::printstr): New member function, implementation from
1686 m2_printstr.
1687 * objc-lang.c (objc_language_data): Delete la_printstr
1688 initializer.
1689 * opencl-lang.c (opencl_language_data): Likewise.
1690 * p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
1691 (pascal_language_data): Delete la_printstr initializer.
1692 (pascal_language::printstr): New member function, implementation
1693 from pascal_printstr.
1694 * p-lang.h (pascal_printstr): Delete declaration.
1695 * rust-lang.c (rust_printstr): Update header comment.
1696 (rust_language_data): Delete la_printstr initializer.
1697 (rust_language::printstr): New member function.
1698
1699 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1700
1701 * ada-lang.c (ada_language_data): Delete la_printchar initializer.
1702 (ada_language::printchar): New member function.
1703 * c-lang.c (c_language_data): Delete la_printchar initializer.
1704 (cplus_language_data): Likewise.
1705 (asm_language_data): Likewise.
1706 (minimal_language_data): Likewise.
1707 * d-lang.c (d_language_data): Likewise.
1708 * f-lang.c (f_printchar): Rename to f_language::printchar.
1709 (f_language_data): Delete la_printchar initializer.
1710 (f_language::printchar): New member function, implementation from
1711 f_printchar.
1712 * go-lang.c (go_language_data): Delete la_printchar initializer.
1713 * language.c (unk_lang_printchar): Delete.
1714 (language_defn::printchar): Define new member function.
1715 (unknown_language_data): Delete la_printchar initializer.
1716 (unknown_language::printchar): New member function.
1717 (auto_language_data): Delete la_printchar initializer.
1718 (auto_language::printchar): New member function.
1719 * language.h (language_data): Delete la_printchar field.
1720 (language_defn::printchar): Declare new member function.
1721 (LA_PRINT_CHAR): Update call to printchar.
1722 * m2-lang.c (m2_language_data): Delete la_printchar initializer.
1723 (m2_language::printchar): New member function.
1724 * objc-lang.c (objc_language_data): Delete la_printchar
1725 initializer.
1726 * opencl-lang.c (opencl_language_data): Likewise.
1727 * p-lang.c (pascal_language_data): Delete la_printchar
1728 initializer.
1729 (pascal_language::printchar): New member function.
1730 * rust-lang.c (rust_printchar): Rename to
1731 rust_language::printchar.
1732 (rust_language_data): Delete la_printchar initializer.
1733 (rust_language::printchar): New member function, implementation
1734 from rust_printchar.
1735
1736 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1737
1738 * ada-lang.c (emit_char): Renamed to ada_language::emitchar.
1739 (ada_language_data): Delete la_emitchar initializer.
1740 (ada_language::emitchar): New member function, implementation from
1741 emit_char.
1742 * c-lang.c (c_language_data): Delete la_emitchar initializer.
1743 (cplus_language_data): Likewise.
1744 (asm_language_data): Likewise.
1745 (minimal_language_data): Likewise.
1746 * d-lang.c (d_language_data): Likewise.
1747 * f-lang.c (f_emit_char): Rename to f_language::emitchar.
1748 (f_language_data): Delete la_emitchar initializer.
1749 (f_language::emitchar): New member function, implementation from
1750 f_emit_char.
1751 * go-lang.c (go_language_data): Delete la_emitchar initializer.
1752 * language.c (unk_lang_emit_char): Delete.
1753 (language_defn::emitchar): New member function definition.
1754 (unknown_language_data): Delete la_emitchar initializer.
1755 (unknown_language::emitchar): New member function.
1756 (auto_language_data): Delete la_emitchar initializer.
1757 (auto_language::emitchar): New member function.
1758 * language.h (language_data): Delete la_emitchar field.
1759 (language_defn::emitchar): New member field declaration.
1760 (LA_EMIT_CHAR): Update call to emitchar.
1761 * m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
1762 (m2_language_data): Delete la_emitchar initializer.
1763 (m2_language::emitchar): New member function, implementation from
1764 m2_emit_char.
1765 * objc-lang.c (objc_language_data): Delete la_emitchar
1766 initializer.
1767 * opencl-lang.c (opencl_language_data): Likewise.
1768 * p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
1769 (pascal_language_data): Delete la_emitchar initializer.
1770 (pascal_language::emitchar): New member function, implementation
1771 from pascal_emit_char.
1772 * rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
1773 (rust_language_data): Delete la_emitchar initializer.
1774 (rust_language::emitchar): New member function, implementation
1775 from rust_emitchar.
1776
1777 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1778
1779 * ada-lang.c (resolve): Rename to ada_language::post_parser.
1780 (ada_language_data): Delete la_post_parser initializer.
1781 (ada_language::post_parser): New member function.
1782 * c-lang.c (c_language_data): Delete la_post_parser initializer.
1783 (cplus_language_data): Likewise.
1784 (asm_language_data): Likewise.
1785 (minimal_language_data): Likewise.
1786 * d-lang.c (d_language_data): Likewise.
1787 * f-lang.c (f_language_data): Likewise.
1788 * go-lang.c (go_language_data): Likewise.
1789 * language.c (unknown_language_data): Likewise.
1790 (auto_language_data): Likewise.
1791 * language.h (language_data): Delete la_post_parser field.
1792 (language_defn::post_parser): New member function.
1793 * m2-lang.c (m2_language_data): Delete la_post_parser initializer.
1794 * objc-lang.c (objc_language_data): Likewise.
1795 * opencl-lang.c (opencl_language_data): Likewise.
1796 * p-lang.c (pascal_language_data): Likewise.
1797 * parse.c (parse_exp_in_context): Update call to post_parser.
1798 (null_post_parser): Delete definition.
1799 * parser-defs.h (null_post_parser): Delete declaration.
1800 * rust-lang.c (rust_language_data): Delete la_post_parser
1801 initializer.
1802
1803 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1804
1805 * ada-lang.c (parse): Rename to ada_language::parser.
1806 (ada_language_data): Delete la_parser initializer.
1807 (ada_language::parser): New member function, implementation from
1808 parse.
1809 * c-lang.c (c_language_data): Delete la_parser initializer.
1810 (cplus_language_data): Likewise.
1811 (asm_language_data): Likewise.
1812 (minimal_language_data): Likewise.
1813 * d-lang.c (d_language_data): Likewise.
1814 (d_language::parser): New member function.
1815 * f-lang.c (f_language_data): Delete la_parser initializer.
1816 (f_language::parser): New member function.
1817 * go-lang.c (go_language_data): Delete la_parser initializer.
1818 (go_language::parser): New member function.
1819 * language.c (unk_lang_parser): Delete.
1820 (language_defn::parser): Define new member function.
1821 (unknown_language_data): Delete la_parser initializer.
1822 (unknown_language::parser): New member function.
1823 (auto_language_data): Delete la_parser initializer.
1824 (auto_language::parser): New member function.
1825 * language.h (language_data): Delete la_parser field.
1826 (language_defn::parser): Declare new member function.
1827 * m2-lang.c (m2_language_data): Delete la_parser initializer.
1828 (m2_language::parser): New member function.
1829 * objc-lang.c (objc_language_data): Delete la_parser initializer.
1830 * opencl-lang.c (opencl_language_data): Likewise.
1831 * p-lang.c (pascal_language_data): Likewise.
1832 (pascal_language::parser): New member function.
1833 * parse.c (parse_exp_in_context): Update call to parser.
1834 * rust-lang.c (rust_language_data): Delete la_parser initializer.
1835 (rust_language::parser): New member function.
1836
1837 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
1838
1839 * top.c (print_gdb_configuration): Print --with-python-libdir
1840 configuration value.
1841
1842 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1843
1844 * NEWS: Mention change to the alias command.
1845
1846 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1847
1848 * cli/cli-cmds.c (lookup_cmd_for_default_args)
1849 (alias_command_completer)
1850 (make_alias_options_def_group): New functions.
1851 (alias_opts, alias_option_defs): New struct and array.
1852 (alias_usage_error): Update usage.
1853 (alias_command): Handles optional DEFAULT-ARGS... arguments.
1854 Use option framework.
1855 (_initialize_cli_cmds): Update alias command help.
1856 Update aliases command help.
1857 (show_user):
1858 Add NULL for new default_args lookup_cmd argument.
1859 (valid_command_p): Rename to validate_aliased_command.
1860 Add NULL for new default_args lookup_cmd argument. Verify that the
1861 aliased_command has no default args.
1862 * cli/cli-decode.c (help_cmd): Show aliases definitions.
1863 (lookup_cmd_1, lookup_cmd): New argument default_args.
1864 (add_alias_cmd):
1865 Add NULL for new default_args lookup_cmd argument.
1866 (print_help_for_command): Show default args under the layout
1867 alias some_alias = some_aliased_cmd some_alias_default_arg.
1868 * cli/cli-decode.h (struct cmd_list_element): New member default_args.
1869 xfree default_args in destructor.
1870 * cli/cli-script.c (process_next_line, do_define_command):
1871 Add NULL for new default_args lookup_cmd argument.
1872 * command.h: Declare new default_args argument in lookup_cmd
1873 and lookup_cmd_1.
1874 * completer.c (complete_line_internal_1):
1875 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1876 * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
1877 * guile/scm-param.c (add_setshow_generic, pascm_parameter_defined_p):
1878 Likewise.
1879 * infcmd.c (_initialize_infcmd): Likewise.
1880 * python/py-auto-load.c (gdbpy_initialize_auto_load): Likewise.
1881 * python/py-cmd.c (gdbpy_parse_command_name): Likewise.
1882 * python/py-param.c (add_setshow_generic): Likewise.
1883 * remote.c (_initialize_remote): Likewise.
1884 * top.c (execute_command): Prepend default_args if command has some.
1885 (set_verbose):
1886 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1887 * tracepoint.c (validate_actionline, encode_actions_1):
1888 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
1889
1890 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1891
1892 * jit.c (jit_read_descriptor): Use bool as the return type.
1893 (jit_breakpoint_re_set_internal): Use bool as the return type.
1894 Invert the return value logic; return true if the jit breakpoint
1895 has been successfully initialized.
1896 (jit_inferior_init): Update the call to
1897 jit_breakpoint_re_set_internal.
1898
1899 2020-06-22 Pedro Alves <palves@redhat.com>
1900
1901 PR gdb/25939
1902 * procfs.c (procfs_target::wait): Don't reference inferior_ptid.
1903 Use the current inferior instead. Don't return
1904 TARGET_WAITKIND_SPURIOUS/inferior_ptid -- instead continue and
1905 wait again.
1906 * sol-thread.c (sol_thread_target::wait): Don't reference
1907 inferior_ptid.
1908 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs)
1909 (sol_update_thread_list_callback): Use the current inferior's pid
1910 instead of inferior_ptid.
1911
1912 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1913
1914 * procfs.c: Cleanup many comments.
1915
1916 (READ_WATCHFLAG, WRITE_WATCHFLAG, EXEC_WATCHFLAG)
1917 (AFTER_WATCHFLAG): Replace by value.
1918
1919 (MAIN_PROC_NAME_FORMAT): Inline ...
1920 (create_procinfo): ... here.
1921
1922 (procfs_debug_inferior): Remove SYS_exec handling.
1923 (syscall_is_exec): Likewise.
1924 (procfs_set_exec_trap): Likewise.
1925
1926 (syscall_is_lwp_exit): Inline in callers.
1927 (syscall_is_exit): Likewise.
1928 (syscall_is_exec): Likewise.
1929 (syscall_is_lwp_create): Likewise.
1930
1931 (invalidate_cache): Remove #if 0 code.
1932
1933 (make_signal_thread_runnable): Remove.
1934 (procfs_target::resume): Remove #if 0 code.
1935
1936 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1937
1938 PR gdb/25939
1939 * procfs.c (procfs_target::procfs_init_inferior): Move push_target
1940 call ...
1941 (procfs_target::create_inferior): ... here.
1942
1943 2020-06-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1944
1945 * exec.c (validate_exec_file): Ensure the build-id is up to
1946 date by calling reopen_exec_file (that checks file timestamp
1947 to decide to re-read the file).
1948
1949 2020-06-18 Pedro Alves <palves@redhat.com>
1950
1951 PR gdb/25412
1952 * gdbthread.h (delete_thread, delete_thread_silent)
1953 (find_thread_ptid): Update comments.
1954 * thread.c (current_thread_): New global.
1955 (is_current_thread): Move higher, and reimplement.
1956 (inferior_thread): Reimplement.
1957 (set_thread_exited): Use bool. Add assertions.
1958 (add_thread_silent): Simplify thread-reuse handling by always
1959 calling delete_thread.
1960 (delete_thread): Remove intro comment.
1961 (find_thread_ptid): Skip exited threads.
1962 (switch_to_thread_no_regs): Write to current_thread_.
1963 (switch_to_no_thread): Check CURRENT_THREAD_ instead of
1964 INFERIOR_PTID. Clear current_thread_.
1965
1966 2020-06-18 Pedro Alves <palves@redhat.com>
1967
1968 * aix-thread.c (pd_update): Use switch_to_thread.
1969
1970 2020-06-18 Pedro Alves <palves@redhat.com>
1971
1972 * ravenscar-thread.c (ravenscar_thread_target): Update.
1973 (ravenscar_thread_target::update_inferior_ptid): Rename to ...
1974 (ravenscar_thread_target::add_active_thread): ... this. Don't
1975 set m_base_ptid here. Update to avoid referencing inferior_ptid.
1976 (ravenscar_thread_target::wait): Don't write to inferior_ptid.
1977
1978 2020-06-18 Pedro Alves <palves@redhat.com>
1979
1980 * nat/windows-nat.c (current_windows_thread): Remove.
1981 * nat/windows-nat.h (current_windows_thread): Remove.
1982 * windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
1983 Adjust.
1984 (display_selectors): Adjust to fetch the current
1985 windows_thread_info based on inferior_ptid.
1986 (fake_create_process): No longer write to current_windows_thread.
1987 (windows_nat_target::get_windows_debug_event):
1988 Don't set inferior_ptid or current_windows_thread.
1989 (windows_nat_target::wait): Adjust to not rely on
1990 current_windows_thread.
1991 (do_initial_windows_stuff): Now a method of windows_nat_target.
1992 Switch to the last_ptid thread.
1993 (windows_nat_target::attach): Adjust.
1994 (windows_nat_target::detach): Use switch_to_no_thread instead of
1995 writing to inferior_ptid directly.
1996 (windows_nat_target::create_inferior): Adjust.
1997
1998 2020-06-18 Pedro Alves <palves@redhat.com>
1999
2000 * windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
2001
2002 2020-06-18 Pedro Alves <palves@redhat.com>
2003
2004 * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
2005 after creating it, instead of writing to inferior_ptid. Don't
2006 write to inferior_ptid.
2007
2008 2020-06-18 Pedro Alves <palves@redhat.com>
2009
2010 * fork-child.c (postfork_hook): Don't write to inferior_ptid.
2011
2012 2020-06-18 Pedro Alves <palves@redhat.com>
2013
2014 * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
2015 it, instead of writing to inferior_ptid.
2016
2017 2020-06-18 Pedro Alves <palves@redhat.com>
2018
2019 * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
2020 to inferior_ptid.
2021
2022 2020-06-18 Pedro Alves <palves@redhat.com>
2023
2024 * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
2025 instead of writing to inferior_ptid directly.
2026
2027 2020-06-18 Pedro Alves <palves@redhat.com>
2028
2029 * corelow.c (core_target::close): Use switch_to_no_thread instead
2030 of writing to inferior_ptid directly.
2031 (add_to_thread_list, core_target_open): Use switch_to_thread
2032 instead of writing to inferior_ptid directly.
2033
2034 2020-06-18 Pedro Alves <palves@redhat.com>
2035
2036 * darwin-nat.c (darwin_nat_target::decode_message): Don't write to
2037 inferior_ptid.
2038 (darwin_nat_target::stop_inferior, darwin_nat_target::kill): Avoid
2039 inferior_ptid.
2040 (darwin_attach_pid): Use switch_to_no_thread instead of writing to
2041 inferior_ptid directly.
2042 (darwin_nat_target::init_thread_list): Switch to thread, instead
2043 of writing to inferior_ptid.
2044 (darwin_nat_target::attach): Don't write to inferior_ptid.
2045 (darwin_nat_target::get_ada_task_ptid): Avoid inferior_ptid.
2046
2047 2020-06-18 Pedro Alves <palves@redhat.com>
2048
2049 * gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
2050 thread.
2051 (gnu_nat_target::attach): Don't write to inferior_ptid directly.
2052 Instead use switch_to_thread.
2053 (gnu_nat_target::detach): Use switch_to_no_thread
2054 instead of writing to inferior_ptid directly. Used passed-in
2055 inferior instead of looking up the inferior by pid.
2056
2057 2020-06-18 Pedro Alves <palves@redhat.com>
2058
2059 * go32-nat.c (go32_nat_target::create_inferior): Don't write to
2060 inferior_ptid.
2061
2062 2020-06-18 Pedro Alves <palves@redhat.com>
2063
2064 * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
2065 inferior_ptid.
2066 (nto_procfs_target::attach): Avoid inferior_ptid. Switch to
2067 thread.
2068 (nto_procfs_target::detach): Avoid referencing
2069 inferior_ptid. Use switch_to_no_thread instead of writing to
2070 inferior_ptid directly.
2071 (nto_procfs_target::mourn_inferior): Use switch_to_no_thread
2072 instead of writing to inferior_ptid directly.
2073 (nto_procfs_target::create_inferior): Avoid inferior_ptid. Switch
2074 to thread.
2075
2076 2020-06-18 Pedro Alves <palves@redhat.com>
2077
2078 * remote-sim.c (gdbsim_target::create_inferior): Switch to thread
2079 after creating it, instead of writing to inferior_ptid.
2080 (gdbsim_target_open): Use switch_to_no_thread instead of writing
2081 to inferior_ptid directly.
2082 (gdbsim_target::wait): Don't write to inferior_ptid.
2083
2084 2020-06-18 Pedro Alves <palves@redhat.com>
2085
2086 * remote.c (remote_target::remote_notice_new_inferior): Use
2087 switch_to_thread instead of writing to inferior_ptid directly.
2088 (remote_target::add_current_inferior_and_thread): Use
2089 switch_to_no_thread instead of writing to inferior_ptid directly.
2090 (extended_remote_target::attach): Use switch_to_inferior_no_thread
2091 and switch_to_thread instead of using set_current_inferior or
2092 writing to inferior_ptid directly.
2093
2094 2020-06-18 Pedro Alves <palves@redhat.com>
2095
2096 * tracectf.c (ctf_target_open): Switch to added thread instead of
2097 writing to inferior_ptid directly.
2098 (ctf_target::close): Use switch_to_no_thread instead of writing to
2099 inferior_ptid directly.
2100
2101 2020-06-18 Pedro Alves <palves@redhat.com>
2102
2103 * tracefile-tfile.c (tfile_target_open): Don't write to
2104 inferior_ptid directly, instead switch to added thread.
2105 (tfile_target::close): Use switch_to_no_thread instead of writing
2106 to inferior_ptid directly.
2107
2108 2020-06-18 Pedro Alves <palves@redhat.com>
2109
2110 * procfs.c (procfs_target::attach): Don't write to inferior_ptid.
2111 (procfs_target::detach): Use switch_to_no_thread
2112 instead of writing to inferior_ptid directly.
2113 (do_attach): Change return type to void. Switch to the added
2114 thread.
2115 (procfs_target::create_inferior): Switch to the added thread.
2116 (procfs_do_thread_registers): Don't write to inferior_ptid.
2117
2118 2020-06-18 Pedro Alves <palves@redhat.com>
2119
2120 * infrun.c (generic_mourn_inferior): Use switch_to_thread instead
2121 of writing to inferior_ptid.
2122 (scoped_restore_exited_inferior): Delete.
2123 (handle_vfork_child_exec_or_exit): Simplify using
2124 scoped_restore_current_pspace_and_thread. Use switch_to_thread
2125 instead of writing to inferior_ptid.
2126 (THREAD_STOPPED_BY): Delete.
2127 (thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
2128 (thread_stopped_by_hw_breakpoint): Delete.
2129 (save_waitstatus): Use
2130 scoped_restore_current_thread+switch_to_thread, and call
2131 target_stopped_by_watchpoint instead of
2132 thread_stopped_by_watchpoint, target_stopped_by_sw_breakpoint
2133 instead of thread_stopped_by_sw_breakpoint, and
2134 target_stopped_by_hw_breakpoint instead of
2135 thread_stopped_by_hw_breakpoint.
2136 (handle_inferior_event)
2137 <TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Don't write to
2138 inferior_ptid directly, nor
2139 set_current_inferior/set_current_program_space. Use
2140 switch_to_thread / switch_to_inferior_no_thread instead.
2141
2142 2020-06-18 Pedro Alves <palves@redhat.com>
2143
2144 * target.c (generic_mourn_inferior): Use switch_to_no_thread
2145 instead of writing to inferior_ptid.
2146
2147 2020-06-18 Pedro Alves <palves@redhat.com>
2148
2149 * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the
2150 added thread.
2151 (inf_ptrace_target::attach): Don't write to inferior_ptid. Switch
2152 to the added thread.
2153 (inf_ptrace_target::detach_success): Use switch_to_no_thread
2154 instead of writing to inferior_ptid.
2155
2156 2020-06-18 Pedro Alves <palves@redhat.com>
2157
2158 * gdbarch-selftests.c: Include "progspace-and-thread.h".
2159 (register_to_value_test): Mock a program_space too. Heap-allocate
2160 the address space. Don't write to inferior_ptid. Use
2161 switch_to_thread instead.
2162
2163 2020-06-18 Pedro Alves <palves@redhat.com>
2164
2165 * linux-tdep.c (find_signalled_thread(thread_info *,void *)):
2166 Delete.
2167 (find_signalled_thread()): New, factored out from
2168 linux_make_corefile_notes and adjusted to handle exited threads.
2169 (linux_make_corefile_notes): Adjust to use the new
2170 find_signalled_thread.
2171
2172 2020-06-18 Pedro Alves <palves@redhat.com>
2173
2174 * linux-tdep.c (btrace_fetch): Save/restore current thread instead
2175 of saving/restoring inferior_ptid.
2176
2177 2020-06-17 Tom Tromey <tom@tromey.com>
2178
2179 * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
2180 (tui_scroll_left, tui_scroll_right, struct tui_win_info): Don't
2181 declare.
2182 * tui/tui-data.h (MIN_CMD_WIN_HEIGHT): Remove.
2183
2184 2020-06-15 Simon Marchi <simon.marchi@efficios.com>
2185
2186 * dwarf2/read.c (dwarf2_initialize_objfile): Check for presence
2187 of partial symtabs.
2188
2189 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2190
2191 * regformats/reg-arm.dat: Remove.
2192 * regformats/reg-bfin.dat: Remove.
2193 * regformats/reg-cris.dat: Remove.
2194 * regformats/reg-crisv32.dat: Remove.
2195 * regformats/reg-m32r.dat: Remove.
2196 * regformats/reg-tilegx.dat: Remove.
2197 * regformats/reg-tilegx32.dat: Remove.
2198
2199 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2200
2201 * features/Makefile (WHICH): Remove arm files.
2202 * regformats/arm/arm-with-iwmmxt.dat: Remove.
2203 * regformats/arm/arm-with-neon.dat: Remove.
2204 * regformats/arm/arm-with-vfpv2.dat: Remove.
2205 * regformats/arm/arm-with-vfpv3.dat: Remove.
2206
2207 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2208
2209 * features/Makefile (XMLTOC): Remove rx.xml.
2210
2211 2020-06-17 Pedro Alves <palves@redhat.com>
2212
2213 * gdbthread.h (thread_control_state) <trap_expected> Update
2214 comments.
2215
2216 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2217
2218 * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
2219 ada_language::lookup_symbol_nonlocal.
2220 (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
2221 (ada_language::lookup_symbol_nonlocal): New member function,
2222 implementation from ada_lookup_symbol_nonlocal.
2223 * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
2224 initializer.
2225 (cplus_language_data): Delete la_lookup_symbol_nonlocal
2226 initializer.
2227 (cplus_language::lookup_symbol_nonlocal): New member function.
2228 (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
2229 (minimal_language_data) Likewise.
2230 * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
2231 * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
2232 initializer.
2233 (d_language::lookup_symbol_nonlocal): New member function.
2234 * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
2235 initializer.
2236 (f_language::lookup_symbol_nonlocal): New member function.
2237 * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
2238 initializer.
2239 * language.c (unknown_language_data): Likewise.
2240 (auto_language_data): Likewise.
2241 * language.h (language_data): Delete la_lookup_symbol_nonlocal
2242 field.
2243 (language_defn::lookup_symbol_nonlocal): New member function.
2244 * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
2245 initializer.
2246 * objc-lang.c (objc_language_data): Likewise.
2247 * opencl-lang.c (opencl_language_data): Likewise.
2248 * p-lang.c (pascal_language_data): Likewise.
2249 * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
2250 rust_language::lookup_symbol_nonlocal.
2251 (rust_language_data): Delete la_lookup_symbol_nonlocal
2252 initializer.
2253 (rust_language::lookup_symbol_nonlocal): New member function,
2254 implementation from rust_lookup_symbol_nonlocal.
2255 * symtab.c (lookup_symbol_aux): Update call to
2256 lookup_symbol_nonlocal.
2257 (basic_lookup_symbol_nonlocal): Rename to...
2258 (language_defn::lookup_symbol_nonlocal): ...this, and update
2259 header comment. Remove language_defn parameter, and replace with
2260 uses of `this'.
2261 * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
2262
2263 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2264
2265 * ada-lang.c (ada_language_data): Delete la_value_print_inner
2266 initializer.
2267 (ada_language::value_print_inner): New member function.
2268 * c-lang.c (c_language_data): Delete la_value_print_inner
2269 initializer.
2270 (cplus_language_data): Likewise.
2271 (asm_language_data): Likewise.
2272 (minimal_language_data): Likewise.
2273 * d-lang.c (d_language_data): Likewise.
2274 (d_language::value_print_inner): New member function.
2275 * f-lang.c (f_language_data): Delete la_value_print_inner
2276 initializer.
2277 (f_language::value_print_inner): New member function.
2278 * f-lang.h (f_value_print_innner): Rename to...
2279 (f_value_print_inner): ...this (note spelling of 'inner').
2280 * f-valprint.c (f_value_print_innner): Rename to...
2281 (f_value_print_inner): ...this (note spelling of 'inner').
2282 * go-lang.c (go_language_data): Delete la_value_print_inner
2283 initializer.
2284 (go_language::value_print_inner): New member function.
2285 * language.c (language_defn::value_print_inner): Define new member
2286 function.
2287 (unk_lang_value_print_inner): Delete.
2288 (unknown_language_data): Delete la_value_print_inner initializer.
2289 (unknown_language::value_print_inner): New member function.
2290 (auto_language_data): Delete la_value_print_inner initializer.
2291 (auto_language::value_print_inner): New member function.
2292 * language.h (language_data): Delete la_value_print_inner field.
2293 (language_defn::value_print_inner): Delcare new member function.
2294 * m2-lang.c (m2_language_data): Delete la_value_print_inner
2295 initializer.
2296 (m2_language::value_print_inner): New member function.
2297 * objc-lang.c (objc_language_data): Delete la_value_print_inner
2298 initializer.
2299 * opencl-lang.c (opencl_language_data): Likewise.
2300 * p-lang.c (pascal_language_data): Likewise.
2301 (pascal_language::value_print_inner): New member function.
2302 * rust-lang.c (rust_language_data): Delete la_value_print_inner
2303 initializer.
2304 (rust_language::value_print_inner): New member function.
2305 * valprint.c (do_val_print): Update call to value_print_inner.
2306
2307 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2308
2309 * ada-lang.c (ada_language_data): Delete la_value_print
2310 initializer.
2311 (ada_language::value_print): New member function.
2312 * c-lang.c (c_language_data): Delete la_value_print initializer.
2313 (cplus_language_data): Likewise.
2314 (asm_language_data): Likewise.
2315 (minimal_language_data): Likewise.
2316 * d-lang.c (d_language_data): Likewise.
2317 * f-lang.c (f_language_data): Likewise.
2318 * go-lang.c (go_language_data): Likewise.
2319 * language.c (unk_lang_value_print): Delete.
2320 (language_defn::value_print): Define new member function.
2321 (unknown_language_data): Delete la_value_print initializer.
2322 (unknown_language::value_print): New member function.
2323 (auto_language_data): Delete la_value_print initializer.
2324 (auto_language::value_print): New member function.
2325 * language.h (language_data): Delete la_value_print field.
2326 (language_defn::value_print): Declare new member function.
2327 (LA_VALUE_PRINT): Update call to value_print.
2328 * m2-lang.c (m2_language_data): Delete la_value_print initializer.
2329 * objc-lang.c (objc_language_data): Likewise.
2330 * opencl-lang.c (opencl_language_data): Likewise.
2331 * p-lang.c (pascal_language_data): Likewise.
2332 (pascal_language::value_print): New member function.
2333 * rust-lang.c (rust_language_data): Delete la_value_print
2334 initializer.
2335
2336 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2337
2338 * ada-lang.c (ada_watch_location_expression): Rename to
2339 ada_language::watch_location_expression.
2340 (ada_language_data): Delete la_watch_location_expression
2341 initializer.
2342 (ada_language::watch_location_expression): New member function,
2343 implementation from ada_watch_location_expression.
2344 * breakpoint.c (watch_command_1): Update call to
2345 watch_location_expression.
2346 * c-lang.c (c_watch_location_expression): Rename to
2347 language_defn::watch_location_expression.
2348 (c_language_data): Delete la_watch_location_expression
2349 initializer.
2350 (cplus_language_data): Likewise.
2351 (asm_language_data): Likewise.
2352 (minimal_language_data): Likewise.
2353 * c-lang.h (c_watch_location_expression): Delete declaration.
2354 * d-lang.c (d_language_data): Delete la_watch_location_expression
2355 initializer.
2356 * f-lang.c (f_language_data): Likewise.
2357 * go-lang.c (go_language_data): Likewise.
2358 * language.c (language_defn::watch_location_expression): Member
2359 function implementation from c_watch_location_expression.
2360 (unknown_language_data): Delete la_watch_location_expression
2361 initializer.
2362 (auto_language_data): Likewise.
2363 * language.h (language_data): Delete la_watch_location_expression
2364 field.
2365 (language_defn::watch_location_expression): Declare new member
2366 function.
2367 * m2-lang.c (m2_language_data): Delete
2368 la_watch_location_expression initializer.
2369 * objc-lang.c (objc_language_data): Likewise.
2370 * opencl-lang.c (opencl_language_data): Likewise.
2371 * p-lang.c (pascal_language_data): Likewise.
2372 * rust-lang.c (rust_watch_location_expression): Rename to
2373 rust_language::watch_location_expression.
2374 (rust_language_data): Delete la_watch_location_expression
2375 initializer.
2376 (rust_language::watch_location_expression): New member function,
2377 implementation from rust_watch_location_expression.
2378
2379 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2380
2381 * ada-lang.c (ada_collect_symbol_completion_matches): Rename to
2382 ada_language::collect_symbol_completion_matches.
2383 (ada_language_data): Delete la_collect_symbol_completion_matches
2384 initializer.
2385 (ada_language::collect_symbol_completion_matches): New member
2386 function, implementation from
2387 ada_collect_symbol_completion_matches.
2388 * c-lang.c (c_language_data): Delete
2389 la_collect_symbol_completion_matches initializer.
2390 (cplus_language_data): Likewise.
2391 (asm_language_data): Likewise.
2392 (minimal_language_data): Likewise.
2393 * d-lang.c (d_language_data): Likewise.
2394 * f-lang.c (f_collect_symbol_completion_matches): Rename to
2395 f_language::collect_symbol_completion_matches.
2396 (f_language_data): Delete la_collect_symbol_completion_matches
2397 initializer.
2398 (f_language::collect_symbol_completion_matches) New member
2399 function, implementation from f_collect_symbol_completion_matches.
2400 * go-lang.c (go_language_data): Delete
2401 la_collect_symbol_completion_matches initializer.
2402 * language.c (unknown_language_data): Likewise.
2403 (auto_language_data): Likewise.
2404 * language.h (language_data): Delete
2405 la_collect_symbol_completion_matches field.
2406 (language_defn::collect_symbol_completion_matches): New member
2407 function.
2408 * m2-lang.c (m2_language_data): Delete
2409 la_collect_symbol_completion_matches initializer.
2410 * objc-lang.c (objc_language_data): Likewise.
2411 * opencl-lang.c (opencl_language_data): Likewise.
2412 * p-lang.c (pascal_language_data): Likewise.
2413 * rust-lang.c (rust_language_data): Likewise.
2414 * symtab.c (default_collect_symbol_completion_matches): Delete.
2415 (collect_symbol_completion_matches): Update call to
2416 collect_symbol_completion_matches.
2417 (collect_symbol_completion_matches_type): Likewise.
2418 * symtab.h (default_collect_symbol_completion_matches): Delete
2419 declaration.
2420
2421 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2422
2423 * ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
2424 (ada_language_data): Delete la_word_break_characters initializer.
2425 (ada_language::word_break_characters): New member function.
2426 * c-lang.c (c_language_data): Delete la_word_break_characters
2427 initializer.
2428 (cplus_language_data): Likewise.
2429 (asm_language_data): Likewise.
2430 (minimal_language_data): Likewise.
2431 * completer.c: Update global comment.
2432 (advance_to_expression_complete_word_point): Update call to
2433 word_break_characters.
2434 (complete_files_symbols): Likewise.
2435 (complete_line_internal_1): Likewise.
2436 (default_completer_handle_brkchars): Likewise.
2437 (skip_quoted_chars): Likewise.
2438 * d-lang.c (d_language_data): Delete la_word_break_characters
2439 initializer.
2440 * f-lang.c (f_word_break_characters): Delete.
2441 (f_language_data): Delete la_word_break_characters initializer.
2442 (f_language::word_break_characters): New member function.
2443 * go-lang.c (go_language_data): Delete la_word_break_characters
2444 initializer.
2445 * language.c (unknown_language_data): Likewise.
2446 (auto_language_data): Likewise.
2447 * language.h (default_word_break_characters): Move declaration to
2448 earlier in the file.
2449 (language_data): Delete la_word_break_characters field.
2450 (language_defn::word_break_characters): New member function.
2451 * m2-lang.c (m2_language_data): Delete la_word_break_characters
2452 initializer.
2453 * objc-lang.c (objc_language_data): Likewise.
2454 * opencl-lang.c (opencl_language_data): Likewise.
2455 * p-lang.c (pascal_language_data): Likewise.
2456 * rust-lang.c (rust_language_data): Likewise.
2457
2458 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2459
2460 * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
2461 (ada_language_data): Delete la_get_symbol_name_matcher
2462 initializer.
2463 (language_defn::get_symbol_name_matcher_inner): New member
2464 function.
2465 * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
2466 initializer.
2467 (cplus_language_data): Likewise.
2468 (cplus_language::get_symbol_name_matcher_inner): New member
2469 function.
2470 (asm_language_data): Delete la_get_symbol_name_matcher initializer.
2471 (minimal_language_data): Likewise.
2472 * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
2473 * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
2474 initializer.
2475 * dictionary.c (iter_match_first_hashed): Update call to
2476 get_symbol_name_matcher.
2477 (iter_match_next_hashed): Likewise.
2478 (iter_match_next_linear): Likewise.
2479 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
2480 * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
2481 initializer.
2482 (f_language::get_symbol_name_matcher_inner): New member function.
2483 * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
2484 initializer.
2485 * language.c (default_symbol_name_matcher): Update header comment,
2486 make static.
2487 (language_defn::get_symbol_name_matcher): New definition.
2488 (language_defn::get_symbol_name_matcher_inner): Likewise.
2489 (get_symbol_name_matcher): Delete.
2490 (unknown_language_data): Delete la_get_symbol_name_matcher
2491 initializer.
2492 (auto_language_data): Likewise.
2493 * language.h (language_data): Delete la_get_symbol_name_matcher
2494 field.
2495 (language_defn::get_symbol_name_matcher): New member function.
2496 (language_defn::get_symbol_name_matcher_inner): Likewise.
2497 (default_symbol_name_matcher): Delete declaration.
2498 * linespec.c (find_methods): Update call to
2499 get_symbol_name_matcher.
2500 * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
2501 initializer.
2502 * minsyms.c (lookup_minimal_symbol): Update call to
2503 get_symbol_name_matcher.
2504 (iterate_over_minimal_symbols): Likewise.
2505 * objc-lang.c (objc_language_data): Delete
2506 la_get_symbol_name_matcher initializer.
2507 * opencl-lang.c (opencl_language_data): Likewise.
2508 * p-lang.c (pascal_language_data): Likewise.
2509 * psymtab.c (psymbol_name_matches): Update call to
2510 get_symbol_name_matcher.
2511 * rust-lang.c (rust_language_data): Delete
2512 la_get_symbol_name_matcher initializer.
2513 * symtab.c (symbol_matches_search_name): Update call to
2514 get_symbol_name_matcher.
2515 (compare_symbol_name): Likewise.
2516
2517 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2518
2519 * ada-lang.c (ada_language_data): Delete la_compute_program
2520 initializer.
2521 * c-lang.c (c_language_data): Likewise.
2522 (c_language::compute_program): New member function.
2523 (cplus_language_data): Delete la_compute_program initializer.
2524 (cplus_language::compute_program): New member function.
2525 (asm_language_data): Delete la_compute_program initializer.
2526 (minimal_language_data): Likewise.
2527 * c-lang.h (c_compute_program): Update comment.
2528 (cplus_compute_program): Likewise.
2529 * compile/compile-c-support.c (c_compute_program): Likewise.
2530 (cplus_compute_program): Likewise.
2531 * compile/compile.c (compile_to_object): Update call to
2532 la_compute_program.
2533 * d-lang.c (d_language_data): Delete la_compute_program
2534 initializer.
2535 * f-lang.c (f_language_data): Likewise.
2536 * go-lang.c (go_language_data): Likewise.
2537 * language.c (unknown_language_data): Likewise.
2538 (auto_language_data): Likewise.
2539 * language.h (language_data): Delete la_compute_program field.
2540 (language_defn::compute_program): New member function.
2541 * m2-lang.c (m2_language_data): Delete la_compute_program
2542 initializer.
2543 * objc-lang.c (objc_language_data): Likewise.
2544 * opencl-lang.c (opencl_language_data): Likewise.
2545 * p-lang.c (pascal_language_data): Likewise.
2546 * rust-lang.c (rust_language_data): Likewise.
2547
2548 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2549
2550 * ada-lang.c (ada_language_data) Delete
2551 la_class_name_from_physname initializer.
2552 * c-lang.c (c_language_data): Likewise.
2553 (cplus_language_data): Likewise.
2554 (cplus_language::class_name_from_physname): New member function.
2555 (asm_language_data): Delete la_class_name_from_physname
2556 initializer.
2557 (minimal_language_data): Likewise.
2558 * d-lang.c (d_language_data): Likewise.
2559 * dwarf2/read.c (guess_partial_die_structure_name): Update to call
2560 method on language_defn class.
2561 (guess_full_die_structure_name): Likewise.
2562 * f-lang.c (f_language_data): Delete la_class_name_from_physname
2563 initializer.
2564 * go-lang.c (go_language_data): Likewise.
2565 * language.c (language_class_name_from_physname): Delete.
2566 (unk_lang_class_name): Delete.
2567 (unknown_language_data): Delete la_class_name_from_physname
2568 initializer.
2569 (auto_language_data): Likewise.
2570 * language.h (language_data): Delete la_class_name_from_physname
2571 field.
2572 (language_defn::class_name_from_physname): New function.
2573 (language_class_name_from_physname): Delete declaration.
2574 * m2-lang.c (m2_language_data): Delete la_class_name_from_physname
2575 initializer.
2576 * objc-lang.c (objc_language_data): Likewise.
2577 * opencl-lang.c (opencl_language_data): Likewise.
2578 * p-lang.c (pascal_language_data): Likewise.
2579 * rust-lang.c (rust_language_data): Likewise.
2580
2581 2020-06-16 Tom Tromey <tom@tromey.com>
2582
2583 * tui/tui-data.h (STATUS_NAME): New macro.
2584 * tui/tui-layout.c (tui_remove_some_windows)
2585 (initialize_known_windows, tui_register_window)
2586 (tui_layout_split::remove_windows, initialize_layouts)
2587 (tui_new_layout_command): Don't use hard-coded window names.
2588
2589 2020-06-16 Tom Tromey <tom@tromey.com>
2590
2591 PR tui/25348:
2592 * tui/tui.c (tui_ensure_readline_initialized): Rename from
2593 tui_initialize_readline. Only run once. Call rl_initialize.
2594 * tui/tui.h (tui_ensure_readline_initialized): Rename from
2595 tui_initialize_readline.
2596 * tui/tui-io.c (tui_setup_io): Call
2597 tui_ensure_readline_initialized.
2598 * tui/tui-interp.c (tui_interp::init): Update.
2599
2600 2020-06-16 Tom Tromey <tom@tromey.com>
2601
2602 * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
2603 Also preserve the status window.
2604
2605 2020-06-16 Tom Tromey <tom@tromey.com>
2606
2607 * python/py-tui.c (tui_py_window::~tui_py_window): Handle case
2608 where m_window==nullptr.
2609
2610 2020-06-15 Tom Tromey <tromey@adacore.com>
2611
2612 * windows-nat.c (windows_nat::handle_output_debug_string):
2613 Update.
2614 (windows_nat::handle_ms_vc_exception): Update.
2615 * target.h (target_read_string): Change API.
2616 * target.c (target_read_string): Change API.
2617 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
2618 Update.
2619 * solib-frv.c (frv_current_sos): Update.
2620 * solib-dsbt.c (dsbt_current_sos): Update.
2621 * solib-darwin.c (darwin_current_sos): Update.
2622 * linux-thread-db.c (inferior_has_bug): Update.
2623 * expprint.c (print_subexp_standard): Update.
2624 * ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
2625 (ada_exception_message_1): Update.
2626
2627 2020-06-15 Tom Tromey <tromey@adacore.com>
2628
2629 * linux-tdep.c (dump_mapping_p): Use target_read_memory.
2630
2631 2020-06-15 Tom Tromey <tromey@adacore.com>
2632
2633 * valprint.c (read_string): Update comment.
2634 * target.c (MIN): Remove.
2635 (target_read_string): Rewrite.
2636
2637 2020-06-15 Tom Tromey <tromey@adacore.com>
2638
2639 * corefile.c (read_memory_string): Remove.
2640 * ada-valprint.c (ada_value_print_ptr): Update.
2641 * ada-lang.h (ada_tag_name): Change return type.
2642 * ada-lang.c (type_from_tag): Update.
2643 (ada_tag_name_from_tsd): Change return type. Use
2644 target_read_string.
2645 (ada_tag_name): Likewise.
2646 * gdbcore.h (read_memory_string): Don't declare.
2647
2648 2020-06-14 Hannes Domani <ssbssa@yahoo.de>
2649
2650 * symtab.c (rbreak_command): Ignore Windows drive colon.
2651
2652 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
2653
2654 * NEWS: Mention removed GDBserver host support.
2655
2656 2020-06-12 Nelson Chu <nelson.chu@sifive.com>
2657
2658 * features/riscv/rebuild-csr-xml.sh: Updated.
2659
2660 2020-06-11 Tom Tromey <tom@tromey.com>
2661
2662 PR gdb/18318:
2663 * c-exp.y (lex_one_token): Handle 'p' like 'e'.
2664
2665 2020-06-09 Jonny Grant <jg@jguk.org>
2666 2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
2667
2668 * main.c (captured_main_1): Don't print new line after help.
2669 (print_gdb_help): add mailing list and IRC channel information
2670 to --help. Add new lines between items in the footer. Remove
2671 quotes around bug url.
2672
2673 2020-06-11 Keith Seitz <keiths@redhat.com>
2674
2675 PR gdb/21356
2676 * gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
2677 Resolve typedefs for type length calculations.
2678
2679 2020-06-10 Tom de Vries <tdevries@suse.de>
2680
2681 PR ada/24713
2682 * dwarf2/index-write.c (struct mapped_symtab): Add m_string_obstack.
2683 (write_psymbols): Enable .gdb_index for ada.
2684 * dwarf2/read.c: Remove comment stating .gdb_index is unsupported for
2685 ada.
2686
2687 2020-06-10 Tom de Vries <tdevries@suse.de>
2688
2689 * dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
2690 (dw2_symtab_iter_init): ... here. Add variant with "offset_type
2691 namei" instead of "const char *name" argument.
2692 (dw2_map_matching_symbols): Use "offset_type namei" variant of
2693 dw2_symtab_iter_init.
2694
2695 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2696
2697 * gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
2698 to use type::field and field::type instead.
2699
2700 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2701
2702 * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites
2703 to use field::type instead.
2704
2705 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2706
2707 * gdbtypes.h (struct field) <type, set_type>: New methods.
2708 Rename `type` field to...
2709 <m_type>: ... this. Change references throughout to use type or
2710 set_type methods.
2711 (FIELD_TYPE): Use field::type. Change call sites that modify
2712 the field's type to use field::set_type instead.
2713
2714 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2715
2716 * gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
2717 to use type::index_type instead.
2718
2719 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
2720
2721 * gdbtypes.h (struct type) <index_type, set_index_type>: New
2722 methods.
2723 (TYPE_INDEX_TYPE): Use type::index_type.
2724 * gdbtypes.c (create_array_type_with_stride): Likewise.
2725
2726 2020-06-07 Tom Tromey <tom@tromey.com>
2727
2728 * valprint.c (generic_val_print_float): Remove "embedded_offset"
2729 parameter.
2730 (generic_value_print): Update.
2731
2732 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
2733
2734 Revert commit 982a38f60b0.
2735 * python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
2736
2737 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
2738
2739 * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
2740 avoid use after free.
2741
2742 2020-06-05 Tom de Vries <tdevries@suse.de>
2743
2744 * NEWS: Fix typos.
2745
2746 2020-06-04 Simon Marchi <simon.marchi@efficios.com>
2747
2748 * dwarf2/read.c (dwarf2_read_gdb_index): Save partial_symtabs in
2749 the per_bfd object.
2750 (dwarf2_read_debug_names): Likewise.
2751 (dwarf2_initialize_objfile): Use partial_symtabs from per_bfd
2752 object when re-using a per_bfd object with an index.
2753
2754 2020-06-03 Tom de Vries <tdevries@suse.de>
2755
2756 PR symtab/26046
2757 * dwarf2/read.c (scan_partial_symbols): Recurse into DW_TAG_subprogram
2758 children for C++.
2759 (load_partial_dies): Don't skip DW_TAG_inlined_subroutine child of
2760 DW_TAG_subprogram.
2761
2762 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2763
2764 * ada-lang.c (ada_language_data): Delete skip_trampoline
2765 initializer.
2766 * c-lang.c (c_language_data): Likewise.
2767 (cplus_language_data): Likewise.
2768 (cplus_language::skip_trampoline): New member function.
2769 (asm_language_data): Delete skip_trampoline initializer.
2770 (minimal_language_data): Likewise.
2771 * d-lang.c (d_language_data): Likewise.
2772 * f-lang.c (f_language_data): Likewise.
2773 * go-lang.c (go_language_data): Likewise.
2774 * language.c (unk_lang_trampoline): Delete function.
2775 (skip_language_trampoline): Update.
2776 (unknown_language_data): Delete skip_trampoline initializer.
2777 (auto_language_data): Likewise.
2778 * language.h (language_data): Delete skip_trampoline field.
2779 (language_defn::skip_trampoline): New function.
2780 * m2-lang.c (m2_language_data): Delete skip_trampoline
2781 initializer.
2782 * objc-lang.c (objc_skip_trampoline): Delete function, move
2783 implementation to objc_language::skip_trampoline.
2784 (objc_language_data): Delete skip_trampoline initializer.
2785 (objc_language::skip_trampoline): New member function with
2786 implementation from objc_skip_trampoline.
2787 * opencl-lang.c (opencl_language_data): Delete skip_trampoline
2788 initializer.
2789 * p-lang.c (pascal_language_data): Likewise.
2790 * rust-lang.c (rust_language_data): Likewise.
2791
2792 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2793
2794 * ada-lang.c (ada_language_data): Delete la_demangle initializer.
2795 (ada_language::demangle): New member function.
2796 * c-lang.c (c_language_data): Delete la_demangle initializer.
2797 (cplus_language_data): Delete la_demangle initializer.
2798 (cplus_language::demangle): New member function.
2799 (asm_language_data): Delete la_demangle initializer.
2800 (minimal_language_data): Delete la_demangle initializer.
2801 * d-lang.c (d_language_data): Delete la_demangle initializer.
2802 (d_language::demangle): New member function.
2803 * f-lang.c (f_language_data): Delete la_demangle initializer.
2804 (f_language::demangle): New member function.
2805 * go-lang.c (go_language_data): Delete la_demangle initializer.
2806 (go_language::demangle): New member function.
2807 * language.c (language_demangle): Update.
2808 (unk_lang_demangle): Delete.
2809 (unknown_language_data): Delete la_demangle initializer.
2810 (unknown_language::demangle): New member function.
2811 (auto_language_data): Delete la_demangle initializer.
2812 (auto_language::demangle): New member function.
2813 * language.h (language_data): Delete la_demangle field.
2814 (language_defn::demangle): New function.
2815 * m2-lang.c (m2_language_data): Delete la_demangle initializer.
2816 * objc-lang.c (objc_language_data): Delete la_demangle
2817 initializer.
2818 (objc_language::demangle): New member function.
2819 * opencl-lang.c (opencl_language_data): Delete la_demangle
2820 initializer.
2821 * p-lang.c (pascal_language_data): Likewise.
2822 * rust-lang.c (rust_language_data): Likewise.
2823 (rust_language::demangle): New member function.
2824
2825 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2826
2827 * ada-lang.c (ada_language_data): Delete la_print_type
2828 initializer.
2829 (ada_language::print_type): New member function.
2830 * c-lang.c (c_language_data): Delete la_print_type initializer.
2831 (c_language::print_type): New member function.
2832 (cplus_language_data): Delete la_print_type initializer.
2833 (cplus_language::print_type): New member function.
2834 (asm_language_data): Delete la_print_type initializer.
2835 (asm_language::print_type): New member function.
2836 (minimal_language_data): Delete la_print_type initializer.
2837 (minimal_language::print_type): New member function.
2838 * d-lang.c (d_language_data): Delete la_print_type initializer.
2839 (d_language::print_type): New member function.
2840 * f-lang.c (f_language_data): Delete la_print_type initializer.
2841 (f_language::print_type): New member function.
2842 * go-lang.c (go_language_data): Delete la_print_type initializer.
2843 (go_language::print_type): New member function.
2844 * language.c (unk_lang_print_type): Delete.
2845 (unknown_language_data): Delete la_print_type initializer.
2846 (unknown_language::print_type): New member function.
2847 (auto_language_data): Delete la_print_type initializer.
2848 (auto_language::print_type): New member function.
2849 * language.h (language_data): Delete la_print_type field.
2850 (language_defn::print_type): New function.
2851 (LA_PRINT_TYPE): Update.
2852 * m2-lang.c (m2_language_data): Delete la_print_type initializer.
2853 (m2_language::print_type): New member function.
2854 * objc-lang.c (objc_language_data): Delete la_print_type
2855 initializer.
2856 (objc_language::print_type): New member function.
2857 * opencl-lang.c (opencl_print_type): Delete, implementation moved
2858 to opencl_language::print_type.
2859 (opencl_language_data): Delete la_print_type initializer.
2860 (opencl_language::print_type): New member function, implementation
2861 from opencl_print_type.
2862 * p-lang.c (pascal_language_data): Delete la_print_type
2863 initializer.
2864 (pascal_language::print_type): New member function.
2865 * rust-lang.c (rust_print_type): Delete, implementation moved to
2866 rust_language::print_type.
2867 (rust_language_data): Delete la_print_type initializer.
2868 (rust_language::print_type): New member function, implementation
2869 from rust_print_type.
2870
2871 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2872
2873 * ada-lang.c (ada_sniff_from_mangled_name): Delete function,
2874 implementation moves to...
2875 (ada_language::sniff_from_mangled_name): ...here. Update return
2876 type.
2877 (ada_language_data): Delete la_sniff_from_mangled_name
2878 initializer.
2879 * c-lang.c (c_language_data): Likewise.
2880 (cplus_language_data): Likewise.
2881 (cplus_language::sniff_from_mangled_name): New member function,
2882 implementation taken from gdb_sniff_from_mangled_name.
2883 (asm_language_data): Delete la_sniff_from_mangled_name
2884 initializer.
2885 (minimal_language_data): Likewise.
2886 * cp-support.c (gdb_sniff_from_mangled_name): Delete,
2887 implementation moves to cplus_language::sniff_from_mangled_name.
2888 * cp-support.h (gdb_sniff_from_mangled_name): Delete declaration.
2889 * d-lang.c (d_sniff_from_mangled_name): Delete, implementation
2890 moves to...
2891 (d_language::sniff_from_mangled_name): ...here.
2892 (d_language_data): Delete la_sniff_from_mangled_name initializer.
2893 * f-lang.c (f_language_data): Likewise.
2894 * go-lang.c (go_sniff_from_mangled_name): Delete, implementation
2895 moves to...
2896 (go_language::sniff_from_mangled_name): ...here.
2897 (go_language_data): Delete la_sniff_from_mangled_name initializer.
2898 * language.c (language_sniff_from_mangled_name): Delete.
2899 (unknown_language_data): Delete la_sniff_from_mangled_name
2900 initializer.
2901 (auto_language_data): Likewise.
2902 * language.h (language_data): Delete la_sniff_from_mangled_name
2903 field.
2904 (language_defn::sniff_from_mangled_name): New function.
2905 (language_sniff_from_mangled_name): Delete declaration.
2906 * m2-lang.c (m2_language_data): Delete la_sniff_from_mangled_name
2907 field.
2908 * objc-lang.c (objc_sniff_from_mangled_name): Delete,
2909 implementation moves to...
2910 (objc_language::sniff_from_mangled_name): ...here.
2911 (objc_language_data): Delete la_sniff_from_mangled_name initializer.
2912 * opencl-lang.c (opencl_language_data): Likewise.
2913 * p-lang.c (pascal_language_data): Likewise.
2914 * rust-lang.c (rust_sniff_from_mangled_name): Delete,
2915 implementation moves to...
2916 (rust_language::sniff_from_mangled_name): ...here.
2917 (rust_language_data): Delete la_sniff_from_mangled_name
2918 initializer.
2919 * symtab.c (symbol_find_demangled_name): Call
2920 sniff_from_mangled_name member function.
2921
2922 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2923
2924 * ada-lang.c (ada_language_data): Delete la_search_name_hash
2925 initializer.
2926 * c-lang.c (c_language_data): Likewise.
2927 (cplus_language_data): Likewise.
2928 (cplus_language::search_name_hash): New member function.
2929 (asm_language_data): Delete la_search_name_hash initializer.
2930 (minimal_language_data): Likewise.
2931 * d-lang.c (d_language_data): Likewise.
2932 * dictionary.c (default_search_name_hash): Rename to...
2933 (language_defn::search_name_hash): ...this.
2934 * f-lang.c (f_language_data): Likewise.
2935 (f_language::search_name_hash): New member function.
2936 * go-lang.c (go_language_data): Delete la_search_name_hash
2937 initializer.
2938 * language.c (unknown_language_data): Likewise.
2939 (auto_language_data): Likewise.
2940 * language.h (struct language_data): Delete la_search_name_hash
2941 field.
2942 (language_defn::search_name_hash): Declare new member function.
2943 (default_search_name_hash): Delete declaration.
2944 * m2-lang.c (m2_language_data): Delete la_search_name_hash
2945 initializer.
2946 * objc-lang.c (objc_language_data): Likewise.
2947 * opencl-lang.c (opencl_language_data): Likewise.
2948 * p-lang.c (pascal_language_data): Likewise.
2949 * rust-lang.c (rust_language_data): Likewise.
2950 * symtab.c (search_name_hash): Update call.
2951
2952 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2953
2954 * ada-lang.c (ada_language_data): Delete la_get_compile_instance
2955 initializer.
2956 * c-lang.c (class compile_instance): Declare.
2957 (c_language_data): Delete la_get_compile_instance initializer.
2958 (c_language::get_compile_instance): New member function.
2959 (cplus_language_data): Delete la_get_compile_instance initializer.
2960 (cplus_language::get_compile_instance): New member function.
2961 (asm_language_data): Delete la_get_compile_instance initializer.
2962 (minimal_language_data): Likewise.
2963 * c-lang.h (c_get_compile_context): Update comment.
2964 (cplus_get_compile_context): Update comment.
2965 * compile/compile.c (compile_to_object): Update calls, don't rely
2966 on function pointer being NULL.
2967 * d-lang.c (d_language_data): Delete la_get_compile_instance
2968 initializer.
2969 * f-lang.c (f_language_data): Likewise.
2970 * go-lang.c (go_language_data): Likewise.
2971 * language.c (unknown_language_data): Likewise.
2972 (auto_language_data): Likewise.
2973 * language.h (language_data): Delete la_get_compile_instance field.
2974 (language_defn::get_compile_instance): New member function.
2975 * m2-lang.c (m2_language_data): Delete la_get_compile_instance
2976 initializer.
2977 * objc-lang.c (objc_language_data): Likewise.
2978 * opencl-lang.c (opencl_language_data): Likewise.
2979 * p-lang.c (pascal_language_data): Likewise.
2980 * rust-lang.c (rust_language_data): Likewise.
2981
2982 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
2983
2984 * ada-lang.c (ada_add_all_symbols): Update comment.
2985 (ada_iterate_over_symbols): Delete, move implementation to...
2986 (ada_language::iterate_over_symbols): ...here, a new member
2987 function, rewrite to use range based for loop.
2988 (ada_language_data): Delete la_iterate_over_symbols initializer.
2989 * c-lang.c (c_language_data): Likewise.
2990 (cplus_language_data): Likewise.
2991 (asm_language_data): Likewise.
2992 (minimal_language_data): Likewise.
2993 * d-lang.c (d_language_data): Likewise.
2994 * f-lang.c (f_language_data): Likewise.
2995 * go-lang.c (go_language_data): Likewise.
2996 * language.c (unknown_language_data): Likewise.
2997 (auto_language_data): Likewise.
2998 * language.h (language_data): Delete la_iterate_over_symbols field.
2999 (language_defn::iterate_over_symbols): New member function.
3000 (LA_ITERATE_OVER_SYMBOLS): Update.
3001 * linespec.c (iterate_over_all_matching_symtabs): Update.
3002 * m2-lang.c (m2_language_data): Delete la_iterate_over_symbols
3003 initializer.
3004 * objc-lang.c (objc_language_data): Likewise.
3005 * opencl-lang.c (opencl_language_data): Likewise.
3006 * p-lang.c (pascal_language_data): Likewise.
3007 * rust-lang.c (rust_language_data): Likewise.
3008
3009 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3010
3011 * ada-lang.c (ada_language_data): Delete
3012 la_lookup_transparent_type initializer.
3013 * c-lang.c (c_language_data): Likewise.
3014 (cplus_language_data): Likewise.
3015 (cplus_language::lookup_transparent_type): New member function.
3016 (asm_language_data): Delete la_lookup_transparent_type
3017 initializer.
3018 (minimal_language_data): Likewise.
3019 * d-lang.c (d_language_data): Likewise.
3020 * f-lang.c (f_language_data): Likewise.
3021 * go-lang.c (go_language_data): Likewise.
3022 * language.c (unknown_language_data): Likewise.
3023 (auto_language_data): Likewise.
3024 * language.h (struct language_data): Delete
3025 la_lookup_transparent_type field.
3026 (language_defn::lookup_transparent_type): New member function.
3027 * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type
3028 initializer.
3029 * objc-lang.c (objc_language_data): Likewise.
3030 * opencl-lang.c (opencl_language_data): Likewise.
3031 * p-lang.c (pascal_language_data): Likewise.
3032 * rust-lang.c (rust_language_data): Likewise.
3033 * symtab.c (symbol_matches_domain): Update call.
3034
3035 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3036
3037 * ada-lang.c (ada_language_arch_info): Delete function, move
3038 implementation to...
3039 (ada_language::language_arch_info): ...here, a new member
3040 function.
3041 (ada_language_data): Delete la_language_arch_info.
3042 * c-lang.c (c_language_data): Likewise.
3043 (c_language::language_arch_info): New member function.
3044 (cplus_language_arch_info): Delete function, move
3045 implementation to...
3046 (cplus_language::language_arch_info): ...here, a new member
3047 function.
3048 (cplus_language_data): Delete la_language_arch_info.
3049 (asm_language_data): Likewise.
3050 (asm_language::language_arch_info): New member function.
3051 (minimal_language_data): Delete la_language_arch_info.
3052 (minimal_language::language_arch_info): New member function.
3053 * d-lang.c (d_language_arch_info): Delete function, move
3054 implementation to...
3055 (d_language::language_arch_info): ...here, a new member
3056 function.
3057 (d_language_data): Delete la_language_arch_info.
3058 * f-lang.c (f_language_arch_info): Delete function, move
3059 implementation to...
3060 (f_language::language_arch_info): ...here, a new member
3061 function.
3062 (f_language_data): Delete la_language_arch_info.
3063 * go-lang.c (go_language_arch_info): Delete function, move
3064 implementation to...
3065 (go_language::language_arch_info): ...here, a new member
3066 function.
3067 (go_language_data): Delete la_language_arch_info.
3068 * language.c (unknown_language_data): Likewise.
3069 (unknown_language::language_arch_info): New member function.
3070 (auto_language_data): Delete la_language_arch_info.
3071 (auto_language::language_arch_info): New member function.
3072 (language_gdbarch_post_init): Update call to
3073 la_language_arch_info.
3074 * language.h (language_data): Delete la_language_arch_info
3075 function pointer.
3076 (language_defn::language_arch_info): New function.
3077 * m2-lang.c (m2_language_arch_info): Delete function, move
3078 implementation to...
3079 (m2_language::language_arch_info): ...here, a new member
3080 function.
3081 (m2_language_data): Delete la_language_arch_info.
3082 * objc-lang.c (objc_language_arch_info): Delete function, move
3083 implementation to...
3084 (objc_language::language_arch_info): ...here, a new member
3085 function.
3086 (objc_language_data): Delete la_language_arch_info.
3087 * opencl-lang.c (opencl_language_arch_info): Delete function, move
3088 implementation to...
3089 (opencl_language::language_arch_info): ...here, a new member
3090 function.
3091 (opencl_language_data): Delete la_language_arch_info.
3092 * p-lang.c (pascal_language_arch_info): Delete function, move
3093 implementation to...
3094 (pascal_language::language_arch_info): ...here, a new member
3095 function.
3096 (pascal_language_data): Delete la_language_arch_info.
3097 * rust-lang.c (rust_language_arch_info): Delete function, move
3098 implementation to...
3099 (rust_language::language_arch_info): ...here, a new member
3100 function.
3101 (rust_language_data): Delete la_language_arch_info.
3102
3103 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3104
3105 * ada-lang.c (ada_language_data): Delete la_pass_by_reference
3106 initializer.
3107 * c-lang.c (c_language_data): Likewise.
3108 (cplus_language_data): Likewise.
3109 (cplus_language::pass_by_reference_info): New method.
3110 (asm_language_data): Delete la_pass_by_reference initializer.
3111 (minimal_language_data): Likewise.
3112 * cp-abi.c (cp_pass_by_reference): Remove use of
3113 default_pass_by_reference.
3114 * d-lang.c (d_language_data): Likewise.
3115 * f-lang.c (f_language_data): Likewise.
3116 * gnu-v3-abi.c (gnuv3_pass_by_reference): Remove use of
3117 default_pass_by_reference.
3118 * go-lang.c (go_language_data): Likewise.
3119 * language.c (language_pass_by_reference): Update.
3120 (default_pass_by_reference): Delete.
3121 (unknown_language_data): Delete la_pass_by_reference
3122 initializer.
3123 (auto_language_data): Likewise.
3124 * language.h (struct language_data): Delete la_pass_by_reference
3125 field.
3126 (language_defn::pass_by_reference_info): New member function.
3127 (default_pass_by_reference): Delete declaration.
3128 * m2-lang.c (m2_language_data): Delete la_pass_by_reference
3129 initializer.
3130 * objc-lang.c (objc_language_data): Likewise.
3131 * opencl-lang.c (opencl_language_data): Likewise.
3132 * p-lang.c (pascal_language_data): Likewise.
3133 * rust-lang.c (rust_language_data): Likewise.
3134
3135 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3136
3137 * ada-lang.c (ada_read_var_value): Delete function, move
3138 implementation to...
3139 (ada_language::read_var_value): ...here.
3140 (ada_language_data): Delete la_read_var_value initializer.
3141 * c-lang.c (c_language_data): Likewise.
3142 (cplus_language_data): Likewise.
3143 (minimal_language_data): Likewise.
3144 * d-lang.c (d_language_data): Likewise.
3145 * f-lang.c (f_language_data): Likewise.
3146 * findvar.c (default_read_var_value): Rename to...
3147 (language_defn::read_var_value): ...this.
3148 * findvar.c (read_var_value): Update header comment, and change to
3149 call member function instead of function pointer.
3150 * go-lang.c (go_language_data): Likewise.
3151 * language.c (unknown_language_data): Delete la_read_var_value
3152 initializer.
3153 (auto_language_data): Likewise.
3154 * language.h (struct language_data): Delete la_read_var_value
3155 field.
3156 (language_defn::read_var_value): New member function.
3157 (default_read_var_value): Delete declaration.
3158 * m2-lang.c (m2_language_data): Delete la_read_var_value
3159 initializer.
3160 * objc-lang.c (objc_language_data): Likewise.
3161 * opencl-lang.c (opencl_language_data): Likewise.
3162 * p-lang.c (pascal_language_data): Likewise.
3163 * rust-lang.c (rust_language_data): Likewise.
3164 * value.h (default_read_var_value): Delete declaration.
3165
3166 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3167
3168 * ada-lang.c (ada_print_array_index): Delete function, move
3169 implementation to...
3170 (ada_language::print_array_index): ...here.
3171 (ada_language_data): Delete la_print_array_index initializer.
3172 * c-lang.c (c_language_data): Likewise.
3173 (cplus_language_data): Likewise.
3174 (minimal_language_data): Likewise.
3175 * d-lang.c (d_language_data): Likewise.
3176 * f-lang.c (f_language_data): Likewise.
3177 * go-lang.c (go_language_data): Likewise.
3178 * language.c (default_print_array_index): Delete function, move
3179 implementation to...
3180 (language_defn::print_array_index): ...here.
3181 (unknown_language_data): Delete la_print_array_index initializer.
3182 (auto_language_data): Likewise.
3183 * language.h (struct language_data): Delete la_print_array_index
3184 field.
3185 (language_defn::print_array_index): New member function.
3186 (LA_PRINT_ARRAY_INDEX): Update.
3187 (default_print_array_index): Delete declaration.
3188 * m2-lang.c (m2_language_data): Delete la_print_array_index
3189 initializer.
3190 * objc-lang.c (objc_language_data): Likewise.
3191 * opencl-lang.c (opencl_language_data): Likewise.
3192 * p-lang.c (pascal_language_data): Likewise.
3193 * rust-lang.c (rust_language_data): Likewise.
3194
3195 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3196
3197 * gdb/ada-lang.c (ada_language_defn): Convert to...
3198 (ada_language_data): ...this.
3199 (class ada_language): New class.
3200 (ada_language_defn): New static global.
3201 * gdb/c-lang.c (c_language_defn): Convert to...
3202 (c_language_data): ...this.
3203 (class c_language): New class.
3204 (c_language_defn): New static global.
3205 (cplus_language_defn): Convert to...
3206 (cplus_language_data): ...this.
3207 (class cplus_language): New class.
3208 (cplus_language_defn): New static global.
3209 (asm_language_defn): Convert to...
3210 (asm_language_data): ...this.
3211 (class asm_language): New class.
3212 (asm_language_defn): New static global.
3213 (minimal_language_defn): Convert to...
3214 (minimal_language_data): ...this.
3215 (class minimal_language): New class.
3216 (minimal_language_defn): New static global.
3217 * gdb/d-lang.c (d_language_defn): Convert to...
3218 (d_language_data): ...this.
3219 (class d_language): New class.
3220 (d_language_defn): New static global.
3221 * gdb/f-lang.c (f_language_defn): Convert to...
3222 (f_language_data): ...this.
3223 (class f_language): New class.
3224 (f_language_defn): New static global.
3225 * gdb/go-lang.c (go_language_defn): Convert to...
3226 (go_language_data): ...this.
3227 (class go_language): New class.
3228 (go_language_defn): New static global.
3229 * gdb/language.c (unknown_language_defn): Remove declaration.
3230 (current_language): Initialize to nullptr, real initialization is
3231 moved to _initialize_language.
3232 (languages): Delete global.
3233 (language_defn::languages): Define.
3234 (set_language_command): Use language_defn::languages.
3235 (set_language): Likewise.
3236 (range_error): Likewise.
3237 (language_enum): Likewise.
3238 (language_def): Likewise.
3239 (add_set_language_command): Use language_def::languages for the
3240 language list, and language_def to lookup language pointers.
3241 (skip_language_trampoline): Use language_defn::languages.
3242 (unknown_language_defn): Convert to...
3243 (unknown_language_data): ...this.
3244 (class unknown_language): New class.
3245 (unknown_language_defn): New static global.
3246 (auto_language_defn): Convert to...
3247 (auto_language_data): ...this.
3248 (class auto_language): New class.
3249 (auto_language_defn): New static global.
3250 (language_gdbarch_post_init): Use language_defn::languages.
3251 (_initialize_language): Initialize current_language.
3252 * gdb/language.h (struct language_defn): Rename to...
3253 (struct language_data): ...this.
3254 (struct language_defn): New.
3255 (auto_language_defn): Delete.
3256 (unknown_language_defn): Delete.
3257 (minimal_language_defn): Delete.
3258 (ada_language_defn): Delete.
3259 (asm_language_defn): Delete.
3260 (c_language_defn): Delete.
3261 (cplus_language_defn): Delete.
3262 (d_language_defn): Delete.
3263 (f_language_defn): Delete.
3264 (go_language_defn): Delete.
3265 (m2_language_defn): Delete.
3266 (objc_language_defn): Delete.
3267 (opencl_language_defn): Delete.
3268 (pascal_language_defn): Delete.
3269 (rust_language_defn): Delete.
3270 * gdb/m2-lang.c (m2_language_defn): Convert to...
3271 (m2_language_data): ...this.
3272 (class m2_language): New class.
3273 (m2_language_defn): New static global.
3274 * gdb/objc-lang.c (objc_language_defn): Convert to...
3275 (objc_language_data): ...this.
3276 (class objc_language): New class.
3277 (objc_language_defn): New static global.
3278 * gdb/opencl-lang.c (opencl_language_defn): Convert to...
3279 (opencl_language_data): ...this.
3280 (class opencl_language): New class.
3281 (opencl_language_defn): New static global.
3282 * gdb/p-lang.c (pascal_language_defn): Convert to...
3283 (pascal_language_data): ...this.
3284 (class pascal_language): New class.
3285 (pascal_language_defn): New static global.
3286 * gdb/rust-exp.y (rust_lex_tests): Use language_def to find
3287 language pointer, update comment format.
3288 * gdb/rust-lang.c (rust_language_defn): Convert to...
3289 (rust_language_data): ...this.
3290 (class rust_language): New class.
3291 (rust_language_defn): New static global.
3292
3293 2020-06-01 Andrew Burgess <andrew.burgess@embecosm.com>
3294
3295 * dwarf2/read.c (class lnp_state_machine) <m_last_address>: New
3296 member variable.
3297 <m_stmt_at_address>: New member variable.
3298 (lnp_state_machine::record_line): Don't record some lines, update
3299 tracking of is_stmt at the same address.
3300 (lnp_state_machine::lnp_state_machine): Initialise new member
3301 variables.
3302
3303 2020-06-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
3304
3305 * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
3306 "-include gnu-nat-mig.h".
3307 * gnu-nat-mig.h: New file.
3308 * gnu-nat.c: Include "gnu-nat-mig.h".
3309 (exc_server, msg_reply_server, notify_server,
3310 process_reply_server): Remove declarations.
3311
3312 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3313
3314 * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced,
3315 steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,
3316 inf_startup, inf_update_suspends, inf_set_pid, inf_steal_exc_ports,
3317 inf_validate_procinfo, inf_validate_task_sc, inf_restore_exc_ports,
3318 inf_set_threads_resume_sc, inf_set_threads_resume_sc_for_signal_thread,
3319 inf_resume, inf_set_step_thread, inf_detach, inf_attach, inf_signal,
3320 inf_continue, make_proc, proc_abort, _proc_free, proc_update_sc,
3321 proc_get_exception_port, proc_set_exception_port, _proc_get_exc_port,
3322 proc_steal_exc_port, proc_restore_exc_port, proc_trace): Move functions
3323 to gnu_nat_target class.
3324 * gnu-nat.c: Likewise.
3325 (inf_update_procs, S_proc_wait_reply, set_task_pause_cmd,
3326 set_task_exc_port_cmd, set_signals_cmd, set_thread_pause_cmd,
3327 set_thread_exc_port_cmd): Call inf_validate_procs through gnu_target
3328 object.
3329 (gnu_nat_target::create_inferior, gnu_nat_target::detach): Pass `this'
3330 instead of `gnu_target'.
3331
3332 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3333
3334 * i386-gnu-tdep.c: Include "gdbcore.h"
3335 (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays.
3336 (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL,
3337 I386_GNU_SIGCONTEXT_THREAD_STATE_OFFSET): New macros
3338 (i386_gnu_sigtramp_start, i386_gnu_sigtramp_p,
3339 i386_gnu_sigcontext_addr): New functions
3340 (i386gnu_init_abi): Register i386_gnu_sigtramp_p,
3341 i386_gnu_sigcontext_addr, and i386_gnu_sc_reg_offset in the gdbarch
3342 tdep.
3343
3344 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3345
3346 * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
3347 before fork_inferior call. Avoid calling it if target_is_pushed returns
3348 true.
3349
3350 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3351
3352 * gnu-nat.h (gnu_target): New variable declaration.
3353 * i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
3354 gnu_target.
3355 * gnu-nat.c (gnu_target): New variable.
3356 (inf_validate_procs): Pass gnu_target to thread_change_ptid,
3357 add_thread_silent, and add_thread calls.
3358 (gnu_nat_target::create_inferior): Pass gnu_target to
3359 add_thread_silent, thread_change_ptid call.
3360 (gnu_nat_target::detach): Pass gnu_target to detach_inferior
3361 call.
3362
3363 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3364
3365 * gnu-nat.c (gnu_xfer_auxv): Remove unused `res' variable.
3366 (gnu_nat_target::find_memory_regions): Remove unused
3367 `old_address' variable.
3368
3369 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3370
3371 * gnu-nat.c: Include "gdbarch.h".
3372
3373 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3374
3375 * reply_mig_hack.awk (Error return): Cast function through
3376 void *, to bypass compiler function call check.
3377
3378 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3379
3380 * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on
3381 $(srcdir)/reply_mig_hack.awk.
3382
3383 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3384
3385 * gnu-nat.h (gnu_debug_flag): Set type to bool.
3386
3387 2020-05-30 Jonny Grant <jg@jguk.org>
3388
3389 * configure.ac (ACX_BUGURL): change bug URL to https.
3390
3391 2020-05-30 Pedro Alves <palves@redhat.com>
3392
3393 * cp-support.c (replace_typedefs_template): New.
3394 (replace_typedefs_qualified_name): Handle
3395 DEMANGLE_COMPONENT_TEMPLATE.
3396
3397 2020-05-29 Simon Marchi <simon.marchi@efficios.com>
3398
3399 * dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
3400 dwarf2/index-cache.h, dwarf2/index-write.c,
3401 dwarf2/index-write.h, dwarf2/line-header.c,
3402 dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
3403 dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
3404 variables and fields from `dwarf2_per_objfile` to just
3405 `per_objfile` throughout.
3406
3407 2020-05-28 Simon Marchi <simon.marchi@polymtl.ca>
3408
3409 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3410 <push_dwarf_reg_entry_value>: Add comment.
3411
3412 2020-05-28 Kevin Buettner <kevinb@redhat.com>
3413 Keith Seitz <keiths@redhat.com>
3414
3415 * python/python.c (do_start_initialization): Call PyEval_SaveThread
3416 instead of PyEval_ReleaseLock.
3417 (class gdbpy_gil): Move to earlier in file.
3418 (finalize_python): Set gdb_python_initialized.
3419 (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early
3420 when not initialized.
3421
3422 2020-05-28 Simon Marchi <simon.marchi@efficios.com>
3423
3424 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3425 <push_dwarf_reg_entry_value>: Remove assert. Override
3426 per_objfile with caller_per_objfile.
3427
3428 2020-05-28 Tom de Vries <tdevries@suse.de>
3429
3430 * dwarf2/read.c (dw2_symtab_iter_next, dw2_expand_marked_cus): Limit
3431 PR gold/15646 workaround to symbol kind "type".
3432
3433 2020-05-27 Tom Tromey <tromey@adacore.com>
3434
3435 * dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
3436
3437 2020-05-27 Tom Tromey <tromey@adacore.com>
3438
3439 * dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
3440 Use htab_find_with_hash.
3441 <add_abbrev>: Remove "abbrev_number" parameter.
3442 * dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
3443 "abbrev_number" parameter. Use htab_find_slot_with_hash.
3444 (hash_abbrev): Add comment.
3445 (abbrev_table::lookup_abbrev): Move to header file.
3446 (abbrev_table::read): Update.
3447
3448 2020-05-27 Tom Tromey <tromey@adacore.com>
3449
3450 * dwarf2/read.c (struct partial_die_info) <name>: Declare new
3451 method.
3452 <canonical_name>: New member.
3453 <raw_name>: Rename from "name".
3454 (partial_die_info): Initialize canonical_name.
3455 (scan_partial_symbols): Check raw_name.
3456 (partial_die_parent_scope, partial_die_full_name)
3457 (add_partial_symbol, add_partial_subprogram)
3458 (add_partial_enumeration, load_partial_dies): Use "name" method.
3459 (partial_die_info::name): New method.
3460 (partial_die_info::read, guess_partial_die_structure_name)
3461 (partial_die_info::fixup): Update.
3462
3463 2020-05-27 Tom Tromey <tromey@adacore.com>
3464
3465 * dwarf2/attribute.h (struct attribute) <form_is_ref>: Inline.
3466 <get_ref_die_offset>: Inline.
3467 <get_ref_die_offset_complaint>: New method.
3468 * dwarf2/attribute.c (attribute::form_is_ref): Move to header.
3469 (attribute::get_ref_die_offset_complaint): Rename from
3470 get_ref_die_offset. Just issue complaint.
3471
3472 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
3473
3474 * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
3475
3476 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
3477
3478 * exec.c (exec_file_attach): Use errno value of first openp failure.
3479
3480 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
3481
3482 * nat/windows-nat.c (windows_thread_info::~windows_thread_info):
3483 Don't close thread handle.
3484
3485 2020-05-27 Tom Tromey <tom@tromey.com>
3486 Simon Marchi <simon.marchi@efficios.com>
3487
3488 * objfiles.h (struct objfile) <partial_symtabs>: Now a
3489 shared_ptr.
3490 * dwarf2/read.h (struct dwarf2_per_objfile) <partial_symtabs>: New
3491 member.
3492 * dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,
3493 dwarf2_per_bfd_objfile_data_key>: New globals.
3494 (dwarf2_has_info): Use shared dwarf2_per_bfd if possible.
3495 (dwarf2_get_section_info): Use get_dwarf2_per_objfile.
3496 (dwarf2_initialize_objfile): Consider cases where per_bfd can be
3497 shared.
3498 (dwarf2_build_psymtabs): Set objfile::partial_symtabs and
3499 short-circuit when sharing.
3500 (dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.
3501 (dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.
3502
3503 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3504
3505 * dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
3506 to...
3507 (struct dwarf2_per_objfile) <line_header_hash>: ... here.
3508 * dwarf2/read.c (handle_DW_AT_stmt_list): Update.
3509
3510 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3511
3512 * dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
3513 build_name_components, find_name_components_bounds>:
3514 Add per_objfile parameter.
3515 (struct mapped_index) <symbol_name_at>: Likewise.
3516 (struct mapped_debug_names): Remove constructor.
3517 <dwarf2_per_objfile>: Remove field.
3518 <namei_to_name, symbol_name_at>: Add per_objfile parameter.
3519 (mapped_index_base::find_name_components_bounds,
3520 mapped_index_base::build_name_components,
3521 dw2_expand_symtabs_matching_symbol): Likewise.
3522 (class mock_mapped_index) <symbol_name_at>: Likewise.
3523 (check_match): Likewise.
3524 (check_find_bounds_finds): Likewise.
3525 (test_mapped_index_find_name_component_bounds): Update.
3526 (CHECK_MATCH): Update.
3527 (dw2_expand_symtabs_matching): Update.
3528 (class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
3529 per_objfile parameter.
3530 <find_vec_in_debug_names>: Likewise.
3531 <m_per_objfile>: New field.
3532 (mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
3533 parameter.
3534 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
3535 (dw2_debug_names_iterator::next): Update.
3536 (dw2_debug_names_lookup_symbol): Update.
3537 (dw2_debug_names_expand_symtabs_for_function): Update.
3538 (dw2_debug_names_map_matching_symbols): Update.
3539 (dw2_debug_names_expand_symtabs_matching): Update.
3540 (dwarf2_read_debug_names): Update.
3541
3542 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3543
3544 * dwarf2/read.h (struct dwarf2_cu): Forward-declare.
3545 (struct dwarf2_per_bfd) <free_cached_comp_units>: Remove,
3546 move to dwarf2_per_objfile.
3547 <read_in_chain>: Remove.
3548 (struct dwarf2_per_objfile) <get_cu, set_cu, remove_cu,
3549 remove_all_cus, age_comp_units>: New methods.
3550 <m_dwarf2_cus>: New member.
3551 (struct dwarf2_per_cu_data) <cu>: Remove.
3552 * dwarf2/read.c (struct dwarf2_cu) <read_in_chain>: Remove.
3553 (age_cached_comp_units, free_one_cached_comp_unit): Remove,
3554 moved to methods of dwarf2_per_objfile.
3555 (dwarf2_clear_marks): Remove.
3556 (dwarf2_queue_item::~dwarf2_queue_item): Update.
3557 (dwarf2_per_bfd::~dwarf2_per_bfd): Don't free dwarf2_cus.
3558 (dwarf2_per_bfd::free_cached_comp_units): Remove.
3559 (dwarf2_per_objfile::remove_all_cus): New.
3560 (class free_cached_comp_units) <~free_cached_comp_units>:
3561 Update.
3562 (load_cu): Update.
3563 (dw2_do_instantiate_symtab): Adjust.
3564 (fill_in_sig_entry_from_dwo_entry): Adjust.
3565 (cutu_reader::init_tu_and_read_dwo_dies): Update.
3566 (cutu_reader::cutu_reader): Likewise.
3567 (cutu_reader::keep): Use dwarf2_per_objfile::set_cu.
3568 (cutu_reader::cutu_reader): Use dwarf2_per_objfile::get_cu.
3569 (process_psymtab_comp_unit): Use dwarf2_per_objfile::remove_cu
3570 and dwarf2_per_objfile::age_comp_units.
3571 (load_partial_comp_unit): Update.
3572 (maybe_queue_comp_unit): Use dwarf2_per_objfile::get_cu.
3573 (process_queue): Likewise.
3574 (find_partial_die): Use dwarf2_per_objfile::get_cu instead of cu
3575 backlink.
3576 (dwarf2_read_addr_index): Likewise.
3577 (follow_die_offset): Likewise.
3578 (dwarf2_fetch_die_loc_sect_off): Likewise.
3579 (dwarf2_fetch_constant_bytes): Likewise.
3580 (dwarf2_fetch_die_type_sect_off): Likewise.
3581 (follow_die_sig_1): Likewise.
3582 (load_full_type_unit): Likewise.
3583 (read_signatured_type): Likewise.
3584 (dwarf2_cu::dwarf2_cu): Don't set cu field.
3585 (dwarf2_cu::~dwarf2_cu): Remove.
3586 (dwarf2_per_objfile::get_cu): New.
3587 (dwarf2_per_objfile::set_cu): New.
3588 (age_cached_comp_units): Rename to...
3589 (dwarf2_per_objfile::age_comp_units): ... this. Adjust
3590 to std::unordered_map.
3591 (free_one_cached_comp_unit): Rename to...
3592 (dwarf2_per_objfile::remove_cu): ... this. Adjust
3593 to std::unordered_map.
3594 (dwarf2_per_objfile::~dwarf2_per_objfile): New.
3595 (dwarf2_mark_helper): Use dwarf2_per_objfile::get_cu, expect
3596 a dwarf2_per_objfile in data.
3597 (dwarf2_mark): Pass dwarf2_per_objfile in data to htab_traverse.
3598 (dwarf2_clear_marks): Remove.
3599
3600 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3601
3602 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Replace
3603 `int use_existing_cu` parameter with `dwarf2_cu *existing_cu`.
3604 (init_tu_and_read_dwo_dies): Likewise.
3605 (cutu_reader::init_tu_and_read_dwo_dies): Likewise.
3606 (cutu_reader::cutu_reader): Likewise.
3607 (load_partial_comp_unit): Likewise.
3608 (process_psymtab_comp_unit): Update.
3609 (build_type_psymtabs_1): Update.
3610 (process_skeletonless_type_unit): Update.
3611 (load_full_comp_unit): Update.
3612 (find_partial_die): Update.
3613 (dwarf2_read_addr_index): Update.
3614 (read_signatured_type): Update.
3615
3616 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3617
3618 * dwarf2/read.h (struct dwarf2_per_cu_data) <m_header,
3619 m_header_read_in>: New fields.
3620 <get_header>: New method.
3621 * dwarf2/read.c (per_cu_header_read_in): Remove.
3622 (dwarf2_per_cu_data::get_header): New.
3623 (dwarf2_per_cu_data::addr_size): Update.
3624 (dwarf2_per_cu_data::offset_size): Update.
3625 (dwarf2_per_cu_data::ref_addr_size): Update.
3626
3627 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3628
3629 * dwarf2/read.c (load_cu): Return dwarf2_cu.
3630 (dw2_do_instantiate_symtab): Update.
3631 (queue_and_load_all_dwo_tus): Change parameter from
3632 dwarf2_per_cu_data to dwarf2_cu.
3633 (dwarf2_fetch_die_loc_sect_off): Update.
3634 (dwarf2_fetch_constant_bytes): Update.
3635 (dwarf2_fetch_die_type_sect_off): Update.
3636
3637 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3638
3639 * dwarf2/read.c (process_full_comp_unit,
3640 process_full_type_unit): Remove per_cu, per_objfile paramters.
3641 Add dwarf2_cu parameter.
3642 (process_queue): Update.
3643
3644 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3645
3646 * dwarf2/read.c (create_cu_from_index_list): Replace
3647 dwarf2_per_objfile parameter with dwarf2_per_bfd.
3648 (create_cus_from_index_list): Likewise.
3649 (create_cus_from_index): Likewise.
3650 (create_signatured_type_table_from_index): Likewise.
3651 (create_cus_from_debug_names_list): Likewise.
3652 (create_cus_from_debug_names): Likewise.
3653 (dwarf2_read_gdb_index): Update.
3654 (dwarf2_read_debug_names): Update.
3655
3656 2020-05-27 Tom Tromey <tom@tromey.com>
3657 Simon Marchi <simon.marchi@efficios.com>
3658
3659 * dwarf2/read.h (struct dwarf2_per_objfile)
3660 <get_type_for_signatured_type, set_type_for_signatured_type>:
3661 New methods.
3662 <m_type_map>: New member.
3663 (struct signatured_type) <type>: Remove.
3664 * dwarf2/read.c
3665 (dwarf2_per_objfile::get_type_for_signatured_type,
3666 dwarf2_per_objfile::set_type_for_signatured_type): New.
3667 (get_signatured_type): Use new methods.
3668
3669 2020-05-27 Tom Tromey <tom@tromey.com>
3670 Simon Marchi <simon.marchi@efficios.com>
3671
3672 * dwarf2/read.h (struct type_unit_group_unshareable): New.
3673 (struct dwarf2_per_objfile) <type_units>: New member.
3674 <get_type_unit_group_unshareable>: New method.
3675 * dwarf2/read.c (struct type_unit_group) <compunit_symtab,
3676 num_symtabs, symtabs>: Remove; move to
3677 type_unit_group_unshareable.
3678 (dwarf2_per_objfile::get_type_unit_group_unshareable): New.
3679 (process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
3680 (dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
3681
3682 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3683
3684 * dwarf2/read.h (struct dwarf2_per_cu_data):
3685 <dwarf2_per_objfile>: Remove.
3686 * dwarf2/read.c (create_cu_from_index_list): Don't assign
3687 dwarf2_per_objfile.
3688 (create_signatured_type_table_from_index): Likewise.
3689 (create_signatured_type_table_from_debug_names): Likewise.
3690 (create_debug_type_hash_table): Likewise.
3691 (fill_in_sig_entry_from_dwo_entry): Likewise.
3692 (create_type_unit_group): Likewise.
3693 (read_comp_units_from_section): Likewise.
3694 (create_cus_hash_table): Likewise.
3695
3696 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3697
3698 * dwarf2/read.c (process_psymtab_comp_unit): Remove reference to
3699 dwarf2_per_cu_data::dwarf2_per_objfile.
3700 (compute_compunit_symtab_includes): Likewise.
3701 (dwarf2_cu::start_symtab): Likewise.
3702
3703 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3704
3705 * dwarf2/read.h (dwarf2_get_die_type): Add dwarf2_per_objfile
3706 parameter.
3707 * dwarf2/read.c (get_die_type_at_offset): Likewise.
3708 (read_namespace_alias): Update.
3709 (lookup_die_type): Update.
3710 (dwarf2_get_die_type): Add dwarf2_per_objfile parameter.
3711 * dwarf2/loc.c (class dwarf_evaluate_loc_desc) <get_base_type>:
3712 Update.
3713 (disassemble_dwarf_expression): Update.
3714
3715 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3716
3717 * dwarf2/read.h (struct dwarf2_queue_item): Add
3718 dwarf2_per_objfile parameter, assign new parameter.
3719 <per_objfile>: New field.
3720 * dwarf2/read.c (free_one_cached_comp_unit): Add
3721 dwarf2_per_objfile parameter.
3722 (queue_comp_unit): Likewise.
3723 (dw2_do_instantiate_symtab): Update.
3724 (process_psymtab_comp_unit): Update.
3725 (maybe_queue_comp_unit): Add dwarf2_per_objfile parameter.
3726 (process_imported_unit_die): Update.
3727 (queue_and_load_dwo_tu): Update.
3728 (follow_die_offset): Update.
3729 (follow_die_sig_1): Update.
3730
3731 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3732
3733 * dwarf2/read.h (struct dwarf2_per_cu_data) <objfile>: Remove.
3734 * dwarf2/read.c (dwarf2_compute_name): Pass per_objfile down.
3735 (read_call_site_scope): Assign per_objfile.
3736 (dwarf2_per_cu_data::objfile): Remove.
3737 * gdbtypes.h (struct call_site) <per_objfile>: New member.
3738 * dwarf2/loc.h (dwarf2_evaluate_loc_desc): Add
3739 dwarf2_per_objfile parameter.
3740 * dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Add
3741 dwarf2_per_objfile parameter.
3742 (dwarf_expr_reg_to_entry_parameter): Add output
3743 dwarf2_per_objfile parameter.
3744 (locexpr_get_frame_base): Update.
3745 (class dwarf_evaluate_loc_desc) <get_tls_address>: Update.
3746 <push_dwarf_reg_entry_value>: Update.
3747 <call_site_to_target_addr>: Update.
3748 (dwarf_entry_parameter_to_value): Add dwarf2_per_objfile
3749 parameter.
3750 (value_of_dwarf_reg_entry): Update.
3751 (rw_pieced_value): Update.
3752 (indirect_synthetic_pointer): Update.
3753 (dwarf2_evaluate_property): Update.
3754 (dwarf2_loc_desc_get_symbol_read_needs): Add dwarf2_per_objfile
3755 parameter.
3756 (locexpr_read_variable): Update.
3757 (locexpr_get_symbol_read_needs): Update.
3758 (loclist_read_variable): Update.
3759
3760 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3761
3762 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
3763 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3764 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
3765 parameter.
3766 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
3767 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
3768 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
3769 parameter.
3770 * dwarf2/loc.c (indirect_synthetic_pointer, per_cu_dwarf_call,
3771 sect_variable_value): Add dwarf2_per_objfile parameter.
3772 (class dwarf_evaluate_loc_desc) <dwarf_call,
3773 dwarf_variable_value>: Update.
3774 (fetch_const_value_from_synthetic_pointer): Add
3775 dwarf2_per_objfile parameter.
3776 (fetch_const_value_from_synthetic_pointer): Update.
3777 (coerced_pieced_ref): Update.
3778 (class symbol_needs_eval_context) <dwarf_call,
3779 dwarf_variable_value>: Update.
3780 (dwarf2_compile_expr_to_ax): Update.
3781
3782 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3783
3784 * dwarf2/loc.c (allocate_piece_closure): Add dwarf2_per_objfile
3785 parameter.
3786 (dwarf2_evaluate_loc_desc_full): Update.
3787
3788 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3789
3790 * dwarf2/read.h (dwarf2_read_addr_index): Add dwarf2_per_objfile
3791 parameter.
3792 * dwarf2/read.c (dwarf2_read_addr_index): Likewise.
3793 * dwarf2/loc.c (decode_debug_loclists_addresses): Add
3794 dwarf2_per_objfile parameter.
3795 (decode_debug_loc_dwo_addresses): Likewise.
3796 (dwarf2_find_location_expression): Update.
3797 (class dwarf_evaluate_loc_desc) <get_addr_index>: Update.
3798 (locexpr_describe_location_piece): Add dwarf2_per_objfile
3799 parameter.
3800 (disassemble_dwarf_expression): Add dwarf2_per_objfile
3801 parameter.
3802 (locexpr_describe_location_1): Likewise.
3803 (locexpr_describe_location): Update.
3804
3805 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3806
3807 * dwarf2/read.h (struct dwarf2_per_cu_data) <text_offset>:
3808 Remove.
3809 * dwarf2/read.c (dwarf2_per_cu_data::text_offset): Remove.
3810 * dwarf2/loc.c (dwarf2_find_location_expression): Update.
3811 (dwarf2_compile_property_to_c): Update.
3812 (dwarf2_compile_expr_to_ax): Add dwarf2_per_objfile parameter,
3813 use text offset from objfile.
3814 (locexpr_tracepoint_var_ref): Update.
3815 (locexpr_generate_c_location): Update.
3816 (loclist_describe_location): Update.
3817 (loclist_tracepoint_var_ref): Update.
3818 * dwarf2/compile.h (compile_dwarf_bounds_to_c): Add
3819 dwarf2_per_objfile parameter.
3820 * dwarf2/loc2c.c (do_compile_dwarf_expr_to_c): Likewise,
3821 use text offset from objfile.
3822 (compile_dwarf_expr_to_c): Add dwarf2_per_objfile parameter.
3823
3824 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3825
3826 * dwarf2/expr.h (struct dwarf_expr_context)
3827 <dwarf_expr_context>: Add dwarf2_per_objfile parameter.
3828 <offset>: Remove.
3829 <per_objfile>: New member.
3830 * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
3831 dwarf2_per_objfile parameter. Don't set offset, set
3832 per_objfile.
3833 (dwarf_expr_context::execute_stack_op): Use offset from objfile.
3834 * dwarf2/frame.c (dwarf2_frame_find_fde): Return (by parameter)
3835 a dwarf2_per_objfile object instead of an offset.
3836 (class dwarf_expr_executor) <dwarf_expr_executor>: Add
3837 constructor.
3838 (execute_stack_op): Add dwarf2_per_objfile parameter, pass it
3839 to dwarf2_expr_executor constructor. Don't set offset.
3840 (dwarf2_fetch_cfa_info): Update.
3841 (struct dwarf2_frame_cache) <text_offset>: Remove.
3842 <per_objfile>: New field.
3843 (dwarf2_frame_cache): Update.
3844 (dwarf2_frame_prev_register): Update.
3845 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3846 <dwarf_evaluate_loc_desc>: Add constructor.
3847 (dwarf2_evaluate_loc_desc_full): Update.
3848 (dwarf2_locexpr_baton_eval): Update.
3849 (class symbol_needs_eval_context) <symbol_needs_eval_context>:
3850 Add constructor.
3851 (dwarf2_loc_desc_get_symbol_read_needs): Update.
3852
3853 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3854
3855 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_type,
3856 addr_sized_int_type>: Move to dwarf2_cu.
3857 <int_type>: Move to dwarf2_per_objfile.
3858 (struct dwarf2_per_objfile) <int_type>: Move here.
3859 * dwarf2/read.c (struct dwarf2_cu) <addr_type,
3860 addr_sized_int_type>: Move here.
3861 (read_func_scope): Update.
3862 (read_array_type): Update.
3863 (read_tag_string_type): Update.
3864 (attr_to_dynamic_prop): Update.
3865 (dwarf2_per_cu_data::int_type): Rename to...
3866 (dwarf2_per_objfile::int_type): ... this.
3867 (dwarf2_per_cu_data::addr_sized_int_type): Rename to...
3868 (dwarf2_cu::addr_sized_int_type): ... this.
3869 (read_subrange_type): Update.
3870 (dwarf2_per_cu_data::addr_type): Rename to...
3871 (dwarf2_cu::addr_type): ... this.
3872 (set_die_type): Update.
3873
3874 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3875
3876 * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
3877 data through per_cu->cu.
3878
3879 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3880
3881 * dwarf2/read.c (lookup_dwo_comp_unit): Change
3882 dwarf2_per_cu_data parameter fo dwarf2_cu.
3883 (lookup_dwo_type_unit): Likewise.
3884 (read_cutu_die_from_dwo): Likewise.
3885 (lookup_dwo_unit): Likewise.
3886 (open_and_init_dwo_file): Likewise.
3887 (lookup_dwo_cutu): Likewise.
3888 (lookup_dwo_comp_unit): Likewise.
3889 (lookup_dwo_type_unit): Likewise.
3890 (cutu_reader::init_tu_and_read_dwo_dies): Update.
3891 (cutu_reader::cutu_reader): Update.
3892
3893 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3894
3895 * dwarf2/read.c (process_full_comp_unit): Add dwarf2_per_objfile
3896 parameter.
3897 (process_full_type_unit): Likewise.
3898 (process_queue): Update.
3899
3900 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3901
3902 * dwarf2/read.c (recursively_compute_inclusions): Add
3903 dwarf2_per_objfile parameter.
3904 (compute_compunit_symtab_includes): Likewise.
3905 (process_cu_includes): Update.
3906
3907 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3908
3909 * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
3910 parameter.
3911 (create_type_unit_group): Update.
3912 (process_psymtab_comp_unit_reader): Update.
3913 (build_type_psymtabs_reader): Update.
3914
3915 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3916
3917 * dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
3918 object through m_this_cu->cu.
3919
3920 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3921
3922 * dwarf2/read.c (queue_and_load_dwo_tu): Expect a dwarf2_cu as
3923 the info parameter.
3924 (queue_and_load_all_dwo_tus): Pass per_cu->cu.
3925
3926 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3927
3928 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Add
3929 per_objfile parameter.
3930 (load_full_type_unit): Add per_objfile parameter.
3931 (read_signatured_type): Likewise.
3932 (load_full_comp_unit): Likewise.
3933 (load_cu): Likewise.
3934 (dw2_do_instantiate_symtab): Likewise.
3935 (dw2_get_file_names): Likewise.
3936 (dw2_map_symtabs_matching_filename): Update.
3937 (dw_expand_symtabs_matching_file_matcher): Update.
3938 (dw2_map_symbol_filenames): Update.
3939 (process_psymtab_comp_unit): Add per_objfile parameter.
3940 (build_type_psymtabs_1): Update.
3941 (process_skeletonless_type_unit): Update.
3942 (dwarf2_build_psymtabs_hard): Update.
3943 (load_partial_comp_unit): Add per_objfile parameter.
3944 (scan_partial_symbols): Update.
3945 (load_full_comp_unit): Add per_objfile parameter.
3946 (process_imported_unit_die): Update.
3947 (create_cus_hash_table): Update.
3948 (find_partial_die): Update.
3949 (dwarf2_read_addr_index): Update.
3950 (follow_die_offset): Update.
3951 (dwarf2_fetch_die_loc_sect_off): Update.
3952 (dwarf2_fetch_constant_bytes): Update.
3953 (dwarf2_fetch_die_type_sect_off): Update.
3954 (follow_die_sig_1): Update.
3955 (load_full_type_unit): Add per_objfile parameter.
3956 (read_signatured_type): Likewise.
3957
3958 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3959
3960 * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
3961 of objfile_name.
3962
3963 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3964
3965 * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
3966 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
3967 * dwarf2/read.c (dwarf2_per_bfd::dwarf2_per_bfd): Assign obfd
3968 field.
3969 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
3970 (create_cus_from_index): Update.
3971 (dwarf2_read_gdb_index): Update.
3972 (create_cus_from_debug_names): Update.
3973 (dwarf2_read_debug_names): Update.
3974 (get_abbrev_section_for_cu): Update.
3975 (create_all_comp_units): Update.
3976 (read_attribute_value): Update.
3977 (get_debug_line_section): Update.
3978 * dwarf2/index-cache.c (index_cache::store): Update.
3979 * dwarf2/index-write.c (save_gdb_index_command): Update.
3980 * dwarf2/macro.c (dwarf_decode_macro_bytes): Update.
3981
3982 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
3983
3984 * dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
3985 member.
3986 * dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
3987 dwarf2_per_cu_data::per_bfd.
3988 (dwarf2_per_bfd::allocate_signatured_type): Likewise.
3989 (create_type_unit_group): Likewise.
3990 (queue_comp_unit): Remove reference to
3991 per_cu->dwarf2_per_objfile.
3992 (maybe_queue_comp_unit): Likewise.
3993 (fill_in_sig_entry_from_dwo_entry): Assign new field.
3994 (create_cus_hash_table): Assign new field.
3995
3996 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
3997
3998 * dwarf2/read.c: Replace
3999 dwarf2_cu->per_cu->dwarf2_per_objfile references with
4000 dwarf2_cu->per_objfile throughout.
4001
4002 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4003
4004 * dwarf2/read.c (dw2_do_instantiate_symtab): Add per_objfile
4005 parameter, don't use per_cu->dwarf2_per_objfile.
4006 (dw2_instantiate_symtab): Likewise.
4007 (dw2_find_last_source_symtab): Update.
4008 (dw2_map_expand_apply): Update.
4009 (dw2_lookup_symbol): Update.
4010 (dw2_expand_symtabs_for_function): Update.
4011 (dw2_expand_all_symtabs): Update.
4012 (dw2_expand_symtabs_with_fullname): Update.
4013 (dw2_expand_symtabs_matching_one): Add per_objfile parameter,
4014 don't use per_cu->dwarf2_per_objfile.
4015 (dw2_expand_marked_cus): Update.
4016 (dw2_find_pc_sect_compunit_symtab): Update.
4017 (dw2_debug_names_lookup_symbol): Update.
4018 (dw2_debug_names_expand_symtabs_for_function): Update.
4019 (dw2_debug_names_map_matching_symbols): Update.
4020 (dwarf2_psymtab::expand_psymtab): Update.
4021
4022 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4023
4024 * dwarf2/read.c (struct dwarf2_cu) <dwarf2_cu>: Add parameter.
4025 <per_objfile>: New member.
4026 (class cutu_reader) <init_tu_and_read_dwo_dies>: Add parameter.
4027 (cutu_reader::init_tu_and_read_dwo_dies): Add parameter, update
4028 call to dwarf2_cu.
4029 (cutu_reader::cutu_reader): Update.
4030 (dwarf2_cu::dwarf2_cu): Add parameter, initialize per_objfile.
4031
4032 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4033
4034 * dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
4035 struct dwarf2_per_objfile.
4036 (struct dwarf2_per_objfile) <die_type_hash>: Move from struct
4037 dwarf2_per_bfd.
4038 * dwarf2/read.c (set_die_type): Update.
4039 (get_die_type_at_offset): Update.
4040
4041 2020-05-27 Tom Tromey <tom@tromey.com>
4042 Simon Marchi <simon.marchi@efficios.com>
4043
4044 * dwarf2/read.h (struct dwarf2_per_bfd) <num_psymtabs>: New
4045 method.
4046 (struct dwarf2_per_objfile) <resize_symtabs, symtab_set_p,
4047 get_symtab, set_symtab>: New methods.
4048 <m_symtabs>: New field.
4049 (struct dwarf2_psymtab): Derive from partial_symtab.
4050 <readin_p, get_compunit_symtab>: Declare methods.
4051 * dwarf2/read.c (dwarf2_per_objfile::symtab_set_p,
4052 dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
4053 New methods.
4054 (struct dwarf2_per_cu_quick_data) <compunit_symtab>: Remove.
4055 (dw2_do_instantiate_symtab, dw2_instantiate_symtab)
4056 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
4057 (dw2_symtab_iter_next, dw2_print_stats)
4058 (dw2_expand_symtabs_with_fullname)
4059 (dw2_expand_symtabs_matching_one)
4060 (dw_expand_symtabs_matching_file_matcher)
4061 (dw2_find_pc_sect_compunit_symtab, dw2_map_symbol_filenames)
4062 (dw2_debug_names_iterator::next)
4063 (dw2_debug_names_map_matching_symbols)
4064 (fill_in_sig_entry_from_dwo_entry, dwarf2_psymtab::read_symtab)
4065 (process_queue, dwarf2_psymtab::expand_psymtab): Update.
4066 (dwarf2_psymtab::readin_p, dwarf2_psymtab::get_compunit_symtab):
4067 New methods.
4068 (get_compunit_symtab, process_full_comp_unit)
4069 (process_full_type_unit): Update.
4070 (dwarf2_build_psymtabs, dwarf2_initialize_objfile, add_type_unit): Call
4071
4072 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4073
4074 * dwarf2/read.h (dwarf2_per_objfile): Rename to dwarf2_per_bfd,
4075 then introduce a new dwarf2_per_objfile type.
4076 <read_line_string>: Move to the new dwarf2_per_objfile type.
4077 <objfile>: Likewise.
4078 (dwarf2_per_bfd): Rename dwarf2_per_objfile to this.
4079 * dwarf2/read.c: Replace references to dwarf2_per_objfile with
4080 dwarf2_per_objfile->per_bfd.
4081 (dwarf2_per_objfile::dwarf2_per_objfile): Rename to...
4082 (dwarf2_per_bfd::dwarf2_per_bfd): ... this.
4083 (dwarf2_per_objfile::free_cached_comp_units): Rename to...
4084 (dwarf2_per_bfd::free_cached_comp_units): ... this.
4085 (dwarf2_has_info): Allocate dwarf2_per_bfd.
4086 (dwarf2_per_objfile::locate_sections): Rename to...
4087 (dwarf2_per_bfd::locate_sections): ... this.
4088 (dwarf2_per_objfile::get_cutu): Rename to...
4089 (dwarf2_per_bfd::get_cutu): ... this.
4090 (dwarf2_per_objfile::get_cu): Rename to...
4091 (dwarf2_per_bfd::get_cu): ... this.
4092 (dwarf2_per_objfile::get_tu): Rename to...
4093 (dwarf2_per_bfd::get_tu): ... this.
4094 (dwarf2_per_objfile::allocate_per_cu): Rename to...
4095 (dwarf2_per_bfd::allocate_per_cu): ... this.
4096 (dwarf2_per_objfile::allocate_signatured_type): Rename to...
4097 (dwarf2_per_bfd::allocate_signatured_type): ... this.
4098 (get_gdb_index_contents_ftype): Change parameter from
4099 dwarf2_per_objfile to dwarf2_per_bfd.
4100 * dwarf2/macro.c, dwarf2/index-write.c: Replace references to
4101 dwarf2_per_objfile with dwarf2_per_objfile->per_bfd.
4102
4103 2020-05-27 Tom Tromey <tom@tromey.com>
4104 Simon Marchi <simon.marchi@efficios.com>
4105
4106 * dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
4107 (allocate_piece_closure): Set "per_objfile" member.
4108 (dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
4109 (locexpr_describe_location, loclist_describe_location): Use new
4110 member.
4111 * dwarf2/read.c (read_call_site_scope)
4112 (mark_common_block_symbol_computed, attr_to_dynamic_prop)
4113 (dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
4114 (fill_in_loclist_baton, dwarf2_symbol_mark_computed,
4115 handle_data_member_location): Set per_objfile member.
4116 * dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
4117 member.
4118 (struct dwarf2_loclist_baton) <per_objfile>: New member.
4119
4120 2020-05-27 Tom Tromey <tom@tromey.com>
4121
4122 * dwarf2/read.h (struct dwarf2_per_objfile) <allocate_per_cu,
4123 allocate_signatured_type>: Declare new methods.
4124 <m_num_psymtabs>: New member.
4125 (struct dwarf2_per_cu_data) <index>: New member.
4126 * dwarf2/read.c (dwarf2_per_objfile::allocate_per_cu)
4127 (dwarf2_per_objfile::allocate_signatured_type): New methods.
4128 (create_cu_from_index_list): Use allocate_per_cu.
4129 (create_signatured_type_table_from_index)
4130 (create_signatured_type_table_from_debug_names)
4131 (create_debug_type_hash_table, add_type_unit)
4132 (read_comp_units_from_section): Use allocate_signatured_type.
4133
4134 2020-05-27 Tom Tromey <tom@tromey.com>
4135
4136 * psymtab.c (partial_map_expand_apply)
4137 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
4138 (psym_lookup_global_symbol_language)
4139 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
4140 (psym_print_stats, psym_expand_symtabs_for_function)
4141 (psym_map_symbol_filenames, psym_map_matching_symbols)
4142 (psym_expand_symtabs_matching)
4143 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
4144 (maintenance_check_psymtabs): Update.
4145 * psympriv.h (struct partial_symtab) <readin_p,
4146 get_compunit_symtab>: Add objfile parameter.
4147 (struct standard_psymtab) <readin_p, get_compunit_symtab>:
4148 Likewise.
4149 * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p,
4150 get_compunit_symtab>: Likewise.
4151 (dwarf2_psymtab::expand_psymtab): Pass objfile argument.
4152
4153 2020-05-27 Tom Tromey <tom@tromey.com>
4154
4155 * dwarf2/read.h (struct dwarf2_per_objfile) <obstack>: New
4156 member.
4157 * dwarf2/read.c (delete_file_name_entry): Fix comment.
4158 (create_cu_from_index_list)
4159 (create_signatured_type_table_from_index)
4160 (create_signatured_type_table_from_debug_names)
4161 (dw2_get_file_names_reader, dwarf2_initialize_objfile)
4162 (dwarf2_create_include_psymtab)
4163 (create_debug_type_hash_table, add_type_unit)
4164 (create_type_unit_group, read_comp_units_from_section)
4165 (dwarf2_compute_name, create_cus_hash_table)
4166 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
4167 (create_dwo_unit_in_dwp_v2, open_and_init_dwp_file): Use new
4168 obstack.
4169 (dw2_get_real_path): Likewise. Change argument to
4170 dwarf2_per_objfile.
4171
4172 2020-05-27 Luis Machado <luis.machado@linaro.org>
4173
4174 PR tdep/26000
4175 * arm-tdep.c (thumb_analyze_prologue): Fix instruction matching
4176 for ldrd (immediate).
4177
4178 2020-05-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4179
4180 * command.h: Add comment giving the name of class_tui.
4181 * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
4182 create the fake command for the help for class_tui.
4183
4184 2020-05-26 Tom Tromey <tromey@adacore.com>
4185
4186 * ada-lang.c (ada_print_array_index): Change type. Call val_atr.
4187 (ada_value_ptr_subscript): Don't call pos_atr on the lower bound.
4188 (val_atr): New function.
4189 (value_val_atr): Use it.
4190 * ada-valprint.c (print_optional_low_bound): Change low bound
4191 handling for enums.
4192 (val_print_packed_array_elements): Don't call discrete_position.
4193 * gdbtypes.c (get_discrete_bounds) <TYPE_CODE_RANGE>: Call
4194 discrete_position for enum types.
4195 * language.c (default_print_array_index): Change type.
4196 * language.h (struct language_defn) <la_print_array_index>: Add
4197 index_type parameter, change type of index_value.
4198 (LA_PRINT_ARRAY_INDEX): Add index_type parameter.
4199 (default_print_array_index): Update.
4200 * valprint.c (maybe_print_array_index): Don't call
4201 value_from_longest. Update.
4202 (value_print_array_elements): Don't call discrete_position.
4203
4204 2020-05-26 Tom Tromey <tromey@adacore.com>
4205
4206 * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE.
4207 * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE.
4208
4209 2020-05-25 Cristiano De Alti <cristiano_dealti@hotmail.com>
4210
4211 PR gdb/13519
4212 * avr-tdep.c (avr_integer_to_address): Return data or code
4213 address accordingly to the second 'type' argument of the
4214 function.
4215
4216 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
4217
4218 * infcmd.c, inferior.h: (construct_inferior_arguments):
4219 Moved function from here to gdbsupport/common-inferior.{h,cc}
4220
4221 2020-05-23 Tom Tromey <tom@tromey.com>
4222
4223 Revert commit eca1f90c:
4224 * NEWS: Remove entry for completion styling.
4225 * completer.c (_rl_completion_prefix_display_length): Move
4226 declaration later.
4227 (gdb_fnprint): Revert.
4228 (gdb_display_match_list_1): Likewise.
4229 * cli/cli-style.c (completion_prefix_style)
4230 (completion_difference_style, completion_suffix_style): Remove.
4231 (_initialize_cli_style): Revert.
4232 * cli/cli-style.h (completion_prefix_style)
4233 (completion_difference_style, completion_suffix_style): Don't
4234 declare.
4235
4236 2020-05-24 Pedro Alves <palves@redhat.com>
4237
4238 * symtab.c (completion_list_add_name): Return boolean indication
4239 of whether the symbol matched.
4240 (completion_list_add_symbol): Don't try to remove C++ aliases if
4241 the symbol didn't match in the first place.
4242 * symtab.h (completion_list_add_name): Return bool.
4243
4244 2020-05-23 Simon Marchi <simon.marchi@polymtl.ca>
4245
4246 * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
4247 type::field.
4248
4249 2020-05-23 Joel Brobecker <brobecker@adacore.com>
4250
4251 GDB 9.2 released.
4252
4253 2020-05-23 Tom Tromey <tom@tromey.com>
4254
4255 * NEWS: Add entry for completion styling.
4256 * completer.c (_rl_completion_prefix_display_length): Move
4257 declaration earlier.
4258 (gdb_fnprint): Use completion_style.
4259 (gdb_display_match_list_1): Likewise.
4260 * cli/cli-style.c (completion_prefix_style)
4261 (completion_difference_style, completion_suffix_style): New
4262 globals.
4263 (_initialize_cli_style): Register new globals.
4264 * cli/cli-style.h (completion_prefix_style)
4265 (completion_difference_style, completion_suffix_style): Declare.
4266
4267 2020-05-23 Pedro Alves <palves@redhat.com>
4268
4269 * utils.c: Include "gdbsupport/gdb-safe-ctype.h".
4270 (parse_escape): Use ISDIGIT instead of isdigit.
4271 (puts_debug): Use gdb_isprint instead of isprint.
4272 (fprintf_symbol_filtered): Use ISALNUM instead of isalnum.
4273 (cp_skip_operator_token, skip_ws, strncmp_iw_with_mode): Use
4274 ISSPACE instead of isspace.
4275 (strncmp_iw_with_mode): Use TOLOWER instead of tolower and ISSPACE
4276 instead of isspace.
4277 (strcmp_iw_ordered): Use ISSPACE instead of isspace.
4278 (string_to_core_addr): Use TOLOWER instead of tolower, ISXDIGIT
4279 instead of isxdigit and ISDIGIT instead of isdigit.
4280
4281 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4282
4283 * gdbtypes.h (struct type) <field>: New method.
4284 (TYPE_FIELDS): Remove, replace all uses with either type::fields
4285 or type::field.
4286
4287 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4288
4289 * gdbtypes.h (struct type) <fields, set_fields>: New methods.
4290 (TYPE_FIELDS): Use type::fields. Change all call sites that
4291 modify the propery to use type::set_fields instead.
4292
4293 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4294
4295 * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
4296 type::num_fields instead.
4297
4298 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4299
4300 * gdbtypes.h (struct type) <num_fields, set_num_fields>: New
4301 methods.
4302 (TYPE_NFIELDS): Use type::num_fields. Change all call sites
4303 that modify the number of fields to use type::set_num_fields
4304 instead.
4305
4306 2020-05-22 Tom Tromey <tromey@adacore.com>
4307
4308 * compile/compile-object-load.h (munmap_list_free): Don't
4309 declare.
4310
4311 2020-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
4312
4313 * annotate.c (annotate_source_line): Update return type, add call
4314 to update current symtab and line.
4315 * annotate.h (annotate_source_line): Update return type, and
4316 extend header comment.
4317 * source.c (info_line_command): Check annotation_level before
4318 calling annotate_source_line.
4319 * stack.c (print_frame_info): If calling annotate_source_line
4320 returns true, then don't print any other source line information.
4321
4322 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
4323
4324 * lm32-tdep.c (lm32_register_reggroup_p): Fix condition.
4325
4326 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
4327
4328 * coffread.c (patch_type): Remove NULL check before xfree.
4329 * corefile.c (set_gnutarget): Likewise.
4330 * cp-abi.c (set_cp_abi_as_auto_default): Likewise.
4331 * exec.c (build_section_table): Likewise.
4332 * remote.c (remote_target::pass_signals): Likewise.
4333 * utils.c (n_spaces): Likewise.
4334 * cli/cli-script.c (document_command): Likewise.
4335 * i386-windows-tdep.c (core_process_module_section): Likewise.
4336 * linux-fork.c (struct fork_info) <~fork_info>: Likewise.
4337
4338 2020-05-20 Simon Marchi <simon.marchi@efficios.com>
4339
4340 * symfile.c (reread_symbols): Clear objfile's section_offsets
4341 vector and section indices, re-compute them by calling
4342 sym_offsets.
4343
4344 2020-05-20 Tom Tromey <tromey@adacore.com>
4345
4346 * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove.
4347 (desc_one_bound, desc_index_type): Compute field name.
4348
4349 2020-05-20 Tom de Vries <tdevries@suse.de>
4350
4351 PR symtab/25833
4352 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index.
4353
4354 2020-05-20 Alan Modra <amodra@gmail.com>
4355
4356 PR 25993
4357 * solib-darwin.c (darwin_bfd_open): Don't strdup pathname for
4358 bfd_set_filename.
4359 * solib-aix.c (solib_aix_bfd_open): Use std::string for name
4360 passed to bfd_set_filename.
4361 * symfile-mem.c (add_vsyscall_page): Likewise for string
4362 passed to symbol_file_add_from_memory.
4363 (symbol_file_add_from_memory): Make name param a const char* and
4364 don't strdup.
4365
4366 2020-05-20 Alan Modra <amodra@gmail.com>
4367
4368 * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename
4369 rather than accessing bfd->filename directly.
4370 * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise,
4371 and use bfd_section_name.
4372 * dwarf2/frame.c (decode_frame_entry): Likewise.
4373 * exec.c (exec_set_section_address): Likewise.
4374 * solib-aix.c (solib_aix_bfd_open): Likewise.
4375 * stap-probe.c (get_stap_base_address): Likewise.
4376 * symfile.c (reread_symbols): Likewise.
4377
4378 2020-05-19 Tom Tromey <tromey@adacore.com>
4379
4380 * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
4381
4382 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4383
4384 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
4385
4386 2020-05-19 Pedro Alves <palves@redhat.com>
4387
4388 * NEWS (set exec-file-mismatch): Adjust entry.
4389 * exec.c: Include "build-id.h".
4390 (validate_exec_file): Try to match build IDs instead of filenames.
4391 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
4392 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
4393 and pass down 'warn_if_slow'.
4394 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
4395 gdb_bfd_open_closure to pass it down.
4396 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
4397
4398 2020-05-19 Pedro Alves <palves@redhat.com>
4399
4400 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
4401 * target.c (target_fileio_open_1): Rename to target_fileio_open
4402 and make extern. Use bool.
4403 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
4404 (target_fileio_read_alloc_1): Adjust.
4405 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
4406 (target_fileio_open_warn_if_slow): Delete declaration.
4407
4408 2020-05-19 Pedro Alves <palves@redhat.com>
4409
4410 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
4411 Adjust all callers.
4412
4413 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
4414
4415 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
4416 whether disp is negative.
4417
4418 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4419
4420 * symfile.h (struct symfile_segment_data)
4421 <~symfile_segment_data>: Remove.
4422 <segment_info>: Change to std::vector.
4423 * symfile.c (default_symfile_segments): Update.
4424 * elfread.c (elf_symfile_segments): Update.
4425
4426 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4427
4428 * symfile.h (struct symfile_segment_data) <struct segment>: New.
4429 <segments>: New.
4430 <segment_bases, segment_sizes>: Remove.
4431 * symfile.c (default_symfile_segments): Update.
4432 * elfread.c (elf_symfile_segments): Update.
4433 * remote.c (remote_target::get_offsets): Update.
4434 * solib-target.c (solib_target_relocate_section_addresses):
4435 Update.
4436
4437 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4438
4439 * symfile.h (struct symfile_segment_data): Initialize fields.
4440 <~symfile_segment_data>: Add.
4441 (symfile_segment_data_up): New.
4442 (struct sym_fns) <sym_segments>: Return a
4443 symfile_segment_data_up.
4444 (default_symfile_segments): Return a symfile_segment_data_up.
4445 (free_symfile_segment_data): Remove.
4446 (get_symfile_segment_data): Return a symfile_segment_data_up.
4447 * symfile.c (default_symfile_segments): Likewise.
4448 (get_symfile_segment_data): Likewise.
4449 (free_symfile_segment_data): Remove.
4450 (symfile_find_segment_sections): Update.
4451 * elfread.c (elf_symfile_segments): Return a
4452 symfile_segment_data_up.
4453 * remote.c (remote_target::get_offsets): Update.
4454 * solib-target.c (solib_target_relocate_section_addresses):
4455 Update.
4456 * symfile-debug.c (debug_sym_segments): Return a
4457 symfile_segment_data_up.
4458
4459 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4460
4461 PR build/25981
4462 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
4463 Hardcode register numbers.
4464
4465 PR build/25981
4466 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
4467 procfs_find_LDT_entry): Remove.
4468 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
4469 procfs_find_LDT_entry): Remove.
4470 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
4471 Remove.
4472
4473 2020-05-17 Pedro Alves <palves@redhat.com>
4474 Andrew Burgess <andrew.burgess@embecosm.com>
4475 Keno Fischer <keno@juliacomputing.com>
4476
4477 PR gdb/25741
4478 * breakpoint.c (build_target_condition_list): Update comments.
4479 (build_target_command_list): Update comments and skip matching
4480 locations.
4481 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
4482 a separate function. Simplify "set breakpoint auto-hw off"
4483 handling.
4484 (insert_breakpoints): Update comment.
4485 (tracepoint_locations_match): New parameter. For breakpoints,
4486 compare location types too, if the caller wants to.
4487 (handle_automatic_hardware_breakpoints): New functions.
4488 (bp_location_is_less_than): Also sort by location type and
4489 hardware breakpoint length.
4490 (update_global_location_list): Handle "set breakpoint auto-hw on"
4491 here.
4492 (update_breakpoint_locations): Ask breakpoint_locations_match to
4493 ignore location types.
4494
4495 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
4496
4497 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
4498 type::name instead.
4499
4500 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
4501
4502 * gdbtypes.h (struct type) <name, set_name>: New methods.
4503 (TYPE_CODE): Use type::name. Change all call sites used to set
4504 the name to use type::set_name instead.
4505
4506 2020-05-16 Tom Tromey <tom@tromey.com>
4507
4508 * top.c (quit_force): Update.
4509 * infrun.c (handle_no_resumed): Update.
4510 * top.h (all_uis): New function.
4511 (ALL_UIS): Remove.
4512
4513 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
4514
4515 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
4516
4517 2020-05-16 Pedro Alves <palves@redhat.com>
4518
4519 * ia64-linux-nat.c
4520 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
4521 Declare method.
4522 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
4523
4524 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
4525
4526 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
4527 (sparc64_adi_info): Likewise.
4528
4529 2020-05-15 Tom Tromey <tom@tromey.com>
4530
4531 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
4532 block_objfile.
4533 (lookup_objfile_from_block): Remove.
4534 (lookup_symbol_in_block, lookup_symbol_in_static_block)
4535 (lookup_global_symbol): Use block_objfile.
4536 * symtab.h (lookup_objfile_from_block): Don't declare.
4537 * printcmd.c (clear_dangling_display_expressions): Use
4538 block_objfile.
4539 * parse.c (operator_check_standard): Use block_objfile.
4540
4541 2020-05-15 Tom Tromey <tom@tromey.com>
4542
4543 * language.c (language_alloc_type_symbol): Set
4544 SYMBOL_SECTION.
4545 * symtab.c (initialize_objfile_symbol): Remove.
4546 (allocate_symbol): Remove.
4547 (allocate_template_symbol): Remove.
4548 * dwarf2/read.c (fixup_go_packaging): Use "new".
4549 (new_symbol): Use "new".
4550 (read_variable): Don't call initialize_objfile_symbol. Use
4551 "new".
4552 (read_func_scope): Use "new".
4553 * xcoffread.c (process_xcoff_symbol): Don't call
4554 initialize_objfile_symbol.
4555 (SYMBOL_DUP): Remove.
4556 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
4557 "new".
4558 * symtab.h (allocate_symbol, initialize_objfile_symbol)
4559 (allocate_template_symbol): Don't declare.
4560 (struct symbol): Add copy constructor. Change defaults.
4561 * jit.c (finalize_symtab): Use "new".
4562 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
4563 Use "new".
4564 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
4565 (common_block_end): Use "new".
4566 * mdebugread.c (parse_symbol): Use "new".
4567 (new_symbol): Likewise.
4568
4569 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4570
4571 * NEWS: Mention changes to help and apropos.
4572
4573 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4574
4575 * command.h (enum command_class): Improve comments, document
4576 that class_alias is for user-defined aliases, give the class
4577 name for each class, remove unused class_xdb.
4578 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
4579 * breakpoint.c (_initialize_breakpoint): Replace class_alias
4580 by a precise class.
4581 * infcmd.c (_initialize_infcmd): Likewise.
4582 * reverse.c (_initialize_reverse): Likewise.
4583 * stack.c (_initialize_stack): Likewise.
4584 * symfile.c (_initialize_symfile): Likewise.
4585 * tracepoint.c (_initialize_tracepoint): Likewise.
4586
4587 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4588
4589 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
4590 when their aliased command is traversed.
4591 (help_cmd): Add fput_command_names_styled call to
4592 output command name and aliases when command has an alias.
4593
4594 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4595
4596 * cli/cli-decode.h (help_cmd_list): Remove declaration.
4597 * cli/cli-decode.c (help_cmd_list): Declare as static,
4598 remove prefix argument, use bool for recurse arg, rework to show the aliases of
4599 a command together with the command.
4600 (fput_command_name_styled, fput_command_names_styled): New functions.
4601 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
4602 fput_command_name_styled.
4603 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
4604 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
4605
4606 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4607
4608 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
4609 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
4610 * command.h (cmd_show_list): Likewise.
4611 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
4612 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
4613
4614 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4615
4616 * unittests/command-def-selftests.c (traverse_command_structure):
4617 Verify all commands of a list have the same prefix command and
4618 that only the top cmdlist commands have a null prefix.
4619
4620 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4621
4622 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
4623 as prefix, not one of its aliases.
4624 (set_cmd_prefix): Remove.
4625 (do_add_cmd): Centralize the setting of the prefix of a command, when
4626 command is defined after its full chain of prefix commands.
4627 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
4628 (add_setshow_cmd_full): Likewise.
4629 (update_prefix_field_of_prefixed_commands): New function.
4630 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
4631 update_prefix_field_of_prefixed_commands.
4632 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
4633 addresses of remote_set_cmdlist and remote_show_cmdlist given
4634 as argument, not the address of an argument.
4635 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
4636 * gdb/remote.c (_initialize_remote): Likewise.
4637
4638 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4639
4640 * cli/cli-cmds.c (alias_command): Check for an existing alias
4641 using lookup_cmd_composition, as valid_command_p is too strict
4642 and forbids aliases that are the prefix of an existing alias
4643 or command.
4644 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
4645 command is properly recognised as a valid command.
4646
4647 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4648
4649 * unittests/help-doc-selftests.c: Rename to
4650 unittests/command-def-selftests.c
4651 * unittests/command-def-selftests.c (help_doc_tests): Update some
4652 comments.
4653 (command_structure_tests, traverse_command_structure): New namespace
4654 and function.
4655 (command_structure_invariants_tests): New function.
4656 (_initialize_command_def_selftests) Renamed from
4657 _initialize_help_doc_selftests, register command_structure_invariants
4658 selftest.
4659
4660 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4661
4662 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
4663 an alias of 'show'.
4664
4665 2020-05-15 Joel Brobecker <brobecker@adacore.com>
4666
4667 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
4668 ada_is_fixed_point_type. Update all callers.
4669 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
4670 all callers.
4671 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
4672 Update all callers.
4673 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
4674 print_fixed_point_type. Update all callers.
4675 * ada-valprint.c (ada_value_print_num): Replace call to
4676 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
4677
4678 2020-05-14 Kevin Buettner <kevinb@redhat.com>
4679
4680 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
4681 processors.
4682 (cpu_supports_bts): Add CV_AMD case.
4683
4684 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
4685 Simon Marchi <simon.marchi@efficios.com>
4686
4687 * infrun.c (stop_all_threads): Collect multiple wait events at
4688 each pass.
4689
4690 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
4691
4692 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
4693 type::code instead.
4694
4695 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
4696
4697 * gdbtypes.h (struct type) <code, set_code>: New methods.
4698 (TYPE_CODE): Use type::code. Change all call sites used to set
4699 the code to use type::set_code instead.
4700
4701 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4702 Tom de Vries <tdevries@suse.de>
4703 Pedro Alves <palves@redhat.com>
4704
4705 PR threads/25478
4706 * infrun.c (stop_all_threads): Do NOT ignore
4707 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
4708 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
4709 received.
4710 (handle_no_resumed): Remove code handling a live inferior with no
4711 threads.
4712 * remote.c (has_single_non_exited_thread): New.
4713 (remote_target::update_thread_list): Do not delete a thread if is
4714 the last thread of the process.
4715 * thread.c (thread_select): Call delete_exited_threads instead of
4716 prune_threads.
4717
4718 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4719
4720 * infrun.c (stop_all_threads): Enable/disable thread events of all
4721 targets. Move a debug message denoting the end of the function
4722 into the SCOPED_EXIT block.
4723
4724 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4725
4726 * process-stratum-target.h: Include <set>.
4727 (all_non_exited_process_targets, switch_to_target_no_thread): New
4728 function declarations.
4729 * process-stratum-target.c (all_non_exited_process_targets)
4730 (switch_to_target_no_thread): New function implementations.
4731
4732 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4733
4734 * infrun.c (handle_inferior_event): Extract out a piece of code
4735 into...
4736 (mark_non_executing_threads): ...this new function.
4737
4738 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4739
4740 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
4741 use.
4742
4743 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4744
4745 * regcache.c (regcache_read_pc_protected): New function
4746 implementation that returns 0 if the PC cannot read via
4747 'regcache_read_pc'.
4748 * infrun.c (proceed): Call 'regcache_read_pc_protected'
4749 instead of 'regcache_read_pc'.
4750 (keep_going_pass_signal): Ditto.
4751
4752 2020-05-13 Tom Tromey <tromey@adacore.com>
4753
4754 * ada-lang.c (align_value): Remove.
4755 (ada_template_to_fixed_record_type_1): Use align_up.
4756
4757 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4758
4759 * async-event.c: Update the copyright year.
4760 * async-event.h: Update the copyright year.
4761
4762 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
4763
4764 * objfiles.h (is_addr_in_objfile,
4765 shared_objfile_contains_address_p): Return bool.
4766 * objfile.c (is_addr_in_objfile,
4767 shared_objfile_contains_address_p): Return bool.
4768
4769 2020-05-11 Tom Tromey <tromey@adacore.com>
4770
4771 * cli/cli-cmds.c (info_command): Restore.
4772 (_initialize_cli_cmds): Use add_prefix_command for "info".
4773 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
4774
4775 2020-05-11 Tom Tromey <tromey@adacore.com>
4776
4777 * ada-lang.c (ada_value_primitive_field): Now public.
4778 * ada-lang.h (ada_value_primitive_field): Declare.
4779 * ada-valprint.c (print_field_values): Use
4780 ada_value_primitive_field for wrapper fields.
4781
4782 2020-05-11 Tom de Vries <tdevries@suse.de>
4783
4784 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
4785 MODULE_DOMAIN.
4786
4787 2020-05-11 Tom de Vries <tdevries@suse.de>
4788
4789 PR symtab/25941
4790 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
4791 with length 0, if not gdb-produced.
4792 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
4793
4794 2020-05-09 Tom de Vries <tdevries@suse.de>
4795
4796 PR gdb/25955
4797 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
4798 calculation.
4799
4800 2020-05-09 Tom Tromey <tom@tromey.com>
4801
4802 * top.c (server_command): Now bool.
4803 * top.h (server_command): Now bool.
4804
4805 2020-05-08 Tom Tromey <tromey@adacore.com>
4806
4807 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
4808 already being processed.
4809
4810 2020-05-08 Tom Tromey <tom@tromey.com>
4811
4812 * printcmd.c (struct display) <next>: Remove.
4813 <display>: New constructor.
4814 <exp_string>: Now a std::string.
4815 <enabled_p>: Now a bool.
4816 (display_number): Move definition earlier.
4817 (displays): Rename from display_chain. Now a std::vector.
4818 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
4819 (display_command): Update.
4820 (do_one_display, disable_display)
4821 (enable_disable_display_command, do_enable_disable_display):
4822 Update.
4823 (free_display): Remove.
4824 (clear_displays): Rewrite.
4825 (delete_display): Update.
4826 (map_display_numbers): Use function_view. Remove "data"
4827 parameter. Update.
4828 (do_delete_display): Remove.
4829 (undisplay_command): Update.
4830 (do_one_display, do_displays, disable_display)
4831 (info_display_command): Update.
4832 (do_enable_disable_display): Remove.
4833 (enable_disable_display_command)
4834 (clear_dangling_display_expressions): Update.
4835
4836 2020-05-08 Tom Tromey <tom@tromey.com>
4837
4838 * symtab.c (set_symbol_cache_size)
4839 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
4840 (maintenance_print_symbol_cache_statistics): Update.
4841 * symmisc.c (print_symbol_bcache_statistics)
4842 (print_objfile_statistics, maintenance_print_objfiles)
4843 (maintenance_info_symtabs, maintenance_check_symtabs)
4844 (maintenance_expand_symtabs, maintenance_info_line_tables):
4845 Update.
4846 * symfile-debug.c (set_debug_symfile): Update.
4847 * source.c (forget_cached_source_info): Update.
4848 * python/python.c (gdbpy_progspaces): Update.
4849 * psymtab.c (maintenance_info_psymtabs): Update.
4850 * probe.c (parse_probes): Update.
4851 * linespec.c (iterate_over_all_matching_symtabs)
4852 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
4853 * guile/scm-progspace.c (gdbscm_progspaces): Update.
4854 * exec.c (exec_target::close): Update.
4855 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
4856 * breakpoint.c (print_one_breakpoint_location)
4857 (create_longjmp_master_breakpoint)
4858 (create_std_terminate_master_breakpoint): Update.
4859 * progspace.c (program_spaces): Now a std::vector.
4860 (maybe_new_address_space): Update.
4861 (add_program_space): Remove.
4862 (program_space::program_space): Update.
4863 (remove_program_space): Update.
4864 (number_of_program_spaces): Remove.
4865 (print_program_space, update_address_spaces): Update.
4866 * progspace.h (program_spaces): Change type.
4867 (ALL_PSPACES): Remove.
4868 (number_of_program_spaces): Don't declare.
4869 (struct program_space) <next>: Remove.
4870
4871 2020-05-08 Tom Tromey <tom@tromey.com>
4872
4873 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
4874 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
4875 (enable_break): Update.
4876 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
4877 (frv_fdpic_find_canonical_descriptor): Update.
4878 (frv_fetch_objfile_link_map): Update.
4879 * progspace.c (program_space::free_all_objfiles): Update.
4880 (program_space::solibs): New method.
4881 * progspace.h (struct program_space) <solibs>: New method.
4882 * solist.h (master_so_list): Don't declare.
4883 (ALL_SO_LIBS): Remove.
4884 * solib.h (so_list_head): Remove.
4885 (update_solib_list): Update comment.
4886 * solib.c (master_so_list): Remove.
4887 (solib_used, update_solib_list, solib_add)
4888 (info_sharedlibrary_command, clear_solib)
4889 (reload_shared_libraries_1, remove_user_added_objfile): Update.
4890
4891 2020-05-08 Tom Tromey <tom@tromey.com>
4892
4893 * extension.c (extension_languages): Now a std::array.
4894 (ALL_EXTENSION_LANGUAGES): Remove.
4895 (get_ext_lang_defn, get_ext_lang_of_file)
4896 (eval_ext_lang_from_control_command): Update.
4897 (finish_ext_lang_initialization)
4898 (auto_load_ext_lang_scripts_for_objfile)
4899 (ext_lang_type_printers::ext_lang_type_printers)
4900 (apply_ext_lang_type_printers)
4901 (ext_lang_type_printers::~ext_lang_type_printers)
4902 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
4903 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
4904 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
4905 (get_matching_xmethod_workers, ext_lang_colorize)
4906 (ext_lang_before_prompt): Update.
4907 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
4908
4909 2020-05-08 Tom Tromey <tom@tromey.com>
4910
4911 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
4912 overload.
4913 <swap_string, m_string>: Remove.
4914 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
4915 Update.
4916 * stabsread.c (define_symbol, read_type): Update.
4917 * linespec.c (find_linespec_symbols): Update.
4918 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
4919 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
4920 * dbxread.c (read_dbx_symtab): Update.
4921 * cp-support.h (cp_canonicalize_string_full)
4922 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
4923 Return unique_xmalloc_ptr.
4924 * cp-support.c (inspect_type): Update.
4925 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
4926 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
4927 Likewise.
4928 * c-typeprint.c (print_name_maybe_canonical): Update.
4929 * break-catch-throw.c (check_status_exception_catchpoint):
4930 Update.
4931
4932 2020-05-08 Tom de Vries <tdevries@suse.de>
4933
4934 * infrun.c (follow_fork): Copy current_line and current_symtab to
4935 child thread.
4936
4937 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4938
4939 * async-event.c (struct async_signal_handler, struct
4940 async_event_handler): Reformat, remove typedef.
4941
4942 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4943
4944 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
4945 access thistype->main_type->dyn_prop_list directly.
4946
4947 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4948
4949 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
4950 (remove_dyn_prop): Remove. Update all users to use
4951 type::remove_dyn_prop.
4952 * gdbtypes.c (remove_dyn_prop): Rename to...
4953 (type::remove_dyn_prop): ... this.
4954
4955 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
4956
4957 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
4958 (add_dyn_prop): Remove. Update all users to use
4959 type::add_dyn_prop.
4960 * gdbtypes.c (add_dyn_prop): Rename to...
4961 (type::add_dyn_prop): ... this.
4962
4963 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
4964
4965 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
4966 (get_dyn_prop): Remove. Update all users to use
4967 type::dyn_prop.
4968 * gdbtypes.c (get_dyn_prop): Rename to...
4969 (type::dyn_prop): ... this.
4970
4971 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
4972
4973 * gdbtypes.h (struct main_type) <flag_static>: Remove.
4974
4975 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
4976
4977 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
4978 instruction, skip it if it's there.
4979
4980 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
4981
4982 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
4983
4984 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
4985
4986 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
4987 * gdbtypes.c (recursive_dump_type): Remove use of
4988 TYPE_INCOMPLETE.
4989
4990 2020-05-03 Tom Tromey <tom@tromey.com>
4991
4992 * breakpoint.c (catch_command, tcatch_command): Remove.
4993 (_initialize_breakpoint): Use add_basic_prefix_cmd,
4994 add_show_prefix_cmd.
4995 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
4996 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4997 Remove.
4998 (add_internal_problem_command): Use add_basic_prefix_cmd,
4999 add_show_prefix_cmd.
5000 * mips-tdep.c (set_mipsfpu_command): Remove.
5001 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
5002 * dwarf2/index-cache.c (set_index_cache_command): Remove.
5003 (_initialize_index_cache): Use add_basic_prefix_cmd.
5004 * memattr.c (dummy_cmd): Remove.
5005 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
5006 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
5007 (_initialize_tui_win): Use add_basic_prefix_cmd,
5008 add_show_prefix_cmd.
5009 * cli/cli-logging.c (set_logging_command): Remove.
5010 (_initialize_cli_logging): Use add_basic_prefix_cmd,
5011 add_show_prefix_cmd.
5012 (show_logging_command): Remove.
5013 * target.c (target_command): Remove.
5014 (add_target): Use add_basic_prefix_cmd.
5015
5016 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
5017
5018 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
5019
5020 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5021
5022 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
5023 info_command.
5024
5025 2020-04-30 Kamil Rytarowski <n54@gmx.com>
5026
5027 * nbsd-nat.c (nbsd_enable_proc_events)
5028 (nbsd_nat_target::post_startup_inferior): Add.
5029 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
5030 (nbsd_nat_target::update_thread_list): Rewrite.
5031 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
5032 "PTRACE_LWP_CREATE".
5033 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
5034
5035 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5036
5037 * stack.c (_initialize_stack): Remove duplicated creation
5038 of "frame" command and "f" alias.
5039
5040 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
5041
5042 PR gdb/18706
5043 * gdbtypes.c (check_typedef): Calculate size of array of
5044 stubbed type.
5045
5046 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
5047
5048 PR gdb/15559
5049 * i386-tdep.c (i386_push_dummy_call): Call
5050 i386_thiscall_push_dummy_call.
5051 (i386_thiscall_push_dummy_call): New function.
5052 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
5053 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
5054 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
5055
5056 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5057
5058 * gdbarch.sh (do_read): Add shellcheck disable directive for
5059 warning SC2162.
5060
5061 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5062
5063 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
5064 "referenced but not assigned" warning.
5065
5066 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5067
5068 * gdbarch.sh: Remove code that sets fallbackdefault.
5069
5070 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5071
5072 * gdbarch.sh: Use shell operators && and || instead of
5073 -a and -o.
5074
5075 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5076
5077 * gdbarch.sh: Use $(...) instead of `...`.
5078
5079 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5080
5081 * gdbarch.sh: Use double quotes around variables.
5082
5083 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5084
5085 * gdbarch.sh: Use %s with printf, instead of variables in the
5086 format string.
5087
5088 2020-04-29 Tom Tromey <tromey@adacore.com>
5089
5090 PR ada/25875:
5091 * dwarf2/read.c (update_enumeration_type_from_children): Compute
5092 type fields here.
5093 (read_enumeration_type): Call
5094 update_enumeration_type_from_children later. Update comments.
5095 (process_enumeration_scope): Don't create type fields.
5096
5097 2020-04-29 Kamil Rytarowski <n54@gmx.com>
5098
5099 * nbsd-tdep.c: Include "xml-syscall.h".
5100 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
5101
5102 2020-04-29 Kamil Rytarowski <n54@gmx.com>
5103
5104 * nbsd-nat.c: Include "sys/wait.h".
5105 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
5106 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
5107 (nbsd_nat_target::remove_exec_catchpoint)
5108 (nbsd_nat_target::set_syscall_catchpoint): Add.
5109 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
5110 (nbsd_nat_target::insert_exec_catchpoint)
5111 (nbsd_nat_target::remove_exec_catchpoint)
5112 (nbsd_nat_target::set_syscall_catchpoint): Add.
5113 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
5114 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
5115 `nbsd_get_syscall_number'.
5116
5117 2020-04-29 Tom Tromey <tom@tromey.com>
5118
5119 * stack.c (print_block_frame_labels): Remove.
5120
5121 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
5122
5123 PR gdb/17320
5124 * ada-valprint.c (val_print_packed_array_elements): Move array
5125 end bracket to new line.
5126 (ada_val_print_string): Remove extra spaces before first array
5127 element.
5128 * c-valprint.c (c_value_print_array): Likewise.
5129 * m2-valprint.c (m2_print_array_contents): Likewise.
5130 (m2_value_print_inner): Likewise.
5131 * p-valprint.c (pascal_value_print_inner): Likewise.
5132 * valprint.c (generic_val_print_array): Likewise.
5133 (value_print_array_elements): Move first array element and array
5134 end bracket to new line.
5135
5136 2020-04-29 Tom de Vries <tdevries@suse.de>
5137
5138 PR symtab/25889
5139 * linespec.c (find_method): Fix ix calculation.
5140
5141 2020-04-28 Kamil Rytarowski <n54@gmx.com>
5142
5143 * syscalls/update-netbsd.sh: New file.
5144 * syscalls/netbsd.xml: Regenerate.
5145 * data-directory/Makefile.in: Register `netbsd.xml' in
5146 `SYSCALLS_FILES'.
5147
5148 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
5149
5150 * syscalls/update-freebsd.sh: Add double quotes.
5151
5152 2020-04-28 Tom Tromey <tom@tromey.com>
5153
5154 * NEWS: Update.
5155 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
5156 (cmdpy_init): Allow class_tui.
5157
5158 2020-04-28 Mark Williams <mark@myosotissp.com>
5159
5160 PR gdb/24480
5161 * dwarf2read.c: Add missing assingments to list_in_scope when
5162 start_symtab was already called.
5163
5164 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
5165
5166 PR gdb/25881
5167 * dwarf2/read.c (offset_map_type): Use
5168 gdb:hash_enum<sect_offset> as hash function.
5169
5170 2020-04-28 Tom de Vries <tdevries@suse.de>
5171
5172 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
5173 with DW_AT_signature.
5174
5175 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
5176
5177 * configure.ac: Remove check for fs_base/gs_base in
5178 user_regs_struct.
5179 * configure: Re-generate.
5180 * config.in: Re-generate.
5181 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
5182 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
5183 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
5184
5185 2020-04-27 Luis Machado <luis.machado@linaro.org>
5186
5187 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
5188 problematic inline frame unwinding situation.
5189 * frame.c (frame_id_computed_p): New function.
5190 * frame.h (frame_id_computed_p): New prototype.
5191
5192 2020-04-26 Tom Tromey <tom@tromey.com>
5193
5194 * command.h (enum command_class) <class_pseudo>: Remove.
5195
5196 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5197
5198 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
5199 and whitespace.
5200
5201 2020-04-25 Kamil Rytarowski <n54@gmx.com>
5202
5203 * inf-ptrace.c (inf_ptrace_target::wait): Remove
5204 `PT_GET_PROCESS_STATE' block.
5205
5206 2020-04-24 Tom Tromey <tom@tromey.com>
5207
5208 * symtab.h (symbol_get_demangled_name): Don't declare.
5209 * symtab.c (symbol_get_demangled_name): Remove.
5210 (general_symbol_info::natural_name)
5211 (general_symbol_info::demangled_name): Update.
5212
5213 2020-04-24 Tom Tromey <tom@tromey.com>
5214
5215 PR rust/25025:
5216 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
5217
5218 2020-04-24 Tom Tromey <tom@tromey.com>
5219
5220 PR symtab/12707:
5221 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
5222 exists.
5223 (new_symbol): Likewise.
5224 * compile/compile-object-load.c (get_out_value_type): Use
5225 symbol_matches_search_name.
5226
5227 2020-04-24 Tom Tromey <tom@tromey.com>
5228
5229 * dwarf2/read.c (add_partial_symbol): Do not call
5230 compute_and_set_names.
5231
5232 2020-04-24 Tom Tromey <tom@tromey.com>
5233
5234 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
5235 overload.
5236
5237 2020-04-24 Tom Tromey <tom@tromey.com>
5238
5239 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
5240 (add_psymbol_to_list): New overload. Make old overload call new
5241 one.
5242 * psympriv.h (add_psymbol_to_list): New overload.
5243
5244 2020-04-24 Tom Tromey <tom@tromey.com>
5245
5246 * dwarf2/read.c (partial_die_info::read) <case
5247 DW_AT_linkage_name>: Use value_as_string.
5248 (dwarf2_string_attr): Use value_as_string.
5249 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
5250 method.
5251 * dwarf2/attribute.c (attribute::value_as_string): New method.
5252
5253 2020-04-24 Tom Tromey <tom@tromey.com>
5254
5255 * symtab.c (general_symbol_info::natural_name)
5256 (general_symbol_info::demangled_name): Check for language_rust.
5257
5258 2020-04-24 Tom Tromey <tom@tromey.com>
5259
5260 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
5261 (dwarf2_physname): ... from here.
5262 (partial_die_info::read): Add Rust "{" hack.
5263
5264 2020-04-24 Tom Tromey <tom@tromey.com>
5265
5266 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
5267 method.
5268 (symbol_set_demangled_name): Don't declare.
5269 * symtab.c (general_symbol_info::set_demangled_name): Rename from
5270 symbol_set_demangled_name.
5271 (general_symbol_info::set_language)
5272 (general_symbol_info::compute_and_set_names): Update.
5273 * minsyms.c (minimal_symbol_reader::install): Update.
5274 * dwarf2/read.c (new_symbol): Update.
5275
5276 2020-04-24 Tom Tromey <tromey@adacore.com>
5277
5278 PR python/23662:
5279 * python/py-type.c (convert_field): Handle
5280 FIELD_LOC_KIND_DWARF_BLOCK.
5281 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
5282 (typy_get_dynamic): Nw function.
5283 (type_object_getset): Add "dynamic".
5284 * NEWS: Add entry.
5285
5286 2020-04-24 Tom Tromey <tromey@adacore.com>
5287
5288 * ada-typeprint.c (print_choices, print_variant_part)
5289 (print_record_field_types_dynamic): New functions.
5290 (print_record_field_types): Use print_record_field_types_dynamic.
5291
5292 2020-04-24 Tom Tromey <tromey@adacore.com>
5293
5294 * dwarf2/read.c (handle_data_member_location): New overload.
5295 (dwarf2_add_field): Use it.
5296 (decode_locdesc): Add "computed" parameter. Update comment.
5297 * gdbtypes.c (is_dynamic_type_internal): Also look for
5298 FIELD_LOC_KIND_DWARF_BLOCK.
5299 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
5300 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
5301 virtual base classes.
5302 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
5303 FIELD_LOC_KIND_DWARF_BLOCK.
5304
5305 2020-04-24 Tom Tromey <tromey@adacore.com>
5306
5307 * dwarf2/read.c (read_structure_type): Handle dynamic length.
5308 * gdbtypes.c (is_dynamic_type_internal): Check
5309 TYPE_HAS_DYNAMIC_LENGTH.
5310 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
5311 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
5312 New macros.
5313 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
5314 constant.
5315
5316 2020-04-24 Tom Tromey <tromey@adacore.com>
5317
5318 * dwarf2/read.c (struct variant_field): Rewrite.
5319 (struct variant_part_builder): New.
5320 (struct nextfield): Remove "variant" field. Add "offset".
5321 (struct field_info): Add "current_variant_part" and
5322 "variant_parts".
5323 (alloc_discriminant_info): Remove.
5324 (alloc_rust_variant): New function.
5325 (quirk_rust_enum): Update.
5326 (dwarf2_add_field): Set "offset" member. Don't handle
5327 DW_TAG_variant_part.
5328 (offset_map_type): New typedef.
5329 (convert_variant_range, create_one_variant)
5330 (create_one_variant_part, create_variant_parts)
5331 (add_variant_property): New functions.
5332 (dwarf2_attach_fields_to_type): Call add_variant_property.
5333 (read_structure_type): Don't handle DW_TAG_variant_part.
5334 (handle_variant_part, handle_variant): New functions.
5335 (handle_struct_member_die): Use them.
5336 (process_structure_scope): Don't handle variant parts.
5337 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
5338 (struct discriminant_info): Remove.
5339 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
5340 (struct main_type) <flag_discriminated_union>: Remove.
5341 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
5342 (rust_enum_variant): Return int. Remove "contents". Rewrite.
5343 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
5344 Update.
5345 * valops.c (value_union_variant): Remove.
5346 * value.h (value_union_variant): Don't declare.
5347
5348 2020-04-24 Tom Tromey <tromey@adacore.com>
5349
5350 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
5351 (ada_value_primitive_packed_val): Update.
5352 * ada-valprint.c (ada_value_print_1): Update.
5353 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
5354 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
5355 just an address. Use evaluate_for_locexpr_baton.
5356 (dwarf2_evaluate_property): Update.
5357 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
5358 array_view.
5359 * findvar.c (default_read_var_value): Update.
5360 * gdbtypes.c (compute_variant_fields_inner)
5361 (resolve_dynamic_type_internal): Update.
5362 (resolve_dynamic_type): Change type of valaddr parameter.
5363 * gdbtypes.h (resolve_dynamic_type): Update.
5364 * valarith.c (value_subscripted_rvalue): Update.
5365 * value.c (value_from_contents_and_address): Update.
5366
5367 2020-04-24 Tom Tromey <tromey@adacore.com>
5368
5369 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
5370 "push_initial_value" parameter.
5371 (dwarf2_evaluate_property): Likewise.
5372 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
5373
5374 2020-04-24 Tom Tromey <tromey@adacore.com>
5375
5376 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
5377 (variant::matches, compute_variant_fields_recurse)
5378 (compute_variant_fields_inner, compute_variant_fields): New
5379 functions.
5380 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
5381 Use resolved_type after type is made.
5382 (operator==): Add new cases.
5383 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
5384 (struct discriminant_range, struct variant, struct variant_part):
5385 New.
5386 (union dynamic_prop_data) <variant_parts, original_type>: New
5387 members.
5388 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
5389 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
5390 constants.
5391 * value.c (unpack_bits_as_long): Now public.
5392 * value.h (unpack_bits_as_long): Declare.
5393
5394 2020-04-24 Tom Tromey <tromey@adacore.com>
5395
5396 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
5397 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
5398
5399 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
5400
5401 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
5402
5403 2020-04-24 Kamil Rytarowski <n54@gmx.com>
5404
5405 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
5406 (remove_fork_catchpoint, post_startup_inferior)
5407 (post_attach): Move...
5408 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
5409 (remove_fork_catchpoint, post_startup_inferior)
5410 (post_attach): ...here.
5411 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
5412 (remove_fork_catchpoint, post_startup_inferior)
5413 (post_attach): Move...
5414 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
5415 (remove_fork_catchpoint, post_startup_inferior)
5416 (post_attach): ...here.
5417
5418 2020-04-24 Tom Tromey <tromey@adacore.com>
5419
5420 * nat/windows-nat.h (struct windows_thread_info)
5421 <pc_adjusted>: New member.
5422 * windows-nat.c (windows_fetch_one_register): Check
5423 pc_adjusted.
5424 (windows_nat_target::get_windows_debug_event)
5425 (windows_nat_target::wait): Set pc_adjusted.
5426
5427 2020-04-24 Tom de Vries <tdevries@suse.de>
5428
5429 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
5430 Run gdb-add-index inside temp dir.
5431
5432 2020-04-23 Tom Tromey <tromey@adacore.com>
5433
5434 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
5435 in loop.
5436
5437 2020-04-23 Luis Machado <luis.machado@linaro.org>
5438
5439 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
5440 get_frame_register instead of gdbarch_unwind_pc.
5441
5442 2020-04-23 Tom de Vries <tdevries@suse.de>
5443
5444 * symtab.c (lookup_global_symbol): Prefer def over decl.
5445
5446 2020-04-23 Tom de Vries <tdevries@suse.de>
5447
5448 PR symtab/25807
5449 * block.c (best_symbol, better_symbol): Promote to external.
5450 * block.h (best_symbol, better_symbol): Declare.
5451 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
5452 decl.
5453
5454 2020-04-23 Tom Tromey <tromey@adacore.com>
5455
5456 PR ada/25837:
5457 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
5458 "const char *", not a "const std::string &".
5459 <name_and_matcher::operator==>: Update.
5460 * unittests/lookup_name_info-selftests.c: Change type of
5461 "result".
5462
5463 2020-04-23 Tom Tromey <tom@tromey.com>
5464
5465 * inferior.h (iterate_over_inferiors): Don't declare.
5466 * inferior.c (iterate_over_inferiors): Remove.
5467 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
5468 Remove.
5469 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
5470 use iterate_over_inferiors.
5471 (darwin_resume_inferior_it)
5472 (struct resume_inferior_threads_param)
5473 (darwin_resume_inferior_threads_it): Remove.
5474 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
5475
5476 2020-04-23 Tom de Vries <tdevries@suse.de>
5477
5478 * blockframe.c (find_pc_partial_function): Use
5479 find_pc_sect_compunit_symtab rather than
5480 objfile->sf->qf->find_pc_sect_compunit_symtab.
5481
5482 2020-04-22 Tom de Vries <tdevries@suse.de>
5483
5484 PR symtab/25764
5485 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
5486 in psymtabs.
5487
5488 2020-04-22 Tom de Vries <tdevries@suse.de>
5489
5490 PR symtab/25801
5491 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
5492 symtabs.
5493
5494 2020-04-22 Tom de Vries <tdevries@suse.de>
5495
5496 PR symtab/25700
5497 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
5498 CU if already created.
5499
5500 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5501
5502 * infrun.c (displaced_step_fixup): Switch to the event_thread
5503 before calling displaced_step_restore, not after.
5504
5505 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
5506
5507 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
5508 its inferior is not recorded by us.
5509 (record_btrace_target_open): Replace call to
5510 all_non_exited_threads () with call to current_inferior
5511 ()->non_exited_threads ().
5512 (record_btrace_target::stop_recording): Likewise.
5513 (record_btrace_target::close): Likewise.
5514 (record_btrace_target::wait): Likewise.
5515 (record_btrace_target::record_stop_replaying): Likewise.
5516
5517 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
5518
5519 * btrace.c (btrace_enable): Throw an error on double enables and
5520 when enabling recording fails.
5521 (btrace_disable): Throw an error if the thread is not recorded.
5522
5523 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
5524
5525 * record-btrace.c (record_btrace_target::fetch_registers): Forward
5526 request if we do not have a thread_info.
5527
5528 2020-04-21 Tom de Vries <tdevries@suse.de>
5529
5530 PR gdb/25471
5531 * thread.c
5532 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
5533 exception in get_frame_id.
5534
5535 2020-04-20 Tom Tromey <tromey@adacore.com>
5536
5537 * python/python.c (struct gdbpy_event): Mark move constructor as
5538 noexcept.
5539 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
5540 constructor as noexcept.
5541 * completer.h (struct completion_result): Mark move constructor as
5542 noexcept.
5543 * completer.c (completion_result::completion_result): Use
5544 initialization style. Don't call reset_match_list.
5545
5546 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
5547
5548 * MAINTAINERS (Write After Approval): Add myself.
5549
5550 2020-04-18 Tom Tromey <tom@tromey.com>
5551
5552 * windows-tdep.c (init_w32_command_list)
5553 (w32_prefix_command_valid): Restore.
5554 (_initialize_windows_tdep): Call init_w32_command_list.
5555
5556 2020-04-18 Tom Tromey <tom@tromey.com>
5557
5558 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
5559 * value.c (value_fn_field): Update.
5560 * valops.c (find_function_in_inferior)
5561 (value_allocate_space_in_inferior): Update.
5562 * tui/tui-winsource.c (tui_update_source_windows_with_line):
5563 Update.
5564 * tui/tui-source.c (tui_source_window::set_contents): Update.
5565 * symtab.c (lookup_global_or_static_symbol)
5566 (find_function_start_sal_1, skip_prologue_sal)
5567 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
5568 * symmisc.c (dump_msymbols, dump_symtab_1)
5569 (maintenance_print_one_line_table): Update.
5570 * symfile.c (init_entry_point_info, section_is_mapped)
5571 (list_overlays_command, simple_read_overlay_table)
5572 (simple_overlay_update_1): Update.
5573 * stap-probe.c (handle_stap_probe): Update.
5574 * stabsread.c (dbx_init_float_type, define_symbol)
5575 (read_one_struct_field, read_enum_type, read_range_type): Update.
5576 * source.c (info_line_command): Update.
5577 * python/python.c (gdbpy_source_objfile_script)
5578 (gdbpy_execute_objfile_script): Update.
5579 * python/py-type.c (save_objfile_types): Update.
5580 * python/py-objfile.c (py_free_objfile): Update.
5581 * python/py-inferior.c (python_new_objfile): Update.
5582 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
5583 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
5584 (maintenance_check_psymtabs): Update.
5585 * printcmd.c (info_address_command): Update.
5586 * objfiles.h (struct objfile) <arch>: New method, from
5587 get_objfile_arch.
5588 (get_objfile_arch): Don't declare.
5589 * objfiles.c (get_objfile_arch): Remove.
5590 (filter_overlapping_sections): Update.
5591 * minsyms.c (msymbol_is_function): Update.
5592 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
5593 (output_nondebug_symbol): Update.
5594 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
5595 (mdebug_expand_psymtab): Update.
5596 * machoread.c (macho_add_oso_symfile): Update.
5597 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
5598 Update.
5599 * linux-fork.c (checkpoint_command): Update.
5600 * linespec.c (convert_linespec_to_sals): Update.
5601 * jit.c (finalize_symtab): Update.
5602 * infrun.c (insert_exception_resume_from_probe): Update.
5603 * ia64-tdep.c (ia64_find_unwind_table): Update.
5604 * hppa-tdep.c (internalize_unwinds): Update.
5605 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
5606 Update.
5607 * gcore.c (call_target_sbrk): Update.
5608 * elfread.c (record_minimal_symbol, elf_symtab_read)
5609 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
5610 (elf_gnu_ifunc_resolve_by_got): Update.
5611 * dwarf2/read.c (create_addrmap_from_index)
5612 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
5613 (read_debug_names_from_section)
5614 (process_psymtab_comp_unit_reader, add_partial_symbol)
5615 (add_partial_subprogram, process_full_comp_unit)
5616 (read_file_scope, read_func_scope, read_lexical_block_scope)
5617 (read_call_site_scope, dwarf2_ranges_read)
5618 (dwarf2_record_block_ranges, dwarf2_add_field)
5619 (mark_common_block_symbol_computed, read_tag_pointer_type)
5620 (read_tag_string_type, dwarf2_init_float_type)
5621 (dwarf2_init_complex_target_type, read_base_type)
5622 (partial_die_info::read, partial_die_info::read)
5623 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
5624 (dwarf2_fetch_die_loc_sect_off): Update.
5625 * dwarf2/loc.c (dwarf2_find_location_expression)
5626 (class dwarf_evaluate_loc_desc, rw_pieced_value)
5627 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
5628 (dwarf2_loc_desc_get_symbol_read_needs)
5629 (locexpr_describe_location_piece, locexpr_describe_location_1)
5630 (loclist_describe_location): Update.
5631 * dwarf2/index-write.c (write_debug_names): Update.
5632 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
5633 * dtrace-probe.c (dtrace_process_dof): Update.
5634 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
5635 (process_one_symbol): Update.
5636 * ctfread.c (ctf_init_float_type, read_base_type): Update.
5637 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
5638 (coff_read_enum_type): Update.
5639 * cli/cli-cmds.c (edit_command, list_command): Update.
5640 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
5641 * breakpoint.c (create_overlay_event_breakpoint)
5642 (create_longjmp_master_breakpoint)
5643 (create_std_terminate_master_breakpoint)
5644 (create_exception_master_breakpoint, get_sal_arch): Update.
5645 * block.c (block_gdbarch): Update.
5646 * annotate.c (annotate_source_line): Update.
5647
5648 2020-04-17 Tom Tromey <tromey@adacore.com>
5649
5650 * auto-load.c (show_auto_load_cmd): Remove.
5651 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
5652 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
5653 (maintenance_print_arc_command): Remove.
5654 * tui/tui-win.c (tui_command): Remove.
5655 (tui_get_cmd_list): Use add_basic_prefix_cmd.
5656 * tui/tui-layout.c (tui_layout_command): Remove.
5657 (_initialize_tui_layout): Use add_basic_prefix_cmd.
5658 * python/python.c (user_set_python, user_show_python): Remove.
5659 (_initialize_python): Use add_basic_prefix_cmd,
5660 add_show_prefix_cmd.
5661 * guile/guile.c (set_guile_command, show_guile_command): Remove.
5662 (install_gdb_commands): Use add_basic_prefix_cmd,
5663 add_show_prefix_cmd.
5664 (info_guile_command): Remove.
5665 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
5666 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
5667 add_show_prefix_cmd.
5668 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
5669 Remove do_set and do_show parameters.
5670 * cli/cli-style.c (set_style, show_style): Remove.
5671 (_initialize_cli_style): Use add_basic_prefix_cmd,
5672 add_show_prefix_cmd.
5673 (cli_style_option::add_setshow_commands): Remove do_set and
5674 do_show parameters.
5675 (cli_style_option::add_setshow_commands): Use
5676 add_basic_prefix_cmd, add_show_prefix_cmd.
5677 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
5678 (set_style_name): Remove.
5679 * cli/cli-dump.c (dump_command, append_command): Remove.
5680 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5681 (tekhex_dump_command, binary_dump_command)
5682 (binary_append_command): Remove.
5683 (_initialize_cli_dump): Use add_basic_prefix_cmd.
5684 * windows-tdep.c (w32_prefix_command_valid): Remove global.
5685 (init_w32_command_list): Remove; move into ...
5686 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
5687 * valprint.c (set_print, show_print, set_print_raw)
5688 (show_print_raw): Remove.
5689 (_initialize_valprint): Use add_basic_prefix_cmd,
5690 add_show_prefix_cmd.
5691 * typeprint.c (set_print_type, show_print_type): Remove.
5692 (_initialize_typeprint): Use add_basic_prefix_cmd,
5693 add_show_prefix_cmd.
5694 * record.c (set_record_command, show_record_command): Remove.
5695 (_initialize_record): Use add_basic_prefix_cmd,
5696 add_show_prefix_cmd.
5697 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
5698 add_show_prefix_cmd.
5699 (info_command, show_command, set_debug, show_debug): Remove.
5700 * top.h (set_history, show_history): Don't declare.
5701 * top.c (set_history, show_history): Remove.
5702 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5703 (unset_tdesc_cmd): Remove.
5704 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
5705 add_show_prefix_cmd.
5706 * symtab.c (info_module_command): Remove.
5707 (_initialize_symtab): Use add_basic_prefix_cmd.
5708 * symfile.c (overlay_command): Remove.
5709 (_initialize_symfile): Use add_basic_prefix_cmd.
5710 * sparc64-tdep.c (info_adi_command): Remove.
5711 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
5712 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
5713 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
5714 add_show_prefix_cmd.
5715 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
5716 (_initialize_serial): Use add_basic_prefix_cmd,
5717 add_show_prefix_cmd.
5718 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
5719 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
5720 add_show_prefix_cmd.
5721 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
5722 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
5723 add_show_prefix_cmd.
5724 * riscv-tdep.c (show_riscv_command, set_riscv_command)
5725 (show_debug_riscv_command, set_debug_riscv_command): Remove.
5726 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
5727 add_show_prefix_cmd.
5728 * remote.c (remote_command, set_remote_cmd): Remove.
5729 (_initialize_remote): Use add_basic_prefix_cmd.
5730 * record-full.c (set_record_full_command)
5731 (show_record_full_command): Remove.
5732 (_initialize_record_full): Use add_basic_prefix_cmd,
5733 add_show_prefix_cmd.
5734 * record-btrace.c (cmd_set_record_btrace)
5735 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
5736 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
5737 (cmd_show_record_btrace_pt): Remove.
5738 (_initialize_record_btrace): Use add_basic_prefix_cmd,
5739 add_show_prefix_cmd.
5740 * ravenscar-thread.c (set_ravenscar_command)
5741 (show_ravenscar_command): Remove.
5742 (_initialize_ravenscar): Use add_basic_prefix_cmd,
5743 add_show_prefix_cmd.
5744 * mips-tdep.c (show_mips_command, set_mips_command)
5745 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
5746 add_show_prefix_cmd.
5747 * maint.c (maintenance_command, maintenance_info_command)
5748 (maintenance_check_command, maintenance_print_command)
5749 (maintenance_set_cmd, maintenance_show_cmd): Remove.
5750 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
5751 add_show_prefix_cmd.
5752 (show_per_command_cmd): Remove.
5753 * maint-test-settings.c (maintenance_set_test_settings_cmd):
5754 Remove.
5755 (maintenance_show_test_settings_cmd): Remove.
5756 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
5757 add_show_prefix_cmd.
5758 * maint-test-options.c (maintenance_test_options_command):
5759 Remove.
5760 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
5761 * macrocmd.c (macro_command): Remove
5762 (_initialize_macrocmd): Use add_basic_prefix_cmd.
5763 * language.c (set_check, show_check): Remove.
5764 (_initialize_language): Use add_basic_prefix_cmd,
5765 add_show_prefix_cmd.
5766 * infcmd.c (unset_command): Remove.
5767 (_initialize_infcmd): Use add_basic_prefix_cmd.
5768 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
5769 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
5770 add_show_prefix_cmd.
5771 * go32-nat.c (go32_info_dos_command): Remove.
5772 (_initialize_go32_nat): Use add_basic_prefix_cmd.
5773 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
5774 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
5775 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
5776 (_initialize_frame): Use add_basic_prefix_cmd,
5777 add_show_prefix_cmd.
5778 * dcache.c (set_dcache_command, show_dcache_command): Remove.
5779 (_initialize_dcache): Use add_basic_prefix_cmd,
5780 add_show_prefix_cmd.
5781 * cp-support.c (maint_cplus_command): Remove.
5782 (_initialize_cp_support): Use add_basic_prefix_cmd.
5783 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5784 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5785 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
5786 add_basic_prefix_cmd, add_show_prefix_cmd.
5787 * breakpoint.c (save_command): Remove.
5788 (_initialize_breakpoint): Use add_basic_prefix_cmd.
5789 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
5790 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
5791 add_show_prefix_cmd.
5792 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
5793 (set_ada_command, show_ada_command): Remove.
5794 (_initialize_ada_language): Use add_basic_prefix_cmd,
5795 add_show_prefix_cmd.
5796 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
5797
5798 2020-04-16 Kamil Rytarowski <n54@gmx.com>
5799
5800 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
5801 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
5802
5803 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
5804
5805 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
5806 warning messages.
5807
5808 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
5809
5810 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
5811 import table is not at beginning of .idata section.
5812
5813 2020-04-16 Pedro Alves <palves@redhat.com>
5814
5815 * inferior.c (delete_inferior): Use delete operator directly
5816 instead of delete_program_space.
5817 * progspace.c (add_program_space): New, factored out from
5818 program_space::program_space.
5819 (remove_program_space): New, factored out from
5820 delete_program_space.
5821 (program_space::program_space): Remove intro comment. Rewrite.
5822 (program_space::~program_space): Remove intro comment. Call
5823 remove_program_space.
5824 (delete_program_space): Delete.
5825 * progspace.h (program_space::program_space): Make explicit. Move
5826 intro comment here, adjusted.
5827 (program_space::~program_space): Move intro comment here,
5828 adjusted.
5829 (delete_program_space): Remove.
5830
5831 2020-04-16 Tom Tromey <tromey@adacore.com>
5832
5833 * windows-nat.c (windows_nat::handle_access_violation): New
5834 function.
5835 * nat/windows-nat.h (handle_access_violation): Declare.
5836 * nat/windows-nat.c (handle_exception): Move Cygwin code to
5837 windows-nat.c. Call handle_access_violation.
5838
5839 2020-04-16 Tom de Vries <tdevries@suse.de>
5840
5841 PR symtab/25791
5842 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
5843 CUs without psymtab.
5844
5845 2020-04-16 Kevin Buettner <kevinb@redhat.com>
5846
5847 * python/python.c (do_start_initialization): Don't call
5848 PyEval_InitThreads for Python 3.9 and beyond.
5849
5850 2020-04-15 Kamil Rytarowski <n54@gmx.com>
5851
5852 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
5853 thread functions.
5854 (obsd_nat_target::wait): Likewise.
5855
5856 2020-04-15 Tom Tromey <tromey@adacore.com>
5857
5858 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
5859 (DEBUG_EXCEPT): Use debug_printf.
5860
5861 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
5862
5863 * completer.c (class completion_tracker::completion_hash_entry)
5864 <hash_name>: New member function.
5865 (completion_tracker::discard_completions): New callback to hash a
5866 completion_hash_entry, pass this to htab_create_alloc.
5867
5868 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
5869
5870 * windows-nat.c (windows_make_so): Warn rather than stopping with
5871 an error if realpath() fails.
5872
5873 2020-04-14 Kamil Rytarowski <n54@gmx.com>
5874
5875 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
5876 (nbsd_nat_target::info_proc): Add do_status.
5877
5878 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
5879 Tom de Vries <tdevries@suse.de>
5880
5881 PR symtab/25718
5882 * psympriv.h (struct partial_symtab::read_symtab)
5883 (struct partial_symtab::expand_psymtab)
5884 (struct partial_symtab::read_dependencies): Update comments.
5885 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
5886 read_symtab for includer.
5887 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
5888 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
5889 (struct dwarf2_include_psymtab::m_readin): Remove.
5890 (struct dwarf2_include_psymtab::includer): New member function.
5891 (dwarf2_psymtab::expand_psymtab): Assert !readin.
5892
5893 2020-04-14 Tom de Vries <tdevries@suse.de>
5894
5895 PR symtab/25720
5896 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
5897 with NULL symbol_matcher and lookup_name.
5898 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
5899 and lookup_name.
5900 * dwarf2/read.c (dw2_expand_symtabs_matching)
5901 (dw2_debug_names_expand_symtabs_matching): Same.
5902 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
5903 Make lookup_name a pointer. Update comment.
5904 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
5905 lookup_name being a pointer.
5906 * symfile.c (expand_symtabs_matching): Same.
5907 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
5908 * linespec.c (iterate_over_all_matching_symtabs): Same.
5909
5910 2020-04-13 Tom Tromey <tom@tromey.com>
5911
5912 * run-on-main-thread.c: Update include.
5913 * unittests/main-thread-selftests.c: Update include.
5914 * tui/tui-win.c: Update include.
5915 * tui/tui-io.c: Update include.
5916 * tui/tui-interp.c: Update include.
5917 * tui/tui-hooks.c: Update include.
5918 * top.h: Update include.
5919 * top.c: Update include.
5920 * ser-base.c: Update include.
5921 * remote.c: Update include.
5922 * remote-notif.c: Update include.
5923 * remote-fileio.c: Update include.
5924 * record-full.c: Update include.
5925 * record-btrace.c: Update include.
5926 * python/python.c: Update include.
5927 * posix-hdep.c: Update include.
5928 * mingw-hdep.c: Update include.
5929 * mi/mi-main.c: Update include.
5930 * mi/mi-interp.c: Update include.
5931 * main.c: Update include.
5932 * linux-nat.c: Update include.
5933 * interps.c: Update include.
5934 * infrun.c: Update include.
5935 * inf-loop.c: Update include.
5936 * event-top.c: Update include.
5937 * event-loop.c: Move to ../gdbsupport/.
5938 * event-loop.h: Move to ../gdbsupport/.
5939 * async-event.h: Update include.
5940 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
5941
5942 2020-04-13 Tom Tromey <tom@tromey.com>
5943
5944 * tui/tui-win.c: Include async-event.h.
5945 * remote.c: Include async-event.h.
5946 * remote-notif.c: Include async-event.h.
5947 * record-full.c: Include async-event.h.
5948 * record-btrace.c: Include async-event.h.
5949 * infrun.c: Include async-event.h.
5950 * event-top.c: Include async-event.h.
5951 * event-loop.h: Move some declarations to async-event.h.
5952 * event-loop.c: Don't include ser-event.h or top.h. Move some
5953 code to async-event.c.
5954 * async-event.h: New file.
5955 * async-event.c: New file.
5956 * Makefile.in (COMMON_SFILES): Add async-event.c.
5957 (HFILES_NO_SRCDIR): Add async-event.h.
5958
5959 2020-04-13 Tom Tromey <tom@tromey.com>
5960
5961 * utils.c (flush_streams): New function.
5962 * event-loop.c (gdb_wait_for_event): Call flush_streams.
5963
5964 2020-04-13 Tom Tromey <tom@tromey.com>
5965
5966 * event-loop.c (handle_file_event): Use warning, not
5967 printf_unfiltered.
5968
5969 2020-04-13 Tom Tromey <tom@tromey.com>
5970
5971 * event-loop.c: Include <chrono>.
5972
5973 2020-04-13 Tom Tromey <tom@tromey.com>
5974
5975 * gdb_select.h: Move to ../gdbsupport/.
5976 * event-loop.c: Update include path.
5977 * top.c: Update include path.
5978 * ser-base.c: Update include path.
5979 * ui-file.c: Update include path.
5980 * ser-tcp.c: Update include path.
5981 * guile/scm-ports.c: Update include path.
5982 * posix-hdep.c: Update include path.
5983 * ser-unix.c: Update include path.
5984 * gdb_usleep.c: Update include path.
5985 * mingw-hdep.c: Update include path.
5986 * inflow.c: Update include path.
5987 * infrun.c: Update include path.
5988 * event-top.c: Update include path.
5989
5990 2020-04-13 Tom Tromey <tom@tromey.com>
5991
5992 * configure: Rebuild.
5993 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
5994
5995 2020-04-13 Tom Tromey <tom@tromey.com>
5996
5997 * event-loop.h (start_event_loop): Don't declare.
5998 * event-loop.c (start_event_loop): Move...
5999 * main.c (start_event_loop): ...here. Now static.
6000
6001 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
6002
6003 * MAINTAINERS: Update my email address.
6004
6005 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6006
6007 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
6008 IP_ALL.
6009
6010 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6011
6012 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
6013 (nbsd_nat_target::info_proc): Add do_cmdline.
6014
6015 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6016
6017 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
6018 (nbsd_nat_target::info_proc): Add do_cwd.
6019
6020 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6021
6022 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
6023
6024 2020-04-11 Kamil Rytarowski <n54@gmx.com>
6025
6026 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
6027 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
6028 (nbsd_nat_target::info_proc): New functions.
6029 * nbsd-nat.c (kinfo_get_vmmap): New function.
6030 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
6031 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
6032 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
6033 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
6034 functions.
6035 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
6036 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6037 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6038 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
6039 (KINFO_VME_FLAG_GROWS_DOWN): New.
6040
6041 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
6042
6043 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
6044 bit shift.
6045
6046 2020-04-10 Tom Tromey <tromey@adacore.com>
6047
6048 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
6049
6050 2020-04-10 Tom Tromey <tromey@adacore.com>
6051
6052 * symtab.c (get_symbol_address, get_msymbol_address): Skip
6053 separate debug files.
6054
6055 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
6056
6057 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
6058 Move to...
6059 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
6060 ... here.
6061 * windows-nat.c (windows_nat_target::get_windows_debug_event):
6062 Check for STATUS_WX86_BREAKPOINT.
6063 (windows_nat_target::wait): Same.
6064
6065 2020-04-10 Tom de Vries <tdevries@suse.de>
6066
6067 PR cli/25808
6068 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
6069
6070 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6071
6072 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
6073 (Write After Approval): Remove Tom de Vries.
6074
6075 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
6076
6077 revert partially:
6078 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
6079
6080 * buildsym.c (record_line): Fix undefined behavior and preserve
6081 lines at eof.
6082
6083 2020-04-09 Kamil Rytarowski <n54@gmx.com>
6084
6085 * auxv.h (svr4_auxv_parse): New.
6086 * auxv.c (default_auxv_parse): Split into default_auxv_parse
6087 and generic_auxv_parse.
6088 (svr4_auxv_parse): Add.
6089 * obsd-tdep.c: Include "auxv.h".
6090 (obsd_auxv_parse): Remove.
6091 (obsd_init_abi): Remove comment.
6092 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
6093 from `obsd_auxv_parse' to `svr4_auxv_parse'.
6094 * nbsd-tdep.c: Include "auxv.h".
6095 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
6096
6097 2020-04-08 Tom Tromey <tromey@adacore.com>
6098
6099 * nat/windows-nat.h (last_wait_event): Don't declare.
6100 (wait_for_debug_event): Update comment.
6101 * nat/windows-nat.c (last_wait_event): Now static.
6102
6103 2020-04-08 Tom Tromey <tromey@adacore.com>
6104
6105 * windows-nat.c (wait_for_debug_event): Move to
6106 nat/windows-nat.c.
6107 * nat/windows-nat.h (wait_for_debug_event): Declare.
6108 * nat/windows-nat.c (wait_for_debug_event): Move from
6109 windows-nat.c. No longer static.
6110
6111 2020-04-08 Tom Tromey <tromey@adacore.com>
6112
6113 * windows-nat.c (get_windows_debug_event): Use
6114 fetch_pending_stop.
6115 * nat/windows-nat.h (fetch_pending_stop): Declare.
6116 * nat/windows-nat.c (fetch_pending_stop): New function.
6117
6118 2020-04-08 Tom Tromey <tromey@adacore.com>
6119
6120 * windows-nat.c (windows_continue): Use matching_pending_stop and
6121 continue_last_debug_event.
6122 * nat/windows-nat.h (matching_pending_stop)
6123 (continue_last_debug_event): Declare.
6124 * nat/windows-nat.c (DEBUG_EVENTS): New define.
6125 (matching_pending_stop, continue_last_debug_event): New
6126 functions.
6127
6128 2020-04-08 Tom Tromey <tromey@adacore.com>
6129
6130 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
6131 (handle_exception_result): Move to nat/windows-nat.h.
6132 (DEBUG_EXCEPTION_SIMPLE): Remove.
6133 (windows_nat::handle_ms_vc_exception): New function.
6134 (handle_exception): Move to nat/windows-nat.c.
6135 (get_windows_debug_event): Update.
6136 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
6137 nat/windows-nat.c.
6138 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
6139 (handle_exception_result): Move from windows-nat.c.
6140 (handle_exception): Declare.
6141 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
6142 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
6143 windows-nat.c.
6144
6145 2020-04-08 Tom Tromey <tromey@adacore.com>
6146
6147 * windows-nat.c (exception_count, event_count): Remove.
6148 (handle_exception, get_windows_debug_event)
6149 (do_initial_windows_stuff): Update.
6150
6151 2020-04-08 Tom Tromey <tromey@adacore.com>
6152
6153 * windows-nat.c (windows_nat::handle_load_dll)
6154 (windows_nat::handle_unload_dll): Rename. No longer static.
6155 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
6156 Declare.
6157
6158 2020-04-08 Tom Tromey <tromey@adacore.com>
6159
6160 * complaints.h (stop_whining): Declare at top-level.
6161 (complaint): Don't declare stop_whining.
6162
6163 2020-04-08 Tom Tromey <tromey@adacore.com>
6164
6165 * windows-nat.c (windows_nat::handle_output_debug_string):
6166 Rename. No longer static.
6167 * nat/windows-nat.h (handle_output_debug_string): Declare.
6168
6169 2020-04-08 Tom Tromey <tromey@adacore.com>
6170
6171 * windows-nat.c (current_process_handle, current_process_id)
6172 (main_thread_id, last_sig, current_event, last_wait_event)
6173 (current_windows_thread, desired_stop_thread_id, pending_stops)
6174 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
6175 (display_selectors, fake_create_process)
6176 (get_windows_debug_event): Update.
6177 * nat/windows-nat.h (current_process_handle, current_process_id)
6178 (main_thread_id, last_sig, current_event, last_wait_event)
6179 (current_windows_thread, desired_stop_thread_id, pending_stops)
6180 (struct pending_stop, siginfo_er): Move from windows-nat.c.
6181 * nat/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 (siginfo_er): New globals. Move from windows-nat.c.
6185
6186 2020-04-08 Tom Tromey <tromey@adacore.com>
6187
6188 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
6189 (handle_load_dll): Update.
6190 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
6191
6192 2020-04-08 Tom Tromey <tromey@adacore.com>
6193
6194 * windows-nat.c (enum thread_disposition_type): Move to
6195 nat/windows-nat.h.
6196 (windows_nat::thread_rec): Rename from thread_rec. No longer
6197 static.
6198 (windows_add_thread, windows_nat_target::fetch_registers)
6199 (windows_nat_target::store_registers, handle_exception)
6200 (windows_nat_target::resume, get_windows_debug_event)
6201 (windows_nat_target::get_tib_address)
6202 (windows_nat_target::thread_name)
6203 (windows_nat_target::thread_alive): Update.
6204 * nat/windows-nat.h (enum thread_disposition_type): Move from
6205 windows-nat.c.
6206 (thread_rec): Declare.
6207
6208 2020-04-08 Tom Tromey <tromey@adacore.com>
6209
6210 * windows-nat.c: Add "using namespace".
6211 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
6212 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
6213
6214 2020-04-08 Tom Tromey <tromey@adacore.com>
6215
6216 * nat/windows-nat.h (struct windows_thread_info): Declare
6217 destructor.
6218 * nat/windows-nat.c (~windows_thread_info): New.
6219
6220 2020-04-08 Tom Tromey <tromey@adacore.com>
6221
6222 PR gdb/22992
6223 * windows-nat.c (current_event): Update comment.
6224 (last_wait_event, desired_stop_thread_id): New globals.
6225 (struct pending_stop): New.
6226 (pending_stops): New global.
6227 (windows_nat_target) <stopped_by_sw_breakpoint>
6228 <supports_stopped_by_sw_breakpoint>: New methods.
6229 (windows_fetch_one_register): Add assertions. Adjust PC.
6230 (windows_continue): Handle pending stops. Suspend other threads
6231 when stepping. Use last_wait_event
6232 (wait_for_debug_event): New function.
6233 (get_windows_debug_event): Use wait_for_debug_event. Handle
6234 pending stops. Queue spurious stops.
6235 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
6236 (windows_nat_target::kill): Use wait_for_debug_event.
6237 * nat/windows-nat.h (struct windows_thread_info)
6238 <stopped_at_software_breakpoint>: New field.
6239 * nat/windows-nat.c (windows_thread_info::resume): Clear
6240 stopped_at_software_breakpoint.
6241
6242 2020-04-08 Tom Tromey <tromey@adacore.com>
6243
6244 * windows-nat.c (enum thread_disposition_type): New.
6245 (thread_rec): Replace "get_context" parameter with "disposition";
6246 change type.
6247 (windows_add_thread, windows_nat_target::fetch_registers)
6248 (windows_nat_target::store_registers, handle_exception)
6249 (windows_nat_target::resume, get_windows_debug_event)
6250 (windows_nat_target::get_tib_address)
6251 (windows_nat_target::thread_name)
6252 (windows_nat_target::thread_alive): Update.
6253
6254 2020-04-08 Tom Tromey <tromey@adacore.com>
6255
6256 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
6257 (windows_continue): Use windows_continue::resume.
6258 * nat/windows-nat.h (struct windows_thread_info) <suspend,
6259 resume>: Declare new methods.
6260 * nat/windows-nat.c: New file.
6261 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
6262
6263 2020-04-08 Tom Tromey <tromey@adacore.com>
6264
6265 * windows-nat.c (windows_add_thread, windows_delete_thread)
6266 (windows_nat_target::fetch_registers)
6267 (windows_nat_target::store_registers, fake_create_process)
6268 (windows_nat_target::resume, windows_nat_target::resume)
6269 (get_windows_debug_event, windows_nat_target::wait)
6270 (windows_nat_target::pid_to_str)
6271 (windows_nat_target::get_tib_address)
6272 (windows_nat_target::get_ada_task_ptid)
6273 (windows_nat_target::thread_name)
6274 (windows_nat_target::thread_alive): Use lwp, not tid.
6275
6276 2020-04-08 Tom Tromey <tromey@adacore.com>
6277
6278 * windows-nat.c (handle_exception)
6279 (windows_nat_target::thread_name): Update.
6280 * nat/windows-nat.h (windows_thread_info): Remove destructor.
6281 <name>: Now unique_xmalloc_ptr.
6282
6283 2020-04-08 Tom Tromey <tromey@adacore.com>
6284
6285 * windows-nat.c (thread_rec)
6286 (windows_nat_target::fetch_registers): Update.
6287 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
6288 Update comment.
6289 <debug_registers_changed, reload_context>: Now bool.
6290
6291 2020-04-08 Tom Tromey <tromey@adacore.com>
6292
6293 * windows-nat.c (windows_add_thread): Use new.
6294 (windows_init_thread_list, windows_delete_thread): Use delete.
6295 (get_windows_debug_event): Update.
6296 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
6297 destructor, and initializers.
6298
6299 2020-04-08 Tom Tromey <tromey@adacore.com>
6300
6301 * windows-nat.c (struct windows_thread_info): Remove.
6302 * nat/windows-nat.h: New file.
6303
6304 2020-04-08 Tom Tromey <tromey@adacore.com>
6305
6306 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
6307 (thread_rec, windows_add_thread, windows_delete_thread)
6308 (windows_continue): Update.
6309
6310 2020-04-08 Tom Tromey <tromey@adacore.com>
6311
6312 * windows-nat.c (struct windows_thread_info): Remove typedef.
6313 (thread_head): Remove.
6314 (thread_list): New global.
6315 (thread_rec, windows_add_thread, windows_init_thread_list)
6316 (windows_delete_thread, windows_continue): Update.
6317
6318 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
6319
6320 * windows-tdep.h (windows_init_abi): Add comment.
6321 (cygwin_init_abi): New declaration.
6322 * windows-tdep.c: Split signal enumeration in two, one for
6323 Windows and one for Cygwin.
6324 (windows_gdb_signal_to_target): Only deal with signal of the
6325 Windows OS ABI.
6326 (cygwin_gdb_signal_to_target): New function.
6327 (windows_init_abi): Rename to windows_init_abi_common, don't set
6328 gdb_signal_to_target gdbarch method. Add new new function with
6329 this name.
6330 (cygwin_init_abi): New function.
6331 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
6332 comment. Don't call windows_init_abi.
6333 (amd64_windows_init_abi): Add comment, call windows_init_abi.
6334 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
6335 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
6336 i386_windows_init_abi_common, don't call windows_init_abi. Add
6337 a new function of this name.
6338 (i386_cygwin_init_abi): New function.
6339 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
6340 OS ABI Cygwin.
6341
6342 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
6343
6344 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
6345 parameter.c.
6346 (dwarf2_read_gdb_index): Update.
6347
6348 2020-04-07 Kamil Rytarowski <n54@gmx.com>
6349
6350 * nbsd-tdep.c: Include "objfiles.h".
6351 (nbsd_skip_solib_resolver): New.
6352 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
6353
6354 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6355
6356 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
6357 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
6358 with DW_LLE_base_addressx are being emitted in DWARFv5.
6359 Add the newly added kind DW_LOC_OFFSET_PAIR also.
6360 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
6361 unsigned integer.
6362
6363 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6364
6365 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
6366 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
6367 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
6368 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
6369 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
6370 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
6371 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
6372
6373
6374 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6375
6376 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
6377 (read_loclist_index): New function definition.
6378 (lookup_loclist_base): New function definition.
6379 (read_loclist_header): New function definition.
6380 (dwarf2_cu): Add loclist_base and loclist_header field.
6381 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
6382 (read_full_die_1): Read the value of DW_AT_loclists_base.
6383 (read_attribute_reprocess): Handle DW_FORM_loclistx.
6384 (read_attribute_value): Handle DW_FORM_loclistx.
6385 (skip_one_die): Handle DW_FORM_loclistx.
6386 (loclist_header): New structure declaration.
6387 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
6388
6389 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6390
6391 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
6392 constructor. Remove `addr` parameter from other constructor and
6393 add `per_cu` parameter.
6394 * dwarf2/read.c (create_partial_symtab): Update.
6395
6396 2020-04-07 Tom de Vries <tdevries@suse.de>
6397
6398 PR symtab/25796
6399 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
6400 (partial_die_info::fixup): Inherit has_const_value.
6401
6402 2020-04-07 Tom de Vries <tdevries@suse.de>
6403
6404 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
6405 symbols without address.
6406
6407 2020-04-06 Kamil Rytarowski <n54@gmx.com>
6408
6409 * nbsd-nat.h (struct thread_info): Add forward declaration.
6410 (nbsd_nat_target::thread_alive): Add.
6411 (nbsd_nat_target::thread_name): Likewise.
6412 (nbsd_nat_target::update_thread_list): Likewise.
6413 (update_thread_list::post_attach): Likewise.
6414 (post_attach::pid_to_str): Likewise.
6415 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
6416 (nbsd_thread_lister): Add.
6417 (nbsd_nat_target::thread_alive): Likewise.
6418 (nbsd_nat_target::thread_name): Likewise.
6419 (nbsd_add_threads): Likewise.
6420 (update_thread_list::post_attach): Likewise.
6421 (nbsd_nat_target::update_thread_list): Likewise.
6422 (post_attach::pid_to_str): Likewise.
6423
6424 2020-04-06 Tom Tromey <tromey@adacore.com>
6425
6426 * ada-valprint.c (print_variant_part): Extract the variant field.
6427 (print_field_values): Use the field as the outer value when
6428 recursing.
6429
6430 2020-04-06 Tom Tromey <tromey@adacore.com>
6431
6432 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
6433 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
6434 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
6435 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
6436 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
6437
6438 2020-04-06 Tom Tromey <tromey@adacore.com>
6439
6440 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
6441 TYPE_CODE_ERROR.
6442
6443 2020-04-06 Kamil Rytarowski <n54@gmx.com>
6444
6445 * nbsd-tdep.c: Include "gdbarch.h".
6446 Define enum with NetBSD signal numbers.
6447 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
6448 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
6449 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6450 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
6451 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
6452 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
6453 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
6454 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
6455 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
6456 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
6457 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
6458 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
6459
6460 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
6461
6462 PR gdb/25325
6463 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
6464
6465 2020-04-03 Tom Tromey <tromey@adacore.com>
6466
6467 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
6468 Read constant block.
6469
6470 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
6471
6472 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
6473 (gdb_bfd_get_full_section_contents): New declaration.
6474 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
6475 * windows-tdep.c (is_linked_with_cygwin_dll): Use
6476 gdb_bfd_get_full_section_contents.
6477
6478 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
6479
6480 * exec.c (build_section_table): Replace internal_error with
6481 gdb_assert.
6482 (section_table_xfer_memory_partial): Likewise.
6483 * mdebugread.c (parse_partial_symbols): Likewise.
6484 * psymtab.c (lookup_partial_symbol): Likewise.
6485 * utils.c (wrap_here): Likewise.
6486
6487 2020-04-02 Tom Tromey <tromey@adacore.com>
6488
6489 * f-lang.c (build_fortran_types): Use arch_type to initialize
6490 builtin_complex_s32 in the TYPE_CODE_ERROR case.
6491
6492 2020-04-02 Tom Tromey <tromey@adacore.com>
6493
6494 * dwarf2/read.c (partial_die_info::read): Do not create a vector
6495 of attributes.
6496
6497 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
6498 Bernd Edlinger <bernd.edlinger@hotmail.de>
6499 Tom Tromey <tromey@adacore.com>
6500
6501 * buildsym.c (buildsym_compunit::record_line): Remove
6502 deduplication code.
6503
6504 2020-04-02 Tom de Vries <tdevries@suse.de>
6505
6506 PR ada/24671
6507 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
6508
6509 2020-04-02 Tom de Vries <tdevries@suse.de>
6510
6511 * dwarf2/read.c (dwarf2_gdb_index_functions,
6512 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
6513 NULL.
6514 * psymtab.c (psym_lookup_global_symbol_language): New function.
6515 (psym_functions): Init psym_lookup_global_symbol_language with
6516 psym_lookup_global_symbol_language.
6517 * symfile-debug.c (debug_sym_quick_functions): Init
6518 lookup_global_symbol_language with NULL.
6519 * symfile.c (set_initial_language): Remove fixme comment.
6520 * symfile.h (struct quick_symbol_functions): Add
6521 lookup_global_symbol_language.
6522 * symtab.c (find_quick_global_symbol_language): New function.
6523 (find_main_name): Use find_quick_global_symbol_language.
6524
6525 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6526
6527 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
6528
6529 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
6530
6531 * buildsym.c (record_line): Fix undefined behavior and preserve
6532 lines at eof.
6533
6534 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
6535
6536 * buildsym.c (record_line): Fix the resizing condition.
6537
6538 2020-04-01 Tom Tromey <tom@tromey.com>
6539
6540 * value.h (value_literal_complex): Add comment.
6541 * valops.c (value_literal_complex): Refer to value.h.
6542
6543 2020-04-01 Tom Tromey <tom@tromey.com>
6544
6545 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
6546 (scalar_type): New rule, from typebase.
6547 (typebase): Use scalar_type. Recognize complex types.
6548 (field_name): Handle FLOAT_KEYWORD.
6549 (ident_tokens): Add _Complex and __complex__.
6550
6551 2020-04-01 Tom Tromey <tom@tromey.com>
6552
6553 PR exp/25299:
6554 * valarith.c (promotion_type, complex_binop): New functions.
6555 (scalar_binop): Handle complex numbers. Use promotion_type.
6556 (value_pos, value_neg, value_complement): Handle complex numbers.
6557
6558 2020-04-01 Tom Tromey <tom@tromey.com>
6559
6560 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
6561 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
6562 (parse_number): Handle complex numbers.
6563
6564 2020-04-01 Tom Tromey <tom@tromey.com>
6565
6566 * c-valprint.c (c_decorations): Change complex suffix to "i".
6567
6568 2020-04-01 Tom Tromey <tom@tromey.com>
6569
6570 * valprint.c (generic_value_print_complex): Use accessors.
6571 * value.h (value_real_part, value_imaginary_part): Declare.
6572 * valops.c (value_real_part, value_imaginary_part): New
6573 functions.
6574 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
6575
6576 2020-04-01 Tom Tromey <tom@tromey.com>
6577
6578 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
6579 (read_range_type): Update.
6580 * mdebugread.c (basic_type): Update.
6581 * go-lang.c (build_go_types): Use init_complex_type.
6582 * gdbtypes.h (struct main_type) <complex_type>: New member.
6583 (init_complex_type): Update.
6584 (arch_complex_type): Don't declare.
6585 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
6586 Make name if none given. Use alloc_type_copy. Look for cached
6587 complex type.
6588 (arch_complex_type): Remove.
6589 (gdbtypes_post_init): Use init_complex_type.
6590 * f-lang.c (build_fortran_types): Use init_complex_type.
6591 * dwarf2/read.c (read_base_type): Update.
6592 * d-lang.c (build_d_types): Use init_complex_type.
6593 * ctfread.c (read_base_type): Update.
6594
6595 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6596
6597 * infrun.c (stop_all_threads): Update assertion, plus when
6598 stopping threads, take into account that we might be trying
6599 to stop an all-stop target.
6600 (stop_waiting): Call 'stop_all_threads' if there exists a
6601 non-stop target.
6602
6603 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6604
6605 * target.h (exists_non_stop_target): New function declaration.
6606 * target.c (exists_non_stop_target): New function.
6607
6608 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
6609
6610 PR gdb/24789
6611 * eval.c (is_integral_or_integral_reference): New function.
6612 (evaluate_subexp_standard): Allow integer references in
6613 pointer arithmetic.
6614
6615 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6616
6617 * remote.c (remote_target::remote_parse_stop_reply): Remove the
6618 check for no ptid in the stop reply when the target is non-stop.
6619
6620 2020-04-01 Tom Tromey <tromey@adacore.com>
6621
6622 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
6623 "name" parameter to rvalue reference. Initialize m_name_holder.
6624 <lookup_name_info>: New overloads.
6625 <name>: Return gdb::string_view.
6626 <c_str>: New method.
6627 <make_ignore_params>: Update.
6628 <search_name_hash>: Update.
6629 <language_lookup_name>: Return const char *.
6630 <m_name>: Change type.
6631 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
6632 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
6633 (lookup_name_info::match_any): Update.
6634 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
6635 Update.
6636 * minsyms.c (linkage_name_str): Update.
6637 * language.c (default_symbol_name_matcher): Update.
6638 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
6639 Update.
6640 * ada-lang.c (ada_fold_name): Change parameter to string_view.
6641 (ada_lookup_name_info::ada_lookup_name_info): Update.
6642 (literal_symbol_name_matcher): Update.
6643
6644 2020-04-01 Tom Tromey <tromey@adacore.com>
6645
6646 * psymtab.c (psymtab_search_name): Remove function.
6647 (psym_lookup_symbol): Create search name and lookup name here.
6648 (lookup_partial_symbol): Remove "name" parameter; add
6649 lookup_name.
6650 (psym_expand_symtabs_for_function): Update.
6651
6652 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
6653
6654 PR tui/25597:
6655 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
6656
6657 2020-03-31 Tom Tromey <tromey@adacore.com>
6658
6659 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
6660 memcpy.
6661
6662 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
6663
6664 * features/riscv/32bit-csr.xml: Regenerated.
6665 * features/riscv/64bit-csr.xml: Regenerated.
6666
6667 2020-03-30 Tom Tromey <tromey@adacore.com>
6668
6669 * ada-valprint.c (print_variant_part): Update.
6670 * ada-lang.h (ada_which_variant_applies): Update.
6671 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
6672 outer_valaddr parameters; replace with "outer" value parameter.
6673 (to_fixed_variant_branch_type): Update.
6674
6675 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6676
6677 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
6678 <list>. Remove inclusion of observable.h.
6679 (PPC_DEBUG_CURRENT_VERSION): Move up define.
6680 (struct arch_lwp_info): New struct.
6681 (class ppc_linux_dreg_interface): New class.
6682 (struct ppc_linux_process_info): New struct.
6683 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
6684 <low_new_clone, low_forget_process, low_prepare_to_resume>
6685 <copy_thread_dreg_state, mark_thread_stale>
6686 <mark_debug_registers_changed, register_hw_breakpoint>
6687 <clear_hw_breakpoint, register_wp, clear_wp>
6688 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
6689 <num_memory_accesses, get_trigger_type>
6690 <create_watchpoint_request, hwdebug_point_cmp>
6691 <init_arch_lwp_info, get_arch_lwp_info>
6692 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
6693 methods.
6694 <struct ptid_hash>: New inner struct.
6695 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
6696 members.
6697 (saved_dabr_value, hwdebug_info, max_slots_number)
6698 (struct hw_break_tuple, struct thread_points, ppc_threads)
6699 (have_ptrace_hwdebug_interface)
6700 (hwdebug_find_thread_points_by_tid)
6701 (hwdebug_insert_point, hwdebug_remove_point): Remove.
6702 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
6703 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
6704 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
6705 use m_dreg_interface.
6706 (hwdebug_point_cmp): Change to...
6707 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
6708 reference arguments instead of pointers.
6709 (ppc_linux_nat_target::ranged_break_num_registers): Use
6710 m_dreg_interface.
6711 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
6712 m_dreg_interface. Call register_hw_breakpoint.
6713 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
6714 m_dreg_interface. Call clear_hw_breakpoint.
6715 (get_trigger_type): Change to...
6716 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
6717 comment.
6718 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
6719 use m_dreg_interface. Call register_hw_breakpoint.
6720 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
6721 use m_dreg_interface. Call clear_hw_breakpoint.
6722 (can_use_watchpoint_cond_accel): Change to...
6723 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
6724 method. Update comment, use m_dreg_interface and
6725 m_process_info.
6726 (calculate_dvc): Change to...
6727 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
6728 m_dreg_interface.
6729 (num_memory_accesses): Change to...
6730 (ppc_linux_nat_target::num_memory_accesses): ...this method.
6731 (check_condition): Change to...
6732 (ppc_linux_nat_target::check_condition): ...this method.
6733 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
6734 comment, use m_dreg_interface.
6735 (create_watchpoint_request): Change to...
6736 (ppc_linux_nat_target::create_watchpoint_request): ...this
6737 method. Use m_dreg_interface.
6738 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
6739 m_dreg_interface. Call register_hw_breakpoint or register_wp.
6740 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
6741 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
6742 (ppc_linux_nat_target::low_forget_process)
6743 (ppc_linux_nat_target::low_new_fork)
6744 (ppc_linux_nat_target::low_new_clone)
6745 (ppc_linux_nat_target::low_delete_thread)
6746 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
6747 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
6748 only call mark_thread_stale.
6749 (ppc_linux_thread_exit): Remove.
6750 (ppc_linux_nat_target::stopped_data_address): Change to...
6751 (ppc_linux_nat_target::low_stopped_data_address): This. Add
6752 comment, use m_dreg_interface and m_thread_hw_breakpoints.
6753 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
6754 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
6755 comment. Call low_stopped_data_address.
6756 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
6757 m_dreg_interface.
6758 (ppc_linux_nat_target::masked_watch_num_registers): Use
6759 m_dreg_interface.
6760 (ppc_linux_nat_target::copy_thread_dreg_state)
6761 (ppc_linux_nat_target::mark_thread_stale)
6762 (ppc_linux_nat_target::mark_debug_registers_changed)
6763 (ppc_linux_nat_target::register_hw_breakpoint)
6764 (ppc_linux_nat_target::clear_hw_breakpoint)
6765 (ppc_linux_nat_target::register_wp)
6766 (ppc_linux_nat_target::clear_wp)
6767 (ppc_linux_nat_target::init_arch_lwp_info)
6768 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
6769 (_initialize_ppc_linux_nat): Remove observer callback.
6770
6771 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6772
6773 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
6774 (ppc_linux_nat_target::auxv_parse)
6775 (ppc_linux_nat_target::read_description)
6776 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
6777 Move up.
6778
6779 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6780
6781 * linux-nat.h (low_new_clone): New method.
6782 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
6783
6784 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6785
6786 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
6787 (dbx_expand_psymtab): ... this.
6788 (start_psymtab): Update.
6789 * mdebugread.c (psymtab_to_symtab_1): Rename to...
6790 (mdebug_expand_psymtab): ... this.
6791 (parse_partial_symbols): Update.
6792 (new_psymtab): Update.
6793 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
6794 (xcoff_expand_psymtab): ... this.
6795 (xcoff_start_psymtab): Update.
6796
6797 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6798
6799 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
6800 <expand_dependencies>: ... this.
6801 * psymtab.c (partial_symtab::read_dependencies): Rename to...
6802 (partial_symtab::expand_dependencies): ... this.
6803 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
6804 Update.
6805 (dwarf2_psymtab::expand_psymtab): Update.
6806 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
6807 * mdebugread.c (psymtab_to_symtab_1): Update.
6808 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6809
6810 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
6811
6812 * psympriv.h (discard_psymtab): Remove.
6813 * dbxread.c (dbx_end_psymtab): Update.
6814 * xcoffread.c (xcoff_end_psymtab): Update.
6815
6816 2020-03-28 Tom Tromey <tom@tromey.com>
6817
6818 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
6819 comment.
6820
6821 2020-03-28 Tom Tromey <tom@tromey.com>
6822
6823 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
6824
6825 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
6826
6827 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
6828
6829 2020-03-26 John Baldwin <jhb@FreeBSD.org>
6830
6831 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
6832
6833 2020-03-26 Tom Tromey <tom@tromey.com>
6834
6835 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
6836 (mark_common_block_symbol_computed, read_tag_string_type)
6837 (attr_to_dynamic_prop, read_subrange_type): Update.
6838 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
6839 to be methods on struct attribute.
6840 (skip_one_die, process_imported_unit_die, read_namespace_alias)
6841 (read_call_site_scope, partial_die_info::read)
6842 (partial_die_info::read, lookup_die_type, follow_die_ref):
6843 Update.
6844 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
6845 from dwarf2_get_ref_die_offset.
6846 (attribute::constant_value): New method, from
6847 dwarf2_get_attr_constant_value.
6848 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
6849 Declare method.
6850 <constant_value>: New method.
6851
6852 2020-03-26 Tom Tromey <tom@tromey.com>
6853
6854 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
6855 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
6856 (dwarf_type_encoding_name): Move to stringify.c.
6857 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
6858 * dwarf2/stringify.c: New file.
6859 * dwarf2/stringify.h: New file.
6860
6861 2020-03-26 Tom Tromey <tom@tromey.com>
6862
6863 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
6864 Rewrite.
6865
6866 2020-03-26 Tom Tromey <tom@tromey.com>
6867
6868 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
6869 methods.
6870 * dwarf2/read.c (lookup_addr_base): Move to die.h.
6871 (lookup_ranges_base): Likewise.
6872 (read_cutu_die_from_dwo, read_full_die_1): Update.
6873
6874 2020-03-26 Tom Tromey <tom@tromey.com>
6875
6876 * dwarf2/read.c (read_import_statement, read_file_scope)
6877 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
6878 (read_lexical_block_scope, read_call_site_scope)
6879 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
6880 (handle_struct_member_die, process_structure_scope)
6881 (update_enumeration_type_from_children)
6882 (process_enumeration_scope, read_array_type, read_common_block)
6883 (read_namespace, read_module, read_subroutine_type): Update.
6884 (sibling_die): Remove.
6885
6886 2020-03-26 Tom Tromey <tom@tromey.com>
6887
6888 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
6889 (build_type_psymtabs_reader, read_structure_type)
6890 (read_enumeration_type, read_full_die_1): Update.
6891 (dwarf2_attr_no_follow): Move to die.h.
6892 * dwarf2/die.h (struct die_info) <attr>: New method.
6893
6894 2020-03-26 Tom Tromey <tom@tromey.com>
6895
6896 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
6897 <base_address>: Now an optional.
6898 (dwarf2_find_base_address, dwarf2_rnglists_process)
6899 (dwarf2_ranges_process, fill_in_loclist_baton)
6900 (dwarf2_symbol_mark_computed): Update.
6901
6902 2020-03-26 Tom Tromey <tom@tromey.com>
6903
6904 * dwarf2/read.c (struct die_info): Move to die.h.
6905 * dwarf2/die.h: New file.
6906
6907 2020-03-26 Tom Tromey <tom@tromey.com>
6908
6909 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
6910 * dwarf2/read.c
6911 (dwarf2_statement_list_fits_in_line_number_section_complaint):
6912 Move to line-header.c.
6913 (read_checked_initial_length_and_offset, read_formatted_entries):
6914 Likewise.
6915 (dwarf_decode_line_header): Split into two.
6916 * dwarf2/line-header.c
6917 (dwarf2_statement_list_fits_in_line_number_section_complaint):
6918 Move from read.c.
6919 (read_checked_initial_length_and_offset, read_formatted_entries):
6920 Likewise.
6921 (dwarf_decode_line_header): New function, split from read.c.
6922
6923 2020-03-26 Tom Tromey <tom@tromey.com>
6924
6925 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
6926 Declare method.
6927 * dwarf2/read.c (read_attribute_value): Update.
6928 (dwarf2_per_objfile::read_line_string): Rename from
6929 read_indirect_line_string.
6930 (read_formatted_entries): Update.
6931
6932 2020-03-26 Tom Tromey <tom@tromey.com>
6933
6934 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
6935 variable.
6936
6937 2020-03-26 Tom Tromey <tom@tromey.com>
6938
6939 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
6940 const.
6941 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
6942 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
6943 parameter const.
6944
6945 2020-03-26 Tom Tromey <tom@tromey.com>
6946
6947 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
6948 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
6949 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
6950 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
6951
6952 2020-03-26 Tom Tromey <tom@tromey.com>
6953
6954 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
6955 file_names_size, file_full_name, file_file_name>: Use const.
6956 <file_name_at, file_names>: Add const overload.
6957 * dwarf2/line-header.c (line_header::file_file_name)
6958 (line_header::file_full_name): Update.
6959
6960 2020-03-26 Tom Tromey <tom@tromey.com>
6961
6962 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
6963 (macro_start_file, consume_improper_spaces)
6964 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
6965 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
6966 (dwarf_decode_macros): Move to macro.c.
6967 * dwarf2/macro.c: New file.
6968 * dwarf2/macro.h: New file.
6969 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
6970
6971 2020-03-26 Tom Tromey <tom@tromey.com>
6972
6973 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
6974 method.
6975 * dwarf2/section.c: New method. From
6976 read_indirect_string_at_offset_from.
6977 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
6978 (read_indirect_string_at_offset_from): Move to section.c.
6979 (read_indirect_string_at_offset): Rewrite.
6980 (read_indirect_line_string_at_offset): Remove.
6981 (read_indirect_string, read_indirect_line_string)
6982 (dwarf_decode_macro_bytes): Update.
6983
6984 2020-03-26 Tom Tromey <tom@tromey.com>
6985
6986 * dwarf2/section.h (struct dwarf2_section_info)
6987 <overload_complaint>: Declare.
6988 (dwarf2_section_buffer_overflow_complaint): Don't declare.
6989 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
6990 Rename from dwarf2_section_buffer_overflow_complaint.
6991 * dwarf2/read.c (skip_one_die, partial_die_info::read)
6992 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
6993
6994 2020-03-26 Tom Tromey <tom@tromey.com>
6995
6996 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
6997 Declare.
6998 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
6999 Move from read.c.
7000 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
7001 to section.c.
7002
7003 2020-03-26 Tom Tromey <tom@tromey.com>
7004
7005 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
7006
7007 2020-03-26 Tom Tromey <tom@tromey.com>
7008
7009 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
7010 "builder".
7011 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
7012 parameter.
7013 (dwarf_decode_macros): Update.
7014
7015 2020-03-26 Tom Tromey <tom@tromey.com>
7016
7017 * dwarf2/read.c (read_attribute_value): Update.
7018 (read_indirect_string_from_dwz): Move to dwz.c; change into
7019 method.
7020 (dwarf_decode_macro_bytes): Update.
7021 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
7022 * dwarf2/dwz.c: New file.
7023 * Makefile.in (COMMON_SFILES): Add dwz.c.
7024
7025 2020-03-26 Tom Tromey <tom@tromey.com>
7026
7027 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
7028 * dwarf2/read.c: Add include.
7029 * dwarf2/index-write.c: Add include.
7030 * dwarf2/index-cache.c: Add include.
7031 * dwarf2/dwz.h: New file.
7032
7033 2020-03-25 Tom Tromey <tom@tromey.com>
7034
7035 * compile/compile-object-load.c (get_out_value_type): Mention
7036 correct symbol name in error message.
7037
7038 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
7039
7040 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
7041
7042 2020-03-25 Tom de Vries <tdevries@suse.de>
7043
7044 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
7045 * symmisc.c (dump_symtab_1): Print user and includes fields.
7046 (maintenance_info_symtabs): Same.
7047
7048 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
7049
7050 PR gdb/25534
7051 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
7052 (riscv_regcache_cooked_write): New function.
7053 (riscv_push_dummy_call): Use new function.
7054 (riscv_return_value): Likewise.
7055
7056 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
7057
7058 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
7059 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
7060 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
7061 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
7062 * infrun.c (follow_fork): Likewise.
7063 (follow_fork_inferior): Likewise.
7064 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
7065 * linux-nat.h (class linux_nat_target): Likewise.
7066 * remote.c (class remote_target) <follow_fork>: Likewise.
7067 (remote_target::follow_fork): Likewise.
7068 * target-delegates.c: Re-generate.
7069 * target.c (default_follow_fork): Likewise.
7070 (target_follow_fork): Likewise.
7071 * target.h (struct target_ops) <follow_fork>: Likewise.
7072 (target_follow_fork): Likewise.
7073
7074 2020-03-24 Tom de Vries <tdevries@suse.de>
7075
7076 * psymtab.c (maintenance_info_psymtabs): Print user field.
7077
7078 2020-03-20 Tom Tromey <tromey@adacore.com>
7079
7080 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
7081 const.
7082 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
7083 const.
7084
7085 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
7086
7087 * ptrace.m4: Don't check for ptrace declaration.
7088 * config.in: Re-generate.
7089 * configure: Re-generate.
7090 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
7091 not defined.
7092
7093 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7094
7095 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
7096 `PTRACE_TYPE_RET'.
7097 * i386-bsd-nat.c (gdb_ptrace): Likewise.
7098 * sparc-nat.c (gdb_ptrace): Likewise.
7099 * x86-bsd-nat.c (gdb_ptrace): Likewise.
7100
7101 2020-03-20 Tom Tromey <tromey@adacore.com>
7102
7103 * c-exp.y (lex_one_token): Fix assert.
7104
7105 2020-03-20 Tom Tromey <tromey@adacore.com>
7106
7107 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
7108 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
7109 strncpy call.
7110
7111 2020-03-20 Tom Tromey <tromey@adacore.com>
7112
7113 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
7114
7115 2020-03-20 Tom Tromey <tromey@adacore.com>
7116
7117 * ada-valprint.c (print_variant_part): Remove parameters; switch
7118 to value-based API.
7119 (print_field_values): Likewise.
7120 (ada_val_print_struct_union): Likewise.
7121 (ada_value_print_1): Update.
7122
7123 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7124
7125 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
7126 nbsd_nat_target instead of inf_ptrace_target.
7127 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7128 nbsd_nat_target.
7129
7130 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7131
7132 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
7133 it to the ptrace call.
7134 * (store_registers): Likewise.
7135
7136 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7137
7138 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
7139 it to the ptrace call.
7140 * (store_registers): Likewise.
7141
7142 2020-03-19 Luis Machado <luis.machado@linaro.org>
7143
7144 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
7145 valid, fetch vg value from ptrace.
7146
7147 2020-03-19 Kamil Rytarowski <n54@gmx.com>
7148 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
7149 * inf-ptrace.c: Likewise.
7150 * (gdb_ptrace): Add.
7151 * (inf_ptrace_target::resume): Update.
7152 * (inf_ptrace_target::xfer_partial): Likewise.
7153 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
7154 * (inf_ptrace_peek_poke): Update.
7155
7156 2020-03-19 Kamil Rytarowski <n54@gmx.com>
7157
7158 * x86-bsd-nat.c (gdb_ptrace): New.
7159 * (x86bsd_dr_set): Add new argument `ptid'.
7160 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
7161 x86bsd_dr_set_addr): Update.
7162
7163 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7164
7165 * remote.c (remote_target::process_stop_reply): Handle events for
7166 all threads differently.
7167
7168 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7169
7170 * completer.c (completion_tracker::remove_completion): Define new
7171 function.
7172 * completer.h (completion_tracker::remove_completion): Declare new
7173 function.
7174 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
7175 when adding a C++ function symbol.
7176
7177 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7178
7179 * completer.c (completion_tracker::completion_hash_entry): Define
7180 new class.
7181 (advance_to_filename_complete_word_point): Call
7182 recompute_lowest_common_denominator.
7183 (completion_tracker::completion_tracker): Call discard_completions
7184 to setup the hash table.
7185 (completion_tracker::discard_completions): Allow for being called
7186 from the constructor, pass new equal function, and element deleter
7187 when constructing the hash table. Initialise new class member
7188 variables.
7189 (completion_tracker::maybe_add_completion): Remove use of
7190 m_entries_vec, and store more information into m_entries_hash.
7191 (completion_tracker::recompute_lcd_visitor): New function, most
7192 content taken from...
7193 (completion_tracker::recompute_lowest_common_denominator):
7194 ...here, this now just visits each item in the hash calling the
7195 above visitor.
7196 (completion_tracker::build_completion_result): Remove use of
7197 m_entries_vec, call recompute_lowest_common_denominator.
7198 * completer.h (completion_tracker::have_completions): Remove use
7199 of m_entries_vec.
7200 (completion_tracker::completion_hash_entry): Declare new class.
7201 (completion_tracker::recompute_lowest_common_denominator): Change
7202 function signature.
7203 (completion_tracker::recompute_lcd_visitor): Declare new function.
7204 (completion_tracker::m_entries_vec): Delete.
7205 (completion_tracker::m_entries_hash): Initialize to NULL.
7206 (completion_tracker::m_lowest_common_denominator_valid): New
7207 member variable.
7208 (completion_tracker::m_lowest_common_denominator_max_length): New
7209 member variable.
7210
7211 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7212
7213 * regformats/regdef.h: Put reg in gdb namespace.
7214
7215 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7216
7217 * i386-bsd-nat.c (gdb_ptrace): New.
7218 * (i386bsd_fetch_inferior_registers,
7219 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
7220 * (i386bsd_fetch_inferior_registers,
7221 i386bsd_store_inferior_registers) Use gdb_ptrace.
7222
7223 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7224
7225 * amd64-bsd-nat.c (gdb_ptrace): New.
7226 * (amd64bsd_fetch_inferior_registers,
7227 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
7228 * (amd64bsd_fetch_inferior_registers,
7229 amd64bsd_store_inferior_registers) Use gdb_ptrace.
7230
7231 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7232
7233 * user-regs.c (user_reg::read): Rename to...
7234 (user_reg::xread): ...this.
7235 * (append_user_reg): Rename argument `read' to `xread'.
7236 * (user_reg_add_builtin): Likewise.
7237 * (user_reg_add): Likewise.
7238 * (value_of_user_reg): Likewise.
7239
7240 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7241
7242 * sparc-nat.c (gdb_ptrace): New.
7243 * sparc-nat.c (sparc_fetch_inferior_registers)
7244 (sparc_store_inferior_registers) Remove obsolete comment.
7245 * sparc-nat.c (sparc_fetch_inferior_registers)
7246 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
7247 * sparc-nat.c (sparc_fetch_inferior_registers)
7248 (sparc_store_inferior_registers) Use gdb_ptrace.
7249
7250 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7251
7252 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
7253 it to the ptrace call.
7254 * sh-nbsd-nat.c (store_registers): Likewise.
7255
7256 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7257
7258 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
7259 nbsd_nat_target instead of inf_ptrace_target.
7260 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7261 nbsd_nat_target.
7262
7263 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7264
7265 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
7266
7267 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7268
7269 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
7270 <sys/sysctl.h>.
7271 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
7272
7273 2020-03-17 Tom de Vries <tdevries@suse.de>
7274
7275 PR gdb/23710
7276 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
7277 fields.
7278 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
7279 fields.
7280 (process_imported_unit_die): Skip import of c++ CUs.
7281
7282 2020-03-16 Tom Tromey <tom@tromey.com>
7283
7284 * p-valprint.c (pascal_object_print_value): Initialize
7285 base_value.
7286
7287 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
7288 Shahab Vahedi <shahab@synopsys.com>
7289
7290 * Makefile.in: Add arch/arc.o
7291 * configure.tgt: Likewise.
7292 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
7293 (_initialize_arc_tdep): Don't initialize old target descriptions.
7294 (arc_read_description): New function to cache target descriptions.
7295 * arc-tdep.h (arc_read_description): Add proto type.
7296 * arch/arc.c: New file.
7297 * arch/arc.h: Likewise.
7298 * features/Makefile: Replace old target descriptions with new.
7299 * features/arc-arcompact.c: Remove.
7300 * features/arc-arcompact.xml: Likewise.
7301 * features/arc-v2.c: Likewise
7302 * features/arc-v2.xml: Likewise
7303 * features/arc/aux-arcompact.xml: New file.
7304 * features/arc/aux-v2.xml: Likewise.
7305 * features/arc/core-arcompact.xml: Likewise.
7306 * features/arc/core-v2.xml: Likewise.
7307 * features/arc/aux-arcompact.c: Generate.
7308 * features/arc/aux-v2.c: Likewise.
7309 * features/arc/core-arcompact.c: Likewise.
7310 * features/arc/core-v2.c: Likewise.
7311 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
7312
7313 2020-03-16 Tom Tromey <tromey@adacore.com>
7314
7315 PR gdb/25663:
7316 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
7317 putting value into bcache.
7318
7319 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7320
7321 PR gdb/21500
7322 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
7323 to...
7324 (amd64_windows_init_abi_common): ... this. Don't set size of
7325 long type.
7326 (amd64_windows_init_abi): New function.
7327 (amd64_cygwin_init_abi): New function.
7328 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
7329 the Cygwin OS ABI.
7330 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
7331 comment.
7332
7333 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7334
7335 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
7336 * windows-tdep.c (CYGWIN_DLL_NAME): New.
7337 (pe_import_directory_entry): New struct type.
7338 (is_linked_with_cygwin_dll): New function.
7339 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
7340 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
7341 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
7342
7343 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7344
7345 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
7346 i386_cygwin_core_osabi_sniffer.
7347
7348 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7349
7350 * i386-cygwin-tdep.c: Rename to...
7351 * i386-windows-tdep.c: ... this.
7352 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
7353 i386-windows-tdep.c.
7354 * configure.tgt: Likewise.
7355
7356 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7357
7358 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
7359 * osabi.c (gdb_osabi_names): Add "Windows".
7360 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
7361 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
7362 (i386_cygwin_core_osabi_sniffer): New function, extracted from
7363 i386_cygwin_osabi_sniffer.
7364 (_initialize_i386_cygwin_tdep): Register OS ABI
7365 GDB_OSABI_WINDOWS for i386.
7366 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
7367 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
7368 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
7369 for x86-64.
7370 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
7371 when the target matches '*-*-mingw*'.
7372
7373 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7374
7375 * defs.h (enum gdb_osabi): Move to...
7376 * osabi.h (enum gdb_osabi): ... here.
7377 * gdbarch.sh: Include osabi.h in gdbarch.h.
7378 * gdbarch.h: Re-generate.
7379
7380 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7381
7382 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
7383 function.
7384 (_initialize_amd64_windows_tdep): Register osabi sniffer.
7385
7386 2020-03-14 Tom Tromey <tom@tromey.com>
7387
7388 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
7389 for C++.
7390 (c_type_print_modifier): Likewise. Add "language" parameter.
7391 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
7392 (c_type_print_base_1): Update.
7393 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
7394 constants.
7395 * type-stack.c (type_stack::insert): Handle tp_atomic and
7396 tp_restrict.
7397 (type_stack::follow_type_instance_flags): Likewise.
7398 (type_stack::follow_types): Likewise. Merge type-following code.
7399 * c-exp.y (RESTRICT, ATOMIC): New tokens.
7400 (space_identifier, cv_with_space_id)
7401 (const_or_volatile_or_space_identifier_noopt)
7402 (const_or_volatile_or_space_identifier): Remove.
7403 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
7404 rules.
7405 (ptr_operator, typebase): Update.
7406 (enum token_flag) <FLAG_C>: New constant.
7407 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
7408 "_Atomic".
7409 (lex_one_token): Handle FLAG_C.
7410
7411 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7412
7413 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
7414 it to the ptrace call.
7415 * m68k-bsd-nat.c (store_registers): Likewise.
7416
7417 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7418
7419 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
7420 gdb_byte *.
7421 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
7422 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
7423 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
7424
7425 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7426
7427 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
7428 nbsd_nat_target instead of inf_ptrace_target.
7429 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
7430 nbsd_nat_target.
7431
7432 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7433
7434 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
7435 register_t.
7436
7437 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7438
7439 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
7440 it to the ptrace call.
7441 * alpha-bsd-nat.c (store_registers): Likewise.
7442
7443 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7444
7445 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
7446 includes.
7447 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
7448 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
7449 fill_fpregset): Likewise.
7450
7451 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7452
7453 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
7454 nbsd_nat_target instead of inf_ptrace_target.
7455 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
7456 nbsd_nat_target.
7457
7458 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7459
7460 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
7461 register_t.
7462
7463 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7464
7465 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
7466 it to the ptrace call.
7467 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
7468 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
7469 * arm-nbsd-nat.c (store_register): Likewise.
7470 * arm-nbsd-nat.c (store_regs): Likewise.
7471 * arm-nbsd-nat.c (store_fp_register): Likewise.
7472 * arm-nbsd-nat.c (store_fp_regs): Likewise.
7473
7474 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7475
7476 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
7477 nbsd_nat_target instead of inf_ptrace_target.
7478 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7479 nbsd_nat_target.
7480
7481 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7482
7483 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
7484 it to the ptrace call.
7485 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
7486
7487 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7488
7489 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
7490 it to the ptrace call.
7491 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
7492
7493 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7494
7495 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
7496 gdb_byte *.
7497 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
7498
7499 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7500
7501 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
7502 instead of inf_ptrace_target.
7503 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
7504 nbsd_nat_target.
7505
7506 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7507
7508 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
7509 register_t.
7510
7511 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7512
7513 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
7514 register_t.
7515
7516 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7517
7518 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
7519 register_t.
7520
7521 2020-03-13 Tom Tromey <tom@tromey.com>
7522
7523 * value.h (val_print): Don't declare.
7524 * valprint.h (val_print_array_elements)
7525 (val_print_scalar_formatted, generic_val_print): Don't declare.
7526 * valprint.c (generic_val_print_array): Take a struct value.
7527 (generic_val_print_ptr, generic_val_print_memberptr)
7528 (generic_val_print_bool, generic_val_print_int)
7529 (generic_val_print_char, generic_val_print_complex)
7530 (generic_val_print): Remove.
7531 (generic_value_print): Update.
7532 (do_val_print): Remove unused parameters. Don't call
7533 la_val_print.
7534 (val_print): Remove.
7535 (common_val_print): Update. Don't call value_check_printable.
7536 (val_print_scalar_formatted, val_print_array_elements): Remove.
7537 * rust-lang.c (rust_val_print): Remove.
7538 (rust_language_defn): Update.
7539 * p-valprint.c (pascal_val_print): Remove.
7540 (pascal_value_print_inner): Update.
7541 (pascal_object_print_val_fields, pascal_object_print_val):
7542 Remove.
7543 (pascal_object_print_static_field): Update.
7544 * p-lang.h (pascal_val_print): Don't declare.
7545 * p-lang.c (pascal_language_defn): Update.
7546 * opencl-lang.c (opencl_language_defn): Update.
7547 * objc-lang.c (objc_language_defn): Update.
7548 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
7549 * m2-lang.h (m2_val_print): Don't declare.
7550 * m2-lang.c (m2_language_defn): Update.
7551 * language.h (struct language_defn) <la_val_print>: Remove.
7552 * language.c (unk_lang_value_print_inner): Rename. Change
7553 argument types.
7554 (unknown_language_defn, auto_language_defn): Update.
7555 * go-valprint.c (go_val_print): Remove.
7556 * go-lang.h (go_val_print): Don't declare.
7557 * go-lang.c (go_language_defn): Update.
7558 * f-valprint.c (f_val_print): Remove.
7559 * f-lang.h (f_value_print): Don't declare.
7560 * f-lang.c (f_language_defn): Update.
7561 * d-valprint.c (d_val_print): Remove.
7562 * d-lang.h (d_value_print): Don't declare.
7563 * d-lang.c (d_language_defn): Update.
7564 * cp-valprint.c (cp_print_value_fields)
7565 (cp_print_value_fields_rtti, cp_print_value): Remove.
7566 (cp_print_static_field): Update.
7567 * c-valprint.c (c_val_print_array, c_val_print_ptr)
7568 (c_val_print_struct, c_val_print_union, c_val_print_int)
7569 (c_val_print_memberptr, c_val_print): Remove.
7570 * c-lang.h (c_val_print_array, cp_print_value_fields)
7571 (cp_print_value_fields_rtti): Don't declare.
7572 * c-lang.c (c_language_defn, cplus_language_defn)
7573 (asm_language_defn, minimal_language_defn): Update.
7574 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
7575 (ada_val_print_enum): Take a struct value.
7576 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
7577 (ada_val_print): Remove.
7578 (ada_value_print_1): Update.
7579 (printable_val_type): Remove.
7580 * ada-lang.h (ada_val_print): Don't declare.
7581 * ada-lang.c (ada_language_defn): Update.
7582
7583 2020-03-13 Tom Tromey <tom@tromey.com>
7584
7585 * valprint.c (do_val_print): Update.
7586 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
7587 a struct value.
7588 (value_to_value_object_no_release): Declare.
7589 * python/py-value.c (value_to_value_object_no_release): New
7590 function.
7591 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
7592 struct value.
7593 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
7594 function.
7595 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
7596 a struct value.
7597 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
7598 Declare.
7599 (gdbscm_apply_val_pretty_printer): Take a struct value.
7600 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
7601 value.
7602 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
7603 value.
7604 * extension-priv.h (struct extension_language_ops)
7605 <apply_val_pretty_printer>: Take a struct value.
7606 * cp-valprint.c (cp_print_value): Create a struct value.
7607 (cp_print_value): Update.
7608
7609 2020-03-13 Tom Tromey <tom@tromey.com>
7610
7611 * ada-valprint.c (print_field_values): Call common_val_print.
7612
7613 2020-03-13 Tom Tromey <tom@tromey.com>
7614
7615 * ada-valprint.c (val_print_packed_array_elements): Remove
7616 bitoffset and val parameters. Call common_val_print.
7617 (ada_val_print_string): Remove offset, address, and original_value
7618 parameters.
7619 (ada_val_print_array): Update.
7620 (ada_value_print_array): New function.
7621 (ada_value_print_1): Call it.
7622
7623 2020-03-13 Tom Tromey <tom@tromey.com>
7624
7625 * ada-valprint.c (ada_value_print): Use common_val_print.
7626
7627 2020-03-13 Tom Tromey <tom@tromey.com>
7628
7629 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
7630
7631 2020-03-13 Tom Tromey <tom@tromey.com>
7632
7633 * ada-valprint.c (ada_value_print_num): New function.
7634 (ada_value_print_1): Use it.
7635
7636 2020-03-13 Tom Tromey <tom@tromey.com>
7637
7638 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
7639
7640 2020-03-13 Tom Tromey <tom@tromey.com>
7641
7642 * ada-valprint.c (ada_value_print_ptr): New function.
7643 (ada_value_print_1): Use it.
7644
7645 2020-03-13 Tom Tromey <tom@tromey.com>
7646
7647 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
7648 call common_val_print.
7649 (ada_val_print_1): Update.
7650 (ada_value_print_1): New function.
7651 (ada_value_print_inner): Rewrite.
7652
7653 2020-03-13 Tom Tromey <tom@tromey.com>
7654
7655 * cp-valprint.c (cp_print_value_fields): Update.
7656 (cp_print_value): New function.
7657
7658 2020-03-13 Tom Tromey <tom@tromey.com>
7659
7660 * m2-valprint.c (m2_value_print_inner): Use
7661 cp_print_value_fields.
7662 * cp-valprint.c (cp_print_value_fields): New function.
7663 * c-valprint.c (c_value_print_struct): New function.
7664 (c_value_print_inner): Use c_value_print_struct.
7665 * c-lang.h (cp_print_value_fields): Declare.
7666
7667 2020-03-13 Tom Tromey <tom@tromey.com>
7668
7669 * c-valprint.c (c_value_print_array): New function.
7670 (c_value_print_inner): Use it.
7671
7672 2020-03-13 Tom Tromey <tom@tromey.com>
7673
7674 * c-valprint.c (c_value_print_memberptr): New function.
7675 (c_value_print_inner): Use it.
7676
7677 2020-03-13 Tom Tromey <tom@tromey.com>
7678
7679 * c-valprint.c (c_value_print_int): 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_ptr): 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_inner): Rewrite.
7690
7691 2020-03-13 Tom Tromey <tom@tromey.com>
7692
7693 * valprint.c (generic_value_print_complex): New function.
7694 (generic_value_print): Use it.
7695
7696 2020-03-13 Tom Tromey <tom@tromey.com>
7697
7698 * valprint.c (generic_val_print_float): Don't call
7699 val_print_scalar_formatted.
7700 (generic_val_print, generic_value_print): Update.
7701
7702 2020-03-13 Tom Tromey <tom@tromey.com>
7703
7704 * valprint.c (generic_value_print_char): New function
7705 (generic_value_print): Use it.
7706
7707 2020-03-13 Tom Tromey <tom@tromey.com>
7708
7709 * valprint.c (generic_value_print_int): New function.
7710 (generic_value_print): Use it.
7711
7712 2020-03-13 Tom Tromey <tom@tromey.com>
7713
7714 * valprint.c (generic_value_print_bool): New function.
7715 (generic_value_print): Use it.
7716
7717 2020-03-13 Tom Tromey <tom@tromey.com>
7718
7719 * valprint.c (generic_val_print_func): Simplify.
7720 (generic_val_print, generic_value_print): Update.
7721
7722 2020-03-13 Tom Tromey <tom@tromey.com>
7723
7724 * valprint.c (generic_val_print_flags): Remove.
7725 (generic_val_print, generic_value_print): Update.
7726 (val_print_type_code_flags): Add original_value parameter.
7727
7728 2020-03-13 Tom Tromey <tom@tromey.com>
7729
7730 * valprint.c (generic_val_print): Update.
7731 (generic_value_print): Update.
7732 * valprint.c (generic_val_print_enum): Don't call
7733 val_print_scalar_formatted.
7734
7735 2020-03-13 Tom Tromey <tom@tromey.com>
7736
7737 * valprint.c (generic_value_print): Call generic_value_print_ptr.
7738 * valprint.c (generic_value_print_ptr): New function.
7739
7740 2020-03-13 Tom Tromey <tom@tromey.com>
7741
7742 * valprint.c (generic_value_print): Rewrite.
7743
7744 2020-03-13 Tom Tromey <tom@tromey.com>
7745
7746 * p-valprint.c (pascal_object_print_value_fields)
7747 (pascal_object_print_value): New functions.
7748
7749 2020-03-13 Tom Tromey <tom@tromey.com>
7750
7751 * p-valprint.c (pascal_value_print_inner): Rewrite.
7752
7753 2020-03-13 Tom Tromey <tom@tromey.com>
7754
7755 * f-valprint.c (f_value_print_innner): Rewrite.
7756
7757 2020-03-13 Tom Tromey <tom@tromey.com>
7758
7759 * m2-valprint.c (m2_print_unbounded_array): New overload.
7760 (m2_print_unbounded_array): Update.
7761 (m2_print_array_contents): Take a struct value.
7762 (m2_value_print_inner): Rewrite.
7763
7764 2020-03-13 Tom Tromey <tom@tromey.com>
7765
7766 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
7767 (d_value_print_inner): New function.
7768 * d-lang.h (d_value_print_inner): Declare.
7769 * d-lang.c (d_language_defn): Use d_value_print_inner.
7770
7771 2020-03-13 Tom Tromey <tom@tromey.com>
7772
7773 * go-valprint.c (go_value_print_inner): New function.
7774 * go-lang.h (go_value_print_inner): Declare.
7775 * go-lang.c (go_language_defn): Use go_value_print_inner.
7776
7777 2020-03-13 Tom Tromey <tom@tromey.com>
7778
7779 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
7780 API.
7781 (rust_val_print): Rewrite.
7782 (rust_value_print_inner): New function, from rust_val_print.
7783 (rust_language_defn): Use rust_value_print_inner.
7784
7785 2020-03-13 Tom Tromey <tom@tromey.com>
7786
7787 * ada-valprint.c (ada_value_print_inner): New function.
7788 * ada-lang.h (ada_value_print_inner): Declare.
7789 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
7790
7791 2020-03-13 Tom Tromey <tom@tromey.com>
7792
7793 * f-valprint.c (f_value_print_innner): New function.
7794 * f-lang.h (f_value_print_innner): Declare.
7795 * f-lang.c (f_language_defn): Use f_value_print_innner.
7796
7797 2020-03-13 Tom Tromey <tom@tromey.com>
7798
7799 * p-valprint.c (pascal_value_print_inner): New function.
7800 * p-lang.h (pascal_value_print_inner): Declare.
7801 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
7802
7803 2020-03-13 Tom Tromey <tom@tromey.com>
7804
7805 * m2-valprint.c (m2_value_print_inner): New function.
7806 * m2-lang.h (m2_value_print_inner): Declare.
7807 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
7808
7809 2020-03-13 Tom Tromey <tom@tromey.com>
7810
7811 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
7812 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
7813 * c-valprint.c (c_value_print_inner): New function.
7814 * c-lang.h (c_value_print_inner): Declare.
7815 * c-lang.c (c_language_defn, cplus_language_defn)
7816 (asm_language_defn, minimal_language_defn): Use
7817 c_value_print_inner.
7818
7819 2020-03-13 Tom Tromey <tom@tromey.com>
7820
7821 * p-valprint.c (pascal_object_print_value_fields): Now static.
7822 * p-lang.h (pascal_object_print_value_fields): Don't declare.
7823
7824 2020-03-13 Tom Tromey <tom@tromey.com>
7825
7826 * c-valprint.c (c_val_print_array): Simplify.
7827
7828 2020-03-13 Tom Tromey <tom@tromey.com>
7829
7830 * valprint.c (value_print_array_elements): New function.
7831 * valprint.h (value_print_array_elements): Declare.
7832
7833 2020-03-13 Tom Tromey <tom@tromey.com>
7834
7835 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
7836 * mips-tdep.c (mips_print_register): Use
7837 value_print_scalar_formatted.
7838
7839 2020-03-13 Tom Tromey <tom@tromey.com>
7840
7841 * valprint.h (value_print_scalar_formatted): Declare.
7842 * valprint.c (value_print_scalar_formatted): New function.
7843
7844 2020-03-13 Tom Tromey <tom@tromey.com>
7845
7846 * valprint.h (generic_value_print): Declare.
7847 * valprint.c (generic_value_print): New function.
7848
7849 2020-03-13 Tom Tromey <tom@tromey.com>
7850
7851 * valprint.c (do_val_print): Call la_value_print_inner, if
7852 available.
7853 * rust-lang.c (rust_language_defn): Update.
7854 * p-lang.c (pascal_language_defn): Update.
7855 * opencl-lang.c (opencl_language_defn): Update.
7856 * objc-lang.c (objc_language_defn): Update.
7857 * m2-lang.c (m2_language_defn): Update.
7858 * language.h (struct language_defn) <la_value_print_inner>: New
7859 member.
7860 * language.c (unknown_language_defn, auto_language_defn): Update.
7861 * go-lang.c (go_language_defn): Update.
7862 * f-lang.c (f_language_defn): Update.
7863 * d-lang.c (d_language_defn): Update.
7864 * c-lang.c (c_language_defn, cplus_language_defn)
7865 (asm_language_defn, minimal_language_defn): Update.
7866 * ada-lang.c (ada_language_defn): Update.
7867
7868 2020-03-13 Tom Tromey <tom@tromey.com>
7869
7870 * c-valprint.c (c_value_print): Use common_val_print.
7871
7872 2020-03-13 Tom Tromey <tom@tromey.com>
7873
7874 * cp-valprint.c (cp_print_static_field): Use common_val_print.
7875
7876 2020-03-13 Tom Tromey <tom@tromey.com>
7877
7878 * f-valprint.c (f77_print_array_1, f_val_print): Use
7879 common_val_print.
7880
7881 2020-03-13 Tom Tromey <tom@tromey.com>
7882
7883 * riscv-tdep.c (riscv_print_one_register_info): Use
7884 common_val_print.
7885
7886 2020-03-13 Tom Tromey <tom@tromey.com>
7887
7888 * mi/mi-main.c (output_register): Use common_val_print.
7889
7890 2020-03-13 Tom Tromey <tom@tromey.com>
7891
7892 * infcmd.c (default_print_one_register_info): Use
7893 common_val_print.
7894
7895 2020-03-13 Tom Tromey <tom@tromey.com>
7896
7897 * valprint.h (common_val_print_checked): Declare.
7898 * valprint.c (common_val_print_checked): New function.
7899 * stack.c (print_frame_arg): Use common_val_print_checked.
7900
7901 2020-03-13 Tom Tromey <tom@tromey.com>
7902
7903 * valprint.c (do_val_print): New function, from val_print.
7904 (val_print): Use do_val_print.
7905 (common_val_print): Use do_val_print.
7906
7907 2020-03-13 Tom Tromey <tom@tromey.com>
7908
7909 * valprint.c (value_print): Use scoped_value_mark.
7910
7911 2020-03-13 Tom de Vries <tdevries@suse.de>
7912
7913 PR symtab/25646
7914 * psymtab.c (partial_symtab::partial_symtab): Don't set
7915 globals_offset and statics_offset. Push element onto
7916 current_global_psymbols and current_static_psymbols stacks.
7917 (concat): New function.
7918 (end_psymtab_common): Set globals_offset and statics_offset. Pop
7919 element from current_global_psymbols and current_static_psymbols
7920 stacks. Concat popped elements to global_psymbols and
7921 static_symbols.
7922 (add_psymbol_to_list): Use current_global_psymbols and
7923 current_static_psymbols stacks.
7924 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
7925 current_static_psymbols fields.
7926
7927 2020-03-12 Christian Biesinger <cbiesinger@google.com>
7928
7929 * corelow.c (sniff_core_bfd): Remove.
7930 (class core_target) <m_core_vec>: Remove.
7931 (core_target::core_target): Update.
7932 (core_file_fns): Remove.
7933 (deprecated_add_core_fns): Remove.
7934 (default_core_sniffer): Remove.
7935 (sniff_core_bfd): Remove.
7936 (default_check_format): Remove.
7937 (gdb_check_format): Remove.
7938 (core_target_open): Update.
7939 (core_target::get_core_register_section): Update.
7940 (get_core_registers_cb): Update.
7941 (core_target::fetch_registers): Update.
7942 * gdbcore.h (struct core_fns): Remove.
7943 (deprecated_add_core_fns): Remove.
7944 (default_core_sniffer): Remove.
7945 (default_check_format): Remove.
7946
7947 2020-03-12 Tom Tromey <tom@tromey.com>
7948
7949 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
7950 CORE_ADDR.
7951 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
7952
7953 2020-03-12 Tom Tromey <tom@tromey.com>
7954
7955 * remote.c (remote_target::download_tracepoint)
7956 (remote_target::enable_tracepoint)
7957 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
7958 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
7959 sprintf_vma.
7960
7961 2020-03-12 Tom Tromey <tom@tromey.com>
7962
7963 * symfile-mem.c: Update CORE_ADDR size assert.
7964
7965 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7966
7967 * selftest.m4: Move to gdbsupport/.
7968 * acinclude.m4: Update path to selftest.m4.
7969
7970 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7971
7972 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
7973 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
7974 gdbarch-selfselftests.c and selftest-arch.c.
7975 (SUBDIR_UNITTESTS_OBS): Rename to...
7976 (SELFTESTS_OBS): ... this.
7977 (COMMON_SFILES): Remove disasm-selftests.c and
7978 gdbarch-selftests.c.
7979 * configure.ac: Don't add selftest-arch.{c,o} to
7980 CONFIG_{SRCS,OBS}.
7981 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
7982 preprocessor conditions.
7983
7984 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7985
7986 * configure.ac: Don't source bfd/development.sh.
7987 * selftest.m4: Modify comment.
7988 * configure: Re-generate.
7989
7990 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
7991
7992 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
7993 not "true" or "false".
7994 * configure: Re-generate.
7995
7996 2020-03-12 Christian Biesinger <cbiesinger@google.com>
7997
7998 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
7999 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
8000 renamed to arm_nbsd_supply_gregset.
8001 (fetch_register): Update to call arm_nbsd_supply_gregset.
8002 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
8003 (arm_netbsd_nat_target::fetch_registers): Update.
8004 (fetch_elfcore_registers): Removed.
8005 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
8006 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
8007 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
8008 not require NetBSD system headers.
8009 (arm_nbsd_regset): New struct.
8010 (arm_nbsd_iterate_over_regset_sections): New function.
8011 (arm_netbsd_init_abi_common): Updated to call
8012 set_gdbarch_iterate_over_regset_sections.
8013 * arm-nbsd-tdep.h: New file.
8014
8015 2020-03-11 Kevin Buettner <kevinb@redhat.com>
8016
8017 * symtab.c (find_pc_sect_line): Add check which prevents infinite
8018 recursion.
8019
8020 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
8021
8022 * configure: Re-generate.
8023
8024 2020-03-11 Tom Tromey <tromey@adacore.com>
8025
8026 * ada-typeprint.c (print_choices): Fix comment.
8027
8028 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
8029
8030 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
8031 previous item in the list, when the list has no items.
8032
8033 2020-03-11 Tom de Vries <tdevries@suse.de>
8034
8035 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
8036 PROP_LOCLIST handling code.
8037
8038 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
8039
8040 * buildsym-legacy.c (record_line): Pass extra parameter to
8041 record_line.
8042 * buildsym.c (buildsym_compunit::record_line): Take an extra
8043 parameter, reduce duplication in the line table, and record the
8044 is_stmt flag in the line table.
8045 * buildsym.h (buildsym_compunit::record_line): Add extra
8046 parameter.
8047 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
8048 non-statement lines.
8049 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
8050 this to the symtab builder.
8051 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
8052 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
8053 through to dwarf_record_line_1.
8054 * infrun.c (process_event_stop_test): When stepping, don't stop at
8055 a non-statement instruction, and only refresh the step info when
8056 we land in the middle of a line's range. Also add an extra
8057 comment.
8058 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
8059 field.
8060 * record-btrace.c (btrace_find_line_range): Only record lines
8061 marked as is-statement.
8062 * stack.c (frame_show_address): Show the frame address if we are
8063 in a non-statement sal.
8064 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
8065 (maintenance_print_one_line_table): Print a header for the is_stmt
8066 column, and include is_stmt information in the output.
8067 * symtab.c (find_pc_sect_line): Find lines marked as statements in
8068 preference to non-statements.
8069 (find_pcs_for_symtab_line): Prefer is-statement entries.
8070 (find_line_common): Likewise.
8071 * symtab.h (struct linetable_entry): Add is_stmt field.
8072 (struct symtab_and_line): Likewise.
8073 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
8074 arranging the line table.
8075
8076 2020-03-07 Tom de Vries <tdevries@suse.de>
8077
8078 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
8079 DIE.
8080
8081 2020-03-07 Tom Tromey <tom@tromey.com>
8082
8083 * valops.c (value_literal_complex): Remove obsolete comment.
8084 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
8085 comment.
8086
8087 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8088
8089 * infrun.h: Forward-declare thread_info.
8090 (set_step_info): Add thread_info parameter, add doc.
8091 * infrun.c (set_step_info): Add thread_info parameter, move doc
8092 to header.
8093 * infrun.c (process_event_stop_test): Pass thread to
8094 set_step_info call.
8095 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
8096 set_step_info.
8097 (prepare_one_step): Add thread_info parameter, pass it to
8098 set_step_frame and prepare_one_step (recursive) call.
8099 (step_1): Pass thread to prepare_one_step call.
8100 (step_command_fsm::should_stop): Pass thread to
8101 prepare_one_step.
8102 (until_next_fsm): Pass thread to set_step_frame call.
8103 (finish_command): Pass thread to set_step_info call.
8104
8105 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
8106
8107 * windows-tdep.c (windows_solib_create_inferior_hook):
8108 Check if inferior is running.
8109
8110 2020-03-06 Tom de Vries <tdevries@suse.de>
8111
8112 * NEWS: Fix "the the".
8113 * ctfread.c: Same.
8114
8115 2020-03-06 Tom de Vries <tdevries@suse.de>
8116
8117 * psymtab.c (psymtab_to_symtab): Don't print "done.".
8118
8119 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8120
8121 * .dir-locals.el: Add a comment referencing the other copies of
8122 this file.
8123
8124 2020-03-05 John Baldwin <jhb@FreeBSD.org>
8125
8126 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
8127 psargs.
8128
8129 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
8130
8131 * .gitattributes: New file.
8132
8133 2020-03-04 Tom Tromey <tom@tromey.com>
8134
8135 * symmisc.c (print_symbol_bcache_statistics)
8136 (print_objfile_statistics): Update.
8137 * symfile.c (allocate_symtab): Use intern.
8138 * psymtab.c (partial_symtab::partial_symtab): Use intern.
8139 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
8140 macro_cache>: Remove.
8141 <string_cache>: New member.
8142 (struct objfile) <intern>: New methods.
8143 * elfread.c (elf_symtab_read): Use intern.
8144 * dwarf2/read.c (fixup_go_packaging): Intern package name.
8145 (dwarf2_compute_name, dwarf2_physname)
8146 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
8147 names.
8148 (guess_partial_die_structure_name): Update.
8149 (partial_die_info::fixup): Intern name.
8150 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
8151 name.
8152 (dwarf2_name): Intern name. Update.
8153 * buildsym.c (buildsym_compunit::get_macro_table): Use
8154 string_cache.
8155
8156 2020-03-04 Tom Tromey <tom@tromey.com>
8157
8158 * jit.c (bfd_open_from_target_memory): Make "target" const.
8159 * corefile.c (gnutarget): Now const.
8160 * gdbcore.h (gnutarget): Now const.
8161
8162 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
8163
8164 * NEWS: Mention support for WOW64 processes.
8165 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
8166 (amd64_windows_segment_register_p): Remove static.
8167 (_initialize_amd64_windows_nat): Update.
8168 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
8169 * i386-windows-nat.c (context_offset): Update.
8170 (i386_mappings): Rename and remove static.
8171 (i386_windows_segment_register_p): Remove static.
8172 (_initialize_i386_windows_nat): Update.
8173 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
8174 (STATUS_WX86_SINGLE_STEP): New macro.
8175 (EnumProcessModulesEx): New macro.
8176 (Wow64SuspendThread): New macro.
8177 (Wow64GetThreadContext): New macro.
8178 (Wow64SetThreadContext): New macro.
8179 (Wow64GetThreadSelectorEntry): New macro.
8180 (windows_set_context_register_offsets): Add static.
8181 (windows_set_segment_register_p): Likewise.
8182 (windows_add_thread): Adapt for WOW64 processes.
8183 (windows_fetch_one_register): Likewise.
8184 (windows_nat_target::fetch_registers): Likewise.
8185 (windows_store_one_register): Likewise.
8186 (display_selector): Likewise.
8187 (display_selectors): Likewise.
8188 (handle_exception): Likewise.
8189 (windows_continue): Likewise.
8190 (windows_nat_target::resume): Likewise.
8191 (windows_add_all_dlls): Likewise.
8192 (do_initial_windows_stuff): Likewise.
8193 (windows_nat_target::attach): Likewise.
8194 (windows_get_exec_module_filename): Likewise.
8195 (windows_nat_target::create_inferior): Likewise.
8196 (windows_xfer_siginfo): Likewise.
8197 (_initialize_loadable): Initialize Wow64SuspendThread,
8198 Wow64GetThreadContext, Wow64SetThreadContext,
8199 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
8200 * windows-nat.h (windows_set_context_register_offsets):
8201 Remove declaration.
8202 (windows_set_segment_register_p): Likewise.
8203 (i386_windows_segment_register_p): Add declaration.
8204 (amd64_windows_segment_register_p): Likewise.
8205
8206 2020-03-04 Luis Machado <luis.machado@linaro.org>
8207
8208 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
8209 in "info registers" for AArch64/ARM.
8210
8211 The change caused "info registers" to not print GPR's.
8212
8213 gdb/ChangeLog:
8214
8215 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
8216
8217 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
8218 when reg->group is empty and reggroup is not.
8219
8220 2020-03-03 Tom Tromey <tromey@adacore.com>
8221
8222 * dwarf2/frame.c (struct dwarf2_frame_cache)
8223 <checked_tailcall_bottom, entry_cfa_sp_offset,
8224 entry_cfa_sp_offset_p>: Remove members.
8225 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
8226 (dwarf2_frame_prev_register): Don't call
8227 dwarf2_tailcall_sniffer_first.
8228 (dwarf2_append_unwinders): Don't append tailcall unwinder.
8229 * frame-unwind.c (add_unwinder): New fuction.
8230 (frame_unwind_init): Use it. Add tailcall unwinder.
8231
8232 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
8233 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8234
8235 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
8236 value should be printed as true.
8237
8238 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
8239
8240 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
8241 (windows_init_abi): Set and use windows_so_ops.
8242
8243 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
8244
8245 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
8246 when verifying if dealing with a convenience variable.
8247
8248 2020-03-03 Luis Machado <luis.machado@linaro.org>
8249
8250 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
8251
8252 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8253
8254 * infrun.c (gdbarch_supports_displaced_stepping): New.
8255 (use_displaced_stepping): Break up conditions in smaller pieces.
8256 Use gdbarch_supports_displaced_stepping.
8257 (displaced_step_prepare_throw): Use
8258 gdbarch_supports_displaced_stepping.
8259
8260 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
8261
8262 * NEWS: Mention new behaviour of the history filename.
8263 * top.c (write_history_p): Add comment.
8264 (show_write_history_p): Add header comment, give a different
8265 message when history writing is on, but the history filename is
8266 empty.
8267 (history_filename): Add comment.
8268 (history_filename_empty): New function.
8269 (show_history_filename): Add header comment, give a different
8270 message when the filename is empty.
8271 (init_history): Compare history_filename against nullptr, and only
8272 read history if the filename is not empty.
8273 (set_history_filename): Add header comment, and only make
8274 non-empty filenames absolute.
8275 (init_main): Make the filename argument to 'set history filename'
8276 optional.
8277
8278 2020-03-02 Christian Biesinger <cbiesinger@google.com>
8279
8280 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
8281 (arm_supply_vfpregset): ...this, and update to use VFP registers.
8282 (fetch_fp_register): Update.
8283 (fetch_fp_regs): Update.
8284 (store_fp_register): Update.
8285 (store_fp_regs): Update.
8286 (arm_netbsd_nat_target::read_description): New function.
8287 (fetch_elfcore_registers): Update.
8288
8289 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
8290
8291 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
8292 general_thread if the stop reply is missing a thread-id.
8293 (remote_target::process_stop_reply): Use the first non-exited
8294 thread if the target didn't pass a thread-id.
8295 * infrun.c (do_target_wait): Move call to
8296 switch_to_inferior_no_thread to ....
8297 (do_target_wait_1): ... here.
8298
8299 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
8300
8301 * debuginfod-support.c: Include defs.h first.
8302
8303 2020-02-28 Tom de Vries <tdevries@suse.de>
8304
8305 * symfile.c (set_initial_language): Use default language for lookup.
8306
8307 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
8308
8309 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
8310 reader variable, pass `this` to read_cutu_die_from_dwo.
8311
8312 2020-02-27 Aaron Merey <amerey@redhat.com>
8313
8314 * source.c (open_source_file): Check for nullptr when computing
8315 srcpath.
8316
8317 2020-02-27 Tom Tromey <tromey@adacore.com>
8318
8319 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
8320 member.
8321 (dwarf2_add_field): Don't update nfields.
8322 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
8323
8324 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
8325
8326 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
8327 abs.
8328
8329 2020-02-26 Tom Tromey <tom@tromey.com>
8330
8331 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
8332 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
8333 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
8334 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
8335 per_cu_data.
8336
8337 2020-02-26 Tom Tromey <tom@tromey.com>
8338
8339 * dwarf2/index-write.c (psym_index_map): Change type.
8340 (add_address_entry_worker, write_one_signatured_type)
8341 (recursively_count_psymbols, recursively_write_psymbols)
8342 (class debug_names, psyms_seen_size, write_gdbindex)
8343 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
8344
8345 2020-02-26 Aaron Merey <amerey@redhat.com>
8346
8347 * Makefile.in: Handle optional debuginfod support.
8348 * NEWS: Update.
8349 * README: Add --with-debuginfod summary.
8350 * config.in: Regenerate.
8351 * configure: Regenerate.
8352 * configure.ac: Handle optional debuginfod support.
8353 * debuginfod-support.c: debuginfod helper functions.
8354 * debuginfod-support.h: Ditto.
8355 * doc/gdb.texinfo: Add --with-debuginfod to configure options
8356 summary.
8357 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
8358 when a dwz file cannot be found.
8359 * elfread.c (elf_symfile_read): Query debuginfod servers when a
8360 debuginfo file cannot be found.
8361 * source.c (open_source_file): Query debuginfod servers when a
8362 source file cannot be found.
8363 * top.c (print_gdb_configuration): Include
8364 --{with,without}-debuginfod in the output.
8365
8366 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8367
8368 * thread.c (thr_try_catch_cmd): Print thread name.
8369
8370 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
8371
8372 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
8373 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8374 dwarf2_fetch_die_type_sect_off): Move to...
8375 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
8376 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8377 dwarf2_fetch_die_type_sect_off): ... here.
8378 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
8379 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8380 dwarf2_fetch_die_type_sect_off): Move doc to header file.
8381
8382 2020-02-26 Tom de Vries <tdevries@suse.de>
8383
8384 PR gdb/25603
8385 * symfile.c (set_initial_language): Exit-early if
8386 language_mode == language_mode_manual.
8387
8388 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
8389
8390 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
8391 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
8392 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
8393
8394 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
8395
8396 * gdbtypes.c (create_array_type_with_stride): Handle negative
8397 array strides.
8398 * valarith.c (value_subscripted_rvalue): Likewise.
8399
8400 2020-02-25 Luis Machado <luis.machado@linaro.org>
8401
8402 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
8403
8404 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
8405
8406 * loc.h (dwarf2_get_die_type): Move to...
8407 * read.h (dwarf2_get_die_type): ... here.
8408 * read.c (dwarf2_get_die_type): Move doc to header.
8409
8410 2020-02-25 Joel Brobecker <brobecker@adacore.com>
8411
8412 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
8413 'gnulib/Makefile.in' to the list.
8414
8415 2020-02-24 Tom Tromey <tom@tromey.com>
8416
8417 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
8418 Remove.
8419 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
8420 XOBNEWVEC.
8421
8422 2020-02-24 Tom Tromey <tom@tromey.com>
8423
8424 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
8425 New method.
8426 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
8427 (dw2_do_instantiate_symtab, dw2_get_file_names)
8428 (build_type_psymtab_dependencies, load_full_type_unit): Update.
8429
8430 2020-02-24 Tom Tromey <tom@tromey.com>
8431
8432 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
8433 make_scoped_restore.
8434 (dwarf2_psymtab::read_symtab): Don't clear
8435 reading_partial_symbols.
8436
8437 2020-02-24 Tom de Vries <tdevries@suse.de>
8438
8439 PR gdb/25592
8440 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
8441
8442 2020-02-24 Tom de Vries <tdevries@suse.de>
8443
8444 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
8445 commands layout next/prev/regs.
8446
8447 2020-02-22 Tom Tromey <tom@tromey.com>
8448
8449 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
8450 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
8451
8452 2020-02-22 Tom Tromey <tom@tromey.com>
8453
8454 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
8455
8456 2020-02-22 Tom Tromey <tom@tromey.com>
8457
8458 * tui/tui-win.c (_initialize_tui_win): Add usage text.
8459 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
8460 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
8461 * tui/tui.c (_initialize_tui): Add usage text.
8462
8463 2020-02-22 Tom Tromey <tom@tromey.com>
8464
8465 * tui/tui-win.c (tui_set_focus_command)
8466 (tui_set_win_height_command): Use error_no_arg.
8467 (_initialize_tui_win): Update help text.
8468 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
8469
8470 2020-02-22 Tom Tromey <tom@tromey.com>
8471
8472 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
8473 * tui/tui-disasm.h (struct tui_disasm_window)
8474 <display_start_addr>: Declare.
8475 * tui/tui-source.h (struct tui_source_window)
8476 <display_start_addr>: Declare.
8477 * tui/tui-winsource.h (struct tui_source_window_base)
8478 <show_source_line, display_start_addr>: New methods.
8479 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
8480 Rename and move to protected section.
8481 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
8482 (tui_source_window_base::do_erase_source_content): Update.
8483 (tui_source_window_base::show_source_line): Now a method.
8484 (tui_source_window_base::show_source_content)
8485 (tui_source_window_base::tui_source_window_base)
8486 (tui_source_window_base::rerender)
8487 (tui_source_window_base::refill)
8488 (tui_source_window_base::do_scroll_horizontal)
8489 (tui_source_window_base::set_is_exec_point_at)
8490 (tui_source_window_base::update_breakpoint_info)
8491 (tui_source_window_base::update_exec_info): Update.
8492 * tui/tui-source.c (tui_source_window::set_contents)
8493 (tui_source_window::showing_source_p)
8494 (tui_source_window::do_scroll_vertical)
8495 (tui_source_window::location_matches_p)
8496 (tui_source_window::line_is_displayed): Update.
8497 (tui_source_window::display_start_addr): New method.
8498 * tui/tui-disasm.c (tui_disasm_window::set_contents)
8499 (tui_disasm_window::do_scroll_vertical)
8500 (tui_disasm_window::location_matches_p): Update.
8501 (tui_disasm_window::display_start_addr): New method.
8502
8503 2020-02-22 Tom Tromey <tom@tromey.com>
8504
8505 * NEWS: Add entry for gdb.register_window_type.
8506 * tui/tui-layout.h (window_factory): New typedef.
8507 (tui_register_window): Declare.
8508 * tui/tui-layout.c (saved_tui_windows): New global.
8509 (tui_apply_current_layout): Use it.
8510 (tui_register_window): New function.
8511 * python/python.c (do_start_initialization): Call
8512 gdbpy_initialize_tui.
8513 (python_GdbMethods): Add "register_window_type" function.
8514 * python/python-internal.h (gdbpy_register_tui_window)
8515 (gdbpy_initialize_tui): Declare.
8516 * python/py-tui.c: New file.
8517 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
8518
8519 2020-02-22 Tom Tromey <tom@tromey.com>
8520
8521 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
8522
8523 2020-02-22 Tom Tromey <tom@tromey.com>
8524
8525 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
8526 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
8527 * tui/tui-data.c (tui_set_win_with_focus): Remove.
8528 (tui_set_win_focus_to): Move from tui-win.c.
8529
8530 2020-02-22 Tom Tromey <tom@tromey.com>
8531
8532 * tui/tui-layout.c (make_standard_window, get_locator_window): New
8533 functions.
8534 (known_window_types): New global.
8535 (tui_get_window_by_name): Reimplement.
8536 (initialize_known_windows): New function.
8537 (validate_window_name): Rewrite.
8538 (_initialize_tui_layout): Call initialize_known_windows.
8539
8540 2020-02-22 Tom Tromey <tom@tromey.com>
8541
8542 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
8543 Remove constants.
8544 * tui/tui-winsource.h (struct tui_source_window_base)
8545 <tui_source_window_base>: Remove parameter.
8546 * tui/tui-winsource.c
8547 (tui_source_window_base::tui_source_window_base): Remove
8548 parameter.
8549 (tui_source_window_base::refill): Update.
8550 * tui/tui-stack.h (struct tui_locator_window)
8551 <tui_locator_window>: Update.
8552 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
8553 Default the constructor.
8554 * tui/tui-regs.h (struct tui_data_item_window)
8555 <tui_data_item_window>: Default the constructor.
8556 (struct tui_data_window) <tui_data_window>: Likewise.
8557 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
8558 Default the constructor.
8559 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
8560 Default the constructor.
8561 <type>: Remove.
8562 (struct tui_win_info) <tui_win_info>: Default the constructor.
8563 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
8564 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
8565 Default the constructor.
8566
8567 2020-02-22 Tom Tromey <tom@tromey.com>
8568
8569 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
8570 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
8571 * tui/tui-win.c (tui_resize_all): Don't call
8572 tui_delete_invisible_windows.
8573 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
8574 done.
8575 (tui_set_layout): Update.
8576 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
8577 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
8578 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
8579
8580 2020-02-22 Tom Tromey <tom@tromey.com>
8581
8582 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
8583 correctly.
8584
8585 2020-02-22 Tom Tromey <tom@tromey.com>
8586
8587 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
8588
8589 2020-02-22 Tom Tromey <tom@tromey.com>
8590
8591 * tui/tui-winsource.h (struct tui_source_window_iterator)
8592 <inner_iterator>: New etytypedef.
8593 <tui_source_window_iterator>: Take "end" parameter.
8594 <tui_source_window_iterator>: Take iterator.
8595 <operator*, advance>: Update.
8596 <m_iter>: Change type.
8597 <m_end>: New field.
8598 (struct tui_source_windows) <begin, end>: Update.
8599 * tui/tui-layout.c (tui_windows): New global.
8600 (tui_apply_current_layout): Clear tui_windows.
8601 (tui_layout_window::apply): Update tui_windows.
8602 * tui/tui-data.h (tui_windows): Declare.
8603 (all_tui_windows): Now inline function.
8604 (class tui_window_iterator, struct all_tui_windows): Remove.
8605
8606 2020-02-22 Tom Tromey <tom@tromey.com>
8607
8608 PR tui/17850:
8609 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
8610 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
8611 "height" argument.
8612 (class tui_layout_window) <get_sizes>: Likewise.
8613 (class tui_layout_split) <tui_layout_split>: Add "vertical"
8614 argument.
8615 <get_sizes>: Add "height" argument.
8616 <m_vertical>: New field.
8617 * tui/tui-layout.c (tui_layout_split::clone): Update.
8618 (tui_layout_split::get_sizes): Add "height" argument.
8619 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
8620 (tui_new_layout_command): Parse "-horizontal".
8621 (_initialize_tui_layout): Update help string.
8622 (tui_layout_split::specification): Add "-horizontal" when needed.
8623 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
8624 argument.
8625 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
8626 New methods.
8627
8628 2020-02-22 Tom Tromey <tom@tromey.com>
8629
8630 * tui/tui-layout.h (enum tui_adjust_result): New.
8631 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
8632 (class tui_layout_window) <adjust_size>: Return
8633 tui_adjust_result. Rewrite.
8634 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
8635 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
8636
8637 2020-02-22 Tom Tromey <tom@tromey.com>
8638
8639 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
8640 parameter and return types.
8641 (class tui_layout_base) <specification>: Add "depth".
8642 (class tui_layout_window) <specification>: Add "depth".
8643 (class tui_layout_split) <specification>: Add "depth".
8644 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
8645 and return types.
8646 (tui_new_layout_command): Parse sub-layouts.
8647 (_initialize_tui_layout): Update help string.
8648 (tui_layout_window::specification): Add "depth".
8649 (add_layout_command): Update.
8650
8651 2020-02-22 Tom Tromey <tom@tromey.com>
8652
8653 * NEWS: Add "tui new-layout" item.
8654 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
8655 Add new-layout command to help text.
8656 (validate_window_name): New function.
8657 (tui_new_layout_command): New function.
8658 (_initialize_tui_layout): Register "new-layout".
8659 (tui_layout_window::specification): New method.
8660 (tui_layout_window::specification): New method.
8661 * tui/tui-layout.h (class tui_layout_base) <specification>: New
8662 method.
8663 (class tui_layout_window) <specification>: New method.
8664 (class tui_layout_split) <specification>: New method.
8665
8666 2020-02-22 Tom Tromey <tom@tromey.com>
8667
8668 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
8669 * tui/tui-win.c (window_name_completer): Update comment.
8670 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
8671 Declare method.
8672 (class tui_layout_window) <replace_window>: Likewise.
8673 (class tui_layout_split) <replace_window>: Likewise.
8674 (tui_set_layout): Don't declare.
8675 (tui_set_initial_layout): Declare function.
8676 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
8677 (asm_regs_layout): New globals.
8678 (tui_current_layout, show_layout): Remove.
8679 (tui_set_layout, tui_add_win_to_layout): Rewrite.
8680 (find_layout, tui_apply_layout): New function.
8681 (layout_completer): Remove.
8682 (tui_next_layout): Reimplement.
8683 (tui_next_layout_command): New function.
8684 (tui_set_initial_layout, tui_prev_layout_command): New functions.
8685 (tui_regs_layout): Reimplement.
8686 (tui_regs_layout_command): New function.
8687 (extract_display_start_addr): Rewrite.
8688 (next_layout, prev_layout): Remove.
8689 (tui_layout_window::replace_window): New method.
8690 (tui_layout_split::replace_window): New method.
8691 (destroy_layout): New function.
8692 (layout_list): New global.
8693 (add_layout_command): New function.
8694 (initialize_layouts): Update.
8695 (tui_layout_command): New function.
8696 (_initialize_tui_layout): Install "layout" commands.
8697 * tui/tui-data.h (enum tui_layout_type): Remove.
8698 (tui_current_layout): Don't declare.
8699
8700 2020-02-22 Tom Tromey <tom@tromey.com>
8701
8702 * tui/tui-regs.c (tui_reg_layout): Remove.
8703 (tui_reg_command): Use tui_regs_layout.
8704 * tui/tui-layout.h (tui_reg_command): Declare.
8705 * tui/tui-layout.c (tui_reg_command): New function.
8706
8707 2020-02-22 Tom Tromey <tom@tromey.com>
8708
8709 * tui/tui.c (tui_rl_delete_other_windows): Call
8710 tui_remove_some_windows.
8711 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
8712 Declare method.
8713 (class tui_layout_window) <remove_windows>: New method.
8714 (class tui_layout_split) <remove_windows>: Declare.
8715 (tui_remove_some_windows): Declare.
8716 * tui/tui-layout.c (tui_remove_some_windows): New function.
8717 (tui_layout_split::remove_windows): New method.
8718
8719 2020-02-22 Tom Tromey <tom@tromey.com>
8720
8721 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
8722 * tui/tui-layout.h (tui_next_layout): Declare.
8723 * tui/tui-layout.c (tui_next_layout): New function.
8724
8725 2020-02-22 Tom Tromey <tom@tromey.com>
8726
8727 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
8728 correct coordinates.
8729
8730 2020-02-22 Tom Tromey <tom@tromey.com>
8731
8732 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
8733 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
8734 DATA_WIN case.
8735
8736 2020-02-22 Tom Tromey <tom@tromey.com>
8737
8738 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
8739 TUI_DISASM_WIN, not tui_win_list.
8740
8741 2020-02-22 Tom Tromey <tom@tromey.com>
8742
8743 * valprint.c (generic_val_print_enum_1)
8744 (val_print_type_code_flags): Style member names.
8745 * rust-lang.c (val_print_struct, rust_print_enum)
8746 (rust_print_struct_def, rust_internal_print_type): Style member
8747 names.
8748 * p-valprint.c (pascal_object_print_value_fields): Style member
8749 names. Only call fprintf_symbol_filtered for static members.
8750 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
8751 * f-valprint.c (f_val_print): Style member names.
8752 * f-typeprint.c (f_type_print_base): Style member names.
8753 * cp-valprint.c (cp_print_value_fields): Style member names. Only
8754 call fprintf_symbol_filtered for static members.
8755 (cp_print_class_member): Style member names.
8756 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
8757 member names.
8758 * ada-valprint.c (ada_print_scalar): Style enum names.
8759 (ada_val_print_enum): Likewise.
8760 * ada-typeprint.c (print_enum_type): Style enum names.
8761
8762 2020-02-21 Tom Tromey <tom@tromey.com>
8763
8764 * psympriv.h (struct partial_symtab): Update comment.
8765
8766 2020-02-21 Tom Tromey <tromey@adacore.com>
8767
8768 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
8769 type is CORE_ADDR.
8770
8771 2020-02-21 Tom de Vries <tdevries@suse.de>
8772
8773 PR gdb/25534
8774 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
8775 if dependencies[i]->user != NULL.
8776
8777 2020-02-21 Ali Tamur <tamur@google.com>
8778
8779 * dwarf2/read.c (dwarf2_name): Add null check.
8780
8781 2020-02-20 Tom Tromey <tom@tromey.com>
8782
8783 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
8784 ">=", in binary search.
8785 (dwarf2_find_containing_comp_unit): New overload.
8786 (run_test): New self-test.
8787 (_initialize_dwarf2_read): Register new test.
8788
8789 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
8790
8791 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
8792 * riscv-tdep.h: Likewise.
8793 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
8794 rv32-only CSR.
8795 * features/riscv/64bit-csr.xml: Regenerated.
8796
8797 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
8798 Tom Tromey <tom@tromey.com>
8799
8800 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
8801 of 'fputc_unfiltered'.
8802 (putchar_unfiltered): Call 'fputc_unfiltered'.
8803 (fputc_unfiltered): Call 'fputs_unfiltered'.
8804
8805 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
8806
8807 * config.in: Regenerate.
8808 * configure: Regenerate.
8809 * configure.ac: Add --with-python-libdir option.
8810 * main.c: Use WITH_PYTHON_LIBDIR.
8811
8812 2020-02-19 Tom Tromey <tom@tromey.com>
8813
8814 * symtab.c (general_symbol_info::compute_and_set_names): Use
8815 obstack_strndup. Simplify call to symbol_set_demangled_name.
8816
8817 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
8818
8819 * dwarf2/read.c (allocate_signatured_type_table,
8820 allocate_dwo_unit_table, allocate_type_unit_groups_table,
8821 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
8822 Remove objfile parameter, update all callers.
8823
8824 2020-02-19 Doug Evans <dje@google.com>
8825
8826 PR rust/25535
8827 * rust-lang.c (rust_print_enum): Apply embedded_offset to
8828 rust_enum_variant calculation.
8829
8830 2020-02-19 Tom Tromey <tromey@adacore.com>
8831
8832 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
8833
8834 2020-02-19 Tom Tromey <tromey@adacore.com>
8835
8836 * ada-lang.c (cache_symbol): Use obstack_strdup.
8837
8838 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
8839
8840 * configure: Regenerate.
8841
8842 2020-02-19 Tom Tromey <tromey@adacore.com>
8843
8844 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
8845 NULL check.
8846
8847 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
8848
8849 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
8850
8851 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
8852
8853 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
8854 if GDBSERVER is not defined.
8855 (riscv_tdesc_cache): Likewise, also store const target_desc.
8856 (STATIC_IN_GDB): Define.
8857 (riscv_create_target_description): Update declaration with
8858 STATIC_IN_GDB.
8859 (riscv_lookup_target_description): New function, only define if
8860 GDBSERVER is not defined.
8861 * arch/riscv.h (riscv_create_target_description): Declare only
8862 when GDBSERVER is defined.
8863 (riscv_lookup_target_description): New declaration when GDBSERVER
8864 is not defined.
8865 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
8866 (riscv_linux_read_features): ...this, and return
8867 riscv_gdbarch_features instead of target_desc.
8868 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
8869 (riscv_linux_read_description): Rename to...
8870 (riscv_linux_read_features): ...this.
8871 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
8872 Update to use riscv_gdbarch_features and
8873 riscv_lookup_target_description.
8874 * riscv-tdep.c (riscv_find_default_target_description): Use
8875 riscv_lookup_target_description instead of
8876 riscv_create_target_description.
8877
8878 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8879
8880 * valprint.c (generic_val_print_enum_1): When printing a flag
8881 enum with value 0 and there is no enumerator with value 0, print
8882 just "0" instead of "(unknown: 0x0)".
8883
8884 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8885
8886 * valprint.c (generic_val_print_enum_1): Print unknown part of
8887 flag enum in hex.
8888
8889 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8890
8891 * dwarf2/read.c (update_enumeration_type_from_children): Allow
8892 flag enums to contain duplicate enumerators.
8893 * valprint.c (generic_val_print_enum_1): Update comment.
8894
8895 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8896
8897 * dwarf2/read.c: Include "count-one-bits.h".
8898 (update_enumeration_type_from_children): If an enumerator has
8899 multiple bits set, don't treat the enumeration as a "flag enum".
8900 * valprint.c (generic_val_print_enum_1): Assert that enumerators
8901 of flag enums have 0 or 1 bit set.
8902
8903 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
8904
8905 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
8906 conversion.
8907 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8908 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
8909 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8910 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
8911 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8912
8913 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
8914
8915 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
8916
8917 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8918
8919 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
8920 displaced_step_closure_up.
8921 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
8922 (struct displaced_step_closure_up):
8923 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8924 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
8925 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
8926 Likewise.
8927 * gdbarch.sh (displaced_step_copy_insn): Likewise.
8928 * gdbarch.c, gdbarch.h: Re-generate.
8929 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
8930 displaced_step_closure_up.
8931 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8932 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
8933 * infrun.h (displaced_step_closure_up): New type alias.
8934 (struct displaced_step_inferior_state) <step_closure>: Change
8935 type to displaced_step_closure_up.
8936 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
8937 displaced_step_closure_up.
8938 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8939
8940 2020-02-14 Tom Tromey <tom@tromey.com>
8941
8942 * minidebug.c (gnu_debug_key): New global.
8943 (find_separate_debug_file_in_section): Use it.
8944
8945 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8946
8947 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
8948 std::unique_ptr.
8949 * gdbarch.c: Re-generate.
8950 * gdbarch.h: Re-generate.
8951 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
8952 change.
8953 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
8954 type to std::unique_ptr.
8955 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
8956 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
8957 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
8958 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
8959 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
8960 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
8961 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
8962 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
8963 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
8964
8965 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8966
8967 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
8968 std::unique_ptr.
8969 (displaced_step_clear): Rename to...
8970 (displaced_step_reset): ... this. Just call displaced->reset ().
8971 (displaced_step_clear_cleanup): Rename to...
8972 (displaced_step_reset_cleanup): ... this.
8973 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
8974 (displaced_step_fixup): Likewise.
8975 (resume_1): Likewise.
8976 (handle_inferior_event): Restore child's memory before calling
8977 displaced_step_fixup on the parent.
8978 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
8979 to std::unique_ptr.
8980 <step_closure>: Change type to std::unique_ptr.
8981
8982 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
8983
8984 * arm-tdep.c: Include count-one-bits.h.
8985 (cleanup_block_store_pc): Use count_one_bits.
8986 (cleanup_block_load_pc): Use count_one_bits.
8987 (arm_copy_block_xfer): Use count_one_bits.
8988 (thumb2_copy_block_xfer): Use count_one_bits.
8989 (thumb_copy_pop_pc_16bit): Use count_one_bits.
8990 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
8991 (thumb_get_next_pcs_raw): Use count_one_bits.
8992 (arm_get_next_pcs_raw): Use count_one_bits_l.
8993 * arch/arm.c (bitcount): Remove.
8994 * arch/arm.h (bitcount): Remove.
8995
8996 2020-02-14 Tom Tromey <tromey@adacore.com>
8997
8998 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
8999 Update.
9000 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
9001 * dwarf2/loc.c (call_site_find_chain_1): Return
9002 unique_xmalloc_ptr.
9003 (call_site_find_chain): Likewise.
9004
9005 2020-02-14 Richard Biener <rguenther@suse.de>
9006
9007 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
9008 on expression with division operators.
9009
9010 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
9011
9012 * MAINTAINERS (Write After Approval): Adding myself.
9013
9014 2020-02-12 Tom Tromey <tom@tromey.com>
9015
9016 * event-loop.c (event_data, gdb_event, event_handler_func):
9017 Remove.
9018
9019 2020-02-12 Tom Tromey <tom@tromey.com>
9020
9021 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
9022 (dwarf2_frame_objfile_data): Add comment.
9023 (find_comp_unit, set_comp_unit): New functions.
9024 (dwarf2_frame_find_fde): Use find_comp_unit.
9025 (dwarf2_build_frame_info): Use set_comp_unit.
9026
9027 2020-02-12 Tom Tromey <tom@tromey.com>
9028
9029 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
9030 (comp_unit): Don't initialize objfile.
9031 (execute_cfa_program): Add text_offset parameter.
9032 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
9033 (dwarf2_frame_cache): Update.
9034 (dwarf2_build_frame_info): Don't set "objfile" member.
9035
9036 2020-02-12 Tom Tromey <tom@tromey.com>
9037
9038 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
9039 (decode_frame_entry): Likewise.
9040 (dwarf2_build_frame_info): Update.
9041
9042 2020-02-12 Tom Tromey <tom@tromey.com>
9043
9044 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
9045 (decode_frame_entry_1): Use the comp_unit obstack.
9046
9047 2020-02-12 Tom Tromey <tom@tromey.com>
9048
9049 * dwarf2/frame.c (struct comp_unit): Add initializers and
9050 constructor.
9051 (dwarf2_frame_objfile_data): Store a comp_unit.
9052 (dwarf2_frame_find_fde): Update.
9053 (dwarf2_build_frame_info): Use "new".
9054
9055 2020-02-12 Tom Tromey <tom@tromey.com>
9056
9057 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
9058 (dwarf2_fde_table): Typedef for std::vector.
9059 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
9060 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
9061 (decode_frame_entry): Update.
9062 (dwarf2_build_frame_info): Use "new".
9063
9064 2020-02-12 Christian Biesinger <cbiesinger@google.com>
9065
9066 * arm-tdep.c (arm_gdbarch_init): Update.
9067 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
9068 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
9069 have_neon, is_m>: Change to bool.
9070
9071 2020-02-12 Christian Biesinger <cbiesinger@google.com>
9072
9073 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
9074
9075 2020-02-12 Tom Tromey <tom@tromey.com>
9076
9077 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
9078
9079 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
9080
9081 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
9082 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
9083
9084 2020-02-11 Tom Tromey <tom@tromey.com>
9085
9086 * psymtab.h: Update comment.
9087
9088 2020-02-11 Tom Tromey <tom@tromey.com>
9089
9090 * gdb_obstack.h (struct auto_obstack): Use
9091 DISABLE_COPY_AND_ASSIGN.
9092
9093 2020-02-11 Tom Tromey <tom@tromey.com>
9094
9095 * dwarf2/frame.h (struct objfile): Don't forward declare.
9096
9097 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9098
9099 * cris-tdep.c (cris_supply_gregset): Change signature to match
9100 what struct regset expects.
9101 (cris_regset): New struct.
9102 (fetch_core_registers): Remove.
9103 (cris_iterate_over_regset_sections): New function.
9104 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
9105 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
9106
9107 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9108
9109 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
9110 registers.
9111
9112 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9113
9114 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
9115
9116 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9117
9118 * configure: Re-generate.
9119
9120 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9121
9122 * configure: Re-generate.
9123
9124 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9125
9126 * acinclude: Update warning.m4 path.
9127 * warning.m4: Move to gdbsupport.
9128
9129 2020-02-11 Tom Tromey <tromey@adacore.com>
9130
9131 * remote.c (remote_console_output): Update.
9132 * printcmd.c (printf_command): Update.
9133 * event-loop.c (gdb_wait_for_event): Update.
9134 * linux-nat.c (sigchld_handler): Update.
9135 * remote-sim.c (gdb_os_write_stdout): Update.
9136 (gdb_os_flush_stdout): Update.
9137 (gdb_os_flush_stderr): Update.
9138 (gdb_os_write_stderr): Update.
9139 * exceptions.c (print_exception): Update.
9140 * remote-fileio.c (remote_fileio_func_read): Update.
9141 (remote_fileio_func_write): Update.
9142 * tui/tui.c (tui_enable): Update.
9143 * tui/tui-interp.c (tui_interp::init): Update.
9144 * utils.c (init_page_info): Update.
9145 (putchar_unfiltered, fputc_unfiltered): Update.
9146 (gdb_flush): Update.
9147 (emit_style_escape): Update.
9148 (flush_wrap_buffer, fputs_maybe_filtered): Update.
9149 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
9150 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
9151 (stderr_file::write): Update.
9152 (stderr_file::puts): Update.
9153 * ui-file.h (ui_file_isatty, ui_file_write)
9154 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
9155 (ui_file_puts): Don't declare.
9156
9157 2020-02-10 Tom de Vries <tdevries@suse.de>
9158
9159 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
9160 sentinel to char *.
9161
9162 2020-02-09 Tom de Vries <tdevries@suse.de>
9163
9164 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
9165 filename if it matches "<artificial>".
9166
9167 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
9168
9169 * windows-tdep.c (struct enum_value_name): New struct.
9170 (create_enum): New function.
9171 (windows_get_siginfo_type): Create and use enum types.
9172
9173 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
9174
9175 * NEWS: Mention $_siginfo support for Windows.
9176 * windows-nat.c (handle_exception): Set siginfo_er.
9177 (windows_nat_target::mourn_inferior): Reset siginfo_er.
9178 (windows_xfer_siginfo): New function.
9179 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
9180 * windows-tdep.c (struct windows_gdbarch_data): New struct.
9181 (init_windows_gdbarch_data): New function.
9182 (get_windows_gdbarch_data): New function.
9183 (windows_get_siginfo_type): New function.
9184 (windows_init_abi): Register windows_get_siginfo_type.
9185 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
9186
9187 2020-02-08 Tom Tromey <tom@tromey.com>
9188
9189 * dwarf2/read.c (class cutu_reader) <cutu_reader,
9190 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
9191 <keep>: Declare method.
9192 <m_keep>: Remove member.
9193 <~cutu_reader>: Remove.
9194 (cutu_reader::init_tu_and_read_dwo_dies): Update.
9195 (cutu_reader::cutu_reader): Update.
9196 (cutu_reader::keep): Rename from ~cutu_reader.
9197 (process_psymtab_comp_unit, build_type_psymtabs_1)
9198 (process_skeletonless_type_unit, load_partial_comp_unit)
9199 (load_full_comp_unit, dwarf2_read_addr_index)
9200 (read_signatured_type): Update.
9201
9202 2020-02-08 Tom Tromey <tom@tromey.com>
9203
9204 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
9205 "want_partial_unit" parameter.
9206 (process_psymtab_comp_unit): Change want_partial_unit to bool.
9207 Inline check for DW_TAG_partial_unit.
9208 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
9209
9210 2020-02-08 Tom Tromey <tom@tromey.com>
9211
9212 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
9213 read.c.
9214 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
9215 read.c.
9216
9217 2020-02-08 Tom Tromey <tom@tromey.com>
9218
9219 * dwarf2/read.c (read_address): Move to comp-unit.c.
9220 (dwarf2_rnglists_process, dwarf2_ranges_process)
9221 (read_attribute_value, dwarf_decode_lines_1)
9222 (var_decode_location, decode_locdesc): Update.
9223 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
9224 read.c. Remove "cu" parameter.
9225 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
9226 method.
9227
9228 2020-02-08 Tom Tromey <tom@tromey.com>
9229
9230 * dwarf2/read.c (read_attribute_value, read_indirect_string)
9231 (read_indirect_line_string): Update.
9232 * dwarf2/comp-unit.c (read_offset): Remove.
9233 (read_comp_unit_head): Update.
9234 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
9235 method.
9236 (read_offset): Don't declare.
9237
9238 2020-02-08 Tom Tromey <tom@tromey.com>
9239
9240 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
9241 * dwarf2/read.c (struct comp_unit_head): Move to
9242 dwarf2/comp-unit.h.
9243 (enum class rcuh_kind): Move to comp-unit.h.
9244 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
9245 (read_comp_unit_head, error_check_comp_unit_head)
9246 (read_and_check_comp_unit_head): Move to comp-unit.c.
9247 (read_offset, dwarf_unit_type_name): Likewise.
9248 (create_debug_type_hash_table, read_cutu_die_from_dwo)
9249 (cutu_reader::cutu_reader, read_call_site_scope)
9250 (find_partial_die, follow_die_offset): Update.
9251 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
9252
9253 2020-02-08 Tom Tromey <tom@tromey.com>
9254
9255 * dwarf2/read.c (read_offset_1): Move to leb.c.
9256 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
9257 (dwarf_decode_macro_bytes): Update.
9258 * dwarf2/leb.c (read_offset): Rename; move from read.c.
9259 * dwarf2/leb.h (read_offset): Declare.
9260
9261 2020-02-08 Tom Tromey <tom@tromey.com>
9262
9263 * dwarf2/read.c (dwarf2_section_size): Remove.
9264 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
9265 Update.
9266 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
9267
9268 2020-02-08 Tom Tromey <tom@tromey.com>
9269
9270 * dwarf2/read.c (read_initial_length): Move to leb.c.
9271 * dwarf2/leb.h (read_initial_length): Declare.
9272 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
9273 handle_nonstd parameter.
9274 * dwarf2/frame.c (read_initial_length): Remove.
9275 (decode_frame_entry_1): Update.
9276
9277 2020-02-08 Tom Tromey <tom@tromey.com>
9278
9279 * dwarf2/loc.c (dwarf2_find_location_expression)
9280 (dwarf_evaluate_loc_desc::get_tls_address)
9281 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9282 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
9283 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
9284 (dwarf2_compile_property_to_c)
9285 (dwarf2_loc_desc_get_symbol_read_needs)
9286 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
9287 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
9288 (loclist_describe_location, loclist_tracepoint_var_ref)
9289 (loclist_generate_c_location): Update.
9290 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
9291 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
9292 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
9293 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
9294 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
9295 (dwarf2_per_cu_data::addr_size)
9296 (dwarf2_per_cu_data::ref_addr_size)
9297 (dwarf2_per_cu_data::text_offset)
9298 (dwarf2_per_cu_data::addr_type): Now methods.
9299 (per_cu_header_read_in): Make per_cu "const".
9300 (dwarf2_version): Remove.
9301 (dwarf2_per_cu_data::int_type): Now a method.
9302 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
9303 (set_die_type, read_array_type, read_subrange_index_type)
9304 (read_tag_string_type, read_subrange_type): Update.
9305 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
9306 offset_size, ref_addr_size, text_offset, addr_type, version,
9307 objfile, int_type, addr_sized_int_type>: Declare methods.
9308
9309 2020-02-08 Tom Tromey <tom@tromey.com>
9310
9311 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
9312 Move earlier.
9313
9314 2020-02-08 Tom Tromey <tom@tromey.com>
9315
9316 * dwarf2/read.h (dwarf_line_debug): Declare.
9317 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
9318 * dwarf2/read.c: Move line_header code to new files.
9319 (dwarf_line_debug): No longer static.
9320 * dwarf2/line-header.c: New file.
9321 * dwarf2/line-header.h: New file.
9322
9323 2020-02-08 Tom Tromey <tom@tromey.com>
9324
9325 * dwarf2/read.c (struct line_header) <file_full_name,
9326 file_file_name>: Return unique_xmalloc_ptr.
9327 (line_header::file_file_name): Update.
9328 (line_header::file_full_name): Update.
9329 (dw2_get_file_names_reader): Update.
9330 (macro_start_file): Update.
9331
9332 2020-02-08 Tom Tromey <tom@tromey.com>
9333
9334 * dwarf2/read.c (struct line_header) <file_full_name,
9335 file_file_name>: Declare methods.
9336 (dw2_get_file_names_reader): Update.
9337 (file_file_name): Now a method.
9338 (file_full_name): Likewise.
9339 (macro_start_file): Update.
9340
9341 2020-02-08 Tom Tromey <tom@tromey.com>
9342
9343 * dwarf2/read.c (dwarf_always_disassemble)
9344 (show_dwarf_always_disassemble): Move to loc.c.
9345 (_initialize_dwarf2_read): Move "always-disassemble" registration
9346 to loc.c.
9347 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
9348 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
9349 static.
9350 (show_dwarf_always_disassemble): Move from read.c.
9351 (_initialize_dwarf2loc): Move always-disassemble from read.c.
9352
9353 2020-02-08 Tom Tromey <tom@tromey.com>
9354
9355 * dwarf2/read.c (~dwarf2_per_objfile): Update.
9356 (create_quick_file_names_table): Return htab_up.
9357 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
9358 Update.
9359 * dwarf2/read.h (struct dwarf2_per_objfile)
9360 <quick_file_names_table>: Now htab_up.
9361
9362 2020-02-08 Tom Tromey <tom@tromey.com>
9363
9364 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
9365
9366 2020-02-08 Tom Tromey <tom@tromey.com>
9367
9368 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
9369 Rewrite.
9370 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
9371 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
9372 (abbrev_table::abbrev_table): No longer inline.
9373 (ABBREV_HASH_SIZE): Remove.
9374 (abbrev_table::m_abbrevs): Now an htab_up.
9375
9376 2020-02-08 Tom Tromey <tom@tromey.com>
9377
9378 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
9379 (cutu_reader): Update.
9380 (build_type_psymtabs_1): Update.
9381 * dwarf2/abbrev.c (abbrev_table::read): Rename.
9382 (abbrev_table::alloc_abbrev): Update.
9383 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
9384 (abbrev_table::read): New static method, renamed from
9385 abbrev_table_read_table.
9386 (abbrev_table::alloc_abbrev)
9387 (abbrev_table::add_abbrev): Now private.
9388 (abbrev_table::abbrev_table): Now private.
9389 (abbrev_table::m_abbrev_obstack): Now private. Rename.
9390
9391 2020-02-08 Tom Tromey <tom@tromey.com>
9392
9393 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
9394 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
9395 htab_up.
9396
9397 2020-02-08 Tom Tromey <tom@tromey.com>
9398
9399 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
9400 htab_up.
9401 (lookup_dwo_unit_in_dwp): Update.
9402 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
9403 on obstack.
9404
9405 2020-02-08 Tom Tromey <tom@tromey.com>
9406
9407 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
9408 obstack.
9409
9410 2020-02-08 Tom Tromey <tom@tromey.com>
9411
9412 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
9413 line_header_hash.
9414 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
9415 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
9416 Change type to htab_up.
9417
9418 2020-02-08 Tom Tromey <tom@tromey.com>
9419
9420 * dwarf2/read.c (allocate_type_unit_groups_table): Return
9421 htab_up. Don't allocate on obstack.
9422 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
9423 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
9424 Change type to htab_up.
9425
9426 2020-02-08 Tom Tromey <tom@tromey.com>
9427
9428 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
9429 Change type to htab_up.
9430 * dwarf2/read.c (create_signatured_type_table_from_index)
9431 (create_signatured_type_table_from_debug_names)
9432 (create_all_type_units, add_type_unit)
9433 (lookup_dwo_signatured_type, lookup_signatured_type)
9434 (process_skeletonless_type_unit): Update.
9435 (create_debug_type_hash_table, create_debug_types_hash_table):
9436 Change type of types_htab.
9437 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
9438 htab_up. Don't allocate on obstack.
9439 (create_cus_hash_table): Change type of cus_htab parameter.
9440 (struct dwo_file) <cus, tus>: Now htab_up.
9441 (lookup_dwo_signatured_type, lookup_dwo_cutu)
9442 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
9443 (queue_and_load_all_dwo_tus): Update.
9444 * dwarf2/index-write.c (write_gdbindex): Update.
9445 (write_debug_names): Update.
9446
9447 2020-02-08 Tom Tromey <tom@tromey.com>
9448
9449 * dwarf2/read.h (struct dwarf2_queue_item): Move from
9450 dwarf2/read.c. Remove "next" member. Add constructor ntad
9451 destructor.
9452 (struct dwarf2_per_objfile) <queue>: New member.
9453 * dwarf2/read.c (struct dwarf2_queue_item): Move to
9454 dwarf2/read.h.
9455 (dwarf2_queue, dwarf2_queue_tail): Remove.
9456 (class dwarf2_queue_guard): Add parameter to constructor. Use
9457 DISABLE_COPY_AND_ASSIGN.
9458 <m_per_objfile>: New member.
9459 <~dwarf2_queue_guard>: Rewrite.
9460 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
9461 Update.
9462 (~dwarf2_queue_item): New.
9463
9464 2020-02-08 Tom Tromey <tom@tromey.com>
9465
9466 * dwarf2/read.c (struct die_info) <has_children>: New member.
9467 (dw2_get_file_names_reader): Remove has_children.
9468 (dw2_get_file_names): Update.
9469 (read_cutu_die_from_dwo): Remove has_children.
9470 (cutu_reader::init_tu_and_read_dwo_dies)
9471 (cutu_reader::cutu_reader): Update.
9472 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
9473 Remove has_children.
9474 (build_type_psymtabs_1, process_skeletonless_type_unit)
9475 (load_partial_comp_unit, load_full_comp_unit): Update.
9476 (create_dwo_cu_reader): Remove has_children.
9477 (create_cus_hash_table, read_die_and_children): Update.
9478 (read_full_die_1,read_full_die): Remove has_children.
9479 (read_signatured_type): Update.
9480 (class cutu_reader) <has_children>: Remove.
9481
9482 2020-02-08 Tom Tromey <tom@tromey.com>
9483
9484 * dwarf2/expr.c: Rename from dwarf2expr.c.
9485 * dwarf2/expr.h: Rename from dwarf2expr.h.
9486 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
9487 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
9488 * dwarf2/frame.c: Rename from dwarf2-frame.c.
9489 * dwarf2/frame.h: Rename from dwarf2-frame.h.
9490 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
9491 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
9492 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
9493 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
9494 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
9495 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
9496 * dwarf2/loc.c: Rename from dwarf2loc.c.
9497 * dwarf2/loc.h: Rename from dwarf2loc.h.
9498 * dwarf2/read.c: Rename from dwarf2read.c.
9499 * dwarf2/read.h: Rename from dwarf2read.h.
9500 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
9501 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
9502 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
9503 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
9504 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
9505 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
9506 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
9507 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
9508 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
9509 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
9510 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
9511 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
9512 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
9513 Update.
9514 * Makefile.in (COMMON_SFILES): Update.
9515 (HFILES_NO_SRCDIR): Update.
9516
9517 2020-02-08 Tom Tromey <tom@tromey.com>
9518
9519 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
9520 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
9521
9522 2020-02-08 Tom Tromey <tom@tromey.com>
9523
9524 * dwarf2read.h (struct die_info): Don't declare.
9525
9526 2020-02-08 Tom Tromey <tom@tromey.com>
9527
9528 * dwarf2read.h (die_info_ptr): Remove typedef.
9529
9530 2020-02-08 Tom Tromey <tom@tromey.com>
9531
9532 * dwarf2read.c (read_call_site_scope)
9533 (handle_data_member_location, dwarf2_add_member_fn)
9534 (mark_common_block_symbol_computed, read_common_block)
9535 (attr_to_dynamic_prop, partial_die_info::read)
9536 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
9537 (dwarf2_symbol_mark_computed, set_die_type): Update.
9538 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
9539 method.
9540 (attr_form_is_block): Don't declare.
9541 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
9542
9543 2020-02-08 Tom Tromey <tom@tromey.com>
9544
9545 * dwarf2read.c (dwarf2_find_base_address, )
9546 (read_call_site_scope, rust_containing_type)
9547 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
9548 (handle_data_member_location, dwarf2_add_member_fn)
9549 (get_alignment, read_structure_type, process_structure_scope)
9550 (mark_common_block_symbol_computed, read_common_block)
9551 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
9552 (partial_die_info::read, read_attribute_value, new_symbol)
9553 (lookup_die_type, dwarf2_get_ref_die_offset)
9554 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
9555 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
9556 (dwarf2_symbol_mark_computed): Update.
9557 * dwarf2/attribute.h (struct attribute) <value_as_address,
9558 form_is_section_offset, form_is_constant, form_is_ref>: Declare
9559 methods.
9560 (value_as_address, attr_form_is_section_offset)
9561 (attr_form_is_constant, attr_form_is_ref): Don't declare.
9562 * dwarf2/attribute.c (attribute::value_as_address)
9563 (attribute::form_is_section_offset, attribute::form_is_constant)
9564 (attribute::form_is_ref): Now methods.
9565
9566 2020-02-08 Tom Tromey <tom@tromey.com>
9567
9568 * dwarf2read.c (struct attribute, DW_STRING)
9569 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
9570 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
9571 (attr_form_is_block, attr_form_is_section_offset)
9572 (attr_form_is_constant, attr_form_is_ref): Move.
9573 * dwarf2/attribute.h: New file.
9574 * dwarf2/attribute.c: New file, from dwarf2read.c.
9575 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
9576
9577 2020-02-08 Tom Tromey <tom@tromey.com>
9578
9579 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
9580 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
9581 Move.
9582 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
9583 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
9584 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
9585 abbrev.c.
9586 * dwarf2/abbrev.h: New file.
9587 * dwarf2/abbrev.c: New file, from dwarf2read.c.
9588 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
9589
9590 2020-02-08 Tom Tromey <tom@tromey.com>
9591
9592 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
9593 (dwarf2_section_size, dwarf2_get_section_info)
9594 (create_signatured_type_table_from_debug_names)
9595 (create_addrmap_from_aranges, read_debug_names_from_section)
9596 (get_gdb_index_contents_from_section, read_comp_unit_head)
9597 (error_check_comp_unit_head, read_abbrev_offset)
9598 (create_debug_type_hash_table, init_cu_die_reader)
9599 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
9600 (read_comp_units_from_section, create_cus_hash_table)
9601 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
9602 (create_dwp_v2_section, dwarf2_rnglists_process)
9603 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
9604 (abbrev_table_read_table, read_indirect_string_at_offset_from)
9605 (read_indirect_string_from_dwz, read_addr_index_1)
9606 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
9607 (dwarf_decode_macro_bytes, dwarf_decode_macros)
9608 (fill_in_loclist_baton): Update.
9609 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
9610 get_containing_section, get_bfd_owner, get_bfd_section,
9611 get_file_name, get_id, get_flags, empty, read>: Declare methods.
9612 (dwarf2_read_section, get_section_name, get_section_file_name)
9613 (get_containing_section, get_section_bfd_owner)
9614 (get_section_bfd_section, get_section_name, get_section_file_name)
9615 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
9616 declare.
9617 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
9618 (dwarf2_section_info::get_bfd_owner)
9619 (dwarf2_section_info::get_bfd_section)
9620 (dwarf2_section_info::get_name)
9621 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
9622 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
9623 (dwarf2_section_info::read): Now methods.
9624 * dwarf-index-write.c (class debug_names): Update.
9625
9626 2020-02-08 Tom Tromey <tom@tromey.com>
9627
9628 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
9629 Move to dwarf2/section.h.
9630 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
9631 (get_section_bfd_section, get_section_name)
9632 (get_section_file_name, get_section_id, get_section_flags)
9633 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
9634 dwarf2/section.c.
9635 * dwarf2/section.h: New file.
9636 * dwarf2/section.c: New file, from dwarf2read.c.
9637 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
9638
9639 2020-02-08 Tom Tromey <tom@tromey.com>
9640
9641 * dwarf2read.h (read_unsigned_leb128): Don't declare.
9642 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
9643 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
9644 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
9645 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
9646 * dwarf2/leb.h: New file, from dwarf2read.c.
9647 * dwarf2/leb.c: New file, from dwarf2read.c.
9648 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
9649 Remove.
9650 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
9651 (COMMON_SFILES): Add dwarf2/leb.c.
9652
9653 2020-02-08 Joel Brobecker <brobecker@adacore.com>
9654
9655 GDB 9.1 released.
9656
9657 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
9658
9659 PR gdb/25190:
9660 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
9661 * gdb/remote.c (remote_console_output): Update.
9662 * gdb/ui-file.c (fputs_unfiltered): Rename to...
9663 (ui_file_puts): ...this.
9664 * gdb/ui-file.h (ui_file_puts): Add declaration.
9665 * gdb/utils.c (emit_style_escape): Update.
9666 (flush_wrap_buffer): Update.
9667 (fputs_maybe_filtered): Update.
9668 (fputs_unfiltered): Add function.
9669
9670 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
9671
9672 * gdb/event-loop.c (gdb_wait_for_event): Update.
9673 * gdb/printcmd.c (printf_command): Update.
9674 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
9675 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
9676 (gdb_os_flush_stderr): Update.
9677 * gdb/remote.c (remote_console_output): Update.
9678 * gdb/ui-file.c (gdb_flush): Rename to...
9679 (ui_file_flush): ...this.
9680 (stderr_file::write): Update.
9681 (stderr_file::puts): Update.
9682 * gdb/ui-file.h (gdb_flush): Rename to...
9683 (ui_file_flush): ...this.
9684 * gdb/utils.c (gdb_flush): Add function.
9685 * gdb/utils.h (gdb_flush): Add declaration.
9686
9687 2020-02-07 Tom Tromey <tromey@adacore.com>
9688
9689 PR breakpoints/24915:
9690 * source.c (find_and_open_source): Do not check basenames_may_differ.
9691
9692 2020-02-07 Tom Tromey <tom@tromey.com>
9693
9694 * README: Update gdbserver documentation.
9695 * gdbserver: Move to top level.
9696 * configure.tgt (build_gdbserver): Remove.
9697 * configure.ac: Remove --enable-gdbserver.
9698 * configure: Rebuild.
9699 * Makefile.in (distclean): Don't mention gdbserver.
9700
9701 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
9702
9703 * source-cache.c (source_cache::ensure): Surround
9704 get_plain_source_lines with a try/catch.
9705 (source_cache::get_line_charpos): Get rid of try/catch
9706 and only check for the return value of "ensure".
9707 * tui/tui-source.c (tui_source_window::set_contents):
9708 Simplify "nlines" calculation.
9709
9710 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
9711
9712 * MAINTAINERS (Write After Approval): Add myself.
9713
9714 2020-02-05 Christian Biesinger <cbiesinger@google.com>
9715
9716 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
9717 function call.
9718
9719 2020-02-05 Christian Biesinger <cbiesinger@google.com>
9720
9721 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
9722
9723 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
9724
9725 * nat/riscv-linux-tdesc.h: New file.
9726 * nat/riscv-linux-tdesc.c: New file, taking code from...
9727 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
9728 ... here.
9729 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
9730 NATDEPFILES.
9731
9732 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
9733
9734 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
9735 we don't set the fake simulator ptid to the null_ptid.
9736
9737 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
9738
9739 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
9740 * gdbthread.h (class thread_info) <resumed>: Likewise.
9741 * infrun.c (resume_1): Likewise.
9742 (proceed): Likewise.
9743 (infrun_thread_stop_requested): Likewise.
9744 (stop_all_threads): Likewise.
9745 (handle_inferior_event): Likewise.
9746 (restart_threads): Likewise.
9747 (finish_step_over): Likewise.
9748 (keep_going_stepped_thread): Likewise.
9749 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
9750 (linux_handle_extended_wait): Likewise.
9751 * record-btrace.c (get_thread_current_frame_id): Likewise.
9752 * record-full.c (record_full_wait_1): Likewise.
9753 * remote.c (remote_target::process_initial_stop_replies): Likewise.
9754 * target.c (target_resume): Likewise.
9755 * thread.c (set_running_thread): Likewise.
9756
9757 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
9758
9759 * f-valprint.c (f77_print_array_1): Changed datatype of index
9760 variable to LONGEST from int to enable it to contain bound
9761 values correctly.
9762
9763 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
9764
9765 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
9766 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
9767 offsets according to FLEN determined.
9768 (riscv_linux_nat_target::read_description): Determine FLEN
9769 dynamically.
9770 (riscv_linux_nat_target::fetch_registers): Size regset buffer
9771 according to FLEN determined.
9772 (riscv_linux_nat_target::store_registers): Likewise.
9773
9774 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
9775
9776 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
9777 when reg->group is empty and reggroup is not.
9778
9779 2020-01-31 Tom Tromey <tromey@adacore.com>
9780
9781 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
9782 Call beneath target's mourn_inferior after unpushing.
9783
9784 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
9785
9786 PR tui/9765
9787 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
9788 have enough lines to fill the screen, still return the lowest
9789 address we found.
9790
9791 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
9792
9793 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
9794 '-', '<', and '>' commands.
9795
9796 2020-01-29 Pedro Alves <palves@redhat.com>
9797 Sergio Durigan Junior <sergiodj@redhat.com>
9798
9799 * infcmd.c (construct_inferior_arguments): Assert that
9800 'argc' is greater than 0.
9801
9802 2020-01-29 Luis Machado <luis.machado@linaro.org>
9803
9804 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
9805 (BRK_INSN_MASK): Define to 0xd4200000.
9806 (aarch64_program_breakpoint_here_p): New function.
9807 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
9808 * arch-utils.c (default_program_breakpoint_here_p): Moved from
9809 breakpoint.c.
9810 * arch-utils.h (default_program_breakpoint_here_p): Moved from
9811 breakpoint.h
9812 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
9813 call gdbarch_program_breakpoint_here_p.
9814 (program_breakpoint_here): Moved to arch-utils.c, renamed to
9815 default_program_breakpoint_here_p, changed return type to bool and
9816 simplified.
9817 * breakpoint.h (program_breakpoint_here): Moved prototype to
9818 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
9819 return type to bool.
9820 * gdbarch.c: Regenerate.
9821 * gdbarch.h: Regenerate.
9822 * gdbarch.sh (program_breakpoint_here_p): New method.
9823 * infrun.c (handle_signal_stop): Call
9824 gdbarch_program_breakpoint_here_p.
9825
9826 2020-01-26 Tom Tromey <tom@tromey.com>
9827
9828 * ctfread.c (struct ctf_fp_info): Reindent.
9829 (_initialize_ctfread): Remove.
9830
9831 2020-01-26 Tom Tromey <tom@tromey.com>
9832
9833 * psymtab.c (partial_map_expand_apply)
9834 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
9835 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
9836 (psym_print_stats, psym_expand_symtabs_for_function)
9837 (psym_map_symbol_filenames, psym_map_matching_symbols)
9838 (psym_expand_symtabs_matching)
9839 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
9840 (maintenance_check_psymtabs): Use new methods.
9841 * psympriv.h (struct partial_symtab) <readin_p,
9842 get_compunit_symtab>: New methods.
9843 <readin, compunit_symtab>: Remove members.
9844 (struct standard_psymtab): New.
9845 (struct legacy_psymtab): Derive from standard_psymtab.
9846 * dwarf2read.h (struct dwarf2_psymtab): Derive from
9847 standard_psymtab.
9848 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
9849
9850 2020-01-26 Tom Tromey <tom@tromey.com>
9851
9852 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
9853 read_dependencies. Add assert.
9854 * psymtab.c (partial_symtab::read_dependencies): New method.
9855 * psympriv.h (struct partial_symtab) <read_dependencies>: New
9856 method.
9857 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
9858 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
9859 read_dependencies.
9860 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
9861 Add assert.
9862
9863 2020-01-26 Tom Tromey <tom@tromey.com>
9864
9865 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
9866 Call expand_psymtab.
9867 (xcoff_read_symtab): Call expand_psymtab.
9868 (xcoff_start_psymtab, xcoff_end_psymtab): Set
9869 legacy_expand_psymtab.
9870 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
9871 method.
9872 (struct legacy_psymtab) <expand_psymtab>: Implement.
9873 <legacy_expand_psymtab>: New member.
9874 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
9875 (parse_partial_symbols): Set legacy_expand_psymtab.
9876 (psymtab_to_symtab_1): Change argument order. Call
9877 expand_psymtab.
9878 (new_psymtab): Set legacy_expand_psymtab.
9879 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
9880 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
9881 expand_psymtab.
9882 (dwarf2_psymtab::expand_psymtab): Rename from
9883 psymtab_to_symtab_1. Call expand_psymtab.
9884 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
9885 (dbx_end_psymtab): Likewise.
9886 (dbx_psymtab_to_symtab_1): Change argument order. Call
9887 expand_psymtab.
9888 (dbx_read_symtab): Call expand_psymtab.
9889 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
9890 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
9891 (ctf_psymtab::read_symtab): Call expand_psymtab.
9892
9893 2020-01-26 Tom Tromey <tom@tromey.com>
9894
9895 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
9896 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
9897 messages.
9898 * mdebugread.c (mdebug_read_symtab): Remove prints.
9899 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
9900 assert.
9901 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
9902
9903 2020-01-26 Tom Tromey <tom@tromey.com>
9904
9905 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
9906 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
9907 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
9908 legacy_symtab.
9909 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
9910 * psymtab.c (psymtab_to_symtab): Call method.
9911 (dump_psymtab): Update.
9912 * psympriv.h (struct partial_symtab): Add virtual destructor.
9913 <read_symtab>: New method.
9914 (struct legacy_symtab): New.
9915 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
9916 (struct pst_map) <pst>: Now a legacy_psymtab.
9917 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
9918 (new_psymtab): Use legacy_psymtab.
9919 * dwarf2read.h (struct dwarf2_psymtab): New.
9920 (struct dwarf2_per_cu_data) <psymtab>: Use it.
9921 * dwarf2read.c (dwarf2_create_include_psymtab)
9922 (dwarf2_build_include_psymtabs, create_type_unit_group)
9923 (create_partial_symtab, process_psymtab_comp_unit_reader)
9924 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
9925 (set_partial_user): Use dwarf2_psymtab.
9926 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
9927 (psymtab_to_symtab_1, process_full_comp_unit)
9928 (process_full_type_unit, dwarf2_ranges_read)
9929 (dwarf2_get_pc_bounds, psymtab_include_file_name)
9930 (dwarf_decode_lines): Use dwarf2_psymtab.
9931 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
9932 (add_address_entry_worker, write_one_signatured_type)
9933 (recursively_count_psymbols, recursively_write_psymbols)
9934 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
9935 (write_debug_names): Likewise.
9936 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
9937 <pst>: Now a legacy_psymtab.
9938 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
9939 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
9940 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
9941 * ctfread.c (struct ctf_psymtab): New.
9942 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
9943 ctf_psymtab.
9944 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
9945 (create_partial_symtab): Return a ctf_psymtab.
9946 (scan_partial_symbols): Update.
9947
9948 2020-01-26 Tom Tromey <tom@tromey.com>
9949
9950 * xcoffread.c (xcoff_start_psymtab): Use new.
9951 * psymtab.c (partial_symtab::partial_symtab): New constructor,
9952 renamed from start_psymtab_common.
9953 * psympriv.h (struct partial_symtab): Add new constructor.
9954 (start_psymtab_common): Don't declare.
9955 * mdebugread.c (parse_partial_symbols): Use new.
9956 * dwarf2read.c (create_partial_symtab): Use new.
9957 * dbxread.c (start_psymtab): Use new.
9958 * ctfread.c (create_partial_symtab): Use new.
9959
9960 2020-01-26 Tom Tromey <tom@tromey.com>
9961
9962 * xcoffread.c (xcoff_end_psymtab): Use new.
9963 * psymtab.c (start_psymtab_common): Use new.
9964 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
9965 Update.
9966 * psympriv.h (struct partial_symtab): Add parameters to
9967 constructor. Don't inline.
9968 (allocate_psymtab): Don't declare.
9969 * mdebugread.c (new_psymtab): Use new.
9970 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
9971 * dbxread.c (dbx_end_psymtab): Use new.
9972
9973 2020-01-26 Tom Tromey <tom@tromey.com>
9974
9975 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
9976 allocate_psymtab. Update documentation.
9977 * psymtab.c (psymtab_storage::install_psymtab): Rename from
9978 allocate_psymtab. Do not use new.
9979 (allocate_psymtab): Use new. Update.
9980
9981 2020-01-26 Tom Tromey <tom@tromey.com>
9982
9983 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
9984 * psymtab.c (psym_print_stats): Update.
9985 * psympriv.h (struct partial_symtab) <readin,
9986 psymtabs_addrmap_supported, anonymous>: Now bool.
9987 * mdebugread.c (psymtab_to_symtab_1): Update.
9988 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
9989 (build_type_psymtabs_reader, psymtab_to_symtab_1)
9990 (process_full_comp_unit, process_full_type_unit): Update.
9991 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
9992 * ctfread.c (psymtab_to_symtab): Update.
9993
9994 2020-01-26 Tom Tromey <tom@tromey.com>
9995
9996 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
9997 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
9998 * psymtab.c (psymtab_storage): Delete psymtabs.
9999 (psymtab_storage::allocate_psymtab): Use new.
10000 (psymtab_storage::discard_psymtab): Use delete.
10001 * psympriv.h (struct partial_symtab): Add constructor and
10002 initializers.
10003
10004 2020-01-26 Tom Tromey <tom@tromey.com>
10005
10006 * machoread.c: Do not include psympriv.h.
10007
10008 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10009
10010 * NEWS: Mention the new option and the set/show commands.
10011
10012 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10013
10014 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
10015 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
10016 (validate_exec_file): New variables, enums, functions.
10017 (exec_file_locate_attach, print_section_info): Style the filenames.
10018 (_initialize_exec): Install show_exec_file_mismatch_command and
10019 set_exec_file_mismatch_command.
10020 * gdbcore.h (validate_exec_file): Declare.
10021 * infcmd.c (attach_command): Call validate_exec_file.
10022 * remote.c ( remote_target::remote_add_inferior): Likewise.
10023
10024 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10025
10026 * frame.c (find_frame_sal): Move call to get_next_frame into more
10027 inner scope.
10028 * inline-frame.c (inilne_state) <inline_state>: Update argument
10029 types.
10030 (inilne_state) <skipped_symbol>: Rename to...
10031 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
10032 (skip_inline_frames): Build vector of skipped symbols and use this
10033 to reate the inline_state.
10034 (inline_skipped_symbol): Add a comment and some assertions, fetch
10035 skipped symbol from the list.
10036
10037 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10038
10039 * buildsym.c (lte_is_less_than): Delete.
10040 (buildsym_compunit::end_symtab_with_blockvector): Create local
10041 lambda function to sort line table entries, and use
10042 std::stable_sort instead of std::sort.
10043 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
10044 markers when looking for a previous line.
10045
10046 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10047
10048 * dwarf2read.c (lnp_state_machine::record_line): Include
10049 end_sequence parameter in debug print out. Record the line if we
10050 are at an end_sequence marker even if it's not the start of a
10051 statement.
10052 * symmisc.c (maintenance_print_one_line_table): Print end of
10053 sequence markers with 'END' not '0'.
10054
10055 2020-01-24 Pedro Alves <palves@redhat.com>
10056
10057 PR gdb/25410
10058 * thread.c (scoped_restore_current_thread::restore): Use
10059 switch_to_inferior_no_thread.
10060 * exec.c: Include "progspace-and-thread.h".
10061 (add_target_sections, remove_target_sections):
10062 scoped_restore_current_pspace_and_thread instead of
10063 scoped_restore_current_thread.
10064 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
10065 and aspace to the inferior before calling clone_program_space.
10066 Remove stale comment.
10067
10068 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10069
10070 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
10071 (arm_netbsd_nat_target::fetch_registers): ...this.
10072 (arm_nbsd_nat_target::store_registers): Rename to...
10073 (arm_netbsd_nat_target::store_registers): ...this.
10074
10075 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10076
10077 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
10078 register_t.
10079
10080 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10081
10082 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
10083 Update comment.
10084 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
10085 Likewise.
10086 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
10087 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
10088 the correct replacement (iterate_over_regset_sections).
10089 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
10090 Update comment.
10091
10092 2020-01-24 Graham Markall <graham.markall@embecosm.com>
10093
10094 PR gdb/23718
10095 * gdb/python/python.c (execute_gdb_command): Call
10096 async_enable_stdin in catch block.
10097
10098 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10099
10100 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
10101 SWITCH_THRU_ALL_UIS.
10102
10103 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10104
10105 PR tui/9765
10106 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
10107 comment, add extra parameter, and update to store previous symbol
10108 when appropriate.
10109 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
10110 add extra parameter.
10111 * tui/tui-disasm.c (tui_disassemble): Update header comment,
10112 remove unneeded parameter, add try/catch around gdb_print_insn,
10113 rewrite to add items to asm_lines vector.
10114 (tui_find_backward_disassembly_start_address): New function.
10115 (tui_find_disassembly_address): Updated throughout.
10116 (tui_disasm_window::set_contents): Update for changes to
10117 tui_disassemble.
10118 (tui_disasm_window::do_scroll_vertical): No need to adjust the
10119 number of lines to scroll.
10120
10121 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10122
10123 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
10124 (SECT_OFF_DATA): Likewise.
10125 (SECT_OFF_RODATA): Likewise.
10126 (SECT_OFF_TEXT): Likewise.
10127 (SECT_OFF_BSS): Likewise.
10128 (struct objfile) <text_section_offset, data_section_offset>: New
10129 methods.
10130 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
10131 objfile::text_section_offset.
10132 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
10133 * coffread.c (coff_symtab_read): Likewise.
10134 (enter_linenos): Likewise.
10135 (process_coff_symbol): Likewise.
10136 * ctfread.c (get_objfile_text_range): Likewise.
10137 * dtrace-probe.c (dtrace_probe::get_relocated_address):
10138 Use objfile::data_section_offset.
10139 * dwarf2-frame.c (execute_cfa_program): Use
10140 objfile::text_section_offset.
10141 (dwarf2_frame_find_fde): Likewise.
10142 * dwarf2read.c (create_addrmap_from_index): Likewise.
10143 (create_addrmap_from_aranges): Likewise.
10144 (dw2_find_pc_sect_compunit_symtab): Likewise.
10145 (process_psymtab_comp_unit_reader): Likewise.
10146 (add_partial_symbol): Likewise.
10147 (add_partial_subprogram): Likewise.
10148 (process_full_comp_unit): Likewise.
10149 (read_file_scope): Likewise.
10150 (read_func_scope): Likewise.
10151 (read_lexical_block_scope): Likewise.
10152 (read_call_site_scope): Likewise.
10153 (dwarf2_rnglists_process): Likewise.
10154 (dwarf2_ranges_process): Likewise.
10155 (dwarf2_ranges_read): Likewise.
10156 (dwarf_decode_lines_1): Likewise.
10157 (new_symbol): Likewise.
10158 (dwarf2_fetch_die_loc_sect_off): Likewise.
10159 (dwarf2_per_cu_text_offset): Likewise.
10160 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
10161 * hppa-tdep.c (read_unwind_info): Likewise.
10162 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
10163 * psympriv.h (struct partial_symtab): Likewise.
10164 * psymtab.c (find_pc_sect_psymtab): Likewise.
10165 * solib-svr4.c (enable_break): Likewise.
10166 * stap-probe.c (relocate_address): Use
10167 objfile::data_section_offset.
10168 * xcoffread.c (enter_line_range): Use
10169 objfile::text_section_offset.
10170 (read_xcoff_symtab): Likewise.
10171
10172 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
10173
10174 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
10175 declaration to narrower scopes.
10176
10177 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
10178
10179 * darwin-nat.h (struct darwin_exception_msg, enum
10180 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
10181 Move up.
10182 (class darwin_nat_target) <wait_1, check_new_threads,
10183 decode_exception_message, decode_message, stop_inferior,
10184 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
10185 * darwin-nat.c (darwin_check_new_threads): Rename to...
10186 (darwin_nat_target::check_new_threads): ... this.
10187 (darwin_suspend_inferior_it): Remove.
10188 (darwin_decode_exception_message): Rename to...
10189 (darwin_nat_target::decode_exception_message): ... this.
10190 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
10191 (darwin_decode_message): Rename to...
10192 (darwin_nat_target::decode_message): ... this.
10193 (cancel_breakpoint): Rename to...
10194 (darwin_nat_target::cancel_breakpoint): ... this.
10195 (darwin_wait): Rename to...
10196 (darwin_nat_target::wait_1): ... this. Use range-based for loop
10197 instead of iterate_over_inferiors.
10198 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
10199 (darwin_stop_inferior): Rename to...
10200 (darwin_nat_target::stop_inferior): ... this.
10201 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
10202 (darwin_init_thread_list): Rename to...
10203 (darwin_nat_target::init_thread_list): ... this.
10204 (darwin_ptrace_him): Rename to...
10205 (darwin_nat_target::ptrace_him): ... this.
10206 (darwin_nat_target::create_inferior): Pass lambda function to
10207 fork_inferior.
10208 (darwin_nat_target::detach): Call stop_inferior instead of
10209 darwin_stop_inferior.
10210 * fork-inferior.h (fork_inferior): Change init_trace_fun
10211 parameter to gdb::function_view.
10212 * fork-inferior.c (fork_inferior): Likewise.
10213
10214 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
10215
10216 * i386-cygwin-tdep.c (core_process_module_section): Update.
10217 * windows-nat.c (struct lm_info_windows): Add text_offset.
10218 (windows_xfer_shared_libraries): Update.
10219 * windows-tdep.c (windows_xfer_shared_library):
10220 Add text_offset_cached argument.
10221 * windows-tdep.h (windows_xfer_shared_library): Update.
10222
10223 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10224
10225 * gdbarch.sh: Add declaration for _initialize_gdbarch.
10226
10227 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10228
10229 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
10230 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
10231 replace with range-based for.
10232 (gdbsim_interrupt_inferior): Remove.
10233 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
10234 with a range-based for. Inline code from
10235 gdbsim_interrupt_inferior.
10236
10237 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10238
10239 * infrun.c (proceed): Fix indentation.
10240
10241 2020-01-21 Tom Tromey <tromey@adacore.com>
10242
10243 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
10244 * python/python.c (python_extension_ops): Update.
10245 (gdbpy_colorize): New function.
10246 * python/lib/gdb/__init__.py (colorize): New function.
10247 * extension.h (ext_lang_colorize): Declare.
10248 * extension.c (ext_lang_colorize): New function.
10249 * extension-priv.h (struct extension_language_ops) <colorize>: New
10250 member.
10251 * cli/cli-style.c (_initialize_cli_style): Update help text.
10252
10253 2020-01-21 Luis Machado <luis.machado@linaro.org>
10254
10255 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
10256 <cond>: Change type to bool.
10257 (aarch64_displaced_step_b_cond): Update cond to use bool type.
10258 (aarch64_displaced_step_cb): Likewise.
10259 (aarch64_displaced_step_tb): Likewise.
10260
10261 2020-01-21 Luis Machado <luis.machado@linaro.org>
10262
10263 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
10264 output.
10265
10266 2020-01-21 Luis Machado <luis.machado@linaro.org>
10267
10268 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
10269 <pc_adjust>: Adjust the documentation.
10270 (aarch64_displaced_step_fixup): Check if PC really moved before
10271 adjusting it.
10272
10273 2020-01-19 Tom Tromey <tom@tromey.com>
10274
10275 * disasm.c (~gdb_disassembler): New destructor.
10276 (gdb_buffered_insn_length): Call disassemble_free_target.
10277 * disasm.h (class gdb_disassembler): Declare destructor. Use
10278 DISABLE_COPY_AND_ASSIGN.
10279
10280 2020-01-19 Tom Tromey <tom@tromey.com>
10281
10282 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
10283 (die_reader_func_ftype): Remove.
10284 (cutu_reader): New class.
10285 (dw2_get_file_names_reader): Remove "data" parameter.
10286 (dw2_get_file_names): Use cutu_reader.
10287 (create_debug_type_hash_table): Update.
10288 (read_cutu_die_from_dwo): Update comment.
10289 (lookup_dwo_unit): Add dwo_name parameter.
10290 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
10291 die_reader_func_ftype and data parameters.
10292 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
10293 Remove die_reader_func_ftype and data parameters.
10294 (~cutu_reader): New; from init_cutu_and_read_dies.
10295 (cutu_reader::cutu_reader): Rename from
10296 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
10297 and data parameters.
10298 (init_cutu_and_read_dies_simple): Remove.
10299 (struct process_psymtab_comp_unit_data): Remove.
10300 (process_psymtab_comp_unit_reader): Remove data parameter; add
10301 want_partial_unit and pretend_language parameters.
10302 (process_psymtab_comp_unit): Use cutu_reader.
10303 (build_type_psymtabs_reader): Remove data parameter.
10304 (build_type_psymtabs_1): Use cutu_reader.
10305 (process_skeletonless_type_unit): Likewise.
10306 (load_partial_comp_unit_reader): Remove.
10307 (load_partial_comp_unit): Use cutu_reader.
10308 (load_full_comp_unit_reader): Remove.
10309 (load_full_comp_unit): Use cutu_reader.
10310 (struct create_dwo_cu_data): Remove.
10311 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
10312 dwo_unit parameters.
10313 (create_cus_hash_table): Use cutu_reader.
10314 (struct dwarf2_read_addr_index_data): Remove.
10315 (dwarf2_read_addr_index_reader): Remove.
10316 (dwarf2_read_addr_index): Use cutu_reader.
10317 (read_signatured_type_reader): Remove.
10318 (read_signatured_type): Use cutu_reader.
10319
10320 2020-01-19 Tom Tromey <tom@tromey.com>
10321
10322 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
10323 * tui/tui-wingeneral.h (class tui_suppress_output): New.
10324 (tui_wrefresh): Declare.
10325 * tui/tui-wingeneral.c (suppress_output): New global.
10326 (tui_suppress_output, ~tui_suppress_output): New constructor and
10327 destructor.
10328 (tui_wrefresh): New function.
10329 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
10330 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
10331 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
10332 method.
10333 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
10334 tui_wrefresh.
10335 (tui_data_window::no_refresh): New method.
10336 (tui_data_item_window::refresh_window): Call tui_wrefresh.
10337 (tui_reg_command): Use tui_suppress_output
10338 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
10339 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
10340 method.
10341 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
10342
10343 2020-01-19 Tom Tromey <tom@tromey.com>
10344
10345 * tui/tui-winsource.c (tui_update_source_windows_with_line):
10346 Handle case where symtab is null.
10347
10348 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
10349
10350 * linux-fork.c (one_fork_p): Simplify.
10351
10352 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10353
10354 * top.c (struct qt_args): Remove.
10355 (kill_or_detach): Change return type to void, replace `void *`
10356 parameter with a proper one.
10357 (print_inferior_quit_action): Likewise.
10358 (quit_confirm): Use range-based for loop to iterate over inferiors.
10359 (quit_force): Likewise.
10360
10361 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10362
10363 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
10364 `void *` parameter with proper parameters.
10365 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
10366 (print_one_inferior): Change return type to void, replace `void *`
10367 parameter with proper parameters.
10368 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
10369 inferiors.
10370 (get_other_inferior): Remove.
10371 (mi_cmd_remove_inferior): Use range-based loop to iterate over
10372 inferiors.
10373
10374 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10375
10376 * mi/mi-interp.c (report_initial_inferior): Remove.
10377 (mi_interp::init): Use range-based for to iterate over inferiors.
10378
10379 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10380
10381 * python/py-inferior.c (build_inferior_list): Remove.
10382 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
10383
10384 2020-01-16 Christian Biesinger <cbiesinger@google.com>
10385
10386 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
10387 (btrace_stitch_trace): Likewise.
10388 * charset.c (intermediate_encoding): Likewise (vaild).
10389 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
10390 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
10391 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
10392
10393 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
10394
10395 * windows-tdep.c (windows_get_tlb_type):
10396 Add rtl_user_process_parameters type.
10397
10398 2020-01-16 Pedro Alves <palves@redhat.com>
10399 Norbert Lange <nolange79@gmail.com>
10400
10401 PR build/24805
10402 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
10403 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
10404 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
10405 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
10406 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
10407 (ps_plog): Redeclare exported functions with default visibility.
10408
10409 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
10410
10411 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
10412 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
10413
10414 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
10415
10416 * infcmd.c (post_create_inferior): Use get_thread_regcache
10417 instead of get_current_regcache.
10418
10419 2020-01-14 Tom Tromey <tom@tromey.com>
10420
10421 PR symtab/12535:
10422 * python/python.c (gdbpy_decode_line): Treat empty string the same
10423 as no argument.
10424
10425 2020-01-14 Tom Tromey <tom@tromey.com>
10426
10427 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
10428
10429 2020-01-14 Tom Tromey <tom@tromey.com>
10430
10431 * nat/linux-btrace.c: Don't include <config.h>.
10432 * nat/linux-ptrace.c: Don't include <config.h>.
10433 * nat/x86-linux-dregs.c: Don't include <config.h>.
10434
10435 2020-01-14 Tom Tromey <tom@tromey.com>
10436
10437 * configure: Rebuild.
10438 * configure.ac: Move many checks to ../gdbsupport/common.m4.
10439
10440 2020-01-14 Tom Tromey <tom@tromey.com>
10441
10442 * nat/x86-linux-dregs.c: Include configh.h.
10443 * nat/linux-ptrace.c: Include configh.h.
10444 * nat/linux-btrace.c: Include configh.h.
10445 * defs.h: Include config.h, bfd.h.
10446 * configure.ac: Don't source common.host.
10447 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
10448 * configure: Rebuild.
10449 * acinclude.m4: Update path.
10450 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
10451 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
10452 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
10453 (CLIBS): Add LIBSUPPORT.
10454 (CDEPS): Likewise.
10455 (COMMON_SFILES): Remove gdbsupport files.
10456 (HFILES_NO_SRCDIR): Likewise.
10457 (stamp-version): Update path to create-version.sh.
10458 (ALLDEPFILES): Remove gdbsupport files.
10459
10460 2020-01-14 Tom Tromey <tom@tromey.com>
10461
10462 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
10463 USE_WIN32API when needed.
10464 * configure.ac (USE_WIN32API): Don't define.
10465 (WIN32LIBS): Use WIN32APILIBS.
10466 * configure: Rebuild.
10467
10468 2020-01-14 Tom Tromey <tom@tromey.com>
10469
10470 * configure: Rebuild.
10471 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
10472
10473 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
10474
10475 * skip.c (skip_function_command): Make skip w/o arguments use the
10476 name of the inlined function if pc is inside any inlined function.
10477
10478 2020-01-14 Luis Machado <luis.machado@linaro.org>
10479
10480 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
10481 * infrun.c (resume_1): Likewise.
10482 (handle_inferior_event): Remove stale comment.
10483 * linux-nat.c (linux_nat_target::resume): Update comments.
10484 (save_stop_reason): Likewise.
10485 (linux_nat_filter_event): Likewise.
10486 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
10487
10488 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
10489
10490 * elfread.c (record_minimal_symbol): Set section index to 0 for
10491 non-allocatable sections.
10492
10493
10494 2020-01-13 Ali Tamur <tamur@google.com>
10495
10496 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
10497 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
10498 to gdb::optional. Update comments.
10499 (dwo_file): Update comments.
10500 (read_attribute): Update API to take an additional out parameter,
10501 need_reprocess. This is used to mark attributes that need other
10502 attributes (e.g. str_offsets_base) for correct computation which may not
10503 have been read yet.
10504 (read_attribute_reprocess): New function declaration.
10505 (read_addr_index): Likewise.
10506 (read_dwo_str_index): Likewise.
10507 (read_stub_str_index): Likewise.
10508 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
10509 (lookup_addr_base): New function definition.
10510 (lookup_ranges_base): Likewise.
10511 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
10512 lookup_ranges_base.
10513 (init_cutu_and_read_dies): Update comments.
10514 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
10515 unit. This is used to inherit parent's str_offsets_base and addr_base.
10516 Update comments.
10517 (init_cutu_and_read_dies_simple): Reflect API changes.
10518 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
10519 (create_cus_hash_table): Change API to take parent compile unit.
10520 Reflect API changes.
10521 (open_and_init_dwo_file): Reflect API changes.
10522 (dwarf2_get_pc_bounds): Update comments.
10523 (dwarf2_record_block_ranges): Likewise.
10524 (read_full_die_1): Change implementation to reprocess attributes that
10525 need str_offsets_base and addr_base.
10526 (partial_die_info::read): Likewise.
10527 (read_attribute_reprocess): New function definition.
10528 (read_attribute_value): Change API to take an additional out parameter,
10529 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
10530 when a non-dwo compile unit has index based attributes.
10531 (read_attribute): Reflect API changes.
10532 (read_addr_index_1): Reflect API changes. Update comments.
10533 (dwarf2_read_addr_index_data): Reflect API changes.
10534 (dwarf2_read_addr_index): Likewise.
10535 (read_str_index): Change API and implementation. This becomes a helper
10536 to be used by the new string index related methods. Update error
10537 message and comments.
10538 (read_dwo_str_index): New function definition.
10539 (read_stub_str_index): Likewise.
10540 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
10541 * symfile.h (dwarf2_debug_sections): Likewise.
10542 * xcoffread.c (dwarf2_debug_sections): Likewise.
10543
10544 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10545
10546 * gdbcore.h (struct core_fns) <core_read_registers>: Change
10547 core_reg_sect type to gdb_byte *.
10548 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
10549 * cris-tdep.c (fetch_core_registers): Likewise.
10550 * corelow.c (core_target::get_core_register_section): Change
10551 type of `contents` to gdb::byte_vector.
10552
10553 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
10554
10555 * tui/tui-wingeneral.c (box_win): Position the title in the center
10556 of the border.
10557
10558 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10559
10560 * corelow.c (core_target::get_core_register_section): Use
10561 std::vector instead of alloca.
10562
10563 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10564
10565 * warning.m4: Add -Wmissing-declarations to build_warnings.
10566 * configure: Re-generate.
10567
10568 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10569
10570 * python/python.c (init__gdb_module): Add declaration.
10571
10572 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
10573
10574 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
10575 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
10576 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
10577 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
10578 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
10579 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
10580 * ada-exp.y (_initialize_ada_exp): Add declaration.
10581 * ada-lang.c (_initialize_ada_language): Add declaration.
10582 * ada-tasks.c (_initialize_tasks): Add declaration.
10583 * agent.c (_initialize_agent): Add declaration.
10584 * aix-thread.c (_initialize_aix_thread): Add declaration.
10585 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
10586 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
10587 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
10588 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
10589 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
10590 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
10591 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
10592 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
10593 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
10594 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
10595 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
10596 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
10597 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
10598 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
10599 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
10600 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
10601 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
10602 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
10603 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
10604 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
10605 * annotate.c (_initialize_annotate): Add declaration.
10606 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
10607 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
10608 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
10609 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
10610 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
10611 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
10612 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
10613 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
10614 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
10615 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
10616 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
10617 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
10618 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
10619 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
10620 * auto-load.c (_initialize_auto_load): Add declaration.
10621 * auxv.c (_initialize_auxv): Add declaration.
10622 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
10623 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
10624 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
10625 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
10626 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
10627 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
10628 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
10629 * breakpoint.c (_initialize_breakpoint): Add declaration.
10630 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
10631 * btrace.c (_initialize_btrace): Add declaration.
10632 * charset.c (_initialize_charset): Add declaration.
10633 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
10634 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
10635 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
10636 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
10637 * cli/cli-script.c (_initialize_cli_script): Add declaration.
10638 * cli/cli-style.c (_initialize_cli_style): Add declaration.
10639 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
10640 * coffread.c (_initialize_coffread): Add declaration.
10641 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
10642 * compile/compile.c (_initialize_compile): Add declaration.
10643 * complaints.c (_initialize_complaints): Add declaration.
10644 * completer.c (_initialize_completer): Add declaration.
10645 * copying.c (_initialize_copying): Add declaration.
10646 * corefile.c (_initialize_core): Add declaration.
10647 * corelow.c (_initialize_corelow): Add declaration.
10648 * cp-abi.c (_initialize_cp_abi): Add declaration.
10649 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
10650 * cp-support.c (_initialize_cp_support): Add declaration.
10651 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
10652 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
10653 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
10654 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
10655 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
10656 * ctfread.c (_initialize_ctfread): Add declaration.
10657 * d-lang.c (_initialize_d_language): Add declaration.
10658 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
10659 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
10660 * dbxread.c (_initialize_dbxread): Add declaration.
10661 * dcache.c (_initialize_dcache): Add declaration.
10662 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
10663 * disasm.c (_initialize_disasm): Add declaration.
10664 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
10665 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
10666 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
10667 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
10668 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
10669 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
10670 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
10671 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
10672 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
10673 * elfread.c (_initialize_elfread): Add declaration.
10674 * exec.c (_initialize_exec): Add declaration.
10675 * extension.c (_initialize_extension): Add declaration.
10676 * f-lang.c (_initialize_f_language): Add declaration.
10677 * f-valprint.c (_initialize_f_valprint): Add declaration.
10678 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
10679 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
10680 * filesystem.c (_initialize_filesystem): Add declaration.
10681 * findcmd.c (_initialize_mem_search): Add declaration.
10682 * findvar.c (_initialize_findvar): Add declaration.
10683 * fork-child.c (_initialize_fork_child): Add declaration.
10684 * frame-base.c (_initialize_frame_base): Add declaration.
10685 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
10686 * frame.c (_initialize_frame): Add declaration.
10687 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
10688 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
10689 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
10690 * gcore.c (_initialize_gcore): Add declaration.
10691 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
10692 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
10693 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
10694 * gdbarch.c (_initialize_gdbarch): Add declaration.
10695 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
10696 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
10697 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
10698 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
10699 * go-lang.c (_initialize_go_language): Add declaration.
10700 * go32-nat.c (_initialize_go32_nat): Add declaration.
10701 * guile/guile.c (_initialize_guile): Add declaration.
10702 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
10703 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
10704 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
10705 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
10706 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
10707 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
10708 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
10709 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
10710 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
10711 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
10712 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
10713 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
10714 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
10715 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
10716 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
10717 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
10718 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
10719 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
10720 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
10721 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
10722 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
10723 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
10724 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
10725 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
10726 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
10727 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
10728 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
10729 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
10730 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
10731 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
10732 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
10733 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
10734 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
10735 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
10736 * infcall.c (_initialize_infcall): Add declaration.
10737 * infcmd.c (_initialize_infcmd): Add declaration.
10738 * inflow.c (_initialize_inflow): Add declaration.
10739 * infrun.c (_initialize_infrun): Add declaration.
10740 * interps.c (_initialize_interpreter): Add declaration.
10741 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
10742 * jit.c (_initialize_jit): Add declaration.
10743 * language.c (_initialize_language): Add declaration.
10744 * linux-fork.c (_initialize_linux_fork): Add declaration.
10745 * linux-nat.c (_initialize_linux_nat): Add declaration.
10746 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
10747 * linux-thread-db.c (_initialize_thread_db): Add declaration.
10748 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
10749 * m2-lang.c (_initialize_m2_language): Add declaration.
10750 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
10751 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
10752 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
10753 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
10754 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
10755 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
10756 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
10757 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
10758 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
10759 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
10760 * machoread.c (_initialize_machoread): Add declaration.
10761 * macrocmd.c (_initialize_macrocmd): Add declaration.
10762 * macroscope.c (_initialize_macroscope): Add declaration.
10763 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
10764 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
10765 * maint.c (_initialize_maint_cmds): Add declaration.
10766 * mdebugread.c (_initialize_mdebugread): Add declaration.
10767 * memattr.c (_initialize_mem): Add declaration.
10768 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
10769 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
10770 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
10771 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
10772 * mi/mi-main.c (_initialize_mi_main): Add declaration.
10773 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
10774 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
10775 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
10776 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
10777 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
10778 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
10779 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
10780 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
10781 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
10782 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
10783 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
10784 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
10785 * mipsread.c (_initialize_mipsread): Add declaration.
10786 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
10787 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
10788 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
10789 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
10790 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
10791 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
10792 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
10793 * nto-procfs.c (_initialize_procfs): Add declaration.
10794 * objc-lang.c (_initialize_objc_language): Add declaration.
10795 * observable.c (_initialize_observer): Add declaration.
10796 * opencl-lang.c (_initialize_opencl_language): Add declaration.
10797 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
10798 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
10799 * osabi.c (_initialize_gdb_osabi): Add declaration.
10800 * osdata.c (_initialize_osdata): Add declaration.
10801 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
10802 * parse.c (_initialize_parse): Add declaration.
10803 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
10804 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
10805 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
10806 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
10807 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
10808 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
10809 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
10810 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
10811 * printcmd.c (_initialize_printcmd): Add declaration.
10812 * probe.c (_initialize_probe): Add declaration.
10813 * proc-api.c (_initialize_proc_api): Add declaration.
10814 * proc-events.c (_initialize_proc_events): Add declaration.
10815 * proc-service.c (_initialize_proc_service): Add declaration.
10816 * procfs.c (_initialize_procfs): Add declaration.
10817 * producer.c (_initialize_producer): Add declaration.
10818 * psymtab.c (_initialize_psymtab): Add declaration.
10819 * python/python.c (_initialize_python): Add declaration.
10820 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
10821 * record-btrace.c (_initialize_record_btrace): Add declaration.
10822 * record-full.c (_initialize_record_full): Add declaration.
10823 * record.c (_initialize_record): Add declaration.
10824 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
10825 * regcache.c (_initialize_regcache): Add declaration.
10826 * reggroups.c (_initialize_reggroup): Add declaration.
10827 * remote-notif.c (_initialize_notif): Add declaration.
10828 * remote-sim.c (_initialize_remote_sim): Add declaration.
10829 * remote.c (_initialize_remote): Add declaration.
10830 * reverse.c (_initialize_reverse): Add declaration.
10831 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
10832 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
10833 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
10834 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
10835 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
10836 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
10837 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
10838 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
10839 Add declaration.
10840 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
10841 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
10842 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
10843 * rust-exp.y (_initialize_rust_exp): Add declaration.
10844 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
10845 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
10846 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
10847 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
10848 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
10849 * score-tdep.c (_initialize_score_tdep): Add declaration.
10850 * ser-go32.c (_initialize_ser_dos): Add declaration.
10851 * ser-mingw.c (_initialize_ser_windows): Add declaration.
10852 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
10853 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
10854 * ser-uds.c (_initialize_ser_socket): Add declaration.
10855 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
10856 * serial.c (_initialize_serial): Add declaration.
10857 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
10858 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
10859 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
10860 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
10861 * skip.c (_initialize_step_skip): Add declaration.
10862 * sol-thread.c (_initialize_sol_thread): Add declaration.
10863 * solib-aix.c (_initialize_solib_aix): Add declaration.
10864 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
10865 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
10866 * solib-frv.c (_initialize_frv_solib): Add declaration.
10867 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
10868 * solib-target.c (_initialize_solib_target): Add declaration.
10869 * solib.c (_initialize_solib): Add declaration.
10870 * source-cache.c (_initialize_source_cache): Add declaration.
10871 * source.c (_initialize_source): Add declaration.
10872 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
10873 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
10874 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
10875 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
10876 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
10877 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
10878 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
10879 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
10880 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
10881 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
10882 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
10883 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
10884 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
10885 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
10886 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
10887 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
10888 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
10889 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
10890 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
10891 * stabsread.c (_initialize_stabsread): Add declaration.
10892 * stack.c (_initialize_stack): Add declaration.
10893 * stap-probe.c (_initialize_stap_probe): Add declaration.
10894 * std-regs.c (_initialize_frame_reg): Add declaration.
10895 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
10896 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
10897 * symfile.c (_initialize_symfile): Add declaration.
10898 * symmisc.c (_initialize_symmisc): Add declaration.
10899 * symtab.c (_initialize_symtab): Add declaration.
10900 * target.c (_initialize_target): Add declaration.
10901 * target-connection.c (_initialize_target_connection): Add
10902 declaration.
10903 * target-dcache.c (_initialize_target_dcache): Add declaration.
10904 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
10905 * thread.c (_initialize_thread): Add declaration.
10906 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
10907 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
10908 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
10909 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
10910 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
10911 * tracectf.c (_initialize_ctf): Add declaration.
10912 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
10913 * tracefile.c (_initialize_tracefile): Add declaration.
10914 * tracepoint.c (_initialize_tracepoint): Add declaration.
10915 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
10916 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
10917 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
10918 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
10919 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
10920 * tui/tui-win.c (_initialize_tui_win): Add declaration.
10921 * tui/tui.c (_initialize_tui): Add declaration.
10922 * typeprint.c (_initialize_typeprint): Add declaration.
10923 * ui-style.c (_initialize_ui_style): Add declaration.
10924 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
10925 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
10926 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
10927 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
10928 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
10929 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
10930 * unittests/filtered_iterator-selftests.c
10931 (_initialize_filtered_iterator_selftests): Add declaration.
10932 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
10933 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
10934 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
10935 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
10936 * unittests/main-thread-selftests.c
10937 (_initialize_main_thread_selftests): Add declaration.
10938 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
10939 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
10940 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
10941 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
10942 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
10943 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
10944 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
10945 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
10946 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
10947 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
10948 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
10949 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
10950 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
10951 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
10952 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
10953 declaration.
10954 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
10955 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
10956 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
10957 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
10958 * user-regs.c (_initialize_user_regs): Add declaration.
10959 * utils.c (_initialize_utils): Add declaration.
10960 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
10961 * valops.c (_initialize_valops): Add declaration.
10962 * valprint.c (_initialize_valprint): Add declaration.
10963 * value.c (_initialize_values): Add declaration.
10964 * varobj.c (_initialize_varobj): Add declaration.
10965 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
10966 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
10967 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
10968 * windows-nat.c (_initialize_windows_nat): Add declaration.
10969 (_initialize_check_for_gdb_ini): Add declaration.
10970 (_initialize_loadable): Add declaration.
10971 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
10972 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
10973 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
10974 * xcoffread.c (_initialize_xcoffread): Add declaration.
10975 * xml-support.c (_initialize_xml_support): Add declaration.
10976 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
10977 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
10978 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
10979 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
10980
10981 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10982
10983 * regformats/regdat.sh: Generate declaration for init function.
10984
10985 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
10986
10987 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
10988 up.
10989 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
10990 close_one_inferior>: New methods.
10991 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
10992 pass down target to find_inferior_pid.
10993 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
10994 Pass down target to find_inferior_ptid.
10995 (gdbsim_target::create_inferior): Pass down target to
10996 add_thread_silent.
10997 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
10998 target down to find_inferior_ptid and switch_to_thread.
10999 (gdbsim_target::close): Update to call close_one_inferior.
11000 (struct resume_data): Remove.
11001 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
11002 directly, rather than through a void pointer.
11003 (gdbsim_target::resume): Update to call resume_one_inferior.
11004
11005 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
11006
11007 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
11008
11009 2020-01-12 Pedro Alves <palves@redhat.com>
11010
11011 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
11012 directly for the current inferior instead of
11013 discard_all_inferiors.
11014 (discard_all_inferiors): Delete.
11015
11016 2020-01-11 Tom Tromey <tom@tromey.com>
11017
11018 * tui/tui-wingeneral.c (box_win): Check cli_styling.
11019 * tui/tui-winsource.c (tui_source_window_base::refill): Use
11020 deprecated_safe_get_selected_frame.
11021
11022 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
11023
11024 * inferior.c (print_inferior): Switch inferior before printing it.
11025
11026 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
11027 Pedro Alves <palves@redhat.com>
11028
11029 * progspace-and-thread.c (switch_to_program_space_and_thread):
11030 Assert there's an inferior for PSPACE. Use
11031 switch_to_inferior_no_thread to switch the inferior too.
11032 * progspace.c (program_space::~program_space): Call
11033 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
11034 (program_space::free_all_objfiles): Don't call clear_symtab_users
11035 here.
11036 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
11037
11038 2020-01-10 Pedro Alves <palves@redhat.com>
11039
11040 * NEWS: Mention multi-target debugging, "info connections", and
11041 "add-inferior -no-connection".
11042
11043 2020-01-10 Pedro Alves <palves@redhat.com>
11044
11045 * infrun.c: Include "target-connection.h".
11046 (check_multi_target_resumption): New.
11047 (proceed): Call it.
11048 * target-connection.c (make_target_connection_string): Make
11049 extern.
11050 * target-connection.h (make_target_connection_string): Declare.
11051
11052 2020-01-10 Pedro Alves <palves@redhat.com>
11053
11054 * Makefile.in (COMMON_SFILES): Add target-connection.c.
11055 * inferior.c (uiout_field_connection): New function.
11056 (print_inferior): Add new "connection-id" column.
11057 (add_inferior_command): Show connection number/string of added
11058 inferior.
11059 * process-stratum-target.h
11060 (process_stratum_target::connection_string): New virtual method.
11061 (process_stratum_target::connection_number): New field.
11062 * remote.c (remote_target::connection_string): New override.
11063 * target-connection.c: New file.
11064 * target-connection.h: New file.
11065 * target.c (decref_target): Remove process_stratum targets from
11066 the connection list.
11067 (target_stack::push): Add process_stratum targets to the
11068 connection list.
11069
11070 2020-01-10 Pedro Alves <palves@redhat.com>
11071
11072 Revert:
11073 2016-04-12 Pedro Alves <palves@redhat.com>
11074 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
11075 Remove references to name.
11076 * serial.h (struct serial) <name>: Delete.
11077
11078 2020-01-10 Pedro Alves <palves@redhat.com>
11079
11080 * gdbarch-selftests.c (register_to_value_test): Remove "target
11081 already pushed" check.
11082
11083 2020-01-10 Pedro Alves <palves@redhat.com>
11084 John Baldwin <jhb@FreeBSD.org>
11085
11086 * aarch64-linux-nat.c
11087 (aarch64_linux_nat_target::thread_architecture): Adjust.
11088 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
11089 (task_command_1): Likewise.
11090 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
11091 (aix_thread_target::wait, aix_thread_target::fetch_registers)
11092 (aix_thread_target::store_registers)
11093 (aix_thread_target::thread_alive): Adjust.
11094 * amd64-fbsd-tdep.c: Include "inferior.h".
11095 (amd64fbsd_get_thread_local_address): Pass down target.
11096 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
11097 thread's gdbarch instead of target_gdbarch.
11098 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
11099 get_last_target_status.
11100 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
11101 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
11102 inferiors.
11103 (update_inserted_breakpoint_locations): Skip if inferiors with no
11104 execution.
11105 (update_global_location_list): When handling moribund locations,
11106 find representative inferior for location's pspace, and use thread
11107 count of its process_stratum target.
11108 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
11109 * bsd-uthread.c (bsd_uthread_target::wait): Use
11110 as_process_stratum_target and adjust thread_change_ptid and
11111 add_thread calls.
11112 (bsd_uthread_target::update_thread_list): Use
11113 as_process_stratum_target and adjust find_thread_ptid,
11114 thread_change_ptid and add_thread calls.
11115 * btrace.c (maint_btrace_packet_history_cmd): Adjust
11116 find_thread_ptid call.
11117 * corelow.c (add_to_thread_list): Adjust add_thread call.
11118 (core_target_open): Adjust add_thread_silent and thread_count
11119 calls.
11120 (core_target::pid_to_str): Adjust find_inferior_ptid call.
11121 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
11122 * event-top.c (async_disconnect): Pop targets from all inferiors.
11123 * exec.c (add_target_sections): Push exec target on all inferiors
11124 sharing the program space.
11125 (remove_target_sections): Remove the exec target from all
11126 inferiors sharing the program space.
11127 (exec_on_vfork): New.
11128 * exec.h (exec_on_vfork): Declare.
11129 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
11130 Pass it down.
11131 (fbsd_nat_target::update_thread_list): Adjust.
11132 (fbsd_nat_target::resume): Adjust.
11133 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
11134 down.
11135 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
11136 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
11137 get_thread_arch_regcache call.
11138 * fork-child.c (gdb_startup_inferior): Pass target down to
11139 startup_inferior and set_executing.
11140 * gdbthread.h (struct process_stratum_target): Forward declare.
11141 (add_thread, add_thread_silent, add_thread_with_info)
11142 (in_thread_list): Add process_stratum_target parameter.
11143 (find_thread_ptid(inferior*, ptid_t)): New overload.
11144 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
11145 parameter.
11146 (all_threads()): Delete overload.
11147 (all_threads, all_non_exited_threads): Add process_stratum_target
11148 parameter.
11149 (all_threads_safe): Use brace initialization.
11150 (thread_count): Add process_stratum_target parameter.
11151 (set_resumed, set_running, set_stop_requested, set_executing)
11152 (threads_are_executing, finish_thread_state): Add
11153 process_stratum_target parameter.
11154 (switch_to_thread): Use is_current_thread.
11155 * i386-fbsd-tdep.c: Include "inferior.h".
11156 (i386fbsd_get_thread_local_address): Pass down target.
11157 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
11158 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
11159 have_inferiors check.
11160 * inf-ptrace.c (inf_ptrace_target::create_inferior)
11161 (inf_ptrace_target::attach): Adjust.
11162 * infcall.c (run_inferior_call): Adjust.
11163 * infcmd.c (run_command_1): Pass target to
11164 scoped_finish_thread_state.
11165 (proceed_thread_callback): Skip inferiors with no execution.
11166 (continue_command): Rename 'all_threads' local to avoid hiding
11167 'all_threads' function. Adjust get_last_target_status call.
11168 (prepare_one_step): Adjust set_running call.
11169 (signal_command): Use user_visible_resume_target. Compare thread
11170 pointers instead of inferior_ptid.
11171 (info_program_command): Adjust to pass down target.
11172 (attach_command): Mark target's 'thread_executing' flag.
11173 (stop_current_target_threads_ns): New, factored out from ...
11174 (interrupt_target_1): ... this. Switch inferior before making
11175 target calls.
11176 * inferior-iter.h
11177 (struct all_inferiors_iterator, struct all_inferiors_range)
11178 (struct all_inferiors_safe_range)
11179 (struct all_non_exited_inferiors_range): Filter on
11180 process_stratum_target too. Remove explicit.
11181 * inferior.c (inferior::inferior): Push dummy target on target
11182 stack.
11183 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
11184 Add process_stratum_target parameter, and pass it down.
11185 (have_live_inferiors): Adjust.
11186 (switch_to_inferior_and_push_target): New.
11187 (add_inferior_command, clone_inferior_command): Handle
11188 "-no-connection" parameter. Use
11189 switch_to_inferior_and_push_target.
11190 (_initialize_inferior): Mention "-no-connection" option in
11191 the help of "add-inferior" and "clone-inferior" commands.
11192 * inferior.h: Include "process-stratum-target.h".
11193 (interrupt_target_1): Use bool.
11194 (struct inferior) <push_target, unpush_target, target_is_pushed,
11195 find_target_beneath, top_target, process_target, target_at,
11196 m_stack>: New.
11197 (discard_all_inferiors): Delete.
11198 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
11199 (all_inferiors, all_non_exited_inferiors): Add
11200 process_stratum_target parameter.
11201 * infrun.c: Include "gdb_select.h" and <unordered_map>.
11202 (target_last_proc_target): New global.
11203 (follow_fork_inferior): Push target on new inferior. Pass target
11204 to add_thread_silent. Call exec_on_vfork. Handle target's
11205 reference count.
11206 (follow_fork): Adjust get_last_target_status call. Also consider
11207 target.
11208 (follow_exec): Push target on new inferior.
11209 (struct execution_control_state) <target>: New field.
11210 (user_visible_resume_target): New.
11211 (do_target_resume): Call target_async.
11212 (resume_1): Set target's threads_executing flag. Consider resume
11213 target.
11214 (commit_resume_all_targets): New.
11215 (proceed): Also consider resume target. Skip threads of inferiors
11216 with no execution. Commit resumtion in all targets.
11217 (start_remote): Pass current inferior to wait_for_inferior.
11218 (infrun_thread_stop_requested): Consider target as well. Pass
11219 thread_info pointer to clear_inline_frame_state instead of ptid.
11220 (infrun_thread_thread_exit): Consider target as well.
11221 (random_pending_event_thread): New inferior parameter. Use it.
11222 (do_target_wait): Rename to ...
11223 (do_target_wait_1): ... this. Add inferior parameter, and pass it
11224 down.
11225 (threads_are_resumed_pending_p, do_target_wait): New.
11226 (prepare_for_detach): Adjust calls.
11227 (wait_for_inferior): New inferior parameter. Handle it. Use
11228 do_target_wait_1 instead of do_target_wait.
11229 (fetch_inferior_event): Adjust. Switch to representative
11230 inferior. Pass target down.
11231 (set_last_target_status): Add process_stratum_target parameter.
11232 Save target in global.
11233 (get_last_target_status): Add process_stratum_target parameter and
11234 handle it.
11235 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
11236 (context_switch): Check inferior_ptid == null_ptid before calling
11237 inferior_thread().
11238 (get_inferior_stop_soon): Pass down target.
11239 (wait_one): Rename to ...
11240 (poll_one_curr_target): ... this.
11241 (struct wait_one_event): New.
11242 (wait_one): New.
11243 (stop_all_threads): Adjust.
11244 (handle_no_resumed, handle_inferior_event): Adjust to consider the
11245 event's target.
11246 (switch_back_to_stepped_thread): Also consider target.
11247 (print_stop_event): Update.
11248 (normal_stop): Update. Also consider the resume target.
11249 * infrun.h (wait_for_inferior): Remove declaration.
11250 (user_visible_resume_target): New declaration.
11251 (get_last_target_status, set_last_target_status): New
11252 process_stratum_target parameter.
11253 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
11254 process_stratum_target parameter, and use it.
11255 (clear_inline_frame_state (thread_info*)): New.
11256 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
11257 process_stratum_target parameter.
11258 (clear_inline_frame_state (thread_info*)): Declare.
11259 * linux-fork.c (delete_checkpoint_command): Pass target down to
11260 find_thread_ptid.
11261 (checkpoint_command): Adjust.
11262 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
11263 instead of just tweaking inferior_ptid.
11264 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
11265 (exit_lwp): Pass target down to find_thread_ptid.
11266 (attach_proc_task_lwp_callback): Pass target down to
11267 add_thread/set_running/set_executing.
11268 (linux_nat_target::attach): Pass target down to
11269 thread_change_ptid.
11270 (get_detach_signal): Pass target down to find_thread_ptid.
11271 Consider last target status's target.
11272 (linux_resume_one_lwp_throw, resume_lwp)
11273 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
11274 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
11275 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
11276 (linux_nat_target::async_wait_fd): New.
11277 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
11278 target down.
11279 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
11280 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
11281 * linux-thread-db.c (struct thread_db_info::process_target): New
11282 field.
11283 (add_thread_db_info): Save target.
11284 (get_thread_db_info): New process_stratum_target parameter. Also
11285 match target.
11286 (delete_thread_db_info): New process_stratum_target parameter.
11287 Also match target.
11288 (thread_from_lwp): Adjust to pass down target.
11289 (thread_db_notice_clone): Pass down target.
11290 (check_thread_db_callback): Pass down target.
11291 (try_thread_db_load_1): Always push the thread_db target.
11292 (try_thread_db_load, record_thread): Pass target down.
11293 (thread_db_target::detach): Pass target down. Always unpush the
11294 thread_db target.
11295 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
11296 target down. Always unpush the thread_db target.
11297 (find_new_threads_callback, thread_db_find_new_threads_2)
11298 (thread_db_target::update_thread_list): Pass target down.
11299 (thread_db_target::pid_to_str): Pass current inferior down.
11300 (thread_db_target::get_thread_local_address): Pass target down.
11301 (thread_db_target::resume, maintenance_check_libthread_db): Pass
11302 target down.
11303 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
11304 * procfs.c (procfs_target::procfs_init_inferior): Declare.
11305 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
11306 (procfs_init_inferior): Rename to ...
11307 (procfs_target::procfs_init_inferior): ... this and adjust.
11308 (procfs_target::create_inferior, procfs_notice_thread)
11309 (procfs_do_thread_registers): Adjust.
11310 * ppc-fbsd-tdep.c: Include "inferior.h".
11311 (ppcfbsd_get_thread_local_address): Pass down target.
11312 * proc-service.c (ps_xfer_memory): Switch current inferior and
11313 program space as well.
11314 (get_ps_regcache): Pass target down.
11315 * process-stratum-target.c
11316 (process_stratum_target::thread_address_space)
11317 (process_stratum_target::thread_architecture): Pass target down.
11318 * process-stratum-target.h
11319 (process_stratum_target::threads_executing): New field.
11320 (as_process_stratum_target): New.
11321 * ravenscar-thread.c
11322 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
11323 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
11324 down.
11325 * record-btrace.c (record_btrace_target::info_record): Adjust.
11326 (record_btrace_target::record_method)
11327 (record_btrace_target::record_is_replaying)
11328 (record_btrace_target::fetch_registers)
11329 (get_thread_current_frame_id, record_btrace_target::resume)
11330 (record_btrace_target::wait, record_btrace_target::stop): Pass
11331 target down.
11332 * record-full.c (record_full_wait_1): Switch to event thread.
11333 Pass target down.
11334 * regcache.c (regcache::regcache)
11335 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
11336 process_stratum_target parameter and handle it.
11337 (current_thread_target): New global.
11338 (get_thread_regcache): Add process_stratum_target parameter and
11339 handle it. Switch inferior before calling target method.
11340 (get_thread_regcache): Pass target down.
11341 (get_thread_regcache_for_ptid): Pass target down.
11342 (registers_changed_ptid): Add process_stratum_target parameter and
11343 handle it.
11344 (registers_changed_thread, registers_changed): Pass target down.
11345 (test_get_thread_arch_aspace_regcache): New.
11346 (current_regcache_test): Define a couple local test_target_ops
11347 instances and use them for testing.
11348 (readwrite_regcache): Pass process_stratum_target parameter.
11349 (cooked_read_test, cooked_write_test): Pass mock_target down.
11350 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
11351 (get_thread_arch_aspace_regcache): Add process_stratum_target
11352 parameter.
11353 (regcache::target): New method.
11354 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
11355 (regcache::registers_changed_ptid): Add process_stratum_target
11356 parameter.
11357 (regcache::m_target): New field.
11358 (registers_changed_ptid): Add process_stratum_target parameter.
11359 * remote.c (remote_state::supports_vCont_probed): New field.
11360 (remote_target::async_wait_fd): New method.
11361 (remote_unpush_and_throw): Add remote_target parameter.
11362 (get_current_remote_target): Adjust.
11363 (remote_target::remote_add_inferior): Push target.
11364 (remote_target::remote_add_thread)
11365 (remote_target::remote_notice_new_inferior)
11366 (get_remote_thread_info): Pass target down.
11367 (remote_target::update_thread_list): Skip threads of inferiors
11368 bound to other targets. (remote_target::close): Don't discard
11369 inferiors. (remote_target::add_current_inferior_and_thread)
11370 (remote_target::process_initial_stop_replies)
11371 (remote_target::start_remote)
11372 (remote_target::remote_serial_quit_handler): Pass down target.
11373 (remote_target::remote_unpush_target): New remote_target
11374 parameter. Unpush the target from all inferiors.
11375 (remote_target::remote_unpush_and_throw): New remote_target
11376 parameter. Pass it down.
11377 (remote_target::open_1): Check whether the current inferior has
11378 execution instead of checking whether any inferior is live. Pass
11379 target down.
11380 (remote_target::remote_detach_1): Pass down target. Use
11381 remote_unpush_target.
11382 (extended_remote_target::attach): Pass down target.
11383 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
11384 (remote_target::append_resumption): Pass down target.
11385 (remote_target::append_pending_thread_resumptions)
11386 (remote_target::remote_resume_with_hc, remote_target::resume)
11387 (remote_target::commit_resume): Pass down target.
11388 (remote_target::remote_stop_ns): Check supports_vCont_probed.
11389 (remote_target::interrupt_query)
11390 (remote_target::remove_new_fork_children)
11391 (remote_target::check_pending_events_prevent_wildcard_vcont)
11392 (remote_target::remote_parse_stop_reply)
11393 (remote_target::process_stop_reply): Pass down target.
11394 (first_remote_resumed_thread): New remote_target parameter. Pass
11395 it down.
11396 (remote_target::wait_as): Pass down target.
11397 (unpush_and_perror): New remote_target parameter. Pass it down.
11398 (remote_target::readchar, remote_target::remote_serial_write)
11399 (remote_target::getpkt_or_notif_sane_1)
11400 (remote_target::kill_new_fork_children, remote_target::kill): Pass
11401 down target.
11402 (remote_target::mourn_inferior): Pass down target. Use
11403 remote_unpush_target.
11404 (remote_target::core_of_thread)
11405 (remote_target::remote_btrace_maybe_reopen): Pass down target.
11406 (remote_target::pid_to_exec_file)
11407 (remote_target::thread_handle_to_thread_info): Pass down target.
11408 (remote_target::async_wait_fd): New.
11409 * riscv-fbsd-tdep.c: Include "inferior.h".
11410 (riscv_fbsd_get_thread_local_address): Pass down target.
11411 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
11412 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
11413 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
11414 Adjust.
11415 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
11416 * solib-svr4.c (enable_break): Pass down target.
11417 * spu-multiarch.c (parse_spufs_run): Pass down target.
11418 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
11419 * target-delegates.c: Regenerate.
11420 * target.c (g_target_stack): Delete.
11421 (current_top_target): Return the current inferior's top target.
11422 (target_has_execution_1): Refer to the passed-in inferior's top
11423 target.
11424 (target_supports_terminal_ours): Check whether the initial
11425 inferior was already created.
11426 (decref_target): New.
11427 (target_stack::push): Incref/decref the target.
11428 (push_target, push_target, unpush_target): Adjust.
11429 (target_stack::unpush): Defref target.
11430 (target_is_pushed): Return bool. Adjust to refer to the current
11431 inferior's target stack.
11432 (dispose_inferior): Delete, and inline parts ...
11433 (target_preopen): ... here. Only dispose of the current inferior.
11434 (target_detach): Hold strong target reference while detaching.
11435 Pass target down.
11436 (target_thread_name): Add assertion.
11437 (target_resume): Pass down target.
11438 (target_ops::beneath, find_target_at): Adjust to refer to the
11439 current inferior's target stack.
11440 (get_dummy_target): New.
11441 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
11442 has a thread running.
11443 (initialize_targets): Rename to ...
11444 (_initialize_target): ... this.
11445 * target.h: Include "gdbsupport/refcounted-object.h".
11446 (struct target_ops): Inherit refcounted_object.
11447 (target_ops::shortname, target_ops::longname): Make const.
11448 (target_ops::async_wait_fd): New method.
11449 (decref_target): Declare.
11450 (struct target_ops_ref_policy): New.
11451 (target_ops_ref): New typedef.
11452 (get_dummy_target): Declare function.
11453 (target_is_pushed): Return bool.
11454 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
11455 (all_matching_threads_iterator::all_matching_threads_iterator):
11456 Handle filter target.
11457 * thread-iter.h (struct all_matching_threads_iterator, struct
11458 all_matching_threads_range, class all_non_exited_threads_range):
11459 Filter by target too. Remove explicit.
11460 * thread.c (threads_executing): Delete.
11461 (inferior_thread): Pass down current inferior.
11462 (clear_thread_inferior_resources): Pass down thread pointer
11463 instead of ptid_t.
11464 (add_thread_silent, add_thread_with_info, add_thread): Add
11465 process_stratum_target parameter. Use it for thread and inferior
11466 searches.
11467 (is_current_thread): New.
11468 (thread_info::deletable): Use it.
11469 (find_thread_ptid, thread_count, in_thread_list)
11470 (thread_change_ptid, set_resumed, set_running): New
11471 process_stratum_target parameter. Pass it down.
11472 (set_executing): New process_stratum_target parameter. Pass it
11473 down. Adjust reference to 'threads_executing'.
11474 (threads_are_executing): New process_stratum_target parameter.
11475 Adjust reference to 'threads_executing'.
11476 (set_stop_requested, finish_thread_state): New
11477 process_stratum_target parameter. Pass it down.
11478 (switch_to_thread): Also match inferior.
11479 (switch_to_thread): New process_stratum_target parameter. Pass it
11480 down.
11481 (update_threads_executing): Reimplement.
11482 * top.c (quit_force): Pop targets from all inferior.
11483 (gdb_init): Don't call initialize_targets.
11484 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
11485 Declare.
11486 (windows_add_thread, windows_delete_thread): Adjust.
11487 (get_windows_debug_event): Rename to ...
11488 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
11489 * tracefile-tfile.c (tfile_target_open): Pass down target.
11490 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
11491 Forward declare.
11492 (switch_to_thread): Add process_stratum_target parameter.
11493 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
11494 parameter. Use it.
11495 (mi_on_resume): Pass target down.
11496 * nat/fork-inferior.c (startup_inferior): Add
11497 process_stratum_target parameter. Pass it down.
11498 * nat/fork-inferior.h (startup_inferior): Add
11499 process_stratum_target parameter.
11500 * python/py-threadevent.c (py_get_event_thread): Pass target down.
11501
11502 2020-01-10 Pedro Alves <palves@redhat.com>
11503
11504 * remote.c (remote_target::start_remote): Don't set inferior_ptid
11505 directly. Instead find the first thread in the thread list and
11506 use switch_to_thread.
11507
11508 2020-01-10 Pedro Alves <palves@redhat.com>
11509
11510 * remote.c (remote_target::remote_add_inferior): Don't bind a
11511 process to the current inferior if the current inferior is already
11512 bound to a process.
11513
11514 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
11515 Pedro Alves <palves@redhat.com>
11516
11517 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
11518 If no process is specified, return null_ptid instead of
11519 inferior_ptid.
11520 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
11521 TARGET_WAITKIND_SIGNALLED with no pid.
11522
11523 2020-01-10 Pedro Alves <palves@redhat.com>
11524
11525 * remote.c (first_remote_resumed_thread): New.
11526 (remote_target::wait_as): Use it as default event_ptid instead of
11527 inferior_ptid.
11528
11529 2020-01-10 Pedro Alves <palves@redhat.com>
11530
11531 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
11532
11533 2020-01-10 Pedro Alves <palves@redhat.com>
11534
11535 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
11536 not -1.
11537
11538 2020-01-10 Pedro Alves <palves@redhat.com>
11539
11540 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
11541 ptid to get_last_target_status.
11542 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
11543 ptid to get_last_target_status.
11544 * infcmd.c (continue_command): Don't pass a target_waitstatus to
11545 get_last_target_status.
11546 (info_program_command): Don't pass a target_waitstatus to
11547 get_last_target_status.
11548 * infrun.c (init_wait_for_inferior): Use
11549 nullify_last_target_wait_ptid.
11550 (get_last_target_status): Handle nullptr arguments.
11551 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
11552 (print_stop_event): Don't pass a ptid to get_last_target_status.
11553 (normal_stop): Don't pass a ptid to get_last_target_status.
11554 * infrun.h (get_last_target_status, set_last_target_status): Move
11555 comments here and update.
11556 (nullify_last_target_wait_ptid): Declare.
11557 * linux-fork.c (fork_load_infrun_state): Remove local extern
11558 declaration of nullify_last_target_wait_ptid.
11559 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
11560 to get_last_target_status.
11561
11562 2020-01-10 Pedro Alves <palves@redhat.com>
11563
11564 * gdbthread.h (scoped_restore_current_thread)
11565 <dont_restore, restore, m_dont_restore>: Declare.
11566 * thread.c (thread_alive): Add assertion. Return bool.
11567 (switch_to_thread_if_alive): New.
11568 (prune_threads): Switch inferior/thread.
11569 (print_thread_info_1): Switch thread before calling target methods.
11570 (scoped_restore_current_thread::restore): New, factored out from
11571 ...
11572 (scoped_restore_current_thread::~scoped_restore_current_thread):
11573 ... this.
11574 (scoped_restore_current_thread::scoped_restore_current_thread):
11575 Add assertion.
11576 (thread_apply_all_command, thread_select): Use
11577 switch_to_thread_if_alive.
11578 * infrun.c (proceed, restart_threads, handle_signal_stop)
11579 (switch_back_to_stepped_thread): Switch current thread before
11580 calling target methods.
11581
11582 2020-01-10 Pedro Alves <palves@redhat.com>
11583
11584 * inferior.c (switch_to_inferior_no_thread): New function,
11585 factored out from ...
11586 (inferior_command): ... here.
11587 * inferior.h (switch_to_inferior_no_thread): Declare.
11588 * mi/mi-main.c (run_one_inferior): Use
11589 switch_to_inferior_no_thread.
11590
11591 2020-01-10 Pedro Alves <palves@redhat.com>
11592
11593 * infcmd.c (kill_command): Remove dead code.
11594
11595 2020-01-10 Pedro Alves <palves@redhat.com>
11596
11597 * remote.c (remote_target::mourn_inferior): No longer check
11598 whether the target is running.
11599
11600 2020-01-10 Pedro Alves <palves@redhat.com>
11601
11602 * corelow.c (core_target::has_execution): Change parameter type to
11603 inferior pointer.
11604 * inferior.c (number_of_live_inferiors): Use
11605 inferior::has_execution instead of target_has_execution_1.
11606 * inferior.h (inferior::has_execution): New.
11607 * linux-thread-db.c (thread_db_target::update_thread_list): Use
11608 inferior::has_execution instead of target_has_execution_1.
11609 * process-stratum-target.c
11610 (process_stratum_target::has_execution): Change parameter type to
11611 inferior pointer. Check the inferior's PID instead of
11612 inferior_ptid.
11613 * process-stratum-target.h
11614 (process_stratum_target::has_execution): Change parameter type to
11615 inferior pointer.
11616 * record-full.c (record_full_core_target::has_execution): Change
11617 parameter type to inferior pointer.
11618 * target.c (target_has_execution_1): Change parameter type to
11619 inferior pointer.
11620 (target_has_execution_current): Adjust.
11621 * target.h (target_ops::has_execution): Change parameter type to
11622 inferior pointer.
11623 (target_has_execution_1): Change parameter type to inferior
11624 pointer. Change return type to bool.
11625 * tracefile.h (tracefile_target::has_execution): Change parameter
11626 type to inferior pointer.
11627
11628 2020-01-10 Pedro Alves <palves@redhat.com>
11629
11630 * exceptions.c (print_flush): Remove current_top_target() check.
11631
11632 2020-01-10 Pedro Alves <palves@redhat.com>
11633
11634 * remote.c (show_remote_exec_file): Show the current inferior's
11635 exec-file instead of the command variable's value.
11636
11637 2020-01-10 Pedro Alves <palves@redhat.com>
11638
11639 * record-full.c (record_full_resume_ptid): New global.
11640 (record_full_target::resume): Set it.
11641 (record_full_wait_1): Use record_full_resume_ptid instead of
11642 inferior_ptid.
11643
11644 2020-01-10 Pedro Alves <palves@redhat.com>
11645
11646 * gdbthread.h (scoped_restore_current_thread)
11647 <dont_restore, restore, m_dont_restore>: Declare.
11648 * thread.c (thread_alive): Add assertion. Return bool.
11649 (switch_to_thread_if_alive): New.
11650 (prune_threads): Switch inferior/thread.
11651 (print_thread_info_1): Switch thread before calling target methods.
11652 (scoped_restore_current_thread::restore): New, factored out from
11653 ...
11654 (scoped_restore_current_thread::~scoped_restore_current_thread):
11655 ... this.
11656 (scoped_restore_current_thread::scoped_restore_current_thread):
11657 Add assertion.
11658 (thread_apply_all_command, thread_select): Use
11659 switch_to_thread_if_alive.
11660
11661 2020-01-10 George Barrett <bob@bob131.so>
11662
11663 * stap-probe.c (stap_modify_semaphore): Don't check for null
11664 semaphores.
11665 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
11666 for null semaphores.
11667
11668 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
11669
11670 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
11671 all source windows, and maintain horizontal scroll status while
11672 doing so.
11673
11674 2020-01-09 Tom Tromey <tom@tromey.com>
11675
11676 PR tui/18932:
11677 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
11678 update_source_window, not print_source_lines.
11679
11680 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
11681
11682 * tui/tui.c (tui_enable): Register tui hooks after calling
11683 tui_display_main.
11684
11685 2020-01-09 Christian Biesinger <cbiesinger@google.com>
11686
11687 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
11688
11689 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
11690
11691 * thread.c (print_thread_info_1): Fix indentation.
11692
11693 2020-01-09 Christian Biesinger <cbiesinger@google.com>
11694
11695 * symtab.c (general_symbol_info::compute_and_set_names): Move the
11696 unique_xmalloc_ptr outside the if to always free the demangled name.
11697
11698 2020-01-08 Tom Tromey <tromey@adacore.com>
11699
11700 * xcoffread.c (enter_line_range, read_xcoff_symtab)
11701 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
11702 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
11703 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
11704 Remove.
11705 (section_offsets): New typedef.
11706 * symtab.c (fixup_section, get_msymbol_address): Update.
11707 * symmisc.c (dump_msymbols): Update.
11708 * symfile.h (relative_addr_info_to_section_offsets)
11709 (symfile_map_offsets_to_segments): Update.
11710 * symfile.c (build_section_addr_info_from_objfile)
11711 (init_objfile_sect_indices): Update.
11712 (struct place_section_arg): Change type of "offsets".
11713 (place_section): Update.
11714 (relative_addr_info_to_section_offsets): Change type of
11715 "section_offsets". Remove "num_sections" parameter.
11716 (default_symfile_offsets, syms_from_objfile_1)
11717 (set_objfile_default_section_offset): Update.
11718 (reread_symbols): No need to preserve section offsets by hand.
11719 (symfile_map_offsets_to_segments): Change type of "offsets".
11720 * stap-probe.c (relocate_address): Update.
11721 * stabsread.h (process_one_symbol): Update.
11722 * solib-target.c (struct lm_info_target) <offsets>: Change type.
11723 (solib_target_relocate_section_addresses): Update.
11724 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
11725 Update.
11726 * solib-frv.c (frv_relocate_main_executable): Update.
11727 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
11728 * solib-aix.c (solib_aix_get_section_offsets): Change return
11729 type.
11730 (solib_aix_solib_create_inferior_hook): Update.
11731 * remote.c (remote_target::get_offsets): Update.
11732 * psymtab.c (find_pc_sect_psymtab): Update.
11733 * psympriv.h (struct partial_symbol) <address, text_low,
11734 text_high>: Update.
11735 * objfiles.h (obj_section_offset): Update.
11736 (struct objfile) <section_offsets>: Change type.
11737 <num_sections>: Remove.
11738 (objfile_relocate): Update.
11739 * objfiles.c (entry_point_address_query): Update
11740 (relocate_one_symbol): Change type of "section_offsets".
11741 (objfile_relocate1, objfile_relocate1): Change type of
11742 "new_offsets".
11743 (objfile_rebase1): Update.
11744 * mipsread.c (mipscoff_symfile_read): Update.
11745 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
11746 parameter.
11747 * mdebugread.c (parse_symbol): Change type of "section_offsets".
11748 (parse_external, psymtab_to_symtab_1): Update.
11749 * machoread.c (macho_symfile_offsets): Update.
11750 * ia64-tdep.c (ia64_find_unwind_table): Update.
11751 * hppa-tdep.c (read_unwind_info): Update.
11752 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
11753 * dwarf2read.c (create_addrmap_from_index)
11754 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
11755 (process_psymtab_comp_unit_reader, add_partial_symbol)
11756 (add_partial_subprogram, process_full_comp_unit)
11757 (read_file_scope, read_func_scope, read_lexical_block_scope)
11758 (read_call_site_scope, dwarf2_rnglists_process)
11759 (dwarf2_ranges_process, dwarf2_ranges_read)
11760 (dwarf_decode_lines_1, var_decode_location, new_symbol)
11761 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
11762 Update.
11763 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
11764 Update.
11765 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
11766 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
11767 (process_one_symbol): Change type of "section_offsets".
11768 * ctfread.c (get_objfile_text_range): Update.
11769 * coffread.c (coff_symtab_read, enter_linenos)
11770 (process_coff_symbol): Update.
11771 * coff-pe-read.c (add_pe_forwarded_sym): Update.
11772 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
11773
11774 2020-01-08 Tom Tromey <tromey@adacore.com>
11775
11776 * dwarf2read.c (parse_macro_definition): Use std::string.
11777 (parse_macro_definition): Likewise.
11778
11779 2020-01-08 Tom Tromey <tromey@adacore.com>
11780
11781 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
11782 (ATTR_ALLOC_CHUNK): Remove.
11783
11784 2020-01-08 Tom Tromey <tromey@adacore.com>
11785
11786 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
11787
11788 2020-01-08 Tom Tromey <tromey@adacore.com>
11789
11790 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
11791 (dwarf2_compute_name, open_dwo_file): Likewise.
11792 (process_enumeration_scope): Use std::vector.
11793 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
11794 (partial_die_info::fixup, dwarf2_start_subfile)
11795 (guess_full_die_structure_name, dwarf2_name): Likewise.
11796 (determine_prefix): Update.
11797 (guess_full_die_structure_name): Make return type const.
11798 (partial_die_full_name): Return unique_xmalloc_ptr.
11799 (DW_FIELD_ALLOC_CHUNK): Remove.
11800
11801 2020-01-07 Tom Tromey <tromey@adacore.com>
11802
11803 PR build/24937:
11804 * stap-probe.c (class stap_static_probe_ops): Add constructor.
11805
11806 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
11807
11808 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
11809
11810 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
11811
11812 * stack.c (print_frame_info): Move disassemble_next_line code
11813 inside source_print block.
11814
11815 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11816
11817 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
11818 gdb/signals.h, as we are now using native signal symbols.
11819
11820 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
11821
11822 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
11823 overflow by an early check of content vs threshold.
11824 * tui/tui-source.c (tui_source_window::line_is_displayed):
11825 Likewise.
11826
11827 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11828
11829 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
11830
11831 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
11832
11833 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
11834 export table if no section contains it's RVA.
11835
11836 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11837
11838 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
11839
11840 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
11841
11842 * source.c (print_source_lines_base): Set last_line_listed.
11843
11844 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
11845
11846 * tui/tui-disasm.c: Remove trailing spaces.
11847
11848 2020-01-06 Eli Zaretskii <eliz@gnu.org>
11849 Pedro Alves <palves@redhat.com>
11850
11851 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
11852 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
11853 (windows_gdb_signal_to_target): New function, uses the above
11854 enumeration to convert GDB internal signal codes to equivalent
11855 Windows codes.
11856 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
11857 * windows-nat.c: Include "gdb_wait.h".
11858 (get_windows_debug_event): Extract the fatal exception from the
11859 exit status and convert to the equivalent Posix signal number.
11860 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
11861 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
11862 * gdbsupport/gdb_wait.c: New file, implements
11863 windows_status_to_termsig.
11864 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
11865 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
11866
11867 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
11868
11869 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
11870 show_layout.
11871
11872 2020-01-05 Luis Machado <luis.machado@linaro.org>
11873
11874 * aarch64-linux-nat.c
11875 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
11876 and bfd_mach_aarch64.
11877
11878 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11879
11880 * ui-file.c (stdio_file::can_emit_style_escape)
11881 (tee_file::can_emit_style_escape): Ensure style is used also on
11882 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
11883 to gdb_stdout.
11884 * main.c (set_gdb_data_directory): Use file style to output the
11885 warning that the given pathname is not a directory.
11886 * top.c (show_history_filename, gdb_safe_append_history)
11887 (show_gdb_datadir): Use file style.
11888
11889 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
11890
11891 * solib-target.c (struct lm_info_target):
11892 Change offsets to be a unique_xmalloc_ptr.
11893 (solib_target_relocate_section_addresses): Update.
11894
11895 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
11896
11897 * windows-nat.c (windows_clear_solib): Free so_list linked list.
11898
11899 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
11900
11901 * MAINTAINERS (Write After Approval): Add myself.
11902
11903 2020-01-02 Luis Machado <luis.machado@linaro.org>
11904
11905 * proc-service.c (get_ps_regcache): Remove reference to obsolete
11906 Cell BE architecture.
11907 * target.h (struct target_ops) <thread_architecture>: Likewise.
11908
11909 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11910
11911 * Makefile.in: Use INSTALL_PROGRAM_ENV.
11912
11913 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
11914
11915 * MAINTAINERS (Write After Approval): Add myself.
11916
11917 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11918
11919 * gdbarch.sh: Update copyright year range of generated files.
11920
11921 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11922
11923 Update copyright year range in all GDB files.
11924
11925 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11926
11927 * copyright.py: Convert to Python 3.
11928
11929 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11930
11931 * copyright.py: Adapt after move of gnulib directory from gdb
11932 directory to toplevel directory.
11933
11934 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11935
11936 * copyright.py (main): Exit if run from the wrong directory.
11937
11938 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11939
11940 * top.c (print_gdb_version): Change copyright year to 2020.
11941
11942 2020-01-01 Joel Brobecker <brobecker@adacore.com>
11943
11944 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
11945
11946 For older changes see ChangeLog-2019.
11947 \f
11948 Local Variables:
11949 mode: change-log
11950 left-margin: 8
11951 fill-column: 74
11952 version-control: never
11953 coding: utf-8
11954 End:
This page took 0.2582 seconds and 5 git commands to generate.