]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
b4042befb9b4d78d3bb83b917b829336a650338a
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2020-09-10 Kamil Rytarowski <n54@gmx.com>
2
3 * configure.nat (NATDEPFILES): Add nat/netbsd-nat.o when needed.
4
5 2020-09-10 Kamil Rytarowski <n54@gmx.com>
6
7 * netbsd-nat.h: New file.
8 * netbsd-nat.c: Likewise.
9
10 2020-09-09 Tom Tromey <tromey@adacore.com>
11
12 * ada-lang.c (remove_extra_symbols): Do not increment when
13 removing an element
14
15 2020-09-08 Tom Tromey <tromey@adacore.com>
16
17 * gdb_bfd.c (gdb_bfd_open): Call bfd_fopen when fstat fails.
18
19 2020-09-08 Tom Tromey <tromey@adacore.com>
20
21 PR win32/25302:
22 * gdb_bfd.c (gdb_bfd_data): Add "st" parameter.
23 (gdb_bfd_init_data): New function.
24 (gdb_bfd_open, gdb_bfd_ref): Use gdb_bfd_init_data.
25
26 2020-09-07 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
27
28 * infrun.c (fetch_inferior_event): Use
29 `switch_to_target_no_thread` to switch the target.
30
31 2020-09-06 Tom Tromey <tom@tromey.com>
32
33 * symfile.h (dwarf2_free_objfile): Don't declare.
34
35 2020-09-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
36
37 * gdb/i386-tdep.c (i386_floatformat_for_type): Added conditions
38 to match 16 byte real/complex type generated by Flang compiler.
39
40 2020-09-03 Tom de Vries <tdevries@suse.de>
41
42 PR breakpoint/26546
43 * dwarf2/read.c (new_symbol): Tag label symbol without DW_AT_low_pc as
44 LOC_OPTIMIZED_OUT instead of LOC_LABEL.
45
46 2020-09-02 Simon Marchi <simon.marchi@polymtl.ca>
47
48 * maint.c (index_digits): New function.
49 (struct maint_print_section_data): Remove.
50 (print_bfd_section_info): Remove print_data parameter, add arg
51 and index_digits.
52 (print_objfile_section_info): Likewise.
53 (print_bfd_section_info_maybe_relocated): Likewise (plus
54 objfile).
55 (maintenance_info_sections): Adjust calls.
56
57 2020-09-02 Tom Tromey <tromey@adacore.com>
58
59 * ada-varobj.c (ada_varobj_get_ptr_number_of_children): Return 0
60 for null pointers.
61 (ada_varobj_adjust_for_child_access): Special-case null pointers.
62
63 2020-09-01 Simon Marchi <simon.marchi@polymtl.ca>
64
65 * bcache.h (struct bcache) <insert>: Change type of `added` to
66 pointer to bool.
67 * bcache.c (bcache::insert): Likewise.
68 * gdbtypes.c (check_types_worklist): Adjust.
69 * psymtab.c (add_psymbol_to_bcache): Adjust.
70
71 2020-08-31 Kevin Buettner <kevinb@redhat.com>
72
73 * corelow.c (unordered_set): Include.
74 (class core_target): Add field 'm_core_unavailable_mappings'.
75 (core_target::build_file_mappings): Print only one warning
76 per inaccessible file. Add unavailable/broken mappings
77 to m_core_unavailable_mappings.
78 (core_target::xfer_partial): Call...
79 (core_target::xfer_memory_via_mappings): New method.
80
81 2020-08-31 Simon Marchi <simon.marchi@polymtl.ca>
82
83 * dwarf2/read.c (struct field_info) <non_public_fields>: Change
84 type to bool.
85
86 2020-08-31 Simon Marchi <simon.marchi@polymtl.ca>
87
88 * dwarf2/read.c (struct field_info): Fix indentation.
89
90 2020-08-31 Simon Marchi <simon.marchi@efficios.com>
91
92 * frame-unwind.h (frame_prev_register_ftype): Fix adjective
93 ordering in comment.
94 * frame.c (frame_id_eq): Fix indentation.
95
96 2020-08-31 Scott Linder <scott@scottlinder.com>
97 Simon Marchi <simon.marchi@efficios.com>
98
99 * inline-frame.c (inline_frame_this_id): Remove assert that prevents
100 inline frame ids in outer frame.
101
102 2020-08-31 Simon Marchi <simon.marchi@efficios.com>
103
104 * frame.h (enum frame_id_stack_status) <FID_STACK_OUTER>: New.
105 * frame.c (fprint_frame_id): Handle FID_STACK_OUTER.
106 (outer_frame_id): Use FID_STACK_OUTER instead of
107 FID_STACK_INVALID.
108 (frame_id_p): Don't check for outer_frame_id.
109
110 2020-08-31 Simon Marchi <simon.marchi@efficios.com>
111
112 * frame-unwind.c (frame_unwind_got_optimized): Don't set
113 regnum/frame in value. Call allocate_value_lazy.
114 * frame.c (frame_unwind_register_value): Use
115 val_print_not_saved.
116
117 2020-08-31 Simon Marchi <simon.marchi@efficios.com>
118
119 * gdbtypes.h (NULL_TYPE): Remove, change all uses to nullptr.
120
121 2020-08-29 Pedro Alves <pedro@palves.net>
122
123 * progspace.c (print_program_space): Use all_inferiors. Switch to
124 the inferior before calling target_pid_to_str.
125
126 2020-08-28 Tom Tromey <tom@tromey.com>
127
128 * xcoffread.c (xcoff_end_psymtab): Update comment.
129 * dbxread.c (dbx_end_psymtab): Update comment.
130
131 2020-08-28 Tom de Vries <tdevries@suse.de>
132
133 PR breakpoint/26544
134 * breakpoint.c (parse_breakpoint_sals): Remove const from struct
135 event_location.
136 (create_breakpoint): Same.
137 (base_breakpoint_decode_location): Same.
138 (bkpt_create_sals_from_location): Same.
139 (bkpt_decode_location): Same.
140 (bkpt_probe_create_sals_from_location): Same.
141 (bkpt_probe_decode_location): Same.
142 (tracepoint_create_sals_from_location): Same.
143 (tracepoint_decode_location): Same.
144 (tracepoint_probe_decode_location): Same.
145 (strace_marker_create_sals_from_location): Same.
146 (strace_marker_decode_location): Same.
147 (create_sals_from_location_default): Same.
148 (decode_location_default): Same.
149 * breakpoint.h (struct breakpoint_ops): Same.
150 (create_breakpoint): Same.
151 * linespec.h (decode_line_full): Same.
152 * linespec.c (decode_line_full): Same. Throw error if
153 result.size () == 0.
154
155 2020-08-27 Pedro Alves <pedro@palves.net>
156
157 PR gdb/26524
158 * breakpoint.c (until_break_fsm) <location_breakpoint,
159 caller_breakpoint>: Delete fields.
160 <breakpoints>: New field.
161 <until_break_fsm>: Adjust to save a breakpoint vector instead of
162 two individual breakpoints.
163 (until_break_fsm::should_stop): Loop over breakpoints in the
164 breakpoint vector.
165 (until_break_fsm::clean_up): Adjust to clear the breakpoints
166 vector.
167 (until_break_command): Handle location expanding into multiple
168 sals.
169
170 2020-08-27 Pedro Alves <pedro@palves.net>
171
172 PR gdb/26523
173 * inline-frame.c (stopped_by_user_bp_inline_frame): Also consider
174 bp_until breakpoints user-specified locations. Update intro
175 comment.
176
177 2020-08-27 Simon Marchi <simon.marchi@polymtl.ca>
178
179 * gdb_bfd.h (gdb_bfd_section_iterator, gdb_bfd_section_range,
180 gdb_bfd_sections): New.
181 * maint.c (print_bfd_section_info): Change param type to
182 maint_print_section_data.
183 (print_objfile_section_info): Likewise.
184 (print_bfd_section_info_maybe_relocated): Likewise.
185 (maintenance_info_sections): Use gdb_bfd_sections.
186
187 2020-08-25 Shahab Vahedi <shahab@synopsys.com>
188
189 * MAINTAINERS: Add ARC target and maintainer.
190
191 2020-08-25 Anton Kolesov <anton.kolesov@synopsys.com>
192
193 * configure.tgt: ARC support for GNU/Linux.
194 * Makefile.in (ALL_TARGET_OBJS): Likewise.
195 * arc-linux-tdep.c: New file.
196 * arc-tdep.h (ARC_STATUS32_L_MASK, ARC_STATUS32_DE_MASK): Declare.
197 * arc-tdep.c (arc_write_pc): Use it.
198
199 2020-08-25 Shahab Vahedi <shahab@synopsys.com>
200
201 * arc-tdep.c (arc_check_for_hardware_loop): New.
202 * arc-tdep.h (gdbarch_tdep): New field has_hw_loops.
203
204 2020-08-25 Shahab Vahedi <shahab@synopsys.com>
205
206 * arc-tdep.h: Include "gdbarch.h".
207
208 2020-08-25 Shahab Vahedi <shahab@synopsys.com>
209
210 * arch/arc.h
211 (arc_gdbarch_features): New class to stir the selection of target XML.
212 (arc_create_target_description): Use FEATURES to choose XML target.
213 (arc_lookup_target_description): Use arc_create_target_description
214 to create _new_ target descriptions or return the already created
215 ones if the FEATURES is the same.
216 * arch/arc.c: Implementation of prototypes described above.
217 * gdb/arc-tdep.h (arc_regnum enum): Add more registers.
218 (arc_gdbarch_features_init): Initialize the FEATURES struct.
219 * arc-tdep.c (*_feature_name): Make feature names consistent.
220 (arc_register_feature): A new struct to hold information about
221 registers of a particular target/feature.
222 (arc_check_tdesc_feature): Check if XML provides registers in
223 compliance with ARC_REGISTER_FEATURE structs.
224 (arc_update_acc_reg_names): Add aliases for r58 and r59.
225 (determine_*_reg_feature_set): Which feature name to look for.
226 (arc_gdbarch_features_init): Given MACH and ABFD, initialize FEATURES.
227 (mach_type_to_arc_isa): Convert from a set of binutils machine types
228 to expected ISA enums to be used in arc_gdbarch_features structs.
229 * features/Makefile (FEATURE_XMLFILES): Add new files.
230 * gdb/features/arc/v1-aux.c: New file.
231 * gdb/features/arc/v1-aux.xml: Likewise.
232 * gdb/features/arc/v1-core.c: Likewise.
233 * gdb/features/arc/v1-core.xml: Likewise.
234 * gdb/features/arc/v2-aux.c: Likewise.
235 * gdb/features/arc/v2-aux.xml: Likewise.
236 * gdb/features/arc/v2-core.c: Likewise.
237 * gdb/features/arc/v2-core.xml: Likewise.
238 * NEWS (Changes since GDB 9): Announce obsolence of old feature names.
239
240 2020-08-25 Gaius Mulley <gaiusmod2@gmail.com>
241 Andrew Burgess <andrew.burgess@embecosm.com>
242
243 PR m2/26372
244 * m2-exp.y (exp): Improve comment for non_empty_arglist case, add
245 an assert. Remove single element array indexing pattern as the
246 MULTI_SUBSCRIPT support will handle this case too.
247
248 2020-08-24 Simon Marchi <simon.marchi@polymtl.ca>
249
250 * value.h (valprint_check_validity): Move declaration from
251 here...
252 * valprint.h (valprint_check_validity): ... to here.
253
254 2020-08-24 Simon Marchi <simon.marchi@efficios.com>
255
256 * debug.h: New file.
257 * debug.c (debug_prefixed_vprintf): New function.
258 * infrun.c (infrun_debug_printf_1): Use debug_prefixed_vprintf.
259 * linux-nat.c (linux_nat_debug_printf_1): Likewise.
260
261 2020-08-24 Simon Marchi <simon.marchi@efficios.com>
262
263 * infrun.h (infrun_debug_printf_1): New function declaration.
264 (infrun_debug_printf): New macro.
265 * infrun.c (infrun_debug_printf_1): Use infrun_debug_printf
266 throughout.
267 (infrun_debug_printf): New function.
268 * breakpoint.c (should_be_inserted): Use infrun_debug_printf.
269 (handle_jit_event): Likewise.
270
271 2020-08-21 Mark Wielaard <mark@klomp.org>
272
273 * ada-lex.l: Extend register warnings diagnostics comment for g++.
274
275 2020-08-22 Simon Marchi <simon.marchi@efficios.com>
276
277 * frame.c (enum class frame_id_status): New.
278 (struct frame_info) <this_id::p>: Change type to frame_id_status.
279 (fprintf_frame): Update.
280 (compute_frame_id): Set frame id status to "computing" on entry.
281 Set it back to "not_computed" on failure and to "computed" on
282 success.
283 (get_frame_id): Assert the frame id is not being computed.
284 (create_sentinel_frame): Use frame_id_status::COMPUTED.
285 (create_new_frame): Likewise.
286 (frame_cleanup_after_sniffer): Update assert.
287
288 2020-08-20 Simon Marchi <simon.marchi@polymtl.ca>
289
290 * regcache.c (pid_ptid_regcache_map): New type.
291 (target_ptid_regcache_map): Remove.
292 (target_pid_ptid_regcache_map): New type.
293 (regcaches): Change type to target_pid_ptid_regcache_map.
294 (get_thread_arch_aspace_regcache): Update.
295 (regcache_thread_ptid_changed): Update, handle pid-like ptid
296 case.
297 (regcaches_size): Update.
298 (regcache_count): Update.
299 (registers_changed_ptid_target_pid_test): New.
300 (_initialize_regcache): Register new test.
301
302 2020-08-20 Simon Marchi <simon.marchi@polymtl.ca>
303
304 * regcache.c (regcache_count): New.
305 (struct regcache_test_data): New.
306 (regcache_test_data_up): New.
307 (populate_regcaches_for_test): New.
308 (regcaches_test): Remove.
309 (get_thread_arch_aspace_regcache_test): New.
310 (registers_changed_ptid_all_test): New.
311 (registers_changed_ptid_target_test): New.
312 (registers_changed_ptid_target_ptid_test): New.
313 (regcache_thread_ptid_changed): Remove regcache_count lambda.
314 (_initialize_regcache): Register new tests.
315
316 2020-08-20 Simon Marchi <simon.marchi@polymtl.ca>
317
318 * regcache.c (test_get_thread_arch_aspace_regcache): Rename to...
319 (get_thread_arch_aspace_regcache_and_check): ... this. Remove
320 gdbarch and aspace parameter. Use current inferior's aspace.
321 Validate regcache's arch value.
322 (regcaches_test): Update.
323
324 2020-08-20 Simon Marchi <simon.marchi@polymtl.ca>
325
326 * regcache.c (regcaches_test): Call registers_changed.
327
328 2020-08-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
329
330 * infrun.c (process_event_stop_test): Fix typo "breapoint".
331
332 2020-08-19 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
333
334 * amd64-tdep.c (amd64_skip_prologue): Using symbol table
335 to find the end of prologue for flang compiled binaries.
336 * arm-tdep.c (arm_skip_prologue): Likewise.
337 * i386-tdep.c (i386_skip_prologue): Likewise.
338 * producer.c (producer_is_llvm): New function.
339 (producer_parsing_tests): Added new tests for clang/flang.
340 * producer.h (producer_is_llvm): New declaration.
341
342 2020-08-18 Simon Marchi <simon.marchi@efficios.com>
343
344 * linux-nat.c (linux_nat_debug_printf): New function.
345 (linux_nat_debug_printf_1): New macro. Use throughout the file.
346
347 2020-08-18 Aaron Merey <amerey@redhat.com>
348
349 * Makefile.in (DEBUGINFOD_CFLAGS, DEBUGINFOD_LIBS): New variables.
350 (INTERNAL_CFLAGS_BASE): Add DEBUGINFOD_CFLAGS.
351 (CLIBS): Add DEBUGINFOD_LIBS.
352
353 2020-08-17 Sergei Trofimovich <siarheit@google.com>
354
355 * ia64-linux-nat.c: Include "gdbarch.h" to declare used
356 'gdbarch_num_regs'.
357
358 2020-08-17 Tom Tromey <tromey@adacore.com>
359
360 * ada-varobj.c (ada_varobj_decode_var): Handle case where
361 ada_get_decoded_value returns NULL.
362
363 2020-08-17 Tom Tromey <tromey@adacore.com>
364
365 * python/py-inferior.c (infpy_search_memory): Use
366 gdb_py_object_from_ulongest.
367 * python/py-infevents.c (create_inferior_call_event_object)
368 (create_memory_changed_event_object): Use
369 gdb_py_object_from_ulongest.
370 * python/py-linetable.c (ltpy_entry_get_pc): Use
371 gdb_py_object_from_ulongest.
372
373 2020-08-17 Simon Marchi <simon.marchi@polymtl.ca>
374
375 * loc.c (class symbol_needs_eval_context): Fix indentation.
376
377 2020-08-17 Simon Marchi <simon.marchi@polymtl.ca>
378
379 * dwarf2/loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
380 bool.
381
382 2020-08-17 Tom de Vries <tdevries@suse.de>
383
384 PR gdb/26393
385 * gdbtypes.c (dump_dynamic_prop): New function.
386 (recursive_dump_type): Use dump_dynamic_prop for TYPE_CODE_RANGE.
387
388 2020-08-15 Tom de Vries <tdevries@suse.de>
389
390 PR backtrace/26390
391 * stack.c (print_frame_args): Temporarily set the selected
392 frame to FRAME while printing the frame's arguments.
393
394 2020-08-14 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
395
396 PR breakpoints/26385
397 * ppc-linux-nat.c (ppc_linux_nat_target::low_prepare_to_resume):
398 Always clear watchpoint with PTRACE_SET_DEBUGREG.
399
400 2020-08-14 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
401
402 * ppc-linux-nat.c (ppc_linux_dreg_interface::detect)
403 (ppc_linux_nat_target::low_prepare_to_resume): Use ptrace () < 0
404 and >= to check return value instead of == -1 and != -1.
405
406 2020-08-14 Simon Marchi <simon.marchi@polymtl.ca>
407
408 * utils.h (class gdb_argv) <as_array_view>: New method.
409 * utils.c (gdb_argv_as_array_view_test): New.
410 (_initialize_utils): Register selftest.
411 * maint.c (maintenance_selftest): Use the new method.
412
413 2020-08-13 Kamil Rytarowski <n54@gmx.com>
414
415 * target.h (supports_dumpcore, dumpcore): New
416 function declarations.
417 * target.c (supports_dumpcore, dumpcore): New
418 functions.
419 * target-delegates.c: Rebuild.
420 * gcore.c (gcore_command): Use target_supports_dumpcore ()
421 and target_dumpcore ().
422
423 2020-08-13 Aaron Merey <amerey@redhat.com>
424
425 * debuginfod-support.c: Replace global variables with user_data.
426
427 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
428
429 * maint.c (maintenance_selftest): Split args and pass array_view
430 to run_tests.
431
432 2020-08-12 Luis Machado <luis.machado@linaro.org>
433
434 * value.c (check_type_length_before_alloc): Use ULONGEST to store a
435 type's length.
436 Use %s and pulongest to print the length.
437
438 2020-08-12 Pedro Alves <palves@redhat.com>
439
440 * NEWS: Move "Multi-target debugging support" item to the
441 "Changes since GDB 9" section.
442
443 2020-08-12 Pedro Alves <palves@redhat.com>
444
445 PR gdb/26336
446 * progspace.c (program_space::remove_objfile): Invalidate the
447 frame cache.
448
449 2020-08-11 Tom de Vries <tdevries@suse.de>
450
451 * MAINTAINERS: Mark ms1 as deleted.
452
453 2020-08-10 Luis Machado <luis.machado@linaro.org>
454
455 PR gdb/26310
456
457 * aarch64-tdep.c (aarch64_analyze_prologue): Track use of SP/FP and
458 act accordingly.
459 (aarch64_analyze_prologue_test): Add more unit tests to exercise
460 movz/str/stur/stp skipping behavior.
461
462 2020-08-10 Luis Machado <luis.machado@linaro.org>
463
464 * nat/aarch64-sve-linux-sigcontext.h (SVE_PT_REGS_OFFSET): Use
465 struct user_sve_header instead of struct sve_context.
466
467 2020-08-09 Simon Marchi <simon.marchi@polymtl.ca>
468
469 * read.h (dwarf2_fetch_die_loc_sect_off,
470 dwarf2_fetch_die_loc_cu_off): Replace function pointer +
471 `void *` parameter with function_view.
472 * read.c (dwarf2_fetch_die_loc_sect_off,
473 dwarf2_fetch_die_loc_cu_off): Likewise.
474 * loc.c (get_frame_pc_for_per_cu_dwarf_call): Remove.
475 (per_cu_dwarf_call): Adjust.
476 (get_frame_address_in_block_wrapper): Remove.
477 (indirect_synthetic_pointer): Adjust.
478 (get_ax_pc): Remove.
479 (dwarf2_compile_expr_to_ax): Adjust.
480
481 2020-08-08 Tom de Vries <tdevries@suse.de>
482
483 PR build/26344
484 * arch/riscv.c (riscv_lookup_target_description): Use an explicit
485 constructor.
486 * regcache.c (get_thread_arch_aspace_regcache): Same.
487
488 2020-08-07 Tom Tromey <tromey@adacore.com>
489
490 * ravenscar-thread.c
491 (ravenscar_thread_target::set_base_thread_from_ravenscar_task):
492 New method.
493 (ravenscar_thread_target::wait): Check
494 runtime_initialized.
495 (ravenscar_thread_target::prepare_to_store)
496 (ravenscar_thread_target::stopped_by_sw_breakpoint)
497 (ravenscar_thread_target::stopped_by_hw_breakpoint)
498 (ravenscar_thread_target::stopped_by_watchpoint)
499 (ravenscar_thread_target::stopped_data_address)
500 (ravenscar_thread_target::core_of_thread): Use
501 scoped_restore_current_thread and
502 set_base_thread_from_ravenscar_task.
503
504 2020-08-07 Tom Tromey <tromey@adacore.com>
505
506 * ravenscar-thread.c (update_thread_list): Set inferior_ptid.
507
508 2020-08-07 Tom Tromey <tromey@adacore.com>
509
510 * ravenscar-thread.c (ravenscar_thread_target::wait): Call
511 update_inferior_ptid before update_thread_list.
512 (temporarily_change_regcache_ptid): New class.
513 (ravenscar_thread_target::fetch_registers)
514 (ravenscar_thread_target::store_registers)
515 (ravenscar_thread_target::prepare_to_store): Use base thread when
516 forwarding operation.
517
518 2020-08-07 Tom Tromey <tromey@adacore.com>
519
520 * ravenscar-thread.c (ravenscar_thread_target::resume): Handle
521 "is_pid" case.
522
523 2020-08-07 Tom Tromey <tromey@adacore.com>
524
525 * ravenscar-thread.c (xfer_partial, enable_btrace, add_thread):
526 New methods.
527 (ravenscar_thread_target::get_thread_base_cpu): Check m_cpu_map
528 first.
529 (ravenscar_thread_target::add_thread): Rename from
530 ravenscar_add_thread.
531 (ravenscar_thread_target::update_thread_list): Use a lambda.
532 (ravenscar_thread_target::xfer_partial): New method.
533
534 2020-08-07 Tom Tromey <tromey@adacore.com>
535
536 * ada-lang.h (ada_task_list_iterator_ftype): Now a
537 gdb::function_view.
538 (iterate_over_live_ada_tasks): Change type of argument.
539 * ada-tasks.c (iterate_over_live_ada_tasks): Change type
540 of argument.
541
542 2020-08-07 Tom Tromey <tromey@adacore.com>
543
544 * ravenscar-thread.c (ravenscar_thread_target) <extra_thread_info>:
545 Remove.
546 (ravenscar_thread_target::extra_thread_info): Remove.
547 (ravenscar_thread_target::pid_to_str): Mention Ravenscar in result;
548 defer to target beneath for non-Ravenscar threads.
549
550 2020-08-07 Tom Tromey <tromey@adacore.com>
551
552 * ravenscar-thread.c (ravenscar_thread_target) <get_base_cpu,
553 get_base_thread_from_ravenscar_task>: Now methods.
554 <m_cpu_map>: New member.
555 (ravenscar_thread_target::get_thread_base_cpu): Rename from
556 ravenscar_get_thread_base_cpu. Check m_cpu_map.
557 (ravenscar_thread_target::task_is_currently_active): Update.
558 (ravenscar_thread_target::get_base_thread_from_ravenscar_task):
559 Now a method.
560 (ravenscar_thread_target::add_active_thread): Put initial thread
561 into the m_cpu_map.
562
563 2020-08-07 Tom Tromey <tromey@adacore.com>
564
565 * ravenscar-thread.c (ravenscar_thread_target::wait): Return
566 event_ptid.
567
568 2020-08-07 Tom Tromey <tromey@adacore.com>
569
570 * ravenscar-thread.c (ravenscar_thread_target::wait): Check
571 runtime_initialized.
572
573 2020-08-07 Tom Tromey <tromey@adacore.com>
574
575 * ravenscar-thread.c (ravenscar_thread_target): Don't call
576 add_active_thread.
577 (ravenscar_thread_target::add_active_thread): Now public.
578 (ravenscar_inferior_created): Call add_active_thread after pushing
579 the target.
580
581 2020-08-07 Simon Marchi <simon.marchi@polymtl.ca>
582
583 * regcache.c (ptid_regcache_map): New type.
584 (target_ptid_regcache_map): New type.
585 (regcaches): Change type to target_ptid_regcache_map.
586 (get_thread_arch_aspace_regcache): Update to regcaches' new
587 type.
588 (regcache_thread_ptid_changed): Likewise.
589 (registers_changed_ptid): Likewise.
590 (regcaches_size): Likewise.
591 (regcaches_test): Update.
592 (regcache_thread_ptid_changed): Update.
593 * regcache.h (regcache_up): New type.
594 * gdbsupport/ptid.h (hash_ptid): New struct.
595
596 2020-08-07 Simon Marchi <simon.marchi@efficios.com>
597
598 * observable.h (thread_ptid_changed): Add parameter
599 `process_stratum_target *`.
600 * infrun.c (infrun_thread_ptid_changed): Add parameter
601 `process_stratum_target *` and use it.
602 (selftests): New namespace.
603 (infrun_thread_ptid_changed): New function.
604 (_initialize_infrun): Register selftest.
605 * regcache.c (regcache_thread_ptid_changed): Add parameter
606 `process_stratum_target *` and use it.
607 (regcache_thread_ptid_changed): New function.
608 (_initialize_regcache): Register selftest.
609 * thread.c (thread_change_ptid): Pass target to
610 thread_ptid_changed observable.
611
612 2020-08-06 Caroline Tice <cmtice@google.com>
613
614 * dwarf2/read.c (struct dwo_file): Update comment on 'sections' field.
615 (struct dwp_sections): Update field comments. Add loclists and
616 rnglists fields.
617 (struct virtual_v2_dwo_sections): Rename struct to
618 'virtual_v2_or_v5_dwo_sections'; update comments at top of struct; add
619 size & offset fields for loclists and rnglists.
620 (struct dwp_hash_table): Add a 'v5' struct field to the union section.
621 (create_debug_type_hash_table): Add 'DW_UT_split_type' to the check for
622 skipping dummy type units.
623 (create_dwp_hash_table): Update the large comment above the function to
624 discuss Version 5 DWP files as well, with references. Update all the
625 version checks in the function to check for version 5 as well. Add new
626 section at the end to create dwp hash table for version 5.
627 (create_dwp_v2_section): Rename function to
628 'create_dwp_v2_or_v5_section'. Update function comment appropriately.
629 Add V5 to error message text.
630 (create_dwo_unit_in_dwp_v2): Change calls to create_dwp_v2_section
631 into calls to create_dwp_v2_or_v5_section.
632 (create_dwo_unit_in_dwp_v5): New function.
633 (lookup_dwo_unit_in_dwp): Update conditional statement to explicitly
634 check for version2; add else clause to handle version 5.
635 (open_and_init_dwo_file): Add code to check dwarf version & only call
636 create_debug_types_hash_table (with sections.types) if version is not 5;
637 else call create_debug_type_hash_table, with sections.info.
638 (dwarf2_locate_v2_dwp_sections): Update function comment to mention
639 version 5.
640 (dwarf2_locate_v5_dwp_sections): New function.
641 (open_and_init_dwp_file): Add else-if clause for version 5 to call
642 bfd_map_over_sections with dwarf2_locate_v5_dwp_sections.
643
644 2020-08-06 Simon Marchi <simon.marchi@efficios.com>
645
646 * regcache.h (class regcache): Remove friend
647 registers_changed_ptid.
648 <regcache_thread_ptid_changed>: Remove.
649 <regcaches>: Remove.
650 * regcache.c (regcache::regcaches): Rename to...
651 (regcaches): ... this. Make static.
652 (get_thread_arch_aspace_regcache): Update.
653 (regcache::regcache_thread_ptid_changed): Rename to...
654 (regcache_thread_ptid_changed): ... this. Update.
655 (class regcache_access): Remove.
656 (regcaches_test): Update.
657 (_initialize_regcache): Update.
658 * sparc64-tdep.c, dwarf2/index-write.c, record-btrace.c: Include
659 <forward_list>.
660
661 2020-08-06 Simon Marchi <simon.marchi@efficios.com>
662
663 * regcache.h (class regcache) <current_regcache>: Rename to...
664 <regcaches>: ... this. Move doc here.
665 * regcache.c (regcache::current_regcache) Rename to...
666 (regcache::regcaches): ... this. Move doc to header.
667 (get_thread_arch_aspace_regcache): Update.
668 (regcache::regcache_thread_ptid_changed): Update.
669 (registers_changed_ptid): Update.
670 (class regcache_access) <current_regcache_size>: Rename to...
671 <regcaches_size>: ... this.
672 (current_regcache_test): Rename to...
673 (regcaches_test): ... this.
674 (_initialize_regcache): Update.
675
676 2020-08-06 Victor Collod <vcollod@nvidia.com>
677
678 * amd64-tdep.c (amd64_analyze_prologue): Fix incorrect comment.
679
680 2020-08-05 Kevin Buettner <kevinb@redhat.com>
681
682 * corelow.c (core_target::build_file_mappings): Don't output
683 null pathname in warning.
684
685 2020-08-05 Simon Marchi <simon.marchi@polymtl.ca>
686
687 * gdb.dwarf2/clztest.exp, gdb.dwarf2/dw2-common-block.exp,
688 gdb.dwarf2/dw2-dup-frame.exp, gdb.dwarf2/dw2-reg-undefined.exp,
689 gdb.dwarf2/dw2-single-line-discriminators.exp,
690 dw2-undefined-ret-addr.exp: Pass nopie to compilation options.
691
692 2020-08-05 Tom Tromey <tromey@adacore.com>
693
694 PR rust/26197:
695 * dwarf2/read.c (alloc_rust_variant): Handle univariant case.
696 (quirk_rust_enum): Call alloc_rust_variant for univariant case.
697 Fix off-by-one and type size errors in ordinary case.
698
699 2020-08-05 Tom de Vries <tdevries@suse.de>
700
701 * gdbtypes.c (type_not_allocated, type_not_associated): Use
702 "prop->const_val () == 0" instead of "prop->const_val () != 0".
703
704 2020-08-04 Simon Marchi <simon.marchi@efficios.com>
705
706 * frame.h (frame_id_p): Return bool.
707 (frame_id_artificial_p): Return bool.
708 (frame_id_eq): Return bool.
709 (has_stack_frames): Return bool.
710 (get_selected_frame): Fix typo in comment.
711 (get_frame_pc_if_available): Return bool.
712 (get_frame_address_in_block_if_available): Return bool.
713 (get_frame_func_if_available): Return bool.
714 (read_frame_register_unsigned): Return bool.
715 (get_frame_register_bytes): Return bool.
716 (safe_frame_unwind_memory): Return bool.
717 (deprecated_frame_register_read): Return bool.
718 (frame_unwinder_is): Return bool.
719 * frame.c (struct frame_info) <prev_arch::p>: Change type to
720 bool.
721 <this_id::p>: Likewise.
722 <prev_p>: Likewise.
723 (frame_stash_add): Return bool.
724 (get_frame_id): Use bool.
725 (frame_id_build_special) Use bool.
726 (frame_id_build_unavailable_stack): Use bool.
727 (frame_id_build): Use bool.
728 (frame_id_p): Return bool, use true/false instead of 1/0.
729 (frame_id_artificial_p): Likewise.
730 (frame_id_eq): Likewise.
731 (frame_id_inner): Likewise.
732 (get_frame_func_if_available): Likewise.
733 (read_frame_register_unsigned): Likewise.
734 (deprecated_frame_register_read): Likewise.
735 (get_frame_register_bytes): Likewise.
736 (has_stack_frames): Likewise.
737 (inside_main_func): Likewise.
738 (inside_entry_func): Likewise.
739 (get_frame_pc_if_available): Likewise.
740 (get_frame_address_in_block_if_available): Likewise.
741 (frame_unwinder_is): Likewise.
742 (safe_frame_unwind_memory): Likewise.
743 (frame_unwind_arch): Likewise.
744
745 2020-08-04 Simon Marchi <simon.marchi@efficios.com>
746
747 * frame.c (frame_info) <prev_func> <p>: Rename to status, change
748 type to cached_copy_status.
749 (fprintf_frame): Adjust.
750 (get_frame_func_if_available): Adjust.
751 (frame_cleanup_after_sniffer): Adjust.
752
753 2020-08-04 Mark Wielaard <mark@klomp.org>
754
755 * MAINTAINERS (Write After Approval): Update email address.
756
757 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
758
759 * gdbtypes.h (TYPE_DYN_PROP_ADDR): Remove, replace uses with
760 dynamic_prop::const_val.
761
762 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
763
764 * gdbtypes.h (TYPE_DYN_PROP_KIND): Remove, replace uses with
765 dynamic_prop::kind.
766
767 2020-08-04 Simon Marchi <simon.marchi@polymtl.ca>
768
769 * gdbtypes.h (TYPE_DYN_PROP_BATON): Remove.
770
771 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com>
772
773 * configure.tgt: Set gdb_sim for bpf-*-* targets.
774
775 2020-08-04 Weimin Pan <weimin.pan@oracle.com>
776 Jose E. Marchesi <jose.marchesi@oracle.com>
777
778 * configure.tgt: Add entry for bpf-*-*.
779 * Makefile.in (ALL_TARGET_OBS): Add bpf-tdep.o
780 (ALLDEPFILES): Add bpf-tdep.c.
781 * bpf-tdep.c: New file.
782 * MAINTAINERS: Add bpf target and maintainer.
783 * NEWS: Mention the support for the new target.
784
785 2020-08-04 Tom de Vries <tdevries@suse.de>
786
787 PR symtab/23270
788 * dwarf2/read.c (find_partial_die): Change internal error into Dwarf
789 Error.
790
791 2020-08-03 John Baldwin <jhb@FreeBSD.org>
792
793 * syscalls/freebsd.xml: Regenerate.
794
795 2020-08-03 John Baldwin <jhb@FreeBSD.org>
796
797 * syscalls/update-freebsd.sh: Fix usage and year range.
798
799 2020-08-03 Tom de Vries <tdevries@suse.de>
800
801 PR symtab/26333
802 * dwarf2/read.c (dwarf_decode_lines_1): Ignore
803 DW_LNE_lo_user/DW_LNE_hi_user range.
804
805 2020-07-30 Simon Marchi <simon.marchi@polymtl.ca>
806
807 PR ada/26318
808 * ada-lang.c (ada_modulus): Return 0 if property is not of const
809 kind.
810
811 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
812
813 * breakpoint.c (set_breakpoint_condition): Do minor refactoring.
814
815 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
816
817 * breakpoint.c (set_breakpoint_condition): Update the condition
818 expressions after checking that the input condition string parses
819 successfully and does not contain junk at the end.
820
821 2020-07-30 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
822
823 * breakpoint.c (set_breakpoint_condition): Update the
824 condition string after parsing the new condition successfully.
825
826 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
827
828 * proc-api.c (_STRUCTURED_PROC): Don't define.
829 * proc-events.c: Likewise.
830 * proc-flags.c: Likewise.
831 * proc-why.c: Likewise.
832 * procfs.c: Likewise.
833
834 * Makefile.in (INTERNAL_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
835 * configure, config.in: Regenerate.
836
837 2020-07-30 Tom de Vries <tdevries@suse.de>
838
839 PR build/26320
840 * ui-style.h (struct ui_file_style::color): Wrap m_value and
841 m_red/m_green/m_blue in a union.
842
843 2020-07-29 Tom de Vries <tdevries@suse.de>
844
845 PR tdep/26280
846 * s390-tdep.c (s390_displaced_step_fixup): Fix Wmaybe-uninitialized.
847
848 2020-07-28 Tom Tromey <tromey@adacore.com>
849
850 PR symtab/26270:
851 * symtab.h (find_pc_partial_function_sym): Declare.
852 * cli/cli-cmds.c (disassemble_command): Use
853 find_pc_partial_function_sym. Check asm_demangle.
854 * blockframe.c (cache_pc_function_sym): New global.
855 (cache_pc_function_name): Remove.
856 (clear_pc_function_cache): Update.
857 (find_pc_partial_function_sym): New function, from
858 find_pc_partial_function.
859 (find_pc_partial_function): Rewrite using
860 find_pc_partial_function_sym.
861
862 2020-07-28 Tom Tromey <tromey@adacore.com>
863
864 * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble"
865 help. Add usage.
866
867 2020-07-28 Tom Tromey <tromey@adacore.com>
868
869 * dwarf2/expr.c (dwarf_expr_context::execute_stack_op)
870 <DW_OP_GNU_variable_value>: Cast to address type.
871
872 2020-07-28 Kamil Rytarowski <n54@gmx.com>
873
874 * nbsd-nat.h (nbsd_nat_target::xfer_partial): New declaration.
875 * nbsd-nat.c (nbsd_nat_target::xfer_partial): New function.
876 * nbsd-tdep.c (nbsd_gdbarch_data_handle, struct nbsd_gdbarch_data)
877 (init_nbsd_gdbarch_data, get_nbsd_gdbarch_data)
878 (nbsd_get_siginfo_type): New.
879 (nbsd_init_abi): Install gdbarch "get_siginfo_type" method.
880 (_initialize_nbsd_tdep): New.
881
882 2020-07-28 H.J. Lu <hongjiu.lu@intel.com>
883
884 PR binutils/26301
885 * configure: Regenerated.
886
887 2020-07-28 H.J. Lu <hongjiu.lu@intel.com>
888
889 PR binutils/26301
890 * configure: Regenerated.
891
892 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
893
894 * python/py-frame.c: Remove 'user-regs.h' include.
895 (frapy_read_register): Rewrite to make use of
896 gdbpy_parse_register_id.
897 * python/py-registers.c (gdbpy_parse_register_id): New function,
898 moved here from python/py-unwind.c. Updated the return type, and
899 also accepts register descriptor objects.
900 * python/py-unwind.c: Remove 'user-regs.h' include.
901 (pyuw_parse_register_id): Moved to python/py-registers.c.
902 (unwind_infopy_add_saved_register): Update to use
903 gdbpy_parse_register_id.
904 (pending_framepy_read_register): Likewise.
905 * python/python-internal.h (gdbpy_parse_register_id): Declare.
906
907 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com>
908
909 * python/py-registers.c: Add 'user-regs.h' include.
910 (register_descriptor_iter_find): New function.
911 (register_descriptor_iterator_object_methods): New static global
912 methods array.
913 (register_descriptor_iterator_object_type): Add pointer to methods
914 array.
915
916 2020-07-27 John Baldwin <jhb@FreeBSD.org>
917
918 * fbsd-nat.h: Include <osreldate.h>. Define USE_SIGTRAP_SIGINFO
919 for all architectures on FreeBSD 11.3 and later.
920
921 2020-07-27 Tom Tromey <tromey@adacore.com>
922
923 * gcore.h (load_corefile): Don't declare.
924
925 2020-07-27 Tom de Vries <tdevries@suse.de>
926
927 * configure.ac: Fix sys/sockets.h -> sys/socket.h typo.
928 * config.in: Regenerate.
929 * configure: Regenerate.
930
931 2020-07-26 Eli Zaretskii <eliz@gnu.org>
932
933 * configure.ac (AC_CHECK_HEADERS): Check for sys/socket.h and
934 ws2tcpip.h. When checking whether socklen_t type is defined, use
935 ws2tcpip.h if it is available and sys/socket.h isn't.
936 * configure: Regenerate.
937 * config.in: Regenerate.
938
939 2020-07-25 Andrew Burgess <andrew.burgess@embecosm.com>
940
941 PR fortran/23051
942 PR fortran/26139
943 * valops.c (value_ind): Pass address to
944 readjust_indirect_value_type.
945 * value.c (readjust_indirect_value_type): Make parameter
946 non-const, and add extra address parameter. Resolve original type
947 before using it.
948 * value.h (readjust_indirect_value_type): Update function
949 signature and comment.
950
951 2020-07-25 Tom de Vries <tdevries@suse.de>
952
953 PR symtab/26243
954 * dwarf2/read.c (lnp_state_machine::record_line): Ignore zero line
955 entries.
956
957 2020-07-24 Aaron Merey <amerey@redhat.com>
958
959 * Makefile.in: Replace LIBDEBUGINFOD with DEBUGINFOD_LIBS.
960 * configure: Rebuild.
961
962 2020-07-23 Kevin Buettner <kevinb@redhat.com>
963
964 PR corefiles/26294
965 * corelow.c (_initialize_corelow): Add period to help text
966 for "maintenance print core-file-backed-mappings".
967
968 2020-07-23 Pedro Alves <pedro@palves.net>
969
970 * frame-unwind.c (frame_unwind_try_unwinder): On exception, don't
971 touch THIS_CACHE/THIS_FRAME if the frame cache was cleared
972 meanwhile.
973 * frame.c (frame_cache_generation, get_frame_cache_generation):
974 New.
975 (reinit_frame_cache): Increment FRAME_CACHE_GENERATION.
976 (get_prev_frame_if_no_cycle): On exception, don't touch
977 PREV_FRAME/THIS_FRAME if the frame cache was cleared meanwhile.
978 * frame.h (get_frame_cache_generation): Declare.
979
980 2020-07-23 Tom de Vries <tdevries@suse.de>
981
982 PR tui/26282
983 * tui/tui-winsource.h (struct tui_source_windows::tui_source_windows):
984 New default constructor.
985
986 2020-07-23 Andrew Burgess <andrew.burgess@embecosm.com>
987
988 * disasm.c (do_mixed_source_and_assembly_deprecated): Don't
989 exclude non-statement entries.
990
991 2020-07-22 Kevin Buettner <kevinb@redhat.com>
992
993 * NEWS (New commands): Mention new command
994 "maintenance print core-file-backed-mappings".
995
996 2020-07-22 Kevin Buettner <kevinb@redhat.com>
997
998 * corelow.c (gdbcmd.h): Include.
999 (core_target::info_proc_mappings): New method.
1000 (get_current_core_target): New function.
1001 (maintenance_print_core_file_backed_mappings): New function.
1002 (_initialize_corelow): Add core-file-backed-mappings to
1003 "maint print" commands.
1004
1005 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1006
1007 * linux-tdep.c (dump_note_entry_p): New function.
1008 (linux_dump_mapping_p_ftype): New typedef.
1009 (linux_find_memory_regions_full): Add new parameter,
1010 should_dump_mapping_p.
1011 (linux_find_memory_regions): Adjust call to
1012 linux_find_memory_regions_full.
1013 (linux_make_mappings_core_file_notes): Use dump_note_entry_p in
1014 call to linux_find_memory_regions_full.
1015
1016 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1017
1018 * corelow.c (solist.h, unordered_map): Include.
1019 (class core_target): Add field m_core_file_mappings and
1020 method build_file_mappings.
1021 (core_target::core_target): Call build_file_mappings.
1022 (core_target::~core_target): Free memory associated with
1023 m_core_file_mappings.
1024 (core_target::build_file_mappings): New method.
1025 (core_target::xfer_partial): Use m_core_file_mappings
1026 for memory transfers.
1027 * linux-tdep.c (linux_read_core_file_mappings): New
1028 function.
1029 (linux_core_info_proc_mappings): Rewrite to use
1030 linux_read_core_file_mappings.
1031 (linux_init_abi): Register linux_read_core_file_mappings.
1032
1033 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1034
1035 * arch-utils.c (default_read_core_file_mappings): New function.
1036 * arch-utils.c (default_read_core_file_mappings): Declare.
1037 * gdbarch.sh (read_core_file_mappings): New gdbarch method.
1038 * gdbarch.h, gdbarch.c: Regenerate.
1039
1040 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1041
1042 PR corefiles/25631
1043 * corelow.c (core_target:xfer_partial): Revise
1044 TARGET_OBJECT_MEMORY case to consider non-SEC_HAS_CONTENTS
1045 case after first checking the stratum beneath the core
1046 target.
1047 (has_all_memory): Return true.
1048 * target.c (raw_memory_xfer_partial): Revise comment
1049 regarding use of has_all_memory.
1050
1051 2020-07-22 Kevin Buettner <kevinb@redhat.com>
1052
1053 * exec.h (section_table_xfer_memory): Revise declaration,
1054 replacing section name parameter with an optional callback
1055 predicate.
1056 * exec.c (section_table_xfer_memory): Likewise.
1057 * bfd-target.c, exec.c, target.c, corelow.c: Adjust all callers
1058 of section_table_xfer_memory.
1059
1060 2020-07-22 Tom Tromey <tromey@adacore.com>
1061
1062 * mi/mi-cmd-stack.c (list_args_or_locals): Use
1063 lookup_symbol_search_name.
1064
1065 2020-07-22 Andrew Burgess <andrew.burgess@embecosm.com>
1066
1067 * python/py-registers.c (gdbpy_register_object_data_init): Remove
1068 redundant local variable.
1069 (gdbpy_get_register_descriptor): Extract descriptor vector as a
1070 reference, not pointer, update code accordingly.
1071
1072 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1073 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1074
1075 * objfiles.h (struct objfile) <skip_jit_symbol_lookup>: New field.
1076 * jit.c (jit_breakpoint_re_set_internal): Use the
1077 `skip_jit_symbol_lookup` field.
1078
1079 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1080 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1081
1082 * jit.c (jit_read_descriptor): Define the descriptor address once,
1083 use twice.
1084 (jit_breakpoint_deleted): Move the declaration of the loop variable
1085 `iter` into the loop header.
1086 (jit_breakpoint_re_set_internal): Move the declaration of the local
1087 variable `objf_data` to the first point of definition.
1088 (jit_event_handler): Move the declaration of local variables
1089 `code_entry`, `entry_addr`, and `objf` to their first point of use.
1090 Rename `objf` to `jited`.
1091
1092 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1093
1094 * jit.h (struct jiter_objfile_data) <jiter_objfile_data, objfile>:
1095 Remove.
1096 * jit.c (get_jiter_objfile_data): Update.
1097
1098 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1099 Simon Marchi <simon.marchi@polymtl.ca>
1100
1101 * jit.c (struct jit_program_space_data): Remove.
1102 (jit_program_space_key): Remove.
1103 (jiter_objfile_data::~jiter_objfile_data): Remove program space
1104 stuff.
1105 (get_jit_program_space_data): Remove.
1106 (jit_breakpoint_deleted): Iterate on all of the program space's
1107 objfiles.
1108 (jit_inferior_init): Likewise.
1109 (jit_breakpoint_re_set_internal): Likewise. Also change return
1110 type to void.
1111 (jit_breakpoint_re_set): Pass current_program_space to
1112 jit_breakpoint_re_set_internal.
1113
1114 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1115
1116 * jit.h (struct jiter_objfile_data) <cached_code_address,
1117 jit_breakpoint>: Move to here from ...
1118 * jit.c (jit_program_space_data): ... here.
1119 (jiter_objfile_data::~jiter_objfile_data): Update.
1120 (jit_breakpoint_deleted): Update.
1121 (jit_breakpoint_re_set_internal): Update.
1122
1123 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1124
1125 * jit.c (jiter_objfile_data::~jiter_objfile_data): Remove some
1126 checks.
1127 (jit_read_descriptor): Remove NULL check.
1128 (jit_event_handler): Add an assertion.
1129
1130 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1131
1132 * jit.h (struct jit_objfile_data): Split into...
1133 (struct jiter_objfile_data): ... this ...
1134 (struct jited_objfile_data): ... and this.
1135 * objfiles.h (struct objfile) <jit_data>: Remove.
1136 <jiter_data, jited_data>: New fields.
1137 * jit.c (jit_objfile_data::~jit_objfile_data): Rename to ...
1138 (jiter_objfile_data::~jiter_objfile_data): ... this.
1139 (get_jit_objfile_data): Rename to ...
1140 (get_jiter_objfile_data): ... this.
1141 (add_objfile_entry): Update.
1142 (jit_read_descriptor): Use get_jiter_objfile_data.
1143 (jit_find_objf_with_entry_addr): Use objfile's jited_data field.
1144 (jit_breakpoint_re_set_internal): Use get_jiter_objfile_data.
1145 (jit_inferior_exit_hook): Use objfile's jited_data field.
1146
1147 2020-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1148
1149 * jit.h: Forward-declare `struct minimal_symbol`.
1150 (struct jit_objfile_data): Migrate to here from jit.c; also add a
1151 constructor, destructor, and an objfile* field.
1152 * jit.c (jit_objfile_data): Remove.
1153 (struct jit_objfile_data): Migrate from here to jit.h.
1154 (jit_objfile_data::~jit_objfile_data): New destructor
1155 implementation with code moved from free_objfile_data.
1156 (free_objfile_data): Delete.
1157 (get_jit_objfile_data): Update to use the jit_data field of objfile.
1158 (jit_find_objf_with_entry_addr): Ditto.
1159 (jit_inferior_exit_hook): Ditto.
1160 (_initialize_jit): Remove the call to
1161 register_objfile_data_with_cleanup.
1162 * objfiles.h (struct objfile) <jit_data>: New field.
1163
1164 2020-07-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1165
1166 * jit.h: Forward-declare `struct objfile`.
1167 (jit_event_handler): Add a second parameter, the JITer objfile.
1168 * jit.c (jit_read_descriptor): Change the signature to take the
1169 JITer objfile as an argument instead of the jit_program_space_data.
1170 (jit_inferior_init): Update the call to jit_read_descriptor.
1171 (jit_event_handler): Use the new JITer objfile argument when calling
1172 jit_read_descriptor.
1173 * breakpoint.c (handle_jit_event): Update the call to
1174 jit_event_handler to pass the JITer objfile.
1175
1176 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1177
1178 * gdbarch.c: Regenerate.
1179 * gdbarch.h: Regenerate.
1180 * gdbarch.sh (handle_segmentation_fault): Remove method.
1181 * infrun.c (handle_segmentation_fault): Remove.
1182 (print_signal_received_reason): Remove call to
1183 handle_segmentation_fault.
1184
1185 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1186
1187 * sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
1188 Rename to sparc64_linux_report_signal_info and add siggnal
1189 argument.
1190 (sparc64_linux_init_abi): Use sparc64_linux_report_signal_info
1191 instead of sparc64_linux_handle_segmentation_fault.
1192
1193 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1194
1195 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Use
1196 i386_linux_report_signal_info instead of
1197 i386_linux_handle_segmentation_fault.
1198 * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Rename
1199 to i386_linux_report_signal_info and add siggnal argument.
1200 (i386_linux_init_abi): Use i386_linux_report_signal_info instead
1201 of i386_linux_handle_segmentation_fault.
1202 * i386-linux-tdep.h (i386_linux_handle_segmentation_fault): Rename
1203 to i386_linux_report_signal_info and add siggnal argument.
1204
1205 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1206
1207 * corelow.c (core_target_open): Invoke gdbarch report_signal_info
1208 hook if present.
1209
1210 2020-07-21 John Baldwin <jhb@FreeBSD.org>
1211
1212 * gdbarch.c: Regenerate.
1213 * gdbarch.h: Regenerate.
1214 * gdbarch.sh (report_signal_info): New method.
1215 * infrun.c (print_signal_received_reason): Invoke gdbarch
1216 report_signal_info hook if present.
1217
1218 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
1219
1220 * python/py-registers.c : Add 'unordered_map' include.
1221 (gdbpy_new_reggroup): Renamed to...
1222 (gdbpy_get_reggroup): ...this. Update to only create register
1223 group descriptors when needed.
1224 (gdbpy_reggroup_iter_next): Update.
1225
1226 2020-07-21 Andrew Burgess <andrew.burgess@embecosm.com>
1227
1228 * python/py-registers.c (gdbpy_register_object_data): New static
1229 global.
1230 (gdbpy_register_object_data_init): New function.
1231 (gdbpy_new_register_descriptor): Renamed to...
1232 (gdbpy_get_register_descriptor): ...this, and update to reuse
1233 existing register descriptors where possible.
1234 (gdbpy_register_descriptor_iter_next): Update.
1235 (gdbpy_initialize_registers): Register new gdbarch data.
1236
1237 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
1238
1239 * linux-nat.c (stopped_pids): Make static.
1240
1241 2020-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1242
1243 PR ada/26235
1244 * gdbtypes.c (ada_discrete_type_low_bound,
1245 ada_discrete_type_high_bound): Handle undefined bounds.
1246
1247 2020-07-21 Kamil Rytarowski <n54@gmx.com>
1248
1249 * nbsd-nat.h (nbsd_nat_target::supports_multi_process): New
1250 declaration.
1251 * nbsd-nat.c (nbsd_nat_target::supports_multi_process): New
1252 function.
1253
1254 2020-07-20 John Baldwin <jhb@FreeBSD.org>
1255
1256 * fbsd-tdep.c (fbsd_skip_solib_resolver): New function.
1257 (fbsd_init_abi): Install gdbarch "skip_solib_resolver" method.
1258 * fbsd-tdep.h (fbsd_skip_solib_resolver): New prototype.
1259 * mips-fbsd-tdep.c (mips_fbsd_skip_solib_resolver): New function.
1260 (mips_fbsd_init_abi): Install gdbarch "skip_solib_resolver"
1261 method.
1262
1263 2020-07-20 Ludovic Courtès <ludo@gnu.org>
1264
1265 * guile/scm-math.c (vlscm_integer_fits_p): Use 'uintmax_t'
1266 and 'intmax_t' instead of 'scm_t_uintmax' and 'scm_t_intmax',
1267 which are deprecated in Guile 3.0.
1268 * configure.ac (try_guile_versions): Add "guile-3.0".
1269 * configure (try_guile_versions): Regenerate.
1270 * NEWS: Update entry.
1271
1272 2020-07-20 Ludovic Courtès <ludo@gnu.org>
1273 Doug Evans <dje@google.com>
1274
1275 PR gdb/21104
1276 * guile/scm-ports.c (USING_GUILE_BEFORE_2_2): New macro.
1277 (ioscm_memory_port)[read_buf_size, write_buf_size]: Wrap in #if
1278 USING_GUILE_BEFORE_2_2.
1279 (stdio_port_desc, memory_port_desc) [!USING_GUILE_BEFORE_2_2]:
1280 Change type to 'scm_t_port_type *'.
1281 (natural_buffer_size) [!USING_GUILE_BEFORE_2_2]: New variable.
1282 (ioscm_open_port) [USING_GUILE_BEFORE_2_2]: Add 'stream'
1283 parameter and honor it. Update callers.
1284 (ioscm_open_port) [!USING_GUILE_BEFORE_2_2]: New function.
1285 (ioscm_read_from_port, ioscm_write) [!USING_GUILE_BEFORE_2_2]: New
1286 functions.
1287 (ioscm_fill_input, ioscm_input_waiting, ioscm_flush): Wrap in #if
1288 USING_GUILE_BEFORE_2_2.
1289 (ioscm_init_gdb_stdio_port) [!USING_GUILE_BEFORE_2_2]: Use
1290 'ioscm_read_from_port'. Call 'scm_set_port_read_wait_fd'.
1291 (ioscm_init_stdio_buffers) [!USING_GUILE_BEFORE_2_2]: New function.
1292 (gdbscm_stdio_port_p) [!USING_GUILE_BEFORE_2_2]: Use 'SCM_PORTP'
1293 and 'SCM_PORT_TYPE'.
1294 (gdbscm_memory_port_end_input, gdbscm_memory_port_seek)
1295 (ioscm_reinit_memory_port): Wrap in #if USING_GUILE_BEFORE_2_2.
1296 (gdbscm_memory_port_read, gdbscm_memory_port_write)
1297 (gdbscm_memory_port_seek, gdbscm_memory_port_close)
1298 [!USING_GUILE_BEFORE_2_2]: New functions.
1299 (gdbscm_memory_port_print): Remove use of 'SCM_PTOB_NAME'.
1300 (ioscm_init_memory_port_type) [!USING_GUILE_BEFORE_2_2]: Use
1301 'gdbscm_memory_port_read'.
1302 Wrap 'scm_set_port_end_input', 'scm_set_port_flush', and
1303 'scm_set_port_free' calls in #if USING_GUILE_BEFORE_2_2.
1304 (gdbscm_get_natural_buffer_sizes) [!USING_GUILE_BEFORE_2_2]: New
1305 function.
1306 (ioscm_init_memory_port): Remove.
1307 (ioscm_init_memory_port_stream): New function
1308 (ioscm_init_memory_port_buffers) [USING_GUILE_BEFORE_2_2]: New
1309 function.
1310 (gdbscm_memory_port_read_buffer_size) [!USING_GUILE_BEFORE_2_2]:
1311 Return scm_from_uint (0).
1312 (gdbscm_set_memory_port_read_buffer_size_x)
1313 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
1314 (gdbscm_memory_port_write_buffer_size) [!USING_GUILE_BEFORE_2_2]:
1315 Return scm_from_uint (0).
1316 (gdbscm_set_memory_port_write_buffer_size_x)
1317 [!USING_GUILE_BEFORE_2_2]: Call 'scm_setvbuf'.
1318 * configure.ac (try_guile_versions): Add "guile-2.2".
1319 * configure: Regenerate.
1320 * NEWS: Add entry.
1321
1322 2020-07-18 Tom Tromey <tom@tromey.com>
1323
1324 * linux-nat.c (linux_multi_process): Remove.
1325 (linux_nat_target::supports_multi_process): Return true.
1326
1327 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
1328
1329 * arch/riscv.c (riscv_tdesc_cache): Change map type.
1330 (riscv_lookup_target_description): Return pointer out of
1331 unique_ptr.
1332 * target-descriptions.c (allocate_target_description): Add
1333 comment.
1334 (target_desc_deleter::operator()): Likewise.
1335 * target-descriptions.h (struct target_desc_deleter): Moved to
1336 gdbsupport/tdesc.h.
1337 (target_desc_up): Likewise.
1338
1339 2020-07-17 Tom Tromey <tromey@adacore.com>
1340
1341 * linux-nat.c (linux_nat_target::supports_non_stop)
1342 (linux_nat_target::always_non_stop_p): Use "true".
1343 (linux_nat_target::supports_disable_randomization): Use "true" and
1344 "false".
1345
1346 2020-07-16 Caroline Tice <cmtice@google.com>
1347
1348 * dwarf2/read.c (RNGLIST_HEADER_SIZE32) New constant definition.
1349 (RNGLIST_HEADER_SIZE64): New constant definition.
1350 (struct dwop_section_names): Add rnglists_dwo.
1351 (dwop_section_names): Add .debug_rnglists.dwo, .zdebug_rnglists.dwo.
1352 (struct loclist_header): Rename to 'loclists_rnglists_header'.
1353 (struct dwo_sections): Add rnglists field.
1354 (read_attribut_reprocess): Add tag parameter.
1355 (dwarf2_ranges_read): Add tag parameter & remove forward function decl.
1356 (cu_debug_rnglists_section): New function (decl & definition).
1357 (dwarf2_locate_dwo_sections): Add code to read rnglists_dwo section.
1358 (dwarf2_rnglists_process): Add a dwarf_tag parameter, for the kind of
1359 die whose range is being checked; get rnglist section from
1360 cu_debug_rnglists_section, to get from either objfile or dwo file as
1361 appropriate. Add cases for DW_RLE_base_addressx,
1362 DW_RLE_startx_length, DW_RLE_startx_endx. Also, update to only add
1363 the base address to DW_RLE_offset_pairs (not to all ranges), moving
1364 test inside if-condition and updating complaint message.
1365 (dwarf2_ranges_process): Add dwarf tag parameter and pass it to
1366 dwarf2_rnglists_process.
1367 (dwarf2_ranges_read): Add dwarf tag parameter and pass it to
1368 dwarf2_ranges_process.
1369 (dwarf2_get_pc_bounds): Check for DW_FORM_rnglistx when setting
1370 need_ranges_base and update comment appropriately. Also pass die tag
1371 to dwarf2_ranges_read.
1372 (dwarf2_record_block_ranges): Check for DW_FORM_rnglistx when setting
1373 need_ranges_base and update comment appropriately. Also pass die tag
1374 to dwarf2_ranges_process.
1375 (read_full_die_1): Add code to read DW_AT_rnglists_base and assign to
1376 cu->ranges_base. Also pass die tag to read_attribute_reprocess.
1377 (partial_die_info::read): Check for DW_FORM_rnglistx when setting
1378 need_ranges_base and update comment appropriately. Also pass die tag
1379 to read_attribute_reprocess and dwarf2_ranges_read.
1380 (read_loclist_header): Rename function to read_loclists_rnglists_header,
1381 and update function comment appropriately.
1382 (read_loclist_index): Call read_loclists_rnglists_header instead of
1383 read_loclist_header.
1384 (read_rnglist_index): New function.
1385 (read_attribute_reprocess): Add tag parameter. Add code for
1386 DW_FORM_rnglistx, passing tag to read_rnglist_index.
1387 (read_attribute_value): Mark DW_FORM_rnglistx with need_reprocess.
1388
1389 2020-07-15 Andrew Burgess <andrew.burgess@embecosm.com>
1390
1391 * f-typeprint.c (f_type_print_base): Allow for dynamic types not
1392 being resolved.
1393
1394 2020-07-14 Andrew Burgess <andrew.burgess@embecosm.com>
1395
1396 * arch-utils.c (show_architecture): Update formatting of messages.
1397
1398 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1399
1400 * gdbtypes.h (struct type) <bounds>: Handle array and string
1401 types.
1402 * ada-lang.c (assign_aggregate): Use type::bounds on
1403 array/string type.
1404 * c-typeprint.c (c_type_print_varspec_suffix): Likewise.
1405 * c-varobj.c (c_number_of_children): Likewise.
1406 (c_describe_child): Likewise.
1407 * eval.c (evaluate_subexp_for_sizeof): Likewise.
1408 * f-typeprint.c (f_type_print_varspec_suffix): Likewise.
1409 (f_type_print_base): Likewise.
1410 * f-valprint.c (f77_array_offset_tbl): Likewise.
1411 (f77_get_upperbound): Likewise.
1412 (f77_print_array_1): Likewise.
1413 * guile/scm-type.c (gdbscm_type_range): Likewise.
1414 * m2-typeprint.c (m2_array): Likewise.
1415 (m2_is_long_set_of_type): Likewise.
1416 * m2-valprint.c (get_long_set_bounds): Likewise.
1417 * p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
1418 * python/py-type.c (typy_range): Likewise.
1419 * rust-lang.c (rust_internal_print_type): Likewise.
1420 * type-stack.c (type_stack::follow_types): Likewise.
1421 * valarith.c (value_subscripted_rvalue): Likewise.
1422 * valops.c (value_cast): Likewise.
1423
1424 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1425
1426 * gdbtypes.c (TYPE_ARRAY_BIT_STRIDE): Remove. Update all
1427 callers to use the equivalent accessor methods.
1428
1429 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1430
1431 * gdbtypes.h (struct range_bounds) <bit_stride>: New method.
1432 (struct type) <bit_stride>: New method.
1433 (TYPE_BIT_STRIDE): Remove.
1434 * gdbtypes.c (update_static_array_size): Use type::bit_stride.
1435
1436 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1437
1438 * gdbtypes.h (TYPE_ARRAY_LOWER_BOUND_VALUE,
1439 TYPE_ARRAY_UPPER_BOUND_VALUE): Remove. Update all
1440 callers to use the equivalent accessor methods instead.
1441
1442 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1443
1444 * gdbtypes.h (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED,
1445 TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): Remove. Update all
1446 callers to use the equivalent accessor methods instead.
1447
1448 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1449
1450 * gdbtypes.h (TYPE_LOW_BOUND_KIND,
1451 TYPE_HIGH_BOUND_KIND): Remove. Update all callers
1452 to use dynamic_prop::kind.
1453
1454 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1455
1456 * gdbtypes.h (TYPE_LOW_BOUND_UNDEFINED,
1457 TYPE_HIGH_BOUND_UNDEFINED): Remove. Update all callers
1458 to get the bound property's kind and check against
1459 PROP_UNDEFINED.
1460
1461 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1462
1463 * gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND): Remove. Update
1464 all callers to use type::range_bounds followed by
1465 dynamic_prop::{low,high}.
1466
1467 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
1468
1469 * gdbtypes.h (struct dynamic_prop) <kind, set_undefined,
1470 const_val, set_const_val, baton, set_locexpr, set_loclist,
1471 set_addr_offset, variant_parts, set_variant_parts,
1472 original_type, set_original_type>: New methods.
1473 <kind>: Rename to...
1474 <m_kind>: ... this. Update all users to use the new methods
1475 instead.
1476 <data>: Rename to...
1477 <m_data>: ... this. Update all users to use the new methods
1478 instead.
1479
1480 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1481
1482 * gdbtypes.c (get_discrete_bounds): Return failure if
1483 the range type's bounds are not both defined and constant
1484 values.
1485 (get_array_bounds): Update comment. Remove undefined bound check.
1486
1487 2020-07-12 Simon Marchi <simon.marchi@polymtl.ca>
1488
1489 * gdbtypes.h (TYPE_RANGE_DATA): Remove. Update callers to use
1490 the type::bounds method directly.
1491
1492 2020-07-12 Simon Marchi <simon.marchi@efficios.com>
1493
1494 * gdbtypes.h (struct type) <bounds, set_bounds>: New methods.
1495 (TYPE_RANGE_DATA): Use type::bounds. Change all uses that
1496 are used to set the range type's bounds to use set_bounds.
1497
1498 2020-07-11 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1499
1500 * exec.c (_initialize_exec): Update exec-file-mismatch help.
1501
1502 2020-07-10 Pedro Alves <pedro@palves.net>
1503
1504 * gdbthread.h (inferior_ref): Define.
1505 (scoped_restore_current_thread) <m_thread>: Now a thread_info_ref.
1506 (scoped_restore_current_thread) <m_inf>: Now an inferior_ref.
1507 * thread.c
1508 (scoped_restore_current_thread::restore):
1509 Adjust to gdb::ref_ptr.
1510 (scoped_restore_current_thread::~scoped_restore_current_thread):
1511 Remove manual decref handling.
1512 (scoped_restore_current_thread::scoped_restore_current_thread):
1513 Adjust to use
1514 inferior_ref::new_reference/thread_info_ref::new_reference.
1515 Incref the thread before calling get_frame_id instead of after.
1516 Let TARGET_CLOSE_ERROR propagate.
1517
1518 2020-07-10 Pedro Alves <pedro@palves.net>
1519
1520 * frame-tailcall.c (dwarf2_tailcall_sniffer_first): Only swallow
1521 NO_ENTRY_VALUE_ERROR / MEMORY_ERROR / OPTIMIZED_OUT_ERROR /
1522 NOT_AVAILABLE_ERROR.
1523 * value.c (value_optimized_out): Only swallow MEMORY_ERROR /
1524 OPTIMIZED_OUT_ERROR / NOT_AVAILABLE_ERROR.
1525
1526 2020-07-10 Simon Marchi <simon.marchi@polymtl.ca>
1527 Pedro Alves <pedro@palves.net>
1528
1529 PR gdb/26199
1530 * infrun.c (threads_are_resumed_pending_p): Delete.
1531 (do_target_wait): Remove threads_are_executing and
1532 threads_are_resumed_pending_p checks from the inferior_matches
1533 lambda. Update comments.
1534
1535 2020-07-10 Pedro Alves <pedro@palves.net>
1536
1537 PR gdb/26199
1538 * infrun.c (handle_no_resumed): Transfer terminal to inferior with
1539 executing threads.
1540
1541 2020-07-10 Pedro Alves <pedro@palves.net>
1542
1543 PR gdb/26199
1544 * infrun.c (handle_no_resumed): Handle multiple targets.
1545
1546 2020-07-10 Pedro Alves <pedro@palves.net>
1547
1548 PR gdb/26199
1549 * infrun.c (prepare_to_wait): Check target_can_async_p instead of
1550 target_is_async_p.
1551
1552 2020-07-10 Pedro Alves <pedro@palves.net>
1553
1554 PR gdb/26199
1555 * target.c (target_pass_ctrlc): Look at the inferior's non-exited
1556 threads, not all threads.
1557
1558 2020-07-10 Pedro Alves <pedro@palves.net>
1559
1560 PR gdb/26199
1561 * remote.c (remote_target::open_1): Pass remote target pointer as
1562 data to create_async_event_handler.
1563 (remote_async_inferior_event_handler): Mark async event handler
1564 before returning if the remote target still has either pending
1565 events or unacknowledged notifications.
1566
1567 2020-07-10 John Baldwin <jhb@FreeBSD.org>
1568
1569 * fbsd-nat.h (fbsd_nat_target::supports_multi_process): New
1570 declaration.
1571 * fbsd-nat.c (fbsd_nat_target::supports_multi_process): New
1572 function.
1573
1574 2020-07-09 John Baldwin <jhb@FreeBSD.org>
1575
1576 * inf-ptrace.c (inf_ptrace_target::wait): Don't compare against
1577 inferior_ptid.
1578
1579 2020-07-09 John Baldwin <jhb@FreeBSD.org>
1580
1581 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_ARGC,
1582 AT_FREEBSD_ARGV, AT_FREEBSD_ENVC, AT_FREEBSD_ENVV,
1583 AT_FREEBSD_PS_STRINGS.
1584
1585 2020-07-08 Hannes Domani <ssbssa@yahoo.de>
1586
1587 * auto-load.c (auto_load_objfile_script_1): Convert drive part
1588 of debugfile path on Windows.
1589
1590 2020-07-08 John Baldwin <jhb@FreeBSD.org>
1591
1592 * fbsd-nat.c (fbsd_nat_target::find_memory_regions): Rename 'obfd'
1593 argument to 'data'.
1594
1595 2020-07-08 Tom Tromey <tromey@adacore.com>
1596
1597 * ada-lang.c (ada_exception_message_1): Use read_memory.
1598
1599 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1600
1601 PR python/22748
1602 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Remove
1603 special handling for inline frames.
1604 * findvar.c (value_of_register_lazy): Skip inline frames when
1605 creating lazy register values.
1606 * frame.c (frame_id_computed_p): Delete definition.
1607 * frame.h (frame_id_computed_p): Delete declaration.
1608
1609 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1610
1611 * NEWS: Mention additions to Python API.
1612 * python/py-arch.c (archpy_register_groups): New function.
1613 (arch_object_methods): Add 'register_groups' method.
1614 * python/py-registers.c (reggroup_iterator_object): New struct.
1615 (reggroup_object): New struct.
1616 (gdbpy_new_reggroup): New function.
1617 (gdbpy_reggroup_to_string): New function.
1618 (gdbpy_reggroup_name): New function.
1619 (gdbpy_reggroup_iter): New function.
1620 (gdbpy_reggroup_iter_next): New function.
1621 (gdbpy_new_reggroup_iterator): New function
1622 (gdbpy_initialize_registers): Register new types.
1623 (reggroup_iterator_object_type): Define new Python type.
1624 (gdbpy_reggroup_getset): New static global.
1625 (reggroup_object_type): Define new Python type.
1626 * python/python-internal.h
1627
1628 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1629
1630 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-registers.c
1631 * python/py-arch.c (archpy_registers): New function.
1632 (arch_object_methods): Add 'registers' method.
1633 * python/py-registers.c: New file.
1634 * python/python-internal.h
1635 (gdbpy_new_register_descriptor_iterator): Declare.
1636 (gdbpy_initialize_registers): Declare.
1637 * python/python.c (do_start_initialization): Call
1638 gdbpy_initialize_registers.
1639 * NEWS: Mention additions to the Python API.
1640
1641 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1642
1643 * NEWS: Mention new Python API method.
1644 * python/py-unwind.c (pending_framepy_architecture): New function.
1645 (pending_frame_object_methods): Add architecture method.
1646
1647 2020-07-06 Andrew Burgess <andrew.burgess@embecosm.com>
1648
1649 * gdbarch.c: Regenerate.
1650 * gdbarch.h: Regenerate.
1651 * gdbarch.sh (deprecated_set_gdbarch_data): Delete.
1652 (gdbarch_data): Use internal_error for the case where
1653 deprecated_set_gdbarch_data was originally needed.
1654 * ia64-libunwind-tdep.c (libunwind_descr_init): Update parameters,
1655 and use passed in obstack.
1656 (libunwind_frame_set_descr): Should no longer get back NULL from
1657 gdbarch_data.
1658 (_initialize_libunwind_frame): Register as a pre-init gdbarch data
1659 type.
1660 * user-regs.c (user_regs_init): Update parameters, and use passed
1661 in obstack.
1662 (user_reg_add): Should no longer get back NULL from gdbarch_data.
1663 (_initialize_user_regs): Register as a pre-init gdbarch data type.
1664
1665 2020-07-06 Tom de Vries <tdevries@suse.de>
1666
1667 * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Handle
1668 End-Of-Sequence in lte_is_less_than.
1669 * symtab.c (find_pc_sect_line): Revert change from commit 3d92a3e313
1670 "gdb: Don't reorder line table entries too much when sorting".
1671
1672 2020-07-06 Tom de Vries <tdevries@suse.de>
1673
1674 PR tui/26205
1675 * tui/tui-win.c (tui_partial_win_by_name): Don't test for NULL name.
1676
1677 2020-07-05 Tom de Vries <tdevries@suse.de>
1678
1679 PR build/26187
1680 * inferior.h (struct infcall_suspend_state_deleter): If available, use
1681 std::uncaught_exceptions instead of deprecated
1682 std::uncaught_exception.
1683
1684 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1685
1686 * macroexp.h (macro_stringify): Return
1687 gdb::unique_xmalloc_ptr<char>.
1688 * macroexp.c (macro_stringify): Likewise.
1689 * macrotab.c (fixup_definition): Update.
1690
1691 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * c-exp.y (scan_macro_expansion): Don't free `expansion`.
1694 (lex_one_token): Update.
1695 * macroexp.c (struct macro_buffer) <release>: Return
1696 gdb::unique_xmalloc_ptr<char>.
1697 (macro_stringify): Update.
1698 (macro_expand): Update.
1699 (macro_expand_next): Return gdb::unique_xmalloc_ptr<char>.
1700 * macroexp.h (macro_expand_next): Likewise.
1701
1702 2020-07-02 Simon Marchi <simon.marchi@efficios.com>
1703
1704 * macroexp.h (macro_lookup_ftype): Remove.
1705 (macro_expand, macro_expand_once, macro_expand_next): Remove
1706 lookup function parameters, add scope parameter.
1707 * macroexp.c (scan, substitute_args, expand, maybe_expand,
1708 macro_expand, macro_expand_once, macro_expand_next): Likewise.
1709 * macroscope.h (standard_macro_lookup): Change parameter type
1710 to macro_scope.
1711 * macroscope.c (standard_macro_lookup): Likewise.
1712 * c-exp.y (lex_one_token): Update.
1713 * macrocmd.c (macro_expand_command): Likewise.
1714 (macro_expand_once_command): Likewise.
1715
1716 2020-07-02 Simon Marchi <simon.marchi@polymtl.ca>
1717
1718 * inf-loop.c (inferior_event_handler): Remove client_data param.
1719 * inf-loop.h (inferior_event_handler): Likewise.
1720 * infcmd.c (step_1): Adjust.
1721 * infrun.c (proceed): Adjust.
1722 (fetch_inferior_event): Remove client_data param.
1723 (infrun_async_inferior_event_handler): Adjust.
1724 * infrun.h (fetch_inferior_event): Remove `void *` param.
1725 * linux-nat.c (handle_target_event): Adjust.
1726 * record-btrace.c (record_btrace_handle_async_inferior_event):
1727 Adjust.
1728 * record-full.c (record_full_async_inferior_event_handler):
1729 Adjust.
1730 * remote.c (remote_async_inferior_event_handler): Adjust.
1731
1732 2020-07-01 Tom Tromey <tom@tromey.com>
1733
1734 * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
1735 * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
1736
1737 2020-07-01 Tom Tromey <tom@tromey.com>
1738
1739 * tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from
1740 tui_gen_win_info.
1741 (tui_win_info::make_window): Merge with
1742 tui_gen_win_info::make_window.
1743 (tui_win_info::make_visible): Move from tui_gen_win_info.
1744 * tui/tui-win.c (tui_win_info::max_width): Move from
1745 tui_gen_win_info.
1746 * tui/tui-layout.h (class tui_layout_window) <m_window>: Change
1747 type.
1748 <window_factory>: Likewise.
1749 * tui/tui-layout.c (tui_win_info::resize): Move from
1750 tui_gen_win_info.
1751 (make_standard_window): Change return type.
1752 (get_locator_window, tui_get_window_by_name): Likewise.
1753 (tui_layout_window::apply): Remove a cast.
1754 * tui/tui-data.h (MIN_WIN_HEIGHT): Move earlier.
1755 (struct tui_win_info): Merge with tui_gen_win_info.
1756 (struct tui_gen_win_info): Remove.
1757
1758 2020-07-01 Tom Tromey <tom@tromey.com>
1759
1760 * tui/tui-stack.h (struct tui_locator_window): Derive from
1761 tui_win_info.
1762 <do_scroll_horizontal, do_scroll_vertical>: New methods.
1763 <can_box>: New method.
1764
1765 2020-07-01 Tom Tromey <tom@tromey.com>
1766
1767 * tui/tui-stack.h (struct tui_locator_window): Remove body.
1768
1769 2020-07-01 Tom Tromey <tom@tromey.com>
1770
1771 * tui/tui-regs.c (tui_data_window::display_registers_from)
1772 (tui_data_window::display_registers_from)
1773 (tui_data_window::first_data_item_displayed)
1774 (tui_data_window::delete_data_content_windows): Update.
1775 (tui_data_window::refresh_window, tui_data_window::no_refresh):
1776 Remove.
1777 (tui_data_window::check_register_values): Update.
1778 (tui_data_item_window::rerender): Add parameters. Update.
1779 (tui_data_item_window::refresh_window): Remove.
1780 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: No longer
1781 virtual.
1782 * tui/tui-regs.h (struct tui_data_item_window): Don't derive from
1783 tui_gen_win_info.
1784 <refresh_window, max_height, min_height>: Remove.
1785 <rerender>: Add parameters.
1786 <x, y, visible>: New members.
1787 (struct tui_data_window) <refresh_window, no_refresh>: Remove.
1788 <m_item_width>: New member.
1789
1790 2020-07-01 Tom Tromey <tom@tromey.com>
1791
1792 * tui/tui-regs.c (tui_data_window::show_register_group)
1793 (tui_data_window::check_register_values): Update.
1794 * tui/tui-regs.h (struct tui_data_item_window) <regno>: Rename
1795 from item_no.
1796
1797 2020-07-01 Tom Tromey <tom@tromey.com>
1798
1799 * tui/tui-regs.c (tui_data_window::show_register_group): Remove
1800 useless "if".
1801
1802 2020-07-01 Tom Tromey <tom@tromey.com>
1803
1804 * tui/tui-regs.c (tui_data_window::show_register_group): Update.
1805 * tui/tui-regs.h (struct tui_data_item_window) <name>: Remove.
1806
1807 2020-07-01 Tom Tromey <tom@tromey.com>
1808
1809 * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h
1810 * tui/tui-winsource.h (enum tui_line_or_address_kind)
1811 (struct tui_line_or_address): Move from tui-data.h.
1812 * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h.
1813 * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c.
1814 (tui_cmd_window, tui_source_window_base, tui_source_window)
1815 (tui_disasm_window): Don't declare.
1816 (enum tui_line_or_address_kind, struct tui_line_or_address): Move
1817 to tui-winsource.h.
1818 (SINGLE_KEY): Move to tui-stack.c.
1819
1820 2020-07-01 Tom Tromey <tom@tromey.com>
1821
1822 * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a
1823 std::string.
1824 * tui/tui-regs.c (class tab_expansion_file): New.
1825 (tab_expansion_file::write): New method.
1826 (tui_register_format): Change return type. Use
1827 tab_expansion_file.
1828 (tui_get_register, tui_data_window::display_registers_from)
1829 (tui_data_item_window::rerender): Update.
1830 * tui/tui-io.h (tui_expand_tabs): Don't declare.
1831 * tui/tui-io.c (tui_expand_tabs): Remove.
1832
1833 2020-07-01 Tom Tromey <tom@tromey.com>
1834
1835 * tui/tui-regs.c (tui_reggroup_completer): Use complete_on_enum.
1836
1837 2020-07-01 Fangrui Song <maskray@google.com>
1838
1839 * dwarf2/read.c (lnp_state_machine::check_line_address): Test -1.
1840
1841 2020-07-01 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
1842
1843 * dwarf2/read.c (set_die_type): Removed conditions to restrict
1844 forms for DW_AT_associated and DW_AT_allocated attributes,
1845 which is already checked in function attr_to_dynamic_prop.
1846
1847 2020-06-30 Tom Tromey <tromey@adacore.com>
1848
1849 * dwarf2/read.c (quirk_rust_enum): Correctly call
1850 alloc_rust_variant for default-less enum.
1851
1852 2020-06-30 Tom Tromey <tromey@adacore.com>
1853
1854 PR build/26183:
1855 * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
1856 gdb::to_string.
1857
1858 2020-06-29 Simon Marchi <simon.marchi@efficios.com>
1859
1860 * gdbarch.sh (displaced_step_copy_insn): Update doc.
1861 * gdbarch.h: Re-generate.
1862
1863 2020-06-28 Tom Tromey <tom@tromey.com>
1864
1865 * command.h (cmd_types): Remove.
1866 (cmd_type): Don't declare.
1867 * cli/cli-decode.h (enum cmd_types): Uncomment. No longer a
1868 typedef.
1869 * cli/cli-cmds.c (setting_cmd): Use cmd->type directly.
1870 * cli/cli-decode.c (cmd_type): Remove.
1871
1872 2020-06-27 Pedro Alves <palves@redhat.com>
1873
1874 * fork-child.c (prefork_hook): Adjust.
1875 * infcmd.c (set_inferior_io_terminal, get_inferior_io_terminal):
1876 Delete.
1877 (set_inferior_tty_command, show_inferior_tty_command): Adjust.
1878 * inferior.c (inferior::set_tty, inferior::tty): New methods.
1879 * inferior.h (set_inferior_io_terminal, get_inferior_io_terminal):
1880 Remove declarations.
1881 (struct inferior) <set_tty, tty>: New methods.
1882 (struct inferior) <terminal>: Rename to ...
1883 (struct inferior) <m_terminal>: ... this and make private.
1884 * main.c (captured_main_1): Adjust.
1885 * mi/mi-cmd-env.c (mi_cmd_inferior_tty_set): Adjust.
1886 (mi_cmd_inferior_tty_show): Adjust.
1887 * nto-procfs.c (nto_procfs_target::create_inferior): Adjust.
1888 * windows-nat.c (windows_nat_target::create_inferior): Adjust.
1889
1890 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
1891
1892 * configure.ac: Add --enable-libctf: handle --disable-static
1893 properly.
1894 * acinclude.m4: sinclude ../config/enable.m4.
1895 * Makefile.in (aclocal_m4_deps): Adjust accordingly.
1896 (LIBCTF): Substitute in.
1897 (CTF_DEPS): New, likewise.
1898 (CLIBS): libctf needs symbols from libbfd: move earlier.
1899 (CDEPS): Use CTF_DEPS, not LIBCTF, now LIBCTF can include rpath
1900 flags.
1901 * ctfread.c: Surround in ENABLE_LIBCTF.
1902 (elfctf_build_psymtabs) [!ENABLE_LIBCTF]: New stub.
1903 * configure: Regenerate.
1904 * config.in: Likewise.
1905
1906 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
1907
1908 * infcmd.c (set_inferior_io_terminal): Use make_unique_xstrdup.
1909
1910 2020-06-25 Simon Marchi <simon.marchi@efficios.com>
1911
1912 * inferior.h (struct inferior) <terminal>: Change type to
1913 gdb::unique_xmalloc_ptr<char>.
1914 * inferior.c (inferior::~inferior): Don't free inf->terminal.
1915 * infcmd.c (set_inferior_io_terminal): Don't free terminal
1916 field, adjust to unique pointer.
1917 (get_inferior_io_terminal): Adjust to unique pointer.
1918
1919 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1920
1921 * riscv-tdep.c (riscv_print_registers_info): Loop over all
1922 registers, not just the known core set of registers.
1923
1924 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1925
1926 * riscv-tdep.c (riscv_register_name): Return NULL for duplicate
1927 fflags, frm, and fcsr registers.
1928 (riscv_register_reggroup_p): Remove unknown CSRs from save and
1929 restore groups.
1930 (riscv_tdesc_unknown_reg): New function.
1931 (riscv_gdbarch_init): Pass riscv_tdesc_unknown_reg to
1932 tdesc_use_registers.
1933 * riscv-tdep.h (struct gdbarch_tdep): Add
1934 unknown_csrs_first_regnum, unknown_csrs_count,
1935 duplicate_fflags_regnum, duplicate_frm_regnum, and
1936 duplicate_fcsr_regnum fields.
1937
1938 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1939
1940 * target-descriptions.c (tdesc_use_registers): Add new parameter a
1941 callback, use the callback (when not null) to help number unknown
1942 registers.
1943 * target-descriptions.h (tdesc_unknown_register_ftype): New typedef.
1944 (tdesc_use_registers): Add extra parameter to declaration.
1945
1946 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1947
1948 * riscv-tdep.c (value_of_riscv_user_reg): Moved to here from later
1949 in the file.
1950 (class riscv_pending_register_alias): Likewise.
1951 (riscv_register_feature::register_info): Change 'required_p' field
1952 to 'required', and change its type. Add 'check' member function.
1953 (riscv_register_feature::register_info::check): Define new member
1954 function.
1955 (riscv_xreg_feature): Change initialisation of 'required' field.
1956 (riscv_freg_feature): Likewise.
1957 (riscv_virtual_feature): Likewise.
1958 (riscv_csr_feature): Likewise.
1959 (riscv_check_tdesc_feature): Take extra parameter, the csr
1960 tdesc_feature, rewrite the function to use the new
1961 riscv_register_feature::register_info::check function.
1962 (riscv_gdbarch_init): Pass the csr tdesc_feature where needed.
1963
1964 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1965
1966 * features/Makefile: Remove all references to the deleted files
1967 below.
1968 * features/riscv/32bit-csr.c: Deleted.
1969 * features/riscv/32bit-csr.xml: Deleted.
1970 * features/riscv/64bit-csr.c: Deleted.
1971 * features/riscv/64bit-csr.xml: Deleted.
1972 * features/riscv/rebuild-csr-xml.sh: Deleted.
1973
1974 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1975
1976 * riscv-tdep.c (struct riscv_register_feature::register_info): Fix
1977 whitespace error for declaration of names member variable.
1978 (struct riscv_register_feature): Add new prefer_first_name member
1979 variable, and fix whitespace error in declaration of registers.
1980 (riscv_xreg_feature): Initialize prefer_first_name field.
1981 (riscv_freg_feature): Likewise.
1982 (riscv_virtual_feature): Likewise.
1983 (riscv_csr_feature): Likewise.
1984 (riscv_register_name): Expand on comments. Remove register name
1985 modifications for CSR and virtual registers.
1986
1987 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1988
1989 * riscv-tdep.c (struct riscv_register_feature): Fix whitespace
1990 errors.
1991
1992 2020-06-25 Andrew Burgess <andrew.burgess@embecosm.com>
1993
1994 * riscv-tdep.c (riscv_create_csr_aliases): Handle csr aliases from
1995 riscv-opc.h.
1996 (class riscv_pending_register_alias): New class.
1997 (riscv_check_tdesc_feature): Take vector of pending aliases and
1998 populate it as appropriate.
1999 (riscv_setup_register_aliases): Delete.
2000 (riscv_gdbarch_init): Create vector of pending aliases and pass it
2001 to riscv_check_tdesc_feature in all cases. Use the vector to
2002 create the register aliases.
2003
2004 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2005
2006 * sol2-tdep.c (sol2_static_transform_name): Remove.
2007 (sol2_init_abi): Don't register it.
2008 * gdbarch.sh (static_transform_name): Remove.
2009 * gdbarch.c, gdbarch.h: Regenerate.
2010
2011 * dbxread.c (read_dbx_symtab) <'S'>: Remove call to
2012 gdbarch_static_transform_name.
2013 * mdebugread.c (parse_partial_symbols) <'S'>: Likewise.
2014 * stabsread.c (define_symbol) <'X'>: Remove.
2015 (define_symbol) <'S'>: Remove gdbarch_static_transform_name
2016 handling.
2017 <'V'>: Likewise.
2018 * xcoffread.c (scan_xcoff_symtab): Remove gdbarch.
2019 <'S'>: Remove call to gdbarch_static_transform_name.
2020
2021 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2022
2023 * procfs.c (procfs_pre_trace): New function.
2024 (procfs_target::create_inferior): Pass it to fork_inferior.
2025
2026 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2027
2028 * configure.tgt <sparc-*-linux*> (gdb_target_obs): Remove
2029 sparc-sol2-tdep.o, sol2-tdep.o, sparc64-sol2-tdep.o.
2030 <sparc64-*-linux*> (gdb_target_obs): Remove sparc64-sol2-tdep.o,
2031 sol2-tdep.o, sparc-sol2-tdep.o.
2032 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Make static.
2033 * sparc-tdep.h (sparc32_sol2_init_abi): Remove.
2034 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Make static.
2035 * sparc64-tdep.h (sparc64_sol2_init_abi): Remove.
2036
2037 2020-06-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2038
2039 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Remove.
2040 (amd64_sol2_init_abi): Use sol2_sigtramp_p.
2041 Call sol2_init_abi.
2042 Remove calls to set_gdbarch_skip_solib_resolver,
2043 set_gdbarch_core_pid_to_str.
2044 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Remove.
2045 (i386_sol2_static_transform_name): Remove.
2046 (i386_sol2_init_abi): Call sol2_init_abi.
2047 Remove calls to set_gdbarch_sofun_address_maybe_missing,
2048 set_gdbarch_static_transform_name,
2049 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
2050 Use sol2_sigtramp_p.
2051 * sol2-tdep.c (sol2_pc_in_sigtramp): New function.
2052 (sol2_sigtramp_p): New function.
2053 (sol2_static_transform_name): New function.
2054 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Make static.
2055 (sol2_init_abi): New function.
2056 * sol2-tdep.h (sol2_sigtramp_p, sol2_init_abi): Declare.
2057 (sol2_skip_solib_resolver, sol2_core_pid_to_str): Remove.
2058 * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Remove.
2059 (sparc32_sol2_sigtramp_frame_sniffer): Just call sol2_sigtramp_p.
2060 (sparc_sol2_static_transform_name): Remove.
2061 (sparc32_sol2_init_abi): Call sol2_init_abi.
2062 Remove calls to set_gdbarch_sofun_address_maybe_missing,
2063 set_gdbarch_static_transform_name,
2064 set_gdbarch_skip_solib_resolver,
2065 set_gdbarch_core_pid_to_str.
2066 * sparc-tdep.h (sparc_sol2_pc_in_sigtramp)
2067 (sparc_sol2_static_transform_name): Remove
2068 * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_sniffer): Just
2069 call sol2_sigtramp_p.
2070 (sparc64_sol2_init_abi): Call sol2_init_abi.
2071 Remove calls to set_gdbarch_sofun_address_maybe_missing,
2072 set_gdbarch_static_transform_name,
2073 set_gdbarch_skip_solib_resolver, set_gdbarch_core_pid_to_str.
2074
2075 2020-06-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2076
2077 * symfile-add-flags.h: New flag SYMFILE_ALWAYS_CONFIRM.
2078 * exec.c (validate_exec_file): If from_tty, set both
2079 SYMFILE_VERBOSE (== from_tty) and SYMFILE_ALWAYS_CONFIRM.
2080 * symfile.c (symbol_file_add_with_addrs): if always_confirm
2081 and from_tty, unconditionally ask a confirmation.
2082
2083 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2084
2085 * target-descriptions.c (tdesc_architecture_name): Protect against
2086 NULL pointer dereference.
2087 (maint_print_xml_tdesc_cmd): New function.
2088 (_initialize_target_descriptions): Register new 'maint print
2089 xml-tdesc' command and give it the filename completer.
2090 * NEWS: Mention new 'maint print xml-tdesc' command.
2091
2092 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2093
2094 * target-descriptions.c (class tdesc_compatible_info): New class.
2095 (struct target_desc): Change type of compatible vector.
2096 (tdesc_compatible_p): Update for change in type of
2097 target_desc::compatible.
2098 (tdesc_compatible_info_list): New function.
2099 (tdesc_compatible_info_arch_name): New function.
2100 (tdesc_add_compatible): Update for change in type of
2101 target_desc::compatible.
2102 (print_c_tdesc::visit_pre): Likewise.
2103
2104 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2105
2106 * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
2107 whitespace to underscore.
2108 (maint_print_c_tdesc_cmd): Use fake filename for target
2109 descriptions that came from the target.
2110 (_initialize_target_descriptions): Add filename command completion
2111 for 'maint print c-tdesc'.
2112
2113 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
2114
2115 * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
2116 lines.
2117
2118 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
2119
2120 * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
2121 lines.
2122 (dwarf2_find_location_expression): Likewise.
2123 (call_site_parameter_matches): Likewise.
2124 (dwarf2_compile_expr_to_ax): Likewise.
2125 (disassemble_dwarf_expression): Likewise.
2126 (loclist_describe_location): Likewise.
2127
2128 2020-06-23 Pedro Alves <palves@redhat.com>
2129
2130 * gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
2131 progspace-and-thread.h. Include scoped-mock-context.h instead.
2132 (register_to_value_test): Use scoped_mock_context.
2133 * regcache.c: Include "scoped-mock-context.h".
2134 (cooked_read_test): Don't error out if a target is already pushed.
2135 Use scoped_mock_context. Adjust.
2136 * scoped-mock-context.h: New file.
2137
2138 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2139
2140 * ada-lang.c (ada_language_data): Delete la_is_string_type_p
2141 initializer.
2142 (ada_language::is_string_type_p): New member function.
2143 * c-lang.c (c_language_data): Delete la_is_string_type_p
2144 initializer.
2145 (cplus_language_data): Likewise.
2146 (asm_language_data): Likewise.
2147 (minimal_language_data): Likewise.
2148 * d-lang.c (d_language_data): Likewise.
2149 * f-lang.c (f_is_string_type_p): Delete function, implementation
2150 moved to f_language::is_string_type_p.
2151 (f_language_data): Delete la_is_string_type_p initializer.
2152 (f_language::is_string_type_p): New member function,
2153 implementation from f_is_string_type_p.
2154 * go-lang.c (go_is_string_type_p): Delete function, implementation
2155 moved to go_language::is_string_type_p.
2156 (go_language_data): Delete la_is_string_type_p initializer.
2157 (go_language::is_string_type_p): New member function,
2158 implementation from go_is_string_type_p.
2159 * language.c (language_defn::is_string_type_p): Define new member
2160 function.
2161 (default_is_string_type_p): Make static, add comment copied from
2162 header file.
2163 (unknown_language_data): Delete la_is_string_type_p initializer.
2164 (unknown_language::is_string_type_p): New member function.
2165 (auto_language_data): Delete la_is_string_type_p initializer.
2166 (auto_language::is_string_type_p): New member function.
2167 * language.h (language_data): Delete la_is_string_type_p field.
2168 (language_defn::is_string_type_p): Declare new function.
2169 (default_is_string_type_p): Delete desclaration, move comment to
2170 definition.
2171 * m2-lang.c (m2_is_string_type_p): Delete function, implementation
2172 moved to m2_language::is_string_type_p.
2173 (m2_language_data): Delete la_is_string_type_p initializer.
2174 (m2_language::is_string_type_p): New member function,
2175 implementation from m2_is_string_type_p.
2176 * objc-lang.c (objc_language_data): Delete la_is_string_type_p
2177 initializer.
2178 * opencl-lang.c (opencl_language_data): Likewise.
2179 * p-lang.c (pascal_is_string_type_p): Delete function,
2180 implementation moved to pascal_language::is_string_type_p.
2181 (pascal_language_data): Delete la_is_string_type_p initializer.
2182 (pascal_language::is_string_type_p): New member function,
2183 implementation from pascal_is_string_type_p.
2184 * rust-lang.c (rust_is_string_type_p): Delete function,
2185 implementation moved to rust_language::is_string_type_p.
2186 (rust_language_data): Delete la_is_string_type_p initializer.
2187 (rust_language::is_string_type_p): New member function,
2188 implementation from rust_is_string_type_p.
2189 * valprint.c (val_print_scalar_or_string_type_p): Update call to
2190 is_string_type_p.
2191
2192 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2193
2194 * ada-lang.c (ada_language_data): Delete la_print_typedef
2195 initializer.
2196 (ada_language::print_typedef): New member function.
2197 * c-lang.c (c_language_data): Delete la_print_typedef initializer.
2198 (cplus_language_data): Likewise.
2199 (asm_language_data): Likewise.
2200 (minimal_language_data): Likewise.
2201 * d-lang.c (d_language_data): Likewise.
2202 * f-lang.c (f_language_data): Likewise.
2203 (f_language::print_typedef): New member function.
2204 * go-lang.c (go_language_data): Delete la_print_typedef
2205 initializer.
2206 * language.c (language_defn::print_typedef): Define member
2207 function.
2208 (unknown_language_data): Delete la_print_typedef initializer.
2209 (unknown_language::print_typedef): New member function.
2210 (auto_language_data): Delete la_print_typedef initializer.
2211 (auto_language::print_typedef): New member function.
2212 * language.h (language_data): Delete la_print_typedef field.
2213 (language_defn::print_typedef): Declare new member function.
2214 (LA_PRINT_TYPEDEF): Update call to print_typedef.
2215 (default_print_typedef): Delete declaration.
2216 * m2-lang.c (m2_language_data): Delete la_print_typedef
2217 initializer.
2218 (m2_language::print_typedef): New member function.
2219 * objc-lang.c (objc_language_data): Delete la_print_typedef
2220 initializer.
2221 * opencl-lang.c (opencl_language_data): Likewise.
2222 * p-lang.c (pascal_language_data): Likewise.
2223 (pascal_language::print_typedef): New member function.
2224 * rust-lang.c (rust_print_typedef): Delete function,
2225 implementation moved to rust_language::print_typedef.
2226 (rust_language): Delete la_print_typedef initializer.
2227 (rust_language::print_typedef): New member function,
2228 implementation from rust_print_typedef.
2229 * typeprint.c (default_print_typedef): Delete.
2230
2231 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2232
2233 * ada-lang.c (ada_language_data): Delete la_printstr initializer.
2234 (ada_language::printstr): New member function.
2235 * c-lang.c (c_language_data): Delete la_printstr initializer.
2236 (cplus_language_data): Likewise.
2237 (asm_language_data): Likewise.
2238 (minimal_language_data): Likewise.
2239 * d-lang.c (d_language_data): Likewise.
2240 * f-lang.c (f_printstr): Rename to f_language::printstr.
2241 (f_language_data): Delete la_printstr initializer.
2242 (f_language::printstr): New member function, implementation from
2243 f_printstr.
2244 * go-lang.c (go_language_data): Delete la_printstr initializer.
2245 * language.c (language_defn::printstr): Define new member
2246 function.
2247 (unk_lang_printstr): Delete.
2248 (unknown_language_data): Delete la_printstr initializer.
2249 (unknown_language::printstr): New member function.
2250 (auto_language_data): Delete la_printstr initializer.
2251 (auto_language::printstr): New member function.
2252 * language.h (language_data): Delete la_printstr field.
2253 (language_defn::printstr): Declare new member function.
2254 (LA_PRINT_STRING): Update call to printstr.
2255 * m2-lang.c (m2_printstr): Rename to m2_language::printstr.
2256 (m2_language_data): Delete la_printstr initializer.
2257 (m2_language::printstr): New member function, implementation from
2258 m2_printstr.
2259 * objc-lang.c (objc_language_data): Delete la_printstr
2260 initializer.
2261 * opencl-lang.c (opencl_language_data): Likewise.
2262 * p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
2263 (pascal_language_data): Delete la_printstr initializer.
2264 (pascal_language::printstr): New member function, implementation
2265 from pascal_printstr.
2266 * p-lang.h (pascal_printstr): Delete declaration.
2267 * rust-lang.c (rust_printstr): Update header comment.
2268 (rust_language_data): Delete la_printstr initializer.
2269 (rust_language::printstr): New member function.
2270
2271 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2272
2273 * ada-lang.c (ada_language_data): Delete la_printchar initializer.
2274 (ada_language::printchar): New member function.
2275 * c-lang.c (c_language_data): Delete la_printchar initializer.
2276 (cplus_language_data): Likewise.
2277 (asm_language_data): Likewise.
2278 (minimal_language_data): Likewise.
2279 * d-lang.c (d_language_data): Likewise.
2280 * f-lang.c (f_printchar): Rename to f_language::printchar.
2281 (f_language_data): Delete la_printchar initializer.
2282 (f_language::printchar): New member function, implementation from
2283 f_printchar.
2284 * go-lang.c (go_language_data): Delete la_printchar initializer.
2285 * language.c (unk_lang_printchar): Delete.
2286 (language_defn::printchar): Define new member function.
2287 (unknown_language_data): Delete la_printchar initializer.
2288 (unknown_language::printchar): New member function.
2289 (auto_language_data): Delete la_printchar initializer.
2290 (auto_language::printchar): New member function.
2291 * language.h (language_data): Delete la_printchar field.
2292 (language_defn::printchar): Declare new member function.
2293 (LA_PRINT_CHAR): Update call to printchar.
2294 * m2-lang.c (m2_language_data): Delete la_printchar initializer.
2295 (m2_language::printchar): New member function.
2296 * objc-lang.c (objc_language_data): Delete la_printchar
2297 initializer.
2298 * opencl-lang.c (opencl_language_data): Likewise.
2299 * p-lang.c (pascal_language_data): Delete la_printchar
2300 initializer.
2301 (pascal_language::printchar): New member function.
2302 * rust-lang.c (rust_printchar): Rename to
2303 rust_language::printchar.
2304 (rust_language_data): Delete la_printchar initializer.
2305 (rust_language::printchar): New member function, implementation
2306 from rust_printchar.
2307
2308 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2309
2310 * ada-lang.c (emit_char): Renamed to ada_language::emitchar.
2311 (ada_language_data): Delete la_emitchar initializer.
2312 (ada_language::emitchar): New member function, implementation from
2313 emit_char.
2314 * c-lang.c (c_language_data): Delete la_emitchar initializer.
2315 (cplus_language_data): Likewise.
2316 (asm_language_data): Likewise.
2317 (minimal_language_data): Likewise.
2318 * d-lang.c (d_language_data): Likewise.
2319 * f-lang.c (f_emit_char): Rename to f_language::emitchar.
2320 (f_language_data): Delete la_emitchar initializer.
2321 (f_language::emitchar): New member function, implementation from
2322 f_emit_char.
2323 * go-lang.c (go_language_data): Delete la_emitchar initializer.
2324 * language.c (unk_lang_emit_char): Delete.
2325 (language_defn::emitchar): New member function definition.
2326 (unknown_language_data): Delete la_emitchar initializer.
2327 (unknown_language::emitchar): New member function.
2328 (auto_language_data): Delete la_emitchar initializer.
2329 (auto_language::emitchar): New member function.
2330 * language.h (language_data): Delete la_emitchar field.
2331 (language_defn::emitchar): New member field declaration.
2332 (LA_EMIT_CHAR): Update call to emitchar.
2333 * m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
2334 (m2_language_data): Delete la_emitchar initializer.
2335 (m2_language::emitchar): New member function, implementation from
2336 m2_emit_char.
2337 * objc-lang.c (objc_language_data): Delete la_emitchar
2338 initializer.
2339 * opencl-lang.c (opencl_language_data): Likewise.
2340 * p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
2341 (pascal_language_data): Delete la_emitchar initializer.
2342 (pascal_language::emitchar): New member function, implementation
2343 from pascal_emit_char.
2344 * rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
2345 (rust_language_data): Delete la_emitchar initializer.
2346 (rust_language::emitchar): New member function, implementation
2347 from rust_emitchar.
2348
2349 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2350
2351 * ada-lang.c (resolve): Rename to ada_language::post_parser.
2352 (ada_language_data): Delete la_post_parser initializer.
2353 (ada_language::post_parser): New member function.
2354 * c-lang.c (c_language_data): Delete la_post_parser initializer.
2355 (cplus_language_data): Likewise.
2356 (asm_language_data): Likewise.
2357 (minimal_language_data): Likewise.
2358 * d-lang.c (d_language_data): Likewise.
2359 * f-lang.c (f_language_data): Likewise.
2360 * go-lang.c (go_language_data): Likewise.
2361 * language.c (unknown_language_data): Likewise.
2362 (auto_language_data): Likewise.
2363 * language.h (language_data): Delete la_post_parser field.
2364 (language_defn::post_parser): New member function.
2365 * m2-lang.c (m2_language_data): Delete la_post_parser initializer.
2366 * objc-lang.c (objc_language_data): Likewise.
2367 * opencl-lang.c (opencl_language_data): Likewise.
2368 * p-lang.c (pascal_language_data): Likewise.
2369 * parse.c (parse_exp_in_context): Update call to post_parser.
2370 (null_post_parser): Delete definition.
2371 * parser-defs.h (null_post_parser): Delete declaration.
2372 * rust-lang.c (rust_language_data): Delete la_post_parser
2373 initializer.
2374
2375 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2376
2377 * ada-lang.c (parse): Rename to ada_language::parser.
2378 (ada_language_data): Delete la_parser initializer.
2379 (ada_language::parser): New member function, implementation from
2380 parse.
2381 * c-lang.c (c_language_data): Delete la_parser initializer.
2382 (cplus_language_data): Likewise.
2383 (asm_language_data): Likewise.
2384 (minimal_language_data): Likewise.
2385 * d-lang.c (d_language_data): Likewise.
2386 (d_language::parser): New member function.
2387 * f-lang.c (f_language_data): Delete la_parser initializer.
2388 (f_language::parser): New member function.
2389 * go-lang.c (go_language_data): Delete la_parser initializer.
2390 (go_language::parser): New member function.
2391 * language.c (unk_lang_parser): Delete.
2392 (language_defn::parser): Define new member function.
2393 (unknown_language_data): Delete la_parser initializer.
2394 (unknown_language::parser): New member function.
2395 (auto_language_data): Delete la_parser initializer.
2396 (auto_language::parser): New member function.
2397 * language.h (language_data): Delete la_parser field.
2398 (language_defn::parser): Declare new member function.
2399 * m2-lang.c (m2_language_data): Delete la_parser initializer.
2400 (m2_language::parser): New member function.
2401 * objc-lang.c (objc_language_data): Delete la_parser initializer.
2402 * opencl-lang.c (opencl_language_data): Likewise.
2403 * p-lang.c (pascal_language_data): Likewise.
2404 (pascal_language::parser): New member function.
2405 * parse.c (parse_exp_in_context): Update call to parser.
2406 * rust-lang.c (rust_language_data): Delete la_parser initializer.
2407 (rust_language::parser): New member function.
2408
2409 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2410
2411 * top.c (print_gdb_configuration): Print --with-python-libdir
2412 configuration value.
2413
2414 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2415
2416 * NEWS: Mention change to the alias command.
2417
2418 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2419
2420 * cli/cli-cmds.c (lookup_cmd_for_default_args)
2421 (alias_command_completer)
2422 (make_alias_options_def_group): New functions.
2423 (alias_opts, alias_option_defs): New struct and array.
2424 (alias_usage_error): Update usage.
2425 (alias_command): Handles optional DEFAULT-ARGS... arguments.
2426 Use option framework.
2427 (_initialize_cli_cmds): Update alias command help.
2428 Update aliases command help.
2429 (show_user):
2430 Add NULL for new default_args lookup_cmd argument.
2431 (valid_command_p): Rename to validate_aliased_command.
2432 Add NULL for new default_args lookup_cmd argument. Verify that the
2433 aliased_command has no default args.
2434 * cli/cli-decode.c (help_cmd): Show aliases definitions.
2435 (lookup_cmd_1, lookup_cmd): New argument default_args.
2436 (add_alias_cmd):
2437 Add NULL for new default_args lookup_cmd argument.
2438 (print_help_for_command): Show default args under the layout
2439 alias some_alias = some_aliased_cmd some_alias_default_arg.
2440 * cli/cli-decode.h (struct cmd_list_element): New member default_args.
2441 xfree default_args in destructor.
2442 * cli/cli-script.c (process_next_line, do_define_command):
2443 Add NULL for new default_args lookup_cmd argument.
2444 * command.h: Declare new default_args argument in lookup_cmd
2445 and lookup_cmd_1.
2446 * completer.c (complete_line_internal_1):
2447 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
2448 * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
2449 * guile/scm-param.c (add_setshow_generic, pascm_parameter_defined_p):
2450 Likewise.
2451 * infcmd.c (_initialize_infcmd): Likewise.
2452 * python/py-auto-load.c (gdbpy_initialize_auto_load): Likewise.
2453 * python/py-cmd.c (gdbpy_parse_command_name): Likewise.
2454 * python/py-param.c (add_setshow_generic): Likewise.
2455 * remote.c (_initialize_remote): Likewise.
2456 * top.c (execute_command): Prepend default_args if command has some.
2457 (set_verbose):
2458 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
2459 * tracepoint.c (validate_actionline, encode_actions_1):
2460 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
2461
2462 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2463
2464 * jit.c (jit_read_descriptor): Use bool as the return type.
2465 (jit_breakpoint_re_set_internal): Use bool as the return type.
2466 Invert the return value logic; return true if the jit breakpoint
2467 has been successfully initialized.
2468 (jit_inferior_init): Update the call to
2469 jit_breakpoint_re_set_internal.
2470
2471 2020-06-22 Pedro Alves <palves@redhat.com>
2472
2473 PR gdb/25939
2474 * procfs.c (procfs_target::wait): Don't reference inferior_ptid.
2475 Use the current inferior instead. Don't return
2476 TARGET_WAITKIND_SPURIOUS/inferior_ptid -- instead continue and
2477 wait again.
2478 * sol-thread.c (sol_thread_target::wait): Don't reference
2479 inferior_ptid.
2480 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs)
2481 (sol_update_thread_list_callback): Use the current inferior's pid
2482 instead of inferior_ptid.
2483
2484 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2485
2486 * procfs.c: Cleanup many comments.
2487
2488 (READ_WATCHFLAG, WRITE_WATCHFLAG, EXEC_WATCHFLAG)
2489 (AFTER_WATCHFLAG): Replace by value.
2490
2491 (MAIN_PROC_NAME_FORMAT): Inline ...
2492 (create_procinfo): ... here.
2493
2494 (procfs_debug_inferior): Remove SYS_exec handling.
2495 (syscall_is_exec): Likewise.
2496 (procfs_set_exec_trap): Likewise.
2497
2498 (syscall_is_lwp_exit): Inline in callers.
2499 (syscall_is_exit): Likewise.
2500 (syscall_is_exec): Likewise.
2501 (syscall_is_lwp_create): Likewise.
2502
2503 (invalidate_cache): Remove #if 0 code.
2504
2505 (make_signal_thread_runnable): Remove.
2506 (procfs_target::resume): Remove #if 0 code.
2507
2508 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2509
2510 PR gdb/25939
2511 * procfs.c (procfs_target::procfs_init_inferior): Move push_target
2512 call ...
2513 (procfs_target::create_inferior): ... here.
2514
2515 2020-06-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2516
2517 * exec.c (validate_exec_file): Ensure the build-id is up to
2518 date by calling reopen_exec_file (that checks file timestamp
2519 to decide to re-read the file).
2520
2521 2020-06-18 Pedro Alves <palves@redhat.com>
2522
2523 PR gdb/25412
2524 * gdbthread.h (delete_thread, delete_thread_silent)
2525 (find_thread_ptid): Update comments.
2526 * thread.c (current_thread_): New global.
2527 (is_current_thread): Move higher, and reimplement.
2528 (inferior_thread): Reimplement.
2529 (set_thread_exited): Use bool. Add assertions.
2530 (add_thread_silent): Simplify thread-reuse handling by always
2531 calling delete_thread.
2532 (delete_thread): Remove intro comment.
2533 (find_thread_ptid): Skip exited threads.
2534 (switch_to_thread_no_regs): Write to current_thread_.
2535 (switch_to_no_thread): Check CURRENT_THREAD_ instead of
2536 INFERIOR_PTID. Clear current_thread_.
2537
2538 2020-06-18 Pedro Alves <palves@redhat.com>
2539
2540 * aix-thread.c (pd_update): Use switch_to_thread.
2541
2542 2020-06-18 Pedro Alves <palves@redhat.com>
2543
2544 * ravenscar-thread.c (ravenscar_thread_target): Update.
2545 (ravenscar_thread_target::update_inferior_ptid): Rename to ...
2546 (ravenscar_thread_target::add_active_thread): ... this. Don't
2547 set m_base_ptid here. Update to avoid referencing inferior_ptid.
2548 (ravenscar_thread_target::wait): Don't write to inferior_ptid.
2549
2550 2020-06-18 Pedro Alves <palves@redhat.com>
2551
2552 * nat/windows-nat.c (current_windows_thread): Remove.
2553 * nat/windows-nat.h (current_windows_thread): Remove.
2554 * windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
2555 Adjust.
2556 (display_selectors): Adjust to fetch the current
2557 windows_thread_info based on inferior_ptid.
2558 (fake_create_process): No longer write to current_windows_thread.
2559 (windows_nat_target::get_windows_debug_event):
2560 Don't set inferior_ptid or current_windows_thread.
2561 (windows_nat_target::wait): Adjust to not rely on
2562 current_windows_thread.
2563 (do_initial_windows_stuff): Now a method of windows_nat_target.
2564 Switch to the last_ptid thread.
2565 (windows_nat_target::attach): Adjust.
2566 (windows_nat_target::detach): Use switch_to_no_thread instead of
2567 writing to inferior_ptid directly.
2568 (windows_nat_target::create_inferior): Adjust.
2569
2570 2020-06-18 Pedro Alves <palves@redhat.com>
2571
2572 * windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
2573
2574 2020-06-18 Pedro Alves <palves@redhat.com>
2575
2576 * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
2577 after creating it, instead of writing to inferior_ptid. Don't
2578 write to inferior_ptid.
2579
2580 2020-06-18 Pedro Alves <palves@redhat.com>
2581
2582 * fork-child.c (postfork_hook): Don't write to inferior_ptid.
2583
2584 2020-06-18 Pedro Alves <palves@redhat.com>
2585
2586 * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
2587 it, instead of writing to inferior_ptid.
2588
2589 2020-06-18 Pedro Alves <palves@redhat.com>
2590
2591 * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
2592 to inferior_ptid.
2593
2594 2020-06-18 Pedro Alves <palves@redhat.com>
2595
2596 * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
2597 instead of writing to inferior_ptid directly.
2598
2599 2020-06-18 Pedro Alves <palves@redhat.com>
2600
2601 * corelow.c (core_target::close): Use switch_to_no_thread instead
2602 of writing to inferior_ptid directly.
2603 (add_to_thread_list, core_target_open): Use switch_to_thread
2604 instead of writing to inferior_ptid directly.
2605
2606 2020-06-18 Pedro Alves <palves@redhat.com>
2607
2608 * darwin-nat.c (darwin_nat_target::decode_message): Don't write to
2609 inferior_ptid.
2610 (darwin_nat_target::stop_inferior, darwin_nat_target::kill): Avoid
2611 inferior_ptid.
2612 (darwin_attach_pid): Use switch_to_no_thread instead of writing to
2613 inferior_ptid directly.
2614 (darwin_nat_target::init_thread_list): Switch to thread, instead
2615 of writing to inferior_ptid.
2616 (darwin_nat_target::attach): Don't write to inferior_ptid.
2617 (darwin_nat_target::get_ada_task_ptid): Avoid inferior_ptid.
2618
2619 2020-06-18 Pedro Alves <palves@redhat.com>
2620
2621 * gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
2622 thread.
2623 (gnu_nat_target::attach): Don't write to inferior_ptid directly.
2624 Instead use switch_to_thread.
2625 (gnu_nat_target::detach): Use switch_to_no_thread
2626 instead of writing to inferior_ptid directly. Used passed-in
2627 inferior instead of looking up the inferior by pid.
2628
2629 2020-06-18 Pedro Alves <palves@redhat.com>
2630
2631 * go32-nat.c (go32_nat_target::create_inferior): Don't write to
2632 inferior_ptid.
2633
2634 2020-06-18 Pedro Alves <palves@redhat.com>
2635
2636 * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
2637 inferior_ptid.
2638 (nto_procfs_target::attach): Avoid inferior_ptid. Switch to
2639 thread.
2640 (nto_procfs_target::detach): Avoid referencing
2641 inferior_ptid. Use switch_to_no_thread instead of writing to
2642 inferior_ptid directly.
2643 (nto_procfs_target::mourn_inferior): Use switch_to_no_thread
2644 instead of writing to inferior_ptid directly.
2645 (nto_procfs_target::create_inferior): Avoid inferior_ptid. Switch
2646 to thread.
2647
2648 2020-06-18 Pedro Alves <palves@redhat.com>
2649
2650 * remote-sim.c (gdbsim_target::create_inferior): Switch to thread
2651 after creating it, instead of writing to inferior_ptid.
2652 (gdbsim_target_open): Use switch_to_no_thread instead of writing
2653 to inferior_ptid directly.
2654 (gdbsim_target::wait): Don't write to inferior_ptid.
2655
2656 2020-06-18 Pedro Alves <palves@redhat.com>
2657
2658 * remote.c (remote_target::remote_notice_new_inferior): Use
2659 switch_to_thread instead of writing to inferior_ptid directly.
2660 (remote_target::add_current_inferior_and_thread): Use
2661 switch_to_no_thread instead of writing to inferior_ptid directly.
2662 (extended_remote_target::attach): Use switch_to_inferior_no_thread
2663 and switch_to_thread instead of using set_current_inferior or
2664 writing to inferior_ptid directly.
2665
2666 2020-06-18 Pedro Alves <palves@redhat.com>
2667
2668 * tracectf.c (ctf_target_open): Switch to added thread instead of
2669 writing to inferior_ptid directly.
2670 (ctf_target::close): Use switch_to_no_thread instead of writing to
2671 inferior_ptid directly.
2672
2673 2020-06-18 Pedro Alves <palves@redhat.com>
2674
2675 * tracefile-tfile.c (tfile_target_open): Don't write to
2676 inferior_ptid directly, instead switch to added thread.
2677 (tfile_target::close): Use switch_to_no_thread instead of writing
2678 to inferior_ptid directly.
2679
2680 2020-06-18 Pedro Alves <palves@redhat.com>
2681
2682 * procfs.c (procfs_target::attach): Don't write to inferior_ptid.
2683 (procfs_target::detach): Use switch_to_no_thread
2684 instead of writing to inferior_ptid directly.
2685 (do_attach): Change return type to void. Switch to the added
2686 thread.
2687 (procfs_target::create_inferior): Switch to the added thread.
2688 (procfs_do_thread_registers): Don't write to inferior_ptid.
2689
2690 2020-06-18 Pedro Alves <palves@redhat.com>
2691
2692 * infrun.c (generic_mourn_inferior): Use switch_to_thread instead
2693 of writing to inferior_ptid.
2694 (scoped_restore_exited_inferior): Delete.
2695 (handle_vfork_child_exec_or_exit): Simplify using
2696 scoped_restore_current_pspace_and_thread. Use switch_to_thread
2697 instead of writing to inferior_ptid.
2698 (THREAD_STOPPED_BY): Delete.
2699 (thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
2700 (thread_stopped_by_hw_breakpoint): Delete.
2701 (save_waitstatus): Use
2702 scoped_restore_current_thread+switch_to_thread, and call
2703 target_stopped_by_watchpoint instead of
2704 thread_stopped_by_watchpoint, target_stopped_by_sw_breakpoint
2705 instead of thread_stopped_by_sw_breakpoint, and
2706 target_stopped_by_hw_breakpoint instead of
2707 thread_stopped_by_hw_breakpoint.
2708 (handle_inferior_event)
2709 <TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Don't write to
2710 inferior_ptid directly, nor
2711 set_current_inferior/set_current_program_space. Use
2712 switch_to_thread / switch_to_inferior_no_thread instead.
2713
2714 2020-06-18 Pedro Alves <palves@redhat.com>
2715
2716 * target.c (generic_mourn_inferior): Use switch_to_no_thread
2717 instead of writing to inferior_ptid.
2718
2719 2020-06-18 Pedro Alves <palves@redhat.com>
2720
2721 * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the
2722 added thread.
2723 (inf_ptrace_target::attach): Don't write to inferior_ptid. Switch
2724 to the added thread.
2725 (inf_ptrace_target::detach_success): Use switch_to_no_thread
2726 instead of writing to inferior_ptid.
2727
2728 2020-06-18 Pedro Alves <palves@redhat.com>
2729
2730 * gdbarch-selftests.c: Include "progspace-and-thread.h".
2731 (register_to_value_test): Mock a program_space too. Heap-allocate
2732 the address space. Don't write to inferior_ptid. Use
2733 switch_to_thread instead.
2734
2735 2020-06-18 Pedro Alves <palves@redhat.com>
2736
2737 * linux-tdep.c (find_signalled_thread(thread_info *,void *)):
2738 Delete.
2739 (find_signalled_thread()): New, factored out from
2740 linux_make_corefile_notes and adjusted to handle exited threads.
2741 (linux_make_corefile_notes): Adjust to use the new
2742 find_signalled_thread.
2743
2744 2020-06-18 Pedro Alves <palves@redhat.com>
2745
2746 * linux-tdep.c (btrace_fetch): Save/restore current thread instead
2747 of saving/restoring inferior_ptid.
2748
2749 2020-06-17 Tom Tromey <tom@tromey.com>
2750
2751 * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
2752 (tui_scroll_left, tui_scroll_right, struct tui_win_info): Don't
2753 declare.
2754 * tui/tui-data.h (MIN_CMD_WIN_HEIGHT): Remove.
2755
2756 2020-06-15 Simon Marchi <simon.marchi@efficios.com>
2757
2758 * dwarf2/read.c (dwarf2_initialize_objfile): Check for presence
2759 of partial symtabs.
2760
2761 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2762
2763 * regformats/reg-arm.dat: Remove.
2764 * regformats/reg-bfin.dat: Remove.
2765 * regformats/reg-cris.dat: Remove.
2766 * regformats/reg-crisv32.dat: Remove.
2767 * regformats/reg-m32r.dat: Remove.
2768 * regformats/reg-tilegx.dat: Remove.
2769 * regformats/reg-tilegx32.dat: Remove.
2770
2771 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2772
2773 * features/Makefile (WHICH): Remove arm files.
2774 * regformats/arm/arm-with-iwmmxt.dat: Remove.
2775 * regformats/arm/arm-with-neon.dat: Remove.
2776 * regformats/arm/arm-with-vfpv2.dat: Remove.
2777 * regformats/arm/arm-with-vfpv3.dat: Remove.
2778
2779 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
2780
2781 * features/Makefile (XMLTOC): Remove rx.xml.
2782
2783 2020-06-17 Pedro Alves <palves@redhat.com>
2784
2785 * gdbthread.h (thread_control_state) <trap_expected> Update
2786 comments.
2787
2788 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2789
2790 * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
2791 ada_language::lookup_symbol_nonlocal.
2792 (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
2793 (ada_language::lookup_symbol_nonlocal): New member function,
2794 implementation from ada_lookup_symbol_nonlocal.
2795 * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
2796 initializer.
2797 (cplus_language_data): Delete la_lookup_symbol_nonlocal
2798 initializer.
2799 (cplus_language::lookup_symbol_nonlocal): New member function.
2800 (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
2801 (minimal_language_data) Likewise.
2802 * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
2803 * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
2804 initializer.
2805 (d_language::lookup_symbol_nonlocal): New member function.
2806 * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
2807 initializer.
2808 (f_language::lookup_symbol_nonlocal): New member function.
2809 * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
2810 initializer.
2811 * language.c (unknown_language_data): Likewise.
2812 (auto_language_data): Likewise.
2813 * language.h (language_data): Delete la_lookup_symbol_nonlocal
2814 field.
2815 (language_defn::lookup_symbol_nonlocal): New member function.
2816 * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
2817 initializer.
2818 * objc-lang.c (objc_language_data): Likewise.
2819 * opencl-lang.c (opencl_language_data): Likewise.
2820 * p-lang.c (pascal_language_data): Likewise.
2821 * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
2822 rust_language::lookup_symbol_nonlocal.
2823 (rust_language_data): Delete la_lookup_symbol_nonlocal
2824 initializer.
2825 (rust_language::lookup_symbol_nonlocal): New member function,
2826 implementation from rust_lookup_symbol_nonlocal.
2827 * symtab.c (lookup_symbol_aux): Update call to
2828 lookup_symbol_nonlocal.
2829 (basic_lookup_symbol_nonlocal): Rename to...
2830 (language_defn::lookup_symbol_nonlocal): ...this, and update
2831 header comment. Remove language_defn parameter, and replace with
2832 uses of `this'.
2833 * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
2834
2835 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2836
2837 * ada-lang.c (ada_language_data): Delete la_value_print_inner
2838 initializer.
2839 (ada_language::value_print_inner): New member function.
2840 * c-lang.c (c_language_data): Delete la_value_print_inner
2841 initializer.
2842 (cplus_language_data): Likewise.
2843 (asm_language_data): Likewise.
2844 (minimal_language_data): Likewise.
2845 * d-lang.c (d_language_data): Likewise.
2846 (d_language::value_print_inner): New member function.
2847 * f-lang.c (f_language_data): Delete la_value_print_inner
2848 initializer.
2849 (f_language::value_print_inner): New member function.
2850 * f-lang.h (f_value_print_innner): Rename to...
2851 (f_value_print_inner): ...this (note spelling of 'inner').
2852 * f-valprint.c (f_value_print_innner): Rename to...
2853 (f_value_print_inner): ...this (note spelling of 'inner').
2854 * go-lang.c (go_language_data): Delete la_value_print_inner
2855 initializer.
2856 (go_language::value_print_inner): New member function.
2857 * language.c (language_defn::value_print_inner): Define new member
2858 function.
2859 (unk_lang_value_print_inner): Delete.
2860 (unknown_language_data): Delete la_value_print_inner initializer.
2861 (unknown_language::value_print_inner): New member function.
2862 (auto_language_data): Delete la_value_print_inner initializer.
2863 (auto_language::value_print_inner): New member function.
2864 * language.h (language_data): Delete la_value_print_inner field.
2865 (language_defn::value_print_inner): Delcare new member function.
2866 * m2-lang.c (m2_language_data): Delete la_value_print_inner
2867 initializer.
2868 (m2_language::value_print_inner): New member function.
2869 * objc-lang.c (objc_language_data): Delete la_value_print_inner
2870 initializer.
2871 * opencl-lang.c (opencl_language_data): Likewise.
2872 * p-lang.c (pascal_language_data): Likewise.
2873 (pascal_language::value_print_inner): New member function.
2874 * rust-lang.c (rust_language_data): Delete la_value_print_inner
2875 initializer.
2876 (rust_language::value_print_inner): New member function.
2877 * valprint.c (do_val_print): Update call to value_print_inner.
2878
2879 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2880
2881 * ada-lang.c (ada_language_data): Delete la_value_print
2882 initializer.
2883 (ada_language::value_print): New member function.
2884 * c-lang.c (c_language_data): Delete la_value_print initializer.
2885 (cplus_language_data): Likewise.
2886 (asm_language_data): Likewise.
2887 (minimal_language_data): Likewise.
2888 * d-lang.c (d_language_data): Likewise.
2889 * f-lang.c (f_language_data): Likewise.
2890 * go-lang.c (go_language_data): Likewise.
2891 * language.c (unk_lang_value_print): Delete.
2892 (language_defn::value_print): Define new member function.
2893 (unknown_language_data): Delete la_value_print initializer.
2894 (unknown_language::value_print): New member function.
2895 (auto_language_data): Delete la_value_print initializer.
2896 (auto_language::value_print): New member function.
2897 * language.h (language_data): Delete la_value_print field.
2898 (language_defn::value_print): Declare new member function.
2899 (LA_VALUE_PRINT): Update call to value_print.
2900 * m2-lang.c (m2_language_data): Delete la_value_print initializer.
2901 * objc-lang.c (objc_language_data): Likewise.
2902 * opencl-lang.c (opencl_language_data): Likewise.
2903 * p-lang.c (pascal_language_data): Likewise.
2904 (pascal_language::value_print): New member function.
2905 * rust-lang.c (rust_language_data): Delete la_value_print
2906 initializer.
2907
2908 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2909
2910 * ada-lang.c (ada_watch_location_expression): Rename to
2911 ada_language::watch_location_expression.
2912 (ada_language_data): Delete la_watch_location_expression
2913 initializer.
2914 (ada_language::watch_location_expression): New member function,
2915 implementation from ada_watch_location_expression.
2916 * breakpoint.c (watch_command_1): Update call to
2917 watch_location_expression.
2918 * c-lang.c (c_watch_location_expression): Rename to
2919 language_defn::watch_location_expression.
2920 (c_language_data): Delete la_watch_location_expression
2921 initializer.
2922 (cplus_language_data): Likewise.
2923 (asm_language_data): Likewise.
2924 (minimal_language_data): Likewise.
2925 * c-lang.h (c_watch_location_expression): Delete declaration.
2926 * d-lang.c (d_language_data): Delete la_watch_location_expression
2927 initializer.
2928 * f-lang.c (f_language_data): Likewise.
2929 * go-lang.c (go_language_data): Likewise.
2930 * language.c (language_defn::watch_location_expression): Member
2931 function implementation from c_watch_location_expression.
2932 (unknown_language_data): Delete la_watch_location_expression
2933 initializer.
2934 (auto_language_data): Likewise.
2935 * language.h (language_data): Delete la_watch_location_expression
2936 field.
2937 (language_defn::watch_location_expression): Declare new member
2938 function.
2939 * m2-lang.c (m2_language_data): Delete
2940 la_watch_location_expression initializer.
2941 * objc-lang.c (objc_language_data): Likewise.
2942 * opencl-lang.c (opencl_language_data): Likewise.
2943 * p-lang.c (pascal_language_data): Likewise.
2944 * rust-lang.c (rust_watch_location_expression): Rename to
2945 rust_language::watch_location_expression.
2946 (rust_language_data): Delete la_watch_location_expression
2947 initializer.
2948 (rust_language::watch_location_expression): New member function,
2949 implementation from rust_watch_location_expression.
2950
2951 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2952
2953 * ada-lang.c (ada_collect_symbol_completion_matches): Rename to
2954 ada_language::collect_symbol_completion_matches.
2955 (ada_language_data): Delete la_collect_symbol_completion_matches
2956 initializer.
2957 (ada_language::collect_symbol_completion_matches): New member
2958 function, implementation from
2959 ada_collect_symbol_completion_matches.
2960 * c-lang.c (c_language_data): Delete
2961 la_collect_symbol_completion_matches initializer.
2962 (cplus_language_data): Likewise.
2963 (asm_language_data): Likewise.
2964 (minimal_language_data): Likewise.
2965 * d-lang.c (d_language_data): Likewise.
2966 * f-lang.c (f_collect_symbol_completion_matches): Rename to
2967 f_language::collect_symbol_completion_matches.
2968 (f_language_data): Delete la_collect_symbol_completion_matches
2969 initializer.
2970 (f_language::collect_symbol_completion_matches) New member
2971 function, implementation from f_collect_symbol_completion_matches.
2972 * go-lang.c (go_language_data): Delete
2973 la_collect_symbol_completion_matches initializer.
2974 * language.c (unknown_language_data): Likewise.
2975 (auto_language_data): Likewise.
2976 * language.h (language_data): Delete
2977 la_collect_symbol_completion_matches field.
2978 (language_defn::collect_symbol_completion_matches): New member
2979 function.
2980 * m2-lang.c (m2_language_data): Delete
2981 la_collect_symbol_completion_matches initializer.
2982 * objc-lang.c (objc_language_data): Likewise.
2983 * opencl-lang.c (opencl_language_data): Likewise.
2984 * p-lang.c (pascal_language_data): Likewise.
2985 * rust-lang.c (rust_language_data): Likewise.
2986 * symtab.c (default_collect_symbol_completion_matches): Delete.
2987 (collect_symbol_completion_matches): Update call to
2988 collect_symbol_completion_matches.
2989 (collect_symbol_completion_matches_type): Likewise.
2990 * symtab.h (default_collect_symbol_completion_matches): Delete
2991 declaration.
2992
2993 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
2994
2995 * ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
2996 (ada_language_data): Delete la_word_break_characters initializer.
2997 (ada_language::word_break_characters): New member function.
2998 * c-lang.c (c_language_data): Delete la_word_break_characters
2999 initializer.
3000 (cplus_language_data): Likewise.
3001 (asm_language_data): Likewise.
3002 (minimal_language_data): Likewise.
3003 * completer.c: Update global comment.
3004 (advance_to_expression_complete_word_point): Update call to
3005 word_break_characters.
3006 (complete_files_symbols): Likewise.
3007 (complete_line_internal_1): Likewise.
3008 (default_completer_handle_brkchars): Likewise.
3009 (skip_quoted_chars): Likewise.
3010 * d-lang.c (d_language_data): Delete la_word_break_characters
3011 initializer.
3012 * f-lang.c (f_word_break_characters): Delete.
3013 (f_language_data): Delete la_word_break_characters initializer.
3014 (f_language::word_break_characters): New member function.
3015 * go-lang.c (go_language_data): Delete la_word_break_characters
3016 initializer.
3017 * language.c (unknown_language_data): Likewise.
3018 (auto_language_data): Likewise.
3019 * language.h (default_word_break_characters): Move declaration to
3020 earlier in the file.
3021 (language_data): Delete la_word_break_characters field.
3022 (language_defn::word_break_characters): New member function.
3023 * m2-lang.c (m2_language_data): Delete la_word_break_characters
3024 initializer.
3025 * objc-lang.c (objc_language_data): Likewise.
3026 * opencl-lang.c (opencl_language_data): Likewise.
3027 * p-lang.c (pascal_language_data): Likewise.
3028 * rust-lang.c (rust_language_data): Likewise.
3029
3030 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
3031
3032 * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
3033 (ada_language_data): Delete la_get_symbol_name_matcher
3034 initializer.
3035 (language_defn::get_symbol_name_matcher_inner): New member
3036 function.
3037 * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
3038 initializer.
3039 (cplus_language_data): Likewise.
3040 (cplus_language::get_symbol_name_matcher_inner): New member
3041 function.
3042 (asm_language_data): Delete la_get_symbol_name_matcher initializer.
3043 (minimal_language_data): Likewise.
3044 * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
3045 * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
3046 initializer.
3047 * dictionary.c (iter_match_first_hashed): Update call to
3048 get_symbol_name_matcher.
3049 (iter_match_next_hashed): Likewise.
3050 (iter_match_next_linear): Likewise.
3051 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
3052 * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
3053 initializer.
3054 (f_language::get_symbol_name_matcher_inner): New member function.
3055 * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
3056 initializer.
3057 * language.c (default_symbol_name_matcher): Update header comment,
3058 make static.
3059 (language_defn::get_symbol_name_matcher): New definition.
3060 (language_defn::get_symbol_name_matcher_inner): Likewise.
3061 (get_symbol_name_matcher): Delete.
3062 (unknown_language_data): Delete la_get_symbol_name_matcher
3063 initializer.
3064 (auto_language_data): Likewise.
3065 * language.h (language_data): Delete la_get_symbol_name_matcher
3066 field.
3067 (language_defn::get_symbol_name_matcher): New member function.
3068 (language_defn::get_symbol_name_matcher_inner): Likewise.
3069 (default_symbol_name_matcher): Delete declaration.
3070 * linespec.c (find_methods): Update call to
3071 get_symbol_name_matcher.
3072 * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
3073 initializer.
3074 * minsyms.c (lookup_minimal_symbol): Update call to
3075 get_symbol_name_matcher.
3076 (iterate_over_minimal_symbols): Likewise.
3077 * objc-lang.c (objc_language_data): Delete
3078 la_get_symbol_name_matcher initializer.
3079 * opencl-lang.c (opencl_language_data): Likewise.
3080 * p-lang.c (pascal_language_data): Likewise.
3081 * psymtab.c (psymbol_name_matches): Update call to
3082 get_symbol_name_matcher.
3083 * rust-lang.c (rust_language_data): Delete
3084 la_get_symbol_name_matcher initializer.
3085 * symtab.c (symbol_matches_search_name): Update call to
3086 get_symbol_name_matcher.
3087 (compare_symbol_name): Likewise.
3088
3089 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
3090
3091 * ada-lang.c (ada_language_data): Delete la_compute_program
3092 initializer.
3093 * c-lang.c (c_language_data): Likewise.
3094 (c_language::compute_program): New member function.
3095 (cplus_language_data): Delete la_compute_program initializer.
3096 (cplus_language::compute_program): New member function.
3097 (asm_language_data): Delete la_compute_program initializer.
3098 (minimal_language_data): Likewise.
3099 * c-lang.h (c_compute_program): Update comment.
3100 (cplus_compute_program): Likewise.
3101 * compile/compile-c-support.c (c_compute_program): Likewise.
3102 (cplus_compute_program): Likewise.
3103 * compile/compile.c (compile_to_object): Update call to
3104 la_compute_program.
3105 * d-lang.c (d_language_data): Delete la_compute_program
3106 initializer.
3107 * f-lang.c (f_language_data): Likewise.
3108 * go-lang.c (go_language_data): Likewise.
3109 * language.c (unknown_language_data): Likewise.
3110 (auto_language_data): Likewise.
3111 * language.h (language_data): Delete la_compute_program field.
3112 (language_defn::compute_program): New member function.
3113 * m2-lang.c (m2_language_data): Delete la_compute_program
3114 initializer.
3115 * objc-lang.c (objc_language_data): Likewise.
3116 * opencl-lang.c (opencl_language_data): Likewise.
3117 * p-lang.c (pascal_language_data): Likewise.
3118 * rust-lang.c (rust_language_data): Likewise.
3119
3120 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
3121
3122 * ada-lang.c (ada_language_data) Delete
3123 la_class_name_from_physname initializer.
3124 * c-lang.c (c_language_data): Likewise.
3125 (cplus_language_data): Likewise.
3126 (cplus_language::class_name_from_physname): New member function.
3127 (asm_language_data): Delete la_class_name_from_physname
3128 initializer.
3129 (minimal_language_data): Likewise.
3130 * d-lang.c (d_language_data): Likewise.
3131 * dwarf2/read.c (guess_partial_die_structure_name): Update to call
3132 method on language_defn class.
3133 (guess_full_die_structure_name): Likewise.
3134 * f-lang.c (f_language_data): Delete la_class_name_from_physname
3135 initializer.
3136 * go-lang.c (go_language_data): Likewise.
3137 * language.c (language_class_name_from_physname): Delete.
3138 (unk_lang_class_name): Delete.
3139 (unknown_language_data): Delete la_class_name_from_physname
3140 initializer.
3141 (auto_language_data): Likewise.
3142 * language.h (language_data): Delete la_class_name_from_physname
3143 field.
3144 (language_defn::class_name_from_physname): New function.
3145 (language_class_name_from_physname): Delete declaration.
3146 * m2-lang.c (m2_language_data): Delete la_class_name_from_physname
3147 initializer.
3148 * objc-lang.c (objc_language_data): Likewise.
3149 * opencl-lang.c (opencl_language_data): Likewise.
3150 * p-lang.c (pascal_language_data): Likewise.
3151 * rust-lang.c (rust_language_data): Likewise.
3152
3153 2020-06-16 Tom Tromey <tom@tromey.com>
3154
3155 * tui/tui-data.h (STATUS_NAME): New macro.
3156 * tui/tui-layout.c (tui_remove_some_windows)
3157 (initialize_known_windows, tui_register_window)
3158 (tui_layout_split::remove_windows, initialize_layouts)
3159 (tui_new_layout_command): Don't use hard-coded window names.
3160
3161 2020-06-16 Tom Tromey <tom@tromey.com>
3162
3163 PR tui/25348:
3164 * tui/tui.c (tui_ensure_readline_initialized): Rename from
3165 tui_initialize_readline. Only run once. Call rl_initialize.
3166 * tui/tui.h (tui_ensure_readline_initialized): Rename from
3167 tui_initialize_readline.
3168 * tui/tui-io.c (tui_setup_io): Call
3169 tui_ensure_readline_initialized.
3170 * tui/tui-interp.c (tui_interp::init): Update.
3171
3172 2020-06-16 Tom Tromey <tom@tromey.com>
3173
3174 * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
3175 Also preserve the status window.
3176
3177 2020-06-16 Tom Tromey <tom@tromey.com>
3178
3179 * python/py-tui.c (tui_py_window::~tui_py_window): Handle case
3180 where m_window==nullptr.
3181
3182 2020-06-15 Tom Tromey <tromey@adacore.com>
3183
3184 * windows-nat.c (windows_nat::handle_output_debug_string):
3185 Update.
3186 (windows_nat::handle_ms_vc_exception): Update.
3187 * target.h (target_read_string): Change API.
3188 * target.c (target_read_string): Change API.
3189 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
3190 Update.
3191 * solib-frv.c (frv_current_sos): Update.
3192 * solib-dsbt.c (dsbt_current_sos): Update.
3193 * solib-darwin.c (darwin_current_sos): Update.
3194 * linux-thread-db.c (inferior_has_bug): Update.
3195 * expprint.c (print_subexp_standard): Update.
3196 * ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
3197 (ada_exception_message_1): Update.
3198
3199 2020-06-15 Tom Tromey <tromey@adacore.com>
3200
3201 * linux-tdep.c (dump_mapping_p): Use target_read_memory.
3202
3203 2020-06-15 Tom Tromey <tromey@adacore.com>
3204
3205 * valprint.c (read_string): Update comment.
3206 * target.c (MIN): Remove.
3207 (target_read_string): Rewrite.
3208
3209 2020-06-15 Tom Tromey <tromey@adacore.com>
3210
3211 * corefile.c (read_memory_string): Remove.
3212 * ada-valprint.c (ada_value_print_ptr): Update.
3213 * ada-lang.h (ada_tag_name): Change return type.
3214 * ada-lang.c (type_from_tag): Update.
3215 (ada_tag_name_from_tsd): Change return type. Use
3216 target_read_string.
3217 (ada_tag_name): Likewise.
3218 * gdbcore.h (read_memory_string): Don't declare.
3219
3220 2020-06-14 Hannes Domani <ssbssa@yahoo.de>
3221
3222 * symtab.c (rbreak_command): Ignore Windows drive colon.
3223
3224 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
3225
3226 * NEWS: Mention removed GDBserver host support.
3227
3228 2020-06-12 Nelson Chu <nelson.chu@sifive.com>
3229
3230 * features/riscv/rebuild-csr-xml.sh: Updated.
3231
3232 2020-06-11 Tom Tromey <tom@tromey.com>
3233
3234 PR gdb/18318:
3235 * c-exp.y (lex_one_token): Handle 'p' like 'e'.
3236
3237 2020-06-09 Jonny Grant <jg@jguk.org>
3238 2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
3239
3240 * main.c (captured_main_1): Don't print new line after help.
3241 (print_gdb_help): add mailing list and IRC channel information
3242 to --help. Add new lines between items in the footer. Remove
3243 quotes around bug url.
3244
3245 2020-06-11 Keith Seitz <keiths@redhat.com>
3246
3247 PR gdb/21356
3248 * gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
3249 Resolve typedefs for type length calculations.
3250
3251 2020-06-10 Tom de Vries <tdevries@suse.de>
3252
3253 PR ada/24713
3254 * dwarf2/index-write.c (struct mapped_symtab): Add m_string_obstack.
3255 (write_psymbols): Enable .gdb_index for ada.
3256 * dwarf2/read.c: Remove comment stating .gdb_index is unsupported for
3257 ada.
3258
3259 2020-06-10 Tom de Vries <tdevries@suse.de>
3260
3261 * dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
3262 (dw2_symtab_iter_init): ... here. Add variant with "offset_type
3263 namei" instead of "const char *name" argument.
3264 (dw2_map_matching_symbols): Use "offset_type namei" variant of
3265 dw2_symtab_iter_init.
3266
3267 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3268
3269 * gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
3270 to use type::field and field::type instead.
3271
3272 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3273
3274 * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites
3275 to use field::type instead.
3276
3277 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3278
3279 * gdbtypes.h (struct field) <type, set_type>: New methods.
3280 Rename `type` field to...
3281 <m_type>: ... this. Change references throughout to use type or
3282 set_type methods.
3283 (FIELD_TYPE): Use field::type. Change call sites that modify
3284 the field's type to use field::set_type instead.
3285
3286 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3287
3288 * gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
3289 to use type::index_type instead.
3290
3291 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
3292
3293 * gdbtypes.h (struct type) <index_type, set_index_type>: New
3294 methods.
3295 (TYPE_INDEX_TYPE): Use type::index_type.
3296 * gdbtypes.c (create_array_type_with_stride): Likewise.
3297
3298 2020-06-07 Tom Tromey <tom@tromey.com>
3299
3300 * valprint.c (generic_val_print_float): Remove "embedded_offset"
3301 parameter.
3302 (generic_value_print): Update.
3303
3304 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
3305
3306 Revert commit 982a38f60b0.
3307 * python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
3308
3309 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
3310
3311 * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
3312 avoid use after free.
3313
3314 2020-06-05 Tom de Vries <tdevries@suse.de>
3315
3316 * NEWS: Fix typos.
3317
3318 2020-06-04 Simon Marchi <simon.marchi@efficios.com>
3319
3320 * dwarf2/read.c (dwarf2_read_gdb_index): Save partial_symtabs in
3321 the per_bfd object.
3322 (dwarf2_read_debug_names): Likewise.
3323 (dwarf2_initialize_objfile): Use partial_symtabs from per_bfd
3324 object when re-using a per_bfd object with an index.
3325
3326 2020-06-03 Tom de Vries <tdevries@suse.de>
3327
3328 PR symtab/26046
3329 * dwarf2/read.c (scan_partial_symbols): Recurse into DW_TAG_subprogram
3330 children for C++.
3331 (load_partial_dies): Don't skip DW_TAG_inlined_subroutine child of
3332 DW_TAG_subprogram.
3333
3334 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3335
3336 * ada-lang.c (ada_language_data): Delete skip_trampoline
3337 initializer.
3338 * c-lang.c (c_language_data): Likewise.
3339 (cplus_language_data): Likewise.
3340 (cplus_language::skip_trampoline): New member function.
3341 (asm_language_data): Delete skip_trampoline initializer.
3342 (minimal_language_data): Likewise.
3343 * d-lang.c (d_language_data): Likewise.
3344 * f-lang.c (f_language_data): Likewise.
3345 * go-lang.c (go_language_data): Likewise.
3346 * language.c (unk_lang_trampoline): Delete function.
3347 (skip_language_trampoline): Update.
3348 (unknown_language_data): Delete skip_trampoline initializer.
3349 (auto_language_data): Likewise.
3350 * language.h (language_data): Delete skip_trampoline field.
3351 (language_defn::skip_trampoline): New function.
3352 * m2-lang.c (m2_language_data): Delete skip_trampoline
3353 initializer.
3354 * objc-lang.c (objc_skip_trampoline): Delete function, move
3355 implementation to objc_language::skip_trampoline.
3356 (objc_language_data): Delete skip_trampoline initializer.
3357 (objc_language::skip_trampoline): New member function with
3358 implementation from objc_skip_trampoline.
3359 * opencl-lang.c (opencl_language_data): Delete skip_trampoline
3360 initializer.
3361 * p-lang.c (pascal_language_data): Likewise.
3362 * rust-lang.c (rust_language_data): Likewise.
3363
3364 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3365
3366 * ada-lang.c (ada_language_data): Delete la_demangle initializer.
3367 (ada_language::demangle): New member function.
3368 * c-lang.c (c_language_data): Delete la_demangle initializer.
3369 (cplus_language_data): Delete la_demangle initializer.
3370 (cplus_language::demangle): New member function.
3371 (asm_language_data): Delete la_demangle initializer.
3372 (minimal_language_data): Delete la_demangle initializer.
3373 * d-lang.c (d_language_data): Delete la_demangle initializer.
3374 (d_language::demangle): New member function.
3375 * f-lang.c (f_language_data): Delete la_demangle initializer.
3376 (f_language::demangle): New member function.
3377 * go-lang.c (go_language_data): Delete la_demangle initializer.
3378 (go_language::demangle): New member function.
3379 * language.c (language_demangle): Update.
3380 (unk_lang_demangle): Delete.
3381 (unknown_language_data): Delete la_demangle initializer.
3382 (unknown_language::demangle): New member function.
3383 (auto_language_data): Delete la_demangle initializer.
3384 (auto_language::demangle): New member function.
3385 * language.h (language_data): Delete la_demangle field.
3386 (language_defn::demangle): New function.
3387 * m2-lang.c (m2_language_data): Delete la_demangle initializer.
3388 * objc-lang.c (objc_language_data): Delete la_demangle
3389 initializer.
3390 (objc_language::demangle): New member function.
3391 * opencl-lang.c (opencl_language_data): Delete la_demangle
3392 initializer.
3393 * p-lang.c (pascal_language_data): Likewise.
3394 * rust-lang.c (rust_language_data): Likewise.
3395 (rust_language::demangle): New member function.
3396
3397 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3398
3399 * ada-lang.c (ada_language_data): Delete la_print_type
3400 initializer.
3401 (ada_language::print_type): New member function.
3402 * c-lang.c (c_language_data): Delete la_print_type initializer.
3403 (c_language::print_type): New member function.
3404 (cplus_language_data): Delete la_print_type initializer.
3405 (cplus_language::print_type): New member function.
3406 (asm_language_data): Delete la_print_type initializer.
3407 (asm_language::print_type): New member function.
3408 (minimal_language_data): Delete la_print_type initializer.
3409 (minimal_language::print_type): New member function.
3410 * d-lang.c (d_language_data): Delete la_print_type initializer.
3411 (d_language::print_type): New member function.
3412 * f-lang.c (f_language_data): Delete la_print_type initializer.
3413 (f_language::print_type): New member function.
3414 * go-lang.c (go_language_data): Delete la_print_type initializer.
3415 (go_language::print_type): New member function.
3416 * language.c (unk_lang_print_type): Delete.
3417 (unknown_language_data): Delete la_print_type initializer.
3418 (unknown_language::print_type): New member function.
3419 (auto_language_data): Delete la_print_type initializer.
3420 (auto_language::print_type): New member function.
3421 * language.h (language_data): Delete la_print_type field.
3422 (language_defn::print_type): New function.
3423 (LA_PRINT_TYPE): Update.
3424 * m2-lang.c (m2_language_data): Delete la_print_type initializer.
3425 (m2_language::print_type): New member function.
3426 * objc-lang.c (objc_language_data): Delete la_print_type
3427 initializer.
3428 (objc_language::print_type): New member function.
3429 * opencl-lang.c (opencl_print_type): Delete, implementation moved
3430 to opencl_language::print_type.
3431 (opencl_language_data): Delete la_print_type initializer.
3432 (opencl_language::print_type): New member function, implementation
3433 from opencl_print_type.
3434 * p-lang.c (pascal_language_data): Delete la_print_type
3435 initializer.
3436 (pascal_language::print_type): New member function.
3437 * rust-lang.c (rust_print_type): Delete, implementation moved to
3438 rust_language::print_type.
3439 (rust_language_data): Delete la_print_type initializer.
3440 (rust_language::print_type): New member function, implementation
3441 from rust_print_type.
3442
3443 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3444
3445 * ada-lang.c (ada_sniff_from_mangled_name): Delete function,
3446 implementation moves to...
3447 (ada_language::sniff_from_mangled_name): ...here. Update return
3448 type.
3449 (ada_language_data): Delete la_sniff_from_mangled_name
3450 initializer.
3451 * c-lang.c (c_language_data): Likewise.
3452 (cplus_language_data): Likewise.
3453 (cplus_language::sniff_from_mangled_name): New member function,
3454 implementation taken from gdb_sniff_from_mangled_name.
3455 (asm_language_data): Delete la_sniff_from_mangled_name
3456 initializer.
3457 (minimal_language_data): Likewise.
3458 * cp-support.c (gdb_sniff_from_mangled_name): Delete,
3459 implementation moves to cplus_language::sniff_from_mangled_name.
3460 * cp-support.h (gdb_sniff_from_mangled_name): Delete declaration.
3461 * d-lang.c (d_sniff_from_mangled_name): Delete, implementation
3462 moves to...
3463 (d_language::sniff_from_mangled_name): ...here.
3464 (d_language_data): Delete la_sniff_from_mangled_name initializer.
3465 * f-lang.c (f_language_data): Likewise.
3466 * go-lang.c (go_sniff_from_mangled_name): Delete, implementation
3467 moves to...
3468 (go_language::sniff_from_mangled_name): ...here.
3469 (go_language_data): Delete la_sniff_from_mangled_name initializer.
3470 * language.c (language_sniff_from_mangled_name): Delete.
3471 (unknown_language_data): Delete la_sniff_from_mangled_name
3472 initializer.
3473 (auto_language_data): Likewise.
3474 * language.h (language_data): Delete la_sniff_from_mangled_name
3475 field.
3476 (language_defn::sniff_from_mangled_name): New function.
3477 (language_sniff_from_mangled_name): Delete declaration.
3478 * m2-lang.c (m2_language_data): Delete la_sniff_from_mangled_name
3479 field.
3480 * objc-lang.c (objc_sniff_from_mangled_name): Delete,
3481 implementation moves to...
3482 (objc_language::sniff_from_mangled_name): ...here.
3483 (objc_language_data): Delete la_sniff_from_mangled_name initializer.
3484 * opencl-lang.c (opencl_language_data): Likewise.
3485 * p-lang.c (pascal_language_data): Likewise.
3486 * rust-lang.c (rust_sniff_from_mangled_name): Delete,
3487 implementation moves to...
3488 (rust_language::sniff_from_mangled_name): ...here.
3489 (rust_language_data): Delete la_sniff_from_mangled_name
3490 initializer.
3491 * symtab.c (symbol_find_demangled_name): Call
3492 sniff_from_mangled_name member function.
3493
3494 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3495
3496 * ada-lang.c (ada_language_data): Delete la_search_name_hash
3497 initializer.
3498 * c-lang.c (c_language_data): Likewise.
3499 (cplus_language_data): Likewise.
3500 (cplus_language::search_name_hash): New member function.
3501 (asm_language_data): Delete la_search_name_hash initializer.
3502 (minimal_language_data): Likewise.
3503 * d-lang.c (d_language_data): Likewise.
3504 * dictionary.c (default_search_name_hash): Rename to...
3505 (language_defn::search_name_hash): ...this.
3506 * f-lang.c (f_language_data): Likewise.
3507 (f_language::search_name_hash): New member function.
3508 * go-lang.c (go_language_data): Delete la_search_name_hash
3509 initializer.
3510 * language.c (unknown_language_data): Likewise.
3511 (auto_language_data): Likewise.
3512 * language.h (struct language_data): Delete la_search_name_hash
3513 field.
3514 (language_defn::search_name_hash): Declare new member function.
3515 (default_search_name_hash): Delete declaration.
3516 * m2-lang.c (m2_language_data): Delete la_search_name_hash
3517 initializer.
3518 * objc-lang.c (objc_language_data): Likewise.
3519 * opencl-lang.c (opencl_language_data): Likewise.
3520 * p-lang.c (pascal_language_data): Likewise.
3521 * rust-lang.c (rust_language_data): Likewise.
3522 * symtab.c (search_name_hash): Update call.
3523
3524 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3525
3526 * ada-lang.c (ada_language_data): Delete la_get_compile_instance
3527 initializer.
3528 * c-lang.c (class compile_instance): Declare.
3529 (c_language_data): Delete la_get_compile_instance initializer.
3530 (c_language::get_compile_instance): New member function.
3531 (cplus_language_data): Delete la_get_compile_instance initializer.
3532 (cplus_language::get_compile_instance): New member function.
3533 (asm_language_data): Delete la_get_compile_instance initializer.
3534 (minimal_language_data): Likewise.
3535 * c-lang.h (c_get_compile_context): Update comment.
3536 (cplus_get_compile_context): Update comment.
3537 * compile/compile.c (compile_to_object): Update calls, don't rely
3538 on function pointer being NULL.
3539 * d-lang.c (d_language_data): Delete la_get_compile_instance
3540 initializer.
3541 * f-lang.c (f_language_data): Likewise.
3542 * go-lang.c (go_language_data): Likewise.
3543 * language.c (unknown_language_data): Likewise.
3544 (auto_language_data): Likewise.
3545 * language.h (language_data): Delete la_get_compile_instance field.
3546 (language_defn::get_compile_instance): New member function.
3547 * m2-lang.c (m2_language_data): Delete la_get_compile_instance
3548 initializer.
3549 * objc-lang.c (objc_language_data): Likewise.
3550 * opencl-lang.c (opencl_language_data): Likewise.
3551 * p-lang.c (pascal_language_data): Likewise.
3552 * rust-lang.c (rust_language_data): Likewise.
3553
3554 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3555
3556 * ada-lang.c (ada_add_all_symbols): Update comment.
3557 (ada_iterate_over_symbols): Delete, move implementation to...
3558 (ada_language::iterate_over_symbols): ...here, a new member
3559 function, rewrite to use range based for loop.
3560 (ada_language_data): Delete la_iterate_over_symbols initializer.
3561 * c-lang.c (c_language_data): Likewise.
3562 (cplus_language_data): Likewise.
3563 (asm_language_data): Likewise.
3564 (minimal_language_data): Likewise.
3565 * d-lang.c (d_language_data): Likewise.
3566 * f-lang.c (f_language_data): Likewise.
3567 * go-lang.c (go_language_data): Likewise.
3568 * language.c (unknown_language_data): Likewise.
3569 (auto_language_data): Likewise.
3570 * language.h (language_data): Delete la_iterate_over_symbols field.
3571 (language_defn::iterate_over_symbols): New member function.
3572 (LA_ITERATE_OVER_SYMBOLS): Update.
3573 * linespec.c (iterate_over_all_matching_symtabs): Update.
3574 * m2-lang.c (m2_language_data): Delete la_iterate_over_symbols
3575 initializer.
3576 * objc-lang.c (objc_language_data): Likewise.
3577 * opencl-lang.c (opencl_language_data): Likewise.
3578 * p-lang.c (pascal_language_data): Likewise.
3579 * rust-lang.c (rust_language_data): Likewise.
3580
3581 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3582
3583 * ada-lang.c (ada_language_data): Delete
3584 la_lookup_transparent_type initializer.
3585 * c-lang.c (c_language_data): Likewise.
3586 (cplus_language_data): Likewise.
3587 (cplus_language::lookup_transparent_type): New member function.
3588 (asm_language_data): Delete la_lookup_transparent_type
3589 initializer.
3590 (minimal_language_data): Likewise.
3591 * d-lang.c (d_language_data): Likewise.
3592 * f-lang.c (f_language_data): Likewise.
3593 * go-lang.c (go_language_data): Likewise.
3594 * language.c (unknown_language_data): Likewise.
3595 (auto_language_data): Likewise.
3596 * language.h (struct language_data): Delete
3597 la_lookup_transparent_type field.
3598 (language_defn::lookup_transparent_type): New member function.
3599 * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type
3600 initializer.
3601 * objc-lang.c (objc_language_data): Likewise.
3602 * opencl-lang.c (opencl_language_data): Likewise.
3603 * p-lang.c (pascal_language_data): Likewise.
3604 * rust-lang.c (rust_language_data): Likewise.
3605 * symtab.c (symbol_matches_domain): Update call.
3606
3607 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3608
3609 * ada-lang.c (ada_language_arch_info): Delete function, move
3610 implementation to...
3611 (ada_language::language_arch_info): ...here, a new member
3612 function.
3613 (ada_language_data): Delete la_language_arch_info.
3614 * c-lang.c (c_language_data): Likewise.
3615 (c_language::language_arch_info): New member function.
3616 (cplus_language_arch_info): Delete function, move
3617 implementation to...
3618 (cplus_language::language_arch_info): ...here, a new member
3619 function.
3620 (cplus_language_data): Delete la_language_arch_info.
3621 (asm_language_data): Likewise.
3622 (asm_language::language_arch_info): New member function.
3623 (minimal_language_data): Delete la_language_arch_info.
3624 (minimal_language::language_arch_info): New member function.
3625 * d-lang.c (d_language_arch_info): Delete function, move
3626 implementation to...
3627 (d_language::language_arch_info): ...here, a new member
3628 function.
3629 (d_language_data): Delete la_language_arch_info.
3630 * f-lang.c (f_language_arch_info): Delete function, move
3631 implementation to...
3632 (f_language::language_arch_info): ...here, a new member
3633 function.
3634 (f_language_data): Delete la_language_arch_info.
3635 * go-lang.c (go_language_arch_info): Delete function, move
3636 implementation to...
3637 (go_language::language_arch_info): ...here, a new member
3638 function.
3639 (go_language_data): Delete la_language_arch_info.
3640 * language.c (unknown_language_data): Likewise.
3641 (unknown_language::language_arch_info): New member function.
3642 (auto_language_data): Delete la_language_arch_info.
3643 (auto_language::language_arch_info): New member function.
3644 (language_gdbarch_post_init): Update call to
3645 la_language_arch_info.
3646 * language.h (language_data): Delete la_language_arch_info
3647 function pointer.
3648 (language_defn::language_arch_info): New function.
3649 * m2-lang.c (m2_language_arch_info): Delete function, move
3650 implementation to...
3651 (m2_language::language_arch_info): ...here, a new member
3652 function.
3653 (m2_language_data): Delete la_language_arch_info.
3654 * objc-lang.c (objc_language_arch_info): Delete function, move
3655 implementation to...
3656 (objc_language::language_arch_info): ...here, a new member
3657 function.
3658 (objc_language_data): Delete la_language_arch_info.
3659 * opencl-lang.c (opencl_language_arch_info): Delete function, move
3660 implementation to...
3661 (opencl_language::language_arch_info): ...here, a new member
3662 function.
3663 (opencl_language_data): Delete la_language_arch_info.
3664 * p-lang.c (pascal_language_arch_info): Delete function, move
3665 implementation to...
3666 (pascal_language::language_arch_info): ...here, a new member
3667 function.
3668 (pascal_language_data): Delete la_language_arch_info.
3669 * rust-lang.c (rust_language_arch_info): Delete function, move
3670 implementation to...
3671 (rust_language::language_arch_info): ...here, a new member
3672 function.
3673 (rust_language_data): Delete la_language_arch_info.
3674
3675 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3676
3677 * ada-lang.c (ada_language_data): Delete la_pass_by_reference
3678 initializer.
3679 * c-lang.c (c_language_data): Likewise.
3680 (cplus_language_data): Likewise.
3681 (cplus_language::pass_by_reference_info): New method.
3682 (asm_language_data): Delete la_pass_by_reference initializer.
3683 (minimal_language_data): Likewise.
3684 * cp-abi.c (cp_pass_by_reference): Remove use of
3685 default_pass_by_reference.
3686 * d-lang.c (d_language_data): Likewise.
3687 * f-lang.c (f_language_data): Likewise.
3688 * gnu-v3-abi.c (gnuv3_pass_by_reference): Remove use of
3689 default_pass_by_reference.
3690 * go-lang.c (go_language_data): Likewise.
3691 * language.c (language_pass_by_reference): Update.
3692 (default_pass_by_reference): Delete.
3693 (unknown_language_data): Delete la_pass_by_reference
3694 initializer.
3695 (auto_language_data): Likewise.
3696 * language.h (struct language_data): Delete la_pass_by_reference
3697 field.
3698 (language_defn::pass_by_reference_info): New member function.
3699 (default_pass_by_reference): Delete declaration.
3700 * m2-lang.c (m2_language_data): Delete la_pass_by_reference
3701 initializer.
3702 * objc-lang.c (objc_language_data): Likewise.
3703 * opencl-lang.c (opencl_language_data): Likewise.
3704 * p-lang.c (pascal_language_data): Likewise.
3705 * rust-lang.c (rust_language_data): Likewise.
3706
3707 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3708
3709 * ada-lang.c (ada_read_var_value): Delete function, move
3710 implementation to...
3711 (ada_language::read_var_value): ...here.
3712 (ada_language_data): Delete la_read_var_value initializer.
3713 * c-lang.c (c_language_data): Likewise.
3714 (cplus_language_data): Likewise.
3715 (minimal_language_data): Likewise.
3716 * d-lang.c (d_language_data): Likewise.
3717 * f-lang.c (f_language_data): Likewise.
3718 * findvar.c (default_read_var_value): Rename to...
3719 (language_defn::read_var_value): ...this.
3720 * findvar.c (read_var_value): Update header comment, and change to
3721 call member function instead of function pointer.
3722 * go-lang.c (go_language_data): Likewise.
3723 * language.c (unknown_language_data): Delete la_read_var_value
3724 initializer.
3725 (auto_language_data): Likewise.
3726 * language.h (struct language_data): Delete la_read_var_value
3727 field.
3728 (language_defn::read_var_value): New member function.
3729 (default_read_var_value): Delete declaration.
3730 * m2-lang.c (m2_language_data): Delete la_read_var_value
3731 initializer.
3732 * objc-lang.c (objc_language_data): Likewise.
3733 * opencl-lang.c (opencl_language_data): Likewise.
3734 * p-lang.c (pascal_language_data): Likewise.
3735 * rust-lang.c (rust_language_data): Likewise.
3736 * value.h (default_read_var_value): Delete declaration.
3737
3738 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3739
3740 * ada-lang.c (ada_print_array_index): Delete function, move
3741 implementation to...
3742 (ada_language::print_array_index): ...here.
3743 (ada_language_data): Delete la_print_array_index initializer.
3744 * c-lang.c (c_language_data): Likewise.
3745 (cplus_language_data): Likewise.
3746 (minimal_language_data): Likewise.
3747 * d-lang.c (d_language_data): Likewise.
3748 * f-lang.c (f_language_data): Likewise.
3749 * go-lang.c (go_language_data): Likewise.
3750 * language.c (default_print_array_index): Delete function, move
3751 implementation to...
3752 (language_defn::print_array_index): ...here.
3753 (unknown_language_data): Delete la_print_array_index initializer.
3754 (auto_language_data): Likewise.
3755 * language.h (struct language_data): Delete la_print_array_index
3756 field.
3757 (language_defn::print_array_index): New member function.
3758 (LA_PRINT_ARRAY_INDEX): Update.
3759 (default_print_array_index): Delete declaration.
3760 * m2-lang.c (m2_language_data): Delete la_print_array_index
3761 initializer.
3762 * objc-lang.c (objc_language_data): Likewise.
3763 * opencl-lang.c (opencl_language_data): Likewise.
3764 * p-lang.c (pascal_language_data): Likewise.
3765 * rust-lang.c (rust_language_data): Likewise.
3766
3767 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
3768
3769 * gdb/ada-lang.c (ada_language_defn): Convert to...
3770 (ada_language_data): ...this.
3771 (class ada_language): New class.
3772 (ada_language_defn): New static global.
3773 * gdb/c-lang.c (c_language_defn): Convert to...
3774 (c_language_data): ...this.
3775 (class c_language): New class.
3776 (c_language_defn): New static global.
3777 (cplus_language_defn): Convert to...
3778 (cplus_language_data): ...this.
3779 (class cplus_language): New class.
3780 (cplus_language_defn): New static global.
3781 (asm_language_defn): Convert to...
3782 (asm_language_data): ...this.
3783 (class asm_language): New class.
3784 (asm_language_defn): New static global.
3785 (minimal_language_defn): Convert to...
3786 (minimal_language_data): ...this.
3787 (class minimal_language): New class.
3788 (minimal_language_defn): New static global.
3789 * gdb/d-lang.c (d_language_defn): Convert to...
3790 (d_language_data): ...this.
3791 (class d_language): New class.
3792 (d_language_defn): New static global.
3793 * gdb/f-lang.c (f_language_defn): Convert to...
3794 (f_language_data): ...this.
3795 (class f_language): New class.
3796 (f_language_defn): New static global.
3797 * gdb/go-lang.c (go_language_defn): Convert to...
3798 (go_language_data): ...this.
3799 (class go_language): New class.
3800 (go_language_defn): New static global.
3801 * gdb/language.c (unknown_language_defn): Remove declaration.
3802 (current_language): Initialize to nullptr, real initialization is
3803 moved to _initialize_language.
3804 (languages): Delete global.
3805 (language_defn::languages): Define.
3806 (set_language_command): Use language_defn::languages.
3807 (set_language): Likewise.
3808 (range_error): Likewise.
3809 (language_enum): Likewise.
3810 (language_def): Likewise.
3811 (add_set_language_command): Use language_def::languages for the
3812 language list, and language_def to lookup language pointers.
3813 (skip_language_trampoline): Use language_defn::languages.
3814 (unknown_language_defn): Convert to...
3815 (unknown_language_data): ...this.
3816 (class unknown_language): New class.
3817 (unknown_language_defn): New static global.
3818 (auto_language_defn): Convert to...
3819 (auto_language_data): ...this.
3820 (class auto_language): New class.
3821 (auto_language_defn): New static global.
3822 (language_gdbarch_post_init): Use language_defn::languages.
3823 (_initialize_language): Initialize current_language.
3824 * gdb/language.h (struct language_defn): Rename to...
3825 (struct language_data): ...this.
3826 (struct language_defn): New.
3827 (auto_language_defn): Delete.
3828 (unknown_language_defn): Delete.
3829 (minimal_language_defn): Delete.
3830 (ada_language_defn): Delete.
3831 (asm_language_defn): Delete.
3832 (c_language_defn): Delete.
3833 (cplus_language_defn): Delete.
3834 (d_language_defn): Delete.
3835 (f_language_defn): Delete.
3836 (go_language_defn): Delete.
3837 (m2_language_defn): Delete.
3838 (objc_language_defn): Delete.
3839 (opencl_language_defn): Delete.
3840 (pascal_language_defn): Delete.
3841 (rust_language_defn): Delete.
3842 * gdb/m2-lang.c (m2_language_defn): Convert to...
3843 (m2_language_data): ...this.
3844 (class m2_language): New class.
3845 (m2_language_defn): New static global.
3846 * gdb/objc-lang.c (objc_language_defn): Convert to...
3847 (objc_language_data): ...this.
3848 (class objc_language): New class.
3849 (objc_language_defn): New static global.
3850 * gdb/opencl-lang.c (opencl_language_defn): Convert to...
3851 (opencl_language_data): ...this.
3852 (class opencl_language): New class.
3853 (opencl_language_defn): New static global.
3854 * gdb/p-lang.c (pascal_language_defn): Convert to...
3855 (pascal_language_data): ...this.
3856 (class pascal_language): New class.
3857 (pascal_language_defn): New static global.
3858 * gdb/rust-exp.y (rust_lex_tests): Use language_def to find
3859 language pointer, update comment format.
3860 * gdb/rust-lang.c (rust_language_defn): Convert to...
3861 (rust_language_data): ...this.
3862 (class rust_language): New class.
3863 (rust_language_defn): New static global.
3864
3865 2020-06-01 Andrew Burgess <andrew.burgess@embecosm.com>
3866
3867 * dwarf2/read.c (class lnp_state_machine) <m_last_address>: New
3868 member variable.
3869 <m_stmt_at_address>: New member variable.
3870 (lnp_state_machine::record_line): Don't record some lines, update
3871 tracking of is_stmt at the same address.
3872 (lnp_state_machine::lnp_state_machine): Initialise new member
3873 variables.
3874
3875 2020-06-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
3876
3877 * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
3878 "-include gnu-nat-mig.h".
3879 * gnu-nat-mig.h: New file.
3880 * gnu-nat.c: Include "gnu-nat-mig.h".
3881 (exc_server, msg_reply_server, notify_server,
3882 process_reply_server): Remove declarations.
3883
3884 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3885
3886 * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced,
3887 steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,
3888 inf_startup, inf_update_suspends, inf_set_pid, inf_steal_exc_ports,
3889 inf_validate_procinfo, inf_validate_task_sc, inf_restore_exc_ports,
3890 inf_set_threads_resume_sc, inf_set_threads_resume_sc_for_signal_thread,
3891 inf_resume, inf_set_step_thread, inf_detach, inf_attach, inf_signal,
3892 inf_continue, make_proc, proc_abort, _proc_free, proc_update_sc,
3893 proc_get_exception_port, proc_set_exception_port, _proc_get_exc_port,
3894 proc_steal_exc_port, proc_restore_exc_port, proc_trace): Move functions
3895 to gnu_nat_target class.
3896 * gnu-nat.c: Likewise.
3897 (inf_update_procs, S_proc_wait_reply, set_task_pause_cmd,
3898 set_task_exc_port_cmd, set_signals_cmd, set_thread_pause_cmd,
3899 set_thread_exc_port_cmd): Call inf_validate_procs through gnu_target
3900 object.
3901 (gnu_nat_target::create_inferior, gnu_nat_target::detach): Pass `this'
3902 instead of `gnu_target'.
3903
3904 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3905
3906 * i386-gnu-tdep.c: Include "gdbcore.h"
3907 (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays.
3908 (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL,
3909 I386_GNU_SIGCONTEXT_THREAD_STATE_OFFSET): New macros
3910 (i386_gnu_sigtramp_start, i386_gnu_sigtramp_p,
3911 i386_gnu_sigcontext_addr): New functions
3912 (i386gnu_init_abi): Register i386_gnu_sigtramp_p,
3913 i386_gnu_sigcontext_addr, and i386_gnu_sc_reg_offset in the gdbarch
3914 tdep.
3915
3916 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3917
3918 * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
3919 before fork_inferior call. Avoid calling it if target_is_pushed returns
3920 true.
3921
3922 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3923
3924 * gnu-nat.h (gnu_target): New variable declaration.
3925 * i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
3926 gnu_target.
3927 * gnu-nat.c (gnu_target): New variable.
3928 (inf_validate_procs): Pass gnu_target to thread_change_ptid,
3929 add_thread_silent, and add_thread calls.
3930 (gnu_nat_target::create_inferior): Pass gnu_target to
3931 add_thread_silent, thread_change_ptid call.
3932 (gnu_nat_target::detach): Pass gnu_target to detach_inferior
3933 call.
3934
3935 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3936
3937 * gnu-nat.c (gnu_xfer_auxv): Remove unused `res' variable.
3938 (gnu_nat_target::find_memory_regions): Remove unused
3939 `old_address' variable.
3940
3941 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3942
3943 * gnu-nat.c: Include "gdbarch.h".
3944
3945 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3946
3947 * reply_mig_hack.awk (Error return): Cast function through
3948 void *, to bypass compiler function call check.
3949
3950 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3951
3952 * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on
3953 $(srcdir)/reply_mig_hack.awk.
3954
3955 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
3956
3957 * gnu-nat.h (gnu_debug_flag): Set type to bool.
3958
3959 2020-05-30 Jonny Grant <jg@jguk.org>
3960
3961 * configure.ac (ACX_BUGURL): change bug URL to https.
3962
3963 2020-05-30 Pedro Alves <palves@redhat.com>
3964
3965 * cp-support.c (replace_typedefs_template): New.
3966 (replace_typedefs_qualified_name): Handle
3967 DEMANGLE_COMPONENT_TEMPLATE.
3968
3969 2020-05-29 Simon Marchi <simon.marchi@efficios.com>
3970
3971 * dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
3972 dwarf2/index-cache.h, dwarf2/index-write.c,
3973 dwarf2/index-write.h, dwarf2/line-header.c,
3974 dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
3975 dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
3976 variables and fields from `dwarf2_per_objfile` to just
3977 `per_objfile` throughout.
3978
3979 2020-05-28 Simon Marchi <simon.marchi@polymtl.ca>
3980
3981 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3982 <push_dwarf_reg_entry_value>: Add comment.
3983
3984 2020-05-28 Kevin Buettner <kevinb@redhat.com>
3985 Keith Seitz <keiths@redhat.com>
3986
3987 * python/python.c (do_start_initialization): Call PyEval_SaveThread
3988 instead of PyEval_ReleaseLock.
3989 (class gdbpy_gil): Move to earlier in file.
3990 (finalize_python): Set gdb_python_initialized.
3991 (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early
3992 when not initialized.
3993
3994 2020-05-28 Simon Marchi <simon.marchi@efficios.com>
3995
3996 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
3997 <push_dwarf_reg_entry_value>: Remove assert. Override
3998 per_objfile with caller_per_objfile.
3999
4000 2020-05-28 Tom de Vries <tdevries@suse.de>
4001
4002 * dwarf2/read.c (dw2_symtab_iter_next, dw2_expand_marked_cus): Limit
4003 PR gold/15646 workaround to symbol kind "type".
4004
4005 2020-05-27 Tom Tromey <tromey@adacore.com>
4006
4007 * dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
4008
4009 2020-05-27 Tom Tromey <tromey@adacore.com>
4010
4011 * dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
4012 Use htab_find_with_hash.
4013 <add_abbrev>: Remove "abbrev_number" parameter.
4014 * dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
4015 "abbrev_number" parameter. Use htab_find_slot_with_hash.
4016 (hash_abbrev): Add comment.
4017 (abbrev_table::lookup_abbrev): Move to header file.
4018 (abbrev_table::read): Update.
4019
4020 2020-05-27 Tom Tromey <tromey@adacore.com>
4021
4022 * dwarf2/read.c (struct partial_die_info) <name>: Declare new
4023 method.
4024 <canonical_name>: New member.
4025 <raw_name>: Rename from "name".
4026 (partial_die_info): Initialize canonical_name.
4027 (scan_partial_symbols): Check raw_name.
4028 (partial_die_parent_scope, partial_die_full_name)
4029 (add_partial_symbol, add_partial_subprogram)
4030 (add_partial_enumeration, load_partial_dies): Use "name" method.
4031 (partial_die_info::name): New method.
4032 (partial_die_info::read, guess_partial_die_structure_name)
4033 (partial_die_info::fixup): Update.
4034
4035 2020-05-27 Tom Tromey <tromey@adacore.com>
4036
4037 * dwarf2/attribute.h (struct attribute) <form_is_ref>: Inline.
4038 <get_ref_die_offset>: Inline.
4039 <get_ref_die_offset_complaint>: New method.
4040 * dwarf2/attribute.c (attribute::form_is_ref): Move to header.
4041 (attribute::get_ref_die_offset_complaint): Rename from
4042 get_ref_die_offset. Just issue complaint.
4043
4044 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
4045
4046 * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
4047
4048 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
4049
4050 * exec.c (exec_file_attach): Use errno value of first openp failure.
4051
4052 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
4053
4054 * nat/windows-nat.c (windows_thread_info::~windows_thread_info):
4055 Don't close thread handle.
4056
4057 2020-05-27 Tom Tromey <tom@tromey.com>
4058 Simon Marchi <simon.marchi@efficios.com>
4059
4060 * objfiles.h (struct objfile) <partial_symtabs>: Now a
4061 shared_ptr.
4062 * dwarf2/read.h (struct dwarf2_per_objfile) <partial_symtabs>: New
4063 member.
4064 * dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,
4065 dwarf2_per_bfd_objfile_data_key>: New globals.
4066 (dwarf2_has_info): Use shared dwarf2_per_bfd if possible.
4067 (dwarf2_get_section_info): Use get_dwarf2_per_objfile.
4068 (dwarf2_initialize_objfile): Consider cases where per_bfd can be
4069 shared.
4070 (dwarf2_build_psymtabs): Set objfile::partial_symtabs and
4071 short-circuit when sharing.
4072 (dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.
4073 (dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.
4074
4075 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4076
4077 * dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
4078 to...
4079 (struct dwarf2_per_objfile) <line_header_hash>: ... here.
4080 * dwarf2/read.c (handle_DW_AT_stmt_list): Update.
4081
4082 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4083
4084 * dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
4085 build_name_components, find_name_components_bounds>:
4086 Add per_objfile parameter.
4087 (struct mapped_index) <symbol_name_at>: Likewise.
4088 (struct mapped_debug_names): Remove constructor.
4089 <dwarf2_per_objfile>: Remove field.
4090 <namei_to_name, symbol_name_at>: Add per_objfile parameter.
4091 (mapped_index_base::find_name_components_bounds,
4092 mapped_index_base::build_name_components,
4093 dw2_expand_symtabs_matching_symbol): Likewise.
4094 (class mock_mapped_index) <symbol_name_at>: Likewise.
4095 (check_match): Likewise.
4096 (check_find_bounds_finds): Likewise.
4097 (test_mapped_index_find_name_component_bounds): Update.
4098 (CHECK_MATCH): Update.
4099 (dw2_expand_symtabs_matching): Update.
4100 (class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
4101 per_objfile parameter.
4102 <find_vec_in_debug_names>: Likewise.
4103 <m_per_objfile>: New field.
4104 (mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
4105 parameter.
4106 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
4107 (dw2_debug_names_iterator::next): Update.
4108 (dw2_debug_names_lookup_symbol): Update.
4109 (dw2_debug_names_expand_symtabs_for_function): Update.
4110 (dw2_debug_names_map_matching_symbols): Update.
4111 (dw2_debug_names_expand_symtabs_matching): Update.
4112 (dwarf2_read_debug_names): Update.
4113
4114 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4115
4116 * dwarf2/read.h (struct dwarf2_cu): Forward-declare.
4117 (struct dwarf2_per_bfd) <free_cached_comp_units>: Remove,
4118 move to dwarf2_per_objfile.
4119 <read_in_chain>: Remove.
4120 (struct dwarf2_per_objfile) <get_cu, set_cu, remove_cu,
4121 remove_all_cus, age_comp_units>: New methods.
4122 <m_dwarf2_cus>: New member.
4123 (struct dwarf2_per_cu_data) <cu>: Remove.
4124 * dwarf2/read.c (struct dwarf2_cu) <read_in_chain>: Remove.
4125 (age_cached_comp_units, free_one_cached_comp_unit): Remove,
4126 moved to methods of dwarf2_per_objfile.
4127 (dwarf2_clear_marks): Remove.
4128 (dwarf2_queue_item::~dwarf2_queue_item): Update.
4129 (dwarf2_per_bfd::~dwarf2_per_bfd): Don't free dwarf2_cus.
4130 (dwarf2_per_bfd::free_cached_comp_units): Remove.
4131 (dwarf2_per_objfile::remove_all_cus): New.
4132 (class free_cached_comp_units) <~free_cached_comp_units>:
4133 Update.
4134 (load_cu): Update.
4135 (dw2_do_instantiate_symtab): Adjust.
4136 (fill_in_sig_entry_from_dwo_entry): Adjust.
4137 (cutu_reader::init_tu_and_read_dwo_dies): Update.
4138 (cutu_reader::cutu_reader): Likewise.
4139 (cutu_reader::keep): Use dwarf2_per_objfile::set_cu.
4140 (cutu_reader::cutu_reader): Use dwarf2_per_objfile::get_cu.
4141 (process_psymtab_comp_unit): Use dwarf2_per_objfile::remove_cu
4142 and dwarf2_per_objfile::age_comp_units.
4143 (load_partial_comp_unit): Update.
4144 (maybe_queue_comp_unit): Use dwarf2_per_objfile::get_cu.
4145 (process_queue): Likewise.
4146 (find_partial_die): Use dwarf2_per_objfile::get_cu instead of cu
4147 backlink.
4148 (dwarf2_read_addr_index): Likewise.
4149 (follow_die_offset): Likewise.
4150 (dwarf2_fetch_die_loc_sect_off): Likewise.
4151 (dwarf2_fetch_constant_bytes): Likewise.
4152 (dwarf2_fetch_die_type_sect_off): Likewise.
4153 (follow_die_sig_1): Likewise.
4154 (load_full_type_unit): Likewise.
4155 (read_signatured_type): Likewise.
4156 (dwarf2_cu::dwarf2_cu): Don't set cu field.
4157 (dwarf2_cu::~dwarf2_cu): Remove.
4158 (dwarf2_per_objfile::get_cu): New.
4159 (dwarf2_per_objfile::set_cu): New.
4160 (age_cached_comp_units): Rename to...
4161 (dwarf2_per_objfile::age_comp_units): ... this. Adjust
4162 to std::unordered_map.
4163 (free_one_cached_comp_unit): Rename to...
4164 (dwarf2_per_objfile::remove_cu): ... this. Adjust
4165 to std::unordered_map.
4166 (dwarf2_per_objfile::~dwarf2_per_objfile): New.
4167 (dwarf2_mark_helper): Use dwarf2_per_objfile::get_cu, expect
4168 a dwarf2_per_objfile in data.
4169 (dwarf2_mark): Pass dwarf2_per_objfile in data to htab_traverse.
4170 (dwarf2_clear_marks): Remove.
4171
4172 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4173
4174 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Replace
4175 `int use_existing_cu` parameter with `dwarf2_cu *existing_cu`.
4176 (init_tu_and_read_dwo_dies): Likewise.
4177 (cutu_reader::init_tu_and_read_dwo_dies): Likewise.
4178 (cutu_reader::cutu_reader): Likewise.
4179 (load_partial_comp_unit): Likewise.
4180 (process_psymtab_comp_unit): Update.
4181 (build_type_psymtabs_1): Update.
4182 (process_skeletonless_type_unit): Update.
4183 (load_full_comp_unit): Update.
4184 (find_partial_die): Update.
4185 (dwarf2_read_addr_index): Update.
4186 (read_signatured_type): Update.
4187
4188 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4189
4190 * dwarf2/read.h (struct dwarf2_per_cu_data) <m_header,
4191 m_header_read_in>: New fields.
4192 <get_header>: New method.
4193 * dwarf2/read.c (per_cu_header_read_in): Remove.
4194 (dwarf2_per_cu_data::get_header): New.
4195 (dwarf2_per_cu_data::addr_size): Update.
4196 (dwarf2_per_cu_data::offset_size): Update.
4197 (dwarf2_per_cu_data::ref_addr_size): Update.
4198
4199 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4200
4201 * dwarf2/read.c (load_cu): Return dwarf2_cu.
4202 (dw2_do_instantiate_symtab): Update.
4203 (queue_and_load_all_dwo_tus): Change parameter from
4204 dwarf2_per_cu_data to dwarf2_cu.
4205 (dwarf2_fetch_die_loc_sect_off): Update.
4206 (dwarf2_fetch_constant_bytes): Update.
4207 (dwarf2_fetch_die_type_sect_off): Update.
4208
4209 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4210
4211 * dwarf2/read.c (process_full_comp_unit,
4212 process_full_type_unit): Remove per_cu, per_objfile paramters.
4213 Add dwarf2_cu parameter.
4214 (process_queue): Update.
4215
4216 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4217
4218 * dwarf2/read.c (create_cu_from_index_list): Replace
4219 dwarf2_per_objfile parameter with dwarf2_per_bfd.
4220 (create_cus_from_index_list): Likewise.
4221 (create_cus_from_index): Likewise.
4222 (create_signatured_type_table_from_index): Likewise.
4223 (create_cus_from_debug_names_list): Likewise.
4224 (create_cus_from_debug_names): Likewise.
4225 (dwarf2_read_gdb_index): Update.
4226 (dwarf2_read_debug_names): Update.
4227
4228 2020-05-27 Tom Tromey <tom@tromey.com>
4229 Simon Marchi <simon.marchi@efficios.com>
4230
4231 * dwarf2/read.h (struct dwarf2_per_objfile)
4232 <get_type_for_signatured_type, set_type_for_signatured_type>:
4233 New methods.
4234 <m_type_map>: New member.
4235 (struct signatured_type) <type>: Remove.
4236 * dwarf2/read.c
4237 (dwarf2_per_objfile::get_type_for_signatured_type,
4238 dwarf2_per_objfile::set_type_for_signatured_type): New.
4239 (get_signatured_type): Use new methods.
4240
4241 2020-05-27 Tom Tromey <tom@tromey.com>
4242 Simon Marchi <simon.marchi@efficios.com>
4243
4244 * dwarf2/read.h (struct type_unit_group_unshareable): New.
4245 (struct dwarf2_per_objfile) <type_units>: New member.
4246 <get_type_unit_group_unshareable>: New method.
4247 * dwarf2/read.c (struct type_unit_group) <compunit_symtab,
4248 num_symtabs, symtabs>: Remove; move to
4249 type_unit_group_unshareable.
4250 (dwarf2_per_objfile::get_type_unit_group_unshareable): New.
4251 (process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
4252 (dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
4253
4254 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4255
4256 * dwarf2/read.h (struct dwarf2_per_cu_data):
4257 <dwarf2_per_objfile>: Remove.
4258 * dwarf2/read.c (create_cu_from_index_list): Don't assign
4259 dwarf2_per_objfile.
4260 (create_signatured_type_table_from_index): Likewise.
4261 (create_signatured_type_table_from_debug_names): Likewise.
4262 (create_debug_type_hash_table): Likewise.
4263 (fill_in_sig_entry_from_dwo_entry): Likewise.
4264 (create_type_unit_group): Likewise.
4265 (read_comp_units_from_section): Likewise.
4266 (create_cus_hash_table): Likewise.
4267
4268 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4269
4270 * dwarf2/read.c (process_psymtab_comp_unit): Remove reference to
4271 dwarf2_per_cu_data::dwarf2_per_objfile.
4272 (compute_compunit_symtab_includes): Likewise.
4273 (dwarf2_cu::start_symtab): Likewise.
4274
4275 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4276
4277 * dwarf2/read.h (dwarf2_get_die_type): Add dwarf2_per_objfile
4278 parameter.
4279 * dwarf2/read.c (get_die_type_at_offset): Likewise.
4280 (read_namespace_alias): Update.
4281 (lookup_die_type): Update.
4282 (dwarf2_get_die_type): Add dwarf2_per_objfile parameter.
4283 * dwarf2/loc.c (class dwarf_evaluate_loc_desc) <get_base_type>:
4284 Update.
4285 (disassemble_dwarf_expression): Update.
4286
4287 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4288
4289 * dwarf2/read.h (struct dwarf2_queue_item): Add
4290 dwarf2_per_objfile parameter, assign new parameter.
4291 <per_objfile>: New field.
4292 * dwarf2/read.c (free_one_cached_comp_unit): Add
4293 dwarf2_per_objfile parameter.
4294 (queue_comp_unit): Likewise.
4295 (dw2_do_instantiate_symtab): Update.
4296 (process_psymtab_comp_unit): Update.
4297 (maybe_queue_comp_unit): Add dwarf2_per_objfile parameter.
4298 (process_imported_unit_die): Update.
4299 (queue_and_load_dwo_tu): Update.
4300 (follow_die_offset): Update.
4301 (follow_die_sig_1): Update.
4302
4303 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4304
4305 * dwarf2/read.h (struct dwarf2_per_cu_data) <objfile>: Remove.
4306 * dwarf2/read.c (dwarf2_compute_name): Pass per_objfile down.
4307 (read_call_site_scope): Assign per_objfile.
4308 (dwarf2_per_cu_data::objfile): Remove.
4309 * gdbtypes.h (struct call_site) <per_objfile>: New member.
4310 * dwarf2/loc.h (dwarf2_evaluate_loc_desc): Add
4311 dwarf2_per_objfile parameter.
4312 * dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Add
4313 dwarf2_per_objfile parameter.
4314 (dwarf_expr_reg_to_entry_parameter): Add output
4315 dwarf2_per_objfile parameter.
4316 (locexpr_get_frame_base): Update.
4317 (class dwarf_evaluate_loc_desc) <get_tls_address>: Update.
4318 <push_dwarf_reg_entry_value>: Update.
4319 <call_site_to_target_addr>: Update.
4320 (dwarf_entry_parameter_to_value): Add dwarf2_per_objfile
4321 parameter.
4322 (value_of_dwarf_reg_entry): Update.
4323 (rw_pieced_value): Update.
4324 (indirect_synthetic_pointer): Update.
4325 (dwarf2_evaluate_property): Update.
4326 (dwarf2_loc_desc_get_symbol_read_needs): Add dwarf2_per_objfile
4327 parameter.
4328 (locexpr_read_variable): Update.
4329 (locexpr_get_symbol_read_needs): Update.
4330 (loclist_read_variable): Update.
4331
4332 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4333
4334 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
4335 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
4336 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
4337 parameter.
4338 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
4339 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
4340 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
4341 parameter.
4342 * dwarf2/loc.c (indirect_synthetic_pointer, per_cu_dwarf_call,
4343 sect_variable_value): Add dwarf2_per_objfile parameter.
4344 (class dwarf_evaluate_loc_desc) <dwarf_call,
4345 dwarf_variable_value>: Update.
4346 (fetch_const_value_from_synthetic_pointer): Add
4347 dwarf2_per_objfile parameter.
4348 (fetch_const_value_from_synthetic_pointer): Update.
4349 (coerced_pieced_ref): Update.
4350 (class symbol_needs_eval_context) <dwarf_call,
4351 dwarf_variable_value>: Update.
4352 (dwarf2_compile_expr_to_ax): Update.
4353
4354 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4355
4356 * dwarf2/loc.c (allocate_piece_closure): Add dwarf2_per_objfile
4357 parameter.
4358 (dwarf2_evaluate_loc_desc_full): Update.
4359
4360 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4361
4362 * dwarf2/read.h (dwarf2_read_addr_index): Add dwarf2_per_objfile
4363 parameter.
4364 * dwarf2/read.c (dwarf2_read_addr_index): Likewise.
4365 * dwarf2/loc.c (decode_debug_loclists_addresses): Add
4366 dwarf2_per_objfile parameter.
4367 (decode_debug_loc_dwo_addresses): Likewise.
4368 (dwarf2_find_location_expression): Update.
4369 (class dwarf_evaluate_loc_desc) <get_addr_index>: Update.
4370 (locexpr_describe_location_piece): Add dwarf2_per_objfile
4371 parameter.
4372 (disassemble_dwarf_expression): Add dwarf2_per_objfile
4373 parameter.
4374 (locexpr_describe_location_1): Likewise.
4375 (locexpr_describe_location): Update.
4376
4377 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4378
4379 * dwarf2/read.h (struct dwarf2_per_cu_data) <text_offset>:
4380 Remove.
4381 * dwarf2/read.c (dwarf2_per_cu_data::text_offset): Remove.
4382 * dwarf2/loc.c (dwarf2_find_location_expression): Update.
4383 (dwarf2_compile_property_to_c): Update.
4384 (dwarf2_compile_expr_to_ax): Add dwarf2_per_objfile parameter,
4385 use text offset from objfile.
4386 (locexpr_tracepoint_var_ref): Update.
4387 (locexpr_generate_c_location): Update.
4388 (loclist_describe_location): Update.
4389 (loclist_tracepoint_var_ref): Update.
4390 * dwarf2/compile.h (compile_dwarf_bounds_to_c): Add
4391 dwarf2_per_objfile parameter.
4392 * dwarf2/loc2c.c (do_compile_dwarf_expr_to_c): Likewise,
4393 use text offset from objfile.
4394 (compile_dwarf_expr_to_c): Add dwarf2_per_objfile parameter.
4395
4396 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4397
4398 * dwarf2/expr.h (struct dwarf_expr_context)
4399 <dwarf_expr_context>: Add dwarf2_per_objfile parameter.
4400 <offset>: Remove.
4401 <per_objfile>: New member.
4402 * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
4403 dwarf2_per_objfile parameter. Don't set offset, set
4404 per_objfile.
4405 (dwarf_expr_context::execute_stack_op): Use offset from objfile.
4406 * dwarf2/frame.c (dwarf2_frame_find_fde): Return (by parameter)
4407 a dwarf2_per_objfile object instead of an offset.
4408 (class dwarf_expr_executor) <dwarf_expr_executor>: Add
4409 constructor.
4410 (execute_stack_op): Add dwarf2_per_objfile parameter, pass it
4411 to dwarf2_expr_executor constructor. Don't set offset.
4412 (dwarf2_fetch_cfa_info): Update.
4413 (struct dwarf2_frame_cache) <text_offset>: Remove.
4414 <per_objfile>: New field.
4415 (dwarf2_frame_cache): Update.
4416 (dwarf2_frame_prev_register): Update.
4417 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
4418 <dwarf_evaluate_loc_desc>: Add constructor.
4419 (dwarf2_evaluate_loc_desc_full): Update.
4420 (dwarf2_locexpr_baton_eval): Update.
4421 (class symbol_needs_eval_context) <symbol_needs_eval_context>:
4422 Add constructor.
4423 (dwarf2_loc_desc_get_symbol_read_needs): Update.
4424
4425 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4426
4427 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_type,
4428 addr_sized_int_type>: Move to dwarf2_cu.
4429 <int_type>: Move to dwarf2_per_objfile.
4430 (struct dwarf2_per_objfile) <int_type>: Move here.
4431 * dwarf2/read.c (struct dwarf2_cu) <addr_type,
4432 addr_sized_int_type>: Move here.
4433 (read_func_scope): Update.
4434 (read_array_type): Update.
4435 (read_tag_string_type): Update.
4436 (attr_to_dynamic_prop): Update.
4437 (dwarf2_per_cu_data::int_type): Rename to...
4438 (dwarf2_per_objfile::int_type): ... this.
4439 (dwarf2_per_cu_data::addr_sized_int_type): Rename to...
4440 (dwarf2_cu::addr_sized_int_type): ... this.
4441 (read_subrange_type): Update.
4442 (dwarf2_per_cu_data::addr_type): Rename to...
4443 (dwarf2_cu::addr_type): ... this.
4444 (set_die_type): Update.
4445
4446 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4447
4448 * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
4449 data through per_cu->cu.
4450
4451 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4452
4453 * dwarf2/read.c (lookup_dwo_comp_unit): Change
4454 dwarf2_per_cu_data parameter fo dwarf2_cu.
4455 (lookup_dwo_type_unit): Likewise.
4456 (read_cutu_die_from_dwo): Likewise.
4457 (lookup_dwo_unit): Likewise.
4458 (open_and_init_dwo_file): Likewise.
4459 (lookup_dwo_cutu): Likewise.
4460 (lookup_dwo_comp_unit): Likewise.
4461 (lookup_dwo_type_unit): Likewise.
4462 (cutu_reader::init_tu_and_read_dwo_dies): Update.
4463 (cutu_reader::cutu_reader): Update.
4464
4465 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4466
4467 * dwarf2/read.c (process_full_comp_unit): Add dwarf2_per_objfile
4468 parameter.
4469 (process_full_type_unit): Likewise.
4470 (process_queue): Update.
4471
4472 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4473
4474 * dwarf2/read.c (recursively_compute_inclusions): Add
4475 dwarf2_per_objfile parameter.
4476 (compute_compunit_symtab_includes): Likewise.
4477 (process_cu_includes): Update.
4478
4479 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4480
4481 * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
4482 parameter.
4483 (create_type_unit_group): Update.
4484 (process_psymtab_comp_unit_reader): Update.
4485 (build_type_psymtabs_reader): Update.
4486
4487 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4488
4489 * dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
4490 object through m_this_cu->cu.
4491
4492 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4493
4494 * dwarf2/read.c (queue_and_load_dwo_tu): Expect a dwarf2_cu as
4495 the info parameter.
4496 (queue_and_load_all_dwo_tus): Pass per_cu->cu.
4497
4498 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4499
4500 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Add
4501 per_objfile parameter.
4502 (load_full_type_unit): Add per_objfile parameter.
4503 (read_signatured_type): Likewise.
4504 (load_full_comp_unit): Likewise.
4505 (load_cu): Likewise.
4506 (dw2_do_instantiate_symtab): Likewise.
4507 (dw2_get_file_names): Likewise.
4508 (dw2_map_symtabs_matching_filename): Update.
4509 (dw_expand_symtabs_matching_file_matcher): Update.
4510 (dw2_map_symbol_filenames): Update.
4511 (process_psymtab_comp_unit): Add per_objfile parameter.
4512 (build_type_psymtabs_1): Update.
4513 (process_skeletonless_type_unit): Update.
4514 (dwarf2_build_psymtabs_hard): Update.
4515 (load_partial_comp_unit): Add per_objfile parameter.
4516 (scan_partial_symbols): Update.
4517 (load_full_comp_unit): Add per_objfile parameter.
4518 (process_imported_unit_die): Update.
4519 (create_cus_hash_table): Update.
4520 (find_partial_die): Update.
4521 (dwarf2_read_addr_index): Update.
4522 (follow_die_offset): Update.
4523 (dwarf2_fetch_die_loc_sect_off): Update.
4524 (dwarf2_fetch_constant_bytes): Update.
4525 (dwarf2_fetch_die_type_sect_off): Update.
4526 (follow_die_sig_1): Update.
4527 (load_full_type_unit): Add per_objfile parameter.
4528 (read_signatured_type): Likewise.
4529
4530 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4531
4532 * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
4533 of objfile_name.
4534
4535 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4536
4537 * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
4538 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
4539 * dwarf2/read.c (dwarf2_per_bfd::dwarf2_per_bfd): Assign obfd
4540 field.
4541 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
4542 (create_cus_from_index): Update.
4543 (dwarf2_read_gdb_index): Update.
4544 (create_cus_from_debug_names): Update.
4545 (dwarf2_read_debug_names): Update.
4546 (get_abbrev_section_for_cu): Update.
4547 (create_all_comp_units): Update.
4548 (read_attribute_value): Update.
4549 (get_debug_line_section): Update.
4550 * dwarf2/index-cache.c (index_cache::store): Update.
4551 * dwarf2/index-write.c (save_gdb_index_command): Update.
4552 * dwarf2/macro.c (dwarf_decode_macro_bytes): Update.
4553
4554 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4555
4556 * dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
4557 member.
4558 * dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
4559 dwarf2_per_cu_data::per_bfd.
4560 (dwarf2_per_bfd::allocate_signatured_type): Likewise.
4561 (create_type_unit_group): Likewise.
4562 (queue_comp_unit): Remove reference to
4563 per_cu->dwarf2_per_objfile.
4564 (maybe_queue_comp_unit): Likewise.
4565 (fill_in_sig_entry_from_dwo_entry): Assign new field.
4566 (create_cus_hash_table): Assign new field.
4567
4568 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4569
4570 * dwarf2/read.c: Replace
4571 dwarf2_cu->per_cu->dwarf2_per_objfile references with
4572 dwarf2_cu->per_objfile throughout.
4573
4574 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4575
4576 * dwarf2/read.c (dw2_do_instantiate_symtab): Add per_objfile
4577 parameter, don't use per_cu->dwarf2_per_objfile.
4578 (dw2_instantiate_symtab): Likewise.
4579 (dw2_find_last_source_symtab): Update.
4580 (dw2_map_expand_apply): Update.
4581 (dw2_lookup_symbol): Update.
4582 (dw2_expand_symtabs_for_function): Update.
4583 (dw2_expand_all_symtabs): Update.
4584 (dw2_expand_symtabs_with_fullname): Update.
4585 (dw2_expand_symtabs_matching_one): Add per_objfile parameter,
4586 don't use per_cu->dwarf2_per_objfile.
4587 (dw2_expand_marked_cus): Update.
4588 (dw2_find_pc_sect_compunit_symtab): Update.
4589 (dw2_debug_names_lookup_symbol): Update.
4590 (dw2_debug_names_expand_symtabs_for_function): Update.
4591 (dw2_debug_names_map_matching_symbols): Update.
4592 (dwarf2_psymtab::expand_psymtab): Update.
4593
4594 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4595
4596 * dwarf2/read.c (struct dwarf2_cu) <dwarf2_cu>: Add parameter.
4597 <per_objfile>: New member.
4598 (class cutu_reader) <init_tu_and_read_dwo_dies>: Add parameter.
4599 (cutu_reader::init_tu_and_read_dwo_dies): Add parameter, update
4600 call to dwarf2_cu.
4601 (cutu_reader::cutu_reader): Update.
4602 (dwarf2_cu::dwarf2_cu): Add parameter, initialize per_objfile.
4603
4604 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
4605
4606 * dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
4607 struct dwarf2_per_objfile.
4608 (struct dwarf2_per_objfile) <die_type_hash>: Move from struct
4609 dwarf2_per_bfd.
4610 * dwarf2/read.c (set_die_type): Update.
4611 (get_die_type_at_offset): Update.
4612
4613 2020-05-27 Tom Tromey <tom@tromey.com>
4614 Simon Marchi <simon.marchi@efficios.com>
4615
4616 * dwarf2/read.h (struct dwarf2_per_bfd) <num_psymtabs>: New
4617 method.
4618 (struct dwarf2_per_objfile) <resize_symtabs, symtab_set_p,
4619 get_symtab, set_symtab>: New methods.
4620 <m_symtabs>: New field.
4621 (struct dwarf2_psymtab): Derive from partial_symtab.
4622 <readin_p, get_compunit_symtab>: Declare methods.
4623 * dwarf2/read.c (dwarf2_per_objfile::symtab_set_p,
4624 dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
4625 New methods.
4626 (struct dwarf2_per_cu_quick_data) <compunit_symtab>: Remove.
4627 (dw2_do_instantiate_symtab, dw2_instantiate_symtab)
4628 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
4629 (dw2_symtab_iter_next, dw2_print_stats)
4630 (dw2_expand_symtabs_with_fullname)
4631 (dw2_expand_symtabs_matching_one)
4632 (dw_expand_symtabs_matching_file_matcher)
4633 (dw2_find_pc_sect_compunit_symtab, dw2_map_symbol_filenames)
4634 (dw2_debug_names_iterator::next)
4635 (dw2_debug_names_map_matching_symbols)
4636 (fill_in_sig_entry_from_dwo_entry, dwarf2_psymtab::read_symtab)
4637 (process_queue, dwarf2_psymtab::expand_psymtab): Update.
4638 (dwarf2_psymtab::readin_p, dwarf2_psymtab::get_compunit_symtab):
4639 New methods.
4640 (get_compunit_symtab, process_full_comp_unit)
4641 (process_full_type_unit): Update.
4642 (dwarf2_build_psymtabs, dwarf2_initialize_objfile, add_type_unit): Call
4643
4644 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
4645
4646 * dwarf2/read.h (dwarf2_per_objfile): Rename to dwarf2_per_bfd,
4647 then introduce a new dwarf2_per_objfile type.
4648 <read_line_string>: Move to the new dwarf2_per_objfile type.
4649 <objfile>: Likewise.
4650 (dwarf2_per_bfd): Rename dwarf2_per_objfile to this.
4651 * dwarf2/read.c: Replace references to dwarf2_per_objfile with
4652 dwarf2_per_objfile->per_bfd.
4653 (dwarf2_per_objfile::dwarf2_per_objfile): Rename to...
4654 (dwarf2_per_bfd::dwarf2_per_bfd): ... this.
4655 (dwarf2_per_objfile::free_cached_comp_units): Rename to...
4656 (dwarf2_per_bfd::free_cached_comp_units): ... this.
4657 (dwarf2_has_info): Allocate dwarf2_per_bfd.
4658 (dwarf2_per_objfile::locate_sections): Rename to...
4659 (dwarf2_per_bfd::locate_sections): ... this.
4660 (dwarf2_per_objfile::get_cutu): Rename to...
4661 (dwarf2_per_bfd::get_cutu): ... this.
4662 (dwarf2_per_objfile::get_cu): Rename to...
4663 (dwarf2_per_bfd::get_cu): ... this.
4664 (dwarf2_per_objfile::get_tu): Rename to...
4665 (dwarf2_per_bfd::get_tu): ... this.
4666 (dwarf2_per_objfile::allocate_per_cu): Rename to...
4667 (dwarf2_per_bfd::allocate_per_cu): ... this.
4668 (dwarf2_per_objfile::allocate_signatured_type): Rename to...
4669 (dwarf2_per_bfd::allocate_signatured_type): ... this.
4670 (get_gdb_index_contents_ftype): Change parameter from
4671 dwarf2_per_objfile to dwarf2_per_bfd.
4672 * dwarf2/macro.c, dwarf2/index-write.c: Replace references to
4673 dwarf2_per_objfile with dwarf2_per_objfile->per_bfd.
4674
4675 2020-05-27 Tom Tromey <tom@tromey.com>
4676 Simon Marchi <simon.marchi@efficios.com>
4677
4678 * dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
4679 (allocate_piece_closure): Set "per_objfile" member.
4680 (dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
4681 (locexpr_describe_location, loclist_describe_location): Use new
4682 member.
4683 * dwarf2/read.c (read_call_site_scope)
4684 (mark_common_block_symbol_computed, attr_to_dynamic_prop)
4685 (dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
4686 (fill_in_loclist_baton, dwarf2_symbol_mark_computed,
4687 handle_data_member_location): Set per_objfile member.
4688 * dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
4689 member.
4690 (struct dwarf2_loclist_baton) <per_objfile>: New member.
4691
4692 2020-05-27 Tom Tromey <tom@tromey.com>
4693
4694 * dwarf2/read.h (struct dwarf2_per_objfile) <allocate_per_cu,
4695 allocate_signatured_type>: Declare new methods.
4696 <m_num_psymtabs>: New member.
4697 (struct dwarf2_per_cu_data) <index>: New member.
4698 * dwarf2/read.c (dwarf2_per_objfile::allocate_per_cu)
4699 (dwarf2_per_objfile::allocate_signatured_type): New methods.
4700 (create_cu_from_index_list): Use allocate_per_cu.
4701 (create_signatured_type_table_from_index)
4702 (create_signatured_type_table_from_debug_names)
4703 (create_debug_type_hash_table, add_type_unit)
4704 (read_comp_units_from_section): Use allocate_signatured_type.
4705
4706 2020-05-27 Tom Tromey <tom@tromey.com>
4707
4708 * psymtab.c (partial_map_expand_apply)
4709 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
4710 (psym_lookup_global_symbol_language)
4711 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
4712 (psym_print_stats, psym_expand_symtabs_for_function)
4713 (psym_map_symbol_filenames, psym_map_matching_symbols)
4714 (psym_expand_symtabs_matching)
4715 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
4716 (maintenance_check_psymtabs): Update.
4717 * psympriv.h (struct partial_symtab) <readin_p,
4718 get_compunit_symtab>: Add objfile parameter.
4719 (struct standard_psymtab) <readin_p, get_compunit_symtab>:
4720 Likewise.
4721 * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p,
4722 get_compunit_symtab>: Likewise.
4723 (dwarf2_psymtab::expand_psymtab): Pass objfile argument.
4724
4725 2020-05-27 Tom Tromey <tom@tromey.com>
4726
4727 * dwarf2/read.h (struct dwarf2_per_objfile) <obstack>: New
4728 member.
4729 * dwarf2/read.c (delete_file_name_entry): Fix comment.
4730 (create_cu_from_index_list)
4731 (create_signatured_type_table_from_index)
4732 (create_signatured_type_table_from_debug_names)
4733 (dw2_get_file_names_reader, dwarf2_initialize_objfile)
4734 (dwarf2_create_include_psymtab)
4735 (create_debug_type_hash_table, add_type_unit)
4736 (create_type_unit_group, read_comp_units_from_section)
4737 (dwarf2_compute_name, create_cus_hash_table)
4738 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
4739 (create_dwo_unit_in_dwp_v2, open_and_init_dwp_file): Use new
4740 obstack.
4741 (dw2_get_real_path): Likewise. Change argument to
4742 dwarf2_per_objfile.
4743
4744 2020-05-27 Luis Machado <luis.machado@linaro.org>
4745
4746 PR tdep/26000
4747 * arm-tdep.c (thumb_analyze_prologue): Fix instruction matching
4748 for ldrd (immediate).
4749
4750 2020-05-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4751
4752 * command.h: Add comment giving the name of class_tui.
4753 * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
4754 create the fake command for the help for class_tui.
4755
4756 2020-05-26 Tom Tromey <tromey@adacore.com>
4757
4758 * ada-lang.c (ada_print_array_index): Change type. Call val_atr.
4759 (ada_value_ptr_subscript): Don't call pos_atr on the lower bound.
4760 (val_atr): New function.
4761 (value_val_atr): Use it.
4762 * ada-valprint.c (print_optional_low_bound): Change low bound
4763 handling for enums.
4764 (val_print_packed_array_elements): Don't call discrete_position.
4765 * gdbtypes.c (get_discrete_bounds) <TYPE_CODE_RANGE>: Call
4766 discrete_position for enum types.
4767 * language.c (default_print_array_index): Change type.
4768 * language.h (struct language_defn) <la_print_array_index>: Add
4769 index_type parameter, change type of index_value.
4770 (LA_PRINT_ARRAY_INDEX): Add index_type parameter.
4771 (default_print_array_index): Update.
4772 * valprint.c (maybe_print_array_index): Don't call
4773 value_from_longest. Update.
4774 (value_print_array_elements): Don't call discrete_position.
4775
4776 2020-05-26 Tom Tromey <tromey@adacore.com>
4777
4778 * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE.
4779 * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE.
4780
4781 2020-05-25 Cristiano De Alti <cristiano_dealti@hotmail.com>
4782
4783 PR gdb/13519
4784 * avr-tdep.c (avr_integer_to_address): Return data or code
4785 address accordingly to the second 'type' argument of the
4786 function.
4787
4788 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
4789
4790 * infcmd.c, inferior.h: (construct_inferior_arguments):
4791 Moved function from here to gdbsupport/common-inferior.{h,cc}
4792
4793 2020-05-23 Tom Tromey <tom@tromey.com>
4794
4795 Revert commit eca1f90c:
4796 * NEWS: Remove entry for completion styling.
4797 * completer.c (_rl_completion_prefix_display_length): Move
4798 declaration later.
4799 (gdb_fnprint): Revert.
4800 (gdb_display_match_list_1): Likewise.
4801 * cli/cli-style.c (completion_prefix_style)
4802 (completion_difference_style, completion_suffix_style): Remove.
4803 (_initialize_cli_style): Revert.
4804 * cli/cli-style.h (completion_prefix_style)
4805 (completion_difference_style, completion_suffix_style): Don't
4806 declare.
4807
4808 2020-05-24 Pedro Alves <palves@redhat.com>
4809
4810 * symtab.c (completion_list_add_name): Return boolean indication
4811 of whether the symbol matched.
4812 (completion_list_add_symbol): Don't try to remove C++ aliases if
4813 the symbol didn't match in the first place.
4814 * symtab.h (completion_list_add_name): Return bool.
4815
4816 2020-05-23 Simon Marchi <simon.marchi@polymtl.ca>
4817
4818 * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
4819 type::field.
4820
4821 2020-05-23 Joel Brobecker <brobecker@adacore.com>
4822
4823 GDB 9.2 released.
4824
4825 2020-05-23 Tom Tromey <tom@tromey.com>
4826
4827 * NEWS: Add entry for completion styling.
4828 * completer.c (_rl_completion_prefix_display_length): Move
4829 declaration earlier.
4830 (gdb_fnprint): Use completion_style.
4831 (gdb_display_match_list_1): Likewise.
4832 * cli/cli-style.c (completion_prefix_style)
4833 (completion_difference_style, completion_suffix_style): New
4834 globals.
4835 (_initialize_cli_style): Register new globals.
4836 * cli/cli-style.h (completion_prefix_style)
4837 (completion_difference_style, completion_suffix_style): Declare.
4838
4839 2020-05-23 Pedro Alves <palves@redhat.com>
4840
4841 * utils.c: Include "gdbsupport/gdb-safe-ctype.h".
4842 (parse_escape): Use ISDIGIT instead of isdigit.
4843 (puts_debug): Use gdb_isprint instead of isprint.
4844 (fprintf_symbol_filtered): Use ISALNUM instead of isalnum.
4845 (cp_skip_operator_token, skip_ws, strncmp_iw_with_mode): Use
4846 ISSPACE instead of isspace.
4847 (strncmp_iw_with_mode): Use TOLOWER instead of tolower and ISSPACE
4848 instead of isspace.
4849 (strcmp_iw_ordered): Use ISSPACE instead of isspace.
4850 (string_to_core_addr): Use TOLOWER instead of tolower, ISXDIGIT
4851 instead of isxdigit and ISDIGIT instead of isdigit.
4852
4853 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4854
4855 * gdbtypes.h (struct type) <field>: New method.
4856 (TYPE_FIELDS): Remove, replace all uses with either type::fields
4857 or type::field.
4858
4859 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4860
4861 * gdbtypes.h (struct type) <fields, set_fields>: New methods.
4862 (TYPE_FIELDS): Use type::fields. Change all call sites that
4863 modify the propery to use type::set_fields instead.
4864
4865 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4866
4867 * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
4868 type::num_fields instead.
4869
4870 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
4871
4872 * gdbtypes.h (struct type) <num_fields, set_num_fields>: New
4873 methods.
4874 (TYPE_NFIELDS): Use type::num_fields. Change all call sites
4875 that modify the number of fields to use type::set_num_fields
4876 instead.
4877
4878 2020-05-22 Tom Tromey <tromey@adacore.com>
4879
4880 * compile/compile-object-load.h (munmap_list_free): Don't
4881 declare.
4882
4883 2020-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
4884
4885 * annotate.c (annotate_source_line): Update return type, add call
4886 to update current symtab and line.
4887 * annotate.h (annotate_source_line): Update return type, and
4888 extend header comment.
4889 * source.c (info_line_command): Check annotation_level before
4890 calling annotate_source_line.
4891 * stack.c (print_frame_info): If calling annotate_source_line
4892 returns true, then don't print any other source line information.
4893
4894 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
4895
4896 * lm32-tdep.c (lm32_register_reggroup_p): Fix condition.
4897
4898 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
4899
4900 * coffread.c (patch_type): Remove NULL check before xfree.
4901 * corefile.c (set_gnutarget): Likewise.
4902 * cp-abi.c (set_cp_abi_as_auto_default): Likewise.
4903 * exec.c (build_section_table): Likewise.
4904 * remote.c (remote_target::pass_signals): Likewise.
4905 * utils.c (n_spaces): Likewise.
4906 * cli/cli-script.c (document_command): Likewise.
4907 * i386-windows-tdep.c (core_process_module_section): Likewise.
4908 * linux-fork.c (struct fork_info) <~fork_info>: Likewise.
4909
4910 2020-05-20 Simon Marchi <simon.marchi@efficios.com>
4911
4912 * symfile.c (reread_symbols): Clear objfile's section_offsets
4913 vector and section indices, re-compute them by calling
4914 sym_offsets.
4915
4916 2020-05-20 Tom Tromey <tromey@adacore.com>
4917
4918 * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove.
4919 (desc_one_bound, desc_index_type): Compute field name.
4920
4921 2020-05-20 Tom de Vries <tdevries@suse.de>
4922
4923 PR symtab/25833
4924 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index.
4925
4926 2020-05-20 Alan Modra <amodra@gmail.com>
4927
4928 PR 25993
4929 * solib-darwin.c (darwin_bfd_open): Don't strdup pathname for
4930 bfd_set_filename.
4931 * solib-aix.c (solib_aix_bfd_open): Use std::string for name
4932 passed to bfd_set_filename.
4933 * symfile-mem.c (add_vsyscall_page): Likewise for string
4934 passed to symbol_file_add_from_memory.
4935 (symbol_file_add_from_memory): Make name param a const char* and
4936 don't strdup.
4937
4938 2020-05-20 Alan Modra <amodra@gmail.com>
4939
4940 * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename
4941 rather than accessing bfd->filename directly.
4942 * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise,
4943 and use bfd_section_name.
4944 * dwarf2/frame.c (decode_frame_entry): Likewise.
4945 * exec.c (exec_set_section_address): Likewise.
4946 * solib-aix.c (solib_aix_bfd_open): Likewise.
4947 * stap-probe.c (get_stap_base_address): Likewise.
4948 * symfile.c (reread_symbols): Likewise.
4949
4950 2020-05-19 Tom Tromey <tromey@adacore.com>
4951
4952 * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
4953
4954 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4955
4956 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
4957
4958 2020-05-19 Pedro Alves <palves@redhat.com>
4959
4960 * NEWS (set exec-file-mismatch): Adjust entry.
4961 * exec.c: Include "build-id.h".
4962 (validate_exec_file): Try to match build IDs instead of filenames.
4963 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
4964 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
4965 and pass down 'warn_if_slow'.
4966 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
4967 gdb_bfd_open_closure to pass it down.
4968 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
4969
4970 2020-05-19 Pedro Alves <palves@redhat.com>
4971
4972 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
4973 * target.c (target_fileio_open_1): Rename to target_fileio_open
4974 and make extern. Use bool.
4975 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
4976 (target_fileio_read_alloc_1): Adjust.
4977 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
4978 (target_fileio_open_warn_if_slow): Delete declaration.
4979
4980 2020-05-19 Pedro Alves <palves@redhat.com>
4981
4982 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
4983 Adjust all callers.
4984
4985 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
4986
4987 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
4988 whether disp is negative.
4989
4990 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4991
4992 * symfile.h (struct symfile_segment_data)
4993 <~symfile_segment_data>: Remove.
4994 <segment_info>: Change to std::vector.
4995 * symfile.c (default_symfile_segments): Update.
4996 * elfread.c (elf_symfile_segments): Update.
4997
4998 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
4999
5000 * symfile.h (struct symfile_segment_data) <struct segment>: New.
5001 <segments>: New.
5002 <segment_bases, segment_sizes>: Remove.
5003 * symfile.c (default_symfile_segments): Update.
5004 * elfread.c (elf_symfile_segments): Update.
5005 * remote.c (remote_target::get_offsets): Update.
5006 * solib-target.c (solib_target_relocate_section_addresses):
5007 Update.
5008
5009 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
5010
5011 * symfile.h (struct symfile_segment_data): Initialize fields.
5012 <~symfile_segment_data>: Add.
5013 (symfile_segment_data_up): New.
5014 (struct sym_fns) <sym_segments>: Return a
5015 symfile_segment_data_up.
5016 (default_symfile_segments): Return a symfile_segment_data_up.
5017 (free_symfile_segment_data): Remove.
5018 (get_symfile_segment_data): Return a symfile_segment_data_up.
5019 * symfile.c (default_symfile_segments): Likewise.
5020 (get_symfile_segment_data): Likewise.
5021 (free_symfile_segment_data): Remove.
5022 (symfile_find_segment_sections): Update.
5023 * elfread.c (elf_symfile_segments): Return a
5024 symfile_segment_data_up.
5025 * remote.c (remote_target::get_offsets): Update.
5026 * solib-target.c (solib_target_relocate_section_addresses):
5027 Update.
5028 * symfile-debug.c (debug_sym_segments): Return a
5029 symfile_segment_data_up.
5030
5031 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5032
5033 PR build/25981
5034 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
5035 Hardcode register numbers.
5036
5037 PR build/25981
5038 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
5039 procfs_find_LDT_entry): Remove.
5040 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
5041 procfs_find_LDT_entry): Remove.
5042 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
5043 Remove.
5044
5045 2020-05-17 Pedro Alves <palves@redhat.com>
5046 Andrew Burgess <andrew.burgess@embecosm.com>
5047 Keno Fischer <keno@juliacomputing.com>
5048
5049 PR gdb/25741
5050 * breakpoint.c (build_target_condition_list): Update comments.
5051 (build_target_command_list): Update comments and skip matching
5052 locations.
5053 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
5054 a separate function. Simplify "set breakpoint auto-hw off"
5055 handling.
5056 (insert_breakpoints): Update comment.
5057 (tracepoint_locations_match): New parameter. For breakpoints,
5058 compare location types too, if the caller wants to.
5059 (handle_automatic_hardware_breakpoints): New functions.
5060 (bp_location_is_less_than): Also sort by location type and
5061 hardware breakpoint length.
5062 (update_global_location_list): Handle "set breakpoint auto-hw on"
5063 here.
5064 (update_breakpoint_locations): Ask breakpoint_locations_match to
5065 ignore location types.
5066
5067 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
5068
5069 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
5070 type::name instead.
5071
5072 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
5073
5074 * gdbtypes.h (struct type) <name, set_name>: New methods.
5075 (TYPE_CODE): Use type::name. Change all call sites used to set
5076 the name to use type::set_name instead.
5077
5078 2020-05-16 Tom Tromey <tom@tromey.com>
5079
5080 * top.c (quit_force): Update.
5081 * infrun.c (handle_no_resumed): Update.
5082 * top.h (all_uis): New function.
5083 (ALL_UIS): Remove.
5084
5085 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
5086
5087 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
5088
5089 2020-05-16 Pedro Alves <palves@redhat.com>
5090
5091 * ia64-linux-nat.c
5092 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
5093 Declare method.
5094 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
5095
5096 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
5097
5098 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
5099 (sparc64_adi_info): Likewise.
5100
5101 2020-05-15 Tom Tromey <tom@tromey.com>
5102
5103 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
5104 block_objfile.
5105 (lookup_objfile_from_block): Remove.
5106 (lookup_symbol_in_block, lookup_symbol_in_static_block)
5107 (lookup_global_symbol): Use block_objfile.
5108 * symtab.h (lookup_objfile_from_block): Don't declare.
5109 * printcmd.c (clear_dangling_display_expressions): Use
5110 block_objfile.
5111 * parse.c (operator_check_standard): Use block_objfile.
5112
5113 2020-05-15 Tom Tromey <tom@tromey.com>
5114
5115 * language.c (language_alloc_type_symbol): Set
5116 SYMBOL_SECTION.
5117 * symtab.c (initialize_objfile_symbol): Remove.
5118 (allocate_symbol): Remove.
5119 (allocate_template_symbol): Remove.
5120 * dwarf2/read.c (fixup_go_packaging): Use "new".
5121 (new_symbol): Use "new".
5122 (read_variable): Don't call initialize_objfile_symbol. Use
5123 "new".
5124 (read_func_scope): Use "new".
5125 * xcoffread.c (process_xcoff_symbol): Don't call
5126 initialize_objfile_symbol.
5127 (SYMBOL_DUP): Remove.
5128 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
5129 "new".
5130 * symtab.h (allocate_symbol, initialize_objfile_symbol)
5131 (allocate_template_symbol): Don't declare.
5132 (struct symbol): Add copy constructor. Change defaults.
5133 * jit.c (finalize_symtab): Use "new".
5134 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
5135 Use "new".
5136 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
5137 (common_block_end): Use "new".
5138 * mdebugread.c (parse_symbol): Use "new".
5139 (new_symbol): Likewise.
5140
5141 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5142
5143 * NEWS: Mention changes to help and apropos.
5144
5145 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5146
5147 * command.h (enum command_class): Improve comments, document
5148 that class_alias is for user-defined aliases, give the class
5149 name for each class, remove unused class_xdb.
5150 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
5151 * breakpoint.c (_initialize_breakpoint): Replace class_alias
5152 by a precise class.
5153 * infcmd.c (_initialize_infcmd): Likewise.
5154 * reverse.c (_initialize_reverse): Likewise.
5155 * stack.c (_initialize_stack): Likewise.
5156 * symfile.c (_initialize_symfile): Likewise.
5157 * tracepoint.c (_initialize_tracepoint): Likewise.
5158
5159 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5160
5161 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
5162 when their aliased command is traversed.
5163 (help_cmd): Add fput_command_names_styled call to
5164 output command name and aliases when command has an alias.
5165
5166 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5167
5168 * cli/cli-decode.h (help_cmd_list): Remove declaration.
5169 * cli/cli-decode.c (help_cmd_list): Declare as static,
5170 remove prefix argument, use bool for recurse arg, rework to show the aliases of
5171 a command together with the command.
5172 (fput_command_name_styled, fput_command_names_styled): New functions.
5173 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
5174 fput_command_name_styled.
5175 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
5176 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
5177
5178 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5179
5180 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
5181 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
5182 * command.h (cmd_show_list): Likewise.
5183 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
5184 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
5185
5186 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5187
5188 * unittests/command-def-selftests.c (traverse_command_structure):
5189 Verify all commands of a list have the same prefix command and
5190 that only the top cmdlist commands have a null prefix.
5191
5192 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5193
5194 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
5195 as prefix, not one of its aliases.
5196 (set_cmd_prefix): Remove.
5197 (do_add_cmd): Centralize the setting of the prefix of a command, when
5198 command is defined after its full chain of prefix commands.
5199 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
5200 (add_setshow_cmd_full): Likewise.
5201 (update_prefix_field_of_prefixed_commands): New function.
5202 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
5203 update_prefix_field_of_prefixed_commands.
5204 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
5205 addresses of remote_set_cmdlist and remote_show_cmdlist given
5206 as argument, not the address of an argument.
5207 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
5208 * gdb/remote.c (_initialize_remote): Likewise.
5209
5210 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5211
5212 * cli/cli-cmds.c (alias_command): Check for an existing alias
5213 using lookup_cmd_composition, as valid_command_p is too strict
5214 and forbids aliases that are the prefix of an existing alias
5215 or command.
5216 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
5217 command is properly recognised as a valid command.
5218
5219 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5220
5221 * unittests/help-doc-selftests.c: Rename to
5222 unittests/command-def-selftests.c
5223 * unittests/command-def-selftests.c (help_doc_tests): Update some
5224 comments.
5225 (command_structure_tests, traverse_command_structure): New namespace
5226 and function.
5227 (command_structure_invariants_tests): New function.
5228 (_initialize_command_def_selftests) Renamed from
5229 _initialize_help_doc_selftests, register command_structure_invariants
5230 selftest.
5231
5232 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5233
5234 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
5235 an alias of 'show'.
5236
5237 2020-05-15 Joel Brobecker <brobecker@adacore.com>
5238
5239 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
5240 ada_is_fixed_point_type. Update all callers.
5241 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
5242 all callers.
5243 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
5244 Update all callers.
5245 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
5246 print_fixed_point_type. Update all callers.
5247 * ada-valprint.c (ada_value_print_num): Replace call to
5248 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
5249
5250 2020-05-14 Kevin Buettner <kevinb@redhat.com>
5251
5252 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
5253 processors.
5254 (cpu_supports_bts): Add CV_AMD case.
5255
5256 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
5257 Simon Marchi <simon.marchi@efficios.com>
5258
5259 * infrun.c (stop_all_threads): Collect multiple wait events at
5260 each pass.
5261
5262 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
5263
5264 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
5265 type::code instead.
5266
5267 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
5268
5269 * gdbtypes.h (struct type) <code, set_code>: New methods.
5270 (TYPE_CODE): Use type::code. Change all call sites used to set
5271 the code to use type::set_code instead.
5272
5273 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5274 Tom de Vries <tdevries@suse.de>
5275 Pedro Alves <palves@redhat.com>
5276
5277 PR threads/25478
5278 * infrun.c (stop_all_threads): Do NOT ignore
5279 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
5280 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
5281 received.
5282 (handle_no_resumed): Remove code handling a live inferior with no
5283 threads.
5284 * remote.c (has_single_non_exited_thread): New.
5285 (remote_target::update_thread_list): Do not delete a thread if is
5286 the last thread of the process.
5287 * thread.c (thread_select): Call delete_exited_threads instead of
5288 prune_threads.
5289
5290 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5291
5292 * infrun.c (stop_all_threads): Enable/disable thread events of all
5293 targets. Move a debug message denoting the end of the function
5294 into the SCOPED_EXIT block.
5295
5296 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5297
5298 * process-stratum-target.h: Include <set>.
5299 (all_non_exited_process_targets, switch_to_target_no_thread): New
5300 function declarations.
5301 * process-stratum-target.c (all_non_exited_process_targets)
5302 (switch_to_target_no_thread): New function implementations.
5303
5304 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5305
5306 * infrun.c (handle_inferior_event): Extract out a piece of code
5307 into...
5308 (mark_non_executing_threads): ...this new function.
5309
5310 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5311
5312 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
5313 use.
5314
5315 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5316
5317 * regcache.c (regcache_read_pc_protected): New function
5318 implementation that returns 0 if the PC cannot read via
5319 'regcache_read_pc'.
5320 * infrun.c (proceed): Call 'regcache_read_pc_protected'
5321 instead of 'regcache_read_pc'.
5322 (keep_going_pass_signal): Ditto.
5323
5324 2020-05-13 Tom Tromey <tromey@adacore.com>
5325
5326 * ada-lang.c (align_value): Remove.
5327 (ada_template_to_fixed_record_type_1): Use align_up.
5328
5329 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5330
5331 * async-event.c: Update the copyright year.
5332 * async-event.h: Update the copyright year.
5333
5334 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
5335
5336 * objfiles.h (is_addr_in_objfile,
5337 shared_objfile_contains_address_p): Return bool.
5338 * objfile.c (is_addr_in_objfile,
5339 shared_objfile_contains_address_p): Return bool.
5340
5341 2020-05-11 Tom Tromey <tromey@adacore.com>
5342
5343 * cli/cli-cmds.c (info_command): Restore.
5344 (_initialize_cli_cmds): Use add_prefix_command for "info".
5345 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
5346
5347 2020-05-11 Tom Tromey <tromey@adacore.com>
5348
5349 * ada-lang.c (ada_value_primitive_field): Now public.
5350 * ada-lang.h (ada_value_primitive_field): Declare.
5351 * ada-valprint.c (print_field_values): Use
5352 ada_value_primitive_field for wrapper fields.
5353
5354 2020-05-11 Tom de Vries <tdevries@suse.de>
5355
5356 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
5357 MODULE_DOMAIN.
5358
5359 2020-05-11 Tom de Vries <tdevries@suse.de>
5360
5361 PR symtab/25941
5362 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
5363 with length 0, if not gdb-produced.
5364 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
5365
5366 2020-05-09 Tom de Vries <tdevries@suse.de>
5367
5368 PR gdb/25955
5369 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
5370 calculation.
5371
5372 2020-05-09 Tom Tromey <tom@tromey.com>
5373
5374 * top.c (server_command): Now bool.
5375 * top.h (server_command): Now bool.
5376
5377 2020-05-08 Tom Tromey <tromey@adacore.com>
5378
5379 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
5380 already being processed.
5381
5382 2020-05-08 Tom Tromey <tom@tromey.com>
5383
5384 * printcmd.c (struct display) <next>: Remove.
5385 <display>: New constructor.
5386 <exp_string>: Now a std::string.
5387 <enabled_p>: Now a bool.
5388 (display_number): Move definition earlier.
5389 (displays): Rename from display_chain. Now a std::vector.
5390 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
5391 (display_command): Update.
5392 (do_one_display, disable_display)
5393 (enable_disable_display_command, do_enable_disable_display):
5394 Update.
5395 (free_display): Remove.
5396 (clear_displays): Rewrite.
5397 (delete_display): Update.
5398 (map_display_numbers): Use function_view. Remove "data"
5399 parameter. Update.
5400 (do_delete_display): Remove.
5401 (undisplay_command): Update.
5402 (do_one_display, do_displays, disable_display)
5403 (info_display_command): Update.
5404 (do_enable_disable_display): Remove.
5405 (enable_disable_display_command)
5406 (clear_dangling_display_expressions): Update.
5407
5408 2020-05-08 Tom Tromey <tom@tromey.com>
5409
5410 * symtab.c (set_symbol_cache_size)
5411 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
5412 (maintenance_print_symbol_cache_statistics): Update.
5413 * symmisc.c (print_symbol_bcache_statistics)
5414 (print_objfile_statistics, maintenance_print_objfiles)
5415 (maintenance_info_symtabs, maintenance_check_symtabs)
5416 (maintenance_expand_symtabs, maintenance_info_line_tables):
5417 Update.
5418 * symfile-debug.c (set_debug_symfile): Update.
5419 * source.c (forget_cached_source_info): Update.
5420 * python/python.c (gdbpy_progspaces): Update.
5421 * psymtab.c (maintenance_info_psymtabs): Update.
5422 * probe.c (parse_probes): Update.
5423 * linespec.c (iterate_over_all_matching_symtabs)
5424 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
5425 * guile/scm-progspace.c (gdbscm_progspaces): Update.
5426 * exec.c (exec_target::close): Update.
5427 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
5428 * breakpoint.c (print_one_breakpoint_location)
5429 (create_longjmp_master_breakpoint)
5430 (create_std_terminate_master_breakpoint): Update.
5431 * progspace.c (program_spaces): Now a std::vector.
5432 (maybe_new_address_space): Update.
5433 (add_program_space): Remove.
5434 (program_space::program_space): Update.
5435 (remove_program_space): Update.
5436 (number_of_program_spaces): Remove.
5437 (print_program_space, update_address_spaces): Update.
5438 * progspace.h (program_spaces): Change type.
5439 (ALL_PSPACES): Remove.
5440 (number_of_program_spaces): Don't declare.
5441 (struct program_space) <next>: Remove.
5442
5443 2020-05-08 Tom Tromey <tom@tromey.com>
5444
5445 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
5446 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
5447 (enable_break): Update.
5448 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
5449 (frv_fdpic_find_canonical_descriptor): Update.
5450 (frv_fetch_objfile_link_map): Update.
5451 * progspace.c (program_space::free_all_objfiles): Update.
5452 (program_space::solibs): New method.
5453 * progspace.h (struct program_space) <solibs>: New method.
5454 * solist.h (master_so_list): Don't declare.
5455 (ALL_SO_LIBS): Remove.
5456 * solib.h (so_list_head): Remove.
5457 (update_solib_list): Update comment.
5458 * solib.c (master_so_list): Remove.
5459 (solib_used, update_solib_list, solib_add)
5460 (info_sharedlibrary_command, clear_solib)
5461 (reload_shared_libraries_1, remove_user_added_objfile): Update.
5462
5463 2020-05-08 Tom Tromey <tom@tromey.com>
5464
5465 * extension.c (extension_languages): Now a std::array.
5466 (ALL_EXTENSION_LANGUAGES): Remove.
5467 (get_ext_lang_defn, get_ext_lang_of_file)
5468 (eval_ext_lang_from_control_command): Update.
5469 (finish_ext_lang_initialization)
5470 (auto_load_ext_lang_scripts_for_objfile)
5471 (ext_lang_type_printers::ext_lang_type_printers)
5472 (apply_ext_lang_type_printers)
5473 (ext_lang_type_printers::~ext_lang_type_printers)
5474 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
5475 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
5476 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
5477 (get_matching_xmethod_workers, ext_lang_colorize)
5478 (ext_lang_before_prompt): Update.
5479 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
5480
5481 2020-05-08 Tom Tromey <tom@tromey.com>
5482
5483 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
5484 overload.
5485 <swap_string, m_string>: Remove.
5486 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
5487 Update.
5488 * stabsread.c (define_symbol, read_type): Update.
5489 * linespec.c (find_linespec_symbols): Update.
5490 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
5491 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
5492 * dbxread.c (read_dbx_symtab): Update.
5493 * cp-support.h (cp_canonicalize_string_full)
5494 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
5495 Return unique_xmalloc_ptr.
5496 * cp-support.c (inspect_type): Update.
5497 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
5498 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
5499 Likewise.
5500 * c-typeprint.c (print_name_maybe_canonical): Update.
5501 * break-catch-throw.c (check_status_exception_catchpoint):
5502 Update.
5503
5504 2020-05-08 Tom de Vries <tdevries@suse.de>
5505
5506 * infrun.c (follow_fork): Copy current_line and current_symtab to
5507 child thread.
5508
5509 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
5510
5511 * async-event.c (struct async_signal_handler, struct
5512 async_event_handler): Reformat, remove typedef.
5513
5514 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
5515
5516 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
5517 access thistype->main_type->dyn_prop_list directly.
5518
5519 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
5520
5521 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
5522 (remove_dyn_prop): Remove. Update all users to use
5523 type::remove_dyn_prop.
5524 * gdbtypes.c (remove_dyn_prop): Rename to...
5525 (type::remove_dyn_prop): ... this.
5526
5527 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
5528
5529 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
5530 (add_dyn_prop): Remove. Update all users to use
5531 type::add_dyn_prop.
5532 * gdbtypes.c (add_dyn_prop): Rename to...
5533 (type::add_dyn_prop): ... this.
5534
5535 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
5536
5537 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
5538 (get_dyn_prop): Remove. Update all users to use
5539 type::dyn_prop.
5540 * gdbtypes.c (get_dyn_prop): Rename to...
5541 (type::dyn_prop): ... this.
5542
5543 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
5544
5545 * gdbtypes.h (struct main_type) <flag_static>: Remove.
5546
5547 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
5548
5549 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
5550 instruction, skip it if it's there.
5551
5552 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
5553
5554 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
5555
5556 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
5557
5558 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
5559 * gdbtypes.c (recursive_dump_type): Remove use of
5560 TYPE_INCOMPLETE.
5561
5562 2020-05-03 Tom Tromey <tom@tromey.com>
5563
5564 * breakpoint.c (catch_command, tcatch_command): Remove.
5565 (_initialize_breakpoint): Use add_basic_prefix_cmd,
5566 add_show_prefix_cmd.
5567 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
5568 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5569 Remove.
5570 (add_internal_problem_command): Use add_basic_prefix_cmd,
5571 add_show_prefix_cmd.
5572 * mips-tdep.c (set_mipsfpu_command): Remove.
5573 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
5574 * dwarf2/index-cache.c (set_index_cache_command): Remove.
5575 (_initialize_index_cache): Use add_basic_prefix_cmd.
5576 * memattr.c (dummy_cmd): Remove.
5577 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
5578 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
5579 (_initialize_tui_win): Use add_basic_prefix_cmd,
5580 add_show_prefix_cmd.
5581 * cli/cli-logging.c (set_logging_command): Remove.
5582 (_initialize_cli_logging): Use add_basic_prefix_cmd,
5583 add_show_prefix_cmd.
5584 (show_logging_command): Remove.
5585 * target.c (target_command): Remove.
5586 (add_target): Use add_basic_prefix_cmd.
5587
5588 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
5589
5590 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
5591
5592 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5593
5594 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
5595 info_command.
5596
5597 2020-04-30 Kamil Rytarowski <n54@gmx.com>
5598
5599 * nbsd-nat.c (nbsd_enable_proc_events)
5600 (nbsd_nat_target::post_startup_inferior): Add.
5601 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
5602 (nbsd_nat_target::update_thread_list): Rewrite.
5603 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
5604 "PTRACE_LWP_CREATE".
5605 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
5606
5607 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5608
5609 * stack.c (_initialize_stack): Remove duplicated creation
5610 of "frame" command and "f" alias.
5611
5612 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
5613
5614 PR gdb/18706
5615 * gdbtypes.c (check_typedef): Calculate size of array of
5616 stubbed type.
5617
5618 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
5619
5620 PR gdb/15559
5621 * i386-tdep.c (i386_push_dummy_call): Call
5622 i386_thiscall_push_dummy_call.
5623 (i386_thiscall_push_dummy_call): New function.
5624 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
5625 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
5626 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
5627
5628 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5629
5630 * gdbarch.sh (do_read): Add shellcheck disable directive for
5631 warning SC2162.
5632
5633 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5634
5635 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
5636 "referenced but not assigned" warning.
5637
5638 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5639
5640 * gdbarch.sh: Remove code that sets fallbackdefault.
5641
5642 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5643
5644 * gdbarch.sh: Use shell operators && and || instead of
5645 -a and -o.
5646
5647 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5648
5649 * gdbarch.sh: Use $(...) instead of `...`.
5650
5651 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5652
5653 * gdbarch.sh: Use double quotes around variables.
5654
5655 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
5656
5657 * gdbarch.sh: Use %s with printf, instead of variables in the
5658 format string.
5659
5660 2020-04-29 Tom Tromey <tromey@adacore.com>
5661
5662 PR ada/25875:
5663 * dwarf2/read.c (update_enumeration_type_from_children): Compute
5664 type fields here.
5665 (read_enumeration_type): Call
5666 update_enumeration_type_from_children later. Update comments.
5667 (process_enumeration_scope): Don't create type fields.
5668
5669 2020-04-29 Kamil Rytarowski <n54@gmx.com>
5670
5671 * nbsd-tdep.c: Include "xml-syscall.h".
5672 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
5673
5674 2020-04-29 Kamil Rytarowski <n54@gmx.com>
5675
5676 * nbsd-nat.c: Include "sys/wait.h".
5677 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
5678 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
5679 (nbsd_nat_target::remove_exec_catchpoint)
5680 (nbsd_nat_target::set_syscall_catchpoint): Add.
5681 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
5682 (nbsd_nat_target::insert_exec_catchpoint)
5683 (nbsd_nat_target::remove_exec_catchpoint)
5684 (nbsd_nat_target::set_syscall_catchpoint): Add.
5685 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
5686 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
5687 `nbsd_get_syscall_number'.
5688
5689 2020-04-29 Tom Tromey <tom@tromey.com>
5690
5691 * stack.c (print_block_frame_labels): Remove.
5692
5693 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
5694
5695 PR gdb/17320
5696 * ada-valprint.c (val_print_packed_array_elements): Move array
5697 end bracket to new line.
5698 (ada_val_print_string): Remove extra spaces before first array
5699 element.
5700 * c-valprint.c (c_value_print_array): Likewise.
5701 * m2-valprint.c (m2_print_array_contents): Likewise.
5702 (m2_value_print_inner): Likewise.
5703 * p-valprint.c (pascal_value_print_inner): Likewise.
5704 * valprint.c (generic_val_print_array): Likewise.
5705 (value_print_array_elements): Move first array element and array
5706 end bracket to new line.
5707
5708 2020-04-29 Tom de Vries <tdevries@suse.de>
5709
5710 PR symtab/25889
5711 * linespec.c (find_method): Fix ix calculation.
5712
5713 2020-04-28 Kamil Rytarowski <n54@gmx.com>
5714
5715 * syscalls/update-netbsd.sh: New file.
5716 * syscalls/netbsd.xml: Regenerate.
5717 * data-directory/Makefile.in: Register `netbsd.xml' in
5718 `SYSCALLS_FILES'.
5719
5720 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
5721
5722 * syscalls/update-freebsd.sh: Add double quotes.
5723
5724 2020-04-28 Tom Tromey <tom@tromey.com>
5725
5726 * NEWS: Update.
5727 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
5728 (cmdpy_init): Allow class_tui.
5729
5730 2020-04-28 Mark Williams <mark@myosotissp.com>
5731
5732 PR gdb/24480
5733 * dwarf2read.c: Add missing assingments to list_in_scope when
5734 start_symtab was already called.
5735
5736 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
5737
5738 PR gdb/25881
5739 * dwarf2/read.c (offset_map_type): Use
5740 gdb:hash_enum<sect_offset> as hash function.
5741
5742 2020-04-28 Tom de Vries <tdevries@suse.de>
5743
5744 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
5745 with DW_AT_signature.
5746
5747 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
5748
5749 * configure.ac: Remove check for fs_base/gs_base in
5750 user_regs_struct.
5751 * configure: Re-generate.
5752 * config.in: Re-generate.
5753 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
5754 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
5755 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
5756
5757 2020-04-27 Luis Machado <luis.machado@linaro.org>
5758
5759 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
5760 problematic inline frame unwinding situation.
5761 * frame.c (frame_id_computed_p): New function.
5762 * frame.h (frame_id_computed_p): New prototype.
5763
5764 2020-04-26 Tom Tromey <tom@tromey.com>
5765
5766 * command.h (enum command_class) <class_pseudo>: Remove.
5767
5768 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5769
5770 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
5771 and whitespace.
5772
5773 2020-04-25 Kamil Rytarowski <n54@gmx.com>
5774
5775 * inf-ptrace.c (inf_ptrace_target::wait): Remove
5776 `PT_GET_PROCESS_STATE' block.
5777
5778 2020-04-24 Tom Tromey <tom@tromey.com>
5779
5780 * symtab.h (symbol_get_demangled_name): Don't declare.
5781 * symtab.c (symbol_get_demangled_name): Remove.
5782 (general_symbol_info::natural_name)
5783 (general_symbol_info::demangled_name): Update.
5784
5785 2020-04-24 Tom Tromey <tom@tromey.com>
5786
5787 PR rust/25025:
5788 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
5789
5790 2020-04-24 Tom Tromey <tom@tromey.com>
5791
5792 PR symtab/12707:
5793 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
5794 exists.
5795 (new_symbol): Likewise.
5796 * compile/compile-object-load.c (get_out_value_type): Use
5797 symbol_matches_search_name.
5798
5799 2020-04-24 Tom Tromey <tom@tromey.com>
5800
5801 * dwarf2/read.c (add_partial_symbol): Do not call
5802 compute_and_set_names.
5803
5804 2020-04-24 Tom Tromey <tom@tromey.com>
5805
5806 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
5807 overload.
5808
5809 2020-04-24 Tom Tromey <tom@tromey.com>
5810
5811 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
5812 (add_psymbol_to_list): New overload. Make old overload call new
5813 one.
5814 * psympriv.h (add_psymbol_to_list): New overload.
5815
5816 2020-04-24 Tom Tromey <tom@tromey.com>
5817
5818 * dwarf2/read.c (partial_die_info::read) <case
5819 DW_AT_linkage_name>: Use value_as_string.
5820 (dwarf2_string_attr): Use value_as_string.
5821 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
5822 method.
5823 * dwarf2/attribute.c (attribute::value_as_string): New method.
5824
5825 2020-04-24 Tom Tromey <tom@tromey.com>
5826
5827 * symtab.c (general_symbol_info::natural_name)
5828 (general_symbol_info::demangled_name): Check for language_rust.
5829
5830 2020-04-24 Tom Tromey <tom@tromey.com>
5831
5832 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
5833 (dwarf2_physname): ... from here.
5834 (partial_die_info::read): Add Rust "{" hack.
5835
5836 2020-04-24 Tom Tromey <tom@tromey.com>
5837
5838 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
5839 method.
5840 (symbol_set_demangled_name): Don't declare.
5841 * symtab.c (general_symbol_info::set_demangled_name): Rename from
5842 symbol_set_demangled_name.
5843 (general_symbol_info::set_language)
5844 (general_symbol_info::compute_and_set_names): Update.
5845 * minsyms.c (minimal_symbol_reader::install): Update.
5846 * dwarf2/read.c (new_symbol): Update.
5847
5848 2020-04-24 Tom Tromey <tromey@adacore.com>
5849
5850 PR python/23662:
5851 * python/py-type.c (convert_field): Handle
5852 FIELD_LOC_KIND_DWARF_BLOCK.
5853 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
5854 (typy_get_dynamic): Nw function.
5855 (type_object_getset): Add "dynamic".
5856 * NEWS: Add entry.
5857
5858 2020-04-24 Tom Tromey <tromey@adacore.com>
5859
5860 * ada-typeprint.c (print_choices, print_variant_part)
5861 (print_record_field_types_dynamic): New functions.
5862 (print_record_field_types): Use print_record_field_types_dynamic.
5863
5864 2020-04-24 Tom Tromey <tromey@adacore.com>
5865
5866 * dwarf2/read.c (handle_data_member_location): New overload.
5867 (dwarf2_add_field): Use it.
5868 (decode_locdesc): Add "computed" parameter. Update comment.
5869 * gdbtypes.c (is_dynamic_type_internal): Also look for
5870 FIELD_LOC_KIND_DWARF_BLOCK.
5871 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
5872 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
5873 virtual base classes.
5874 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
5875 FIELD_LOC_KIND_DWARF_BLOCK.
5876
5877 2020-04-24 Tom Tromey <tromey@adacore.com>
5878
5879 * dwarf2/read.c (read_structure_type): Handle dynamic length.
5880 * gdbtypes.c (is_dynamic_type_internal): Check
5881 TYPE_HAS_DYNAMIC_LENGTH.
5882 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
5883 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
5884 New macros.
5885 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
5886 constant.
5887
5888 2020-04-24 Tom Tromey <tromey@adacore.com>
5889
5890 * dwarf2/read.c (struct variant_field): Rewrite.
5891 (struct variant_part_builder): New.
5892 (struct nextfield): Remove "variant" field. Add "offset".
5893 (struct field_info): Add "current_variant_part" and
5894 "variant_parts".
5895 (alloc_discriminant_info): Remove.
5896 (alloc_rust_variant): New function.
5897 (quirk_rust_enum): Update.
5898 (dwarf2_add_field): Set "offset" member. Don't handle
5899 DW_TAG_variant_part.
5900 (offset_map_type): New typedef.
5901 (convert_variant_range, create_one_variant)
5902 (create_one_variant_part, create_variant_parts)
5903 (add_variant_property): New functions.
5904 (dwarf2_attach_fields_to_type): Call add_variant_property.
5905 (read_structure_type): Don't handle DW_TAG_variant_part.
5906 (handle_variant_part, handle_variant): New functions.
5907 (handle_struct_member_die): Use them.
5908 (process_structure_scope): Don't handle variant parts.
5909 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
5910 (struct discriminant_info): Remove.
5911 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
5912 (struct main_type) <flag_discriminated_union>: Remove.
5913 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
5914 (rust_enum_variant): Return int. Remove "contents". Rewrite.
5915 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
5916 Update.
5917 * valops.c (value_union_variant): Remove.
5918 * value.h (value_union_variant): Don't declare.
5919
5920 2020-04-24 Tom Tromey <tromey@adacore.com>
5921
5922 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
5923 (ada_value_primitive_packed_val): Update.
5924 * ada-valprint.c (ada_value_print_1): Update.
5925 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
5926 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
5927 just an address. Use evaluate_for_locexpr_baton.
5928 (dwarf2_evaluate_property): Update.
5929 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
5930 array_view.
5931 * findvar.c (default_read_var_value): Update.
5932 * gdbtypes.c (compute_variant_fields_inner)
5933 (resolve_dynamic_type_internal): Update.
5934 (resolve_dynamic_type): Change type of valaddr parameter.
5935 * gdbtypes.h (resolve_dynamic_type): Update.
5936 * valarith.c (value_subscripted_rvalue): Update.
5937 * value.c (value_from_contents_and_address): Update.
5938
5939 2020-04-24 Tom Tromey <tromey@adacore.com>
5940
5941 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
5942 "push_initial_value" parameter.
5943 (dwarf2_evaluate_property): Likewise.
5944 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
5945
5946 2020-04-24 Tom Tromey <tromey@adacore.com>
5947
5948 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
5949 (variant::matches, compute_variant_fields_recurse)
5950 (compute_variant_fields_inner, compute_variant_fields): New
5951 functions.
5952 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
5953 Use resolved_type after type is made.
5954 (operator==): Add new cases.
5955 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
5956 (struct discriminant_range, struct variant, struct variant_part):
5957 New.
5958 (union dynamic_prop_data) <variant_parts, original_type>: New
5959 members.
5960 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
5961 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
5962 constants.
5963 * value.c (unpack_bits_as_long): Now public.
5964 * value.h (unpack_bits_as_long): Declare.
5965
5966 2020-04-24 Tom Tromey <tromey@adacore.com>
5967
5968 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
5969 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
5970
5971 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
5972
5973 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
5974
5975 2020-04-24 Kamil Rytarowski <n54@gmx.com>
5976
5977 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
5978 (remove_fork_catchpoint, post_startup_inferior)
5979 (post_attach): Move...
5980 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
5981 (remove_fork_catchpoint, post_startup_inferior)
5982 (post_attach): ...here.
5983 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
5984 (remove_fork_catchpoint, post_startup_inferior)
5985 (post_attach): Move...
5986 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
5987 (remove_fork_catchpoint, post_startup_inferior)
5988 (post_attach): ...here.
5989
5990 2020-04-24 Tom Tromey <tromey@adacore.com>
5991
5992 * nat/windows-nat.h (struct windows_thread_info)
5993 <pc_adjusted>: New member.
5994 * windows-nat.c (windows_fetch_one_register): Check
5995 pc_adjusted.
5996 (windows_nat_target::get_windows_debug_event)
5997 (windows_nat_target::wait): Set pc_adjusted.
5998
5999 2020-04-24 Tom de Vries <tdevries@suse.de>
6000
6001 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
6002 Run gdb-add-index inside temp dir.
6003
6004 2020-04-23 Tom Tromey <tromey@adacore.com>
6005
6006 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
6007 in loop.
6008
6009 2020-04-23 Luis Machado <luis.machado@linaro.org>
6010
6011 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
6012 get_frame_register instead of gdbarch_unwind_pc.
6013
6014 2020-04-23 Tom de Vries <tdevries@suse.de>
6015
6016 * symtab.c (lookup_global_symbol): Prefer def over decl.
6017
6018 2020-04-23 Tom de Vries <tdevries@suse.de>
6019
6020 PR symtab/25807
6021 * block.c (best_symbol, better_symbol): Promote to external.
6022 * block.h (best_symbol, better_symbol): Declare.
6023 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
6024 decl.
6025
6026 2020-04-23 Tom Tromey <tromey@adacore.com>
6027
6028 PR ada/25837:
6029 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
6030 "const char *", not a "const std::string &".
6031 <name_and_matcher::operator==>: Update.
6032 * unittests/lookup_name_info-selftests.c: Change type of
6033 "result".
6034
6035 2020-04-23 Tom Tromey <tom@tromey.com>
6036
6037 * inferior.h (iterate_over_inferiors): Don't declare.
6038 * inferior.c (iterate_over_inferiors): Remove.
6039 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
6040 Remove.
6041 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
6042 use iterate_over_inferiors.
6043 (darwin_resume_inferior_it)
6044 (struct resume_inferior_threads_param)
6045 (darwin_resume_inferior_threads_it): Remove.
6046 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
6047
6048 2020-04-23 Tom de Vries <tdevries@suse.de>
6049
6050 * blockframe.c (find_pc_partial_function): Use
6051 find_pc_sect_compunit_symtab rather than
6052 objfile->sf->qf->find_pc_sect_compunit_symtab.
6053
6054 2020-04-22 Tom de Vries <tdevries@suse.de>
6055
6056 PR symtab/25764
6057 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
6058 in psymtabs.
6059
6060 2020-04-22 Tom de Vries <tdevries@suse.de>
6061
6062 PR symtab/25801
6063 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
6064 symtabs.
6065
6066 2020-04-22 Tom de Vries <tdevries@suse.de>
6067
6068 PR symtab/25700
6069 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
6070 CU if already created.
6071
6072 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6073
6074 * infrun.c (displaced_step_fixup): Switch to the event_thread
6075 before calling displaced_step_restore, not after.
6076
6077 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
6078
6079 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
6080 its inferior is not recorded by us.
6081 (record_btrace_target_open): Replace call to
6082 all_non_exited_threads () with call to current_inferior
6083 ()->non_exited_threads ().
6084 (record_btrace_target::stop_recording): Likewise.
6085 (record_btrace_target::close): Likewise.
6086 (record_btrace_target::wait): Likewise.
6087 (record_btrace_target::record_stop_replaying): Likewise.
6088
6089 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
6090
6091 * btrace.c (btrace_enable): Throw an error on double enables and
6092 when enabling recording fails.
6093 (btrace_disable): Throw an error if the thread is not recorded.
6094
6095 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
6096
6097 * record-btrace.c (record_btrace_target::fetch_registers): Forward
6098 request if we do not have a thread_info.
6099
6100 2020-04-21 Tom de Vries <tdevries@suse.de>
6101
6102 PR gdb/25471
6103 * thread.c
6104 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
6105 exception in get_frame_id.
6106
6107 2020-04-20 Tom Tromey <tromey@adacore.com>
6108
6109 * python/python.c (struct gdbpy_event): Mark move constructor as
6110 noexcept.
6111 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
6112 constructor as noexcept.
6113 * completer.h (struct completion_result): Mark move constructor as
6114 noexcept.
6115 * completer.c (completion_result::completion_result): Use
6116 initialization style. Don't call reset_match_list.
6117
6118 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
6119
6120 * MAINTAINERS (Write After Approval): Add myself.
6121
6122 2020-04-18 Tom Tromey <tom@tromey.com>
6123
6124 * windows-tdep.c (init_w32_command_list)
6125 (w32_prefix_command_valid): Restore.
6126 (_initialize_windows_tdep): Call init_w32_command_list.
6127
6128 2020-04-18 Tom Tromey <tom@tromey.com>
6129
6130 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
6131 * value.c (value_fn_field): Update.
6132 * valops.c (find_function_in_inferior)
6133 (value_allocate_space_in_inferior): Update.
6134 * tui/tui-winsource.c (tui_update_source_windows_with_line):
6135 Update.
6136 * tui/tui-source.c (tui_source_window::set_contents): Update.
6137 * symtab.c (lookup_global_or_static_symbol)
6138 (find_function_start_sal_1, skip_prologue_sal)
6139 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
6140 * symmisc.c (dump_msymbols, dump_symtab_1)
6141 (maintenance_print_one_line_table): Update.
6142 * symfile.c (init_entry_point_info, section_is_mapped)
6143 (list_overlays_command, simple_read_overlay_table)
6144 (simple_overlay_update_1): Update.
6145 * stap-probe.c (handle_stap_probe): Update.
6146 * stabsread.c (dbx_init_float_type, define_symbol)
6147 (read_one_struct_field, read_enum_type, read_range_type): Update.
6148 * source.c (info_line_command): Update.
6149 * python/python.c (gdbpy_source_objfile_script)
6150 (gdbpy_execute_objfile_script): Update.
6151 * python/py-type.c (save_objfile_types): Update.
6152 * python/py-objfile.c (py_free_objfile): Update.
6153 * python/py-inferior.c (python_new_objfile): Update.
6154 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
6155 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
6156 (maintenance_check_psymtabs): Update.
6157 * printcmd.c (info_address_command): Update.
6158 * objfiles.h (struct objfile) <arch>: New method, from
6159 get_objfile_arch.
6160 (get_objfile_arch): Don't declare.
6161 * objfiles.c (get_objfile_arch): Remove.
6162 (filter_overlapping_sections): Update.
6163 * minsyms.c (msymbol_is_function): Update.
6164 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
6165 (output_nondebug_symbol): Update.
6166 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
6167 (mdebug_expand_psymtab): Update.
6168 * machoread.c (macho_add_oso_symfile): Update.
6169 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
6170 Update.
6171 * linux-fork.c (checkpoint_command): Update.
6172 * linespec.c (convert_linespec_to_sals): Update.
6173 * jit.c (finalize_symtab): Update.
6174 * infrun.c (insert_exception_resume_from_probe): Update.
6175 * ia64-tdep.c (ia64_find_unwind_table): Update.
6176 * hppa-tdep.c (internalize_unwinds): Update.
6177 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
6178 Update.
6179 * gcore.c (call_target_sbrk): Update.
6180 * elfread.c (record_minimal_symbol, elf_symtab_read)
6181 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
6182 (elf_gnu_ifunc_resolve_by_got): Update.
6183 * dwarf2/read.c (create_addrmap_from_index)
6184 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
6185 (read_debug_names_from_section)
6186 (process_psymtab_comp_unit_reader, add_partial_symbol)
6187 (add_partial_subprogram, process_full_comp_unit)
6188 (read_file_scope, read_func_scope, read_lexical_block_scope)
6189 (read_call_site_scope, dwarf2_ranges_read)
6190 (dwarf2_record_block_ranges, dwarf2_add_field)
6191 (mark_common_block_symbol_computed, read_tag_pointer_type)
6192 (read_tag_string_type, dwarf2_init_float_type)
6193 (dwarf2_init_complex_target_type, read_base_type)
6194 (partial_die_info::read, partial_die_info::read)
6195 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
6196 (dwarf2_fetch_die_loc_sect_off): Update.
6197 * dwarf2/loc.c (dwarf2_find_location_expression)
6198 (class dwarf_evaluate_loc_desc, rw_pieced_value)
6199 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
6200 (dwarf2_loc_desc_get_symbol_read_needs)
6201 (locexpr_describe_location_piece, locexpr_describe_location_1)
6202 (loclist_describe_location): Update.
6203 * dwarf2/index-write.c (write_debug_names): Update.
6204 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
6205 * dtrace-probe.c (dtrace_process_dof): Update.
6206 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
6207 (process_one_symbol): Update.
6208 * ctfread.c (ctf_init_float_type, read_base_type): Update.
6209 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
6210 (coff_read_enum_type): Update.
6211 * cli/cli-cmds.c (edit_command, list_command): Update.
6212 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
6213 * breakpoint.c (create_overlay_event_breakpoint)
6214 (create_longjmp_master_breakpoint)
6215 (create_std_terminate_master_breakpoint)
6216 (create_exception_master_breakpoint, get_sal_arch): Update.
6217 * block.c (block_gdbarch): Update.
6218 * annotate.c (annotate_source_line): Update.
6219
6220 2020-04-17 Tom Tromey <tromey@adacore.com>
6221
6222 * auto-load.c (show_auto_load_cmd): Remove.
6223 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
6224 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
6225 (maintenance_print_arc_command): Remove.
6226 * tui/tui-win.c (tui_command): Remove.
6227 (tui_get_cmd_list): Use add_basic_prefix_cmd.
6228 * tui/tui-layout.c (tui_layout_command): Remove.
6229 (_initialize_tui_layout): Use add_basic_prefix_cmd.
6230 * python/python.c (user_set_python, user_show_python): Remove.
6231 (_initialize_python): Use add_basic_prefix_cmd,
6232 add_show_prefix_cmd.
6233 * guile/guile.c (set_guile_command, show_guile_command): Remove.
6234 (install_gdb_commands): Use add_basic_prefix_cmd,
6235 add_show_prefix_cmd.
6236 (info_guile_command): Remove.
6237 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
6238 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
6239 add_show_prefix_cmd.
6240 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
6241 Remove do_set and do_show parameters.
6242 * cli/cli-style.c (set_style, show_style): Remove.
6243 (_initialize_cli_style): Use add_basic_prefix_cmd,
6244 add_show_prefix_cmd.
6245 (cli_style_option::add_setshow_commands): Remove do_set and
6246 do_show parameters.
6247 (cli_style_option::add_setshow_commands): Use
6248 add_basic_prefix_cmd, add_show_prefix_cmd.
6249 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
6250 (set_style_name): Remove.
6251 * cli/cli-dump.c (dump_command, append_command): Remove.
6252 (srec_dump_command, ihex_dump_command, verilog_dump_command)
6253 (tekhex_dump_command, binary_dump_command)
6254 (binary_append_command): Remove.
6255 (_initialize_cli_dump): Use add_basic_prefix_cmd.
6256 * windows-tdep.c (w32_prefix_command_valid): Remove global.
6257 (init_w32_command_list): Remove; move into ...
6258 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
6259 * valprint.c (set_print, show_print, set_print_raw)
6260 (show_print_raw): Remove.
6261 (_initialize_valprint): Use add_basic_prefix_cmd,
6262 add_show_prefix_cmd.
6263 * typeprint.c (set_print_type, show_print_type): Remove.
6264 (_initialize_typeprint): Use add_basic_prefix_cmd,
6265 add_show_prefix_cmd.
6266 * record.c (set_record_command, show_record_command): Remove.
6267 (_initialize_record): Use add_basic_prefix_cmd,
6268 add_show_prefix_cmd.
6269 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
6270 add_show_prefix_cmd.
6271 (info_command, show_command, set_debug, show_debug): Remove.
6272 * top.h (set_history, show_history): Don't declare.
6273 * top.c (set_history, show_history): Remove.
6274 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
6275 (unset_tdesc_cmd): Remove.
6276 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
6277 add_show_prefix_cmd.
6278 * symtab.c (info_module_command): Remove.
6279 (_initialize_symtab): Use add_basic_prefix_cmd.
6280 * symfile.c (overlay_command): Remove.
6281 (_initialize_symfile): Use add_basic_prefix_cmd.
6282 * sparc64-tdep.c (info_adi_command): Remove.
6283 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
6284 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
6285 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
6286 add_show_prefix_cmd.
6287 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
6288 (_initialize_serial): Use add_basic_prefix_cmd,
6289 add_show_prefix_cmd.
6290 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
6291 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
6292 add_show_prefix_cmd.
6293 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
6294 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
6295 add_show_prefix_cmd.
6296 * riscv-tdep.c (show_riscv_command, set_riscv_command)
6297 (show_debug_riscv_command, set_debug_riscv_command): Remove.
6298 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
6299 add_show_prefix_cmd.
6300 * remote.c (remote_command, set_remote_cmd): Remove.
6301 (_initialize_remote): Use add_basic_prefix_cmd.
6302 * record-full.c (set_record_full_command)
6303 (show_record_full_command): Remove.
6304 (_initialize_record_full): Use add_basic_prefix_cmd,
6305 add_show_prefix_cmd.
6306 * record-btrace.c (cmd_set_record_btrace)
6307 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
6308 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
6309 (cmd_show_record_btrace_pt): Remove.
6310 (_initialize_record_btrace): Use add_basic_prefix_cmd,
6311 add_show_prefix_cmd.
6312 * ravenscar-thread.c (set_ravenscar_command)
6313 (show_ravenscar_command): Remove.
6314 (_initialize_ravenscar): Use add_basic_prefix_cmd,
6315 add_show_prefix_cmd.
6316 * mips-tdep.c (show_mips_command, set_mips_command)
6317 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
6318 add_show_prefix_cmd.
6319 * maint.c (maintenance_command, maintenance_info_command)
6320 (maintenance_check_command, maintenance_print_command)
6321 (maintenance_set_cmd, maintenance_show_cmd): Remove.
6322 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
6323 add_show_prefix_cmd.
6324 (show_per_command_cmd): Remove.
6325 * maint-test-settings.c (maintenance_set_test_settings_cmd):
6326 Remove.
6327 (maintenance_show_test_settings_cmd): Remove.
6328 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
6329 add_show_prefix_cmd.
6330 * maint-test-options.c (maintenance_test_options_command):
6331 Remove.
6332 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
6333 * macrocmd.c (macro_command): Remove
6334 (_initialize_macrocmd): Use add_basic_prefix_cmd.
6335 * language.c (set_check, show_check): Remove.
6336 (_initialize_language): Use add_basic_prefix_cmd,
6337 add_show_prefix_cmd.
6338 * infcmd.c (unset_command): Remove.
6339 (_initialize_infcmd): Use add_basic_prefix_cmd.
6340 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
6341 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
6342 add_show_prefix_cmd.
6343 * go32-nat.c (go32_info_dos_command): Remove.
6344 (_initialize_go32_nat): Use add_basic_prefix_cmd.
6345 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
6346 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
6347 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
6348 (_initialize_frame): Use add_basic_prefix_cmd,
6349 add_show_prefix_cmd.
6350 * dcache.c (set_dcache_command, show_dcache_command): Remove.
6351 (_initialize_dcache): Use add_basic_prefix_cmd,
6352 add_show_prefix_cmd.
6353 * cp-support.c (maint_cplus_command): Remove.
6354 (_initialize_cp_support): Use add_basic_prefix_cmd.
6355 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
6356 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
6357 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
6358 add_basic_prefix_cmd, add_show_prefix_cmd.
6359 * breakpoint.c (save_command): Remove.
6360 (_initialize_breakpoint): Use add_basic_prefix_cmd.
6361 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
6362 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
6363 add_show_prefix_cmd.
6364 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
6365 (set_ada_command, show_ada_command): Remove.
6366 (_initialize_ada_language): Use add_basic_prefix_cmd,
6367 add_show_prefix_cmd.
6368 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
6369
6370 2020-04-16 Kamil Rytarowski <n54@gmx.com>
6371
6372 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
6373 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
6374
6375 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
6376
6377 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
6378 warning messages.
6379
6380 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
6381
6382 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
6383 import table is not at beginning of .idata section.
6384
6385 2020-04-16 Pedro Alves <palves@redhat.com>
6386
6387 * inferior.c (delete_inferior): Use delete operator directly
6388 instead of delete_program_space.
6389 * progspace.c (add_program_space): New, factored out from
6390 program_space::program_space.
6391 (remove_program_space): New, factored out from
6392 delete_program_space.
6393 (program_space::program_space): Remove intro comment. Rewrite.
6394 (program_space::~program_space): Remove intro comment. Call
6395 remove_program_space.
6396 (delete_program_space): Delete.
6397 * progspace.h (program_space::program_space): Make explicit. Move
6398 intro comment here, adjusted.
6399 (program_space::~program_space): Move intro comment here,
6400 adjusted.
6401 (delete_program_space): Remove.
6402
6403 2020-04-16 Tom Tromey <tromey@adacore.com>
6404
6405 * windows-nat.c (windows_nat::handle_access_violation): New
6406 function.
6407 * nat/windows-nat.h (handle_access_violation): Declare.
6408 * nat/windows-nat.c (handle_exception): Move Cygwin code to
6409 windows-nat.c. Call handle_access_violation.
6410
6411 2020-04-16 Tom de Vries <tdevries@suse.de>
6412
6413 PR symtab/25791
6414 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
6415 CUs without psymtab.
6416
6417 2020-04-16 Kevin Buettner <kevinb@redhat.com>
6418
6419 * python/python.c (do_start_initialization): Don't call
6420 PyEval_InitThreads for Python 3.9 and beyond.
6421
6422 2020-04-15 Kamil Rytarowski <n54@gmx.com>
6423
6424 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
6425 thread functions.
6426 (obsd_nat_target::wait): Likewise.
6427
6428 2020-04-15 Tom Tromey <tromey@adacore.com>
6429
6430 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
6431 (DEBUG_EXCEPT): Use debug_printf.
6432
6433 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
6434
6435 * completer.c (class completion_tracker::completion_hash_entry)
6436 <hash_name>: New member function.
6437 (completion_tracker::discard_completions): New callback to hash a
6438 completion_hash_entry, pass this to htab_create_alloc.
6439
6440 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
6441
6442 * windows-nat.c (windows_make_so): Warn rather than stopping with
6443 an error if realpath() fails.
6444
6445 2020-04-14 Kamil Rytarowski <n54@gmx.com>
6446
6447 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
6448 (nbsd_nat_target::info_proc): Add do_status.
6449
6450 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
6451 Tom de Vries <tdevries@suse.de>
6452
6453 PR symtab/25718
6454 * psympriv.h (struct partial_symtab::read_symtab)
6455 (struct partial_symtab::expand_psymtab)
6456 (struct partial_symtab::read_dependencies): Update comments.
6457 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
6458 read_symtab for includer.
6459 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
6460 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
6461 (struct dwarf2_include_psymtab::m_readin): Remove.
6462 (struct dwarf2_include_psymtab::includer): New member function.
6463 (dwarf2_psymtab::expand_psymtab): Assert !readin.
6464
6465 2020-04-14 Tom de Vries <tdevries@suse.de>
6466
6467 PR symtab/25720
6468 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
6469 with NULL symbol_matcher and lookup_name.
6470 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
6471 and lookup_name.
6472 * dwarf2/read.c (dw2_expand_symtabs_matching)
6473 (dw2_debug_names_expand_symtabs_matching): Same.
6474 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
6475 Make lookup_name a pointer. Update comment.
6476 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
6477 lookup_name being a pointer.
6478 * symfile.c (expand_symtabs_matching): Same.
6479 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
6480 * linespec.c (iterate_over_all_matching_symtabs): Same.
6481
6482 2020-04-13 Tom Tromey <tom@tromey.com>
6483
6484 * run-on-main-thread.c: Update include.
6485 * unittests/main-thread-selftests.c: Update include.
6486 * tui/tui-win.c: Update include.
6487 * tui/tui-io.c: Update include.
6488 * tui/tui-interp.c: Update include.
6489 * tui/tui-hooks.c: Update include.
6490 * top.h: Update include.
6491 * top.c: Update include.
6492 * ser-base.c: Update include.
6493 * remote.c: Update include.
6494 * remote-notif.c: Update include.
6495 * remote-fileio.c: Update include.
6496 * record-full.c: Update include.
6497 * record-btrace.c: Update include.
6498 * python/python.c: Update include.
6499 * posix-hdep.c: Update include.
6500 * mingw-hdep.c: Update include.
6501 * mi/mi-main.c: Update include.
6502 * mi/mi-interp.c: Update include.
6503 * main.c: Update include.
6504 * linux-nat.c: Update include.
6505 * interps.c: Update include.
6506 * infrun.c: Update include.
6507 * inf-loop.c: Update include.
6508 * event-top.c: Update include.
6509 * event-loop.c: Move to ../gdbsupport/.
6510 * event-loop.h: Move to ../gdbsupport/.
6511 * async-event.h: Update include.
6512 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
6513
6514 2020-04-13 Tom Tromey <tom@tromey.com>
6515
6516 * tui/tui-win.c: Include async-event.h.
6517 * remote.c: Include async-event.h.
6518 * remote-notif.c: Include async-event.h.
6519 * record-full.c: Include async-event.h.
6520 * record-btrace.c: Include async-event.h.
6521 * infrun.c: Include async-event.h.
6522 * event-top.c: Include async-event.h.
6523 * event-loop.h: Move some declarations to async-event.h.
6524 * event-loop.c: Don't include ser-event.h or top.h. Move some
6525 code to async-event.c.
6526 * async-event.h: New file.
6527 * async-event.c: New file.
6528 * Makefile.in (COMMON_SFILES): Add async-event.c.
6529 (HFILES_NO_SRCDIR): Add async-event.h.
6530
6531 2020-04-13 Tom Tromey <tom@tromey.com>
6532
6533 * utils.c (flush_streams): New function.
6534 * event-loop.c (gdb_wait_for_event): Call flush_streams.
6535
6536 2020-04-13 Tom Tromey <tom@tromey.com>
6537
6538 * event-loop.c (handle_file_event): Use warning, not
6539 printf_unfiltered.
6540
6541 2020-04-13 Tom Tromey <tom@tromey.com>
6542
6543 * event-loop.c: Include <chrono>.
6544
6545 2020-04-13 Tom Tromey <tom@tromey.com>
6546
6547 * gdb_select.h: Move to ../gdbsupport/.
6548 * event-loop.c: Update include path.
6549 * top.c: Update include path.
6550 * ser-base.c: Update include path.
6551 * ui-file.c: Update include path.
6552 * ser-tcp.c: Update include path.
6553 * guile/scm-ports.c: Update include path.
6554 * posix-hdep.c: Update include path.
6555 * ser-unix.c: Update include path.
6556 * gdb_usleep.c: Update include path.
6557 * mingw-hdep.c: Update include path.
6558 * inflow.c: Update include path.
6559 * infrun.c: Update include path.
6560 * event-top.c: Update include path.
6561
6562 2020-04-13 Tom Tromey <tom@tromey.com>
6563
6564 * configure: Rebuild.
6565 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
6566
6567 2020-04-13 Tom Tromey <tom@tromey.com>
6568
6569 * event-loop.h (start_event_loop): Don't declare.
6570 * event-loop.c (start_event_loop): Move...
6571 * main.c (start_event_loop): ...here. Now static.
6572
6573 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
6574
6575 * MAINTAINERS: Update my email address.
6576
6577 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6578
6579 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
6580 IP_ALL.
6581
6582 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6583
6584 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
6585 (nbsd_nat_target::info_proc): Add do_cmdline.
6586
6587 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6588
6589 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
6590 (nbsd_nat_target::info_proc): Add do_cwd.
6591
6592 2020-04-12 Kamil Rytarowski <n54@gmx.com>
6593
6594 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
6595
6596 2020-04-11 Kamil Rytarowski <n54@gmx.com>
6597
6598 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
6599 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
6600 (nbsd_nat_target::info_proc): New functions.
6601 * nbsd-nat.c (kinfo_get_vmmap): New function.
6602 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
6603 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
6604 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
6605 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
6606 functions.
6607 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
6608 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
6609 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
6610 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
6611 (KINFO_VME_FLAG_GROWS_DOWN): New.
6612
6613 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
6614
6615 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
6616 bit shift.
6617
6618 2020-04-10 Tom Tromey <tromey@adacore.com>
6619
6620 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
6621
6622 2020-04-10 Tom Tromey <tromey@adacore.com>
6623
6624 * symtab.c (get_symbol_address, get_msymbol_address): Skip
6625 separate debug files.
6626
6627 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
6628
6629 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
6630 Move to...
6631 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
6632 ... here.
6633 * windows-nat.c (windows_nat_target::get_windows_debug_event):
6634 Check for STATUS_WX86_BREAKPOINT.
6635 (windows_nat_target::wait): Same.
6636
6637 2020-04-10 Tom de Vries <tdevries@suse.de>
6638
6639 PR cli/25808
6640 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
6641
6642 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6643
6644 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
6645 (Write After Approval): Remove Tom de Vries.
6646
6647 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
6648
6649 revert partially:
6650 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
6651
6652 * buildsym.c (record_line): Fix undefined behavior and preserve
6653 lines at eof.
6654
6655 2020-04-09 Kamil Rytarowski <n54@gmx.com>
6656
6657 * auxv.h (svr4_auxv_parse): New.
6658 * auxv.c (default_auxv_parse): Split into default_auxv_parse
6659 and generic_auxv_parse.
6660 (svr4_auxv_parse): Add.
6661 * obsd-tdep.c: Include "auxv.h".
6662 (obsd_auxv_parse): Remove.
6663 (obsd_init_abi): Remove comment.
6664 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
6665 from `obsd_auxv_parse' to `svr4_auxv_parse'.
6666 * nbsd-tdep.c: Include "auxv.h".
6667 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
6668
6669 2020-04-08 Tom Tromey <tromey@adacore.com>
6670
6671 * nat/windows-nat.h (last_wait_event): Don't declare.
6672 (wait_for_debug_event): Update comment.
6673 * nat/windows-nat.c (last_wait_event): Now static.
6674
6675 2020-04-08 Tom Tromey <tromey@adacore.com>
6676
6677 * windows-nat.c (wait_for_debug_event): Move to
6678 nat/windows-nat.c.
6679 * nat/windows-nat.h (wait_for_debug_event): Declare.
6680 * nat/windows-nat.c (wait_for_debug_event): Move from
6681 windows-nat.c. No longer static.
6682
6683 2020-04-08 Tom Tromey <tromey@adacore.com>
6684
6685 * windows-nat.c (get_windows_debug_event): Use
6686 fetch_pending_stop.
6687 * nat/windows-nat.h (fetch_pending_stop): Declare.
6688 * nat/windows-nat.c (fetch_pending_stop): New function.
6689
6690 2020-04-08 Tom Tromey <tromey@adacore.com>
6691
6692 * windows-nat.c (windows_continue): Use matching_pending_stop and
6693 continue_last_debug_event.
6694 * nat/windows-nat.h (matching_pending_stop)
6695 (continue_last_debug_event): Declare.
6696 * nat/windows-nat.c (DEBUG_EVENTS): New define.
6697 (matching_pending_stop, continue_last_debug_event): New
6698 functions.
6699
6700 2020-04-08 Tom Tromey <tromey@adacore.com>
6701
6702 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
6703 (handle_exception_result): Move to nat/windows-nat.h.
6704 (DEBUG_EXCEPTION_SIMPLE): Remove.
6705 (windows_nat::handle_ms_vc_exception): New function.
6706 (handle_exception): Move to nat/windows-nat.c.
6707 (get_windows_debug_event): Update.
6708 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
6709 nat/windows-nat.c.
6710 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
6711 (handle_exception_result): Move from windows-nat.c.
6712 (handle_exception): Declare.
6713 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
6714 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
6715 windows-nat.c.
6716
6717 2020-04-08 Tom Tromey <tromey@adacore.com>
6718
6719 * windows-nat.c (exception_count, event_count): Remove.
6720 (handle_exception, get_windows_debug_event)
6721 (do_initial_windows_stuff): Update.
6722
6723 2020-04-08 Tom Tromey <tromey@adacore.com>
6724
6725 * windows-nat.c (windows_nat::handle_load_dll)
6726 (windows_nat::handle_unload_dll): Rename. No longer static.
6727 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
6728 Declare.
6729
6730 2020-04-08 Tom Tromey <tromey@adacore.com>
6731
6732 * complaints.h (stop_whining): Declare at top-level.
6733 (complaint): Don't declare stop_whining.
6734
6735 2020-04-08 Tom Tromey <tromey@adacore.com>
6736
6737 * windows-nat.c (windows_nat::handle_output_debug_string):
6738 Rename. No longer static.
6739 * nat/windows-nat.h (handle_output_debug_string): Declare.
6740
6741 2020-04-08 Tom Tromey <tromey@adacore.com>
6742
6743 * windows-nat.c (current_process_handle, current_process_id)
6744 (main_thread_id, last_sig, current_event, last_wait_event)
6745 (current_windows_thread, desired_stop_thread_id, pending_stops)
6746 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
6747 (display_selectors, fake_create_process)
6748 (get_windows_debug_event): Update.
6749 * nat/windows-nat.h (current_process_handle, current_process_id)
6750 (main_thread_id, last_sig, current_event, last_wait_event)
6751 (current_windows_thread, desired_stop_thread_id, pending_stops)
6752 (struct pending_stop, siginfo_er): Move from windows-nat.c.
6753 * nat/windows-nat.c (current_process_handle, current_process_id)
6754 (main_thread_id, last_sig, current_event, last_wait_event)
6755 (current_windows_thread, desired_stop_thread_id, pending_stops)
6756 (siginfo_er): New globals. Move from windows-nat.c.
6757
6758 2020-04-08 Tom Tromey <tromey@adacore.com>
6759
6760 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
6761 (handle_load_dll): Update.
6762 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
6763
6764 2020-04-08 Tom Tromey <tromey@adacore.com>
6765
6766 * windows-nat.c (enum thread_disposition_type): Move to
6767 nat/windows-nat.h.
6768 (windows_nat::thread_rec): Rename from thread_rec. No longer
6769 static.
6770 (windows_add_thread, windows_nat_target::fetch_registers)
6771 (windows_nat_target::store_registers, handle_exception)
6772 (windows_nat_target::resume, get_windows_debug_event)
6773 (windows_nat_target::get_tib_address)
6774 (windows_nat_target::thread_name)
6775 (windows_nat_target::thread_alive): Update.
6776 * nat/windows-nat.h (enum thread_disposition_type): Move from
6777 windows-nat.c.
6778 (thread_rec): Declare.
6779
6780 2020-04-08 Tom Tromey <tromey@adacore.com>
6781
6782 * windows-nat.c: Add "using namespace".
6783 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
6784 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
6785
6786 2020-04-08 Tom Tromey <tromey@adacore.com>
6787
6788 * nat/windows-nat.h (struct windows_thread_info): Declare
6789 destructor.
6790 * nat/windows-nat.c (~windows_thread_info): New.
6791
6792 2020-04-08 Tom Tromey <tromey@adacore.com>
6793
6794 PR gdb/22992
6795 * windows-nat.c (current_event): Update comment.
6796 (last_wait_event, desired_stop_thread_id): New globals.
6797 (struct pending_stop): New.
6798 (pending_stops): New global.
6799 (windows_nat_target) <stopped_by_sw_breakpoint>
6800 <supports_stopped_by_sw_breakpoint>: New methods.
6801 (windows_fetch_one_register): Add assertions. Adjust PC.
6802 (windows_continue): Handle pending stops. Suspend other threads
6803 when stepping. Use last_wait_event
6804 (wait_for_debug_event): New function.
6805 (get_windows_debug_event): Use wait_for_debug_event. Handle
6806 pending stops. Queue spurious stops.
6807 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
6808 (windows_nat_target::kill): Use wait_for_debug_event.
6809 * nat/windows-nat.h (struct windows_thread_info)
6810 <stopped_at_software_breakpoint>: New field.
6811 * nat/windows-nat.c (windows_thread_info::resume): Clear
6812 stopped_at_software_breakpoint.
6813
6814 2020-04-08 Tom Tromey <tromey@adacore.com>
6815
6816 * windows-nat.c (enum thread_disposition_type): New.
6817 (thread_rec): Replace "get_context" parameter with "disposition";
6818 change type.
6819 (windows_add_thread, windows_nat_target::fetch_registers)
6820 (windows_nat_target::store_registers, handle_exception)
6821 (windows_nat_target::resume, get_windows_debug_event)
6822 (windows_nat_target::get_tib_address)
6823 (windows_nat_target::thread_name)
6824 (windows_nat_target::thread_alive): Update.
6825
6826 2020-04-08 Tom Tromey <tromey@adacore.com>
6827
6828 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
6829 (windows_continue): Use windows_continue::resume.
6830 * nat/windows-nat.h (struct windows_thread_info) <suspend,
6831 resume>: Declare new methods.
6832 * nat/windows-nat.c: New file.
6833 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
6834
6835 2020-04-08 Tom Tromey <tromey@adacore.com>
6836
6837 * windows-nat.c (windows_add_thread, windows_delete_thread)
6838 (windows_nat_target::fetch_registers)
6839 (windows_nat_target::store_registers, fake_create_process)
6840 (windows_nat_target::resume, windows_nat_target::resume)
6841 (get_windows_debug_event, windows_nat_target::wait)
6842 (windows_nat_target::pid_to_str)
6843 (windows_nat_target::get_tib_address)
6844 (windows_nat_target::get_ada_task_ptid)
6845 (windows_nat_target::thread_name)
6846 (windows_nat_target::thread_alive): Use lwp, not tid.
6847
6848 2020-04-08 Tom Tromey <tromey@adacore.com>
6849
6850 * windows-nat.c (handle_exception)
6851 (windows_nat_target::thread_name): Update.
6852 * nat/windows-nat.h (windows_thread_info): Remove destructor.
6853 <name>: Now unique_xmalloc_ptr.
6854
6855 2020-04-08 Tom Tromey <tromey@adacore.com>
6856
6857 * windows-nat.c (thread_rec)
6858 (windows_nat_target::fetch_registers): Update.
6859 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
6860 Update comment.
6861 <debug_registers_changed, reload_context>: Now bool.
6862
6863 2020-04-08 Tom Tromey <tromey@adacore.com>
6864
6865 * windows-nat.c (windows_add_thread): Use new.
6866 (windows_init_thread_list, windows_delete_thread): Use delete.
6867 (get_windows_debug_event): Update.
6868 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
6869 destructor, and initializers.
6870
6871 2020-04-08 Tom Tromey <tromey@adacore.com>
6872
6873 * windows-nat.c (struct windows_thread_info): Remove.
6874 * nat/windows-nat.h: New file.
6875
6876 2020-04-08 Tom Tromey <tromey@adacore.com>
6877
6878 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
6879 (thread_rec, windows_add_thread, windows_delete_thread)
6880 (windows_continue): Update.
6881
6882 2020-04-08 Tom Tromey <tromey@adacore.com>
6883
6884 * windows-nat.c (struct windows_thread_info): Remove typedef.
6885 (thread_head): Remove.
6886 (thread_list): New global.
6887 (thread_rec, windows_add_thread, windows_init_thread_list)
6888 (windows_delete_thread, windows_continue): Update.
6889
6890 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
6891
6892 * windows-tdep.h (windows_init_abi): Add comment.
6893 (cygwin_init_abi): New declaration.
6894 * windows-tdep.c: Split signal enumeration in two, one for
6895 Windows and one for Cygwin.
6896 (windows_gdb_signal_to_target): Only deal with signal of the
6897 Windows OS ABI.
6898 (cygwin_gdb_signal_to_target): New function.
6899 (windows_init_abi): Rename to windows_init_abi_common, don't set
6900 gdb_signal_to_target gdbarch method. Add new new function with
6901 this name.
6902 (cygwin_init_abi): New function.
6903 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
6904 comment. Don't call windows_init_abi.
6905 (amd64_windows_init_abi): Add comment, call windows_init_abi.
6906 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
6907 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
6908 i386_windows_init_abi_common, don't call windows_init_abi. Add
6909 a new function of this name.
6910 (i386_cygwin_init_abi): New function.
6911 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
6912 OS ABI Cygwin.
6913
6914 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
6915
6916 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
6917 parameter.c.
6918 (dwarf2_read_gdb_index): Update.
6919
6920 2020-04-07 Kamil Rytarowski <n54@gmx.com>
6921
6922 * nbsd-tdep.c: Include "objfiles.h".
6923 (nbsd_skip_solib_resolver): New.
6924 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
6925
6926 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6927
6928 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
6929 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
6930 with DW_LLE_base_addressx are being emitted in DWARFv5.
6931 Add the newly added kind DW_LOC_OFFSET_PAIR also.
6932 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
6933 unsigned integer.
6934
6935 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6936
6937 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
6938 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
6939 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
6940 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
6941 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
6942 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
6943 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
6944
6945
6946 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
6947
6948 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
6949 (read_loclist_index): New function definition.
6950 (lookup_loclist_base): New function definition.
6951 (read_loclist_header): New function definition.
6952 (dwarf2_cu): Add loclist_base and loclist_header field.
6953 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
6954 (read_full_die_1): Read the value of DW_AT_loclists_base.
6955 (read_attribute_reprocess): Handle DW_FORM_loclistx.
6956 (read_attribute_value): Handle DW_FORM_loclistx.
6957 (skip_one_die): Handle DW_FORM_loclistx.
6958 (loclist_header): New structure declaration.
6959 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
6960
6961 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6962
6963 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
6964 constructor. Remove `addr` parameter from other constructor and
6965 add `per_cu` parameter.
6966 * dwarf2/read.c (create_partial_symtab): Update.
6967
6968 2020-04-07 Tom de Vries <tdevries@suse.de>
6969
6970 PR symtab/25796
6971 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
6972 (partial_die_info::fixup): Inherit has_const_value.
6973
6974 2020-04-07 Tom de Vries <tdevries@suse.de>
6975
6976 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
6977 symbols without address.
6978
6979 2020-04-06 Kamil Rytarowski <n54@gmx.com>
6980
6981 * nbsd-nat.h (struct thread_info): Add forward declaration.
6982 (nbsd_nat_target::thread_alive): Add.
6983 (nbsd_nat_target::thread_name): Likewise.
6984 (nbsd_nat_target::update_thread_list): Likewise.
6985 (update_thread_list::post_attach): Likewise.
6986 (post_attach::pid_to_str): Likewise.
6987 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
6988 (nbsd_thread_lister): Add.
6989 (nbsd_nat_target::thread_alive): Likewise.
6990 (nbsd_nat_target::thread_name): Likewise.
6991 (nbsd_add_threads): Likewise.
6992 (update_thread_list::post_attach): Likewise.
6993 (nbsd_nat_target::update_thread_list): Likewise.
6994 (post_attach::pid_to_str): Likewise.
6995
6996 2020-04-06 Tom Tromey <tromey@adacore.com>
6997
6998 * ada-valprint.c (print_variant_part): Extract the variant field.
6999 (print_field_values): Use the field as the outer value when
7000 recursing.
7001
7002 2020-04-06 Tom Tromey <tromey@adacore.com>
7003
7004 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
7005 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
7006 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
7007 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
7008 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
7009
7010 2020-04-06 Tom Tromey <tromey@adacore.com>
7011
7012 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
7013 TYPE_CODE_ERROR.
7014
7015 2020-04-06 Kamil Rytarowski <n54@gmx.com>
7016
7017 * nbsd-tdep.c: Include "gdbarch.h".
7018 Define enum with NetBSD signal numbers.
7019 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
7020 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
7021 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7022 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
7023 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
7024 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
7025 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
7026 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
7027 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
7028 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
7029 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
7030 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
7031
7032 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
7033
7034 PR gdb/25325
7035 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
7036
7037 2020-04-03 Tom Tromey <tromey@adacore.com>
7038
7039 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
7040 Read constant block.
7041
7042 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
7043
7044 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
7045 (gdb_bfd_get_full_section_contents): New declaration.
7046 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
7047 * windows-tdep.c (is_linked_with_cygwin_dll): Use
7048 gdb_bfd_get_full_section_contents.
7049
7050 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
7051
7052 * exec.c (build_section_table): Replace internal_error with
7053 gdb_assert.
7054 (section_table_xfer_memory_partial): Likewise.
7055 * mdebugread.c (parse_partial_symbols): Likewise.
7056 * psymtab.c (lookup_partial_symbol): Likewise.
7057 * utils.c (wrap_here): Likewise.
7058
7059 2020-04-02 Tom Tromey <tromey@adacore.com>
7060
7061 * f-lang.c (build_fortran_types): Use arch_type to initialize
7062 builtin_complex_s32 in the TYPE_CODE_ERROR case.
7063
7064 2020-04-02 Tom Tromey <tromey@adacore.com>
7065
7066 * dwarf2/read.c (partial_die_info::read): Do not create a vector
7067 of attributes.
7068
7069 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
7070 Bernd Edlinger <bernd.edlinger@hotmail.de>
7071 Tom Tromey <tromey@adacore.com>
7072
7073 * buildsym.c (buildsym_compunit::record_line): Remove
7074 deduplication code.
7075
7076 2020-04-02 Tom de Vries <tdevries@suse.de>
7077
7078 PR ada/24671
7079 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
7080
7081 2020-04-02 Tom de Vries <tdevries@suse.de>
7082
7083 * dwarf2/read.c (dwarf2_gdb_index_functions,
7084 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
7085 NULL.
7086 * psymtab.c (psym_lookup_global_symbol_language): New function.
7087 (psym_functions): Init psym_lookup_global_symbol_language with
7088 psym_lookup_global_symbol_language.
7089 * symfile-debug.c (debug_sym_quick_functions): Init
7090 lookup_global_symbol_language with NULL.
7091 * symfile.c (set_initial_language): Remove fixme comment.
7092 * symfile.h (struct quick_symbol_functions): Add
7093 lookup_global_symbol_language.
7094 * symtab.c (find_quick_global_symbol_language): New function.
7095 (find_main_name): Use find_quick_global_symbol_language.
7096
7097 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
7098
7099 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
7100
7101 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
7102
7103 * buildsym.c (record_line): Fix undefined behavior and preserve
7104 lines at eof.
7105
7106 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
7107
7108 * buildsym.c (record_line): Fix the resizing condition.
7109
7110 2020-04-01 Tom Tromey <tom@tromey.com>
7111
7112 * value.h (value_literal_complex): Add comment.
7113 * valops.c (value_literal_complex): Refer to value.h.
7114
7115 2020-04-01 Tom Tromey <tom@tromey.com>
7116
7117 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
7118 (scalar_type): New rule, from typebase.
7119 (typebase): Use scalar_type. Recognize complex types.
7120 (field_name): Handle FLOAT_KEYWORD.
7121 (ident_tokens): Add _Complex and __complex__.
7122
7123 2020-04-01 Tom Tromey <tom@tromey.com>
7124
7125 PR exp/25299:
7126 * valarith.c (promotion_type, complex_binop): New functions.
7127 (scalar_binop): Handle complex numbers. Use promotion_type.
7128 (value_pos, value_neg, value_complement): Handle complex numbers.
7129
7130 2020-04-01 Tom Tromey <tom@tromey.com>
7131
7132 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
7133 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
7134 (parse_number): Handle complex numbers.
7135
7136 2020-04-01 Tom Tromey <tom@tromey.com>
7137
7138 * c-valprint.c (c_decorations): Change complex suffix to "i".
7139
7140 2020-04-01 Tom Tromey <tom@tromey.com>
7141
7142 * valprint.c (generic_value_print_complex): Use accessors.
7143 * value.h (value_real_part, value_imaginary_part): Declare.
7144 * valops.c (value_real_part, value_imaginary_part): New
7145 functions.
7146 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
7147
7148 2020-04-01 Tom Tromey <tom@tromey.com>
7149
7150 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
7151 (read_range_type): Update.
7152 * mdebugread.c (basic_type): Update.
7153 * go-lang.c (build_go_types): Use init_complex_type.
7154 * gdbtypes.h (struct main_type) <complex_type>: New member.
7155 (init_complex_type): Update.
7156 (arch_complex_type): Don't declare.
7157 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
7158 Make name if none given. Use alloc_type_copy. Look for cached
7159 complex type.
7160 (arch_complex_type): Remove.
7161 (gdbtypes_post_init): Use init_complex_type.
7162 * f-lang.c (build_fortran_types): Use init_complex_type.
7163 * dwarf2/read.c (read_base_type): Update.
7164 * d-lang.c (build_d_types): Use init_complex_type.
7165 * ctfread.c (read_base_type): Update.
7166
7167 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7168
7169 * infrun.c (stop_all_threads): Update assertion, plus when
7170 stopping threads, take into account that we might be trying
7171 to stop an all-stop target.
7172 (stop_waiting): Call 'stop_all_threads' if there exists a
7173 non-stop target.
7174
7175 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7176
7177 * target.h (exists_non_stop_target): New function declaration.
7178 * target.c (exists_non_stop_target): New function.
7179
7180 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
7181
7182 PR gdb/24789
7183 * eval.c (is_integral_or_integral_reference): New function.
7184 (evaluate_subexp_standard): Allow integer references in
7185 pointer arithmetic.
7186
7187 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
7188
7189 * remote.c (remote_target::remote_parse_stop_reply): Remove the
7190 check for no ptid in the stop reply when the target is non-stop.
7191
7192 2020-04-01 Tom Tromey <tromey@adacore.com>
7193
7194 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
7195 "name" parameter to rvalue reference. Initialize m_name_holder.
7196 <lookup_name_info>: New overloads.
7197 <name>: Return gdb::string_view.
7198 <c_str>: New method.
7199 <make_ignore_params>: Update.
7200 <search_name_hash>: Update.
7201 <language_lookup_name>: Return const char *.
7202 <m_name>: Change type.
7203 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
7204 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
7205 (lookup_name_info::match_any): Update.
7206 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
7207 Update.
7208 * minsyms.c (linkage_name_str): Update.
7209 * language.c (default_symbol_name_matcher): Update.
7210 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
7211 Update.
7212 * ada-lang.c (ada_fold_name): Change parameter to string_view.
7213 (ada_lookup_name_info::ada_lookup_name_info): Update.
7214 (literal_symbol_name_matcher): Update.
7215
7216 2020-04-01 Tom Tromey <tromey@adacore.com>
7217
7218 * psymtab.c (psymtab_search_name): Remove function.
7219 (psym_lookup_symbol): Create search name and lookup name here.
7220 (lookup_partial_symbol): Remove "name" parameter; add
7221 lookup_name.
7222 (psym_expand_symtabs_for_function): Update.
7223
7224 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
7225
7226 PR tui/25597:
7227 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
7228
7229 2020-03-31 Tom Tromey <tromey@adacore.com>
7230
7231 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
7232 memcpy.
7233
7234 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
7235
7236 * features/riscv/32bit-csr.xml: Regenerated.
7237 * features/riscv/64bit-csr.xml: Regenerated.
7238
7239 2020-03-30 Tom Tromey <tromey@adacore.com>
7240
7241 * ada-valprint.c (print_variant_part): Update.
7242 * ada-lang.h (ada_which_variant_applies): Update.
7243 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
7244 outer_valaddr parameters; replace with "outer" value parameter.
7245 (to_fixed_variant_branch_type): Update.
7246
7247 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
7248
7249 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
7250 <list>. Remove inclusion of observable.h.
7251 (PPC_DEBUG_CURRENT_VERSION): Move up define.
7252 (struct arch_lwp_info): New struct.
7253 (class ppc_linux_dreg_interface): New class.
7254 (struct ppc_linux_process_info): New struct.
7255 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
7256 <low_new_clone, low_forget_process, low_prepare_to_resume>
7257 <copy_thread_dreg_state, mark_thread_stale>
7258 <mark_debug_registers_changed, register_hw_breakpoint>
7259 <clear_hw_breakpoint, register_wp, clear_wp>
7260 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
7261 <num_memory_accesses, get_trigger_type>
7262 <create_watchpoint_request, hwdebug_point_cmp>
7263 <init_arch_lwp_info, get_arch_lwp_info>
7264 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
7265 methods.
7266 <struct ptid_hash>: New inner struct.
7267 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
7268 members.
7269 (saved_dabr_value, hwdebug_info, max_slots_number)
7270 (struct hw_break_tuple, struct thread_points, ppc_threads)
7271 (have_ptrace_hwdebug_interface)
7272 (hwdebug_find_thread_points_by_tid)
7273 (hwdebug_insert_point, hwdebug_remove_point): Remove.
7274 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
7275 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
7276 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
7277 use m_dreg_interface.
7278 (hwdebug_point_cmp): Change to...
7279 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
7280 reference arguments instead of pointers.
7281 (ppc_linux_nat_target::ranged_break_num_registers): Use
7282 m_dreg_interface.
7283 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
7284 m_dreg_interface. Call register_hw_breakpoint.
7285 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
7286 m_dreg_interface. Call clear_hw_breakpoint.
7287 (get_trigger_type): Change to...
7288 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
7289 comment.
7290 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
7291 use m_dreg_interface. Call register_hw_breakpoint.
7292 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
7293 use m_dreg_interface. Call clear_hw_breakpoint.
7294 (can_use_watchpoint_cond_accel): Change to...
7295 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
7296 method. Update comment, use m_dreg_interface and
7297 m_process_info.
7298 (calculate_dvc): Change to...
7299 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
7300 m_dreg_interface.
7301 (num_memory_accesses): Change to...
7302 (ppc_linux_nat_target::num_memory_accesses): ...this method.
7303 (check_condition): Change to...
7304 (ppc_linux_nat_target::check_condition): ...this method.
7305 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
7306 comment, use m_dreg_interface.
7307 (create_watchpoint_request): Change to...
7308 (ppc_linux_nat_target::create_watchpoint_request): ...this
7309 method. Use m_dreg_interface.
7310 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
7311 m_dreg_interface. Call register_hw_breakpoint or register_wp.
7312 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
7313 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
7314 (ppc_linux_nat_target::low_forget_process)
7315 (ppc_linux_nat_target::low_new_fork)
7316 (ppc_linux_nat_target::low_new_clone)
7317 (ppc_linux_nat_target::low_delete_thread)
7318 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
7319 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
7320 only call mark_thread_stale.
7321 (ppc_linux_thread_exit): Remove.
7322 (ppc_linux_nat_target::stopped_data_address): Change to...
7323 (ppc_linux_nat_target::low_stopped_data_address): This. Add
7324 comment, use m_dreg_interface and m_thread_hw_breakpoints.
7325 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
7326 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
7327 comment. Call low_stopped_data_address.
7328 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
7329 m_dreg_interface.
7330 (ppc_linux_nat_target::masked_watch_num_registers): Use
7331 m_dreg_interface.
7332 (ppc_linux_nat_target::copy_thread_dreg_state)
7333 (ppc_linux_nat_target::mark_thread_stale)
7334 (ppc_linux_nat_target::mark_debug_registers_changed)
7335 (ppc_linux_nat_target::register_hw_breakpoint)
7336 (ppc_linux_nat_target::clear_hw_breakpoint)
7337 (ppc_linux_nat_target::register_wp)
7338 (ppc_linux_nat_target::clear_wp)
7339 (ppc_linux_nat_target::init_arch_lwp_info)
7340 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
7341 (_initialize_ppc_linux_nat): Remove observer callback.
7342
7343 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
7344
7345 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
7346 (ppc_linux_nat_target::auxv_parse)
7347 (ppc_linux_nat_target::read_description)
7348 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
7349 Move up.
7350
7351 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
7352
7353 * linux-nat.h (low_new_clone): New method.
7354 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
7355
7356 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
7357
7358 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
7359 (dbx_expand_psymtab): ... this.
7360 (start_psymtab): Update.
7361 * mdebugread.c (psymtab_to_symtab_1): Rename to...
7362 (mdebug_expand_psymtab): ... this.
7363 (parse_partial_symbols): Update.
7364 (new_psymtab): Update.
7365 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
7366 (xcoff_expand_psymtab): ... this.
7367 (xcoff_start_psymtab): Update.
7368
7369 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
7370
7371 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
7372 <expand_dependencies>: ... this.
7373 * psymtab.c (partial_symtab::read_dependencies): Rename to...
7374 (partial_symtab::expand_dependencies): ... this.
7375 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
7376 Update.
7377 (dwarf2_psymtab::expand_psymtab): Update.
7378 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
7379 * mdebugread.c (psymtab_to_symtab_1): Update.
7380 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
7381
7382 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
7383
7384 * psympriv.h (discard_psymtab): Remove.
7385 * dbxread.c (dbx_end_psymtab): Update.
7386 * xcoffread.c (xcoff_end_psymtab): Update.
7387
7388 2020-03-28 Tom Tromey <tom@tromey.com>
7389
7390 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
7391 comment.
7392
7393 2020-03-28 Tom Tromey <tom@tromey.com>
7394
7395 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
7396
7397 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
7398
7399 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
7400
7401 2020-03-26 John Baldwin <jhb@FreeBSD.org>
7402
7403 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
7404
7405 2020-03-26 Tom Tromey <tom@tromey.com>
7406
7407 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
7408 (mark_common_block_symbol_computed, read_tag_string_type)
7409 (attr_to_dynamic_prop, read_subrange_type): Update.
7410 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
7411 to be methods on struct attribute.
7412 (skip_one_die, process_imported_unit_die, read_namespace_alias)
7413 (read_call_site_scope, partial_die_info::read)
7414 (partial_die_info::read, lookup_die_type, follow_die_ref):
7415 Update.
7416 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
7417 from dwarf2_get_ref_die_offset.
7418 (attribute::constant_value): New method, from
7419 dwarf2_get_attr_constant_value.
7420 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
7421 Declare method.
7422 <constant_value>: New method.
7423
7424 2020-03-26 Tom Tromey <tom@tromey.com>
7425
7426 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
7427 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
7428 (dwarf_type_encoding_name): Move to stringify.c.
7429 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
7430 * dwarf2/stringify.c: New file.
7431 * dwarf2/stringify.h: New file.
7432
7433 2020-03-26 Tom Tromey <tom@tromey.com>
7434
7435 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
7436 Rewrite.
7437
7438 2020-03-26 Tom Tromey <tom@tromey.com>
7439
7440 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
7441 methods.
7442 * dwarf2/read.c (lookup_addr_base): Move to die.h.
7443 (lookup_ranges_base): Likewise.
7444 (read_cutu_die_from_dwo, read_full_die_1): Update.
7445
7446 2020-03-26 Tom Tromey <tom@tromey.com>
7447
7448 * dwarf2/read.c (read_import_statement, read_file_scope)
7449 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
7450 (read_lexical_block_scope, read_call_site_scope)
7451 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
7452 (handle_struct_member_die, process_structure_scope)
7453 (update_enumeration_type_from_children)
7454 (process_enumeration_scope, read_array_type, read_common_block)
7455 (read_namespace, read_module, read_subroutine_type): Update.
7456 (sibling_die): Remove.
7457
7458 2020-03-26 Tom Tromey <tom@tromey.com>
7459
7460 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
7461 (build_type_psymtabs_reader, read_structure_type)
7462 (read_enumeration_type, read_full_die_1): Update.
7463 (dwarf2_attr_no_follow): Move to die.h.
7464 * dwarf2/die.h (struct die_info) <attr>: New method.
7465
7466 2020-03-26 Tom Tromey <tom@tromey.com>
7467
7468 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
7469 <base_address>: Now an optional.
7470 (dwarf2_find_base_address, dwarf2_rnglists_process)
7471 (dwarf2_ranges_process, fill_in_loclist_baton)
7472 (dwarf2_symbol_mark_computed): Update.
7473
7474 2020-03-26 Tom Tromey <tom@tromey.com>
7475
7476 * dwarf2/read.c (struct die_info): Move to die.h.
7477 * dwarf2/die.h: New file.
7478
7479 2020-03-26 Tom Tromey <tom@tromey.com>
7480
7481 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
7482 * dwarf2/read.c
7483 (dwarf2_statement_list_fits_in_line_number_section_complaint):
7484 Move to line-header.c.
7485 (read_checked_initial_length_and_offset, read_formatted_entries):
7486 Likewise.
7487 (dwarf_decode_line_header): Split into two.
7488 * dwarf2/line-header.c
7489 (dwarf2_statement_list_fits_in_line_number_section_complaint):
7490 Move from read.c.
7491 (read_checked_initial_length_and_offset, read_formatted_entries):
7492 Likewise.
7493 (dwarf_decode_line_header): New function, split from read.c.
7494
7495 2020-03-26 Tom Tromey <tom@tromey.com>
7496
7497 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
7498 Declare method.
7499 * dwarf2/read.c (read_attribute_value): Update.
7500 (dwarf2_per_objfile::read_line_string): Rename from
7501 read_indirect_line_string.
7502 (read_formatted_entries): Update.
7503
7504 2020-03-26 Tom Tromey <tom@tromey.com>
7505
7506 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
7507 variable.
7508
7509 2020-03-26 Tom Tromey <tom@tromey.com>
7510
7511 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
7512 const.
7513 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
7514 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
7515 parameter const.
7516
7517 2020-03-26 Tom Tromey <tom@tromey.com>
7518
7519 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
7520 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
7521 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
7522 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
7523
7524 2020-03-26 Tom Tromey <tom@tromey.com>
7525
7526 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
7527 file_names_size, file_full_name, file_file_name>: Use const.
7528 <file_name_at, file_names>: Add const overload.
7529 * dwarf2/line-header.c (line_header::file_file_name)
7530 (line_header::file_full_name): Update.
7531
7532 2020-03-26 Tom Tromey <tom@tromey.com>
7533
7534 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
7535 (macro_start_file, consume_improper_spaces)
7536 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
7537 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
7538 (dwarf_decode_macros): Move to macro.c.
7539 * dwarf2/macro.c: New file.
7540 * dwarf2/macro.h: New file.
7541 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
7542
7543 2020-03-26 Tom Tromey <tom@tromey.com>
7544
7545 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
7546 method.
7547 * dwarf2/section.c: New method. From
7548 read_indirect_string_at_offset_from.
7549 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
7550 (read_indirect_string_at_offset_from): Move to section.c.
7551 (read_indirect_string_at_offset): Rewrite.
7552 (read_indirect_line_string_at_offset): Remove.
7553 (read_indirect_string, read_indirect_line_string)
7554 (dwarf_decode_macro_bytes): Update.
7555
7556 2020-03-26 Tom Tromey <tom@tromey.com>
7557
7558 * dwarf2/section.h (struct dwarf2_section_info)
7559 <overload_complaint>: Declare.
7560 (dwarf2_section_buffer_overflow_complaint): Don't declare.
7561 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
7562 Rename from dwarf2_section_buffer_overflow_complaint.
7563 * dwarf2/read.c (skip_one_die, partial_die_info::read)
7564 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
7565
7566 2020-03-26 Tom Tromey <tom@tromey.com>
7567
7568 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
7569 Declare.
7570 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
7571 Move from read.c.
7572 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
7573 to section.c.
7574
7575 2020-03-26 Tom Tromey <tom@tromey.com>
7576
7577 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
7578
7579 2020-03-26 Tom Tromey <tom@tromey.com>
7580
7581 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
7582 "builder".
7583 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
7584 parameter.
7585 (dwarf_decode_macros): Update.
7586
7587 2020-03-26 Tom Tromey <tom@tromey.com>
7588
7589 * dwarf2/read.c (read_attribute_value): Update.
7590 (read_indirect_string_from_dwz): Move to dwz.c; change into
7591 method.
7592 (dwarf_decode_macro_bytes): Update.
7593 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
7594 * dwarf2/dwz.c: New file.
7595 * Makefile.in (COMMON_SFILES): Add dwz.c.
7596
7597 2020-03-26 Tom Tromey <tom@tromey.com>
7598
7599 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
7600 * dwarf2/read.c: Add include.
7601 * dwarf2/index-write.c: Add include.
7602 * dwarf2/index-cache.c: Add include.
7603 * dwarf2/dwz.h: New file.
7604
7605 2020-03-25 Tom Tromey <tom@tromey.com>
7606
7607 * compile/compile-object-load.c (get_out_value_type): Mention
7608 correct symbol name in error message.
7609
7610 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
7611
7612 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
7613
7614 2020-03-25 Tom de Vries <tdevries@suse.de>
7615
7616 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
7617 * symmisc.c (dump_symtab_1): Print user and includes fields.
7618 (maintenance_info_symtabs): Same.
7619
7620 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
7621
7622 PR gdb/25534
7623 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
7624 (riscv_regcache_cooked_write): New function.
7625 (riscv_push_dummy_call): Use new function.
7626 (riscv_return_value): Likewise.
7627
7628 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
7629
7630 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
7631 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
7632 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
7633 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
7634 * infrun.c (follow_fork): Likewise.
7635 (follow_fork_inferior): Likewise.
7636 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
7637 * linux-nat.h (class linux_nat_target): Likewise.
7638 * remote.c (class remote_target) <follow_fork>: Likewise.
7639 (remote_target::follow_fork): Likewise.
7640 * target-delegates.c: Re-generate.
7641 * target.c (default_follow_fork): Likewise.
7642 (target_follow_fork): Likewise.
7643 * target.h (struct target_ops) <follow_fork>: Likewise.
7644 (target_follow_fork): Likewise.
7645
7646 2020-03-24 Tom de Vries <tdevries@suse.de>
7647
7648 * psymtab.c (maintenance_info_psymtabs): Print user field.
7649
7650 2020-03-20 Tom Tromey <tromey@adacore.com>
7651
7652 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
7653 const.
7654 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
7655 const.
7656
7657 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
7658
7659 * ptrace.m4: Don't check for ptrace declaration.
7660 * config.in: Re-generate.
7661 * configure: Re-generate.
7662 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
7663 not defined.
7664
7665 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7666
7667 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
7668 `PTRACE_TYPE_RET'.
7669 * i386-bsd-nat.c (gdb_ptrace): Likewise.
7670 * sparc-nat.c (gdb_ptrace): Likewise.
7671 * x86-bsd-nat.c (gdb_ptrace): Likewise.
7672
7673 2020-03-20 Tom Tromey <tromey@adacore.com>
7674
7675 * c-exp.y (lex_one_token): Fix assert.
7676
7677 2020-03-20 Tom Tromey <tromey@adacore.com>
7678
7679 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
7680 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
7681 strncpy call.
7682
7683 2020-03-20 Tom Tromey <tromey@adacore.com>
7684
7685 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
7686
7687 2020-03-20 Tom Tromey <tromey@adacore.com>
7688
7689 * ada-valprint.c (print_variant_part): Remove parameters; switch
7690 to value-based API.
7691 (print_field_values): Likewise.
7692 (ada_val_print_struct_union): Likewise.
7693 (ada_value_print_1): Update.
7694
7695 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7696
7697 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
7698 nbsd_nat_target instead of inf_ptrace_target.
7699 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7700 nbsd_nat_target.
7701
7702 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7703
7704 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
7705 it to the ptrace call.
7706 * (store_registers): Likewise.
7707
7708 2020-03-20 Kamil Rytarowski <n54@gmx.com>
7709
7710 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
7711 it to the ptrace call.
7712 * (store_registers): Likewise.
7713
7714 2020-03-19 Luis Machado <luis.machado@linaro.org>
7715
7716 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
7717 valid, fetch vg value from ptrace.
7718
7719 2020-03-19 Kamil Rytarowski <n54@gmx.com>
7720 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
7721 * inf-ptrace.c: Likewise.
7722 * (gdb_ptrace): Add.
7723 * (inf_ptrace_target::resume): Update.
7724 * (inf_ptrace_target::xfer_partial): Likewise.
7725 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
7726 * (inf_ptrace_peek_poke): Update.
7727
7728 2020-03-19 Kamil Rytarowski <n54@gmx.com>
7729
7730 * x86-bsd-nat.c (gdb_ptrace): New.
7731 * (x86bsd_dr_set): Add new argument `ptid'.
7732 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
7733 x86bsd_dr_set_addr): Update.
7734
7735 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7736
7737 * remote.c (remote_target::process_stop_reply): Handle events for
7738 all threads differently.
7739
7740 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7741
7742 * completer.c (completion_tracker::remove_completion): Define new
7743 function.
7744 * completer.h (completion_tracker::remove_completion): Declare new
7745 function.
7746 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
7747 when adding a C++ function symbol.
7748
7749 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
7750
7751 * completer.c (completion_tracker::completion_hash_entry): Define
7752 new class.
7753 (advance_to_filename_complete_word_point): Call
7754 recompute_lowest_common_denominator.
7755 (completion_tracker::completion_tracker): Call discard_completions
7756 to setup the hash table.
7757 (completion_tracker::discard_completions): Allow for being called
7758 from the constructor, pass new equal function, and element deleter
7759 when constructing the hash table. Initialise new class member
7760 variables.
7761 (completion_tracker::maybe_add_completion): Remove use of
7762 m_entries_vec, and store more information into m_entries_hash.
7763 (completion_tracker::recompute_lcd_visitor): New function, most
7764 content taken from...
7765 (completion_tracker::recompute_lowest_common_denominator):
7766 ...here, this now just visits each item in the hash calling the
7767 above visitor.
7768 (completion_tracker::build_completion_result): Remove use of
7769 m_entries_vec, call recompute_lowest_common_denominator.
7770 * completer.h (completion_tracker::have_completions): Remove use
7771 of m_entries_vec.
7772 (completion_tracker::completion_hash_entry): Declare new class.
7773 (completion_tracker::recompute_lowest_common_denominator): Change
7774 function signature.
7775 (completion_tracker::recompute_lcd_visitor): Declare new function.
7776 (completion_tracker::m_entries_vec): Delete.
7777 (completion_tracker::m_entries_hash): Initialize to NULL.
7778 (completion_tracker::m_lowest_common_denominator_valid): New
7779 member variable.
7780 (completion_tracker::m_lowest_common_denominator_max_length): New
7781 member variable.
7782
7783 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7784
7785 * regformats/regdef.h: Put reg in gdb namespace.
7786
7787 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7788
7789 * i386-bsd-nat.c (gdb_ptrace): New.
7790 * (i386bsd_fetch_inferior_registers,
7791 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
7792 * (i386bsd_fetch_inferior_registers,
7793 i386bsd_store_inferior_registers) Use gdb_ptrace.
7794
7795 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7796
7797 * amd64-bsd-nat.c (gdb_ptrace): New.
7798 * (amd64bsd_fetch_inferior_registers,
7799 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
7800 * (amd64bsd_fetch_inferior_registers,
7801 amd64bsd_store_inferior_registers) Use gdb_ptrace.
7802
7803 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7804
7805 * user-regs.c (user_reg::read): Rename to...
7806 (user_reg::xread): ...this.
7807 * (append_user_reg): Rename argument `read' to `xread'.
7808 * (user_reg_add_builtin): Likewise.
7809 * (user_reg_add): Likewise.
7810 * (value_of_user_reg): Likewise.
7811
7812 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7813
7814 * sparc-nat.c (gdb_ptrace): New.
7815 * sparc-nat.c (sparc_fetch_inferior_registers)
7816 (sparc_store_inferior_registers) Remove obsolete comment.
7817 * sparc-nat.c (sparc_fetch_inferior_registers)
7818 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
7819 * sparc-nat.c (sparc_fetch_inferior_registers)
7820 (sparc_store_inferior_registers) Use gdb_ptrace.
7821
7822 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7823
7824 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
7825 it to the ptrace call.
7826 * sh-nbsd-nat.c (store_registers): Likewise.
7827
7828 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7829
7830 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
7831 nbsd_nat_target instead of inf_ptrace_target.
7832 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
7833 nbsd_nat_target.
7834
7835 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7836
7837 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
7838
7839 2020-03-17 Kamil Rytarowski <n54@gmx.com>
7840
7841 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
7842 <sys/sysctl.h>.
7843 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
7844
7845 2020-03-17 Tom de Vries <tdevries@suse.de>
7846
7847 PR gdb/23710
7848 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
7849 fields.
7850 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
7851 fields.
7852 (process_imported_unit_die): Skip import of c++ CUs.
7853
7854 2020-03-16 Tom Tromey <tom@tromey.com>
7855
7856 * p-valprint.c (pascal_object_print_value): Initialize
7857 base_value.
7858
7859 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
7860 Shahab Vahedi <shahab@synopsys.com>
7861
7862 * Makefile.in: Add arch/arc.o
7863 * configure.tgt: Likewise.
7864 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
7865 (_initialize_arc_tdep): Don't initialize old target descriptions.
7866 (arc_read_description): New function to cache target descriptions.
7867 * arc-tdep.h (arc_read_description): Add proto type.
7868 * arch/arc.c: New file.
7869 * arch/arc.h: Likewise.
7870 * features/Makefile: Replace old target descriptions with new.
7871 * features/arc-arcompact.c: Remove.
7872 * features/arc-arcompact.xml: Likewise.
7873 * features/arc-v2.c: Likewise
7874 * features/arc-v2.xml: Likewise
7875 * features/arc/aux-arcompact.xml: New file.
7876 * features/arc/aux-v2.xml: Likewise.
7877 * features/arc/core-arcompact.xml: Likewise.
7878 * features/arc/core-v2.xml: Likewise.
7879 * features/arc/aux-arcompact.c: Generate.
7880 * features/arc/aux-v2.c: Likewise.
7881 * features/arc/core-arcompact.c: Likewise.
7882 * features/arc/core-v2.c: Likewise.
7883 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
7884
7885 2020-03-16 Tom Tromey <tromey@adacore.com>
7886
7887 PR gdb/25663:
7888 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
7889 putting value into bcache.
7890
7891 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7892
7893 PR gdb/21500
7894 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
7895 to...
7896 (amd64_windows_init_abi_common): ... this. Don't set size of
7897 long type.
7898 (amd64_windows_init_abi): New function.
7899 (amd64_cygwin_init_abi): New function.
7900 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
7901 the Cygwin OS ABI.
7902 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
7903 comment.
7904
7905 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7906
7907 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
7908 * windows-tdep.c (CYGWIN_DLL_NAME): New.
7909 (pe_import_directory_entry): New struct type.
7910 (is_linked_with_cygwin_dll): New function.
7911 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
7912 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
7913 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
7914
7915 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7916
7917 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
7918 i386_cygwin_core_osabi_sniffer.
7919
7920 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7921
7922 * i386-cygwin-tdep.c: Rename to...
7923 * i386-windows-tdep.c: ... this.
7924 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
7925 i386-windows-tdep.c.
7926 * configure.tgt: Likewise.
7927
7928 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7929
7930 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
7931 * osabi.c (gdb_osabi_names): Add "Windows".
7932 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
7933 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
7934 (i386_cygwin_core_osabi_sniffer): New function, extracted from
7935 i386_cygwin_osabi_sniffer.
7936 (_initialize_i386_cygwin_tdep): Register OS ABI
7937 GDB_OSABI_WINDOWS for i386.
7938 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
7939 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
7940 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
7941 for x86-64.
7942 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
7943 when the target matches '*-*-mingw*'.
7944
7945 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7946
7947 * defs.h (enum gdb_osabi): Move to...
7948 * osabi.h (enum gdb_osabi): ... here.
7949 * gdbarch.sh: Include osabi.h in gdbarch.h.
7950 * gdbarch.h: Re-generate.
7951
7952 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
7953
7954 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
7955 function.
7956 (_initialize_amd64_windows_tdep): Register osabi sniffer.
7957
7958 2020-03-14 Tom Tromey <tom@tromey.com>
7959
7960 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
7961 for C++.
7962 (c_type_print_modifier): Likewise. Add "language" parameter.
7963 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
7964 (c_type_print_base_1): Update.
7965 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
7966 constants.
7967 * type-stack.c (type_stack::insert): Handle tp_atomic and
7968 tp_restrict.
7969 (type_stack::follow_type_instance_flags): Likewise.
7970 (type_stack::follow_types): Likewise. Merge type-following code.
7971 * c-exp.y (RESTRICT, ATOMIC): New tokens.
7972 (space_identifier, cv_with_space_id)
7973 (const_or_volatile_or_space_identifier_noopt)
7974 (const_or_volatile_or_space_identifier): Remove.
7975 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
7976 rules.
7977 (ptr_operator, typebase): Update.
7978 (enum token_flag) <FLAG_C>: New constant.
7979 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
7980 "_Atomic".
7981 (lex_one_token): Handle FLAG_C.
7982
7983 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7984
7985 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
7986 it to the ptrace call.
7987 * m68k-bsd-nat.c (store_registers): Likewise.
7988
7989 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7990
7991 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
7992 gdb_byte *.
7993 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
7994 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
7995 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
7996
7997 2020-03-14 Kamil Rytarowski <n54@gmx.com>
7998
7999 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
8000 nbsd_nat_target instead of inf_ptrace_target.
8001 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
8002 nbsd_nat_target.
8003
8004 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8005
8006 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
8007 register_t.
8008
8009 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8010
8011 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
8012 it to the ptrace call.
8013 * alpha-bsd-nat.c (store_registers): Likewise.
8014
8015 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8016
8017 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
8018 includes.
8019 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
8020 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
8021 fill_fpregset): Likewise.
8022
8023 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8024
8025 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
8026 nbsd_nat_target instead of inf_ptrace_target.
8027 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
8028 nbsd_nat_target.
8029
8030 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8031
8032 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
8033 register_t.
8034
8035 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8036
8037 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
8038 it to the ptrace call.
8039 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
8040 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
8041 * arm-nbsd-nat.c (store_register): Likewise.
8042 * arm-nbsd-nat.c (store_regs): Likewise.
8043 * arm-nbsd-nat.c (store_fp_register): Likewise.
8044 * arm-nbsd-nat.c (store_fp_regs): Likewise.
8045
8046 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8047
8048 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
8049 nbsd_nat_target instead of inf_ptrace_target.
8050 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
8051 nbsd_nat_target.
8052
8053 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8054
8055 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
8056 it to the ptrace call.
8057 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
8058
8059 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8060
8061 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
8062 it to the ptrace call.
8063 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
8064
8065 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8066
8067 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
8068 gdb_byte *.
8069 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
8070
8071 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8072
8073 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
8074 instead of inf_ptrace_target.
8075 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
8076 nbsd_nat_target.
8077
8078 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8079
8080 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
8081 register_t.
8082
8083 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8084
8085 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
8086 register_t.
8087
8088 2020-03-14 Kamil Rytarowski <n54@gmx.com>
8089
8090 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
8091 register_t.
8092
8093 2020-03-13 Tom Tromey <tom@tromey.com>
8094
8095 * value.h (val_print): Don't declare.
8096 * valprint.h (val_print_array_elements)
8097 (val_print_scalar_formatted, generic_val_print): Don't declare.
8098 * valprint.c (generic_val_print_array): Take a struct value.
8099 (generic_val_print_ptr, generic_val_print_memberptr)
8100 (generic_val_print_bool, generic_val_print_int)
8101 (generic_val_print_char, generic_val_print_complex)
8102 (generic_val_print): Remove.
8103 (generic_value_print): Update.
8104 (do_val_print): Remove unused parameters. Don't call
8105 la_val_print.
8106 (val_print): Remove.
8107 (common_val_print): Update. Don't call value_check_printable.
8108 (val_print_scalar_formatted, val_print_array_elements): Remove.
8109 * rust-lang.c (rust_val_print): Remove.
8110 (rust_language_defn): Update.
8111 * p-valprint.c (pascal_val_print): Remove.
8112 (pascal_value_print_inner): Update.
8113 (pascal_object_print_val_fields, pascal_object_print_val):
8114 Remove.
8115 (pascal_object_print_static_field): Update.
8116 * p-lang.h (pascal_val_print): Don't declare.
8117 * p-lang.c (pascal_language_defn): Update.
8118 * opencl-lang.c (opencl_language_defn): Update.
8119 * objc-lang.c (objc_language_defn): Update.
8120 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
8121 * m2-lang.h (m2_val_print): Don't declare.
8122 * m2-lang.c (m2_language_defn): Update.
8123 * language.h (struct language_defn) <la_val_print>: Remove.
8124 * language.c (unk_lang_value_print_inner): Rename. Change
8125 argument types.
8126 (unknown_language_defn, auto_language_defn): Update.
8127 * go-valprint.c (go_val_print): Remove.
8128 * go-lang.h (go_val_print): Don't declare.
8129 * go-lang.c (go_language_defn): Update.
8130 * f-valprint.c (f_val_print): Remove.
8131 * f-lang.h (f_value_print): Don't declare.
8132 * f-lang.c (f_language_defn): Update.
8133 * d-valprint.c (d_val_print): Remove.
8134 * d-lang.h (d_value_print): Don't declare.
8135 * d-lang.c (d_language_defn): Update.
8136 * cp-valprint.c (cp_print_value_fields)
8137 (cp_print_value_fields_rtti, cp_print_value): Remove.
8138 (cp_print_static_field): Update.
8139 * c-valprint.c (c_val_print_array, c_val_print_ptr)
8140 (c_val_print_struct, c_val_print_union, c_val_print_int)
8141 (c_val_print_memberptr, c_val_print): Remove.
8142 * c-lang.h (c_val_print_array, cp_print_value_fields)
8143 (cp_print_value_fields_rtti): Don't declare.
8144 * c-lang.c (c_language_defn, cplus_language_defn)
8145 (asm_language_defn, minimal_language_defn): Update.
8146 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
8147 (ada_val_print_enum): Take a struct value.
8148 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
8149 (ada_val_print): Remove.
8150 (ada_value_print_1): Update.
8151 (printable_val_type): Remove.
8152 * ada-lang.h (ada_val_print): Don't declare.
8153 * ada-lang.c (ada_language_defn): Update.
8154
8155 2020-03-13 Tom Tromey <tom@tromey.com>
8156
8157 * valprint.c (do_val_print): Update.
8158 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
8159 a struct value.
8160 (value_to_value_object_no_release): Declare.
8161 * python/py-value.c (value_to_value_object_no_release): New
8162 function.
8163 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
8164 struct value.
8165 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
8166 function.
8167 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
8168 a struct value.
8169 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
8170 Declare.
8171 (gdbscm_apply_val_pretty_printer): Take a struct value.
8172 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
8173 value.
8174 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
8175 value.
8176 * extension-priv.h (struct extension_language_ops)
8177 <apply_val_pretty_printer>: Take a struct value.
8178 * cp-valprint.c (cp_print_value): Create a struct value.
8179 (cp_print_value): Update.
8180
8181 2020-03-13 Tom Tromey <tom@tromey.com>
8182
8183 * ada-valprint.c (print_field_values): Call common_val_print.
8184
8185 2020-03-13 Tom Tromey <tom@tromey.com>
8186
8187 * ada-valprint.c (val_print_packed_array_elements): Remove
8188 bitoffset and val parameters. Call common_val_print.
8189 (ada_val_print_string): Remove offset, address, and original_value
8190 parameters.
8191 (ada_val_print_array): Update.
8192 (ada_value_print_array): New function.
8193 (ada_value_print_1): Call it.
8194
8195 2020-03-13 Tom Tromey <tom@tromey.com>
8196
8197 * ada-valprint.c (ada_value_print): Use common_val_print.
8198
8199 2020-03-13 Tom Tromey <tom@tromey.com>
8200
8201 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
8202
8203 2020-03-13 Tom Tromey <tom@tromey.com>
8204
8205 * ada-valprint.c (ada_value_print_num): New function.
8206 (ada_value_print_1): Use it.
8207
8208 2020-03-13 Tom Tromey <tom@tromey.com>
8209
8210 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
8211
8212 2020-03-13 Tom Tromey <tom@tromey.com>
8213
8214 * ada-valprint.c (ada_value_print_ptr): New function.
8215 (ada_value_print_1): Use it.
8216
8217 2020-03-13 Tom Tromey <tom@tromey.com>
8218
8219 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
8220 call common_val_print.
8221 (ada_val_print_1): Update.
8222 (ada_value_print_1): New function.
8223 (ada_value_print_inner): Rewrite.
8224
8225 2020-03-13 Tom Tromey <tom@tromey.com>
8226
8227 * cp-valprint.c (cp_print_value_fields): Update.
8228 (cp_print_value): New function.
8229
8230 2020-03-13 Tom Tromey <tom@tromey.com>
8231
8232 * m2-valprint.c (m2_value_print_inner): Use
8233 cp_print_value_fields.
8234 * cp-valprint.c (cp_print_value_fields): New function.
8235 * c-valprint.c (c_value_print_struct): New function.
8236 (c_value_print_inner): Use c_value_print_struct.
8237 * c-lang.h (cp_print_value_fields): Declare.
8238
8239 2020-03-13 Tom Tromey <tom@tromey.com>
8240
8241 * c-valprint.c (c_value_print_array): New function.
8242 (c_value_print_inner): Use it.
8243
8244 2020-03-13 Tom Tromey <tom@tromey.com>
8245
8246 * c-valprint.c (c_value_print_memberptr): New function.
8247 (c_value_print_inner): Use it.
8248
8249 2020-03-13 Tom Tromey <tom@tromey.com>
8250
8251 * c-valprint.c (c_value_print_int): New function.
8252 (c_value_print_inner): Use it.
8253
8254 2020-03-13 Tom Tromey <tom@tromey.com>
8255
8256 * c-valprint.c (c_value_print_ptr): New function.
8257 (c_value_print_inner): Use it.
8258
8259 2020-03-13 Tom Tromey <tom@tromey.com>
8260
8261 * c-valprint.c (c_value_print_inner): Rewrite.
8262
8263 2020-03-13 Tom Tromey <tom@tromey.com>
8264
8265 * valprint.c (generic_value_print_complex): New function.
8266 (generic_value_print): Use it.
8267
8268 2020-03-13 Tom Tromey <tom@tromey.com>
8269
8270 * valprint.c (generic_val_print_float): Don't call
8271 val_print_scalar_formatted.
8272 (generic_val_print, generic_value_print): Update.
8273
8274 2020-03-13 Tom Tromey <tom@tromey.com>
8275
8276 * valprint.c (generic_value_print_char): New function
8277 (generic_value_print): Use it.
8278
8279 2020-03-13 Tom Tromey <tom@tromey.com>
8280
8281 * valprint.c (generic_value_print_int): New function.
8282 (generic_value_print): Use it.
8283
8284 2020-03-13 Tom Tromey <tom@tromey.com>
8285
8286 * valprint.c (generic_value_print_bool): New function.
8287 (generic_value_print): Use it.
8288
8289 2020-03-13 Tom Tromey <tom@tromey.com>
8290
8291 * valprint.c (generic_val_print_func): Simplify.
8292 (generic_val_print, generic_value_print): Update.
8293
8294 2020-03-13 Tom Tromey <tom@tromey.com>
8295
8296 * valprint.c (generic_val_print_flags): Remove.
8297 (generic_val_print, generic_value_print): Update.
8298 (val_print_type_code_flags): Add original_value parameter.
8299
8300 2020-03-13 Tom Tromey <tom@tromey.com>
8301
8302 * valprint.c (generic_val_print): Update.
8303 (generic_value_print): Update.
8304 * valprint.c (generic_val_print_enum): Don't call
8305 val_print_scalar_formatted.
8306
8307 2020-03-13 Tom Tromey <tom@tromey.com>
8308
8309 * valprint.c (generic_value_print): Call generic_value_print_ptr.
8310 * valprint.c (generic_value_print_ptr): New function.
8311
8312 2020-03-13 Tom Tromey <tom@tromey.com>
8313
8314 * valprint.c (generic_value_print): Rewrite.
8315
8316 2020-03-13 Tom Tromey <tom@tromey.com>
8317
8318 * p-valprint.c (pascal_object_print_value_fields)
8319 (pascal_object_print_value): New functions.
8320
8321 2020-03-13 Tom Tromey <tom@tromey.com>
8322
8323 * p-valprint.c (pascal_value_print_inner): Rewrite.
8324
8325 2020-03-13 Tom Tromey <tom@tromey.com>
8326
8327 * f-valprint.c (f_value_print_innner): Rewrite.
8328
8329 2020-03-13 Tom Tromey <tom@tromey.com>
8330
8331 * m2-valprint.c (m2_print_unbounded_array): New overload.
8332 (m2_print_unbounded_array): Update.
8333 (m2_print_array_contents): Take a struct value.
8334 (m2_value_print_inner): Rewrite.
8335
8336 2020-03-13 Tom Tromey <tom@tromey.com>
8337
8338 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
8339 (d_value_print_inner): New function.
8340 * d-lang.h (d_value_print_inner): Declare.
8341 * d-lang.c (d_language_defn): Use d_value_print_inner.
8342
8343 2020-03-13 Tom Tromey <tom@tromey.com>
8344
8345 * go-valprint.c (go_value_print_inner): New function.
8346 * go-lang.h (go_value_print_inner): Declare.
8347 * go-lang.c (go_language_defn): Use go_value_print_inner.
8348
8349 2020-03-13 Tom Tromey <tom@tromey.com>
8350
8351 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
8352 API.
8353 (rust_val_print): Rewrite.
8354 (rust_value_print_inner): New function, from rust_val_print.
8355 (rust_language_defn): Use rust_value_print_inner.
8356
8357 2020-03-13 Tom Tromey <tom@tromey.com>
8358
8359 * ada-valprint.c (ada_value_print_inner): New function.
8360 * ada-lang.h (ada_value_print_inner): Declare.
8361 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
8362
8363 2020-03-13 Tom Tromey <tom@tromey.com>
8364
8365 * f-valprint.c (f_value_print_innner): New function.
8366 * f-lang.h (f_value_print_innner): Declare.
8367 * f-lang.c (f_language_defn): Use f_value_print_innner.
8368
8369 2020-03-13 Tom Tromey <tom@tromey.com>
8370
8371 * p-valprint.c (pascal_value_print_inner): New function.
8372 * p-lang.h (pascal_value_print_inner): Declare.
8373 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
8374
8375 2020-03-13 Tom Tromey <tom@tromey.com>
8376
8377 * m2-valprint.c (m2_value_print_inner): New function.
8378 * m2-lang.h (m2_value_print_inner): Declare.
8379 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
8380
8381 2020-03-13 Tom Tromey <tom@tromey.com>
8382
8383 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
8384 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
8385 * c-valprint.c (c_value_print_inner): New function.
8386 * c-lang.h (c_value_print_inner): Declare.
8387 * c-lang.c (c_language_defn, cplus_language_defn)
8388 (asm_language_defn, minimal_language_defn): Use
8389 c_value_print_inner.
8390
8391 2020-03-13 Tom Tromey <tom@tromey.com>
8392
8393 * p-valprint.c (pascal_object_print_value_fields): Now static.
8394 * p-lang.h (pascal_object_print_value_fields): Don't declare.
8395
8396 2020-03-13 Tom Tromey <tom@tromey.com>
8397
8398 * c-valprint.c (c_val_print_array): Simplify.
8399
8400 2020-03-13 Tom Tromey <tom@tromey.com>
8401
8402 * valprint.c (value_print_array_elements): New function.
8403 * valprint.h (value_print_array_elements): Declare.
8404
8405 2020-03-13 Tom Tromey <tom@tromey.com>
8406
8407 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
8408 * mips-tdep.c (mips_print_register): Use
8409 value_print_scalar_formatted.
8410
8411 2020-03-13 Tom Tromey <tom@tromey.com>
8412
8413 * valprint.h (value_print_scalar_formatted): Declare.
8414 * valprint.c (value_print_scalar_formatted): New function.
8415
8416 2020-03-13 Tom Tromey <tom@tromey.com>
8417
8418 * valprint.h (generic_value_print): Declare.
8419 * valprint.c (generic_value_print): New function.
8420
8421 2020-03-13 Tom Tromey <tom@tromey.com>
8422
8423 * valprint.c (do_val_print): Call la_value_print_inner, if
8424 available.
8425 * rust-lang.c (rust_language_defn): Update.
8426 * p-lang.c (pascal_language_defn): Update.
8427 * opencl-lang.c (opencl_language_defn): Update.
8428 * objc-lang.c (objc_language_defn): Update.
8429 * m2-lang.c (m2_language_defn): Update.
8430 * language.h (struct language_defn) <la_value_print_inner>: New
8431 member.
8432 * language.c (unknown_language_defn, auto_language_defn): Update.
8433 * go-lang.c (go_language_defn): Update.
8434 * f-lang.c (f_language_defn): Update.
8435 * d-lang.c (d_language_defn): Update.
8436 * c-lang.c (c_language_defn, cplus_language_defn)
8437 (asm_language_defn, minimal_language_defn): Update.
8438 * ada-lang.c (ada_language_defn): Update.
8439
8440 2020-03-13 Tom Tromey <tom@tromey.com>
8441
8442 * c-valprint.c (c_value_print): Use common_val_print.
8443
8444 2020-03-13 Tom Tromey <tom@tromey.com>
8445
8446 * cp-valprint.c (cp_print_static_field): Use common_val_print.
8447
8448 2020-03-13 Tom Tromey <tom@tromey.com>
8449
8450 * f-valprint.c (f77_print_array_1, f_val_print): Use
8451 common_val_print.
8452
8453 2020-03-13 Tom Tromey <tom@tromey.com>
8454
8455 * riscv-tdep.c (riscv_print_one_register_info): Use
8456 common_val_print.
8457
8458 2020-03-13 Tom Tromey <tom@tromey.com>
8459
8460 * mi/mi-main.c (output_register): Use common_val_print.
8461
8462 2020-03-13 Tom Tromey <tom@tromey.com>
8463
8464 * infcmd.c (default_print_one_register_info): Use
8465 common_val_print.
8466
8467 2020-03-13 Tom Tromey <tom@tromey.com>
8468
8469 * valprint.h (common_val_print_checked): Declare.
8470 * valprint.c (common_val_print_checked): New function.
8471 * stack.c (print_frame_arg): Use common_val_print_checked.
8472
8473 2020-03-13 Tom Tromey <tom@tromey.com>
8474
8475 * valprint.c (do_val_print): New function, from val_print.
8476 (val_print): Use do_val_print.
8477 (common_val_print): Use do_val_print.
8478
8479 2020-03-13 Tom Tromey <tom@tromey.com>
8480
8481 * valprint.c (value_print): Use scoped_value_mark.
8482
8483 2020-03-13 Tom de Vries <tdevries@suse.de>
8484
8485 PR symtab/25646
8486 * psymtab.c (partial_symtab::partial_symtab): Don't set
8487 globals_offset and statics_offset. Push element onto
8488 current_global_psymbols and current_static_psymbols stacks.
8489 (concat): New function.
8490 (end_psymtab_common): Set globals_offset and statics_offset. Pop
8491 element from current_global_psymbols and current_static_psymbols
8492 stacks. Concat popped elements to global_psymbols and
8493 static_symbols.
8494 (add_psymbol_to_list): Use current_global_psymbols and
8495 current_static_psymbols stacks.
8496 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
8497 current_static_psymbols fields.
8498
8499 2020-03-12 Christian Biesinger <cbiesinger@google.com>
8500
8501 * corelow.c (sniff_core_bfd): Remove.
8502 (class core_target) <m_core_vec>: Remove.
8503 (core_target::core_target): Update.
8504 (core_file_fns): Remove.
8505 (deprecated_add_core_fns): Remove.
8506 (default_core_sniffer): Remove.
8507 (sniff_core_bfd): Remove.
8508 (default_check_format): Remove.
8509 (gdb_check_format): Remove.
8510 (core_target_open): Update.
8511 (core_target::get_core_register_section): Update.
8512 (get_core_registers_cb): Update.
8513 (core_target::fetch_registers): Update.
8514 * gdbcore.h (struct core_fns): Remove.
8515 (deprecated_add_core_fns): Remove.
8516 (default_core_sniffer): Remove.
8517 (default_check_format): Remove.
8518
8519 2020-03-12 Tom Tromey <tom@tromey.com>
8520
8521 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
8522 CORE_ADDR.
8523 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
8524
8525 2020-03-12 Tom Tromey <tom@tromey.com>
8526
8527 * remote.c (remote_target::download_tracepoint)
8528 (remote_target::enable_tracepoint)
8529 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
8530 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
8531 sprintf_vma.
8532
8533 2020-03-12 Tom Tromey <tom@tromey.com>
8534
8535 * symfile-mem.c: Update CORE_ADDR size assert.
8536
8537 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8538
8539 * selftest.m4: Move to gdbsupport/.
8540 * acinclude.m4: Update path to selftest.m4.
8541
8542 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8543
8544 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
8545 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
8546 gdbarch-selfselftests.c and selftest-arch.c.
8547 (SUBDIR_UNITTESTS_OBS): Rename to...
8548 (SELFTESTS_OBS): ... this.
8549 (COMMON_SFILES): Remove disasm-selftests.c and
8550 gdbarch-selftests.c.
8551 * configure.ac: Don't add selftest-arch.{c,o} to
8552 CONFIG_{SRCS,OBS}.
8553 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
8554 preprocessor conditions.
8555
8556 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8557
8558 * configure.ac: Don't source bfd/development.sh.
8559 * selftest.m4: Modify comment.
8560 * configure: Re-generate.
8561
8562 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
8563
8564 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
8565 not "true" or "false".
8566 * configure: Re-generate.
8567
8568 2020-03-12 Christian Biesinger <cbiesinger@google.com>
8569
8570 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
8571 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
8572 renamed to arm_nbsd_supply_gregset.
8573 (fetch_register): Update to call arm_nbsd_supply_gregset.
8574 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
8575 (arm_netbsd_nat_target::fetch_registers): Update.
8576 (fetch_elfcore_registers): Removed.
8577 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
8578 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
8579 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
8580 not require NetBSD system headers.
8581 (arm_nbsd_regset): New struct.
8582 (arm_nbsd_iterate_over_regset_sections): New function.
8583 (arm_netbsd_init_abi_common): Updated to call
8584 set_gdbarch_iterate_over_regset_sections.
8585 * arm-nbsd-tdep.h: New file.
8586
8587 2020-03-11 Kevin Buettner <kevinb@redhat.com>
8588
8589 * symtab.c (find_pc_sect_line): Add check which prevents infinite
8590 recursion.
8591
8592 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
8593
8594 * configure: Re-generate.
8595
8596 2020-03-11 Tom Tromey <tromey@adacore.com>
8597
8598 * ada-typeprint.c (print_choices): Fix comment.
8599
8600 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
8601
8602 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
8603 previous item in the list, when the list has no items.
8604
8605 2020-03-11 Tom de Vries <tdevries@suse.de>
8606
8607 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
8608 PROP_LOCLIST handling code.
8609
8610 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
8611
8612 * buildsym-legacy.c (record_line): Pass extra parameter to
8613 record_line.
8614 * buildsym.c (buildsym_compunit::record_line): Take an extra
8615 parameter, reduce duplication in the line table, and record the
8616 is_stmt flag in the line table.
8617 * buildsym.h (buildsym_compunit::record_line): Add extra
8618 parameter.
8619 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
8620 non-statement lines.
8621 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
8622 this to the symtab builder.
8623 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
8624 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
8625 through to dwarf_record_line_1.
8626 * infrun.c (process_event_stop_test): When stepping, don't stop at
8627 a non-statement instruction, and only refresh the step info when
8628 we land in the middle of a line's range. Also add an extra
8629 comment.
8630 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
8631 field.
8632 * record-btrace.c (btrace_find_line_range): Only record lines
8633 marked as is-statement.
8634 * stack.c (frame_show_address): Show the frame address if we are
8635 in a non-statement sal.
8636 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
8637 (maintenance_print_one_line_table): Print a header for the is_stmt
8638 column, and include is_stmt information in the output.
8639 * symtab.c (find_pc_sect_line): Find lines marked as statements in
8640 preference to non-statements.
8641 (find_pcs_for_symtab_line): Prefer is-statement entries.
8642 (find_line_common): Likewise.
8643 * symtab.h (struct linetable_entry): Add is_stmt field.
8644 (struct symtab_and_line): Likewise.
8645 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
8646 arranging the line table.
8647
8648 2020-03-07 Tom de Vries <tdevries@suse.de>
8649
8650 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
8651 DIE.
8652
8653 2020-03-07 Tom Tromey <tom@tromey.com>
8654
8655 * valops.c (value_literal_complex): Remove obsolete comment.
8656 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
8657 comment.
8658
8659 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
8660
8661 * infrun.h: Forward-declare thread_info.
8662 (set_step_info): Add thread_info parameter, add doc.
8663 * infrun.c (set_step_info): Add thread_info parameter, move doc
8664 to header.
8665 * infrun.c (process_event_stop_test): Pass thread to
8666 set_step_info call.
8667 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
8668 set_step_info.
8669 (prepare_one_step): Add thread_info parameter, pass it to
8670 set_step_frame and prepare_one_step (recursive) call.
8671 (step_1): Pass thread to prepare_one_step call.
8672 (step_command_fsm::should_stop): Pass thread to
8673 prepare_one_step.
8674 (until_next_fsm): Pass thread to set_step_frame call.
8675 (finish_command): Pass thread to set_step_info call.
8676
8677 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
8678
8679 * windows-tdep.c (windows_solib_create_inferior_hook):
8680 Check if inferior is running.
8681
8682 2020-03-06 Tom de Vries <tdevries@suse.de>
8683
8684 * NEWS: Fix "the the".
8685 * ctfread.c: Same.
8686
8687 2020-03-06 Tom de Vries <tdevries@suse.de>
8688
8689 * psymtab.c (psymtab_to_symtab): Don't print "done.".
8690
8691 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
8692
8693 * .dir-locals.el: Add a comment referencing the other copies of
8694 this file.
8695
8696 2020-03-05 John Baldwin <jhb@FreeBSD.org>
8697
8698 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
8699 psargs.
8700
8701 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
8702
8703 * .gitattributes: New file.
8704
8705 2020-03-04 Tom Tromey <tom@tromey.com>
8706
8707 * symmisc.c (print_symbol_bcache_statistics)
8708 (print_objfile_statistics): Update.
8709 * symfile.c (allocate_symtab): Use intern.
8710 * psymtab.c (partial_symtab::partial_symtab): Use intern.
8711 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
8712 macro_cache>: Remove.
8713 <string_cache>: New member.
8714 (struct objfile) <intern>: New methods.
8715 * elfread.c (elf_symtab_read): Use intern.
8716 * dwarf2/read.c (fixup_go_packaging): Intern package name.
8717 (dwarf2_compute_name, dwarf2_physname)
8718 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
8719 names.
8720 (guess_partial_die_structure_name): Update.
8721 (partial_die_info::fixup): Intern name.
8722 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
8723 name.
8724 (dwarf2_name): Intern name. Update.
8725 * buildsym.c (buildsym_compunit::get_macro_table): Use
8726 string_cache.
8727
8728 2020-03-04 Tom Tromey <tom@tromey.com>
8729
8730 * jit.c (bfd_open_from_target_memory): Make "target" const.
8731 * corefile.c (gnutarget): Now const.
8732 * gdbcore.h (gnutarget): Now const.
8733
8734 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
8735
8736 * NEWS: Mention support for WOW64 processes.
8737 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
8738 (amd64_windows_segment_register_p): Remove static.
8739 (_initialize_amd64_windows_nat): Update.
8740 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
8741 * i386-windows-nat.c (context_offset): Update.
8742 (i386_mappings): Rename and remove static.
8743 (i386_windows_segment_register_p): Remove static.
8744 (_initialize_i386_windows_nat): Update.
8745 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
8746 (STATUS_WX86_SINGLE_STEP): New macro.
8747 (EnumProcessModulesEx): New macro.
8748 (Wow64SuspendThread): New macro.
8749 (Wow64GetThreadContext): New macro.
8750 (Wow64SetThreadContext): New macro.
8751 (Wow64GetThreadSelectorEntry): New macro.
8752 (windows_set_context_register_offsets): Add static.
8753 (windows_set_segment_register_p): Likewise.
8754 (windows_add_thread): Adapt for WOW64 processes.
8755 (windows_fetch_one_register): Likewise.
8756 (windows_nat_target::fetch_registers): Likewise.
8757 (windows_store_one_register): Likewise.
8758 (display_selector): Likewise.
8759 (display_selectors): Likewise.
8760 (handle_exception): Likewise.
8761 (windows_continue): Likewise.
8762 (windows_nat_target::resume): Likewise.
8763 (windows_add_all_dlls): Likewise.
8764 (do_initial_windows_stuff): Likewise.
8765 (windows_nat_target::attach): Likewise.
8766 (windows_get_exec_module_filename): Likewise.
8767 (windows_nat_target::create_inferior): Likewise.
8768 (windows_xfer_siginfo): Likewise.
8769 (_initialize_loadable): Initialize Wow64SuspendThread,
8770 Wow64GetThreadContext, Wow64SetThreadContext,
8771 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
8772 * windows-nat.h (windows_set_context_register_offsets):
8773 Remove declaration.
8774 (windows_set_segment_register_p): Likewise.
8775 (i386_windows_segment_register_p): Add declaration.
8776 (amd64_windows_segment_register_p): Likewise.
8777
8778 2020-03-04 Luis Machado <luis.machado@linaro.org>
8779
8780 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
8781 in "info registers" for AArch64/ARM.
8782
8783 The change caused "info registers" to not print GPR's.
8784
8785 gdb/ChangeLog:
8786
8787 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
8788
8789 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
8790 when reg->group is empty and reggroup is not.
8791
8792 2020-03-03 Tom Tromey <tromey@adacore.com>
8793
8794 * dwarf2/frame.c (struct dwarf2_frame_cache)
8795 <checked_tailcall_bottom, entry_cfa_sp_offset,
8796 entry_cfa_sp_offset_p>: Remove members.
8797 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
8798 (dwarf2_frame_prev_register): Don't call
8799 dwarf2_tailcall_sniffer_first.
8800 (dwarf2_append_unwinders): Don't append tailcall unwinder.
8801 * frame-unwind.c (add_unwinder): New fuction.
8802 (frame_unwind_init): Use it. Add tailcall unwinder.
8803
8804 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
8805 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8806
8807 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
8808 value should be printed as true.
8809
8810 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
8811
8812 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
8813 (windows_init_abi): Set and use windows_so_ops.
8814
8815 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
8816
8817 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
8818 when verifying if dealing with a convenience variable.
8819
8820 2020-03-03 Luis Machado <luis.machado@linaro.org>
8821
8822 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
8823
8824 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
8825
8826 * infrun.c (gdbarch_supports_displaced_stepping): New.
8827 (use_displaced_stepping): Break up conditions in smaller pieces.
8828 Use gdbarch_supports_displaced_stepping.
8829 (displaced_step_prepare_throw): Use
8830 gdbarch_supports_displaced_stepping.
8831
8832 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
8833
8834 * NEWS: Mention new behaviour of the history filename.
8835 * top.c (write_history_p): Add comment.
8836 (show_write_history_p): Add header comment, give a different
8837 message when history writing is on, but the history filename is
8838 empty.
8839 (history_filename): Add comment.
8840 (history_filename_empty): New function.
8841 (show_history_filename): Add header comment, give a different
8842 message when the filename is empty.
8843 (init_history): Compare history_filename against nullptr, and only
8844 read history if the filename is not empty.
8845 (set_history_filename): Add header comment, and only make
8846 non-empty filenames absolute.
8847 (init_main): Make the filename argument to 'set history filename'
8848 optional.
8849
8850 2020-03-02 Christian Biesinger <cbiesinger@google.com>
8851
8852 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
8853 (arm_supply_vfpregset): ...this, and update to use VFP registers.
8854 (fetch_fp_register): Update.
8855 (fetch_fp_regs): Update.
8856 (store_fp_register): Update.
8857 (store_fp_regs): Update.
8858 (arm_netbsd_nat_target::read_description): New function.
8859 (fetch_elfcore_registers): Update.
8860
8861 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
8862
8863 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
8864 general_thread if the stop reply is missing a thread-id.
8865 (remote_target::process_stop_reply): Use the first non-exited
8866 thread if the target didn't pass a thread-id.
8867 * infrun.c (do_target_wait): Move call to
8868 switch_to_inferior_no_thread to ....
8869 (do_target_wait_1): ... here.
8870
8871 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
8872
8873 * debuginfod-support.c: Include defs.h first.
8874
8875 2020-02-28 Tom de Vries <tdevries@suse.de>
8876
8877 * symfile.c (set_initial_language): Use default language for lookup.
8878
8879 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
8880
8881 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
8882 reader variable, pass `this` to read_cutu_die_from_dwo.
8883
8884 2020-02-27 Aaron Merey <amerey@redhat.com>
8885
8886 * source.c (open_source_file): Check for nullptr when computing
8887 srcpath.
8888
8889 2020-02-27 Tom Tromey <tromey@adacore.com>
8890
8891 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
8892 member.
8893 (dwarf2_add_field): Don't update nfields.
8894 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
8895
8896 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
8897
8898 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
8899 abs.
8900
8901 2020-02-26 Tom Tromey <tom@tromey.com>
8902
8903 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
8904 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
8905 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
8906 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
8907 per_cu_data.
8908
8909 2020-02-26 Tom Tromey <tom@tromey.com>
8910
8911 * dwarf2/index-write.c (psym_index_map): Change type.
8912 (add_address_entry_worker, write_one_signatured_type)
8913 (recursively_count_psymbols, recursively_write_psymbols)
8914 (class debug_names, psyms_seen_size, write_gdbindex)
8915 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
8916
8917 2020-02-26 Aaron Merey <amerey@redhat.com>
8918
8919 * Makefile.in: Handle optional debuginfod support.
8920 * NEWS: Update.
8921 * README: Add --with-debuginfod summary.
8922 * config.in: Regenerate.
8923 * configure: Regenerate.
8924 * configure.ac: Handle optional debuginfod support.
8925 * debuginfod-support.c: debuginfod helper functions.
8926 * debuginfod-support.h: Ditto.
8927 * doc/gdb.texinfo: Add --with-debuginfod to configure options
8928 summary.
8929 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
8930 when a dwz file cannot be found.
8931 * elfread.c (elf_symfile_read): Query debuginfod servers when a
8932 debuginfo file cannot be found.
8933 * source.c (open_source_file): Query debuginfod servers when a
8934 source file cannot be found.
8935 * top.c (print_gdb_configuration): Include
8936 --{with,without}-debuginfod in the output.
8937
8938 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8939
8940 * thread.c (thr_try_catch_cmd): Print thread name.
8941
8942 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
8943
8944 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
8945 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8946 dwarf2_fetch_die_type_sect_off): Move to...
8947 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
8948 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8949 dwarf2_fetch_die_type_sect_off): ... here.
8950 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
8951 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
8952 dwarf2_fetch_die_type_sect_off): Move doc to header file.
8953
8954 2020-02-26 Tom de Vries <tdevries@suse.de>
8955
8956 PR gdb/25603
8957 * symfile.c (set_initial_language): Exit-early if
8958 language_mode == language_mode_manual.
8959
8960 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
8961
8962 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
8963 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
8964 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
8965
8966 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
8967
8968 * gdbtypes.c (create_array_type_with_stride): Handle negative
8969 array strides.
8970 * valarith.c (value_subscripted_rvalue): Likewise.
8971
8972 2020-02-25 Luis Machado <luis.machado@linaro.org>
8973
8974 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
8975
8976 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
8977
8978 * loc.h (dwarf2_get_die_type): Move to...
8979 * read.h (dwarf2_get_die_type): ... here.
8980 * read.c (dwarf2_get_die_type): Move doc to header.
8981
8982 2020-02-25 Joel Brobecker <brobecker@adacore.com>
8983
8984 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
8985 'gnulib/Makefile.in' to the list.
8986
8987 2020-02-24 Tom Tromey <tom@tromey.com>
8988
8989 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
8990 Remove.
8991 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
8992 XOBNEWVEC.
8993
8994 2020-02-24 Tom Tromey <tom@tromey.com>
8995
8996 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
8997 New method.
8998 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
8999 (dw2_do_instantiate_symtab, dw2_get_file_names)
9000 (build_type_psymtab_dependencies, load_full_type_unit): Update.
9001
9002 2020-02-24 Tom Tromey <tom@tromey.com>
9003
9004 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
9005 make_scoped_restore.
9006 (dwarf2_psymtab::read_symtab): Don't clear
9007 reading_partial_symbols.
9008
9009 2020-02-24 Tom de Vries <tdevries@suse.de>
9010
9011 PR gdb/25592
9012 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
9013
9014 2020-02-24 Tom de Vries <tdevries@suse.de>
9015
9016 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
9017 commands layout next/prev/regs.
9018
9019 2020-02-22 Tom Tromey <tom@tromey.com>
9020
9021 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
9022 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
9023
9024 2020-02-22 Tom Tromey <tom@tromey.com>
9025
9026 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
9027
9028 2020-02-22 Tom Tromey <tom@tromey.com>
9029
9030 * tui/tui-win.c (_initialize_tui_win): Add usage text.
9031 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
9032 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
9033 * tui/tui.c (_initialize_tui): Add usage text.
9034
9035 2020-02-22 Tom Tromey <tom@tromey.com>
9036
9037 * tui/tui-win.c (tui_set_focus_command)
9038 (tui_set_win_height_command): Use error_no_arg.
9039 (_initialize_tui_win): Update help text.
9040 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
9041
9042 2020-02-22 Tom Tromey <tom@tromey.com>
9043
9044 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
9045 * tui/tui-disasm.h (struct tui_disasm_window)
9046 <display_start_addr>: Declare.
9047 * tui/tui-source.h (struct tui_source_window)
9048 <display_start_addr>: Declare.
9049 * tui/tui-winsource.h (struct tui_source_window_base)
9050 <show_source_line, display_start_addr>: New methods.
9051 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
9052 Rename and move to protected section.
9053 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
9054 (tui_source_window_base::do_erase_source_content): Update.
9055 (tui_source_window_base::show_source_line): Now a method.
9056 (tui_source_window_base::show_source_content)
9057 (tui_source_window_base::tui_source_window_base)
9058 (tui_source_window_base::rerender)
9059 (tui_source_window_base::refill)
9060 (tui_source_window_base::do_scroll_horizontal)
9061 (tui_source_window_base::set_is_exec_point_at)
9062 (tui_source_window_base::update_breakpoint_info)
9063 (tui_source_window_base::update_exec_info): Update.
9064 * tui/tui-source.c (tui_source_window::set_contents)
9065 (tui_source_window::showing_source_p)
9066 (tui_source_window::do_scroll_vertical)
9067 (tui_source_window::location_matches_p)
9068 (tui_source_window::line_is_displayed): Update.
9069 (tui_source_window::display_start_addr): New method.
9070 * tui/tui-disasm.c (tui_disasm_window::set_contents)
9071 (tui_disasm_window::do_scroll_vertical)
9072 (tui_disasm_window::location_matches_p): Update.
9073 (tui_disasm_window::display_start_addr): New method.
9074
9075 2020-02-22 Tom Tromey <tom@tromey.com>
9076
9077 * NEWS: Add entry for gdb.register_window_type.
9078 * tui/tui-layout.h (window_factory): New typedef.
9079 (tui_register_window): Declare.
9080 * tui/tui-layout.c (saved_tui_windows): New global.
9081 (tui_apply_current_layout): Use it.
9082 (tui_register_window): New function.
9083 * python/python.c (do_start_initialization): Call
9084 gdbpy_initialize_tui.
9085 (python_GdbMethods): Add "register_window_type" function.
9086 * python/python-internal.h (gdbpy_register_tui_window)
9087 (gdbpy_initialize_tui): Declare.
9088 * python/py-tui.c: New file.
9089 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
9090
9091 2020-02-22 Tom Tromey <tom@tromey.com>
9092
9093 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
9094
9095 2020-02-22 Tom Tromey <tom@tromey.com>
9096
9097 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
9098 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
9099 * tui/tui-data.c (tui_set_win_with_focus): Remove.
9100 (tui_set_win_focus_to): Move from tui-win.c.
9101
9102 2020-02-22 Tom Tromey <tom@tromey.com>
9103
9104 * tui/tui-layout.c (make_standard_window, get_locator_window): New
9105 functions.
9106 (known_window_types): New global.
9107 (tui_get_window_by_name): Reimplement.
9108 (initialize_known_windows): New function.
9109 (validate_window_name): Rewrite.
9110 (_initialize_tui_layout): Call initialize_known_windows.
9111
9112 2020-02-22 Tom Tromey <tom@tromey.com>
9113
9114 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
9115 Remove constants.
9116 * tui/tui-winsource.h (struct tui_source_window_base)
9117 <tui_source_window_base>: Remove parameter.
9118 * tui/tui-winsource.c
9119 (tui_source_window_base::tui_source_window_base): Remove
9120 parameter.
9121 (tui_source_window_base::refill): Update.
9122 * tui/tui-stack.h (struct tui_locator_window)
9123 <tui_locator_window>: Update.
9124 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
9125 Default the constructor.
9126 * tui/tui-regs.h (struct tui_data_item_window)
9127 <tui_data_item_window>: Default the constructor.
9128 (struct tui_data_window) <tui_data_window>: Likewise.
9129 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
9130 Default the constructor.
9131 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
9132 Default the constructor.
9133 <type>: Remove.
9134 (struct tui_win_info) <tui_win_info>: Default the constructor.
9135 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
9136 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
9137 Default the constructor.
9138
9139 2020-02-22 Tom Tromey <tom@tromey.com>
9140
9141 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
9142 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
9143 * tui/tui-win.c (tui_resize_all): Don't call
9144 tui_delete_invisible_windows.
9145 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
9146 done.
9147 (tui_set_layout): Update.
9148 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
9149 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
9150 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
9151
9152 2020-02-22 Tom Tromey <tom@tromey.com>
9153
9154 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
9155 correctly.
9156
9157 2020-02-22 Tom Tromey <tom@tromey.com>
9158
9159 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
9160
9161 2020-02-22 Tom Tromey <tom@tromey.com>
9162
9163 * tui/tui-winsource.h (struct tui_source_window_iterator)
9164 <inner_iterator>: New etytypedef.
9165 <tui_source_window_iterator>: Take "end" parameter.
9166 <tui_source_window_iterator>: Take iterator.
9167 <operator*, advance>: Update.
9168 <m_iter>: Change type.
9169 <m_end>: New field.
9170 (struct tui_source_windows) <begin, end>: Update.
9171 * tui/tui-layout.c (tui_windows): New global.
9172 (tui_apply_current_layout): Clear tui_windows.
9173 (tui_layout_window::apply): Update tui_windows.
9174 * tui/tui-data.h (tui_windows): Declare.
9175 (all_tui_windows): Now inline function.
9176 (class tui_window_iterator, struct all_tui_windows): Remove.
9177
9178 2020-02-22 Tom Tromey <tom@tromey.com>
9179
9180 PR tui/17850:
9181 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
9182 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
9183 "height" argument.
9184 (class tui_layout_window) <get_sizes>: Likewise.
9185 (class tui_layout_split) <tui_layout_split>: Add "vertical"
9186 argument.
9187 <get_sizes>: Add "height" argument.
9188 <m_vertical>: New field.
9189 * tui/tui-layout.c (tui_layout_split::clone): Update.
9190 (tui_layout_split::get_sizes): Add "height" argument.
9191 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
9192 (tui_new_layout_command): Parse "-horizontal".
9193 (_initialize_tui_layout): Update help string.
9194 (tui_layout_split::specification): Add "-horizontal" when needed.
9195 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
9196 argument.
9197 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
9198 New methods.
9199
9200 2020-02-22 Tom Tromey <tom@tromey.com>
9201
9202 * tui/tui-layout.h (enum tui_adjust_result): New.
9203 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
9204 (class tui_layout_window) <adjust_size>: Return
9205 tui_adjust_result. Rewrite.
9206 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
9207 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
9208
9209 2020-02-22 Tom Tromey <tom@tromey.com>
9210
9211 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
9212 parameter and return types.
9213 (class tui_layout_base) <specification>: Add "depth".
9214 (class tui_layout_window) <specification>: Add "depth".
9215 (class tui_layout_split) <specification>: Add "depth".
9216 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
9217 and return types.
9218 (tui_new_layout_command): Parse sub-layouts.
9219 (_initialize_tui_layout): Update help string.
9220 (tui_layout_window::specification): Add "depth".
9221 (add_layout_command): Update.
9222
9223 2020-02-22 Tom Tromey <tom@tromey.com>
9224
9225 * NEWS: Add "tui new-layout" item.
9226 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
9227 Add new-layout command to help text.
9228 (validate_window_name): New function.
9229 (tui_new_layout_command): New function.
9230 (_initialize_tui_layout): Register "new-layout".
9231 (tui_layout_window::specification): New method.
9232 (tui_layout_window::specification): New method.
9233 * tui/tui-layout.h (class tui_layout_base) <specification>: New
9234 method.
9235 (class tui_layout_window) <specification>: New method.
9236 (class tui_layout_split) <specification>: New method.
9237
9238 2020-02-22 Tom Tromey <tom@tromey.com>
9239
9240 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
9241 * tui/tui-win.c (window_name_completer): Update comment.
9242 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
9243 Declare method.
9244 (class tui_layout_window) <replace_window>: Likewise.
9245 (class tui_layout_split) <replace_window>: Likewise.
9246 (tui_set_layout): Don't declare.
9247 (tui_set_initial_layout): Declare function.
9248 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
9249 (asm_regs_layout): New globals.
9250 (tui_current_layout, show_layout): Remove.
9251 (tui_set_layout, tui_add_win_to_layout): Rewrite.
9252 (find_layout, tui_apply_layout): New function.
9253 (layout_completer): Remove.
9254 (tui_next_layout): Reimplement.
9255 (tui_next_layout_command): New function.
9256 (tui_set_initial_layout, tui_prev_layout_command): New functions.
9257 (tui_regs_layout): Reimplement.
9258 (tui_regs_layout_command): New function.
9259 (extract_display_start_addr): Rewrite.
9260 (next_layout, prev_layout): Remove.
9261 (tui_layout_window::replace_window): New method.
9262 (tui_layout_split::replace_window): New method.
9263 (destroy_layout): New function.
9264 (layout_list): New global.
9265 (add_layout_command): New function.
9266 (initialize_layouts): Update.
9267 (tui_layout_command): New function.
9268 (_initialize_tui_layout): Install "layout" commands.
9269 * tui/tui-data.h (enum tui_layout_type): Remove.
9270 (tui_current_layout): Don't declare.
9271
9272 2020-02-22 Tom Tromey <tom@tromey.com>
9273
9274 * tui/tui-regs.c (tui_reg_layout): Remove.
9275 (tui_reg_command): Use tui_regs_layout.
9276 * tui/tui-layout.h (tui_reg_command): Declare.
9277 * tui/tui-layout.c (tui_reg_command): New function.
9278
9279 2020-02-22 Tom Tromey <tom@tromey.com>
9280
9281 * tui/tui.c (tui_rl_delete_other_windows): Call
9282 tui_remove_some_windows.
9283 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
9284 Declare method.
9285 (class tui_layout_window) <remove_windows>: New method.
9286 (class tui_layout_split) <remove_windows>: Declare.
9287 (tui_remove_some_windows): Declare.
9288 * tui/tui-layout.c (tui_remove_some_windows): New function.
9289 (tui_layout_split::remove_windows): New method.
9290
9291 2020-02-22 Tom Tromey <tom@tromey.com>
9292
9293 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
9294 * tui/tui-layout.h (tui_next_layout): Declare.
9295 * tui/tui-layout.c (tui_next_layout): New function.
9296
9297 2020-02-22 Tom Tromey <tom@tromey.com>
9298
9299 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
9300 correct coordinates.
9301
9302 2020-02-22 Tom Tromey <tom@tromey.com>
9303
9304 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
9305 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
9306 DATA_WIN case.
9307
9308 2020-02-22 Tom Tromey <tom@tromey.com>
9309
9310 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
9311 TUI_DISASM_WIN, not tui_win_list.
9312
9313 2020-02-22 Tom Tromey <tom@tromey.com>
9314
9315 * valprint.c (generic_val_print_enum_1)
9316 (val_print_type_code_flags): Style member names.
9317 * rust-lang.c (val_print_struct, rust_print_enum)
9318 (rust_print_struct_def, rust_internal_print_type): Style member
9319 names.
9320 * p-valprint.c (pascal_object_print_value_fields): Style member
9321 names. Only call fprintf_symbol_filtered for static members.
9322 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
9323 * f-valprint.c (f_val_print): Style member names.
9324 * f-typeprint.c (f_type_print_base): Style member names.
9325 * cp-valprint.c (cp_print_value_fields): Style member names. Only
9326 call fprintf_symbol_filtered for static members.
9327 (cp_print_class_member): Style member names.
9328 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
9329 member names.
9330 * ada-valprint.c (ada_print_scalar): Style enum names.
9331 (ada_val_print_enum): Likewise.
9332 * ada-typeprint.c (print_enum_type): Style enum names.
9333
9334 2020-02-21 Tom Tromey <tom@tromey.com>
9335
9336 * psympriv.h (struct partial_symtab): Update comment.
9337
9338 2020-02-21 Tom Tromey <tromey@adacore.com>
9339
9340 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
9341 type is CORE_ADDR.
9342
9343 2020-02-21 Tom de Vries <tdevries@suse.de>
9344
9345 PR gdb/25534
9346 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
9347 if dependencies[i]->user != NULL.
9348
9349 2020-02-21 Ali Tamur <tamur@google.com>
9350
9351 * dwarf2/read.c (dwarf2_name): Add null check.
9352
9353 2020-02-20 Tom Tromey <tom@tromey.com>
9354
9355 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
9356 ">=", in binary search.
9357 (dwarf2_find_containing_comp_unit): New overload.
9358 (run_test): New self-test.
9359 (_initialize_dwarf2_read): Register new test.
9360
9361 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
9362
9363 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
9364 * riscv-tdep.h: Likewise.
9365 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
9366 rv32-only CSR.
9367 * features/riscv/64bit-csr.xml: Regenerated.
9368
9369 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
9370 Tom Tromey <tom@tromey.com>
9371
9372 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
9373 of 'fputc_unfiltered'.
9374 (putchar_unfiltered): Call 'fputc_unfiltered'.
9375 (fputc_unfiltered): Call 'fputs_unfiltered'.
9376
9377 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
9378
9379 * config.in: Regenerate.
9380 * configure: Regenerate.
9381 * configure.ac: Add --with-python-libdir option.
9382 * main.c: Use WITH_PYTHON_LIBDIR.
9383
9384 2020-02-19 Tom Tromey <tom@tromey.com>
9385
9386 * symtab.c (general_symbol_info::compute_and_set_names): Use
9387 obstack_strndup. Simplify call to symbol_set_demangled_name.
9388
9389 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
9390
9391 * dwarf2/read.c (allocate_signatured_type_table,
9392 allocate_dwo_unit_table, allocate_type_unit_groups_table,
9393 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
9394 Remove objfile parameter, update all callers.
9395
9396 2020-02-19 Doug Evans <dje@google.com>
9397
9398 PR rust/25535
9399 * rust-lang.c (rust_print_enum): Apply embedded_offset to
9400 rust_enum_variant calculation.
9401
9402 2020-02-19 Tom Tromey <tromey@adacore.com>
9403
9404 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
9405
9406 2020-02-19 Tom Tromey <tromey@adacore.com>
9407
9408 * ada-lang.c (cache_symbol): Use obstack_strdup.
9409
9410 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
9411
9412 * configure: Regenerate.
9413
9414 2020-02-19 Tom Tromey <tromey@adacore.com>
9415
9416 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
9417 NULL check.
9418
9419 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
9420
9421 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
9422
9423 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
9424
9425 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
9426 if GDBSERVER is not defined.
9427 (riscv_tdesc_cache): Likewise, also store const target_desc.
9428 (STATIC_IN_GDB): Define.
9429 (riscv_create_target_description): Update declaration with
9430 STATIC_IN_GDB.
9431 (riscv_lookup_target_description): New function, only define if
9432 GDBSERVER is not defined.
9433 * arch/riscv.h (riscv_create_target_description): Declare only
9434 when GDBSERVER is defined.
9435 (riscv_lookup_target_description): New declaration when GDBSERVER
9436 is not defined.
9437 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
9438 (riscv_linux_read_features): ...this, and return
9439 riscv_gdbarch_features instead of target_desc.
9440 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
9441 (riscv_linux_read_description): Rename to...
9442 (riscv_linux_read_features): ...this.
9443 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
9444 Update to use riscv_gdbarch_features and
9445 riscv_lookup_target_description.
9446 * riscv-tdep.c (riscv_find_default_target_description): Use
9447 riscv_lookup_target_description instead of
9448 riscv_create_target_description.
9449
9450 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9451
9452 * valprint.c (generic_val_print_enum_1): When printing a flag
9453 enum with value 0 and there is no enumerator with value 0, print
9454 just "0" instead of "(unknown: 0x0)".
9455
9456 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9457
9458 * valprint.c (generic_val_print_enum_1): Print unknown part of
9459 flag enum in hex.
9460
9461 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9462
9463 * dwarf2/read.c (update_enumeration_type_from_children): Allow
9464 flag enums to contain duplicate enumerators.
9465 * valprint.c (generic_val_print_enum_1): Update comment.
9466
9467 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9468
9469 * dwarf2/read.c: Include "count-one-bits.h".
9470 (update_enumeration_type_from_children): If an enumerator has
9471 multiple bits set, don't treat the enumeration as a "flag enum".
9472 * valprint.c (generic_val_print_enum_1): Assert that enumerators
9473 of flag enums have 0 or 1 bit set.
9474
9475 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
9476
9477 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
9478 conversion.
9479 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
9480 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
9481 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
9482 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
9483 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
9484
9485 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
9486
9487 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
9488
9489 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
9490
9491 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
9492 displaced_step_closure_up.
9493 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
9494 (struct displaced_step_closure_up):
9495 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
9496 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
9497 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
9498 Likewise.
9499 * gdbarch.sh (displaced_step_copy_insn): Likewise.
9500 * gdbarch.c, gdbarch.h: Re-generate.
9501 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
9502 displaced_step_closure_up.
9503 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
9504 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
9505 * infrun.h (displaced_step_closure_up): New type alias.
9506 (struct displaced_step_inferior_state) <step_closure>: Change
9507 type to displaced_step_closure_up.
9508 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
9509 displaced_step_closure_up.
9510 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
9511
9512 2020-02-14 Tom Tromey <tom@tromey.com>
9513
9514 * minidebug.c (gnu_debug_key): New global.
9515 (find_separate_debug_file_in_section): Use it.
9516
9517 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
9518
9519 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
9520 std::unique_ptr.
9521 * gdbarch.c: Re-generate.
9522 * gdbarch.h: Re-generate.
9523 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
9524 change.
9525 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
9526 type to std::unique_ptr.
9527 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
9528 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
9529 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
9530 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
9531 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
9532 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
9533 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
9534 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
9535 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
9536
9537 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
9538
9539 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
9540 std::unique_ptr.
9541 (displaced_step_clear): Rename to...
9542 (displaced_step_reset): ... this. Just call displaced->reset ().
9543 (displaced_step_clear_cleanup): Rename to...
9544 (displaced_step_reset_cleanup): ... this.
9545 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
9546 (displaced_step_fixup): Likewise.
9547 (resume_1): Likewise.
9548 (handle_inferior_event): Restore child's memory before calling
9549 displaced_step_fixup on the parent.
9550 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
9551 to std::unique_ptr.
9552 <step_closure>: Change type to std::unique_ptr.
9553
9554 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
9555
9556 * arm-tdep.c: Include count-one-bits.h.
9557 (cleanup_block_store_pc): Use count_one_bits.
9558 (cleanup_block_load_pc): Use count_one_bits.
9559 (arm_copy_block_xfer): Use count_one_bits.
9560 (thumb2_copy_block_xfer): Use count_one_bits.
9561 (thumb_copy_pop_pc_16bit): Use count_one_bits.
9562 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
9563 (thumb_get_next_pcs_raw): Use count_one_bits.
9564 (arm_get_next_pcs_raw): Use count_one_bits_l.
9565 * arch/arm.c (bitcount): Remove.
9566 * arch/arm.h (bitcount): Remove.
9567
9568 2020-02-14 Tom Tromey <tromey@adacore.com>
9569
9570 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
9571 Update.
9572 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
9573 * dwarf2/loc.c (call_site_find_chain_1): Return
9574 unique_xmalloc_ptr.
9575 (call_site_find_chain): Likewise.
9576
9577 2020-02-14 Richard Biener <rguenther@suse.de>
9578
9579 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
9580 on expression with division operators.
9581
9582 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
9583
9584 * MAINTAINERS (Write After Approval): Adding myself.
9585
9586 2020-02-12 Tom Tromey <tom@tromey.com>
9587
9588 * event-loop.c (event_data, gdb_event, event_handler_func):
9589 Remove.
9590
9591 2020-02-12 Tom Tromey <tom@tromey.com>
9592
9593 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
9594 (dwarf2_frame_objfile_data): Add comment.
9595 (find_comp_unit, set_comp_unit): New functions.
9596 (dwarf2_frame_find_fde): Use find_comp_unit.
9597 (dwarf2_build_frame_info): Use set_comp_unit.
9598
9599 2020-02-12 Tom Tromey <tom@tromey.com>
9600
9601 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
9602 (comp_unit): Don't initialize objfile.
9603 (execute_cfa_program): Add text_offset parameter.
9604 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
9605 (dwarf2_frame_cache): Update.
9606 (dwarf2_build_frame_info): Don't set "objfile" member.
9607
9608 2020-02-12 Tom Tromey <tom@tromey.com>
9609
9610 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
9611 (decode_frame_entry): Likewise.
9612 (dwarf2_build_frame_info): Update.
9613
9614 2020-02-12 Tom Tromey <tom@tromey.com>
9615
9616 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
9617 (decode_frame_entry_1): Use the comp_unit obstack.
9618
9619 2020-02-12 Tom Tromey <tom@tromey.com>
9620
9621 * dwarf2/frame.c (struct comp_unit): Add initializers and
9622 constructor.
9623 (dwarf2_frame_objfile_data): Store a comp_unit.
9624 (dwarf2_frame_find_fde): Update.
9625 (dwarf2_build_frame_info): Use "new".
9626
9627 2020-02-12 Tom Tromey <tom@tromey.com>
9628
9629 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
9630 (dwarf2_fde_table): Typedef for std::vector.
9631 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
9632 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
9633 (decode_frame_entry): Update.
9634 (dwarf2_build_frame_info): Use "new".
9635
9636 2020-02-12 Christian Biesinger <cbiesinger@google.com>
9637
9638 * arm-tdep.c (arm_gdbarch_init): Update.
9639 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
9640 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
9641 have_neon, is_m>: Change to bool.
9642
9643 2020-02-12 Christian Biesinger <cbiesinger@google.com>
9644
9645 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
9646
9647 2020-02-12 Tom Tromey <tom@tromey.com>
9648
9649 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
9650
9651 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
9652
9653 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
9654 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
9655
9656 2020-02-11 Tom Tromey <tom@tromey.com>
9657
9658 * psymtab.h: Update comment.
9659
9660 2020-02-11 Tom Tromey <tom@tromey.com>
9661
9662 * gdb_obstack.h (struct auto_obstack): Use
9663 DISABLE_COPY_AND_ASSIGN.
9664
9665 2020-02-11 Tom Tromey <tom@tromey.com>
9666
9667 * dwarf2/frame.h (struct objfile): Don't forward declare.
9668
9669 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9670
9671 * cris-tdep.c (cris_supply_gregset): Change signature to match
9672 what struct regset expects.
9673 (cris_regset): New struct.
9674 (fetch_core_registers): Remove.
9675 (cris_iterate_over_regset_sections): New function.
9676 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
9677 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
9678
9679 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9680
9681 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
9682 registers.
9683
9684 2020-02-11 Christian Biesinger <cbiesinger@google.com>
9685
9686 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
9687
9688 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9689
9690 * configure: Re-generate.
9691
9692 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9693
9694 * configure: Re-generate.
9695
9696 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
9697
9698 * acinclude: Update warning.m4 path.
9699 * warning.m4: Move to gdbsupport.
9700
9701 2020-02-11 Tom Tromey <tromey@adacore.com>
9702
9703 * remote.c (remote_console_output): Update.
9704 * printcmd.c (printf_command): Update.
9705 * event-loop.c (gdb_wait_for_event): Update.
9706 * linux-nat.c (sigchld_handler): Update.
9707 * remote-sim.c (gdb_os_write_stdout): Update.
9708 (gdb_os_flush_stdout): Update.
9709 (gdb_os_flush_stderr): Update.
9710 (gdb_os_write_stderr): Update.
9711 * exceptions.c (print_exception): Update.
9712 * remote-fileio.c (remote_fileio_func_read): Update.
9713 (remote_fileio_func_write): Update.
9714 * tui/tui.c (tui_enable): Update.
9715 * tui/tui-interp.c (tui_interp::init): Update.
9716 * utils.c (init_page_info): Update.
9717 (putchar_unfiltered, fputc_unfiltered): Update.
9718 (gdb_flush): Update.
9719 (emit_style_escape): Update.
9720 (flush_wrap_buffer, fputs_maybe_filtered): Update.
9721 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
9722 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
9723 (stderr_file::write): Update.
9724 (stderr_file::puts): Update.
9725 * ui-file.h (ui_file_isatty, ui_file_write)
9726 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
9727 (ui_file_puts): Don't declare.
9728
9729 2020-02-10 Tom de Vries <tdevries@suse.de>
9730
9731 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
9732 sentinel to char *.
9733
9734 2020-02-09 Tom de Vries <tdevries@suse.de>
9735
9736 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
9737 filename if it matches "<artificial>".
9738
9739 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
9740
9741 * windows-tdep.c (struct enum_value_name): New struct.
9742 (create_enum): New function.
9743 (windows_get_siginfo_type): Create and use enum types.
9744
9745 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
9746
9747 * NEWS: Mention $_siginfo support for Windows.
9748 * windows-nat.c (handle_exception): Set siginfo_er.
9749 (windows_nat_target::mourn_inferior): Reset siginfo_er.
9750 (windows_xfer_siginfo): New function.
9751 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
9752 * windows-tdep.c (struct windows_gdbarch_data): New struct.
9753 (init_windows_gdbarch_data): New function.
9754 (get_windows_gdbarch_data): New function.
9755 (windows_get_siginfo_type): New function.
9756 (windows_init_abi): Register windows_get_siginfo_type.
9757 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
9758
9759 2020-02-08 Tom Tromey <tom@tromey.com>
9760
9761 * dwarf2/read.c (class cutu_reader) <cutu_reader,
9762 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
9763 <keep>: Declare method.
9764 <m_keep>: Remove member.
9765 <~cutu_reader>: Remove.
9766 (cutu_reader::init_tu_and_read_dwo_dies): Update.
9767 (cutu_reader::cutu_reader): Update.
9768 (cutu_reader::keep): Rename from ~cutu_reader.
9769 (process_psymtab_comp_unit, build_type_psymtabs_1)
9770 (process_skeletonless_type_unit, load_partial_comp_unit)
9771 (load_full_comp_unit, dwarf2_read_addr_index)
9772 (read_signatured_type): Update.
9773
9774 2020-02-08 Tom Tromey <tom@tromey.com>
9775
9776 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
9777 "want_partial_unit" parameter.
9778 (process_psymtab_comp_unit): Change want_partial_unit to bool.
9779 Inline check for DW_TAG_partial_unit.
9780 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
9781
9782 2020-02-08 Tom Tromey <tom@tromey.com>
9783
9784 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
9785 read.c.
9786 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
9787 read.c.
9788
9789 2020-02-08 Tom Tromey <tom@tromey.com>
9790
9791 * dwarf2/read.c (read_address): Move to comp-unit.c.
9792 (dwarf2_rnglists_process, dwarf2_ranges_process)
9793 (read_attribute_value, dwarf_decode_lines_1)
9794 (var_decode_location, decode_locdesc): Update.
9795 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
9796 read.c. Remove "cu" parameter.
9797 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
9798 method.
9799
9800 2020-02-08 Tom Tromey <tom@tromey.com>
9801
9802 * dwarf2/read.c (read_attribute_value, read_indirect_string)
9803 (read_indirect_line_string): Update.
9804 * dwarf2/comp-unit.c (read_offset): Remove.
9805 (read_comp_unit_head): Update.
9806 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
9807 method.
9808 (read_offset): Don't declare.
9809
9810 2020-02-08 Tom Tromey <tom@tromey.com>
9811
9812 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
9813 * dwarf2/read.c (struct comp_unit_head): Move to
9814 dwarf2/comp-unit.h.
9815 (enum class rcuh_kind): Move to comp-unit.h.
9816 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
9817 (read_comp_unit_head, error_check_comp_unit_head)
9818 (read_and_check_comp_unit_head): Move to comp-unit.c.
9819 (read_offset, dwarf_unit_type_name): Likewise.
9820 (create_debug_type_hash_table, read_cutu_die_from_dwo)
9821 (cutu_reader::cutu_reader, read_call_site_scope)
9822 (find_partial_die, follow_die_offset): Update.
9823 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
9824
9825 2020-02-08 Tom Tromey <tom@tromey.com>
9826
9827 * dwarf2/read.c (read_offset_1): Move to leb.c.
9828 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
9829 (dwarf_decode_macro_bytes): Update.
9830 * dwarf2/leb.c (read_offset): Rename; move from read.c.
9831 * dwarf2/leb.h (read_offset): Declare.
9832
9833 2020-02-08 Tom Tromey <tom@tromey.com>
9834
9835 * dwarf2/read.c (dwarf2_section_size): Remove.
9836 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
9837 Update.
9838 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
9839
9840 2020-02-08 Tom Tromey <tom@tromey.com>
9841
9842 * dwarf2/read.c (read_initial_length): Move to leb.c.
9843 * dwarf2/leb.h (read_initial_length): Declare.
9844 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
9845 handle_nonstd parameter.
9846 * dwarf2/frame.c (read_initial_length): Remove.
9847 (decode_frame_entry_1): Update.
9848
9849 2020-02-08 Tom Tromey <tom@tromey.com>
9850
9851 * dwarf2/loc.c (dwarf2_find_location_expression)
9852 (dwarf_evaluate_loc_desc::get_tls_address)
9853 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9854 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
9855 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
9856 (dwarf2_compile_property_to_c)
9857 (dwarf2_loc_desc_get_symbol_read_needs)
9858 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
9859 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
9860 (loclist_describe_location, loclist_tracepoint_var_ref)
9861 (loclist_generate_c_location): Update.
9862 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
9863 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
9864 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
9865 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
9866 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
9867 (dwarf2_per_cu_data::addr_size)
9868 (dwarf2_per_cu_data::ref_addr_size)
9869 (dwarf2_per_cu_data::text_offset)
9870 (dwarf2_per_cu_data::addr_type): Now methods.
9871 (per_cu_header_read_in): Make per_cu "const".
9872 (dwarf2_version): Remove.
9873 (dwarf2_per_cu_data::int_type): Now a method.
9874 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
9875 (set_die_type, read_array_type, read_subrange_index_type)
9876 (read_tag_string_type, read_subrange_type): Update.
9877 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
9878 offset_size, ref_addr_size, text_offset, addr_type, version,
9879 objfile, int_type, addr_sized_int_type>: Declare methods.
9880
9881 2020-02-08 Tom Tromey <tom@tromey.com>
9882
9883 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
9884 Move earlier.
9885
9886 2020-02-08 Tom Tromey <tom@tromey.com>
9887
9888 * dwarf2/read.h (dwarf_line_debug): Declare.
9889 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
9890 * dwarf2/read.c: Move line_header code to new files.
9891 (dwarf_line_debug): No longer static.
9892 * dwarf2/line-header.c: New file.
9893 * dwarf2/line-header.h: New file.
9894
9895 2020-02-08 Tom Tromey <tom@tromey.com>
9896
9897 * dwarf2/read.c (struct line_header) <file_full_name,
9898 file_file_name>: Return unique_xmalloc_ptr.
9899 (line_header::file_file_name): Update.
9900 (line_header::file_full_name): Update.
9901 (dw2_get_file_names_reader): Update.
9902 (macro_start_file): Update.
9903
9904 2020-02-08 Tom Tromey <tom@tromey.com>
9905
9906 * dwarf2/read.c (struct line_header) <file_full_name,
9907 file_file_name>: Declare methods.
9908 (dw2_get_file_names_reader): Update.
9909 (file_file_name): Now a method.
9910 (file_full_name): Likewise.
9911 (macro_start_file): Update.
9912
9913 2020-02-08 Tom Tromey <tom@tromey.com>
9914
9915 * dwarf2/read.c (dwarf_always_disassemble)
9916 (show_dwarf_always_disassemble): Move to loc.c.
9917 (_initialize_dwarf2_read): Move "always-disassemble" registration
9918 to loc.c.
9919 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
9920 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
9921 static.
9922 (show_dwarf_always_disassemble): Move from read.c.
9923 (_initialize_dwarf2loc): Move always-disassemble from read.c.
9924
9925 2020-02-08 Tom Tromey <tom@tromey.com>
9926
9927 * dwarf2/read.c (~dwarf2_per_objfile): Update.
9928 (create_quick_file_names_table): Return htab_up.
9929 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
9930 Update.
9931 * dwarf2/read.h (struct dwarf2_per_objfile)
9932 <quick_file_names_table>: Now htab_up.
9933
9934 2020-02-08 Tom Tromey <tom@tromey.com>
9935
9936 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
9937
9938 2020-02-08 Tom Tromey <tom@tromey.com>
9939
9940 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
9941 Rewrite.
9942 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
9943 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
9944 (abbrev_table::abbrev_table): No longer inline.
9945 (ABBREV_HASH_SIZE): Remove.
9946 (abbrev_table::m_abbrevs): Now an htab_up.
9947
9948 2020-02-08 Tom Tromey <tom@tromey.com>
9949
9950 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
9951 (cutu_reader): Update.
9952 (build_type_psymtabs_1): Update.
9953 * dwarf2/abbrev.c (abbrev_table::read): Rename.
9954 (abbrev_table::alloc_abbrev): Update.
9955 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
9956 (abbrev_table::read): New static method, renamed from
9957 abbrev_table_read_table.
9958 (abbrev_table::alloc_abbrev)
9959 (abbrev_table::add_abbrev): Now private.
9960 (abbrev_table::abbrev_table): Now private.
9961 (abbrev_table::m_abbrev_obstack): Now private. Rename.
9962
9963 2020-02-08 Tom Tromey <tom@tromey.com>
9964
9965 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
9966 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
9967 htab_up.
9968
9969 2020-02-08 Tom Tromey <tom@tromey.com>
9970
9971 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
9972 htab_up.
9973 (lookup_dwo_unit_in_dwp): Update.
9974 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
9975 on obstack.
9976
9977 2020-02-08 Tom Tromey <tom@tromey.com>
9978
9979 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
9980 obstack.
9981
9982 2020-02-08 Tom Tromey <tom@tromey.com>
9983
9984 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
9985 line_header_hash.
9986 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
9987 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
9988 Change type to htab_up.
9989
9990 2020-02-08 Tom Tromey <tom@tromey.com>
9991
9992 * dwarf2/read.c (allocate_type_unit_groups_table): Return
9993 htab_up. Don't allocate on obstack.
9994 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
9995 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
9996 Change type to htab_up.
9997
9998 2020-02-08 Tom Tromey <tom@tromey.com>
9999
10000 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
10001 Change type to htab_up.
10002 * dwarf2/read.c (create_signatured_type_table_from_index)
10003 (create_signatured_type_table_from_debug_names)
10004 (create_all_type_units, add_type_unit)
10005 (lookup_dwo_signatured_type, lookup_signatured_type)
10006 (process_skeletonless_type_unit): Update.
10007 (create_debug_type_hash_table, create_debug_types_hash_table):
10008 Change type of types_htab.
10009 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
10010 htab_up. Don't allocate on obstack.
10011 (create_cus_hash_table): Change type of cus_htab parameter.
10012 (struct dwo_file) <cus, tus>: Now htab_up.
10013 (lookup_dwo_signatured_type, lookup_dwo_cutu)
10014 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
10015 (queue_and_load_all_dwo_tus): Update.
10016 * dwarf2/index-write.c (write_gdbindex): Update.
10017 (write_debug_names): Update.
10018
10019 2020-02-08 Tom Tromey <tom@tromey.com>
10020
10021 * dwarf2/read.h (struct dwarf2_queue_item): Move from
10022 dwarf2/read.c. Remove "next" member. Add constructor ntad
10023 destructor.
10024 (struct dwarf2_per_objfile) <queue>: New member.
10025 * dwarf2/read.c (struct dwarf2_queue_item): Move to
10026 dwarf2/read.h.
10027 (dwarf2_queue, dwarf2_queue_tail): Remove.
10028 (class dwarf2_queue_guard): Add parameter to constructor. Use
10029 DISABLE_COPY_AND_ASSIGN.
10030 <m_per_objfile>: New member.
10031 <~dwarf2_queue_guard>: Rewrite.
10032 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
10033 Update.
10034 (~dwarf2_queue_item): New.
10035
10036 2020-02-08 Tom Tromey <tom@tromey.com>
10037
10038 * dwarf2/read.c (struct die_info) <has_children>: New member.
10039 (dw2_get_file_names_reader): Remove has_children.
10040 (dw2_get_file_names): Update.
10041 (read_cutu_die_from_dwo): Remove has_children.
10042 (cutu_reader::init_tu_and_read_dwo_dies)
10043 (cutu_reader::cutu_reader): Update.
10044 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
10045 Remove has_children.
10046 (build_type_psymtabs_1, process_skeletonless_type_unit)
10047 (load_partial_comp_unit, load_full_comp_unit): Update.
10048 (create_dwo_cu_reader): Remove has_children.
10049 (create_cus_hash_table, read_die_and_children): Update.
10050 (read_full_die_1,read_full_die): Remove has_children.
10051 (read_signatured_type): Update.
10052 (class cutu_reader) <has_children>: Remove.
10053
10054 2020-02-08 Tom Tromey <tom@tromey.com>
10055
10056 * dwarf2/expr.c: Rename from dwarf2expr.c.
10057 * dwarf2/expr.h: Rename from dwarf2expr.h.
10058 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
10059 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
10060 * dwarf2/frame.c: Rename from dwarf2-frame.c.
10061 * dwarf2/frame.h: Rename from dwarf2-frame.h.
10062 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
10063 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
10064 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
10065 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
10066 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
10067 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
10068 * dwarf2/loc.c: Rename from dwarf2loc.c.
10069 * dwarf2/loc.h: Rename from dwarf2loc.h.
10070 * dwarf2/read.c: Rename from dwarf2read.c.
10071 * dwarf2/read.h: Rename from dwarf2read.h.
10072 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
10073 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
10074 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
10075 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
10076 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
10077 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
10078 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
10079 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
10080 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
10081 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
10082 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
10083 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
10084 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
10085 Update.
10086 * Makefile.in (COMMON_SFILES): Update.
10087 (HFILES_NO_SRCDIR): Update.
10088
10089 2020-02-08 Tom Tromey <tom@tromey.com>
10090
10091 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
10092 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
10093
10094 2020-02-08 Tom Tromey <tom@tromey.com>
10095
10096 * dwarf2read.h (struct die_info): Don't declare.
10097
10098 2020-02-08 Tom Tromey <tom@tromey.com>
10099
10100 * dwarf2read.h (die_info_ptr): Remove typedef.
10101
10102 2020-02-08 Tom Tromey <tom@tromey.com>
10103
10104 * dwarf2read.c (read_call_site_scope)
10105 (handle_data_member_location, dwarf2_add_member_fn)
10106 (mark_common_block_symbol_computed, read_common_block)
10107 (attr_to_dynamic_prop, partial_die_info::read)
10108 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
10109 (dwarf2_symbol_mark_computed, set_die_type): Update.
10110 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
10111 method.
10112 (attr_form_is_block): Don't declare.
10113 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
10114
10115 2020-02-08 Tom Tromey <tom@tromey.com>
10116
10117 * dwarf2read.c (dwarf2_find_base_address, )
10118 (read_call_site_scope, rust_containing_type)
10119 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
10120 (handle_data_member_location, dwarf2_add_member_fn)
10121 (get_alignment, read_structure_type, process_structure_scope)
10122 (mark_common_block_symbol_computed, read_common_block)
10123 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
10124 (partial_die_info::read, read_attribute_value, new_symbol)
10125 (lookup_die_type, dwarf2_get_ref_die_offset)
10126 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
10127 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
10128 (dwarf2_symbol_mark_computed): Update.
10129 * dwarf2/attribute.h (struct attribute) <value_as_address,
10130 form_is_section_offset, form_is_constant, form_is_ref>: Declare
10131 methods.
10132 (value_as_address, attr_form_is_section_offset)
10133 (attr_form_is_constant, attr_form_is_ref): Don't declare.
10134 * dwarf2/attribute.c (attribute::value_as_address)
10135 (attribute::form_is_section_offset, attribute::form_is_constant)
10136 (attribute::form_is_ref): Now methods.
10137
10138 2020-02-08 Tom Tromey <tom@tromey.com>
10139
10140 * dwarf2read.c (struct attribute, DW_STRING)
10141 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
10142 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
10143 (attr_form_is_block, attr_form_is_section_offset)
10144 (attr_form_is_constant, attr_form_is_ref): Move.
10145 * dwarf2/attribute.h: New file.
10146 * dwarf2/attribute.c: New file, from dwarf2read.c.
10147 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
10148
10149 2020-02-08 Tom Tromey <tom@tromey.com>
10150
10151 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
10152 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
10153 Move.
10154 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
10155 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
10156 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
10157 abbrev.c.
10158 * dwarf2/abbrev.h: New file.
10159 * dwarf2/abbrev.c: New file, from dwarf2read.c.
10160 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
10161
10162 2020-02-08 Tom Tromey <tom@tromey.com>
10163
10164 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
10165 (dwarf2_section_size, dwarf2_get_section_info)
10166 (create_signatured_type_table_from_debug_names)
10167 (create_addrmap_from_aranges, read_debug_names_from_section)
10168 (get_gdb_index_contents_from_section, read_comp_unit_head)
10169 (error_check_comp_unit_head, read_abbrev_offset)
10170 (create_debug_type_hash_table, init_cu_die_reader)
10171 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
10172 (read_comp_units_from_section, create_cus_hash_table)
10173 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
10174 (create_dwp_v2_section, dwarf2_rnglists_process)
10175 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
10176 (abbrev_table_read_table, read_indirect_string_at_offset_from)
10177 (read_indirect_string_from_dwz, read_addr_index_1)
10178 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
10179 (dwarf_decode_macro_bytes, dwarf_decode_macros)
10180 (fill_in_loclist_baton): Update.
10181 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
10182 get_containing_section, get_bfd_owner, get_bfd_section,
10183 get_file_name, get_id, get_flags, empty, read>: Declare methods.
10184 (dwarf2_read_section, get_section_name, get_section_file_name)
10185 (get_containing_section, get_section_bfd_owner)
10186 (get_section_bfd_section, get_section_name, get_section_file_name)
10187 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
10188 declare.
10189 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
10190 (dwarf2_section_info::get_bfd_owner)
10191 (dwarf2_section_info::get_bfd_section)
10192 (dwarf2_section_info::get_name)
10193 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
10194 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
10195 (dwarf2_section_info::read): Now methods.
10196 * dwarf-index-write.c (class debug_names): Update.
10197
10198 2020-02-08 Tom Tromey <tom@tromey.com>
10199
10200 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
10201 Move to dwarf2/section.h.
10202 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
10203 (get_section_bfd_section, get_section_name)
10204 (get_section_file_name, get_section_id, get_section_flags)
10205 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
10206 dwarf2/section.c.
10207 * dwarf2/section.h: New file.
10208 * dwarf2/section.c: New file, from dwarf2read.c.
10209 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
10210
10211 2020-02-08 Tom Tromey <tom@tromey.com>
10212
10213 * dwarf2read.h (read_unsigned_leb128): Don't declare.
10214 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
10215 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
10216 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
10217 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
10218 * dwarf2/leb.h: New file, from dwarf2read.c.
10219 * dwarf2/leb.c: New file, from dwarf2read.c.
10220 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
10221 Remove.
10222 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
10223 (COMMON_SFILES): Add dwarf2/leb.c.
10224
10225 2020-02-08 Joel Brobecker <brobecker@adacore.com>
10226
10227 GDB 9.1 released.
10228
10229 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
10230
10231 PR gdb/25190:
10232 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
10233 * gdb/remote.c (remote_console_output): Update.
10234 * gdb/ui-file.c (fputs_unfiltered): Rename to...
10235 (ui_file_puts): ...this.
10236 * gdb/ui-file.h (ui_file_puts): Add declaration.
10237 * gdb/utils.c (emit_style_escape): Update.
10238 (flush_wrap_buffer): Update.
10239 (fputs_maybe_filtered): Update.
10240 (fputs_unfiltered): Add function.
10241
10242 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
10243
10244 * gdb/event-loop.c (gdb_wait_for_event): Update.
10245 * gdb/printcmd.c (printf_command): Update.
10246 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
10247 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
10248 (gdb_os_flush_stderr): Update.
10249 * gdb/remote.c (remote_console_output): Update.
10250 * gdb/ui-file.c (gdb_flush): Rename to...
10251 (ui_file_flush): ...this.
10252 (stderr_file::write): Update.
10253 (stderr_file::puts): Update.
10254 * gdb/ui-file.h (gdb_flush): Rename to...
10255 (ui_file_flush): ...this.
10256 * gdb/utils.c (gdb_flush): Add function.
10257 * gdb/utils.h (gdb_flush): Add declaration.
10258
10259 2020-02-07 Tom Tromey <tromey@adacore.com>
10260
10261 PR breakpoints/24915:
10262 * source.c (find_and_open_source): Do not check basenames_may_differ.
10263
10264 2020-02-07 Tom Tromey <tom@tromey.com>
10265
10266 * README: Update gdbserver documentation.
10267 * gdbserver: Move to top level.
10268 * configure.tgt (build_gdbserver): Remove.
10269 * configure.ac: Remove --enable-gdbserver.
10270 * configure: Rebuild.
10271 * Makefile.in (distclean): Don't mention gdbserver.
10272
10273 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
10274
10275 * source-cache.c (source_cache::ensure): Surround
10276 get_plain_source_lines with a try/catch.
10277 (source_cache::get_line_charpos): Get rid of try/catch
10278 and only check for the return value of "ensure".
10279 * tui/tui-source.c (tui_source_window::set_contents):
10280 Simplify "nlines" calculation.
10281
10282 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
10283
10284 * MAINTAINERS (Write After Approval): Add myself.
10285
10286 2020-02-05 Christian Biesinger <cbiesinger@google.com>
10287
10288 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
10289 function call.
10290
10291 2020-02-05 Christian Biesinger <cbiesinger@google.com>
10292
10293 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
10294
10295 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
10296
10297 * nat/riscv-linux-tdesc.h: New file.
10298 * nat/riscv-linux-tdesc.c: New file, taking code from...
10299 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
10300 ... here.
10301 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
10302 NATDEPFILES.
10303
10304 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
10305
10306 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
10307 we don't set the fake simulator ptid to the null_ptid.
10308
10309 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
10310
10311 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
10312 * gdbthread.h (class thread_info) <resumed>: Likewise.
10313 * infrun.c (resume_1): Likewise.
10314 (proceed): Likewise.
10315 (infrun_thread_stop_requested): Likewise.
10316 (stop_all_threads): Likewise.
10317 (handle_inferior_event): Likewise.
10318 (restart_threads): Likewise.
10319 (finish_step_over): Likewise.
10320 (keep_going_stepped_thread): Likewise.
10321 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
10322 (linux_handle_extended_wait): Likewise.
10323 * record-btrace.c (get_thread_current_frame_id): Likewise.
10324 * record-full.c (record_full_wait_1): Likewise.
10325 * remote.c (remote_target::process_initial_stop_replies): Likewise.
10326 * target.c (target_resume): Likewise.
10327 * thread.c (set_running_thread): Likewise.
10328
10329 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
10330
10331 * f-valprint.c (f77_print_array_1): Changed datatype of index
10332 variable to LONGEST from int to enable it to contain bound
10333 values correctly.
10334
10335 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
10336
10337 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
10338 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
10339 offsets according to FLEN determined.
10340 (riscv_linux_nat_target::read_description): Determine FLEN
10341 dynamically.
10342 (riscv_linux_nat_target::fetch_registers): Size regset buffer
10343 according to FLEN determined.
10344 (riscv_linux_nat_target::store_registers): Likewise.
10345
10346 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
10347
10348 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
10349 when reg->group is empty and reggroup is not.
10350
10351 2020-01-31 Tom Tromey <tromey@adacore.com>
10352
10353 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
10354 Call beneath target's mourn_inferior after unpushing.
10355
10356 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
10357
10358 PR tui/9765
10359 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
10360 have enough lines to fill the screen, still return the lowest
10361 address we found.
10362
10363 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
10364
10365 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
10366 '-', '<', and '>' commands.
10367
10368 2020-01-29 Pedro Alves <palves@redhat.com>
10369 Sergio Durigan Junior <sergiodj@redhat.com>
10370
10371 * infcmd.c (construct_inferior_arguments): Assert that
10372 'argc' is greater than 0.
10373
10374 2020-01-29 Luis Machado <luis.machado@linaro.org>
10375
10376 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
10377 (BRK_INSN_MASK): Define to 0xd4200000.
10378 (aarch64_program_breakpoint_here_p): New function.
10379 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
10380 * arch-utils.c (default_program_breakpoint_here_p): Moved from
10381 breakpoint.c.
10382 * arch-utils.h (default_program_breakpoint_here_p): Moved from
10383 breakpoint.h
10384 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
10385 call gdbarch_program_breakpoint_here_p.
10386 (program_breakpoint_here): Moved to arch-utils.c, renamed to
10387 default_program_breakpoint_here_p, changed return type to bool and
10388 simplified.
10389 * breakpoint.h (program_breakpoint_here): Moved prototype to
10390 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
10391 return type to bool.
10392 * gdbarch.c: Regenerate.
10393 * gdbarch.h: Regenerate.
10394 * gdbarch.sh (program_breakpoint_here_p): New method.
10395 * infrun.c (handle_signal_stop): Call
10396 gdbarch_program_breakpoint_here_p.
10397
10398 2020-01-26 Tom Tromey <tom@tromey.com>
10399
10400 * ctfread.c (struct ctf_fp_info): Reindent.
10401 (_initialize_ctfread): Remove.
10402
10403 2020-01-26 Tom Tromey <tom@tromey.com>
10404
10405 * psymtab.c (partial_map_expand_apply)
10406 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
10407 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
10408 (psym_print_stats, psym_expand_symtabs_for_function)
10409 (psym_map_symbol_filenames, psym_map_matching_symbols)
10410 (psym_expand_symtabs_matching)
10411 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
10412 (maintenance_check_psymtabs): Use new methods.
10413 * psympriv.h (struct partial_symtab) <readin_p,
10414 get_compunit_symtab>: New methods.
10415 <readin, compunit_symtab>: Remove members.
10416 (struct standard_psymtab): New.
10417 (struct legacy_psymtab): Derive from standard_psymtab.
10418 * dwarf2read.h (struct dwarf2_psymtab): Derive from
10419 standard_psymtab.
10420 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
10421
10422 2020-01-26 Tom Tromey <tom@tromey.com>
10423
10424 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
10425 read_dependencies. Add assert.
10426 * psymtab.c (partial_symtab::read_dependencies): New method.
10427 * psympriv.h (struct partial_symtab) <read_dependencies>: New
10428 method.
10429 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
10430 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
10431 read_dependencies.
10432 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
10433 Add assert.
10434
10435 2020-01-26 Tom Tromey <tom@tromey.com>
10436
10437 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
10438 Call expand_psymtab.
10439 (xcoff_read_symtab): Call expand_psymtab.
10440 (xcoff_start_psymtab, xcoff_end_psymtab): Set
10441 legacy_expand_psymtab.
10442 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
10443 method.
10444 (struct legacy_psymtab) <expand_psymtab>: Implement.
10445 <legacy_expand_psymtab>: New member.
10446 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
10447 (parse_partial_symbols): Set legacy_expand_psymtab.
10448 (psymtab_to_symtab_1): Change argument order. Call
10449 expand_psymtab.
10450 (new_psymtab): Set legacy_expand_psymtab.
10451 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
10452 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
10453 expand_psymtab.
10454 (dwarf2_psymtab::expand_psymtab): Rename from
10455 psymtab_to_symtab_1. Call expand_psymtab.
10456 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
10457 (dbx_end_psymtab): Likewise.
10458 (dbx_psymtab_to_symtab_1): Change argument order. Call
10459 expand_psymtab.
10460 (dbx_read_symtab): Call expand_psymtab.
10461 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
10462 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
10463 (ctf_psymtab::read_symtab): Call expand_psymtab.
10464
10465 2020-01-26 Tom Tromey <tom@tromey.com>
10466
10467 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
10468 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
10469 messages.
10470 * mdebugread.c (mdebug_read_symtab): Remove prints.
10471 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
10472 assert.
10473 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
10474
10475 2020-01-26 Tom Tromey <tom@tromey.com>
10476
10477 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
10478 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
10479 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
10480 legacy_symtab.
10481 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
10482 * psymtab.c (psymtab_to_symtab): Call method.
10483 (dump_psymtab): Update.
10484 * psympriv.h (struct partial_symtab): Add virtual destructor.
10485 <read_symtab>: New method.
10486 (struct legacy_symtab): New.
10487 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
10488 (struct pst_map) <pst>: Now a legacy_psymtab.
10489 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
10490 (new_psymtab): Use legacy_psymtab.
10491 * dwarf2read.h (struct dwarf2_psymtab): New.
10492 (struct dwarf2_per_cu_data) <psymtab>: Use it.
10493 * dwarf2read.c (dwarf2_create_include_psymtab)
10494 (dwarf2_build_include_psymtabs, create_type_unit_group)
10495 (create_partial_symtab, process_psymtab_comp_unit_reader)
10496 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
10497 (set_partial_user): Use dwarf2_psymtab.
10498 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
10499 (psymtab_to_symtab_1, process_full_comp_unit)
10500 (process_full_type_unit, dwarf2_ranges_read)
10501 (dwarf2_get_pc_bounds, psymtab_include_file_name)
10502 (dwarf_decode_lines): Use dwarf2_psymtab.
10503 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
10504 (add_address_entry_worker, write_one_signatured_type)
10505 (recursively_count_psymbols, recursively_write_psymbols)
10506 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
10507 (write_debug_names): Likewise.
10508 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
10509 <pst>: Now a legacy_psymtab.
10510 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
10511 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
10512 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
10513 * ctfread.c (struct ctf_psymtab): New.
10514 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
10515 ctf_psymtab.
10516 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
10517 (create_partial_symtab): Return a ctf_psymtab.
10518 (scan_partial_symbols): Update.
10519
10520 2020-01-26 Tom Tromey <tom@tromey.com>
10521
10522 * xcoffread.c (xcoff_start_psymtab): Use new.
10523 * psymtab.c (partial_symtab::partial_symtab): New constructor,
10524 renamed from start_psymtab_common.
10525 * psympriv.h (struct partial_symtab): Add new constructor.
10526 (start_psymtab_common): Don't declare.
10527 * mdebugread.c (parse_partial_symbols): Use new.
10528 * dwarf2read.c (create_partial_symtab): Use new.
10529 * dbxread.c (start_psymtab): Use new.
10530 * ctfread.c (create_partial_symtab): Use new.
10531
10532 2020-01-26 Tom Tromey <tom@tromey.com>
10533
10534 * xcoffread.c (xcoff_end_psymtab): Use new.
10535 * psymtab.c (start_psymtab_common): Use new.
10536 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
10537 Update.
10538 * psympriv.h (struct partial_symtab): Add parameters to
10539 constructor. Don't inline.
10540 (allocate_psymtab): Don't declare.
10541 * mdebugread.c (new_psymtab): Use new.
10542 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
10543 * dbxread.c (dbx_end_psymtab): Use new.
10544
10545 2020-01-26 Tom Tromey <tom@tromey.com>
10546
10547 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
10548 allocate_psymtab. Update documentation.
10549 * psymtab.c (psymtab_storage::install_psymtab): Rename from
10550 allocate_psymtab. Do not use new.
10551 (allocate_psymtab): Use new. Update.
10552
10553 2020-01-26 Tom Tromey <tom@tromey.com>
10554
10555 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
10556 * psymtab.c (psym_print_stats): Update.
10557 * psympriv.h (struct partial_symtab) <readin,
10558 psymtabs_addrmap_supported, anonymous>: Now bool.
10559 * mdebugread.c (psymtab_to_symtab_1): Update.
10560 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
10561 (build_type_psymtabs_reader, psymtab_to_symtab_1)
10562 (process_full_comp_unit, process_full_type_unit): Update.
10563 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
10564 * ctfread.c (psymtab_to_symtab): Update.
10565
10566 2020-01-26 Tom Tromey <tom@tromey.com>
10567
10568 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
10569 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
10570 * psymtab.c (psymtab_storage): Delete psymtabs.
10571 (psymtab_storage::allocate_psymtab): Use new.
10572 (psymtab_storage::discard_psymtab): Use delete.
10573 * psympriv.h (struct partial_symtab): Add constructor and
10574 initializers.
10575
10576 2020-01-26 Tom Tromey <tom@tromey.com>
10577
10578 * machoread.c: Do not include psympriv.h.
10579
10580 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10581
10582 * NEWS: Mention the new option and the set/show commands.
10583
10584 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10585
10586 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
10587 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
10588 (validate_exec_file): New variables, enums, functions.
10589 (exec_file_locate_attach, print_section_info): Style the filenames.
10590 (_initialize_exec): Install show_exec_file_mismatch_command and
10591 set_exec_file_mismatch_command.
10592 * gdbcore.h (validate_exec_file): Declare.
10593 * infcmd.c (attach_command): Call validate_exec_file.
10594 * remote.c ( remote_target::remote_add_inferior): Likewise.
10595
10596 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10597
10598 * frame.c (find_frame_sal): Move call to get_next_frame into more
10599 inner scope.
10600 * inline-frame.c (inilne_state) <inline_state>: Update argument
10601 types.
10602 (inilne_state) <skipped_symbol>: Rename to...
10603 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
10604 (skip_inline_frames): Build vector of skipped symbols and use this
10605 to reate the inline_state.
10606 (inline_skipped_symbol): Add a comment and some assertions, fetch
10607 skipped symbol from the list.
10608
10609 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10610
10611 * buildsym.c (lte_is_less_than): Delete.
10612 (buildsym_compunit::end_symtab_with_blockvector): Create local
10613 lambda function to sort line table entries, and use
10614 std::stable_sort instead of std::sort.
10615 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
10616 markers when looking for a previous line.
10617
10618 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10619
10620 * dwarf2read.c (lnp_state_machine::record_line): Include
10621 end_sequence parameter in debug print out. Record the line if we
10622 are at an end_sequence marker even if it's not the start of a
10623 statement.
10624 * symmisc.c (maintenance_print_one_line_table): Print end of
10625 sequence markers with 'END' not '0'.
10626
10627 2020-01-24 Pedro Alves <palves@redhat.com>
10628
10629 PR gdb/25410
10630 * thread.c (scoped_restore_current_thread::restore): Use
10631 switch_to_inferior_no_thread.
10632 * exec.c: Include "progspace-and-thread.h".
10633 (add_target_sections, remove_target_sections):
10634 scoped_restore_current_pspace_and_thread instead of
10635 scoped_restore_current_thread.
10636 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
10637 and aspace to the inferior before calling clone_program_space.
10638 Remove stale comment.
10639
10640 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10641
10642 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
10643 (arm_netbsd_nat_target::fetch_registers): ...this.
10644 (arm_nbsd_nat_target::store_registers): Rename to...
10645 (arm_netbsd_nat_target::store_registers): ...this.
10646
10647 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10648
10649 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
10650 register_t.
10651
10652 2020-01-24 Christian Biesinger <cbiesinger@google.com>
10653
10654 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
10655 Update comment.
10656 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
10657 Likewise.
10658 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
10659 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
10660 the correct replacement (iterate_over_regset_sections).
10661 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
10662 Update comment.
10663
10664 2020-01-24 Graham Markall <graham.markall@embecosm.com>
10665
10666 PR gdb/23718
10667 * gdb/python/python.c (execute_gdb_command): Call
10668 async_enable_stdin in catch block.
10669
10670 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10671
10672 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
10673 SWITCH_THRU_ALL_UIS.
10674
10675 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
10676
10677 PR tui/9765
10678 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
10679 comment, add extra parameter, and update to store previous symbol
10680 when appropriate.
10681 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
10682 add extra parameter.
10683 * tui/tui-disasm.c (tui_disassemble): Update header comment,
10684 remove unneeded parameter, add try/catch around gdb_print_insn,
10685 rewrite to add items to asm_lines vector.
10686 (tui_find_backward_disassembly_start_address): New function.
10687 (tui_find_disassembly_address): Updated throughout.
10688 (tui_disasm_window::set_contents): Update for changes to
10689 tui_disassemble.
10690 (tui_disasm_window::do_scroll_vertical): No need to adjust the
10691 number of lines to scroll.
10692
10693 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
10694
10695 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
10696 (SECT_OFF_DATA): Likewise.
10697 (SECT_OFF_RODATA): Likewise.
10698 (SECT_OFF_TEXT): Likewise.
10699 (SECT_OFF_BSS): Likewise.
10700 (struct objfile) <text_section_offset, data_section_offset>: New
10701 methods.
10702 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
10703 objfile::text_section_offset.
10704 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
10705 * coffread.c (coff_symtab_read): Likewise.
10706 (enter_linenos): Likewise.
10707 (process_coff_symbol): Likewise.
10708 * ctfread.c (get_objfile_text_range): Likewise.
10709 * dtrace-probe.c (dtrace_probe::get_relocated_address):
10710 Use objfile::data_section_offset.
10711 * dwarf2-frame.c (execute_cfa_program): Use
10712 objfile::text_section_offset.
10713 (dwarf2_frame_find_fde): Likewise.
10714 * dwarf2read.c (create_addrmap_from_index): Likewise.
10715 (create_addrmap_from_aranges): Likewise.
10716 (dw2_find_pc_sect_compunit_symtab): Likewise.
10717 (process_psymtab_comp_unit_reader): Likewise.
10718 (add_partial_symbol): Likewise.
10719 (add_partial_subprogram): Likewise.
10720 (process_full_comp_unit): Likewise.
10721 (read_file_scope): Likewise.
10722 (read_func_scope): Likewise.
10723 (read_lexical_block_scope): Likewise.
10724 (read_call_site_scope): Likewise.
10725 (dwarf2_rnglists_process): Likewise.
10726 (dwarf2_ranges_process): Likewise.
10727 (dwarf2_ranges_read): Likewise.
10728 (dwarf_decode_lines_1): Likewise.
10729 (new_symbol): Likewise.
10730 (dwarf2_fetch_die_loc_sect_off): Likewise.
10731 (dwarf2_per_cu_text_offset): Likewise.
10732 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
10733 * hppa-tdep.c (read_unwind_info): Likewise.
10734 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
10735 * psympriv.h (struct partial_symtab): Likewise.
10736 * psymtab.c (find_pc_sect_psymtab): Likewise.
10737 * solib-svr4.c (enable_break): Likewise.
10738 * stap-probe.c (relocate_address): Use
10739 objfile::data_section_offset.
10740 * xcoffread.c (enter_line_range): Use
10741 objfile::text_section_offset.
10742 (read_xcoff_symtab): Likewise.
10743
10744 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
10745
10746 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
10747 declaration to narrower scopes.
10748
10749 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
10750
10751 * darwin-nat.h (struct darwin_exception_msg, enum
10752 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
10753 Move up.
10754 (class darwin_nat_target) <wait_1, check_new_threads,
10755 decode_exception_message, decode_message, stop_inferior,
10756 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
10757 * darwin-nat.c (darwin_check_new_threads): Rename to...
10758 (darwin_nat_target::check_new_threads): ... this.
10759 (darwin_suspend_inferior_it): Remove.
10760 (darwin_decode_exception_message): Rename to...
10761 (darwin_nat_target::decode_exception_message): ... this.
10762 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
10763 (darwin_decode_message): Rename to...
10764 (darwin_nat_target::decode_message): ... this.
10765 (cancel_breakpoint): Rename to...
10766 (darwin_nat_target::cancel_breakpoint): ... this.
10767 (darwin_wait): Rename to...
10768 (darwin_nat_target::wait_1): ... this. Use range-based for loop
10769 instead of iterate_over_inferiors.
10770 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
10771 (darwin_stop_inferior): Rename to...
10772 (darwin_nat_target::stop_inferior): ... this.
10773 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
10774 (darwin_init_thread_list): Rename to...
10775 (darwin_nat_target::init_thread_list): ... this.
10776 (darwin_ptrace_him): Rename to...
10777 (darwin_nat_target::ptrace_him): ... this.
10778 (darwin_nat_target::create_inferior): Pass lambda function to
10779 fork_inferior.
10780 (darwin_nat_target::detach): Call stop_inferior instead of
10781 darwin_stop_inferior.
10782 * fork-inferior.h (fork_inferior): Change init_trace_fun
10783 parameter to gdb::function_view.
10784 * fork-inferior.c (fork_inferior): Likewise.
10785
10786 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
10787
10788 * i386-cygwin-tdep.c (core_process_module_section): Update.
10789 * windows-nat.c (struct lm_info_windows): Add text_offset.
10790 (windows_xfer_shared_libraries): Update.
10791 * windows-tdep.c (windows_xfer_shared_library):
10792 Add text_offset_cached argument.
10793 * windows-tdep.h (windows_xfer_shared_library): Update.
10794
10795 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10796
10797 * gdbarch.sh: Add declaration for _initialize_gdbarch.
10798
10799 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10800
10801 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
10802 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
10803 replace with range-based for.
10804 (gdbsim_interrupt_inferior): Remove.
10805 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
10806 with a range-based for. Inline code from
10807 gdbsim_interrupt_inferior.
10808
10809 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
10810
10811 * infrun.c (proceed): Fix indentation.
10812
10813 2020-01-21 Tom Tromey <tromey@adacore.com>
10814
10815 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
10816 * python/python.c (python_extension_ops): Update.
10817 (gdbpy_colorize): New function.
10818 * python/lib/gdb/__init__.py (colorize): New function.
10819 * extension.h (ext_lang_colorize): Declare.
10820 * extension.c (ext_lang_colorize): New function.
10821 * extension-priv.h (struct extension_language_ops) <colorize>: New
10822 member.
10823 * cli/cli-style.c (_initialize_cli_style): Update help text.
10824
10825 2020-01-21 Luis Machado <luis.machado@linaro.org>
10826
10827 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
10828 <cond>: Change type to bool.
10829 (aarch64_displaced_step_b_cond): Update cond to use bool type.
10830 (aarch64_displaced_step_cb): Likewise.
10831 (aarch64_displaced_step_tb): Likewise.
10832
10833 2020-01-21 Luis Machado <luis.machado@linaro.org>
10834
10835 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
10836 output.
10837
10838 2020-01-21 Luis Machado <luis.machado@linaro.org>
10839
10840 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
10841 <pc_adjust>: Adjust the documentation.
10842 (aarch64_displaced_step_fixup): Check if PC really moved before
10843 adjusting it.
10844
10845 2020-01-19 Tom Tromey <tom@tromey.com>
10846
10847 * disasm.c (~gdb_disassembler): New destructor.
10848 (gdb_buffered_insn_length): Call disassemble_free_target.
10849 * disasm.h (class gdb_disassembler): Declare destructor. Use
10850 DISABLE_COPY_AND_ASSIGN.
10851
10852 2020-01-19 Tom Tromey <tom@tromey.com>
10853
10854 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
10855 (die_reader_func_ftype): Remove.
10856 (cutu_reader): New class.
10857 (dw2_get_file_names_reader): Remove "data" parameter.
10858 (dw2_get_file_names): Use cutu_reader.
10859 (create_debug_type_hash_table): Update.
10860 (read_cutu_die_from_dwo): Update comment.
10861 (lookup_dwo_unit): Add dwo_name parameter.
10862 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
10863 die_reader_func_ftype and data parameters.
10864 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
10865 Remove die_reader_func_ftype and data parameters.
10866 (~cutu_reader): New; from init_cutu_and_read_dies.
10867 (cutu_reader::cutu_reader): Rename from
10868 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
10869 and data parameters.
10870 (init_cutu_and_read_dies_simple): Remove.
10871 (struct process_psymtab_comp_unit_data): Remove.
10872 (process_psymtab_comp_unit_reader): Remove data parameter; add
10873 want_partial_unit and pretend_language parameters.
10874 (process_psymtab_comp_unit): Use cutu_reader.
10875 (build_type_psymtabs_reader): Remove data parameter.
10876 (build_type_psymtabs_1): Use cutu_reader.
10877 (process_skeletonless_type_unit): Likewise.
10878 (load_partial_comp_unit_reader): Remove.
10879 (load_partial_comp_unit): Use cutu_reader.
10880 (load_full_comp_unit_reader): Remove.
10881 (load_full_comp_unit): Use cutu_reader.
10882 (struct create_dwo_cu_data): Remove.
10883 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
10884 dwo_unit parameters.
10885 (create_cus_hash_table): Use cutu_reader.
10886 (struct dwarf2_read_addr_index_data): Remove.
10887 (dwarf2_read_addr_index_reader): Remove.
10888 (dwarf2_read_addr_index): Use cutu_reader.
10889 (read_signatured_type_reader): Remove.
10890 (read_signatured_type): Use cutu_reader.
10891
10892 2020-01-19 Tom Tromey <tom@tromey.com>
10893
10894 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
10895 * tui/tui-wingeneral.h (class tui_suppress_output): New.
10896 (tui_wrefresh): Declare.
10897 * tui/tui-wingeneral.c (suppress_output): New global.
10898 (tui_suppress_output, ~tui_suppress_output): New constructor and
10899 destructor.
10900 (tui_wrefresh): New function.
10901 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
10902 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
10903 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
10904 method.
10905 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
10906 tui_wrefresh.
10907 (tui_data_window::no_refresh): New method.
10908 (tui_data_item_window::refresh_window): Call tui_wrefresh.
10909 (tui_reg_command): Use tui_suppress_output
10910 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
10911 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
10912 method.
10913 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
10914
10915 2020-01-19 Tom Tromey <tom@tromey.com>
10916
10917 * tui/tui-winsource.c (tui_update_source_windows_with_line):
10918 Handle case where symtab is null.
10919
10920 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
10921
10922 * linux-fork.c (one_fork_p): Simplify.
10923
10924 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10925
10926 * top.c (struct qt_args): Remove.
10927 (kill_or_detach): Change return type to void, replace `void *`
10928 parameter with a proper one.
10929 (print_inferior_quit_action): Likewise.
10930 (quit_confirm): Use range-based for loop to iterate over inferiors.
10931 (quit_force): Likewise.
10932
10933 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10934
10935 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
10936 `void *` parameter with proper parameters.
10937 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
10938 (print_one_inferior): Change return type to void, replace `void *`
10939 parameter with proper parameters.
10940 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
10941 inferiors.
10942 (get_other_inferior): Remove.
10943 (mi_cmd_remove_inferior): Use range-based loop to iterate over
10944 inferiors.
10945
10946 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10947
10948 * mi/mi-interp.c (report_initial_inferior): Remove.
10949 (mi_interp::init): Use range-based for to iterate over inferiors.
10950
10951 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
10952
10953 * python/py-inferior.c (build_inferior_list): Remove.
10954 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
10955
10956 2020-01-16 Christian Biesinger <cbiesinger@google.com>
10957
10958 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
10959 (btrace_stitch_trace): Likewise.
10960 * charset.c (intermediate_encoding): Likewise (vaild).
10961 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
10962 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
10963 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
10964
10965 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
10966
10967 * windows-tdep.c (windows_get_tlb_type):
10968 Add rtl_user_process_parameters type.
10969
10970 2020-01-16 Pedro Alves <palves@redhat.com>
10971 Norbert Lange <nolange79@gmail.com>
10972
10973 PR build/24805
10974 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
10975 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
10976 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
10977 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
10978 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
10979 (ps_plog): Redeclare exported functions with default visibility.
10980
10981 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
10982
10983 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
10984 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
10985
10986 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
10987
10988 * infcmd.c (post_create_inferior): Use get_thread_regcache
10989 instead of get_current_regcache.
10990
10991 2020-01-14 Tom Tromey <tom@tromey.com>
10992
10993 PR symtab/12535:
10994 * python/python.c (gdbpy_decode_line): Treat empty string the same
10995 as no argument.
10996
10997 2020-01-14 Tom Tromey <tom@tromey.com>
10998
10999 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
11000
11001 2020-01-14 Tom Tromey <tom@tromey.com>
11002
11003 * nat/linux-btrace.c: Don't include <config.h>.
11004 * nat/linux-ptrace.c: Don't include <config.h>.
11005 * nat/x86-linux-dregs.c: Don't include <config.h>.
11006
11007 2020-01-14 Tom Tromey <tom@tromey.com>
11008
11009 * configure: Rebuild.
11010 * configure.ac: Move many checks to ../gdbsupport/common.m4.
11011
11012 2020-01-14 Tom Tromey <tom@tromey.com>
11013
11014 * nat/x86-linux-dregs.c: Include configh.h.
11015 * nat/linux-ptrace.c: Include configh.h.
11016 * nat/linux-btrace.c: Include configh.h.
11017 * defs.h: Include config.h, bfd.h.
11018 * configure.ac: Don't source common.host.
11019 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
11020 * configure: Rebuild.
11021 * acinclude.m4: Update path.
11022 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
11023 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
11024 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
11025 (CLIBS): Add LIBSUPPORT.
11026 (CDEPS): Likewise.
11027 (COMMON_SFILES): Remove gdbsupport files.
11028 (HFILES_NO_SRCDIR): Likewise.
11029 (stamp-version): Update path to create-version.sh.
11030 (ALLDEPFILES): Remove gdbsupport files.
11031
11032 2020-01-14 Tom Tromey <tom@tromey.com>
11033
11034 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
11035 USE_WIN32API when needed.
11036 * configure.ac (USE_WIN32API): Don't define.
11037 (WIN32LIBS): Use WIN32APILIBS.
11038 * configure: Rebuild.
11039
11040 2020-01-14 Tom Tromey <tom@tromey.com>
11041
11042 * configure: Rebuild.
11043 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
11044
11045 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
11046
11047 * skip.c (skip_function_command): Make skip w/o arguments use the
11048 name of the inlined function if pc is inside any inlined function.
11049
11050 2020-01-14 Luis Machado <luis.machado@linaro.org>
11051
11052 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
11053 * infrun.c (resume_1): Likewise.
11054 (handle_inferior_event): Remove stale comment.
11055 * linux-nat.c (linux_nat_target::resume): Update comments.
11056 (save_stop_reason): Likewise.
11057 (linux_nat_filter_event): Likewise.
11058 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
11059
11060 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
11061
11062 * elfread.c (record_minimal_symbol): Set section index to 0 for
11063 non-allocatable sections.
11064
11065
11066 2020-01-13 Ali Tamur <tamur@google.com>
11067
11068 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
11069 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
11070 to gdb::optional. Update comments.
11071 (dwo_file): Update comments.
11072 (read_attribute): Update API to take an additional out parameter,
11073 need_reprocess. This is used to mark attributes that need other
11074 attributes (e.g. str_offsets_base) for correct computation which may not
11075 have been read yet.
11076 (read_attribute_reprocess): New function declaration.
11077 (read_addr_index): Likewise.
11078 (read_dwo_str_index): Likewise.
11079 (read_stub_str_index): Likewise.
11080 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
11081 (lookup_addr_base): New function definition.
11082 (lookup_ranges_base): Likewise.
11083 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
11084 lookup_ranges_base.
11085 (init_cutu_and_read_dies): Update comments.
11086 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
11087 unit. This is used to inherit parent's str_offsets_base and addr_base.
11088 Update comments.
11089 (init_cutu_and_read_dies_simple): Reflect API changes.
11090 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
11091 (create_cus_hash_table): Change API to take parent compile unit.
11092 Reflect API changes.
11093 (open_and_init_dwo_file): Reflect API changes.
11094 (dwarf2_get_pc_bounds): Update comments.
11095 (dwarf2_record_block_ranges): Likewise.
11096 (read_full_die_1): Change implementation to reprocess attributes that
11097 need str_offsets_base and addr_base.
11098 (partial_die_info::read): Likewise.
11099 (read_attribute_reprocess): New function definition.
11100 (read_attribute_value): Change API to take an additional out parameter,
11101 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
11102 when a non-dwo compile unit has index based attributes.
11103 (read_attribute): Reflect API changes.
11104 (read_addr_index_1): Reflect API changes. Update comments.
11105 (dwarf2_read_addr_index_data): Reflect API changes.
11106 (dwarf2_read_addr_index): Likewise.
11107 (read_str_index): Change API and implementation. This becomes a helper
11108 to be used by the new string index related methods. Update error
11109 message and comments.
11110 (read_dwo_str_index): New function definition.
11111 (read_stub_str_index): Likewise.
11112 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
11113 * symfile.h (dwarf2_debug_sections): Likewise.
11114 * xcoffread.c (dwarf2_debug_sections): Likewise.
11115
11116 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
11117
11118 * gdbcore.h (struct core_fns) <core_read_registers>: Change
11119 core_reg_sect type to gdb_byte *.
11120 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
11121 * cris-tdep.c (fetch_core_registers): Likewise.
11122 * corelow.c (core_target::get_core_register_section): Change
11123 type of `contents` to gdb::byte_vector.
11124
11125 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
11126
11127 * tui/tui-wingeneral.c (box_win): Position the title in the center
11128 of the border.
11129
11130 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
11131
11132 * corelow.c (core_target::get_core_register_section): Use
11133 std::vector instead of alloca.
11134
11135 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
11136
11137 * warning.m4: Add -Wmissing-declarations to build_warnings.
11138 * configure: Re-generate.
11139
11140 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
11141
11142 * python/python.c (init__gdb_module): Add declaration.
11143
11144 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
11145
11146 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
11147 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
11148 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
11149 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
11150 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
11151 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
11152 * ada-exp.y (_initialize_ada_exp): Add declaration.
11153 * ada-lang.c (_initialize_ada_language): Add declaration.
11154 * ada-tasks.c (_initialize_tasks): Add declaration.
11155 * agent.c (_initialize_agent): Add declaration.
11156 * aix-thread.c (_initialize_aix_thread): Add declaration.
11157 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
11158 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
11159 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
11160 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
11161 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
11162 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
11163 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
11164 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
11165 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
11166 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
11167 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
11168 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
11169 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
11170 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
11171 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
11172 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
11173 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
11174 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
11175 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
11176 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
11177 * annotate.c (_initialize_annotate): Add declaration.
11178 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
11179 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
11180 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
11181 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
11182 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
11183 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
11184 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
11185 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
11186 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
11187 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
11188 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
11189 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
11190 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
11191 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
11192 * auto-load.c (_initialize_auto_load): Add declaration.
11193 * auxv.c (_initialize_auxv): Add declaration.
11194 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
11195 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
11196 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
11197 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
11198 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
11199 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
11200 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
11201 * breakpoint.c (_initialize_breakpoint): Add declaration.
11202 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
11203 * btrace.c (_initialize_btrace): Add declaration.
11204 * charset.c (_initialize_charset): Add declaration.
11205 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
11206 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
11207 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
11208 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
11209 * cli/cli-script.c (_initialize_cli_script): Add declaration.
11210 * cli/cli-style.c (_initialize_cli_style): Add declaration.
11211 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
11212 * coffread.c (_initialize_coffread): Add declaration.
11213 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
11214 * compile/compile.c (_initialize_compile): Add declaration.
11215 * complaints.c (_initialize_complaints): Add declaration.
11216 * completer.c (_initialize_completer): Add declaration.
11217 * copying.c (_initialize_copying): Add declaration.
11218 * corefile.c (_initialize_core): Add declaration.
11219 * corelow.c (_initialize_corelow): Add declaration.
11220 * cp-abi.c (_initialize_cp_abi): Add declaration.
11221 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
11222 * cp-support.c (_initialize_cp_support): Add declaration.
11223 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
11224 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
11225 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
11226 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
11227 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
11228 * ctfread.c (_initialize_ctfread): Add declaration.
11229 * d-lang.c (_initialize_d_language): Add declaration.
11230 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
11231 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
11232 * dbxread.c (_initialize_dbxread): Add declaration.
11233 * dcache.c (_initialize_dcache): Add declaration.
11234 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
11235 * disasm.c (_initialize_disasm): Add declaration.
11236 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
11237 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
11238 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
11239 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
11240 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
11241 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
11242 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
11243 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
11244 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
11245 * elfread.c (_initialize_elfread): Add declaration.
11246 * exec.c (_initialize_exec): Add declaration.
11247 * extension.c (_initialize_extension): Add declaration.
11248 * f-lang.c (_initialize_f_language): Add declaration.
11249 * f-valprint.c (_initialize_f_valprint): Add declaration.
11250 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
11251 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
11252 * filesystem.c (_initialize_filesystem): Add declaration.
11253 * findcmd.c (_initialize_mem_search): Add declaration.
11254 * findvar.c (_initialize_findvar): Add declaration.
11255 * fork-child.c (_initialize_fork_child): Add declaration.
11256 * frame-base.c (_initialize_frame_base): Add declaration.
11257 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
11258 * frame.c (_initialize_frame): Add declaration.
11259 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
11260 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
11261 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
11262 * gcore.c (_initialize_gcore): Add declaration.
11263 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
11264 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
11265 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
11266 * gdbarch.c (_initialize_gdbarch): Add declaration.
11267 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
11268 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
11269 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
11270 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
11271 * go-lang.c (_initialize_go_language): Add declaration.
11272 * go32-nat.c (_initialize_go32_nat): Add declaration.
11273 * guile/guile.c (_initialize_guile): Add declaration.
11274 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
11275 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
11276 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
11277 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
11278 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
11279 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
11280 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
11281 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
11282 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
11283 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
11284 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
11285 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
11286 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
11287 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
11288 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
11289 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
11290 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
11291 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
11292 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
11293 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
11294 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
11295 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
11296 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
11297 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
11298 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
11299 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
11300 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
11301 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
11302 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
11303 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
11304 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
11305 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
11306 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
11307 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
11308 * infcall.c (_initialize_infcall): Add declaration.
11309 * infcmd.c (_initialize_infcmd): Add declaration.
11310 * inflow.c (_initialize_inflow): Add declaration.
11311 * infrun.c (_initialize_infrun): Add declaration.
11312 * interps.c (_initialize_interpreter): Add declaration.
11313 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
11314 * jit.c (_initialize_jit): Add declaration.
11315 * language.c (_initialize_language): Add declaration.
11316 * linux-fork.c (_initialize_linux_fork): Add declaration.
11317 * linux-nat.c (_initialize_linux_nat): Add declaration.
11318 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
11319 * linux-thread-db.c (_initialize_thread_db): Add declaration.
11320 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
11321 * m2-lang.c (_initialize_m2_language): Add declaration.
11322 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
11323 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
11324 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
11325 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
11326 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
11327 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
11328 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
11329 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
11330 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
11331 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
11332 * machoread.c (_initialize_machoread): Add declaration.
11333 * macrocmd.c (_initialize_macrocmd): Add declaration.
11334 * macroscope.c (_initialize_macroscope): Add declaration.
11335 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
11336 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
11337 * maint.c (_initialize_maint_cmds): Add declaration.
11338 * mdebugread.c (_initialize_mdebugread): Add declaration.
11339 * memattr.c (_initialize_mem): Add declaration.
11340 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
11341 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
11342 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
11343 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
11344 * mi/mi-main.c (_initialize_mi_main): Add declaration.
11345 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
11346 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
11347 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
11348 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
11349 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
11350 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
11351 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
11352 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
11353 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
11354 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
11355 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
11356 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
11357 * mipsread.c (_initialize_mipsread): Add declaration.
11358 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
11359 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
11360 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
11361 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
11362 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
11363 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
11364 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
11365 * nto-procfs.c (_initialize_procfs): Add declaration.
11366 * objc-lang.c (_initialize_objc_language): Add declaration.
11367 * observable.c (_initialize_observer): Add declaration.
11368 * opencl-lang.c (_initialize_opencl_language): Add declaration.
11369 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
11370 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
11371 * osabi.c (_initialize_gdb_osabi): Add declaration.
11372 * osdata.c (_initialize_osdata): Add declaration.
11373 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
11374 * parse.c (_initialize_parse): Add declaration.
11375 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
11376 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
11377 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
11378 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
11379 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
11380 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
11381 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
11382 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
11383 * printcmd.c (_initialize_printcmd): Add declaration.
11384 * probe.c (_initialize_probe): Add declaration.
11385 * proc-api.c (_initialize_proc_api): Add declaration.
11386 * proc-events.c (_initialize_proc_events): Add declaration.
11387 * proc-service.c (_initialize_proc_service): Add declaration.
11388 * procfs.c (_initialize_procfs): Add declaration.
11389 * producer.c (_initialize_producer): Add declaration.
11390 * psymtab.c (_initialize_psymtab): Add declaration.
11391 * python/python.c (_initialize_python): Add declaration.
11392 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
11393 * record-btrace.c (_initialize_record_btrace): Add declaration.
11394 * record-full.c (_initialize_record_full): Add declaration.
11395 * record.c (_initialize_record): Add declaration.
11396 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
11397 * regcache.c (_initialize_regcache): Add declaration.
11398 * reggroups.c (_initialize_reggroup): Add declaration.
11399 * remote-notif.c (_initialize_notif): Add declaration.
11400 * remote-sim.c (_initialize_remote_sim): Add declaration.
11401 * remote.c (_initialize_remote): Add declaration.
11402 * reverse.c (_initialize_reverse): Add declaration.
11403 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
11404 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
11405 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
11406 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
11407 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
11408 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
11409 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
11410 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
11411 Add declaration.
11412 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
11413 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
11414 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
11415 * rust-exp.y (_initialize_rust_exp): Add declaration.
11416 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
11417 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
11418 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
11419 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
11420 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
11421 * score-tdep.c (_initialize_score_tdep): Add declaration.
11422 * ser-go32.c (_initialize_ser_dos): Add declaration.
11423 * ser-mingw.c (_initialize_ser_windows): Add declaration.
11424 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
11425 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
11426 * ser-uds.c (_initialize_ser_socket): Add declaration.
11427 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
11428 * serial.c (_initialize_serial): Add declaration.
11429 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
11430 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
11431 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
11432 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
11433 * skip.c (_initialize_step_skip): Add declaration.
11434 * sol-thread.c (_initialize_sol_thread): Add declaration.
11435 * solib-aix.c (_initialize_solib_aix): Add declaration.
11436 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
11437 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
11438 * solib-frv.c (_initialize_frv_solib): Add declaration.
11439 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
11440 * solib-target.c (_initialize_solib_target): Add declaration.
11441 * solib.c (_initialize_solib): Add declaration.
11442 * source-cache.c (_initialize_source_cache): Add declaration.
11443 * source.c (_initialize_source): Add declaration.
11444 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
11445 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
11446 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
11447 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
11448 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
11449 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
11450 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
11451 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
11452 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
11453 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
11454 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
11455 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
11456 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
11457 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
11458 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
11459 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
11460 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
11461 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
11462 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
11463 * stabsread.c (_initialize_stabsread): Add declaration.
11464 * stack.c (_initialize_stack): Add declaration.
11465 * stap-probe.c (_initialize_stap_probe): Add declaration.
11466 * std-regs.c (_initialize_frame_reg): Add declaration.
11467 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
11468 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
11469 * symfile.c (_initialize_symfile): Add declaration.
11470 * symmisc.c (_initialize_symmisc): Add declaration.
11471 * symtab.c (_initialize_symtab): Add declaration.
11472 * target.c (_initialize_target): Add declaration.
11473 * target-connection.c (_initialize_target_connection): Add
11474 declaration.
11475 * target-dcache.c (_initialize_target_dcache): Add declaration.
11476 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
11477 * thread.c (_initialize_thread): Add declaration.
11478 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
11479 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
11480 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
11481 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
11482 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
11483 * tracectf.c (_initialize_ctf): Add declaration.
11484 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
11485 * tracefile.c (_initialize_tracefile): Add declaration.
11486 * tracepoint.c (_initialize_tracepoint): Add declaration.
11487 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
11488 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
11489 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
11490 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
11491 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
11492 * tui/tui-win.c (_initialize_tui_win): Add declaration.
11493 * tui/tui.c (_initialize_tui): Add declaration.
11494 * typeprint.c (_initialize_typeprint): Add declaration.
11495 * ui-style.c (_initialize_ui_style): Add declaration.
11496 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
11497 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
11498 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
11499 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
11500 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
11501 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
11502 * unittests/filtered_iterator-selftests.c
11503 (_initialize_filtered_iterator_selftests): Add declaration.
11504 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
11505 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
11506 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
11507 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
11508 * unittests/main-thread-selftests.c
11509 (_initialize_main_thread_selftests): Add declaration.
11510 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
11511 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
11512 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
11513 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
11514 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
11515 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
11516 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
11517 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
11518 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
11519 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
11520 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
11521 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
11522 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
11523 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
11524 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
11525 declaration.
11526 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
11527 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
11528 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
11529 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
11530 * user-regs.c (_initialize_user_regs): Add declaration.
11531 * utils.c (_initialize_utils): Add declaration.
11532 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
11533 * valops.c (_initialize_valops): Add declaration.
11534 * valprint.c (_initialize_valprint): Add declaration.
11535 * value.c (_initialize_values): Add declaration.
11536 * varobj.c (_initialize_varobj): Add declaration.
11537 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
11538 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
11539 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
11540 * windows-nat.c (_initialize_windows_nat): Add declaration.
11541 (_initialize_check_for_gdb_ini): Add declaration.
11542 (_initialize_loadable): Add declaration.
11543 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
11544 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
11545 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
11546 * xcoffread.c (_initialize_xcoffread): Add declaration.
11547 * xml-support.c (_initialize_xml_support): Add declaration.
11548 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
11549 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
11550 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
11551 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
11552
11553 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
11554
11555 * regformats/regdat.sh: Generate declaration for init function.
11556
11557 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
11558
11559 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
11560 up.
11561 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
11562 close_one_inferior>: New methods.
11563 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
11564 pass down target to find_inferior_pid.
11565 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
11566 Pass down target to find_inferior_ptid.
11567 (gdbsim_target::create_inferior): Pass down target to
11568 add_thread_silent.
11569 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
11570 target down to find_inferior_ptid and switch_to_thread.
11571 (gdbsim_target::close): Update to call close_one_inferior.
11572 (struct resume_data): Remove.
11573 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
11574 directly, rather than through a void pointer.
11575 (gdbsim_target::resume): Update to call resume_one_inferior.
11576
11577 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
11578
11579 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
11580
11581 2020-01-12 Pedro Alves <palves@redhat.com>
11582
11583 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
11584 directly for the current inferior instead of
11585 discard_all_inferiors.
11586 (discard_all_inferiors): Delete.
11587
11588 2020-01-11 Tom Tromey <tom@tromey.com>
11589
11590 * tui/tui-wingeneral.c (box_win): Check cli_styling.
11591 * tui/tui-winsource.c (tui_source_window_base::refill): Use
11592 deprecated_safe_get_selected_frame.
11593
11594 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
11595
11596 * inferior.c (print_inferior): Switch inferior before printing it.
11597
11598 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
11599 Pedro Alves <palves@redhat.com>
11600
11601 * progspace-and-thread.c (switch_to_program_space_and_thread):
11602 Assert there's an inferior for PSPACE. Use
11603 switch_to_inferior_no_thread to switch the inferior too.
11604 * progspace.c (program_space::~program_space): Call
11605 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
11606 (program_space::free_all_objfiles): Don't call clear_symtab_users
11607 here.
11608 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
11609
11610 2020-01-10 Pedro Alves <palves@redhat.com>
11611
11612 * NEWS: Mention multi-target debugging, "info connections", and
11613 "add-inferior -no-connection".
11614
11615 2020-01-10 Pedro Alves <palves@redhat.com>
11616
11617 * infrun.c: Include "target-connection.h".
11618 (check_multi_target_resumption): New.
11619 (proceed): Call it.
11620 * target-connection.c (make_target_connection_string): Make
11621 extern.
11622 * target-connection.h (make_target_connection_string): Declare.
11623
11624 2020-01-10 Pedro Alves <palves@redhat.com>
11625
11626 * Makefile.in (COMMON_SFILES): Add target-connection.c.
11627 * inferior.c (uiout_field_connection): New function.
11628 (print_inferior): Add new "connection-id" column.
11629 (add_inferior_command): Show connection number/string of added
11630 inferior.
11631 * process-stratum-target.h
11632 (process_stratum_target::connection_string): New virtual method.
11633 (process_stratum_target::connection_number): New field.
11634 * remote.c (remote_target::connection_string): New override.
11635 * target-connection.c: New file.
11636 * target-connection.h: New file.
11637 * target.c (decref_target): Remove process_stratum targets from
11638 the connection list.
11639 (target_stack::push): Add process_stratum targets to the
11640 connection list.
11641
11642 2020-01-10 Pedro Alves <palves@redhat.com>
11643
11644 Revert:
11645 2016-04-12 Pedro Alves <palves@redhat.com>
11646 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
11647 Remove references to name.
11648 * serial.h (struct serial) <name>: Delete.
11649
11650 2020-01-10 Pedro Alves <palves@redhat.com>
11651
11652 * gdbarch-selftests.c (register_to_value_test): Remove "target
11653 already pushed" check.
11654
11655 2020-01-10 Pedro Alves <palves@redhat.com>
11656 John Baldwin <jhb@FreeBSD.org>
11657
11658 * aarch64-linux-nat.c
11659 (aarch64_linux_nat_target::thread_architecture): Adjust.
11660 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
11661 (task_command_1): Likewise.
11662 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
11663 (aix_thread_target::wait, aix_thread_target::fetch_registers)
11664 (aix_thread_target::store_registers)
11665 (aix_thread_target::thread_alive): Adjust.
11666 * amd64-fbsd-tdep.c: Include "inferior.h".
11667 (amd64fbsd_get_thread_local_address): Pass down target.
11668 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
11669 thread's gdbarch instead of target_gdbarch.
11670 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
11671 get_last_target_status.
11672 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
11673 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
11674 inferiors.
11675 (update_inserted_breakpoint_locations): Skip if inferiors with no
11676 execution.
11677 (update_global_location_list): When handling moribund locations,
11678 find representative inferior for location's pspace, and use thread
11679 count of its process_stratum target.
11680 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
11681 * bsd-uthread.c (bsd_uthread_target::wait): Use
11682 as_process_stratum_target and adjust thread_change_ptid and
11683 add_thread calls.
11684 (bsd_uthread_target::update_thread_list): Use
11685 as_process_stratum_target and adjust find_thread_ptid,
11686 thread_change_ptid and add_thread calls.
11687 * btrace.c (maint_btrace_packet_history_cmd): Adjust
11688 find_thread_ptid call.
11689 * corelow.c (add_to_thread_list): Adjust add_thread call.
11690 (core_target_open): Adjust add_thread_silent and thread_count
11691 calls.
11692 (core_target::pid_to_str): Adjust find_inferior_ptid call.
11693 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
11694 * event-top.c (async_disconnect): Pop targets from all inferiors.
11695 * exec.c (add_target_sections): Push exec target on all inferiors
11696 sharing the program space.
11697 (remove_target_sections): Remove the exec target from all
11698 inferiors sharing the program space.
11699 (exec_on_vfork): New.
11700 * exec.h (exec_on_vfork): Declare.
11701 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
11702 Pass it down.
11703 (fbsd_nat_target::update_thread_list): Adjust.
11704 (fbsd_nat_target::resume): Adjust.
11705 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
11706 down.
11707 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
11708 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
11709 get_thread_arch_regcache call.
11710 * fork-child.c (gdb_startup_inferior): Pass target down to
11711 startup_inferior and set_executing.
11712 * gdbthread.h (struct process_stratum_target): Forward declare.
11713 (add_thread, add_thread_silent, add_thread_with_info)
11714 (in_thread_list): Add process_stratum_target parameter.
11715 (find_thread_ptid(inferior*, ptid_t)): New overload.
11716 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
11717 parameter.
11718 (all_threads()): Delete overload.
11719 (all_threads, all_non_exited_threads): Add process_stratum_target
11720 parameter.
11721 (all_threads_safe): Use brace initialization.
11722 (thread_count): Add process_stratum_target parameter.
11723 (set_resumed, set_running, set_stop_requested, set_executing)
11724 (threads_are_executing, finish_thread_state): Add
11725 process_stratum_target parameter.
11726 (switch_to_thread): Use is_current_thread.
11727 * i386-fbsd-tdep.c: Include "inferior.h".
11728 (i386fbsd_get_thread_local_address): Pass down target.
11729 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
11730 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
11731 have_inferiors check.
11732 * inf-ptrace.c (inf_ptrace_target::create_inferior)
11733 (inf_ptrace_target::attach): Adjust.
11734 * infcall.c (run_inferior_call): Adjust.
11735 * infcmd.c (run_command_1): Pass target to
11736 scoped_finish_thread_state.
11737 (proceed_thread_callback): Skip inferiors with no execution.
11738 (continue_command): Rename 'all_threads' local to avoid hiding
11739 'all_threads' function. Adjust get_last_target_status call.
11740 (prepare_one_step): Adjust set_running call.
11741 (signal_command): Use user_visible_resume_target. Compare thread
11742 pointers instead of inferior_ptid.
11743 (info_program_command): Adjust to pass down target.
11744 (attach_command): Mark target's 'thread_executing' flag.
11745 (stop_current_target_threads_ns): New, factored out from ...
11746 (interrupt_target_1): ... this. Switch inferior before making
11747 target calls.
11748 * inferior-iter.h
11749 (struct all_inferiors_iterator, struct all_inferiors_range)
11750 (struct all_inferiors_safe_range)
11751 (struct all_non_exited_inferiors_range): Filter on
11752 process_stratum_target too. Remove explicit.
11753 * inferior.c (inferior::inferior): Push dummy target on target
11754 stack.
11755 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
11756 Add process_stratum_target parameter, and pass it down.
11757 (have_live_inferiors): Adjust.
11758 (switch_to_inferior_and_push_target): New.
11759 (add_inferior_command, clone_inferior_command): Handle
11760 "-no-connection" parameter. Use
11761 switch_to_inferior_and_push_target.
11762 (_initialize_inferior): Mention "-no-connection" option in
11763 the help of "add-inferior" and "clone-inferior" commands.
11764 * inferior.h: Include "process-stratum-target.h".
11765 (interrupt_target_1): Use bool.
11766 (struct inferior) <push_target, unpush_target, target_is_pushed,
11767 find_target_beneath, top_target, process_target, target_at,
11768 m_stack>: New.
11769 (discard_all_inferiors): Delete.
11770 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
11771 (all_inferiors, all_non_exited_inferiors): Add
11772 process_stratum_target parameter.
11773 * infrun.c: Include "gdb_select.h" and <unordered_map>.
11774 (target_last_proc_target): New global.
11775 (follow_fork_inferior): Push target on new inferior. Pass target
11776 to add_thread_silent. Call exec_on_vfork. Handle target's
11777 reference count.
11778 (follow_fork): Adjust get_last_target_status call. Also consider
11779 target.
11780 (follow_exec): Push target on new inferior.
11781 (struct execution_control_state) <target>: New field.
11782 (user_visible_resume_target): New.
11783 (do_target_resume): Call target_async.
11784 (resume_1): Set target's threads_executing flag. Consider resume
11785 target.
11786 (commit_resume_all_targets): New.
11787 (proceed): Also consider resume target. Skip threads of inferiors
11788 with no execution. Commit resumtion in all targets.
11789 (start_remote): Pass current inferior to wait_for_inferior.
11790 (infrun_thread_stop_requested): Consider target as well. Pass
11791 thread_info pointer to clear_inline_frame_state instead of ptid.
11792 (infrun_thread_thread_exit): Consider target as well.
11793 (random_pending_event_thread): New inferior parameter. Use it.
11794 (do_target_wait): Rename to ...
11795 (do_target_wait_1): ... this. Add inferior parameter, and pass it
11796 down.
11797 (threads_are_resumed_pending_p, do_target_wait): New.
11798 (prepare_for_detach): Adjust calls.
11799 (wait_for_inferior): New inferior parameter. Handle it. Use
11800 do_target_wait_1 instead of do_target_wait.
11801 (fetch_inferior_event): Adjust. Switch to representative
11802 inferior. Pass target down.
11803 (set_last_target_status): Add process_stratum_target parameter.
11804 Save target in global.
11805 (get_last_target_status): Add process_stratum_target parameter and
11806 handle it.
11807 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
11808 (context_switch): Check inferior_ptid == null_ptid before calling
11809 inferior_thread().
11810 (get_inferior_stop_soon): Pass down target.
11811 (wait_one): Rename to ...
11812 (poll_one_curr_target): ... this.
11813 (struct wait_one_event): New.
11814 (wait_one): New.
11815 (stop_all_threads): Adjust.
11816 (handle_no_resumed, handle_inferior_event): Adjust to consider the
11817 event's target.
11818 (switch_back_to_stepped_thread): Also consider target.
11819 (print_stop_event): Update.
11820 (normal_stop): Update. Also consider the resume target.
11821 * infrun.h (wait_for_inferior): Remove declaration.
11822 (user_visible_resume_target): New declaration.
11823 (get_last_target_status, set_last_target_status): New
11824 process_stratum_target parameter.
11825 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
11826 process_stratum_target parameter, and use it.
11827 (clear_inline_frame_state (thread_info*)): New.
11828 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
11829 process_stratum_target parameter.
11830 (clear_inline_frame_state (thread_info*)): Declare.
11831 * linux-fork.c (delete_checkpoint_command): Pass target down to
11832 find_thread_ptid.
11833 (checkpoint_command): Adjust.
11834 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
11835 instead of just tweaking inferior_ptid.
11836 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
11837 (exit_lwp): Pass target down to find_thread_ptid.
11838 (attach_proc_task_lwp_callback): Pass target down to
11839 add_thread/set_running/set_executing.
11840 (linux_nat_target::attach): Pass target down to
11841 thread_change_ptid.
11842 (get_detach_signal): Pass target down to find_thread_ptid.
11843 Consider last target status's target.
11844 (linux_resume_one_lwp_throw, resume_lwp)
11845 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
11846 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
11847 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
11848 (linux_nat_target::async_wait_fd): New.
11849 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
11850 target down.
11851 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
11852 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
11853 * linux-thread-db.c (struct thread_db_info::process_target): New
11854 field.
11855 (add_thread_db_info): Save target.
11856 (get_thread_db_info): New process_stratum_target parameter. Also
11857 match target.
11858 (delete_thread_db_info): New process_stratum_target parameter.
11859 Also match target.
11860 (thread_from_lwp): Adjust to pass down target.
11861 (thread_db_notice_clone): Pass down target.
11862 (check_thread_db_callback): Pass down target.
11863 (try_thread_db_load_1): Always push the thread_db target.
11864 (try_thread_db_load, record_thread): Pass target down.
11865 (thread_db_target::detach): Pass target down. Always unpush the
11866 thread_db target.
11867 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
11868 target down. Always unpush the thread_db target.
11869 (find_new_threads_callback, thread_db_find_new_threads_2)
11870 (thread_db_target::update_thread_list): Pass target down.
11871 (thread_db_target::pid_to_str): Pass current inferior down.
11872 (thread_db_target::get_thread_local_address): Pass target down.
11873 (thread_db_target::resume, maintenance_check_libthread_db): Pass
11874 target down.
11875 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
11876 * procfs.c (procfs_target::procfs_init_inferior): Declare.
11877 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
11878 (procfs_init_inferior): Rename to ...
11879 (procfs_target::procfs_init_inferior): ... this and adjust.
11880 (procfs_target::create_inferior, procfs_notice_thread)
11881 (procfs_do_thread_registers): Adjust.
11882 * ppc-fbsd-tdep.c: Include "inferior.h".
11883 (ppcfbsd_get_thread_local_address): Pass down target.
11884 * proc-service.c (ps_xfer_memory): Switch current inferior and
11885 program space as well.
11886 (get_ps_regcache): Pass target down.
11887 * process-stratum-target.c
11888 (process_stratum_target::thread_address_space)
11889 (process_stratum_target::thread_architecture): Pass target down.
11890 * process-stratum-target.h
11891 (process_stratum_target::threads_executing): New field.
11892 (as_process_stratum_target): New.
11893 * ravenscar-thread.c
11894 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
11895 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
11896 down.
11897 * record-btrace.c (record_btrace_target::info_record): Adjust.
11898 (record_btrace_target::record_method)
11899 (record_btrace_target::record_is_replaying)
11900 (record_btrace_target::fetch_registers)
11901 (get_thread_current_frame_id, record_btrace_target::resume)
11902 (record_btrace_target::wait, record_btrace_target::stop): Pass
11903 target down.
11904 * record-full.c (record_full_wait_1): Switch to event thread.
11905 Pass target down.
11906 * regcache.c (regcache::regcache)
11907 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
11908 process_stratum_target parameter and handle it.
11909 (current_thread_target): New global.
11910 (get_thread_regcache): Add process_stratum_target parameter and
11911 handle it. Switch inferior before calling target method.
11912 (get_thread_regcache): Pass target down.
11913 (get_thread_regcache_for_ptid): Pass target down.
11914 (registers_changed_ptid): Add process_stratum_target parameter and
11915 handle it.
11916 (registers_changed_thread, registers_changed): Pass target down.
11917 (test_get_thread_arch_aspace_regcache): New.
11918 (current_regcache_test): Define a couple local test_target_ops
11919 instances and use them for testing.
11920 (readwrite_regcache): Pass process_stratum_target parameter.
11921 (cooked_read_test, cooked_write_test): Pass mock_target down.
11922 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
11923 (get_thread_arch_aspace_regcache): Add process_stratum_target
11924 parameter.
11925 (regcache::target): New method.
11926 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
11927 (regcache::registers_changed_ptid): Add process_stratum_target
11928 parameter.
11929 (regcache::m_target): New field.
11930 (registers_changed_ptid): Add process_stratum_target parameter.
11931 * remote.c (remote_state::supports_vCont_probed): New field.
11932 (remote_target::async_wait_fd): New method.
11933 (remote_unpush_and_throw): Add remote_target parameter.
11934 (get_current_remote_target): Adjust.
11935 (remote_target::remote_add_inferior): Push target.
11936 (remote_target::remote_add_thread)
11937 (remote_target::remote_notice_new_inferior)
11938 (get_remote_thread_info): Pass target down.
11939 (remote_target::update_thread_list): Skip threads of inferiors
11940 bound to other targets. (remote_target::close): Don't discard
11941 inferiors. (remote_target::add_current_inferior_and_thread)
11942 (remote_target::process_initial_stop_replies)
11943 (remote_target::start_remote)
11944 (remote_target::remote_serial_quit_handler): Pass down target.
11945 (remote_target::remote_unpush_target): New remote_target
11946 parameter. Unpush the target from all inferiors.
11947 (remote_target::remote_unpush_and_throw): New remote_target
11948 parameter. Pass it down.
11949 (remote_target::open_1): Check whether the current inferior has
11950 execution instead of checking whether any inferior is live. Pass
11951 target down.
11952 (remote_target::remote_detach_1): Pass down target. Use
11953 remote_unpush_target.
11954 (extended_remote_target::attach): Pass down target.
11955 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
11956 (remote_target::append_resumption): Pass down target.
11957 (remote_target::append_pending_thread_resumptions)
11958 (remote_target::remote_resume_with_hc, remote_target::resume)
11959 (remote_target::commit_resume): Pass down target.
11960 (remote_target::remote_stop_ns): Check supports_vCont_probed.
11961 (remote_target::interrupt_query)
11962 (remote_target::remove_new_fork_children)
11963 (remote_target::check_pending_events_prevent_wildcard_vcont)
11964 (remote_target::remote_parse_stop_reply)
11965 (remote_target::process_stop_reply): Pass down target.
11966 (first_remote_resumed_thread): New remote_target parameter. Pass
11967 it down.
11968 (remote_target::wait_as): Pass down target.
11969 (unpush_and_perror): New remote_target parameter. Pass it down.
11970 (remote_target::readchar, remote_target::remote_serial_write)
11971 (remote_target::getpkt_or_notif_sane_1)
11972 (remote_target::kill_new_fork_children, remote_target::kill): Pass
11973 down target.
11974 (remote_target::mourn_inferior): Pass down target. Use
11975 remote_unpush_target.
11976 (remote_target::core_of_thread)
11977 (remote_target::remote_btrace_maybe_reopen): Pass down target.
11978 (remote_target::pid_to_exec_file)
11979 (remote_target::thread_handle_to_thread_info): Pass down target.
11980 (remote_target::async_wait_fd): New.
11981 * riscv-fbsd-tdep.c: Include "inferior.h".
11982 (riscv_fbsd_get_thread_local_address): Pass down target.
11983 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
11984 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
11985 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
11986 Adjust.
11987 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
11988 * solib-svr4.c (enable_break): Pass down target.
11989 * spu-multiarch.c (parse_spufs_run): Pass down target.
11990 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
11991 * target-delegates.c: Regenerate.
11992 * target.c (g_target_stack): Delete.
11993 (current_top_target): Return the current inferior's top target.
11994 (target_has_execution_1): Refer to the passed-in inferior's top
11995 target.
11996 (target_supports_terminal_ours): Check whether the initial
11997 inferior was already created.
11998 (decref_target): New.
11999 (target_stack::push): Incref/decref the target.
12000 (push_target, push_target, unpush_target): Adjust.
12001 (target_stack::unpush): Defref target.
12002 (target_is_pushed): Return bool. Adjust to refer to the current
12003 inferior's target stack.
12004 (dispose_inferior): Delete, and inline parts ...
12005 (target_preopen): ... here. Only dispose of the current inferior.
12006 (target_detach): Hold strong target reference while detaching.
12007 Pass target down.
12008 (target_thread_name): Add assertion.
12009 (target_resume): Pass down target.
12010 (target_ops::beneath, find_target_at): Adjust to refer to the
12011 current inferior's target stack.
12012 (get_dummy_target): New.
12013 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
12014 has a thread running.
12015 (initialize_targets): Rename to ...
12016 (_initialize_target): ... this.
12017 * target.h: Include "gdbsupport/refcounted-object.h".
12018 (struct target_ops): Inherit refcounted_object.
12019 (target_ops::shortname, target_ops::longname): Make const.
12020 (target_ops::async_wait_fd): New method.
12021 (decref_target): Declare.
12022 (struct target_ops_ref_policy): New.
12023 (target_ops_ref): New typedef.
12024 (get_dummy_target): Declare function.
12025 (target_is_pushed): Return bool.
12026 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
12027 (all_matching_threads_iterator::all_matching_threads_iterator):
12028 Handle filter target.
12029 * thread-iter.h (struct all_matching_threads_iterator, struct
12030 all_matching_threads_range, class all_non_exited_threads_range):
12031 Filter by target too. Remove explicit.
12032 * thread.c (threads_executing): Delete.
12033 (inferior_thread): Pass down current inferior.
12034 (clear_thread_inferior_resources): Pass down thread pointer
12035 instead of ptid_t.
12036 (add_thread_silent, add_thread_with_info, add_thread): Add
12037 process_stratum_target parameter. Use it for thread and inferior
12038 searches.
12039 (is_current_thread): New.
12040 (thread_info::deletable): Use it.
12041 (find_thread_ptid, thread_count, in_thread_list)
12042 (thread_change_ptid, set_resumed, set_running): New
12043 process_stratum_target parameter. Pass it down.
12044 (set_executing): New process_stratum_target parameter. Pass it
12045 down. Adjust reference to 'threads_executing'.
12046 (threads_are_executing): New process_stratum_target parameter.
12047 Adjust reference to 'threads_executing'.
12048 (set_stop_requested, finish_thread_state): New
12049 process_stratum_target parameter. Pass it down.
12050 (switch_to_thread): Also match inferior.
12051 (switch_to_thread): New process_stratum_target parameter. Pass it
12052 down.
12053 (update_threads_executing): Reimplement.
12054 * top.c (quit_force): Pop targets from all inferior.
12055 (gdb_init): Don't call initialize_targets.
12056 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
12057 Declare.
12058 (windows_add_thread, windows_delete_thread): Adjust.
12059 (get_windows_debug_event): Rename to ...
12060 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
12061 * tracefile-tfile.c (tfile_target_open): Pass down target.
12062 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
12063 Forward declare.
12064 (switch_to_thread): Add process_stratum_target parameter.
12065 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
12066 parameter. Use it.
12067 (mi_on_resume): Pass target down.
12068 * nat/fork-inferior.c (startup_inferior): Add
12069 process_stratum_target parameter. Pass it down.
12070 * nat/fork-inferior.h (startup_inferior): Add
12071 process_stratum_target parameter.
12072 * python/py-threadevent.c (py_get_event_thread): Pass target down.
12073
12074 2020-01-10 Pedro Alves <palves@redhat.com>
12075
12076 * remote.c (remote_target::start_remote): Don't set inferior_ptid
12077 directly. Instead find the first thread in the thread list and
12078 use switch_to_thread.
12079
12080 2020-01-10 Pedro Alves <palves@redhat.com>
12081
12082 * remote.c (remote_target::remote_add_inferior): Don't bind a
12083 process to the current inferior if the current inferior is already
12084 bound to a process.
12085
12086 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
12087 Pedro Alves <palves@redhat.com>
12088
12089 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
12090 If no process is specified, return null_ptid instead of
12091 inferior_ptid.
12092 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
12093 TARGET_WAITKIND_SIGNALLED with no pid.
12094
12095 2020-01-10 Pedro Alves <palves@redhat.com>
12096
12097 * remote.c (first_remote_resumed_thread): New.
12098 (remote_target::wait_as): Use it as default event_ptid instead of
12099 inferior_ptid.
12100
12101 2020-01-10 Pedro Alves <palves@redhat.com>
12102
12103 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
12104
12105 2020-01-10 Pedro Alves <palves@redhat.com>
12106
12107 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
12108 not -1.
12109
12110 2020-01-10 Pedro Alves <palves@redhat.com>
12111
12112 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
12113 ptid to get_last_target_status.
12114 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
12115 ptid to get_last_target_status.
12116 * infcmd.c (continue_command): Don't pass a target_waitstatus to
12117 get_last_target_status.
12118 (info_program_command): Don't pass a target_waitstatus to
12119 get_last_target_status.
12120 * infrun.c (init_wait_for_inferior): Use
12121 nullify_last_target_wait_ptid.
12122 (get_last_target_status): Handle nullptr arguments.
12123 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
12124 (print_stop_event): Don't pass a ptid to get_last_target_status.
12125 (normal_stop): Don't pass a ptid to get_last_target_status.
12126 * infrun.h (get_last_target_status, set_last_target_status): Move
12127 comments here and update.
12128 (nullify_last_target_wait_ptid): Declare.
12129 * linux-fork.c (fork_load_infrun_state): Remove local extern
12130 declaration of nullify_last_target_wait_ptid.
12131 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
12132 to get_last_target_status.
12133
12134 2020-01-10 Pedro Alves <palves@redhat.com>
12135
12136 * gdbthread.h (scoped_restore_current_thread)
12137 <dont_restore, restore, m_dont_restore>: Declare.
12138 * thread.c (thread_alive): Add assertion. Return bool.
12139 (switch_to_thread_if_alive): New.
12140 (prune_threads): Switch inferior/thread.
12141 (print_thread_info_1): Switch thread before calling target methods.
12142 (scoped_restore_current_thread::restore): New, factored out from
12143 ...
12144 (scoped_restore_current_thread::~scoped_restore_current_thread):
12145 ... this.
12146 (scoped_restore_current_thread::scoped_restore_current_thread):
12147 Add assertion.
12148 (thread_apply_all_command, thread_select): Use
12149 switch_to_thread_if_alive.
12150 * infrun.c (proceed, restart_threads, handle_signal_stop)
12151 (switch_back_to_stepped_thread): Switch current thread before
12152 calling target methods.
12153
12154 2020-01-10 Pedro Alves <palves@redhat.com>
12155
12156 * inferior.c (switch_to_inferior_no_thread): New function,
12157 factored out from ...
12158 (inferior_command): ... here.
12159 * inferior.h (switch_to_inferior_no_thread): Declare.
12160 * mi/mi-main.c (run_one_inferior): Use
12161 switch_to_inferior_no_thread.
12162
12163 2020-01-10 Pedro Alves <palves@redhat.com>
12164
12165 * infcmd.c (kill_command): Remove dead code.
12166
12167 2020-01-10 Pedro Alves <palves@redhat.com>
12168
12169 * remote.c (remote_target::mourn_inferior): No longer check
12170 whether the target is running.
12171
12172 2020-01-10 Pedro Alves <palves@redhat.com>
12173
12174 * corelow.c (core_target::has_execution): Change parameter type to
12175 inferior pointer.
12176 * inferior.c (number_of_live_inferiors): Use
12177 inferior::has_execution instead of target_has_execution_1.
12178 * inferior.h (inferior::has_execution): New.
12179 * linux-thread-db.c (thread_db_target::update_thread_list): Use
12180 inferior::has_execution instead of target_has_execution_1.
12181 * process-stratum-target.c
12182 (process_stratum_target::has_execution): Change parameter type to
12183 inferior pointer. Check the inferior's PID instead of
12184 inferior_ptid.
12185 * process-stratum-target.h
12186 (process_stratum_target::has_execution): Change parameter type to
12187 inferior pointer.
12188 * record-full.c (record_full_core_target::has_execution): Change
12189 parameter type to inferior pointer.
12190 * target.c (target_has_execution_1): Change parameter type to
12191 inferior pointer.
12192 (target_has_execution_current): Adjust.
12193 * target.h (target_ops::has_execution): Change parameter type to
12194 inferior pointer.
12195 (target_has_execution_1): Change parameter type to inferior
12196 pointer. Change return type to bool.
12197 * tracefile.h (tracefile_target::has_execution): Change parameter
12198 type to inferior pointer.
12199
12200 2020-01-10 Pedro Alves <palves@redhat.com>
12201
12202 * exceptions.c (print_flush): Remove current_top_target() check.
12203
12204 2020-01-10 Pedro Alves <palves@redhat.com>
12205
12206 * remote.c (show_remote_exec_file): Show the current inferior's
12207 exec-file instead of the command variable's value.
12208
12209 2020-01-10 Pedro Alves <palves@redhat.com>
12210
12211 * record-full.c (record_full_resume_ptid): New global.
12212 (record_full_target::resume): Set it.
12213 (record_full_wait_1): Use record_full_resume_ptid instead of
12214 inferior_ptid.
12215
12216 2020-01-10 Pedro Alves <palves@redhat.com>
12217
12218 * gdbthread.h (scoped_restore_current_thread)
12219 <dont_restore, restore, m_dont_restore>: Declare.
12220 * thread.c (thread_alive): Add assertion. Return bool.
12221 (switch_to_thread_if_alive): New.
12222 (prune_threads): Switch inferior/thread.
12223 (print_thread_info_1): Switch thread before calling target methods.
12224 (scoped_restore_current_thread::restore): New, factored out from
12225 ...
12226 (scoped_restore_current_thread::~scoped_restore_current_thread):
12227 ... this.
12228 (scoped_restore_current_thread::scoped_restore_current_thread):
12229 Add assertion.
12230 (thread_apply_all_command, thread_select): Use
12231 switch_to_thread_if_alive.
12232
12233 2020-01-10 George Barrett <bob@bob131.so>
12234
12235 * stap-probe.c (stap_modify_semaphore): Don't check for null
12236 semaphores.
12237 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
12238 for null semaphores.
12239
12240 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
12241
12242 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
12243 all source windows, and maintain horizontal scroll status while
12244 doing so.
12245
12246 2020-01-09 Tom Tromey <tom@tromey.com>
12247
12248 PR tui/18932:
12249 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
12250 update_source_window, not print_source_lines.
12251
12252 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
12253
12254 * tui/tui.c (tui_enable): Register tui hooks after calling
12255 tui_display_main.
12256
12257 2020-01-09 Christian Biesinger <cbiesinger@google.com>
12258
12259 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
12260
12261 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
12262
12263 * thread.c (print_thread_info_1): Fix indentation.
12264
12265 2020-01-09 Christian Biesinger <cbiesinger@google.com>
12266
12267 * symtab.c (general_symbol_info::compute_and_set_names): Move the
12268 unique_xmalloc_ptr outside the if to always free the demangled name.
12269
12270 2020-01-08 Tom Tromey <tromey@adacore.com>
12271
12272 * xcoffread.c (enter_line_range, read_xcoff_symtab)
12273 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
12274 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
12275 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
12276 Remove.
12277 (section_offsets): New typedef.
12278 * symtab.c (fixup_section, get_msymbol_address): Update.
12279 * symmisc.c (dump_msymbols): Update.
12280 * symfile.h (relative_addr_info_to_section_offsets)
12281 (symfile_map_offsets_to_segments): Update.
12282 * symfile.c (build_section_addr_info_from_objfile)
12283 (init_objfile_sect_indices): Update.
12284 (struct place_section_arg): Change type of "offsets".
12285 (place_section): Update.
12286 (relative_addr_info_to_section_offsets): Change type of
12287 "section_offsets". Remove "num_sections" parameter.
12288 (default_symfile_offsets, syms_from_objfile_1)
12289 (set_objfile_default_section_offset): Update.
12290 (reread_symbols): No need to preserve section offsets by hand.
12291 (symfile_map_offsets_to_segments): Change type of "offsets".
12292 * stap-probe.c (relocate_address): Update.
12293 * stabsread.h (process_one_symbol): Update.
12294 * solib-target.c (struct lm_info_target) <offsets>: Change type.
12295 (solib_target_relocate_section_addresses): Update.
12296 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
12297 Update.
12298 * solib-frv.c (frv_relocate_main_executable): Update.
12299 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
12300 * solib-aix.c (solib_aix_get_section_offsets): Change return
12301 type.
12302 (solib_aix_solib_create_inferior_hook): Update.
12303 * remote.c (remote_target::get_offsets): Update.
12304 * psymtab.c (find_pc_sect_psymtab): Update.
12305 * psympriv.h (struct partial_symbol) <address, text_low,
12306 text_high>: Update.
12307 * objfiles.h (obj_section_offset): Update.
12308 (struct objfile) <section_offsets>: Change type.
12309 <num_sections>: Remove.
12310 (objfile_relocate): Update.
12311 * objfiles.c (entry_point_address_query): Update
12312 (relocate_one_symbol): Change type of "section_offsets".
12313 (objfile_relocate1, objfile_relocate1): Change type of
12314 "new_offsets".
12315 (objfile_rebase1): Update.
12316 * mipsread.c (mipscoff_symfile_read): Update.
12317 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
12318 parameter.
12319 * mdebugread.c (parse_symbol): Change type of "section_offsets".
12320 (parse_external, psymtab_to_symtab_1): Update.
12321 * machoread.c (macho_symfile_offsets): Update.
12322 * ia64-tdep.c (ia64_find_unwind_table): Update.
12323 * hppa-tdep.c (read_unwind_info): Update.
12324 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
12325 * dwarf2read.c (create_addrmap_from_index)
12326 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
12327 (process_psymtab_comp_unit_reader, add_partial_symbol)
12328 (add_partial_subprogram, process_full_comp_unit)
12329 (read_file_scope, read_func_scope, read_lexical_block_scope)
12330 (read_call_site_scope, dwarf2_rnglists_process)
12331 (dwarf2_ranges_process, dwarf2_ranges_read)
12332 (dwarf_decode_lines_1, var_decode_location, new_symbol)
12333 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
12334 Update.
12335 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
12336 Update.
12337 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
12338 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
12339 (process_one_symbol): Change type of "section_offsets".
12340 * ctfread.c (get_objfile_text_range): Update.
12341 * coffread.c (coff_symtab_read, enter_linenos)
12342 (process_coff_symbol): Update.
12343 * coff-pe-read.c (add_pe_forwarded_sym): Update.
12344 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
12345
12346 2020-01-08 Tom Tromey <tromey@adacore.com>
12347
12348 * dwarf2read.c (parse_macro_definition): Use std::string.
12349 (parse_macro_definition): Likewise.
12350
12351 2020-01-08 Tom Tromey <tromey@adacore.com>
12352
12353 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
12354 (ATTR_ALLOC_CHUNK): Remove.
12355
12356 2020-01-08 Tom Tromey <tromey@adacore.com>
12357
12358 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
12359
12360 2020-01-08 Tom Tromey <tromey@adacore.com>
12361
12362 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
12363 (dwarf2_compute_name, open_dwo_file): Likewise.
12364 (process_enumeration_scope): Use std::vector.
12365 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
12366 (partial_die_info::fixup, dwarf2_start_subfile)
12367 (guess_full_die_structure_name, dwarf2_name): Likewise.
12368 (determine_prefix): Update.
12369 (guess_full_die_structure_name): Make return type const.
12370 (partial_die_full_name): Return unique_xmalloc_ptr.
12371 (DW_FIELD_ALLOC_CHUNK): Remove.
12372
12373 2020-01-07 Tom Tromey <tromey@adacore.com>
12374
12375 PR build/24937:
12376 * stap-probe.c (class stap_static_probe_ops): Add constructor.
12377
12378 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
12379
12380 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
12381
12382 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
12383
12384 * stack.c (print_frame_info): Move disassemble_next_line code
12385 inside source_print block.
12386
12387 2020-01-06 Eli Zaretskii <eliz@gnu.org>
12388
12389 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
12390 gdb/signals.h, as we are now using native signal symbols.
12391
12392 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
12393
12394 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
12395 overflow by an early check of content vs threshold.
12396 * tui/tui-source.c (tui_source_window::line_is_displayed):
12397 Likewise.
12398
12399 2020-01-06 Eli Zaretskii <eliz@gnu.org>
12400
12401 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
12402
12403 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
12404
12405 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
12406 export table if no section contains it's RVA.
12407
12408 2020-01-06 Eli Zaretskii <eliz@gnu.org>
12409
12410 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
12411
12412 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
12413
12414 * source.c (print_source_lines_base): Set last_line_listed.
12415
12416 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
12417
12418 * tui/tui-disasm.c: Remove trailing spaces.
12419
12420 2020-01-06 Eli Zaretskii <eliz@gnu.org>
12421 Pedro Alves <palves@redhat.com>
12422
12423 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
12424 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
12425 (windows_gdb_signal_to_target): New function, uses the above
12426 enumeration to convert GDB internal signal codes to equivalent
12427 Windows codes.
12428 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
12429 * windows-nat.c: Include "gdb_wait.h".
12430 (get_windows_debug_event): Extract the fatal exception from the
12431 exit status and convert to the equivalent Posix signal number.
12432 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
12433 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
12434 * gdbsupport/gdb_wait.c: New file, implements
12435 windows_status_to_termsig.
12436 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
12437 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
12438
12439 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
12440
12441 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
12442 show_layout.
12443
12444 2020-01-05 Luis Machado <luis.machado@linaro.org>
12445
12446 * aarch64-linux-nat.c
12447 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
12448 and bfd_mach_aarch64.
12449
12450 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
12451
12452 * ui-file.c (stdio_file::can_emit_style_escape)
12453 (tee_file::can_emit_style_escape): Ensure style is used also on
12454 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
12455 to gdb_stdout.
12456 * main.c (set_gdb_data_directory): Use file style to output the
12457 warning that the given pathname is not a directory.
12458 * top.c (show_history_filename, gdb_safe_append_history)
12459 (show_gdb_datadir): Use file style.
12460
12461 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
12462
12463 * solib-target.c (struct lm_info_target):
12464 Change offsets to be a unique_xmalloc_ptr.
12465 (solib_target_relocate_section_addresses): Update.
12466
12467 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
12468
12469 * windows-nat.c (windows_clear_solib): Free so_list linked list.
12470
12471 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
12472
12473 * MAINTAINERS (Write After Approval): Add myself.
12474
12475 2020-01-02 Luis Machado <luis.machado@linaro.org>
12476
12477 * proc-service.c (get_ps_regcache): Remove reference to obsolete
12478 Cell BE architecture.
12479 * target.h (struct target_ops) <thread_architecture>: Likewise.
12480
12481 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
12482
12483 * Makefile.in: Use INSTALL_PROGRAM_ENV.
12484
12485 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
12486
12487 * MAINTAINERS (Write After Approval): Add myself.
12488
12489 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12490
12491 * gdbarch.sh: Update copyright year range of generated files.
12492
12493 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12494
12495 Update copyright year range in all GDB files.
12496
12497 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12498
12499 * copyright.py: Convert to Python 3.
12500
12501 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12502
12503 * copyright.py: Adapt after move of gnulib directory from gdb
12504 directory to toplevel directory.
12505
12506 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12507
12508 * copyright.py (main): Exit if run from the wrong directory.
12509
12510 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12511
12512 * top.c (print_gdb_version): Change copyright year to 2020.
12513
12514 2020-01-01 Joel Brobecker <brobecker@adacore.com>
12515
12516 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
12517
12518 For older changes see ChangeLog-2019.
12519 \f
12520 Local Variables:
12521 mode: change-log
12522 left-margin: 8
12523 fill-column: 74
12524 version-control: never
12525 coding: utf-8
12526 End: