]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
2b8a0ac9e3a426419ae34790815162ed62a90a3d
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2020-09-10 Kamil Rytarowski <n54@gmx.com>
2
3 * netbsd-nat.h: Include <unistd.h>.
4 * (netbsd_nat::pid_to_exec_file): Add.
5 * netbsd-nat.c: Include <sys/types.h> and <sys/sysctl.h>.
6 * (netbsd_nat::pid_to_exec_file) Add.
7
8 2020-09-10 Kamil Rytarowski <n54@gmx.com>
9
10 * configure.nat (NATDEPFILES): Add nat/netbsd-nat.o when needed.
11
12 2020-09-10 Kamil Rytarowski <n54@gmx.com>
13
14 * netbsd-nat.h: New file.
15 * netbsd-nat.c: Likewise.
16
17 2020-09-09 Tom Tromey <tromey@adacore.com>
18
19 * ada-lang.c (remove_extra_symbols): Do not increment when
20 removing an element
21
22 2020-09-08 Tom Tromey <tromey@adacore.com>
23
24 * gdb_bfd.c (gdb_bfd_open): Call bfd_fopen when fstat fails.
25
26 2020-09-08 Tom Tromey <tromey@adacore.com>
27
28 PR win32/25302:
29 * gdb_bfd.c (gdb_bfd_data): Add "st" parameter.
30 (gdb_bfd_init_data): New function.
31 (gdb_bfd_open, gdb_bfd_ref): Use gdb_bfd_init_data.
32
33 2020-09-07 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
34
35 * infrun.c (fetch_inferior_event): Use
36 `switch_to_target_no_thread` to switch the target.
37
38 2020-09-06 Tom Tromey <tom@tromey.com>
39
40 * symfile.h (dwarf2_free_objfile): Don't declare.
41
42 2020-09-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
43
44 * gdb/i386-tdep.c (i386_floatformat_for_type): Added conditions
45 to match 16 byte real/complex type generated by Flang compiler.
46
47 2020-09-03 Tom de Vries <tdevries@suse.de>
48
49 PR breakpoint/26546
50 * dwarf2/read.c (new_symbol): Tag label symbol without DW_AT_low_pc as
51 LOC_OPTIMIZED_OUT instead of LOC_LABEL.
52
53 2020-09-02 Simon Marchi <simon.marchi@polymtl.ca>
54
55 * maint.c (index_digits): New function.
56 (struct maint_print_section_data): Remove.
57 (print_bfd_section_info): Remove print_data parameter, add arg
58 and index_digits.
59 (print_objfile_section_info): Likewise.
60 (print_bfd_section_info_maybe_relocated): Likewise (plus
61 objfile).
62 (maintenance_info_sections): Adjust calls.
63
64 2020-09-02 Tom Tromey <tromey@adacore.com>
65
66 * ada-varobj.c (ada_varobj_get_ptr_number_of_children): Return 0
67 for null pointers.
68 (ada_varobj_adjust_for_child_access): Special-case null pointers.
69
70 2020-09-01 Simon Marchi <simon.marchi@polymtl.ca>
71
72 * bcache.h (struct bcache) <insert>: Change type of `added` to
73 pointer to bool.
74 * bcache.c (bcache::insert): Likewise.
75 * gdbtypes.c (check_types_worklist): Adjust.
76 * psymtab.c (add_psymbol_to_bcache): Adjust.
77
78 2020-08-31 Kevin Buettner <kevinb@redhat.com>
79
80 * corelow.c (unordered_set): Include.
81 (class core_target): Add field 'm_core_unavailable_mappings'.
82 (core_target::build_file_mappings): Print only one warning
83 per inaccessible file. Add unavailable/broken mappings
84 to m_core_unavailable_mappings.
85 (core_target::xfer_partial): Call...
86 (core_target::xfer_memory_via_mappings): New method.
87
88 2020-08-31 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * dwarf2/read.c (struct field_info) <non_public_fields>: Change
91 type to bool.
92
93 2020-08-31 Simon Marchi <simon.marchi@polymtl.ca>
94
95 * dwarf2/read.c (struct field_info): Fix indentation.
96
97 2020-08-31 Simon Marchi <simon.marchi@efficios.com>
98
99 * frame-unwind.h (frame_prev_register_ftype): Fix adjective
100 ordering in comment.
101 * frame.c (frame_id_eq): Fix indentation.
102
103 2020-08-31 Scott Linder <scott@scottlinder.com>
104 Simon Marchi <simon.marchi@efficios.com>
105
106 * inline-frame.c (inline_frame_this_id): Remove assert that prevents
107 inline frame ids in outer frame.
108
109 2020-08-31 Simon Marchi <simon.marchi@efficios.com>
110
111 * frame.h (enum frame_id_stack_status) <FID_STACK_OUTER>: New.
112 * frame.c (fprint_frame_id): Handle FID_STACK_OUTER.
113 (outer_frame_id): Use FID_STACK_OUTER instead of
114 FID_STACK_INVALID.
115 (frame_id_p): Don't check for outer_frame_id.
116
117 2020-08-31 Simon Marchi <simon.marchi@efficios.com>
118
119 * frame-unwind.c (frame_unwind_got_optimized): Don't set
120 regnum/frame in value. Call allocate_value_lazy.
121 * frame.c (frame_unwind_register_value): Use
122 val_print_not_saved.
123
124 2020-08-31 Simon Marchi <simon.marchi@efficios.com>
125
126 * gdbtypes.h (NULL_TYPE): Remove, change all uses to nullptr.
127
128 2020-08-29 Pedro Alves <pedro@palves.net>
129
130 * progspace.c (print_program_space): Use all_inferiors. Switch to
131 the inferior before calling target_pid_to_str.
132
133 2020-08-28 Tom Tromey <tom@tromey.com>
134
135 * xcoffread.c (xcoff_end_psymtab): Update comment.
136 * dbxread.c (dbx_end_psymtab): Update comment.
137
138 2020-08-28 Tom de Vries <tdevries@suse.de>
139
140 PR breakpoint/26544
141 * breakpoint.c (parse_breakpoint_sals): Remove const from struct
142 event_location.
143 (create_breakpoint): Same.
144 (base_breakpoint_decode_location): Same.
145 (bkpt_create_sals_from_location): Same.
146 (bkpt_decode_location): Same.
147 (bkpt_probe_create_sals_from_location): Same.
148 (bkpt_probe_decode_location): Same.
149 (tracepoint_create_sals_from_location): Same.
150 (tracepoint_decode_location): Same.
151 (tracepoint_probe_decode_location): Same.
152 (strace_marker_create_sals_from_location): Same.
153 (strace_marker_decode_location): Same.
154 (create_sals_from_location_default): Same.
155 (decode_location_default): Same.
156 * breakpoint.h (struct breakpoint_ops): Same.
157 (create_breakpoint): Same.
158 * linespec.h (decode_line_full): Same.
159 * linespec.c (decode_line_full): Same. Throw error if
160 result.size () == 0.
161
162 2020-08-27 Pedro Alves <pedro@palves.net>
163
164 PR gdb/26524
165 * breakpoint.c (until_break_fsm) <location_breakpoint,
166 caller_breakpoint>: Delete fields.
167 <breakpoints>: New field.
168 <until_break_fsm>: Adjust to save a breakpoint vector instead of
169 two individual breakpoints.
170 (until_break_fsm::should_stop): Loop over breakpoints in the
171 breakpoint vector.
172 (until_break_fsm::clean_up): Adjust to clear the breakpoints
173 vector.
174 (until_break_command): Handle location expanding into multiple
175 sals.
176
177 2020-08-27 Pedro Alves <pedro@palves.net>
178
179 PR gdb/26523
180 * inline-frame.c (stopped_by_user_bp_inline_frame): Also consider
181 bp_until breakpoints user-specified locations. Update intro
182 comment.
183
184 2020-08-27 Simon Marchi <simon.marchi@polymtl.ca>
185
186 * gdb_bfd.h (gdb_bfd_section_iterator, gdb_bfd_section_range,
187 gdb_bfd_sections): New.
188 * maint.c (print_bfd_section_info): Change param type to
189 maint_print_section_data.
190 (print_objfile_section_info): Likewise.
191 (print_bfd_section_info_maybe_relocated): Likewise.
192 (maintenance_info_sections): Use gdb_bfd_sections.
193
194 2020-08-25 Shahab Vahedi <shahab@synopsys.com>
195
196 * MAINTAINERS: Add ARC target and maintainer.
197
198 2020-08-25 Anton Kolesov <anton.kolesov@synopsys.com>
199
200 * configure.tgt: ARC support for GNU/Linux.
201 * Makefile.in (ALL_TARGET_OBJS): Likewise.
202 * arc-linux-tdep.c: New file.
203 * arc-tdep.h (ARC_STATUS32_L_MASK, ARC_STATUS32_DE_MASK): Declare.
204 * arc-tdep.c (arc_write_pc): Use it.
205
206 2020-08-25 Shahab Vahedi <shahab@synopsys.com>
207
208 * arc-tdep.c (arc_check_for_hardware_loop): New.
209 * arc-tdep.h (gdbarch_tdep): New field has_hw_loops.
210
211 2020-08-25 Shahab Vahedi <shahab@synopsys.com>
212
213 * arc-tdep.h: Include "gdbarch.h".
214
215 2020-08-25 Shahab Vahedi <shahab@synopsys.com>
216
217 * arch/arc.h
218 (arc_gdbarch_features): New class to stir the selection of target XML.
219 (arc_create_target_description): Use FEATURES to choose XML target.
220 (arc_lookup_target_description): Use arc_create_target_description
221 to create _new_ target descriptions or return the already created
222 ones if the FEATURES is the same.
223 * arch/arc.c: Implementation of prototypes described above.
224 * gdb/arc-tdep.h (arc_regnum enum): Add more registers.
225 (arc_gdbarch_features_init): Initialize the FEATURES struct.
226 * arc-tdep.c (*_feature_name): Make feature names consistent.
227 (arc_register_feature): A new struct to hold information about
228 registers of a particular target/feature.
229 (arc_check_tdesc_feature): Check if XML provides registers in
230 compliance with ARC_REGISTER_FEATURE structs.
231 (arc_update_acc_reg_names): Add aliases for r58 and r59.
232 (determine_*_reg_feature_set): Which feature name to look for.
233 (arc_gdbarch_features_init): Given MACH and ABFD, initialize FEATURES.
234 (mach_type_to_arc_isa): Convert from a set of binutils machine types
235 to expected ISA enums to be used in arc_gdbarch_features structs.
236 * features/Makefile (FEATURE_XMLFILES): Add new files.
237 * gdb/features/arc/v1-aux.c: New file.
238 * gdb/features/arc/v1-aux.xml: Likewise.
239 * gdb/features/arc/v1-core.c: Likewise.
240 * gdb/features/arc/v1-core.xml: Likewise.
241 * gdb/features/arc/v2-aux.c: Likewise.
242 * gdb/features/arc/v2-aux.xml: Likewise.
243 * gdb/features/arc/v2-core.c: Likewise.
244 * gdb/features/arc/v2-core.xml: Likewise.
245 * NEWS (Changes since GDB 9): Announce obsolence of old feature names.
246
247 2020-08-25 Gaius Mulley <gaiusmod2@gmail.com>
248 Andrew Burgess <andrew.burgess@embecosm.com>
249
250 PR m2/26372
251 * m2-exp.y (exp): Improve comment for non_empty_arglist case, add
252 an assert. Remove single element array indexing pattern as the
253 MULTI_SUBSCRIPT support will handle this case too.
254
255 2020-08-24 Simon Marchi <simon.marchi@polymtl.ca>
256
257 * value.h (valprint_check_validity): Move declaration from
258 here...
259 * valprint.h (valprint_check_validity): ... to here.
260
261 2020-08-24 Simon Marchi <simon.marchi@efficios.com>
262
263 * debug.h: New file.
264 * debug.c (debug_prefixed_vprintf): New function.
265 * infrun.c (infrun_debug_printf_1): Use debug_prefixed_vprintf.
266 * linux-nat.c (linux_nat_debug_printf_1): Likewise.
267
268 2020-08-24 Simon Marchi <simon.marchi@efficios.com>
269
270 * infrun.h (infrun_debug_printf_1): New function declaration.
271 (infrun_debug_printf): New macro.
272 * infrun.c (infrun_debug_printf_1): Use infrun_debug_printf
273 throughout.
274 (infrun_debug_printf): New function.
275 * breakpoint.c (should_be_inserted): Use infrun_debug_printf.
276 (handle_jit_event): Likewise.
277
278 2020-08-21 Mark Wielaard <mark@klomp.org>
279
280 * ada-lex.l: Extend register warnings diagnostics comment for g++.
281
282 2020-08-22 Simon Marchi <simon.marchi@efficios.com>
283
284 * frame.c (enum class frame_id_status): New.
285 (struct frame_info) <this_id::p>: Change type to frame_id_status.
286 (fprintf_frame): Update.
287 (compute_frame_id): Set frame id status to "computing" on entry.
288 Set it back to "not_computed" on failure and to "computed" on
289 success.
290 (get_frame_id): Assert the frame id is not being computed.
291 (create_sentinel_frame): Use frame_id_status::COMPUTED.
292 (create_new_frame): Likewise.
293 (frame_cleanup_after_sniffer): Update assert.
294
295 2020-08-20 Simon Marchi <simon.marchi@polymtl.ca>
296
297 * regcache.c (pid_ptid_regcache_map): New type.
298 (target_ptid_regcache_map): Remove.
299 (target_pid_ptid_regcache_map): New type.
300 (regcaches): Change type to target_pid_ptid_regcache_map.
301 (get_thread_arch_aspace_regcache): Update.
302 (regcache_thread_ptid_changed): Update, handle pid-like ptid
303 case.
304 (regcaches_size): Update.
305 (regcache_count): Update.
306 (registers_changed_ptid_target_pid_test): New.
307 (_initialize_regcache): Register new test.
308
309 2020-08-20 Simon Marchi <simon.marchi@polymtl.ca>
310
311 * regcache.c (regcache_count): New.
312 (struct regcache_test_data): New.
313 (regcache_test_data_up): New.
314 (populate_regcaches_for_test): New.
315 (regcaches_test): Remove.
316 (get_thread_arch_aspace_regcache_test): New.
317 (registers_changed_ptid_all_test): New.
318 (registers_changed_ptid_target_test): New.
319 (registers_changed_ptid_target_ptid_test): New.
320 (regcache_thread_ptid_changed): Remove regcache_count lambda.
321 (_initialize_regcache): Register new tests.
322
323 2020-08-20 Simon Marchi <simon.marchi@polymtl.ca>
324
325 * regcache.c (test_get_thread_arch_aspace_regcache): Rename to...
326 (get_thread_arch_aspace_regcache_and_check): ... this. Remove
327 gdbarch and aspace parameter. Use current inferior's aspace.
328 Validate regcache's arch value.
329 (regcaches_test): Update.
330
331 2020-08-20 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * regcache.c (regcaches_test): Call registers_changed.
334
335 2020-08-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
336
337 * infrun.c (process_event_stop_test): Fix typo "breapoint".
338
339 2020-08-19 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
340
341 * amd64-tdep.c (amd64_skip_prologue): Using symbol table
342 to find the end of prologue for flang compiled binaries.
343 * arm-tdep.c (arm_skip_prologue): Likewise.
344 * i386-tdep.c (i386_skip_prologue): Likewise.
345 * producer.c (producer_is_llvm): New function.
346 (producer_parsing_tests): Added new tests for clang/flang.
347 * producer.h (producer_is_llvm): New declaration.
348
349 2020-08-18 Simon Marchi <simon.marchi@efficios.com>
350
351 * linux-nat.c (linux_nat_debug_printf): New function.
352 (linux_nat_debug_printf_1): New macro. Use throughout the file.
353
354 2020-08-18 Aaron Merey <amerey@redhat.com>
355
356 * Makefile.in (DEBUGINFOD_CFLAGS, DEBUGINFOD_LIBS): New variables.
357 (INTERNAL_CFLAGS_BASE): Add DEBUGINFOD_CFLAGS.
358 (CLIBS): Add DEBUGINFOD_LIBS.
359
360 2020-08-17 Sergei Trofimovich <siarheit@google.com>
361
362 * ia64-linux-nat.c: Include "gdbarch.h" to declare used
363 'gdbarch_num_regs'.
364
365 2020-08-17 Tom Tromey <tromey@adacore.com>
366
367 * ada-varobj.c (ada_varobj_decode_var): Handle case where
368 ada_get_decoded_value returns NULL.
369
370 2020-08-17 Tom Tromey <tromey@adacore.com>
371
372 * python/py-inferior.c (infpy_search_memory): Use
373 gdb_py_object_from_ulongest.
374 * python/py-infevents.c (create_inferior_call_event_object)
375 (create_memory_changed_event_object): Use
376 gdb_py_object_from_ulongest.
377 * python/py-linetable.c (ltpy_entry_get_pc): Use
378 gdb_py_object_from_ulongest.
379
380 2020-08-17 Simon Marchi <simon.marchi@polymtl.ca>
381
382 * loc.c (class symbol_needs_eval_context): Fix indentation.
383
384 2020-08-17 Simon Marchi <simon.marchi@polymtl.ca>
385
386 * dwarf2/loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
387 bool.
388
389 2020-08-17 Tom de Vries <tdevries@suse.de>
390
391 PR gdb/26393
392 * gdbtypes.c (dump_dynamic_prop): New function.
393 (recursive_dump_type): Use dump_dynamic_prop for TYPE_CODE_RANGE.
394
395 2020-08-15 Tom de Vries <tdevries@suse.de>
396
397 PR backtrace/26390
398 * stack.c (print_frame_args): Temporarily set the selected
399 frame to FRAME while printing the frame's arguments.
400
401 2020-08-14 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
402
403 PR breakpoints/26385
404 * ppc-linux-nat.c (ppc_linux_nat_target::low_prepare_to_resume):
405 Always clear watchpoint with PTRACE_SET_DEBUGREG.
406
407 2020-08-14 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
408
409 * ppc-linux-nat.c (ppc_linux_dreg_interface::detect)
410 (ppc_linux_nat_target::low_prepare_to_resume): Use ptrace () < 0
411 and >= to check return value instead of == -1 and != -1.
412
413 2020-08-14 Simon Marchi <simon.marchi@polymtl.ca>
414
415 * utils.h (class gdb_argv) <as_array_view>: New method.
416 * utils.c (gdb_argv_as_array_view_test): New.
417 (_initialize_utils): Register selftest.
418 * maint.c (maintenance_selftest): Use the new method.
419
420 2020-08-13 Kamil Rytarowski <n54@gmx.com>
421
422 * target.h (supports_dumpcore, dumpcore): New
423 function declarations.
424 * target.c (supports_dumpcore, dumpcore): New
425 functions.
426 * target-delegates.c: Rebuild.
427 * gcore.c (gcore_command): Use target_supports_dumpcore ()
428 and target_dumpcore ().
429
430 2020-08-13 Aaron Merey <amerey@redhat.com>
431
432 * debuginfod-support.c: Replace global variables with user_data.
433
434 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
435
436 * maint.c (maintenance_selftest): Split args and pass array_view
437 to run_tests.
438
439 2020-08-12 Luis Machado <luis.machado@linaro.org>
440
441 * value.c (check_type_length_before_alloc): Use ULONGEST to store a
442 type's length.
443 Use %s and pulongest to print the length.
444
445 2020-08-12 Pedro Alves <palves@redhat.com>
446
447 * NEWS: Move "Multi-target debugging support" item to the
448 "Changes since GDB 9" section.
449
450 2020-08-12 Pedro Alves <palves@redhat.com>
451
452 PR gdb/26336
453 * progspace.c (program_space::remove_objfile): Invalidate the
454 frame cache.
455
456 2020-08-11 Tom de Vries <tdevries@suse.de>
457
458 * MAINTAINERS: Mark ms1 as deleted.
459
460 2020-08-10 Luis Machado <luis.machado@linaro.org>
461
462 PR gdb/26310
463
464 * aarch64-tdep.c (aarch64_analyze_prologue): Track use of SP/FP and
465 act accordingly.
466 (aarch64_analyze_prologue_test): Add more unit tests to exercise
467 movz/str/stur/stp skipping behavior.
468
469 2020-08-10 Luis Machado <luis.machado@linaro.org>
470
471 * nat/aarch64-sve-linux-sigcontext.h (SVE_PT_REGS_OFFSET): Use
472 struct user_sve_header instead of struct sve_context.
473
474 2020-08-09 Simon Marchi <simon.marchi@polymtl.ca>
475
476 * read.h (dwarf2_fetch_die_loc_sect_off,
477 dwarf2_fetch_die_loc_cu_off): Replace function pointer +
478 `void *` parameter with function_view.
479 * read.c (dwarf2_fetch_die_loc_sect_off,
480 dwarf2_fetch_die_loc_cu_off): Likewise.
481 * loc.c (get_frame_pc_for_per_cu_dwarf_call): Remove.
482 (per_cu_dwarf_call): Adjust.
483 (get_frame_address_in_block_wrapper): Remove.
484 (indirect_synthetic_pointer): Adjust.
485 (get_ax_pc): Remove.
486 (dwarf2_compile_expr_to_ax): Adjust.
487
488 2020-08-08 Tom de Vries <tdevries@suse.de>
489
490 PR build/26344
491 * arch/riscv.c (riscv_lookup_target_description): Use an explicit
492 constructor.
493 * regcache.c (get_thread_arch_aspace_regcache): Same.
494
495 2020-08-07 Tom Tromey <tromey@adacore.com>
496
497 * ravenscar-thread.c
498 (ravenscar_thread_target::set_base_thread_from_ravenscar_task):
499 New method.
500 (ravenscar_thread_target::wait): Check
501 runtime_initialized.
502 (ravenscar_thread_target::prepare_to_store)
503 (ravenscar_thread_target::stopped_by_sw_breakpoint)
504 (ravenscar_thread_target::stopped_by_hw_breakpoint)
505 (ravenscar_thread_target::stopped_by_watchpoint)
506 (ravenscar_thread_target::stopped_data_address)
507 (ravenscar_thread_target::core_of_thread): Use
508 scoped_restore_current_thread and
509 set_base_thread_from_ravenscar_task.
510
511 2020-08-07 Tom Tromey <tromey@adacore.com>
512
513 * ravenscar-thread.c (update_thread_list): Set inferior_ptid.
514
515 2020-08-07 Tom Tromey <tromey@adacore.com>
516
517 * ravenscar-thread.c (ravenscar_thread_target::wait): Call
518 update_inferior_ptid before update_thread_list.
519 (temporarily_change_regcache_ptid): New class.
520 (ravenscar_thread_target::fetch_registers)
521 (ravenscar_thread_target::store_registers)
522 (ravenscar_thread_target::prepare_to_store): Use base thread when
523 forwarding operation.
524
525 2020-08-07 Tom Tromey <tromey@adacore.com>
526
527 * ravenscar-thread.c (ravenscar_thread_target::resume): Handle
528 "is_pid" case.
529
530 2020-08-07 Tom Tromey <tromey@adacore.com>
531
532 * ravenscar-thread.c (xfer_partial, enable_btrace, add_thread):
533 New methods.
534 (ravenscar_thread_target::get_thread_base_cpu): Check m_cpu_map
535 first.
536 (ravenscar_thread_target::add_thread): Rename from
537 ravenscar_add_thread.
538 (ravenscar_thread_target::update_thread_list): Use a lambda.
539 (ravenscar_thread_target::xfer_partial): New method.
540
541 2020-08-07 Tom Tromey <tromey@adacore.com>
542
543 * ada-lang.h (ada_task_list_iterator_ftype): Now a
544 gdb::function_view.
545 (iterate_over_live_ada_tasks): Change type of argument.
546 * ada-tasks.c (iterate_over_live_ada_tasks): Change type
547 of argument.
548
549 2020-08-07 Tom Tromey <tromey@adacore.com>
550
551 * ravenscar-thread.c (ravenscar_thread_target) <extra_thread_info>:
552 Remove.
553 (ravenscar_thread_target::extra_thread_info): Remove.
554 (ravenscar_thread_target::pid_to_str): Mention Ravenscar in result;
555 defer to target beneath for non-Ravenscar threads.
556
557 2020-08-07 Tom Tromey <tromey@adacore.com>
558
559 * ravenscar-thread.c (ravenscar_thread_target) <get_base_cpu,
560 get_base_thread_from_ravenscar_task>: Now methods.
561 <m_cpu_map>: New member.
562 (ravenscar_thread_target::get_thread_base_cpu): Rename from
563 ravenscar_get_thread_base_cpu. Check m_cpu_map.
564 (ravenscar_thread_target::task_is_currently_active): Update.
565 (ravenscar_thread_target::get_base_thread_from_ravenscar_task):
566 Now a method.
567 (ravenscar_thread_target::add_active_thread): Put initial thread
568 into the m_cpu_map.
569
570 2020-08-07 Tom Tromey <tromey@adacore.com>
571
572 * ravenscar-thread.c (ravenscar_thread_target::wait): Return
573 event_ptid.
574
575 2020-08-07 Tom Tromey <tromey@adacore.com>
576
577 * ravenscar-thread.c (ravenscar_thread_target::wait): Check
578 runtime_initialized.
579
580 2020-08-07 Tom Tromey <tromey@adacore.com>
581
582 * ravenscar-thread.c (ravenscar_thread_target): Don't call
583 add_active_thread.
584 (ravenscar_thread_target::add_active_thread): Now public.
585 (ravenscar_inferior_created): Call add_active_thread after pushing
586 the target.
587
588 2020-08-07 Simon Marchi <simon.marchi@polymtl.ca>
589
590 * regcache.c (ptid_regcache_map): New type.
591 (target_ptid_regcache_map): New type.
592 (regcaches): Change type to target_ptid_regcache_map.
593 (get_thread_arch_aspace_regcache): Update to regcaches' new
594 type.
595 (regcache_thread_ptid_changed): Likewise.
596 (registers_changed_ptid): Likewise.
597 (regcaches_size): Likewise.
598 (regcaches_test): Update.
599 (regcache_thread_ptid_changed): Update.
600 * regcache.h (regcache_up): New type.
601 * gdbsupport/ptid.h (hash_ptid): New struct.
602
603 2020-08-07 Simon Marchi <simon.marchi@efficios.com>
604
605 * observable.h (thread_ptid_changed): Add parameter
606 `process_stratum_target *`.
607 * infrun.c (infrun_thread_ptid_changed): Add parameter
608 `process_stratum_target *` and use it.
609 (selftests): New namespace.
610 (infrun_thread_ptid_changed): New function.
611 (_initialize_infrun): Register selftest.
612 * regcache.c (regcache_thread_ptid_changed): Add parameter
613 `process_stratum_target *` and use it.
614 (regcache_thread_ptid_changed): New function.
615 (_initialize_regcache): Register selftest.
616 * thread.c (thread_change_ptid): Pass target to
617 thread_ptid_changed observable.
618
619 2020-08-06 Caroline Tice <cmtice@google.com>
620
621 * dwarf2/read.c (struct dwo_file): Update comment on 'sections' field.
622 (struct dwp_sections): Update field comments. Add loclists and
623 rnglists fields.
624 (struct virtual_v2_dwo_sections): Rename struct to
625 'virtual_v2_or_v5_dwo_sections'; update comments at top of struct; add
626 size & offset fields for loclists and rnglists.
627 (struct dwp_hash_table): Add a 'v5' struct field to the union section.
628 (create_debug_type_hash_table): Add 'DW_UT_split_type' to the check for
629 skipping dummy type units.
630 (create_dwp_hash_table): Update the large comment above the function to
631 discuss Version 5 DWP files as well, with references. Update all the
632 version checks in the function to check for version 5 as well. Add new
633 section at the end to create dwp hash table for version 5.
634 (create_dwp_v2_section): Rename function to
635 'create_dwp_v2_or_v5_section'. Update function comment appropriately.
636 Add V5 to error message text.
637 (create_dwo_unit_in_dwp_v2): Change calls to create_dwp_v2_section
638 into calls to create_dwp_v2_or_v5_section.
639 (create_dwo_unit_in_dwp_v5): New function.
640 (lookup_dwo_unit_in_dwp): Update conditional statement to explicitly
641 check for version2; add else clause to handle version 5.
642 (open_and_init_dwo_file): Add code to check dwarf version & only call
643 create_debug_types_hash_table (with sections.types) if version is not 5;
644 else call create_debug_type_hash_table, with sections.info.
645 (dwarf2_locate_v2_dwp_sections): Update function comment to mention
646 version 5.
647 (dwarf2_locate_v5_dwp_sections): New function.
648 (open_and_init_dwp_file): Add else-if clause for version 5 to call
649 bfd_map_over_sections with dwarf2_locate_v5_dwp_sections.
650
651 2020-08-06 Simon Marchi <simon.marchi@efficios.com>
652
653 * regcache.h (class regcache): Remove friend
654 registers_changed_ptid.
655 <regcache_thread_ptid_changed>: Remove.
656 <regcaches>: Remove.
657 * regcache.c (regcache::regcaches): Rename to...
658 (regcaches): ... this. Make static.
659 (get_thread_arch_aspace_regcache): Update.
660 (regcache::regcache_thread_ptid_changed): Rename to...
661 (regcache_thread_ptid_changed): ... this. Update.
662 (class regcache_access): Remove.
663 (regcaches_test): Update.
664 (_initialize_regcache): Update.
665 * sparc64-tdep.c, dwarf2/index-write.c, record-btrace.c: Include
666 <forward_list>.
667
668 2020-08-06 Simon Marchi <simon.marchi@efficios.com>
669
670 * regcache.h (class regcache) <current_regcache>: Rename to...
671 <regcaches>: ... this. Move doc here.
672 * regcache.c (regcache::current_regcache) Rename to...
673 (regcache::regcaches): ... this. Move doc to header.
674 (get_thread_arch_aspace_regcache): Update.
675 (regcache::regcache_thread_ptid_changed): Update.
676 (registers_changed_ptid): Update.
677 (class regcache_access) <current_regcache_size>: Rename to...
678 <regcaches_size>: ... this.
679 (current_regcache_test): Rename to...
680 (regcaches_test): ... this.
681 (_initialize_regcache): Update.
682
683 2020-08-06 Victor Collod <vcollod@nvidia.com>
684
685 * amd64-tdep.c (amd64_analyze_prologue): Fix incorrect comment.
686
687 2020-08-05 Kevin Buettner <kevinb@redhat.com>
688
689 * corelow.c (core_target::build_file_mappings): Don't output
690 null pathname in warning.
691
692 2020-08-05 Simon Marchi <simon.marchi@polymtl.ca>
693
694 * gdb.dwarf2/clztest.exp, gdb.dwarf2/dw2-common-block.exp,
695 gdb.dwarf2/dw2-dup-frame.exp, gdb.dwarf2/dw2-reg-undefined.exp,
696 gdb.dwarf2/dw2-single-line-discriminators.exp,
697 dw2-undefined-ret-addr.exp: Pass nopie to compilation options.
698
699 2020-08-05 Tom Tromey <tromey@adacore.com>
700
701 PR rust/26197:
702 * dwarf2/read.c (alloc_rust_variant): Handle univariant case.
703 (quirk_rust_enum): Call alloc_rust_variant for univariant case.
704 Fix off-by-one and type size errors in ordinary case.
705
706 2020-08-05 Tom de Vries <tdevries@suse.de>
707
708 * gdbtypes.c (type_not_allocated, type_not_associated): Use
709 "prop->const_val () == 0" instead of "prop->const_val () != 0".
710
711 2020-08-04 Simon Marchi <simon.marchi@efficios.com>
712
713 * frame.h (frame_id_p): Return bool.
714 (frame_id_artificial_p): Return bool.
715 (frame_id_eq): Return bool.
716 (has_stack_frames): Return bool.
717 (get_selected_frame): Fix typo in comment.
718 (get_frame_pc_if_available): Return bool.
719 (get_frame_address_in_block_if_available): Return bool.
720 (get_frame_func_if_available): Return bool.
721 (read_frame_register_unsigned): Return bool.
722 (get_frame_register_bytes): Return bool.
723 (safe_frame_unwind_memory): Return bool.
724 (deprecated_frame_register_read): Return bool.
725 (frame_unwinder_is): Return bool.
726 * frame.c (struct frame_info) <prev_arch::p>: Change type to
727 bool.
728 <this_id::p>: Likewise.
729 <prev_p>: Likewise.
730 (frame_stash_add): Return bool.
731 (get_frame_id): Use bool.
732 (frame_id_build_special) Use bool.
733 (frame_id_build_unavailable_stack): Use bool.
734 (frame_id_build): Use bool.
735 (frame_id_p): Return bool, use true/false instead of 1/0.
736 (frame_id_artificial_p): Likewise.
737 (frame_id_eq): Likewise.
738 (frame_id_inner): Likewise.
739 (get_frame_func_if_available): Likewise.
740 (read_frame_register_unsigned): Likewise.
741 (deprecated_frame_register_read): Likewise.
742 (get_frame_register_bytes): Likewise.
743 (has_stack_frames): Likewise.
744 (inside_main_func): Likewise.
745 (inside_entry_func): Likewise.
746 (get_frame_pc_if_available): Likewise.
747 (get_frame_address_in_block_if_available): Likewise.
748 (frame_unwinder_is): Likewise.
749 (safe_frame_unwind_memory): Likewise.
750 (frame_unwind_arch): Likewise.
751
752 2020-08-04 Simon Marchi <simon.marchi@efficios.com>
753
754 * frame.c (frame_info) <prev_func> <p>: Rename to status, change
755 type to cached_copy_status.
756 (fprintf_frame): Adjust.
757 (get_frame_func_if_available): Adjust.
758 (frame_cleanup_after_sniffer): Adjust.
759
760 2020-08-04 Mark Wielaard <mark@klomp.org>
761
762 * MAINTAINERS (Write After Approval): Update email address.
763
764 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
765
766 * gdbtypes.h (TYPE_DYN_PROP_ADDR): Remove, replace uses with
767 dynamic_prop::const_val.
768
769 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
770
771 * gdbtypes.h (TYPE_DYN_PROP_KIND): Remove, replace uses with
772 dynamic_prop::kind.
773
774 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
775
776 * gdbtypes.h (TYPE_DYN_PROP_BATON): Remove.
777
778 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com>
779
780 * configure.tgt: Set gdb_sim for bpf-*-* targets.
781
782 2020-08-04 Weimin Pan <weimin.pan@oracle.com>
783 Jose E. Marchesi <jose.marchesi@oracle.com>
784
785 * configure.tgt: Add entry for bpf-*-*.
786 * Makefile.in (ALL_TARGET_OBS): Add bpf-tdep.o
787 (ALLDEPFILES): Add bpf-tdep.c.
788 * bpf-tdep.c: New file.
789 * MAINTAINERS: Add bpf target and maintainer.
790 * NEWS: Mention the support for the new target.
791
792 2020-08-04 Tom de Vries <tdevries@suse.de>
793
794 PR symtab/23270
795 * dwarf2/read.c (find_partial_die): Change internal error into Dwarf
796 Error.
797
798 2020-08-03 John Baldwin <jhb@FreeBSD.org>
799
800 * syscalls/freebsd.xml: Regenerate.
801
802 2020-08-03 John Baldwin <jhb@FreeBSD.org>
803
804 * syscalls/update-freebsd.sh: Fix usage and year range.
805
806 2020-08-03 Tom de Vries <tdevries@suse.de>
807
808 PR symtab/26333
809 * dwarf2/read.c (dwarf_decode_lines_1): Ignore
810 DW_LNE_lo_user/DW_LNE_hi_user range.
811
812 2020-07-30 Simon Marchi <simon.marchi@polymtl.ca>
813
814 PR ada/26318
815 * ada-lang.c (ada_modulus): Return 0 if property is not of const
816 kind.
817
818 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
819
820 * breakpoint.c (set_breakpoint_condition): Do minor refactoring.
821
822 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
823
824 * breakpoint.c (set_breakpoint_condition): Update the condition
825 expressions after checking that the input condition string parses
826 successfully and does not contain junk at the end.
827
828 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
829
830 * breakpoint.c (set_breakpoint_condition): Update the
831 condition string after parsing the new condition successfully.
832
833 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
834
835 * proc-api.c (_STRUCTURED_PROC): Don't define.
836 * proc-events.c: Likewise.
837 * proc-flags.c: Likewise.
838 * proc-why.c: Likewise.
839 * procfs.c: Likewise.
840
841 * Makefile.in (INTERNAL_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
842 * configure, config.in: Regenerate.
843
844 2020-07-30 Tom de Vries <tdevries@suse.de>
845
846 PR build/26320
847 * ui-style.h (struct ui_file_style::color): Wrap m_value and
848 m_red/m_green/m_blue in a union.
849
850 2020-07-29 Tom de Vries <tdevries@suse.de>
851
852 PR tdep/26280
853 * s390-tdep.c (s390_displaced_step_fixup): Fix Wmaybe-uninitialized.
854
855 2020-07-28 Tom Tromey <tromey@adacore.com>
856
857 PR symtab/26270:
858 * symtab.h (find_pc_partial_function_sym): Declare.
859 * cli/cli-cmds.c (disassemble_command): Use
860 find_pc_partial_function_sym. Check asm_demangle.
861 * blockframe.c (cache_pc_function_sym): New global.
862 (cache_pc_function_name): Remove.
863 (clear_pc_function_cache): Update.
864 (find_pc_partial_function_sym): New function, from
865 find_pc_partial_function.
866 (find_pc_partial_function): Rewrite using
867 find_pc_partial_function_sym.
868
869 2020-07-28 Tom Tromey <tromey@adacore.com>
870
871 * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble"
872 help. Add usage.
873
874 2020-07-28 Tom Tromey <tromey@adacore.com>
875
876 * dwarf2/expr.c (dwarf_expr_context::execute_stack_op)
877 <DW_OP_GNU_variable_value>: Cast to address type.
878
879 2020-07-28 Kamil Rytarowski <n54@gmx.com>
880
881 * nbsd-nat.h (nbsd_nat_target::xfer_partial): New declaration.
882 * nbsd-nat.c (nbsd_nat_target::xfer_partial): New function.
883 * nbsd-tdep.c (nbsd_gdbarch_data_handle, struct nbsd_gdbarch_data)
884 (init_nbsd_gdbarch_data, get_nbsd_gdbarch_data)
885 (nbsd_get_siginfo_type): New.
886 (nbsd_init_abi): Install gdbarch "get_siginfo_type" method.
887 (_initialize_nbsd_tdep): New.
888
889 2020-07-28 H.J. Lu <hongjiu.lu@intel.com>
890
891 PR binutils/26301
892 * configure: Regenerated.
893
894 2020-07-28 H.J. Lu <hongjiu.lu@intel.com>
895
896 PR binutils/26301
897 * configure: Regenerated.
898
899 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
900
901 * python/py-frame.c: Remove 'user-regs.h' include.
902 (frapy_read_register): Rewrite to make use of
903 gdbpy_parse_register_id.
904 * python/py-registers.c (gdbpy_parse_register_id): New function,
905 moved here from python/py-unwind.c. Updated the return type, and
906 also accepts register descriptor objects.
907 * python/py-unwind.c: Remove 'user-regs.h' include.
908 (pyuw_parse_register_id): Moved to python/py-registers.c.
909 (unwind_infopy_add_saved_register): Update to use
910 gdbpy_parse_register_id.
911 (pending_framepy_read_register): Likewise.
912 * python/python-internal.h (gdbpy_parse_register_id): Declare.
913
914 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
915
916 * python/py-registers.c: Add 'user-regs.h' include.
917 (register_descriptor_iter_find): New function.
918 (register_descriptor_iterator_object_methods): New static global
919 methods array.
920 (register_descriptor_iterator_object_type): Add pointer to methods
921 array.
922
923 2020-07-27 John Baldwin <jhb@FreeBSD.org>
924
925 * fbsd-nat.h: Include <osreldate.h>. Define USE_SIGTRAP_SIGINFO
926 for all architectures on FreeBSD 11.3 and later.
927
928 2020-07-27 Tom Tromey <tromey@adacore.com>
929
930 * gcore.h (load_corefile): Don't declare.
931
932 2020-07-27 Tom de Vries <tdevries@suse.de>
933
934 * configure.ac: Fix sys/sockets.h -> sys/socket.h typo.
935 * config.in: Regenerate.
936 * configure: Regenerate.
937
938 2020-07-26 Eli Zaretskii <eliz@gnu.org>
939
940 * configure.ac (AC_CHECK_HEADERS): Check for sys/socket.h and
941 ws2tcpip.h. When checking whether socklen_t type is defined, use
942 ws2tcpip.h if it is available and sys/socket.h isn't.
943 * configure: Regenerate.
944 * config.in: Regenerate.
945
946 2020-07-25 Andrew Burgess <andrew.burgess@embecosm.com>
947
948 PR fortran/23051
949 PR fortran/26139
950 * valops.c (value_ind): Pass address to
951 readjust_indirect_value_type.
952 * value.c (readjust_indirect_value_type): Make parameter
953 non-const, and add extra address parameter. Resolve original type
954 before using it.
955 * value.h (readjust_indirect_value_type): Update function
956 signature and comment.
957
958 2020-07-25 Tom de Vries <tdevries@suse.de>
959
960 PR symtab/26243
961 * dwarf2/read.c (lnp_state_machine::record_line): Ignore zero line
962 entries.
963
964 2020-07-24 Aaron Merey <amerey@redhat.com>
965
966 * Makefile.in: Replace LIBDEBUGINFOD with DEBUGINFOD_LIBS.
967 * configure: Rebuild.
968
969 2020-07-23 Kevin Buettner <kevinb@redhat.com>
970
971 PR corefiles/26294
972 * corelow.c (_initialize_corelow): Add period to help text
973 for "maintenance print core-file-backed-mappings".
974
975 2020-07-23 Pedro Alves <pedro@palves.net>
976
977 * frame-unwind.c (frame_unwind_try_unwinder): On exception, don't
978 touch THIS_CACHE/THIS_FRAME if the frame cache was cleared
979 meanwhile.
980 * frame.c (frame_cache_generation, get_frame_cache_generation):
981 New.
982 (reinit_frame_cache): Increment FRAME_CACHE_GENERATION.
983 (get_prev_frame_if_no_cycle): On exception, don't touch
984 PREV_FRAME/THIS_FRAME if the frame cache was cleared meanwhile.
985 * frame.h (get_frame_cache_generation): Declare.
986
987 2020-07-23 Tom de Vries <tdevries@suse.de>
988
989 PR tui/26282
990 * tui/tui-winsource.h (struct tui_source_windows::tui_source_windows):
991 New default constructor.
992
993 2020-07-23 Andrew Burgess <andrew.burgess@embecosm.com>
994
995 * disasm.c (do_mixed_source_and_assembly_deprecated): Don't
996 exclude non-statement entries.
997
998 2020-07-22 Kevin Buettner <kevinb@redhat.com>
999
1000 * NEWS (New commands): Mention new command
1001 "maintenance print core-file-backed-mappings".
1002
1003 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1004
1005 * corelow.c (gdbcmd.h): Include.
1006 (core_target::info_proc_mappings): New method.
1007 (get_current_core_target): New function.
1008 (maintenance_print_core_file_backed_mappings): New function.
1009 (_initialize_corelow): Add core-file-backed-mappings to
1010 "maint print" commands.
1011
1012 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1013
1014 * linux-tdep.c (dump_note_entry_p): New function.
1015 (linux_dump_mapping_p_ftype): New typedef.
1016 (linux_find_memory_regions_full): Add new parameter,
1017 should_dump_mapping_p.
1018 (linux_find_memory_regions): Adjust call to
1019 linux_find_memory_regions_full.
1020 (linux_make_mappings_core_file_notes): Use dump_note_entry_p in
1021 call to linux_find_memory_regions_full.
1022
1023 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1024
1025 * corelow.c (solist.h, unordered_map): Include.
1026 (class core_target): Add field m_core_file_mappings and
1027 method build_file_mappings.
1028 (core_target::core_target): Call build_file_mappings.
1029 (core_target::~core_target): Free memory associated with
1030 m_core_file_mappings.
1031 (core_target::build_file_mappings): New method.
1032 (core_target::xfer_partial): Use m_core_file_mappings
1033 for memory transfers.
1034 * linux-tdep.c (linux_read_core_file_mappings): New
1035 function.
1036 (linux_core_info_proc_mappings): Rewrite to use
1037 linux_read_core_file_mappings.
1038 (linux_init_abi): Register linux_read_core_file_mappings.
1039
1040 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1041
1042 * arch-utils.c (default_read_core_file_mappings): New function.
1043 * arch-utils.c (default_read_core_file_mappings): Declare.
1044 * gdbarch.sh (read_core_file_mappings): New gdbarch method.
1045 * gdbarch.h, gdbarch.c: Regenerate.
1046
1047 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1048
1049 PR corefiles/25631
1050 * corelow.c (core_target:xfer_partial): Revise
1051 TARGET_OBJECT_MEMORY case to consider non-SEC_HAS_CONTENTS
1052 case after first checking the stratum beneath the core
1053 target.
1054 (has_all_memory): Return true.
1055 * target.c (raw_memory_xfer_partial): Revise comment
1056 regarding use of has_all_memory.
1057
1058 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1059
1060 * exec.h (section_table_xfer_memory): Revise declaration,
1061 replacing section name parameter with an optional callback
1062 predicate.
1063 * exec.c (section_table_xfer_memory): Likewise.
1064 * bfd-target.c, exec.c, target.c, corelow.c: Adjust all callers
1065 of section_table_xfer_memory.
1066
1067 2020-07-22 Tom Tromey <tromey@adacore.com>
1068
1069 * mi/mi-cmd-stack.c (list_args_or_locals): Use
1070 lookup_symbol_search_name.
1071
1072 2020-07-22 Andrew Burgess <andrew.burgess@embecosm.com>
1073
1074 * python/py-registers.c (gdbpy_register_object_data_init): Remove
1075 redundant local variable.
1076 (gdbpy_get_register_descriptor): Extract descriptor vector as a
1077 reference, not pointer, update code accordingly.
1078
1079 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1080 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1081
1082 * objfiles.h (struct objfile) <skip_jit_symbol_lookup>: New field.
1083 * jit.c (jit_breakpoint_re_set_internal): Use the
1084 `skip_jit_symbol_lookup` field.
1085
1086 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1087 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1088
1089 * jit.c (jit_read_descriptor): Define the descriptor address once,
1090 use twice.
1091 (jit_breakpoint_deleted): Move the declaration of the loop variable
1092 `iter` into the loop header.
1093 (jit_breakpoint_re_set_internal): Move the declaration of the local
1094 variable `objf_data` to the first point of definition.
1095 (jit_event_handler): Move the declaration of local variables
1096 `code_entry`, `entry_addr`, and `objf` to their first point of use.
1097 Rename `objf` to `jited`.
1098
1099 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1100
1101 * jit.h (struct jiter_objfile_data) <jiter_objfile_data, objfile>:
1102 Remove.
1103 * jit.c (get_jiter_objfile_data): Update.
1104
1105 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1106 Simon Marchi <simon.marchi@polymtl.ca>
1107
1108 * jit.c (struct jit_program_space_data): Remove.
1109 (jit_program_space_key): Remove.
1110 (jiter_objfile_data::~jiter_objfile_data): Remove program space
1111 stuff.
1112 (get_jit_program_space_data): Remove.
1113 (jit_breakpoint_deleted): Iterate on all of the program space's
1114 objfiles.
1115 (jit_inferior_init): Likewise.
1116 (jit_breakpoint_re_set_internal): Likewise. Also change return
1117 type to void.
1118 (jit_breakpoint_re_set): Pass current_program_space to
1119 jit_breakpoint_re_set_internal.
1120
1121 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1122
1123 * jit.h (struct jiter_objfile_data) <cached_code_address,
1124 jit_breakpoint>: Move to here from ...
1125 * jit.c (jit_program_space_data): ... here.
1126 (jiter_objfile_data::~jiter_objfile_data): Update.
1127 (jit_breakpoint_deleted): Update.
1128 (jit_breakpoint_re_set_internal): Update.
1129
1130 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1131
1132 * jit.c (jiter_objfile_data::~jiter_objfile_data): Remove some
1133 checks.
1134 (jit_read_descriptor): Remove NULL check.
1135 (jit_event_handler): Add an assertion.
1136
1137 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * jit.h (struct jit_objfile_data): Split into...
1140 (struct jiter_objfile_data): ... this ...
1141 (struct jited_objfile_data): ... and this.
1142 * objfiles.h (struct objfile) <jit_data>: Remove.
1143 <jiter_data, jited_data>: New fields.
1144 * jit.c (jit_objfile_data::~jit_objfile_data): Rename to ...
1145 (jiter_objfile_data::~jiter_objfile_data): ... this.
1146 (get_jit_objfile_data): Rename to ...
1147 (get_jiter_objfile_data): ... this.
1148 (add_objfile_entry): Update.
1149 (jit_read_descriptor): Use get_jiter_objfile_data.
1150 (jit_find_objf_with_entry_addr): Use objfile's jited_data field.
1151 (jit_breakpoint_re_set_internal): Use get_jiter_objfile_data.
1152 (jit_inferior_exit_hook): Use objfile's jited_data field.
1153
1154 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1155
1156 * jit.h: Forward-declare `struct minimal_symbol`.
1157 (struct jit_objfile_data): Migrate to here from jit.c; also add a
1158 constructor, destructor, and an objfile* field.
1159 * jit.c (jit_objfile_data): Remove.
1160 (struct jit_objfile_data): Migrate from here to jit.h.
1161 (jit_objfile_data::~jit_objfile_data): New destructor
1162 implementation with code moved from free_objfile_data.
1163 (free_objfile_data): Delete.
1164 (get_jit_objfile_data): Update to use the jit_data field of objfile.
1165 (jit_find_objf_with_entry_addr): Ditto.
1166 (jit_inferior_exit_hook): Ditto.
1167 (_initialize_jit): Remove the call to
1168 register_objfile_data_with_cleanup.
1169 * objfiles.h (struct objfile) <jit_data>: New field.
1170
1171 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1172
1173 * jit.h: Forward-declare `struct objfile`.
1174 (jit_event_handler): Add a second parameter, the JITer objfile.
1175 * jit.c (jit_read_descriptor): Change the signature to take the
1176 JITer objfile as an argument instead of the jit_program_space_data.
1177 (jit_inferior_init): Update the call to jit_read_descriptor.
1178 (jit_event_handler): Use the new JITer objfile argument when calling
1179 jit_read_descriptor.
1180 * breakpoint.c (handle_jit_event): Update the call to
1181 jit_event_handler to pass the JITer objfile.
1182
1183 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1184
1185 * gdbarch.c: Regenerate.
1186 * gdbarch.h: Regenerate.
1187 * gdbarch.sh (handle_segmentation_fault): Remove method.
1188 * infrun.c (handle_segmentation_fault): Remove.
1189 (print_signal_received_reason): Remove call to
1190 handle_segmentation_fault.
1191
1192 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1193
1194 * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
1195 Rename to sparc64_linux_report_signal_info and add siggnal
1196 argument.
1197 (sparc64_linux_init_abi): Use sparc64_linux_report_signal_info
1198 instead of sparc64_linux_handle_segmentation_fault.
1199
1200 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1201
1202 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Use
1203 i386_linux_report_signal_info instead of
1204 i386_linux_handle_segmentation_fault.
1205 * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Rename
1206 to i386_linux_report_signal_info and add siggnal argument.
1207 (i386_linux_init_abi): Use i386_linux_report_signal_info instead
1208 of i386_linux_handle_segmentation_fault.
1209 * i386-linux-tdep.h (i386_linux_handle_segmentation_fault): Rename
1210 to i386_linux_report_signal_info and add siggnal argument.
1211
1212 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1213
1214 * corelow.c (core_target_open): Invoke gdbarch report_signal_info
1215 hook if present.
1216
1217 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1218
1219 * gdbarch.c: Regenerate.
1220 * gdbarch.h: Regenerate.
1221 * gdbarch.sh (report_signal_info): New method.
1222 * infrun.c (print_signal_received_reason): Invoke gdbarch
1223 report_signal_info hook if present.
1224
1225 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
1226
1227 * python/py-registers.c : Add 'unordered_map' include.
1228 (gdbpy_new_reggroup): Renamed to...
1229 (gdbpy_get_reggroup): ...this. Update to only create register
1230 group descriptors when needed.
1231 (gdbpy_reggroup_iter_next): Update.
1232
1233 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
1234
1235 * python/py-registers.c (gdbpy_register_object_data): New static
1236 global.
1237 (gdbpy_register_object_data_init): New function.
1238 (gdbpy_new_register_descriptor): Renamed to...
1239 (gdbpy_get_register_descriptor): ...this, and update to reuse
1240 existing register descriptors where possible.
1241 (gdbpy_register_descriptor_iter_next): Update.
1242 (gdbpy_initialize_registers): Register new gdbarch data.
1243
1244 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
1245
1246 * linux-nat.c (stopped_pids): Make static.
1247
1248 2020-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1249
1250 PR ada/26235
1251 * gdbtypes.c (ada_discrete_type_low_bound,
1252 ada_discrete_type_high_bound): Handle undefined bounds.
1253
1254 2020-07-21 Kamil Rytarowski <n54@gmx.com>
1255
1256 * nbsd-nat.h (nbsd_nat_target::supports_multi_process): New
1257 declaration.
1258 * nbsd-nat.c (nbsd_nat_target::supports_multi_process): New
1259 function.
1260
1261 2020-07-20 John Baldwin <jhb@FreeBSD.org>
1262
1263 * fbsd-tdep.c (fbsd_skip_solib_resolver): New function.
1264 (fbsd_init_abi): Install gdbarch "skip_solib_resolver" method.
1265 * fbsd-tdep.h (fbsd_skip_solib_resolver): New prototype.
1266 * mips-fbsd-tdep.c (mips_fbsd_skip_solib_resolver): New function.
1267 (mips_fbsd_init_abi): Install gdbarch "skip_solib_resolver"
1268 method.
1269
1270 2020-07-20 Ludovic Courtès <ludo@gnu.org>
1271
1272 * guile/scm-math.c (vlscm_integer_fits_p): Use 'uintmax_t'
1273 and 'intmax_t' instead of 'scm_t_uintmax' and 'scm_t_intmax',
1274 which are deprecated in Guile 3.0.
1275 * configure.ac (try_guile_versions): Add "guile-3.0".
1276 * configure (try_guile_versions): Regenerate.
1277 * NEWS: Update entry.
1278
1279 2020-07-20 Ludovic Courtès <ludo@gnu.org>
1280 Doug Evans <dje@google.com>
1281
1282 PR gdb/21104
1283 * guile/scm-ports.c (USING_GUILE_BEFORE_2_2): New macro.
1284 (ioscm_memory_port)[read_buf_size, write_buf_size]: Wrap in #if
1285 USING_GUILE_BEFORE_2_2.
1286 (stdio_port_desc, memory_port_desc) [!USING_GUILE_BEFORE_2_2]:
1287 Change type to 'scm_t_port_type *'.
1288 (natural_buffer_size) [!USING_GUILE_BEFORE_2_2]: New variable.
1289 (ioscm_open_port) [USING_GUILE_BEFORE_2_2]: Add 'stream'
1290 parameter and honor it. Update callers.
1291 (ioscm_open_port) [!USING_GUILE_BEFORE_2_2]: New function.
1292 (ioscm_read_from_port, ioscm_write) [!USING_GUILE_BEFORE_2_2]: New
1293 functions.
1294 (ioscm_fill_input, ioscm_input_waiting, ioscm_flush): Wrap in #if
1295 USING_GUILE_BEFORE_2_2.
1296 (ioscm_init_gdb_stdio_port) [!USING_GUILE_BEFORE_2_2]: Use
1297 'ioscm_read_from_port'. Call 'scm_set_port_read_wait_fd'.
1298 (ioscm_init_stdio_buffers) [!USING_GUILE_BEFORE_2_2]: New function.
1299 (gdbscm_stdio_port_p) [!USING_GUILE_BEFORE_2_2]: Use 'SCM_PORTP'
1300 and 'SCM_PORT_TYPE'.
1301 (gdbscm_memory_port_end_input, gdbscm_memory_port_seek)
1302 (ioscm_reinit_memory_port): Wrap in #if USING_GUILE_BEFORE_2_2.
1303 (gdbscm_memory_port_read, gdbscm_memory_port_write)
1304 (gdbscm_memory_port_seek, gdbscm_memory_port_close)
1305 [!USING_GUILE_BEFORE_2_2]: New functions.
1306 (gdbscm_memory_port_print): Remove use of 'SCM_PTOB_NAME'.
1307 (ioscm_init_memory_port_type) [!USING_GUILE_BEFORE_2_2]: Use
1308 'gdbscm_memory_port_read'.
1309 Wrap 'scm_set_port_end_input', 'scm_set_port_flush', and
1310 'scm_set_port_free' calls in #if USING_GUILE_BEFORE_2_2.
1311 (gdbscm_get_natural_buffer_sizes) [!USING_GUILE_BEFORE_2_2]: New
1312 function.
1313 (ioscm_init_memory_port): Remove.
1314 (ioscm_init_memory_port_stream): New function
1315 (ioscm_init_memory_port_buffers) [USING_GUILE_BEFORE_2_2]: New
1316 function.
1317 (gdbscm_memory_port_read_buffer_size) [!USING_GUILE_BEFORE_2_2]:
1318 Return scm_from_uint (0).
1319 (gdbscm_set_memory_port_read_buffer_size_x)
1320 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
1321 (gdbscm_memory_port_write_buffer_size) [!USING_GUILE_BEFORE_2_2]:
1322 Return scm_from_uint (0).
1323 (gdbscm_set_memory_port_write_buffer_size_x)
1324 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
1325 * configure.ac (try_guile_versions): Add "guile-2.2".
1326 * configure: Regenerate.
1327 * NEWS: Add entry.
1328
1329 2020-07-18 Tom Tromey <tom@tromey.com>
1330
1331 * linux-nat.c (linux_multi_process): Remove.
1332 (linux_nat_target::supports_multi_process): Return true.
1333
1334 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
1335
1336 * arch/riscv.c (riscv_tdesc_cache): Change map type.
1337 (riscv_lookup_target_description): Return pointer out of
1338 unique_ptr.
1339 * target-descriptions.c (allocate_target_description): Add
1340 comment.
1341 (target_desc_deleter::operator()): Likewise.
1342 * target-descriptions.h (struct target_desc_deleter): Moved to
1343 gdbsupport/tdesc.h.
1344 (target_desc_up): Likewise.
1345
1346 2020-07-17 Tom Tromey <tromey@adacore.com>
1347
1348 * linux-nat.c (linux_nat_target::supports_non_stop)
1349 (linux_nat_target::always_non_stop_p): Use "true".
1350 (linux_nat_target::supports_disable_randomization): Use "true" and
1351 "false".
1352
1353 2020-07-16 Caroline Tice <cmtice@google.com>
1354
1355 * dwarf2/read.c (RNGLIST_HEADER_SIZE32) New constant definition.
1356 (RNGLIST_HEADER_SIZE64): New constant definition.
1357 (struct dwop_section_names): Add rnglists_dwo.
1358 (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo.
1359 (struct loclist_header): Rename to 'loclists_rnglists_header'.
1360 (struct dwo_sections): Add rnglists field.
1361 (read_attribut_reprocess): Add tag parameter.
1362 (dwarf2_ranges_read): Add tag parameter & remove forward function decl.
1363 (cu_debug_rnglists_section): New function (decl & definition).
1364 (dwarf2_locate_dwo_sections): Add code to read rnglists_dwo section.
1365 (dwarf2_rnglists_process): Add a dwarf_tag parameter, for the kind of
1366 die whose range is being checked; get rnglist section from
1367 cu_debug_rnglists_section, to get from either objfile or dwo file as
1368 appropriate. Add cases for DW_RLE_base_addressx,
1369 DW_RLE_startx_length, DW_RLE_startx_endx. Also, update to only add
1370 the base address to DW_RLE_offset_pairs (not to all ranges), moving
1371 test inside if-condition and updating complaint message.
1372 (dwarf2_ranges_process): Add dwarf tag parameter and pass it to
1373 dwarf2_rnglists_process.
1374 (dwarf2_ranges_read): Add dwarf tag parameter and pass it to
1375 dwarf2_ranges_process.
1376 (dwarf2_get_pc_bounds): Check for DW_FORM_rnglistx when setting
1377 need_ranges_base and update comment appropriately. Also pass die tag
1378 to dwarf2_ranges_read.
1379 (dwarf2_record_block_ranges): Check for DW_FORM_rnglistx when setting
1380 need_ranges_base and update comment appropriately. Also pass die tag
1381 to dwarf2_ranges_process.
1382 (read_full_die_1): Add code to read DW_AT_rnglists_base and assign to
1383 cu->ranges_base. Also pass die tag to read_attribute_reprocess.
1384 (partial_die_info::read): Check for DW_FORM_rnglistx when setting
1385 need_ranges_base and update comment appropriately. Also pass die tag
1386 to read_attribute_reprocess and dwarf2_ranges_read.
1387 (read_loclist_header): Rename function to read_loclists_rnglists_header,
1388 and update function comment appropriately.
1389 (read_loclist_index): Call read_loclists_rnglists_header instead of
1390 read_loclist_header.
1391 (read_rnglist_index): New function.
1392 (read_attribute_reprocess): Add tag parameter. Add code for
1393 DW_FORM_rnglistx, passing tag to read_rnglist_index.
1394 (read_attribute_value): Mark DW_FORM_rnglistx with need_reprocess.
1395
1396 2020-07-15 Andrew Burgess <andrew.burgess@embecosm.com>
1397
1398 * f-typeprint.c (f_type_print_base): Allow for dynamic types not
1399 being resolved.
1400
1401 2020-07-14 Andrew Burgess <andrew.burgess@embecosm.com>
1402
1403 * arch-utils.c (show_architecture): Update formatting of messages.
1404
1405 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1406
1407 * gdbtypes.h (struct type) <bounds>: Handle array and string
1408 types.
1409 * ada-lang.c (assign_aggregate): Use type::bounds on
1410 array/string type.
1411 * c-typeprint.c (c_type_print_varspec_suffix): Likewise.
1412 * c-varobj.c (c_number_of_children): Likewise.
1413 (c_describe_child): Likewise.
1414 * eval.c (evaluate_subexp_for_sizeof): Likewise.
1415 * f-typeprint.c (f_type_print_varspec_suffix): Likewise.
1416 (f_type_print_base): Likewise.
1417 * f-valprint.c (f77_array_offset_tbl): Likewise.
1418 (f77_get_upperbound): Likewise.
1419 (f77_print_array_1): Likewise.
1420 * guile/scm-type.c (gdbscm_type_range): Likewise.
1421 * m2-typeprint.c (m2_array): Likewise.
1422 (m2_is_long_set_of_type): Likewise.
1423 * m2-valprint.c (get_long_set_bounds): Likewise.
1424 * p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
1425 * python/py-type.c (typy_range): Likewise.
1426 * rust-lang.c (rust_internal_print_type): Likewise.
1427 * type-stack.c (type_stack::follow_types): Likewise.
1428 * valarith.c (value_subscripted_rvalue): Likewise.
1429 * valops.c (value_cast): Likewise.
1430
1431 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1432
1433 * gdbtypes.c (TYPE_ARRAY_BIT_STRIDE): Remove. Update all
1434 callers to use the equivalent accessor methods.
1435
1436 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1437
1438 * gdbtypes.h (struct range_bounds) <bit_stride>: New method.
1439 (struct type) <bit_stride>: New method.
1440 (TYPE_BIT_STRIDE): Remove.
1441 * gdbtypes.c (update_static_array_size): Use type::bit_stride.
1442
1443 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1444
1445 * gdbtypes.h (TYPE_ARRAY_LOWER_BOUND_VALUE,
1446 TYPE_ARRAY_UPPER_BOUND_VALUE): Remove. Update all
1447 callers to use the equivalent accessor methods instead.
1448
1449 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1450
1451 * gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED,
1452 TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Remove. Update all
1453 callers to use the equivalent accessor methods instead.
1454
1455 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1456
1457 * gdbtypes.h (TYPE_LOW_BOUND_KIND,
1458 TYPE_HIGH_BOUND_KIND): Remove. Update all callers
1459 to use dynamic_prop::kind.
1460
1461 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1462
1463 * gdbtypes.h (TYPE_LOW_BOUND_UNDEFINED,
1464 TYPE_HIGH_BOUND_UNDEFINED): Remove. Update all callers
1465 to get the bound property's kind and check against
1466 PROP_UNDEFINED.
1467
1468 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1469
1470 * gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND): Remove. Update
1471 all callers to use type::range_bounds followed by
1472 dynamic_prop::{low,high}.
1473
1474 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
1475
1476 * gdbtypes.h (struct dynamic_prop) <kind, set_undefined,
1477 const_val, set_const_val, baton, set_locexpr, set_loclist,
1478 set_addr_offset, variant_parts, set_variant_parts,
1479 original_type, set_original_type>: New methods.
1480 <kind>: Rename to...
1481 <m_kind>: ... this. Update all users to use the new methods
1482 instead.
1483 <data>: Rename to...
1484 <m_data>: ... this. Update all users to use the new methods
1485 instead.
1486
1487 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1488
1489 * gdbtypes.c (get_discrete_bounds): Return failure if
1490 the range type's bounds are not both defined and constant
1491 values.
1492 (get_array_bounds): Update comment. Remove undefined bound check.
1493
1494 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
1495
1496 * gdbtypes.h (TYPE_RANGE_DATA): Remove. Update callers to use
1497 the type::bounds method directly.
1498
1499 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1500
1501 * gdbtypes.h (struct type) <bounds, set_bounds>: New methods.
1502 (TYPE_RANGE_DATA): Use type::bounds. Change all uses that
1503 are used to set the range type's bounds to use set_bounds.
1504
1505 2020-07-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1506
1507 * exec.c (_initialize_exec): Update exec-file-mismatch help.
1508
1509 2020-07-10 Pedro Alves <pedro@palves.net>
1510
1511 * gdbthread.h (inferior_ref): Define.
1512 (scoped_restore_current_thread) <m_thread>: Now a thread_info_ref.
1513 (scoped_restore_current_thread) <m_inf>: Now an inferior_ref.
1514 * thread.c
1515 (scoped_restore_current_thread::restore):
1516 Adjust to gdb::ref_ptr.
1517 (scoped_restore_current_thread::~scoped_restore_current_thread):
1518 Remove manual decref handling.
1519 (scoped_restore_current_thread::scoped_restore_current_thread):
1520 Adjust to use
1521 inferior_ref::new_reference/thread_info_ref::new_reference.
1522 Incref the thread before calling get_frame_id instead of after.
1523 Let TARGET_CLOSE_ERROR propagate.
1524
1525 2020-07-10 Pedro Alves <pedro@palves.net>
1526
1527 * frame-tailcall.c (dwarf2_tailcall_sniffer_first): Only swallow
1528 NO_ENTRY_VALUE_ERROR / MEMORY_ERROR / OPTIMIZED_OUT_ERROR /
1529 NOT_AVAILABLE_ERROR.
1530 * value.c (value_optimized_out): Only swallow MEMORY_ERROR /
1531 OPTIMIZED_OUT_ERROR / NOT_AVAILABLE_ERROR.
1532
1533 2020-07-10 Simon Marchi <simon.marchi@polymtl.ca>
1534 Pedro Alves <pedro@palves.net>
1535
1536 PR gdb/26199
1537 * infrun.c (threads_are_resumed_pending_p): Delete.
1538 (do_target_wait): Remove threads_are_executing and
1539 threads_are_resumed_pending_p checks from the inferior_matches
1540 lambda. Update comments.
1541
1542 2020-07-10 Pedro Alves <pedro@palves.net>
1543
1544 PR gdb/26199
1545 * infrun.c (handle_no_resumed): Transfer terminal to inferior with
1546 executing threads.
1547
1548 2020-07-10 Pedro Alves <pedro@palves.net>
1549
1550 PR gdb/26199
1551 * infrun.c (handle_no_resumed): Handle multiple targets.
1552
1553 2020-07-10 Pedro Alves <pedro@palves.net>
1554
1555 PR gdb/26199
1556 * infrun.c (prepare_to_wait): Check target_can_async_p instead of
1557 target_is_async_p.
1558
1559 2020-07-10 Pedro Alves <pedro@palves.net>
1560
1561 PR gdb/26199
1562 * target.c (target_pass_ctrlc): Look at the inferior's non-exited
1563 threads, not all threads.
1564
1565 2020-07-10 Pedro Alves <pedro@palves.net>
1566
1567 PR gdb/26199
1568 * remote.c (remote_target::open_1): Pass remote target pointer as
1569 data to create_async_event_handler.
1570 (remote_async_inferior_event_handler): Mark async event handler
1571 before returning if the remote target still has either pending
1572 events or unacknowledged notifications.
1573
1574 2020-07-10 John Baldwin <jhb@FreeBSD.org>
1575
1576 * fbsd-nat.h (fbsd_nat_target::supports_multi_process): New
1577 declaration.
1578 * fbsd-nat.c (fbsd_nat_target::supports_multi_process): New
1579 function.
1580
1581 2020-07-09 John Baldwin <jhb@FreeBSD.org>
1582
1583 * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
1584 inferior_ptid.
1585
1586 2020-07-09 John Baldwin <jhb@FreeBSD.org>
1587
1588 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_ARGC,
1589 AT_FREEBSD_ARGV, AT_FREEBSD_ENVC, AT_FREEBSD_ENVV,
1590 AT_FREEBSD_PS_STRINGS.
1591
1592 2020-07-08 Hannes Domani <ssbssa@yahoo.de>
1593
1594 * auto-load.c (auto_load_objfile_script_1): Convert drive part
1595 of debugfile path on Windows.
1596
1597 2020-07-08 John Baldwin <jhb@FreeBSD.org>
1598
1599 * fbsd-nat.c (fbsd_nat_target::find_memory_regions): Rename 'obfd'
1600 argument to 'data'.
1601
1602 2020-07-08 Tom Tromey <tromey@adacore.com>
1603
1604 * ada-lang.c (ada_exception_message_1): Use read_memory.
1605
1606 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1607
1608 PR python/22748
1609 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Remove
1610 special handling for inline frames.
1611 * findvar.c (value_of_register_lazy): Skip inline frames when
1612 creating lazy register values.
1613 * frame.c (frame_id_computed_p): Delete definition.
1614 * frame.h (frame_id_computed_p): Delete declaration.
1615
1616 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1617
1618 * NEWS: Mention additions to Python API.
1619 * python/py-arch.c (archpy_register_groups): New function.
1620 (arch_object_methods): Add 'register_groups' method.
1621 * python/py-registers.c (reggroup_iterator_object): New struct.
1622 (reggroup_object): New struct.
1623 (gdbpy_new_reggroup): New function.
1624 (gdbpy_reggroup_to_string): New function.
1625 (gdbpy_reggroup_name): New function.
1626 (gdbpy_reggroup_iter): New function.
1627 (gdbpy_reggroup_iter_next): New function.
1628 (gdbpy_new_reggroup_iterator): New function
1629 (gdbpy_initialize_registers): Register new types.
1630 (reggroup_iterator_object_type): Define new Python type.
1631 (gdbpy_reggroup_getset): New static global.
1632 (reggroup_object_type): Define new Python type.
1633 * python/python-internal.h
1634
1635 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1636
1637 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-registers.c
1638 * python/py-arch.c (archpy_registers): New function.
1639 (arch_object_methods): Add 'registers' method.
1640 * python/py-registers.c: New file.
1641 * python/python-internal.h
1642 (gdbpy_new_register_descriptor_iterator): Declare.
1643 (gdbpy_initialize_registers): Declare.
1644 * python/python.c (do_start_initialization): Call
1645 gdbpy_initialize_registers.
1646 * NEWS: Mention additions to the Python API.
1647
1648 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1649
1650 * NEWS: Mention new Python API method.
1651 * python/py-unwind.c (pending_framepy_architecture): New function.
1652 (pending_frame_object_methods): Add architecture method.
1653
1654 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1655
1656 * gdbarch.c: Regenerate.
1657 * gdbarch.h: Regenerate.
1658 * gdbarch.sh (deprecated_set_gdbarch_data): Delete.
1659 (gdbarch_data): Use internal_error for the case where
1660 deprecated_set_gdbarch_data was originally needed.
1661 * ia64-libunwind-tdep.c (libunwind_descr_init): Update parameters,
1662 and use passed in obstack.
1663 (libunwind_frame_set_descr): Should no longer get back NULL from
1664 gdbarch_data.
1665 (_initialize_libunwind_frame): Register as a pre-init gdbarch data
1666 type.
1667 * user-regs.c (user_regs_init): Update parameters, and use passed
1668 in obstack.
1669 (user_reg_add): Should no longer get back NULL from gdbarch_data.
1670 (_initialize_user_regs): Register as a pre-init gdbarch data type.
1671
1672 2020-07-06 Tom de Vries <tdevries@suse.de>
1673
1674 * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Handle
1675 End-Of-Sequence in lte_is_less_than.
1676 * symtab.c (find_pc_sect_line): Revert change from commit 3d92a3e313
1677 "gdb: Don't reorder line table entries too much when sorting".
1678
1679 2020-07-06 Tom de Vries <tdevries@suse.de>
1680
1681 PR tui/26205
1682 * tui/tui-win.c (tui_partial_win_by_name): Don't test for NULL name.
1683
1684 2020-07-05 Tom de Vries <tdevries@suse.de>
1685
1686 PR build/26187
1687 * inferior.h (struct infcall_suspend_state_deleter): If available, use
1688 std::uncaught_exceptions instead of deprecated
1689 std::uncaught_exception.
1690
1691 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * macroexp.h (macro_stringify): Return
1694 gdb::unique_xmalloc_ptr<char>.
1695 * macroexp.c (macro_stringify): Likewise.
1696 * macrotab.c (fixup_definition): Update.
1697
1698 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1699
1700 * c-exp.y (scan_macro_expansion): Don't free `expansion`.
1701 (lex_one_token): Update.
1702 * macroexp.c (struct macro_buffer) <release>: Return
1703 gdb::unique_xmalloc_ptr<char>.
1704 (macro_stringify): Update.
1705 (macro_expand): Update.
1706 (macro_expand_next): Return gdb::unique_xmalloc_ptr<char>.
1707 * macroexp.h (macro_expand_next): Likewise.
1708
1709 2020-07-02 Simon Marchi <simon.marchi@efficios.com>
1710
1711 * macroexp.h (macro_lookup_ftype): Remove.
1712 (macro_expand, macro_expand_once, macro_expand_next): Remove
1713 lookup function parameters, add scope parameter.
1714 * macroexp.c (scan, substitute_args, expand, maybe_expand,
1715 macro_expand, macro_expand_once, macro_expand_next): Likewise.
1716 * macroscope.h (standard_macro_lookup): Change parameter type
1717 to macro_scope.
1718 * macroscope.c (standard_macro_lookup): Likewise.
1719 * c-exp.y (lex_one_token): Update.
1720 * macrocmd.c (macro_expand_command): Likewise.
1721 (macro_expand_once_command): Likewise.
1722
1723 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1724
1725 * inf-loop.c (inferior_event_handler): Remove client_data param.
1726 * inf-loop.h (inferior_event_handler): Likewise.
1727 * infcmd.c (step_1): Adjust.
1728 * infrun.c (proceed): Adjust.
1729 (fetch_inferior_event): Remove client_data param.
1730 (infrun_async_inferior_event_handler): Adjust.
1731 * infrun.h (fetch_inferior_event): Remove `void *` param.
1732 * linux-nat.c (handle_target_event): Adjust.
1733 * record-btrace.c (record_btrace_handle_async_inferior_event):
1734 Adjust.
1735 * record-full.c (record_full_async_inferior_event_handler):
1736 Adjust.
1737 * remote.c (remote_async_inferior_event_handler): Adjust.
1738
1739 2020-07-01 Tom Tromey <tom@tromey.com>
1740
1741 * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
1742 * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
1743
1744 2020-07-01 Tom Tromey <tom@tromey.com>
1745
1746 * tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from
1747 tui_gen_win_info.
1748 (tui_win_info::make_window): Merge with
1749 tui_gen_win_info::make_window.
1750 (tui_win_info::make_visible): Move from tui_gen_win_info.
1751 * tui/tui-win.c (tui_win_info::max_width): Move from
1752 tui_gen_win_info.
1753 * tui/tui-layout.h (class tui_layout_window) <m_window>: Change
1754 type.
1755 <window_factory>: Likewise.
1756 * tui/tui-layout.c (tui_win_info::resize): Move from
1757 tui_gen_win_info.
1758 (make_standard_window): Change return type.
1759 (get_locator_window, tui_get_window_by_name): Likewise.
1760 (tui_layout_window::apply): Remove a cast.
1761 * tui/tui-data.h (MIN_WIN_HEIGHT): Move earlier.
1762 (struct tui_win_info): Merge with tui_gen_win_info.
1763 (struct tui_gen_win_info): Remove.
1764
1765 2020-07-01 Tom Tromey <tom@tromey.com>
1766
1767 * tui/tui-stack.h (struct tui_locator_window): Derive from
1768 tui_win_info.
1769 <do_scroll_horizontal, do_scroll_vertical>: New methods.
1770 <can_box>: New method.
1771
1772 2020-07-01 Tom Tromey <tom@tromey.com>
1773
1774 * tui/tui-stack.h (struct tui_locator_window): Remove body.
1775
1776 2020-07-01 Tom Tromey <tom@tromey.com>
1777
1778 * tui/tui-regs.c (tui_data_window::display_registers_from)
1779 (tui_data_window::display_registers_from)
1780 (tui_data_window::first_data_item_displayed)
1781 (tui_data_window::delete_data_content_windows): Update.
1782 (tui_data_window::refresh_window, tui_data_window::no_refresh):
1783 Remove.
1784 (tui_data_window::check_register_values): Update.
1785 (tui_data_item_window::rerender): Add parameters. Update.
1786 (tui_data_item_window::refresh_window): Remove.
1787 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: No longer
1788 virtual.
1789 * tui/tui-regs.h (struct tui_data_item_window): Don't derive from
1790 tui_gen_win_info.
1791 <refresh_window, max_height, min_height>: Remove.
1792 <rerender>: Add parameters.
1793 <x, y, visible>: New members.
1794 (struct tui_data_window) <refresh_window, no_refresh>: Remove.
1795 <m_item_width>: New member.
1796
1797 2020-07-01 Tom Tromey <tom@tromey.com>
1798
1799 * tui/tui-regs.c (tui_data_window::show_register_group)
1800 (tui_data_window::check_register_values): Update.
1801 * tui/tui-regs.h (struct tui_data_item_window) <regno>: Rename
1802 from item_no.
1803
1804 2020-07-01 Tom Tromey <tom@tromey.com>
1805
1806 * tui/tui-regs.c (tui_data_window::show_register_group): Remove
1807 useless "if".
1808
1809 2020-07-01 Tom Tromey <tom@tromey.com>
1810
1811 * tui/tui-regs.c (tui_data_window::show_register_group): Update.
1812 * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove.
1813
1814 2020-07-01 Tom Tromey <tom@tromey.com>
1815
1816 * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h
1817 * tui/tui-winsource.h (enum tui_line_or_address_kind)
1818 (struct tui_line_or_address): Move from tui-data.h.
1819 * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h.
1820 * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c.
1821 (tui_cmd_window, tui_source_window_base, tui_source_window)
1822 (tui_disasm_window): Don't declare.
1823 (enum tui_line_or_address_kind, struct tui_line_or_address): Move
1824 to tui-winsource.h.
1825 (SINGLE_KEY): Move to tui-stack.c.
1826
1827 2020-07-01 Tom Tromey <tom@tromey.com>
1828
1829 * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a
1830 std::string.
1831 * tui/tui-regs.c (class tab_expansion_file): New.
1832 (tab_expansion_file::write): New method.
1833 (tui_register_format): Change return type. Use
1834 tab_expansion_file.
1835 (tui_get_register, tui_data_window::display_registers_from)
1836 (tui_data_item_window::rerender): Update.
1837 * tui/tui-io.h (tui_expand_tabs): Don't declare.
1838 * tui/tui-io.c (tui_expand_tabs): Remove.
1839
1840 2020-07-01 Tom Tromey <tom@tromey.com>
1841
1842 * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
1843
1844 2020-07-01 Fangrui Song <maskray@google.com>
1845
1846 * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
1847
1848 2020-07-01 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1849
1850 * dwarf2/read.c (set_die_type): Removed conditions to restrict
1851 forms for DW_AT_associated and DW_AT_allocated attributes,
1852 which is already checked in function attr_to_dynamic_prop.
1853
1854 2020-06-30 Tom Tromey <tromey@adacore.com>
1855
1856 * dwarf2/read.c (quirk_rust_enum): Correctly call
1857 alloc_rust_variant for default-less enum.
1858
1859 2020-06-30 Tom Tromey <tromey@adacore.com>
1860
1861 PR build/26183:
1862 * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
1863 gdb::to_string.
1864
1865 2020-06-29 Simon Marchi <simon.marchi@efficios.com>
1866
1867 * gdbarch.sh (displaced_step_copy_insn): Update doc.
1868 * gdbarch.h: Re-generate.
1869
1870 2020-06-28 Tom Tromey <tom@tromey.com>
1871
1872 * command.h (cmd_types): Remove.
1873 (cmd_type): Don't declare.
1874 * cli/cli-decode.h (enum cmd_types): Uncomment. No longer a
1875 typedef.
1876 * cli/cli-cmds.c (setting_cmd): Use cmd->type directly.
1877 * cli/cli-decode.c (cmd_type): Remove.
1878
1879 2020-06-27 Pedro Alves <palves@redhat.com>
1880
1881 * fork-child.c (prefork_hook): Adjust.
1882 * infcmd.c (set_inferior_io_terminal, get_inferior_io_terminal):
1883 Delete.
1884 (set_inferior_tty_command, show_inferior_tty_command): Adjust.
1885 * inferior.c (inferior::set_tty, inferior::tty): New methods.
1886 * inferior.h (set_inferior_io_terminal, get_inferior_io_terminal):
1887 Remove declarations.
1888 (struct inferior) <set_tty, tty>: New methods.
1889 (struct inferior) <terminal>: Rename to ...
1890 (struct inferior) <m_terminal>: ... this and make private.
1891 * main.c (captured_main_1): Adjust.
1892 * mi/mi-cmd-env.c (mi_cmd_inferior_tty_set): Adjust.
1893 (mi_cmd_inferior_tty_show): Adjust.
1894 * nto-procfs.c (nto_procfs_target::create_inferior): Adjust.
1895 * windows-nat.c (windows_nat_target::create_inferior): Adjust.
1896
1897 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
1898
1899 * configure.ac: Add --enable-libctf: handle --disable-static
1900 properly.
1901 * acinclude.m4: sinclude ../config/enable.m4.
1902 * Makefile.in (aclocal_m4_deps): Adjust accordingly.
1903 (LIBCTF): Substitute in.
1904 (CTF_DEPS): New, likewise.
1905 (CLIBS): libctf needs symbols from libbfd: move earlier.
1906 (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath
1907 flags.
1908 * ctfread.c: Surround in ENABLE_LIBCTF.
1909 (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub.
1910 * configure: Regenerate.
1911 * config.in: Likewise.
1912
1913 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
1914
1915 * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
1916
1917 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
1918
1919 * inferior.h (struct inferior) <terminal>: Change type to
1920 gdb::unique_xmalloc_ptr<char>.
1921 * inferior.c (inferior::~inferior): Don't free inf->terminal.
1922 * infcmd.c (set_inferior_io_terminal): Don't free terminal
1923 field, adjust to unique pointer.
1924 (get_inferior_io_terminal): Adjust to unique pointer.
1925
1926 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1927
1928 * riscv-tdep.c (riscv_print_registers_info): Loop over all
1929 registers, not just the known core set of registers.
1930
1931 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1932
1933 * riscv-tdep.c (riscv_register_name): Return NULL for duplicate
1934 fflags, frm, and fcsr registers.
1935 (riscv_register_reggroup_p): Remove unknown CSRs from save and
1936 restore groups.
1937 (riscv_tdesc_unknown_reg): New function.
1938 (riscv_gdbarch_init): Pass riscv_tdesc_unknown_reg to
1939 tdesc_use_registers.
1940 * riscv-tdep.h (struct gdbarch_tdep): Add
1941 unknown_csrs_first_regnum, unknown_csrs_count,
1942 duplicate_fflags_regnum, duplicate_frm_regnum, and
1943 duplicate_fcsr_regnum fields.
1944
1945 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1946
1947 * target-descriptions.c (tdesc_use_registers): Add new parameter a
1948 callback, use the callback (when not null) to help number unknown
1949 registers.
1950 * target-descriptions.h (tdesc_unknown_register_ftype): New typedef.
1951 (tdesc_use_registers): Add extra parameter to declaration.
1952
1953 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1954
1955 * riscv-tdep.c (value_of_riscv_user_reg): Moved to here from later
1956 in the file.
1957 (class riscv_pending_register_alias): Likewise.
1958 (riscv_register_feature::register_info): Change 'required_p' field
1959 to 'required', and change its type. Add 'check' member function.
1960 (riscv_register_feature::register_info::check): Define new member
1961 function.
1962 (riscv_xreg_feature): Change initialisation of 'required' field.
1963 (riscv_freg_feature): Likewise.
1964 (riscv_virtual_feature): Likewise.
1965 (riscv_csr_feature): Likewise.
1966 (riscv_check_tdesc_feature): Take extra parameter, the csr
1967 tdesc_feature, rewrite the function to use the new
1968 riscv_register_feature::register_info::check function.
1969 (riscv_gdbarch_init): Pass the csr tdesc_feature where needed.
1970
1971 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1972
1973 * features/Makefile: Remove all references to the deleted files
1974 below.
1975 * features/riscv/32bit-csr.c: Deleted.
1976 * features/riscv/32bit-csr.xml: Deleted.
1977 * features/riscv/64bit-csr.c: Deleted.
1978 * features/riscv/64bit-csr.xml: Deleted.
1979 * features/riscv/rebuild-csr-xml.sh: Deleted.
1980
1981 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1982
1983 * riscv-tdep.c (struct riscv_register_feature::register_info): Fix
1984 whitespace error for declaration of names member variable.
1985 (struct riscv_register_feature): Add new prefer_first_name member
1986 variable, and fix whitespace error in declaration of registers.
1987 (riscv_xreg_feature): Initialize prefer_first_name field.
1988 (riscv_freg_feature): Likewise.
1989 (riscv_virtual_feature): Likewise.
1990 (riscv_csr_feature): Likewise.
1991 (riscv_register_name): Expand on comments. Remove register name
1992 modifications for CSR and virtual registers.
1993
1994 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1995
1996 * riscv-tdep.c (struct riscv_register_feature): Fix whitespace
1997 errors.
1998
1999 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
2000
2001 * riscv-tdep.c (riscv_create_csr_aliases): Handle csr aliases from
2002 riscv-opc.h.
2003 (class riscv_pending_register_alias): New class.
2004 (riscv_check_tdesc_feature): Take vector of pending aliases and
2005 populate it as appropriate.
2006 (riscv_setup_register_aliases): Delete.
2007 (riscv_gdbarch_init): Create vector of pending aliases and pass it
2008 to riscv_check_tdesc_feature in all cases. Use the vector to
2009 create the register aliases.
2010
2011 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2012
2013 * sol2-tdep.c (sol2_static_transform_name): Remove.
2014 (sol2_init_abi): Don't register it.
2015 * gdbarch.sh (static_transform_name): Remove.
2016 * gdbarch.c, gdbarch.h: Regenerate.
2017
2018 * dbxread.c (read_dbx_symtab) <'S'>: Remove call to
2019 gdbarch_static_transform_name.
2020 * mdebugread.c (parse_partial_symbols) <'S'>: Likewise.
2021 * stabsread.c (define_symbol) <'X'>: Remove.
2022 (define_symbol) <'S'>: Remove gdbarch_static_transform_name
2023 handling.
2024 <'V'>: Likewise.
2025 * xcoffread.c (scan_xcoff_symtab): Remove gdbarch.
2026 <'S'>: Remove call to gdbarch_static_transform_name.
2027
2028 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2029
2030 * procfs.c (procfs_pre_trace): New function.
2031 (procfs_target::create_inferior): Pass it to fork_inferior.
2032
2033 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2034
2035 * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove
2036 sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o.
2037 <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o,
2038 sol2-tdep.o, sparc-sol2-tdep.o.
2039 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static.
2040 * sparc-tdep.h (sparc32_sol2_init_abi): Remove.
2041 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static.
2042 * sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
2043
2044 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2045
2046 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
2047 (amd64_sol2_init_abi): Use sol2_sigtramp_p.
2048 Call sol2_init_abi.
2049 Remove calls to set_gdbarch_skip_solib_resolver,
2050 set_gdbarch_core_pid_to_str.
2051 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
2052 (i386_sol2_static_transform_name): Remove.
2053 (i386_sol2_init_abi): Call sol2_init_abi.
2054 Remove calls to set_gdbarch_sofun_address_maybe_missing,
2055 set_gdbarch_static_transform_name,
2056 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
2057 Use sol2_sigtramp_p.
2058 * sol2-tdep.c (sol2_pc_in_sigtramp): New function.
2059 (sol2_sigtramp_p): New function.
2060 (sol2_static_transform_name): New function.
2061 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
2062 (sol2_init_abi): New function.
2063 * sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
2064 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
2065 * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
2066 (sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
2067 (sparc_sol2_static_transform_name): Remove.
2068 (sparc32_sol2_init_abi): Call sol2_init_abi.
2069 Remove calls to set_gdbarch_sofun_address_maybe_missing,
2070 set_gdbarch_static_transform_name,
2071 set_gdbarch_skip_solib_resolver,
2072 set_gdbarch_core_pid_to_str.
2073 * sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
2074 (sparc_sol2_static_transform_name): Remove
2075 * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
2076 call sol2_sigtramp_p.
2077 (sparc64_sol2_init_abi): Call sol2_init_abi.
2078 Remove calls to set_gdbarch_sofun_address_maybe_missing,
2079 set_gdbarch_static_transform_name,
2080 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
2081
2082 2020-06-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2083
2084 * symfile-add-flags.h: New flag SYMFILE_ALWAYS_CONFIRM.
2085 * exec.c (validate_exec_file): If from_tty, set both
2086 SYMFILE_VERBOSE (== from_tty) and SYMFILE_ALWAYS_CONFIRM.
2087 * symfile.c (symbol_file_add_with_addrs): if always_confirm
2088 and from_tty, unconditionally ask a confirmation.
2089
2090 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2091
2092 * target-descriptions.c (tdesc_architecture_name): Protect against
2093 NULL pointer dereference.
2094 (maint_print_xml_tdesc_cmd): New function.
2095 (_initialize_target_descriptions): Register new 'maint print
2096 xml-tdesc' command and give it the filename completer.
2097 * NEWS: Mention new 'maint print xml-tdesc' command.
2098
2099 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2100
2101 * target-descriptions.c (class tdesc_compatible_info): New class.
2102 (struct target_desc): Change type of compatible vector.
2103 (tdesc_compatible_p): Update for change in type of
2104 target_desc::compatible.
2105 (tdesc_compatible_info_list): New function.
2106 (tdesc_compatible_info_arch_name): New function.
2107 (tdesc_add_compatible): Update for change in type of
2108 target_desc::compatible.
2109 (print_c_tdesc::visit_pre): Likewise.
2110
2111 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2112
2113 * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
2114 whitespace to underscore.
2115 (maint_print_c_tdesc_cmd): Use fake filename for target
2116 descriptions that came from the target.
2117 (_initialize_target_descriptions): Add filename command completion
2118 for 'maint print c-tdesc'.
2119
2120 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
2121
2122 * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
2123 lines.
2124
2125 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
2126
2127 * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
2128 lines.
2129 (dwarf2_find_location_expression): Likewise.
2130 (call_site_parameter_matches): Likewise.
2131 (dwarf2_compile_expr_to_ax): Likewise.
2132 (disassemble_dwarf_expression): Likewise.
2133 (loclist_describe_location): Likewise.
2134
2135 2020-06-23 Pedro Alves <palves@redhat.com>
2136
2137 * gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
2138 progspace-and-thread.h. Include scoped-mock-context.h instead.
2139 (register_to_value_test): Use scoped_mock_context.
2140 * regcache.c: Include "scoped-mock-context.h".
2141 (cooked_read_test): Don't error out if a target is already pushed.
2142 Use scoped_mock_context. Adjust.
2143 * scoped-mock-context.h: New file.
2144
2145 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2146
2147 * ada-lang.c (ada_language_data): Delete la_is_string_type_p
2148 initializer.
2149 (ada_language::is_string_type_p): New member function.
2150 * c-lang.c (c_language_data): Delete la_is_string_type_p
2151 initializer.
2152 (cplus_language_data): Likewise.
2153 (asm_language_data): Likewise.
2154 (minimal_language_data): Likewise.
2155 * d-lang.c (d_language_data): Likewise.
2156 * f-lang.c (f_is_string_type_p): Delete function, implementation
2157 moved to f_language::is_string_type_p.
2158 (f_language_data): Delete la_is_string_type_p initializer.
2159 (f_language::is_string_type_p): New member function,
2160 implementation from f_is_string_type_p.
2161 * go-lang.c (go_is_string_type_p): Delete function, implementation
2162 moved to go_language::is_string_type_p.
2163 (go_language_data): Delete la_is_string_type_p initializer.
2164 (go_language::is_string_type_p): New member function,
2165 implementation from go_is_string_type_p.
2166 * language.c (language_defn::is_string_type_p): Define new member
2167 function.
2168 (default_is_string_type_p): Make static, add comment copied from
2169 header file.
2170 (unknown_language_data): Delete la_is_string_type_p initializer.
2171 (unknown_language::is_string_type_p): New member function.
2172 (auto_language_data): Delete la_is_string_type_p initializer.
2173 (auto_language::is_string_type_p): New member function.
2174 * language.h (language_data): Delete la_is_string_type_p field.
2175 (language_defn::is_string_type_p): Declare new function.
2176 (default_is_string_type_p): Delete desclaration, move comment to
2177 definition.
2178 * m2-lang.c (m2_is_string_type_p): Delete function, implementation
2179 moved to m2_language::is_string_type_p.
2180 (m2_language_data): Delete la_is_string_type_p initializer.
2181 (m2_language::is_string_type_p): New member function,
2182 implementation from m2_is_string_type_p.
2183 * objc-lang.c (objc_language_data): Delete la_is_string_type_p
2184 initializer.
2185 * opencl-lang.c (opencl_language_data): Likewise.
2186 * p-lang.c (pascal_is_string_type_p): Delete function,
2187 implementation moved to pascal_language::is_string_type_p.
2188 (pascal_language_data): Delete la_is_string_type_p initializer.
2189 (pascal_language::is_string_type_p): New member function,
2190 implementation from pascal_is_string_type_p.
2191 * rust-lang.c (rust_is_string_type_p): Delete function,
2192 implementation moved to rust_language::is_string_type_p.
2193 (rust_language_data): Delete la_is_string_type_p initializer.
2194 (rust_language::is_string_type_p): New member function,
2195 implementation from rust_is_string_type_p.
2196 * valprint.c (val_print_scalar_or_string_type_p): Update call to
2197 is_string_type_p.
2198
2199 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2200
2201 * ada-lang.c (ada_language_data): Delete la_print_typedef
2202 initializer.
2203 (ada_language::print_typedef): New member function.
2204 * c-lang.c (c_language_data): Delete la_print_typedef initializer.
2205 (cplus_language_data): Likewise.
2206 (asm_language_data): Likewise.
2207 (minimal_language_data): Likewise.
2208 * d-lang.c (d_language_data): Likewise.
2209 * f-lang.c (f_language_data): Likewise.
2210 (f_language::print_typedef): New member function.
2211 * go-lang.c (go_language_data): Delete la_print_typedef
2212 initializer.
2213 * language.c (language_defn::print_typedef): Define member
2214 function.
2215 (unknown_language_data): Delete la_print_typedef initializer.
2216 (unknown_language::print_typedef): New member function.
2217 (auto_language_data): Delete la_print_typedef initializer.
2218 (auto_language::print_typedef): New member function.
2219 * language.h (language_data): Delete la_print_typedef field.
2220 (language_defn::print_typedef): Declare new member function.
2221 (LA_PRINT_TYPEDEF): Update call to print_typedef.
2222 (default_print_typedef): Delete declaration.
2223 * m2-lang.c (m2_language_data): Delete la_print_typedef
2224 initializer.
2225 (m2_language::print_typedef): New member function.
2226 * objc-lang.c (objc_language_data): Delete la_print_typedef
2227 initializer.
2228 * opencl-lang.c (opencl_language_data): Likewise.
2229 * p-lang.c (pascal_language_data): Likewise.
2230 (pascal_language::print_typedef): New member function.
2231 * rust-lang.c (rust_print_typedef): Delete function,
2232 implementation moved to rust_language::print_typedef.
2233 (rust_language): Delete la_print_typedef initializer.
2234 (rust_language::print_typedef): New member function,
2235 implementation from rust_print_typedef.
2236 * typeprint.c (default_print_typedef): Delete.
2237
2238 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2239
2240 * ada-lang.c (ada_language_data): Delete la_printstr initializer.
2241 (ada_language::printstr): New member function.
2242 * c-lang.c (c_language_data): Delete la_printstr initializer.
2243 (cplus_language_data): Likewise.
2244 (asm_language_data): Likewise.
2245 (minimal_language_data): Likewise.
2246 * d-lang.c (d_language_data): Likewise.
2247 * f-lang.c (f_printstr): Rename to f_language::printstr.
2248 (f_language_data): Delete la_printstr initializer.
2249 (f_language::printstr): New member function, implementation from
2250 f_printstr.
2251 * go-lang.c (go_language_data): Delete la_printstr initializer.
2252 * language.c (language_defn::printstr): Define new member
2253 function.
2254 (unk_lang_printstr): Delete.
2255 (unknown_language_data): Delete la_printstr initializer.
2256 (unknown_language::printstr): New member function.
2257 (auto_language_data): Delete la_printstr initializer.
2258 (auto_language::printstr): New member function.
2259 * language.h (language_data): Delete la_printstr field.
2260 (language_defn::printstr): Declare new member function.
2261 (LA_PRINT_STRING): Update call to printstr.
2262 * m2-lang.c (m2_printstr): Rename to m2_language::printstr.
2263 (m2_language_data): Delete la_printstr initializer.
2264 (m2_language::printstr): New member function, implementation from
2265 m2_printstr.
2266 * objc-lang.c (objc_language_data): Delete la_printstr
2267 initializer.
2268 * opencl-lang.c (opencl_language_data): Likewise.
2269 * p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
2270 (pascal_language_data): Delete la_printstr initializer.
2271 (pascal_language::printstr): New member function, implementation
2272 from pascal_printstr.
2273 * p-lang.h (pascal_printstr): Delete declaration.
2274 * rust-lang.c (rust_printstr): Update header comment.
2275 (rust_language_data): Delete la_printstr initializer.
2276 (rust_language::printstr): New member function.
2277
2278 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2279
2280 * ada-lang.c (ada_language_data): Delete la_printchar initializer.
2281 (ada_language::printchar): New member function.
2282 * c-lang.c (c_language_data): Delete la_printchar initializer.
2283 (cplus_language_data): Likewise.
2284 (asm_language_data): Likewise.
2285 (minimal_language_data): Likewise.
2286 * d-lang.c (d_language_data): Likewise.
2287 * f-lang.c (f_printchar): Rename to f_language::printchar.
2288 (f_language_data): Delete la_printchar initializer.
2289 (f_language::printchar): New member function, implementation from
2290 f_printchar.
2291 * go-lang.c (go_language_data): Delete la_printchar initializer.
2292 * language.c (unk_lang_printchar): Delete.
2293 (language_defn::printchar): Define new member function.
2294 (unknown_language_data): Delete la_printchar initializer.
2295 (unknown_language::printchar): New member function.
2296 (auto_language_data): Delete la_printchar initializer.
2297 (auto_language::printchar): New member function.
2298 * language.h (language_data): Delete la_printchar field.
2299 (language_defn::printchar): Declare new member function.
2300 (LA_PRINT_CHAR): Update call to printchar.
2301 * m2-lang.c (m2_language_data): Delete la_printchar initializer.
2302 (m2_language::printchar): New member function.
2303 * objc-lang.c (objc_language_data): Delete la_printchar
2304 initializer.
2305 * opencl-lang.c (opencl_language_data): Likewise.
2306 * p-lang.c (pascal_language_data): Delete la_printchar
2307 initializer.
2308 (pascal_language::printchar): New member function.
2309 * rust-lang.c (rust_printchar): Rename to
2310 rust_language::printchar.
2311 (rust_language_data): Delete la_printchar initializer.
2312 (rust_language::printchar): New member function, implementation
2313 from rust_printchar.
2314
2315 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2316
2317 * ada-lang.c (emit_char): Renamed to ada_language::emitchar.
2318 (ada_language_data): Delete la_emitchar initializer.
2319 (ada_language::emitchar): New member function, implementation from
2320 emit_char.
2321 * c-lang.c (c_language_data): Delete la_emitchar initializer.
2322 (cplus_language_data): Likewise.
2323 (asm_language_data): Likewise.
2324 (minimal_language_data): Likewise.
2325 * d-lang.c (d_language_data): Likewise.
2326 * f-lang.c (f_emit_char): Rename to f_language::emitchar.
2327 (f_language_data): Delete la_emitchar initializer.
2328 (f_language::emitchar): New member function, implementation from
2329 f_emit_char.
2330 * go-lang.c (go_language_data): Delete la_emitchar initializer.
2331 * language.c (unk_lang_emit_char): Delete.
2332 (language_defn::emitchar): New member function definition.
2333 (unknown_language_data): Delete la_emitchar initializer.
2334 (unknown_language::emitchar): New member function.
2335 (auto_language_data): Delete la_emitchar initializer.
2336 (auto_language::emitchar): New member function.
2337 * language.h (language_data): Delete la_emitchar field.
2338 (language_defn::emitchar): New member field declaration.
2339 (LA_EMIT_CHAR): Update call to emitchar.
2340 * m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
2341 (m2_language_data): Delete la_emitchar initializer.
2342 (m2_language::emitchar): New member function, implementation from
2343 m2_emit_char.
2344 * objc-lang.c (objc_language_data): Delete la_emitchar
2345 initializer.
2346 * opencl-lang.c (opencl_language_data): Likewise.
2347 * p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
2348 (pascal_language_data): Delete la_emitchar initializer.
2349 (pascal_language::emitchar): New member function, implementation
2350 from pascal_emit_char.
2351 * rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
2352 (rust_language_data): Delete la_emitchar initializer.
2353 (rust_language::emitchar): New member function, implementation
2354 from rust_emitchar.
2355
2356 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2357
2358 * ada-lang.c (resolve): Rename to ada_language::post_parser.
2359 (ada_language_data): Delete la_post_parser initializer.
2360 (ada_language::post_parser): New member function.
2361 * c-lang.c (c_language_data): Delete la_post_parser initializer.
2362 (cplus_language_data): Likewise.
2363 (asm_language_data): Likewise.
2364 (minimal_language_data): Likewise.
2365 * d-lang.c (d_language_data): Likewise.
2366 * f-lang.c (f_language_data): Likewise.
2367 * go-lang.c (go_language_data): Likewise.
2368 * language.c (unknown_language_data): Likewise.
2369 (auto_language_data): Likewise.
2370 * language.h (language_data): Delete la_post_parser field.
2371 (language_defn::post_parser): New member function.
2372 * m2-lang.c (m2_language_data): Delete la_post_parser initializer.
2373 * objc-lang.c (objc_language_data): Likewise.
2374 * opencl-lang.c (opencl_language_data): Likewise.
2375 * p-lang.c (pascal_language_data): Likewise.
2376 * parse.c (parse_exp_in_context): Update call to post_parser.
2377 (null_post_parser): Delete definition.
2378 * parser-defs.h (null_post_parser): Delete declaration.
2379 * rust-lang.c (rust_language_data): Delete la_post_parser
2380 initializer.
2381
2382 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2383
2384 * ada-lang.c (parse): Rename to ada_language::parser.
2385 (ada_language_data): Delete la_parser initializer.
2386 (ada_language::parser): New member function, implementation from
2387 parse.
2388 * c-lang.c (c_language_data): Delete la_parser initializer.
2389 (cplus_language_data): Likewise.
2390 (asm_language_data): Likewise.
2391 (minimal_language_data): Likewise.
2392 * d-lang.c (d_language_data): Likewise.
2393 (d_language::parser): New member function.
2394 * f-lang.c (f_language_data): Delete la_parser initializer.
2395 (f_language::parser): New member function.
2396 * go-lang.c (go_language_data): Delete la_parser initializer.
2397 (go_language::parser): New member function.
2398 * language.c (unk_lang_parser): Delete.
2399 (language_defn::parser): Define new member function.
2400 (unknown_language_data): Delete la_parser initializer.
2401 (unknown_language::parser): New member function.
2402 (auto_language_data): Delete la_parser initializer.
2403 (auto_language::parser): New member function.
2404 * language.h (language_data): Delete la_parser field.
2405 (language_defn::parser): Declare new member function.
2406 * m2-lang.c (m2_language_data): Delete la_parser initializer.
2407 (m2_language::parser): New member function.
2408 * objc-lang.c (objc_language_data): Delete la_parser initializer.
2409 * opencl-lang.c (opencl_language_data): Likewise.
2410 * p-lang.c (pascal_language_data): Likewise.
2411 (pascal_language::parser): New member function.
2412 * parse.c (parse_exp_in_context): Update call to parser.
2413 * rust-lang.c (rust_language_data): Delete la_parser initializer.
2414 (rust_language::parser): New member function.
2415
2416 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2417
2418 * top.c (print_gdb_configuration): Print --with-python-libdir
2419 configuration value.
2420
2421 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2422
2423 * NEWS: Mention change to the alias command.
2424
2425 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2426
2427 * cli/cli-cmds.c (lookup_cmd_for_default_args)
2428 (alias_command_completer)
2429 (make_alias_options_def_group): New functions.
2430 (alias_opts, alias_option_defs): New struct and array.
2431 (alias_usage_error): Update usage.
2432 (alias_command): Handles optional DEFAULT-ARGS... arguments.
2433 Use option framework.
2434 (_initialize_cli_cmds): Update alias command help.
2435 Update aliases command help.
2436 (show_user):
2437 Add NULL for new default_args lookup_cmd argument.
2438 (valid_command_p): Rename to validate_aliased_command.
2439 Add NULL for new default_args lookup_cmd argument. Verify that the
2440 aliased_command has no default args.
2441 * cli/cli-decode.c (help_cmd): Show aliases definitions.
2442 (lookup_cmd_1, lookup_cmd): New argument default_args.
2443 (add_alias_cmd):
2444 Add NULL for new default_args lookup_cmd argument.
2445 (print_help_for_command): Show default args under the layout
2446 alias some_alias = some_aliased_cmd some_alias_default_arg.
2447 * cli/cli-decode.h (struct cmd_list_element): New member default_args.
2448 xfree default_args in destructor.
2449 * cli/cli-script.c (process_next_line, do_define_command):
2450 Add NULL for new default_args lookup_cmd argument.
2451 * command.h: Declare new default_args argument in lookup_cmd
2452 and lookup_cmd_1.
2453 * completer.c (complete_line_internal_1):
2454 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
2455 * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
2456 * guile/scm-param.c (add_setshow_generic, pascm_parameter_defined_p):
2457 Likewise.
2458 * infcmd.c (_initialize_infcmd): Likewise.
2459 * python/py-auto-load.c (gdbpy_initialize_auto_load): Likewise.
2460 * python/py-cmd.c (gdbpy_parse_command_name): Likewise.
2461 * python/py-param.c (add_setshow_generic): Likewise.
2462 * remote.c (_initialize_remote): Likewise.
2463 * top.c (execute_command): Prepend default_args if command has some.
2464 (set_verbose):
2465 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
2466 * tracepoint.c (validate_actionline, encode_actions_1):
2467 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
2468
2469 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2470
2471 * jit.c (jit_read_descriptor): Use bool as the return type.
2472 (jit_breakpoint_re_set_internal): Use bool as the return type.
2473 Invert the return value logic; return true if the jit breakpoint
2474 has been successfully initialized.
2475 (jit_inferior_init): Update the call to
2476 jit_breakpoint_re_set_internal.
2477
2478 2020-06-22 Pedro Alves <palves@redhat.com>
2479
2480 PR gdb/25939
2481 * procfs.c (procfs_target::wait): Don't reference inferior_ptid.
2482 Use the current inferior instead. Don't return
2483 TARGET_WAITKIND_SPURIOUS/inferior_ptid -- instead continue and
2484 wait again.
2485 * sol-thread.c (sol_thread_target::wait): Don't reference
2486 inferior_ptid.
2487 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs)
2488 (sol_update_thread_list_callback): Use the current inferior's pid
2489 instead of inferior_ptid.
2490
2491 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2492
2493 * procfs.c: Cleanup many comments.
2494
2495 (READ_WATCHFLAG, WRITE_WATCHFLAG, EXEC_WATCHFLAG)
2496 (AFTER_WATCHFLAG): Replace by value.
2497
2498 (MAIN_PROC_NAME_FORMAT): Inline ...
2499 (create_procinfo): ... here.
2500
2501 (procfs_debug_inferior): Remove SYS_exec handling.
2502 (syscall_is_exec): Likewise.
2503 (procfs_set_exec_trap): Likewise.
2504
2505 (syscall_is_lwp_exit): Inline in callers.
2506 (syscall_is_exit): Likewise.
2507 (syscall_is_exec): Likewise.
2508 (syscall_is_lwp_create): Likewise.
2509
2510 (invalidate_cache): Remove #if 0 code.
2511
2512 (make_signal_thread_runnable): Remove.
2513 (procfs_target::resume): Remove #if 0 code.
2514
2515 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2516
2517 PR gdb/25939
2518 * procfs.c (procfs_target::procfs_init_inferior): Move push_target
2519 call ...
2520 (procfs_target::create_inferior): ... here.
2521
2522 2020-06-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2523
2524 * exec.c (validate_exec_file): Ensure the build-id is up to
2525 date by calling reopen_exec_file (that checks file timestamp
2526 to decide to re-read the file).
2527
2528 2020-06-18 Pedro Alves <palves@redhat.com>
2529
2530 PR gdb/25412
2531 * gdbthread.h (delete_thread, delete_thread_silent)
2532 (find_thread_ptid): Update comments.
2533 * thread.c (current_thread_): New global.
2534 (is_current_thread): Move higher, and reimplement.
2535 (inferior_thread): Reimplement.
2536 (set_thread_exited): Use bool. Add assertions.
2537 (add_thread_silent): Simplify thread-reuse handling by always
2538 calling delete_thread.
2539 (delete_thread): Remove intro comment.
2540 (find_thread_ptid): Skip exited threads.
2541 (switch_to_thread_no_regs): Write to current_thread_.
2542 (switch_to_no_thread): Check CURRENT_THREAD_ instead of
2543 INFERIOR_PTID. Clear current_thread_.
2544
2545 2020-06-18 Pedro Alves <palves@redhat.com>
2546
2547 * aix-thread.c (pd_update): Use switch_to_thread.
2548
2549 2020-06-18 Pedro Alves <palves@redhat.com>
2550
2551 * ravenscar-thread.c (ravenscar_thread_target): Update.
2552 (ravenscar_thread_target::update_inferior_ptid): Rename to ...
2553 (ravenscar_thread_target::add_active_thread): ... this. Don't
2554 set m_base_ptid here. Update to avoid referencing inferior_ptid.
2555 (ravenscar_thread_target::wait): Don't write to inferior_ptid.
2556
2557 2020-06-18 Pedro Alves <palves@redhat.com>
2558
2559 * nat/windows-nat.c (current_windows_thread): Remove.
2560 * nat/windows-nat.h (current_windows_thread): Remove.
2561 * windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
2562 Adjust.
2563 (display_selectors): Adjust to fetch the current
2564 windows_thread_info based on inferior_ptid.
2565 (fake_create_process): No longer write to current_windows_thread.
2566 (windows_nat_target::get_windows_debug_event):
2567 Don't set inferior_ptid or current_windows_thread.
2568 (windows_nat_target::wait): Adjust to not rely on
2569 current_windows_thread.
2570 (do_initial_windows_stuff): Now a method of windows_nat_target.
2571 Switch to the last_ptid thread.
2572 (windows_nat_target::attach): Adjust.
2573 (windows_nat_target::detach): Use switch_to_no_thread instead of
2574 writing to inferior_ptid directly.
2575 (windows_nat_target::create_inferior): Adjust.
2576
2577 2020-06-18 Pedro Alves <palves@redhat.com>
2578
2579 * windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
2580
2581 2020-06-18 Pedro Alves <palves@redhat.com>
2582
2583 * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
2584 after creating it, instead of writing to inferior_ptid. Don't
2585 write to inferior_ptid.
2586
2587 2020-06-18 Pedro Alves <palves@redhat.com>
2588
2589 * fork-child.c (postfork_hook): Don't write to inferior_ptid.
2590
2591 2020-06-18 Pedro Alves <palves@redhat.com>
2592
2593 * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
2594 it, instead of writing to inferior_ptid.
2595
2596 2020-06-18 Pedro Alves <palves@redhat.com>
2597
2598 * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
2599 to inferior_ptid.
2600
2601 2020-06-18 Pedro Alves <palves@redhat.com>
2602
2603 * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
2604 instead of writing to inferior_ptid directly.
2605
2606 2020-06-18 Pedro Alves <palves@redhat.com>
2607
2608 * corelow.c (core_target::close): Use switch_to_no_thread instead
2609 of writing to inferior_ptid directly.
2610 (add_to_thread_list, core_target_open): Use switch_to_thread
2611 instead of writing to inferior_ptid directly.
2612
2613 2020-06-18 Pedro Alves <palves@redhat.com>
2614
2615 * darwin-nat.c (darwin_nat_target::decode_message): Don't write to
2616 inferior_ptid.
2617 (darwin_nat_target::stop_inferior, darwin_nat_target::kill): Avoid
2618 inferior_ptid.
2619 (darwin_attach_pid): Use switch_to_no_thread instead of writing to
2620 inferior_ptid directly.
2621 (darwin_nat_target::init_thread_list): Switch to thread, instead
2622 of writing to inferior_ptid.
2623 (darwin_nat_target::attach): Don't write to inferior_ptid.
2624 (darwin_nat_target::get_ada_task_ptid): Avoid inferior_ptid.
2625
2626 2020-06-18 Pedro Alves <palves@redhat.com>
2627
2628 * gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
2629 thread.
2630 (gnu_nat_target::attach): Don't write to inferior_ptid directly.
2631 Instead use switch_to_thread.
2632 (gnu_nat_target::detach): Use switch_to_no_thread
2633 instead of writing to inferior_ptid directly. Used passed-in
2634 inferior instead of looking up the inferior by pid.
2635
2636 2020-06-18 Pedro Alves <palves@redhat.com>
2637
2638 * go32-nat.c (go32_nat_target::create_inferior): Don't write to
2639 inferior_ptid.
2640
2641 2020-06-18 Pedro Alves <palves@redhat.com>
2642
2643 * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
2644 inferior_ptid.
2645 (nto_procfs_target::attach): Avoid inferior_ptid. Switch to
2646 thread.
2647 (nto_procfs_target::detach): Avoid referencing
2648 inferior_ptid. Use switch_to_no_thread instead of writing to
2649 inferior_ptid directly.
2650 (nto_procfs_target::mourn_inferior): Use switch_to_no_thread
2651 instead of writing to inferior_ptid directly.
2652 (nto_procfs_target::create_inferior): Avoid inferior_ptid. Switch
2653 to thread.
2654
2655 2020-06-18 Pedro Alves <palves@redhat.com>
2656
2657 * remote-sim.c (gdbsim_target::create_inferior): Switch to thread
2658 after creating it, instead of writing to inferior_ptid.
2659 (gdbsim_target_open): Use switch_to_no_thread instead of writing
2660 to inferior_ptid directly.
2661 (gdbsim_target::wait): Don't write to inferior_ptid.
2662
2663 2020-06-18 Pedro Alves <palves@redhat.com>
2664
2665 * remote.c (remote_target::remote_notice_new_inferior): Use
2666 switch_to_thread instead of writing to inferior_ptid directly.
2667 (remote_target::add_current_inferior_and_thread): Use
2668 switch_to_no_thread instead of writing to inferior_ptid directly.
2669 (extended_remote_target::attach): Use switch_to_inferior_no_thread
2670 and switch_to_thread instead of using set_current_inferior or
2671 writing to inferior_ptid directly.
2672
2673 2020-06-18 Pedro Alves <palves@redhat.com>
2674
2675 * tracectf.c (ctf_target_open): Switch to added thread instead of
2676 writing to inferior_ptid directly.
2677 (ctf_target::close): Use switch_to_no_thread instead of writing to
2678 inferior_ptid directly.
2679
2680 2020-06-18 Pedro Alves <palves@redhat.com>
2681
2682 * tracefile-tfile.c (tfile_target_open): Don't write to
2683 inferior_ptid directly, instead switch to added thread.
2684 (tfile_target::close): Use switch_to_no_thread instead of writing
2685 to inferior_ptid directly.
2686
2687 2020-06-18 Pedro Alves <palves@redhat.com>
2688
2689 * procfs.c (procfs_target::attach): Don't write to inferior_ptid.
2690 (procfs_target::detach): Use switch_to_no_thread
2691 instead of writing to inferior_ptid directly.
2692 (do_attach): Change return type to void. Switch to the added
2693 thread.
2694 (procfs_target::create_inferior): Switch to the added thread.
2695 (procfs_do_thread_registers): Don't write to inferior_ptid.
2696
2697 2020-06-18 Pedro Alves <palves@redhat.com>
2698
2699 * infrun.c (generic_mourn_inferior): Use switch_to_thread instead
2700 of writing to inferior_ptid.
2701 (scoped_restore_exited_inferior): Delete.
2702 (handle_vfork_child_exec_or_exit): Simplify using
2703 scoped_restore_current_pspace_and_thread. Use switch_to_thread
2704 instead of writing to inferior_ptid.
2705 (THREAD_STOPPED_BY): Delete.
2706 (thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
2707 (thread_stopped_by_hw_breakpoint): Delete.
2708 (save_waitstatus): Use
2709 scoped_restore_current_thread+switch_to_thread, and call
2710 target_stopped_by_watchpoint instead of
2711 thread_stopped_by_watchpoint, target_stopped_by_sw_breakpoint
2712 instead of thread_stopped_by_sw_breakpoint, and
2713 target_stopped_by_hw_breakpoint instead of
2714 thread_stopped_by_hw_breakpoint.
2715 (handle_inferior_event)
2716 <TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Don't write to
2717 inferior_ptid directly, nor
2718 set_current_inferior/set_current_program_space. Use
2719 switch_to_thread / switch_to_inferior_no_thread instead.
2720
2721 2020-06-18 Pedro Alves <palves@redhat.com>
2722
2723 * target.c (generic_mourn_inferior): Use switch_to_no_thread
2724 instead of writing to inferior_ptid.
2725
2726 2020-06-18 Pedro Alves <palves@redhat.com>
2727
2728 * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the
2729 added thread.
2730 (inf_ptrace_target::attach): Don't write to inferior_ptid. Switch
2731 to the added thread.
2732 (inf_ptrace_target::detach_success): Use switch_to_no_thread
2733 instead of writing to inferior_ptid.
2734
2735 2020-06-18 Pedro Alves <palves@redhat.com>
2736
2737 * gdbarch-selftests.c: Include "progspace-and-thread.h".
2738 (register_to_value_test): Mock a program_space too. Heap-allocate
2739 the address space. Don't write to inferior_ptid. Use
2740 switch_to_thread instead.
2741
2742 2020-06-18 Pedro Alves <palves@redhat.com>
2743
2744 * linux-tdep.c (find_signalled_thread(thread_info *,void *)):
2745 Delete.
2746 (find_signalled_thread()): New, factored out from
2747 linux_make_corefile_notes and adjusted to handle exited threads.
2748 (linux_make_corefile_notes): Adjust to use the new
2749 find_signalled_thread.
2750
2751 2020-06-18 Pedro Alves <palves@redhat.com>
2752
2753 * linux-tdep.c (btrace_fetch): Save/restore current thread instead
2754 of saving/restoring inferior_ptid.
2755
2756 2020-06-17 Tom Tromey <tom@tromey.com>
2757
2758 * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
2759 (tui_scroll_left, tui_scroll_right, struct tui_win_info): Don't
2760 declare.
2761 * tui/tui-data.h (MIN_CMD_WIN_HEIGHT): Remove.
2762
2763 2020-06-15 Simon Marchi <simon.marchi@efficios.com>
2764
2765 * dwarf2/read.c (dwarf2_initialize_objfile): Check for presence
2766 of partial symtabs.
2767
2768 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2769
2770 * regformats/reg-arm.dat: Remove.
2771 * regformats/reg-bfin.dat: Remove.
2772 * regformats/reg-cris.dat: Remove.
2773 * regformats/reg-crisv32.dat: Remove.
2774 * regformats/reg-m32r.dat: Remove.
2775 * regformats/reg-tilegx.dat: Remove.
2776 * regformats/reg-tilegx32.dat: Remove.
2777
2778 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2779
2780 * features/Makefile (WHICH): Remove arm files.
2781 * regformats/arm/arm-with-iwmmxt.dat: Remove.
2782 * regformats/arm/arm-with-neon.dat: Remove.
2783 * regformats/arm/arm-with-vfpv2.dat: Remove.
2784 * regformats/arm/arm-with-vfpv3.dat: Remove.
2785
2786 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2787
2788 * features/Makefile (XMLTOC): Remove rx.xml.
2789
2790 2020-06-17 Pedro Alves <palves@redhat.com>
2791
2792 * gdbthread.h (thread_control_state) <trap_expected> Update
2793 comments.
2794
2795 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2796
2797 * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
2798 ada_language::lookup_symbol_nonlocal.
2799 (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
2800 (ada_language::lookup_symbol_nonlocal): New member function,
2801 implementation from ada_lookup_symbol_nonlocal.
2802 * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
2803 initializer.
2804 (cplus_language_data): Delete la_lookup_symbol_nonlocal
2805 initializer.
2806 (cplus_language::lookup_symbol_nonlocal): New member function.
2807 (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
2808 (minimal_language_data) Likewise.
2809 * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
2810 * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
2811 initializer.
2812 (d_language::lookup_symbol_nonlocal): New member function.
2813 * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
2814 initializer.
2815 (f_language::lookup_symbol_nonlocal): New member function.
2816 * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
2817 initializer.
2818 * language.c (unknown_language_data): Likewise.
2819 (auto_language_data): Likewise.
2820 * language.h (language_data): Delete la_lookup_symbol_nonlocal
2821 field.
2822 (language_defn::lookup_symbol_nonlocal): New member function.
2823 * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
2824 initializer.
2825 * objc-lang.c (objc_language_data): Likewise.
2826 * opencl-lang.c (opencl_language_data): Likewise.
2827 * p-lang.c (pascal_language_data): Likewise.
2828 * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
2829 rust_language::lookup_symbol_nonlocal.
2830 (rust_language_data): Delete la_lookup_symbol_nonlocal
2831 initializer.
2832 (rust_language::lookup_symbol_nonlocal): New member function,
2833 implementation from rust_lookup_symbol_nonlocal.
2834 * symtab.c (lookup_symbol_aux): Update call to
2835 lookup_symbol_nonlocal.
2836 (basic_lookup_symbol_nonlocal): Rename to...
2837 (language_defn::lookup_symbol_nonlocal): ...this, and update
2838 header comment. Remove language_defn parameter, and replace with
2839 uses of `this'.
2840 * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
2841
2842 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2843
2844 * ada-lang.c (ada_language_data): Delete la_value_print_inner
2845 initializer.
2846 (ada_language::value_print_inner): New member function.
2847 * c-lang.c (c_language_data): Delete la_value_print_inner
2848 initializer.
2849 (cplus_language_data): Likewise.
2850 (asm_language_data): Likewise.
2851 (minimal_language_data): Likewise.
2852 * d-lang.c (d_language_data): Likewise.
2853 (d_language::value_print_inner): New member function.
2854 * f-lang.c (f_language_data): Delete la_value_print_inner
2855 initializer.
2856 (f_language::value_print_inner): New member function.
2857 * f-lang.h (f_value_print_innner): Rename to...
2858 (f_value_print_inner): ...this (note spelling of 'inner').
2859 * f-valprint.c (f_value_print_innner): Rename to...
2860 (f_value_print_inner): ...this (note spelling of 'inner').
2861 * go-lang.c (go_language_data): Delete la_value_print_inner
2862 initializer.
2863 (go_language::value_print_inner): New member function.
2864 * language.c (language_defn::value_print_inner): Define new member
2865 function.
2866 (unk_lang_value_print_inner): Delete.
2867 (unknown_language_data): Delete la_value_print_inner initializer.
2868 (unknown_language::value_print_inner): New member function.
2869 (auto_language_data): Delete la_value_print_inner initializer.
2870 (auto_language::value_print_inner): New member function.
2871 * language.h (language_data): Delete la_value_print_inner field.
2872 (language_defn::value_print_inner): Delcare new member function.
2873 * m2-lang.c (m2_language_data): Delete la_value_print_inner
2874 initializer.
2875 (m2_language::value_print_inner): New member function.
2876 * objc-lang.c (objc_language_data): Delete la_value_print_inner
2877 initializer.
2878 * opencl-lang.c (opencl_language_data): Likewise.
2879 * p-lang.c (pascal_language_data): Likewise.
2880 (pascal_language::value_print_inner): New member function.
2881 * rust-lang.c (rust_language_data): Delete la_value_print_inner
2882 initializer.
2883 (rust_language::value_print_inner): New member function.
2884 * valprint.c (do_val_print): Update call to value_print_inner.
2885
2886 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2887
2888 * ada-lang.c (ada_language_data): Delete la_value_print
2889 initializer.
2890 (ada_language::value_print): New member function.
2891 * c-lang.c (c_language_data): Delete la_value_print initializer.
2892 (cplus_language_data): Likewise.
2893 (asm_language_data): Likewise.
2894 (minimal_language_data): Likewise.
2895 * d-lang.c (d_language_data): Likewise.
2896 * f-lang.c (f_language_data): Likewise.
2897 * go-lang.c (go_language_data): Likewise.
2898 * language.c (unk_lang_value_print): Delete.
2899 (language_defn::value_print): Define new member function.
2900 (unknown_language_data): Delete la_value_print initializer.
2901 (unknown_language::value_print): New member function.
2902 (auto_language_data): Delete la_value_print initializer.
2903 (auto_language::value_print): New member function.
2904 * language.h (language_data): Delete la_value_print field.
2905 (language_defn::value_print): Declare new member function.
2906 (LA_VALUE_PRINT): Update call to value_print.
2907 * m2-lang.c (m2_language_data): Delete la_value_print initializer.
2908 * objc-lang.c (objc_language_data): Likewise.
2909 * opencl-lang.c (opencl_language_data): Likewise.
2910 * p-lang.c (pascal_language_data): Likewise.
2911 (pascal_language::value_print): New member function.
2912 * rust-lang.c (rust_language_data): Delete la_value_print
2913 initializer.
2914
2915 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2916
2917 * ada-lang.c (ada_watch_location_expression): Rename to
2918 ada_language::watch_location_expression.
2919 (ada_language_data): Delete la_watch_location_expression
2920 initializer.
2921 (ada_language::watch_location_expression): New member function,
2922 implementation from ada_watch_location_expression.
2923 * breakpoint.c (watch_command_1): Update call to
2924 watch_location_expression.
2925 * c-lang.c (c_watch_location_expression): Rename to
2926 language_defn::watch_location_expression.
2927 (c_language_data): Delete la_watch_location_expression
2928 initializer.
2929 (cplus_language_data): Likewise.
2930 (asm_language_data): Likewise.
2931 (minimal_language_data): Likewise.
2932 * c-lang.h (c_watch_location_expression): Delete declaration.
2933 * d-lang.c (d_language_data): Delete la_watch_location_expression
2934 initializer.
2935 * f-lang.c (f_language_data): Likewise.
2936 * go-lang.c (go_language_data): Likewise.
2937 * language.c (language_defn::watch_location_expression): Member
2938 function implementation from c_watch_location_expression.
2939 (unknown_language_data): Delete la_watch_location_expression
2940 initializer.
2941 (auto_language_data): Likewise.
2942 * language.h (language_data): Delete la_watch_location_expression
2943 field.
2944 (language_defn::watch_location_expression): Declare new member
2945 function.
2946 * m2-lang.c (m2_language_data): Delete
2947 la_watch_location_expression initializer.
2948 * objc-lang.c (objc_language_data): Likewise.
2949 * opencl-lang.c (opencl_language_data): Likewise.
2950 * p-lang.c (pascal_language_data): Likewise.
2951 * rust-lang.c (rust_watch_location_expression): Rename to
2952 rust_language::watch_location_expression.
2953 (rust_language_data): Delete la_watch_location_expression
2954 initializer.
2955 (rust_language::watch_location_expression): New member function,
2956 implementation from rust_watch_location_expression.
2957
2958 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2959
2960 * ada-lang.c (ada_collect_symbol_completion_matches): Rename to
2961 ada_language::collect_symbol_completion_matches.
2962 (ada_language_data): Delete la_collect_symbol_completion_matches
2963 initializer.
2964 (ada_language::collect_symbol_completion_matches): New member
2965 function, implementation from
2966 ada_collect_symbol_completion_matches.
2967 * c-lang.c (c_language_data): Delete
2968 la_collect_symbol_completion_matches initializer.
2969 (cplus_language_data): Likewise.
2970 (asm_language_data): Likewise.
2971 (minimal_language_data): Likewise.
2972 * d-lang.c (d_language_data): Likewise.
2973 * f-lang.c (f_collect_symbol_completion_matches): Rename to
2974 f_language::collect_symbol_completion_matches.
2975 (f_language_data): Delete la_collect_symbol_completion_matches
2976 initializer.
2977 (f_language::collect_symbol_completion_matches) New member
2978 function, implementation from f_collect_symbol_completion_matches.
2979 * go-lang.c (go_language_data): Delete
2980 la_collect_symbol_completion_matches initializer.
2981 * language.c (unknown_language_data): Likewise.
2982 (auto_language_data): Likewise.
2983 * language.h (language_data): Delete
2984 la_collect_symbol_completion_matches field.
2985 (language_defn::collect_symbol_completion_matches): New member
2986 function.
2987 * m2-lang.c (m2_language_data): Delete
2988 la_collect_symbol_completion_matches initializer.
2989 * objc-lang.c (objc_language_data): Likewise.
2990 * opencl-lang.c (opencl_language_data): Likewise.
2991 * p-lang.c (pascal_language_data): Likewise.
2992 * rust-lang.c (rust_language_data): Likewise.
2993 * symtab.c (default_collect_symbol_completion_matches): Delete.
2994 (collect_symbol_completion_matches): Update call to
2995 collect_symbol_completion_matches.
2996 (collect_symbol_completion_matches_type): Likewise.
2997 * symtab.h (default_collect_symbol_completion_matches): Delete
2998 declaration.
2999
3000 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
3001
3002 * ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
3003 (ada_language_data): Delete la_word_break_characters initializer.
3004 (ada_language::word_break_characters): New member function.
3005 * c-lang.c (c_language_data): Delete la_word_break_characters
3006 initializer.
3007 (cplus_language_data): Likewise.
3008 (asm_language_data): Likewise.
3009 (minimal_language_data): Likewise.
3010 * completer.c: Update global comment.
3011 (advance_to_expression_complete_word_point): Update call to
3012 word_break_characters.
3013 (complete_files_symbols): Likewise.
3014 (complete_line_internal_1): Likewise.
3015 (default_completer_handle_brkchars): Likewise.
3016 (skip_quoted_chars): Likewise.
3017 * d-lang.c (d_language_data): Delete la_word_break_characters
3018 initializer.
3019 * f-lang.c (f_word_break_characters): Delete.
3020 (f_language_data): Delete la_word_break_characters initializer.
3021 (f_language::word_break_characters): New member function.
3022 * go-lang.c (go_language_data): Delete la_word_break_characters
3023 initializer.
3024 * language.c (unknown_language_data): Likewise.
3025 (auto_language_data): Likewise.
3026 * language.h (default_word_break_characters): Move declaration to
3027 earlier in the file.
3028 (language_data): Delete la_word_break_characters field.
3029 (language_defn::word_break_characters): New member function.
3030 * m2-lang.c (m2_language_data): Delete la_word_break_characters
3031 initializer.
3032 * objc-lang.c (objc_language_data): Likewise.
3033 * opencl-lang.c (opencl_language_data): Likewise.
3034 * p-lang.c (pascal_language_data): Likewise.
3035 * rust-lang.c (rust_language_data): Likewise.
3036
3037 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
3038
3039 * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
3040 (ada_language_data): Delete la_get_symbol_name_matcher
3041 initializer.
3042 (language_defn::get_symbol_name_matcher_inner): New member
3043 function.
3044 * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
3045 initializer.
3046 (cplus_language_data): Likewise.
3047 (cplus_language::get_symbol_name_matcher_inner): New member
3048 function.
3049 (asm_language_data): Delete la_get_symbol_name_matcher initializer.
3050 (minimal_language_data): Likewise.
3051 * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
3052 * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
3053 initializer.
3054 * dictionary.c (iter_match_first_hashed): Update call to
3055 get_symbol_name_matcher.
3056 (iter_match_next_hashed): Likewise.
3057 (iter_match_next_linear): Likewise.
3058 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
3059 * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
3060 initializer.
3061 (f_language::get_symbol_name_matcher_inner): New member function.
3062 * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
3063 initializer.
3064 * language.c (default_symbol_name_matcher): Update header comment,
3065 make static.
3066 (language_defn::get_symbol_name_matcher): New definition.
3067 (language_defn::get_symbol_name_matcher_inner): Likewise.
3068 (get_symbol_name_matcher): Delete.
3069 (unknown_language_data): Delete la_get_symbol_name_matcher
3070 initializer.
3071 (auto_language_data): Likewise.
3072 * language.h (language_data): Delete la_get_symbol_name_matcher
3073 field.
3074 (language_defn::get_symbol_name_matcher): New member function.
3075 (language_defn::get_symbol_name_matcher_inner): Likewise.
3076 (default_symbol_name_matcher): Delete declaration.
3077 * linespec.c (find_methods): Update call to
3078 get_symbol_name_matcher.
3079 * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
3080 initializer.
3081 * minsyms.c (lookup_minimal_symbol): Update call to
3082 get_symbol_name_matcher.
3083 (iterate_over_minimal_symbols): Likewise.
3084 * objc-lang.c (objc_language_data): Delete
3085 la_get_symbol_name_matcher initializer.
3086 * opencl-lang.c (opencl_language_data): Likewise.
3087 * p-lang.c (pascal_language_data): Likewise.
3088 * psymtab.c (psymbol_name_matches): Update call to
3089 get_symbol_name_matcher.
3090 * rust-lang.c (rust_language_data): Delete
3091 la_get_symbol_name_matcher initializer.
3092 * symtab.c (symbol_matches_search_name): Update call to
3093 get_symbol_name_matcher.
3094 (compare_symbol_name): Likewise.
3095
3096 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
3097
3098 * ada-lang.c (ada_language_data): Delete la_compute_program
3099 initializer.
3100 * c-lang.c (c_language_data): Likewise.
3101 (c_language::compute_program): New member function.
3102 (cplus_language_data): Delete la_compute_program initializer.
3103 (cplus_language::compute_program): New member function.
3104 (asm_language_data): Delete la_compute_program initializer.
3105 (minimal_language_data): Likewise.
3106 * c-lang.h (c_compute_program): Update comment.
3107 (cplus_compute_program): Likewise.
3108 * compile/compile-c-support.c (c_compute_program): Likewise.
3109 (cplus_compute_program): Likewise.
3110 * compile/compile.c (compile_to_object): Update call to
3111 la_compute_program.
3112 * d-lang.c (d_language_data): Delete la_compute_program
3113 initializer.
3114 * f-lang.c (f_language_data): Likewise.
3115 * go-lang.c (go_language_data): Likewise.
3116 * language.c (unknown_language_data): Likewise.
3117 (auto_language_data): Likewise.
3118 * language.h (language_data): Delete la_compute_program field.
3119 (language_defn::compute_program): New member function.
3120 * m2-lang.c (m2_language_data): Delete la_compute_program
3121 initializer.
3122 * objc-lang.c (objc_language_data): Likewise.
3123 * opencl-lang.c (opencl_language_data): Likewise.
3124 * p-lang.c (pascal_language_data): Likewise.
3125 * rust-lang.c (rust_language_data): Likewise.
3126
3127 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
3128
3129 * ada-lang.c (ada_language_data) Delete
3130 la_class_name_from_physname initializer.
3131 * c-lang.c (c_language_data): Likewise.
3132 (cplus_language_data): Likewise.
3133 (cplus_language::class_name_from_physname): New member function.
3134 (asm_language_data): Delete la_class_name_from_physname
3135 initializer.
3136 (minimal_language_data): Likewise.
3137 * d-lang.c (d_language_data): Likewise.
3138 * dwarf2/read.c (guess_partial_die_structure_name): Update to call
3139 method on language_defn class.
3140 (guess_full_die_structure_name): Likewise.
3141 * f-lang.c (f_language_data): Delete la_class_name_from_physname
3142 initializer.
3143 * go-lang.c (go_language_data): Likewise.
3144 * language.c (language_class_name_from_physname): Delete.
3145 (unk_lang_class_name): Delete.
3146 (unknown_language_data): Delete la_class_name_from_physname
3147 initializer.
3148 (auto_language_data): Likewise.
3149 * language.h (language_data): Delete la_class_name_from_physname
3150 field.
3151 (language_defn::class_name_from_physname): New function.
3152 (language_class_name_from_physname): Delete declaration.
3153 * m2-lang.c (m2_language_data): Delete la_class_name_from_physname
3154 initializer.
3155 * objc-lang.c (objc_language_data): Likewise.
3156 * opencl-lang.c (opencl_language_data): Likewise.
3157 * p-lang.c (pascal_language_data): Likewise.
3158 * rust-lang.c (rust_language_data): Likewise.
3159
3160 2020-06-16 Tom Tromey <tom@tromey.com>
3161
3162 * tui/tui-data.h (STATUS_NAME): New macro.
3163 * tui/tui-layout.c (tui_remove_some_windows)
3164 (initialize_known_windows, tui_register_window)
3165 (tui_layout_split::remove_windows, initialize_layouts)
3166 (tui_new_layout_command): Don't use hard-coded window names.
3167
3168 2020-06-16 Tom Tromey <tom@tromey.com>
3169
3170 PR tui/25348:
3171 * tui/tui.c (tui_ensure_readline_initialized): Rename from
3172 tui_initialize_readline. Only run once. Call rl_initialize.
3173 * tui/tui.h (tui_ensure_readline_initialized): Rename from
3174 tui_initialize_readline.
3175 * tui/tui-io.c (tui_setup_io): Call
3176 tui_ensure_readline_initialized.
3177 * tui/tui-interp.c (tui_interp::init): Update.
3178
3179 2020-06-16 Tom Tromey <tom@tromey.com>
3180
3181 * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
3182 Also preserve the status window.
3183
3184 2020-06-16 Tom Tromey <tom@tromey.com>
3185
3186 * python/py-tui.c (tui_py_window::~tui_py_window): Handle case
3187 where m_window==nullptr.
3188
3189 2020-06-15 Tom Tromey <tromey@adacore.com>
3190
3191 * windows-nat.c (windows_nat::handle_output_debug_string):
3192 Update.
3193 (windows_nat::handle_ms_vc_exception): Update.
3194 * target.h (target_read_string): Change API.
3195 * target.c (target_read_string): Change API.
3196 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3197 Update.
3198 * solib-frv.c (frv_current_sos): Update.
3199 * solib-dsbt.c (dsbt_current_sos): Update.
3200 * solib-darwin.c (darwin_current_sos): Update.
3201 * linux-thread-db.c (inferior_has_bug): Update.
3202 * expprint.c (print_subexp_standard): Update.
3203 * ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
3204 (ada_exception_message_1): Update.
3205
3206 2020-06-15 Tom Tromey <tromey@adacore.com>
3207
3208 * linux-tdep.c (dump_mapping_p): Use target_read_memory.
3209
3210 2020-06-15 Tom Tromey <tromey@adacore.com>
3211
3212 * valprint.c (read_string): Update comment.
3213 * target.c (MIN): Remove.
3214 (target_read_string): Rewrite.
3215
3216 2020-06-15 Tom Tromey <tromey@adacore.com>
3217
3218 * corefile.c (read_memory_string): Remove.
3219 * ada-valprint.c (ada_value_print_ptr): Update.
3220 * ada-lang.h (ada_tag_name): Change return type.
3221 * ada-lang.c (type_from_tag): Update.
3222 (ada_tag_name_from_tsd): Change return type. Use
3223 target_read_string.
3224 (ada_tag_name): Likewise.
3225 * gdbcore.h (read_memory_string): Don't declare.
3226
3227 2020-06-14 Hannes Domani <ssbssa@yahoo.de>
3228
3229 * symtab.c (rbreak_command): Ignore Windows drive colon.
3230
3231 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
3232
3233 * NEWS: Mention removed GDBserver host support.
3234
3235 2020-06-12 Nelson Chu <nelson.chu@sifive.com>
3236
3237 * features/riscv/rebuild-csr-xml.sh: Updated.
3238
3239 2020-06-11 Tom Tromey <tom@tromey.com>
3240
3241 PR gdb/18318:
3242 * c-exp.y (lex_one_token): Handle 'p' like 'e'.
3243
3244 2020-06-09 Jonny Grant <jg@jguk.org>
3245 2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
3246
3247 * main.c (captured_main_1): Don't print new line after help.
3248 (print_gdb_help): add mailing list and IRC channel information
3249 to --help. Add new lines between items in the footer. Remove
3250 quotes around bug url.
3251
3252 2020-06-11 Keith Seitz <keiths@redhat.com>
3253
3254 PR gdb/21356
3255 * gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
3256 Resolve typedefs for type length calculations.
3257
3258 2020-06-10 Tom de Vries <tdevries@suse.de>
3259
3260 PR ada/24713
3261 * dwarf2/index-write.c (struct mapped_symtab): Add m_string_obstack.
3262 (write_psymbols): Enable .gdb_index for ada.
3263 * dwarf2/read.c: Remove comment stating .gdb_index is unsupported for
3264 ada.
3265
3266 2020-06-10 Tom de Vries <tdevries@suse.de>
3267
3268 * dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
3269 (dw2_symtab_iter_init): ... here. Add variant with "offset_type
3270 namei" instead of "const char *name" argument.
3271 (dw2_map_matching_symbols): Use "offset_type namei" variant of
3272 dw2_symtab_iter_init.
3273
3274 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3275
3276 * gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
3277 to use type::field and field::type instead.
3278
3279 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3280
3281 * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites
3282 to use field::type instead.
3283
3284 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3285
3286 * gdbtypes.h (struct field) <type, set_type>: New methods.
3287 Rename `type` field to...
3288 <m_type>: ... this. Change references throughout to use type or
3289 set_type methods.
3290 (FIELD_TYPE): Use field::type. Change call sites that modify
3291 the field's type to use field::set_type instead.
3292
3293 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3294
3295 * gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
3296 to use type::index_type instead.
3297
3298 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3299
3300 * gdbtypes.h (struct type) <index_type, set_index_type>: New
3301 methods.
3302 (TYPE_INDEX_TYPE): Use type::index_type.
3303 * gdbtypes.c (create_array_type_with_stride): Likewise.
3304
3305 2020-06-07 Tom Tromey <tom@tromey.com>
3306
3307 * valprint.c (generic_val_print_float): Remove "embedded_offset"
3308 parameter.
3309 (generic_value_print): Update.
3310
3311 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
3312
3313 Revert commit 982a38f60b0.
3314 * python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
3315
3316 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
3317
3318 * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
3319 avoid use after free.
3320
3321 2020-06-05 Tom de Vries <tdevries@suse.de>
3322
3323 * NEWS: Fix typos.
3324
3325 2020-06-04 Simon Marchi <simon.marchi@efficios.com>
3326
3327 * dwarf2/read.c (dwarf2_read_gdb_index): Save partial_symtabs in
3328 the per_bfd object.
3329 (dwarf2_read_debug_names): Likewise.
3330 (dwarf2_initialize_objfile): Use partial_symtabs from per_bfd
3331 object when re-using a per_bfd object with an index.
3332
3333 2020-06-03 Tom de Vries <tdevries@suse.de>
3334
3335 PR symtab/26046
3336 * dwarf2/read.c (scan_partial_symbols): Recurse into DW_TAG_subprogram
3337 children for C++.
3338 (load_partial_dies): Don't skip DW_TAG_inlined_subroutine child of
3339 DW_TAG_subprogram.
3340
3341 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3342
3343 * ada-lang.c (ada_language_data): Delete skip_trampoline
3344 initializer.
3345 * c-lang.c (c_language_data): Likewise.
3346 (cplus_language_data): Likewise.
3347 (cplus_language::skip_trampoline): New member function.
3348 (asm_language_data): Delete skip_trampoline initializer.
3349 (minimal_language_data): Likewise.
3350 * d-lang.c (d_language_data): Likewise.
3351 * f-lang.c (f_language_data): Likewise.
3352 * go-lang.c (go_language_data): Likewise.
3353 * language.c (unk_lang_trampoline): Delete function.
3354 (skip_language_trampoline): Update.
3355 (unknown_language_data): Delete skip_trampoline initializer.
3356 (auto_language_data): Likewise.
3357 * language.h (language_data): Delete skip_trampoline field.
3358 (language_defn::skip_trampoline): New function.
3359 * m2-lang.c (m2_language_data): Delete skip_trampoline
3360 initializer.
3361 * objc-lang.c (objc_skip_trampoline): Delete function, move
3362 implementation to objc_language::skip_trampoline.
3363 (objc_language_data): Delete skip_trampoline initializer.
3364 (objc_language::skip_trampoline): New member function with
3365 implementation from objc_skip_trampoline.
3366 * opencl-lang.c (opencl_language_data): Delete skip_trampoline
3367 initializer.
3368 * p-lang.c (pascal_language_data): Likewise.
3369 * rust-lang.c (rust_language_data): Likewise.
3370
3371 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3372
3373 * ada-lang.c (ada_language_data): Delete la_demangle initializer.
3374 (ada_language::demangle): New member function.
3375 * c-lang.c (c_language_data): Delete la_demangle initializer.
3376 (cplus_language_data): Delete la_demangle initializer.
3377 (cplus_language::demangle): New member function.
3378 (asm_language_data): Delete la_demangle initializer.
3379 (minimal_language_data): Delete la_demangle initializer.
3380 * d-lang.c (d_language_data): Delete la_demangle initializer.
3381 (d_language::demangle): New member function.
3382 * f-lang.c (f_language_data): Delete la_demangle initializer.
3383 (f_language::demangle): New member function.
3384 * go-lang.c (go_language_data): Delete la_demangle initializer.
3385 (go_language::demangle): New member function.
3386 * language.c (language_demangle): Update.
3387 (unk_lang_demangle): Delete.
3388 (unknown_language_data): Delete la_demangle initializer.
3389 (unknown_language::demangle): New member function.
3390 (auto_language_data): Delete la_demangle initializer.
3391 (auto_language::demangle): New member function.
3392 * language.h (language_data): Delete la_demangle field.
3393 (language_defn::demangle): New function.
3394 * m2-lang.c (m2_language_data): Delete la_demangle initializer.
3395 * objc-lang.c (objc_language_data): Delete la_demangle
3396 initializer.
3397 (objc_language::demangle): New member function.
3398 * opencl-lang.c (opencl_language_data): Delete la_demangle
3399 initializer.
3400 * p-lang.c (pascal_language_data): Likewise.
3401 * rust-lang.c (rust_language_data): Likewise.
3402 (rust_language::demangle): New member function.
3403
3404 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3405
3406 * ada-lang.c (ada_language_data): Delete la_print_type
3407 initializer.
3408 (ada_language::print_type): New member function.
3409 * c-lang.c (c_language_data): Delete la_print_type initializer.
3410 (c_language::print_type): New member function.
3411 (cplus_language_data): Delete la_print_type initializer.
3412 (cplus_language::print_type): New member function.
3413 (asm_language_data): Delete la_print_type initializer.
3414 (asm_language::print_type): New member function.
3415 (minimal_language_data): Delete la_print_type initializer.
3416 (minimal_language::print_type): New member function.
3417 * d-lang.c (d_language_data): Delete la_print_type initializer.
3418 (d_language::print_type): New member function.
3419 * f-lang.c (f_language_data): Delete la_print_type initializer.
3420 (f_language::print_type): New member function.
3421 * go-lang.c (go_language_data): Delete la_print_type initializer.
3422 (go_language::print_type): New member function.
3423 * language.c (unk_lang_print_type): Delete.
3424 (unknown_language_data): Delete la_print_type initializer.
3425 (unknown_language::print_type): New member function.
3426 (auto_language_data): Delete la_print_type initializer.
3427 (auto_language::print_type): New member function.
3428 * language.h (language_data): Delete la_print_type field.
3429 (language_defn::print_type): New function.
3430 (LA_PRINT_TYPE): Update.
3431 * m2-lang.c (m2_language_data): Delete la_print_type initializer.
3432 (m2_language::print_type): New member function.
3433 * objc-lang.c (objc_language_data): Delete la_print_type
3434 initializer.
3435 (objc_language::print_type): New member function.
3436 * opencl-lang.c (opencl_print_type): Delete, implementation moved
3437 to opencl_language::print_type.
3438 (opencl_language_data): Delete la_print_type initializer.
3439 (opencl_language::print_type): New member function, implementation
3440 from opencl_print_type.
3441 * p-lang.c (pascal_language_data): Delete la_print_type
3442 initializer.
3443 (pascal_language::print_type): New member function.
3444 * rust-lang.c (rust_print_type): Delete, implementation moved to
3445 rust_language::print_type.
3446 (rust_language_data): Delete la_print_type initializer.
3447 (rust_language::print_type): New member function, implementation
3448 from rust_print_type.
3449
3450 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3451
3452 * ada-lang.c (ada_sniff_from_mangled_name): Delete function,
3453 implementation moves to...
3454 (ada_language::sniff_from_mangled_name): ...here. Update return
3455 type.
3456 (ada_language_data): Delete la_sniff_from_mangled_name
3457 initializer.
3458 * c-lang.c (c_language_data): Likewise.
3459 (cplus_language_data): Likewise.
3460 (cplus_language::sniff_from_mangled_name): New member function,
3461 implementation taken from gdb_sniff_from_mangled_name.
3462 (asm_language_data): Delete la_sniff_from_mangled_name
3463 initializer.
3464 (minimal_language_data): Likewise.
3465 * cp-support.c (gdb_sniff_from_mangled_name): Delete,
3466 implementation moves to cplus_language::sniff_from_mangled_name.
3467 * cp-support.h (gdb_sniff_from_mangled_name): Delete declaration.
3468 * d-lang.c (d_sniff_from_mangled_name): Delete, implementation
3469 moves to...
3470 (d_language::sniff_from_mangled_name): ...here.
3471 (d_language_data): Delete la_sniff_from_mangled_name initializer.
3472 * f-lang.c (f_language_data): Likewise.
3473 * go-lang.c (go_sniff_from_mangled_name): Delete, implementation
3474 moves to...
3475 (go_language::sniff_from_mangled_name): ...here.
3476 (go_language_data): Delete la_sniff_from_mangled_name initializer.
3477 * language.c (language_sniff_from_mangled_name): Delete.
3478 (unknown_language_data): Delete la_sniff_from_mangled_name
3479 initializer.
3480 (auto_language_data): Likewise.
3481 * language.h (language_data): Delete la_sniff_from_mangled_name
3482 field.
3483 (language_defn::sniff_from_mangled_name): New function.
3484 (language_sniff_from_mangled_name): Delete declaration.
3485 * m2-lang.c (m2_language_data): Delete la_sniff_from_mangled_name
3486 field.
3487 * objc-lang.c (objc_sniff_from_mangled_name): Delete,
3488 implementation moves to...
3489 (objc_language::sniff_from_mangled_name): ...here.
3490 (objc_language_data): Delete la_sniff_from_mangled_name initializer.
3491 * opencl-lang.c (opencl_language_data): Likewise.
3492 * p-lang.c (pascal_language_data): Likewise.
3493 * rust-lang.c (rust_sniff_from_mangled_name): Delete,
3494 implementation moves to...
3495 (rust_language::sniff_from_mangled_name): ...here.
3496 (rust_language_data): Delete la_sniff_from_mangled_name
3497 initializer.
3498 * symtab.c (symbol_find_demangled_name): Call
3499 sniff_from_mangled_name member function.
3500
3501 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3502
3503 * ada-lang.c (ada_language_data): Delete la_search_name_hash
3504 initializer.
3505 * c-lang.c (c_language_data): Likewise.
3506 (cplus_language_data): Likewise.
3507 (cplus_language::search_name_hash): New member function.
3508 (asm_language_data): Delete la_search_name_hash initializer.
3509 (minimal_language_data): Likewise.
3510 * d-lang.c (d_language_data): Likewise.
3511 * dictionary.c (default_search_name_hash): Rename to...
3512 (language_defn::search_name_hash): ...this.
3513 * f-lang.c (f_language_data): Likewise.
3514 (f_language::search_name_hash): New member function.
3515 * go-lang.c (go_language_data): Delete la_search_name_hash
3516 initializer.
3517 * language.c (unknown_language_data): Likewise.
3518 (auto_language_data): Likewise.
3519 * language.h (struct language_data): Delete la_search_name_hash
3520 field.
3521 (language_defn::search_name_hash): Declare new member function.
3522 (default_search_name_hash): Delete declaration.
3523 * m2-lang.c (m2_language_data): Delete la_search_name_hash
3524 initializer.
3525 * objc-lang.c (objc_language_data): Likewise.
3526 * opencl-lang.c (opencl_language_data): Likewise.
3527 * p-lang.c (pascal_language_data): Likewise.
3528 * rust-lang.c (rust_language_data): Likewise.
3529 * symtab.c (search_name_hash): Update call.
3530
3531 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3532
3533 * ada-lang.c (ada_language_data): Delete la_get_compile_instance
3534 initializer.
3535 * c-lang.c (class compile_instance): Declare.
3536 (c_language_data): Delete la_get_compile_instance initializer.
3537 (c_language::get_compile_instance): New member function.
3538 (cplus_language_data): Delete la_get_compile_instance initializer.
3539 (cplus_language::get_compile_instance): New member function.
3540 (asm_language_data): Delete la_get_compile_instance initializer.
3541 (minimal_language_data): Likewise.
3542 * c-lang.h (c_get_compile_context): Update comment.
3543 (cplus_get_compile_context): Update comment.
3544 * compile/compile.c (compile_to_object): Update calls, don't rely
3545 on function pointer being NULL.
3546 * d-lang.c (d_language_data): Delete la_get_compile_instance
3547 initializer.
3548 * f-lang.c (f_language_data): Likewise.
3549 * go-lang.c (go_language_data): Likewise.
3550 * language.c (unknown_language_data): Likewise.
3551 (auto_language_data): Likewise.
3552 * language.h (language_data): Delete la_get_compile_instance field.
3553 (language_defn::get_compile_instance): New member function.
3554 * m2-lang.c (m2_language_data): Delete la_get_compile_instance
3555 initializer.
3556 * objc-lang.c (objc_language_data): Likewise.
3557 * opencl-lang.c (opencl_language_data): Likewise.
3558 * p-lang.c (pascal_language_data): Likewise.
3559 * rust-lang.c (rust_language_data): Likewise.
3560
3561 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3562
3563 * ada-lang.c (ada_add_all_symbols): Update comment.
3564 (ada_iterate_over_symbols): Delete, move implementation to...
3565 (ada_language::iterate_over_symbols): ...here, a new member
3566 function, rewrite to use range based for loop.
3567 (ada_language_data): Delete la_iterate_over_symbols initializer.
3568 * c-lang.c (c_language_data): Likewise.
3569 (cplus_language_data): Likewise.
3570 (asm_language_data): Likewise.
3571 (minimal_language_data): Likewise.
3572 * d-lang.c (d_language_data): Likewise.
3573 * f-lang.c (f_language_data): Likewise.
3574 * go-lang.c (go_language_data): Likewise.
3575 * language.c (unknown_language_data): Likewise.
3576 (auto_language_data): Likewise.
3577 * language.h (language_data): Delete la_iterate_over_symbols field.
3578 (language_defn::iterate_over_symbols): New member function.
3579 (LA_ITERATE_OVER_SYMBOLS): Update.
3580 * linespec.c (iterate_over_all_matching_symtabs): Update.
3581 * m2-lang.c (m2_language_data): Delete la_iterate_over_symbols
3582 initializer.
3583 * objc-lang.c (objc_language_data): Likewise.
3584 * opencl-lang.c (opencl_language_data): Likewise.
3585 * p-lang.c (pascal_language_data): Likewise.
3586 * rust-lang.c (rust_language_data): Likewise.
3587
3588 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3589
3590 * ada-lang.c (ada_language_data): Delete
3591 la_lookup_transparent_type initializer.
3592 * c-lang.c (c_language_data): Likewise.
3593 (cplus_language_data): Likewise.
3594 (cplus_language::lookup_transparent_type): New member function.
3595 (asm_language_data): Delete la_lookup_transparent_type
3596 initializer.
3597 (minimal_language_data): Likewise.
3598 * d-lang.c (d_language_data): Likewise.
3599 * f-lang.c (f_language_data): Likewise.
3600 * go-lang.c (go_language_data): Likewise.
3601 * language.c (unknown_language_data): Likewise.
3602 (auto_language_data): Likewise.
3603 * language.h (struct language_data): Delete
3604 la_lookup_transparent_type field.
3605 (language_defn::lookup_transparent_type): New member function.
3606 * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type
3607 initializer.
3608 * objc-lang.c (objc_language_data): Likewise.
3609 * opencl-lang.c (opencl_language_data): Likewise.
3610 * p-lang.c (pascal_language_data): Likewise.
3611 * rust-lang.c (rust_language_data): Likewise.
3612 * symtab.c (symbol_matches_domain): Update call.
3613
3614 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3615
3616 * ada-lang.c (ada_language_arch_info): Delete function, move
3617 implementation to...
3618 (ada_language::language_arch_info): ...here, a new member
3619 function.
3620 (ada_language_data): Delete la_language_arch_info.
3621 * c-lang.c (c_language_data): Likewise.
3622 (c_language::language_arch_info): New member function.
3623 (cplus_language_arch_info): Delete function, move
3624 implementation to...
3625 (cplus_language::language_arch_info): ...here, a new member
3626 function.
3627 (cplus_language_data): Delete la_language_arch_info.
3628 (asm_language_data): Likewise.
3629 (asm_language::language_arch_info): New member function.
3630 (minimal_language_data): Delete la_language_arch_info.
3631 (minimal_language::language_arch_info): New member function.
3632 * d-lang.c (d_language_arch_info): Delete function, move
3633 implementation to...
3634 (d_language::language_arch_info): ...here, a new member
3635 function.
3636 (d_language_data): Delete la_language_arch_info.
3637 * f-lang.c (f_language_arch_info): Delete function, move
3638 implementation to...
3639 (f_language::language_arch_info): ...here, a new member
3640 function.
3641 (f_language_data): Delete la_language_arch_info.
3642 * go-lang.c (go_language_arch_info): Delete function, move
3643 implementation to...
3644 (go_language::language_arch_info): ...here, a new member
3645 function.
3646 (go_language_data): Delete la_language_arch_info.
3647 * language.c (unknown_language_data): Likewise.
3648 (unknown_language::language_arch_info): New member function.
3649 (auto_language_data): Delete la_language_arch_info.
3650 (auto_language::language_arch_info): New member function.
3651 (language_gdbarch_post_init): Update call to
3652 la_language_arch_info.
3653 * language.h (language_data): Delete la_language_arch_info
3654 function pointer.
3655 (language_defn::language_arch_info): New function.
3656 * m2-lang.c (m2_language_arch_info): Delete function, move
3657 implementation to...
3658 (m2_language::language_arch_info): ...here, a new member
3659 function.
3660 (m2_language_data): Delete la_language_arch_info.
3661 * objc-lang.c (objc_language_arch_info): Delete function, move
3662 implementation to...
3663 (objc_language::language_arch_info): ...here, a new member
3664 function.
3665 (objc_language_data): Delete la_language_arch_info.
3666 * opencl-lang.c (opencl_language_arch_info): Delete function, move
3667 implementation to...
3668 (opencl_language::language_arch_info): ...here, a new member
3669 function.
3670 (opencl_language_data): Delete la_language_arch_info.
3671 * p-lang.c (pascal_language_arch_info): Delete function, move
3672 implementation to...
3673 (pascal_language::language_arch_info): ...here, a new member
3674 function.
3675 (pascal_language_data): Delete la_language_arch_info.
3676 * rust-lang.c (rust_language_arch_info): Delete function, move
3677 implementation to...
3678 (rust_language::language_arch_info): ...here, a new member
3679 function.
3680 (rust_language_data): Delete la_language_arch_info.
3681
3682 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3683
3684 * ada-lang.c (ada_language_data): Delete la_pass_by_reference
3685 initializer.
3686 * c-lang.c (c_language_data): Likewise.
3687 (cplus_language_data): Likewise.
3688 (cplus_language::pass_by_reference_info): New method.
3689 (asm_language_data): Delete la_pass_by_reference initializer.
3690 (minimal_language_data): Likewise.
3691 * cp-abi.c (cp_pass_by_reference): Remove use of
3692 default_pass_by_reference.
3693 * d-lang.c (d_language_data): Likewise.
3694 * f-lang.c (f_language_data): Likewise.
3695 * gnu-v3-abi.c (gnuv3_pass_by_reference): Remove use of
3696 default_pass_by_reference.
3697 * go-lang.c (go_language_data): Likewise.
3698 * language.c (language_pass_by_reference): Update.
3699 (default_pass_by_reference): Delete.
3700 (unknown_language_data): Delete la_pass_by_reference
3701 initializer.
3702 (auto_language_data): Likewise.
3703 * language.h (struct language_data): Delete la_pass_by_reference
3704 field.
3705 (language_defn::pass_by_reference_info): New member function.
3706 (default_pass_by_reference): Delete declaration.
3707 * m2-lang.c (m2_language_data): Delete la_pass_by_reference
3708 initializer.
3709 * objc-lang.c (objc_language_data): Likewise.
3710 * opencl-lang.c (opencl_language_data): Likewise.
3711 * p-lang.c (pascal_language_data): Likewise.
3712 * rust-lang.c (rust_language_data): Likewise.
3713
3714 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3715
3716 * ada-lang.c (ada_read_var_value): Delete function, move
3717 implementation to...
3718 (ada_language::read_var_value): ...here.
3719 (ada_language_data): Delete la_read_var_value initializer.
3720 * c-lang.c (c_language_data): Likewise.
3721 (cplus_language_data): Likewise.
3722 (minimal_language_data): Likewise.
3723 * d-lang.c (d_language_data): Likewise.
3724 * f-lang.c (f_language_data): Likewise.
3725 * findvar.c (default_read_var_value): Rename to...
3726 (language_defn::read_var_value): ...this.
3727 * findvar.c (read_var_value): Update header comment, and change to
3728 call member function instead of function pointer.
3729 * go-lang.c (go_language_data): Likewise.
3730 * language.c (unknown_language_data): Delete la_read_var_value
3731 initializer.
3732 (auto_language_data): Likewise.
3733 * language.h (struct language_data): Delete la_read_var_value
3734 field.
3735 (language_defn::read_var_value): New member function.
3736 (default_read_var_value): Delete declaration.
3737 * m2-lang.c (m2_language_data): Delete la_read_var_value
3738 initializer.
3739 * objc-lang.c (objc_language_data): Likewise.
3740 * opencl-lang.c (opencl_language_data): Likewise.
3741 * p-lang.c (pascal_language_data): Likewise.
3742 * rust-lang.c (rust_language_data): Likewise.
3743 * value.h (default_read_var_value): Delete declaration.
3744
3745 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3746
3747 * ada-lang.c (ada_print_array_index): Delete function, move
3748 implementation to...
3749 (ada_language::print_array_index): ...here.
3750 (ada_language_data): Delete la_print_array_index initializer.
3751 * c-lang.c (c_language_data): Likewise.
3752 (cplus_language_data): Likewise.
3753 (minimal_language_data): Likewise.
3754 * d-lang.c (d_language_data): Likewise.
3755 * f-lang.c (f_language_data): Likewise.
3756 * go-lang.c (go_language_data): Likewise.
3757 * language.c (default_print_array_index): Delete function, move
3758 implementation to...
3759 (language_defn::print_array_index): ...here.
3760 (unknown_language_data): Delete la_print_array_index initializer.
3761 (auto_language_data): Likewise.
3762 * language.h (struct language_data): Delete la_print_array_index
3763 field.
3764 (language_defn::print_array_index): New member function.
3765 (LA_PRINT_ARRAY_INDEX): Update.
3766 (default_print_array_index): Delete declaration.
3767 * m2-lang.c (m2_language_data): Delete la_print_array_index
3768 initializer.
3769 * objc-lang.c (objc_language_data): Likewise.
3770 * opencl-lang.c (opencl_language_data): Likewise.
3771 * p-lang.c (pascal_language_data): Likewise.
3772 * rust-lang.c (rust_language_data): Likewise.
3773
3774 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3775
3776 * gdb/ada-lang.c (ada_language_defn): Convert to...
3777 (ada_language_data): ...this.
3778 (class ada_language): New class.
3779 (ada_language_defn): New static global.
3780 * gdb/c-lang.c (c_language_defn): Convert to...
3781 (c_language_data): ...this.
3782 (class c_language): New class.
3783 (c_language_defn): New static global.
3784 (cplus_language_defn): Convert to...
3785 (cplus_language_data): ...this.
3786 (class cplus_language): New class.
3787 (cplus_language_defn): New static global.
3788 (asm_language_defn): Convert to...
3789 (asm_language_data): ...this.
3790 (class asm_language): New class.
3791 (asm_language_defn): New static global.
3792 (minimal_language_defn): Convert to...
3793 (minimal_language_data): ...this.
3794 (class minimal_language): New class.
3795 (minimal_language_defn): New static global.
3796 * gdb/d-lang.c (d_language_defn): Convert to...
3797 (d_language_data): ...this.
3798 (class d_language): New class.
3799 (d_language_defn): New static global.
3800 * gdb/f-lang.c (f_language_defn): Convert to...
3801 (f_language_data): ...this.
3802 (class f_language): New class.
3803 (f_language_defn): New static global.
3804 * gdb/go-lang.c (go_language_defn): Convert to...
3805 (go_language_data): ...this.
3806 (class go_language): New class.
3807 (go_language_defn): New static global.
3808 * gdb/language.c (unknown_language_defn): Remove declaration.
3809 (current_language): Initialize to nullptr, real initialization is
3810 moved to _initialize_language.
3811 (languages): Delete global.
3812 (language_defn::languages): Define.
3813 (set_language_command): Use language_defn::languages.
3814 (set_language): Likewise.
3815 (range_error): Likewise.
3816 (language_enum): Likewise.
3817 (language_def): Likewise.
3818 (add_set_language_command): Use language_def::languages for the
3819 language list, and language_def to lookup language pointers.
3820 (skip_language_trampoline): Use language_defn::languages.
3821 (unknown_language_defn): Convert to...
3822 (unknown_language_data): ...this.
3823 (class unknown_language): New class.
3824 (unknown_language_defn): New static global.
3825 (auto_language_defn): Convert to...
3826 (auto_language_data): ...this.
3827 (class auto_language): New class.
3828 (auto_language_defn): New static global.
3829 (language_gdbarch_post_init): Use language_defn::languages.
3830 (_initialize_language): Initialize current_language.
3831 * gdb/language.h (struct language_defn): Rename to...
3832 (struct language_data): ...this.
3833 (struct language_defn): New.
3834 (auto_language_defn): Delete.
3835 (unknown_language_defn): Delete.
3836 (minimal_language_defn): Delete.
3837 (ada_language_defn): Delete.
3838 (asm_language_defn): Delete.
3839 (c_language_defn): Delete.
3840 (cplus_language_defn): Delete.
3841 (d_language_defn): Delete.
3842 (f_language_defn): Delete.
3843 (go_language_defn): Delete.
3844 (m2_language_defn): Delete.
3845 (objc_language_defn): Delete.
3846 (opencl_language_defn): Delete.
3847 (pascal_language_defn): Delete.
3848 (rust_language_defn): Delete.
3849 * gdb/m2-lang.c (m2_language_defn): Convert to...
3850 (m2_language_data): ...this.
3851 (class m2_language): New class.
3852 (m2_language_defn): New static global.
3853 * gdb/objc-lang.c (objc_language_defn): Convert to...
3854 (objc_language_data): ...this.
3855 (class objc_language): New class.
3856 (objc_language_defn): New static global.
3857 * gdb/opencl-lang.c (opencl_language_defn): Convert to...
3858 (opencl_language_data): ...this.
3859 (class opencl_language): New class.
3860 (opencl_language_defn): New static global.
3861 * gdb/p-lang.c (pascal_language_defn): Convert to...
3862 (pascal_language_data): ...this.
3863 (class pascal_language): New class.
3864 (pascal_language_defn): New static global.
3865 * gdb/rust-exp.y (rust_lex_tests): Use language_def to find
3866 language pointer, update comment format.
3867 * gdb/rust-lang.c (rust_language_defn): Convert to...
3868 (rust_language_data): ...this.
3869 (class rust_language): New class.
3870 (rust_language_defn): New static global.
3871
3872 2020-06-01 Andrew Burgess <andrew.burgess@embecosm.com>
3873
3874 * dwarf2/read.c (class lnp_state_machine) <m_last_address>: New
3875 member variable.
3876 <m_stmt_at_address>: New member variable.
3877 (lnp_state_machine::record_line): Don't record some lines, update
3878 tracking of is_stmt at the same address.
3879 (lnp_state_machine::lnp_state_machine): Initialise new member
3880 variables.
3881
3882 2020-06-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
3883
3884 * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
3885 "-include gnu-nat-mig.h".
3886 * gnu-nat-mig.h: New file.
3887 * gnu-nat.c: Include "gnu-nat-mig.h".
3888 (exc_server, msg_reply_server, notify_server,
3889 process_reply_server): Remove declarations.
3890
3891 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3892
3893 * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced,
3894 steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,
3895 inf_startup, inf_update_suspends, inf_set_pid, inf_steal_exc_ports,
3896 inf_validate_procinfo, inf_validate_task_sc, inf_restore_exc_ports,
3897 inf_set_threads_resume_sc, inf_set_threads_resume_sc_for_signal_thread,
3898 inf_resume, inf_set_step_thread, inf_detach, inf_attach, inf_signal,
3899 inf_continue, make_proc, proc_abort, _proc_free, proc_update_sc,
3900 proc_get_exception_port, proc_set_exception_port, _proc_get_exc_port,
3901 proc_steal_exc_port, proc_restore_exc_port, proc_trace): Move functions
3902 to gnu_nat_target class.
3903 * gnu-nat.c: Likewise.
3904 (inf_update_procs, S_proc_wait_reply, set_task_pause_cmd,
3905 set_task_exc_port_cmd, set_signals_cmd, set_thread_pause_cmd,
3906 set_thread_exc_port_cmd): Call inf_validate_procs through gnu_target
3907 object.
3908 (gnu_nat_target::create_inferior, gnu_nat_target::detach): Pass `this'
3909 instead of `gnu_target'.
3910
3911 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3912
3913 * i386-gnu-tdep.c: Include "gdbcore.h"
3914 (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays.
3915 (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL,
3916 I386_GNU_SIGCONTEXT_THREAD_STATE_OFFSET): New macros
3917 (i386_gnu_sigtramp_start, i386_gnu_sigtramp_p,
3918 i386_gnu_sigcontext_addr): New functions
3919 (i386gnu_init_abi): Register i386_gnu_sigtramp_p,
3920 i386_gnu_sigcontext_addr, and i386_gnu_sc_reg_offset in the gdbarch
3921 tdep.
3922
3923 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3924
3925 * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
3926 before fork_inferior call. Avoid calling it if target_is_pushed returns
3927 true.
3928
3929 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3930
3931 * gnu-nat.h (gnu_target): New variable declaration.
3932 * i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
3933 gnu_target.
3934 * gnu-nat.c (gnu_target): New variable.
3935 (inf_validate_procs): Pass gnu_target to thread_change_ptid,
3936 add_thread_silent, and add_thread calls.
3937 (gnu_nat_target::create_inferior): Pass gnu_target to
3938 add_thread_silent, thread_change_ptid call.
3939 (gnu_nat_target::detach): Pass gnu_target to detach_inferior
3940 call.
3941
3942 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3943
3944 * gnu-nat.c (gnu_xfer_auxv): Remove unused `res' variable.
3945 (gnu_nat_target::find_memory_regions): Remove unused
3946 `old_address' variable.
3947
3948 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3949
3950 * gnu-nat.c: Include "gdbarch.h".
3951
3952 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3953
3954 * reply_mig_hack.awk (Error return): Cast function through
3955 void *, to bypass compiler function call check.
3956
3957 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3958
3959 * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on
3960 $(srcdir)/reply_mig_hack.awk.
3961
3962 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3963
3964 * gnu-nat.h (gnu_debug_flag): Set type to bool.
3965
3966 2020-05-30 Jonny Grant <jg@jguk.org>
3967
3968 * configure.ac (ACX_BUGURL): change bug URL to https.
3969
3970 2020-05-30 Pedro Alves <palves@redhat.com>
3971
3972 * cp-support.c (replace_typedefs_template): New.
3973 (replace_typedefs_qualified_name): Handle
3974 DEMANGLE_COMPONENT_TEMPLATE.
3975
3976 2020-05-29 Simon Marchi <simon.marchi@efficios.com>
3977
3978 * dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
3979 dwarf2/index-cache.h, dwarf2/index-write.c,
3980 dwarf2/index-write.h, dwarf2/line-header.c,
3981 dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
3982 dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
3983 variables and fields from `dwarf2_per_objfile` to just
3984 `per_objfile` throughout.
3985
3986 2020-05-28 Simon Marchi <simon.marchi@polymtl.ca>
3987
3988 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3989 <push_dwarf_reg_entry_value>: Add comment.
3990
3991 2020-05-28 Kevin Buettner <kevinb@redhat.com>
3992 Keith Seitz <keiths@redhat.com>
3993
3994 * python/python.c (do_start_initialization): Call PyEval_SaveThread
3995 instead of PyEval_ReleaseLock.
3996 (class gdbpy_gil): Move to earlier in file.
3997 (finalize_python): Set gdb_python_initialized.
3998 (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early
3999 when not initialized.
4000
4001 2020-05-28 Simon Marchi <simon.marchi@efficios.com>
4002
4003 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
4004 <push_dwarf_reg_entry_value>: Remove assert. Override
4005 per_objfile with caller_per_objfile.
4006
4007 2020-05-28 Tom de Vries <tdevries@suse.de>
4008
4009 * dwarf2/read.c (dw2_symtab_iter_next, dw2_expand_marked_cus): Limit
4010 PR gold/15646 workaround to symbol kind "type".
4011
4012 2020-05-27 Tom Tromey <tromey@adacore.com>
4013
4014 * dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
4015
4016 2020-05-27 Tom Tromey <tromey@adacore.com>
4017
4018 * dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
4019 Use htab_find_with_hash.
4020 <add_abbrev>: Remove "abbrev_number" parameter.
4021 * dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
4022 "abbrev_number" parameter. Use htab_find_slot_with_hash.
4023 (hash_abbrev): Add comment.
4024 (abbrev_table::lookup_abbrev): Move to header file.
4025 (abbrev_table::read): Update.
4026
4027 2020-05-27 Tom Tromey <tromey@adacore.com>
4028
4029 * dwarf2/read.c (struct partial_die_info) <name>: Declare new
4030 method.
4031 <canonical_name>: New member.
4032 <raw_name>: Rename from "name".
4033 (partial_die_info): Initialize canonical_name.
4034 (scan_partial_symbols): Check raw_name.
4035 (partial_die_parent_scope, partial_die_full_name)
4036 (add_partial_symbol, add_partial_subprogram)
4037 (add_partial_enumeration, load_partial_dies): Use "name" method.
4038 (partial_die_info::name): New method.
4039 (partial_die_info::read, guess_partial_die_structure_name)
4040 (partial_die_info::fixup): Update.
4041
4042 2020-05-27 Tom Tromey <tromey@adacore.com>
4043
4044 * dwarf2/attribute.h (struct attribute) <form_is_ref>: Inline.
4045 <get_ref_die_offset>: Inline.
4046 <get_ref_die_offset_complaint>: New method.
4047 * dwarf2/attribute.c (attribute::form_is_ref): Move to header.
4048 (attribute::get_ref_die_offset_complaint): Rename from
4049 get_ref_die_offset. Just issue complaint.
4050
4051 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
4052
4053 * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
4054
4055 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
4056
4057 * exec.c (exec_file_attach): Use errno value of first openp failure.
4058
4059 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
4060
4061 * nat/windows-nat.c (windows_thread_info::~windows_thread_info):
4062 Don't close thread handle.
4063
4064 2020-05-27 Tom Tromey <tom@tromey.com>
4065 Simon Marchi <simon.marchi@efficios.com>
4066
4067 * objfiles.h (struct objfile) <partial_symtabs>: Now a
4068 shared_ptr.
4069 * dwarf2/read.h (struct dwarf2_per_objfile) <partial_symtabs>: New
4070 member.
4071 * dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,
4072 dwarf2_per_bfd_objfile_data_key>: New globals.
4073 (dwarf2_has_info): Use shared dwarf2_per_bfd if possible.
4074 (dwarf2_get_section_info): Use get_dwarf2_per_objfile.
4075 (dwarf2_initialize_objfile): Consider cases where per_bfd can be
4076 shared.
4077 (dwarf2_build_psymtabs): Set objfile::partial_symtabs and
4078 short-circuit when sharing.
4079 (dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.
4080 (dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.
4081
4082 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4083
4084 * dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
4085 to...
4086 (struct dwarf2_per_objfile) <line_header_hash>: ... here.
4087 * dwarf2/read.c (handle_DW_AT_stmt_list): Update.
4088
4089 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4090
4091 * dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
4092 build_name_components, find_name_components_bounds>:
4093 Add per_objfile parameter.
4094 (struct mapped_index) <symbol_name_at>: Likewise.
4095 (struct mapped_debug_names): Remove constructor.
4096 <dwarf2_per_objfile>: Remove field.
4097 <namei_to_name, symbol_name_at>: Add per_objfile parameter.
4098 (mapped_index_base::find_name_components_bounds,
4099 mapped_index_base::build_name_components,
4100 dw2_expand_symtabs_matching_symbol): Likewise.
4101 (class mock_mapped_index) <symbol_name_at>: Likewise.
4102 (check_match): Likewise.
4103 (check_find_bounds_finds): Likewise.
4104 (test_mapped_index_find_name_component_bounds): Update.
4105 (CHECK_MATCH): Update.
4106 (dw2_expand_symtabs_matching): Update.
4107 (class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
4108 per_objfile parameter.
4109 <find_vec_in_debug_names>: Likewise.
4110 <m_per_objfile>: New field.
4111 (mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
4112 parameter.
4113 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
4114 (dw2_debug_names_iterator::next): Update.
4115 (dw2_debug_names_lookup_symbol): Update.
4116 (dw2_debug_names_expand_symtabs_for_function): Update.
4117 (dw2_debug_names_map_matching_symbols): Update.
4118 (dw2_debug_names_expand_symtabs_matching): Update.
4119 (dwarf2_read_debug_names): Update.
4120
4121 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4122
4123 * dwarf2/read.h (struct dwarf2_cu): Forward-declare.
4124 (struct dwarf2_per_bfd) <free_cached_comp_units>: Remove,
4125 move to dwarf2_per_objfile.
4126 <read_in_chain>: Remove.
4127 (struct dwarf2_per_objfile) <get_cu, set_cu, remove_cu,
4128 remove_all_cus, age_comp_units>: New methods.
4129 <m_dwarf2_cus>: New member.
4130 (struct dwarf2_per_cu_data) <cu>: Remove.
4131 * dwarf2/read.c (struct dwarf2_cu) <read_in_chain>: Remove.
4132 (age_cached_comp_units, free_one_cached_comp_unit): Remove,
4133 moved to methods of dwarf2_per_objfile.
4134 (dwarf2_clear_marks): Remove.
4135 (dwarf2_queue_item::~dwarf2_queue_item): Update.
4136 (dwarf2_per_bfd::~dwarf2_per_bfd): Don't free dwarf2_cus.
4137 (dwarf2_per_bfd::free_cached_comp_units): Remove.
4138 (dwarf2_per_objfile::remove_all_cus): New.
4139 (class free_cached_comp_units) <~free_cached_comp_units>:
4140 Update.
4141 (load_cu): Update.
4142 (dw2_do_instantiate_symtab): Adjust.
4143 (fill_in_sig_entry_from_dwo_entry): Adjust.
4144 (cutu_reader::init_tu_and_read_dwo_dies): Update.
4145 (cutu_reader::cutu_reader): Likewise.
4146 (cutu_reader::keep): Use dwarf2_per_objfile::set_cu.
4147 (cutu_reader::cutu_reader): Use dwarf2_per_objfile::get_cu.
4148 (process_psymtab_comp_unit): Use dwarf2_per_objfile::remove_cu
4149 and dwarf2_per_objfile::age_comp_units.
4150 (load_partial_comp_unit): Update.
4151 (maybe_queue_comp_unit): Use dwarf2_per_objfile::get_cu.
4152 (process_queue): Likewise.
4153 (find_partial_die): Use dwarf2_per_objfile::get_cu instead of cu
4154 backlink.
4155 (dwarf2_read_addr_index): Likewise.
4156 (follow_die_offset): Likewise.
4157 (dwarf2_fetch_die_loc_sect_off): Likewise.
4158 (dwarf2_fetch_constant_bytes): Likewise.
4159 (dwarf2_fetch_die_type_sect_off): Likewise.
4160 (follow_die_sig_1): Likewise.
4161 (load_full_type_unit): Likewise.
4162 (read_signatured_type): Likewise.
4163 (dwarf2_cu::dwarf2_cu): Don't set cu field.
4164 (dwarf2_cu::~dwarf2_cu): Remove.
4165 (dwarf2_per_objfile::get_cu): New.
4166 (dwarf2_per_objfile::set_cu): New.
4167 (age_cached_comp_units): Rename to...
4168 (dwarf2_per_objfile::age_comp_units): ... this. Adjust
4169 to std::unordered_map.
4170 (free_one_cached_comp_unit): Rename to...
4171 (dwarf2_per_objfile::remove_cu): ... this. Adjust
4172 to std::unordered_map.
4173 (dwarf2_per_objfile::~dwarf2_per_objfile): New.
4174 (dwarf2_mark_helper): Use dwarf2_per_objfile::get_cu, expect
4175 a dwarf2_per_objfile in data.
4176 (dwarf2_mark): Pass dwarf2_per_objfile in data to htab_traverse.
4177 (dwarf2_clear_marks): Remove.
4178
4179 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4180
4181 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Replace
4182 `int use_existing_cu` parameter with `dwarf2_cu *existing_cu`.
4183 (init_tu_and_read_dwo_dies): Likewise.
4184 (cutu_reader::init_tu_and_read_dwo_dies): Likewise.
4185 (cutu_reader::cutu_reader): Likewise.
4186 (load_partial_comp_unit): Likewise.
4187 (process_psymtab_comp_unit): Update.
4188 (build_type_psymtabs_1): Update.
4189 (process_skeletonless_type_unit): Update.
4190 (load_full_comp_unit): Update.
4191 (find_partial_die): Update.
4192 (dwarf2_read_addr_index): Update.
4193 (read_signatured_type): Update.
4194
4195 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4196
4197 * dwarf2/read.h (struct dwarf2_per_cu_data) <m_header,
4198 m_header_read_in>: New fields.
4199 <get_header>: New method.
4200 * dwarf2/read.c (per_cu_header_read_in): Remove.
4201 (dwarf2_per_cu_data::get_header): New.
4202 (dwarf2_per_cu_data::addr_size): Update.
4203 (dwarf2_per_cu_data::offset_size): Update.
4204 (dwarf2_per_cu_data::ref_addr_size): Update.
4205
4206 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4207
4208 * dwarf2/read.c (load_cu): Return dwarf2_cu.
4209 (dw2_do_instantiate_symtab): Update.
4210 (queue_and_load_all_dwo_tus): Change parameter from
4211 dwarf2_per_cu_data to dwarf2_cu.
4212 (dwarf2_fetch_die_loc_sect_off): Update.
4213 (dwarf2_fetch_constant_bytes): Update.
4214 (dwarf2_fetch_die_type_sect_off): Update.
4215
4216 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4217
4218 * dwarf2/read.c (process_full_comp_unit,
4219 process_full_type_unit): Remove per_cu, per_objfile paramters.
4220 Add dwarf2_cu parameter.
4221 (process_queue): Update.
4222
4223 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4224
4225 * dwarf2/read.c (create_cu_from_index_list): Replace
4226 dwarf2_per_objfile parameter with dwarf2_per_bfd.
4227 (create_cus_from_index_list): Likewise.
4228 (create_cus_from_index): Likewise.
4229 (create_signatured_type_table_from_index): Likewise.
4230 (create_cus_from_debug_names_list): Likewise.
4231 (create_cus_from_debug_names): Likewise.
4232 (dwarf2_read_gdb_index): Update.
4233 (dwarf2_read_debug_names): Update.
4234
4235 2020-05-27 Tom Tromey <tom@tromey.com>
4236 Simon Marchi <simon.marchi@efficios.com>
4237
4238 * dwarf2/read.h (struct dwarf2_per_objfile)
4239 <get_type_for_signatured_type, set_type_for_signatured_type>:
4240 New methods.
4241 <m_type_map>: New member.
4242 (struct signatured_type) <type>: Remove.
4243 * dwarf2/read.c
4244 (dwarf2_per_objfile::get_type_for_signatured_type,
4245 dwarf2_per_objfile::set_type_for_signatured_type): New.
4246 (get_signatured_type): Use new methods.
4247
4248 2020-05-27 Tom Tromey <tom@tromey.com>
4249 Simon Marchi <simon.marchi@efficios.com>
4250
4251 * dwarf2/read.h (struct type_unit_group_unshareable): New.
4252 (struct dwarf2_per_objfile) <type_units>: New member.
4253 <get_type_unit_group_unshareable>: New method.
4254 * dwarf2/read.c (struct type_unit_group) <compunit_symtab,
4255 num_symtabs, symtabs>: Remove; move to
4256 type_unit_group_unshareable.
4257 (dwarf2_per_objfile::get_type_unit_group_unshareable): New.
4258 (process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
4259 (dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
4260
4261 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4262
4263 * dwarf2/read.h (struct dwarf2_per_cu_data):
4264 <dwarf2_per_objfile>: Remove.
4265 * dwarf2/read.c (create_cu_from_index_list): Don't assign
4266 dwarf2_per_objfile.
4267 (create_signatured_type_table_from_index): Likewise.
4268 (create_signatured_type_table_from_debug_names): Likewise.
4269 (create_debug_type_hash_table): Likewise.
4270 (fill_in_sig_entry_from_dwo_entry): Likewise.
4271 (create_type_unit_group): Likewise.
4272 (read_comp_units_from_section): Likewise.
4273 (create_cus_hash_table): Likewise.
4274
4275 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4276
4277 * dwarf2/read.c (process_psymtab_comp_unit): Remove reference to
4278 dwarf2_per_cu_data::dwarf2_per_objfile.
4279 (compute_compunit_symtab_includes): Likewise.
4280 (dwarf2_cu::start_symtab): Likewise.
4281
4282 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4283
4284 * dwarf2/read.h (dwarf2_get_die_type): Add dwarf2_per_objfile
4285 parameter.
4286 * dwarf2/read.c (get_die_type_at_offset): Likewise.
4287 (read_namespace_alias): Update.
4288 (lookup_die_type): Update.
4289 (dwarf2_get_die_type): Add dwarf2_per_objfile parameter.
4290 * dwarf2/loc.c (class dwarf_evaluate_loc_desc) <get_base_type>:
4291 Update.
4292 (disassemble_dwarf_expression): Update.
4293
4294 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4295
4296 * dwarf2/read.h (struct dwarf2_queue_item): Add
4297 dwarf2_per_objfile parameter, assign new parameter.
4298 <per_objfile>: New field.
4299 * dwarf2/read.c (free_one_cached_comp_unit): Add
4300 dwarf2_per_objfile parameter.
4301 (queue_comp_unit): Likewise.
4302 (dw2_do_instantiate_symtab): Update.
4303 (process_psymtab_comp_unit): Update.
4304 (maybe_queue_comp_unit): Add dwarf2_per_objfile parameter.
4305 (process_imported_unit_die): Update.
4306 (queue_and_load_dwo_tu): Update.
4307 (follow_die_offset): Update.
4308 (follow_die_sig_1): Update.
4309
4310 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4311
4312 * dwarf2/read.h (struct dwarf2_per_cu_data) <objfile>: Remove.
4313 * dwarf2/read.c (dwarf2_compute_name): Pass per_objfile down.
4314 (read_call_site_scope): Assign per_objfile.
4315 (dwarf2_per_cu_data::objfile): Remove.
4316 * gdbtypes.h (struct call_site) <per_objfile>: New member.
4317 * dwarf2/loc.h (dwarf2_evaluate_loc_desc): Add
4318 dwarf2_per_objfile parameter.
4319 * dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Add
4320 dwarf2_per_objfile parameter.
4321 (dwarf_expr_reg_to_entry_parameter): Add output
4322 dwarf2_per_objfile parameter.
4323 (locexpr_get_frame_base): Update.
4324 (class dwarf_evaluate_loc_desc) <get_tls_address>: Update.
4325 <push_dwarf_reg_entry_value>: Update.
4326 <call_site_to_target_addr>: Update.
4327 (dwarf_entry_parameter_to_value): Add dwarf2_per_objfile
4328 parameter.
4329 (value_of_dwarf_reg_entry): Update.
4330 (rw_pieced_value): Update.
4331 (indirect_synthetic_pointer): Update.
4332 (dwarf2_evaluate_property): Update.
4333 (dwarf2_loc_desc_get_symbol_read_needs): Add dwarf2_per_objfile
4334 parameter.
4335 (locexpr_read_variable): Update.
4336 (locexpr_get_symbol_read_needs): Update.
4337 (loclist_read_variable): Update.
4338
4339 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4340
4341 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
4342 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
4343 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
4344 parameter.
4345 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
4346 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
4347 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
4348 parameter.
4349 * dwarf2/loc.c (indirect_synthetic_pointer, per_cu_dwarf_call,
4350 sect_variable_value): Add dwarf2_per_objfile parameter.
4351 (class dwarf_evaluate_loc_desc) <dwarf_call,
4352 dwarf_variable_value>: Update.
4353 (fetch_const_value_from_synthetic_pointer): Add
4354 dwarf2_per_objfile parameter.
4355 (fetch_const_value_from_synthetic_pointer): Update.
4356 (coerced_pieced_ref): Update.
4357 (class symbol_needs_eval_context) <dwarf_call,
4358 dwarf_variable_value>: Update.
4359 (dwarf2_compile_expr_to_ax): Update.
4360
4361 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4362
4363 * dwarf2/loc.c (allocate_piece_closure): Add dwarf2_per_objfile
4364 parameter.
4365 (dwarf2_evaluate_loc_desc_full): Update.
4366
4367 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4368
4369 * dwarf2/read.h (dwarf2_read_addr_index): Add dwarf2_per_objfile
4370 parameter.
4371 * dwarf2/read.c (dwarf2_read_addr_index): Likewise.
4372 * dwarf2/loc.c (decode_debug_loclists_addresses): Add
4373 dwarf2_per_objfile parameter.
4374 (decode_debug_loc_dwo_addresses): Likewise.
4375 (dwarf2_find_location_expression): Update.
4376 (class dwarf_evaluate_loc_desc) <get_addr_index>: Update.
4377 (locexpr_describe_location_piece): Add dwarf2_per_objfile
4378 parameter.
4379 (disassemble_dwarf_expression): Add dwarf2_per_objfile
4380 parameter.
4381 (locexpr_describe_location_1): Likewise.
4382 (locexpr_describe_location): Update.
4383
4384 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4385
4386 * dwarf2/read.h (struct dwarf2_per_cu_data) <text_offset>:
4387 Remove.
4388 * dwarf2/read.c (dwarf2_per_cu_data::text_offset): Remove.
4389 * dwarf2/loc.c (dwarf2_find_location_expression): Update.
4390 (dwarf2_compile_property_to_c): Update.
4391 (dwarf2_compile_expr_to_ax): Add dwarf2_per_objfile parameter,
4392 use text offset from objfile.
4393 (locexpr_tracepoint_var_ref): Update.
4394 (locexpr_generate_c_location): Update.
4395 (loclist_describe_location): Update.
4396 (loclist_tracepoint_var_ref): Update.
4397 * dwarf2/compile.h (compile_dwarf_bounds_to_c): Add
4398 dwarf2_per_objfile parameter.
4399 * dwarf2/loc2c.c (do_compile_dwarf_expr_to_c): Likewise,
4400 use text offset from objfile.
4401 (compile_dwarf_expr_to_c): Add dwarf2_per_objfile parameter.
4402
4403 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4404
4405 * dwarf2/expr.h (struct dwarf_expr_context)
4406 <dwarf_expr_context>: Add dwarf2_per_objfile parameter.
4407 <offset>: Remove.
4408 <per_objfile>: New member.
4409 * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
4410 dwarf2_per_objfile parameter. Don't set offset, set
4411 per_objfile.
4412 (dwarf_expr_context::execute_stack_op): Use offset from objfile.
4413 * dwarf2/frame.c (dwarf2_frame_find_fde): Return (by parameter)
4414 a dwarf2_per_objfile object instead of an offset.
4415 (class dwarf_expr_executor) <dwarf_expr_executor>: Add
4416 constructor.
4417 (execute_stack_op): Add dwarf2_per_objfile parameter, pass it
4418 to dwarf2_expr_executor constructor. Don't set offset.
4419 (dwarf2_fetch_cfa_info): Update.
4420 (struct dwarf2_frame_cache) <text_offset>: Remove.
4421 <per_objfile>: New field.
4422 (dwarf2_frame_cache): Update.
4423 (dwarf2_frame_prev_register): Update.
4424 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
4425 <dwarf_evaluate_loc_desc>: Add constructor.
4426 (dwarf2_evaluate_loc_desc_full): Update.
4427 (dwarf2_locexpr_baton_eval): Update.
4428 (class symbol_needs_eval_context) <symbol_needs_eval_context>:
4429 Add constructor.
4430 (dwarf2_loc_desc_get_symbol_read_needs): Update.
4431
4432 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4433
4434 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_type,
4435 addr_sized_int_type>: Move to dwarf2_cu.
4436 <int_type>: Move to dwarf2_per_objfile.
4437 (struct dwarf2_per_objfile) <int_type>: Move here.
4438 * dwarf2/read.c (struct dwarf2_cu) <addr_type,
4439 addr_sized_int_type>: Move here.
4440 (read_func_scope): Update.
4441 (read_array_type): Update.
4442 (read_tag_string_type): Update.
4443 (attr_to_dynamic_prop): Update.
4444 (dwarf2_per_cu_data::int_type): Rename to...
4445 (dwarf2_per_objfile::int_type): ... this.
4446 (dwarf2_per_cu_data::addr_sized_int_type): Rename to...
4447 (dwarf2_cu::addr_sized_int_type): ... this.
4448 (read_subrange_type): Update.
4449 (dwarf2_per_cu_data::addr_type): Rename to...
4450 (dwarf2_cu::addr_type): ... this.
4451 (set_die_type): Update.
4452
4453 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4454
4455 * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
4456 data through per_cu->cu.
4457
4458 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4459
4460 * dwarf2/read.c (lookup_dwo_comp_unit): Change
4461 dwarf2_per_cu_data parameter fo dwarf2_cu.
4462 (lookup_dwo_type_unit): Likewise.
4463 (read_cutu_die_from_dwo): Likewise.
4464 (lookup_dwo_unit): Likewise.
4465 (open_and_init_dwo_file): Likewise.
4466 (lookup_dwo_cutu): Likewise.
4467 (lookup_dwo_comp_unit): Likewise.
4468 (lookup_dwo_type_unit): Likewise.
4469 (cutu_reader::init_tu_and_read_dwo_dies): Update.
4470 (cutu_reader::cutu_reader): Update.
4471
4472 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4473
4474 * dwarf2/read.c (process_full_comp_unit): Add dwarf2_per_objfile
4475 parameter.
4476 (process_full_type_unit): Likewise.
4477 (process_queue): Update.
4478
4479 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4480
4481 * dwarf2/read.c (recursively_compute_inclusions): Add
4482 dwarf2_per_objfile parameter.
4483 (compute_compunit_symtab_includes): Likewise.
4484 (process_cu_includes): Update.
4485
4486 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4487
4488 * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
4489 parameter.
4490 (create_type_unit_group): Update.
4491 (process_psymtab_comp_unit_reader): Update.
4492 (build_type_psymtabs_reader): Update.
4493
4494 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4495
4496 * dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
4497 object through m_this_cu->cu.
4498
4499 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4500
4501 * dwarf2/read.c (queue_and_load_dwo_tu): Expect a dwarf2_cu as
4502 the info parameter.
4503 (queue_and_load_all_dwo_tus): Pass per_cu->cu.
4504
4505 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4506
4507 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Add
4508 per_objfile parameter.
4509 (load_full_type_unit): Add per_objfile parameter.
4510 (read_signatured_type): Likewise.
4511 (load_full_comp_unit): Likewise.
4512 (load_cu): Likewise.
4513 (dw2_do_instantiate_symtab): Likewise.
4514 (dw2_get_file_names): Likewise.
4515 (dw2_map_symtabs_matching_filename): Update.
4516 (dw_expand_symtabs_matching_file_matcher): Update.
4517 (dw2_map_symbol_filenames): Update.
4518 (process_psymtab_comp_unit): Add per_objfile parameter.
4519 (build_type_psymtabs_1): Update.
4520 (process_skeletonless_type_unit): Update.
4521 (dwarf2_build_psymtabs_hard): Update.
4522 (load_partial_comp_unit): Add per_objfile parameter.
4523 (scan_partial_symbols): Update.
4524 (load_full_comp_unit): Add per_objfile parameter.
4525 (process_imported_unit_die): Update.
4526 (create_cus_hash_table): Update.
4527 (find_partial_die): Update.
4528 (dwarf2_read_addr_index): Update.
4529 (follow_die_offset): Update.
4530 (dwarf2_fetch_die_loc_sect_off): Update.
4531 (dwarf2_fetch_constant_bytes): Update.
4532 (dwarf2_fetch_die_type_sect_off): Update.
4533 (follow_die_sig_1): Update.
4534 (load_full_type_unit): Add per_objfile parameter.
4535 (read_signatured_type): Likewise.
4536
4537 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4538
4539 * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
4540 of objfile_name.
4541
4542 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4543
4544 * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
4545 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
4546 * dwarf2/read.c (dwarf2_per_bfd::dwarf2_per_bfd): Assign obfd
4547 field.
4548 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
4549 (create_cus_from_index): Update.
4550 (dwarf2_read_gdb_index): Update.
4551 (create_cus_from_debug_names): Update.
4552 (dwarf2_read_debug_names): Update.
4553 (get_abbrev_section_for_cu): Update.
4554 (create_all_comp_units): Update.
4555 (read_attribute_value): Update.
4556 (get_debug_line_section): Update.
4557 * dwarf2/index-cache.c (index_cache::store): Update.
4558 * dwarf2/index-write.c (save_gdb_index_command): Update.
4559 * dwarf2/macro.c (dwarf_decode_macro_bytes): Update.
4560
4561 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4562
4563 * dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
4564 member.
4565 * dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
4566 dwarf2_per_cu_data::per_bfd.
4567 (dwarf2_per_bfd::allocate_signatured_type): Likewise.
4568 (create_type_unit_group): Likewise.
4569 (queue_comp_unit): Remove reference to
4570 per_cu->dwarf2_per_objfile.
4571 (maybe_queue_comp_unit): Likewise.
4572 (fill_in_sig_entry_from_dwo_entry): Assign new field.
4573 (create_cus_hash_table): Assign new field.
4574
4575 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4576
4577 * dwarf2/read.c: Replace
4578 dwarf2_cu->per_cu->dwarf2_per_objfile references with
4579 dwarf2_cu->per_objfile throughout.
4580
4581 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4582
4583 * dwarf2/read.c (dw2_do_instantiate_symtab): Add per_objfile
4584 parameter, don't use per_cu->dwarf2_per_objfile.
4585 (dw2_instantiate_symtab): Likewise.
4586 (dw2_find_last_source_symtab): Update.
4587 (dw2_map_expand_apply): Update.
4588 (dw2_lookup_symbol): Update.
4589 (dw2_expand_symtabs_for_function): Update.
4590 (dw2_expand_all_symtabs): Update.
4591 (dw2_expand_symtabs_with_fullname): Update.
4592 (dw2_expand_symtabs_matching_one): Add per_objfile parameter,
4593 don't use per_cu->dwarf2_per_objfile.
4594 (dw2_expand_marked_cus): Update.
4595 (dw2_find_pc_sect_compunit_symtab): Update.
4596 (dw2_debug_names_lookup_symbol): Update.
4597 (dw2_debug_names_expand_symtabs_for_function): Update.
4598 (dw2_debug_names_map_matching_symbols): Update.
4599 (dwarf2_psymtab::expand_psymtab): Update.
4600
4601 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4602
4603 * dwarf2/read.c (struct dwarf2_cu) <dwarf2_cu>: Add parameter.
4604 <per_objfile>: New member.
4605 (class cutu_reader) <init_tu_and_read_dwo_dies>: Add parameter.
4606 (cutu_reader::init_tu_and_read_dwo_dies): Add parameter, update
4607 call to dwarf2_cu.
4608 (cutu_reader::cutu_reader): Update.
4609 (dwarf2_cu::dwarf2_cu): Add parameter, initialize per_objfile.
4610
4611 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4612
4613 * dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
4614 struct dwarf2_per_objfile.
4615 (struct dwarf2_per_objfile) <die_type_hash>: Move from struct
4616 dwarf2_per_bfd.
4617 * dwarf2/read.c (set_die_type): Update.
4618 (get_die_type_at_offset): Update.
4619
4620 2020-05-27 Tom Tromey <tom@tromey.com>
4621 Simon Marchi <simon.marchi@efficios.com>
4622
4623 * dwarf2/read.h (struct dwarf2_per_bfd) <num_psymtabs>: New
4624 method.
4625 (struct dwarf2_per_objfile) <resize_symtabs, symtab_set_p,
4626 get_symtab, set_symtab>: New methods.
4627 <m_symtabs>: New field.
4628 (struct dwarf2_psymtab): Derive from partial_symtab.
4629 <readin_p, get_compunit_symtab>: Declare methods.
4630 * dwarf2/read.c (dwarf2_per_objfile::symtab_set_p,
4631 dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
4632 New methods.
4633 (struct dwarf2_per_cu_quick_data) <compunit_symtab>: Remove.
4634 (dw2_do_instantiate_symtab, dw2_instantiate_symtab)
4635 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
4636 (dw2_symtab_iter_next, dw2_print_stats)
4637 (dw2_expand_symtabs_with_fullname)
4638 (dw2_expand_symtabs_matching_one)
4639 (dw_expand_symtabs_matching_file_matcher)
4640 (dw2_find_pc_sect_compunit_symtab, dw2_map_symbol_filenames)
4641 (dw2_debug_names_iterator::next)
4642 (dw2_debug_names_map_matching_symbols)
4643 (fill_in_sig_entry_from_dwo_entry, dwarf2_psymtab::read_symtab)
4644 (process_queue, dwarf2_psymtab::expand_psymtab): Update.
4645 (dwarf2_psymtab::readin_p, dwarf2_psymtab::get_compunit_symtab):
4646 New methods.
4647 (get_compunit_symtab, process_full_comp_unit)
4648 (process_full_type_unit): Update.
4649 (dwarf2_build_psymtabs, dwarf2_initialize_objfile, add_type_unit): Call
4650
4651 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4652
4653 * dwarf2/read.h (dwarf2_per_objfile): Rename to dwarf2_per_bfd,
4654 then introduce a new dwarf2_per_objfile type.
4655 <read_line_string>: Move to the new dwarf2_per_objfile type.
4656 <objfile>: Likewise.
4657 (dwarf2_per_bfd): Rename dwarf2_per_objfile to this.
4658 * dwarf2/read.c: Replace references to dwarf2_per_objfile with
4659 dwarf2_per_objfile->per_bfd.
4660 (dwarf2_per_objfile::dwarf2_per_objfile): Rename to...
4661 (dwarf2_per_bfd::dwarf2_per_bfd): ... this.
4662 (dwarf2_per_objfile::free_cached_comp_units): Rename to...
4663 (dwarf2_per_bfd::free_cached_comp_units): ... this.
4664 (dwarf2_has_info): Allocate dwarf2_per_bfd.
4665 (dwarf2_per_objfile::locate_sections): Rename to...
4666 (dwarf2_per_bfd::locate_sections): ... this.
4667 (dwarf2_per_objfile::get_cutu): Rename to...
4668 (dwarf2_per_bfd::get_cutu): ... this.
4669 (dwarf2_per_objfile::get_cu): Rename to...
4670 (dwarf2_per_bfd::get_cu): ... this.
4671 (dwarf2_per_objfile::get_tu): Rename to...
4672 (dwarf2_per_bfd::get_tu): ... this.
4673 (dwarf2_per_objfile::allocate_per_cu): Rename to...
4674 (dwarf2_per_bfd::allocate_per_cu): ... this.
4675 (dwarf2_per_objfile::allocate_signatured_type): Rename to...
4676 (dwarf2_per_bfd::allocate_signatured_type): ... this.
4677 (get_gdb_index_contents_ftype): Change parameter from
4678 dwarf2_per_objfile to dwarf2_per_bfd.
4679 * dwarf2/macro.c, dwarf2/index-write.c: Replace references to
4680 dwarf2_per_objfile with dwarf2_per_objfile->per_bfd.
4681
4682 2020-05-27 Tom Tromey <tom@tromey.com>
4683 Simon Marchi <simon.marchi@efficios.com>
4684
4685 * dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
4686 (allocate_piece_closure): Set "per_objfile" member.
4687 (dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
4688 (locexpr_describe_location, loclist_describe_location): Use new
4689 member.
4690 * dwarf2/read.c (read_call_site_scope)
4691 (mark_common_block_symbol_computed, attr_to_dynamic_prop)
4692 (dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
4693 (fill_in_loclist_baton, dwarf2_symbol_mark_computed,
4694 handle_data_member_location): Set per_objfile member.
4695 * dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
4696 member.
4697 (struct dwarf2_loclist_baton) <per_objfile>: New member.
4698
4699 2020-05-27 Tom Tromey <tom@tromey.com>
4700
4701 * dwarf2/read.h (struct dwarf2_per_objfile) <allocate_per_cu,
4702 allocate_signatured_type>: Declare new methods.
4703 <m_num_psymtabs>: New member.
4704 (struct dwarf2_per_cu_data) <index>: New member.
4705 * dwarf2/read.c (dwarf2_per_objfile::allocate_per_cu)
4706 (dwarf2_per_objfile::allocate_signatured_type): New methods.
4707 (create_cu_from_index_list): Use allocate_per_cu.
4708 (create_signatured_type_table_from_index)
4709 (create_signatured_type_table_from_debug_names)
4710 (create_debug_type_hash_table, add_type_unit)
4711 (read_comp_units_from_section): Use allocate_signatured_type.
4712
4713 2020-05-27 Tom Tromey <tom@tromey.com>
4714
4715 * psymtab.c (partial_map_expand_apply)
4716 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
4717 (psym_lookup_global_symbol_language)
4718 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
4719 (psym_print_stats, psym_expand_symtabs_for_function)
4720 (psym_map_symbol_filenames, psym_map_matching_symbols)
4721 (psym_expand_symtabs_matching)
4722 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
4723 (maintenance_check_psymtabs): Update.
4724 * psympriv.h (struct partial_symtab) <readin_p,
4725 get_compunit_symtab>: Add objfile parameter.
4726 (struct standard_psymtab) <readin_p, get_compunit_symtab>:
4727 Likewise.
4728 * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p,
4729 get_compunit_symtab>: Likewise.
4730 (dwarf2_psymtab::expand_psymtab): Pass objfile argument.
4731
4732 2020-05-27 Tom Tromey <tom@tromey.com>
4733
4734 * dwarf2/read.h (struct dwarf2_per_objfile) <obstack>: New
4735 member.
4736 * dwarf2/read.c (delete_file_name_entry): Fix comment.
4737 (create_cu_from_index_list)
4738 (create_signatured_type_table_from_index)
4739 (create_signatured_type_table_from_debug_names)
4740 (dw2_get_file_names_reader, dwarf2_initialize_objfile)
4741 (dwarf2_create_include_psymtab)
4742 (create_debug_type_hash_table, add_type_unit)
4743 (create_type_unit_group, read_comp_units_from_section)
4744 (dwarf2_compute_name, create_cus_hash_table)
4745 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
4746 (create_dwo_unit_in_dwp_v2, open_and_init_dwp_file): Use new
4747 obstack.
4748 (dw2_get_real_path): Likewise. Change argument to
4749 dwarf2_per_objfile.
4750
4751 2020-05-27 Luis Machado <luis.machado@linaro.org>
4752
4753 PR tdep/26000
4754 * arm-tdep.c (thumb_analyze_prologue): Fix instruction matching
4755 for ldrd (immediate).
4756
4757 2020-05-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4758
4759 * command.h: Add comment giving the name of class_tui.
4760 * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
4761 create the fake command for the help for class_tui.
4762
4763 2020-05-26 Tom Tromey <tromey@adacore.com>
4764
4765 * ada-lang.c (ada_print_array_index): Change type. Call val_atr.
4766 (ada_value_ptr_subscript): Don't call pos_atr on the lower bound.
4767 (val_atr): New function.
4768 (value_val_atr): Use it.
4769 * ada-valprint.c (print_optional_low_bound): Change low bound
4770 handling for enums.
4771 (val_print_packed_array_elements): Don't call discrete_position.
4772 * gdbtypes.c (get_discrete_bounds) <TYPE_CODE_RANGE>: Call
4773 discrete_position for enum types.
4774 * language.c (default_print_array_index): Change type.
4775 * language.h (struct language_defn) <la_print_array_index>: Add
4776 index_type parameter, change type of index_value.
4777 (LA_PRINT_ARRAY_INDEX): Add index_type parameter.
4778 (default_print_array_index): Update.
4779 * valprint.c (maybe_print_array_index): Don't call
4780 value_from_longest. Update.
4781 (value_print_array_elements): Don't call discrete_position.
4782
4783 2020-05-26 Tom Tromey <tromey@adacore.com>
4784
4785 * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE.
4786 * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE.
4787
4788 2020-05-25 Cristiano De Alti <cristiano_dealti@hotmail.com>
4789
4790 PR gdb/13519
4791 * avr-tdep.c (avr_integer_to_address): Return data or code
4792 address accordingly to the second 'type' argument of the
4793 function.
4794
4795 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
4796
4797 * infcmd.c, inferior.h: (construct_inferior_arguments):
4798 Moved function from here to gdbsupport/common-inferior.{h,cc}
4799
4800 2020-05-23 Tom Tromey <tom@tromey.com>
4801
4802 Revert commit eca1f90c:
4803 * NEWS: Remove entry for completion styling.
4804 * completer.c (_rl_completion_prefix_display_length): Move
4805 declaration later.
4806 (gdb_fnprint): Revert.
4807 (gdb_display_match_list_1): Likewise.
4808 * cli/cli-style.c (completion_prefix_style)
4809 (completion_difference_style, completion_suffix_style): Remove.
4810 (_initialize_cli_style): Revert.
4811 * cli/cli-style.h (completion_prefix_style)
4812 (completion_difference_style, completion_suffix_style): Don't
4813 declare.
4814
4815 2020-05-24 Pedro Alves <palves@redhat.com>
4816
4817 * symtab.c (completion_list_add_name): Return boolean indication
4818 of whether the symbol matched.
4819 (completion_list_add_symbol): Don't try to remove C++ aliases if
4820 the symbol didn't match in the first place.
4821 * symtab.h (completion_list_add_name): Return bool.
4822
4823 2020-05-23 Simon Marchi <simon.marchi@polymtl.ca>
4824
4825 * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
4826 type::field.
4827
4828 2020-05-23 Joel Brobecker <brobecker@adacore.com>
4829
4830 GDB 9.2 released.
4831
4832 2020-05-23 Tom Tromey <tom@tromey.com>
4833
4834 * NEWS: Add entry for completion styling.
4835 * completer.c (_rl_completion_prefix_display_length): Move
4836 declaration earlier.
4837 (gdb_fnprint): Use completion_style.
4838 (gdb_display_match_list_1): Likewise.
4839 * cli/cli-style.c (completion_prefix_style)
4840 (completion_difference_style, completion_suffix_style): New
4841 globals.
4842 (_initialize_cli_style): Register new globals.
4843 * cli/cli-style.h (completion_prefix_style)
4844 (completion_difference_style, completion_suffix_style): Declare.
4845
4846 2020-05-23 Pedro Alves <palves@redhat.com>
4847
4848 * utils.c: Include "gdbsupport/gdb-safe-ctype.h".
4849 (parse_escape): Use ISDIGIT instead of isdigit.
4850 (puts_debug): Use gdb_isprint instead of isprint.
4851 (fprintf_symbol_filtered): Use ISALNUM instead of isalnum.
4852 (cp_skip_operator_token, skip_ws, strncmp_iw_with_mode): Use
4853 ISSPACE instead of isspace.
4854 (strncmp_iw_with_mode): Use TOLOWER instead of tolower and ISSPACE
4855 instead of isspace.
4856 (strcmp_iw_ordered): Use ISSPACE instead of isspace.
4857 (string_to_core_addr): Use TOLOWER instead of tolower, ISXDIGIT
4858 instead of isxdigit and ISDIGIT instead of isdigit.
4859
4860 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4861
4862 * gdbtypes.h (struct type) <field>: New method.
4863 (TYPE_FIELDS): Remove, replace all uses with either type::fields
4864 or type::field.
4865
4866 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4867
4868 * gdbtypes.h (struct type) <fields, set_fields>: New methods.
4869 (TYPE_FIELDS): Use type::fields. Change all call sites that
4870 modify the propery to use type::set_fields instead.
4871
4872 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4873
4874 * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
4875 type::num_fields instead.
4876
4877 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4878
4879 * gdbtypes.h (struct type) <num_fields, set_num_fields>: New
4880 methods.
4881 (TYPE_NFIELDS): Use type::num_fields. Change all call sites
4882 that modify the number of fields to use type::set_num_fields
4883 instead.
4884
4885 2020-05-22 Tom Tromey <tromey@adacore.com>
4886
4887 * compile/compile-object-load.h (munmap_list_free): Don't
4888 declare.
4889
4890 2020-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
4891
4892 * annotate.c (annotate_source_line): Update return type, add call
4893 to update current symtab and line.
4894 * annotate.h (annotate_source_line): Update return type, and
4895 extend header comment.
4896 * source.c (info_line_command): Check annotation_level before
4897 calling annotate_source_line.
4898 * stack.c (print_frame_info): If calling annotate_source_line
4899 returns true, then don't print any other source line information.
4900
4901 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
4902
4903 * lm32-tdep.c (lm32_register_reggroup_p): Fix condition.
4904
4905 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
4906
4907 * coffread.c (patch_type): Remove NULL check before xfree.
4908 * corefile.c (set_gnutarget): Likewise.
4909 * cp-abi.c (set_cp_abi_as_auto_default): Likewise.
4910 * exec.c (build_section_table): Likewise.
4911 * remote.c (remote_target::pass_signals): Likewise.
4912 * utils.c (n_spaces): Likewise.
4913 * cli/cli-script.c (document_command): Likewise.
4914 * i386-windows-tdep.c (core_process_module_section): Likewise.
4915 * linux-fork.c (struct fork_info) <~fork_info>: Likewise.
4916
4917 2020-05-20 Simon Marchi <simon.marchi@efficios.com>
4918
4919 * symfile.c (reread_symbols): Clear objfile's section_offsets
4920 vector and section indices, re-compute them by calling
4921 sym_offsets.
4922
4923 2020-05-20 Tom Tromey <tromey@adacore.com>
4924
4925 * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove.
4926 (desc_one_bound, desc_index_type): Compute field name.
4927
4928 2020-05-20 Tom de Vries <tdevries@suse.de>
4929
4930 PR symtab/25833
4931 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index.
4932
4933 2020-05-20 Alan Modra <amodra@gmail.com>
4934
4935 PR 25993
4936 * solib-darwin.c (darwin_bfd_open): Don't strdup pathname for
4937 bfd_set_filename.
4938 * solib-aix.c (solib_aix_bfd_open): Use std::string for name
4939 passed to bfd_set_filename.
4940 * symfile-mem.c (add_vsyscall_page): Likewise for string
4941 passed to symbol_file_add_from_memory.
4942 (symbol_file_add_from_memory): Make name param a const char* and
4943 don't strdup.
4944
4945 2020-05-20 Alan Modra <amodra@gmail.com>
4946
4947 * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename
4948 rather than accessing bfd->filename directly.
4949 * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise,
4950 and use bfd_section_name.
4951 * dwarf2/frame.c (decode_frame_entry): Likewise.
4952 * exec.c (exec_set_section_address): Likewise.
4953 * solib-aix.c (solib_aix_bfd_open): Likewise.
4954 * stap-probe.c (get_stap_base_address): Likewise.
4955 * symfile.c (reread_symbols): Likewise.
4956
4957 2020-05-19 Tom Tromey <tromey@adacore.com>
4958
4959 * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
4960
4961 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4962
4963 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
4964
4965 2020-05-19 Pedro Alves <palves@redhat.com>
4966
4967 * NEWS (set exec-file-mismatch): Adjust entry.
4968 * exec.c: Include "build-id.h".
4969 (validate_exec_file): Try to match build IDs instead of filenames.
4970 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
4971 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
4972 and pass down 'warn_if_slow'.
4973 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
4974 gdb_bfd_open_closure to pass it down.
4975 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
4976
4977 2020-05-19 Pedro Alves <palves@redhat.com>
4978
4979 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
4980 * target.c (target_fileio_open_1): Rename to target_fileio_open
4981 and make extern. Use bool.
4982 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
4983 (target_fileio_read_alloc_1): Adjust.
4984 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
4985 (target_fileio_open_warn_if_slow): Delete declaration.
4986
4987 2020-05-19 Pedro Alves <palves@redhat.com>
4988
4989 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
4990 Adjust all callers.
4991
4992 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
4993
4994 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
4995 whether disp is negative.
4996
4997 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4998
4999 * symfile.h (struct symfile_segment_data)
5000 <~symfile_segment_data>: Remove.
5001 <segment_info>: Change to std::vector.
5002 * symfile.c (default_symfile_segments): Update.
5003 * elfread.c (elf_symfile_segments): Update.
5004
5005 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
5006
5007 * symfile.h (struct symfile_segment_data) <struct segment>: New.
5008 <segments>: New.
5009 <segment_bases, segment_sizes>: Remove.
5010 * symfile.c (default_symfile_segments): Update.
5011 * elfread.c (elf_symfile_segments): Update.
5012 * remote.c (remote_target::get_offsets): Update.
5013 * solib-target.c (solib_target_relocate_section_addresses):
5014 Update.
5015
5016 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
5017
5018 * symfile.h (struct symfile_segment_data): Initialize fields.
5019 <~symfile_segment_data>: Add.
5020 (symfile_segment_data_up): New.
5021 (struct sym_fns) <sym_segments>: Return a
5022 symfile_segment_data_up.
5023 (default_symfile_segments): Return a symfile_segment_data_up.
5024 (free_symfile_segment_data): Remove.
5025 (get_symfile_segment_data): Return a symfile_segment_data_up.
5026 * symfile.c (default_symfile_segments): Likewise.
5027 (get_symfile_segment_data): Likewise.
5028 (free_symfile_segment_data): Remove.
5029 (symfile_find_segment_sections): Update.
5030 * elfread.c (elf_symfile_segments): Return a
5031 symfile_segment_data_up.
5032 * remote.c (remote_target::get_offsets): Update.
5033 * solib-target.c (solib_target_relocate_section_addresses):
5034 Update.
5035 * symfile-debug.c (debug_sym_segments): Return a
5036 symfile_segment_data_up.
5037
5038 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5039
5040 PR build/25981
5041 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
5042 Hardcode register numbers.
5043
5044 PR build/25981
5045 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
5046 procfs_find_LDT_entry): Remove.
5047 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
5048 procfs_find_LDT_entry): Remove.
5049 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
5050 Remove.
5051
5052 2020-05-17 Pedro Alves <palves@redhat.com>
5053 Andrew Burgess <andrew.burgess@embecosm.com>
5054 Keno Fischer <keno@juliacomputing.com>
5055
5056 PR gdb/25741
5057 * breakpoint.c (build_target_condition_list): Update comments.
5058 (build_target_command_list): Update comments and skip matching
5059 locations.
5060 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
5061 a separate function. Simplify "set breakpoint auto-hw off"
5062 handling.
5063 (insert_breakpoints): Update comment.
5064 (tracepoint_locations_match): New parameter. For breakpoints,
5065 compare location types too, if the caller wants to.
5066 (handle_automatic_hardware_breakpoints): New functions.
5067 (bp_location_is_less_than): Also sort by location type and
5068 hardware breakpoint length.
5069 (update_global_location_list): Handle "set breakpoint auto-hw on"
5070 here.
5071 (update_breakpoint_locations): Ask breakpoint_locations_match to
5072 ignore location types.
5073
5074 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
5075
5076 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
5077 type::name instead.
5078
5079 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
5080
5081 * gdbtypes.h (struct type) <name, set_name>: New methods.
5082 (TYPE_CODE): Use type::name. Change all call sites used to set
5083 the name to use type::set_name instead.
5084
5085 2020-05-16 Tom Tromey <tom@tromey.com>
5086
5087 * top.c (quit_force): Update.
5088 * infrun.c (handle_no_resumed): Update.
5089 * top.h (all_uis): New function.
5090 (ALL_UIS): Remove.
5091
5092 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
5093
5094 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
5095
5096 2020-05-16 Pedro Alves <palves@redhat.com>
5097
5098 * ia64-linux-nat.c
5099 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
5100 Declare method.
5101 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
5102
5103 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
5104
5105 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
5106 (sparc64_adi_info): Likewise.
5107
5108 2020-05-15 Tom Tromey <tom@tromey.com>
5109
5110 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
5111 block_objfile.
5112 (lookup_objfile_from_block): Remove.
5113 (lookup_symbol_in_block, lookup_symbol_in_static_block)
5114 (lookup_global_symbol): Use block_objfile.
5115 * symtab.h (lookup_objfile_from_block): Don't declare.
5116 * printcmd.c (clear_dangling_display_expressions): Use
5117 block_objfile.
5118 * parse.c (operator_check_standard): Use block_objfile.
5119
5120 2020-05-15 Tom Tromey <tom@tromey.com>
5121
5122 * language.c (language_alloc_type_symbol): Set
5123 SYMBOL_SECTION.
5124 * symtab.c (initialize_objfile_symbol): Remove.
5125 (allocate_symbol): Remove.
5126 (allocate_template_symbol): Remove.
5127 * dwarf2/read.c (fixup_go_packaging): Use "new".
5128 (new_symbol): Use "new".
5129 (read_variable): Don't call initialize_objfile_symbol. Use
5130 "new".
5131 (read_func_scope): Use "new".
5132 * xcoffread.c (process_xcoff_symbol): Don't call
5133 initialize_objfile_symbol.
5134 (SYMBOL_DUP): Remove.
5135 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
5136 "new".
5137 * symtab.h (allocate_symbol, initialize_objfile_symbol)
5138 (allocate_template_symbol): Don't declare.
5139 (struct symbol): Add copy constructor. Change defaults.
5140 * jit.c (finalize_symtab): Use "new".
5141 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
5142 Use "new".
5143 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
5144 (common_block_end): Use "new".
5145 * mdebugread.c (parse_symbol): Use "new".
5146 (new_symbol): Likewise.
5147
5148 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5149
5150 * NEWS: Mention changes to help and apropos.
5151
5152 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5153
5154 * command.h (enum command_class): Improve comments, document
5155 that class_alias is for user-defined aliases, give the class
5156 name for each class, remove unused class_xdb.
5157 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
5158 * breakpoint.c (_initialize_breakpoint): Replace class_alias
5159 by a precise class.
5160 * infcmd.c (_initialize_infcmd): Likewise.
5161 * reverse.c (_initialize_reverse): Likewise.
5162 * stack.c (_initialize_stack): Likewise.
5163 * symfile.c (_initialize_symfile): Likewise.
5164 * tracepoint.c (_initialize_tracepoint): Likewise.
5165
5166 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5167
5168 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
5169 when their aliased command is traversed.
5170 (help_cmd): Add fput_command_names_styled call to
5171 output command name and aliases when command has an alias.
5172
5173 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5174
5175 * cli/cli-decode.h (help_cmd_list): Remove declaration.
5176 * cli/cli-decode.c (help_cmd_list): Declare as static,
5177 remove prefix argument, use bool for recurse arg, rework to show the aliases of
5178 a command together with the command.
5179 (fput_command_name_styled, fput_command_names_styled): New functions.
5180 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
5181 fput_command_name_styled.
5182 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
5183 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
5184
5185 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5186
5187 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
5188 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
5189 * command.h (cmd_show_list): Likewise.
5190 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
5191 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
5192
5193 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5194
5195 * unittests/command-def-selftests.c (traverse_command_structure):
5196 Verify all commands of a list have the same prefix command and
5197 that only the top cmdlist commands have a null prefix.
5198
5199 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5200
5201 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
5202 as prefix, not one of its aliases.
5203 (set_cmd_prefix): Remove.
5204 (do_add_cmd): Centralize the setting of the prefix of a command, when
5205 command is defined after its full chain of prefix commands.
5206 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
5207 (add_setshow_cmd_full): Likewise.
5208 (update_prefix_field_of_prefixed_commands): New function.
5209 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
5210 update_prefix_field_of_prefixed_commands.
5211 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
5212 addresses of remote_set_cmdlist and remote_show_cmdlist given
5213 as argument, not the address of an argument.
5214 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
5215 * gdb/remote.c (_initialize_remote): Likewise.
5216
5217 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5218
5219 * cli/cli-cmds.c (alias_command): Check for an existing alias
5220 using lookup_cmd_composition, as valid_command_p is too strict
5221 and forbids aliases that are the prefix of an existing alias
5222 or command.
5223 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
5224 command is properly recognised as a valid command.
5225
5226 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5227
5228 * unittests/help-doc-selftests.c: Rename to
5229 unittests/command-def-selftests.c
5230 * unittests/command-def-selftests.c (help_doc_tests): Update some
5231 comments.
5232 (command_structure_tests, traverse_command_structure): New namespace
5233 and function.
5234 (command_structure_invariants_tests): New function.
5235 (_initialize_command_def_selftests) Renamed from
5236 _initialize_help_doc_selftests, register command_structure_invariants
5237 selftest.
5238
5239 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5240
5241 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
5242 an alias of 'show'.
5243
5244 2020-05-15 Joel Brobecker <brobecker@adacore.com>
5245
5246 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
5247 ada_is_fixed_point_type. Update all callers.
5248 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
5249 all callers.
5250 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
5251 Update all callers.
5252 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
5253 print_fixed_point_type. Update all callers.
5254 * ada-valprint.c (ada_value_print_num): Replace call to
5255 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
5256
5257 2020-05-14 Kevin Buettner <kevinb@redhat.com>
5258
5259 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
5260 processors.
5261 (cpu_supports_bts): Add CV_AMD case.
5262
5263 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
5264 Simon Marchi <simon.marchi@efficios.com>
5265
5266 * infrun.c (stop_all_threads): Collect multiple wait events at
5267 each pass.
5268
5269 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
5270
5271 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
5272 type::code instead.
5273
5274 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
5275
5276 * gdbtypes.h (struct type) <code, set_code>: New methods.
5277 (TYPE_CODE): Use type::code. Change all call sites used to set
5278 the code to use type::set_code instead.
5279
5280 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5281 Tom de Vries <tdevries@suse.de>
5282 Pedro Alves <palves@redhat.com>
5283
5284 PR threads/25478
5285 * infrun.c (stop_all_threads): Do NOT ignore
5286 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
5287 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
5288 received.
5289 (handle_no_resumed): Remove code handling a live inferior with no
5290 threads.
5291 * remote.c (has_single_non_exited_thread): New.
5292 (remote_target::update_thread_list): Do not delete a thread if is
5293 the last thread of the process.
5294 * thread.c (thread_select): Call delete_exited_threads instead of
5295 prune_threads.
5296
5297 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5298
5299 * infrun.c (stop_all_threads): Enable/disable thread events of all
5300 targets. Move a debug message denoting the end of the function
5301 into the SCOPED_EXIT block.
5302
5303 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5304
5305 * process-stratum-target.h: Include <set>.
5306 (all_non_exited_process_targets, switch_to_target_no_thread): New
5307 function declarations.
5308 * process-stratum-target.c (all_non_exited_process_targets)
5309 (switch_to_target_no_thread): New function implementations.
5310
5311 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5312
5313 * infrun.c (handle_inferior_event): Extract out a piece of code
5314 into...
5315 (mark_non_executing_threads): ...this new function.
5316
5317 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5318
5319 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
5320 use.
5321
5322 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5323
5324 * regcache.c (regcache_read_pc_protected): New function
5325 implementation that returns 0 if the PC cannot read via
5326 'regcache_read_pc'.
5327 * infrun.c (proceed): Call 'regcache_read_pc_protected'
5328 instead of 'regcache_read_pc'.
5329 (keep_going_pass_signal): Ditto.
5330
5331 2020-05-13 Tom Tromey <tromey@adacore.com>
5332
5333 * ada-lang.c (align_value): Remove.
5334 (ada_template_to_fixed_record_type_1): Use align_up.
5335
5336 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5337
5338 * async-event.c: Update the copyright year.
5339 * async-event.h: Update the copyright year.
5340
5341 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
5342
5343 * objfiles.h (is_addr_in_objfile,
5344 shared_objfile_contains_address_p): Return bool.
5345 * objfile.c (is_addr_in_objfile,
5346 shared_objfile_contains_address_p): Return bool.
5347
5348 2020-05-11 Tom Tromey <tromey@adacore.com>
5349
5350 * cli/cli-cmds.c (info_command): Restore.
5351 (_initialize_cli_cmds): Use add_prefix_command for "info".
5352 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
5353
5354 2020-05-11 Tom Tromey <tromey@adacore.com>
5355
5356 * ada-lang.c (ada_value_primitive_field): Now public.
5357 * ada-lang.h (ada_value_primitive_field): Declare.
5358 * ada-valprint.c (print_field_values): Use
5359 ada_value_primitive_field for wrapper fields.
5360
5361 2020-05-11 Tom de Vries <tdevries@suse.de>
5362
5363 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
5364 MODULE_DOMAIN.
5365
5366 2020-05-11 Tom de Vries <tdevries@suse.de>
5367
5368 PR symtab/25941
5369 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
5370 with length 0, if not gdb-produced.
5371 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
5372
5373 2020-05-09 Tom de Vries <tdevries@suse.de>
5374
5375 PR gdb/25955
5376 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
5377 calculation.
5378
5379 2020-05-09 Tom Tromey <tom@tromey.com>
5380
5381 * top.c (server_command): Now bool.
5382 * top.h (server_command): Now bool.
5383
5384 2020-05-08 Tom Tromey <tromey@adacore.com>
5385
5386 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
5387 already being processed.
5388
5389 2020-05-08 Tom Tromey <tom@tromey.com>
5390
5391 * printcmd.c (struct display) <next>: Remove.
5392 <display>: New constructor.
5393 <exp_string>: Now a std::string.
5394 <enabled_p>: Now a bool.
5395 (display_number): Move definition earlier.
5396 (displays): Rename from display_chain. Now a std::vector.
5397 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
5398 (display_command): Update.
5399 (do_one_display, disable_display)
5400 (enable_disable_display_command, do_enable_disable_display):
5401 Update.
5402 (free_display): Remove.
5403 (clear_displays): Rewrite.
5404 (delete_display): Update.
5405 (map_display_numbers): Use function_view. Remove "data"
5406 parameter. Update.
5407 (do_delete_display): Remove.
5408 (undisplay_command): Update.
5409 (do_one_display, do_displays, disable_display)
5410 (info_display_command): Update.
5411 (do_enable_disable_display): Remove.
5412 (enable_disable_display_command)
5413 (clear_dangling_display_expressions): Update.
5414
5415 2020-05-08 Tom Tromey <tom@tromey.com>
5416
5417 * symtab.c (set_symbol_cache_size)
5418 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
5419 (maintenance_print_symbol_cache_statistics): Update.
5420 * symmisc.c (print_symbol_bcache_statistics)
5421 (print_objfile_statistics, maintenance_print_objfiles)
5422 (maintenance_info_symtabs, maintenance_check_symtabs)
5423 (maintenance_expand_symtabs, maintenance_info_line_tables):
5424 Update.
5425 * symfile-debug.c (set_debug_symfile): Update.
5426 * source.c (forget_cached_source_info): Update.
5427 * python/python.c (gdbpy_progspaces): Update.
5428 * psymtab.c (maintenance_info_psymtabs): Update.
5429 * probe.c (parse_probes): Update.
5430 * linespec.c (iterate_over_all_matching_symtabs)
5431 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
5432 * guile/scm-progspace.c (gdbscm_progspaces): Update.
5433 * exec.c (exec_target::close): Update.
5434 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
5435 * breakpoint.c (print_one_breakpoint_location)
5436 (create_longjmp_master_breakpoint)
5437 (create_std_terminate_master_breakpoint): Update.
5438 * progspace.c (program_spaces): Now a std::vector.
5439 (maybe_new_address_space): Update.
5440 (add_program_space): Remove.
5441 (program_space::program_space): Update.
5442 (remove_program_space): Update.
5443 (number_of_program_spaces): Remove.
5444 (print_program_space, update_address_spaces): Update.
5445 * progspace.h (program_spaces): Change type.
5446 (ALL_PSPACES): Remove.
5447 (number_of_program_spaces): Don't declare.
5448 (struct program_space) <next>: Remove.
5449
5450 2020-05-08 Tom Tromey <tom@tromey.com>
5451
5452 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
5453 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
5454 (enable_break): Update.
5455 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
5456 (frv_fdpic_find_canonical_descriptor): Update.
5457 (frv_fetch_objfile_link_map): Update.
5458 * progspace.c (program_space::free_all_objfiles): Update.
5459 (program_space::solibs): New method.
5460 * progspace.h (struct program_space) <solibs>: New method.
5461 * solist.h (master_so_list): Don't declare.
5462 (ALL_SO_LIBS): Remove.
5463 * solib.h (so_list_head): Remove.
5464 (update_solib_list): Update comment.
5465 * solib.c (master_so_list): Remove.
5466 (solib_used, update_solib_list, solib_add)
5467 (info_sharedlibrary_command, clear_solib)
5468 (reload_shared_libraries_1, remove_user_added_objfile): Update.
5469
5470 2020-05-08 Tom Tromey <tom@tromey.com>
5471
5472 * extension.c (extension_languages): Now a std::array.
5473 (ALL_EXTENSION_LANGUAGES): Remove.
5474 (get_ext_lang_defn, get_ext_lang_of_file)
5475 (eval_ext_lang_from_control_command): Update.
5476 (finish_ext_lang_initialization)
5477 (auto_load_ext_lang_scripts_for_objfile)
5478 (ext_lang_type_printers::ext_lang_type_printers)
5479 (apply_ext_lang_type_printers)
5480 (ext_lang_type_printers::~ext_lang_type_printers)
5481 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
5482 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
5483 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
5484 (get_matching_xmethod_workers, ext_lang_colorize)
5485 (ext_lang_before_prompt): Update.
5486 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
5487
5488 2020-05-08 Tom Tromey <tom@tromey.com>
5489
5490 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
5491 overload.
5492 <swap_string, m_string>: Remove.
5493 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
5494 Update.
5495 * stabsread.c (define_symbol, read_type): Update.
5496 * linespec.c (find_linespec_symbols): Update.
5497 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
5498 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
5499 * dbxread.c (read_dbx_symtab): Update.
5500 * cp-support.h (cp_canonicalize_string_full)
5501 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
5502 Return unique_xmalloc_ptr.
5503 * cp-support.c (inspect_type): Update.
5504 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
5505 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
5506 Likewise.
5507 * c-typeprint.c (print_name_maybe_canonical): Update.
5508 * break-catch-throw.c (check_status_exception_catchpoint):
5509 Update.
5510
5511 2020-05-08 Tom de Vries <tdevries@suse.de>
5512
5513 * infrun.c (follow_fork): Copy current_line and current_symtab to
5514 child thread.
5515
5516 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
5517
5518 * async-event.c (struct async_signal_handler, struct
5519 async_event_handler): Reformat, remove typedef.
5520
5521 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
5522
5523 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
5524 access thistype->main_type->dyn_prop_list directly.
5525
5526 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
5527
5528 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
5529 (remove_dyn_prop): Remove. Update all users to use
5530 type::remove_dyn_prop.
5531 * gdbtypes.c (remove_dyn_prop): Rename to...
5532 (type::remove_dyn_prop): ... this.
5533
5534 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
5535
5536 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
5537 (add_dyn_prop): Remove. Update all users to use
5538 type::add_dyn_prop.
5539 * gdbtypes.c (add_dyn_prop): Rename to...
5540 (type::add_dyn_prop): ... this.
5541
5542 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
5543
5544 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
5545 (get_dyn_prop): Remove. Update all users to use
5546 type::dyn_prop.
5547 * gdbtypes.c (get_dyn_prop): Rename to...
5548 (type::dyn_prop): ... this.
5549
5550 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
5551
5552 * gdbtypes.h (struct main_type) <flag_static>: Remove.
5553
5554 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
5555
5556 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
5557 instruction, skip it if it's there.
5558
5559 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
5560
5561 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
5562
5563 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
5564
5565 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
5566 * gdbtypes.c (recursive_dump_type): Remove use of
5567 TYPE_INCOMPLETE.
5568
5569 2020-05-03 Tom Tromey <tom@tromey.com>
5570
5571 * breakpoint.c (catch_command, tcatch_command): Remove.
5572 (_initialize_breakpoint): Use add_basic_prefix_cmd,
5573 add_show_prefix_cmd.
5574 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
5575 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5576 Remove.
5577 (add_internal_problem_command): Use add_basic_prefix_cmd,
5578 add_show_prefix_cmd.
5579 * mips-tdep.c (set_mipsfpu_command): Remove.
5580 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
5581 * dwarf2/index-cache.c (set_index_cache_command): Remove.
5582 (_initialize_index_cache): Use add_basic_prefix_cmd.
5583 * memattr.c (dummy_cmd): Remove.
5584 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
5585 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
5586 (_initialize_tui_win): Use add_basic_prefix_cmd,
5587 add_show_prefix_cmd.
5588 * cli/cli-logging.c (set_logging_command): Remove.
5589 (_initialize_cli_logging): Use add_basic_prefix_cmd,
5590 add_show_prefix_cmd.
5591 (show_logging_command): Remove.
5592 * target.c (target_command): Remove.
5593 (add_target): Use add_basic_prefix_cmd.
5594
5595 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
5596
5597 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
5598
5599 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5600
5601 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
5602 info_command.
5603
5604 2020-04-30 Kamil Rytarowski <n54@gmx.com>
5605
5606 * nbsd-nat.c (nbsd_enable_proc_events)
5607 (nbsd_nat_target::post_startup_inferior): Add.
5608 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
5609 (nbsd_nat_target::update_thread_list): Rewrite.
5610 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
5611 "PTRACE_LWP_CREATE".
5612 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
5613
5614 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5615
5616 * stack.c (_initialize_stack): Remove duplicated creation
5617 of "frame" command and "f" alias.
5618
5619 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
5620
5621 PR gdb/18706
5622 * gdbtypes.c (check_typedef): Calculate size of array of
5623 stubbed type.
5624
5625 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
5626
5627 PR gdb/15559
5628 * i386-tdep.c (i386_push_dummy_call): Call
5629 i386_thiscall_push_dummy_call.
5630 (i386_thiscall_push_dummy_call): New function.
5631 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
5632 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
5633 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
5634
5635 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5636
5637 * gdbarch.sh (do_read): Add shellcheck disable directive for
5638 warning SC2162.
5639
5640 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5641
5642 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
5643 "referenced but not assigned" warning.
5644
5645 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5646
5647 * gdbarch.sh: Remove code that sets fallbackdefault.
5648
5649 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5650
5651 * gdbarch.sh: Use shell operators && and || instead of
5652 -a and -o.
5653
5654 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5655
5656 * gdbarch.sh: Use $(...) instead of `...`.
5657
5658 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5659
5660 * gdbarch.sh: Use double quotes around variables.
5661
5662 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5663
5664 * gdbarch.sh: Use %s with printf, instead of variables in the
5665 format string.
5666
5667 2020-04-29 Tom Tromey <tromey@adacore.com>
5668
5669 PR ada/25875:
5670 * dwarf2/read.c (update_enumeration_type_from_children): Compute
5671 type fields here.
5672 (read_enumeration_type): Call
5673 update_enumeration_type_from_children later. Update comments.
5674 (process_enumeration_scope): Don't create type fields.
5675
5676 2020-04-29 Kamil Rytarowski <n54@gmx.com>
5677
5678 * nbsd-tdep.c: Include "xml-syscall.h".
5679 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
5680
5681 2020-04-29 Kamil Rytarowski <n54@gmx.com>
5682
5683 * nbsd-nat.c: Include "sys/wait.h".
5684 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
5685 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
5686 (nbsd_nat_target::remove_exec_catchpoint)
5687 (nbsd_nat_target::set_syscall_catchpoint): Add.
5688 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
5689 (nbsd_nat_target::insert_exec_catchpoint)
5690 (nbsd_nat_target::remove_exec_catchpoint)
5691 (nbsd_nat_target::set_syscall_catchpoint): Add.
5692 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
5693 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
5694 `nbsd_get_syscall_number'.
5695
5696 2020-04-29 Tom Tromey <tom@tromey.com>
5697
5698 * stack.c (print_block_frame_labels): Remove.
5699
5700 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
5701
5702 PR gdb/17320
5703 * ada-valprint.c (val_print_packed_array_elements): Move array
5704 end bracket to new line.
5705 (ada_val_print_string): Remove extra spaces before first array
5706 element.
5707 * c-valprint.c (c_value_print_array): Likewise.
5708 * m2-valprint.c (m2_print_array_contents): Likewise.
5709 (m2_value_print_inner): Likewise.
5710 * p-valprint.c (pascal_value_print_inner): Likewise.
5711 * valprint.c (generic_val_print_array): Likewise.
5712 (value_print_array_elements): Move first array element and array
5713 end bracket to new line.
5714
5715 2020-04-29 Tom de Vries <tdevries@suse.de>
5716
5717 PR symtab/25889
5718 * linespec.c (find_method): Fix ix calculation.
5719
5720 2020-04-28 Kamil Rytarowski <n54@gmx.com>
5721
5722 * syscalls/update-netbsd.sh: New file.
5723 * syscalls/netbsd.xml: Regenerate.
5724 * data-directory/Makefile.in: Register `netbsd.xml' in
5725 `SYSCALLS_FILES'.
5726
5727 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
5728
5729 * syscalls/update-freebsd.sh: Add double quotes.
5730
5731 2020-04-28 Tom Tromey <tom@tromey.com>
5732
5733 * NEWS: Update.
5734 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
5735 (cmdpy_init): Allow class_tui.
5736
5737 2020-04-28 Mark Williams <mark@myosotissp.com>
5738
5739 PR gdb/24480
5740 * dwarf2read.c: Add missing assingments to list_in_scope when
5741 start_symtab was already called.
5742
5743 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
5744
5745 PR gdb/25881
5746 * dwarf2/read.c (offset_map_type): Use
5747 gdb:hash_enum<sect_offset> as hash function.
5748
5749 2020-04-28 Tom de Vries <tdevries@suse.de>
5750
5751 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
5752 with DW_AT_signature.
5753
5754 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
5755
5756 * configure.ac: Remove check for fs_base/gs_base in
5757 user_regs_struct.
5758 * configure: Re-generate.
5759 * config.in: Re-generate.
5760 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
5761 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
5762 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
5763
5764 2020-04-27 Luis Machado <luis.machado@linaro.org>
5765
5766 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
5767 problematic inline frame unwinding situation.
5768 * frame.c (frame_id_computed_p): New function.
5769 * frame.h (frame_id_computed_p): New prototype.
5770
5771 2020-04-26 Tom Tromey <tom@tromey.com>
5772
5773 * command.h (enum command_class) <class_pseudo>: Remove.
5774
5775 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5776
5777 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
5778 and whitespace.
5779
5780 2020-04-25 Kamil Rytarowski <n54@gmx.com>
5781
5782 * inf-ptrace.c (inf_ptrace_target::wait): Remove
5783 `PT_GET_PROCESS_STATE' block.
5784
5785 2020-04-24 Tom Tromey <tom@tromey.com>
5786
5787 * symtab.h (symbol_get_demangled_name): Don't declare.
5788 * symtab.c (symbol_get_demangled_name): Remove.
5789 (general_symbol_info::natural_name)
5790 (general_symbol_info::demangled_name): Update.
5791
5792 2020-04-24 Tom Tromey <tom@tromey.com>
5793
5794 PR rust/25025:
5795 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
5796
5797 2020-04-24 Tom Tromey <tom@tromey.com>
5798
5799 PR symtab/12707:
5800 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
5801 exists.
5802 (new_symbol): Likewise.
5803 * compile/compile-object-load.c (get_out_value_type): Use
5804 symbol_matches_search_name.
5805
5806 2020-04-24 Tom Tromey <tom@tromey.com>
5807
5808 * dwarf2/read.c (add_partial_symbol): Do not call
5809 compute_and_set_names.
5810
5811 2020-04-24 Tom Tromey <tom@tromey.com>
5812
5813 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
5814 overload.
5815
5816 2020-04-24 Tom Tromey <tom@tromey.com>
5817
5818 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
5819 (add_psymbol_to_list): New overload. Make old overload call new
5820 one.
5821 * psympriv.h (add_psymbol_to_list): New overload.
5822
5823 2020-04-24 Tom Tromey <tom@tromey.com>
5824
5825 * dwarf2/read.c (partial_die_info::read) <case
5826 DW_AT_linkage_name>: Use value_as_string.
5827 (dwarf2_string_attr): Use value_as_string.
5828 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
5829 method.
5830 * dwarf2/attribute.c (attribute::value_as_string): New method.
5831
5832 2020-04-24 Tom Tromey <tom@tromey.com>
5833
5834 * symtab.c (general_symbol_info::natural_name)
5835 (general_symbol_info::demangled_name): Check for language_rust.
5836
5837 2020-04-24 Tom Tromey <tom@tromey.com>
5838
5839 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
5840 (dwarf2_physname): ... from here.
5841 (partial_die_info::read): Add Rust "{" hack.
5842
5843 2020-04-24 Tom Tromey <tom@tromey.com>
5844
5845 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
5846 method.
5847 (symbol_set_demangled_name): Don't declare.
5848 * symtab.c (general_symbol_info::set_demangled_name): Rename from
5849 symbol_set_demangled_name.
5850 (general_symbol_info::set_language)
5851 (general_symbol_info::compute_and_set_names): Update.
5852 * minsyms.c (minimal_symbol_reader::install): Update.
5853 * dwarf2/read.c (new_symbol): Update.
5854
5855 2020-04-24 Tom Tromey <tromey@adacore.com>
5856
5857 PR python/23662:
5858 * python/py-type.c (convert_field): Handle
5859 FIELD_LOC_KIND_DWARF_BLOCK.
5860 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
5861 (typy_get_dynamic): Nw function.
5862 (type_object_getset): Add "dynamic".
5863 * NEWS: Add entry.
5864
5865 2020-04-24 Tom Tromey <tromey@adacore.com>
5866
5867 * ada-typeprint.c (print_choices, print_variant_part)
5868 (print_record_field_types_dynamic): New functions.
5869 (print_record_field_types): Use print_record_field_types_dynamic.
5870
5871 2020-04-24 Tom Tromey <tromey@adacore.com>
5872
5873 * dwarf2/read.c (handle_data_member_location): New overload.
5874 (dwarf2_add_field): Use it.
5875 (decode_locdesc): Add "computed" parameter. Update comment.
5876 * gdbtypes.c (is_dynamic_type_internal): Also look for
5877 FIELD_LOC_KIND_DWARF_BLOCK.
5878 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
5879 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
5880 virtual base classes.
5881 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
5882 FIELD_LOC_KIND_DWARF_BLOCK.
5883
5884 2020-04-24 Tom Tromey <tromey@adacore.com>
5885
5886 * dwarf2/read.c (read_structure_type): Handle dynamic length.
5887 * gdbtypes.c (is_dynamic_type_internal): Check
5888 TYPE_HAS_DYNAMIC_LENGTH.
5889 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
5890 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
5891 New macros.
5892 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
5893 constant.
5894
5895 2020-04-24 Tom Tromey <tromey@adacore.com>
5896
5897 * dwarf2/read.c (struct variant_field): Rewrite.
5898 (struct variant_part_builder): New.
5899 (struct nextfield): Remove "variant" field. Add "offset".
5900 (struct field_info): Add "current_variant_part" and
5901 "variant_parts".
5902 (alloc_discriminant_info): Remove.
5903 (alloc_rust_variant): New function.
5904 (quirk_rust_enum): Update.
5905 (dwarf2_add_field): Set "offset" member. Don't handle
5906 DW_TAG_variant_part.
5907 (offset_map_type): New typedef.
5908 (convert_variant_range, create_one_variant)
5909 (create_one_variant_part, create_variant_parts)
5910 (add_variant_property): New functions.
5911 (dwarf2_attach_fields_to_type): Call add_variant_property.
5912 (read_structure_type): Don't handle DW_TAG_variant_part.
5913 (handle_variant_part, handle_variant): New functions.
5914 (handle_struct_member_die): Use them.
5915 (process_structure_scope): Don't handle variant parts.
5916 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
5917 (struct discriminant_info): Remove.
5918 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
5919 (struct main_type) <flag_discriminated_union>: Remove.
5920 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
5921 (rust_enum_variant): Return int. Remove "contents". Rewrite.
5922 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
5923 Update.
5924 * valops.c (value_union_variant): Remove.
5925 * value.h (value_union_variant): Don't declare.
5926
5927 2020-04-24 Tom Tromey <tromey@adacore.com>
5928
5929 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
5930 (ada_value_primitive_packed_val): Update.
5931 * ada-valprint.c (ada_value_print_1): Update.
5932 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
5933 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
5934 just an address. Use evaluate_for_locexpr_baton.
5935 (dwarf2_evaluate_property): Update.
5936 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
5937 array_view.
5938 * findvar.c (default_read_var_value): Update.
5939 * gdbtypes.c (compute_variant_fields_inner)
5940 (resolve_dynamic_type_internal): Update.
5941 (resolve_dynamic_type): Change type of valaddr parameter.
5942 * gdbtypes.h (resolve_dynamic_type): Update.
5943 * valarith.c (value_subscripted_rvalue): Update.
5944 * value.c (value_from_contents_and_address): Update.
5945
5946 2020-04-24 Tom Tromey <tromey@adacore.com>
5947
5948 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
5949 "push_initial_value" parameter.
5950 (dwarf2_evaluate_property): Likewise.
5951 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
5952
5953 2020-04-24 Tom Tromey <tromey@adacore.com>
5954
5955 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
5956 (variant::matches, compute_variant_fields_recurse)
5957 (compute_variant_fields_inner, compute_variant_fields): New
5958 functions.
5959 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
5960 Use resolved_type after type is made.
5961 (operator==): Add new cases.
5962 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
5963 (struct discriminant_range, struct variant, struct variant_part):
5964 New.
5965 (union dynamic_prop_data) <variant_parts, original_type>: New
5966 members.
5967 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
5968 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
5969 constants.
5970 * value.c (unpack_bits_as_long): Now public.
5971 * value.h (unpack_bits_as_long): Declare.
5972
5973 2020-04-24 Tom Tromey <tromey@adacore.com>
5974
5975 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
5976 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
5977
5978 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
5979
5980 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
5981
5982 2020-04-24 Kamil Rytarowski <n54@gmx.com>
5983
5984 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
5985 (remove_fork_catchpoint, post_startup_inferior)
5986 (post_attach): Move...
5987 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
5988 (remove_fork_catchpoint, post_startup_inferior)
5989 (post_attach): ...here.
5990 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
5991 (remove_fork_catchpoint, post_startup_inferior)
5992 (post_attach): Move...
5993 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
5994 (remove_fork_catchpoint, post_startup_inferior)
5995 (post_attach): ...here.
5996
5997 2020-04-24 Tom Tromey <tromey@adacore.com>
5998
5999 * nat/windows-nat.h (struct windows_thread_info)
6000 <pc_adjusted>: New member.
6001 * windows-nat.c (windows_fetch_one_register): Check
6002 pc_adjusted.
6003 (windows_nat_target::get_windows_debug_event)
6004 (windows_nat_target::wait): Set pc_adjusted.
6005
6006 2020-04-24 Tom de Vries <tdevries@suse.de>
6007
6008 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
6009 Run gdb-add-index inside temp dir.
6010
6011 2020-04-23 Tom Tromey <tromey@adacore.com>
6012
6013 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
6014 in loop.
6015
6016 2020-04-23 Luis Machado <luis.machado@linaro.org>
6017
6018 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
6019 get_frame_register instead of gdbarch_unwind_pc.
6020
6021 2020-04-23 Tom de Vries <tdevries@suse.de>
6022
6023 * symtab.c (lookup_global_symbol): Prefer def over decl.
6024
6025 2020-04-23 Tom de Vries <tdevries@suse.de>
6026
6027 PR symtab/25807
6028 * block.c (best_symbol, better_symbol): Promote to external.
6029 * block.h (best_symbol, better_symbol): Declare.
6030 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
6031 decl.
6032
6033 2020-04-23 Tom Tromey <tromey@adacore.com>
6034
6035 PR ada/25837:
6036 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
6037 "const char *", not a "const std::string &".
6038 <name_and_matcher::operator==>: Update.
6039 * unittests/lookup_name_info-selftests.c: Change type of
6040 "result".
6041
6042 2020-04-23 Tom Tromey <tom@tromey.com>
6043
6044 * inferior.h (iterate_over_inferiors): Don't declare.
6045 * inferior.c (iterate_over_inferiors): Remove.
6046 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
6047 Remove.
6048 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
6049 use iterate_over_inferiors.
6050 (darwin_resume_inferior_it)
6051 (struct resume_inferior_threads_param)
6052 (darwin_resume_inferior_threads_it): Remove.
6053 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
6054
6055 2020-04-23 Tom de Vries <tdevries@suse.de>
6056
6057 * blockframe.c (find_pc_partial_function): Use
6058 find_pc_sect_compunit_symtab rather than
6059 objfile->sf->qf->find_pc_sect_compunit_symtab.
6060
6061 2020-04-22 Tom de Vries <tdevries@suse.de>
6062
6063 PR symtab/25764
6064 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
6065 in psymtabs.
6066
6067 2020-04-22 Tom de Vries <tdevries@suse.de>
6068
6069 PR symtab/25801
6070 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
6071 symtabs.
6072
6073 2020-04-22 Tom de Vries <tdevries@suse.de>
6074
6075 PR symtab/25700
6076 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
6077 CU if already created.
6078
6079 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6080
6081 * infrun.c (displaced_step_fixup): Switch to the event_thread
6082 before calling displaced_step_restore, not after.
6083
6084 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
6085
6086 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
6087 its inferior is not recorded by us.
6088 (record_btrace_target_open): Replace call to
6089 all_non_exited_threads () with call to current_inferior
6090 ()->non_exited_threads ().
6091 (record_btrace_target::stop_recording): Likewise.
6092 (record_btrace_target::close): Likewise.
6093 (record_btrace_target::wait): Likewise.
6094 (record_btrace_target::record_stop_replaying): Likewise.
6095
6096 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
6097
6098 * btrace.c (btrace_enable): Throw an error on double enables and
6099 when enabling recording fails.
6100 (btrace_disable): Throw an error if the thread is not recorded.
6101
6102 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
6103
6104 * record-btrace.c (record_btrace_target::fetch_registers): Forward
6105 request if we do not have a thread_info.
6106
6107 2020-04-21 Tom de Vries <tdevries@suse.de>
6108
6109 PR gdb/25471
6110 * thread.c
6111 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
6112 exception in get_frame_id.
6113
6114 2020-04-20 Tom Tromey <tromey@adacore.com>
6115
6116 * python/python.c (struct gdbpy_event): Mark move constructor as
6117 noexcept.
6118 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
6119 constructor as noexcept.
6120 * completer.h (struct completion_result): Mark move constructor as
6121 noexcept.
6122 * completer.c (completion_result::completion_result): Use
6123 initialization style. Don't call reset_match_list.
6124
6125 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
6126
6127 * MAINTAINERS (Write After Approval): Add myself.
6128
6129 2020-04-18 Tom Tromey <tom@tromey.com>
6130
6131 * windows-tdep.c (init_w32_command_list)
6132 (w32_prefix_command_valid): Restore.
6133 (_initialize_windows_tdep): Call init_w32_command_list.
6134
6135 2020-04-18 Tom Tromey <tom@tromey.com>
6136
6137 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
6138 * value.c (value_fn_field): Update.
6139 * valops.c (find_function_in_inferior)
6140 (value_allocate_space_in_inferior): Update.
6141 * tui/tui-winsource.c (tui_update_source_windows_with_line):
6142 Update.
6143 * tui/tui-source.c (tui_source_window::set_contents): Update.
6144 * symtab.c (lookup_global_or_static_symbol)
6145 (find_function_start_sal_1, skip_prologue_sal)
6146 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
6147 * symmisc.c (dump_msymbols, dump_symtab_1)
6148 (maintenance_print_one_line_table): Update.
6149 * symfile.c (init_entry_point_info, section_is_mapped)
6150 (list_overlays_command, simple_read_overlay_table)
6151 (simple_overlay_update_1): Update.
6152 * stap-probe.c (handle_stap_probe): Update.
6153 * stabsread.c (dbx_init_float_type, define_symbol)
6154 (read_one_struct_field, read_enum_type, read_range_type): Update.
6155 * source.c (info_line_command): Update.
6156 * python/python.c (gdbpy_source_objfile_script)
6157 (gdbpy_execute_objfile_script): Update.
6158 * python/py-type.c (save_objfile_types): Update.
6159 * python/py-objfile.c (py_free_objfile): Update.
6160 * python/py-inferior.c (python_new_objfile): Update.
6161 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
6162 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
6163 (maintenance_check_psymtabs): Update.
6164 * printcmd.c (info_address_command): Update.
6165 * objfiles.h (struct objfile) <arch>: New method, from
6166 get_objfile_arch.
6167 (get_objfile_arch): Don't declare.
6168 * objfiles.c (get_objfile_arch): Remove.
6169 (filter_overlapping_sections): Update.
6170 * minsyms.c (msymbol_is_function): Update.
6171 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
6172 (output_nondebug_symbol): Update.
6173 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
6174 (mdebug_expand_psymtab): Update.
6175 * machoread.c (macho_add_oso_symfile): Update.
6176 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
6177 Update.
6178 * linux-fork.c (checkpoint_command): Update.
6179 * linespec.c (convert_linespec_to_sals): Update.
6180 * jit.c (finalize_symtab): Update.
6181 * infrun.c (insert_exception_resume_from_probe): Update.
6182 * ia64-tdep.c (ia64_find_unwind_table): Update.
6183 * hppa-tdep.c (internalize_unwinds): Update.
6184 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
6185 Update.
6186 * gcore.c (call_target_sbrk): Update.
6187 * elfread.c (record_minimal_symbol, elf_symtab_read)
6188 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
6189 (elf_gnu_ifunc_resolve_by_got): Update.
6190 * dwarf2/read.c (create_addrmap_from_index)
6191 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
6192 (read_debug_names_from_section)
6193 (process_psymtab_comp_unit_reader, add_partial_symbol)
6194 (add_partial_subprogram, process_full_comp_unit)
6195 (read_file_scope, read_func_scope, read_lexical_block_scope)
6196 (read_call_site_scope, dwarf2_ranges_read)
6197 (dwarf2_record_block_ranges, dwarf2_add_field)
6198 (mark_common_block_symbol_computed, read_tag_pointer_type)
6199 (read_tag_string_type, dwarf2_init_float_type)
6200 (dwarf2_init_complex_target_type, read_base_type)
6201 (partial_die_info::read, partial_die_info::read)
6202 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
6203 (dwarf2_fetch_die_loc_sect_off): Update.
6204 * dwarf2/loc.c (dwarf2_find_location_expression)
6205 (class dwarf_evaluate_loc_desc, rw_pieced_value)
6206 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
6207 (dwarf2_loc_desc_get_symbol_read_needs)
6208 (locexpr_describe_location_piece, locexpr_describe_location_1)
6209 (loclist_describe_location): Update.
6210 * dwarf2/index-write.c (write_debug_names): Update.
6211 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
6212 * dtrace-probe.c (dtrace_process_dof): Update.
6213 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
6214 (process_one_symbol): Update.
6215 * ctfread.c (ctf_init_float_type, read_base_type): Update.
6216 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
6217 (coff_read_enum_type): Update.
6218 * cli/cli-cmds.c (edit_command, list_command): Update.
6219 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
6220 * breakpoint.c (create_overlay_event_breakpoint)
6221 (create_longjmp_master_breakpoint)
6222 (create_std_terminate_master_breakpoint)
6223 (create_exception_master_breakpoint, get_sal_arch): Update.
6224 * block.c (block_gdbarch): Update.
6225 * annotate.c (annotate_source_line): Update.
6226
6227 2020-04-17 Tom Tromey <tromey@adacore.com>
6228
6229 * auto-load.c (show_auto_load_cmd): Remove.
6230 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
6231 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
6232 (maintenance_print_arc_command): Remove.
6233 * tui/tui-win.c (tui_command): Remove.
6234 (tui_get_cmd_list): Use add_basic_prefix_cmd.
6235 * tui/tui-layout.c (tui_layout_command): Remove.
6236 (_initialize_tui_layout): Use add_basic_prefix_cmd.
6237 * python/python.c (user_set_python, user_show_python): Remove.
6238 (_initialize_python): Use add_basic_prefix_cmd,
6239 add_show_prefix_cmd.
6240 * guile/guile.c (set_guile_command, show_guile_command): Remove.
6241 (install_gdb_commands): Use add_basic_prefix_cmd,
6242 add_show_prefix_cmd.
6243 (info_guile_command): Remove.
6244 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
6245 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
6246 add_show_prefix_cmd.
6247 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
6248 Remove do_set and do_show parameters.
6249 * cli/cli-style.c (set_style, show_style): Remove.
6250 (_initialize_cli_style): Use add_basic_prefix_cmd,
6251 add_show_prefix_cmd.
6252 (cli_style_option::add_setshow_commands): Remove do_set and
6253 do_show parameters.
6254 (cli_style_option::add_setshow_commands): Use
6255 add_basic_prefix_cmd, add_show_prefix_cmd.
6256 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
6257 (set_style_name): Remove.
6258 * cli/cli-dump.c (dump_command, append_command): Remove.
6259 (srec_dump_command, ihex_dump_command, verilog_dump_command)
6260 (tekhex_dump_command, binary_dump_command)
6261 (binary_append_command): Remove.
6262 (_initialize_cli_dump): Use add_basic_prefix_cmd.
6263 * windows-tdep.c (w32_prefix_command_valid): Remove global.
6264 (init_w32_command_list): Remove; move into ...
6265 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
6266 * valprint.c (set_print, show_print, set_print_raw)
6267 (show_print_raw): Remove.
6268 (_initialize_valprint): Use add_basic_prefix_cmd,
6269 add_show_prefix_cmd.
6270 * typeprint.c (set_print_type, show_print_type): Remove.
6271 (_initialize_typeprint): Use add_basic_prefix_cmd,
6272 add_show_prefix_cmd.
6273 * record.c (set_record_command, show_record_command): Remove.
6274 (_initialize_record): Use add_basic_prefix_cmd,
6275 add_show_prefix_cmd.
6276 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
6277 add_show_prefix_cmd.
6278 (info_command, show_command, set_debug, show_debug): Remove.
6279 * top.h (set_history, show_history): Don't declare.
6280 * top.c (set_history, show_history): Remove.
6281 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
6282 (unset_tdesc_cmd): Remove.
6283 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
6284 add_show_prefix_cmd.
6285 * symtab.c (info_module_command): Remove.
6286 (_initialize_symtab): Use add_basic_prefix_cmd.
6287 * symfile.c (overlay_command): Remove.
6288 (_initialize_symfile): Use add_basic_prefix_cmd.
6289 * sparc64-tdep.c (info_adi_command): Remove.
6290 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
6291 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
6292 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
6293 add_show_prefix_cmd.
6294 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
6295 (_initialize_serial): Use add_basic_prefix_cmd,
6296 add_show_prefix_cmd.
6297 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
6298 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
6299 add_show_prefix_cmd.
6300 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
6301 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
6302 add_show_prefix_cmd.
6303 * riscv-tdep.c (show_riscv_command, set_riscv_command)
6304 (show_debug_riscv_command, set_debug_riscv_command): Remove.
6305 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
6306 add_show_prefix_cmd.
6307 * remote.c (remote_command, set_remote_cmd): Remove.
6308 (_initialize_remote): Use add_basic_prefix_cmd.
6309 * record-full.c (set_record_full_command)
6310 (show_record_full_command): Remove.
6311 (_initialize_record_full): Use add_basic_prefix_cmd,
6312 add_show_prefix_cmd.
6313 * record-btrace.c (cmd_set_record_btrace)
6314 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
6315 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
6316 (cmd_show_record_btrace_pt): Remove.
6317 (_initialize_record_btrace): Use add_basic_prefix_cmd,
6318 add_show_prefix_cmd.
6319 * ravenscar-thread.c (set_ravenscar_command)
6320 (show_ravenscar_command): Remove.
6321 (_initialize_ravenscar): Use add_basic_prefix_cmd,
6322 add_show_prefix_cmd.
6323 * mips-tdep.c (show_mips_command, set_mips_command)
6324 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
6325 add_show_prefix_cmd.
6326 * maint.c (maintenance_command, maintenance_info_command)
6327 (maintenance_check_command, maintenance_print_command)
6328 (maintenance_set_cmd, maintenance_show_cmd): Remove.
6329 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
6330 add_show_prefix_cmd.
6331 (show_per_command_cmd): Remove.
6332 * maint-test-settings.c (maintenance_set_test_settings_cmd):
6333 Remove.
6334 (maintenance_show_test_settings_cmd): Remove.
6335 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
6336 add_show_prefix_cmd.
6337 * maint-test-options.c (maintenance_test_options_command):
6338 Remove.
6339 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
6340 * macrocmd.c (macro_command): Remove
6341 (_initialize_macrocmd): Use add_basic_prefix_cmd.
6342 * language.c (set_check, show_check): Remove.
6343 (_initialize_language): Use add_basic_prefix_cmd,
6344 add_show_prefix_cmd.
6345 * infcmd.c (unset_command): Remove.
6346 (_initialize_infcmd): Use add_basic_prefix_cmd.
6347 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
6348 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
6349 add_show_prefix_cmd.
6350 * go32-nat.c (go32_info_dos_command): Remove.
6351 (_initialize_go32_nat): Use add_basic_prefix_cmd.
6352 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
6353 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
6354 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
6355 (_initialize_frame): Use add_basic_prefix_cmd,
6356 add_show_prefix_cmd.
6357 * dcache.c (set_dcache_command, show_dcache_command): Remove.
6358 (_initialize_dcache): Use add_basic_prefix_cmd,
6359 add_show_prefix_cmd.
6360 * cp-support.c (maint_cplus_command): Remove.
6361 (_initialize_cp_support): Use add_basic_prefix_cmd.
6362 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
6363 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
6364 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
6365 add_basic_prefix_cmd, add_show_prefix_cmd.
6366 * breakpoint.c (save_command): Remove.
6367 (_initialize_breakpoint): Use add_basic_prefix_cmd.
6368 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
6369 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
6370 add_show_prefix_cmd.
6371 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
6372 (set_ada_command, show_ada_command): Remove.
6373 (_initialize_ada_language): Use add_basic_prefix_cmd,
6374 add_show_prefix_cmd.
6375 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
6376
6377 2020-04-16 Kamil Rytarowski <n54@gmx.com>
6378
6379 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
6380 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
6381
6382 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
6383
6384 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
6385 warning messages.
6386
6387 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
6388
6389 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
6390 import table is not at beginning of .idata section.
6391
6392 2020-04-16 Pedro Alves <palves@redhat.com>
6393
6394 * inferior.c (delete_inferior): Use delete operator directly
6395 instead of delete_program_space.
6396 * progspace.c (add_program_space): New, factored out from
6397 program_space::program_space.
6398 (remove_program_space): New, factored out from
6399 delete_program_space.
6400 (program_space::program_space): Remove intro comment. Rewrite.
6401 (program_space::~program_space): Remove intro comment. Call
6402 remove_program_space.
6403 (delete_program_space): Delete.
6404 * progspace.h (program_space::program_space): Make explicit. Move
6405 intro comment here, adjusted.
6406 (program_space::~program_space): Move intro comment here,
6407 adjusted.
6408 (delete_program_space): Remove.
6409
6410 2020-04-16 Tom Tromey <tromey@adacore.com>
6411
6412 * windows-nat.c (windows_nat::handle_access_violation): New
6413 function.
6414 * nat/windows-nat.h (handle_access_violation): Declare.
6415 * nat/windows-nat.c (handle_exception): Move Cygwin code to
6416 windows-nat.c. Call handle_access_violation.
6417
6418 2020-04-16 Tom de Vries <tdevries@suse.de>
6419
6420 PR symtab/25791
6421 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
6422 CUs without psymtab.
6423
6424 2020-04-16 Kevin Buettner <kevinb@redhat.com>
6425
6426 * python/python.c (do_start_initialization): Don't call
6427 PyEval_InitThreads for Python 3.9 and beyond.
6428
6429 2020-04-15 Kamil Rytarowski <n54@gmx.com>
6430
6431 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
6432 thread functions.
6433 (obsd_nat_target::wait): Likewise.
6434
6435 2020-04-15 Tom Tromey <tromey@adacore.com>
6436
6437 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
6438 (DEBUG_EXCEPT): Use debug_printf.
6439
6440 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
6441
6442 * completer.c (class completion_tracker::completion_hash_entry)
6443 <hash_name>: New member function.
6444 (completion_tracker::discard_completions): New callback to hash a
6445 completion_hash_entry, pass this to htab_create_alloc.
6446
6447 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
6448
6449 * windows-nat.c (windows_make_so): Warn rather than stopping with
6450 an error if realpath() fails.
6451
6452 2020-04-14 Kamil Rytarowski <n54@gmx.com>
6453
6454 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
6455 (nbsd_nat_target::info_proc): Add do_status.
6456
6457 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
6458 Tom de Vries <tdevries@suse.de>
6459
6460 PR symtab/25718
6461 * psympriv.h (struct partial_symtab::read_symtab)
6462 (struct partial_symtab::expand_psymtab)
6463 (struct partial_symtab::read_dependencies): Update comments.
6464 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
6465 read_symtab for includer.
6466 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
6467 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
6468 (struct dwarf2_include_psymtab::m_readin): Remove.
6469 (struct dwarf2_include_psymtab::includer): New member function.
6470 (dwarf2_psymtab::expand_psymtab): Assert !readin.
6471
6472 2020-04-14 Tom de Vries <tdevries@suse.de>
6473
6474 PR symtab/25720
6475 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
6476 with NULL symbol_matcher and lookup_name.
6477 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
6478 and lookup_name.
6479 * dwarf2/read.c (dw2_expand_symtabs_matching)
6480 (dw2_debug_names_expand_symtabs_matching): Same.
6481 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
6482 Make lookup_name a pointer. Update comment.
6483 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
6484 lookup_name being a pointer.
6485 * symfile.c (expand_symtabs_matching): Same.
6486 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
6487 * linespec.c (iterate_over_all_matching_symtabs): Same.
6488
6489 2020-04-13 Tom Tromey <tom@tromey.com>
6490
6491 * run-on-main-thread.c: Update include.
6492 * unittests/main-thread-selftests.c: Update include.
6493 * tui/tui-win.c: Update include.
6494 * tui/tui-io.c: Update include.
6495 * tui/tui-interp.c: Update include.
6496 * tui/tui-hooks.c: Update include.
6497 * top.h: Update include.
6498 * top.c: Update include.
6499 * ser-base.c: Update include.
6500 * remote.c: Update include.
6501 * remote-notif.c: Update include.
6502 * remote-fileio.c: Update include.
6503 * record-full.c: Update include.
6504 * record-btrace.c: Update include.
6505 * python/python.c: Update include.
6506 * posix-hdep.c: Update include.
6507 * mingw-hdep.c: Update include.
6508 * mi/mi-main.c: Update include.
6509 * mi/mi-interp.c: Update include.
6510 * main.c: Update include.
6511 * linux-nat.c: Update include.
6512 * interps.c: Update include.
6513 * infrun.c: Update include.
6514 * inf-loop.c: Update include.
6515 * event-top.c: Update include.
6516 * event-loop.c: Move to ../gdbsupport/.
6517 * event-loop.h: Move to ../gdbsupport/.
6518 * async-event.h: Update include.
6519 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
6520
6521 2020-04-13 Tom Tromey <tom@tromey.com>
6522
6523 * tui/tui-win.c: Include async-event.h.
6524 * remote.c: Include async-event.h.
6525 * remote-notif.c: Include async-event.h.
6526 * record-full.c: Include async-event.h.
6527 * record-btrace.c: Include async-event.h.
6528 * infrun.c: Include async-event.h.
6529 * event-top.c: Include async-event.h.
6530 * event-loop.h: Move some declarations to async-event.h.
6531 * event-loop.c: Don't include ser-event.h or top.h. Move some
6532 code to async-event.c.
6533 * async-event.h: New file.
6534 * async-event.c: New file.
6535 * Makefile.in (COMMON_SFILES): Add async-event.c.
6536 (HFILES_NO_SRCDIR): Add async-event.h.
6537
6538 2020-04-13 Tom Tromey <tom@tromey.com>
6539
6540 * utils.c (flush_streams): New function.
6541 * event-loop.c (gdb_wait_for_event): Call flush_streams.
6542
6543 2020-04-13 Tom Tromey <tom@tromey.com>
6544
6545 * event-loop.c (handle_file_event): Use warning, not
6546 printf_unfiltered.
6547
6548 2020-04-13 Tom Tromey <tom@tromey.com>
6549
6550 * event-loop.c: Include <chrono>.
6551
6552 2020-04-13 Tom Tromey <tom@tromey.com>
6553
6554 * gdb_select.h: Move to ../gdbsupport/.
6555 * event-loop.c: Update include path.
6556 * top.c: Update include path.
6557 * ser-base.c: Update include path.
6558 * ui-file.c: Update include path.
6559 * ser-tcp.c: Update include path.
6560 * guile/scm-ports.c: Update include path.
6561 * posix-hdep.c: Update include path.
6562 * ser-unix.c: Update include path.
6563 * gdb_usleep.c: Update include path.
6564 * mingw-hdep.c: Update include path.
6565 * inflow.c: Update include path.
6566 * infrun.c: Update include path.
6567 * event-top.c: Update include path.
6568
6569 2020-04-13 Tom Tromey <tom@tromey.com>
6570
6571 * configure: Rebuild.
6572 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
6573
6574 2020-04-13 Tom Tromey <tom@tromey.com>
6575
6576 * event-loop.h (start_event_loop): Don't declare.
6577 * event-loop.c (start_event_loop): Move...
6578 * main.c (start_event_loop): ...here. Now static.
6579
6580 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
6581
6582 * MAINTAINERS: Update my email address.
6583
6584 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6585
6586 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
6587 IP_ALL.
6588
6589 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6590
6591 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
6592 (nbsd_nat_target::info_proc): Add do_cmdline.
6593
6594 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6595
6596 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
6597 (nbsd_nat_target::info_proc): Add do_cwd.
6598
6599 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6600
6601 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
6602
6603 2020-04-11 Kamil Rytarowski <n54@gmx.com>
6604
6605 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
6606 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
6607 (nbsd_nat_target::info_proc): New functions.
6608 * nbsd-nat.c (kinfo_get_vmmap): New function.
6609 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
6610 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
6611 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
6612 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
6613 functions.
6614 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
6615 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6616 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6617 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
6618 (KINFO_VME_FLAG_GROWS_DOWN): New.
6619
6620 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
6621
6622 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
6623 bit shift.
6624
6625 2020-04-10 Tom Tromey <tromey@adacore.com>
6626
6627 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
6628
6629 2020-04-10 Tom Tromey <tromey@adacore.com>
6630
6631 * symtab.c (get_symbol_address, get_msymbol_address): Skip
6632 separate debug files.
6633
6634 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
6635
6636 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
6637 Move to...
6638 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
6639 ... here.
6640 * windows-nat.c (windows_nat_target::get_windows_debug_event):
6641 Check for STATUS_WX86_BREAKPOINT.
6642 (windows_nat_target::wait): Same.
6643
6644 2020-04-10 Tom de Vries <tdevries@suse.de>
6645
6646 PR cli/25808
6647 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
6648
6649 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6650
6651 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
6652 (Write After Approval): Remove Tom de Vries.
6653
6654 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
6655
6656 revert partially:
6657 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
6658
6659 * buildsym.c (record_line): Fix undefined behavior and preserve
6660 lines at eof.
6661
6662 2020-04-09 Kamil Rytarowski <n54@gmx.com>
6663
6664 * auxv.h (svr4_auxv_parse): New.
6665 * auxv.c (default_auxv_parse): Split into default_auxv_parse
6666 and generic_auxv_parse.
6667 (svr4_auxv_parse): Add.
6668 * obsd-tdep.c: Include "auxv.h".
6669 (obsd_auxv_parse): Remove.
6670 (obsd_init_abi): Remove comment.
6671 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
6672 from `obsd_auxv_parse' to `svr4_auxv_parse'.
6673 * nbsd-tdep.c: Include "auxv.h".
6674 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
6675
6676 2020-04-08 Tom Tromey <tromey@adacore.com>
6677
6678 * nat/windows-nat.h (last_wait_event): Don't declare.
6679 (wait_for_debug_event): Update comment.
6680 * nat/windows-nat.c (last_wait_event): Now static.
6681
6682 2020-04-08 Tom Tromey <tromey@adacore.com>
6683
6684 * windows-nat.c (wait_for_debug_event): Move to
6685 nat/windows-nat.c.
6686 * nat/windows-nat.h (wait_for_debug_event): Declare.
6687 * nat/windows-nat.c (wait_for_debug_event): Move from
6688 windows-nat.c. No longer static.
6689
6690 2020-04-08 Tom Tromey <tromey@adacore.com>
6691
6692 * windows-nat.c (get_windows_debug_event): Use
6693 fetch_pending_stop.
6694 * nat/windows-nat.h (fetch_pending_stop): Declare.
6695 * nat/windows-nat.c (fetch_pending_stop): New function.
6696
6697 2020-04-08 Tom Tromey <tromey@adacore.com>
6698
6699 * windows-nat.c (windows_continue): Use matching_pending_stop and
6700 continue_last_debug_event.
6701 * nat/windows-nat.h (matching_pending_stop)
6702 (continue_last_debug_event): Declare.
6703 * nat/windows-nat.c (DEBUG_EVENTS): New define.
6704 (matching_pending_stop, continue_last_debug_event): New
6705 functions.
6706
6707 2020-04-08 Tom Tromey <tromey@adacore.com>
6708
6709 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
6710 (handle_exception_result): Move to nat/windows-nat.h.
6711 (DEBUG_EXCEPTION_SIMPLE): Remove.
6712 (windows_nat::handle_ms_vc_exception): New function.
6713 (handle_exception): Move to nat/windows-nat.c.
6714 (get_windows_debug_event): Update.
6715 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
6716 nat/windows-nat.c.
6717 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
6718 (handle_exception_result): Move from windows-nat.c.
6719 (handle_exception): Declare.
6720 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
6721 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
6722 windows-nat.c.
6723
6724 2020-04-08 Tom Tromey <tromey@adacore.com>
6725
6726 * windows-nat.c (exception_count, event_count): Remove.
6727 (handle_exception, get_windows_debug_event)
6728 (do_initial_windows_stuff): Update.
6729
6730 2020-04-08 Tom Tromey <tromey@adacore.com>
6731
6732 * windows-nat.c (windows_nat::handle_load_dll)
6733 (windows_nat::handle_unload_dll): Rename. No longer static.
6734 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
6735 Declare.
6736
6737 2020-04-08 Tom Tromey <tromey@adacore.com>
6738
6739 * complaints.h (stop_whining): Declare at top-level.
6740 (complaint): Don't declare stop_whining.
6741
6742 2020-04-08 Tom Tromey <tromey@adacore.com>
6743
6744 * windows-nat.c (windows_nat::handle_output_debug_string):
6745 Rename. No longer static.
6746 * nat/windows-nat.h (handle_output_debug_string): Declare.
6747
6748 2020-04-08 Tom Tromey <tromey@adacore.com>
6749
6750 * windows-nat.c (current_process_handle, current_process_id)
6751 (main_thread_id, last_sig, current_event, last_wait_event)
6752 (current_windows_thread, desired_stop_thread_id, pending_stops)
6753 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
6754 (display_selectors, fake_create_process)
6755 (get_windows_debug_event): Update.
6756 * nat/windows-nat.h (current_process_handle, current_process_id)
6757 (main_thread_id, last_sig, current_event, last_wait_event)
6758 (current_windows_thread, desired_stop_thread_id, pending_stops)
6759 (struct pending_stop, siginfo_er): Move from windows-nat.c.
6760 * nat/windows-nat.c (current_process_handle, current_process_id)
6761 (main_thread_id, last_sig, current_event, last_wait_event)
6762 (current_windows_thread, desired_stop_thread_id, pending_stops)
6763 (siginfo_er): New globals. Move from windows-nat.c.
6764
6765 2020-04-08 Tom Tromey <tromey@adacore.com>
6766
6767 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
6768 (handle_load_dll): Update.
6769 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
6770
6771 2020-04-08 Tom Tromey <tromey@adacore.com>
6772
6773 * windows-nat.c (enum thread_disposition_type): Move to
6774 nat/windows-nat.h.
6775 (windows_nat::thread_rec): Rename from thread_rec. No longer
6776 static.
6777 (windows_add_thread, windows_nat_target::fetch_registers)
6778 (windows_nat_target::store_registers, handle_exception)
6779 (windows_nat_target::resume, get_windows_debug_event)
6780 (windows_nat_target::get_tib_address)
6781 (windows_nat_target::thread_name)
6782 (windows_nat_target::thread_alive): Update.
6783 * nat/windows-nat.h (enum thread_disposition_type): Move from
6784 windows-nat.c.
6785 (thread_rec): Declare.
6786
6787 2020-04-08 Tom Tromey <tromey@adacore.com>
6788
6789 * windows-nat.c: Add "using namespace".
6790 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
6791 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
6792
6793 2020-04-08 Tom Tromey <tromey@adacore.com>
6794
6795 * nat/windows-nat.h (struct windows_thread_info): Declare
6796 destructor.
6797 * nat/windows-nat.c (~windows_thread_info): New.
6798
6799 2020-04-08 Tom Tromey <tromey@adacore.com>
6800
6801 PR gdb/22992
6802 * windows-nat.c (current_event): Update comment.
6803 (last_wait_event, desired_stop_thread_id): New globals.
6804 (struct pending_stop): New.
6805 (pending_stops): New global.
6806 (windows_nat_target) <stopped_by_sw_breakpoint>
6807 <supports_stopped_by_sw_breakpoint>: New methods.
6808 (windows_fetch_one_register): Add assertions. Adjust PC.
6809 (windows_continue): Handle pending stops. Suspend other threads
6810 when stepping. Use last_wait_event
6811 (wait_for_debug_event): New function.
6812 (get_windows_debug_event): Use wait_for_debug_event. Handle
6813 pending stops. Queue spurious stops.
6814 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
6815 (windows_nat_target::kill): Use wait_for_debug_event.
6816 * nat/windows-nat.h (struct windows_thread_info)
6817 <stopped_at_software_breakpoint>: New field.
6818 * nat/windows-nat.c (windows_thread_info::resume): Clear
6819 stopped_at_software_breakpoint.
6820
6821 2020-04-08 Tom Tromey <tromey@adacore.com>
6822
6823 * windows-nat.c (enum thread_disposition_type): New.
6824 (thread_rec): Replace "get_context" parameter with "disposition";
6825 change type.
6826 (windows_add_thread, windows_nat_target::fetch_registers)
6827 (windows_nat_target::store_registers, handle_exception)
6828 (windows_nat_target::resume, get_windows_debug_event)
6829 (windows_nat_target::get_tib_address)
6830 (windows_nat_target::thread_name)
6831 (windows_nat_target::thread_alive): Update.
6832
6833 2020-04-08 Tom Tromey <tromey@adacore.com>
6834
6835 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
6836 (windows_continue): Use windows_continue::resume.
6837 * nat/windows-nat.h (struct windows_thread_info) <suspend,
6838 resume>: Declare new methods.
6839 * nat/windows-nat.c: New file.
6840 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
6841
6842 2020-04-08 Tom Tromey <tromey@adacore.com>
6843
6844 * windows-nat.c (windows_add_thread, windows_delete_thread)
6845 (windows_nat_target::fetch_registers)
6846 (windows_nat_target::store_registers, fake_create_process)
6847 (windows_nat_target::resume, windows_nat_target::resume)
6848 (get_windows_debug_event, windows_nat_target::wait)
6849 (windows_nat_target::pid_to_str)
6850 (windows_nat_target::get_tib_address)
6851 (windows_nat_target::get_ada_task_ptid)
6852 (windows_nat_target::thread_name)
6853 (windows_nat_target::thread_alive): Use lwp, not tid.
6854
6855 2020-04-08 Tom Tromey <tromey@adacore.com>
6856
6857 * windows-nat.c (handle_exception)
6858 (windows_nat_target::thread_name): Update.
6859 * nat/windows-nat.h (windows_thread_info): Remove destructor.
6860 <name>: Now unique_xmalloc_ptr.
6861
6862 2020-04-08 Tom Tromey <tromey@adacore.com>
6863
6864 * windows-nat.c (thread_rec)
6865 (windows_nat_target::fetch_registers): Update.
6866 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
6867 Update comment.
6868 <debug_registers_changed, reload_context>: Now bool.
6869
6870 2020-04-08 Tom Tromey <tromey@adacore.com>
6871
6872 * windows-nat.c (windows_add_thread): Use new.
6873 (windows_init_thread_list, windows_delete_thread): Use delete.
6874 (get_windows_debug_event): Update.
6875 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
6876 destructor, and initializers.
6877
6878 2020-04-08 Tom Tromey <tromey@adacore.com>
6879
6880 * windows-nat.c (struct windows_thread_info): Remove.
6881 * nat/windows-nat.h: New file.
6882
6883 2020-04-08 Tom Tromey <tromey@adacore.com>
6884
6885 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
6886 (thread_rec, windows_add_thread, windows_delete_thread)
6887 (windows_continue): Update.
6888
6889 2020-04-08 Tom Tromey <tromey@adacore.com>
6890
6891 * windows-nat.c (struct windows_thread_info): Remove typedef.
6892 (thread_head): Remove.
6893 (thread_list): New global.
6894 (thread_rec, windows_add_thread, windows_init_thread_list)
6895 (windows_delete_thread, windows_continue): Update.
6896
6897 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
6898
6899 * windows-tdep.h (windows_init_abi): Add comment.
6900 (cygwin_init_abi): New declaration.
6901 * windows-tdep.c: Split signal enumeration in two, one for
6902 Windows and one for Cygwin.
6903 (windows_gdb_signal_to_target): Only deal with signal of the
6904 Windows OS ABI.
6905 (cygwin_gdb_signal_to_target): New function.
6906 (windows_init_abi): Rename to windows_init_abi_common, don't set
6907 gdb_signal_to_target gdbarch method. Add new new function with
6908 this name.
6909 (cygwin_init_abi): New function.
6910 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
6911 comment. Don't call windows_init_abi.
6912 (amd64_windows_init_abi): Add comment, call windows_init_abi.
6913 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
6914 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
6915 i386_windows_init_abi_common, don't call windows_init_abi. Add
6916 a new function of this name.
6917 (i386_cygwin_init_abi): New function.
6918 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
6919 OS ABI Cygwin.
6920
6921 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
6922
6923 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
6924 parameter.c.
6925 (dwarf2_read_gdb_index): Update.
6926
6927 2020-04-07 Kamil Rytarowski <n54@gmx.com>
6928
6929 * nbsd-tdep.c: Include "objfiles.h".
6930 (nbsd_skip_solib_resolver): New.
6931 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
6932
6933 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6934
6935 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
6936 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
6937 with DW_LLE_base_addressx are being emitted in DWARFv5.
6938 Add the newly added kind DW_LOC_OFFSET_PAIR also.
6939 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
6940 unsigned integer.
6941
6942 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6943
6944 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
6945 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
6946 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
6947 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
6948 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
6949 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
6950 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
6951
6952
6953 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6954
6955 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
6956 (read_loclist_index): New function definition.
6957 (lookup_loclist_base): New function definition.
6958 (read_loclist_header): New function definition.
6959 (dwarf2_cu): Add loclist_base and loclist_header field.
6960 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
6961 (read_full_die_1): Read the value of DW_AT_loclists_base.
6962 (read_attribute_reprocess): Handle DW_FORM_loclistx.
6963 (read_attribute_value): Handle DW_FORM_loclistx.
6964 (skip_one_die): Handle DW_FORM_loclistx.
6965 (loclist_header): New structure declaration.
6966 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
6967
6968 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6969
6970 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
6971 constructor. Remove `addr` parameter from other constructor and
6972 add `per_cu` parameter.
6973 * dwarf2/read.c (create_partial_symtab): Update.
6974
6975 2020-04-07 Tom de Vries <tdevries@suse.de>
6976
6977 PR symtab/25796
6978 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
6979 (partial_die_info::fixup): Inherit has_const_value.
6980
6981 2020-04-07 Tom de Vries <tdevries@suse.de>
6982
6983 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
6984 symbols without address.
6985
6986 2020-04-06 Kamil Rytarowski <n54@gmx.com>
6987
6988 * nbsd-nat.h (struct thread_info): Add forward declaration.
6989 (nbsd_nat_target::thread_alive): Add.
6990 (nbsd_nat_target::thread_name): Likewise.
6991 (nbsd_nat_target::update_thread_list): Likewise.
6992 (update_thread_list::post_attach): Likewise.
6993 (post_attach::pid_to_str): Likewise.
6994 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
6995 (nbsd_thread_lister): Add.
6996 (nbsd_nat_target::thread_alive): Likewise.
6997 (nbsd_nat_target::thread_name): Likewise.
6998 (nbsd_add_threads): Likewise.
6999 (update_thread_list::post_attach): Likewise.
7000 (nbsd_nat_target::update_thread_list): Likewise.
7001 (post_attach::pid_to_str): Likewise.
7002
7003 2020-04-06 Tom Tromey <tromey@adacore.com>
7004
7005 * ada-valprint.c (print_variant_part): Extract the variant field.
7006 (print_field_values): Use the field as the outer value when
7007 recursing.
7008
7009 2020-04-06 Tom Tromey <tromey@adacore.com>
7010
7011 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
7012 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
7013 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
7014 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
7015 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
7016
7017 2020-04-06 Tom Tromey <tromey@adacore.com>
7018
7019 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
7020 TYPE_CODE_ERROR.
7021
7022 2020-04-06 Kamil Rytarowski <n54@gmx.com>
7023
7024 * nbsd-tdep.c: Include "gdbarch.h".
7025 Define enum with NetBSD signal numbers.
7026 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
7027 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
7028 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7029 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
7030 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
7031 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
7032 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
7033 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
7034 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
7035 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
7036 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
7037 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
7038
7039 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
7040
7041 PR gdb/25325
7042 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
7043
7044 2020-04-03 Tom Tromey <tromey@adacore.com>
7045
7046 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
7047 Read constant block.
7048
7049 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
7050
7051 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
7052 (gdb_bfd_get_full_section_contents): New declaration.
7053 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
7054 * windows-tdep.c (is_linked_with_cygwin_dll): Use
7055 gdb_bfd_get_full_section_contents.
7056
7057 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
7058
7059 * exec.c (build_section_table): Replace internal_error with
7060 gdb_assert.
7061 (section_table_xfer_memory_partial): Likewise.
7062 * mdebugread.c (parse_partial_symbols): Likewise.
7063 * psymtab.c (lookup_partial_symbol): Likewise.
7064 * utils.c (wrap_here): Likewise.
7065
7066 2020-04-02 Tom Tromey <tromey@adacore.com>
7067
7068 * f-lang.c (build_fortran_types): Use arch_type to initialize
7069 builtin_complex_s32 in the TYPE_CODE_ERROR case.
7070
7071 2020-04-02 Tom Tromey <tromey@adacore.com>
7072
7073 * dwarf2/read.c (partial_die_info::read): Do not create a vector
7074 of attributes.
7075
7076 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
7077 Bernd Edlinger <bernd.edlinger@hotmail.de>
7078 Tom Tromey <tromey@adacore.com>
7079
7080 * buildsym.c (buildsym_compunit::record_line): Remove
7081 deduplication code.
7082
7083 2020-04-02 Tom de Vries <tdevries@suse.de>
7084
7085 PR ada/24671
7086 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
7087
7088 2020-04-02 Tom de Vries <tdevries@suse.de>
7089
7090 * dwarf2/read.c (dwarf2_gdb_index_functions,
7091 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
7092 NULL.
7093 * psymtab.c (psym_lookup_global_symbol_language): New function.
7094 (psym_functions): Init psym_lookup_global_symbol_language with
7095 psym_lookup_global_symbol_language.
7096 * symfile-debug.c (debug_sym_quick_functions): Init
7097 lookup_global_symbol_language with NULL.
7098 * symfile.c (set_initial_language): Remove fixme comment.
7099 * symfile.h (struct quick_symbol_functions): Add
7100 lookup_global_symbol_language.
7101 * symtab.c (find_quick_global_symbol_language): New function.
7102 (find_main_name): Use find_quick_global_symbol_language.
7103
7104 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7105
7106 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
7107
7108 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
7109
7110 * buildsym.c (record_line): Fix undefined behavior and preserve
7111 lines at eof.
7112
7113 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
7114
7115 * buildsym.c (record_line): Fix the resizing condition.
7116
7117 2020-04-01 Tom Tromey <tom@tromey.com>
7118
7119 * value.h (value_literal_complex): Add comment.
7120 * valops.c (value_literal_complex): Refer to value.h.
7121
7122 2020-04-01 Tom Tromey <tom@tromey.com>
7123
7124 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
7125 (scalar_type): New rule, from typebase.
7126 (typebase): Use scalar_type. Recognize complex types.
7127 (field_name): Handle FLOAT_KEYWORD.
7128 (ident_tokens): Add _Complex and __complex__.
7129
7130 2020-04-01 Tom Tromey <tom@tromey.com>
7131
7132 PR exp/25299:
7133 * valarith.c (promotion_type, complex_binop): New functions.
7134 (scalar_binop): Handle complex numbers. Use promotion_type.
7135 (value_pos, value_neg, value_complement): Handle complex numbers.
7136
7137 2020-04-01 Tom Tromey <tom@tromey.com>
7138
7139 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
7140 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
7141 (parse_number): Handle complex numbers.
7142
7143 2020-04-01 Tom Tromey <tom@tromey.com>
7144
7145 * c-valprint.c (c_decorations): Change complex suffix to "i".
7146
7147 2020-04-01 Tom Tromey <tom@tromey.com>
7148
7149 * valprint.c (generic_value_print_complex): Use accessors.
7150 * value.h (value_real_part, value_imaginary_part): Declare.
7151 * valops.c (value_real_part, value_imaginary_part): New
7152 functions.
7153 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
7154
7155 2020-04-01 Tom Tromey <tom@tromey.com>
7156
7157 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
7158 (read_range_type): Update.
7159 * mdebugread.c (basic_type): Update.
7160 * go-lang.c (build_go_types): Use init_complex_type.
7161 * gdbtypes.h (struct main_type) <complex_type>: New member.
7162 (init_complex_type): Update.
7163 (arch_complex_type): Don't declare.
7164 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
7165 Make name if none given. Use alloc_type_copy. Look for cached
7166 complex type.
7167 (arch_complex_type): Remove.
7168 (gdbtypes_post_init): Use init_complex_type.
7169 * f-lang.c (build_fortran_types): Use init_complex_type.
7170 * dwarf2/read.c (read_base_type): Update.
7171 * d-lang.c (build_d_types): Use init_complex_type.
7172 * ctfread.c (read_base_type): Update.
7173
7174 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7175
7176 * infrun.c (stop_all_threads): Update assertion, plus when
7177 stopping threads, take into account that we might be trying
7178 to stop an all-stop target.
7179 (stop_waiting): Call 'stop_all_threads' if there exists a
7180 non-stop target.
7181
7182 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7183
7184 * target.h (exists_non_stop_target): New function declaration.
7185 * target.c (exists_non_stop_target): New function.
7186
7187 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
7188
7189 PR gdb/24789
7190 * eval.c (is_integral_or_integral_reference): New function.
7191 (evaluate_subexp_standard): Allow integer references in
7192 pointer arithmetic.
7193
7194 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7195
7196 * remote.c (remote_target::remote_parse_stop_reply): Remove the
7197 check for no ptid in the stop reply when the target is non-stop.
7198
7199 2020-04-01 Tom Tromey <tromey@adacore.com>
7200
7201 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
7202 "name" parameter to rvalue reference. Initialize m_name_holder.
7203 <lookup_name_info>: New overloads.
7204 <name>: Return gdb::string_view.
7205 <c_str>: New method.
7206 <make_ignore_params>: Update.
7207 <search_name_hash>: Update.
7208 <language_lookup_name>: Return const char *.
7209 <m_name>: Change type.
7210 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
7211 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
7212 (lookup_name_info::match_any): Update.
7213 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
7214 Update.
7215 * minsyms.c (linkage_name_str): Update.
7216 * language.c (default_symbol_name_matcher): Update.
7217 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
7218 Update.
7219 * ada-lang.c (ada_fold_name): Change parameter to string_view.
7220 (ada_lookup_name_info::ada_lookup_name_info): Update.
7221 (literal_symbol_name_matcher): Update.
7222
7223 2020-04-01 Tom Tromey <tromey@adacore.com>
7224
7225 * psymtab.c (psymtab_search_name): Remove function.
7226 (psym_lookup_symbol): Create search name and lookup name here.
7227 (lookup_partial_symbol): Remove "name" parameter; add
7228 lookup_name.
7229 (psym_expand_symtabs_for_function): Update.
7230
7231 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
7232
7233 PR tui/25597:
7234 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
7235
7236 2020-03-31 Tom Tromey <tromey@adacore.com>
7237
7238 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
7239 memcpy.
7240
7241 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
7242
7243 * features/riscv/32bit-csr.xml: Regenerated.
7244 * features/riscv/64bit-csr.xml: Regenerated.
7245
7246 2020-03-30 Tom Tromey <tromey@adacore.com>
7247
7248 * ada-valprint.c (print_variant_part): Update.
7249 * ada-lang.h (ada_which_variant_applies): Update.
7250 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
7251 outer_valaddr parameters; replace with "outer" value parameter.
7252 (to_fixed_variant_branch_type): Update.
7253
7254 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
7255
7256 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
7257 <list>. Remove inclusion of observable.h.
7258 (PPC_DEBUG_CURRENT_VERSION): Move up define.
7259 (struct arch_lwp_info): New struct.
7260 (class ppc_linux_dreg_interface): New class.
7261 (struct ppc_linux_process_info): New struct.
7262 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
7263 <low_new_clone, low_forget_process, low_prepare_to_resume>
7264 <copy_thread_dreg_state, mark_thread_stale>
7265 <mark_debug_registers_changed, register_hw_breakpoint>
7266 <clear_hw_breakpoint, register_wp, clear_wp>
7267 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
7268 <num_memory_accesses, get_trigger_type>
7269 <create_watchpoint_request, hwdebug_point_cmp>
7270 <init_arch_lwp_info, get_arch_lwp_info>
7271 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
7272 methods.
7273 <struct ptid_hash>: New inner struct.
7274 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
7275 members.
7276 (saved_dabr_value, hwdebug_info, max_slots_number)
7277 (struct hw_break_tuple, struct thread_points, ppc_threads)
7278 (have_ptrace_hwdebug_interface)
7279 (hwdebug_find_thread_points_by_tid)
7280 (hwdebug_insert_point, hwdebug_remove_point): Remove.
7281 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
7282 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
7283 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
7284 use m_dreg_interface.
7285 (hwdebug_point_cmp): Change to...
7286 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
7287 reference arguments instead of pointers.
7288 (ppc_linux_nat_target::ranged_break_num_registers): Use
7289 m_dreg_interface.
7290 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
7291 m_dreg_interface. Call register_hw_breakpoint.
7292 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
7293 m_dreg_interface. Call clear_hw_breakpoint.
7294 (get_trigger_type): Change to...
7295 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
7296 comment.
7297 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
7298 use m_dreg_interface. Call register_hw_breakpoint.
7299 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
7300 use m_dreg_interface. Call clear_hw_breakpoint.
7301 (can_use_watchpoint_cond_accel): Change to...
7302 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
7303 method. Update comment, use m_dreg_interface and
7304 m_process_info.
7305 (calculate_dvc): Change to...
7306 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
7307 m_dreg_interface.
7308 (num_memory_accesses): Change to...
7309 (ppc_linux_nat_target::num_memory_accesses): ...this method.
7310 (check_condition): Change to...
7311 (ppc_linux_nat_target::check_condition): ...this method.
7312 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
7313 comment, use m_dreg_interface.
7314 (create_watchpoint_request): Change to...
7315 (ppc_linux_nat_target::create_watchpoint_request): ...this
7316 method. Use m_dreg_interface.
7317 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
7318 m_dreg_interface. Call register_hw_breakpoint or register_wp.
7319 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
7320 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
7321 (ppc_linux_nat_target::low_forget_process)
7322 (ppc_linux_nat_target::low_new_fork)
7323 (ppc_linux_nat_target::low_new_clone)
7324 (ppc_linux_nat_target::low_delete_thread)
7325 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
7326 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
7327 only call mark_thread_stale.
7328 (ppc_linux_thread_exit): Remove.
7329 (ppc_linux_nat_target::stopped_data_address): Change to...
7330 (ppc_linux_nat_target::low_stopped_data_address): This. Add
7331 comment, use m_dreg_interface and m_thread_hw_breakpoints.
7332 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
7333 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
7334 comment. Call low_stopped_data_address.
7335 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
7336 m_dreg_interface.
7337 (ppc_linux_nat_target::masked_watch_num_registers): Use
7338 m_dreg_interface.
7339 (ppc_linux_nat_target::copy_thread_dreg_state)
7340 (ppc_linux_nat_target::mark_thread_stale)
7341 (ppc_linux_nat_target::mark_debug_registers_changed)
7342 (ppc_linux_nat_target::register_hw_breakpoint)
7343 (ppc_linux_nat_target::clear_hw_breakpoint)
7344 (ppc_linux_nat_target::register_wp)
7345 (ppc_linux_nat_target::clear_wp)
7346 (ppc_linux_nat_target::init_arch_lwp_info)
7347 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
7348 (_initialize_ppc_linux_nat): Remove observer callback.
7349
7350 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
7351
7352 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
7353 (ppc_linux_nat_target::auxv_parse)
7354 (ppc_linux_nat_target::read_description)
7355 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
7356 Move up.
7357
7358 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
7359
7360 * linux-nat.h (low_new_clone): New method.
7361 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
7362
7363 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
7364
7365 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
7366 (dbx_expand_psymtab): ... this.
7367 (start_psymtab): Update.
7368 * mdebugread.c (psymtab_to_symtab_1): Rename to...
7369 (mdebug_expand_psymtab): ... this.
7370 (parse_partial_symbols): Update.
7371 (new_psymtab): Update.
7372 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
7373 (xcoff_expand_psymtab): ... this.
7374 (xcoff_start_psymtab): Update.
7375
7376 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
7377
7378 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
7379 <expand_dependencies>: ... this.
7380 * psymtab.c (partial_symtab::read_dependencies): Rename to...
7381 (partial_symtab::expand_dependencies): ... this.
7382 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
7383 Update.
7384 (dwarf2_psymtab::expand_psymtab): Update.
7385 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
7386 * mdebugread.c (psymtab_to_symtab_1): Update.
7387 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
7388
7389 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
7390
7391 * psympriv.h (discard_psymtab): Remove.
7392 * dbxread.c (dbx_end_psymtab): Update.
7393 * xcoffread.c (xcoff_end_psymtab): Update.
7394
7395 2020-03-28 Tom Tromey <tom@tromey.com>
7396
7397 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
7398 comment.
7399
7400 2020-03-28 Tom Tromey <tom@tromey.com>
7401
7402 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
7403
7404 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
7405
7406 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
7407
7408 2020-03-26 John Baldwin <jhb@FreeBSD.org>
7409
7410 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
7411
7412 2020-03-26 Tom Tromey <tom@tromey.com>
7413
7414 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
7415 (mark_common_block_symbol_computed, read_tag_string_type)
7416 (attr_to_dynamic_prop, read_subrange_type): Update.
7417 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
7418 to be methods on struct attribute.
7419 (skip_one_die, process_imported_unit_die, read_namespace_alias)
7420 (read_call_site_scope, partial_die_info::read)
7421 (partial_die_info::read, lookup_die_type, follow_die_ref):
7422 Update.
7423 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
7424 from dwarf2_get_ref_die_offset.
7425 (attribute::constant_value): New method, from
7426 dwarf2_get_attr_constant_value.
7427 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
7428 Declare method.
7429 <constant_value>: New method.
7430
7431 2020-03-26 Tom Tromey <tom@tromey.com>
7432
7433 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
7434 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
7435 (dwarf_type_encoding_name): Move to stringify.c.
7436 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
7437 * dwarf2/stringify.c: New file.
7438 * dwarf2/stringify.h: New file.
7439
7440 2020-03-26 Tom Tromey <tom@tromey.com>
7441
7442 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
7443 Rewrite.
7444
7445 2020-03-26 Tom Tromey <tom@tromey.com>
7446
7447 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
7448 methods.
7449 * dwarf2/read.c (lookup_addr_base): Move to die.h.
7450 (lookup_ranges_base): Likewise.
7451 (read_cutu_die_from_dwo, read_full_die_1): Update.
7452
7453 2020-03-26 Tom Tromey <tom@tromey.com>
7454
7455 * dwarf2/read.c (read_import_statement, read_file_scope)
7456 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
7457 (read_lexical_block_scope, read_call_site_scope)
7458 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
7459 (handle_struct_member_die, process_structure_scope)
7460 (update_enumeration_type_from_children)
7461 (process_enumeration_scope, read_array_type, read_common_block)
7462 (read_namespace, read_module, read_subroutine_type): Update.
7463 (sibling_die): Remove.
7464
7465 2020-03-26 Tom Tromey <tom@tromey.com>
7466
7467 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
7468 (build_type_psymtabs_reader, read_structure_type)
7469 (read_enumeration_type, read_full_die_1): Update.
7470 (dwarf2_attr_no_follow): Move to die.h.
7471 * dwarf2/die.h (struct die_info) <attr>: New method.
7472
7473 2020-03-26 Tom Tromey <tom@tromey.com>
7474
7475 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
7476 <base_address>: Now an optional.
7477 (dwarf2_find_base_address, dwarf2_rnglists_process)
7478 (dwarf2_ranges_process, fill_in_loclist_baton)
7479 (dwarf2_symbol_mark_computed): Update.
7480
7481 2020-03-26 Tom Tromey <tom@tromey.com>
7482
7483 * dwarf2/read.c (struct die_info): Move to die.h.
7484 * dwarf2/die.h: New file.
7485
7486 2020-03-26 Tom Tromey <tom@tromey.com>
7487
7488 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
7489 * dwarf2/read.c
7490 (dwarf2_statement_list_fits_in_line_number_section_complaint):
7491 Move to line-header.c.
7492 (read_checked_initial_length_and_offset, read_formatted_entries):
7493 Likewise.
7494 (dwarf_decode_line_header): Split into two.
7495 * dwarf2/line-header.c
7496 (dwarf2_statement_list_fits_in_line_number_section_complaint):
7497 Move from read.c.
7498 (read_checked_initial_length_and_offset, read_formatted_entries):
7499 Likewise.
7500 (dwarf_decode_line_header): New function, split from read.c.
7501
7502 2020-03-26 Tom Tromey <tom@tromey.com>
7503
7504 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
7505 Declare method.
7506 * dwarf2/read.c (read_attribute_value): Update.
7507 (dwarf2_per_objfile::read_line_string): Rename from
7508 read_indirect_line_string.
7509 (read_formatted_entries): Update.
7510
7511 2020-03-26 Tom Tromey <tom@tromey.com>
7512
7513 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
7514 variable.
7515
7516 2020-03-26 Tom Tromey <tom@tromey.com>
7517
7518 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
7519 const.
7520 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
7521 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
7522 parameter const.
7523
7524 2020-03-26 Tom Tromey <tom@tromey.com>
7525
7526 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
7527 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
7528 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
7529 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
7530
7531 2020-03-26 Tom Tromey <tom@tromey.com>
7532
7533 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
7534 file_names_size, file_full_name, file_file_name>: Use const.
7535 <file_name_at, file_names>: Add const overload.
7536 * dwarf2/line-header.c (line_header::file_file_name)
7537 (line_header::file_full_name): Update.
7538
7539 2020-03-26 Tom Tromey <tom@tromey.com>
7540
7541 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
7542 (macro_start_file, consume_improper_spaces)
7543 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
7544 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
7545 (dwarf_decode_macros): Move to macro.c.
7546 * dwarf2/macro.c: New file.
7547 * dwarf2/macro.h: New file.
7548 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
7549
7550 2020-03-26 Tom Tromey <tom@tromey.com>
7551
7552 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
7553 method.
7554 * dwarf2/section.c: New method. From
7555 read_indirect_string_at_offset_from.
7556 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
7557 (read_indirect_string_at_offset_from): Move to section.c.
7558 (read_indirect_string_at_offset): Rewrite.
7559 (read_indirect_line_string_at_offset): Remove.
7560 (read_indirect_string, read_indirect_line_string)
7561 (dwarf_decode_macro_bytes): Update.
7562
7563 2020-03-26 Tom Tromey <tom@tromey.com>
7564
7565 * dwarf2/section.h (struct dwarf2_section_info)
7566 <overload_complaint>: Declare.
7567 (dwarf2_section_buffer_overflow_complaint): Don't declare.
7568 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
7569 Rename from dwarf2_section_buffer_overflow_complaint.
7570 * dwarf2/read.c (skip_one_die, partial_die_info::read)
7571 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
7572
7573 2020-03-26 Tom Tromey <tom@tromey.com>
7574
7575 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
7576 Declare.
7577 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
7578 Move from read.c.
7579 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
7580 to section.c.
7581
7582 2020-03-26 Tom Tromey <tom@tromey.com>
7583
7584 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
7585
7586 2020-03-26 Tom Tromey <tom@tromey.com>
7587
7588 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
7589 "builder".
7590 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
7591 parameter.
7592 (dwarf_decode_macros): Update.
7593
7594 2020-03-26 Tom Tromey <tom@tromey.com>
7595
7596 * dwarf2/read.c (read_attribute_value): Update.
7597 (read_indirect_string_from_dwz): Move to dwz.c; change into
7598 method.
7599 (dwarf_decode_macro_bytes): Update.
7600 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
7601 * dwarf2/dwz.c: New file.
7602 * Makefile.in (COMMON_SFILES): Add dwz.c.
7603
7604 2020-03-26 Tom Tromey <tom@tromey.com>
7605
7606 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
7607 * dwarf2/read.c: Add include.
7608 * dwarf2/index-write.c: Add include.
7609 * dwarf2/index-cache.c: Add include.
7610 * dwarf2/dwz.h: New file.
7611
7612 2020-03-25 Tom Tromey <tom@tromey.com>
7613
7614 * compile/compile-object-load.c (get_out_value_type): Mention
7615 correct symbol name in error message.
7616
7617 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
7618
7619 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
7620
7621 2020-03-25 Tom de Vries <tdevries@suse.de>
7622
7623 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
7624 * symmisc.c (dump_symtab_1): Print user and includes fields.
7625 (maintenance_info_symtabs): Same.
7626
7627 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
7628
7629 PR gdb/25534
7630 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
7631 (riscv_regcache_cooked_write): New function.
7632 (riscv_push_dummy_call): Use new function.
7633 (riscv_return_value): Likewise.
7634
7635 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
7636
7637 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
7638 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
7639 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
7640 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
7641 * infrun.c (follow_fork): Likewise.
7642 (follow_fork_inferior): Likewise.
7643 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
7644 * linux-nat.h (class linux_nat_target): Likewise.
7645 * remote.c (class remote_target) <follow_fork>: Likewise.
7646 (remote_target::follow_fork): Likewise.
7647 * target-delegates.c: Re-generate.
7648 * target.c (default_follow_fork): Likewise.
7649 (target_follow_fork): Likewise.
7650 * target.h (struct target_ops) <follow_fork>: Likewise.
7651 (target_follow_fork): Likewise.
7652
7653 2020-03-24 Tom de Vries <tdevries@suse.de>
7654
7655 * psymtab.c (maintenance_info_psymtabs): Print user field.
7656
7657 2020-03-20 Tom Tromey <tromey@adacore.com>
7658
7659 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
7660 const.
7661 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
7662 const.
7663
7664 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
7665
7666 * ptrace.m4: Don't check for ptrace declaration.
7667 * config.in: Re-generate.
7668 * configure: Re-generate.
7669 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
7670 not defined.
7671
7672 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7673
7674 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
7675 `PTRACE_TYPE_RET'.
7676 * i386-bsd-nat.c (gdb_ptrace): Likewise.
7677 * sparc-nat.c (gdb_ptrace): Likewise.
7678 * x86-bsd-nat.c (gdb_ptrace): Likewise.
7679
7680 2020-03-20 Tom Tromey <tromey@adacore.com>
7681
7682 * c-exp.y (lex_one_token): Fix assert.
7683
7684 2020-03-20 Tom Tromey <tromey@adacore.com>
7685
7686 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
7687 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
7688 strncpy call.
7689
7690 2020-03-20 Tom Tromey <tromey@adacore.com>
7691
7692 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
7693
7694 2020-03-20 Tom Tromey <tromey@adacore.com>
7695
7696 * ada-valprint.c (print_variant_part): Remove parameters; switch
7697 to value-based API.
7698 (print_field_values): Likewise.
7699 (ada_val_print_struct_union): Likewise.
7700 (ada_value_print_1): Update.
7701
7702 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7703
7704 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
7705 nbsd_nat_target instead of inf_ptrace_target.
7706 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7707 nbsd_nat_target.
7708
7709 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7710
7711 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
7712 it to the ptrace call.
7713 * (store_registers): Likewise.
7714
7715 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7716
7717 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
7718 it to the ptrace call.
7719 * (store_registers): Likewise.
7720
7721 2020-03-19 Luis Machado <luis.machado@linaro.org>
7722
7723 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
7724 valid, fetch vg value from ptrace.
7725
7726 2020-03-19 Kamil Rytarowski <n54@gmx.com>
7727 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
7728 * inf-ptrace.c: Likewise.
7729 * (gdb_ptrace): Add.
7730 * (inf_ptrace_target::resume): Update.
7731 * (inf_ptrace_target::xfer_partial): Likewise.
7732 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
7733 * (inf_ptrace_peek_poke): Update.
7734
7735 2020-03-19 Kamil Rytarowski <n54@gmx.com>
7736
7737 * x86-bsd-nat.c (gdb_ptrace): New.
7738 * (x86bsd_dr_set): Add new argument `ptid'.
7739 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
7740 x86bsd_dr_set_addr): Update.
7741
7742 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7743
7744 * remote.c (remote_target::process_stop_reply): Handle events for
7745 all threads differently.
7746
7747 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7748
7749 * completer.c (completion_tracker::remove_completion): Define new
7750 function.
7751 * completer.h (completion_tracker::remove_completion): Declare new
7752 function.
7753 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
7754 when adding a C++ function symbol.
7755
7756 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7757
7758 * completer.c (completion_tracker::completion_hash_entry): Define
7759 new class.
7760 (advance_to_filename_complete_word_point): Call
7761 recompute_lowest_common_denominator.
7762 (completion_tracker::completion_tracker): Call discard_completions
7763 to setup the hash table.
7764 (completion_tracker::discard_completions): Allow for being called
7765 from the constructor, pass new equal function, and element deleter
7766 when constructing the hash table. Initialise new class member
7767 variables.
7768 (completion_tracker::maybe_add_completion): Remove use of
7769 m_entries_vec, and store more information into m_entries_hash.
7770 (completion_tracker::recompute_lcd_visitor): New function, most
7771 content taken from...
7772 (completion_tracker::recompute_lowest_common_denominator):
7773 ...here, this now just visits each item in the hash calling the
7774 above visitor.
7775 (completion_tracker::build_completion_result): Remove use of
7776 m_entries_vec, call recompute_lowest_common_denominator.
7777 * completer.h (completion_tracker::have_completions): Remove use
7778 of m_entries_vec.
7779 (completion_tracker::completion_hash_entry): Declare new class.
7780 (completion_tracker::recompute_lowest_common_denominator): Change
7781 function signature.
7782 (completion_tracker::recompute_lcd_visitor): Declare new function.
7783 (completion_tracker::m_entries_vec): Delete.
7784 (completion_tracker::m_entries_hash): Initialize to NULL.
7785 (completion_tracker::m_lowest_common_denominator_valid): New
7786 member variable.
7787 (completion_tracker::m_lowest_common_denominator_max_length): New
7788 member variable.
7789
7790 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7791
7792 * regformats/regdef.h: Put reg in gdb namespace.
7793
7794 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7795
7796 * i386-bsd-nat.c (gdb_ptrace): New.
7797 * (i386bsd_fetch_inferior_registers,
7798 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
7799 * (i386bsd_fetch_inferior_registers,
7800 i386bsd_store_inferior_registers) Use gdb_ptrace.
7801
7802 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7803
7804 * amd64-bsd-nat.c (gdb_ptrace): New.
7805 * (amd64bsd_fetch_inferior_registers,
7806 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
7807 * (amd64bsd_fetch_inferior_registers,
7808 amd64bsd_store_inferior_registers) Use gdb_ptrace.
7809
7810 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7811
7812 * user-regs.c (user_reg::read): Rename to...
7813 (user_reg::xread): ...this.
7814 * (append_user_reg): Rename argument `read' to `xread'.
7815 * (user_reg_add_builtin): Likewise.
7816 * (user_reg_add): Likewise.
7817 * (value_of_user_reg): Likewise.
7818
7819 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7820
7821 * sparc-nat.c (gdb_ptrace): New.
7822 * sparc-nat.c (sparc_fetch_inferior_registers)
7823 (sparc_store_inferior_registers) Remove obsolete comment.
7824 * sparc-nat.c (sparc_fetch_inferior_registers)
7825 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
7826 * sparc-nat.c (sparc_fetch_inferior_registers)
7827 (sparc_store_inferior_registers) Use gdb_ptrace.
7828
7829 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7830
7831 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
7832 it to the ptrace call.
7833 * sh-nbsd-nat.c (store_registers): Likewise.
7834
7835 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7836
7837 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
7838 nbsd_nat_target instead of inf_ptrace_target.
7839 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7840 nbsd_nat_target.
7841
7842 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7843
7844 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
7845
7846 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7847
7848 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
7849 <sys/sysctl.h>.
7850 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
7851
7852 2020-03-17 Tom de Vries <tdevries@suse.de>
7853
7854 PR gdb/23710
7855 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
7856 fields.
7857 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
7858 fields.
7859 (process_imported_unit_die): Skip import of c++ CUs.
7860
7861 2020-03-16 Tom Tromey <tom@tromey.com>
7862
7863 * p-valprint.c (pascal_object_print_value): Initialize
7864 base_value.
7865
7866 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
7867 Shahab Vahedi <shahab@synopsys.com>
7868
7869 * Makefile.in: Add arch/arc.o
7870 * configure.tgt: Likewise.
7871 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
7872 (_initialize_arc_tdep): Don't initialize old target descriptions.
7873 (arc_read_description): New function to cache target descriptions.
7874 * arc-tdep.h (arc_read_description): Add proto type.
7875 * arch/arc.c: New file.
7876 * arch/arc.h: Likewise.
7877 * features/Makefile: Replace old target descriptions with new.
7878 * features/arc-arcompact.c: Remove.
7879 * features/arc-arcompact.xml: Likewise.
7880 * features/arc-v2.c: Likewise
7881 * features/arc-v2.xml: Likewise
7882 * features/arc/aux-arcompact.xml: New file.
7883 * features/arc/aux-v2.xml: Likewise.
7884 * features/arc/core-arcompact.xml: Likewise.
7885 * features/arc/core-v2.xml: Likewise.
7886 * features/arc/aux-arcompact.c: Generate.
7887 * features/arc/aux-v2.c: Likewise.
7888 * features/arc/core-arcompact.c: Likewise.
7889 * features/arc/core-v2.c: Likewise.
7890 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
7891
7892 2020-03-16 Tom Tromey <tromey@adacore.com>
7893
7894 PR gdb/25663:
7895 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
7896 putting value into bcache.
7897
7898 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7899
7900 PR gdb/21500
7901 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
7902 to...
7903 (amd64_windows_init_abi_common): ... this. Don't set size of
7904 long type.
7905 (amd64_windows_init_abi): New function.
7906 (amd64_cygwin_init_abi): New function.
7907 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
7908 the Cygwin OS ABI.
7909 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
7910 comment.
7911
7912 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7913
7914 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
7915 * windows-tdep.c (CYGWIN_DLL_NAME): New.
7916 (pe_import_directory_entry): New struct type.
7917 (is_linked_with_cygwin_dll): New function.
7918 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
7919 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
7920 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
7921
7922 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7923
7924 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
7925 i386_cygwin_core_osabi_sniffer.
7926
7927 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7928
7929 * i386-cygwin-tdep.c: Rename to...
7930 * i386-windows-tdep.c: ... this.
7931 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
7932 i386-windows-tdep.c.
7933 * configure.tgt: Likewise.
7934
7935 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7936
7937 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
7938 * osabi.c (gdb_osabi_names): Add "Windows".
7939 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
7940 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
7941 (i386_cygwin_core_osabi_sniffer): New function, extracted from
7942 i386_cygwin_osabi_sniffer.
7943 (_initialize_i386_cygwin_tdep): Register OS ABI
7944 GDB_OSABI_WINDOWS for i386.
7945 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
7946 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
7947 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
7948 for x86-64.
7949 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
7950 when the target matches '*-*-mingw*'.
7951
7952 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7953
7954 * defs.h (enum gdb_osabi): Move to...
7955 * osabi.h (enum gdb_osabi): ... here.
7956 * gdbarch.sh: Include osabi.h in gdbarch.h.
7957 * gdbarch.h: Re-generate.
7958
7959 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7960
7961 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
7962 function.
7963 (_initialize_amd64_windows_tdep): Register osabi sniffer.
7964
7965 2020-03-14 Tom Tromey <tom@tromey.com>
7966
7967 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
7968 for C++.
7969 (c_type_print_modifier): Likewise. Add "language" parameter.
7970 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
7971 (c_type_print_base_1): Update.
7972 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
7973 constants.
7974 * type-stack.c (type_stack::insert): Handle tp_atomic and
7975 tp_restrict.
7976 (type_stack::follow_type_instance_flags): Likewise.
7977 (type_stack::follow_types): Likewise. Merge type-following code.
7978 * c-exp.y (RESTRICT, ATOMIC): New tokens.
7979 (space_identifier, cv_with_space_id)
7980 (const_or_volatile_or_space_identifier_noopt)
7981 (const_or_volatile_or_space_identifier): Remove.
7982 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
7983 rules.
7984 (ptr_operator, typebase): Update.
7985 (enum token_flag) <FLAG_C>: New constant.
7986 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
7987 "_Atomic".
7988 (lex_one_token): Handle FLAG_C.
7989
7990 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7991
7992 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
7993 it to the ptrace call.
7994 * m68k-bsd-nat.c (store_registers): Likewise.
7995
7996 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7997
7998 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
7999 gdb_byte *.
8000 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
8001 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
8002 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
8003
8004 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8005
8006 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
8007 nbsd_nat_target instead of inf_ptrace_target.
8008 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
8009 nbsd_nat_target.
8010
8011 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8012
8013 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
8014 register_t.
8015
8016 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8017
8018 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
8019 it to the ptrace call.
8020 * alpha-bsd-nat.c (store_registers): Likewise.
8021
8022 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8023
8024 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
8025 includes.
8026 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
8027 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
8028 fill_fpregset): Likewise.
8029
8030 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8031
8032 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
8033 nbsd_nat_target instead of inf_ptrace_target.
8034 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
8035 nbsd_nat_target.
8036
8037 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8038
8039 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
8040 register_t.
8041
8042 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8043
8044 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
8045 it to the ptrace call.
8046 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
8047 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
8048 * arm-nbsd-nat.c (store_register): Likewise.
8049 * arm-nbsd-nat.c (store_regs): Likewise.
8050 * arm-nbsd-nat.c (store_fp_register): Likewise.
8051 * arm-nbsd-nat.c (store_fp_regs): Likewise.
8052
8053 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8054
8055 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
8056 nbsd_nat_target instead of inf_ptrace_target.
8057 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
8058 nbsd_nat_target.
8059
8060 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8061
8062 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
8063 it to the ptrace call.
8064 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
8065
8066 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8067
8068 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
8069 it to the ptrace call.
8070 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
8071
8072 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8073
8074 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
8075 gdb_byte *.
8076 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
8077
8078 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8079
8080 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
8081 instead of inf_ptrace_target.
8082 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
8083 nbsd_nat_target.
8084
8085 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8086
8087 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
8088 register_t.
8089
8090 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8091
8092 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
8093 register_t.
8094
8095 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8096
8097 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
8098 register_t.
8099
8100 2020-03-13 Tom Tromey <tom@tromey.com>
8101
8102 * value.h (val_print): Don't declare.
8103 * valprint.h (val_print_array_elements)
8104 (val_print_scalar_formatted, generic_val_print): Don't declare.
8105 * valprint.c (generic_val_print_array): Take a struct value.
8106 (generic_val_print_ptr, generic_val_print_memberptr)
8107 (generic_val_print_bool, generic_val_print_int)
8108 (generic_val_print_char, generic_val_print_complex)
8109 (generic_val_print): Remove.
8110 (generic_value_print): Update.
8111 (do_val_print): Remove unused parameters. Don't call
8112 la_val_print.
8113 (val_print): Remove.
8114 (common_val_print): Update. Don't call value_check_printable.
8115 (val_print_scalar_formatted, val_print_array_elements): Remove.
8116 * rust-lang.c (rust_val_print): Remove.
8117 (rust_language_defn): Update.
8118 * p-valprint.c (pascal_val_print): Remove.
8119 (pascal_value_print_inner): Update.
8120 (pascal_object_print_val_fields, pascal_object_print_val):
8121 Remove.
8122 (pascal_object_print_static_field): Update.
8123 * p-lang.h (pascal_val_print): Don't declare.
8124 * p-lang.c (pascal_language_defn): Update.
8125 * opencl-lang.c (opencl_language_defn): Update.
8126 * objc-lang.c (objc_language_defn): Update.
8127 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
8128 * m2-lang.h (m2_val_print): Don't declare.
8129 * m2-lang.c (m2_language_defn): Update.
8130 * language.h (struct language_defn) <la_val_print>: Remove.
8131 * language.c (unk_lang_value_print_inner): Rename. Change
8132 argument types.
8133 (unknown_language_defn, auto_language_defn): Update.
8134 * go-valprint.c (go_val_print): Remove.
8135 * go-lang.h (go_val_print): Don't declare.
8136 * go-lang.c (go_language_defn): Update.
8137 * f-valprint.c (f_val_print): Remove.
8138 * f-lang.h (f_value_print): Don't declare.
8139 * f-lang.c (f_language_defn): Update.
8140 * d-valprint.c (d_val_print): Remove.
8141 * d-lang.h (d_value_print): Don't declare.
8142 * d-lang.c (d_language_defn): Update.
8143 * cp-valprint.c (cp_print_value_fields)
8144 (cp_print_value_fields_rtti, cp_print_value): Remove.
8145 (cp_print_static_field): Update.
8146 * c-valprint.c (c_val_print_array, c_val_print_ptr)
8147 (c_val_print_struct, c_val_print_union, c_val_print_int)
8148 (c_val_print_memberptr, c_val_print): Remove.
8149 * c-lang.h (c_val_print_array, cp_print_value_fields)
8150 (cp_print_value_fields_rtti): Don't declare.
8151 * c-lang.c (c_language_defn, cplus_language_defn)
8152 (asm_language_defn, minimal_language_defn): Update.
8153 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
8154 (ada_val_print_enum): Take a struct value.
8155 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
8156 (ada_val_print): Remove.
8157 (ada_value_print_1): Update.
8158 (printable_val_type): Remove.
8159 * ada-lang.h (ada_val_print): Don't declare.
8160 * ada-lang.c (ada_language_defn): Update.
8161
8162 2020-03-13 Tom Tromey <tom@tromey.com>
8163
8164 * valprint.c (do_val_print): Update.
8165 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
8166 a struct value.
8167 (value_to_value_object_no_release): Declare.
8168 * python/py-value.c (value_to_value_object_no_release): New
8169 function.
8170 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
8171 struct value.
8172 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
8173 function.
8174 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
8175 a struct value.
8176 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
8177 Declare.
8178 (gdbscm_apply_val_pretty_printer): Take a struct value.
8179 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
8180 value.
8181 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
8182 value.
8183 * extension-priv.h (struct extension_language_ops)
8184 <apply_val_pretty_printer>: Take a struct value.
8185 * cp-valprint.c (cp_print_value): Create a struct value.
8186 (cp_print_value): Update.
8187
8188 2020-03-13 Tom Tromey <tom@tromey.com>
8189
8190 * ada-valprint.c (print_field_values): Call common_val_print.
8191
8192 2020-03-13 Tom Tromey <tom@tromey.com>
8193
8194 * ada-valprint.c (val_print_packed_array_elements): Remove
8195 bitoffset and val parameters. Call common_val_print.
8196 (ada_val_print_string): Remove offset, address, and original_value
8197 parameters.
8198 (ada_val_print_array): Update.
8199 (ada_value_print_array): New function.
8200 (ada_value_print_1): Call it.
8201
8202 2020-03-13 Tom Tromey <tom@tromey.com>
8203
8204 * ada-valprint.c (ada_value_print): Use common_val_print.
8205
8206 2020-03-13 Tom Tromey <tom@tromey.com>
8207
8208 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
8209
8210 2020-03-13 Tom Tromey <tom@tromey.com>
8211
8212 * ada-valprint.c (ada_value_print_num): New function.
8213 (ada_value_print_1): Use it.
8214
8215 2020-03-13 Tom Tromey <tom@tromey.com>
8216
8217 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
8218
8219 2020-03-13 Tom Tromey <tom@tromey.com>
8220
8221 * ada-valprint.c (ada_value_print_ptr): New function.
8222 (ada_value_print_1): Use it.
8223
8224 2020-03-13 Tom Tromey <tom@tromey.com>
8225
8226 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
8227 call common_val_print.
8228 (ada_val_print_1): Update.
8229 (ada_value_print_1): New function.
8230 (ada_value_print_inner): Rewrite.
8231
8232 2020-03-13 Tom Tromey <tom@tromey.com>
8233
8234 * cp-valprint.c (cp_print_value_fields): Update.
8235 (cp_print_value): New function.
8236
8237 2020-03-13 Tom Tromey <tom@tromey.com>
8238
8239 * m2-valprint.c (m2_value_print_inner): Use
8240 cp_print_value_fields.
8241 * cp-valprint.c (cp_print_value_fields): New function.
8242 * c-valprint.c (c_value_print_struct): New function.
8243 (c_value_print_inner): Use c_value_print_struct.
8244 * c-lang.h (cp_print_value_fields): Declare.
8245
8246 2020-03-13 Tom Tromey <tom@tromey.com>
8247
8248 * c-valprint.c (c_value_print_array): New function.
8249 (c_value_print_inner): Use it.
8250
8251 2020-03-13 Tom Tromey <tom@tromey.com>
8252
8253 * c-valprint.c (c_value_print_memberptr): New function.
8254 (c_value_print_inner): Use it.
8255
8256 2020-03-13 Tom Tromey <tom@tromey.com>
8257
8258 * c-valprint.c (c_value_print_int): New function.
8259 (c_value_print_inner): Use it.
8260
8261 2020-03-13 Tom Tromey <tom@tromey.com>
8262
8263 * c-valprint.c (c_value_print_ptr): New function.
8264 (c_value_print_inner): Use it.
8265
8266 2020-03-13 Tom Tromey <tom@tromey.com>
8267
8268 * c-valprint.c (c_value_print_inner): Rewrite.
8269
8270 2020-03-13 Tom Tromey <tom@tromey.com>
8271
8272 * valprint.c (generic_value_print_complex): New function.
8273 (generic_value_print): Use it.
8274
8275 2020-03-13 Tom Tromey <tom@tromey.com>
8276
8277 * valprint.c (generic_val_print_float): Don't call
8278 val_print_scalar_formatted.
8279 (generic_val_print, generic_value_print): Update.
8280
8281 2020-03-13 Tom Tromey <tom@tromey.com>
8282
8283 * valprint.c (generic_value_print_char): New function
8284 (generic_value_print): Use it.
8285
8286 2020-03-13 Tom Tromey <tom@tromey.com>
8287
8288 * valprint.c (generic_value_print_int): New function.
8289 (generic_value_print): Use it.
8290
8291 2020-03-13 Tom Tromey <tom@tromey.com>
8292
8293 * valprint.c (generic_value_print_bool): New function.
8294 (generic_value_print): Use it.
8295
8296 2020-03-13 Tom Tromey <tom@tromey.com>
8297
8298 * valprint.c (generic_val_print_func): Simplify.
8299 (generic_val_print, generic_value_print): Update.
8300
8301 2020-03-13 Tom Tromey <tom@tromey.com>
8302
8303 * valprint.c (generic_val_print_flags): Remove.
8304 (generic_val_print, generic_value_print): Update.
8305 (val_print_type_code_flags): Add original_value parameter.
8306
8307 2020-03-13 Tom Tromey <tom@tromey.com>
8308
8309 * valprint.c (generic_val_print): Update.
8310 (generic_value_print): Update.
8311 * valprint.c (generic_val_print_enum): Don't call
8312 val_print_scalar_formatted.
8313
8314 2020-03-13 Tom Tromey <tom@tromey.com>
8315
8316 * valprint.c (generic_value_print): Call generic_value_print_ptr.
8317 * valprint.c (generic_value_print_ptr): New function.
8318
8319 2020-03-13 Tom Tromey <tom@tromey.com>
8320
8321 * valprint.c (generic_value_print): Rewrite.
8322
8323 2020-03-13 Tom Tromey <tom@tromey.com>
8324
8325 * p-valprint.c (pascal_object_print_value_fields)
8326 (pascal_object_print_value): New functions.
8327
8328 2020-03-13 Tom Tromey <tom@tromey.com>
8329
8330 * p-valprint.c (pascal_value_print_inner): Rewrite.
8331
8332 2020-03-13 Tom Tromey <tom@tromey.com>
8333
8334 * f-valprint.c (f_value_print_innner): Rewrite.
8335
8336 2020-03-13 Tom Tromey <tom@tromey.com>
8337
8338 * m2-valprint.c (m2_print_unbounded_array): New overload.
8339 (m2_print_unbounded_array): Update.
8340 (m2_print_array_contents): Take a struct value.
8341 (m2_value_print_inner): Rewrite.
8342
8343 2020-03-13 Tom Tromey <tom@tromey.com>
8344
8345 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
8346 (d_value_print_inner): New function.
8347 * d-lang.h (d_value_print_inner): Declare.
8348 * d-lang.c (d_language_defn): Use d_value_print_inner.
8349
8350 2020-03-13 Tom Tromey <tom@tromey.com>
8351
8352 * go-valprint.c (go_value_print_inner): New function.
8353 * go-lang.h (go_value_print_inner): Declare.
8354 * go-lang.c (go_language_defn): Use go_value_print_inner.
8355
8356 2020-03-13 Tom Tromey <tom@tromey.com>
8357
8358 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
8359 API.
8360 (rust_val_print): Rewrite.
8361 (rust_value_print_inner): New function, from rust_val_print.
8362 (rust_language_defn): Use rust_value_print_inner.
8363
8364 2020-03-13 Tom Tromey <tom@tromey.com>
8365
8366 * ada-valprint.c (ada_value_print_inner): New function.
8367 * ada-lang.h (ada_value_print_inner): Declare.
8368 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
8369
8370 2020-03-13 Tom Tromey <tom@tromey.com>
8371
8372 * f-valprint.c (f_value_print_innner): New function.
8373 * f-lang.h (f_value_print_innner): Declare.
8374 * f-lang.c (f_language_defn): Use f_value_print_innner.
8375
8376 2020-03-13 Tom Tromey <tom@tromey.com>
8377
8378 * p-valprint.c (pascal_value_print_inner): New function.
8379 * p-lang.h (pascal_value_print_inner): Declare.
8380 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
8381
8382 2020-03-13 Tom Tromey <tom@tromey.com>
8383
8384 * m2-valprint.c (m2_value_print_inner): New function.
8385 * m2-lang.h (m2_value_print_inner): Declare.
8386 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
8387
8388 2020-03-13 Tom Tromey <tom@tromey.com>
8389
8390 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
8391 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
8392 * c-valprint.c (c_value_print_inner): New function.
8393 * c-lang.h (c_value_print_inner): Declare.
8394 * c-lang.c (c_language_defn, cplus_language_defn)
8395 (asm_language_defn, minimal_language_defn): Use
8396 c_value_print_inner.
8397
8398 2020-03-13 Tom Tromey <tom@tromey.com>
8399
8400 * p-valprint.c (pascal_object_print_value_fields): Now static.
8401 * p-lang.h (pascal_object_print_value_fields): Don't declare.
8402
8403 2020-03-13 Tom Tromey <tom@tromey.com>
8404
8405 * c-valprint.c (c_val_print_array): Simplify.
8406
8407 2020-03-13 Tom Tromey <tom@tromey.com>
8408
8409 * valprint.c (value_print_array_elements): New function.
8410 * valprint.h (value_print_array_elements): Declare.
8411
8412 2020-03-13 Tom Tromey <tom@tromey.com>
8413
8414 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
8415 * mips-tdep.c (mips_print_register): Use
8416 value_print_scalar_formatted.
8417
8418 2020-03-13 Tom Tromey <tom@tromey.com>
8419
8420 * valprint.h (value_print_scalar_formatted): Declare.
8421 * valprint.c (value_print_scalar_formatted): New function.
8422
8423 2020-03-13 Tom Tromey <tom@tromey.com>
8424
8425 * valprint.h (generic_value_print): Declare.
8426 * valprint.c (generic_value_print): New function.
8427
8428 2020-03-13 Tom Tromey <tom@tromey.com>
8429
8430 * valprint.c (do_val_print): Call la_value_print_inner, if
8431 available.
8432 * rust-lang.c (rust_language_defn): Update.
8433 * p-lang.c (pascal_language_defn): Update.
8434 * opencl-lang.c (opencl_language_defn): Update.
8435 * objc-lang.c (objc_language_defn): Update.
8436 * m2-lang.c (m2_language_defn): Update.
8437 * language.h (struct language_defn) <la_value_print_inner>: New
8438 member.
8439 * language.c (unknown_language_defn, auto_language_defn): Update.
8440 * go-lang.c (go_language_defn): Update.
8441 * f-lang.c (f_language_defn): Update.
8442 * d-lang.c (d_language_defn): Update.
8443 * c-lang.c (c_language_defn, cplus_language_defn)
8444 (asm_language_defn, minimal_language_defn): Update.
8445 * ada-lang.c (ada_language_defn): Update.
8446
8447 2020-03-13 Tom Tromey <tom@tromey.com>
8448
8449 * c-valprint.c (c_value_print): Use common_val_print.
8450
8451 2020-03-13 Tom Tromey <tom@tromey.com>
8452
8453 * cp-valprint.c (cp_print_static_field): Use common_val_print.
8454
8455 2020-03-13 Tom Tromey <tom@tromey.com>
8456
8457 * f-valprint.c (f77_print_array_1, f_val_print): Use
8458 common_val_print.
8459
8460 2020-03-13 Tom Tromey <tom@tromey.com>
8461
8462 * riscv-tdep.c (riscv_print_one_register_info): Use
8463 common_val_print.
8464
8465 2020-03-13 Tom Tromey <tom@tromey.com>
8466
8467 * mi/mi-main.c (output_register): Use common_val_print.
8468
8469 2020-03-13 Tom Tromey <tom@tromey.com>
8470
8471 * infcmd.c (default_print_one_register_info): Use
8472 common_val_print.
8473
8474 2020-03-13 Tom Tromey <tom@tromey.com>
8475
8476 * valprint.h (common_val_print_checked): Declare.
8477 * valprint.c (common_val_print_checked): New function.
8478 * stack.c (print_frame_arg): Use common_val_print_checked.
8479
8480 2020-03-13 Tom Tromey <tom@tromey.com>
8481
8482 * valprint.c (do_val_print): New function, from val_print.
8483 (val_print): Use do_val_print.
8484 (common_val_print): Use do_val_print.
8485
8486 2020-03-13 Tom Tromey <tom@tromey.com>
8487
8488 * valprint.c (value_print): Use scoped_value_mark.
8489
8490 2020-03-13 Tom de Vries <tdevries@suse.de>
8491
8492 PR symtab/25646
8493 * psymtab.c (partial_symtab::partial_symtab): Don't set
8494 globals_offset and statics_offset. Push element onto
8495 current_global_psymbols and current_static_psymbols stacks.
8496 (concat): New function.
8497 (end_psymtab_common): Set globals_offset and statics_offset. Pop
8498 element from current_global_psymbols and current_static_psymbols
8499 stacks. Concat popped elements to global_psymbols and
8500 static_symbols.
8501 (add_psymbol_to_list): Use current_global_psymbols and
8502 current_static_psymbols stacks.
8503 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
8504 current_static_psymbols fields.
8505
8506 2020-03-12 Christian Biesinger <cbiesinger@google.com>
8507
8508 * corelow.c (sniff_core_bfd): Remove.
8509 (class core_target) <m_core_vec>: Remove.
8510 (core_target::core_target): Update.
8511 (core_file_fns): Remove.
8512 (deprecated_add_core_fns): Remove.
8513 (default_core_sniffer): Remove.
8514 (sniff_core_bfd): Remove.
8515 (default_check_format): Remove.
8516 (gdb_check_format): Remove.
8517 (core_target_open): Update.
8518 (core_target::get_core_register_section): Update.
8519 (get_core_registers_cb): Update.
8520 (core_target::fetch_registers): Update.
8521 * gdbcore.h (struct core_fns): Remove.
8522 (deprecated_add_core_fns): Remove.
8523 (default_core_sniffer): Remove.
8524 (default_check_format): Remove.
8525
8526 2020-03-12 Tom Tromey <tom@tromey.com>
8527
8528 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
8529 CORE_ADDR.
8530 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
8531
8532 2020-03-12 Tom Tromey <tom@tromey.com>
8533
8534 * remote.c (remote_target::download_tracepoint)
8535 (remote_target::enable_tracepoint)
8536 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
8537 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
8538 sprintf_vma.
8539
8540 2020-03-12 Tom Tromey <tom@tromey.com>
8541
8542 * symfile-mem.c: Update CORE_ADDR size assert.
8543
8544 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8545
8546 * selftest.m4: Move to gdbsupport/.
8547 * acinclude.m4: Update path to selftest.m4.
8548
8549 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8550
8551 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
8552 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
8553 gdbarch-selfselftests.c and selftest-arch.c.
8554 (SUBDIR_UNITTESTS_OBS): Rename to...
8555 (SELFTESTS_OBS): ... this.
8556 (COMMON_SFILES): Remove disasm-selftests.c and
8557 gdbarch-selftests.c.
8558 * configure.ac: Don't add selftest-arch.{c,o} to
8559 CONFIG_{SRCS,OBS}.
8560 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
8561 preprocessor conditions.
8562
8563 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8564
8565 * configure.ac: Don't source bfd/development.sh.
8566 * selftest.m4: Modify comment.
8567 * configure: Re-generate.
8568
8569 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8570
8571 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
8572 not "true" or "false".
8573 * configure: Re-generate.
8574
8575 2020-03-12 Christian Biesinger <cbiesinger@google.com>
8576
8577 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
8578 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
8579 renamed to arm_nbsd_supply_gregset.
8580 (fetch_register): Update to call arm_nbsd_supply_gregset.
8581 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
8582 (arm_netbsd_nat_target::fetch_registers): Update.
8583 (fetch_elfcore_registers): Removed.
8584 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
8585 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
8586 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
8587 not require NetBSD system headers.
8588 (arm_nbsd_regset): New struct.
8589 (arm_nbsd_iterate_over_regset_sections): New function.
8590 (arm_netbsd_init_abi_common): Updated to call
8591 set_gdbarch_iterate_over_regset_sections.
8592 * arm-nbsd-tdep.h: New file.
8593
8594 2020-03-11 Kevin Buettner <kevinb@redhat.com>
8595
8596 * symtab.c (find_pc_sect_line): Add check which prevents infinite
8597 recursion.
8598
8599 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
8600
8601 * configure: Re-generate.
8602
8603 2020-03-11 Tom Tromey <tromey@adacore.com>
8604
8605 * ada-typeprint.c (print_choices): Fix comment.
8606
8607 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
8608
8609 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
8610 previous item in the list, when the list has no items.
8611
8612 2020-03-11 Tom de Vries <tdevries@suse.de>
8613
8614 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
8615 PROP_LOCLIST handling code.
8616
8617 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
8618
8619 * buildsym-legacy.c (record_line): Pass extra parameter to
8620 record_line.
8621 * buildsym.c (buildsym_compunit::record_line): Take an extra
8622 parameter, reduce duplication in the line table, and record the
8623 is_stmt flag in the line table.
8624 * buildsym.h (buildsym_compunit::record_line): Add extra
8625 parameter.
8626 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
8627 non-statement lines.
8628 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
8629 this to the symtab builder.
8630 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
8631 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
8632 through to dwarf_record_line_1.
8633 * infrun.c (process_event_stop_test): When stepping, don't stop at
8634 a non-statement instruction, and only refresh the step info when
8635 we land in the middle of a line's range. Also add an extra
8636 comment.
8637 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
8638 field.
8639 * record-btrace.c (btrace_find_line_range): Only record lines
8640 marked as is-statement.
8641 * stack.c (frame_show_address): Show the frame address if we are
8642 in a non-statement sal.
8643 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
8644 (maintenance_print_one_line_table): Print a header for the is_stmt
8645 column, and include is_stmt information in the output.
8646 * symtab.c (find_pc_sect_line): Find lines marked as statements in
8647 preference to non-statements.
8648 (find_pcs_for_symtab_line): Prefer is-statement entries.
8649 (find_line_common): Likewise.
8650 * symtab.h (struct linetable_entry): Add is_stmt field.
8651 (struct symtab_and_line): Likewise.
8652 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
8653 arranging the line table.
8654
8655 2020-03-07 Tom de Vries <tdevries@suse.de>
8656
8657 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
8658 DIE.
8659
8660 2020-03-07 Tom Tromey <tom@tromey.com>
8661
8662 * valops.c (value_literal_complex): Remove obsolete comment.
8663 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
8664 comment.
8665
8666 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8667
8668 * infrun.h: Forward-declare thread_info.
8669 (set_step_info): Add thread_info parameter, add doc.
8670 * infrun.c (set_step_info): Add thread_info parameter, move doc
8671 to header.
8672 * infrun.c (process_event_stop_test): Pass thread to
8673 set_step_info call.
8674 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
8675 set_step_info.
8676 (prepare_one_step): Add thread_info parameter, pass it to
8677 set_step_frame and prepare_one_step (recursive) call.
8678 (step_1): Pass thread to prepare_one_step call.
8679 (step_command_fsm::should_stop): Pass thread to
8680 prepare_one_step.
8681 (until_next_fsm): Pass thread to set_step_frame call.
8682 (finish_command): Pass thread to set_step_info call.
8683
8684 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
8685
8686 * windows-tdep.c (windows_solib_create_inferior_hook):
8687 Check if inferior is running.
8688
8689 2020-03-06 Tom de Vries <tdevries@suse.de>
8690
8691 * NEWS: Fix "the the".
8692 * ctfread.c: Same.
8693
8694 2020-03-06 Tom de Vries <tdevries@suse.de>
8695
8696 * psymtab.c (psymtab_to_symtab): Don't print "done.".
8697
8698 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8699
8700 * .dir-locals.el: Add a comment referencing the other copies of
8701 this file.
8702
8703 2020-03-05 John Baldwin <jhb@FreeBSD.org>
8704
8705 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
8706 psargs.
8707
8708 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
8709
8710 * .gitattributes: New file.
8711
8712 2020-03-04 Tom Tromey <tom@tromey.com>
8713
8714 * symmisc.c (print_symbol_bcache_statistics)
8715 (print_objfile_statistics): Update.
8716 * symfile.c (allocate_symtab): Use intern.
8717 * psymtab.c (partial_symtab::partial_symtab): Use intern.
8718 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
8719 macro_cache>: Remove.
8720 <string_cache>: New member.
8721 (struct objfile) <intern>: New methods.
8722 * elfread.c (elf_symtab_read): Use intern.
8723 * dwarf2/read.c (fixup_go_packaging): Intern package name.
8724 (dwarf2_compute_name, dwarf2_physname)
8725 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
8726 names.
8727 (guess_partial_die_structure_name): Update.
8728 (partial_die_info::fixup): Intern name.
8729 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
8730 name.
8731 (dwarf2_name): Intern name. Update.
8732 * buildsym.c (buildsym_compunit::get_macro_table): Use
8733 string_cache.
8734
8735 2020-03-04 Tom Tromey <tom@tromey.com>
8736
8737 * jit.c (bfd_open_from_target_memory): Make "target" const.
8738 * corefile.c (gnutarget): Now const.
8739 * gdbcore.h (gnutarget): Now const.
8740
8741 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
8742
8743 * NEWS: Mention support for WOW64 processes.
8744 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
8745 (amd64_windows_segment_register_p): Remove static.
8746 (_initialize_amd64_windows_nat): Update.
8747 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
8748 * i386-windows-nat.c (context_offset): Update.
8749 (i386_mappings): Rename and remove static.
8750 (i386_windows_segment_register_p): Remove static.
8751 (_initialize_i386_windows_nat): Update.
8752 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
8753 (STATUS_WX86_SINGLE_STEP): New macro.
8754 (EnumProcessModulesEx): New macro.
8755 (Wow64SuspendThread): New macro.
8756 (Wow64GetThreadContext): New macro.
8757 (Wow64SetThreadContext): New macro.
8758 (Wow64GetThreadSelectorEntry): New macro.
8759 (windows_set_context_register_offsets): Add static.
8760 (windows_set_segment_register_p): Likewise.
8761 (windows_add_thread): Adapt for WOW64 processes.
8762 (windows_fetch_one_register): Likewise.
8763 (windows_nat_target::fetch_registers): Likewise.
8764 (windows_store_one_register): Likewise.
8765 (display_selector): Likewise.
8766 (display_selectors): Likewise.
8767 (handle_exception): Likewise.
8768 (windows_continue): Likewise.
8769 (windows_nat_target::resume): Likewise.
8770 (windows_add_all_dlls): Likewise.
8771 (do_initial_windows_stuff): Likewise.
8772 (windows_nat_target::attach): Likewise.
8773 (windows_get_exec_module_filename): Likewise.
8774 (windows_nat_target::create_inferior): Likewise.
8775 (windows_xfer_siginfo): Likewise.
8776 (_initialize_loadable): Initialize Wow64SuspendThread,
8777 Wow64GetThreadContext, Wow64SetThreadContext,
8778 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
8779 * windows-nat.h (windows_set_context_register_offsets):
8780 Remove declaration.
8781 (windows_set_segment_register_p): Likewise.
8782 (i386_windows_segment_register_p): Add declaration.
8783 (amd64_windows_segment_register_p): Likewise.
8784
8785 2020-03-04 Luis Machado <luis.machado@linaro.org>
8786
8787 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
8788 in "info registers" for AArch64/ARM.
8789
8790 The change caused "info registers" to not print GPR's.
8791
8792 gdb/ChangeLog:
8793
8794 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
8795
8796 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
8797 when reg->group is empty and reggroup is not.
8798
8799 2020-03-03 Tom Tromey <tromey@adacore.com>
8800
8801 * dwarf2/frame.c (struct dwarf2_frame_cache)
8802 <checked_tailcall_bottom, entry_cfa_sp_offset,
8803 entry_cfa_sp_offset_p>: Remove members.
8804 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
8805 (dwarf2_frame_prev_register): Don't call
8806 dwarf2_tailcall_sniffer_first.
8807 (dwarf2_append_unwinders): Don't append tailcall unwinder.
8808 * frame-unwind.c (add_unwinder): New fuction.
8809 (frame_unwind_init): Use it. Add tailcall unwinder.
8810
8811 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
8812 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8813
8814 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
8815 value should be printed as true.
8816
8817 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
8818
8819 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
8820 (windows_init_abi): Set and use windows_so_ops.
8821
8822 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
8823
8824 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
8825 when verifying if dealing with a convenience variable.
8826
8827 2020-03-03 Luis Machado <luis.machado@linaro.org>
8828
8829 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
8830
8831 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8832
8833 * infrun.c (gdbarch_supports_displaced_stepping): New.
8834 (use_displaced_stepping): Break up conditions in smaller pieces.
8835 Use gdbarch_supports_displaced_stepping.
8836 (displaced_step_prepare_throw): Use
8837 gdbarch_supports_displaced_stepping.
8838
8839 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
8840
8841 * NEWS: Mention new behaviour of the history filename.
8842 * top.c (write_history_p): Add comment.
8843 (show_write_history_p): Add header comment, give a different
8844 message when history writing is on, but the history filename is
8845 empty.
8846 (history_filename): Add comment.
8847 (history_filename_empty): New function.
8848 (show_history_filename): Add header comment, give a different
8849 message when the filename is empty.
8850 (init_history): Compare history_filename against nullptr, and only
8851 read history if the filename is not empty.
8852 (set_history_filename): Add header comment, and only make
8853 non-empty filenames absolute.
8854 (init_main): Make the filename argument to 'set history filename'
8855 optional.
8856
8857 2020-03-02 Christian Biesinger <cbiesinger@google.com>
8858
8859 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
8860 (arm_supply_vfpregset): ...this, and update to use VFP registers.
8861 (fetch_fp_register): Update.
8862 (fetch_fp_regs): Update.
8863 (store_fp_register): Update.
8864 (store_fp_regs): Update.
8865 (arm_netbsd_nat_target::read_description): New function.
8866 (fetch_elfcore_registers): Update.
8867
8868 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
8869
8870 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
8871 general_thread if the stop reply is missing a thread-id.
8872 (remote_target::process_stop_reply): Use the first non-exited
8873 thread if the target didn't pass a thread-id.
8874 * infrun.c (do_target_wait): Move call to
8875 switch_to_inferior_no_thread to ....
8876 (do_target_wait_1): ... here.
8877
8878 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
8879
8880 * debuginfod-support.c: Include defs.h first.
8881
8882 2020-02-28 Tom de Vries <tdevries@suse.de>
8883
8884 * symfile.c (set_initial_language): Use default language for lookup.
8885
8886 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
8887
8888 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
8889 reader variable, pass `this` to read_cutu_die_from_dwo.
8890
8891 2020-02-27 Aaron Merey <amerey@redhat.com>
8892
8893 * source.c (open_source_file): Check for nullptr when computing
8894 srcpath.
8895
8896 2020-02-27 Tom Tromey <tromey@adacore.com>
8897
8898 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
8899 member.
8900 (dwarf2_add_field): Don't update nfields.
8901 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
8902
8903 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
8904
8905 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
8906 abs.
8907
8908 2020-02-26 Tom Tromey <tom@tromey.com>
8909
8910 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
8911 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
8912 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
8913 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
8914 per_cu_data.
8915
8916 2020-02-26 Tom Tromey <tom@tromey.com>
8917
8918 * dwarf2/index-write.c (psym_index_map): Change type.
8919 (add_address_entry_worker, write_one_signatured_type)
8920 (recursively_count_psymbols, recursively_write_psymbols)
8921 (class debug_names, psyms_seen_size, write_gdbindex)
8922 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
8923
8924 2020-02-26 Aaron Merey <amerey@redhat.com>
8925
8926 * Makefile.in: Handle optional debuginfod support.
8927 * NEWS: Update.
8928 * README: Add --with-debuginfod summary.
8929 * config.in: Regenerate.
8930 * configure: Regenerate.
8931 * configure.ac: Handle optional debuginfod support.
8932 * debuginfod-support.c: debuginfod helper functions.
8933 * debuginfod-support.h: Ditto.
8934 * doc/gdb.texinfo: Add --with-debuginfod to configure options
8935 summary.
8936 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
8937 when a dwz file cannot be found.
8938 * elfread.c (elf_symfile_read): Query debuginfod servers when a
8939 debuginfo file cannot be found.
8940 * source.c (open_source_file): Query debuginfod servers when a
8941 source file cannot be found.
8942 * top.c (print_gdb_configuration): Include
8943 --{with,without}-debuginfod in the output.
8944
8945 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8946
8947 * thread.c (thr_try_catch_cmd): Print thread name.
8948
8949 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
8950
8951 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
8952 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8953 dwarf2_fetch_die_type_sect_off): Move to...
8954 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
8955 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8956 dwarf2_fetch_die_type_sect_off): ... here.
8957 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
8958 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8959 dwarf2_fetch_die_type_sect_off): Move doc to header file.
8960
8961 2020-02-26 Tom de Vries <tdevries@suse.de>
8962
8963 PR gdb/25603
8964 * symfile.c (set_initial_language): Exit-early if
8965 language_mode == language_mode_manual.
8966
8967 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
8968
8969 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
8970 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
8971 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
8972
8973 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
8974
8975 * gdbtypes.c (create_array_type_with_stride): Handle negative
8976 array strides.
8977 * valarith.c (value_subscripted_rvalue): Likewise.
8978
8979 2020-02-25 Luis Machado <luis.machado@linaro.org>
8980
8981 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
8982
8983 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
8984
8985 * loc.h (dwarf2_get_die_type): Move to...
8986 * read.h (dwarf2_get_die_type): ... here.
8987 * read.c (dwarf2_get_die_type): Move doc to header.
8988
8989 2020-02-25 Joel Brobecker <brobecker@adacore.com>
8990
8991 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
8992 'gnulib/Makefile.in' to the list.
8993
8994 2020-02-24 Tom Tromey <tom@tromey.com>
8995
8996 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
8997 Remove.
8998 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
8999 XOBNEWVEC.
9000
9001 2020-02-24 Tom Tromey <tom@tromey.com>
9002
9003 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
9004 New method.
9005 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
9006 (dw2_do_instantiate_symtab, dw2_get_file_names)
9007 (build_type_psymtab_dependencies, load_full_type_unit): Update.
9008
9009 2020-02-24 Tom Tromey <tom@tromey.com>
9010
9011 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
9012 make_scoped_restore.
9013 (dwarf2_psymtab::read_symtab): Don't clear
9014 reading_partial_symbols.
9015
9016 2020-02-24 Tom de Vries <tdevries@suse.de>
9017
9018 PR gdb/25592
9019 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
9020
9021 2020-02-24 Tom de Vries <tdevries@suse.de>
9022
9023 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
9024 commands layout next/prev/regs.
9025
9026 2020-02-22 Tom Tromey <tom@tromey.com>
9027
9028 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
9029 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
9030
9031 2020-02-22 Tom Tromey <tom@tromey.com>
9032
9033 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
9034
9035 2020-02-22 Tom Tromey <tom@tromey.com>
9036
9037 * tui/tui-win.c (_initialize_tui_win): Add usage text.
9038 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
9039 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
9040 * tui/tui.c (_initialize_tui): Add usage text.
9041
9042 2020-02-22 Tom Tromey <tom@tromey.com>
9043
9044 * tui/tui-win.c (tui_set_focus_command)
9045 (tui_set_win_height_command): Use error_no_arg.
9046 (_initialize_tui_win): Update help text.
9047 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
9048
9049 2020-02-22 Tom Tromey <tom@tromey.com>
9050
9051 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
9052 * tui/tui-disasm.h (struct tui_disasm_window)
9053 <display_start_addr>: Declare.
9054 * tui/tui-source.h (struct tui_source_window)
9055 <display_start_addr>: Declare.
9056 * tui/tui-winsource.h (struct tui_source_window_base)
9057 <show_source_line, display_start_addr>: New methods.
9058 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
9059 Rename and move to protected section.
9060 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
9061 (tui_source_window_base::do_erase_source_content): Update.
9062 (tui_source_window_base::show_source_line): Now a method.
9063 (tui_source_window_base::show_source_content)
9064 (tui_source_window_base::tui_source_window_base)
9065 (tui_source_window_base::rerender)
9066 (tui_source_window_base::refill)
9067 (tui_source_window_base::do_scroll_horizontal)
9068 (tui_source_window_base::set_is_exec_point_at)
9069 (tui_source_window_base::update_breakpoint_info)
9070 (tui_source_window_base::update_exec_info): Update.
9071 * tui/tui-source.c (tui_source_window::set_contents)
9072 (tui_source_window::showing_source_p)
9073 (tui_source_window::do_scroll_vertical)
9074 (tui_source_window::location_matches_p)
9075 (tui_source_window::line_is_displayed): Update.
9076 (tui_source_window::display_start_addr): New method.
9077 * tui/tui-disasm.c (tui_disasm_window::set_contents)
9078 (tui_disasm_window::do_scroll_vertical)
9079 (tui_disasm_window::location_matches_p): Update.
9080 (tui_disasm_window::display_start_addr): New method.
9081
9082 2020-02-22 Tom Tromey <tom@tromey.com>
9083
9084 * NEWS: Add entry for gdb.register_window_type.
9085 * tui/tui-layout.h (window_factory): New typedef.
9086 (tui_register_window): Declare.
9087 * tui/tui-layout.c (saved_tui_windows): New global.
9088 (tui_apply_current_layout): Use it.
9089 (tui_register_window): New function.
9090 * python/python.c (do_start_initialization): Call
9091 gdbpy_initialize_tui.
9092 (python_GdbMethods): Add "register_window_type" function.
9093 * python/python-internal.h (gdbpy_register_tui_window)
9094 (gdbpy_initialize_tui): Declare.
9095 * python/py-tui.c: New file.
9096 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
9097
9098 2020-02-22 Tom Tromey <tom@tromey.com>
9099
9100 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
9101
9102 2020-02-22 Tom Tromey <tom@tromey.com>
9103
9104 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
9105 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
9106 * tui/tui-data.c (tui_set_win_with_focus): Remove.
9107 (tui_set_win_focus_to): Move from tui-win.c.
9108
9109 2020-02-22 Tom Tromey <tom@tromey.com>
9110
9111 * tui/tui-layout.c (make_standard_window, get_locator_window): New
9112 functions.
9113 (known_window_types): New global.
9114 (tui_get_window_by_name): Reimplement.
9115 (initialize_known_windows): New function.
9116 (validate_window_name): Rewrite.
9117 (_initialize_tui_layout): Call initialize_known_windows.
9118
9119 2020-02-22 Tom Tromey <tom@tromey.com>
9120
9121 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
9122 Remove constants.
9123 * tui/tui-winsource.h (struct tui_source_window_base)
9124 <tui_source_window_base>: Remove parameter.
9125 * tui/tui-winsource.c
9126 (tui_source_window_base::tui_source_window_base): Remove
9127 parameter.
9128 (tui_source_window_base::refill): Update.
9129 * tui/tui-stack.h (struct tui_locator_window)
9130 <tui_locator_window>: Update.
9131 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
9132 Default the constructor.
9133 * tui/tui-regs.h (struct tui_data_item_window)
9134 <tui_data_item_window>: Default the constructor.
9135 (struct tui_data_window) <tui_data_window>: Likewise.
9136 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
9137 Default the constructor.
9138 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
9139 Default the constructor.
9140 <type>: Remove.
9141 (struct tui_win_info) <tui_win_info>: Default the constructor.
9142 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
9143 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
9144 Default the constructor.
9145
9146 2020-02-22 Tom Tromey <tom@tromey.com>
9147
9148 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
9149 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
9150 * tui/tui-win.c (tui_resize_all): Don't call
9151 tui_delete_invisible_windows.
9152 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
9153 done.
9154 (tui_set_layout): Update.
9155 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
9156 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
9157 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
9158
9159 2020-02-22 Tom Tromey <tom@tromey.com>
9160
9161 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
9162 correctly.
9163
9164 2020-02-22 Tom Tromey <tom@tromey.com>
9165
9166 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
9167
9168 2020-02-22 Tom Tromey <tom@tromey.com>
9169
9170 * tui/tui-winsource.h (struct tui_source_window_iterator)
9171 <inner_iterator>: New etytypedef.
9172 <tui_source_window_iterator>: Take "end" parameter.
9173 <tui_source_window_iterator>: Take iterator.
9174 <operator*, advance>: Update.
9175 <m_iter>: Change type.
9176 <m_end>: New field.
9177 (struct tui_source_windows) <begin, end>: Update.
9178 * tui/tui-layout.c (tui_windows): New global.
9179 (tui_apply_current_layout): Clear tui_windows.
9180 (tui_layout_window::apply): Update tui_windows.
9181 * tui/tui-data.h (tui_windows): Declare.
9182 (all_tui_windows): Now inline function.
9183 (class tui_window_iterator, struct all_tui_windows): Remove.
9184
9185 2020-02-22 Tom Tromey <tom@tromey.com>
9186
9187 PR tui/17850:
9188 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
9189 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
9190 "height" argument.
9191 (class tui_layout_window) <get_sizes>: Likewise.
9192 (class tui_layout_split) <tui_layout_split>: Add "vertical"
9193 argument.
9194 <get_sizes>: Add "height" argument.
9195 <m_vertical>: New field.
9196 * tui/tui-layout.c (tui_layout_split::clone): Update.
9197 (tui_layout_split::get_sizes): Add "height" argument.
9198 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
9199 (tui_new_layout_command): Parse "-horizontal".
9200 (_initialize_tui_layout): Update help string.
9201 (tui_layout_split::specification): Add "-horizontal" when needed.
9202 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
9203 argument.
9204 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
9205 New methods.
9206
9207 2020-02-22 Tom Tromey <tom@tromey.com>
9208
9209 * tui/tui-layout.h (enum tui_adjust_result): New.
9210 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
9211 (class tui_layout_window) <adjust_size>: Return
9212 tui_adjust_result. Rewrite.
9213 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
9214 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
9215
9216 2020-02-22 Tom Tromey <tom@tromey.com>
9217
9218 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
9219 parameter and return types.
9220 (class tui_layout_base) <specification>: Add "depth".
9221 (class tui_layout_window) <specification>: Add "depth".
9222 (class tui_layout_split) <specification>: Add "depth".
9223 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
9224 and return types.
9225 (tui_new_layout_command): Parse sub-layouts.
9226 (_initialize_tui_layout): Update help string.
9227 (tui_layout_window::specification): Add "depth".
9228 (add_layout_command): Update.
9229
9230 2020-02-22 Tom Tromey <tom@tromey.com>
9231
9232 * NEWS: Add "tui new-layout" item.
9233 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
9234 Add new-layout command to help text.
9235 (validate_window_name): New function.
9236 (tui_new_layout_command): New function.
9237 (_initialize_tui_layout): Register "new-layout".
9238 (tui_layout_window::specification): New method.
9239 (tui_layout_window::specification): New method.
9240 * tui/tui-layout.h (class tui_layout_base) <specification>: New
9241 method.
9242 (class tui_layout_window) <specification>: New method.
9243 (class tui_layout_split) <specification>: New method.
9244
9245 2020-02-22 Tom Tromey <tom@tromey.com>
9246
9247 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
9248 * tui/tui-win.c (window_name_completer): Update comment.
9249 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
9250 Declare method.
9251 (class tui_layout_window) <replace_window>: Likewise.
9252 (class tui_layout_split) <replace_window>: Likewise.
9253 (tui_set_layout): Don't declare.
9254 (tui_set_initial_layout): Declare function.
9255 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
9256 (asm_regs_layout): New globals.
9257 (tui_current_layout, show_layout): Remove.
9258 (tui_set_layout, tui_add_win_to_layout): Rewrite.
9259 (find_layout, tui_apply_layout): New function.
9260 (layout_completer): Remove.
9261 (tui_next_layout): Reimplement.
9262 (tui_next_layout_command): New function.
9263 (tui_set_initial_layout, tui_prev_layout_command): New functions.
9264 (tui_regs_layout): Reimplement.
9265 (tui_regs_layout_command): New function.
9266 (extract_display_start_addr): Rewrite.
9267 (next_layout, prev_layout): Remove.
9268 (tui_layout_window::replace_window): New method.
9269 (tui_layout_split::replace_window): New method.
9270 (destroy_layout): New function.
9271 (layout_list): New global.
9272 (add_layout_command): New function.
9273 (initialize_layouts): Update.
9274 (tui_layout_command): New function.
9275 (_initialize_tui_layout): Install "layout" commands.
9276 * tui/tui-data.h (enum tui_layout_type): Remove.
9277 (tui_current_layout): Don't declare.
9278
9279 2020-02-22 Tom Tromey <tom@tromey.com>
9280
9281 * tui/tui-regs.c (tui_reg_layout): Remove.
9282 (tui_reg_command): Use tui_regs_layout.
9283 * tui/tui-layout.h (tui_reg_command): Declare.
9284 * tui/tui-layout.c (tui_reg_command): New function.
9285
9286 2020-02-22 Tom Tromey <tom@tromey.com>
9287
9288 * tui/tui.c (tui_rl_delete_other_windows): Call
9289 tui_remove_some_windows.
9290 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
9291 Declare method.
9292 (class tui_layout_window) <remove_windows>: New method.
9293 (class tui_layout_split) <remove_windows>: Declare.
9294 (tui_remove_some_windows): Declare.
9295 * tui/tui-layout.c (tui_remove_some_windows): New function.
9296 (tui_layout_split::remove_windows): New method.
9297
9298 2020-02-22 Tom Tromey <tom@tromey.com>
9299
9300 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
9301 * tui/tui-layout.h (tui_next_layout): Declare.
9302 * tui/tui-layout.c (tui_next_layout): New function.
9303
9304 2020-02-22 Tom Tromey <tom@tromey.com>
9305
9306 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
9307 correct coordinates.
9308
9309 2020-02-22 Tom Tromey <tom@tromey.com>
9310
9311 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
9312 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
9313 DATA_WIN case.
9314
9315 2020-02-22 Tom Tromey <tom@tromey.com>
9316
9317 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
9318 TUI_DISASM_WIN, not tui_win_list.
9319
9320 2020-02-22 Tom Tromey <tom@tromey.com>
9321
9322 * valprint.c (generic_val_print_enum_1)
9323 (val_print_type_code_flags): Style member names.
9324 * rust-lang.c (val_print_struct, rust_print_enum)
9325 (rust_print_struct_def, rust_internal_print_type): Style member
9326 names.
9327 * p-valprint.c (pascal_object_print_value_fields): Style member
9328 names. Only call fprintf_symbol_filtered for static members.
9329 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
9330 * f-valprint.c (f_val_print): Style member names.
9331 * f-typeprint.c (f_type_print_base): Style member names.
9332 * cp-valprint.c (cp_print_value_fields): Style member names. Only
9333 call fprintf_symbol_filtered for static members.
9334 (cp_print_class_member): Style member names.
9335 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
9336 member names.
9337 * ada-valprint.c (ada_print_scalar): Style enum names.
9338 (ada_val_print_enum): Likewise.
9339 * ada-typeprint.c (print_enum_type): Style enum names.
9340
9341 2020-02-21 Tom Tromey <tom@tromey.com>
9342
9343 * psympriv.h (struct partial_symtab): Update comment.
9344
9345 2020-02-21 Tom Tromey <tromey@adacore.com>
9346
9347 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
9348 type is CORE_ADDR.
9349
9350 2020-02-21 Tom de Vries <tdevries@suse.de>
9351
9352 PR gdb/25534
9353 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
9354 if dependencies[i]->user != NULL.
9355
9356 2020-02-21 Ali Tamur <tamur@google.com>
9357
9358 * dwarf2/read.c (dwarf2_name): Add null check.
9359
9360 2020-02-20 Tom Tromey <tom@tromey.com>
9361
9362 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
9363 ">=", in binary search.
9364 (dwarf2_find_containing_comp_unit): New overload.
9365 (run_test): New self-test.
9366 (_initialize_dwarf2_read): Register new test.
9367
9368 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
9369
9370 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
9371 * riscv-tdep.h: Likewise.
9372 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
9373 rv32-only CSR.
9374 * features/riscv/64bit-csr.xml: Regenerated.
9375
9376 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9377 Tom Tromey <tom@tromey.com>
9378
9379 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
9380 of 'fputc_unfiltered'.
9381 (putchar_unfiltered): Call 'fputc_unfiltered'.
9382 (fputc_unfiltered): Call 'fputs_unfiltered'.
9383
9384 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
9385
9386 * config.in: Regenerate.
9387 * configure: Regenerate.
9388 * configure.ac: Add --with-python-libdir option.
9389 * main.c: Use WITH_PYTHON_LIBDIR.
9390
9391 2020-02-19 Tom Tromey <tom@tromey.com>
9392
9393 * symtab.c (general_symbol_info::compute_and_set_names): Use
9394 obstack_strndup. Simplify call to symbol_set_demangled_name.
9395
9396 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
9397
9398 * dwarf2/read.c (allocate_signatured_type_table,
9399 allocate_dwo_unit_table, allocate_type_unit_groups_table,
9400 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
9401 Remove objfile parameter, update all callers.
9402
9403 2020-02-19 Doug Evans <dje@google.com>
9404
9405 PR rust/25535
9406 * rust-lang.c (rust_print_enum): Apply embedded_offset to
9407 rust_enum_variant calculation.
9408
9409 2020-02-19 Tom Tromey <tromey@adacore.com>
9410
9411 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
9412
9413 2020-02-19 Tom Tromey <tromey@adacore.com>
9414
9415 * ada-lang.c (cache_symbol): Use obstack_strdup.
9416
9417 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
9418
9419 * configure: Regenerate.
9420
9421 2020-02-19 Tom Tromey <tromey@adacore.com>
9422
9423 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
9424 NULL check.
9425
9426 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
9427
9428 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
9429
9430 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
9431
9432 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
9433 if GDBSERVER is not defined.
9434 (riscv_tdesc_cache): Likewise, also store const target_desc.
9435 (STATIC_IN_GDB): Define.
9436 (riscv_create_target_description): Update declaration with
9437 STATIC_IN_GDB.
9438 (riscv_lookup_target_description): New function, only define if
9439 GDBSERVER is not defined.
9440 * arch/riscv.h (riscv_create_target_description): Declare only
9441 when GDBSERVER is defined.
9442 (riscv_lookup_target_description): New declaration when GDBSERVER
9443 is not defined.
9444 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
9445 (riscv_linux_read_features): ...this, and return
9446 riscv_gdbarch_features instead of target_desc.
9447 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
9448 (riscv_linux_read_description): Rename to...
9449 (riscv_linux_read_features): ...this.
9450 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
9451 Update to use riscv_gdbarch_features and
9452 riscv_lookup_target_description.
9453 * riscv-tdep.c (riscv_find_default_target_description): Use
9454 riscv_lookup_target_description instead of
9455 riscv_create_target_description.
9456
9457 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9458
9459 * valprint.c (generic_val_print_enum_1): When printing a flag
9460 enum with value 0 and there is no enumerator with value 0, print
9461 just "0" instead of "(unknown: 0x0)".
9462
9463 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9464
9465 * valprint.c (generic_val_print_enum_1): Print unknown part of
9466 flag enum in hex.
9467
9468 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9469
9470 * dwarf2/read.c (update_enumeration_type_from_children): Allow
9471 flag enums to contain duplicate enumerators.
9472 * valprint.c (generic_val_print_enum_1): Update comment.
9473
9474 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9475
9476 * dwarf2/read.c: Include "count-one-bits.h".
9477 (update_enumeration_type_from_children): If an enumerator has
9478 multiple bits set, don't treat the enumeration as a "flag enum".
9479 * valprint.c (generic_val_print_enum_1): Assert that enumerators
9480 of flag enums have 0 or 1 bit set.
9481
9482 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
9483
9484 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
9485 conversion.
9486 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
9487 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
9488 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
9489 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
9490 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
9491
9492 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9493
9494 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
9495
9496 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
9497
9498 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
9499 displaced_step_closure_up.
9500 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
9501 (struct displaced_step_closure_up):
9502 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
9503 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
9504 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
9505 Likewise.
9506 * gdbarch.sh (displaced_step_copy_insn): Likewise.
9507 * gdbarch.c, gdbarch.h: Re-generate.
9508 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
9509 displaced_step_closure_up.
9510 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
9511 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
9512 * infrun.h (displaced_step_closure_up): New type alias.
9513 (struct displaced_step_inferior_state) <step_closure>: Change
9514 type to displaced_step_closure_up.
9515 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
9516 displaced_step_closure_up.
9517 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
9518
9519 2020-02-14 Tom Tromey <tom@tromey.com>
9520
9521 * minidebug.c (gnu_debug_key): New global.
9522 (find_separate_debug_file_in_section): Use it.
9523
9524 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
9525
9526 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
9527 std::unique_ptr.
9528 * gdbarch.c: Re-generate.
9529 * gdbarch.h: Re-generate.
9530 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
9531 change.
9532 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
9533 type to std::unique_ptr.
9534 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
9535 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
9536 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
9537 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
9538 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
9539 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
9540 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
9541 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
9542 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
9543
9544 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
9545
9546 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
9547 std::unique_ptr.
9548 (displaced_step_clear): Rename to...
9549 (displaced_step_reset): ... this. Just call displaced->reset ().
9550 (displaced_step_clear_cleanup): Rename to...
9551 (displaced_step_reset_cleanup): ... this.
9552 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
9553 (displaced_step_fixup): Likewise.
9554 (resume_1): Likewise.
9555 (handle_inferior_event): Restore child's memory before calling
9556 displaced_step_fixup on the parent.
9557 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
9558 to std::unique_ptr.
9559 <step_closure>: Change type to std::unique_ptr.
9560
9561 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
9562
9563 * arm-tdep.c: Include count-one-bits.h.
9564 (cleanup_block_store_pc): Use count_one_bits.
9565 (cleanup_block_load_pc): Use count_one_bits.
9566 (arm_copy_block_xfer): Use count_one_bits.
9567 (thumb2_copy_block_xfer): Use count_one_bits.
9568 (thumb_copy_pop_pc_16bit): Use count_one_bits.
9569 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
9570 (thumb_get_next_pcs_raw): Use count_one_bits.
9571 (arm_get_next_pcs_raw): Use count_one_bits_l.
9572 * arch/arm.c (bitcount): Remove.
9573 * arch/arm.h (bitcount): Remove.
9574
9575 2020-02-14 Tom Tromey <tromey@adacore.com>
9576
9577 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
9578 Update.
9579 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
9580 * dwarf2/loc.c (call_site_find_chain_1): Return
9581 unique_xmalloc_ptr.
9582 (call_site_find_chain): Likewise.
9583
9584 2020-02-14 Richard Biener <rguenther@suse.de>
9585
9586 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
9587 on expression with division operators.
9588
9589 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
9590
9591 * MAINTAINERS (Write After Approval): Adding myself.
9592
9593 2020-02-12 Tom Tromey <tom@tromey.com>
9594
9595 * event-loop.c (event_data, gdb_event, event_handler_func):
9596 Remove.
9597
9598 2020-02-12 Tom Tromey <tom@tromey.com>
9599
9600 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
9601 (dwarf2_frame_objfile_data): Add comment.
9602 (find_comp_unit, set_comp_unit): New functions.
9603 (dwarf2_frame_find_fde): Use find_comp_unit.
9604 (dwarf2_build_frame_info): Use set_comp_unit.
9605
9606 2020-02-12 Tom Tromey <tom@tromey.com>
9607
9608 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
9609 (comp_unit): Don't initialize objfile.
9610 (execute_cfa_program): Add text_offset parameter.
9611 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
9612 (dwarf2_frame_cache): Update.
9613 (dwarf2_build_frame_info): Don't set "objfile" member.
9614
9615 2020-02-12 Tom Tromey <tom@tromey.com>
9616
9617 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
9618 (decode_frame_entry): Likewise.
9619 (dwarf2_build_frame_info): Update.
9620
9621 2020-02-12 Tom Tromey <tom@tromey.com>
9622
9623 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
9624 (decode_frame_entry_1): Use the comp_unit obstack.
9625
9626 2020-02-12 Tom Tromey <tom@tromey.com>
9627
9628 * dwarf2/frame.c (struct comp_unit): Add initializers and
9629 constructor.
9630 (dwarf2_frame_objfile_data): Store a comp_unit.
9631 (dwarf2_frame_find_fde): Update.
9632 (dwarf2_build_frame_info): Use "new".
9633
9634 2020-02-12 Tom Tromey <tom@tromey.com>
9635
9636 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
9637 (dwarf2_fde_table): Typedef for std::vector.
9638 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
9639 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
9640 (decode_frame_entry): Update.
9641 (dwarf2_build_frame_info): Use "new".
9642
9643 2020-02-12 Christian Biesinger <cbiesinger@google.com>
9644
9645 * arm-tdep.c (arm_gdbarch_init): Update.
9646 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
9647 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
9648 have_neon, is_m>: Change to bool.
9649
9650 2020-02-12 Christian Biesinger <cbiesinger@google.com>
9651
9652 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
9653
9654 2020-02-12 Tom Tromey <tom@tromey.com>
9655
9656 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
9657
9658 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
9659
9660 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
9661 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
9662
9663 2020-02-11 Tom Tromey <tom@tromey.com>
9664
9665 * psymtab.h: Update comment.
9666
9667 2020-02-11 Tom Tromey <tom@tromey.com>
9668
9669 * gdb_obstack.h (struct auto_obstack): Use
9670 DISABLE_COPY_AND_ASSIGN.
9671
9672 2020-02-11 Tom Tromey <tom@tromey.com>
9673
9674 * dwarf2/frame.h (struct objfile): Don't forward declare.
9675
9676 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9677
9678 * cris-tdep.c (cris_supply_gregset): Change signature to match
9679 what struct regset expects.
9680 (cris_regset): New struct.
9681 (fetch_core_registers): Remove.
9682 (cris_iterate_over_regset_sections): New function.
9683 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
9684 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
9685
9686 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9687
9688 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
9689 registers.
9690
9691 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9692
9693 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
9694
9695 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9696
9697 * configure: Re-generate.
9698
9699 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9700
9701 * configure: Re-generate.
9702
9703 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9704
9705 * acinclude: Update warning.m4 path.
9706 * warning.m4: Move to gdbsupport.
9707
9708 2020-02-11 Tom Tromey <tromey@adacore.com>
9709
9710 * remote.c (remote_console_output): Update.
9711 * printcmd.c (printf_command): Update.
9712 * event-loop.c (gdb_wait_for_event): Update.
9713 * linux-nat.c (sigchld_handler): Update.
9714 * remote-sim.c (gdb_os_write_stdout): Update.
9715 (gdb_os_flush_stdout): Update.
9716 (gdb_os_flush_stderr): Update.
9717 (gdb_os_write_stderr): Update.
9718 * exceptions.c (print_exception): Update.
9719 * remote-fileio.c (remote_fileio_func_read): Update.
9720 (remote_fileio_func_write): Update.
9721 * tui/tui.c (tui_enable): Update.
9722 * tui/tui-interp.c (tui_interp::init): Update.
9723 * utils.c (init_page_info): Update.
9724 (putchar_unfiltered, fputc_unfiltered): Update.
9725 (gdb_flush): Update.
9726 (emit_style_escape): Update.
9727 (flush_wrap_buffer, fputs_maybe_filtered): Update.
9728 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
9729 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
9730 (stderr_file::write): Update.
9731 (stderr_file::puts): Update.
9732 * ui-file.h (ui_file_isatty, ui_file_write)
9733 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
9734 (ui_file_puts): Don't declare.
9735
9736 2020-02-10 Tom de Vries <tdevries@suse.de>
9737
9738 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
9739 sentinel to char *.
9740
9741 2020-02-09 Tom de Vries <tdevries@suse.de>
9742
9743 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
9744 filename if it matches "<artificial>".
9745
9746 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
9747
9748 * windows-tdep.c (struct enum_value_name): New struct.
9749 (create_enum): New function.
9750 (windows_get_siginfo_type): Create and use enum types.
9751
9752 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
9753
9754 * NEWS: Mention $_siginfo support for Windows.
9755 * windows-nat.c (handle_exception): Set siginfo_er.
9756 (windows_nat_target::mourn_inferior): Reset siginfo_er.
9757 (windows_xfer_siginfo): New function.
9758 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
9759 * windows-tdep.c (struct windows_gdbarch_data): New struct.
9760 (init_windows_gdbarch_data): New function.
9761 (get_windows_gdbarch_data): New function.
9762 (windows_get_siginfo_type): New function.
9763 (windows_init_abi): Register windows_get_siginfo_type.
9764 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
9765
9766 2020-02-08 Tom Tromey <tom@tromey.com>
9767
9768 * dwarf2/read.c (class cutu_reader) <cutu_reader,
9769 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
9770 <keep>: Declare method.
9771 <m_keep>: Remove member.
9772 <~cutu_reader>: Remove.
9773 (cutu_reader::init_tu_and_read_dwo_dies): Update.
9774 (cutu_reader::cutu_reader): Update.
9775 (cutu_reader::keep): Rename from ~cutu_reader.
9776 (process_psymtab_comp_unit, build_type_psymtabs_1)
9777 (process_skeletonless_type_unit, load_partial_comp_unit)
9778 (load_full_comp_unit, dwarf2_read_addr_index)
9779 (read_signatured_type): Update.
9780
9781 2020-02-08 Tom Tromey <tom@tromey.com>
9782
9783 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
9784 "want_partial_unit" parameter.
9785 (process_psymtab_comp_unit): Change want_partial_unit to bool.
9786 Inline check for DW_TAG_partial_unit.
9787 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
9788
9789 2020-02-08 Tom Tromey <tom@tromey.com>
9790
9791 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
9792 read.c.
9793 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
9794 read.c.
9795
9796 2020-02-08 Tom Tromey <tom@tromey.com>
9797
9798 * dwarf2/read.c (read_address): Move to comp-unit.c.
9799 (dwarf2_rnglists_process, dwarf2_ranges_process)
9800 (read_attribute_value, dwarf_decode_lines_1)
9801 (var_decode_location, decode_locdesc): Update.
9802 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
9803 read.c. Remove "cu" parameter.
9804 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
9805 method.
9806
9807 2020-02-08 Tom Tromey <tom@tromey.com>
9808
9809 * dwarf2/read.c (read_attribute_value, read_indirect_string)
9810 (read_indirect_line_string): Update.
9811 * dwarf2/comp-unit.c (read_offset): Remove.
9812 (read_comp_unit_head): Update.
9813 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
9814 method.
9815 (read_offset): Don't declare.
9816
9817 2020-02-08 Tom Tromey <tom@tromey.com>
9818
9819 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
9820 * dwarf2/read.c (struct comp_unit_head): Move to
9821 dwarf2/comp-unit.h.
9822 (enum class rcuh_kind): Move to comp-unit.h.
9823 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
9824 (read_comp_unit_head, error_check_comp_unit_head)
9825 (read_and_check_comp_unit_head): Move to comp-unit.c.
9826 (read_offset, dwarf_unit_type_name): Likewise.
9827 (create_debug_type_hash_table, read_cutu_die_from_dwo)
9828 (cutu_reader::cutu_reader, read_call_site_scope)
9829 (find_partial_die, follow_die_offset): Update.
9830 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
9831
9832 2020-02-08 Tom Tromey <tom@tromey.com>
9833
9834 * dwarf2/read.c (read_offset_1): Move to leb.c.
9835 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
9836 (dwarf_decode_macro_bytes): Update.
9837 * dwarf2/leb.c (read_offset): Rename; move from read.c.
9838 * dwarf2/leb.h (read_offset): Declare.
9839
9840 2020-02-08 Tom Tromey <tom@tromey.com>
9841
9842 * dwarf2/read.c (dwarf2_section_size): Remove.
9843 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
9844 Update.
9845 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
9846
9847 2020-02-08 Tom Tromey <tom@tromey.com>
9848
9849 * dwarf2/read.c (read_initial_length): Move to leb.c.
9850 * dwarf2/leb.h (read_initial_length): Declare.
9851 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
9852 handle_nonstd parameter.
9853 * dwarf2/frame.c (read_initial_length): Remove.
9854 (decode_frame_entry_1): Update.
9855
9856 2020-02-08 Tom Tromey <tom@tromey.com>
9857
9858 * dwarf2/loc.c (dwarf2_find_location_expression)
9859 (dwarf_evaluate_loc_desc::get_tls_address)
9860 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9861 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
9862 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
9863 (dwarf2_compile_property_to_c)
9864 (dwarf2_loc_desc_get_symbol_read_needs)
9865 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
9866 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
9867 (loclist_describe_location, loclist_tracepoint_var_ref)
9868 (loclist_generate_c_location): Update.
9869 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
9870 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
9871 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
9872 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
9873 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
9874 (dwarf2_per_cu_data::addr_size)
9875 (dwarf2_per_cu_data::ref_addr_size)
9876 (dwarf2_per_cu_data::text_offset)
9877 (dwarf2_per_cu_data::addr_type): Now methods.
9878 (per_cu_header_read_in): Make per_cu "const".
9879 (dwarf2_version): Remove.
9880 (dwarf2_per_cu_data::int_type): Now a method.
9881 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
9882 (set_die_type, read_array_type, read_subrange_index_type)
9883 (read_tag_string_type, read_subrange_type): Update.
9884 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
9885 offset_size, ref_addr_size, text_offset, addr_type, version,
9886 objfile, int_type, addr_sized_int_type>: Declare methods.
9887
9888 2020-02-08 Tom Tromey <tom@tromey.com>
9889
9890 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
9891 Move earlier.
9892
9893 2020-02-08 Tom Tromey <tom@tromey.com>
9894
9895 * dwarf2/read.h (dwarf_line_debug): Declare.
9896 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
9897 * dwarf2/read.c: Move line_header code to new files.
9898 (dwarf_line_debug): No longer static.
9899 * dwarf2/line-header.c: New file.
9900 * dwarf2/line-header.h: New file.
9901
9902 2020-02-08 Tom Tromey <tom@tromey.com>
9903
9904 * dwarf2/read.c (struct line_header) <file_full_name,
9905 file_file_name>: Return unique_xmalloc_ptr.
9906 (line_header::file_file_name): Update.
9907 (line_header::file_full_name): Update.
9908 (dw2_get_file_names_reader): Update.
9909 (macro_start_file): Update.
9910
9911 2020-02-08 Tom Tromey <tom@tromey.com>
9912
9913 * dwarf2/read.c (struct line_header) <file_full_name,
9914 file_file_name>: Declare methods.
9915 (dw2_get_file_names_reader): Update.
9916 (file_file_name): Now a method.
9917 (file_full_name): Likewise.
9918 (macro_start_file): Update.
9919
9920 2020-02-08 Tom Tromey <tom@tromey.com>
9921
9922 * dwarf2/read.c (dwarf_always_disassemble)
9923 (show_dwarf_always_disassemble): Move to loc.c.
9924 (_initialize_dwarf2_read): Move "always-disassemble" registration
9925 to loc.c.
9926 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
9927 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
9928 static.
9929 (show_dwarf_always_disassemble): Move from read.c.
9930 (_initialize_dwarf2loc): Move always-disassemble from read.c.
9931
9932 2020-02-08 Tom Tromey <tom@tromey.com>
9933
9934 * dwarf2/read.c (~dwarf2_per_objfile): Update.
9935 (create_quick_file_names_table): Return htab_up.
9936 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
9937 Update.
9938 * dwarf2/read.h (struct dwarf2_per_objfile)
9939 <quick_file_names_table>: Now htab_up.
9940
9941 2020-02-08 Tom Tromey <tom@tromey.com>
9942
9943 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
9944
9945 2020-02-08 Tom Tromey <tom@tromey.com>
9946
9947 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
9948 Rewrite.
9949 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
9950 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
9951 (abbrev_table::abbrev_table): No longer inline.
9952 (ABBREV_HASH_SIZE): Remove.
9953 (abbrev_table::m_abbrevs): Now an htab_up.
9954
9955 2020-02-08 Tom Tromey <tom@tromey.com>
9956
9957 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
9958 (cutu_reader): Update.
9959 (build_type_psymtabs_1): Update.
9960 * dwarf2/abbrev.c (abbrev_table::read): Rename.
9961 (abbrev_table::alloc_abbrev): Update.
9962 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
9963 (abbrev_table::read): New static method, renamed from
9964 abbrev_table_read_table.
9965 (abbrev_table::alloc_abbrev)
9966 (abbrev_table::add_abbrev): Now private.
9967 (abbrev_table::abbrev_table): Now private.
9968 (abbrev_table::m_abbrev_obstack): Now private. Rename.
9969
9970 2020-02-08 Tom Tromey <tom@tromey.com>
9971
9972 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
9973 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
9974 htab_up.
9975
9976 2020-02-08 Tom Tromey <tom@tromey.com>
9977
9978 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
9979 htab_up.
9980 (lookup_dwo_unit_in_dwp): Update.
9981 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
9982 on obstack.
9983
9984 2020-02-08 Tom Tromey <tom@tromey.com>
9985
9986 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
9987 obstack.
9988
9989 2020-02-08 Tom Tromey <tom@tromey.com>
9990
9991 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
9992 line_header_hash.
9993 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
9994 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
9995 Change type to htab_up.
9996
9997 2020-02-08 Tom Tromey <tom@tromey.com>
9998
9999 * dwarf2/read.c (allocate_type_unit_groups_table): Return
10000 htab_up. Don't allocate on obstack.
10001 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
10002 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
10003 Change type to htab_up.
10004
10005 2020-02-08 Tom Tromey <tom@tromey.com>
10006
10007 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
10008 Change type to htab_up.
10009 * dwarf2/read.c (create_signatured_type_table_from_index)
10010 (create_signatured_type_table_from_debug_names)
10011 (create_all_type_units, add_type_unit)
10012 (lookup_dwo_signatured_type, lookup_signatured_type)
10013 (process_skeletonless_type_unit): Update.
10014 (create_debug_type_hash_table, create_debug_types_hash_table):
10015 Change type of types_htab.
10016 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
10017 htab_up. Don't allocate on obstack.
10018 (create_cus_hash_table): Change type of cus_htab parameter.
10019 (struct dwo_file) <cus, tus>: Now htab_up.
10020 (lookup_dwo_signatured_type, lookup_dwo_cutu)
10021 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
10022 (queue_and_load_all_dwo_tus): Update.
10023 * dwarf2/index-write.c (write_gdbindex): Update.
10024 (write_debug_names): Update.
10025
10026 2020-02-08 Tom Tromey <tom@tromey.com>
10027
10028 * dwarf2/read.h (struct dwarf2_queue_item): Move from
10029 dwarf2/read.c. Remove "next" member. Add constructor ntad
10030 destructor.
10031 (struct dwarf2_per_objfile) <queue>: New member.
10032 * dwarf2/read.c (struct dwarf2_queue_item): Move to
10033 dwarf2/read.h.
10034 (dwarf2_queue, dwarf2_queue_tail): Remove.
10035 (class dwarf2_queue_guard): Add parameter to constructor. Use
10036 DISABLE_COPY_AND_ASSIGN.
10037 <m_per_objfile>: New member.
10038 <~dwarf2_queue_guard>: Rewrite.
10039 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
10040 Update.
10041 (~dwarf2_queue_item): New.
10042
10043 2020-02-08 Tom Tromey <tom@tromey.com>
10044
10045 * dwarf2/read.c (struct die_info) <has_children>: New member.
10046 (dw2_get_file_names_reader): Remove has_children.
10047 (dw2_get_file_names): Update.
10048 (read_cutu_die_from_dwo): Remove has_children.
10049 (cutu_reader::init_tu_and_read_dwo_dies)
10050 (cutu_reader::cutu_reader): Update.
10051 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
10052 Remove has_children.
10053 (build_type_psymtabs_1, process_skeletonless_type_unit)
10054 (load_partial_comp_unit, load_full_comp_unit): Update.
10055 (create_dwo_cu_reader): Remove has_children.
10056 (create_cus_hash_table, read_die_and_children): Update.
10057 (read_full_die_1,read_full_die): Remove has_children.
10058 (read_signatured_type): Update.
10059 (class cutu_reader) <has_children>: Remove.
10060
10061 2020-02-08 Tom Tromey <tom@tromey.com>
10062
10063 * dwarf2/expr.c: Rename from dwarf2expr.c.
10064 * dwarf2/expr.h: Rename from dwarf2expr.h.
10065 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
10066 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
10067 * dwarf2/frame.c: Rename from dwarf2-frame.c.
10068 * dwarf2/frame.h: Rename from dwarf2-frame.h.
10069 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
10070 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
10071 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
10072 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
10073 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
10074 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
10075 * dwarf2/loc.c: Rename from dwarf2loc.c.
10076 * dwarf2/loc.h: Rename from dwarf2loc.h.
10077 * dwarf2/read.c: Rename from dwarf2read.c.
10078 * dwarf2/read.h: Rename from dwarf2read.h.
10079 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
10080 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
10081 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
10082 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
10083 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
10084 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
10085 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
10086 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
10087 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
10088 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
10089 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
10090 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
10091 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
10092 Update.
10093 * Makefile.in (COMMON_SFILES): Update.
10094 (HFILES_NO_SRCDIR): Update.
10095
10096 2020-02-08 Tom Tromey <tom@tromey.com>
10097
10098 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
10099 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
10100
10101 2020-02-08 Tom Tromey <tom@tromey.com>
10102
10103 * dwarf2read.h (struct die_info): Don't declare.
10104
10105 2020-02-08 Tom Tromey <tom@tromey.com>
10106
10107 * dwarf2read.h (die_info_ptr): Remove typedef.
10108
10109 2020-02-08 Tom Tromey <tom@tromey.com>
10110
10111 * dwarf2read.c (read_call_site_scope)
10112 (handle_data_member_location, dwarf2_add_member_fn)
10113 (mark_common_block_symbol_computed, read_common_block)
10114 (attr_to_dynamic_prop, partial_die_info::read)
10115 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
10116 (dwarf2_symbol_mark_computed, set_die_type): Update.
10117 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
10118 method.
10119 (attr_form_is_block): Don't declare.
10120 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
10121
10122 2020-02-08 Tom Tromey <tom@tromey.com>
10123
10124 * dwarf2read.c (dwarf2_find_base_address, )
10125 (read_call_site_scope, rust_containing_type)
10126 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
10127 (handle_data_member_location, dwarf2_add_member_fn)
10128 (get_alignment, read_structure_type, process_structure_scope)
10129 (mark_common_block_symbol_computed, read_common_block)
10130 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
10131 (partial_die_info::read, read_attribute_value, new_symbol)
10132 (lookup_die_type, dwarf2_get_ref_die_offset)
10133 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
10134 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
10135 (dwarf2_symbol_mark_computed): Update.
10136 * dwarf2/attribute.h (struct attribute) <value_as_address,
10137 form_is_section_offset, form_is_constant, form_is_ref>: Declare
10138 methods.
10139 (value_as_address, attr_form_is_section_offset)
10140 (attr_form_is_constant, attr_form_is_ref): Don't declare.
10141 * dwarf2/attribute.c (attribute::value_as_address)
10142 (attribute::form_is_section_offset, attribute::form_is_constant)
10143 (attribute::form_is_ref): Now methods.
10144
10145 2020-02-08 Tom Tromey <tom@tromey.com>
10146
10147 * dwarf2read.c (struct attribute, DW_STRING)
10148 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
10149 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
10150 (attr_form_is_block, attr_form_is_section_offset)
10151 (attr_form_is_constant, attr_form_is_ref): Move.
10152 * dwarf2/attribute.h: New file.
10153 * dwarf2/attribute.c: New file, from dwarf2read.c.
10154 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
10155
10156 2020-02-08 Tom Tromey <tom@tromey.com>
10157
10158 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
10159 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
10160 Move.
10161 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
10162 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
10163 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
10164 abbrev.c.
10165 * dwarf2/abbrev.h: New file.
10166 * dwarf2/abbrev.c: New file, from dwarf2read.c.
10167 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
10168
10169 2020-02-08 Tom Tromey <tom@tromey.com>
10170
10171 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
10172 (dwarf2_section_size, dwarf2_get_section_info)
10173 (create_signatured_type_table_from_debug_names)
10174 (create_addrmap_from_aranges, read_debug_names_from_section)
10175 (get_gdb_index_contents_from_section, read_comp_unit_head)
10176 (error_check_comp_unit_head, read_abbrev_offset)
10177 (create_debug_type_hash_table, init_cu_die_reader)
10178 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
10179 (read_comp_units_from_section, create_cus_hash_table)
10180 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
10181 (create_dwp_v2_section, dwarf2_rnglists_process)
10182 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
10183 (abbrev_table_read_table, read_indirect_string_at_offset_from)
10184 (read_indirect_string_from_dwz, read_addr_index_1)
10185 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
10186 (dwarf_decode_macro_bytes, dwarf_decode_macros)
10187 (fill_in_loclist_baton): Update.
10188 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
10189 get_containing_section, get_bfd_owner, get_bfd_section,
10190 get_file_name, get_id, get_flags, empty, read>: Declare methods.
10191 (dwarf2_read_section, get_section_name, get_section_file_name)
10192 (get_containing_section, get_section_bfd_owner)
10193 (get_section_bfd_section, get_section_name, get_section_file_name)
10194 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
10195 declare.
10196 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
10197 (dwarf2_section_info::get_bfd_owner)
10198 (dwarf2_section_info::get_bfd_section)
10199 (dwarf2_section_info::get_name)
10200 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
10201 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
10202 (dwarf2_section_info::read): Now methods.
10203 * dwarf-index-write.c (class debug_names): Update.
10204
10205 2020-02-08 Tom Tromey <tom@tromey.com>
10206
10207 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
10208 Move to dwarf2/section.h.
10209 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
10210 (get_section_bfd_section, get_section_name)
10211 (get_section_file_name, get_section_id, get_section_flags)
10212 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
10213 dwarf2/section.c.
10214 * dwarf2/section.h: New file.
10215 * dwarf2/section.c: New file, from dwarf2read.c.
10216 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
10217
10218 2020-02-08 Tom Tromey <tom@tromey.com>
10219
10220 * dwarf2read.h (read_unsigned_leb128): Don't declare.
10221 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
10222 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
10223 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
10224 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
10225 * dwarf2/leb.h: New file, from dwarf2read.c.
10226 * dwarf2/leb.c: New file, from dwarf2read.c.
10227 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
10228 Remove.
10229 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
10230 (COMMON_SFILES): Add dwarf2/leb.c.
10231
10232 2020-02-08 Joel Brobecker <brobecker@adacore.com>
10233
10234 GDB 9.1 released.
10235
10236 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
10237
10238 PR gdb/25190:
10239 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
10240 * gdb/remote.c (remote_console_output): Update.
10241 * gdb/ui-file.c (fputs_unfiltered): Rename to...
10242 (ui_file_puts): ...this.
10243 * gdb/ui-file.h (ui_file_puts): Add declaration.
10244 * gdb/utils.c (emit_style_escape): Update.
10245 (flush_wrap_buffer): Update.
10246 (fputs_maybe_filtered): Update.
10247 (fputs_unfiltered): Add function.
10248
10249 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
10250
10251 * gdb/event-loop.c (gdb_wait_for_event): Update.
10252 * gdb/printcmd.c (printf_command): Update.
10253 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
10254 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
10255 (gdb_os_flush_stderr): Update.
10256 * gdb/remote.c (remote_console_output): Update.
10257 * gdb/ui-file.c (gdb_flush): Rename to...
10258 (ui_file_flush): ...this.
10259 (stderr_file::write): Update.
10260 (stderr_file::puts): Update.
10261 * gdb/ui-file.h (gdb_flush): Rename to...
10262 (ui_file_flush): ...this.
10263 * gdb/utils.c (gdb_flush): Add function.
10264 * gdb/utils.h (gdb_flush): Add declaration.
10265
10266 2020-02-07 Tom Tromey <tromey@adacore.com>
10267
10268 PR breakpoints/24915:
10269 * source.c (find_and_open_source): Do not check basenames_may_differ.
10270
10271 2020-02-07 Tom Tromey <tom@tromey.com>
10272
10273 * README: Update gdbserver documentation.
10274 * gdbserver: Move to top level.
10275 * configure.tgt (build_gdbserver): Remove.
10276 * configure.ac: Remove --enable-gdbserver.
10277 * configure: Rebuild.
10278 * Makefile.in (distclean): Don't mention gdbserver.
10279
10280 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
10281
10282 * source-cache.c (source_cache::ensure): Surround
10283 get_plain_source_lines with a try/catch.
10284 (source_cache::get_line_charpos): Get rid of try/catch
10285 and only check for the return value of "ensure".
10286 * tui/tui-source.c (tui_source_window::set_contents):
10287 Simplify "nlines" calculation.
10288
10289 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
10290
10291 * MAINTAINERS (Write After Approval): Add myself.
10292
10293 2020-02-05 Christian Biesinger <cbiesinger@google.com>
10294
10295 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
10296 function call.
10297
10298 2020-02-05 Christian Biesinger <cbiesinger@google.com>
10299
10300 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
10301
10302 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
10303
10304 * nat/riscv-linux-tdesc.h: New file.
10305 * nat/riscv-linux-tdesc.c: New file, taking code from...
10306 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
10307 ... here.
10308 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
10309 NATDEPFILES.
10310
10311 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
10312
10313 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
10314 we don't set the fake simulator ptid to the null_ptid.
10315
10316 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
10317
10318 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
10319 * gdbthread.h (class thread_info) <resumed>: Likewise.
10320 * infrun.c (resume_1): Likewise.
10321 (proceed): Likewise.
10322 (infrun_thread_stop_requested): Likewise.
10323 (stop_all_threads): Likewise.
10324 (handle_inferior_event): Likewise.
10325 (restart_threads): Likewise.
10326 (finish_step_over): Likewise.
10327 (keep_going_stepped_thread): Likewise.
10328 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
10329 (linux_handle_extended_wait): Likewise.
10330 * record-btrace.c (get_thread_current_frame_id): Likewise.
10331 * record-full.c (record_full_wait_1): Likewise.
10332 * remote.c (remote_target::process_initial_stop_replies): Likewise.
10333 * target.c (target_resume): Likewise.
10334 * thread.c (set_running_thread): Likewise.
10335
10336 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
10337
10338 * f-valprint.c (f77_print_array_1): Changed datatype of index
10339 variable to LONGEST from int to enable it to contain bound
10340 values correctly.
10341
10342 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
10343
10344 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
10345 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
10346 offsets according to FLEN determined.
10347 (riscv_linux_nat_target::read_description): Determine FLEN
10348 dynamically.
10349 (riscv_linux_nat_target::fetch_registers): Size regset buffer
10350 according to FLEN determined.
10351 (riscv_linux_nat_target::store_registers): Likewise.
10352
10353 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
10354
10355 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
10356 when reg->group is empty and reggroup is not.
10357
10358 2020-01-31 Tom Tromey <tromey@adacore.com>
10359
10360 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
10361 Call beneath target's mourn_inferior after unpushing.
10362
10363 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
10364
10365 PR tui/9765
10366 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
10367 have enough lines to fill the screen, still return the lowest
10368 address we found.
10369
10370 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
10371
10372 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
10373 '-', '<', and '>' commands.
10374
10375 2020-01-29 Pedro Alves <palves@redhat.com>
10376 Sergio Durigan Junior <sergiodj@redhat.com>
10377
10378 * infcmd.c (construct_inferior_arguments): Assert that
10379 'argc' is greater than 0.
10380
10381 2020-01-29 Luis Machado <luis.machado@linaro.org>
10382
10383 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
10384 (BRK_INSN_MASK): Define to 0xd4200000.
10385 (aarch64_program_breakpoint_here_p): New function.
10386 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
10387 * arch-utils.c (default_program_breakpoint_here_p): Moved from
10388 breakpoint.c.
10389 * arch-utils.h (default_program_breakpoint_here_p): Moved from
10390 breakpoint.h
10391 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
10392 call gdbarch_program_breakpoint_here_p.
10393 (program_breakpoint_here): Moved to arch-utils.c, renamed to
10394 default_program_breakpoint_here_p, changed return type to bool and
10395 simplified.
10396 * breakpoint.h (program_breakpoint_here): Moved prototype to
10397 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
10398 return type to bool.
10399 * gdbarch.c: Regenerate.
10400 * gdbarch.h: Regenerate.
10401 * gdbarch.sh (program_breakpoint_here_p): New method.
10402 * infrun.c (handle_signal_stop): Call
10403 gdbarch_program_breakpoint_here_p.
10404
10405 2020-01-26 Tom Tromey <tom@tromey.com>
10406
10407 * ctfread.c (struct ctf_fp_info): Reindent.
10408 (_initialize_ctfread): Remove.
10409
10410 2020-01-26 Tom Tromey <tom@tromey.com>
10411
10412 * psymtab.c (partial_map_expand_apply)
10413 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
10414 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
10415 (psym_print_stats, psym_expand_symtabs_for_function)
10416 (psym_map_symbol_filenames, psym_map_matching_symbols)
10417 (psym_expand_symtabs_matching)
10418 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
10419 (maintenance_check_psymtabs): Use new methods.
10420 * psympriv.h (struct partial_symtab) <readin_p,
10421 get_compunit_symtab>: New methods.
10422 <readin, compunit_symtab>: Remove members.
10423 (struct standard_psymtab): New.
10424 (struct legacy_psymtab): Derive from standard_psymtab.
10425 * dwarf2read.h (struct dwarf2_psymtab): Derive from
10426 standard_psymtab.
10427 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
10428
10429 2020-01-26 Tom Tromey <tom@tromey.com>
10430
10431 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
10432 read_dependencies. Add assert.
10433 * psymtab.c (partial_symtab::read_dependencies): New method.
10434 * psympriv.h (struct partial_symtab) <read_dependencies>: New
10435 method.
10436 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
10437 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
10438 read_dependencies.
10439 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
10440 Add assert.
10441
10442 2020-01-26 Tom Tromey <tom@tromey.com>
10443
10444 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
10445 Call expand_psymtab.
10446 (xcoff_read_symtab): Call expand_psymtab.
10447 (xcoff_start_psymtab, xcoff_end_psymtab): Set
10448 legacy_expand_psymtab.
10449 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
10450 method.
10451 (struct legacy_psymtab) <expand_psymtab>: Implement.
10452 <legacy_expand_psymtab>: New member.
10453 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
10454 (parse_partial_symbols): Set legacy_expand_psymtab.
10455 (psymtab_to_symtab_1): Change argument order. Call
10456 expand_psymtab.
10457 (new_psymtab): Set legacy_expand_psymtab.
10458 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
10459 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
10460 expand_psymtab.
10461 (dwarf2_psymtab::expand_psymtab): Rename from
10462 psymtab_to_symtab_1. Call expand_psymtab.
10463 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
10464 (dbx_end_psymtab): Likewise.
10465 (dbx_psymtab_to_symtab_1): Change argument order. Call
10466 expand_psymtab.
10467 (dbx_read_symtab): Call expand_psymtab.
10468 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
10469 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
10470 (ctf_psymtab::read_symtab): Call expand_psymtab.
10471
10472 2020-01-26 Tom Tromey <tom@tromey.com>
10473
10474 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
10475 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
10476 messages.
10477 * mdebugread.c (mdebug_read_symtab): Remove prints.
10478 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
10479 assert.
10480 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
10481
10482 2020-01-26 Tom Tromey <tom@tromey.com>
10483
10484 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
10485 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
10486 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
10487 legacy_symtab.
10488 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
10489 * psymtab.c (psymtab_to_symtab): Call method.
10490 (dump_psymtab): Update.
10491 * psympriv.h (struct partial_symtab): Add virtual destructor.
10492 <read_symtab>: New method.
10493 (struct legacy_symtab): New.
10494 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
10495 (struct pst_map) <pst>: Now a legacy_psymtab.
10496 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
10497 (new_psymtab): Use legacy_psymtab.
10498 * dwarf2read.h (struct dwarf2_psymtab): New.
10499 (struct dwarf2_per_cu_data) <psymtab>: Use it.
10500 * dwarf2read.c (dwarf2_create_include_psymtab)
10501 (dwarf2_build_include_psymtabs, create_type_unit_group)
10502 (create_partial_symtab, process_psymtab_comp_unit_reader)
10503 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
10504 (set_partial_user): Use dwarf2_psymtab.
10505 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
10506 (psymtab_to_symtab_1, process_full_comp_unit)
10507 (process_full_type_unit, dwarf2_ranges_read)
10508 (dwarf2_get_pc_bounds, psymtab_include_file_name)
10509 (dwarf_decode_lines): Use dwarf2_psymtab.
10510 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
10511 (add_address_entry_worker, write_one_signatured_type)
10512 (recursively_count_psymbols, recursively_write_psymbols)
10513 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
10514 (write_debug_names): Likewise.
10515 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
10516 <pst>: Now a legacy_psymtab.
10517 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
10518 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
10519 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
10520 * ctfread.c (struct ctf_psymtab): New.
10521 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
10522 ctf_psymtab.
10523 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
10524 (create_partial_symtab): Return a ctf_psymtab.
10525 (scan_partial_symbols): Update.
10526
10527 2020-01-26 Tom Tromey <tom@tromey.com>
10528
10529 * xcoffread.c (xcoff_start_psymtab): Use new.
10530 * psymtab.c (partial_symtab::partial_symtab): New constructor,
10531 renamed from start_psymtab_common.
10532 * psympriv.h (struct partial_symtab): Add new constructor.
10533 (start_psymtab_common): Don't declare.
10534 * mdebugread.c (parse_partial_symbols): Use new.
10535 * dwarf2read.c (create_partial_symtab): Use new.
10536 * dbxread.c (start_psymtab): Use new.
10537 * ctfread.c (create_partial_symtab): Use new.
10538
10539 2020-01-26 Tom Tromey <tom@tromey.com>
10540
10541 * xcoffread.c (xcoff_end_psymtab): Use new.
10542 * psymtab.c (start_psymtab_common): Use new.
10543 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
10544 Update.
10545 * psympriv.h (struct partial_symtab): Add parameters to
10546 constructor. Don't inline.
10547 (allocate_psymtab): Don't declare.
10548 * mdebugread.c (new_psymtab): Use new.
10549 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
10550 * dbxread.c (dbx_end_psymtab): Use new.
10551
10552 2020-01-26 Tom Tromey <tom@tromey.com>
10553
10554 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
10555 allocate_psymtab. Update documentation.
10556 * psymtab.c (psymtab_storage::install_psymtab): Rename from
10557 allocate_psymtab. Do not use new.
10558 (allocate_psymtab): Use new. Update.
10559
10560 2020-01-26 Tom Tromey <tom@tromey.com>
10561
10562 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
10563 * psymtab.c (psym_print_stats): Update.
10564 * psympriv.h (struct partial_symtab) <readin,
10565 psymtabs_addrmap_supported, anonymous>: Now bool.
10566 * mdebugread.c (psymtab_to_symtab_1): Update.
10567 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
10568 (build_type_psymtabs_reader, psymtab_to_symtab_1)
10569 (process_full_comp_unit, process_full_type_unit): Update.
10570 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
10571 * ctfread.c (psymtab_to_symtab): Update.
10572
10573 2020-01-26 Tom Tromey <tom@tromey.com>
10574
10575 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
10576 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
10577 * psymtab.c (psymtab_storage): Delete psymtabs.
10578 (psymtab_storage::allocate_psymtab): Use new.
10579 (psymtab_storage::discard_psymtab): Use delete.
10580 * psympriv.h (struct partial_symtab): Add constructor and
10581 initializers.
10582
10583 2020-01-26 Tom Tromey <tom@tromey.com>
10584
10585 * machoread.c: Do not include psympriv.h.
10586
10587 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10588
10589 * NEWS: Mention the new option and the set/show commands.
10590
10591 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10592
10593 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
10594 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
10595 (validate_exec_file): New variables, enums, functions.
10596 (exec_file_locate_attach, print_section_info): Style the filenames.
10597 (_initialize_exec): Install show_exec_file_mismatch_command and
10598 set_exec_file_mismatch_command.
10599 * gdbcore.h (validate_exec_file): Declare.
10600 * infcmd.c (attach_command): Call validate_exec_file.
10601 * remote.c ( remote_target::remote_add_inferior): Likewise.
10602
10603 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10604
10605 * frame.c (find_frame_sal): Move call to get_next_frame into more
10606 inner scope.
10607 * inline-frame.c (inilne_state) <inline_state>: Update argument
10608 types.
10609 (inilne_state) <skipped_symbol>: Rename to...
10610 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
10611 (skip_inline_frames): Build vector of skipped symbols and use this
10612 to reate the inline_state.
10613 (inline_skipped_symbol): Add a comment and some assertions, fetch
10614 skipped symbol from the list.
10615
10616 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10617
10618 * buildsym.c (lte_is_less_than): Delete.
10619 (buildsym_compunit::end_symtab_with_blockvector): Create local
10620 lambda function to sort line table entries, and use
10621 std::stable_sort instead of std::sort.
10622 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
10623 markers when looking for a previous line.
10624
10625 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10626
10627 * dwarf2read.c (lnp_state_machine::record_line): Include
10628 end_sequence parameter in debug print out. Record the line if we
10629 are at an end_sequence marker even if it's not the start of a
10630 statement.
10631 * symmisc.c (maintenance_print_one_line_table): Print end of
10632 sequence markers with 'END' not '0'.
10633
10634 2020-01-24 Pedro Alves <palves@redhat.com>
10635
10636 PR gdb/25410
10637 * thread.c (scoped_restore_current_thread::restore): Use
10638 switch_to_inferior_no_thread.
10639 * exec.c: Include "progspace-and-thread.h".
10640 (add_target_sections, remove_target_sections):
10641 scoped_restore_current_pspace_and_thread instead of
10642 scoped_restore_current_thread.
10643 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
10644 and aspace to the inferior before calling clone_program_space.
10645 Remove stale comment.
10646
10647 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10648
10649 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
10650 (arm_netbsd_nat_target::fetch_registers): ...this.
10651 (arm_nbsd_nat_target::store_registers): Rename to...
10652 (arm_netbsd_nat_target::store_registers): ...this.
10653
10654 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10655
10656 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
10657 register_t.
10658
10659 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10660
10661 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
10662 Update comment.
10663 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
10664 Likewise.
10665 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
10666 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
10667 the correct replacement (iterate_over_regset_sections).
10668 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
10669 Update comment.
10670
10671 2020-01-24 Graham Markall <graham.markall@embecosm.com>
10672
10673 PR gdb/23718
10674 * gdb/python/python.c (execute_gdb_command): Call
10675 async_enable_stdin in catch block.
10676
10677 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10678
10679 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
10680 SWITCH_THRU_ALL_UIS.
10681
10682 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10683
10684 PR tui/9765
10685 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
10686 comment, add extra parameter, and update to store previous symbol
10687 when appropriate.
10688 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
10689 add extra parameter.
10690 * tui/tui-disasm.c (tui_disassemble): Update header comment,
10691 remove unneeded parameter, add try/catch around gdb_print_insn,
10692 rewrite to add items to asm_lines vector.
10693 (tui_find_backward_disassembly_start_address): New function.
10694 (tui_find_disassembly_address): Updated throughout.
10695 (tui_disasm_window::set_contents): Update for changes to
10696 tui_disassemble.
10697 (tui_disasm_window::do_scroll_vertical): No need to adjust the
10698 number of lines to scroll.
10699
10700 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10701
10702 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
10703 (SECT_OFF_DATA): Likewise.
10704 (SECT_OFF_RODATA): Likewise.
10705 (SECT_OFF_TEXT): Likewise.
10706 (SECT_OFF_BSS): Likewise.
10707 (struct objfile) <text_section_offset, data_section_offset>: New
10708 methods.
10709 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
10710 objfile::text_section_offset.
10711 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
10712 * coffread.c (coff_symtab_read): Likewise.
10713 (enter_linenos): Likewise.
10714 (process_coff_symbol): Likewise.
10715 * ctfread.c (get_objfile_text_range): Likewise.
10716 * dtrace-probe.c (dtrace_probe::get_relocated_address):
10717 Use objfile::data_section_offset.
10718 * dwarf2-frame.c (execute_cfa_program): Use
10719 objfile::text_section_offset.
10720 (dwarf2_frame_find_fde): Likewise.
10721 * dwarf2read.c (create_addrmap_from_index): Likewise.
10722 (create_addrmap_from_aranges): Likewise.
10723 (dw2_find_pc_sect_compunit_symtab): Likewise.
10724 (process_psymtab_comp_unit_reader): Likewise.
10725 (add_partial_symbol): Likewise.
10726 (add_partial_subprogram): Likewise.
10727 (process_full_comp_unit): Likewise.
10728 (read_file_scope): Likewise.
10729 (read_func_scope): Likewise.
10730 (read_lexical_block_scope): Likewise.
10731 (read_call_site_scope): Likewise.
10732 (dwarf2_rnglists_process): Likewise.
10733 (dwarf2_ranges_process): Likewise.
10734 (dwarf2_ranges_read): Likewise.
10735 (dwarf_decode_lines_1): Likewise.
10736 (new_symbol): Likewise.
10737 (dwarf2_fetch_die_loc_sect_off): Likewise.
10738 (dwarf2_per_cu_text_offset): Likewise.
10739 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
10740 * hppa-tdep.c (read_unwind_info): Likewise.
10741 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
10742 * psympriv.h (struct partial_symtab): Likewise.
10743 * psymtab.c (find_pc_sect_psymtab): Likewise.
10744 * solib-svr4.c (enable_break): Likewise.
10745 * stap-probe.c (relocate_address): Use
10746 objfile::data_section_offset.
10747 * xcoffread.c (enter_line_range): Use
10748 objfile::text_section_offset.
10749 (read_xcoff_symtab): Likewise.
10750
10751 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
10752
10753 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
10754 declaration to narrower scopes.
10755
10756 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
10757
10758 * darwin-nat.h (struct darwin_exception_msg, enum
10759 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
10760 Move up.
10761 (class darwin_nat_target) <wait_1, check_new_threads,
10762 decode_exception_message, decode_message, stop_inferior,
10763 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
10764 * darwin-nat.c (darwin_check_new_threads): Rename to...
10765 (darwin_nat_target::check_new_threads): ... this.
10766 (darwin_suspend_inferior_it): Remove.
10767 (darwin_decode_exception_message): Rename to...
10768 (darwin_nat_target::decode_exception_message): ... this.
10769 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
10770 (darwin_decode_message): Rename to...
10771 (darwin_nat_target::decode_message): ... this.
10772 (cancel_breakpoint): Rename to...
10773 (darwin_nat_target::cancel_breakpoint): ... this.
10774 (darwin_wait): Rename to...
10775 (darwin_nat_target::wait_1): ... this. Use range-based for loop
10776 instead of iterate_over_inferiors.
10777 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
10778 (darwin_stop_inferior): Rename to...
10779 (darwin_nat_target::stop_inferior): ... this.
10780 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
10781 (darwin_init_thread_list): Rename to...
10782 (darwin_nat_target::init_thread_list): ... this.
10783 (darwin_ptrace_him): Rename to...
10784 (darwin_nat_target::ptrace_him): ... this.
10785 (darwin_nat_target::create_inferior): Pass lambda function to
10786 fork_inferior.
10787 (darwin_nat_target::detach): Call stop_inferior instead of
10788 darwin_stop_inferior.
10789 * fork-inferior.h (fork_inferior): Change init_trace_fun
10790 parameter to gdb::function_view.
10791 * fork-inferior.c (fork_inferior): Likewise.
10792
10793 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
10794
10795 * i386-cygwin-tdep.c (core_process_module_section): Update.
10796 * windows-nat.c (struct lm_info_windows): Add text_offset.
10797 (windows_xfer_shared_libraries): Update.
10798 * windows-tdep.c (windows_xfer_shared_library):
10799 Add text_offset_cached argument.
10800 * windows-tdep.h (windows_xfer_shared_library): Update.
10801
10802 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10803
10804 * gdbarch.sh: Add declaration for _initialize_gdbarch.
10805
10806 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10807
10808 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
10809 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
10810 replace with range-based for.
10811 (gdbsim_interrupt_inferior): Remove.
10812 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
10813 with a range-based for. Inline code from
10814 gdbsim_interrupt_inferior.
10815
10816 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10817
10818 * infrun.c (proceed): Fix indentation.
10819
10820 2020-01-21 Tom Tromey <tromey@adacore.com>
10821
10822 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
10823 * python/python.c (python_extension_ops): Update.
10824 (gdbpy_colorize): New function.
10825 * python/lib/gdb/__init__.py (colorize): New function.
10826 * extension.h (ext_lang_colorize): Declare.
10827 * extension.c (ext_lang_colorize): New function.
10828 * extension-priv.h (struct extension_language_ops) <colorize>: New
10829 member.
10830 * cli/cli-style.c (_initialize_cli_style): Update help text.
10831
10832 2020-01-21 Luis Machado <luis.machado@linaro.org>
10833
10834 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
10835 <cond>: Change type to bool.
10836 (aarch64_displaced_step_b_cond): Update cond to use bool type.
10837 (aarch64_displaced_step_cb): Likewise.
10838 (aarch64_displaced_step_tb): Likewise.
10839
10840 2020-01-21 Luis Machado <luis.machado@linaro.org>
10841
10842 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
10843 output.
10844
10845 2020-01-21 Luis Machado <luis.machado@linaro.org>
10846
10847 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
10848 <pc_adjust>: Adjust the documentation.
10849 (aarch64_displaced_step_fixup): Check if PC really moved before
10850 adjusting it.
10851
10852 2020-01-19 Tom Tromey <tom@tromey.com>
10853
10854 * disasm.c (~gdb_disassembler): New destructor.
10855 (gdb_buffered_insn_length): Call disassemble_free_target.
10856 * disasm.h (class gdb_disassembler): Declare destructor. Use
10857 DISABLE_COPY_AND_ASSIGN.
10858
10859 2020-01-19 Tom Tromey <tom@tromey.com>
10860
10861 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
10862 (die_reader_func_ftype): Remove.
10863 (cutu_reader): New class.
10864 (dw2_get_file_names_reader): Remove "data" parameter.
10865 (dw2_get_file_names): Use cutu_reader.
10866 (create_debug_type_hash_table): Update.
10867 (read_cutu_die_from_dwo): Update comment.
10868 (lookup_dwo_unit): Add dwo_name parameter.
10869 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
10870 die_reader_func_ftype and data parameters.
10871 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
10872 Remove die_reader_func_ftype and data parameters.
10873 (~cutu_reader): New; from init_cutu_and_read_dies.
10874 (cutu_reader::cutu_reader): Rename from
10875 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
10876 and data parameters.
10877 (init_cutu_and_read_dies_simple): Remove.
10878 (struct process_psymtab_comp_unit_data): Remove.
10879 (process_psymtab_comp_unit_reader): Remove data parameter; add
10880 want_partial_unit and pretend_language parameters.
10881 (process_psymtab_comp_unit): Use cutu_reader.
10882 (build_type_psymtabs_reader): Remove data parameter.
10883 (build_type_psymtabs_1): Use cutu_reader.
10884 (process_skeletonless_type_unit): Likewise.
10885 (load_partial_comp_unit_reader): Remove.
10886 (load_partial_comp_unit): Use cutu_reader.
10887 (load_full_comp_unit_reader): Remove.
10888 (load_full_comp_unit): Use cutu_reader.
10889 (struct create_dwo_cu_data): Remove.
10890 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
10891 dwo_unit parameters.
10892 (create_cus_hash_table): Use cutu_reader.
10893 (struct dwarf2_read_addr_index_data): Remove.
10894 (dwarf2_read_addr_index_reader): Remove.
10895 (dwarf2_read_addr_index): Use cutu_reader.
10896 (read_signatured_type_reader): Remove.
10897 (read_signatured_type): Use cutu_reader.
10898
10899 2020-01-19 Tom Tromey <tom@tromey.com>
10900
10901 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
10902 * tui/tui-wingeneral.h (class tui_suppress_output): New.
10903 (tui_wrefresh): Declare.
10904 * tui/tui-wingeneral.c (suppress_output): New global.
10905 (tui_suppress_output, ~tui_suppress_output): New constructor and
10906 destructor.
10907 (tui_wrefresh): New function.
10908 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
10909 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
10910 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
10911 method.
10912 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
10913 tui_wrefresh.
10914 (tui_data_window::no_refresh): New method.
10915 (tui_data_item_window::refresh_window): Call tui_wrefresh.
10916 (tui_reg_command): Use tui_suppress_output
10917 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
10918 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
10919 method.
10920 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
10921
10922 2020-01-19 Tom Tromey <tom@tromey.com>
10923
10924 * tui/tui-winsource.c (tui_update_source_windows_with_line):
10925 Handle case where symtab is null.
10926
10927 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
10928
10929 * linux-fork.c (one_fork_p): Simplify.
10930
10931 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10932
10933 * top.c (struct qt_args): Remove.
10934 (kill_or_detach): Change return type to void, replace `void *`
10935 parameter with a proper one.
10936 (print_inferior_quit_action): Likewise.
10937 (quit_confirm): Use range-based for loop to iterate over inferiors.
10938 (quit_force): Likewise.
10939
10940 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10941
10942 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
10943 `void *` parameter with proper parameters.
10944 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
10945 (print_one_inferior): Change return type to void, replace `void *`
10946 parameter with proper parameters.
10947 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
10948 inferiors.
10949 (get_other_inferior): Remove.
10950 (mi_cmd_remove_inferior): Use range-based loop to iterate over
10951 inferiors.
10952
10953 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10954
10955 * mi/mi-interp.c (report_initial_inferior): Remove.
10956 (mi_interp::init): Use range-based for to iterate over inferiors.
10957
10958 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10959
10960 * python/py-inferior.c (build_inferior_list): Remove.
10961 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
10962
10963 2020-01-16 Christian Biesinger <cbiesinger@google.com>
10964
10965 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
10966 (btrace_stitch_trace): Likewise.
10967 * charset.c (intermediate_encoding): Likewise (vaild).
10968 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
10969 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
10970 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
10971
10972 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
10973
10974 * windows-tdep.c (windows_get_tlb_type):
10975 Add rtl_user_process_parameters type.
10976
10977 2020-01-16 Pedro Alves <palves@redhat.com>
10978 Norbert Lange <nolange79@gmail.com>
10979
10980 PR build/24805
10981 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
10982 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
10983 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
10984 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
10985 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
10986 (ps_plog): Redeclare exported functions with default visibility.
10987
10988 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
10989
10990 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
10991 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
10992
10993 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
10994
10995 * infcmd.c (post_create_inferior): Use get_thread_regcache
10996 instead of get_current_regcache.
10997
10998 2020-01-14 Tom Tromey <tom@tromey.com>
10999
11000 PR symtab/12535:
11001 * python/python.c (gdbpy_decode_line): Treat empty string the same
11002 as no argument.
11003
11004 2020-01-14 Tom Tromey <tom@tromey.com>
11005
11006 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
11007
11008 2020-01-14 Tom Tromey <tom@tromey.com>
11009
11010 * nat/linux-btrace.c: Don't include <config.h>.
11011 * nat/linux-ptrace.c: Don't include <config.h>.
11012 * nat/x86-linux-dregs.c: Don't include <config.h>.
11013
11014 2020-01-14 Tom Tromey <tom@tromey.com>
11015
11016 * configure: Rebuild.
11017 * configure.ac: Move many checks to ../gdbsupport/common.m4.
11018
11019 2020-01-14 Tom Tromey <tom@tromey.com>
11020
11021 * nat/x86-linux-dregs.c: Include configh.h.
11022 * nat/linux-ptrace.c: Include configh.h.
11023 * nat/linux-btrace.c: Include configh.h.
11024 * defs.h: Include config.h, bfd.h.
11025 * configure.ac: Don't source common.host.
11026 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
11027 * configure: Rebuild.
11028 * acinclude.m4: Update path.
11029 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
11030 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
11031 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
11032 (CLIBS): Add LIBSUPPORT.
11033 (CDEPS): Likewise.
11034 (COMMON_SFILES): Remove gdbsupport files.
11035 (HFILES_NO_SRCDIR): Likewise.
11036 (stamp-version): Update path to create-version.sh.
11037 (ALLDEPFILES): Remove gdbsupport files.
11038
11039 2020-01-14 Tom Tromey <tom@tromey.com>
11040
11041 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
11042 USE_WIN32API when needed.
11043 * configure.ac (USE_WIN32API): Don't define.
11044 (WIN32LIBS): Use WIN32APILIBS.
11045 * configure: Rebuild.
11046
11047 2020-01-14 Tom Tromey <tom@tromey.com>
11048
11049 * configure: Rebuild.
11050 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
11051
11052 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
11053
11054 * skip.c (skip_function_command): Make skip w/o arguments use the
11055 name of the inlined function if pc is inside any inlined function.
11056
11057 2020-01-14 Luis Machado <luis.machado@linaro.org>
11058
11059 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
11060 * infrun.c (resume_1): Likewise.
11061 (handle_inferior_event): Remove stale comment.
11062 * linux-nat.c (linux_nat_target::resume): Update comments.
11063 (save_stop_reason): Likewise.
11064 (linux_nat_filter_event): Likewise.
11065 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
11066
11067 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
11068
11069 * elfread.c (record_minimal_symbol): Set section index to 0 for
11070 non-allocatable sections.
11071
11072
11073 2020-01-13 Ali Tamur <tamur@google.com>
11074
11075 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
11076 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
11077 to gdb::optional. Update comments.
11078 (dwo_file): Update comments.
11079 (read_attribute): Update API to take an additional out parameter,
11080 need_reprocess. This is used to mark attributes that need other
11081 attributes (e.g. str_offsets_base) for correct computation which may not
11082 have been read yet.
11083 (read_attribute_reprocess): New function declaration.
11084 (read_addr_index): Likewise.
11085 (read_dwo_str_index): Likewise.
11086 (read_stub_str_index): Likewise.
11087 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
11088 (lookup_addr_base): New function definition.
11089 (lookup_ranges_base): Likewise.
11090 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
11091 lookup_ranges_base.
11092 (init_cutu_and_read_dies): Update comments.
11093 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
11094 unit. This is used to inherit parent's str_offsets_base and addr_base.
11095 Update comments.
11096 (init_cutu_and_read_dies_simple): Reflect API changes.
11097 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
11098 (create_cus_hash_table): Change API to take parent compile unit.
11099 Reflect API changes.
11100 (open_and_init_dwo_file): Reflect API changes.
11101 (dwarf2_get_pc_bounds): Update comments.
11102 (dwarf2_record_block_ranges): Likewise.
11103 (read_full_die_1): Change implementation to reprocess attributes that
11104 need str_offsets_base and addr_base.
11105 (partial_die_info::read): Likewise.
11106 (read_attribute_reprocess): New function definition.
11107 (read_attribute_value): Change API to take an additional out parameter,
11108 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
11109 when a non-dwo compile unit has index based attributes.
11110 (read_attribute): Reflect API changes.
11111 (read_addr_index_1): Reflect API changes. Update comments.
11112 (dwarf2_read_addr_index_data): Reflect API changes.
11113 (dwarf2_read_addr_index): Likewise.
11114 (read_str_index): Change API and implementation. This becomes a helper
11115 to be used by the new string index related methods. Update error
11116 message and comments.
11117 (read_dwo_str_index): New function definition.
11118 (read_stub_str_index): Likewise.
11119 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
11120 * symfile.h (dwarf2_debug_sections): Likewise.
11121 * xcoffread.c (dwarf2_debug_sections): Likewise.
11122
11123 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
11124
11125 * gdbcore.h (struct core_fns) <core_read_registers>: Change
11126 core_reg_sect type to gdb_byte *.
11127 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
11128 * cris-tdep.c (fetch_core_registers): Likewise.
11129 * corelow.c (core_target::get_core_register_section): Change
11130 type of `contents` to gdb::byte_vector.
11131
11132 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
11133
11134 * tui/tui-wingeneral.c (box_win): Position the title in the center
11135 of the border.
11136
11137 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
11138
11139 * corelow.c (core_target::get_core_register_section): Use
11140 std::vector instead of alloca.
11141
11142 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
11143
11144 * warning.m4: Add -Wmissing-declarations to build_warnings.
11145 * configure: Re-generate.
11146
11147 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
11148
11149 * python/python.c (init__gdb_module): Add declaration.
11150
11151 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
11152
11153 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
11154 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
11155 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
11156 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
11157 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
11158 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
11159 * ada-exp.y (_initialize_ada_exp): Add declaration.
11160 * ada-lang.c (_initialize_ada_language): Add declaration.
11161 * ada-tasks.c (_initialize_tasks): Add declaration.
11162 * agent.c (_initialize_agent): Add declaration.
11163 * aix-thread.c (_initialize_aix_thread): Add declaration.
11164 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
11165 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
11166 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
11167 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
11168 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
11169 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
11170 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
11171 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
11172 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
11173 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
11174 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
11175 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
11176 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
11177 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
11178 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
11179 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
11180 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
11181 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
11182 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
11183 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
11184 * annotate.c (_initialize_annotate): Add declaration.
11185 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
11186 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
11187 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
11188 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
11189 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
11190 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
11191 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
11192 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
11193 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
11194 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
11195 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
11196 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
11197 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
11198 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
11199 * auto-load.c (_initialize_auto_load): Add declaration.
11200 * auxv.c (_initialize_auxv): Add declaration.
11201 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
11202 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
11203 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
11204 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
11205 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
11206 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
11207 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
11208 * breakpoint.c (_initialize_breakpoint): Add declaration.
11209 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
11210 * btrace.c (_initialize_btrace): Add declaration.
11211 * charset.c (_initialize_charset): Add declaration.
11212 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
11213 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
11214 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
11215 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
11216 * cli/cli-script.c (_initialize_cli_script): Add declaration.
11217 * cli/cli-style.c (_initialize_cli_style): Add declaration.
11218 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
11219 * coffread.c (_initialize_coffread): Add declaration.
11220 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
11221 * compile/compile.c (_initialize_compile): Add declaration.
11222 * complaints.c (_initialize_complaints): Add declaration.
11223 * completer.c (_initialize_completer): Add declaration.
11224 * copying.c (_initialize_copying): Add declaration.
11225 * corefile.c (_initialize_core): Add declaration.
11226 * corelow.c (_initialize_corelow): Add declaration.
11227 * cp-abi.c (_initialize_cp_abi): Add declaration.
11228 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
11229 * cp-support.c (_initialize_cp_support): Add declaration.
11230 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
11231 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
11232 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
11233 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
11234 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
11235 * ctfread.c (_initialize_ctfread): Add declaration.
11236 * d-lang.c (_initialize_d_language): Add declaration.
11237 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
11238 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
11239 * dbxread.c (_initialize_dbxread): Add declaration.
11240 * dcache.c (_initialize_dcache): Add declaration.
11241 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
11242 * disasm.c (_initialize_disasm): Add declaration.
11243 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
11244 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
11245 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
11246 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
11247 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
11248 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
11249 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
11250 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
11251 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
11252 * elfread.c (_initialize_elfread): Add declaration.
11253 * exec.c (_initialize_exec): Add declaration.
11254 * extension.c (_initialize_extension): Add declaration.
11255 * f-lang.c (_initialize_f_language): Add declaration.
11256 * f-valprint.c (_initialize_f_valprint): Add declaration.
11257 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
11258 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
11259 * filesystem.c (_initialize_filesystem): Add declaration.
11260 * findcmd.c (_initialize_mem_search): Add declaration.
11261 * findvar.c (_initialize_findvar): Add declaration.
11262 * fork-child.c (_initialize_fork_child): Add declaration.
11263 * frame-base.c (_initialize_frame_base): Add declaration.
11264 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
11265 * frame.c (_initialize_frame): Add declaration.
11266 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
11267 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
11268 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
11269 * gcore.c (_initialize_gcore): Add declaration.
11270 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
11271 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
11272 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
11273 * gdbarch.c (_initialize_gdbarch): Add declaration.
11274 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
11275 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
11276 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
11277 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
11278 * go-lang.c (_initialize_go_language): Add declaration.
11279 * go32-nat.c (_initialize_go32_nat): Add declaration.
11280 * guile/guile.c (_initialize_guile): Add declaration.
11281 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
11282 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
11283 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
11284 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
11285 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
11286 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
11287 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
11288 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
11289 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
11290 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
11291 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
11292 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
11293 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
11294 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
11295 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
11296 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
11297 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
11298 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
11299 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
11300 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
11301 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
11302 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
11303 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
11304 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
11305 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
11306 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
11307 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
11308 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
11309 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
11310 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
11311 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
11312 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
11313 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
11314 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
11315 * infcall.c (_initialize_infcall): Add declaration.
11316 * infcmd.c (_initialize_infcmd): Add declaration.
11317 * inflow.c (_initialize_inflow): Add declaration.
11318 * infrun.c (_initialize_infrun): Add declaration.
11319 * interps.c (_initialize_interpreter): Add declaration.
11320 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
11321 * jit.c (_initialize_jit): Add declaration.
11322 * language.c (_initialize_language): Add declaration.
11323 * linux-fork.c (_initialize_linux_fork): Add declaration.
11324 * linux-nat.c (_initialize_linux_nat): Add declaration.
11325 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
11326 * linux-thread-db.c (_initialize_thread_db): Add declaration.
11327 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
11328 * m2-lang.c (_initialize_m2_language): Add declaration.
11329 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
11330 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
11331 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
11332 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
11333 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
11334 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
11335 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
11336 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
11337 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
11338 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
11339 * machoread.c (_initialize_machoread): Add declaration.
11340 * macrocmd.c (_initialize_macrocmd): Add declaration.
11341 * macroscope.c (_initialize_macroscope): Add declaration.
11342 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
11343 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
11344 * maint.c (_initialize_maint_cmds): Add declaration.
11345 * mdebugread.c (_initialize_mdebugread): Add declaration.
11346 * memattr.c (_initialize_mem): Add declaration.
11347 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
11348 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
11349 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
11350 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
11351 * mi/mi-main.c (_initialize_mi_main): Add declaration.
11352 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
11353 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
11354 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
11355 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
11356 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
11357 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
11358 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
11359 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
11360 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
11361 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
11362 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
11363 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
11364 * mipsread.c (_initialize_mipsread): Add declaration.
11365 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
11366 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
11367 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
11368 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
11369 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
11370 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
11371 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
11372 * nto-procfs.c (_initialize_procfs): Add declaration.
11373 * objc-lang.c (_initialize_objc_language): Add declaration.
11374 * observable.c (_initialize_observer): Add declaration.
11375 * opencl-lang.c (_initialize_opencl_language): Add declaration.
11376 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
11377 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
11378 * osabi.c (_initialize_gdb_osabi): Add declaration.
11379 * osdata.c (_initialize_osdata): Add declaration.
11380 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
11381 * parse.c (_initialize_parse): Add declaration.
11382 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
11383 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
11384 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
11385 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
11386 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
11387 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
11388 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
11389 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
11390 * printcmd.c (_initialize_printcmd): Add declaration.
11391 * probe.c (_initialize_probe): Add declaration.
11392 * proc-api.c (_initialize_proc_api): Add declaration.
11393 * proc-events.c (_initialize_proc_events): Add declaration.
11394 * proc-service.c (_initialize_proc_service): Add declaration.
11395 * procfs.c (_initialize_procfs): Add declaration.
11396 * producer.c (_initialize_producer): Add declaration.
11397 * psymtab.c (_initialize_psymtab): Add declaration.
11398 * python/python.c (_initialize_python): Add declaration.
11399 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
11400 * record-btrace.c (_initialize_record_btrace): Add declaration.
11401 * record-full.c (_initialize_record_full): Add declaration.
11402 * record.c (_initialize_record): Add declaration.
11403 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
11404 * regcache.c (_initialize_regcache): Add declaration.
11405 * reggroups.c (_initialize_reggroup): Add declaration.
11406 * remote-notif.c (_initialize_notif): Add declaration.
11407 * remote-sim.c (_initialize_remote_sim): Add declaration.
11408 * remote.c (_initialize_remote): Add declaration.
11409 * reverse.c (_initialize_reverse): Add declaration.
11410 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
11411 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
11412 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
11413 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
11414 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
11415 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
11416 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
11417 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
11418 Add declaration.
11419 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
11420 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
11421 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
11422 * rust-exp.y (_initialize_rust_exp): Add declaration.
11423 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
11424 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
11425 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
11426 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
11427 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
11428 * score-tdep.c (_initialize_score_tdep): Add declaration.
11429 * ser-go32.c (_initialize_ser_dos): Add declaration.
11430 * ser-mingw.c (_initialize_ser_windows): Add declaration.
11431 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
11432 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
11433 * ser-uds.c (_initialize_ser_socket): Add declaration.
11434 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
11435 * serial.c (_initialize_serial): Add declaration.
11436 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
11437 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
11438 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
11439 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
11440 * skip.c (_initialize_step_skip): Add declaration.
11441 * sol-thread.c (_initialize_sol_thread): Add declaration.
11442 * solib-aix.c (_initialize_solib_aix): Add declaration.
11443 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
11444 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
11445 * solib-frv.c (_initialize_frv_solib): Add declaration.
11446 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
11447 * solib-target.c (_initialize_solib_target): Add declaration.
11448 * solib.c (_initialize_solib): Add declaration.
11449 * source-cache.c (_initialize_source_cache): Add declaration.
11450 * source.c (_initialize_source): Add declaration.
11451 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
11452 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
11453 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
11454 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
11455 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
11456 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
11457 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
11458 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
11459 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
11460 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
11461 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
11462 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
11463 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
11464 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
11465 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
11466 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
11467 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
11468 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
11469 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
11470 * stabsread.c (_initialize_stabsread): Add declaration.
11471 * stack.c (_initialize_stack): Add declaration.
11472 * stap-probe.c (_initialize_stap_probe): Add declaration.
11473 * std-regs.c (_initialize_frame_reg): Add declaration.
11474 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
11475 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
11476 * symfile.c (_initialize_symfile): Add declaration.
11477 * symmisc.c (_initialize_symmisc): Add declaration.
11478 * symtab.c (_initialize_symtab): Add declaration.
11479 * target.c (_initialize_target): Add declaration.
11480 * target-connection.c (_initialize_target_connection): Add
11481 declaration.
11482 * target-dcache.c (_initialize_target_dcache): Add declaration.
11483 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
11484 * thread.c (_initialize_thread): Add declaration.
11485 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
11486 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
11487 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
11488 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
11489 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
11490 * tracectf.c (_initialize_ctf): Add declaration.
11491 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
11492 * tracefile.c (_initialize_tracefile): Add declaration.
11493 * tracepoint.c (_initialize_tracepoint): Add declaration.
11494 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
11495 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
11496 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
11497 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
11498 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
11499 * tui/tui-win.c (_initialize_tui_win): Add declaration.
11500 * tui/tui.c (_initialize_tui): Add declaration.
11501 * typeprint.c (_initialize_typeprint): Add declaration.
11502 * ui-style.c (_initialize_ui_style): Add declaration.
11503 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
11504 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
11505 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
11506 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
11507 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
11508 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
11509 * unittests/filtered_iterator-selftests.c
11510 (_initialize_filtered_iterator_selftests): Add declaration.
11511 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
11512 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
11513 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
11514 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
11515 * unittests/main-thread-selftests.c
11516 (_initialize_main_thread_selftests): Add declaration.
11517 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
11518 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
11519 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
11520 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
11521 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
11522 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
11523 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
11524 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
11525 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
11526 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
11527 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
11528 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
11529 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
11530 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
11531 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
11532 declaration.
11533 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
11534 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
11535 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
11536 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
11537 * user-regs.c (_initialize_user_regs): Add declaration.
11538 * utils.c (_initialize_utils): Add declaration.
11539 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
11540 * valops.c (_initialize_valops): Add declaration.
11541 * valprint.c (_initialize_valprint): Add declaration.
11542 * value.c (_initialize_values): Add declaration.
11543 * varobj.c (_initialize_varobj): Add declaration.
11544 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
11545 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
11546 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
11547 * windows-nat.c (_initialize_windows_nat): Add declaration.
11548 (_initialize_check_for_gdb_ini): Add declaration.
11549 (_initialize_loadable): Add declaration.
11550 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
11551 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
11552 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
11553 * xcoffread.c (_initialize_xcoffread): Add declaration.
11554 * xml-support.c (_initialize_xml_support): Add declaration.
11555 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
11556 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
11557 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
11558 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
11559
11560 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
11561
11562 * regformats/regdat.sh: Generate declaration for init function.
11563
11564 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
11565
11566 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
11567 up.
11568 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
11569 close_one_inferior>: New methods.
11570 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
11571 pass down target to find_inferior_pid.
11572 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
11573 Pass down target to find_inferior_ptid.
11574 (gdbsim_target::create_inferior): Pass down target to
11575 add_thread_silent.
11576 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
11577 target down to find_inferior_ptid and switch_to_thread.
11578 (gdbsim_target::close): Update to call close_one_inferior.
11579 (struct resume_data): Remove.
11580 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
11581 directly, rather than through a void pointer.
11582 (gdbsim_target::resume): Update to call resume_one_inferior.
11583
11584 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
11585
11586 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
11587
11588 2020-01-12 Pedro Alves <palves@redhat.com>
11589
11590 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
11591 directly for the current inferior instead of
11592 discard_all_inferiors.
11593 (discard_all_inferiors): Delete.
11594
11595 2020-01-11 Tom Tromey <tom@tromey.com>
11596
11597 * tui/tui-wingeneral.c (box_win): Check cli_styling.
11598 * tui/tui-winsource.c (tui_source_window_base::refill): Use
11599 deprecated_safe_get_selected_frame.
11600
11601 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
11602
11603 * inferior.c (print_inferior): Switch inferior before printing it.
11604
11605 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
11606 Pedro Alves <palves@redhat.com>
11607
11608 * progspace-and-thread.c (switch_to_program_space_and_thread):
11609 Assert there's an inferior for PSPACE. Use
11610 switch_to_inferior_no_thread to switch the inferior too.
11611 * progspace.c (program_space::~program_space): Call
11612 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
11613 (program_space::free_all_objfiles): Don't call clear_symtab_users
11614 here.
11615 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
11616
11617 2020-01-10 Pedro Alves <palves@redhat.com>
11618
11619 * NEWS: Mention multi-target debugging, "info connections", and
11620 "add-inferior -no-connection".
11621
11622 2020-01-10 Pedro Alves <palves@redhat.com>
11623
11624 * infrun.c: Include "target-connection.h".
11625 (check_multi_target_resumption): New.
11626 (proceed): Call it.
11627 * target-connection.c (make_target_connection_string): Make
11628 extern.
11629 * target-connection.h (make_target_connection_string): Declare.
11630
11631 2020-01-10 Pedro Alves <palves@redhat.com>
11632
11633 * Makefile.in (COMMON_SFILES): Add target-connection.c.
11634 * inferior.c (uiout_field_connection): New function.
11635 (print_inferior): Add new "connection-id" column.
11636 (add_inferior_command): Show connection number/string of added
11637 inferior.
11638 * process-stratum-target.h
11639 (process_stratum_target::connection_string): New virtual method.
11640 (process_stratum_target::connection_number): New field.
11641 * remote.c (remote_target::connection_string): New override.
11642 * target-connection.c: New file.
11643 * target-connection.h: New file.
11644 * target.c (decref_target): Remove process_stratum targets from
11645 the connection list.
11646 (target_stack::push): Add process_stratum targets to the
11647 connection list.
11648
11649 2020-01-10 Pedro Alves <palves@redhat.com>
11650
11651 Revert:
11652 2016-04-12 Pedro Alves <palves@redhat.com>
11653 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
11654 Remove references to name.
11655 * serial.h (struct serial) <name>: Delete.
11656
11657 2020-01-10 Pedro Alves <palves@redhat.com>
11658
11659 * gdbarch-selftests.c (register_to_value_test): Remove "target
11660 already pushed" check.
11661
11662 2020-01-10 Pedro Alves <palves@redhat.com>
11663 John Baldwin <jhb@FreeBSD.org>
11664
11665 * aarch64-linux-nat.c
11666 (aarch64_linux_nat_target::thread_architecture): Adjust.
11667 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
11668 (task_command_1): Likewise.
11669 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
11670 (aix_thread_target::wait, aix_thread_target::fetch_registers)
11671 (aix_thread_target::store_registers)
11672 (aix_thread_target::thread_alive): Adjust.
11673 * amd64-fbsd-tdep.c: Include "inferior.h".
11674 (amd64fbsd_get_thread_local_address): Pass down target.
11675 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
11676 thread's gdbarch instead of target_gdbarch.
11677 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
11678 get_last_target_status.
11679 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
11680 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
11681 inferiors.
11682 (update_inserted_breakpoint_locations): Skip if inferiors with no
11683 execution.
11684 (update_global_location_list): When handling moribund locations,
11685 find representative inferior for location's pspace, and use thread
11686 count of its process_stratum target.
11687 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
11688 * bsd-uthread.c (bsd_uthread_target::wait): Use
11689 as_process_stratum_target and adjust thread_change_ptid and
11690 add_thread calls.
11691 (bsd_uthread_target::update_thread_list): Use
11692 as_process_stratum_target and adjust find_thread_ptid,
11693 thread_change_ptid and add_thread calls.
11694 * btrace.c (maint_btrace_packet_history_cmd): Adjust
11695 find_thread_ptid call.
11696 * corelow.c (add_to_thread_list): Adjust add_thread call.
11697 (core_target_open): Adjust add_thread_silent and thread_count
11698 calls.
11699 (core_target::pid_to_str): Adjust find_inferior_ptid call.
11700 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
11701 * event-top.c (async_disconnect): Pop targets from all inferiors.
11702 * exec.c (add_target_sections): Push exec target on all inferiors
11703 sharing the program space.
11704 (remove_target_sections): Remove the exec target from all
11705 inferiors sharing the program space.
11706 (exec_on_vfork): New.
11707 * exec.h (exec_on_vfork): Declare.
11708 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
11709 Pass it down.
11710 (fbsd_nat_target::update_thread_list): Adjust.
11711 (fbsd_nat_target::resume): Adjust.
11712 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
11713 down.
11714 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
11715 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
11716 get_thread_arch_regcache call.
11717 * fork-child.c (gdb_startup_inferior): Pass target down to
11718 startup_inferior and set_executing.
11719 * gdbthread.h (struct process_stratum_target): Forward declare.
11720 (add_thread, add_thread_silent, add_thread_with_info)
11721 (in_thread_list): Add process_stratum_target parameter.
11722 (find_thread_ptid(inferior*, ptid_t)): New overload.
11723 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
11724 parameter.
11725 (all_threads()): Delete overload.
11726 (all_threads, all_non_exited_threads): Add process_stratum_target
11727 parameter.
11728 (all_threads_safe): Use brace initialization.
11729 (thread_count): Add process_stratum_target parameter.
11730 (set_resumed, set_running, set_stop_requested, set_executing)
11731 (threads_are_executing, finish_thread_state): Add
11732 process_stratum_target parameter.
11733 (switch_to_thread): Use is_current_thread.
11734 * i386-fbsd-tdep.c: Include "inferior.h".
11735 (i386fbsd_get_thread_local_address): Pass down target.
11736 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
11737 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
11738 have_inferiors check.
11739 * inf-ptrace.c (inf_ptrace_target::create_inferior)
11740 (inf_ptrace_target::attach): Adjust.
11741 * infcall.c (run_inferior_call): Adjust.
11742 * infcmd.c (run_command_1): Pass target to
11743 scoped_finish_thread_state.
11744 (proceed_thread_callback): Skip inferiors with no execution.
11745 (continue_command): Rename 'all_threads' local to avoid hiding
11746 'all_threads' function. Adjust get_last_target_status call.
11747 (prepare_one_step): Adjust set_running call.
11748 (signal_command): Use user_visible_resume_target. Compare thread
11749 pointers instead of inferior_ptid.
11750 (info_program_command): Adjust to pass down target.
11751 (attach_command): Mark target's 'thread_executing' flag.
11752 (stop_current_target_threads_ns): New, factored out from ...
11753 (interrupt_target_1): ... this. Switch inferior before making
11754 target calls.
11755 * inferior-iter.h
11756 (struct all_inferiors_iterator, struct all_inferiors_range)
11757 (struct all_inferiors_safe_range)
11758 (struct all_non_exited_inferiors_range): Filter on
11759 process_stratum_target too. Remove explicit.
11760 * inferior.c (inferior::inferior): Push dummy target on target
11761 stack.
11762 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
11763 Add process_stratum_target parameter, and pass it down.
11764 (have_live_inferiors): Adjust.
11765 (switch_to_inferior_and_push_target): New.
11766 (add_inferior_command, clone_inferior_command): Handle
11767 "-no-connection" parameter. Use
11768 switch_to_inferior_and_push_target.
11769 (_initialize_inferior): Mention "-no-connection" option in
11770 the help of "add-inferior" and "clone-inferior" commands.
11771 * inferior.h: Include "process-stratum-target.h".
11772 (interrupt_target_1): Use bool.
11773 (struct inferior) <push_target, unpush_target, target_is_pushed,
11774 find_target_beneath, top_target, process_target, target_at,
11775 m_stack>: New.
11776 (discard_all_inferiors): Delete.
11777 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
11778 (all_inferiors, all_non_exited_inferiors): Add
11779 process_stratum_target parameter.
11780 * infrun.c: Include "gdb_select.h" and <unordered_map>.
11781 (target_last_proc_target): New global.
11782 (follow_fork_inferior): Push target on new inferior. Pass target
11783 to add_thread_silent. Call exec_on_vfork. Handle target's
11784 reference count.
11785 (follow_fork): Adjust get_last_target_status call. Also consider
11786 target.
11787 (follow_exec): Push target on new inferior.
11788 (struct execution_control_state) <target>: New field.
11789 (user_visible_resume_target): New.
11790 (do_target_resume): Call target_async.
11791 (resume_1): Set target's threads_executing flag. Consider resume
11792 target.
11793 (commit_resume_all_targets): New.
11794 (proceed): Also consider resume target. Skip threads of inferiors
11795 with no execution. Commit resumtion in all targets.
11796 (start_remote): Pass current inferior to wait_for_inferior.
11797 (infrun_thread_stop_requested): Consider target as well. Pass
11798 thread_info pointer to clear_inline_frame_state instead of ptid.
11799 (infrun_thread_thread_exit): Consider target as well.
11800 (random_pending_event_thread): New inferior parameter. Use it.
11801 (do_target_wait): Rename to ...
11802 (do_target_wait_1): ... this. Add inferior parameter, and pass it
11803 down.
11804 (threads_are_resumed_pending_p, do_target_wait): New.
11805 (prepare_for_detach): Adjust calls.
11806 (wait_for_inferior): New inferior parameter. Handle it. Use
11807 do_target_wait_1 instead of do_target_wait.
11808 (fetch_inferior_event): Adjust. Switch to representative
11809 inferior. Pass target down.
11810 (set_last_target_status): Add process_stratum_target parameter.
11811 Save target in global.
11812 (get_last_target_status): Add process_stratum_target parameter and
11813 handle it.
11814 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
11815 (context_switch): Check inferior_ptid == null_ptid before calling
11816 inferior_thread().
11817 (get_inferior_stop_soon): Pass down target.
11818 (wait_one): Rename to ...
11819 (poll_one_curr_target): ... this.
11820 (struct wait_one_event): New.
11821 (wait_one): New.
11822 (stop_all_threads): Adjust.
11823 (handle_no_resumed, handle_inferior_event): Adjust to consider the
11824 event's target.
11825 (switch_back_to_stepped_thread): Also consider target.
11826 (print_stop_event): Update.
11827 (normal_stop): Update. Also consider the resume target.
11828 * infrun.h (wait_for_inferior): Remove declaration.
11829 (user_visible_resume_target): New declaration.
11830 (get_last_target_status, set_last_target_status): New
11831 process_stratum_target parameter.
11832 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
11833 process_stratum_target parameter, and use it.
11834 (clear_inline_frame_state (thread_info*)): New.
11835 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
11836 process_stratum_target parameter.
11837 (clear_inline_frame_state (thread_info*)): Declare.
11838 * linux-fork.c (delete_checkpoint_command): Pass target down to
11839 find_thread_ptid.
11840 (checkpoint_command): Adjust.
11841 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
11842 instead of just tweaking inferior_ptid.
11843 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
11844 (exit_lwp): Pass target down to find_thread_ptid.
11845 (attach_proc_task_lwp_callback): Pass target down to
11846 add_thread/set_running/set_executing.
11847 (linux_nat_target::attach): Pass target down to
11848 thread_change_ptid.
11849 (get_detach_signal): Pass target down to find_thread_ptid.
11850 Consider last target status's target.
11851 (linux_resume_one_lwp_throw, resume_lwp)
11852 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
11853 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
11854 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
11855 (linux_nat_target::async_wait_fd): New.
11856 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
11857 target down.
11858 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
11859 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
11860 * linux-thread-db.c (struct thread_db_info::process_target): New
11861 field.
11862 (add_thread_db_info): Save target.
11863 (get_thread_db_info): New process_stratum_target parameter. Also
11864 match target.
11865 (delete_thread_db_info): New process_stratum_target parameter.
11866 Also match target.
11867 (thread_from_lwp): Adjust to pass down target.
11868 (thread_db_notice_clone): Pass down target.
11869 (check_thread_db_callback): Pass down target.
11870 (try_thread_db_load_1): Always push the thread_db target.
11871 (try_thread_db_load, record_thread): Pass target down.
11872 (thread_db_target::detach): Pass target down. Always unpush the
11873 thread_db target.
11874 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
11875 target down. Always unpush the thread_db target.
11876 (find_new_threads_callback, thread_db_find_new_threads_2)
11877 (thread_db_target::update_thread_list): Pass target down.
11878 (thread_db_target::pid_to_str): Pass current inferior down.
11879 (thread_db_target::get_thread_local_address): Pass target down.
11880 (thread_db_target::resume, maintenance_check_libthread_db): Pass
11881 target down.
11882 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
11883 * procfs.c (procfs_target::procfs_init_inferior): Declare.
11884 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
11885 (procfs_init_inferior): Rename to ...
11886 (procfs_target::procfs_init_inferior): ... this and adjust.
11887 (procfs_target::create_inferior, procfs_notice_thread)
11888 (procfs_do_thread_registers): Adjust.
11889 * ppc-fbsd-tdep.c: Include "inferior.h".
11890 (ppcfbsd_get_thread_local_address): Pass down target.
11891 * proc-service.c (ps_xfer_memory): Switch current inferior and
11892 program space as well.
11893 (get_ps_regcache): Pass target down.
11894 * process-stratum-target.c
11895 (process_stratum_target::thread_address_space)
11896 (process_stratum_target::thread_architecture): Pass target down.
11897 * process-stratum-target.h
11898 (process_stratum_target::threads_executing): New field.
11899 (as_process_stratum_target): New.
11900 * ravenscar-thread.c
11901 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
11902 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
11903 down.
11904 * record-btrace.c (record_btrace_target::info_record): Adjust.
11905 (record_btrace_target::record_method)
11906 (record_btrace_target::record_is_replaying)
11907 (record_btrace_target::fetch_registers)
11908 (get_thread_current_frame_id, record_btrace_target::resume)
11909 (record_btrace_target::wait, record_btrace_target::stop): Pass
11910 target down.
11911 * record-full.c (record_full_wait_1): Switch to event thread.
11912 Pass target down.
11913 * regcache.c (regcache::regcache)
11914 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
11915 process_stratum_target parameter and handle it.
11916 (current_thread_target): New global.
11917 (get_thread_regcache): Add process_stratum_target parameter and
11918 handle it. Switch inferior before calling target method.
11919 (get_thread_regcache): Pass target down.
11920 (get_thread_regcache_for_ptid): Pass target down.
11921 (registers_changed_ptid): Add process_stratum_target parameter and
11922 handle it.
11923 (registers_changed_thread, registers_changed): Pass target down.
11924 (test_get_thread_arch_aspace_regcache): New.
11925 (current_regcache_test): Define a couple local test_target_ops
11926 instances and use them for testing.
11927 (readwrite_regcache): Pass process_stratum_target parameter.
11928 (cooked_read_test, cooked_write_test): Pass mock_target down.
11929 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
11930 (get_thread_arch_aspace_regcache): Add process_stratum_target
11931 parameter.
11932 (regcache::target): New method.
11933 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
11934 (regcache::registers_changed_ptid): Add process_stratum_target
11935 parameter.
11936 (regcache::m_target): New field.
11937 (registers_changed_ptid): Add process_stratum_target parameter.
11938 * remote.c (remote_state::supports_vCont_probed): New field.
11939 (remote_target::async_wait_fd): New method.
11940 (remote_unpush_and_throw): Add remote_target parameter.
11941 (get_current_remote_target): Adjust.
11942 (remote_target::remote_add_inferior): Push target.
11943 (remote_target::remote_add_thread)
11944 (remote_target::remote_notice_new_inferior)
11945 (get_remote_thread_info): Pass target down.
11946 (remote_target::update_thread_list): Skip threads of inferiors
11947 bound to other targets. (remote_target::close): Don't discard
11948 inferiors. (remote_target::add_current_inferior_and_thread)
11949 (remote_target::process_initial_stop_replies)
11950 (remote_target::start_remote)
11951 (remote_target::remote_serial_quit_handler): Pass down target.
11952 (remote_target::remote_unpush_target): New remote_target
11953 parameter. Unpush the target from all inferiors.
11954 (remote_target::remote_unpush_and_throw): New remote_target
11955 parameter. Pass it down.
11956 (remote_target::open_1): Check whether the current inferior has
11957 execution instead of checking whether any inferior is live. Pass
11958 target down.
11959 (remote_target::remote_detach_1): Pass down target. Use
11960 remote_unpush_target.
11961 (extended_remote_target::attach): Pass down target.
11962 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
11963 (remote_target::append_resumption): Pass down target.
11964 (remote_target::append_pending_thread_resumptions)
11965 (remote_target::remote_resume_with_hc, remote_target::resume)
11966 (remote_target::commit_resume): Pass down target.
11967 (remote_target::remote_stop_ns): Check supports_vCont_probed.
11968 (remote_target::interrupt_query)
11969 (remote_target::remove_new_fork_children)
11970 (remote_target::check_pending_events_prevent_wildcard_vcont)
11971 (remote_target::remote_parse_stop_reply)
11972 (remote_target::process_stop_reply): Pass down target.
11973 (first_remote_resumed_thread): New remote_target parameter. Pass
11974 it down.
11975 (remote_target::wait_as): Pass down target.
11976 (unpush_and_perror): New remote_target parameter. Pass it down.
11977 (remote_target::readchar, remote_target::remote_serial_write)
11978 (remote_target::getpkt_or_notif_sane_1)
11979 (remote_target::kill_new_fork_children, remote_target::kill): Pass
11980 down target.
11981 (remote_target::mourn_inferior): Pass down target. Use
11982 remote_unpush_target.
11983 (remote_target::core_of_thread)
11984 (remote_target::remote_btrace_maybe_reopen): Pass down target.
11985 (remote_target::pid_to_exec_file)
11986 (remote_target::thread_handle_to_thread_info): Pass down target.
11987 (remote_target::async_wait_fd): New.
11988 * riscv-fbsd-tdep.c: Include "inferior.h".
11989 (riscv_fbsd_get_thread_local_address): Pass down target.
11990 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
11991 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
11992 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
11993 Adjust.
11994 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
11995 * solib-svr4.c (enable_break): Pass down target.
11996 * spu-multiarch.c (parse_spufs_run): Pass down target.
11997 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
11998 * target-delegates.c: Regenerate.
11999 * target.c (g_target_stack): Delete.
12000 (current_top_target): Return the current inferior's top target.
12001 (target_has_execution_1): Refer to the passed-in inferior's top
12002 target.
12003 (target_supports_terminal_ours): Check whether the initial
12004 inferior was already created.
12005 (decref_target): New.
12006 (target_stack::push): Incref/decref the target.
12007 (push_target, push_target, unpush_target): Adjust.
12008 (target_stack::unpush): Defref target.
12009 (target_is_pushed): Return bool. Adjust to refer to the current
12010 inferior's target stack.
12011 (dispose_inferior): Delete, and inline parts ...
12012 (target_preopen): ... here. Only dispose of the current inferior.
12013 (target_detach): Hold strong target reference while detaching.
12014 Pass target down.
12015 (target_thread_name): Add assertion.
12016 (target_resume): Pass down target.
12017 (target_ops::beneath, find_target_at): Adjust to refer to the
12018 current inferior's target stack.
12019 (get_dummy_target): New.
12020 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
12021 has a thread running.
12022 (initialize_targets): Rename to ...
12023 (_initialize_target): ... this.
12024 * target.h: Include "gdbsupport/refcounted-object.h".
12025 (struct target_ops): Inherit refcounted_object.
12026 (target_ops::shortname, target_ops::longname): Make const.
12027 (target_ops::async_wait_fd): New method.
12028 (decref_target): Declare.
12029 (struct target_ops_ref_policy): New.
12030 (target_ops_ref): New typedef.
12031 (get_dummy_target): Declare function.
12032 (target_is_pushed): Return bool.
12033 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
12034 (all_matching_threads_iterator::all_matching_threads_iterator):
12035 Handle filter target.
12036 * thread-iter.h (struct all_matching_threads_iterator, struct
12037 all_matching_threads_range, class all_non_exited_threads_range):
12038 Filter by target too. Remove explicit.
12039 * thread.c (threads_executing): Delete.
12040 (inferior_thread): Pass down current inferior.
12041 (clear_thread_inferior_resources): Pass down thread pointer
12042 instead of ptid_t.
12043 (add_thread_silent, add_thread_with_info, add_thread): Add
12044 process_stratum_target parameter. Use it for thread and inferior
12045 searches.
12046 (is_current_thread): New.
12047 (thread_info::deletable): Use it.
12048 (find_thread_ptid, thread_count, in_thread_list)
12049 (thread_change_ptid, set_resumed, set_running): New
12050 process_stratum_target parameter. Pass it down.
12051 (set_executing): New process_stratum_target parameter. Pass it
12052 down. Adjust reference to 'threads_executing'.
12053 (threads_are_executing): New process_stratum_target parameter.
12054 Adjust reference to 'threads_executing'.
12055 (set_stop_requested, finish_thread_state): New
12056 process_stratum_target parameter. Pass it down.
12057 (switch_to_thread): Also match inferior.
12058 (switch_to_thread): New process_stratum_target parameter. Pass it
12059 down.
12060 (update_threads_executing): Reimplement.
12061 * top.c (quit_force): Pop targets from all inferior.
12062 (gdb_init): Don't call initialize_targets.
12063 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
12064 Declare.
12065 (windows_add_thread, windows_delete_thread): Adjust.
12066 (get_windows_debug_event): Rename to ...
12067 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
12068 * tracefile-tfile.c (tfile_target_open): Pass down target.
12069 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
12070 Forward declare.
12071 (switch_to_thread): Add process_stratum_target parameter.
12072 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
12073 parameter. Use it.
12074 (mi_on_resume): Pass target down.
12075 * nat/fork-inferior.c (startup_inferior): Add
12076 process_stratum_target parameter. Pass it down.
12077 * nat/fork-inferior.h (startup_inferior): Add
12078 process_stratum_target parameter.
12079 * python/py-threadevent.c (py_get_event_thread): Pass target down.
12080
12081 2020-01-10 Pedro Alves <palves@redhat.com>
12082
12083 * remote.c (remote_target::start_remote): Don't set inferior_ptid
12084 directly. Instead find the first thread in the thread list and
12085 use switch_to_thread.
12086
12087 2020-01-10 Pedro Alves <palves@redhat.com>
12088
12089 * remote.c (remote_target::remote_add_inferior): Don't bind a
12090 process to the current inferior if the current inferior is already
12091 bound to a process.
12092
12093 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
12094 Pedro Alves <palves@redhat.com>
12095
12096 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
12097 If no process is specified, return null_ptid instead of
12098 inferior_ptid.
12099 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
12100 TARGET_WAITKIND_SIGNALLED with no pid.
12101
12102 2020-01-10 Pedro Alves <palves@redhat.com>
12103
12104 * remote.c (first_remote_resumed_thread): New.
12105 (remote_target::wait_as): Use it as default event_ptid instead of
12106 inferior_ptid.
12107
12108 2020-01-10 Pedro Alves <palves@redhat.com>
12109
12110 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
12111
12112 2020-01-10 Pedro Alves <palves@redhat.com>
12113
12114 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
12115 not -1.
12116
12117 2020-01-10 Pedro Alves <palves@redhat.com>
12118
12119 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
12120 ptid to get_last_target_status.
12121 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
12122 ptid to get_last_target_status.
12123 * infcmd.c (continue_command): Don't pass a target_waitstatus to
12124 get_last_target_status.
12125 (info_program_command): Don't pass a target_waitstatus to
12126 get_last_target_status.
12127 * infrun.c (init_wait_for_inferior): Use
12128 nullify_last_target_wait_ptid.
12129 (get_last_target_status): Handle nullptr arguments.
12130 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
12131 (print_stop_event): Don't pass a ptid to get_last_target_status.
12132 (normal_stop): Don't pass a ptid to get_last_target_status.
12133 * infrun.h (get_last_target_status, set_last_target_status): Move
12134 comments here and update.
12135 (nullify_last_target_wait_ptid): Declare.
12136 * linux-fork.c (fork_load_infrun_state): Remove local extern
12137 declaration of nullify_last_target_wait_ptid.
12138 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
12139 to get_last_target_status.
12140
12141 2020-01-10 Pedro Alves <palves@redhat.com>
12142
12143 * gdbthread.h (scoped_restore_current_thread)
12144 <dont_restore, restore, m_dont_restore>: Declare.
12145 * thread.c (thread_alive): Add assertion. Return bool.
12146 (switch_to_thread_if_alive): New.
12147 (prune_threads): Switch inferior/thread.
12148 (print_thread_info_1): Switch thread before calling target methods.
12149 (scoped_restore_current_thread::restore): New, factored out from
12150 ...
12151 (scoped_restore_current_thread::~scoped_restore_current_thread):
12152 ... this.
12153 (scoped_restore_current_thread::scoped_restore_current_thread):
12154 Add assertion.
12155 (thread_apply_all_command, thread_select): Use
12156 switch_to_thread_if_alive.
12157 * infrun.c (proceed, restart_threads, handle_signal_stop)
12158 (switch_back_to_stepped_thread): Switch current thread before
12159 calling target methods.
12160
12161 2020-01-10 Pedro Alves <palves@redhat.com>
12162
12163 * inferior.c (switch_to_inferior_no_thread): New function,
12164 factored out from ...
12165 (inferior_command): ... here.
12166 * inferior.h (switch_to_inferior_no_thread): Declare.
12167 * mi/mi-main.c (run_one_inferior): Use
12168 switch_to_inferior_no_thread.
12169
12170 2020-01-10 Pedro Alves <palves@redhat.com>
12171
12172 * infcmd.c (kill_command): Remove dead code.
12173
12174 2020-01-10 Pedro Alves <palves@redhat.com>
12175
12176 * remote.c (remote_target::mourn_inferior): No longer check
12177 whether the target is running.
12178
12179 2020-01-10 Pedro Alves <palves@redhat.com>
12180
12181 * corelow.c (core_target::has_execution): Change parameter type to
12182 inferior pointer.
12183 * inferior.c (number_of_live_inferiors): Use
12184 inferior::has_execution instead of target_has_execution_1.
12185 * inferior.h (inferior::has_execution): New.
12186 * linux-thread-db.c (thread_db_target::update_thread_list): Use
12187 inferior::has_execution instead of target_has_execution_1.
12188 * process-stratum-target.c
12189 (process_stratum_target::has_execution): Change parameter type to
12190 inferior pointer. Check the inferior's PID instead of
12191 inferior_ptid.
12192 * process-stratum-target.h
12193 (process_stratum_target::has_execution): Change parameter type to
12194 inferior pointer.
12195 * record-full.c (record_full_core_target::has_execution): Change
12196 parameter type to inferior pointer.
12197 * target.c (target_has_execution_1): Change parameter type to
12198 inferior pointer.
12199 (target_has_execution_current): Adjust.
12200 * target.h (target_ops::has_execution): Change parameter type to
12201 inferior pointer.
12202 (target_has_execution_1): Change parameter type to inferior
12203 pointer. Change return type to bool.
12204 * tracefile.h (tracefile_target::has_execution): Change parameter
12205 type to inferior pointer.
12206
12207 2020-01-10 Pedro Alves <palves@redhat.com>
12208
12209 * exceptions.c (print_flush): Remove current_top_target() check.
12210
12211 2020-01-10 Pedro Alves <palves@redhat.com>
12212
12213 * remote.c (show_remote_exec_file): Show the current inferior's
12214 exec-file instead of the command variable's value.
12215
12216 2020-01-10 Pedro Alves <palves@redhat.com>
12217
12218 * record-full.c (record_full_resume_ptid): New global.
12219 (record_full_target::resume): Set it.
12220 (record_full_wait_1): Use record_full_resume_ptid instead of
12221 inferior_ptid.
12222
12223 2020-01-10 Pedro Alves <palves@redhat.com>
12224
12225 * gdbthread.h (scoped_restore_current_thread)
12226 <dont_restore, restore, m_dont_restore>: Declare.
12227 * thread.c (thread_alive): Add assertion. Return bool.
12228 (switch_to_thread_if_alive): New.
12229 (prune_threads): Switch inferior/thread.
12230 (print_thread_info_1): Switch thread before calling target methods.
12231 (scoped_restore_current_thread::restore): New, factored out from
12232 ...
12233 (scoped_restore_current_thread::~scoped_restore_current_thread):
12234 ... this.
12235 (scoped_restore_current_thread::scoped_restore_current_thread):
12236 Add assertion.
12237 (thread_apply_all_command, thread_select): Use
12238 switch_to_thread_if_alive.
12239
12240 2020-01-10 George Barrett <bob@bob131.so>
12241
12242 * stap-probe.c (stap_modify_semaphore): Don't check for null
12243 semaphores.
12244 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
12245 for null semaphores.
12246
12247 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
12248
12249 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
12250 all source windows, and maintain horizontal scroll status while
12251 doing so.
12252
12253 2020-01-09 Tom Tromey <tom@tromey.com>
12254
12255 PR tui/18932:
12256 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
12257 update_source_window, not print_source_lines.
12258
12259 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
12260
12261 * tui/tui.c (tui_enable): Register tui hooks after calling
12262 tui_display_main.
12263
12264 2020-01-09 Christian Biesinger <cbiesinger@google.com>
12265
12266 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
12267
12268 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
12269
12270 * thread.c (print_thread_info_1): Fix indentation.
12271
12272 2020-01-09 Christian Biesinger <cbiesinger@google.com>
12273
12274 * symtab.c (general_symbol_info::compute_and_set_names): Move the
12275 unique_xmalloc_ptr outside the if to always free the demangled name.
12276
12277 2020-01-08 Tom Tromey <tromey@adacore.com>
12278
12279 * xcoffread.c (enter_line_range, read_xcoff_symtab)
12280 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
12281 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
12282 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
12283 Remove.
12284 (section_offsets): New typedef.
12285 * symtab.c (fixup_section, get_msymbol_address): Update.
12286 * symmisc.c (dump_msymbols): Update.
12287 * symfile.h (relative_addr_info_to_section_offsets)
12288 (symfile_map_offsets_to_segments): Update.
12289 * symfile.c (build_section_addr_info_from_objfile)
12290 (init_objfile_sect_indices): Update.
12291 (struct place_section_arg): Change type of "offsets".
12292 (place_section): Update.
12293 (relative_addr_info_to_section_offsets): Change type of
12294 "section_offsets". Remove "num_sections" parameter.
12295 (default_symfile_offsets, syms_from_objfile_1)
12296 (set_objfile_default_section_offset): Update.
12297 (reread_symbols): No need to preserve section offsets by hand.
12298 (symfile_map_offsets_to_segments): Change type of "offsets".
12299 * stap-probe.c (relocate_address): Update.
12300 * stabsread.h (process_one_symbol): Update.
12301 * solib-target.c (struct lm_info_target) <offsets>: Change type.
12302 (solib_target_relocate_section_addresses): Update.
12303 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
12304 Update.
12305 * solib-frv.c (frv_relocate_main_executable): Update.
12306 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
12307 * solib-aix.c (solib_aix_get_section_offsets): Change return
12308 type.
12309 (solib_aix_solib_create_inferior_hook): Update.
12310 * remote.c (remote_target::get_offsets): Update.
12311 * psymtab.c (find_pc_sect_psymtab): Update.
12312 * psympriv.h (struct partial_symbol) <address, text_low,
12313 text_high>: Update.
12314 * objfiles.h (obj_section_offset): Update.
12315 (struct objfile) <section_offsets>: Change type.
12316 <num_sections>: Remove.
12317 (objfile_relocate): Update.
12318 * objfiles.c (entry_point_address_query): Update
12319 (relocate_one_symbol): Change type of "section_offsets".
12320 (objfile_relocate1, objfile_relocate1): Change type of
12321 "new_offsets".
12322 (objfile_rebase1): Update.
12323 * mipsread.c (mipscoff_symfile_read): Update.
12324 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
12325 parameter.
12326 * mdebugread.c (parse_symbol): Change type of "section_offsets".
12327 (parse_external, psymtab_to_symtab_1): Update.
12328 * machoread.c (macho_symfile_offsets): Update.
12329 * ia64-tdep.c (ia64_find_unwind_table): Update.
12330 * hppa-tdep.c (read_unwind_info): Update.
12331 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
12332 * dwarf2read.c (create_addrmap_from_index)
12333 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
12334 (process_psymtab_comp_unit_reader, add_partial_symbol)
12335 (add_partial_subprogram, process_full_comp_unit)
12336 (read_file_scope, read_func_scope, read_lexical_block_scope)
12337 (read_call_site_scope, dwarf2_rnglists_process)
12338 (dwarf2_ranges_process, dwarf2_ranges_read)
12339 (dwarf_decode_lines_1, var_decode_location, new_symbol)
12340 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
12341 Update.
12342 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
12343 Update.
12344 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
12345 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
12346 (process_one_symbol): Change type of "section_offsets".
12347 * ctfread.c (get_objfile_text_range): Update.
12348 * coffread.c (coff_symtab_read, enter_linenos)
12349 (process_coff_symbol): Update.
12350 * coff-pe-read.c (add_pe_forwarded_sym): Update.
12351 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
12352
12353 2020-01-08 Tom Tromey <tromey@adacore.com>
12354
12355 * dwarf2read.c (parse_macro_definition): Use std::string.
12356 (parse_macro_definition): Likewise.
12357
12358 2020-01-08 Tom Tromey <tromey@adacore.com>
12359
12360 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
12361 (ATTR_ALLOC_CHUNK): Remove.
12362
12363 2020-01-08 Tom Tromey <tromey@adacore.com>
12364
12365 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
12366
12367 2020-01-08 Tom Tromey <tromey@adacore.com>
12368
12369 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
12370 (dwarf2_compute_name, open_dwo_file): Likewise.
12371 (process_enumeration_scope): Use std::vector.
12372 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
12373 (partial_die_info::fixup, dwarf2_start_subfile)
12374 (guess_full_die_structure_name, dwarf2_name): Likewise.
12375 (determine_prefix): Update.
12376 (guess_full_die_structure_name): Make return type const.
12377 (partial_die_full_name): Return unique_xmalloc_ptr.
12378 (DW_FIELD_ALLOC_CHUNK): Remove.
12379
12380 2020-01-07 Tom Tromey <tromey@adacore.com>
12381
12382 PR build/24937:
12383 * stap-probe.c (class stap_static_probe_ops): Add constructor.
12384
12385 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
12386
12387 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
12388
12389 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
12390
12391 * stack.c (print_frame_info): Move disassemble_next_line code
12392 inside source_print block.
12393
12394 2020-01-06 Eli Zaretskii <eliz@gnu.org>
12395
12396 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
12397 gdb/signals.h, as we are now using native signal symbols.
12398
12399 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
12400
12401 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
12402 overflow by an early check of content vs threshold.
12403 * tui/tui-source.c (tui_source_window::line_is_displayed):
12404 Likewise.
12405
12406 2020-01-06 Eli Zaretskii <eliz@gnu.org>
12407
12408 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
12409
12410 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
12411
12412 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
12413 export table if no section contains it's RVA.
12414
12415 2020-01-06 Eli Zaretskii <eliz@gnu.org>
12416
12417 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
12418
12419 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
12420
12421 * source.c (print_source_lines_base): Set last_line_listed.
12422
12423 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
12424
12425 * tui/tui-disasm.c: Remove trailing spaces.
12426
12427 2020-01-06 Eli Zaretskii <eliz@gnu.org>
12428 Pedro Alves <palves@redhat.com>
12429
12430 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
12431 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
12432 (windows_gdb_signal_to_target): New function, uses the above
12433 enumeration to convert GDB internal signal codes to equivalent
12434 Windows codes.
12435 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
12436 * windows-nat.c: Include "gdb_wait.h".
12437 (get_windows_debug_event): Extract the fatal exception from the
12438 exit status and convert to the equivalent Posix signal number.
12439 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
12440 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
12441 * gdbsupport/gdb_wait.c: New file, implements
12442 windows_status_to_termsig.
12443 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
12444 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
12445
12446 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
12447
12448 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
12449 show_layout.
12450
12451 2020-01-05 Luis Machado <luis.machado@linaro.org>
12452
12453 * aarch64-linux-nat.c
12454 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
12455 and bfd_mach_aarch64.
12456
12457 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12458
12459 * ui-file.c (stdio_file::can_emit_style_escape)
12460 (tee_file::can_emit_style_escape): Ensure style is used also on
12461 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
12462 to gdb_stdout.
12463 * main.c (set_gdb_data_directory): Use file style to output the
12464 warning that the given pathname is not a directory.
12465 * top.c (show_history_filename, gdb_safe_append_history)
12466 (show_gdb_datadir): Use file style.
12467
12468 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
12469
12470 * solib-target.c (struct lm_info_target):
12471 Change offsets to be a unique_xmalloc_ptr.
12472 (solib_target_relocate_section_addresses): Update.
12473
12474 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
12475
12476 * windows-nat.c (windows_clear_solib): Free so_list linked list.
12477
12478 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
12479
12480 * MAINTAINERS (Write After Approval): Add myself.
12481
12482 2020-01-02 Luis Machado <luis.machado@linaro.org>
12483
12484 * proc-service.c (get_ps_regcache): Remove reference to obsolete
12485 Cell BE architecture.
12486 * target.h (struct target_ops) <thread_architecture>: Likewise.
12487
12488 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
12489
12490 * Makefile.in: Use INSTALL_PROGRAM_ENV.
12491
12492 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
12493
12494 * MAINTAINERS (Write After Approval): Add myself.
12495
12496 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12497
12498 * gdbarch.sh: Update copyright year range of generated files.
12499
12500 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12501
12502 Update copyright year range in all GDB files.
12503
12504 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12505
12506 * copyright.py: Convert to Python 3.
12507
12508 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12509
12510 * copyright.py: Adapt after move of gnulib directory from gdb
12511 directory to toplevel directory.
12512
12513 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12514
12515 * copyright.py (main): Exit if run from the wrong directory.
12516
12517 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12518
12519 * top.c (print_gdb_version): Change copyright year to 2020.
12520
12521 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12522
12523 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
12524
12525 For older changes see ChangeLog-2019.
12526 \f
12527 Local Variables:
12528 mode: change-log
12529 left-margin: 8
12530 fill-column: 74
12531 version-control: never
12532 coding: utf-8
12533 End: