]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
gdb: Print compatible information within print_xml_feature
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * target-descriptions.c (class tdesc_compatible_info): New class.
4 (struct target_desc): Change type of compatible vector.
5 (tdesc_compatible_p): Update for change in type of
6 target_desc::compatible.
7 (tdesc_compatible_info_list): New function.
8 (tdesc_compatible_info_arch_name): New function.
9 (tdesc_add_compatible): Update for change in type of
10 target_desc::compatible.
11 (print_c_tdesc::visit_pre): Likewise.
12
13 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
14
15 * target-descriptions.c (print_c_tdesc::print_c_tdesc): Change
16 whitespace to underscore.
17 (maint_print_c_tdesc_cmd): Use fake filename for target
18 descriptions that came from the target.
19 (_initialize_target_descriptions): Add filename command completion
20 for 'maint print c-tdesc'.
21
22 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
23
24 * dwarf2/loc.c (decode_debug_loclists_addresses): Add empty
25 lines.
26
27 2020-06-23 Simon Marchi <simon.marchi@efficios.com>
28
29 * dwarf2/loc.c (decode_debug_loc_dwo_addresses): Add empty
30 lines.
31 (dwarf2_find_location_expression): Likewise.
32 (call_site_parameter_matches): Likewise.
33 (dwarf2_compile_expr_to_ax): Likewise.
34 (disassemble_dwarf_expression): Likewise.
35 (loclist_describe_location): Likewise.
36
37 2020-06-23 Pedro Alves <palves@redhat.com>
38
39 * gdbarch-selftests.c: Don't include inferior.h, gdbthread.h or
40 progspace-and-thread.h. Include scoped-mock-context.h instead.
41 (register_to_value_test): Use scoped_mock_context.
42 * regcache.c: Include "scoped-mock-context.h".
43 (cooked_read_test): Don't error out if a target is already pushed.
44 Use scoped_mock_context. Adjust.
45 * scoped-mock-context.h: New file.
46
47 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
48
49 * ada-lang.c (ada_language_data): Delete la_is_string_type_p
50 initializer.
51 (ada_language::is_string_type_p): New member function.
52 * c-lang.c (c_language_data): Delete la_is_string_type_p
53 initializer.
54 (cplus_language_data): Likewise.
55 (asm_language_data): Likewise.
56 (minimal_language_data): Likewise.
57 * d-lang.c (d_language_data): Likewise.
58 * f-lang.c (f_is_string_type_p): Delete function, implementation
59 moved to f_language::is_string_type_p.
60 (f_language_data): Delete la_is_string_type_p initializer.
61 (f_language::is_string_type_p): New member function,
62 implementation from f_is_string_type_p.
63 * go-lang.c (go_is_string_type_p): Delete function, implementation
64 moved to go_language::is_string_type_p.
65 (go_language_data): Delete la_is_string_type_p initializer.
66 (go_language::is_string_type_p): New member function,
67 implementation from go_is_string_type_p.
68 * language.c (language_defn::is_string_type_p): Define new member
69 function.
70 (default_is_string_type_p): Make static, add comment copied from
71 header file.
72 (unknown_language_data): Delete la_is_string_type_p initializer.
73 (unknown_language::is_string_type_p): New member function.
74 (auto_language_data): Delete la_is_string_type_p initializer.
75 (auto_language::is_string_type_p): New member function.
76 * language.h (language_data): Delete la_is_string_type_p field.
77 (language_defn::is_string_type_p): Declare new function.
78 (default_is_string_type_p): Delete desclaration, move comment to
79 definition.
80 * m2-lang.c (m2_is_string_type_p): Delete function, implementation
81 moved to m2_language::is_string_type_p.
82 (m2_language_data): Delete la_is_string_type_p initializer.
83 (m2_language::is_string_type_p): New member function,
84 implementation from m2_is_string_type_p.
85 * objc-lang.c (objc_language_data): Delete la_is_string_type_p
86 initializer.
87 * opencl-lang.c (opencl_language_data): Likewise.
88 * p-lang.c (pascal_is_string_type_p): Delete function,
89 implementation moved to pascal_language::is_string_type_p.
90 (pascal_language_data): Delete la_is_string_type_p initializer.
91 (pascal_language::is_string_type_p): New member function,
92 implementation from pascal_is_string_type_p.
93 * rust-lang.c (rust_is_string_type_p): Delete function,
94 implementation moved to rust_language::is_string_type_p.
95 (rust_language_data): Delete la_is_string_type_p initializer.
96 (rust_language::is_string_type_p): New member function,
97 implementation from rust_is_string_type_p.
98 * valprint.c (val_print_scalar_or_string_type_p): Update call to
99 is_string_type_p.
100
101 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
102
103 * ada-lang.c (ada_language_data): Delete la_print_typedef
104 initializer.
105 (ada_language::print_typedef): New member function.
106 * c-lang.c (c_language_data): Delete la_print_typedef initializer.
107 (cplus_language_data): Likewise.
108 (asm_language_data): Likewise.
109 (minimal_language_data): Likewise.
110 * d-lang.c (d_language_data): Likewise.
111 * f-lang.c (f_language_data): Likewise.
112 (f_language::print_typedef): New member function.
113 * go-lang.c (go_language_data): Delete la_print_typedef
114 initializer.
115 * language.c (language_defn::print_typedef): Define member
116 function.
117 (unknown_language_data): Delete la_print_typedef initializer.
118 (unknown_language::print_typedef): New member function.
119 (auto_language_data): Delete la_print_typedef initializer.
120 (auto_language::print_typedef): New member function.
121 * language.h (language_data): Delete la_print_typedef field.
122 (language_defn::print_typedef): Declare new member function.
123 (LA_PRINT_TYPEDEF): Update call to print_typedef.
124 (default_print_typedef): Delete declaration.
125 * m2-lang.c (m2_language_data): Delete la_print_typedef
126 initializer.
127 (m2_language::print_typedef): New member function.
128 * objc-lang.c (objc_language_data): Delete la_print_typedef
129 initializer.
130 * opencl-lang.c (opencl_language_data): Likewise.
131 * p-lang.c (pascal_language_data): Likewise.
132 (pascal_language::print_typedef): New member function.
133 * rust-lang.c (rust_print_typedef): Delete function,
134 implementation moved to rust_language::print_typedef.
135 (rust_language): Delete la_print_typedef initializer.
136 (rust_language::print_typedef): New member function,
137 implementation from rust_print_typedef.
138 * typeprint.c (default_print_typedef): Delete.
139
140 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
141
142 * ada-lang.c (ada_language_data): Delete la_printstr initializer.
143 (ada_language::printstr): New member function.
144 * c-lang.c (c_language_data): Delete la_printstr initializer.
145 (cplus_language_data): Likewise.
146 (asm_language_data): Likewise.
147 (minimal_language_data): Likewise.
148 * d-lang.c (d_language_data): Likewise.
149 * f-lang.c (f_printstr): Rename to f_language::printstr.
150 (f_language_data): Delete la_printstr initializer.
151 (f_language::printstr): New member function, implementation from
152 f_printstr.
153 * go-lang.c (go_language_data): Delete la_printstr initializer.
154 * language.c (language_defn::printstr): Define new member
155 function.
156 (unk_lang_printstr): Delete.
157 (unknown_language_data): Delete la_printstr initializer.
158 (unknown_language::printstr): New member function.
159 (auto_language_data): Delete la_printstr initializer.
160 (auto_language::printstr): New member function.
161 * language.h (language_data): Delete la_printstr field.
162 (language_defn::printstr): Declare new member function.
163 (LA_PRINT_STRING): Update call to printstr.
164 * m2-lang.c (m2_printstr): Rename to m2_language::printstr.
165 (m2_language_data): Delete la_printstr initializer.
166 (m2_language::printstr): New member function, implementation from
167 m2_printstr.
168 * objc-lang.c (objc_language_data): Delete la_printstr
169 initializer.
170 * opencl-lang.c (opencl_language_data): Likewise.
171 * p-lang.c (pascal_printstr): Rename to pascal_language::printstr.
172 (pascal_language_data): Delete la_printstr initializer.
173 (pascal_language::printstr): New member function, implementation
174 from pascal_printstr.
175 * p-lang.h (pascal_printstr): Delete declaration.
176 * rust-lang.c (rust_printstr): Update header comment.
177 (rust_language_data): Delete la_printstr initializer.
178 (rust_language::printstr): New member function.
179
180 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
181
182 * ada-lang.c (ada_language_data): Delete la_printchar initializer.
183 (ada_language::printchar): New member function.
184 * c-lang.c (c_language_data): Delete la_printchar initializer.
185 (cplus_language_data): Likewise.
186 (asm_language_data): Likewise.
187 (minimal_language_data): Likewise.
188 * d-lang.c (d_language_data): Likewise.
189 * f-lang.c (f_printchar): Rename to f_language::printchar.
190 (f_language_data): Delete la_printchar initializer.
191 (f_language::printchar): New member function, implementation from
192 f_printchar.
193 * go-lang.c (go_language_data): Delete la_printchar initializer.
194 * language.c (unk_lang_printchar): Delete.
195 (language_defn::printchar): Define new member function.
196 (unknown_language_data): Delete la_printchar initializer.
197 (unknown_language::printchar): New member function.
198 (auto_language_data): Delete la_printchar initializer.
199 (auto_language::printchar): New member function.
200 * language.h (language_data): Delete la_printchar field.
201 (language_defn::printchar): Declare new member function.
202 (LA_PRINT_CHAR): Update call to printchar.
203 * m2-lang.c (m2_language_data): Delete la_printchar initializer.
204 (m2_language::printchar): New member function.
205 * objc-lang.c (objc_language_data): Delete la_printchar
206 initializer.
207 * opencl-lang.c (opencl_language_data): Likewise.
208 * p-lang.c (pascal_language_data): Delete la_printchar
209 initializer.
210 (pascal_language::printchar): New member function.
211 * rust-lang.c (rust_printchar): Rename to
212 rust_language::printchar.
213 (rust_language_data): Delete la_printchar initializer.
214 (rust_language::printchar): New member function, implementation
215 from rust_printchar.
216
217 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
218
219 * ada-lang.c (emit_char): Renamed to ada_language::emitchar.
220 (ada_language_data): Delete la_emitchar initializer.
221 (ada_language::emitchar): New member function, implementation from
222 emit_char.
223 * c-lang.c (c_language_data): Delete la_emitchar initializer.
224 (cplus_language_data): Likewise.
225 (asm_language_data): Likewise.
226 (minimal_language_data): Likewise.
227 * d-lang.c (d_language_data): Likewise.
228 * f-lang.c (f_emit_char): Rename to f_language::emitchar.
229 (f_language_data): Delete la_emitchar initializer.
230 (f_language::emitchar): New member function, implementation from
231 f_emit_char.
232 * go-lang.c (go_language_data): Delete la_emitchar initializer.
233 * language.c (unk_lang_emit_char): Delete.
234 (language_defn::emitchar): New member function definition.
235 (unknown_language_data): Delete la_emitchar initializer.
236 (unknown_language::emitchar): New member function.
237 (auto_language_data): Delete la_emitchar initializer.
238 (auto_language::emitchar): New member function.
239 * language.h (language_data): Delete la_emitchar field.
240 (language_defn::emitchar): New member field declaration.
241 (LA_EMIT_CHAR): Update call to emitchar.
242 * m2-lang.c (m2_emit_char): Rename to m2_language::emitchar.
243 (m2_language_data): Delete la_emitchar initializer.
244 (m2_language::emitchar): New member function, implementation from
245 m2_emit_char.
246 * objc-lang.c (objc_language_data): Delete la_emitchar
247 initializer.
248 * opencl-lang.c (opencl_language_data): Likewise.
249 * p-lang.c (pascal_emit_char): Rename to pascal_language::emitchar.
250 (pascal_language_data): Delete la_emitchar initializer.
251 (pascal_language::emitchar): New member function, implementation
252 from pascal_emit_char.
253 * rust-lang.c (rust_emitchar): Rename to rust_language::emitchar.
254 (rust_language_data): Delete la_emitchar initializer.
255 (rust_language::emitchar): New member function, implementation
256 from rust_emitchar.
257
258 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
259
260 * ada-lang.c (resolve): Rename to ada_language::post_parser.
261 (ada_language_data): Delete la_post_parser initializer.
262 (ada_language::post_parser): New member function.
263 * c-lang.c (c_language_data): Delete la_post_parser initializer.
264 (cplus_language_data): Likewise.
265 (asm_language_data): Likewise.
266 (minimal_language_data): Likewise.
267 * d-lang.c (d_language_data): Likewise.
268 * f-lang.c (f_language_data): Likewise.
269 * go-lang.c (go_language_data): Likewise.
270 * language.c (unknown_language_data): Likewise.
271 (auto_language_data): Likewise.
272 * language.h (language_data): Delete la_post_parser field.
273 (language_defn::post_parser): New member function.
274 * m2-lang.c (m2_language_data): Delete la_post_parser initializer.
275 * objc-lang.c (objc_language_data): Likewise.
276 * opencl-lang.c (opencl_language_data): Likewise.
277 * p-lang.c (pascal_language_data): Likewise.
278 * parse.c (parse_exp_in_context): Update call to post_parser.
279 (null_post_parser): Delete definition.
280 * parser-defs.h (null_post_parser): Delete declaration.
281 * rust-lang.c (rust_language_data): Delete la_post_parser
282 initializer.
283
284 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
285
286 * ada-lang.c (parse): Rename to ada_language::parser.
287 (ada_language_data): Delete la_parser initializer.
288 (ada_language::parser): New member function, implementation from
289 parse.
290 * c-lang.c (c_language_data): Delete la_parser initializer.
291 (cplus_language_data): Likewise.
292 (asm_language_data): Likewise.
293 (minimal_language_data): Likewise.
294 * d-lang.c (d_language_data): Likewise.
295 (d_language::parser): New member function.
296 * f-lang.c (f_language_data): Delete la_parser initializer.
297 (f_language::parser): New member function.
298 * go-lang.c (go_language_data): Delete la_parser initializer.
299 (go_language::parser): New member function.
300 * language.c (unk_lang_parser): Delete.
301 (language_defn::parser): Define new member function.
302 (unknown_language_data): Delete la_parser initializer.
303 (unknown_language::parser): New member function.
304 (auto_language_data): Delete la_parser initializer.
305 (auto_language::parser): New member function.
306 * language.h (language_data): Delete la_parser field.
307 (language_defn::parser): Declare new member function.
308 * m2-lang.c (m2_language_data): Delete la_parser initializer.
309 (m2_language::parser): New member function.
310 * objc-lang.c (objc_language_data): Delete la_parser initializer.
311 * opencl-lang.c (opencl_language_data): Likewise.
312 * p-lang.c (pascal_language_data): Likewise.
313 (pascal_language::parser): New member function.
314 * parse.c (parse_exp_in_context): Update call to parser.
315 * rust-lang.c (rust_language_data): Delete la_parser initializer.
316 (rust_language::parser): New member function.
317
318 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
319
320 * top.c (print_gdb_configuration): Print --with-python-libdir
321 configuration value.
322
323 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
324
325 * NEWS: Mention change to the alias command.
326
327 2020-06-22 Philippe Waroquiers <philippe.waroquiers@skynet.be>
328
329 * cli/cli-cmds.c (lookup_cmd_for_default_args)
330 (alias_command_completer)
331 (make_alias_options_def_group): New functions.
332 (alias_opts, alias_option_defs): New struct and array.
333 (alias_usage_error): Update usage.
334 (alias_command): Handles optional DEFAULT-ARGS... arguments.
335 Use option framework.
336 (_initialize_cli_cmds): Update alias command help.
337 Update aliases command help.
338 (show_user):
339 Add NULL for new default_args lookup_cmd argument.
340 (valid_command_p): Rename to validate_aliased_command.
341 Add NULL for new default_args lookup_cmd argument. Verify that the
342 aliased_command has no default args.
343 * cli/cli-decode.c (help_cmd): Show aliases definitions.
344 (lookup_cmd_1, lookup_cmd): New argument default_args.
345 (add_alias_cmd):
346 Add NULL for new default_args lookup_cmd argument.
347 (print_help_for_command): Show default args under the layout
348 alias some_alias = some_aliased_cmd some_alias_default_arg.
349 * cli/cli-decode.h (struct cmd_list_element): New member default_args.
350 xfree default_args in destructor.
351 * cli/cli-script.c (process_next_line, do_define_command):
352 Add NULL for new default_args lookup_cmd argument.
353 * command.h: Declare new default_args argument in lookup_cmd
354 and lookup_cmd_1.
355 * completer.c (complete_line_internal_1):
356 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
357 * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
358 * guile/scm-param.c (add_setshow_generic, pascm_parameter_defined_p):
359 Likewise.
360 * infcmd.c (_initialize_infcmd): Likewise.
361 * python/py-auto-load.c (gdbpy_initialize_auto_load): Likewise.
362 * python/py-cmd.c (gdbpy_parse_command_name): Likewise.
363 * python/py-param.c (add_setshow_generic): Likewise.
364 * remote.c (_initialize_remote): Likewise.
365 * top.c (execute_command): Prepend default_args if command has some.
366 (set_verbose):
367 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
368 * tracepoint.c (validate_actionline, encode_actions_1):
369 Add NULL for new default_args lookup_cmd or lookup_cmd_1 argument.
370
371 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
372
373 * jit.c (jit_read_descriptor): Use bool as the return type.
374 (jit_breakpoint_re_set_internal): Use bool as the return type.
375 Invert the return value logic; return true if the jit breakpoint
376 has been successfully initialized.
377 (jit_inferior_init): Update the call to
378 jit_breakpoint_re_set_internal.
379
380 2020-06-22 Pedro Alves <palves@redhat.com>
381
382 PR gdb/25939
383 * procfs.c (procfs_target::wait): Don't reference inferior_ptid.
384 Use the current inferior instead. Don't return
385 TARGET_WAITKIND_SPURIOUS/inferior_ptid -- instead continue and
386 wait again.
387 * sol-thread.c (sol_thread_target::wait): Don't reference
388 inferior_ptid.
389 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs)
390 (sol_update_thread_list_callback): Use the current inferior's pid
391 instead of inferior_ptid.
392
393 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
394
395 * procfs.c: Cleanup many comments.
396
397 (READ_WATCHFLAG, WRITE_WATCHFLAG, EXEC_WATCHFLAG)
398 (AFTER_WATCHFLAG): Replace by value.
399
400 (MAIN_PROC_NAME_FORMAT): Inline ...
401 (create_procinfo): ... here.
402
403 (procfs_debug_inferior): Remove SYS_exec handling.
404 (syscall_is_exec): Likewise.
405 (procfs_set_exec_trap): Likewise.
406
407 (syscall_is_lwp_exit): Inline in callers.
408 (syscall_is_exit): Likewise.
409 (syscall_is_exec): Likewise.
410 (syscall_is_lwp_create): Likewise.
411
412 (invalidate_cache): Remove #if 0 code.
413
414 (make_signal_thread_runnable): Remove.
415 (procfs_target::resume): Remove #if 0 code.
416
417 2020-06-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
418
419 PR gdb/25939
420 * procfs.c (procfs_target::procfs_init_inferior): Move push_target
421 call ...
422 (procfs_target::create_inferior): ... here.
423
424 2020-06-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
425
426 * exec.c (validate_exec_file): Ensure the build-id is up to
427 date by calling reopen_exec_file (that checks file timestamp
428 to decide to re-read the file).
429
430 2020-06-18 Pedro Alves <palves@redhat.com>
431
432 PR gdb/25412
433 * gdbthread.h (delete_thread, delete_thread_silent)
434 (find_thread_ptid): Update comments.
435 * thread.c (current_thread_): New global.
436 (is_current_thread): Move higher, and reimplement.
437 (inferior_thread): Reimplement.
438 (set_thread_exited): Use bool. Add assertions.
439 (add_thread_silent): Simplify thread-reuse handling by always
440 calling delete_thread.
441 (delete_thread): Remove intro comment.
442 (find_thread_ptid): Skip exited threads.
443 (switch_to_thread_no_regs): Write to current_thread_.
444 (switch_to_no_thread): Check CURRENT_THREAD_ instead of
445 INFERIOR_PTID. Clear current_thread_.
446
447 2020-06-18 Pedro Alves <palves@redhat.com>
448
449 * aix-thread.c (pd_update): Use switch_to_thread.
450
451 2020-06-18 Pedro Alves <palves@redhat.com>
452
453 * ravenscar-thread.c (ravenscar_thread_target): Update.
454 (ravenscar_thread_target::update_inferior_ptid): Rename to ...
455 (ravenscar_thread_target::add_active_thread): ... this. Don't
456 set m_base_ptid here. Update to avoid referencing inferior_ptid.
457 (ravenscar_thread_target::wait): Don't write to inferior_ptid.
458
459 2020-06-18 Pedro Alves <palves@redhat.com>
460
461 * nat/windows-nat.c (current_windows_thread): Remove.
462 * nat/windows-nat.h (current_windows_thread): Remove.
463 * windows-nat.c (windows_nat_target::stopped_by_sw_breakpoint):
464 Adjust.
465 (display_selectors): Adjust to fetch the current
466 windows_thread_info based on inferior_ptid.
467 (fake_create_process): No longer write to current_windows_thread.
468 (windows_nat_target::get_windows_debug_event):
469 Don't set inferior_ptid or current_windows_thread.
470 (windows_nat_target::wait): Adjust to not rely on
471 current_windows_thread.
472 (do_initial_windows_stuff): Now a method of windows_nat_target.
473 Switch to the last_ptid thread.
474 (windows_nat_target::attach): Adjust.
475 (windows_nat_target::detach): Use switch_to_no_thread instead of
476 writing to inferior_ptid directly.
477 (windows_nat_target::create_inferior): Adjust.
478
479 2020-06-18 Pedro Alves <palves@redhat.com>
480
481 * windows-nat.c (do_initial_windows_stuff): No longer set inferior_ptid.
482
483 2020-06-18 Pedro Alves <palves@redhat.com>
484
485 * go32-nat.c (go32_nat_target::create_inferior): Switch to thread
486 after creating it, instead of writing to inferior_ptid. Don't
487 write to inferior_ptid.
488
489 2020-06-18 Pedro Alves <palves@redhat.com>
490
491 * fork-child.c (postfork_hook): Don't write to inferior_ptid.
492
493 2020-06-18 Pedro Alves <palves@redhat.com>
494
495 * bsd-kvm.c (bsd_kvm_target_open): Switch to thread after adding
496 it, instead of writing to inferior_ptid.
497
498 2020-06-18 Pedro Alves <palves@redhat.com>
499
500 * btrace.c (btrace_fetch): Use switch_to_thread instead of writing
501 to inferior_ptid.
502
503 2020-06-18 Pedro Alves <palves@redhat.com>
504
505 * bsd-kvm.c (bsd_kvm_target::close): Use switch_to_no_thread
506 instead of writing to inferior_ptid directly.
507
508 2020-06-18 Pedro Alves <palves@redhat.com>
509
510 * corelow.c (core_target::close): Use switch_to_no_thread instead
511 of writing to inferior_ptid directly.
512 (add_to_thread_list, core_target_open): Use switch_to_thread
513 instead of writing to inferior_ptid directly.
514
515 2020-06-18 Pedro Alves <palves@redhat.com>
516
517 * darwin-nat.c (darwin_nat_target::decode_message): Don't write to
518 inferior_ptid.
519 (darwin_nat_target::stop_inferior, darwin_nat_target::kill): Avoid
520 inferior_ptid.
521 (darwin_attach_pid): Use switch_to_no_thread instead of writing to
522 inferior_ptid directly.
523 (darwin_nat_target::init_thread_list): Switch to thread, instead
524 of writing to inferior_ptid.
525 (darwin_nat_target::attach): Don't write to inferior_ptid.
526 (darwin_nat_target::get_ada_task_ptid): Avoid inferior_ptid.
527
528 2020-06-18 Pedro Alves <palves@redhat.com>
529
530 * gnu-nat.c (gnu_nat_target::create_inferior): Switch to the added
531 thread.
532 (gnu_nat_target::attach): Don't write to inferior_ptid directly.
533 Instead use switch_to_thread.
534 (gnu_nat_target::detach): Use switch_to_no_thread
535 instead of writing to inferior_ptid directly. Used passed-in
536 inferior instead of looking up the inferior by pid.
537
538 2020-06-18 Pedro Alves <palves@redhat.com>
539
540 * go32-nat.c (go32_nat_target::create_inferior): Don't write to
541 inferior_ptid.
542
543 2020-06-18 Pedro Alves <palves@redhat.com>
544
545 * nto-procfs.c (nto_procfs_target::update_thread_list): Avoid
546 inferior_ptid.
547 (nto_procfs_target::attach): Avoid inferior_ptid. Switch to
548 thread.
549 (nto_procfs_target::detach): Avoid referencing
550 inferior_ptid. Use switch_to_no_thread instead of writing to
551 inferior_ptid directly.
552 (nto_procfs_target::mourn_inferior): Use switch_to_no_thread
553 instead of writing to inferior_ptid directly.
554 (nto_procfs_target::create_inferior): Avoid inferior_ptid. Switch
555 to thread.
556
557 2020-06-18 Pedro Alves <palves@redhat.com>
558
559 * remote-sim.c (gdbsim_target::create_inferior): Switch to thread
560 after creating it, instead of writing to inferior_ptid.
561 (gdbsim_target_open): Use switch_to_no_thread instead of writing
562 to inferior_ptid directly.
563 (gdbsim_target::wait): Don't write to inferior_ptid.
564
565 2020-06-18 Pedro Alves <palves@redhat.com>
566
567 * remote.c (remote_target::remote_notice_new_inferior): Use
568 switch_to_thread instead of writing to inferior_ptid directly.
569 (remote_target::add_current_inferior_and_thread): Use
570 switch_to_no_thread instead of writing to inferior_ptid directly.
571 (extended_remote_target::attach): Use switch_to_inferior_no_thread
572 and switch_to_thread instead of using set_current_inferior or
573 writing to inferior_ptid directly.
574
575 2020-06-18 Pedro Alves <palves@redhat.com>
576
577 * tracectf.c (ctf_target_open): Switch to added thread instead of
578 writing to inferior_ptid directly.
579 (ctf_target::close): Use switch_to_no_thread instead of writing to
580 inferior_ptid directly.
581
582 2020-06-18 Pedro Alves <palves@redhat.com>
583
584 * tracefile-tfile.c (tfile_target_open): Don't write to
585 inferior_ptid directly, instead switch to added thread.
586 (tfile_target::close): Use switch_to_no_thread instead of writing
587 to inferior_ptid directly.
588
589 2020-06-18 Pedro Alves <palves@redhat.com>
590
591 * procfs.c (procfs_target::attach): Don't write to inferior_ptid.
592 (procfs_target::detach): Use switch_to_no_thread
593 instead of writing to inferior_ptid directly.
594 (do_attach): Change return type to void. Switch to the added
595 thread.
596 (procfs_target::create_inferior): Switch to the added thread.
597 (procfs_do_thread_registers): Don't write to inferior_ptid.
598
599 2020-06-18 Pedro Alves <palves@redhat.com>
600
601 * infrun.c (generic_mourn_inferior): Use switch_to_thread instead
602 of writing to inferior_ptid.
603 (scoped_restore_exited_inferior): Delete.
604 (handle_vfork_child_exec_or_exit): Simplify using
605 scoped_restore_current_pspace_and_thread. Use switch_to_thread
606 instead of writing to inferior_ptid.
607 (THREAD_STOPPED_BY): Delete.
608 (thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
609 (thread_stopped_by_hw_breakpoint): Delete.
610 (save_waitstatus): Use
611 scoped_restore_current_thread+switch_to_thread, and call
612 target_stopped_by_watchpoint instead of
613 thread_stopped_by_watchpoint, target_stopped_by_sw_breakpoint
614 instead of thread_stopped_by_sw_breakpoint, and
615 target_stopped_by_hw_breakpoint instead of
616 thread_stopped_by_hw_breakpoint.
617 (handle_inferior_event)
618 <TARGET_WAITKIND_EXITED/TARGET_WAITKIND_SIGNALLED>: Don't write to
619 inferior_ptid directly, nor
620 set_current_inferior/set_current_program_space. Use
621 switch_to_thread / switch_to_inferior_no_thread instead.
622
623 2020-06-18 Pedro Alves <palves@redhat.com>
624
625 * target.c (generic_mourn_inferior): Use switch_to_no_thread
626 instead of writing to inferior_ptid.
627
628 2020-06-18 Pedro Alves <palves@redhat.com>
629
630 * inf-ptrace.c (inf_ptrace_target::create_inferior): Switch to the
631 added thread.
632 (inf_ptrace_target::attach): Don't write to inferior_ptid. Switch
633 to the added thread.
634 (inf_ptrace_target::detach_success): Use switch_to_no_thread
635 instead of writing to inferior_ptid.
636
637 2020-06-18 Pedro Alves <palves@redhat.com>
638
639 * gdbarch-selftests.c: Include "progspace-and-thread.h".
640 (register_to_value_test): Mock a program_space too. Heap-allocate
641 the address space. Don't write to inferior_ptid. Use
642 switch_to_thread instead.
643
644 2020-06-18 Pedro Alves <palves@redhat.com>
645
646 * linux-tdep.c (find_signalled_thread(thread_info *,void *)):
647 Delete.
648 (find_signalled_thread()): New, factored out from
649 linux_make_corefile_notes and adjusted to handle exited threads.
650 (linux_make_corefile_notes): Adjust to use the new
651 find_signalled_thread.
652
653 2020-06-18 Pedro Alves <palves@redhat.com>
654
655 * linux-tdep.c (btrace_fetch): Save/restore current thread instead
656 of saving/restoring inferior_ptid.
657
658 2020-06-17 Tom Tromey <tom@tromey.com>
659
660 * tui/tui-win.h (tui_scroll_forward, tui_scroll_backward)
661 (tui_scroll_left, tui_scroll_right, struct tui_win_info): Don't
662 declare.
663 * tui/tui-data.h (MIN_CMD_WIN_HEIGHT): Remove.
664
665 2020-06-15 Simon Marchi <simon.marchi@efficios.com>
666
667 * dwarf2/read.c (dwarf2_initialize_objfile): Check for presence
668 of partial symtabs.
669
670 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
671
672 * regformats/reg-arm.dat: Remove.
673 * regformats/reg-bfin.dat: Remove.
674 * regformats/reg-cris.dat: Remove.
675 * regformats/reg-crisv32.dat: Remove.
676 * regformats/reg-m32r.dat: Remove.
677 * regformats/reg-tilegx.dat: Remove.
678 * regformats/reg-tilegx32.dat: Remove.
679
680 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
681
682 * features/Makefile (WHICH): Remove arm files.
683 * regformats/arm/arm-with-iwmmxt.dat: Remove.
684 * regformats/arm/arm-with-neon.dat: Remove.
685 * regformats/arm/arm-with-vfpv2.dat: Remove.
686 * regformats/arm/arm-with-vfpv3.dat: Remove.
687
688 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
689
690 * features/Makefile (XMLTOC): Remove rx.xml.
691
692 2020-06-17 Pedro Alves <palves@redhat.com>
693
694 * gdbthread.h (thread_control_state) <trap_expected> Update
695 comments.
696
697 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
698
699 * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
700 ada_language::lookup_symbol_nonlocal.
701 (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
702 (ada_language::lookup_symbol_nonlocal): New member function,
703 implementation from ada_lookup_symbol_nonlocal.
704 * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
705 initializer.
706 (cplus_language_data): Delete la_lookup_symbol_nonlocal
707 initializer.
708 (cplus_language::lookup_symbol_nonlocal): New member function.
709 (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
710 (minimal_language_data) Likewise.
711 * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
712 * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
713 initializer.
714 (d_language::lookup_symbol_nonlocal): New member function.
715 * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
716 initializer.
717 (f_language::lookup_symbol_nonlocal): New member function.
718 * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
719 initializer.
720 * language.c (unknown_language_data): Likewise.
721 (auto_language_data): Likewise.
722 * language.h (language_data): Delete la_lookup_symbol_nonlocal
723 field.
724 (language_defn::lookup_symbol_nonlocal): New member function.
725 * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
726 initializer.
727 * objc-lang.c (objc_language_data): Likewise.
728 * opencl-lang.c (opencl_language_data): Likewise.
729 * p-lang.c (pascal_language_data): Likewise.
730 * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
731 rust_language::lookup_symbol_nonlocal.
732 (rust_language_data): Delete la_lookup_symbol_nonlocal
733 initializer.
734 (rust_language::lookup_symbol_nonlocal): New member function,
735 implementation from rust_lookup_symbol_nonlocal.
736 * symtab.c (lookup_symbol_aux): Update call to
737 lookup_symbol_nonlocal.
738 (basic_lookup_symbol_nonlocal): Rename to...
739 (language_defn::lookup_symbol_nonlocal): ...this, and update
740 header comment. Remove language_defn parameter, and replace with
741 uses of `this'.
742 * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
743
744 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
745
746 * ada-lang.c (ada_language_data): Delete la_value_print_inner
747 initializer.
748 (ada_language::value_print_inner): New member function.
749 * c-lang.c (c_language_data): Delete la_value_print_inner
750 initializer.
751 (cplus_language_data): Likewise.
752 (asm_language_data): Likewise.
753 (minimal_language_data): Likewise.
754 * d-lang.c (d_language_data): Likewise.
755 (d_language::value_print_inner): New member function.
756 * f-lang.c (f_language_data): Delete la_value_print_inner
757 initializer.
758 (f_language::value_print_inner): New member function.
759 * f-lang.h (f_value_print_innner): Rename to...
760 (f_value_print_inner): ...this (note spelling of 'inner').
761 * f-valprint.c (f_value_print_innner): Rename to...
762 (f_value_print_inner): ...this (note spelling of 'inner').
763 * go-lang.c (go_language_data): Delete la_value_print_inner
764 initializer.
765 (go_language::value_print_inner): New member function.
766 * language.c (language_defn::value_print_inner): Define new member
767 function.
768 (unk_lang_value_print_inner): Delete.
769 (unknown_language_data): Delete la_value_print_inner initializer.
770 (unknown_language::value_print_inner): New member function.
771 (auto_language_data): Delete la_value_print_inner initializer.
772 (auto_language::value_print_inner): New member function.
773 * language.h (language_data): Delete la_value_print_inner field.
774 (language_defn::value_print_inner): Delcare new member function.
775 * m2-lang.c (m2_language_data): Delete la_value_print_inner
776 initializer.
777 (m2_language::value_print_inner): New member function.
778 * objc-lang.c (objc_language_data): Delete la_value_print_inner
779 initializer.
780 * opencl-lang.c (opencl_language_data): Likewise.
781 * p-lang.c (pascal_language_data): Likewise.
782 (pascal_language::value_print_inner): New member function.
783 * rust-lang.c (rust_language_data): Delete la_value_print_inner
784 initializer.
785 (rust_language::value_print_inner): New member function.
786 * valprint.c (do_val_print): Update call to value_print_inner.
787
788 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
789
790 * ada-lang.c (ada_language_data): Delete la_value_print
791 initializer.
792 (ada_language::value_print): New member function.
793 * c-lang.c (c_language_data): Delete la_value_print initializer.
794 (cplus_language_data): Likewise.
795 (asm_language_data): Likewise.
796 (minimal_language_data): Likewise.
797 * d-lang.c (d_language_data): Likewise.
798 * f-lang.c (f_language_data): Likewise.
799 * go-lang.c (go_language_data): Likewise.
800 * language.c (unk_lang_value_print): Delete.
801 (language_defn::value_print): Define new member function.
802 (unknown_language_data): Delete la_value_print initializer.
803 (unknown_language::value_print): New member function.
804 (auto_language_data): Delete la_value_print initializer.
805 (auto_language::value_print): New member function.
806 * language.h (language_data): Delete la_value_print field.
807 (language_defn::value_print): Declare new member function.
808 (LA_VALUE_PRINT): Update call to value_print.
809 * m2-lang.c (m2_language_data): Delete la_value_print initializer.
810 * objc-lang.c (objc_language_data): Likewise.
811 * opencl-lang.c (opencl_language_data): Likewise.
812 * p-lang.c (pascal_language_data): Likewise.
813 (pascal_language::value_print): New member function.
814 * rust-lang.c (rust_language_data): Delete la_value_print
815 initializer.
816
817 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
818
819 * ada-lang.c (ada_watch_location_expression): Rename to
820 ada_language::watch_location_expression.
821 (ada_language_data): Delete la_watch_location_expression
822 initializer.
823 (ada_language::watch_location_expression): New member function,
824 implementation from ada_watch_location_expression.
825 * breakpoint.c (watch_command_1): Update call to
826 watch_location_expression.
827 * c-lang.c (c_watch_location_expression): Rename to
828 language_defn::watch_location_expression.
829 (c_language_data): Delete la_watch_location_expression
830 initializer.
831 (cplus_language_data): Likewise.
832 (asm_language_data): Likewise.
833 (minimal_language_data): Likewise.
834 * c-lang.h (c_watch_location_expression): Delete declaration.
835 * d-lang.c (d_language_data): Delete la_watch_location_expression
836 initializer.
837 * f-lang.c (f_language_data): Likewise.
838 * go-lang.c (go_language_data): Likewise.
839 * language.c (language_defn::watch_location_expression): Member
840 function implementation from c_watch_location_expression.
841 (unknown_language_data): Delete la_watch_location_expression
842 initializer.
843 (auto_language_data): Likewise.
844 * language.h (language_data): Delete la_watch_location_expression
845 field.
846 (language_defn::watch_location_expression): Declare new member
847 function.
848 * m2-lang.c (m2_language_data): Delete
849 la_watch_location_expression initializer.
850 * objc-lang.c (objc_language_data): Likewise.
851 * opencl-lang.c (opencl_language_data): Likewise.
852 * p-lang.c (pascal_language_data): Likewise.
853 * rust-lang.c (rust_watch_location_expression): Rename to
854 rust_language::watch_location_expression.
855 (rust_language_data): Delete la_watch_location_expression
856 initializer.
857 (rust_language::watch_location_expression): New member function,
858 implementation from rust_watch_location_expression.
859
860 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
861
862 * ada-lang.c (ada_collect_symbol_completion_matches): Rename to
863 ada_language::collect_symbol_completion_matches.
864 (ada_language_data): Delete la_collect_symbol_completion_matches
865 initializer.
866 (ada_language::collect_symbol_completion_matches): New member
867 function, implementation from
868 ada_collect_symbol_completion_matches.
869 * c-lang.c (c_language_data): Delete
870 la_collect_symbol_completion_matches initializer.
871 (cplus_language_data): Likewise.
872 (asm_language_data): Likewise.
873 (minimal_language_data): Likewise.
874 * d-lang.c (d_language_data): Likewise.
875 * f-lang.c (f_collect_symbol_completion_matches): Rename to
876 f_language::collect_symbol_completion_matches.
877 (f_language_data): Delete la_collect_symbol_completion_matches
878 initializer.
879 (f_language::collect_symbol_completion_matches) New member
880 function, implementation from f_collect_symbol_completion_matches.
881 * go-lang.c (go_language_data): Delete
882 la_collect_symbol_completion_matches initializer.
883 * language.c (unknown_language_data): Likewise.
884 (auto_language_data): Likewise.
885 * language.h (language_data): Delete
886 la_collect_symbol_completion_matches field.
887 (language_defn::collect_symbol_completion_matches): New member
888 function.
889 * m2-lang.c (m2_language_data): Delete
890 la_collect_symbol_completion_matches initializer.
891 * objc-lang.c (objc_language_data): Likewise.
892 * opencl-lang.c (opencl_language_data): Likewise.
893 * p-lang.c (pascal_language_data): Likewise.
894 * rust-lang.c (rust_language_data): Likewise.
895 * symtab.c (default_collect_symbol_completion_matches): Delete.
896 (collect_symbol_completion_matches): Update call to
897 collect_symbol_completion_matches.
898 (collect_symbol_completion_matches_type): Likewise.
899 * symtab.h (default_collect_symbol_completion_matches): Delete
900 declaration.
901
902 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
903
904 * ada-lang.c (ada_get_gdb_completer_word_break_characters): Delete.
905 (ada_language_data): Delete la_word_break_characters initializer.
906 (ada_language::word_break_characters): New member function.
907 * c-lang.c (c_language_data): Delete la_word_break_characters
908 initializer.
909 (cplus_language_data): Likewise.
910 (asm_language_data): Likewise.
911 (minimal_language_data): Likewise.
912 * completer.c: Update global comment.
913 (advance_to_expression_complete_word_point): Update call to
914 word_break_characters.
915 (complete_files_symbols): Likewise.
916 (complete_line_internal_1): Likewise.
917 (default_completer_handle_brkchars): Likewise.
918 (skip_quoted_chars): Likewise.
919 * d-lang.c (d_language_data): Delete la_word_break_characters
920 initializer.
921 * f-lang.c (f_word_break_characters): Delete.
922 (f_language_data): Delete la_word_break_characters initializer.
923 (f_language::word_break_characters): New member function.
924 * go-lang.c (go_language_data): Delete la_word_break_characters
925 initializer.
926 * language.c (unknown_language_data): Likewise.
927 (auto_language_data): Likewise.
928 * language.h (default_word_break_characters): Move declaration to
929 earlier in the file.
930 (language_data): Delete la_word_break_characters field.
931 (language_defn::word_break_characters): New member function.
932 * m2-lang.c (m2_language_data): Delete la_word_break_characters
933 initializer.
934 * objc-lang.c (objc_language_data): Likewise.
935 * opencl-lang.c (opencl_language_data): Likewise.
936 * p-lang.c (pascal_language_data): Likewise.
937 * rust-lang.c (rust_language_data): Likewise.
938
939 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
940
941 * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
942 (ada_language_data): Delete la_get_symbol_name_matcher
943 initializer.
944 (language_defn::get_symbol_name_matcher_inner): New member
945 function.
946 * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
947 initializer.
948 (cplus_language_data): Likewise.
949 (cplus_language::get_symbol_name_matcher_inner): New member
950 function.
951 (asm_language_data): Delete la_get_symbol_name_matcher initializer.
952 (minimal_language_data): Likewise.
953 * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
954 * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
955 initializer.
956 * dictionary.c (iter_match_first_hashed): Update call to
957 get_symbol_name_matcher.
958 (iter_match_next_hashed): Likewise.
959 (iter_match_next_linear): Likewise.
960 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
961 * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
962 initializer.
963 (f_language::get_symbol_name_matcher_inner): New member function.
964 * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
965 initializer.
966 * language.c (default_symbol_name_matcher): Update header comment,
967 make static.
968 (language_defn::get_symbol_name_matcher): New definition.
969 (language_defn::get_symbol_name_matcher_inner): Likewise.
970 (get_symbol_name_matcher): Delete.
971 (unknown_language_data): Delete la_get_symbol_name_matcher
972 initializer.
973 (auto_language_data): Likewise.
974 * language.h (language_data): Delete la_get_symbol_name_matcher
975 field.
976 (language_defn::get_symbol_name_matcher): New member function.
977 (language_defn::get_symbol_name_matcher_inner): Likewise.
978 (default_symbol_name_matcher): Delete declaration.
979 * linespec.c (find_methods): Update call to
980 get_symbol_name_matcher.
981 * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
982 initializer.
983 * minsyms.c (lookup_minimal_symbol): Update call to
984 get_symbol_name_matcher.
985 (iterate_over_minimal_symbols): Likewise.
986 * objc-lang.c (objc_language_data): Delete
987 la_get_symbol_name_matcher initializer.
988 * opencl-lang.c (opencl_language_data): Likewise.
989 * p-lang.c (pascal_language_data): Likewise.
990 * psymtab.c (psymbol_name_matches): Update call to
991 get_symbol_name_matcher.
992 * rust-lang.c (rust_language_data): Delete
993 la_get_symbol_name_matcher initializer.
994 * symtab.c (symbol_matches_search_name): Update call to
995 get_symbol_name_matcher.
996 (compare_symbol_name): Likewise.
997
998 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
999
1000 * ada-lang.c (ada_language_data): Delete la_compute_program
1001 initializer.
1002 * c-lang.c (c_language_data): Likewise.
1003 (c_language::compute_program): New member function.
1004 (cplus_language_data): Delete la_compute_program initializer.
1005 (cplus_language::compute_program): New member function.
1006 (asm_language_data): Delete la_compute_program initializer.
1007 (minimal_language_data): Likewise.
1008 * c-lang.h (c_compute_program): Update comment.
1009 (cplus_compute_program): Likewise.
1010 * compile/compile-c-support.c (c_compute_program): Likewise.
1011 (cplus_compute_program): Likewise.
1012 * compile/compile.c (compile_to_object): Update call to
1013 la_compute_program.
1014 * d-lang.c (d_language_data): Delete la_compute_program
1015 initializer.
1016 * f-lang.c (f_language_data): Likewise.
1017 * go-lang.c (go_language_data): Likewise.
1018 * language.c (unknown_language_data): Likewise.
1019 (auto_language_data): Likewise.
1020 * language.h (language_data): Delete la_compute_program field.
1021 (language_defn::compute_program): New member function.
1022 * m2-lang.c (m2_language_data): Delete la_compute_program
1023 initializer.
1024 * objc-lang.c (objc_language_data): Likewise.
1025 * opencl-lang.c (opencl_language_data): Likewise.
1026 * p-lang.c (pascal_language_data): Likewise.
1027 * rust-lang.c (rust_language_data): Likewise.
1028
1029 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
1030
1031 * ada-lang.c (ada_language_data) Delete
1032 la_class_name_from_physname initializer.
1033 * c-lang.c (c_language_data): Likewise.
1034 (cplus_language_data): Likewise.
1035 (cplus_language::class_name_from_physname): New member function.
1036 (asm_language_data): Delete la_class_name_from_physname
1037 initializer.
1038 (minimal_language_data): Likewise.
1039 * d-lang.c (d_language_data): Likewise.
1040 * dwarf2/read.c (guess_partial_die_structure_name): Update to call
1041 method on language_defn class.
1042 (guess_full_die_structure_name): Likewise.
1043 * f-lang.c (f_language_data): Delete la_class_name_from_physname
1044 initializer.
1045 * go-lang.c (go_language_data): Likewise.
1046 * language.c (language_class_name_from_physname): Delete.
1047 (unk_lang_class_name): Delete.
1048 (unknown_language_data): Delete la_class_name_from_physname
1049 initializer.
1050 (auto_language_data): Likewise.
1051 * language.h (language_data): Delete la_class_name_from_physname
1052 field.
1053 (language_defn::class_name_from_physname): New function.
1054 (language_class_name_from_physname): Delete declaration.
1055 * m2-lang.c (m2_language_data): Delete la_class_name_from_physname
1056 initializer.
1057 * objc-lang.c (objc_language_data): Likewise.
1058 * opencl-lang.c (opencl_language_data): Likewise.
1059 * p-lang.c (pascal_language_data): Likewise.
1060 * rust-lang.c (rust_language_data): Likewise.
1061
1062 2020-06-16 Tom Tromey <tom@tromey.com>
1063
1064 * tui/tui-data.h (STATUS_NAME): New macro.
1065 * tui/tui-layout.c (tui_remove_some_windows)
1066 (initialize_known_windows, tui_register_window)
1067 (tui_layout_split::remove_windows, initialize_layouts)
1068 (tui_new_layout_command): Don't use hard-coded window names.
1069
1070 2020-06-16 Tom Tromey <tom@tromey.com>
1071
1072 PR tui/25348:
1073 * tui/tui.c (tui_ensure_readline_initialized): Rename from
1074 tui_initialize_readline. Only run once. Call rl_initialize.
1075 * tui/tui.h (tui_ensure_readline_initialized): Rename from
1076 tui_initialize_readline.
1077 * tui/tui-io.c (tui_setup_io): Call
1078 tui_ensure_readline_initialized.
1079 * tui/tui-interp.c (tui_interp::init): Update.
1080
1081 2020-06-16 Tom Tromey <tom@tromey.com>
1082
1083 * tui/tui-layout.c (tui_layout_split::remove_windows): Fix logic.
1084 Also preserve the status window.
1085
1086 2020-06-16 Tom Tromey <tom@tromey.com>
1087
1088 * python/py-tui.c (tui_py_window::~tui_py_window): Handle case
1089 where m_window==nullptr.
1090
1091 2020-06-15 Tom Tromey <tromey@adacore.com>
1092
1093 * windows-nat.c (windows_nat::handle_output_debug_string):
1094 Update.
1095 (windows_nat::handle_ms_vc_exception): Update.
1096 * target.h (target_read_string): Change API.
1097 * target.c (target_read_string): Change API.
1098 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
1099 Update.
1100 * solib-frv.c (frv_current_sos): Update.
1101 * solib-dsbt.c (dsbt_current_sos): Update.
1102 * solib-darwin.c (darwin_current_sos): Update.
1103 * linux-thread-db.c (inferior_has_bug): Update.
1104 * expprint.c (print_subexp_standard): Update.
1105 * ada-lang.c (ada_main_name, ada_tag_name_from_tsd)
1106 (ada_exception_message_1): Update.
1107
1108 2020-06-15 Tom Tromey <tromey@adacore.com>
1109
1110 * linux-tdep.c (dump_mapping_p): Use target_read_memory.
1111
1112 2020-06-15 Tom Tromey <tromey@adacore.com>
1113
1114 * valprint.c (read_string): Update comment.
1115 * target.c (MIN): Remove.
1116 (target_read_string): Rewrite.
1117
1118 2020-06-15 Tom Tromey <tromey@adacore.com>
1119
1120 * corefile.c (read_memory_string): Remove.
1121 * ada-valprint.c (ada_value_print_ptr): Update.
1122 * ada-lang.h (ada_tag_name): Change return type.
1123 * ada-lang.c (type_from_tag): Update.
1124 (ada_tag_name_from_tsd): Change return type. Use
1125 target_read_string.
1126 (ada_tag_name): Likewise.
1127 * gdbcore.h (read_memory_string): Don't declare.
1128
1129 2020-06-14 Hannes Domani <ssbssa@yahoo.de>
1130
1131 * symtab.c (rbreak_command): Ignore Windows drive colon.
1132
1133 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
1134
1135 * NEWS: Mention removed GDBserver host support.
1136
1137 2020-06-12 Nelson Chu <nelson.chu@sifive.com>
1138
1139 * features/riscv/rebuild-csr-xml.sh: Updated.
1140
1141 2020-06-11 Tom Tromey <tom@tromey.com>
1142
1143 PR gdb/18318:
1144 * c-exp.y (lex_one_token): Handle 'p' like 'e'.
1145
1146 2020-06-09 Jonny Grant <jg@jguk.org>
1147 2020-06-09 Simon Marchi <simon.marchi@polymtl.ca>
1148
1149 * main.c (captured_main_1): Don't print new line after help.
1150 (print_gdb_help): add mailing list and IRC channel information
1151 to --help. Add new lines between items in the footer. Remove
1152 quotes around bug url.
1153
1154 2020-06-11 Keith Seitz <keiths@redhat.com>
1155
1156 PR gdb/21356
1157 * gdbtypes.c (resolve_dynamic_union, resolve_dynamic_struct):
1158 Resolve typedefs for type length calculations.
1159
1160 2020-06-10 Tom de Vries <tdevries@suse.de>
1161
1162 PR ada/24713
1163 * dwarf2/index-write.c (struct mapped_symtab): Add m_string_obstack.
1164 (write_psymbols): Enable .gdb_index for ada.
1165 * dwarf2/read.c: Remove comment stating .gdb_index is unsupported for
1166 ada.
1167
1168 2020-06-10 Tom de Vries <tdevries@suse.de>
1169
1170 * dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
1171 (dw2_symtab_iter_init): ... here. Add variant with "offset_type
1172 namei" instead of "const char *name" argument.
1173 (dw2_map_matching_symbols): Use "offset_type namei" variant of
1174 dw2_symtab_iter_init.
1175
1176 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1177
1178 * gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
1179 to use type::field and field::type instead.
1180
1181 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1182
1183 * gdbtypes.h (FIELD_TYPE): Remove. Change all call sites
1184 to use field::type instead.
1185
1186 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1187
1188 * gdbtypes.h (struct field) <type, set_type>: New methods.
1189 Rename `type` field to...
1190 <m_type>: ... this. Change references throughout to use type or
1191 set_type methods.
1192 (FIELD_TYPE): Use field::type. Change call sites that modify
1193 the field's type to use field::set_type instead.
1194
1195 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1196
1197 * gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
1198 to use type::index_type instead.
1199
1200 2020-06-08 Simon Marchi <simon.marchi@efficios.com>
1201
1202 * gdbtypes.h (struct type) <index_type, set_index_type>: New
1203 methods.
1204 (TYPE_INDEX_TYPE): Use type::index_type.
1205 * gdbtypes.c (create_array_type_with_stride): Likewise.
1206
1207 2020-06-07 Tom Tromey <tom@tromey.com>
1208
1209 * valprint.c (generic_val_print_float): Remove "embedded_offset"
1210 parameter.
1211 (generic_value_print): Update.
1212
1213 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
1214
1215 Revert commit 982a38f60b0.
1216 * python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
1217
1218 2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
1219
1220 * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
1221 avoid use after free.
1222
1223 2020-06-05 Tom de Vries <tdevries@suse.de>
1224
1225 * NEWS: Fix typos.
1226
1227 2020-06-04 Simon Marchi <simon.marchi@efficios.com>
1228
1229 * dwarf2/read.c (dwarf2_read_gdb_index): Save partial_symtabs in
1230 the per_bfd object.
1231 (dwarf2_read_debug_names): Likewise.
1232 (dwarf2_initialize_objfile): Use partial_symtabs from per_bfd
1233 object when re-using a per_bfd object with an index.
1234
1235 2020-06-03 Tom de Vries <tdevries@suse.de>
1236
1237 PR symtab/26046
1238 * dwarf2/read.c (scan_partial_symbols): Recurse into DW_TAG_subprogram
1239 children for C++.
1240 (load_partial_dies): Don't skip DW_TAG_inlined_subroutine child of
1241 DW_TAG_subprogram.
1242
1243 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1244
1245 * ada-lang.c (ada_language_data): Delete skip_trampoline
1246 initializer.
1247 * c-lang.c (c_language_data): Likewise.
1248 (cplus_language_data): Likewise.
1249 (cplus_language::skip_trampoline): New member function.
1250 (asm_language_data): Delete skip_trampoline initializer.
1251 (minimal_language_data): Likewise.
1252 * d-lang.c (d_language_data): Likewise.
1253 * f-lang.c (f_language_data): Likewise.
1254 * go-lang.c (go_language_data): Likewise.
1255 * language.c (unk_lang_trampoline): Delete function.
1256 (skip_language_trampoline): Update.
1257 (unknown_language_data): Delete skip_trampoline initializer.
1258 (auto_language_data): Likewise.
1259 * language.h (language_data): Delete skip_trampoline field.
1260 (language_defn::skip_trampoline): New function.
1261 * m2-lang.c (m2_language_data): Delete skip_trampoline
1262 initializer.
1263 * objc-lang.c (objc_skip_trampoline): Delete function, move
1264 implementation to objc_language::skip_trampoline.
1265 (objc_language_data): Delete skip_trampoline initializer.
1266 (objc_language::skip_trampoline): New member function with
1267 implementation from objc_skip_trampoline.
1268 * opencl-lang.c (opencl_language_data): Delete skip_trampoline
1269 initializer.
1270 * p-lang.c (pascal_language_data): Likewise.
1271 * rust-lang.c (rust_language_data): Likewise.
1272
1273 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1274
1275 * ada-lang.c (ada_language_data): Delete la_demangle initializer.
1276 (ada_language::demangle): New member function.
1277 * c-lang.c (c_language_data): Delete la_demangle initializer.
1278 (cplus_language_data): Delete la_demangle initializer.
1279 (cplus_language::demangle): New member function.
1280 (asm_language_data): Delete la_demangle initializer.
1281 (minimal_language_data): Delete la_demangle initializer.
1282 * d-lang.c (d_language_data): Delete la_demangle initializer.
1283 (d_language::demangle): New member function.
1284 * f-lang.c (f_language_data): Delete la_demangle initializer.
1285 (f_language::demangle): New member function.
1286 * go-lang.c (go_language_data): Delete la_demangle initializer.
1287 (go_language::demangle): New member function.
1288 * language.c (language_demangle): Update.
1289 (unk_lang_demangle): Delete.
1290 (unknown_language_data): Delete la_demangle initializer.
1291 (unknown_language::demangle): New member function.
1292 (auto_language_data): Delete la_demangle initializer.
1293 (auto_language::demangle): New member function.
1294 * language.h (language_data): Delete la_demangle field.
1295 (language_defn::demangle): New function.
1296 * m2-lang.c (m2_language_data): Delete la_demangle initializer.
1297 * objc-lang.c (objc_language_data): Delete la_demangle
1298 initializer.
1299 (objc_language::demangle): New member function.
1300 * opencl-lang.c (opencl_language_data): Delete la_demangle
1301 initializer.
1302 * p-lang.c (pascal_language_data): Likewise.
1303 * rust-lang.c (rust_language_data): Likewise.
1304 (rust_language::demangle): New member function.
1305
1306 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1307
1308 * ada-lang.c (ada_language_data): Delete la_print_type
1309 initializer.
1310 (ada_language::print_type): New member function.
1311 * c-lang.c (c_language_data): Delete la_print_type initializer.
1312 (c_language::print_type): New member function.
1313 (cplus_language_data): Delete la_print_type initializer.
1314 (cplus_language::print_type): New member function.
1315 (asm_language_data): Delete la_print_type initializer.
1316 (asm_language::print_type): New member function.
1317 (minimal_language_data): Delete la_print_type initializer.
1318 (minimal_language::print_type): New member function.
1319 * d-lang.c (d_language_data): Delete la_print_type initializer.
1320 (d_language::print_type): New member function.
1321 * f-lang.c (f_language_data): Delete la_print_type initializer.
1322 (f_language::print_type): New member function.
1323 * go-lang.c (go_language_data): Delete la_print_type initializer.
1324 (go_language::print_type): New member function.
1325 * language.c (unk_lang_print_type): Delete.
1326 (unknown_language_data): Delete la_print_type initializer.
1327 (unknown_language::print_type): New member function.
1328 (auto_language_data): Delete la_print_type initializer.
1329 (auto_language::print_type): New member function.
1330 * language.h (language_data): Delete la_print_type field.
1331 (language_defn::print_type): New function.
1332 (LA_PRINT_TYPE): Update.
1333 * m2-lang.c (m2_language_data): Delete la_print_type initializer.
1334 (m2_language::print_type): New member function.
1335 * objc-lang.c (objc_language_data): Delete la_print_type
1336 initializer.
1337 (objc_language::print_type): New member function.
1338 * opencl-lang.c (opencl_print_type): Delete, implementation moved
1339 to opencl_language::print_type.
1340 (opencl_language_data): Delete la_print_type initializer.
1341 (opencl_language::print_type): New member function, implementation
1342 from opencl_print_type.
1343 * p-lang.c (pascal_language_data): Delete la_print_type
1344 initializer.
1345 (pascal_language::print_type): New member function.
1346 * rust-lang.c (rust_print_type): Delete, implementation moved to
1347 rust_language::print_type.
1348 (rust_language_data): Delete la_print_type initializer.
1349 (rust_language::print_type): New member function, implementation
1350 from rust_print_type.
1351
1352 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1353
1354 * ada-lang.c (ada_sniff_from_mangled_name): Delete function,
1355 implementation moves to...
1356 (ada_language::sniff_from_mangled_name): ...here. Update return
1357 type.
1358 (ada_language_data): Delete la_sniff_from_mangled_name
1359 initializer.
1360 * c-lang.c (c_language_data): Likewise.
1361 (cplus_language_data): Likewise.
1362 (cplus_language::sniff_from_mangled_name): New member function,
1363 implementation taken from gdb_sniff_from_mangled_name.
1364 (asm_language_data): Delete la_sniff_from_mangled_name
1365 initializer.
1366 (minimal_language_data): Likewise.
1367 * cp-support.c (gdb_sniff_from_mangled_name): Delete,
1368 implementation moves to cplus_language::sniff_from_mangled_name.
1369 * cp-support.h (gdb_sniff_from_mangled_name): Delete declaration.
1370 * d-lang.c (d_sniff_from_mangled_name): Delete, implementation
1371 moves to...
1372 (d_language::sniff_from_mangled_name): ...here.
1373 (d_language_data): Delete la_sniff_from_mangled_name initializer.
1374 * f-lang.c (f_language_data): Likewise.
1375 * go-lang.c (go_sniff_from_mangled_name): Delete, implementation
1376 moves to...
1377 (go_language::sniff_from_mangled_name): ...here.
1378 (go_language_data): Delete la_sniff_from_mangled_name initializer.
1379 * language.c (language_sniff_from_mangled_name): Delete.
1380 (unknown_language_data): Delete la_sniff_from_mangled_name
1381 initializer.
1382 (auto_language_data): Likewise.
1383 * language.h (language_data): Delete la_sniff_from_mangled_name
1384 field.
1385 (language_defn::sniff_from_mangled_name): New function.
1386 (language_sniff_from_mangled_name): Delete declaration.
1387 * m2-lang.c (m2_language_data): Delete la_sniff_from_mangled_name
1388 field.
1389 * objc-lang.c (objc_sniff_from_mangled_name): Delete,
1390 implementation moves to...
1391 (objc_language::sniff_from_mangled_name): ...here.
1392 (objc_language_data): Delete la_sniff_from_mangled_name initializer.
1393 * opencl-lang.c (opencl_language_data): Likewise.
1394 * p-lang.c (pascal_language_data): Likewise.
1395 * rust-lang.c (rust_sniff_from_mangled_name): Delete,
1396 implementation moves to...
1397 (rust_language::sniff_from_mangled_name): ...here.
1398 (rust_language_data): Delete la_sniff_from_mangled_name
1399 initializer.
1400 * symtab.c (symbol_find_demangled_name): Call
1401 sniff_from_mangled_name member function.
1402
1403 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1404
1405 * ada-lang.c (ada_language_data): Delete la_search_name_hash
1406 initializer.
1407 * c-lang.c (c_language_data): Likewise.
1408 (cplus_language_data): Likewise.
1409 (cplus_language::search_name_hash): New member function.
1410 (asm_language_data): Delete la_search_name_hash initializer.
1411 (minimal_language_data): Likewise.
1412 * d-lang.c (d_language_data): Likewise.
1413 * dictionary.c (default_search_name_hash): Rename to...
1414 (language_defn::search_name_hash): ...this.
1415 * f-lang.c (f_language_data): Likewise.
1416 (f_language::search_name_hash): New member function.
1417 * go-lang.c (go_language_data): Delete la_search_name_hash
1418 initializer.
1419 * language.c (unknown_language_data): Likewise.
1420 (auto_language_data): Likewise.
1421 * language.h (struct language_data): Delete la_search_name_hash
1422 field.
1423 (language_defn::search_name_hash): Declare new member function.
1424 (default_search_name_hash): Delete declaration.
1425 * m2-lang.c (m2_language_data): Delete la_search_name_hash
1426 initializer.
1427 * objc-lang.c (objc_language_data): Likewise.
1428 * opencl-lang.c (opencl_language_data): Likewise.
1429 * p-lang.c (pascal_language_data): Likewise.
1430 * rust-lang.c (rust_language_data): Likewise.
1431 * symtab.c (search_name_hash): Update call.
1432
1433 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1434
1435 * ada-lang.c (ada_language_data): Delete la_get_compile_instance
1436 initializer.
1437 * c-lang.c (class compile_instance): Declare.
1438 (c_language_data): Delete la_get_compile_instance initializer.
1439 (c_language::get_compile_instance): New member function.
1440 (cplus_language_data): Delete la_get_compile_instance initializer.
1441 (cplus_language::get_compile_instance): New member function.
1442 (asm_language_data): Delete la_get_compile_instance initializer.
1443 (minimal_language_data): Likewise.
1444 * c-lang.h (c_get_compile_context): Update comment.
1445 (cplus_get_compile_context): Update comment.
1446 * compile/compile.c (compile_to_object): Update calls, don't rely
1447 on function pointer being NULL.
1448 * d-lang.c (d_language_data): Delete la_get_compile_instance
1449 initializer.
1450 * f-lang.c (f_language_data): Likewise.
1451 * go-lang.c (go_language_data): Likewise.
1452 * language.c (unknown_language_data): Likewise.
1453 (auto_language_data): Likewise.
1454 * language.h (language_data): Delete la_get_compile_instance field.
1455 (language_defn::get_compile_instance): New member function.
1456 * m2-lang.c (m2_language_data): Delete la_get_compile_instance
1457 initializer.
1458 * objc-lang.c (objc_language_data): Likewise.
1459 * opencl-lang.c (opencl_language_data): Likewise.
1460 * p-lang.c (pascal_language_data): Likewise.
1461 * rust-lang.c (rust_language_data): Likewise.
1462
1463 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1464
1465 * ada-lang.c (ada_add_all_symbols): Update comment.
1466 (ada_iterate_over_symbols): Delete, move implementation to...
1467 (ada_language::iterate_over_symbols): ...here, a new member
1468 function, rewrite to use range based for loop.
1469 (ada_language_data): Delete la_iterate_over_symbols initializer.
1470 * c-lang.c (c_language_data): Likewise.
1471 (cplus_language_data): Likewise.
1472 (asm_language_data): Likewise.
1473 (minimal_language_data): Likewise.
1474 * d-lang.c (d_language_data): Likewise.
1475 * f-lang.c (f_language_data): Likewise.
1476 * go-lang.c (go_language_data): Likewise.
1477 * language.c (unknown_language_data): Likewise.
1478 (auto_language_data): Likewise.
1479 * language.h (language_data): Delete la_iterate_over_symbols field.
1480 (language_defn::iterate_over_symbols): New member function.
1481 (LA_ITERATE_OVER_SYMBOLS): Update.
1482 * linespec.c (iterate_over_all_matching_symtabs): Update.
1483 * m2-lang.c (m2_language_data): Delete la_iterate_over_symbols
1484 initializer.
1485 * objc-lang.c (objc_language_data): Likewise.
1486 * opencl-lang.c (opencl_language_data): Likewise.
1487 * p-lang.c (pascal_language_data): Likewise.
1488 * rust-lang.c (rust_language_data): Likewise.
1489
1490 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1491
1492 * ada-lang.c (ada_language_data): Delete
1493 la_lookup_transparent_type initializer.
1494 * c-lang.c (c_language_data): Likewise.
1495 (cplus_language_data): Likewise.
1496 (cplus_language::lookup_transparent_type): New member function.
1497 (asm_language_data): Delete la_lookup_transparent_type
1498 initializer.
1499 (minimal_language_data): Likewise.
1500 * d-lang.c (d_language_data): Likewise.
1501 * f-lang.c (f_language_data): Likewise.
1502 * go-lang.c (go_language_data): Likewise.
1503 * language.c (unknown_language_data): Likewise.
1504 (auto_language_data): Likewise.
1505 * language.h (struct language_data): Delete
1506 la_lookup_transparent_type field.
1507 (language_defn::lookup_transparent_type): New member function.
1508 * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type
1509 initializer.
1510 * objc-lang.c (objc_language_data): Likewise.
1511 * opencl-lang.c (opencl_language_data): Likewise.
1512 * p-lang.c (pascal_language_data): Likewise.
1513 * rust-lang.c (rust_language_data): Likewise.
1514 * symtab.c (symbol_matches_domain): Update call.
1515
1516 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1517
1518 * ada-lang.c (ada_language_arch_info): Delete function, move
1519 implementation to...
1520 (ada_language::language_arch_info): ...here, a new member
1521 function.
1522 (ada_language_data): Delete la_language_arch_info.
1523 * c-lang.c (c_language_data): Likewise.
1524 (c_language::language_arch_info): New member function.
1525 (cplus_language_arch_info): Delete function, move
1526 implementation to...
1527 (cplus_language::language_arch_info): ...here, a new member
1528 function.
1529 (cplus_language_data): Delete la_language_arch_info.
1530 (asm_language_data): Likewise.
1531 (asm_language::language_arch_info): New member function.
1532 (minimal_language_data): Delete la_language_arch_info.
1533 (minimal_language::language_arch_info): New member function.
1534 * d-lang.c (d_language_arch_info): Delete function, move
1535 implementation to...
1536 (d_language::language_arch_info): ...here, a new member
1537 function.
1538 (d_language_data): Delete la_language_arch_info.
1539 * f-lang.c (f_language_arch_info): Delete function, move
1540 implementation to...
1541 (f_language::language_arch_info): ...here, a new member
1542 function.
1543 (f_language_data): Delete la_language_arch_info.
1544 * go-lang.c (go_language_arch_info): Delete function, move
1545 implementation to...
1546 (go_language::language_arch_info): ...here, a new member
1547 function.
1548 (go_language_data): Delete la_language_arch_info.
1549 * language.c (unknown_language_data): Likewise.
1550 (unknown_language::language_arch_info): New member function.
1551 (auto_language_data): Delete la_language_arch_info.
1552 (auto_language::language_arch_info): New member function.
1553 (language_gdbarch_post_init): Update call to
1554 la_language_arch_info.
1555 * language.h (language_data): Delete la_language_arch_info
1556 function pointer.
1557 (language_defn::language_arch_info): New function.
1558 * m2-lang.c (m2_language_arch_info): Delete function, move
1559 implementation to...
1560 (m2_language::language_arch_info): ...here, a new member
1561 function.
1562 (m2_language_data): Delete la_language_arch_info.
1563 * objc-lang.c (objc_language_arch_info): Delete function, move
1564 implementation to...
1565 (objc_language::language_arch_info): ...here, a new member
1566 function.
1567 (objc_language_data): Delete la_language_arch_info.
1568 * opencl-lang.c (opencl_language_arch_info): Delete function, move
1569 implementation to...
1570 (opencl_language::language_arch_info): ...here, a new member
1571 function.
1572 (opencl_language_data): Delete la_language_arch_info.
1573 * p-lang.c (pascal_language_arch_info): Delete function, move
1574 implementation to...
1575 (pascal_language::language_arch_info): ...here, a new member
1576 function.
1577 (pascal_language_data): Delete la_language_arch_info.
1578 * rust-lang.c (rust_language_arch_info): Delete function, move
1579 implementation to...
1580 (rust_language::language_arch_info): ...here, a new member
1581 function.
1582 (rust_language_data): Delete la_language_arch_info.
1583
1584 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1585
1586 * ada-lang.c (ada_language_data): Delete la_pass_by_reference
1587 initializer.
1588 * c-lang.c (c_language_data): Likewise.
1589 (cplus_language_data): Likewise.
1590 (cplus_language::pass_by_reference_info): New method.
1591 (asm_language_data): Delete la_pass_by_reference initializer.
1592 (minimal_language_data): Likewise.
1593 * cp-abi.c (cp_pass_by_reference): Remove use of
1594 default_pass_by_reference.
1595 * d-lang.c (d_language_data): Likewise.
1596 * f-lang.c (f_language_data): Likewise.
1597 * gnu-v3-abi.c (gnuv3_pass_by_reference): Remove use of
1598 default_pass_by_reference.
1599 * go-lang.c (go_language_data): Likewise.
1600 * language.c (language_pass_by_reference): Update.
1601 (default_pass_by_reference): Delete.
1602 (unknown_language_data): Delete la_pass_by_reference
1603 initializer.
1604 (auto_language_data): Likewise.
1605 * language.h (struct language_data): Delete la_pass_by_reference
1606 field.
1607 (language_defn::pass_by_reference_info): New member function.
1608 (default_pass_by_reference): Delete declaration.
1609 * m2-lang.c (m2_language_data): Delete la_pass_by_reference
1610 initializer.
1611 * objc-lang.c (objc_language_data): Likewise.
1612 * opencl-lang.c (opencl_language_data): Likewise.
1613 * p-lang.c (pascal_language_data): Likewise.
1614 * rust-lang.c (rust_language_data): Likewise.
1615
1616 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1617
1618 * ada-lang.c (ada_read_var_value): Delete function, move
1619 implementation to...
1620 (ada_language::read_var_value): ...here.
1621 (ada_language_data): Delete la_read_var_value initializer.
1622 * c-lang.c (c_language_data): Likewise.
1623 (cplus_language_data): Likewise.
1624 (minimal_language_data): Likewise.
1625 * d-lang.c (d_language_data): Likewise.
1626 * f-lang.c (f_language_data): Likewise.
1627 * findvar.c (default_read_var_value): Rename to...
1628 (language_defn::read_var_value): ...this.
1629 * findvar.c (read_var_value): Update header comment, and change to
1630 call member function instead of function pointer.
1631 * go-lang.c (go_language_data): Likewise.
1632 * language.c (unknown_language_data): Delete la_read_var_value
1633 initializer.
1634 (auto_language_data): Likewise.
1635 * language.h (struct language_data): Delete la_read_var_value
1636 field.
1637 (language_defn::read_var_value): New member function.
1638 (default_read_var_value): Delete declaration.
1639 * m2-lang.c (m2_language_data): Delete la_read_var_value
1640 initializer.
1641 * objc-lang.c (objc_language_data): Likewise.
1642 * opencl-lang.c (opencl_language_data): Likewise.
1643 * p-lang.c (pascal_language_data): Likewise.
1644 * rust-lang.c (rust_language_data): Likewise.
1645 * value.h (default_read_var_value): Delete declaration.
1646
1647 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1648
1649 * ada-lang.c (ada_print_array_index): Delete function, move
1650 implementation to...
1651 (ada_language::print_array_index): ...here.
1652 (ada_language_data): Delete la_print_array_index initializer.
1653 * c-lang.c (c_language_data): Likewise.
1654 (cplus_language_data): Likewise.
1655 (minimal_language_data): Likewise.
1656 * d-lang.c (d_language_data): Likewise.
1657 * f-lang.c (f_language_data): Likewise.
1658 * go-lang.c (go_language_data): Likewise.
1659 * language.c (default_print_array_index): Delete function, move
1660 implementation to...
1661 (language_defn::print_array_index): ...here.
1662 (unknown_language_data): Delete la_print_array_index initializer.
1663 (auto_language_data): Likewise.
1664 * language.h (struct language_data): Delete la_print_array_index
1665 field.
1666 (language_defn::print_array_index): New member function.
1667 (LA_PRINT_ARRAY_INDEX): Update.
1668 (default_print_array_index): Delete declaration.
1669 * m2-lang.c (m2_language_data): Delete la_print_array_index
1670 initializer.
1671 * objc-lang.c (objc_language_data): Likewise.
1672 * opencl-lang.c (opencl_language_data): Likewise.
1673 * p-lang.c (pascal_language_data): Likewise.
1674 * rust-lang.c (rust_language_data): Likewise.
1675
1676 2020-06-02 Andrew Burgess <andrew.burgess@embecosm.com>
1677
1678 * gdb/ada-lang.c (ada_language_defn): Convert to...
1679 (ada_language_data): ...this.
1680 (class ada_language): New class.
1681 (ada_language_defn): New static global.
1682 * gdb/c-lang.c (c_language_defn): Convert to...
1683 (c_language_data): ...this.
1684 (class c_language): New class.
1685 (c_language_defn): New static global.
1686 (cplus_language_defn): Convert to...
1687 (cplus_language_data): ...this.
1688 (class cplus_language): New class.
1689 (cplus_language_defn): New static global.
1690 (asm_language_defn): Convert to...
1691 (asm_language_data): ...this.
1692 (class asm_language): New class.
1693 (asm_language_defn): New static global.
1694 (minimal_language_defn): Convert to...
1695 (minimal_language_data): ...this.
1696 (class minimal_language): New class.
1697 (minimal_language_defn): New static global.
1698 * gdb/d-lang.c (d_language_defn): Convert to...
1699 (d_language_data): ...this.
1700 (class d_language): New class.
1701 (d_language_defn): New static global.
1702 * gdb/f-lang.c (f_language_defn): Convert to...
1703 (f_language_data): ...this.
1704 (class f_language): New class.
1705 (f_language_defn): New static global.
1706 * gdb/go-lang.c (go_language_defn): Convert to...
1707 (go_language_data): ...this.
1708 (class go_language): New class.
1709 (go_language_defn): New static global.
1710 * gdb/language.c (unknown_language_defn): Remove declaration.
1711 (current_language): Initialize to nullptr, real initialization is
1712 moved to _initialize_language.
1713 (languages): Delete global.
1714 (language_defn::languages): Define.
1715 (set_language_command): Use language_defn::languages.
1716 (set_language): Likewise.
1717 (range_error): Likewise.
1718 (language_enum): Likewise.
1719 (language_def): Likewise.
1720 (add_set_language_command): Use language_def::languages for the
1721 language list, and language_def to lookup language pointers.
1722 (skip_language_trampoline): Use language_defn::languages.
1723 (unknown_language_defn): Convert to...
1724 (unknown_language_data): ...this.
1725 (class unknown_language): New class.
1726 (unknown_language_defn): New static global.
1727 (auto_language_defn): Convert to...
1728 (auto_language_data): ...this.
1729 (class auto_language): New class.
1730 (auto_language_defn): New static global.
1731 (language_gdbarch_post_init): Use language_defn::languages.
1732 (_initialize_language): Initialize current_language.
1733 * gdb/language.h (struct language_defn): Rename to...
1734 (struct language_data): ...this.
1735 (struct language_defn): New.
1736 (auto_language_defn): Delete.
1737 (unknown_language_defn): Delete.
1738 (minimal_language_defn): Delete.
1739 (ada_language_defn): Delete.
1740 (asm_language_defn): Delete.
1741 (c_language_defn): Delete.
1742 (cplus_language_defn): Delete.
1743 (d_language_defn): Delete.
1744 (f_language_defn): Delete.
1745 (go_language_defn): Delete.
1746 (m2_language_defn): Delete.
1747 (objc_language_defn): Delete.
1748 (opencl_language_defn): Delete.
1749 (pascal_language_defn): Delete.
1750 (rust_language_defn): Delete.
1751 * gdb/m2-lang.c (m2_language_defn): Convert to...
1752 (m2_language_data): ...this.
1753 (class m2_language): New class.
1754 (m2_language_defn): New static global.
1755 * gdb/objc-lang.c (objc_language_defn): Convert to...
1756 (objc_language_data): ...this.
1757 (class objc_language): New class.
1758 (objc_language_defn): New static global.
1759 * gdb/opencl-lang.c (opencl_language_defn): Convert to...
1760 (opencl_language_data): ...this.
1761 (class opencl_language): New class.
1762 (opencl_language_defn): New static global.
1763 * gdb/p-lang.c (pascal_language_defn): Convert to...
1764 (pascal_language_data): ...this.
1765 (class pascal_language): New class.
1766 (pascal_language_defn): New static global.
1767 * gdb/rust-exp.y (rust_lex_tests): Use language_def to find
1768 language pointer, update comment format.
1769 * gdb/rust-lang.c (rust_language_defn): Convert to...
1770 (rust_language_data): ...this.
1771 (class rust_language): New class.
1772 (rust_language_defn): New static global.
1773
1774 2020-06-01 Andrew Burgess <andrew.burgess@embecosm.com>
1775
1776 * dwarf2/read.c (class lnp_state_machine) <m_last_address>: New
1777 member variable.
1778 <m_stmt_at_address>: New member variable.
1779 (lnp_state_machine::record_line): Don't record some lines, update
1780 tracking of is_stmt at the same address.
1781 (lnp_state_machine::lnp_state_machine): Initialise new member
1782 variables.
1783
1784 2020-06-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
1785
1786 * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add
1787 "-include gnu-nat-mig.h".
1788 * gnu-nat-mig.h: New file.
1789 * gnu-nat.c: Include "gnu-nat-mig.h".
1790 (exc_server, msg_reply_server, notify_server,
1791 process_reply_server): Remove declarations.
1792
1793 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1794
1795 * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced,
1796 steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,
1797 inf_startup, inf_update_suspends, inf_set_pid, inf_steal_exc_ports,
1798 inf_validate_procinfo, inf_validate_task_sc, inf_restore_exc_ports,
1799 inf_set_threads_resume_sc, inf_set_threads_resume_sc_for_signal_thread,
1800 inf_resume, inf_set_step_thread, inf_detach, inf_attach, inf_signal,
1801 inf_continue, make_proc, proc_abort, _proc_free, proc_update_sc,
1802 proc_get_exception_port, proc_set_exception_port, _proc_get_exc_port,
1803 proc_steal_exc_port, proc_restore_exc_port, proc_trace): Move functions
1804 to gnu_nat_target class.
1805 * gnu-nat.c: Likewise.
1806 (inf_update_procs, S_proc_wait_reply, set_task_pause_cmd,
1807 set_task_exc_port_cmd, set_signals_cmd, set_thread_pause_cmd,
1808 set_thread_exc_port_cmd): Call inf_validate_procs through gnu_target
1809 object.
1810 (gnu_nat_target::create_inferior, gnu_nat_target::detach): Pass `this'
1811 instead of `gnu_target'.
1812
1813 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1814
1815 * i386-gnu-tdep.c: Include "gdbcore.h"
1816 (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays.
1817 (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL,
1818 I386_GNU_SIGCONTEXT_THREAD_STATE_OFFSET): New macros
1819 (i386_gnu_sigtramp_start, i386_gnu_sigtramp_p,
1820 i386_gnu_sigcontext_addr): New functions
1821 (i386gnu_init_abi): Register i386_gnu_sigtramp_p,
1822 i386_gnu_sigcontext_addr, and i386_gnu_sc_reg_offset in the gdbarch
1823 tdep.
1824
1825 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1826
1827 * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
1828 before fork_inferior call. Avoid calling it if target_is_pushed returns
1829 true.
1830
1831 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1832
1833 * gnu-nat.h (gnu_target): New variable declaration.
1834 * i386-gnu-nat.c (_initialize_i386gnu_nat): Initialize
1835 gnu_target.
1836 * gnu-nat.c (gnu_target): New variable.
1837 (inf_validate_procs): Pass gnu_target to thread_change_ptid,
1838 add_thread_silent, and add_thread calls.
1839 (gnu_nat_target::create_inferior): Pass gnu_target to
1840 add_thread_silent, thread_change_ptid call.
1841 (gnu_nat_target::detach): Pass gnu_target to detach_inferior
1842 call.
1843
1844 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1845
1846 * gnu-nat.c (gnu_xfer_auxv): Remove unused `res' variable.
1847 (gnu_nat_target::find_memory_regions): Remove unused
1848 `old_address' variable.
1849
1850 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1851
1852 * gnu-nat.c: Include "gdbarch.h".
1853
1854 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1855
1856 * reply_mig_hack.awk (Error return): Cast function through
1857 void *, to bypass compiler function call check.
1858
1859 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1860
1861 * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on
1862 $(srcdir)/reply_mig_hack.awk.
1863
1864 2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
1865
1866 * gnu-nat.h (gnu_debug_flag): Set type to bool.
1867
1868 2020-05-30 Jonny Grant <jg@jguk.org>
1869
1870 * configure.ac (ACX_BUGURL): change bug URL to https.
1871
1872 2020-05-30 Pedro Alves <palves@redhat.com>
1873
1874 * cp-support.c (replace_typedefs_template): New.
1875 (replace_typedefs_qualified_name): Handle
1876 DEMANGLE_COMPONENT_TEMPLATE.
1877
1878 2020-05-29 Simon Marchi <simon.marchi@efficios.com>
1879
1880 * dwarf2/comp-unit.c, dwarf2/comp-unit.h, dwarf2/index-cache.c,
1881 dwarf2/index-cache.h, dwarf2/index-write.c,
1882 dwarf2/index-write.h, dwarf2/line-header.c,
1883 dwarf2/line-header.h, dwarf2/macro.c, dwarf2/macro.h,
1884 dwarf2/read.c, dwarf2/read.h: Rename struct dwarf2_per_objfile
1885 variables and fields from `dwarf2_per_objfile` to just
1886 `per_objfile` throughout.
1887
1888 2020-05-28 Simon Marchi <simon.marchi@polymtl.ca>
1889
1890 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
1891 <push_dwarf_reg_entry_value>: Add comment.
1892
1893 2020-05-28 Kevin Buettner <kevinb@redhat.com>
1894 Keith Seitz <keiths@redhat.com>
1895
1896 * python/python.c (do_start_initialization): Call PyEval_SaveThread
1897 instead of PyEval_ReleaseLock.
1898 (class gdbpy_gil): Move to earlier in file.
1899 (finalize_python): Set gdb_python_initialized.
1900 (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early
1901 when not initialized.
1902
1903 2020-05-28 Simon Marchi <simon.marchi@efficios.com>
1904
1905 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
1906 <push_dwarf_reg_entry_value>: Remove assert. Override
1907 per_objfile with caller_per_objfile.
1908
1909 2020-05-28 Tom de Vries <tdevries@suse.de>
1910
1911 * dwarf2/read.c (dw2_symtab_iter_next, dw2_expand_marked_cus): Limit
1912 PR gold/15646 workaround to symbol kind "type".
1913
1914 2020-05-27 Tom Tromey <tromey@adacore.com>
1915
1916 * dwarf2/read.c (load_partial_dies): Use add_partial_symbol.
1917
1918 2020-05-27 Tom Tromey <tromey@adacore.com>
1919
1920 * dwarf2/abbrev.h (struct abbrev_table) <lookup_abbrev>: Inline.
1921 Use htab_find_with_hash.
1922 <add_abbrev>: Remove "abbrev_number" parameter.
1923 * dwarf2/abbrev.c (abbrev_table::add_abbrev): Remove
1924 "abbrev_number" parameter. Use htab_find_slot_with_hash.
1925 (hash_abbrev): Add comment.
1926 (abbrev_table::lookup_abbrev): Move to header file.
1927 (abbrev_table::read): Update.
1928
1929 2020-05-27 Tom Tromey <tromey@adacore.com>
1930
1931 * dwarf2/read.c (struct partial_die_info) <name>: Declare new
1932 method.
1933 <canonical_name>: New member.
1934 <raw_name>: Rename from "name".
1935 (partial_die_info): Initialize canonical_name.
1936 (scan_partial_symbols): Check raw_name.
1937 (partial_die_parent_scope, partial_die_full_name)
1938 (add_partial_symbol, add_partial_subprogram)
1939 (add_partial_enumeration, load_partial_dies): Use "name" method.
1940 (partial_die_info::name): New method.
1941 (partial_die_info::read, guess_partial_die_structure_name)
1942 (partial_die_info::fixup): Update.
1943
1944 2020-05-27 Tom Tromey <tromey@adacore.com>
1945
1946 * dwarf2/attribute.h (struct attribute) <form_is_ref>: Inline.
1947 <get_ref_die_offset>: Inline.
1948 <get_ref_die_offset_complaint>: New method.
1949 * dwarf2/attribute.c (attribute::form_is_ref): Move to header.
1950 (attribute::get_ref_die_offset_complaint): Rename from
1951 get_ref_die_offset. Just issue complaint.
1952
1953 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
1954
1955 * cli/cli-cmds.c (shell_escape): Move exit_status_set_internal_vars.
1956
1957 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
1958
1959 * exec.c (exec_file_attach): Use errno value of first openp failure.
1960
1961 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
1962
1963 * nat/windows-nat.c (windows_thread_info::~windows_thread_info):
1964 Don't close thread handle.
1965
1966 2020-05-27 Tom Tromey <tom@tromey.com>
1967 Simon Marchi <simon.marchi@efficios.com>
1968
1969 * objfiles.h (struct objfile) <partial_symtabs>: Now a
1970 shared_ptr.
1971 * dwarf2/read.h (struct dwarf2_per_objfile) <partial_symtabs>: New
1972 member.
1973 * dwarf2/read.c (dwarf2_per_bfd_bfd_data_key,
1974 dwarf2_per_bfd_objfile_data_key>: New globals.
1975 (dwarf2_has_info): Use shared dwarf2_per_bfd if possible.
1976 (dwarf2_get_section_info): Use get_dwarf2_per_objfile.
1977 (dwarf2_initialize_objfile): Consider cases where per_bfd can be
1978 shared.
1979 (dwarf2_build_psymtabs): Set objfile::partial_symtabs and
1980 short-circuit when sharing.
1981 (dwarf2_build_psymtabs): Set dwarf2_per_objfile::partial_symtabs.
1982 (dwarf2_psymtab::expand_psymtab): Use free_cached_comp_units.
1983
1984 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
1985
1986 * dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
1987 to...
1988 (struct dwarf2_per_objfile) <line_header_hash>: ... here.
1989 * dwarf2/read.c (handle_DW_AT_stmt_list): Update.
1990
1991 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
1992
1993 * dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
1994 build_name_components, find_name_components_bounds>:
1995 Add per_objfile parameter.
1996 (struct mapped_index) <symbol_name_at>: Likewise.
1997 (struct mapped_debug_names): Remove constructor.
1998 <dwarf2_per_objfile>: Remove field.
1999 <namei_to_name, symbol_name_at>: Add per_objfile parameter.
2000 (mapped_index_base::find_name_components_bounds,
2001 mapped_index_base::build_name_components,
2002 dw2_expand_symtabs_matching_symbol): Likewise.
2003 (class mock_mapped_index) <symbol_name_at>: Likewise.
2004 (check_match): Likewise.
2005 (check_find_bounds_finds): Likewise.
2006 (test_mapped_index_find_name_component_bounds): Update.
2007 (CHECK_MATCH): Update.
2008 (dw2_expand_symtabs_matching): Update.
2009 (class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
2010 per_objfile parameter.
2011 <find_vec_in_debug_names>: Likewise.
2012 <m_per_objfile>: New field.
2013 (mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
2014 parameter.
2015 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2016 (dw2_debug_names_iterator::next): Update.
2017 (dw2_debug_names_lookup_symbol): Update.
2018 (dw2_debug_names_expand_symtabs_for_function): Update.
2019 (dw2_debug_names_map_matching_symbols): Update.
2020 (dw2_debug_names_expand_symtabs_matching): Update.
2021 (dwarf2_read_debug_names): Update.
2022
2023 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2024
2025 * dwarf2/read.h (struct dwarf2_cu): Forward-declare.
2026 (struct dwarf2_per_bfd) <free_cached_comp_units>: Remove,
2027 move to dwarf2_per_objfile.
2028 <read_in_chain>: Remove.
2029 (struct dwarf2_per_objfile) <get_cu, set_cu, remove_cu,
2030 remove_all_cus, age_comp_units>: New methods.
2031 <m_dwarf2_cus>: New member.
2032 (struct dwarf2_per_cu_data) <cu>: Remove.
2033 * dwarf2/read.c (struct dwarf2_cu) <read_in_chain>: Remove.
2034 (age_cached_comp_units, free_one_cached_comp_unit): Remove,
2035 moved to methods of dwarf2_per_objfile.
2036 (dwarf2_clear_marks): Remove.
2037 (dwarf2_queue_item::~dwarf2_queue_item): Update.
2038 (dwarf2_per_bfd::~dwarf2_per_bfd): Don't free dwarf2_cus.
2039 (dwarf2_per_bfd::free_cached_comp_units): Remove.
2040 (dwarf2_per_objfile::remove_all_cus): New.
2041 (class free_cached_comp_units) <~free_cached_comp_units>:
2042 Update.
2043 (load_cu): Update.
2044 (dw2_do_instantiate_symtab): Adjust.
2045 (fill_in_sig_entry_from_dwo_entry): Adjust.
2046 (cutu_reader::init_tu_and_read_dwo_dies): Update.
2047 (cutu_reader::cutu_reader): Likewise.
2048 (cutu_reader::keep): Use dwarf2_per_objfile::set_cu.
2049 (cutu_reader::cutu_reader): Use dwarf2_per_objfile::get_cu.
2050 (process_psymtab_comp_unit): Use dwarf2_per_objfile::remove_cu
2051 and dwarf2_per_objfile::age_comp_units.
2052 (load_partial_comp_unit): Update.
2053 (maybe_queue_comp_unit): Use dwarf2_per_objfile::get_cu.
2054 (process_queue): Likewise.
2055 (find_partial_die): Use dwarf2_per_objfile::get_cu instead of cu
2056 backlink.
2057 (dwarf2_read_addr_index): Likewise.
2058 (follow_die_offset): Likewise.
2059 (dwarf2_fetch_die_loc_sect_off): Likewise.
2060 (dwarf2_fetch_constant_bytes): Likewise.
2061 (dwarf2_fetch_die_type_sect_off): Likewise.
2062 (follow_die_sig_1): Likewise.
2063 (load_full_type_unit): Likewise.
2064 (read_signatured_type): Likewise.
2065 (dwarf2_cu::dwarf2_cu): Don't set cu field.
2066 (dwarf2_cu::~dwarf2_cu): Remove.
2067 (dwarf2_per_objfile::get_cu): New.
2068 (dwarf2_per_objfile::set_cu): New.
2069 (age_cached_comp_units): Rename to...
2070 (dwarf2_per_objfile::age_comp_units): ... this. Adjust
2071 to std::unordered_map.
2072 (free_one_cached_comp_unit): Rename to...
2073 (dwarf2_per_objfile::remove_cu): ... this. Adjust
2074 to std::unordered_map.
2075 (dwarf2_per_objfile::~dwarf2_per_objfile): New.
2076 (dwarf2_mark_helper): Use dwarf2_per_objfile::get_cu, expect
2077 a dwarf2_per_objfile in data.
2078 (dwarf2_mark): Pass dwarf2_per_objfile in data to htab_traverse.
2079 (dwarf2_clear_marks): Remove.
2080
2081 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2082
2083 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Replace
2084 `int use_existing_cu` parameter with `dwarf2_cu *existing_cu`.
2085 (init_tu_and_read_dwo_dies): Likewise.
2086 (cutu_reader::init_tu_and_read_dwo_dies): Likewise.
2087 (cutu_reader::cutu_reader): Likewise.
2088 (load_partial_comp_unit): Likewise.
2089 (process_psymtab_comp_unit): Update.
2090 (build_type_psymtabs_1): Update.
2091 (process_skeletonless_type_unit): Update.
2092 (load_full_comp_unit): Update.
2093 (find_partial_die): Update.
2094 (dwarf2_read_addr_index): Update.
2095 (read_signatured_type): Update.
2096
2097 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2098
2099 * dwarf2/read.h (struct dwarf2_per_cu_data) <m_header,
2100 m_header_read_in>: New fields.
2101 <get_header>: New method.
2102 * dwarf2/read.c (per_cu_header_read_in): Remove.
2103 (dwarf2_per_cu_data::get_header): New.
2104 (dwarf2_per_cu_data::addr_size): Update.
2105 (dwarf2_per_cu_data::offset_size): Update.
2106 (dwarf2_per_cu_data::ref_addr_size): Update.
2107
2108 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2109
2110 * dwarf2/read.c (load_cu): Return dwarf2_cu.
2111 (dw2_do_instantiate_symtab): Update.
2112 (queue_and_load_all_dwo_tus): Change parameter from
2113 dwarf2_per_cu_data to dwarf2_cu.
2114 (dwarf2_fetch_die_loc_sect_off): Update.
2115 (dwarf2_fetch_constant_bytes): Update.
2116 (dwarf2_fetch_die_type_sect_off): Update.
2117
2118 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2119
2120 * dwarf2/read.c (process_full_comp_unit,
2121 process_full_type_unit): Remove per_cu, per_objfile paramters.
2122 Add dwarf2_cu parameter.
2123 (process_queue): Update.
2124
2125 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2126
2127 * dwarf2/read.c (create_cu_from_index_list): Replace
2128 dwarf2_per_objfile parameter with dwarf2_per_bfd.
2129 (create_cus_from_index_list): Likewise.
2130 (create_cus_from_index): Likewise.
2131 (create_signatured_type_table_from_index): Likewise.
2132 (create_cus_from_debug_names_list): Likewise.
2133 (create_cus_from_debug_names): Likewise.
2134 (dwarf2_read_gdb_index): Update.
2135 (dwarf2_read_debug_names): Update.
2136
2137 2020-05-27 Tom Tromey <tom@tromey.com>
2138 Simon Marchi <simon.marchi@efficios.com>
2139
2140 * dwarf2/read.h (struct dwarf2_per_objfile)
2141 <get_type_for_signatured_type, set_type_for_signatured_type>:
2142 New methods.
2143 <m_type_map>: New member.
2144 (struct signatured_type) <type>: Remove.
2145 * dwarf2/read.c
2146 (dwarf2_per_objfile::get_type_for_signatured_type,
2147 dwarf2_per_objfile::set_type_for_signatured_type): New.
2148 (get_signatured_type): Use new methods.
2149
2150 2020-05-27 Tom Tromey <tom@tromey.com>
2151 Simon Marchi <simon.marchi@efficios.com>
2152
2153 * dwarf2/read.h (struct type_unit_group_unshareable): New.
2154 (struct dwarf2_per_objfile) <type_units>: New member.
2155 <get_type_unit_group_unshareable>: New method.
2156 * dwarf2/read.c (struct type_unit_group) <compunit_symtab,
2157 num_symtabs, symtabs>: Remove; move to
2158 type_unit_group_unshareable.
2159 (dwarf2_per_objfile::get_type_unit_group_unshareable): New.
2160 (process_full_type_unit, dwarf2_cu::setup_type_unit_groups)
2161 (dwarf2_cu::setup_type_unit_groups): Use type_unit_group_unshareable.
2162
2163 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2164
2165 * dwarf2/read.h (struct dwarf2_per_cu_data):
2166 <dwarf2_per_objfile>: Remove.
2167 * dwarf2/read.c (create_cu_from_index_list): Don't assign
2168 dwarf2_per_objfile.
2169 (create_signatured_type_table_from_index): Likewise.
2170 (create_signatured_type_table_from_debug_names): Likewise.
2171 (create_debug_type_hash_table): Likewise.
2172 (fill_in_sig_entry_from_dwo_entry): Likewise.
2173 (create_type_unit_group): Likewise.
2174 (read_comp_units_from_section): Likewise.
2175 (create_cus_hash_table): Likewise.
2176
2177 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2178
2179 * dwarf2/read.c (process_psymtab_comp_unit): Remove reference to
2180 dwarf2_per_cu_data::dwarf2_per_objfile.
2181 (compute_compunit_symtab_includes): Likewise.
2182 (dwarf2_cu::start_symtab): Likewise.
2183
2184 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2185
2186 * dwarf2/read.h (dwarf2_get_die_type): Add dwarf2_per_objfile
2187 parameter.
2188 * dwarf2/read.c (get_die_type_at_offset): Likewise.
2189 (read_namespace_alias): Update.
2190 (lookup_die_type): Update.
2191 (dwarf2_get_die_type): Add dwarf2_per_objfile parameter.
2192 * dwarf2/loc.c (class dwarf_evaluate_loc_desc) <get_base_type>:
2193 Update.
2194 (disassemble_dwarf_expression): Update.
2195
2196 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2197
2198 * dwarf2/read.h (struct dwarf2_queue_item): Add
2199 dwarf2_per_objfile parameter, assign new parameter.
2200 <per_objfile>: New field.
2201 * dwarf2/read.c (free_one_cached_comp_unit): Add
2202 dwarf2_per_objfile parameter.
2203 (queue_comp_unit): Likewise.
2204 (dw2_do_instantiate_symtab): Update.
2205 (process_psymtab_comp_unit): Update.
2206 (maybe_queue_comp_unit): Add dwarf2_per_objfile parameter.
2207 (process_imported_unit_die): Update.
2208 (queue_and_load_dwo_tu): Update.
2209 (follow_die_offset): Update.
2210 (follow_die_sig_1): Update.
2211
2212 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2213
2214 * dwarf2/read.h (struct dwarf2_per_cu_data) <objfile>: Remove.
2215 * dwarf2/read.c (dwarf2_compute_name): Pass per_objfile down.
2216 (read_call_site_scope): Assign per_objfile.
2217 (dwarf2_per_cu_data::objfile): Remove.
2218 * gdbtypes.h (struct call_site) <per_objfile>: New member.
2219 * dwarf2/loc.h (dwarf2_evaluate_loc_desc): Add
2220 dwarf2_per_objfile parameter.
2221 * dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Add
2222 dwarf2_per_objfile parameter.
2223 (dwarf_expr_reg_to_entry_parameter): Add output
2224 dwarf2_per_objfile parameter.
2225 (locexpr_get_frame_base): Update.
2226 (class dwarf_evaluate_loc_desc) <get_tls_address>: Update.
2227 <push_dwarf_reg_entry_value>: Update.
2228 <call_site_to_target_addr>: Update.
2229 (dwarf_entry_parameter_to_value): Add dwarf2_per_objfile
2230 parameter.
2231 (value_of_dwarf_reg_entry): Update.
2232 (rw_pieced_value): Update.
2233 (indirect_synthetic_pointer): Update.
2234 (dwarf2_evaluate_property): Update.
2235 (dwarf2_loc_desc_get_symbol_read_needs): Add dwarf2_per_objfile
2236 parameter.
2237 (locexpr_read_variable): Update.
2238 (locexpr_get_symbol_read_needs): Update.
2239 (loclist_read_variable): Update.
2240
2241 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2242
2243 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
2244 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2245 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
2246 parameter.
2247 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
2248 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
2249 dwarf2_fetch_die_type_sect_off): Add dwarf2_per_objfile
2250 parameter.
2251 * dwarf2/loc.c (indirect_synthetic_pointer, per_cu_dwarf_call,
2252 sect_variable_value): Add dwarf2_per_objfile parameter.
2253 (class dwarf_evaluate_loc_desc) <dwarf_call,
2254 dwarf_variable_value>: Update.
2255 (fetch_const_value_from_synthetic_pointer): Add
2256 dwarf2_per_objfile parameter.
2257 (fetch_const_value_from_synthetic_pointer): Update.
2258 (coerced_pieced_ref): Update.
2259 (class symbol_needs_eval_context) <dwarf_call,
2260 dwarf_variable_value>: Update.
2261 (dwarf2_compile_expr_to_ax): Update.
2262
2263 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2264
2265 * dwarf2/loc.c (allocate_piece_closure): Add dwarf2_per_objfile
2266 parameter.
2267 (dwarf2_evaluate_loc_desc_full): Update.
2268
2269 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2270
2271 * dwarf2/read.h (dwarf2_read_addr_index): Add dwarf2_per_objfile
2272 parameter.
2273 * dwarf2/read.c (dwarf2_read_addr_index): Likewise.
2274 * dwarf2/loc.c (decode_debug_loclists_addresses): Add
2275 dwarf2_per_objfile parameter.
2276 (decode_debug_loc_dwo_addresses): Likewise.
2277 (dwarf2_find_location_expression): Update.
2278 (class dwarf_evaluate_loc_desc) <get_addr_index>: Update.
2279 (locexpr_describe_location_piece): Add dwarf2_per_objfile
2280 parameter.
2281 (disassemble_dwarf_expression): Add dwarf2_per_objfile
2282 parameter.
2283 (locexpr_describe_location_1): Likewise.
2284 (locexpr_describe_location): Update.
2285
2286 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2287
2288 * dwarf2/read.h (struct dwarf2_per_cu_data) <text_offset>:
2289 Remove.
2290 * dwarf2/read.c (dwarf2_per_cu_data::text_offset): Remove.
2291 * dwarf2/loc.c (dwarf2_find_location_expression): Update.
2292 (dwarf2_compile_property_to_c): Update.
2293 (dwarf2_compile_expr_to_ax): Add dwarf2_per_objfile parameter,
2294 use text offset from objfile.
2295 (locexpr_tracepoint_var_ref): Update.
2296 (locexpr_generate_c_location): Update.
2297 (loclist_describe_location): Update.
2298 (loclist_tracepoint_var_ref): Update.
2299 * dwarf2/compile.h (compile_dwarf_bounds_to_c): Add
2300 dwarf2_per_objfile parameter.
2301 * dwarf2/loc2c.c (do_compile_dwarf_expr_to_c): Likewise,
2302 use text offset from objfile.
2303 (compile_dwarf_expr_to_c): Add dwarf2_per_objfile parameter.
2304
2305 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2306
2307 * dwarf2/expr.h (struct dwarf_expr_context)
2308 <dwarf_expr_context>: Add dwarf2_per_objfile parameter.
2309 <offset>: Remove.
2310 <per_objfile>: New member.
2311 * dwarf2/expr.c (dwarf_expr_context::dwarf_expr_context): Add
2312 dwarf2_per_objfile parameter. Don't set offset, set
2313 per_objfile.
2314 (dwarf_expr_context::execute_stack_op): Use offset from objfile.
2315 * dwarf2/frame.c (dwarf2_frame_find_fde): Return (by parameter)
2316 a dwarf2_per_objfile object instead of an offset.
2317 (class dwarf_expr_executor) <dwarf_expr_executor>: Add
2318 constructor.
2319 (execute_stack_op): Add dwarf2_per_objfile parameter, pass it
2320 to dwarf2_expr_executor constructor. Don't set offset.
2321 (dwarf2_fetch_cfa_info): Update.
2322 (struct dwarf2_frame_cache) <text_offset>: Remove.
2323 <per_objfile>: New field.
2324 (dwarf2_frame_cache): Update.
2325 (dwarf2_frame_prev_register): Update.
2326 * dwarf2/loc.c (class dwarf_evaluate_loc_desc)
2327 <dwarf_evaluate_loc_desc>: Add constructor.
2328 (dwarf2_evaluate_loc_desc_full): Update.
2329 (dwarf2_locexpr_baton_eval): Update.
2330 (class symbol_needs_eval_context) <symbol_needs_eval_context>:
2331 Add constructor.
2332 (dwarf2_loc_desc_get_symbol_read_needs): Update.
2333
2334 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2335
2336 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_type,
2337 addr_sized_int_type>: Move to dwarf2_cu.
2338 <int_type>: Move to dwarf2_per_objfile.
2339 (struct dwarf2_per_objfile) <int_type>: Move here.
2340 * dwarf2/read.c (struct dwarf2_cu) <addr_type,
2341 addr_sized_int_type>: Move here.
2342 (read_func_scope): Update.
2343 (read_array_type): Update.
2344 (read_tag_string_type): Update.
2345 (attr_to_dynamic_prop): Update.
2346 (dwarf2_per_cu_data::int_type): Rename to...
2347 (dwarf2_per_objfile::int_type): ... this.
2348 (dwarf2_per_cu_data::addr_sized_int_type): Rename to...
2349 (dwarf2_cu::addr_sized_int_type): ... this.
2350 (read_subrange_type): Update.
2351 (dwarf2_per_cu_data::addr_type): Rename to...
2352 (dwarf2_cu::addr_type): ... this.
2353 (set_die_type): Update.
2354
2355 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2356
2357 * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
2358 data through per_cu->cu.
2359
2360 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2361
2362 * dwarf2/read.c (lookup_dwo_comp_unit): Change
2363 dwarf2_per_cu_data parameter fo dwarf2_cu.
2364 (lookup_dwo_type_unit): Likewise.
2365 (read_cutu_die_from_dwo): Likewise.
2366 (lookup_dwo_unit): Likewise.
2367 (open_and_init_dwo_file): Likewise.
2368 (lookup_dwo_cutu): Likewise.
2369 (lookup_dwo_comp_unit): Likewise.
2370 (lookup_dwo_type_unit): Likewise.
2371 (cutu_reader::init_tu_and_read_dwo_dies): Update.
2372 (cutu_reader::cutu_reader): Update.
2373
2374 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2375
2376 * dwarf2/read.c (process_full_comp_unit): Add dwarf2_per_objfile
2377 parameter.
2378 (process_full_type_unit): Likewise.
2379 (process_queue): Update.
2380
2381 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2382
2383 * dwarf2/read.c (recursively_compute_inclusions): Add
2384 dwarf2_per_objfile parameter.
2385 (compute_compunit_symtab_includes): Likewise.
2386 (process_cu_includes): Update.
2387
2388 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2389
2390 * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
2391 parameter.
2392 (create_type_unit_group): Update.
2393 (process_psymtab_comp_unit_reader): Update.
2394 (build_type_psymtabs_reader): Update.
2395
2396 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2397
2398 * dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
2399 object through m_this_cu->cu.
2400
2401 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2402
2403 * dwarf2/read.c (queue_and_load_dwo_tu): Expect a dwarf2_cu as
2404 the info parameter.
2405 (queue_and_load_all_dwo_tus): Pass per_cu->cu.
2406
2407 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2408
2409 * dwarf2/read.c (class cutu_reader) <cutu_reader>: Add
2410 per_objfile parameter.
2411 (load_full_type_unit): Add per_objfile parameter.
2412 (read_signatured_type): Likewise.
2413 (load_full_comp_unit): Likewise.
2414 (load_cu): Likewise.
2415 (dw2_do_instantiate_symtab): Likewise.
2416 (dw2_get_file_names): Likewise.
2417 (dw2_map_symtabs_matching_filename): Update.
2418 (dw_expand_symtabs_matching_file_matcher): Update.
2419 (dw2_map_symbol_filenames): Update.
2420 (process_psymtab_comp_unit): Add per_objfile parameter.
2421 (build_type_psymtabs_1): Update.
2422 (process_skeletonless_type_unit): Update.
2423 (dwarf2_build_psymtabs_hard): Update.
2424 (load_partial_comp_unit): Add per_objfile parameter.
2425 (scan_partial_symbols): Update.
2426 (load_full_comp_unit): Add per_objfile parameter.
2427 (process_imported_unit_die): Update.
2428 (create_cus_hash_table): Update.
2429 (find_partial_die): Update.
2430 (dwarf2_read_addr_index): Update.
2431 (follow_die_offset): Update.
2432 (dwarf2_fetch_die_loc_sect_off): Update.
2433 (dwarf2_fetch_constant_bytes): Update.
2434 (dwarf2_fetch_die_type_sect_off): Update.
2435 (follow_die_sig_1): Update.
2436 (load_full_type_unit): Add per_objfile parameter.
2437 (read_signatured_type): Likewise.
2438
2439 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2440
2441 * dwarf2/read.c (lookup_dwo_unit): Use bfd_get_filename instead
2442 of objfile_name.
2443
2444 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2445
2446 * dwarf2/read.h (struct dwarf2_per_bfd) <obfd>: New member.
2447 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
2448 * dwarf2/read.c (dwarf2_per_bfd::dwarf2_per_bfd): Assign obfd
2449 field.
2450 (dwarf2_get_dwz_file): Replace parameter with dwarf2_per_bfd.
2451 (create_cus_from_index): Update.
2452 (dwarf2_read_gdb_index): Update.
2453 (create_cus_from_debug_names): Update.
2454 (dwarf2_read_debug_names): Update.
2455 (get_abbrev_section_for_cu): Update.
2456 (create_all_comp_units): Update.
2457 (read_attribute_value): Update.
2458 (get_debug_line_section): Update.
2459 * dwarf2/index-cache.c (index_cache::store): Update.
2460 * dwarf2/index-write.c (save_gdb_index_command): Update.
2461 * dwarf2/macro.c (dwarf_decode_macro_bytes): Update.
2462
2463 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2464
2465 * dwarf2/read.h (struct dwarf2_per_cu_data) <per_bfd>: New
2466 member.
2467 * dwarf2/read.c (dwarf2_per_bfd::allocate_per_cu): Initialize
2468 dwarf2_per_cu_data::per_bfd.
2469 (dwarf2_per_bfd::allocate_signatured_type): Likewise.
2470 (create_type_unit_group): Likewise.
2471 (queue_comp_unit): Remove reference to
2472 per_cu->dwarf2_per_objfile.
2473 (maybe_queue_comp_unit): Likewise.
2474 (fill_in_sig_entry_from_dwo_entry): Assign new field.
2475 (create_cus_hash_table): Assign new field.
2476
2477 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2478
2479 * dwarf2/read.c: Replace
2480 dwarf2_cu->per_cu->dwarf2_per_objfile references with
2481 dwarf2_cu->per_objfile throughout.
2482
2483 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2484
2485 * dwarf2/read.c (dw2_do_instantiate_symtab): Add per_objfile
2486 parameter, don't use per_cu->dwarf2_per_objfile.
2487 (dw2_instantiate_symtab): Likewise.
2488 (dw2_find_last_source_symtab): Update.
2489 (dw2_map_expand_apply): Update.
2490 (dw2_lookup_symbol): Update.
2491 (dw2_expand_symtabs_for_function): Update.
2492 (dw2_expand_all_symtabs): Update.
2493 (dw2_expand_symtabs_with_fullname): Update.
2494 (dw2_expand_symtabs_matching_one): Add per_objfile parameter,
2495 don't use per_cu->dwarf2_per_objfile.
2496 (dw2_expand_marked_cus): Update.
2497 (dw2_find_pc_sect_compunit_symtab): Update.
2498 (dw2_debug_names_lookup_symbol): Update.
2499 (dw2_debug_names_expand_symtabs_for_function): Update.
2500 (dw2_debug_names_map_matching_symbols): Update.
2501 (dwarf2_psymtab::expand_psymtab): Update.
2502
2503 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2504
2505 * dwarf2/read.c (struct dwarf2_cu) <dwarf2_cu>: Add parameter.
2506 <per_objfile>: New member.
2507 (class cutu_reader) <init_tu_and_read_dwo_dies>: Add parameter.
2508 (cutu_reader::init_tu_and_read_dwo_dies): Add parameter, update
2509 call to dwarf2_cu.
2510 (cutu_reader::cutu_reader): Update.
2511 (dwarf2_cu::dwarf2_cu): Add parameter, initialize per_objfile.
2512
2513 2020-05-27 Simon Marchi <simon.marchi@efficios.com>
2514
2515 * dwarf2/read.h (struct dwarf2_per_bfd) <die_type_hash>: Move to
2516 struct dwarf2_per_objfile.
2517 (struct dwarf2_per_objfile) <die_type_hash>: Move from struct
2518 dwarf2_per_bfd.
2519 * dwarf2/read.c (set_die_type): Update.
2520 (get_die_type_at_offset): Update.
2521
2522 2020-05-27 Tom Tromey <tom@tromey.com>
2523 Simon Marchi <simon.marchi@efficios.com>
2524
2525 * dwarf2/read.h (struct dwarf2_per_bfd) <num_psymtabs>: New
2526 method.
2527 (struct dwarf2_per_objfile) <resize_symtabs, symtab_set_p,
2528 get_symtab, set_symtab>: New methods.
2529 <m_symtabs>: New field.
2530 (struct dwarf2_psymtab): Derive from partial_symtab.
2531 <readin_p, get_compunit_symtab>: Declare methods.
2532 * dwarf2/read.c (dwarf2_per_objfile::symtab_set_p,
2533 dwarf2_per_objfile::get_symtab, dwarf2_per_objfile::set_symtab):
2534 New methods.
2535 (struct dwarf2_per_cu_quick_data) <compunit_symtab>: Remove.
2536 (dw2_do_instantiate_symtab, dw2_instantiate_symtab)
2537 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
2538 (dw2_symtab_iter_next, dw2_print_stats)
2539 (dw2_expand_symtabs_with_fullname)
2540 (dw2_expand_symtabs_matching_one)
2541 (dw_expand_symtabs_matching_file_matcher)
2542 (dw2_find_pc_sect_compunit_symtab, dw2_map_symbol_filenames)
2543 (dw2_debug_names_iterator::next)
2544 (dw2_debug_names_map_matching_symbols)
2545 (fill_in_sig_entry_from_dwo_entry, dwarf2_psymtab::read_symtab)
2546 (process_queue, dwarf2_psymtab::expand_psymtab): Update.
2547 (dwarf2_psymtab::readin_p, dwarf2_psymtab::get_compunit_symtab):
2548 New methods.
2549 (get_compunit_symtab, process_full_comp_unit)
2550 (process_full_type_unit): Update.
2551 (dwarf2_build_psymtabs, dwarf2_initialize_objfile, add_type_unit): Call
2552
2553 2020-05-27 Simon Marchi <simon.marchi@polymtl.ca>
2554
2555 * dwarf2/read.h (dwarf2_per_objfile): Rename to dwarf2_per_bfd,
2556 then introduce a new dwarf2_per_objfile type.
2557 <read_line_string>: Move to the new dwarf2_per_objfile type.
2558 <objfile>: Likewise.
2559 (dwarf2_per_bfd): Rename dwarf2_per_objfile to this.
2560 * dwarf2/read.c: Replace references to dwarf2_per_objfile with
2561 dwarf2_per_objfile->per_bfd.
2562 (dwarf2_per_objfile::dwarf2_per_objfile): Rename to...
2563 (dwarf2_per_bfd::dwarf2_per_bfd): ... this.
2564 (dwarf2_per_objfile::free_cached_comp_units): Rename to...
2565 (dwarf2_per_bfd::free_cached_comp_units): ... this.
2566 (dwarf2_has_info): Allocate dwarf2_per_bfd.
2567 (dwarf2_per_objfile::locate_sections): Rename to...
2568 (dwarf2_per_bfd::locate_sections): ... this.
2569 (dwarf2_per_objfile::get_cutu): Rename to...
2570 (dwarf2_per_bfd::get_cutu): ... this.
2571 (dwarf2_per_objfile::get_cu): Rename to...
2572 (dwarf2_per_bfd::get_cu): ... this.
2573 (dwarf2_per_objfile::get_tu): Rename to...
2574 (dwarf2_per_bfd::get_tu): ... this.
2575 (dwarf2_per_objfile::allocate_per_cu): Rename to...
2576 (dwarf2_per_bfd::allocate_per_cu): ... this.
2577 (dwarf2_per_objfile::allocate_signatured_type): Rename to...
2578 (dwarf2_per_bfd::allocate_signatured_type): ... this.
2579 (get_gdb_index_contents_ftype): Change parameter from
2580 dwarf2_per_objfile to dwarf2_per_bfd.
2581 * dwarf2/macro.c, dwarf2/index-write.c: Replace references to
2582 dwarf2_per_objfile with dwarf2_per_objfile->per_bfd.
2583
2584 2020-05-27 Tom Tromey <tom@tromey.com>
2585 Simon Marchi <simon.marchi@efficios.com>
2586
2587 * dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
2588 (allocate_piece_closure): Set "per_objfile" member.
2589 (dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
2590 (locexpr_describe_location, loclist_describe_location): Use new
2591 member.
2592 * dwarf2/read.c (read_call_site_scope)
2593 (mark_common_block_symbol_computed, attr_to_dynamic_prop)
2594 (dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
2595 (fill_in_loclist_baton, dwarf2_symbol_mark_computed,
2596 handle_data_member_location): Set per_objfile member.
2597 * dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
2598 member.
2599 (struct dwarf2_loclist_baton) <per_objfile>: New member.
2600
2601 2020-05-27 Tom Tromey <tom@tromey.com>
2602
2603 * dwarf2/read.h (struct dwarf2_per_objfile) <allocate_per_cu,
2604 allocate_signatured_type>: Declare new methods.
2605 <m_num_psymtabs>: New member.
2606 (struct dwarf2_per_cu_data) <index>: New member.
2607 * dwarf2/read.c (dwarf2_per_objfile::allocate_per_cu)
2608 (dwarf2_per_objfile::allocate_signatured_type): New methods.
2609 (create_cu_from_index_list): Use allocate_per_cu.
2610 (create_signatured_type_table_from_index)
2611 (create_signatured_type_table_from_debug_names)
2612 (create_debug_type_hash_table, add_type_unit)
2613 (read_comp_units_from_section): Use allocate_signatured_type.
2614
2615 2020-05-27 Tom Tromey <tom@tromey.com>
2616
2617 * psymtab.c (partial_map_expand_apply)
2618 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
2619 (psym_lookup_global_symbol_language)
2620 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
2621 (psym_print_stats, psym_expand_symtabs_for_function)
2622 (psym_map_symbol_filenames, psym_map_matching_symbols)
2623 (psym_expand_symtabs_matching)
2624 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
2625 (maintenance_check_psymtabs): Update.
2626 * psympriv.h (struct partial_symtab) <readin_p,
2627 get_compunit_symtab>: Add objfile parameter.
2628 (struct standard_psymtab) <readin_p, get_compunit_symtab>:
2629 Likewise.
2630 * dwarf2/read.c (struct dwarf2_include_psymtab) <readin_p,
2631 get_compunit_symtab>: Likewise.
2632 (dwarf2_psymtab::expand_psymtab): Pass objfile argument.
2633
2634 2020-05-27 Tom Tromey <tom@tromey.com>
2635
2636 * dwarf2/read.h (struct dwarf2_per_objfile) <obstack>: New
2637 member.
2638 * dwarf2/read.c (delete_file_name_entry): Fix comment.
2639 (create_cu_from_index_list)
2640 (create_signatured_type_table_from_index)
2641 (create_signatured_type_table_from_debug_names)
2642 (dw2_get_file_names_reader, dwarf2_initialize_objfile)
2643 (dwarf2_create_include_psymtab)
2644 (create_debug_type_hash_table, add_type_unit)
2645 (create_type_unit_group, read_comp_units_from_section)
2646 (dwarf2_compute_name, create_cus_hash_table)
2647 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
2648 (create_dwo_unit_in_dwp_v2, open_and_init_dwp_file): Use new
2649 obstack.
2650 (dw2_get_real_path): Likewise. Change argument to
2651 dwarf2_per_objfile.
2652
2653 2020-05-27 Luis Machado <luis.machado@linaro.org>
2654
2655 PR tdep/26000
2656 * arm-tdep.c (thumb_analyze_prologue): Fix instruction matching
2657 for ldrd (immediate).
2658
2659 2020-05-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2660
2661 * command.h: Add comment giving the name of class_tui.
2662 * cli/cli-cmds.c (_initialize_cli_cmds): If TUI defined,
2663 create the fake command for the help for class_tui.
2664
2665 2020-05-26 Tom Tromey <tromey@adacore.com>
2666
2667 * ada-lang.c (ada_print_array_index): Change type. Call val_atr.
2668 (ada_value_ptr_subscript): Don't call pos_atr on the lower bound.
2669 (val_atr): New function.
2670 (value_val_atr): Use it.
2671 * ada-valprint.c (print_optional_low_bound): Change low bound
2672 handling for enums.
2673 (val_print_packed_array_elements): Don't call discrete_position.
2674 * gdbtypes.c (get_discrete_bounds) <TYPE_CODE_RANGE>: Call
2675 discrete_position for enum types.
2676 * language.c (default_print_array_index): Change type.
2677 * language.h (struct language_defn) <la_print_array_index>: Add
2678 index_type parameter, change type of index_value.
2679 (LA_PRINT_ARRAY_INDEX): Add index_type parameter.
2680 (default_print_array_index): Update.
2681 * valprint.c (maybe_print_array_index): Don't call
2682 value_from_longest. Update.
2683 (value_print_array_elements): Don't call discrete_position.
2684
2685 2020-05-26 Tom Tromey <tromey@adacore.com>
2686
2687 * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE.
2688 * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE.
2689
2690 2020-05-25 Cristiano De Alti <cristiano_dealti@hotmail.com>
2691
2692 PR gdb/13519
2693 * avr-tdep.c (avr_integer_to_address): Return data or code
2694 address accordingly to the second 'type' argument of the
2695 function.
2696
2697 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
2698
2699 * infcmd.c, inferior.h: (construct_inferior_arguments):
2700 Moved function from here to gdbsupport/common-inferior.{h,cc}
2701
2702 2020-05-23 Tom Tromey <tom@tromey.com>
2703
2704 Revert commit eca1f90c:
2705 * NEWS: Remove entry for completion styling.
2706 * completer.c (_rl_completion_prefix_display_length): Move
2707 declaration later.
2708 (gdb_fnprint): Revert.
2709 (gdb_display_match_list_1): Likewise.
2710 * cli/cli-style.c (completion_prefix_style)
2711 (completion_difference_style, completion_suffix_style): Remove.
2712 (_initialize_cli_style): Revert.
2713 * cli/cli-style.h (completion_prefix_style)
2714 (completion_difference_style, completion_suffix_style): Don't
2715 declare.
2716
2717 2020-05-24 Pedro Alves <palves@redhat.com>
2718
2719 * symtab.c (completion_list_add_name): Return boolean indication
2720 of whether the symbol matched.
2721 (completion_list_add_symbol): Don't try to remove C++ aliases if
2722 the symbol didn't match in the first place.
2723 * symtab.h (completion_list_add_name): Return bool.
2724
2725 2020-05-23 Simon Marchi <simon.marchi@polymtl.ca>
2726
2727 * gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
2728 type::field.
2729
2730 2020-05-23 Joel Brobecker <brobecker@adacore.com>
2731
2732 GDB 9.2 released.
2733
2734 2020-05-23 Tom Tromey <tom@tromey.com>
2735
2736 * NEWS: Add entry for completion styling.
2737 * completer.c (_rl_completion_prefix_display_length): Move
2738 declaration earlier.
2739 (gdb_fnprint): Use completion_style.
2740 (gdb_display_match_list_1): Likewise.
2741 * cli/cli-style.c (completion_prefix_style)
2742 (completion_difference_style, completion_suffix_style): New
2743 globals.
2744 (_initialize_cli_style): Register new globals.
2745 * cli/cli-style.h (completion_prefix_style)
2746 (completion_difference_style, completion_suffix_style): Declare.
2747
2748 2020-05-23 Pedro Alves <palves@redhat.com>
2749
2750 * utils.c: Include "gdbsupport/gdb-safe-ctype.h".
2751 (parse_escape): Use ISDIGIT instead of isdigit.
2752 (puts_debug): Use gdb_isprint instead of isprint.
2753 (fprintf_symbol_filtered): Use ISALNUM instead of isalnum.
2754 (cp_skip_operator_token, skip_ws, strncmp_iw_with_mode): Use
2755 ISSPACE instead of isspace.
2756 (strncmp_iw_with_mode): Use TOLOWER instead of tolower and ISSPACE
2757 instead of isspace.
2758 (strcmp_iw_ordered): Use ISSPACE instead of isspace.
2759 (string_to_core_addr): Use TOLOWER instead of tolower, ISXDIGIT
2760 instead of isxdigit and ISDIGIT instead of isdigit.
2761
2762 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
2763
2764 * gdbtypes.h (struct type) <field>: New method.
2765 (TYPE_FIELDS): Remove, replace all uses with either type::fields
2766 or type::field.
2767
2768 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
2769
2770 * gdbtypes.h (struct type) <fields, set_fields>: New methods.
2771 (TYPE_FIELDS): Use type::fields. Change all call sites that
2772 modify the propery to use type::set_fields instead.
2773
2774 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
2775
2776 * gdbtypes.h (TYPE_NFIELDS): Remove. Change all cal sites to use
2777 type::num_fields instead.
2778
2779 2020-05-22 Simon Marchi <simon.marchi@efficios.com>
2780
2781 * gdbtypes.h (struct type) <num_fields, set_num_fields>: New
2782 methods.
2783 (TYPE_NFIELDS): Use type::num_fields. Change all call sites
2784 that modify the number of fields to use type::set_num_fields
2785 instead.
2786
2787 2020-05-22 Tom Tromey <tromey@adacore.com>
2788
2789 * compile/compile-object-load.h (munmap_list_free): Don't
2790 declare.
2791
2792 2020-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
2793
2794 * annotate.c (annotate_source_line): Update return type, add call
2795 to update current symtab and line.
2796 * annotate.h (annotate_source_line): Update return type, and
2797 extend header comment.
2798 * source.c (info_line_command): Check annotation_level before
2799 calling annotate_source_line.
2800 * stack.c (print_frame_info): If calling annotate_source_line
2801 returns true, then don't print any other source line information.
2802
2803 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
2804
2805 * lm32-tdep.c (lm32_register_reggroup_p): Fix condition.
2806
2807 2020-05-21 Simon Marchi <simon.marchi@efficios.com>
2808
2809 * coffread.c (patch_type): Remove NULL check before xfree.
2810 * corefile.c (set_gnutarget): Likewise.
2811 * cp-abi.c (set_cp_abi_as_auto_default): Likewise.
2812 * exec.c (build_section_table): Likewise.
2813 * remote.c (remote_target::pass_signals): Likewise.
2814 * utils.c (n_spaces): Likewise.
2815 * cli/cli-script.c (document_command): Likewise.
2816 * i386-windows-tdep.c (core_process_module_section): Likewise.
2817 * linux-fork.c (struct fork_info) <~fork_info>: Likewise.
2818
2819 2020-05-20 Simon Marchi <simon.marchi@efficios.com>
2820
2821 * symfile.c (reread_symbols): Clear objfile's section_offsets
2822 vector and section indices, re-compute them by calling
2823 sym_offsets.
2824
2825 2020-05-20 Tom Tromey <tromey@adacore.com>
2826
2827 * ada-lang.c (bound_name, MAX_ADA_DIMENS): Remove.
2828 (desc_one_bound, desc_index_type): Compute field name.
2829
2830 2020-05-20 Tom de Vries <tdevries@suse.de>
2831
2832 PR symtab/25833
2833 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index.
2834
2835 2020-05-20 Alan Modra <amodra@gmail.com>
2836
2837 PR 25993
2838 * solib-darwin.c (darwin_bfd_open): Don't strdup pathname for
2839 bfd_set_filename.
2840 * solib-aix.c (solib_aix_bfd_open): Use std::string for name
2841 passed to bfd_set_filename.
2842 * symfile-mem.c (add_vsyscall_page): Likewise for string
2843 passed to symbol_file_add_from_memory.
2844 (symbol_file_add_from_memory): Make name param a const char* and
2845 don't strdup.
2846
2847 2020-05-20 Alan Modra <amodra@gmail.com>
2848
2849 * coff-pe-read.c (read_pe_exported_syms): Use bfd_get_filename
2850 rather than accessing bfd->filename directly.
2851 * dtrace-probe.c (dtrace_static_probe_ops::get_probes): Likewise,
2852 and use bfd_section_name.
2853 * dwarf2/frame.c (decode_frame_entry): Likewise.
2854 * exec.c (exec_set_section_address): Likewise.
2855 * solib-aix.c (solib_aix_bfd_open): Likewise.
2856 * stap-probe.c (get_stap_base_address): Likewise.
2857 * symfile.c (reread_symbols): Likewise.
2858
2859 2020-05-19 Tom Tromey <tromey@adacore.com>
2860
2861 * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
2862
2863 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
2864
2865 * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
2866
2867 2020-05-19 Pedro Alves <palves@redhat.com>
2868
2869 * NEWS (set exec-file-mismatch): Adjust entry.
2870 * exec.c: Include "build-id.h".
2871 (validate_exec_file): Try to match build IDs instead of filenames.
2872 * gdb_bfd.c (struct gdb_bfd_open_closure): New.
2873 (gdb_bfd_iovec_fileio_open): Adjust to use gdb_bfd_open_closure
2874 and pass down 'warn_if_slow'.
2875 (gdb_bfd_open): Add 'warn_if_slow' parameter. Use
2876 gdb_bfd_open_closure to pass it down.
2877 * gdb_bfd.h (gdb_bfd_open): Add 'warn_if_slow' parameter.
2878
2879 2020-05-19 Pedro Alves <palves@redhat.com>
2880
2881 * gdb_bfd.c (gdb_bfd_iovec_fileio_open): Adjust.
2882 * target.c (target_fileio_open_1): Rename to target_fileio_open
2883 and make extern. Use bool.
2884 (target_fileio_open, target_fileio_open_warn_if_slow): Delete.
2885 (target_fileio_read_alloc_1): Adjust.
2886 * target.h (target_fileio_open): Add 'warn_if_slow' parameter.
2887 (target_fileio_open_warn_if_slow): Delete declaration.
2888
2889 2020-05-19 Pedro Alves <palves@redhat.com>
2890
2891 * gdb_bfd.h: (gdb_bfd_open): Default to 'fd' parameter to -1.
2892 Adjust all callers.
2893
2894 2020-05-19 Yoshinori Sato <ysato@users.sourceforge.jp>
2895
2896 * h8300-tdep.c (h8300_is_argument_spill): Change how we check
2897 whether disp is negative.
2898
2899 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
2900
2901 * symfile.h (struct symfile_segment_data)
2902 <~symfile_segment_data>: Remove.
2903 <segment_info>: Change to std::vector.
2904 * symfile.c (default_symfile_segments): Update.
2905 * elfread.c (elf_symfile_segments): Update.
2906
2907 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
2908
2909 * symfile.h (struct symfile_segment_data) <struct segment>: New.
2910 <segments>: New.
2911 <segment_bases, segment_sizes>: Remove.
2912 * symfile.c (default_symfile_segments): Update.
2913 * elfread.c (elf_symfile_segments): Update.
2914 * remote.c (remote_target::get_offsets): Update.
2915 * solib-target.c (solib_target_relocate_section_addresses):
2916 Update.
2917
2918 2020-05-19 Simon Marchi <simon.marchi@efficios.com>
2919
2920 * symfile.h (struct symfile_segment_data): Initialize fields.
2921 <~symfile_segment_data>: Add.
2922 (symfile_segment_data_up): New.
2923 (struct sym_fns) <sym_segments>: Return a
2924 symfile_segment_data_up.
2925 (default_symfile_segments): Return a symfile_segment_data_up.
2926 (free_symfile_segment_data): Remove.
2927 (get_symfile_segment_data): Return a symfile_segment_data_up.
2928 * symfile.c (default_symfile_segments): Likewise.
2929 (get_symfile_segment_data): Likewise.
2930 (free_symfile_segment_data): Remove.
2931 (symfile_find_segment_sections): Update.
2932 * elfread.c (elf_symfile_segments): Return a
2933 symfile_segment_data_up.
2934 * remote.c (remote_target::get_offsets): Update.
2935 * solib-target.c (solib_target_relocate_section_addresses):
2936 Update.
2937 * symfile-debug.c (debug_sym_segments): Return a
2938 symfile_segment_data_up.
2939
2940 2020-05-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2941
2942 PR build/25981
2943 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64] (regmap):
2944 Hardcode register numbers.
2945
2946 PR build/25981
2947 * procfs.c [(__i386__ || __x86_64__) && sun] (proc_get_LDT_entry,
2948 procfs_find_LDT_entry): Remove.
2949 * procfs.h [(__i386__ || __x86_64__) && sun] (struct ssd,
2950 procfs_find_LDT_entry): Remove.
2951 * sol-thread.c [(__i386__ || __x86_64__) && sun] (ps_lgetLDT):
2952 Remove.
2953
2954 2020-05-17 Pedro Alves <palves@redhat.com>
2955 Andrew Burgess <andrew.burgess@embecosm.com>
2956 Keno Fischer <keno@juliacomputing.com>
2957
2958 PR gdb/25741
2959 * breakpoint.c (build_target_condition_list): Update comments.
2960 (build_target_command_list): Update comments and skip matching
2961 locations.
2962 (insert_bp_location): Move "set breakpoint auto-hw on" handling to
2963 a separate function. Simplify "set breakpoint auto-hw off"
2964 handling.
2965 (insert_breakpoints): Update comment.
2966 (tracepoint_locations_match): New parameter. For breakpoints,
2967 compare location types too, if the caller wants to.
2968 (handle_automatic_hardware_breakpoints): New functions.
2969 (bp_location_is_less_than): Also sort by location type and
2970 hardware breakpoint length.
2971 (update_global_location_list): Handle "set breakpoint auto-hw on"
2972 here.
2973 (update_breakpoint_locations): Ask breakpoint_locations_match to
2974 ignore location types.
2975
2976 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
2977
2978 * gdbtypes.h (TYPE_NAME): Remove. Change all cal sites to use
2979 type::name instead.
2980
2981 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
2982
2983 * gdbtypes.h (struct type) <name, set_name>: New methods.
2984 (TYPE_CODE): Use type::name. Change all call sites used to set
2985 the name to use type::set_name instead.
2986
2987 2020-05-16 Tom Tromey <tom@tromey.com>
2988
2989 * top.c (quit_force): Update.
2990 * infrun.c (handle_no_resumed): Update.
2991 * top.h (all_uis): New function.
2992 (ALL_UIS): Remove.
2993
2994 2020-05-16 Simon Marchi <simon.marchi@efficios.com>
2995
2996 * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Fix condition.
2997
2998 2020-05-16 Pedro Alves <palves@redhat.com>
2999
3000 * ia64-linux-nat.c
3001 (ia64_linux_nat_target) <enable_watchpoints_in_psr(ptid_t)>:
3002 Declare method.
3003 (enable_watchpoints_in_psr): Now a method of ia64_linux_nat_target.
3004
3005 2020-05-15 Simon Marchi <simon.marchi@efficios.com>
3006
3007 * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
3008 (sparc64_adi_info): Likewise.
3009
3010 2020-05-15 Tom Tromey <tom@tromey.com>
3011
3012 * symtab.c (lookup_language_this, lookup_symbol_aux): Use
3013 block_objfile.
3014 (lookup_objfile_from_block): Remove.
3015 (lookup_symbol_in_block, lookup_symbol_in_static_block)
3016 (lookup_global_symbol): Use block_objfile.
3017 * symtab.h (lookup_objfile_from_block): Don't declare.
3018 * printcmd.c (clear_dangling_display_expressions): Use
3019 block_objfile.
3020 * parse.c (operator_check_standard): Use block_objfile.
3021
3022 2020-05-15 Tom Tromey <tom@tromey.com>
3023
3024 * language.c (language_alloc_type_symbol): Set
3025 SYMBOL_SECTION.
3026 * symtab.c (initialize_objfile_symbol): Remove.
3027 (allocate_symbol): Remove.
3028 (allocate_template_symbol): Remove.
3029 * dwarf2/read.c (fixup_go_packaging): Use "new".
3030 (new_symbol): Use "new".
3031 (read_variable): Don't call initialize_objfile_symbol. Use
3032 "new".
3033 (read_func_scope): Use "new".
3034 * xcoffread.c (process_xcoff_symbol): Don't call
3035 initialize_objfile_symbol.
3036 (SYMBOL_DUP): Remove.
3037 * coffread.c (process_coff_symbol, coff_read_enum_type): Use
3038 "new".
3039 * symtab.h (allocate_symbol, initialize_objfile_symbol)
3040 (allocate_template_symbol): Don't declare.
3041 (struct symbol): Add copy constructor. Change defaults.
3042 * jit.c (finalize_symtab): Use "new".
3043 * ctfread.c (ctf_add_enum_member_cb, new_symbol, ctf_add_var_cb):
3044 Use "new".
3045 * stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
3046 (common_block_end): Use "new".
3047 * mdebugread.c (parse_symbol): Use "new".
3048 (new_symbol): Likewise.
3049
3050 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3051
3052 * NEWS: Mention changes to help and apropos.
3053
3054 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3055
3056 * command.h (enum command_class): Improve comments, document
3057 that class_alias is for user-defined aliases, give the class
3058 name for each class, remove unused class_xdb.
3059 * cli/cli-decode.c (add_com_alias): Document THECLASS intended usage.
3060 * breakpoint.c (_initialize_breakpoint): Replace class_alias
3061 by a precise class.
3062 * infcmd.c (_initialize_infcmd): Likewise.
3063 * reverse.c (_initialize_reverse): Likewise.
3064 * stack.c (_initialize_stack): Likewise.
3065 * symfile.c (_initialize_symfile): Likewise.
3066 * tracepoint.c (_initialize_tracepoint): Likewise.
3067
3068 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3069
3070 * cli/cli-decode.c (apropos_cmd): Produce output for aliases
3071 when their aliased command is traversed.
3072 (help_cmd): Add fput_command_names_styled call to
3073 output command name and aliases when command has an alias.
3074
3075 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3076
3077 * cli/cli-decode.h (help_cmd_list): Remove declaration.
3078 * cli/cli-decode.c (help_cmd_list): Declare as static,
3079 remove prefix argument, use bool for recurse arg, rework to show the aliases of
3080 a command together with the command.
3081 (fput_command_name_styled, fput_command_names_styled): New functions.
3082 (print_help_for_command): Remove prefix arg, use bool for recurse arg, use
3083 fput_command_name_styled.
3084 (help_list, help_all): Update callers to remove prefix arg and use bool recurse.
3085 * cli/cli-cmds.c (_initialize_cli_cmds): Update alias_command doc.
3086
3087 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3088
3089 * cli/cli-setshow.h (cmd_show_list): Remove prefix argument.
3090 * cli/cli-decode.c (do_show_prefix_cmd): Likewise.
3091 * command.h (cmd_show_list): Likewise.
3092 * dwarf2/index-cache.c (show_index_cache_command): Likewise.
3093 * cli/cli-setshow.c (cmd_show_list): Use the prefix to produce the output. Skip aliases.
3094
3095 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3096
3097 * unittests/command-def-selftests.c (traverse_command_structure):
3098 Verify all commands of a list have the same prefix command and
3099 that only the top cmdlist commands have a null prefix.
3100
3101 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3102
3103 * cli/cli-decode.c (lookup_cmd_for_prefix): Return the aliased command
3104 as prefix, not one of its aliases.
3105 (set_cmd_prefix): Remove.
3106 (do_add_cmd): Centralize the setting of the prefix of a command, when
3107 command is defined after its full chain of prefix commands.
3108 (add_alias_cmd): Remove call to set_cmd_prefix, as do_add_cmd does it.
3109 (add_setshow_cmd_full): Likewise.
3110 (update_prefix_field_of_prefixed_commands): New function.
3111 (add_prefix_cmd): Replace non working call to set_cmd_prefix by
3112 update_prefix_field_of_prefixed_commands.
3113 * gdb/remote-fileio.c (initialize_remote_fileio): Use the real
3114 addresses of remote_set_cmdlist and remote_show_cmdlist given
3115 as argument, not the address of an argument.
3116 * gdb/remote-fileio.h (initialize_remote_fileio): Likewise.
3117 * gdb/remote.c (_initialize_remote): Likewise.
3118
3119 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3120
3121 * cli/cli-cmds.c (alias_command): Check for an existing alias
3122 using lookup_cmd_composition, as valid_command_p is too strict
3123 and forbids aliases that are the prefix of an existing alias
3124 or command.
3125 * cli/cli-decode.c (lookup_cmd_composition): Ensure a prefix
3126 command is properly recognised as a valid command.
3127
3128 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3129
3130 * unittests/help-doc-selftests.c: Rename to
3131 unittests/command-def-selftests.c
3132 * unittests/command-def-selftests.c (help_doc_tests): Update some
3133 comments.
3134 (command_structure_tests, traverse_command_structure): New namespace
3135 and function.
3136 (command_structure_invariants_tests): New function.
3137 (_initialize_command_def_selftests) Renamed from
3138 _initialize_help_doc_selftests, register command_structure_invariants
3139 selftest.
3140
3141 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3142
3143 * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as
3144 an alias of 'show'.
3145
3146 2020-05-15 Joel Brobecker <brobecker@adacore.com>
3147
3148 * ada-lang.h: (ada_is_gnat_encoded_fixed_point_type): Renames
3149 ada_is_fixed_point_type. Update all callers.
3150 (gnat_encoded_fixed_point_delta): Renames ada_delta. Update
3151 all callers.
3152 * ada-lang.c (gnat_encoded_fixed_type_info): Renames fixed_type_info.
3153 Update all callers.
3154 * ada-typeprint.c (print_gnat_encoded_fixed_point_type): Renames
3155 print_fixed_point_type. Update all callers.
3156 * ada-valprint.c (ada_value_print_num): Replace call to
3157 ada_is_fixed_point_type by ada_is_gnat_encoded_fixed_point_type.
3158
3159 2020-05-14 Kevin Buettner <kevinb@redhat.com>
3160
3161 * nat/linux-btrace.c (btrace_this_cpu): Add check for AMD
3162 processors.
3163 (cpu_supports_bts): Add CV_AMD case.
3164
3165 2020-05-14 Laurent Morichetti <Laurent.Morichetti@amd.com>
3166 Simon Marchi <simon.marchi@efficios.com>
3167
3168 * infrun.c (stop_all_threads): Collect multiple wait events at
3169 each pass.
3170
3171 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
3172
3173 * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
3174 type::code instead.
3175
3176 2020-05-14 Simon Marchi <simon.marchi@efficios.com>
3177
3178 * gdbtypes.h (struct type) <code, set_code>: New methods.
3179 (TYPE_CODE): Use type::code. Change all call sites used to set
3180 the code to use type::set_code instead.
3181
3182 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3183 Tom de Vries <tdevries@suse.de>
3184 Pedro Alves <palves@redhat.com>
3185
3186 PR threads/25478
3187 * infrun.c (stop_all_threads): Do NOT ignore
3188 TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_THREAD_EXITED,
3189 TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALLED wait statuses
3190 received.
3191 (handle_no_resumed): Remove code handling a live inferior with no
3192 threads.
3193 * remote.c (has_single_non_exited_thread): New.
3194 (remote_target::update_thread_list): Do not delete a thread if is
3195 the last thread of the process.
3196 * thread.c (thread_select): Call delete_exited_threads instead of
3197 prune_threads.
3198
3199 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3200
3201 * infrun.c (stop_all_threads): Enable/disable thread events of all
3202 targets. Move a debug message denoting the end of the function
3203 into the SCOPED_EXIT block.
3204
3205 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3206
3207 * process-stratum-target.h: Include <set>.
3208 (all_non_exited_process_targets, switch_to_target_no_thread): New
3209 function declarations.
3210 * process-stratum-target.c (all_non_exited_process_targets)
3211 (switch_to_target_no_thread): New function implementations.
3212
3213 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3214
3215 * infrun.c (handle_inferior_event): Extract out a piece of code
3216 into...
3217 (mark_non_executing_threads): ...this new function.
3218
3219 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3220
3221 * infrun.c (resume_1): Move a 'regcache_read_pc' call down to first
3222 use.
3223
3224 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3225
3226 * regcache.c (regcache_read_pc_protected): New function
3227 implementation that returns 0 if the PC cannot read via
3228 'regcache_read_pc'.
3229 * infrun.c (proceed): Call 'regcache_read_pc_protected'
3230 instead of 'regcache_read_pc'.
3231 (keep_going_pass_signal): Ditto.
3232
3233 2020-05-13 Tom Tromey <tromey@adacore.com>
3234
3235 * ada-lang.c (align_value): Remove.
3236 (ada_template_to_fixed_record_type_1): Use align_up.
3237
3238 2020-05-13 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3239
3240 * async-event.c: Update the copyright year.
3241 * async-event.h: Update the copyright year.
3242
3243 2020-05-12 Simon Marchi <simon.marchi@efficios.com>
3244
3245 * objfiles.h (is_addr_in_objfile,
3246 shared_objfile_contains_address_p): Return bool.
3247 * objfile.c (is_addr_in_objfile,
3248 shared_objfile_contains_address_p): Return bool.
3249
3250 2020-05-11 Tom Tromey <tromey@adacore.com>
3251
3252 * cli/cli-cmds.c (info_command): Restore.
3253 (_initialize_cli_cmds): Use add_prefix_command for "info".
3254 * gdb-gdb.gdb.in: Restore breakpoint on info_command.
3255
3256 2020-05-11 Tom Tromey <tromey@adacore.com>
3257
3258 * ada-lang.c (ada_value_primitive_field): Now public.
3259 * ada-lang.h (ada_value_primitive_field): Declare.
3260 * ada-valprint.c (print_field_values): Use
3261 ada_value_primitive_field for wrapper fields.
3262
3263 2020-05-11 Tom de Vries <tdevries@suse.de>
3264
3265 * dwarf2/index-write.c (debug_names::psymbol_tag): Handle
3266 MODULE_DOMAIN.
3267
3268 2020-05-11 Tom de Vries <tdevries@suse.de>
3269
3270 PR symtab/25941
3271 * dwarf2/read.c (create_cus_from_debug_names_list): Initialize CUs
3272 with length 0, if not gdb-produced.
3273 (cutu_reader::cutu_reader): Set CU length to actual length if 0.
3274
3275 2020-05-09 Tom de Vries <tdevries@suse.de>
3276
3277 PR gdb/25955
3278 * break-catch-throw.c (check_status_exception_catchpoint): Fix name
3279 calculation.
3280
3281 2020-05-09 Tom Tromey <tom@tromey.com>
3282
3283 * top.c (server_command): Now bool.
3284 * top.h (server_command): Now bool.
3285
3286 2020-05-08 Tom Tromey <tromey@adacore.com>
3287
3288 * dwarf2/read.c (read_lexical_block_scope): Don't process a DIE
3289 already being processed.
3290
3291 2020-05-08 Tom Tromey <tom@tromey.com>
3292
3293 * printcmd.c (struct display) <next>: Remove.
3294 <display>: New constructor.
3295 <exp_string>: Now a std::string.
3296 <enabled_p>: Now a bool.
3297 (display_number): Move definition earlier.
3298 (displays): Rename from display_chain. Now a std::vector.
3299 (ALL_DISPLAYS, ALL_DISPLAYS_SAFE): Remove.
3300 (display_command): Update.
3301 (do_one_display, disable_display)
3302 (enable_disable_display_command, do_enable_disable_display):
3303 Update.
3304 (free_display): Remove.
3305 (clear_displays): Rewrite.
3306 (delete_display): Update.
3307 (map_display_numbers): Use function_view. Remove "data"
3308 parameter. Update.
3309 (do_delete_display): Remove.
3310 (undisplay_command): Update.
3311 (do_one_display, do_displays, disable_display)
3312 (info_display_command): Update.
3313 (do_enable_disable_display): Remove.
3314 (enable_disable_display_command)
3315 (clear_dangling_display_expressions): Update.
3316
3317 2020-05-08 Tom Tromey <tom@tromey.com>
3318
3319 * symtab.c (set_symbol_cache_size)
3320 (maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
3321 (maintenance_print_symbol_cache_statistics): Update.
3322 * symmisc.c (print_symbol_bcache_statistics)
3323 (print_objfile_statistics, maintenance_print_objfiles)
3324 (maintenance_info_symtabs, maintenance_check_symtabs)
3325 (maintenance_expand_symtabs, maintenance_info_line_tables):
3326 Update.
3327 * symfile-debug.c (set_debug_symfile): Update.
3328 * source.c (forget_cached_source_info): Update.
3329 * python/python.c (gdbpy_progspaces): Update.
3330 * psymtab.c (maintenance_info_psymtabs): Update.
3331 * probe.c (parse_probes): Update.
3332 * linespec.c (iterate_over_all_matching_symtabs)
3333 (collect_symtabs_from_filename, search_minsyms_for_name): Update.
3334 * guile/scm-progspace.c (gdbscm_progspaces): Update.
3335 * exec.c (exec_target::close): Update.
3336 * ada-tasks.c (ada_tasks_new_objfile_observer): Update.
3337 * breakpoint.c (print_one_breakpoint_location)
3338 (create_longjmp_master_breakpoint)
3339 (create_std_terminate_master_breakpoint): Update.
3340 * progspace.c (program_spaces): Now a std::vector.
3341 (maybe_new_address_space): Update.
3342 (add_program_space): Remove.
3343 (program_space::program_space): Update.
3344 (remove_program_space): Update.
3345 (number_of_program_spaces): Remove.
3346 (print_program_space, update_address_spaces): Update.
3347 * progspace.h (program_spaces): Change type.
3348 (ALL_PSPACES): Remove.
3349 (number_of_program_spaces): Don't declare.
3350 (struct program_space) <next>: Remove.
3351
3352 2020-05-08 Tom Tromey <tom@tromey.com>
3353
3354 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Update.
3355 * solib-svr4.c (svr4_fetch_objfile_link_map): Update.
3356 (enable_break): Update.
3357 * solib-frv.c (frv_fdpic_find_global_pointer): Update.
3358 (frv_fdpic_find_canonical_descriptor): Update.
3359 (frv_fetch_objfile_link_map): Update.
3360 * progspace.c (program_space::free_all_objfiles): Update.
3361 (program_space::solibs): New method.
3362 * progspace.h (struct program_space) <solibs>: New method.
3363 * solist.h (master_so_list): Don't declare.
3364 (ALL_SO_LIBS): Remove.
3365 * solib.h (so_list_head): Remove.
3366 (update_solib_list): Update comment.
3367 * solib.c (master_so_list): Remove.
3368 (solib_used, update_solib_list, solib_add)
3369 (info_sharedlibrary_command, clear_solib)
3370 (reload_shared_libraries_1, remove_user_added_objfile): Update.
3371
3372 2020-05-08 Tom Tromey <tom@tromey.com>
3373
3374 * extension.c (extension_languages): Now a std::array.
3375 (ALL_EXTENSION_LANGUAGES): Remove.
3376 (get_ext_lang_defn, get_ext_lang_of_file)
3377 (eval_ext_lang_from_control_command): Update.
3378 (finish_ext_lang_initialization)
3379 (auto_load_ext_lang_scripts_for_objfile)
3380 (ext_lang_type_printers::ext_lang_type_printers)
3381 (apply_ext_lang_type_printers)
3382 (ext_lang_type_printers::~ext_lang_type_printers)
3383 (apply_ext_lang_val_pretty_printer, apply_ext_lang_frame_filter)
3384 (preserve_ext_lang_values, get_breakpoint_cond_ext_lang)
3385 (breakpoint_ext_lang_cond_says_stop, check_quit_flag)
3386 (get_matching_xmethod_workers, ext_lang_colorize)
3387 (ext_lang_before_prompt): Update.
3388 (ALL_ENABLED_EXTENSION_LANGUAGES): Remove.
3389
3390 2020-05-08 Tom Tromey <tom@tromey.com>
3391
3392 * symtab.h (class demangle_result_storage) <set_malloc_ptr>: New
3393 overload.
3394 <swap_string, m_string>: Remove.
3395 * symtab.c (demangle_for_lookup, completion_list_add_symbol):
3396 Update.
3397 * stabsread.c (define_symbol, read_type): Update.
3398 * linespec.c (find_linespec_symbols): Update.
3399 * gnu-v3-abi.c (gnuv3_get_typeid): Update.
3400 * dwarf2/read.c (dwarf2_canonicalize_name): Update.
3401 * dbxread.c (read_dbx_symtab): Update.
3402 * cp-support.h (cp_canonicalize_string_full)
3403 (cp_canonicalize_string, cp_canonicalize_string_no_typedefs):
3404 Return unique_xmalloc_ptr.
3405 * cp-support.c (inspect_type): Update.
3406 (cp_canonicalize_string_full): Return unique_xmalloc_ptr.
3407 (cp_canonicalize_string_no_typedefs, cp_canonicalize_string):
3408 Likewise.
3409 * c-typeprint.c (print_name_maybe_canonical): Update.
3410 * break-catch-throw.c (check_status_exception_catchpoint):
3411 Update.
3412
3413 2020-05-08 Tom de Vries <tdevries@suse.de>
3414
3415 * infrun.c (follow_fork): Copy current_line and current_symtab to
3416 child thread.
3417
3418 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
3419
3420 * async-event.c (struct async_signal_handler, struct
3421 async_event_handler): Reformat, remove typedef.
3422
3423 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
3424
3425 * gdbtypes.h (TYPE_DYN_PROP_LIST): Remove. Update all users
3426 access thistype->main_type->dyn_prop_list directly.
3427
3428 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
3429
3430 * gdbtypes.h (struct type) <remove_dyn_prop>: New method.
3431 (remove_dyn_prop): Remove. Update all users to use
3432 type::remove_dyn_prop.
3433 * gdbtypes.c (remove_dyn_prop): Rename to...
3434 (type::remove_dyn_prop): ... this.
3435
3436 2020-05-07 Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
3437
3438 * gdbtypes.h (struct type) <add_dyn_prop>: New method.
3439 (add_dyn_prop): Remove. Update all users to use
3440 type::add_dyn_prop.
3441 * gdbtypes.c (add_dyn_prop): Rename to...
3442 (type::add_dyn_prop): ... this.
3443
3444 2020-05-07 Simon Marchi <simon.marchi@efficios.com>
3445
3446 * gdbtypes.h (struct type) <get_dyn_prop>: New method.
3447 (get_dyn_prop): Remove. Update all users to use
3448 type::dyn_prop.
3449 * gdbtypes.c (get_dyn_prop): Rename to...
3450 (type::dyn_prop): ... this.
3451
3452 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
3453
3454 * gdbtypes.h (struct main_type) <flag_static>: Remove.
3455
3456 2020-05-06 Simon Marchi <simon.marchi@efficios.com>
3457
3458 * amd64-tdep.c (amd64_analyze_prologue): Check for `endbr64`
3459 instruction, skip it if it's there.
3460
3461 2020-05-05 Simon Marchi <simon.marchi@efficios.com>
3462
3463 * gdbtypes.h (struct main_type) <flag_incomplete>: Remove.
3464
3465 2020-05-04 Simon Marchi <simon.marchi@efficios.com>
3466
3467 * gdbtypes.h (TYPE_INCOMPLETE): Remove.
3468 * gdbtypes.c (recursive_dump_type): Remove use of
3469 TYPE_INCOMPLETE.
3470
3471 2020-05-03 Tom Tromey <tom@tromey.com>
3472
3473 * breakpoint.c (catch_command, tcatch_command): Remove.
3474 (_initialize_breakpoint): Use add_basic_prefix_cmd,
3475 add_show_prefix_cmd.
3476 (set_breakpoint_cmd, show_breakpoint_cmd): Remove
3477 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3478 Remove.
3479 (add_internal_problem_command): Use add_basic_prefix_cmd,
3480 add_show_prefix_cmd.
3481 * mips-tdep.c (set_mipsfpu_command): Remove.
3482 (_initialize_mips_tdep): Use add_basic_prefix_cmd.
3483 * dwarf2/index-cache.c (set_index_cache_command): Remove.
3484 (_initialize_index_cache): Use add_basic_prefix_cmd.
3485 * memattr.c (dummy_cmd): Remove.
3486 (_initialize_mem): Use add_basic_prefix_cmd, add_show_prefix_cmd.
3487 * tui/tui-win.c (set_tui_cmd, show_tui_cmd): Remove.
3488 (_initialize_tui_win): Use add_basic_prefix_cmd,
3489 add_show_prefix_cmd.
3490 * cli/cli-logging.c (set_logging_command): Remove.
3491 (_initialize_cli_logging): Use add_basic_prefix_cmd,
3492 add_show_prefix_cmd.
3493 (show_logging_command): Remove.
3494 * target.c (target_command): Remove.
3495 (add_target): Use add_basic_prefix_cmd.
3496
3497 2020-05-02 Hannes Domani <ssbssa@yahoo.de>
3498
3499 * gdbtypes.h (enum dynamic_prop_node_kind): Fix typo.
3500
3501 2020-05-01 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3502
3503 * gdb-gdb.gdb-in: Remove breakpoint on disappeared function
3504 info_command.
3505
3506 2020-04-30 Kamil Rytarowski <n54@gmx.com>
3507
3508 * nbsd-nat.c (nbsd_enable_proc_events)
3509 (nbsd_nat_target::post_startup_inferior): Add.
3510 (nbsd_nat_target::post_attach): Call `nbsd_enable_proc_events'.
3511 (nbsd_nat_target::update_thread_list): Rewrite.
3512 (nbsd_nat_target::wait): Handle "PTRACE_LWP_EXIT" and
3513 "PTRACE_LWP_CREATE".
3514 * nbsd-nat.h (nbsd_nat_target::post_startup_inferior): Add.
3515
3516 2020-04-30 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3517
3518 * stack.c (_initialize_stack): Remove duplicated creation
3519 of "frame" command and "f" alias.
3520
3521 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
3522
3523 PR gdb/18706
3524 * gdbtypes.c (check_typedef): Calculate size of array of
3525 stubbed type.
3526
3527 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
3528
3529 PR gdb/15559
3530 * i386-tdep.c (i386_push_dummy_call): Call
3531 i386_thiscall_push_dummy_call.
3532 (i386_thiscall_push_dummy_call): New function.
3533 * i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
3534 * i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
3535 (i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
3536
3537 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
3538
3539 * gdbarch.sh (do_read): Add shellcheck disable directive for
3540 warning SC2162.
3541
3542 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
3543
3544 * gdbarch.sh: Use ${foo:-} where shellcheck would report a
3545 "referenced but not assigned" warning.
3546
3547 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
3548
3549 * gdbarch.sh: Remove code that sets fallbackdefault.
3550
3551 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
3552
3553 * gdbarch.sh: Use shell operators && and || instead of
3554 -a and -o.
3555
3556 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
3557
3558 * gdbarch.sh: Use $(...) instead of `...`.
3559
3560 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
3561
3562 * gdbarch.sh: Use double quotes around variables.
3563
3564 2020-04-29 Simon Marchi <simon.marchi@efficios.com>
3565
3566 * gdbarch.sh: Use %s with printf, instead of variables in the
3567 format string.
3568
3569 2020-04-29 Tom Tromey <tromey@adacore.com>
3570
3571 PR ada/25875:
3572 * dwarf2/read.c (update_enumeration_type_from_children): Compute
3573 type fields here.
3574 (read_enumeration_type): Call
3575 update_enumeration_type_from_children later. Update comments.
3576 (process_enumeration_scope): Don't create type fields.
3577
3578 2020-04-29 Kamil Rytarowski <n54@gmx.com>
3579
3580 * nbsd-tdep.c: Include "xml-syscall.h".
3581 (nbsd_init_abi): Call `set_xml_syscall_file_name'.
3582
3583 2020-04-29 Kamil Rytarowski <n54@gmx.com>
3584
3585 * nbsd-nat.c: Include "sys/wait.h".
3586 (nbsd_resume, nbsd_nat_target::resume, nbsd_wait)
3587 (nbsd_nat_target::wait, nbsd_nat_target::insert_exec_catchpoint)
3588 (nbsd_nat_target::remove_exec_catchpoint)
3589 (nbsd_nat_target::set_syscall_catchpoint): Add.
3590 * nbsd-nat.h (nbsd_nat_target::resume, nbsd_nat_target::wait)
3591 (nbsd_nat_target::insert_exec_catchpoint)
3592 (nbsd_nat_target::remove_exec_catchpoint)
3593 (nbsd_nat_target::set_syscall_catchpoint): Add.
3594 * nbsd-tdep.c (nbsd_get_syscall_number): Add.
3595 (nbsd_init_abi): Call `set_gdbarch_get_syscall_number' and pass
3596 `nbsd_get_syscall_number'.
3597
3598 2020-04-29 Tom Tromey <tom@tromey.com>
3599
3600 * stack.c (print_block_frame_labels): Remove.
3601
3602 2020-04-29 Hannes Domani <ssbssa@yahoo.de>
3603
3604 PR gdb/17320
3605 * ada-valprint.c (val_print_packed_array_elements): Move array
3606 end bracket to new line.
3607 (ada_val_print_string): Remove extra spaces before first array
3608 element.
3609 * c-valprint.c (c_value_print_array): Likewise.
3610 * m2-valprint.c (m2_print_array_contents): Likewise.
3611 (m2_value_print_inner): Likewise.
3612 * p-valprint.c (pascal_value_print_inner): Likewise.
3613 * valprint.c (generic_val_print_array): Likewise.
3614 (value_print_array_elements): Move first array element and array
3615 end bracket to new line.
3616
3617 2020-04-29 Tom de Vries <tdevries@suse.de>
3618
3619 PR symtab/25889
3620 * linespec.c (find_method): Fix ix calculation.
3621
3622 2020-04-28 Kamil Rytarowski <n54@gmx.com>
3623
3624 * syscalls/update-netbsd.sh: New file.
3625 * syscalls/netbsd.xml: Regenerate.
3626 * data-directory/Makefile.in: Register `netbsd.xml' in
3627 `SYSCALLS_FILES'.
3628
3629 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
3630
3631 * syscalls/update-freebsd.sh: Add double quotes.
3632
3633 2020-04-28 Tom Tromey <tom@tromey.com>
3634
3635 * NEWS: Update.
3636 * python/py-cmd.c (gdbpy_initialize_commands): Add COMMAND_TUI.
3637 (cmdpy_init): Allow class_tui.
3638
3639 2020-04-28 Mark Williams <mark@myosotissp.com>
3640
3641 PR gdb/24480
3642 * dwarf2read.c: Add missing assingments to list_in_scope when
3643 start_symtab was already called.
3644
3645 2020-04-28 Simon Marchi <simon.marchi@efficios.com>
3646
3647 PR gdb/25881
3648 * dwarf2/read.c (offset_map_type): Use
3649 gdb:hash_enum<sect_offset> as hash function.
3650
3651 2020-04-28 Tom de Vries <tdevries@suse.de>
3652
3653 * dwarf2/read.c (process_structure_scope): Add symbol for struct decl
3654 with DW_AT_signature.
3655
3656 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
3657
3658 * configure.ac: Remove check for fs_base/gs_base in
3659 user_regs_struct.
3660 * configure: Re-generate.
3661 * config.in: Re-generate.
3662 * amd64-nat.c (amd64_native_gregset_reg_offset): Adjust.
3663 * amd64-linux-nat.c (amd64_linux_nat_target::fetch_registers,
3664 amd64_linux_nat_target::store_registers, ps_get_thread_area, ): Adjust.
3665
3666 2020-04-27 Luis Machado <luis.machado@linaro.org>
3667
3668 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Handle
3669 problematic inline frame unwinding situation.
3670 * frame.c (frame_id_computed_p): New function.
3671 * frame.h (frame_id_computed_p): New prototype.
3672
3673 2020-04-26 Tom Tromey <tom@tromey.com>
3674
3675 * command.h (enum command_class) <class_pseudo>: Remove.
3676
3677 2020-04-26 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3678
3679 * cli/cli-decode.c (lookup_cmd_composition): Fix comments
3680 and whitespace.
3681
3682 2020-04-25 Kamil Rytarowski <n54@gmx.com>
3683
3684 * inf-ptrace.c (inf_ptrace_target::wait): Remove
3685 `PT_GET_PROCESS_STATE' block.
3686
3687 2020-04-24 Tom Tromey <tom@tromey.com>
3688
3689 * symtab.h (symbol_get_demangled_name): Don't declare.
3690 * symtab.c (symbol_get_demangled_name): Remove.
3691 (general_symbol_info::natural_name)
3692 (general_symbol_info::demangled_name): Update.
3693
3694 2020-04-24 Tom Tromey <tom@tromey.com>
3695
3696 PR rust/25025:
3697 * dwarf2/read.c (dwarf2_physname): Do not demangle for Rust.
3698
3699 2020-04-24 Tom Tromey <tom@tromey.com>
3700
3701 PR symtab/12707:
3702 * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
3703 exists.
3704 (new_symbol): Likewise.
3705 * compile/compile-object-load.c (get_out_value_type): Use
3706 symbol_matches_search_name.
3707
3708 2020-04-24 Tom Tromey <tom@tromey.com>
3709
3710 * dwarf2/read.c (add_partial_symbol): Do not call
3711 compute_and_set_names.
3712
3713 2020-04-24 Tom Tromey <tom@tromey.com>
3714
3715 * dwarf2/read.c (add_partial_symbol): Use new add_psymbol_to_list
3716 overload.
3717
3718 2020-04-24 Tom Tromey <tom@tromey.com>
3719
3720 * psymtab.c (add_psymbol_to_bcache): Simplify calling convention.
3721 (add_psymbol_to_list): New overload. Make old overload call new
3722 one.
3723 * psympriv.h (add_psymbol_to_list): New overload.
3724
3725 2020-04-24 Tom Tromey <tom@tromey.com>
3726
3727 * dwarf2/read.c (partial_die_info::read) <case
3728 DW_AT_linkage_name>: Use value_as_string.
3729 (dwarf2_string_attr): Use value_as_string.
3730 * dwarf2/attribute.h (struct attribute) <value_as_string>: Declare
3731 method.
3732 * dwarf2/attribute.c (attribute::value_as_string): New method.
3733
3734 2020-04-24 Tom Tromey <tom@tromey.com>
3735
3736 * symtab.c (general_symbol_info::natural_name)
3737 (general_symbol_info::demangled_name): Check for language_rust.
3738
3739 2020-04-24 Tom Tromey <tom@tromey.com>
3740
3741 * dwarf2/read.c (dw2_linkage_name): Move Rust "{" hack here...
3742 (dwarf2_physname): ... from here.
3743 (partial_die_info::read): Add Rust "{" hack.
3744
3745 2020-04-24 Tom Tromey <tom@tromey.com>
3746
3747 * symtab.h (struct general_symbol_info) <set_demangled_name>: New
3748 method.
3749 (symbol_set_demangled_name): Don't declare.
3750 * symtab.c (general_symbol_info::set_demangled_name): Rename from
3751 symbol_set_demangled_name.
3752 (general_symbol_info::set_language)
3753 (general_symbol_info::compute_and_set_names): Update.
3754 * minsyms.c (minimal_symbol_reader::install): Update.
3755 * dwarf2/read.c (new_symbol): Update.
3756
3757 2020-04-24 Tom Tromey <tromey@adacore.com>
3758
3759 PR python/23662:
3760 * python/py-type.c (convert_field): Handle
3761 FIELD_LOC_KIND_DWARF_BLOCK.
3762 (typy_get_sizeof): Handle TYPE_HAS_DYNAMIC_LENGTH.
3763 (typy_get_dynamic): Nw function.
3764 (type_object_getset): Add "dynamic".
3765 * NEWS: Add entry.
3766
3767 2020-04-24 Tom Tromey <tromey@adacore.com>
3768
3769 * ada-typeprint.c (print_choices, print_variant_part)
3770 (print_record_field_types_dynamic): New functions.
3771 (print_record_field_types): Use print_record_field_types_dynamic.
3772
3773 2020-04-24 Tom Tromey <tromey@adacore.com>
3774
3775 * dwarf2/read.c (handle_data_member_location): New overload.
3776 (dwarf2_add_field): Use it.
3777 (decode_locdesc): Add "computed" parameter. Update comment.
3778 * gdbtypes.c (is_dynamic_type_internal): Also look for
3779 FIELD_LOC_KIND_DWARF_BLOCK.
3780 (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK.
3781 * gdbtypes.c (is_dynamic_type_internal): Add special case for C++
3782 virtual base classes.
3783 * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle
3784 FIELD_LOC_KIND_DWARF_BLOCK.
3785
3786 2020-04-24 Tom Tromey <tromey@adacore.com>
3787
3788 * dwarf2/read.c (read_structure_type): Handle dynamic length.
3789 * gdbtypes.c (is_dynamic_type_internal): Check
3790 TYPE_HAS_DYNAMIC_LENGTH.
3791 (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH.
3792 * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH):
3793 New macros.
3794 (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New
3795 constant.
3796
3797 2020-04-24 Tom Tromey <tromey@adacore.com>
3798
3799 * dwarf2/read.c (struct variant_field): Rewrite.
3800 (struct variant_part_builder): New.
3801 (struct nextfield): Remove "variant" field. Add "offset".
3802 (struct field_info): Add "current_variant_part" and
3803 "variant_parts".
3804 (alloc_discriminant_info): Remove.
3805 (alloc_rust_variant): New function.
3806 (quirk_rust_enum): Update.
3807 (dwarf2_add_field): Set "offset" member. Don't handle
3808 DW_TAG_variant_part.
3809 (offset_map_type): New typedef.
3810 (convert_variant_range, create_one_variant)
3811 (create_one_variant_part, create_variant_parts)
3812 (add_variant_property): New functions.
3813 (dwarf2_attach_fields_to_type): Call add_variant_property.
3814 (read_structure_type): Don't handle DW_TAG_variant_part.
3815 (handle_variant_part, handle_variant): New functions.
3816 (handle_struct_member_die): Use them.
3817 (process_structure_scope): Don't handle variant parts.
3818 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): Remove.
3819 (struct discriminant_info): Remove.
3820 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: Remove.
3821 (struct main_type) <flag_discriminated_union>: Remove.
3822 * rust-lang.c (rust_enum_p, rust_empty_enum_p): Rewrite.
3823 (rust_enum_variant): Return int. Remove "contents". Rewrite.
3824 (rust_print_enum, rust_print_struct_def, rust_evaluate_subexp):
3825 Update.
3826 * valops.c (value_union_variant): Remove.
3827 * value.h (value_union_variant): Don't declare.
3828
3829 2020-04-24 Tom Tromey <tromey@adacore.com>
3830
3831 * ada-lang.c (ada_discrete_type_high_bound, ada_discrete_type_low)
3832 (ada_value_primitive_packed_val): Update.
3833 * ada-valprint.c (ada_value_print_1): Update.
3834 * dwarf2/loc.c (evaluate_for_locexpr_baton): New struct.
3835 (dwarf2_locexpr_baton_eval): Take a property_addr_info rather than
3836 just an address. Use evaluate_for_locexpr_baton.
3837 (dwarf2_evaluate_property): Update.
3838 * dwarf2/loc.h (struct property_addr_info) <valaddr>: Now an
3839 array_view.
3840 * findvar.c (default_read_var_value): Update.
3841 * gdbtypes.c (compute_variant_fields_inner)
3842 (resolve_dynamic_type_internal): Update.
3843 (resolve_dynamic_type): Change type of valaddr parameter.
3844 * gdbtypes.h (resolve_dynamic_type): Update.
3845 * valarith.c (value_subscripted_rvalue): Update.
3846 * value.c (value_from_contents_and_address): Update.
3847
3848 2020-04-24 Tom Tromey <tromey@adacore.com>
3849
3850 * dwarf2/loc.c (dwarf2_locexpr_baton_eval): Add
3851 "push_initial_value" parameter.
3852 (dwarf2_evaluate_property): Likewise.
3853 * dwarf2/loc.h (dwarf2_evaluate_property): Update.
3854
3855 2020-04-24 Tom Tromey <tromey@adacore.com>
3856
3857 * gdbtypes.c (is_dynamic_type_internal): Check for variant parts.
3858 (variant::matches, compute_variant_fields_recurse)
3859 (compute_variant_fields_inner, compute_variant_fields): New
3860 functions.
3861 (resolve_dynamic_struct): Check for DYN_PROP_VARIANT_PARTS.
3862 Use resolved_type after type is made.
3863 (operator==): Add new cases.
3864 * gdbtypes.h (TYPE_HAS_VARIANT_PARTS): New macro.
3865 (struct discriminant_range, struct variant, struct variant_part):
3866 New.
3867 (union dynamic_prop_data) <variant_parts, original_type>: New
3868 members.
3869 (enum dynamic_prop_node_kind) <DYN_PROP_VARIANT_PARTS>: New constant.
3870 (enum dynamic_prop_kind) <PROP_TYPE, PROP_VARIANT_PARTS>: New
3871 constants.
3872 * value.c (unpack_bits_as_long): Now public.
3873 * value.h (unpack_bits_as_long): Declare.
3874
3875 2020-04-24 Tom Tromey <tromey@adacore.com>
3876
3877 * rs6000-tdep.c (struct ppc_variant): Rename from "variant".
3878 (variants, find_variant_by_arch, rs6000_gdbarch_init): Update.
3879
3880 2020-04-24 Hannes Domani <ssbssa@yahoo.de>
3881
3882 * windows-tdep.c (exception_values): Add WOW64 exception numbers.
3883
3884 2020-04-24 Kamil Rytarowski <n54@gmx.com>
3885
3886 * inf-ptrace.h (follow_fork, insert_fork_catchpoint)
3887 (remove_fork_catchpoint, post_startup_inferior)
3888 (post_attach): Move...
3889 * obsd-nat.h (follow_fork, insert_fork_catchpoint)
3890 (remove_fork_catchpoint, post_startup_inferior)
3891 (post_attach): ...here.
3892 * inf-ptrace.c (follow_fork, insert_fork_catchpoint)
3893 (remove_fork_catchpoint, post_startup_inferior)
3894 (post_attach): Move...
3895 * obsd-nat.c (follow_fork, insert_fork_catchpoint)
3896 (remove_fork_catchpoint, post_startup_inferior)
3897 (post_attach): ...here.
3898
3899 2020-04-24 Tom Tromey <tromey@adacore.com>
3900
3901 * nat/windows-nat.h (struct windows_thread_info)
3902 <pc_adjusted>: New member.
3903 * windows-nat.c (windows_fetch_one_register): Check
3904 pc_adjusted.
3905 (windows_nat_target::get_windows_debug_event)
3906 (windows_nat_target::wait): Set pc_adjusted.
3907
3908 2020-04-24 Tom de Vries <tdevries@suse.de>
3909
3910 * contrib/cc-with-tweaks.sh: Remove <exec>.gdb-index file handling.
3911 Run gdb-add-index inside temp dir.
3912
3913 2020-04-23 Tom Tromey <tromey@adacore.com>
3914
3915 * windows-tdep.c (is_linked_with_cygwin_dll): Always update "iter"
3916 in loop.
3917
3918 2020-04-23 Luis Machado <luis.machado@linaro.org>
3919
3920 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
3921 get_frame_register instead of gdbarch_unwind_pc.
3922
3923 2020-04-23 Tom de Vries <tdevries@suse.de>
3924
3925 * symtab.c (lookup_global_symbol): Prefer def over decl.
3926
3927 2020-04-23 Tom de Vries <tdevries@suse.de>
3928
3929 PR symtab/25807
3930 * block.c (best_symbol, better_symbol): Promote to external.
3931 * block.h (best_symbol, better_symbol): Declare.
3932 * symtab.c (lookup_symbol_in_objfile_symtabs): Prefer def over
3933 decl.
3934
3935 2020-04-23 Tom Tromey <tromey@adacore.com>
3936
3937 PR ada/25837:
3938 * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Store a
3939 "const char *", not a "const std::string &".
3940 <name_and_matcher::operator==>: Update.
3941 * unittests/lookup_name_info-selftests.c: Change type of
3942 "result".
3943
3944 2020-04-23 Tom Tromey <tom@tromey.com>
3945
3946 * inferior.h (iterate_over_inferiors): Don't declare.
3947 * inferior.c (iterate_over_inferiors): Remove.
3948 * darwin-nat.c (find_inferior_task_it, find_inferior_pid_it):
3949 Remove.
3950 (darwin_find_inferior_by_task, darwin_find_inferior_by_pid): Don't
3951 use iterate_over_inferiors.
3952 (darwin_resume_inferior_it)
3953 (struct resume_inferior_threads_param)
3954 (darwin_resume_inferior_threads_it): Remove.
3955 (darwin_nat_target::resume): Don't use iterate_over_inferiors.
3956
3957 2020-04-23 Tom de Vries <tdevries@suse.de>
3958
3959 * blockframe.c (find_pc_partial_function): Use
3960 find_pc_sect_compunit_symtab rather than
3961 objfile->sf->qf->find_pc_sect_compunit_symtab.
3962
3963 2020-04-22 Tom de Vries <tdevries@suse.de>
3964
3965 PR symtab/25764
3966 * dwarf2/read.c (scan_partial_symbols): Allow external variable decls
3967 in psymtabs.
3968
3969 2020-04-22 Tom de Vries <tdevries@suse.de>
3970
3971 PR symtab/25801
3972 * psymtab.c (psym_map_symtabs_matching_filename): Don't skip shared
3973 symtabs.
3974
3975 2020-04-22 Tom de Vries <tdevries@suse.de>
3976
3977 PR symtab/25700
3978 * dwarf2/read.c (dwarf2_build_psymtabs_hard): Don't create psymtab for
3979 CU if already created.
3980
3981 2020-04-21 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3982
3983 * infrun.c (displaced_step_fixup): Switch to the event_thread
3984 before calling displaced_step_restore, not after.
3985
3986 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
3987
3988 * record-btrace.c (record_btrace_enable_warn): Ignore thread if
3989 its inferior is not recorded by us.
3990 (record_btrace_target_open): Replace call to
3991 all_non_exited_threads () with call to current_inferior
3992 ()->non_exited_threads ().
3993 (record_btrace_target::stop_recording): Likewise.
3994 (record_btrace_target::close): Likewise.
3995 (record_btrace_target::wait): Likewise.
3996 (record_btrace_target::record_stop_replaying): Likewise.
3997
3998 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
3999
4000 * btrace.c (btrace_enable): Throw an error on double enables and
4001 when enabling recording fails.
4002 (btrace_disable): Throw an error if the thread is not recorded.
4003
4004 2020-04-21 Markus Metzger <markus.t.metzger@intel.com>
4005
4006 * record-btrace.c (record_btrace_target::fetch_registers): Forward
4007 request if we do not have a thread_info.
4008
4009 2020-04-21 Tom de Vries <tdevries@suse.de>
4010
4011 PR gdb/25471
4012 * thread.c
4013 (scoped_restore_current_thread::scoped_restore_current_thread): Catch
4014 exception in get_frame_id.
4015
4016 2020-04-20 Tom Tromey <tromey@adacore.com>
4017
4018 * python/python.c (struct gdbpy_event): Mark move constructor as
4019 noexcept.
4020 * python/py-tui.c (class gdbpy_tui_window_maker): Mark move
4021 constructor as noexcept.
4022 * completer.h (struct completion_result): Mark move constructor as
4023 noexcept.
4024 * completer.c (completion_result::completion_result): Use
4025 initialization style. Don't call reset_match_list.
4026
4027 2020-04-20 Mihails Strasuns <mihails.strasuns@intel.com>
4028
4029 * MAINTAINERS (Write After Approval): Add myself.
4030
4031 2020-04-18 Tom Tromey <tom@tromey.com>
4032
4033 * windows-tdep.c (init_w32_command_list)
4034 (w32_prefix_command_valid): Restore.
4035 (_initialize_windows_tdep): Call init_w32_command_list.
4036
4037 2020-04-18 Tom Tromey <tom@tromey.com>
4038
4039 * xcoffread.c (enter_line_range, scan_xcoff_symtab): Update.
4040 * value.c (value_fn_field): Update.
4041 * valops.c (find_function_in_inferior)
4042 (value_allocate_space_in_inferior): Update.
4043 * tui/tui-winsource.c (tui_update_source_windows_with_line):
4044 Update.
4045 * tui/tui-source.c (tui_source_window::set_contents): Update.
4046 * symtab.c (lookup_global_or_static_symbol)
4047 (find_function_start_sal_1, skip_prologue_sal)
4048 (print_msymbol_info, find_gnu_ifunc, symbol_arch): Update.
4049 * symmisc.c (dump_msymbols, dump_symtab_1)
4050 (maintenance_print_one_line_table): Update.
4051 * symfile.c (init_entry_point_info, section_is_mapped)
4052 (list_overlays_command, simple_read_overlay_table)
4053 (simple_overlay_update_1): Update.
4054 * stap-probe.c (handle_stap_probe): Update.
4055 * stabsread.c (dbx_init_float_type, define_symbol)
4056 (read_one_struct_field, read_enum_type, read_range_type): Update.
4057 * source.c (info_line_command): Update.
4058 * python/python.c (gdbpy_source_objfile_script)
4059 (gdbpy_execute_objfile_script): Update.
4060 * python/py-type.c (save_objfile_types): Update.
4061 * python/py-objfile.c (py_free_objfile): Update.
4062 * python/py-inferior.c (python_new_objfile): Update.
4063 * psymtab.c (psym_find_pc_sect_compunit_symtab, dump_psymtab)
4064 (dump_psymtab_addrmap_1, maintenance_info_psymtabs)
4065 (maintenance_check_psymtabs): Update.
4066 * printcmd.c (info_address_command): Update.
4067 * objfiles.h (struct objfile) <arch>: New method, from
4068 get_objfile_arch.
4069 (get_objfile_arch): Don't declare.
4070 * objfiles.c (get_objfile_arch): Remove.
4071 (filter_overlapping_sections): Update.
4072 * minsyms.c (msymbol_is_function): Update.
4073 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines)
4074 (output_nondebug_symbol): Update.
4075 * mdebugread.c (parse_symbol, basic_type, parse_partial_symbols)
4076 (mdebug_expand_psymtab): Update.
4077 * machoread.c (macho_add_oso_symfile): Update.
4078 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap):
4079 Update.
4080 * linux-fork.c (checkpoint_command): Update.
4081 * linespec.c (convert_linespec_to_sals): Update.
4082 * jit.c (finalize_symtab): Update.
4083 * infrun.c (insert_exception_resume_from_probe): Update.
4084 * ia64-tdep.c (ia64_find_unwind_table): Update.
4085 * hppa-tdep.c (internalize_unwinds): Update.
4086 * gdbtypes.c (get_type_arch, init_float_type, objfile_type):
4087 Update.
4088 * gcore.c (call_target_sbrk): Update.
4089 * elfread.c (record_minimal_symbol, elf_symtab_read)
4090 (elf_rel_plt_read, elf_gnu_ifunc_record_cache)
4091 (elf_gnu_ifunc_resolve_by_got): Update.
4092 * dwarf2/read.c (create_addrmap_from_index)
4093 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
4094 (read_debug_names_from_section)
4095 (process_psymtab_comp_unit_reader, add_partial_symbol)
4096 (add_partial_subprogram, process_full_comp_unit)
4097 (read_file_scope, read_func_scope, read_lexical_block_scope)
4098 (read_call_site_scope, dwarf2_ranges_read)
4099 (dwarf2_record_block_ranges, dwarf2_add_field)
4100 (mark_common_block_symbol_computed, read_tag_pointer_type)
4101 (read_tag_string_type, dwarf2_init_float_type)
4102 (dwarf2_init_complex_target_type, read_base_type)
4103 (partial_die_info::read, partial_die_info::read)
4104 (read_attribute_value, dwarf_decode_lines_1, new_symbol)
4105 (dwarf2_fetch_die_loc_sect_off): Update.
4106 * dwarf2/loc.c (dwarf2_find_location_expression)
4107 (class dwarf_evaluate_loc_desc, rw_pieced_value)
4108 (dwarf2_evaluate_loc_desc_full, dwarf2_locexpr_baton_eval)
4109 (dwarf2_loc_desc_get_symbol_read_needs)
4110 (locexpr_describe_location_piece, locexpr_describe_location_1)
4111 (loclist_describe_location): Update.
4112 * dwarf2/index-write.c (write_debug_names): Update.
4113 * dwarf2/frame.c (dwarf2_build_frame_info): Update.
4114 * dtrace-probe.c (dtrace_process_dof): Update.
4115 * dbxread.c (read_dbx_symtab, dbx_end_psymtab)
4116 (process_one_symbol): Update.
4117 * ctfread.c (ctf_init_float_type, read_base_type): Update.
4118 * coffread.c (coff_symtab_read, enter_linenos, decode_base_type)
4119 (coff_read_enum_type): Update.
4120 * cli/cli-cmds.c (edit_command, list_command): Update.
4121 * buildsym.c (buildsym_compunit::finish_block_internal): Update.
4122 * breakpoint.c (create_overlay_event_breakpoint)
4123 (create_longjmp_master_breakpoint)
4124 (create_std_terminate_master_breakpoint)
4125 (create_exception_master_breakpoint, get_sal_arch): Update.
4126 * block.c (block_gdbarch): Update.
4127 * annotate.c (annotate_source_line): Update.
4128
4129 2020-04-17 Tom Tromey <tromey@adacore.com>
4130
4131 * auto-load.c (show_auto_load_cmd): Remove.
4132 (auto_load_show_cmdlist_get): Use add_show_prefix_cmd.
4133 * arc-tdep.c (_initialize_arc_tdep): Use add_show_prefix_cmd.
4134 (maintenance_print_arc_command): Remove.
4135 * tui/tui-win.c (tui_command): Remove.
4136 (tui_get_cmd_list): Use add_basic_prefix_cmd.
4137 * tui/tui-layout.c (tui_layout_command): Remove.
4138 (_initialize_tui_layout): Use add_basic_prefix_cmd.
4139 * python/python.c (user_set_python, user_show_python): Remove.
4140 (_initialize_python): Use add_basic_prefix_cmd,
4141 add_show_prefix_cmd.
4142 * guile/guile.c (set_guile_command, show_guile_command): Remove.
4143 (install_gdb_commands): Use add_basic_prefix_cmd,
4144 add_show_prefix_cmd.
4145 (info_guile_command): Remove.
4146 * dwarf2/read.c (set_dwarf_cmd, show_dwarf_cmd): Remove.
4147 (_initialize_dwarf2_read): Use add_basic_prefix_cmd,
4148 add_show_prefix_cmd.
4149 * cli/cli-style.h (class cli_style_option) <add_setshow_commands>:
4150 Remove do_set and do_show parameters.
4151 * cli/cli-style.c (set_style, show_style): Remove.
4152 (_initialize_cli_style): Use add_basic_prefix_cmd,
4153 add_show_prefix_cmd.
4154 (cli_style_option::add_setshow_commands): Remove do_set and
4155 do_show parameters.
4156 (cli_style_option::add_setshow_commands): Use
4157 add_basic_prefix_cmd, add_show_prefix_cmd.
4158 (STYLE_ADD_SETSHOW_COMMANDS): Remove macro.
4159 (set_style_name): Remove.
4160 * cli/cli-dump.c (dump_command, append_command): Remove.
4161 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4162 (tekhex_dump_command, binary_dump_command)
4163 (binary_append_command): Remove.
4164 (_initialize_cli_dump): Use add_basic_prefix_cmd.
4165 * windows-tdep.c (w32_prefix_command_valid): Remove global.
4166 (init_w32_command_list): Remove; move into ...
4167 (_initialize_windows_tdep): ... here. Use add_basic_prefix_cmd.
4168 * valprint.c (set_print, show_print, set_print_raw)
4169 (show_print_raw): Remove.
4170 (_initialize_valprint): Use add_basic_prefix_cmd,
4171 add_show_prefix_cmd.
4172 * typeprint.c (set_print_type, show_print_type): Remove.
4173 (_initialize_typeprint): Use add_basic_prefix_cmd,
4174 add_show_prefix_cmd.
4175 * record.c (set_record_command, show_record_command): Remove.
4176 (_initialize_record): Use add_basic_prefix_cmd,
4177 add_show_prefix_cmd.
4178 * cli/cli-cmds.c (_initialize_cli_cmds): Use add_basic_prefix_cmd,
4179 add_show_prefix_cmd.
4180 (info_command, show_command, set_debug, show_debug): Remove.
4181 * top.h (set_history, show_history): Don't declare.
4182 * top.c (set_history, show_history): Remove.
4183 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4184 (unset_tdesc_cmd): Remove.
4185 (_initialize_target_descriptions): Use add_basic_prefix_cmd,
4186 add_show_prefix_cmd.
4187 * symtab.c (info_module_command): Remove.
4188 (_initialize_symtab): Use add_basic_prefix_cmd.
4189 * symfile.c (overlay_command): Remove.
4190 (_initialize_symfile): Use add_basic_prefix_cmd.
4191 * sparc64-tdep.c (info_adi_command): Remove.
4192 (_initialize_sparc64_adi_tdep): Use add_basic_prefix_cmd.
4193 * sh-tdep.c (show_sh_command, set_sh_command): Remove.
4194 (_initialize_sh_tdep): Use add_basic_prefix_cmd,
4195 add_show_prefix_cmd.
4196 * serial.c (serial_set_cmd, serial_show_cmd): Remove.
4197 (_initialize_serial): Use add_basic_prefix_cmd,
4198 add_show_prefix_cmd.
4199 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Remove.
4200 (_initialize_ser_tcp): Use add_basic_prefix_cmd,
4201 add_show_prefix_cmd.
4202 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command)
4203 (_initialize_rs6000_tdep): Use add_basic_prefix_cmd,
4204 add_show_prefix_cmd.
4205 * riscv-tdep.c (show_riscv_command, set_riscv_command)
4206 (show_debug_riscv_command, set_debug_riscv_command): Remove.
4207 (_initialize_riscv_tdep): Use add_basic_prefix_cmd,
4208 add_show_prefix_cmd.
4209 * remote.c (remote_command, set_remote_cmd): Remove.
4210 (_initialize_remote): Use add_basic_prefix_cmd.
4211 * record-full.c (set_record_full_command)
4212 (show_record_full_command): Remove.
4213 (_initialize_record_full): Use add_basic_prefix_cmd,
4214 add_show_prefix_cmd.
4215 * record-btrace.c (cmd_set_record_btrace)
4216 (cmd_show_record_btrace, cmd_set_record_btrace_bts)
4217 (cmd_show_record_btrace_bts, cmd_set_record_btrace_pt)
4218 (cmd_show_record_btrace_pt): Remove.
4219 (_initialize_record_btrace): Use add_basic_prefix_cmd,
4220 add_show_prefix_cmd.
4221 * ravenscar-thread.c (set_ravenscar_command)
4222 (show_ravenscar_command): Remove.
4223 (_initialize_ravenscar): Use add_basic_prefix_cmd,
4224 add_show_prefix_cmd.
4225 * mips-tdep.c (show_mips_command, set_mips_command)
4226 (_initialize_mips_tdep): Use add_basic_prefix_cmd,
4227 add_show_prefix_cmd.
4228 * maint.c (maintenance_command, maintenance_info_command)
4229 (maintenance_check_command, maintenance_print_command)
4230 (maintenance_set_cmd, maintenance_show_cmd): Remove.
4231 (_initialize_maint_cmds): Use add_basic_prefix_cmd,
4232 add_show_prefix_cmd.
4233 (show_per_command_cmd): Remove.
4234 * maint-test-settings.c (maintenance_set_test_settings_cmd):
4235 Remove.
4236 (maintenance_show_test_settings_cmd): Remove.
4237 (_initialize_maint_test_settings): Use add_basic_prefix_cmd,
4238 add_show_prefix_cmd.
4239 * maint-test-options.c (maintenance_test_options_command):
4240 Remove.
4241 (_initialize_maint_test_options): Use add_basic_prefix_cmd.
4242 * macrocmd.c (macro_command): Remove
4243 (_initialize_macrocmd): Use add_basic_prefix_cmd.
4244 * language.c (set_check, show_check): Remove.
4245 (_initialize_language): Use add_basic_prefix_cmd,
4246 add_show_prefix_cmd.
4247 * infcmd.c (unset_command): Remove.
4248 (_initialize_infcmd): Use add_basic_prefix_cmd.
4249 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Remove.
4250 (_initialize_i386_tdep): Use add_basic_prefix_cmd,
4251 add_show_prefix_cmd.
4252 * go32-nat.c (go32_info_dos_command): Remove.
4253 (_initialize_go32_nat): Use add_basic_prefix_cmd.
4254 * cli/cli-decode.c (do_prefix_cmd, add_basic_prefix_cmd)
4255 (do_show_prefix_cmd, add_show_prefix_cmd): New functions.
4256 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Remove.
4257 (_initialize_frame): Use add_basic_prefix_cmd,
4258 add_show_prefix_cmd.
4259 * dcache.c (set_dcache_command, show_dcache_command): Remove.
4260 (_initialize_dcache): Use add_basic_prefix_cmd,
4261 add_show_prefix_cmd.
4262 * cp-support.c (maint_cplus_command): Remove.
4263 (_initialize_cp_support): Use add_basic_prefix_cmd.
4264 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4265 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4266 (maint_btrace_pt_show_cmd, _initialize_btrace): Use
4267 add_basic_prefix_cmd, add_show_prefix_cmd.
4268 * breakpoint.c (save_command): Remove.
4269 (_initialize_breakpoint): Use add_basic_prefix_cmd.
4270 * arm-tdep.c (set_arm_command, show_arm_command): Remove.
4271 (_initialize_arm_tdep): Use add_basic_prefix_cmd,
4272 add_show_prefix_cmd.
4273 * ada-lang.c (maint_set_ada_cmd, maint_show_ada_cmd)
4274 (set_ada_command, show_ada_command): Remove.
4275 (_initialize_ada_language): Use add_basic_prefix_cmd,
4276 add_show_prefix_cmd.
4277 * command.h (add_basic_prefix_cmd, add_show_prefix_cmd): Declare.
4278
4279 2020-04-16 Kamil Rytarowski <n54@gmx.com>
4280
4281 * nbsd-nat.c (inf_ptrace_target::auxv_parse): Remove.
4282 * nbsd-nat.h (inf_ptrace_target::auxv_parse): Likewise.
4283
4284 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
4285
4286 * windows-tdep.c (is_linked_with_cygwin_dll): Add filename to
4287 warning messages.
4288
4289 2020-04-16 Simon Marchi <simon.marchi@polymtl.ca>
4290
4291 * windows-tdep.c (is_linked_with_cygwin_dll): Consider case where
4292 import table is not at beginning of .idata section.
4293
4294 2020-04-16 Pedro Alves <palves@redhat.com>
4295
4296 * inferior.c (delete_inferior): Use delete operator directly
4297 instead of delete_program_space.
4298 * progspace.c (add_program_space): New, factored out from
4299 program_space::program_space.
4300 (remove_program_space): New, factored out from
4301 delete_program_space.
4302 (program_space::program_space): Remove intro comment. Rewrite.
4303 (program_space::~program_space): Remove intro comment. Call
4304 remove_program_space.
4305 (delete_program_space): Delete.
4306 * progspace.h (program_space::program_space): Make explicit. Move
4307 intro comment here, adjusted.
4308 (program_space::~program_space): Move intro comment here,
4309 adjusted.
4310 (delete_program_space): Remove.
4311
4312 2020-04-16 Tom Tromey <tromey@adacore.com>
4313
4314 * windows-nat.c (windows_nat::handle_access_violation): New
4315 function.
4316 * nat/windows-nat.h (handle_access_violation): Declare.
4317 * nat/windows-nat.c (handle_exception): Move Cygwin code to
4318 windows-nat.c. Call handle_access_violation.
4319
4320 2020-04-16 Tom de Vries <tdevries@suse.de>
4321
4322 PR symtab/25791
4323 * dwarf2/index-write.c (write_gdbindex): Generate CU table entries for
4324 CUs without psymtab.
4325
4326 2020-04-16 Kevin Buettner <kevinb@redhat.com>
4327
4328 * python/python.c (do_start_initialization): Don't call
4329 PyEval_InitThreads for Python 3.9 and beyond.
4330
4331 2020-04-15 Kamil Rytarowski <n54@gmx.com>
4332
4333 * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to
4334 thread functions.
4335 (obsd_nat_target::wait): Likewise.
4336
4337 2020-04-15 Tom Tromey <tromey@adacore.com>
4338
4339 * windows-nat.c (DEBUG_EXEC, DEBUG_EVENTS, DEBUG_MEM)
4340 (DEBUG_EXCEPT): Use debug_printf.
4341
4342 2020-04-15 Andrew Burgess <andrew.burgess@embecosm.com>
4343
4344 * completer.c (class completion_tracker::completion_hash_entry)
4345 <hash_name>: New member function.
4346 (completion_tracker::discard_completions): New callback to hash a
4347 completion_hash_entry, pass this to htab_create_alloc.
4348
4349 2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
4350
4351 * windows-nat.c (windows_make_so): Warn rather than stopping with
4352 an error if realpath() fails.
4353
4354 2020-04-14 Kamil Rytarowski <n54@gmx.com>
4355
4356 * nbsd-nat.c (nbsd_pid_to_kinfo_proc2): New.
4357 (nbsd_nat_target::info_proc): Add do_status.
4358
4359 2020-04-14 Simon Marchi <simon.marchi@polymtl.ca>
4360 Tom de Vries <tdevries@suse.de>
4361
4362 PR symtab/25718
4363 * psympriv.h (struct partial_symtab::read_symtab)
4364 (struct partial_symtab::expand_psymtab)
4365 (struct partial_symtab::read_dependencies): Update comments.
4366 * dwarf2/read.c (struct dwarf2_include_psymtab::read_symtab): Call
4367 read_symtab for includer.
4368 (struct dwarf2_include_psymtab::expand_psymtab): Assert false.
4369 (struct dwarf2_include_psymtab::readin_p): Call readin_p () for includer.
4370 (struct dwarf2_include_psymtab::m_readin): Remove.
4371 (struct dwarf2_include_psymtab::includer): New member function.
4372 (dwarf2_psymtab::expand_psymtab): Assert !readin.
4373
4374 2020-04-14 Tom de Vries <tdevries@suse.de>
4375
4376 PR symtab/25720
4377 * symmisc.c (maintenance_expand_symtabs): Call expand_symtabs_matching
4378 with NULL symbol_matcher and lookup_name.
4379 * psymtab.c (psym_expand_symtabs_matching): Handle NULL symbol_matcher
4380 and lookup_name.
4381 * dwarf2/read.c (dw2_expand_symtabs_matching)
4382 (dw2_debug_names_expand_symtabs_matching): Same.
4383 * symfile.h (struct quick_symbol_functions::expand_symtabs_matching):
4384 Make lookup_name a pointer. Update comment.
4385 * symtab.c (global_symbol_searcher::expand_symtabs): Handle
4386 lookup_name being a pointer.
4387 * symfile.c (expand_symtabs_matching): Same.
4388 * symfile-debug.c (debug_qf_expand_symtabs_matching): Same.
4389 * linespec.c (iterate_over_all_matching_symtabs): Same.
4390
4391 2020-04-13 Tom Tromey <tom@tromey.com>
4392
4393 * run-on-main-thread.c: Update include.
4394 * unittests/main-thread-selftests.c: Update include.
4395 * tui/tui-win.c: Update include.
4396 * tui/tui-io.c: Update include.
4397 * tui/tui-interp.c: Update include.
4398 * tui/tui-hooks.c: Update include.
4399 * top.h: Update include.
4400 * top.c: Update include.
4401 * ser-base.c: Update include.
4402 * remote.c: Update include.
4403 * remote-notif.c: Update include.
4404 * remote-fileio.c: Update include.
4405 * record-full.c: Update include.
4406 * record-btrace.c: Update include.
4407 * python/python.c: Update include.
4408 * posix-hdep.c: Update include.
4409 * mingw-hdep.c: Update include.
4410 * mi/mi-main.c: Update include.
4411 * mi/mi-interp.c: Update include.
4412 * main.c: Update include.
4413 * linux-nat.c: Update include.
4414 * interps.c: Update include.
4415 * infrun.c: Update include.
4416 * inf-loop.c: Update include.
4417 * event-top.c: Update include.
4418 * event-loop.c: Move to ../gdbsupport/.
4419 * event-loop.h: Move to ../gdbsupport/.
4420 * async-event.h: Update include.
4421 * Makefile.in (COMMON_SFILES, HFILES_NO_SRCDIR): Update.
4422
4423 2020-04-13 Tom Tromey <tom@tromey.com>
4424
4425 * tui/tui-win.c: Include async-event.h.
4426 * remote.c: Include async-event.h.
4427 * remote-notif.c: Include async-event.h.
4428 * record-full.c: Include async-event.h.
4429 * record-btrace.c: Include async-event.h.
4430 * infrun.c: Include async-event.h.
4431 * event-top.c: Include async-event.h.
4432 * event-loop.h: Move some declarations to async-event.h.
4433 * event-loop.c: Don't include ser-event.h or top.h. Move some
4434 code to async-event.c.
4435 * async-event.h: New file.
4436 * async-event.c: New file.
4437 * Makefile.in (COMMON_SFILES): Add async-event.c.
4438 (HFILES_NO_SRCDIR): Add async-event.h.
4439
4440 2020-04-13 Tom Tromey <tom@tromey.com>
4441
4442 * utils.c (flush_streams): New function.
4443 * event-loop.c (gdb_wait_for_event): Call flush_streams.
4444
4445 2020-04-13 Tom Tromey <tom@tromey.com>
4446
4447 * event-loop.c (handle_file_event): Use warning, not
4448 printf_unfiltered.
4449
4450 2020-04-13 Tom Tromey <tom@tromey.com>
4451
4452 * event-loop.c: Include <chrono>.
4453
4454 2020-04-13 Tom Tromey <tom@tromey.com>
4455
4456 * gdb_select.h: Move to ../gdbsupport/.
4457 * event-loop.c: Update include path.
4458 * top.c: Update include path.
4459 * ser-base.c: Update include path.
4460 * ui-file.c: Update include path.
4461 * ser-tcp.c: Update include path.
4462 * guile/scm-ports.c: Update include path.
4463 * posix-hdep.c: Update include path.
4464 * ser-unix.c: Update include path.
4465 * gdb_usleep.c: Update include path.
4466 * mingw-hdep.c: Update include path.
4467 * inflow.c: Update include path.
4468 * infrun.c: Update include path.
4469 * event-top.c: Update include path.
4470
4471 2020-04-13 Tom Tromey <tom@tromey.com>
4472
4473 * configure: Rebuild.
4474 * configure.ac: Remove checks that are now in GDB_AC_COMMON.
4475
4476 2020-04-13 Tom Tromey <tom@tromey.com>
4477
4478 * event-loop.h (start_event_loop): Don't declare.
4479 * event-loop.c (start_event_loop): Move...
4480 * main.c (start_event_loop): ...here. Now static.
4481
4482 2020-04-13 Sergio Durigan Junior <sergiodj@sergiodj.net>
4483
4484 * MAINTAINERS: Update my email address.
4485
4486 2020-04-12 Kamil Rytarowski <n54@gmx.com>
4487
4488 * nbsd-nat.c (nbsd_nat_target::info_proc): Add IP_MINIMAL and
4489 IP_ALL.
4490
4491 2020-04-12 Kamil Rytarowski <n54@gmx.com>
4492
4493 * nbsd-nat.c (nbsd_pid_to_cmdline): Add.
4494 (nbsd_nat_target::info_proc): Add do_cmdline.
4495
4496 2020-04-12 Kamil Rytarowski <n54@gmx.com>
4497
4498 * nbsd-nat.c (nbsd_pid_to_cwd): Add.
4499 (nbsd_nat_target::info_proc): Add do_cwd.
4500
4501 2020-04-12 Kamil Rytarowski <n54@gmx.com>
4502
4503 * nbsd-nat.c (nbsd_nat_target::info_proc): Add do_exe.
4504
4505 2020-04-11 Kamil Rytarowski <n54@gmx.com>
4506
4507 * nbsd-nat.c; Include "nbsd-tdep.h" and "gdbarch.h".
4508 * nbsd-nat.c (nbsd_nat_target::find_memory_regions)
4509 (nbsd_nat_target::info_proc): New functions.
4510 * nbsd-nat.c (kinfo_get_vmmap): New function.
4511 * nbsd-nat.c (nbsd_nat_target::info_proc) Use
4512 nbsd_info_proc_mappings_header and nbsd_info_proc_mappings_entry.
4513 * nbsd-tdep.c (nbsd_info_proc_mappings_header)
4514 (nbsd_info_proc_mappings_entry, nbsd_vm_map_entry_flags): New
4515 functions.
4516 * nbsd-tdep.c (KINFO_VME_PROT_READ, KINFO_VME_PROT_WRITE)
4517 (KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
4518 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
4519 (KINFO_VME_FLAG_PAGEABLE, KINFO_VME_FLAG_GROWS_UP)
4520 (KINFO_VME_FLAG_GROWS_DOWN): New.
4521
4522 2020-04-10 Artur Shepilko <nomadbyte@gmail.com>
4523
4524 * utils.c (copy_bitwise): Use unsigned 0 constant as operand of
4525 bit shift.
4526
4527 2020-04-10 Tom Tromey <tromey@adacore.com>
4528
4529 * symfile.c (symbol_file_add_separate): Preserve OBJF_MAINLINE.
4530
4531 2020-04-10 Tom Tromey <tromey@adacore.com>
4532
4533 * symtab.c (get_symbol_address, get_msymbol_address): Skip
4534 separate debug files.
4535
4536 2020-04-10 Hannes Domani <ssbssa@yahoo.de>
4537
4538 * nat/windows-nat.c (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
4539 Move to...
4540 * nat/windows-nat.h (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP):
4541 ... here.
4542 * windows-nat.c (windows_nat_target::get_windows_debug_event):
4543 Check for STATUS_WX86_BREAKPOINT.
4544 (windows_nat_target::wait): Same.
4545
4546 2020-04-10 Tom de Vries <tdevries@suse.de>
4547
4548 PR cli/25808
4549 * python/lib/gdb/__init__.py: Initialize lexer with stripnl=False.
4550
4551 2020-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4552
4553 * MAINTAINERS (Global Maintainers): Add Tom de Vries.
4554 (Write After Approval): Remove Tom de Vries.
4555
4556 2020-04-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
4557
4558 revert partially:
4559 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
4560
4561 * buildsym.c (record_line): Fix undefined behavior and preserve
4562 lines at eof.
4563
4564 2020-04-09 Kamil Rytarowski <n54@gmx.com>
4565
4566 * auxv.h (svr4_auxv_parse): New.
4567 * auxv.c (default_auxv_parse): Split into default_auxv_parse
4568 and generic_auxv_parse.
4569 (svr4_auxv_parse): Add.
4570 * obsd-tdep.c: Include "auxv.h".
4571 (obsd_auxv_parse): Remove.
4572 (obsd_init_abi): Remove comment.
4573 (obsd_init_abi): Change set_gdbarch_auxv_parse passed argument
4574 from `obsd_auxv_parse' to `svr4_auxv_parse'.
4575 * nbsd-tdep.c: Include "auxv.h".
4576 (nbsd_init_abi): Call set_gdbarch_auxv_parse.
4577
4578 2020-04-08 Tom Tromey <tromey@adacore.com>
4579
4580 * nat/windows-nat.h (last_wait_event): Don't declare.
4581 (wait_for_debug_event): Update comment.
4582 * nat/windows-nat.c (last_wait_event): Now static.
4583
4584 2020-04-08 Tom Tromey <tromey@adacore.com>
4585
4586 * windows-nat.c (wait_for_debug_event): Move to
4587 nat/windows-nat.c.
4588 * nat/windows-nat.h (wait_for_debug_event): Declare.
4589 * nat/windows-nat.c (wait_for_debug_event): Move from
4590 windows-nat.c. No longer static.
4591
4592 2020-04-08 Tom Tromey <tromey@adacore.com>
4593
4594 * windows-nat.c (get_windows_debug_event): Use
4595 fetch_pending_stop.
4596 * nat/windows-nat.h (fetch_pending_stop): Declare.
4597 * nat/windows-nat.c (fetch_pending_stop): New function.
4598
4599 2020-04-08 Tom Tromey <tromey@adacore.com>
4600
4601 * windows-nat.c (windows_continue): Use matching_pending_stop and
4602 continue_last_debug_event.
4603 * nat/windows-nat.h (matching_pending_stop)
4604 (continue_last_debug_event): Declare.
4605 * nat/windows-nat.c (DEBUG_EVENTS): New define.
4606 (matching_pending_stop, continue_last_debug_event): New
4607 functions.
4608
4609 2020-04-08 Tom Tromey <tromey@adacore.com>
4610
4611 * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
4612 (handle_exception_result): Move to nat/windows-nat.h.
4613 (DEBUG_EXCEPTION_SIMPLE): Remove.
4614 (windows_nat::handle_ms_vc_exception): New function.
4615 (handle_exception): Move to nat/windows-nat.c.
4616 (get_windows_debug_event): Update.
4617 (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
4618 nat/windows-nat.c.
4619 * nat/windows-nat.h (handle_ms_vc_exception): Declare.
4620 (handle_exception_result): Move from windows-nat.c.
4621 (handle_exception): Declare.
4622 * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
4623 (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
4624 windows-nat.c.
4625
4626 2020-04-08 Tom Tromey <tromey@adacore.com>
4627
4628 * windows-nat.c (exception_count, event_count): Remove.
4629 (handle_exception, get_windows_debug_event)
4630 (do_initial_windows_stuff): Update.
4631
4632 2020-04-08 Tom Tromey <tromey@adacore.com>
4633
4634 * windows-nat.c (windows_nat::handle_load_dll)
4635 (windows_nat::handle_unload_dll): Rename. No longer static.
4636 * nat/windows-nat.h (handle_load_dll, handle_unload_dll):
4637 Declare.
4638
4639 2020-04-08 Tom Tromey <tromey@adacore.com>
4640
4641 * complaints.h (stop_whining): Declare at top-level.
4642 (complaint): Don't declare stop_whining.
4643
4644 2020-04-08 Tom Tromey <tromey@adacore.com>
4645
4646 * windows-nat.c (windows_nat::handle_output_debug_string):
4647 Rename. No longer static.
4648 * nat/windows-nat.h (handle_output_debug_string): Declare.
4649
4650 2020-04-08 Tom Tromey <tromey@adacore.com>
4651
4652 * windows-nat.c (current_process_handle, current_process_id)
4653 (main_thread_id, last_sig, current_event, last_wait_event)
4654 (current_windows_thread, desired_stop_thread_id, pending_stops)
4655 (struct pending_stop, siginfo_er): Move to nat/windows-nat.c.
4656 (display_selectors, fake_create_process)
4657 (get_windows_debug_event): Update.
4658 * nat/windows-nat.h (current_process_handle, current_process_id)
4659 (main_thread_id, last_sig, current_event, last_wait_event)
4660 (current_windows_thread, desired_stop_thread_id, pending_stops)
4661 (struct pending_stop, siginfo_er): Move from windows-nat.c.
4662 * nat/windows-nat.c (current_process_handle, current_process_id)
4663 (main_thread_id, last_sig, current_event, last_wait_event)
4664 (current_windows_thread, desired_stop_thread_id, pending_stops)
4665 (siginfo_er): New globals. Move from windows-nat.c.
4666
4667 2020-04-08 Tom Tromey <tromey@adacore.com>
4668
4669 * windows-nat.c (get_image_name): Move to nat/windows-nat.c.
4670 (handle_load_dll): Update.
4671 * nat/windows-nat.c (get_image_name): Move from windows-nat.c.
4672
4673 2020-04-08 Tom Tromey <tromey@adacore.com>
4674
4675 * windows-nat.c (enum thread_disposition_type): Move to
4676 nat/windows-nat.h.
4677 (windows_nat::thread_rec): Rename from thread_rec. No longer
4678 static.
4679 (windows_add_thread, windows_nat_target::fetch_registers)
4680 (windows_nat_target::store_registers, handle_exception)
4681 (windows_nat_target::resume, get_windows_debug_event)
4682 (windows_nat_target::get_tib_address)
4683 (windows_nat_target::thread_name)
4684 (windows_nat_target::thread_alive): Update.
4685 * nat/windows-nat.h (enum thread_disposition_type): Move from
4686 windows-nat.c.
4687 (thread_rec): Declare.
4688
4689 2020-04-08 Tom Tromey <tromey@adacore.com>
4690
4691 * windows-nat.c: Add "using namespace".
4692 * nat/windows-nat.h: Wrap contents in windows_nat namespace.
4693 * nat/windows-nat.c: Wrap contents in windows_nat namespace.
4694
4695 2020-04-08 Tom Tromey <tromey@adacore.com>
4696
4697 * nat/windows-nat.h (struct windows_thread_info): Declare
4698 destructor.
4699 * nat/windows-nat.c (~windows_thread_info): New.
4700
4701 2020-04-08 Tom Tromey <tromey@adacore.com>
4702
4703 PR gdb/22992
4704 * windows-nat.c (current_event): Update comment.
4705 (last_wait_event, desired_stop_thread_id): New globals.
4706 (struct pending_stop): New.
4707 (pending_stops): New global.
4708 (windows_nat_target) <stopped_by_sw_breakpoint>
4709 <supports_stopped_by_sw_breakpoint>: New methods.
4710 (windows_fetch_one_register): Add assertions. Adjust PC.
4711 (windows_continue): Handle pending stops. Suspend other threads
4712 when stepping. Use last_wait_event
4713 (wait_for_debug_event): New function.
4714 (get_windows_debug_event): Use wait_for_debug_event. Handle
4715 pending stops. Queue spurious stops.
4716 (windows_nat_target::wait): Set stopped_at_software_breakpoint.
4717 (windows_nat_target::kill): Use wait_for_debug_event.
4718 * nat/windows-nat.h (struct windows_thread_info)
4719 <stopped_at_software_breakpoint>: New field.
4720 * nat/windows-nat.c (windows_thread_info::resume): Clear
4721 stopped_at_software_breakpoint.
4722
4723 2020-04-08 Tom Tromey <tromey@adacore.com>
4724
4725 * windows-nat.c (enum thread_disposition_type): New.
4726 (thread_rec): Replace "get_context" parameter with "disposition";
4727 change type.
4728 (windows_add_thread, windows_nat_target::fetch_registers)
4729 (windows_nat_target::store_registers, handle_exception)
4730 (windows_nat_target::resume, get_windows_debug_event)
4731 (windows_nat_target::get_tib_address)
4732 (windows_nat_target::thread_name)
4733 (windows_nat_target::thread_alive): Update.
4734
4735 2020-04-08 Tom Tromey <tromey@adacore.com>
4736
4737 * windows-nat.c (thread_rec): Use windows_thread_info::suspend.
4738 (windows_continue): Use windows_continue::resume.
4739 * nat/windows-nat.h (struct windows_thread_info) <suspend,
4740 resume>: Declare new methods.
4741 * nat/windows-nat.c: New file.
4742 * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed.
4743
4744 2020-04-08 Tom Tromey <tromey@adacore.com>
4745
4746 * windows-nat.c (windows_add_thread, windows_delete_thread)
4747 (windows_nat_target::fetch_registers)
4748 (windows_nat_target::store_registers, fake_create_process)
4749 (windows_nat_target::resume, windows_nat_target::resume)
4750 (get_windows_debug_event, windows_nat_target::wait)
4751 (windows_nat_target::pid_to_str)
4752 (windows_nat_target::get_tib_address)
4753 (windows_nat_target::get_ada_task_ptid)
4754 (windows_nat_target::thread_name)
4755 (windows_nat_target::thread_alive): Use lwp, not tid.
4756
4757 2020-04-08 Tom Tromey <tromey@adacore.com>
4758
4759 * windows-nat.c (handle_exception)
4760 (windows_nat_target::thread_name): Update.
4761 * nat/windows-nat.h (windows_thread_info): Remove destructor.
4762 <name>: Now unique_xmalloc_ptr.
4763
4764 2020-04-08 Tom Tromey <tromey@adacore.com>
4765
4766 * windows-nat.c (thread_rec)
4767 (windows_nat_target::fetch_registers): Update.
4768 * nat/windows-nat.h (struct windows_thread_info) <suspended>:
4769 Update comment.
4770 <debug_registers_changed, reload_context>: Now bool.
4771
4772 2020-04-08 Tom Tromey <tromey@adacore.com>
4773
4774 * windows-nat.c (windows_add_thread): Use new.
4775 (windows_init_thread_list, windows_delete_thread): Use delete.
4776 (get_windows_debug_event): Update.
4777 * nat/windows-nat.h (struct windows_thread_info): Add constructor,
4778 destructor, and initializers.
4779
4780 2020-04-08 Tom Tromey <tromey@adacore.com>
4781
4782 * windows-nat.c (struct windows_thread_info): Remove.
4783 * nat/windows-nat.h: New file.
4784
4785 2020-04-08 Tom Tromey <tromey@adacore.com>
4786
4787 * windows-nat.c (struct windows_thread_info) <tid>: Rename from "id".
4788 (thread_rec, windows_add_thread, windows_delete_thread)
4789 (windows_continue): Update.
4790
4791 2020-04-08 Tom Tromey <tromey@adacore.com>
4792
4793 * windows-nat.c (struct windows_thread_info): Remove typedef.
4794 (thread_head): Remove.
4795 (thread_list): New global.
4796 (thread_rec, windows_add_thread, windows_init_thread_list)
4797 (windows_delete_thread, windows_continue): Update.
4798
4799 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
4800
4801 * windows-tdep.h (windows_init_abi): Add comment.
4802 (cygwin_init_abi): New declaration.
4803 * windows-tdep.c: Split signal enumeration in two, one for
4804 Windows and one for Cygwin.
4805 (windows_gdb_signal_to_target): Only deal with signal of the
4806 Windows OS ABI.
4807 (cygwin_gdb_signal_to_target): New function.
4808 (windows_init_abi): Rename to windows_init_abi_common, don't set
4809 gdb_signal_to_target gdbarch method. Add new new function with
4810 this name.
4811 (cygwin_init_abi): New function.
4812 * amd64-windows-tdep.c (amd64_windows_init_abi_common): Add
4813 comment. Don't call windows_init_abi.
4814 (amd64_windows_init_abi): Add comment, call windows_init_abi.
4815 (amd64_cygwin_init_abi): Add comment, call cygwin_init_abi.
4816 * i386-windows-tdep.c (i386_windows_init_abi): Rename to
4817 i386_windows_init_abi_common, don't call windows_init_abi. Add
4818 a new function of this name.
4819 (i386_cygwin_init_abi): New function.
4820 (_initialize_i386_windows_tdep): Bind i386_cygwin_init_abi to
4821 OS ABI Cygwin.
4822
4823 2020-04-08 Simon Marchi <simon.marchi@polymtl.ca>
4824
4825 * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
4826 parameter.c.
4827 (dwarf2_read_gdb_index): Update.
4828
4829 2020-04-07 Kamil Rytarowski <n54@gmx.com>
4830
4831 * nbsd-tdep.c: Include "objfiles.h".
4832 (nbsd_skip_solib_resolver): New.
4833 (nbsd_init_abi): Call set_gdbarch_skip_solib_resolver().
4834
4835 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
4836
4837 * dwarf2/loc.c (loclist_describe_location): Call the function decode_debug_loclists_
4838 addresses if DWARF version is 5 or more because DW_LLE_start* or DW_LLE_offset_pair
4839 with DW_LLE_base_addressx are being emitted in DWARFv5.
4840 Add the newly added kind DW_LOC_OFFSET_PAIR also.
4841 The length of location description is an unsigned ULEB integer in DWARFv5 instead of
4842 unsigned integer.
4843
4844 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
4845
4846 * dwarf2/loc.c (enum debug_loc_kind): Add a new kind DEBUG_LOC_OFFSET_PAIR.
4847 (dwarf2_find_location_expression): Call the function decode_debug_loclists_
4848 addresses if DWARF version is 5 or more. DW_LLE_start* or DW_LLE_offset_pair
4849 with DW_LLE_base_addressx are being emitted in DWARFv5 instead of DW_LLE_GNU*.
4850 Add applicable base address if the entry is DW_LLE_offset_pair from DWO.
4851 (decode_debug_loclists_addresses): Return DEBUG_LOC_OFFSET_PAIR instead of
4852 DEBUG_LOC_START_END in case of DW_LLE_offset_pair.
4853
4854
4855 2020-04-07 Nitika Achra <Nitika.Achra@amd.com>
4856
4857 * dwarf2/read.c (cu_debug_loc_section): Added the declaration for the function.
4858 (read_loclist_index): New function definition.
4859 (lookup_loclist_base): New function definition.
4860 (read_loclist_header): New function definition.
4861 (dwarf2_cu): Add loclist_base and loclist_header field.
4862 (dwarf2_locate_dwo_sections): Handle .debug_loclists.dwo section.
4863 (read_full_die_1): Read the value of DW_AT_loclists_base.
4864 (read_attribute_reprocess): Handle DW_FORM_loclistx.
4865 (read_attribute_value): Handle DW_FORM_loclistx.
4866 (skip_one_die): Handle DW_FORM_loclistx.
4867 (loclist_header): New structure declaration.
4868 * dwarf2/attribute.c (form_is_section_offset): Handle DW_FORM_loclistx.
4869
4870 2020-04-07 Simon Marchi <simon.marchi@polymtl.ca>
4871
4872 * dwarf2/read.h (struct dwarf2_psymtab): Remove two-parameters
4873 constructor. Remove `addr` parameter from other constructor and
4874 add `per_cu` parameter.
4875 * dwarf2/read.c (create_partial_symtab): Update.
4876
4877 2020-04-07 Tom de Vries <tdevries@suse.de>
4878
4879 PR symtab/25796
4880 * dwarf2/read.c (can_have_DW_AT_const_value_p): New function.
4881 (partial_die_info::fixup): Inherit has_const_value.
4882
4883 2020-04-07 Tom de Vries <tdevries@suse.de>
4884
4885 * psymtab.c (maintenance_check_psymtabs): Skip static LOC_BLOCK
4886 symbols without address.
4887
4888 2020-04-06 Kamil Rytarowski <n54@gmx.com>
4889
4890 * nbsd-nat.h (struct thread_info): Add forward declaration.
4891 (nbsd_nat_target::thread_alive): Add.
4892 (nbsd_nat_target::thread_name): Likewise.
4893 (nbsd_nat_target::update_thread_list): Likewise.
4894 (update_thread_list::post_attach): Likewise.
4895 (post_attach::pid_to_str): Likewise.
4896 * nbsd-nat.c: Include "gdbthread.h" and "inferior.h".
4897 (nbsd_thread_lister): Add.
4898 (nbsd_nat_target::thread_alive): Likewise.
4899 (nbsd_nat_target::thread_name): Likewise.
4900 (nbsd_add_threads): Likewise.
4901 (update_thread_list::post_attach): Likewise.
4902 (nbsd_nat_target::update_thread_list): Likewise.
4903 (post_attach::pid_to_str): Likewise.
4904
4905 2020-04-06 Tom Tromey <tromey@adacore.com>
4906
4907 * ada-valprint.c (print_variant_part): Extract the variant field.
4908 (print_field_values): Use the field as the outer value when
4909 recursing.
4910
4911 2020-04-06 Tom Tromey <tromey@adacore.com>
4912
4913 * sh-nbsd-tdep.c: Include nbsd-tdep.h.
4914 * ppc-nbsd-tdep.c: Include nbsd-tdep.h.
4915 * mips-nbsd-tdep.c (mipsnbsd_init_abi): Add missing ";".
4916 * arm-nbsd-tdep.c: Include nbsd-tdep.h.
4917 * hppa-nbsd-tdep.c: Include nbsd-tdep.h.
4918
4919 2020-04-06 Tom Tromey <tromey@adacore.com>
4920
4921 * dwarf2/read.c (read_base_type) <DW_ATE_complex_float>: Handle
4922 TYPE_CODE_ERROR.
4923
4924 2020-04-06 Kamil Rytarowski <n54@gmx.com>
4925
4926 * nbsd-tdep.c: Include "gdbarch.h".
4927 Define enum with NetBSD signal numbers.
4928 (nbsd_gdb_signal_from_target, nbsd_gdb_signal_to_target): New.
4929 * alpha-nbsd-tdep.c (alphanbsd_init_abi): Call nbsd_init_abi().
4930 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4931 * arm-nbsd-tdep.c (arm_netbsd_elf_init_abi): Likewise.
4932 * hppa-nbsd-tdep.c (hppanbsd_init_abi): Likewise.
4933 * i386-nbsd-tdep.c (i386nbsd_init_abi): Likewise.
4934 * mips-nbsd-tdep.c (nbsd_init_abi): Likewise.
4935 * ppc-nbsd-tdep.c (ppcnbsd_init_abi): Likewise.
4936 * sh-nbsd-tdep.c (shnbsd_init_abi): Likewise.
4937 * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Likewise.
4938 * sparc64-nbsd-tdep.c (sparc64nbsd_init_abi): Likewise.
4939 * vax-nbsd-tdep.c (vaxnbsd_elf_init_abi): Likewise.
4940
4941 2020-04-03 Hannes Domani <ssbssa@yahoo.de>
4942
4943 PR gdb/25325
4944 * dwarf2/read.c (read_enumeration_type): Fix typed enum attributes.
4945
4946 2020-04-03 Tom Tromey <tromey@adacore.com>
4947
4948 * dwarf2/loc.c (disassemble_dwarf_expression) <DW_OP_const_type>:
4949 Read constant block.
4950
4951 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
4952
4953 * gdb_bfd.h: Include gdbsupport/byte-vector.h.
4954 (gdb_bfd_get_full_section_contents): New declaration.
4955 * gdb_bfd.c (gdb_bfd_get_full_section_contents): New function.
4956 * windows-tdep.c (is_linked_with_cygwin_dll): Use
4957 gdb_bfd_get_full_section_contents.
4958
4959 2020-04-02 Simon Marchi <simon.marchi@polymtl.ca>
4960
4961 * exec.c (build_section_table): Replace internal_error with
4962 gdb_assert.
4963 (section_table_xfer_memory_partial): Likewise.
4964 * mdebugread.c (parse_partial_symbols): Likewise.
4965 * psymtab.c (lookup_partial_symbol): Likewise.
4966 * utils.c (wrap_here): Likewise.
4967
4968 2020-04-02 Tom Tromey <tromey@adacore.com>
4969
4970 * f-lang.c (build_fortran_types): Use arch_type to initialize
4971 builtin_complex_s32 in the TYPE_CODE_ERROR case.
4972
4973 2020-04-02 Tom Tromey <tromey@adacore.com>
4974
4975 * dwarf2/read.c (partial_die_info::read): Do not create a vector
4976 of attributes.
4977
4978 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com>
4979 Bernd Edlinger <bernd.edlinger@hotmail.de>
4980 Tom Tromey <tromey@adacore.com>
4981
4982 * buildsym.c (buildsym_compunit::record_line): Remove
4983 deduplication code.
4984
4985 2020-04-02 Tom de Vries <tdevries@suse.de>
4986
4987 PR ada/24671
4988 * dwarf2/read.c (dw2_map_matching_symbols): Handle -readnow.
4989
4990 2020-04-02 Tom de Vries <tdevries@suse.de>
4991
4992 * dwarf2/read.c (dwarf2_gdb_index_functions,
4993 dwarf2_debug_names_functions): Init lookup_global_symbol_language with
4994 NULL.
4995 * psymtab.c (psym_lookup_global_symbol_language): New function.
4996 (psym_functions): Init psym_lookup_global_symbol_language with
4997 psym_lookup_global_symbol_language.
4998 * symfile-debug.c (debug_sym_quick_functions): Init
4999 lookup_global_symbol_language with NULL.
5000 * symfile.c (set_initial_language): Remove fixme comment.
5001 * symfile.h (struct quick_symbol_functions): Add
5002 lookup_global_symbol_language.
5003 * symtab.c (find_quick_global_symbol_language): New function.
5004 (find_main_name): Use find_quick_global_symbol_language.
5005
5006 2020-04-01 Simon Marchi <simon.marchi@polymtl.ca>
5007
5008 * windows-tdep.c (is_linked_with_cygwin_dll): Fix style.
5009
5010 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5011
5012 * buildsym.c (record_line): Fix undefined behavior and preserve
5013 lines at eof.
5014
5015 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
5016
5017 * buildsym.c (record_line): Fix the resizing condition.
5018
5019 2020-04-01 Tom Tromey <tom@tromey.com>
5020
5021 * value.h (value_literal_complex): Add comment.
5022 * valops.c (value_literal_complex): Refer to value.h.
5023
5024 2020-04-01 Tom Tromey <tom@tromey.com>
5025
5026 * c-exp.y (FLOAT_KEYWORD, COMPLEX): New tokens.
5027 (scalar_type): New rule, from typebase.
5028 (typebase): Use scalar_type. Recognize complex types.
5029 (field_name): Handle FLOAT_KEYWORD.
5030 (ident_tokens): Add _Complex and __complex__.
5031
5032 2020-04-01 Tom Tromey <tom@tromey.com>
5033
5034 PR exp/25299:
5035 * valarith.c (promotion_type, complex_binop): New functions.
5036 (scalar_binop): Handle complex numbers. Use promotion_type.
5037 (value_pos, value_neg, value_complement): Handle complex numbers.
5038
5039 2020-04-01 Tom Tromey <tom@tromey.com>
5040
5041 * c-exp.y (COMPLEX_INT, COMPLEX_FLOAT): New tokens.
5042 (exp) <COMPLEX_INT, COMPLEX_FLOAT>: New rules.
5043 (parse_number): Handle complex numbers.
5044
5045 2020-04-01 Tom Tromey <tom@tromey.com>
5046
5047 * c-valprint.c (c_decorations): Change complex suffix to "i".
5048
5049 2020-04-01 Tom Tromey <tom@tromey.com>
5050
5051 * valprint.c (generic_value_print_complex): Use accessors.
5052 * value.h (value_real_part, value_imaginary_part): Declare.
5053 * valops.c (value_real_part, value_imaginary_part): New
5054 functions.
5055 * value.c (creal_internal_fn, cimag_internal_fn): Use accessors.
5056
5057 2020-04-01 Tom Tromey <tom@tromey.com>
5058
5059 * stabsread.c (rs6000_builtin_type, read_sun_floating_type)
5060 (read_range_type): Update.
5061 * mdebugread.c (basic_type): Update.
5062 * go-lang.c (build_go_types): Use init_complex_type.
5063 * gdbtypes.h (struct main_type) <complex_type>: New member.
5064 (init_complex_type): Update.
5065 (arch_complex_type): Don't declare.
5066 * gdbtypes.c (init_complex_type): Remove "objfile" parameter.
5067 Make name if none given. Use alloc_type_copy. Look for cached
5068 complex type.
5069 (arch_complex_type): Remove.
5070 (gdbtypes_post_init): Use init_complex_type.
5071 * f-lang.c (build_fortran_types): Use init_complex_type.
5072 * dwarf2/read.c (read_base_type): Update.
5073 * d-lang.c (build_d_types): Use init_complex_type.
5074 * ctfread.c (read_base_type): Update.
5075
5076 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5077
5078 * infrun.c (stop_all_threads): Update assertion, plus when
5079 stopping threads, take into account that we might be trying
5080 to stop an all-stop target.
5081 (stop_waiting): Call 'stop_all_threads' if there exists a
5082 non-stop target.
5083
5084 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5085
5086 * target.h (exists_non_stop_target): New function declaration.
5087 * target.c (exists_non_stop_target): New function.
5088
5089 2020-04-01 Hannes Domani <ssbssa@yahoo.de>
5090
5091 PR gdb/24789
5092 * eval.c (is_integral_or_integral_reference): New function.
5093 (evaluate_subexp_standard): Allow integer references in
5094 pointer arithmetic.
5095
5096 2020-04-01 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
5097
5098 * remote.c (remote_target::remote_parse_stop_reply): Remove the
5099 check for no ptid in the stop reply when the target is non-stop.
5100
5101 2020-04-01 Tom Tromey <tromey@adacore.com>
5102
5103 * symtab.h (class lookup_name_info) <lookup_name_info>: Change
5104 "name" parameter to rvalue reference. Initialize m_name_holder.
5105 <lookup_name_info>: New overloads.
5106 <name>: Return gdb::string_view.
5107 <c_str>: New method.
5108 <make_ignore_params>: Update.
5109 <search_name_hash>: Update.
5110 <language_lookup_name>: Return const char *.
5111 <m_name>: Change type.
5112 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info)
5113 (demangle_for_lookup_info::demangle_for_lookup_info): Update.
5114 (lookup_name_info::match_any): Update.
5115 * psymtab.c (match_partial_symbol, lookup_partial_symbol):
5116 Update.
5117 * minsyms.c (linkage_name_str): Update.
5118 * language.c (default_symbol_name_matcher): Update.
5119 * dwarf2/read.c (mapped_index_base::find_name_components_bounds):
5120 Update.
5121 * ada-lang.c (ada_fold_name): Change parameter to string_view.
5122 (ada_lookup_name_info::ada_lookup_name_info): Update.
5123 (literal_symbol_name_matcher): Update.
5124
5125 2020-04-01 Tom Tromey <tromey@adacore.com>
5126
5127 * psymtab.c (psymtab_search_name): Remove function.
5128 (psym_lookup_symbol): Create search name and lookup name here.
5129 (lookup_partial_symbol): Remove "name" parameter; add
5130 lookup_name.
5131 (psym_expand_symtabs_for_function): Update.
5132
5133 2020-03-31 Joel Jones <joelkevinjones@gmail.com>
5134
5135 PR tui/25597:
5136 * python/py-tui.c: Include gdb_curses.h inside of #ifdef TUI.
5137
5138 2020-03-31 Tom Tromey <tromey@adacore.com>
5139
5140 * dwarf2/abbrev.c (abbrev_table::read): Conditionally call
5141 memcpy.
5142
5143 2020-03-30 Nelson Chu <nelson.chu@sifive.com>
5144
5145 * features/riscv/32bit-csr.xml: Regenerated.
5146 * features/riscv/64bit-csr.xml: Regenerated.
5147
5148 2020-03-30 Tom Tromey <tromey@adacore.com>
5149
5150 * ada-valprint.c (print_variant_part): Update.
5151 * ada-lang.h (ada_which_variant_applies): Update.
5152 * ada-lang.c (ada_which_variant_applies): Remove outer_type and
5153 outer_valaddr parameters; replace with "outer" value parameter.
5154 (to_fixed_variant_branch_type): Update.
5155
5156 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5157
5158 * ppc-linux-nat.c: Include <algorithm>, <unordered_map>, and
5159 <list>. Remove inclusion of observable.h.
5160 (PPC_DEBUG_CURRENT_VERSION): Move up define.
5161 (struct arch_lwp_info): New struct.
5162 (class ppc_linux_dreg_interface): New class.
5163 (struct ppc_linux_process_info): New struct.
5164 (struct ppc_linux_nat_target) <low_delete_thread, low_new_fork>
5165 <low_new_clone, low_forget_process, low_prepare_to_resume>
5166 <copy_thread_dreg_state, mark_thread_stale>
5167 <mark_debug_registers_changed, register_hw_breakpoint>
5168 <clear_hw_breakpoint, register_wp, clear_wp>
5169 <can_use_watchpoint_cond_accel, calculate_dvc, check_condition>
5170 <num_memory_accesses, get_trigger_type>
5171 <create_watchpoint_request, hwdebug_point_cmp>
5172 <init_arch_lwp_info, get_arch_lwp_info>
5173 <low_stopped_by_watchpoint, low_stopped_data_address>: Declare as
5174 methods.
5175 <struct ptid_hash>: New inner struct.
5176 <m_dreg_interface, m_process_info, m_installed_hw_bps>: Declare
5177 members.
5178 (saved_dabr_value, hwdebug_info, max_slots_number)
5179 (struct hw_break_tuple, struct thread_points, ppc_threads)
5180 (have_ptrace_hwdebug_interface)
5181 (hwdebug_find_thread_points_by_tid)
5182 (hwdebug_insert_point, hwdebug_remove_point): Remove.
5183 (ppc_linux_nat_target::can_use_hw_breakpoint): Use
5184 m_dreg_interface, remove call to PTRACE_SET_DEBUGREG.
5185 (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Add comment,
5186 use m_dreg_interface.
5187 (hwdebug_point_cmp): Change to...
5188 (ppc_linux_nat_target::hwdebug_point_cmp): ...this method. Use
5189 reference arguments instead of pointers.
5190 (ppc_linux_nat_target::ranged_break_num_registers): Use
5191 m_dreg_interface.
5192 (ppc_linux_nat_target::insert_hw_breakpoint): Add comment, use
5193 m_dreg_interface. Call register_hw_breakpoint.
5194 (ppc_linux_nat_target::remove_hw_breakpoint): Add comment, use
5195 m_dreg_interface. Call clear_hw_breakpoint.
5196 (get_trigger_type): Change to...
5197 (ppc_linux_nat_target::get_trigger_type): ...this method. Add
5198 comment.
5199 (ppc_linux_nat_target::insert_mask_watchpoint): Update comment,
5200 use m_dreg_interface. Call register_hw_breakpoint.
5201 (ppc_linux_nat_target::remove_mask_watchpoint): Update comment,
5202 use m_dreg_interface. Call clear_hw_breakpoint.
5203 (can_use_watchpoint_cond_accel): Change to...
5204 (ppc_linux_nat_target::can_use_watchpoint_cond_accel): ...this
5205 method. Update comment, use m_dreg_interface and
5206 m_process_info.
5207 (calculate_dvc): Change to...
5208 (ppc_linux_nat_target::calculate_dvc): ...this method. Use
5209 m_dreg_interface.
5210 (num_memory_accesses): Change to...
5211 (ppc_linux_nat_target::num_memory_accesses): ...this method.
5212 (check_condition): Change to...
5213 (ppc_linux_nat_target::check_condition): ...this method.
5214 (ppc_linux_nat_target::can_accel_watchpoint_condition): Update
5215 comment, use m_dreg_interface.
5216 (create_watchpoint_request): Change to...
5217 (ppc_linux_nat_target::create_watchpoint_request): ...this
5218 method. Use m_dreg_interface.
5219 (ppc_linux_nat_target::insert_watchpoint): Add comment, use
5220 m_dreg_interface. Call register_hw_breakpoint or register_wp.
5221 (ppc_linux_nat_target::remove_watchpoint): Add comment, use
5222 m_dreg_interface. Call clear_hw_breakpoint or clear_wp.
5223 (ppc_linux_nat_target::low_forget_process)
5224 (ppc_linux_nat_target::low_new_fork)
5225 (ppc_linux_nat_target::low_new_clone)
5226 (ppc_linux_nat_target::low_delete_thread)
5227 (ppc_linux_nat_target::low_prepare_to_resume): New methods.
5228 (ppc_linux_nat_target::low_new_thread): Remove previous logic,
5229 only call mark_thread_stale.
5230 (ppc_linux_thread_exit): Remove.
5231 (ppc_linux_nat_target::stopped_data_address): Change to...
5232 (ppc_linux_nat_target::low_stopped_data_address): This. Add
5233 comment, use m_dreg_interface and m_thread_hw_breakpoints.
5234 (ppc_linux_nat_target::stopped_by_watchpoint): Change to...
5235 (ppc_linux_nat_target::stopped_by_watchpoint): This. Add
5236 comment. Call low_stopped_data_address.
5237 (ppc_linux_nat_target::watchpoint_addr_within_range): Use
5238 m_dreg_interface.
5239 (ppc_linux_nat_target::masked_watch_num_registers): Use
5240 m_dreg_interface.
5241 (ppc_linux_nat_target::copy_thread_dreg_state)
5242 (ppc_linux_nat_target::mark_thread_stale)
5243 (ppc_linux_nat_target::mark_debug_registers_changed)
5244 (ppc_linux_nat_target::register_hw_breakpoint)
5245 (ppc_linux_nat_target::clear_hw_breakpoint)
5246 (ppc_linux_nat_target::register_wp)
5247 (ppc_linux_nat_target::clear_wp)
5248 (ppc_linux_nat_target::init_arch_lwp_info)
5249 (ppc_linux_nat_target::get_arch_lwp_info): New methods.
5250 (_initialize_ppc_linux_nat): Remove observer callback.
5251
5252 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5253
5254 * ppc-linux-nat.c (ppc_linux_nat_target::store_registers)
5255 (ppc_linux_nat_target::auxv_parse)
5256 (ppc_linux_nat_target::read_description)
5257 (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
5258 Move up.
5259
5260 2020-03-30 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5261
5262 * linux-nat.h (low_new_clone): New method.
5263 * linux-nat.c (linux_handle_extended_wait): Call low_new_clone.
5264
5265 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
5266
5267 * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
5268 (dbx_expand_psymtab): ... this.
5269 (start_psymtab): Update.
5270 * mdebugread.c (psymtab_to_symtab_1): Rename to...
5271 (mdebug_expand_psymtab): ... this.
5272 (parse_partial_symbols): Update.
5273 (new_psymtab): Update.
5274 * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
5275 (xcoff_expand_psymtab): ... this.
5276 (xcoff_start_psymtab): Update.
5277
5278 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
5279
5280 * psympriv.h (partial_symtab) <read_dependencies>: Rename to...
5281 <expand_dependencies>: ... this.
5282 * psymtab.c (partial_symtab::read_dependencies): Rename to...
5283 (partial_symtab::expand_dependencies): ... this.
5284 * dwarf2/read.c (dwarf2_include_psymtab) <expand_psymtab>:
5285 Update.
5286 (dwarf2_psymtab::expand_psymtab): Update.
5287 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
5288 * mdebugread.c (psymtab_to_symtab_1): Update.
5289 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5290
5291 2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
5292
5293 * psympriv.h (discard_psymtab): Remove.
5294 * dbxread.c (dbx_end_psymtab): Update.
5295 * xcoffread.c (xcoff_end_psymtab): Update.
5296
5297 2020-03-28 Tom Tromey <tom@tromey.com>
5298
5299 * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
5300 comment.
5301
5302 2020-03-28 Tom Tromey <tom@tromey.com>
5303
5304 * dwarf2/read.c (read_attribute_reprocess): Fix formatting.
5305
5306 2020-03-27 Hannes Domani <ssbssa@yahoo.de>
5307
5308 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
5309
5310 2020-03-26 John Baldwin <jhb@FreeBSD.org>
5311
5312 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_BSDFLAGS.
5313
5314 2020-03-26 Tom Tromey <tom@tromey.com>
5315
5316 * dwarf2/read.c (handle_data_member_location, dwarf2_add_field)
5317 (mark_common_block_symbol_computed, read_tag_string_type)
5318 (attr_to_dynamic_prop, read_subrange_type): Update.
5319 (dwarf2_get_ref_die_offset, dwarf2_get_attr_constant_value): Move
5320 to be methods on struct attribute.
5321 (skip_one_die, process_imported_unit_die, read_namespace_alias)
5322 (read_call_site_scope, partial_die_info::read)
5323 (partial_die_info::read, lookup_die_type, follow_die_ref):
5324 Update.
5325 * dwarf2/attribute.c (attribute::get_ref_die_offset): New method,
5326 from dwarf2_get_ref_die_offset.
5327 (attribute::constant_value): New method, from
5328 dwarf2_get_attr_constant_value.
5329 * dwarf2/attribute.h (struct attribute) <get_ref_die_offset>:
5330 Declare method.
5331 <constant_value>: New method.
5332
5333 2020-03-26 Tom Tromey <tom@tromey.com>
5334
5335 * dwarf2/read.c (dwarf_unit_type_name, dwarf_tag_name)
5336 (dwarf_attr_name, dwarf_form_name, dwarf_bool_name)
5337 (dwarf_type_encoding_name): Move to stringify.c.
5338 * Makefile.in (COMMON_SFILES): Add dwarf2/stringify.c.
5339 * dwarf2/stringify.c: New file.
5340 * dwarf2/stringify.h: New file.
5341
5342 2020-03-26 Tom Tromey <tom@tromey.com>
5343
5344 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>:
5345 Rewrite.
5346
5347 2020-03-26 Tom Tromey <tom@tromey.com>
5348
5349 * dwarf2/die.h (struct die_info) <addr_base, ranges_base>: New
5350 methods.
5351 * dwarf2/read.c (lookup_addr_base): Move to die.h.
5352 (lookup_ranges_base): Likewise.
5353 (read_cutu_die_from_dwo, read_full_die_1): Update.
5354
5355 2020-03-26 Tom Tromey <tom@tromey.com>
5356
5357 * dwarf2/read.c (read_import_statement, read_file_scope)
5358 (read_type_unit_scope, inherit_abstract_dies, read_func_scope)
5359 (read_lexical_block_scope, read_call_site_scope)
5360 (dwarf2_get_subprogram_pc_bounds, get_scope_pc_bounds)
5361 (handle_struct_member_die, process_structure_scope)
5362 (update_enumeration_type_from_children)
5363 (process_enumeration_scope, read_array_type, read_common_block)
5364 (read_namespace, read_module, read_subroutine_type): Update.
5365 (sibling_die): Remove.
5366
5367 2020-03-26 Tom Tromey <tom@tromey.com>
5368
5369 * dwarf2/read.c (lookup_addr_base, lookup_ranges_base)
5370 (build_type_psymtabs_reader, read_structure_type)
5371 (read_enumeration_type, read_full_die_1): Update.
5372 (dwarf2_attr_no_follow): Move to die.h.
5373 * dwarf2/die.h (struct die_info) <attr>: New method.
5374
5375 2020-03-26 Tom Tromey <tom@tromey.com>
5376
5377 * dwarf2/read.c (struct dwarf2_cu) <base_known>: Remove.
5378 <base_address>: Now an optional.
5379 (dwarf2_find_base_address, dwarf2_rnglists_process)
5380 (dwarf2_ranges_process, fill_in_loclist_baton)
5381 (dwarf2_symbol_mark_computed): Update.
5382
5383 2020-03-26 Tom Tromey <tom@tromey.com>
5384
5385 * dwarf2/read.c (struct die_info): Move to die.h.
5386 * dwarf2/die.h: New file.
5387
5388 2020-03-26 Tom Tromey <tom@tromey.com>
5389
5390 * dwarf2/line-header.h (dwarf_decode_line_header): Declare.
5391 * dwarf2/read.c
5392 (dwarf2_statement_list_fits_in_line_number_section_complaint):
5393 Move to line-header.c.
5394 (read_checked_initial_length_and_offset, read_formatted_entries):
5395 Likewise.
5396 (dwarf_decode_line_header): Split into two.
5397 * dwarf2/line-header.c
5398 (dwarf2_statement_list_fits_in_line_number_section_complaint):
5399 Move from read.c.
5400 (read_checked_initial_length_and_offset, read_formatted_entries):
5401 Likewise.
5402 (dwarf_decode_line_header): New function, split from read.c.
5403
5404 2020-03-26 Tom Tromey <tom@tromey.com>
5405
5406 * dwarf2/read.h (struct dwarf2_per_objfile) <read_line_string>:
5407 Declare method.
5408 * dwarf2/read.c (read_attribute_value): Update.
5409 (dwarf2_per_objfile::read_line_string): Rename from
5410 read_indirect_line_string.
5411 (read_formatted_entries): Update.
5412
5413 2020-03-26 Tom Tromey <tom@tromey.com>
5414
5415 * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
5416 variable.
5417
5418 2020-03-26 Tom Tromey <tom@tromey.com>
5419
5420 * dwarf2/macro.h (dwarf_decode_macros): Make section parameter
5421 const.
5422 * dwarf2/macro.c (skip_form_bytes, skip_unknown_opcode)
5423 (dwarf_decode_macro_bytes, dwarf_decode_macros): Make section
5424 parameter const.
5425
5426 2020-03-26 Tom Tromey <tom@tromey.com>
5427
5428 * dwarf2/read.c (dwarf_decode_macros): Make "lh" const.
5429 * dwarf2/macro.h (dwarf_decode_macros): Constify "lh" parameter.
5430 * dwarf2/macro.c (macro_start_file): Constify "lh" parameter.
5431 (dwarf_decode_macro_bytes, dwarf_decode_macros): Likewise.
5432
5433 2020-03-26 Tom Tromey <tom@tromey.com>
5434
5435 * dwarf2/line-header.h (struct line_header) <is_valid_file_index,
5436 file_names_size, file_full_name, file_file_name>: Use const.
5437 <file_name_at, file_names>: Add const overload.
5438 * dwarf2/line-header.c (line_header::file_file_name)
5439 (line_header::file_full_name): Update.
5440
5441 2020-03-26 Tom Tromey <tom@tromey.com>
5442
5443 * dwarf2/read.c (dwarf2_macro_malformed_definition_complaint)
5444 (macro_start_file, consume_improper_spaces)
5445 (parse_macro_definition, skip_form_bytes, skip_unknown_opcode)
5446 (dwarf_parse_macro_header, dwarf_decode_macro_bytes)
5447 (dwarf_decode_macros): Move to macro.c.
5448 * dwarf2/macro.c: New file.
5449 * dwarf2/macro.h: New file.
5450 * Makefile.in (COMMON_SFILES): Add dwarf2/macro.c.
5451
5452 2020-03-26 Tom Tromey <tom@tromey.com>
5453
5454 * dwarf2/section.h (struct dwarf2_section_info) <read_string>: New
5455 method.
5456 * dwarf2/section.c: New method. From
5457 read_indirect_string_at_offset_from.
5458 * dwarf2/read.c (mapped_debug_names::namei_to_name): Update.
5459 (read_indirect_string_at_offset_from): Move to section.c.
5460 (read_indirect_string_at_offset): Rewrite.
5461 (read_indirect_line_string_at_offset): Remove.
5462 (read_indirect_string, read_indirect_line_string)
5463 (dwarf_decode_macro_bytes): Update.
5464
5465 2020-03-26 Tom Tromey <tom@tromey.com>
5466
5467 * dwarf2/section.h (struct dwarf2_section_info)
5468 <overload_complaint>: Declare.
5469 (dwarf2_section_buffer_overflow_complaint): Don't declare.
5470 * dwarf2/section.c (dwarf2_section_info::overflow_complaint):
5471 Rename from dwarf2_section_buffer_overflow_complaint.
5472 * dwarf2/read.c (skip_one_die, partial_die_info::read)
5473 (skip_form_bytes, dwarf_decode_macro_bytes): Update.
5474
5475 2020-03-26 Tom Tromey <tom@tromey.com>
5476
5477 * dwarf2/section.h (dwarf2_section_buffer_overflow_complaint):
5478 Declare.
5479 * dwarf2/section.c (dwarf2_section_buffer_overflow_complaint):
5480 Move from read.c.
5481 * dwarf2/read.c (dwarf2_section_buffer_overflow_complaint): Move
5482 to section.c.
5483
5484 2020-03-26 Tom Tromey <tom@tromey.com>
5485
5486 * dwarf2/read.c (dwarf_decode_macros): Split into two overloads.
5487
5488 2020-03-26 Tom Tromey <tom@tromey.com>
5489
5490 * dwarf2/read.c (macro_start_file): Change "cu" parameter to
5491 "builder".
5492 (dwarf_decode_macro_bytes): Likewise. Add dwarf2_per_objfile
5493 parameter.
5494 (dwarf_decode_macros): Update.
5495
5496 2020-03-26 Tom Tromey <tom@tromey.com>
5497
5498 * dwarf2/read.c (read_attribute_value): Update.
5499 (read_indirect_string_from_dwz): Move to dwz.c; change into
5500 method.
5501 (dwarf_decode_macro_bytes): Update.
5502 * dwarf2/dwz.h (struct dwz_file) <read_string>: Declare method.
5503 * dwarf2/dwz.c: New file.
5504 * Makefile.in (COMMON_SFILES): Add dwz.c.
5505
5506 2020-03-26 Tom Tromey <tom@tromey.com>
5507
5508 * dwarf2/read.h (struct dwz_file): Move to dwz.h.
5509 * dwarf2/read.c: Add include.
5510 * dwarf2/index-write.c: Add include.
5511 * dwarf2/index-cache.c: Add include.
5512 * dwarf2/dwz.h: New file.
5513
5514 2020-03-25 Tom Tromey <tom@tromey.com>
5515
5516 * compile/compile-object-load.c (get_out_value_type): Mention
5517 correct symbol name in error message.
5518
5519 2020-03-25 Hannes Domani <ssbssa@yahoo.de>
5520
5521 * windows-nat.c (windows_add_all_dlls): Fix system dll paths.
5522
5523 2020-03-25 Tom de Vries <tdevries@suse.de>
5524
5525 * symtab.h (is_main_symtab_of_compunit_symtab): New function.
5526 * symmisc.c (dump_symtab_1): Print user and includes fields.
5527 (maintenance_info_symtabs): Same.
5528
5529 2020-03-25 Andrew Burgess <andrew.burgess@embecosm.com>
5530
5531 PR gdb/25534
5532 * riscv-tdep.c (riscv_arg_info::c_offset): Update comment.
5533 (riscv_regcache_cooked_write): New function.
5534 (riscv_push_dummy_call): Use new function.
5535 (riscv_return_value): Likewise.
5536
5537 2020-03-24 Simon Marchi <simon.marchi@polymtl.ca>
5538
5539 * fbsd-nat.c (fbsd_nat_target::follow_fork): Change bool to int.
5540 * fbsd-nat.h (class fbsd_nat_target) <follow_fork>: Likewise.
5541 * inf-ptrace.c (inf_ptrace_target::follow_fork): Likewise.
5542 * inf-ptrace.h (struct inf_ptrace_target) <follow_fork>: Likewise.
5543 * infrun.c (follow_fork): Likewise.
5544 (follow_fork_inferior): Likewise.
5545 * linux-nat.c (linux_nat_target::follow_fork): Likewise.
5546 * linux-nat.h (class linux_nat_target): Likewise.
5547 * remote.c (class remote_target) <follow_fork>: Likewise.
5548 (remote_target::follow_fork): Likewise.
5549 * target-delegates.c: Re-generate.
5550 * target.c (default_follow_fork): Likewise.
5551 (target_follow_fork): Likewise.
5552 * target.h (struct target_ops) <follow_fork>: Likewise.
5553 (target_follow_fork): Likewise.
5554
5555 2020-03-24 Tom de Vries <tdevries@suse.de>
5556
5557 * psymtab.c (maintenance_info_psymtabs): Print user field.
5558
5559 2020-03-20 Tom Tromey <tromey@adacore.com>
5560
5561 * dwarf2/loc.h (dwarf2_evaluate_property): Make "addr_stack"
5562 const.
5563 * dwarf2/loc.c (dwarf2_evaluate_property): Make "addr_stack"
5564 const.
5565
5566 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
5567
5568 * ptrace.m4: Don't check for ptrace declaration.
5569 * config.in: Re-generate.
5570 * configure: Re-generate.
5571 * nat/gdb_ptrace.h: Don't declare ptrace if HAVE_DECL_PTRACE is
5572 not defined.
5573
5574 2020-03-20 Kamil Rytarowski <n54@gmx.com>
5575
5576 * amd64-bsd-nat.c (gdb_ptrace): Change return type from `int' to
5577 `PTRACE_TYPE_RET'.
5578 * i386-bsd-nat.c (gdb_ptrace): Likewise.
5579 * sparc-nat.c (gdb_ptrace): Likewise.
5580 * x86-bsd-nat.c (gdb_ptrace): Likewise.
5581
5582 2020-03-20 Tom Tromey <tromey@adacore.com>
5583
5584 * c-exp.y (lex_one_token): Fix assert.
5585
5586 2020-03-20 Tom Tromey <tromey@adacore.com>
5587
5588 * ada-tasks.c (read_atcb): Use smaller length in strncpy call.
5589 * linux-tdep.c (linux_fill_prpsinfo): Use smaller length in
5590 strncpy call.
5591
5592 2020-03-20 Tom Tromey <tromey@adacore.com>
5593
5594 * symmisc.c (maintenance_print_one_line_table): Use ui_out.
5595
5596 2020-03-20 Tom Tromey <tromey@adacore.com>
5597
5598 * ada-valprint.c (print_variant_part): Remove parameters; switch
5599 to value-based API.
5600 (print_field_values): Likewise.
5601 (ada_val_print_struct_union): Likewise.
5602 (ada_value_print_1): Update.
5603
5604 2020-03-20 Kamil Rytarowski <n54@gmx.com>
5605
5606 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): Inherit from
5607 nbsd_nat_target instead of inf_ptrace_target.
5608 * ppc-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
5609 nbsd_nat_target.
5610
5611 2020-03-20 Kamil Rytarowski <n54@gmx.com>
5612
5613 * hppa-nbsd-nat.c (fetch_registers): New variable lwp and pass
5614 it to the ptrace call.
5615 * (store_registers): Likewise.
5616
5617 2020-03-20 Kamil Rytarowski <n54@gmx.com>
5618
5619 * ppc-nbsd-nat.c (fetch_registers): New variable lwp and pass
5620 it to the ptrace call.
5621 * (store_registers): Likewise.
5622
5623 2020-03-19 Luis Machado <luis.machado@linaro.org>
5624
5625 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): If vg is not
5626 valid, fetch vg value from ptrace.
5627
5628 2020-03-19 Kamil Rytarowski <n54@gmx.com>
5629 * inf-ptrace.h: Disable get_ptrace_pid on NetBSD.
5630 * inf-ptrace.c: Likewise.
5631 * (gdb_ptrace): Add.
5632 * (inf_ptrace_target::resume): Update.
5633 * (inf_ptrace_target::xfer_partial): Likewise.
5634 * (inf_ptrace_peek_poke): Change argument `pid' to `ptid'.
5635 * (inf_ptrace_peek_poke): Update.
5636
5637 2020-03-19 Kamil Rytarowski <n54@gmx.com>
5638
5639 * x86-bsd-nat.c (gdb_ptrace): New.
5640 * (x86bsd_dr_set): Add new argument `ptid'.
5641 * (x86bsd_dr_get, x86bsd_dr_set, x86bsd_dr_set_control,
5642 x86bsd_dr_set_addr): Update.
5643
5644 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
5645
5646 * remote.c (remote_target::process_stop_reply): Handle events for
5647 all threads differently.
5648
5649 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
5650
5651 * completer.c (completion_tracker::remove_completion): Define new
5652 function.
5653 * completer.h (completion_tracker::remove_completion): Declare new
5654 function.
5655 * symtab.c (completion_list_add_symbol): Remove aliasing msymbols
5656 when adding a C++ function symbol.
5657
5658 2020-03-19 Andrew Burgess <andrew.burgess@embecosm.com>
5659
5660 * completer.c (completion_tracker::completion_hash_entry): Define
5661 new class.
5662 (advance_to_filename_complete_word_point): Call
5663 recompute_lowest_common_denominator.
5664 (completion_tracker::completion_tracker): Call discard_completions
5665 to setup the hash table.
5666 (completion_tracker::discard_completions): Allow for being called
5667 from the constructor, pass new equal function, and element deleter
5668 when constructing the hash table. Initialise new class member
5669 variables.
5670 (completion_tracker::maybe_add_completion): Remove use of
5671 m_entries_vec, and store more information into m_entries_hash.
5672 (completion_tracker::recompute_lcd_visitor): New function, most
5673 content taken from...
5674 (completion_tracker::recompute_lowest_common_denominator):
5675 ...here, this now just visits each item in the hash calling the
5676 above visitor.
5677 (completion_tracker::build_completion_result): Remove use of
5678 m_entries_vec, call recompute_lowest_common_denominator.
5679 * completer.h (completion_tracker::have_completions): Remove use
5680 of m_entries_vec.
5681 (completion_tracker::completion_hash_entry): Declare new class.
5682 (completion_tracker::recompute_lowest_common_denominator): Change
5683 function signature.
5684 (completion_tracker::recompute_lcd_visitor): Declare new function.
5685 (completion_tracker::m_entries_vec): Delete.
5686 (completion_tracker::m_entries_hash): Initialize to NULL.
5687 (completion_tracker::m_lowest_common_denominator_valid): New
5688 member variable.
5689 (completion_tracker::m_lowest_common_denominator_max_length): New
5690 member variable.
5691
5692 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5693
5694 * regformats/regdef.h: Put reg in gdb namespace.
5695
5696 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5697
5698 * i386-bsd-nat.c (gdb_ptrace): New.
5699 * (i386bsd_fetch_inferior_registers,
5700 i386bsd_store_inferior_registers) Switch from pid_t to ptid_t.
5701 * (i386bsd_fetch_inferior_registers,
5702 i386bsd_store_inferior_registers) Use gdb_ptrace.
5703
5704 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5705
5706 * amd64-bsd-nat.c (gdb_ptrace): New.
5707 * (amd64bsd_fetch_inferior_registers,
5708 amd64bsd_store_inferior_registers) Switch from pid_t to ptid_t.
5709 * (amd64bsd_fetch_inferior_registers,
5710 amd64bsd_store_inferior_registers) Use gdb_ptrace.
5711
5712 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5713
5714 * user-regs.c (user_reg::read): Rename to...
5715 (user_reg::xread): ...this.
5716 * (append_user_reg): Rename argument `read' to `xread'.
5717 * (user_reg_add_builtin): Likewise.
5718 * (user_reg_add): Likewise.
5719 * (value_of_user_reg): Likewise.
5720
5721 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5722
5723 * sparc-nat.c (gdb_ptrace): New.
5724 * sparc-nat.c (sparc_fetch_inferior_registers)
5725 (sparc_store_inferior_registers) Remove obsolete comment.
5726 * sparc-nat.c (sparc_fetch_inferior_registers)
5727 (sparc_store_inferior_registers) Switch from pid_t to ptid_t.
5728 * sparc-nat.c (sparc_fetch_inferior_registers)
5729 (sparc_store_inferior_registers) Use gdb_ptrace.
5730
5731 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5732
5733 * sh-nbsd-nat.c (fetch_registers): New variable lwp and pass
5734 it to the ptrace call.
5735 * sh-nbsd-nat.c (store_registers): Likewise.
5736
5737 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5738
5739 * sh-nbsd-nat.c (sh_nbsd_nat_target): Inherit from
5740 nbsd_nat_target instead of inf_ptrace_target.
5741 * sh-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
5742 nbsd_nat_target.
5743
5744 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5745
5746 * amd64-bsd-nat.c: Include amd64-bsd-nat.h".
5747
5748 2020-03-17 Kamil Rytarowski <n54@gmx.com>
5749
5750 * nbsd-nat.c: Include <sys/types.h>, <sys/ptrace.h> and
5751 <sys/sysctl.h>.
5752 * nbsd-nat.c (nbsd_nat_target::pid_to_exec_file): Rewrite.
5753
5754 2020-03-17 Tom de Vries <tdevries@suse.de>
5755
5756 PR gdb/23710
5757 * dwarf2/read.h (struct dwarf2_per_cu_data): Add unit_type and lang
5758 fields.
5759 * dwarf2/read.c (process_psymtab_comp_unit): Initialize unit_type and lang
5760 fields.
5761 (process_imported_unit_die): Skip import of c++ CUs.
5762
5763 2020-03-16 Tom Tromey <tom@tromey.com>
5764
5765 * p-valprint.c (pascal_object_print_value): Initialize
5766 base_value.
5767
5768 2020-03-16 Anton Kolesov <anton.kolesov@synopsys.com>
5769 Shahab Vahedi <shahab@synopsys.com>
5770
5771 * Makefile.in: Add arch/arc.o
5772 * configure.tgt: Likewise.
5773 * arc-tdep.c (arc_tdesc_init): Use arc_read_description.
5774 (_initialize_arc_tdep): Don't initialize old target descriptions.
5775 (arc_read_description): New function to cache target descriptions.
5776 * arc-tdep.h (arc_read_description): Add proto type.
5777 * arch/arc.c: New file.
5778 * arch/arc.h: Likewise.
5779 * features/Makefile: Replace old target descriptions with new.
5780 * features/arc-arcompact.c: Remove.
5781 * features/arc-arcompact.xml: Likewise.
5782 * features/arc-v2.c: Likewise
5783 * features/arc-v2.xml: Likewise
5784 * features/arc/aux-arcompact.xml: New file.
5785 * features/arc/aux-v2.xml: Likewise.
5786 * features/arc/core-arcompact.xml: Likewise.
5787 * features/arc/core-v2.xml: Likewise.
5788 * features/arc/aux-arcompact.c: Generate.
5789 * features/arc/aux-v2.c: Likewise.
5790 * features/arc/core-arcompact.c: Likewise.
5791 * features/arc/core-v2.c: Likewise.
5792 * target-descriptions (maint_print_c_tdesc_cmd): Support ARC features.
5793
5794 2020-03-16 Tom Tromey <tromey@adacore.com>
5795
5796 PR gdb/25663:
5797 * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
5798 putting value into bcache.
5799
5800 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
5801
5802 PR gdb/21500
5803 * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
5804 to...
5805 (amd64_windows_init_abi_common): ... this. Don't set size of
5806 long type.
5807 (amd64_windows_init_abi): New function.
5808 (amd64_cygwin_init_abi): New function.
5809 (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
5810 the Cygwin OS ABI.
5811 * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
5812 comment.
5813
5814 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
5815
5816 * windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
5817 * windows-tdep.c (CYGWIN_DLL_NAME): New.
5818 (pe_import_directory_entry): New struct type.
5819 (is_linked_with_cygwin_dll): New function.
5820 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Select
5821 GDB_OSABI_CYGWIN if the BFD is linked with the Cygwin DLL.
5822 * i386-windows-tdep.c (i386_windows_osabi_sniffer): Likewise.
5823
5824 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
5825
5826 * i386-windows-tdep.c: Mass-rename "cygwin" to "windows", except
5827 i386_cygwin_core_osabi_sniffer.
5828
5829 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
5830
5831 * i386-cygwin-tdep.c: Rename to...
5832 * i386-windows-tdep.c: ... this.
5833 * Makefile.in (ALL_TARGET_OBS): Rename i386-cygwin-tdep.c to
5834 i386-windows-tdep.c.
5835 * configure.tgt: Likewise.
5836
5837 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
5838
5839 * osabi.h (enum gdb_osabi): Add GDB_OSABI_WINDOWS.
5840 * osabi.c (gdb_osabi_names): Add "Windows".
5841 * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Return
5842 GDB_OSABI_WINDOWS when the binary's target is "pei-i386".
5843 (i386_cygwin_core_osabi_sniffer): New function, extracted from
5844 i386_cygwin_osabi_sniffer.
5845 (_initialize_i386_cygwin_tdep): Register OS ABI
5846 GDB_OSABI_WINDOWS for i386.
5847 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): Return
5848 GDB_OSABI_WINDOWS when the binary's target is "pei-x86-64".
5849 (_initialize_amd64_windows_tdep): Register OS ABI GDB_OSABI_WINDOWS
5850 for x86-64.
5851 * configure.tgt: Use GDB_OSABI_WINDOWS as the default OS ABI
5852 when the target matches '*-*-mingw*'.
5853
5854 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
5855
5856 * defs.h (enum gdb_osabi): Move to...
5857 * osabi.h (enum gdb_osabi): ... here.
5858 * gdbarch.sh: Include osabi.h in gdbarch.h.
5859 * gdbarch.h: Re-generate.
5860
5861 2020-03-16 Simon Marchi <simon.marchi@efficios.com>
5862
5863 * amd64-windows-tdep.c (amd64_windows_osabi_sniffer): New
5864 function.
5865 (_initialize_amd64_windows_tdep): Register osabi sniffer.
5866
5867 2020-03-14 Tom Tromey <tom@tromey.com>
5868
5869 * c-typeprint.c (cp_type_print_method_args): Print "__restrict__"
5870 for C++.
5871 (c_type_print_modifier): Likewise. Add "language" parameter.
5872 (c_type_print_varspec_prefix, c_type_print_base_struct_union)
5873 (c_type_print_base_1): Update.
5874 * type-stack.h (enum type_pieces) <tp_atomic, tp_restrict>: New
5875 constants.
5876 * type-stack.c (type_stack::insert): Handle tp_atomic and
5877 tp_restrict.
5878 (type_stack::follow_type_instance_flags): Likewise.
5879 (type_stack::follow_types): Likewise. Merge type-following code.
5880 * c-exp.y (RESTRICT, ATOMIC): New tokens.
5881 (space_identifier, cv_with_space_id)
5882 (const_or_volatile_or_space_identifier_noopt)
5883 (const_or_volatile_or_space_identifier): Remove.
5884 (single_qualifier, qualifier_seq_noopt, qualifier_seq): New
5885 rules.
5886 (ptr_operator, typebase): Update.
5887 (enum token_flag) <FLAG_C>: New constant.
5888 (ident_tokens): Add "restrict", "__restrict__", "__restrict", and
5889 "_Atomic".
5890 (lex_one_token): Handle FLAG_C.
5891
5892 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5893
5894 * m68k-bsd-nat.c (fetch_registers): New variable lwp and pass
5895 it to the ptrace call.
5896 * m68k-bsd-nat.c (store_registers): Likewise.
5897
5898 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5899
5900 * m68k-bsd-nat.c (m68kbsd_supply_gregset): Change type of regs to
5901 gdb_byte *.
5902 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
5903 * m68k-bsd-nat.c (m68kbsd_collect_gregset): Likewise.
5904 * m68k-bsd-nat.c (m68kbsd_supply_pcb): Cast &tmp to gdb_byte *.
5905
5906 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5907
5908 * m68k-bsd-nat.c (m68k_bsd_nat_target): Inherit from
5909 nbsd_nat_target instead of inf_ptrace_target.
5910 * m68k-bsd-nat.c: Include "nbsd-nat.h", as we are now using
5911 nbsd_nat_target.
5912
5913 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5914
5915 * m68k-bsd-nat.c: Define _KERNTYPES to get the declaration of
5916 register_t.
5917
5918 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5919
5920 * alpha-bsd-nat.c (fetch_registers): New variable lwp and pass
5921 it to the ptrace call.
5922 * alpha-bsd-nat.c (store_registers): Likewise.
5923
5924 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5925
5926 * alpha-bsd-nat.c: Remove <sys/procfs.h> and "gregset.h" from
5927 includes.
5928 * alpha-bsd-nat.c (gregset_t, fpregset_t): Remove.
5929 * alpha-bsd-nat.c (supply_gregset, fill_gregset, supply_fpregset,
5930 fill_fpregset): Likewise.
5931
5932 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5933
5934 * alpha-bsd-nat.c (alpha_netbsd_nat_target): Inherit from
5935 nbsd_nat_target instead of inf_ptrace_target.
5936 * alpha-bsd-nat.c: Include "nbsd-nat.h", as we are now using
5937 nbsd_nat_target.
5938
5939 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5940
5941 * alpha-bsd-nat.c: Define _KERNTYPES to get the declaration of
5942 register_t.
5943
5944 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5945
5946 * arm-nbsd-nat.c (fetch_register): New variable lwp and pass
5947 it to the ptrace call.
5948 * arm-nbsd-nat.c (fetch_fp_register): Likewise.
5949 * arm-nbsd-nat.c (fetch_fp_regs): Likewise.
5950 * arm-nbsd-nat.c (store_register): Likewise.
5951 * arm-nbsd-nat.c (store_regs): Likewise.
5952 * arm-nbsd-nat.c (store_fp_register): Likewise.
5953 * arm-nbsd-nat.c (store_fp_regs): Likewise.
5954
5955 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5956
5957 * arm-nbsd-nat.c (arm_netbsd_nat_target): Inherit from
5958 nbsd_nat_target instead of inf_ptrace_target.
5959 * arm-nbsd-nat.c: Include "nbsd-nat.h", as we are now using
5960 nbsd_nat_target.
5961
5962 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5963
5964 * x86-bsd-nat.c (x86bsd_dr_get): New variable lwp and pass
5965 it to the ptrace call.
5966 * x86-bsd-nat.c (x86bsd_dr_set): Likewise.
5967
5968 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5969
5970 * vax-bsd-nat.c (vaxbsd_supply_gregset): New variable lwp and pass
5971 it to the ptrace call.
5972 * vax-bsd-nat.c (vaxbsd_collect_gregset): Likewise.
5973
5974 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5975
5976 * vax-bsd-nat.c (vaxbsd_supply_gregset): Cast gregs to const
5977 gdb_byte *.
5978 * vax-bsd-nat.c (vaxbsd_collect_gregset): Cast gregs to void *.
5979
5980 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5981
5982 * vax-bsd-nat.c (vax_bsd_nat_target): Inherit from nbsd_nat_target
5983 instead of inf_ptrace_target.
5984 * vax-bsd-nat.c: Include "nbsd-nat.h", as we are now using
5985 nbsd_nat_target.
5986
5987 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5988
5989 * mips-nbsd-nat.c: Define _KERNTYPES to get the declaration of
5990 register_t.
5991
5992 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5993
5994 * ppc-nbsd-nat.c: Define _KERNTYPES to get the declaration of
5995 register_t.
5996
5997 2020-03-14 Kamil Rytarowski <n54@gmx.com>
5998
5999 * vax-bsd-nat.c: Define _KERNTYPES to get the declaration of
6000 register_t.
6001
6002 2020-03-13 Tom Tromey <tom@tromey.com>
6003
6004 * value.h (val_print): Don't declare.
6005 * valprint.h (val_print_array_elements)
6006 (val_print_scalar_formatted, generic_val_print): Don't declare.
6007 * valprint.c (generic_val_print_array): Take a struct value.
6008 (generic_val_print_ptr, generic_val_print_memberptr)
6009 (generic_val_print_bool, generic_val_print_int)
6010 (generic_val_print_char, generic_val_print_complex)
6011 (generic_val_print): Remove.
6012 (generic_value_print): Update.
6013 (do_val_print): Remove unused parameters. Don't call
6014 la_val_print.
6015 (val_print): Remove.
6016 (common_val_print): Update. Don't call value_check_printable.
6017 (val_print_scalar_formatted, val_print_array_elements): Remove.
6018 * rust-lang.c (rust_val_print): Remove.
6019 (rust_language_defn): Update.
6020 * p-valprint.c (pascal_val_print): Remove.
6021 (pascal_value_print_inner): Update.
6022 (pascal_object_print_val_fields, pascal_object_print_val):
6023 Remove.
6024 (pascal_object_print_static_field): Update.
6025 * p-lang.h (pascal_val_print): Don't declare.
6026 * p-lang.c (pascal_language_defn): Update.
6027 * opencl-lang.c (opencl_language_defn): Update.
6028 * objc-lang.c (objc_language_defn): Update.
6029 * m2-valprint.c (m2_print_unbounded_array, m2_val_print): Remove.
6030 * m2-lang.h (m2_val_print): Don't declare.
6031 * m2-lang.c (m2_language_defn): Update.
6032 * language.h (struct language_defn) <la_val_print>: Remove.
6033 * language.c (unk_lang_value_print_inner): Rename. Change
6034 argument types.
6035 (unknown_language_defn, auto_language_defn): Update.
6036 * go-valprint.c (go_val_print): Remove.
6037 * go-lang.h (go_val_print): Don't declare.
6038 * go-lang.c (go_language_defn): Update.
6039 * f-valprint.c (f_val_print): Remove.
6040 * f-lang.h (f_value_print): Don't declare.
6041 * f-lang.c (f_language_defn): Update.
6042 * d-valprint.c (d_val_print): Remove.
6043 * d-lang.h (d_value_print): Don't declare.
6044 * d-lang.c (d_language_defn): Update.
6045 * cp-valprint.c (cp_print_value_fields)
6046 (cp_print_value_fields_rtti, cp_print_value): Remove.
6047 (cp_print_static_field): Update.
6048 * c-valprint.c (c_val_print_array, c_val_print_ptr)
6049 (c_val_print_struct, c_val_print_union, c_val_print_int)
6050 (c_val_print_memberptr, c_val_print): Remove.
6051 * c-lang.h (c_val_print_array, cp_print_value_fields)
6052 (cp_print_value_fields_rtti): Don't declare.
6053 * c-lang.c (c_language_defn, cplus_language_defn)
6054 (asm_language_defn, minimal_language_defn): Update.
6055 * ada-valprint.c (ada_val_print_ptr, ada_val_print_num): Remove.
6056 (ada_val_print_enum): Take a struct value.
6057 (ada_val_print_flt, ada_val_print_array, ada_val_print_1)
6058 (ada_val_print): Remove.
6059 (ada_value_print_1): Update.
6060 (printable_val_type): Remove.
6061 * ada-lang.h (ada_val_print): Don't declare.
6062 * ada-lang.c (ada_language_defn): Update.
6063
6064 2020-03-13 Tom Tromey <tom@tromey.com>
6065
6066 * valprint.c (do_val_print): Update.
6067 * python/python-internal.h (gdbpy_apply_val_pretty_printer): Take
6068 a struct value.
6069 (value_to_value_object_no_release): Declare.
6070 * python/py-value.c (value_to_value_object_no_release): New
6071 function.
6072 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Take a
6073 struct value.
6074 * guile/scm-value.c (vlscm_scm_from_value_no_release): New
6075 function.
6076 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer): Take
6077 a struct value.
6078 * guile/guile-internal.h (vlscm_scm_from_value_no_release):
6079 Declare.
6080 (gdbscm_apply_val_pretty_printer): Take a struct value.
6081 * extension.h (apply_ext_lang_val_pretty_printer): Take a struct
6082 value.
6083 * extension.c (apply_ext_lang_val_pretty_printer): Take a struct
6084 value.
6085 * extension-priv.h (struct extension_language_ops)
6086 <apply_val_pretty_printer>: Take a struct value.
6087 * cp-valprint.c (cp_print_value): Create a struct value.
6088 (cp_print_value): Update.
6089
6090 2020-03-13 Tom Tromey <tom@tromey.com>
6091
6092 * ada-valprint.c (print_field_values): Call common_val_print.
6093
6094 2020-03-13 Tom Tromey <tom@tromey.com>
6095
6096 * ada-valprint.c (val_print_packed_array_elements): Remove
6097 bitoffset and val parameters. Call common_val_print.
6098 (ada_val_print_string): Remove offset, address, and original_value
6099 parameters.
6100 (ada_val_print_array): Update.
6101 (ada_value_print_array): New function.
6102 (ada_value_print_1): Call it.
6103
6104 2020-03-13 Tom Tromey <tom@tromey.com>
6105
6106 * ada-valprint.c (ada_value_print): Use common_val_print.
6107
6108 2020-03-13 Tom Tromey <tom@tromey.com>
6109
6110 * ada-valprint.c (ada_val_print_ref): Use common_val_print.
6111
6112 2020-03-13 Tom Tromey <tom@tromey.com>
6113
6114 * ada-valprint.c (ada_value_print_num): New function.
6115 (ada_value_print_1): Use it.
6116
6117 2020-03-13 Tom Tromey <tom@tromey.com>
6118
6119 * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
6120
6121 2020-03-13 Tom Tromey <tom@tromey.com>
6122
6123 * ada-valprint.c (ada_value_print_ptr): New function.
6124 (ada_value_print_1): Use it.
6125
6126 2020-03-13 Tom Tromey <tom@tromey.com>
6127
6128 * ada-valprint.c (ada_val_print_gnat_array): Take a struct value;
6129 call common_val_print.
6130 (ada_val_print_1): Update.
6131 (ada_value_print_1): New function.
6132 (ada_value_print_inner): Rewrite.
6133
6134 2020-03-13 Tom Tromey <tom@tromey.com>
6135
6136 * cp-valprint.c (cp_print_value_fields): Update.
6137 (cp_print_value): New function.
6138
6139 2020-03-13 Tom Tromey <tom@tromey.com>
6140
6141 * m2-valprint.c (m2_value_print_inner): Use
6142 cp_print_value_fields.
6143 * cp-valprint.c (cp_print_value_fields): New function.
6144 * c-valprint.c (c_value_print_struct): New function.
6145 (c_value_print_inner): Use c_value_print_struct.
6146 * c-lang.h (cp_print_value_fields): Declare.
6147
6148 2020-03-13 Tom Tromey <tom@tromey.com>
6149
6150 * c-valprint.c (c_value_print_array): New function.
6151 (c_value_print_inner): Use it.
6152
6153 2020-03-13 Tom Tromey <tom@tromey.com>
6154
6155 * c-valprint.c (c_value_print_memberptr): New function.
6156 (c_value_print_inner): Use it.
6157
6158 2020-03-13 Tom Tromey <tom@tromey.com>
6159
6160 * c-valprint.c (c_value_print_int): New function.
6161 (c_value_print_inner): Use it.
6162
6163 2020-03-13 Tom Tromey <tom@tromey.com>
6164
6165 * c-valprint.c (c_value_print_ptr): New function.
6166 (c_value_print_inner): Use it.
6167
6168 2020-03-13 Tom Tromey <tom@tromey.com>
6169
6170 * c-valprint.c (c_value_print_inner): Rewrite.
6171
6172 2020-03-13 Tom Tromey <tom@tromey.com>
6173
6174 * valprint.c (generic_value_print_complex): New function.
6175 (generic_value_print): Use it.
6176
6177 2020-03-13 Tom Tromey <tom@tromey.com>
6178
6179 * valprint.c (generic_val_print_float): Don't call
6180 val_print_scalar_formatted.
6181 (generic_val_print, generic_value_print): Update.
6182
6183 2020-03-13 Tom Tromey <tom@tromey.com>
6184
6185 * valprint.c (generic_value_print_char): New function
6186 (generic_value_print): Use it.
6187
6188 2020-03-13 Tom Tromey <tom@tromey.com>
6189
6190 * valprint.c (generic_value_print_int): New function.
6191 (generic_value_print): Use it.
6192
6193 2020-03-13 Tom Tromey <tom@tromey.com>
6194
6195 * valprint.c (generic_value_print_bool): New function.
6196 (generic_value_print): Use it.
6197
6198 2020-03-13 Tom Tromey <tom@tromey.com>
6199
6200 * valprint.c (generic_val_print_func): Simplify.
6201 (generic_val_print, generic_value_print): Update.
6202
6203 2020-03-13 Tom Tromey <tom@tromey.com>
6204
6205 * valprint.c (generic_val_print_flags): Remove.
6206 (generic_val_print, generic_value_print): Update.
6207 (val_print_type_code_flags): Add original_value parameter.
6208
6209 2020-03-13 Tom Tromey <tom@tromey.com>
6210
6211 * valprint.c (generic_val_print): Update.
6212 (generic_value_print): Update.
6213 * valprint.c (generic_val_print_enum): Don't call
6214 val_print_scalar_formatted.
6215
6216 2020-03-13 Tom Tromey <tom@tromey.com>
6217
6218 * valprint.c (generic_value_print): Call generic_value_print_ptr.
6219 * valprint.c (generic_value_print_ptr): New function.
6220
6221 2020-03-13 Tom Tromey <tom@tromey.com>
6222
6223 * valprint.c (generic_value_print): Rewrite.
6224
6225 2020-03-13 Tom Tromey <tom@tromey.com>
6226
6227 * p-valprint.c (pascal_object_print_value_fields)
6228 (pascal_object_print_value): New functions.
6229
6230 2020-03-13 Tom Tromey <tom@tromey.com>
6231
6232 * p-valprint.c (pascal_value_print_inner): Rewrite.
6233
6234 2020-03-13 Tom Tromey <tom@tromey.com>
6235
6236 * f-valprint.c (f_value_print_innner): Rewrite.
6237
6238 2020-03-13 Tom Tromey <tom@tromey.com>
6239
6240 * m2-valprint.c (m2_print_unbounded_array): New overload.
6241 (m2_print_unbounded_array): Update.
6242 (m2_print_array_contents): Take a struct value.
6243 (m2_value_print_inner): Rewrite.
6244
6245 2020-03-13 Tom Tromey <tom@tromey.com>
6246
6247 * d-valprint.c (dynamic_array_type): Call d_value_print_inner.
6248 (d_value_print_inner): New function.
6249 * d-lang.h (d_value_print_inner): Declare.
6250 * d-lang.c (d_language_defn): Use d_value_print_inner.
6251
6252 2020-03-13 Tom Tromey <tom@tromey.com>
6253
6254 * go-valprint.c (go_value_print_inner): New function.
6255 * go-lang.h (go_value_print_inner): Declare.
6256 * go-lang.c (go_language_defn): Use go_value_print_inner.
6257
6258 2020-03-13 Tom Tromey <tom@tromey.com>
6259
6260 * rust-lang.c (val_print_struct, rust_print_enum): Use the value
6261 API.
6262 (rust_val_print): Rewrite.
6263 (rust_value_print_inner): New function, from rust_val_print.
6264 (rust_language_defn): Use rust_value_print_inner.
6265
6266 2020-03-13 Tom Tromey <tom@tromey.com>
6267
6268 * ada-valprint.c (ada_value_print_inner): New function.
6269 * ada-lang.h (ada_value_print_inner): Declare.
6270 * ada-lang.c (ada_language_defn): Use ada_value_print_inner.
6271
6272 2020-03-13 Tom Tromey <tom@tromey.com>
6273
6274 * f-valprint.c (f_value_print_innner): New function.
6275 * f-lang.h (f_value_print_innner): Declare.
6276 * f-lang.c (f_language_defn): Use f_value_print_innner.
6277
6278 2020-03-13 Tom Tromey <tom@tromey.com>
6279
6280 * p-valprint.c (pascal_value_print_inner): New function.
6281 * p-lang.h (pascal_value_print_inner): Declare.
6282 * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
6283
6284 2020-03-13 Tom Tromey <tom@tromey.com>
6285
6286 * m2-valprint.c (m2_value_print_inner): New function.
6287 * m2-lang.h (m2_value_print_inner): Declare.
6288 * m2-lang.c (m2_language_defn): Use m2_value_print_inner.
6289
6290 2020-03-13 Tom Tromey <tom@tromey.com>
6291
6292 * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
6293 * objc-lang.c (objc_language_defn): Use c_value_print_inner.
6294 * c-valprint.c (c_value_print_inner): New function.
6295 * c-lang.h (c_value_print_inner): Declare.
6296 * c-lang.c (c_language_defn, cplus_language_defn)
6297 (asm_language_defn, minimal_language_defn): Use
6298 c_value_print_inner.
6299
6300 2020-03-13 Tom Tromey <tom@tromey.com>
6301
6302 * p-valprint.c (pascal_object_print_value_fields): Now static.
6303 * p-lang.h (pascal_object_print_value_fields): Don't declare.
6304
6305 2020-03-13 Tom Tromey <tom@tromey.com>
6306
6307 * c-valprint.c (c_val_print_array): Simplify.
6308
6309 2020-03-13 Tom Tromey <tom@tromey.com>
6310
6311 * valprint.c (value_print_array_elements): New function.
6312 * valprint.h (value_print_array_elements): Declare.
6313
6314 2020-03-13 Tom Tromey <tom@tromey.com>
6315
6316 * printcmd.c (print_formatted): Use value_print_scalar_formatted.
6317 * mips-tdep.c (mips_print_register): Use
6318 value_print_scalar_formatted.
6319
6320 2020-03-13 Tom Tromey <tom@tromey.com>
6321
6322 * valprint.h (value_print_scalar_formatted): Declare.
6323 * valprint.c (value_print_scalar_formatted): New function.
6324
6325 2020-03-13 Tom Tromey <tom@tromey.com>
6326
6327 * valprint.h (generic_value_print): Declare.
6328 * valprint.c (generic_value_print): New function.
6329
6330 2020-03-13 Tom Tromey <tom@tromey.com>
6331
6332 * valprint.c (do_val_print): Call la_value_print_inner, if
6333 available.
6334 * rust-lang.c (rust_language_defn): Update.
6335 * p-lang.c (pascal_language_defn): Update.
6336 * opencl-lang.c (opencl_language_defn): Update.
6337 * objc-lang.c (objc_language_defn): Update.
6338 * m2-lang.c (m2_language_defn): Update.
6339 * language.h (struct language_defn) <la_value_print_inner>: New
6340 member.
6341 * language.c (unknown_language_defn, auto_language_defn): Update.
6342 * go-lang.c (go_language_defn): Update.
6343 * f-lang.c (f_language_defn): Update.
6344 * d-lang.c (d_language_defn): Update.
6345 * c-lang.c (c_language_defn, cplus_language_defn)
6346 (asm_language_defn, minimal_language_defn): Update.
6347 * ada-lang.c (ada_language_defn): Update.
6348
6349 2020-03-13 Tom Tromey <tom@tromey.com>
6350
6351 * c-valprint.c (c_value_print): Use common_val_print.
6352
6353 2020-03-13 Tom Tromey <tom@tromey.com>
6354
6355 * cp-valprint.c (cp_print_static_field): Use common_val_print.
6356
6357 2020-03-13 Tom Tromey <tom@tromey.com>
6358
6359 * f-valprint.c (f77_print_array_1, f_val_print): Use
6360 common_val_print.
6361
6362 2020-03-13 Tom Tromey <tom@tromey.com>
6363
6364 * riscv-tdep.c (riscv_print_one_register_info): Use
6365 common_val_print.
6366
6367 2020-03-13 Tom Tromey <tom@tromey.com>
6368
6369 * mi/mi-main.c (output_register): Use common_val_print.
6370
6371 2020-03-13 Tom Tromey <tom@tromey.com>
6372
6373 * infcmd.c (default_print_one_register_info): Use
6374 common_val_print.
6375
6376 2020-03-13 Tom Tromey <tom@tromey.com>
6377
6378 * valprint.h (common_val_print_checked): Declare.
6379 * valprint.c (common_val_print_checked): New function.
6380 * stack.c (print_frame_arg): Use common_val_print_checked.
6381
6382 2020-03-13 Tom Tromey <tom@tromey.com>
6383
6384 * valprint.c (do_val_print): New function, from val_print.
6385 (val_print): Use do_val_print.
6386 (common_val_print): Use do_val_print.
6387
6388 2020-03-13 Tom Tromey <tom@tromey.com>
6389
6390 * valprint.c (value_print): Use scoped_value_mark.
6391
6392 2020-03-13 Tom de Vries <tdevries@suse.de>
6393
6394 PR symtab/25646
6395 * psymtab.c (partial_symtab::partial_symtab): Don't set
6396 globals_offset and statics_offset. Push element onto
6397 current_global_psymbols and current_static_psymbols stacks.
6398 (concat): New function.
6399 (end_psymtab_common): Set globals_offset and statics_offset. Pop
6400 element from current_global_psymbols and current_static_psymbols
6401 stacks. Concat popped elements to global_psymbols and
6402 static_symbols.
6403 (add_psymbol_to_list): Use current_global_psymbols and
6404 current_static_psymbols stacks.
6405 * psymtab.h (class psymtab_storage): Add current_global_psymbols and
6406 current_static_psymbols fields.
6407
6408 2020-03-12 Christian Biesinger <cbiesinger@google.com>
6409
6410 * corelow.c (sniff_core_bfd): Remove.
6411 (class core_target) <m_core_vec>: Remove.
6412 (core_target::core_target): Update.
6413 (core_file_fns): Remove.
6414 (deprecated_add_core_fns): Remove.
6415 (default_core_sniffer): Remove.
6416 (sniff_core_bfd): Remove.
6417 (default_check_format): Remove.
6418 (gdb_check_format): Remove.
6419 (core_target_open): Update.
6420 (core_target::get_core_register_section): Update.
6421 (get_core_registers_cb): Update.
6422 (core_target::fetch_registers): Update.
6423 * gdbcore.h (struct core_fns): Remove.
6424 (deprecated_add_core_fns): Remove.
6425 (default_core_sniffer): Remove.
6426 (default_check_format): Remove.
6427
6428 2020-03-12 Tom Tromey <tom@tromey.com>
6429
6430 * arm-tdep.c (struct arm_mapping_symbol) <value>: Now a
6431 CORE_ADDR.
6432 (struct arm_exidx_entry) <addr>: Now a CORE_ADDR.
6433
6434 2020-03-12 Tom Tromey <tom@tromey.com>
6435
6436 * remote.c (remote_target::download_tracepoint)
6437 (remote_target::enable_tracepoint)
6438 (remote_target::disable_tracepoint): Use phex, not sprintf_vma.
6439 * breakpoint.c (print_recreate_masked_watchpoint): Use phex, not
6440 sprintf_vma.
6441
6442 2020-03-12 Tom Tromey <tom@tromey.com>
6443
6444 * symfile-mem.c: Update CORE_ADDR size assert.
6445
6446 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
6447
6448 * selftest.m4: Move to gdbsupport/.
6449 * acinclude.m4: Update path to selftest.m4.
6450
6451 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
6452
6453 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
6454 (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
6455 gdbarch-selfselftests.c and selftest-arch.c.
6456 (SUBDIR_UNITTESTS_OBS): Rename to...
6457 (SELFTESTS_OBS): ... this.
6458 (COMMON_SFILES): Remove disasm-selftests.c and
6459 gdbarch-selftests.c.
6460 * configure.ac: Don't add selftest-arch.{c,o} to
6461 CONFIG_{SRCS,OBS}.
6462 * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
6463 preprocessor conditions.
6464
6465 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
6466
6467 * configure.ac: Don't source bfd/development.sh.
6468 * selftest.m4: Modify comment.
6469 * configure: Re-generate.
6470
6471 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
6472
6473 * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
6474 not "true" or "false".
6475 * configure: Re-generate.
6476
6477 2020-03-12 Christian Biesinger <cbiesinger@google.com>
6478
6479 * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
6480 * arm-nbsd-nat.c (arm_supply_gregset): Moved to arm-nbsd-tdep and
6481 renamed to arm_nbsd_supply_gregset.
6482 (fetch_register): Update to call arm_nbsd_supply_gregset.
6483 (fetch_regs): Remove in favor of fetch_register with a -1 regno.
6484 (arm_netbsd_nat_target::fetch_registers): Update.
6485 (fetch_elfcore_registers): Removed.
6486 (_initialize_arm_netbsd_nat): Removed call to deprecated_add_core_fns.
6487 * arm-nbsd-tdep.c (struct arm_nbsd_reg): New struct.
6488 (arm_nbsd_supply_gregset): Moved from arm-nbsd-nat.c and updated to
6489 not require NetBSD system headers.
6490 (arm_nbsd_regset): New struct.
6491 (arm_nbsd_iterate_over_regset_sections): New function.
6492 (arm_netbsd_init_abi_common): Updated to call
6493 set_gdbarch_iterate_over_regset_sections.
6494 * arm-nbsd-tdep.h: New file.
6495
6496 2020-03-11 Kevin Buettner <kevinb@redhat.com>
6497
6498 * symtab.c (find_pc_sect_line): Add check which prevents infinite
6499 recursion.
6500
6501 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
6502
6503 * configure: Re-generate.
6504
6505 2020-03-11 Tom Tromey <tromey@adacore.com>
6506
6507 * ada-typeprint.c (print_choices): Fix comment.
6508
6509 2020-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
6510
6511 * buildsyms.c (buildsym_compunit::record_line): Avoid accessing
6512 previous item in the list, when the list has no items.
6513
6514 2020-03-11 Tom de Vries <tdevries@suse.de>
6515
6516 * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in
6517 PROP_LOCLIST handling code.
6518
6519 2020-03-10 Andrew Burgess <andrew.burgess@embecosm.com>
6520
6521 * buildsym-legacy.c (record_line): Pass extra parameter to
6522 record_line.
6523 * buildsym.c (buildsym_compunit::record_line): Take an extra
6524 parameter, reduce duplication in the line table, and record the
6525 is_stmt flag in the line table.
6526 * buildsym.h (buildsym_compunit::record_line): Add extra
6527 parameter.
6528 * disasm.c (do_mixed_source_and_assembly_deprecated): Ignore
6529 non-statement lines.
6530 * dwarf2/read.c (dwarf_record_line_1): Add extra parameter, pass
6531 this to the symtab builder.
6532 (dwarf_finish_line): Pass extra parameter to dwarf_record_line_1.
6533 (lnp_state_machine::record_line): Pass a suitable is_stmt flag
6534 through to dwarf_record_line_1.
6535 * infrun.c (process_event_stop_test): When stepping, don't stop at
6536 a non-statement instruction, and only refresh the step info when
6537 we land in the middle of a line's range. Also add an extra
6538 comment.
6539 * jit.c (jit_symtab_line_mapping_add_impl): Initialise is_stmt
6540 field.
6541 * record-btrace.c (btrace_find_line_range): Only record lines
6542 marked as is-statement.
6543 * stack.c (frame_show_address): Show the frame address if we are
6544 in a non-statement sal.
6545 * symmisc.c (dump_symtab_1): Print the is_stmt flag.
6546 (maintenance_print_one_line_table): Print a header for the is_stmt
6547 column, and include is_stmt information in the output.
6548 * symtab.c (find_pc_sect_line): Find lines marked as statements in
6549 preference to non-statements.
6550 (find_pcs_for_symtab_line): Prefer is-statement entries.
6551 (find_line_common): Likewise.
6552 * symtab.h (struct linetable_entry): Add is_stmt field.
6553 (struct symtab_and_line): Likewise.
6554 * xcoffread.c (arrange_linetable): Initialise is_stmt field when
6555 arranging the line table.
6556
6557 2020-03-07 Tom de Vries <tdevries@suse.de>
6558
6559 * dwarf2/read.c (read_typedef): Treat anonymous typedef as forwarder
6560 DIE.
6561
6562 2020-03-07 Tom Tromey <tom@tromey.com>
6563
6564 * valops.c (value_literal_complex): Remove obsolete comment.
6565 * gdbtypes.h (enum type_code) <TYPE_CODE_FLT>: Remove obsolete
6566 comment.
6567
6568 2020-03-06 Simon Marchi <simon.marchi@polymtl.ca>
6569
6570 * infrun.h: Forward-declare thread_info.
6571 (set_step_info): Add thread_info parameter, add doc.
6572 * infrun.c (set_step_info): Add thread_info parameter, move doc
6573 to header.
6574 * infrun.c (process_event_stop_test): Pass thread to
6575 set_step_info call.
6576 * infcmd.c (set_step_frame): Add thread_info pointer, pass it to
6577 set_step_info.
6578 (prepare_one_step): Add thread_info parameter, pass it to
6579 set_step_frame and prepare_one_step (recursive) call.
6580 (step_1): Pass thread to prepare_one_step call.
6581 (step_command_fsm::should_stop): Pass thread to
6582 prepare_one_step.
6583 (until_next_fsm): Pass thread to set_step_frame call.
6584 (finish_command): Pass thread to set_step_info call.
6585
6586 2020-03-06 Hannes Domani <ssbssa@yahoo.de>
6587
6588 * windows-tdep.c (windows_solib_create_inferior_hook):
6589 Check if inferior is running.
6590
6591 2020-03-06 Tom de Vries <tdevries@suse.de>
6592
6593 * NEWS: Fix "the the".
6594 * ctfread.c: Same.
6595
6596 2020-03-06 Tom de Vries <tdevries@suse.de>
6597
6598 * psymtab.c (psymtab_to_symtab): Don't print "done.".
6599
6600 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
6601
6602 * .dir-locals.el: Add a comment referencing the other copies of
6603 this file.
6604
6605 2020-03-05 John Baldwin <jhb@FreeBSD.org>
6606
6607 * fbsd-tdep.c (fbsd_make_corefile_notes): Use std::string for
6608 psargs.
6609
6610 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6611
6612 * .gitattributes: New file.
6613
6614 2020-03-04 Tom Tromey <tom@tromey.com>
6615
6616 * symmisc.c (print_symbol_bcache_statistics)
6617 (print_objfile_statistics): Update.
6618 * symfile.c (allocate_symtab): Use intern.
6619 * psymtab.c (partial_symtab::partial_symtab): Use intern.
6620 * objfiles.h (struct objfile_per_bfd_storage) <filename_cache,
6621 macro_cache>: Remove.
6622 <string_cache>: New member.
6623 (struct objfile) <intern>: New methods.
6624 * elfread.c (elf_symtab_read): Use intern.
6625 * dwarf2/read.c (fixup_go_packaging): Intern package name.
6626 (dwarf2_compute_name, dwarf2_physname)
6627 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2): Intern
6628 names.
6629 (guess_partial_die_structure_name): Update.
6630 (partial_die_info::fixup): Intern name.
6631 (dwarf2_canonicalize_name): Change parameter to objfile. Intern
6632 name.
6633 (dwarf2_name): Intern name. Update.
6634 * buildsym.c (buildsym_compunit::get_macro_table): Use
6635 string_cache.
6636
6637 2020-03-04 Tom Tromey <tom@tromey.com>
6638
6639 * jit.c (bfd_open_from_target_memory): Make "target" const.
6640 * corefile.c (gnutarget): Now const.
6641 * gdbcore.h (gnutarget): Now const.
6642
6643 2020-03-04 Hannes Domani <ssbssa@yahoo.de>
6644
6645 * NEWS: Mention support for WOW64 processes.
6646 * amd64-windows-nat.c (amd64_mappings): Rename and remove static.
6647 (amd64_windows_segment_register_p): Remove static.
6648 (_initialize_amd64_windows_nat): Update.
6649 * configure.nat <windows> (NATDEPFILES): Add i386-windows-nat.o.
6650 * i386-windows-nat.c (context_offset): Update.
6651 (i386_mappings): Rename and remove static.
6652 (i386_windows_segment_register_p): Remove static.
6653 (_initialize_i386_windows_nat): Update.
6654 * windows-nat.c (STATUS_WX86_BREAKPOINT): New macro.
6655 (STATUS_WX86_SINGLE_STEP): New macro.
6656 (EnumProcessModulesEx): New macro.
6657 (Wow64SuspendThread): New macro.
6658 (Wow64GetThreadContext): New macro.
6659 (Wow64SetThreadContext): New macro.
6660 (Wow64GetThreadSelectorEntry): New macro.
6661 (windows_set_context_register_offsets): Add static.
6662 (windows_set_segment_register_p): Likewise.
6663 (windows_add_thread): Adapt for WOW64 processes.
6664 (windows_fetch_one_register): Likewise.
6665 (windows_nat_target::fetch_registers): Likewise.
6666 (windows_store_one_register): Likewise.
6667 (display_selector): Likewise.
6668 (display_selectors): Likewise.
6669 (handle_exception): Likewise.
6670 (windows_continue): Likewise.
6671 (windows_nat_target::resume): Likewise.
6672 (windows_add_all_dlls): Likewise.
6673 (do_initial_windows_stuff): Likewise.
6674 (windows_nat_target::attach): Likewise.
6675 (windows_get_exec_module_filename): Likewise.
6676 (windows_nat_target::create_inferior): Likewise.
6677 (windows_xfer_siginfo): Likewise.
6678 (_initialize_loadable): Initialize Wow64SuspendThread,
6679 Wow64GetThreadContext, Wow64SetThreadContext,
6680 Wow64GetThreadSelectorEntry and EnumProcessModulesEx.
6681 * windows-nat.h (windows_set_context_register_offsets):
6682 Remove declaration.
6683 (windows_set_segment_register_p): Likewise.
6684 (i386_windows_segment_register_p): Add declaration.
6685 (amd64_windows_segment_register_p): Likewise.
6686
6687 2020-03-04 Luis Machado <luis.machado@linaro.org>
6688
6689 Revert aa66aac47b4dd38f9524ddb5546c08cc09930d37 due to regressions
6690 in "info registers" for AArch64/ARM.
6691
6692 The change caused "info registers" to not print GPR's.
6693
6694 gdb/ChangeLog:
6695
6696 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
6697
6698 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
6699 when reg->group is empty and reggroup is not.
6700
6701 2020-03-03 Tom Tromey <tromey@adacore.com>
6702
6703 * dwarf2/frame.c (struct dwarf2_frame_cache)
6704 <checked_tailcall_bottom, entry_cfa_sp_offset,
6705 entry_cfa_sp_offset_p>: Remove members.
6706 (dwarf2_frame_cache): Call dwarf2_tailcall_sniffer_first.
6707 (dwarf2_frame_prev_register): Don't call
6708 dwarf2_tailcall_sniffer_first.
6709 (dwarf2_append_unwinders): Don't append tailcall unwinder.
6710 * frame-unwind.c (add_unwinder): New fuction.
6711 (frame_unwind_init): Use it. Add tailcall unwinder.
6712
6713 2020-03-03 Andrew Burgess <andrew.burgess@embecosm.com>
6714 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
6715
6716 * f-valprint.c (f_val_print): Handle TYPE_CODE_BOOL, any non-zero
6717 value should be printed as true.
6718
6719 2020-03-03 Hannes Domani <ssbssa@yahoo.de>
6720
6721 * windows-tdep.c (windows_solib_create_inferior_hook): New function.
6722 (windows_init_abi): Set and use windows_so_ops.
6723
6724 2020-03-03 Sergio Durigan Junior <sergiodj@redhat.com>
6725
6726 * printcmd.c (print_c_string): Check also for TYPE_CODE_PTR
6727 when verifying if dealing with a convenience variable.
6728
6729 2020-03-03 Luis Machado <luis.machado@linaro.org>
6730
6731 * auxv.c (default_print_auxv_entry): Add new AUXV entries.
6732
6733 2020-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6734
6735 * infrun.c (gdbarch_supports_displaced_stepping): New.
6736 (use_displaced_stepping): Break up conditions in smaller pieces.
6737 Use gdbarch_supports_displaced_stepping.
6738 (displaced_step_prepare_throw): Use
6739 gdbarch_supports_displaced_stepping.
6740
6741 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
6742
6743 * NEWS: Mention new behaviour of the history filename.
6744 * top.c (write_history_p): Add comment.
6745 (show_write_history_p): Add header comment, give a different
6746 message when history writing is on, but the history filename is
6747 empty.
6748 (history_filename): Add comment.
6749 (history_filename_empty): New function.
6750 (show_history_filename): Add header comment, give a different
6751 message when the filename is empty.
6752 (init_history): Compare history_filename against nullptr, and only
6753 read history if the filename is not empty.
6754 (set_history_filename): Add header comment, and only make
6755 non-empty filenames absolute.
6756 (init_main): Make the filename argument to 'set history filename'
6757 optional.
6758
6759 2020-03-02 Christian Biesinger <cbiesinger@google.com>
6760
6761 * arm-nbsd-nat.c (arm_supply_fparegset): Rename to...
6762 (arm_supply_vfpregset): ...this, and update to use VFP registers.
6763 (fetch_fp_register): Update.
6764 (fetch_fp_regs): Update.
6765 (store_fp_register): Update.
6766 (store_fp_regs): Update.
6767 (arm_netbsd_nat_target::read_description): New function.
6768 (fetch_elfcore_registers): Update.
6769
6770 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
6771
6772 * remote.c (remote_target::remote_parse_stop_reply): Don't use the
6773 general_thread if the stop reply is missing a thread-id.
6774 (remote_target::process_stop_reply): Use the first non-exited
6775 thread if the target didn't pass a thread-id.
6776 * infrun.c (do_target_wait): Move call to
6777 switch_to_inferior_no_thread to ....
6778 (do_target_wait_1): ... here.
6779
6780 2020-02-29 Jon Turney <jon.turney@dronecode.org.uk>
6781
6782 * debuginfod-support.c: Include defs.h first.
6783
6784 2020-02-28 Tom de Vries <tdevries@suse.de>
6785
6786 * symfile.c (set_initial_language): Use default language for lookup.
6787
6788 2020-02-28 Simon Marchi <simon.marchi@efficios.com>
6789
6790 * dwarf2/read.c (cutu_reader::init_tu_and_read_dwo_dies): Remove
6791 reader variable, pass `this` to read_cutu_die_from_dwo.
6792
6793 2020-02-27 Aaron Merey <amerey@redhat.com>
6794
6795 * source.c (open_source_file): Check for nullptr when computing
6796 srcpath.
6797
6798 2020-02-27 Tom Tromey <tromey@adacore.com>
6799
6800 * dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
6801 member.
6802 (dwarf2_add_field): Don't update nfields.
6803 (dwarf2_attach_fields_to_type, process_structure_scope): Update.
6804
6805 2020-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
6806
6807 * gdbtypes.c (create_array_type_with_stride): Use std::abs not
6808 abs.
6809
6810 2020-02-26 Tom Tromey <tom@tromey.com>
6811
6812 * dwarf2/read.c (struct dwarf2_include_psymtab): New.
6813 (dwarf2_create_include_psymtab): Use dwarf2_include_psymtab.
6814 (dwarf2_psymtab::expand_psymtab, dwarf2_psymtab::readin_p)
6815 (dwarf2_psymtab::get_compunit_symtab): Remove null checks for
6816 per_cu_data.
6817
6818 2020-02-26 Tom Tromey <tom@tromey.com>
6819
6820 * dwarf2/index-write.c (psym_index_map): Change type.
6821 (add_address_entry_worker, write_one_signatured_type)
6822 (recursively_count_psymbols, recursively_write_psymbols)
6823 (class debug_names, psyms_seen_size, write_gdbindex)
6824 (write_debug_names): Use partial_symtab, not dwarf2_psymtab.
6825
6826 2020-02-26 Aaron Merey <amerey@redhat.com>
6827
6828 * Makefile.in: Handle optional debuginfod support.
6829 * NEWS: Update.
6830 * README: Add --with-debuginfod summary.
6831 * config.in: Regenerate.
6832 * configure: Regenerate.
6833 * configure.ac: Handle optional debuginfod support.
6834 * debuginfod-support.c: debuginfod helper functions.
6835 * debuginfod-support.h: Ditto.
6836 * doc/gdb.texinfo: Add --with-debuginfod to configure options
6837 summary.
6838 * dwarf2/read.c (dwarf2_get_dwz_file): Query debuginfod servers
6839 when a dwz file cannot be found.
6840 * elfread.c (elf_symfile_read): Query debuginfod servers when a
6841 debuginfo file cannot be found.
6842 * source.c (open_source_file): Query debuginfod servers when a
6843 source file cannot be found.
6844 * top.c (print_gdb_configuration): Include
6845 --{with,without}-debuginfod in the output.
6846
6847 2020-02-26 Jérémie Galarneau <jeremie.galarneau@efficios.com>
6848
6849 * thread.c (thr_try_catch_cmd): Print thread name.
6850
6851 2020-02-26 Simon Marchi <simon.marchi@efficios.com>
6852
6853 * dwarf2/loc.h (dwarf2_fetch_die_loc_sect_off,
6854 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
6855 dwarf2_fetch_die_type_sect_off): Move to...
6856 * dwarf2/read.h (dwarf2_fetch_die_loc_sect_off,
6857 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
6858 dwarf2_fetch_die_type_sect_off): ... here.
6859 * dwarf2/read.c (dwarf2_fetch_die_loc_sect_off,
6860 dwarf2_fetch_die_loc_cu_off, dwarf2_fetch_constant_bytes,
6861 dwarf2_fetch_die_type_sect_off): Move doc to header file.
6862
6863 2020-02-26 Tom de Vries <tdevries@suse.de>
6864
6865 PR gdb/25603
6866 * symfile.c (set_initial_language): Exit-early if
6867 language_mode == language_mode_manual.
6868
6869 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
6870
6871 * dwarf2/loc.h (dwarf2_read_addr_index): Move...
6872 * dwarf2/read.h (dwarf2_read_addr_index): ... here.
6873 * dwarf2/read.c (dwarf2_read_addr_index): Move doc to header.
6874
6875 2020-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
6876
6877 * gdbtypes.c (create_array_type_with_stride): Handle negative
6878 array strides.
6879 * valarith.c (value_subscripted_rvalue): Likewise.
6880
6881 2020-02-25 Luis Machado <luis.machado@linaro.org>
6882
6883 * aarch64-tdep.c (aarch64_vnv_type): Fix comment typo.
6884
6885 2020-02-25 Simon Marchi <simon.marchi@polymtl.ca>
6886
6887 * loc.h (dwarf2_get_die_type): Move to...
6888 * read.h (dwarf2_get_die_type): ... here.
6889 * read.c (dwarf2_get_die_type): Move doc to header.
6890
6891 2020-02-25 Joel Brobecker <brobecker@adacore.com>
6892
6893 * copypright.py (EXCLUDE_LIST): Add 'gnulib/config.in' and
6894 'gnulib/Makefile.in' to the list.
6895
6896 2020-02-24 Tom Tromey <tom@tromey.com>
6897
6898 * dwarf2/read.h (struct type_unit_unshareable) <num_symtabs>:
6899 Remove.
6900 * dwarf2/read.c (dwarf2_cu::setup_type_unit_groups): Use
6901 XOBNEWVEC.
6902
6903 2020-02-24 Tom Tromey <tom@tromey.com>
6904
6905 * dwarf2/read.h (struct dwarf2_per_cu_data) <type_unit_group_p>:
6906 New method.
6907 * dwarf2/read.c (IS_TYPE_UNIT_GROUP): Remove.
6908 (dw2_do_instantiate_symtab, dw2_get_file_names)
6909 (build_type_psymtab_dependencies, load_full_type_unit): Update.
6910
6911 2020-02-24 Tom Tromey <tom@tromey.com>
6912
6913 * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
6914 make_scoped_restore.
6915 (dwarf2_psymtab::read_symtab): Don't clear
6916 reading_partial_symbols.
6917
6918 2020-02-24 Tom de Vries <tdevries@suse.de>
6919
6920 PR gdb/25592
6921 * stack.c (iterate_over_block_locals): Handle LOC_CONST.
6922
6923 2020-02-24 Tom de Vries <tdevries@suse.de>
6924
6925 * tui/tui-layout.c (_initialize_tui_layout): Fix help messages for
6926 commands layout next/prev/regs.
6927
6928 2020-02-22 Tom Tromey <tom@tromey.com>
6929
6930 * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare.
6931 * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static.
6932
6933 2020-02-22 Tom Tromey <tom@tromey.com>
6934
6935 * tui/tui-data.h (TUI_DISASM_WIN): Cast to tui_disasm_window.
6936
6937 2020-02-22 Tom Tromey <tom@tromey.com>
6938
6939 * tui/tui-win.c (_initialize_tui_win): Add usage text.
6940 * tui/tui-stack.c (_initialize_tui_stack): Add usage text.
6941 * tui/tui-regs.c (_initialize_tui_regs): Add usage text.
6942 * tui/tui.c (_initialize_tui): Add usage text.
6943
6944 2020-02-22 Tom Tromey <tom@tromey.com>
6945
6946 * tui/tui-win.c (tui_set_focus_command)
6947 (tui_set_win_height_command): Use error_no_arg.
6948 (_initialize_tui_win): Update help text.
6949 (FOCUS_USAGE, WIN_HEIGHT_USAGE): Don't define.
6950
6951 2020-02-22 Tom Tromey <tom@tromey.com>
6952
6953 * tui/tui-layout.c (extract_display_start_addr): Rewrite.
6954 * tui/tui-disasm.h (struct tui_disasm_window)
6955 <display_start_addr>: Declare.
6956 * tui/tui-source.h (struct tui_source_window)
6957 <display_start_addr>: Declare.
6958 * tui/tui-winsource.h (struct tui_source_window_base)
6959 <show_source_line, display_start_addr>: New methods.
6960 <m_horizontal_offset, m_start_line_or_addr, m_gdbarch, m_content>:
6961 Rename and move to protected section.
6962 * tui/tui-winsource.c (tui_source_window_base::update_source_window)
6963 (tui_source_window_base::do_erase_source_content): Update.
6964 (tui_source_window_base::show_source_line): Now a method.
6965 (tui_source_window_base::show_source_content)
6966 (tui_source_window_base::tui_source_window_base)
6967 (tui_source_window_base::rerender)
6968 (tui_source_window_base::refill)
6969 (tui_source_window_base::do_scroll_horizontal)
6970 (tui_source_window_base::set_is_exec_point_at)
6971 (tui_source_window_base::update_breakpoint_info)
6972 (tui_source_window_base::update_exec_info): Update.
6973 * tui/tui-source.c (tui_source_window::set_contents)
6974 (tui_source_window::showing_source_p)
6975 (tui_source_window::do_scroll_vertical)
6976 (tui_source_window::location_matches_p)
6977 (tui_source_window::line_is_displayed): Update.
6978 (tui_source_window::display_start_addr): New method.
6979 * tui/tui-disasm.c (tui_disasm_window::set_contents)
6980 (tui_disasm_window::do_scroll_vertical)
6981 (tui_disasm_window::location_matches_p): Update.
6982 (tui_disasm_window::display_start_addr): New method.
6983
6984 2020-02-22 Tom Tromey <tom@tromey.com>
6985
6986 * NEWS: Add entry for gdb.register_window_type.
6987 * tui/tui-layout.h (window_factory): New typedef.
6988 (tui_register_window): Declare.
6989 * tui/tui-layout.c (saved_tui_windows): New global.
6990 (tui_apply_current_layout): Use it.
6991 (tui_register_window): New function.
6992 * python/python.c (do_start_initialization): Call
6993 gdbpy_initialize_tui.
6994 (python_GdbMethods): Add "register_window_type" function.
6995 * python/python-internal.h (gdbpy_register_tui_window)
6996 (gdbpy_initialize_tui): Declare.
6997 * python/py-tui.c: New file.
6998 * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c.
6999
7000 2020-02-22 Tom Tromey <tom@tromey.com>
7001
7002 * tui/tui-io.c (do_tui_putc): Don't omit annotations.
7003
7004 2020-02-22 Tom Tromey <tom@tromey.com>
7005
7006 * tui/tui-win.c (tui_set_win_focus_to): Move to tui-data.c.
7007 * tui/tui-data.h (tui_set_win_with_focus): Don't declare.
7008 * tui/tui-data.c (tui_set_win_with_focus): Remove.
7009 (tui_set_win_focus_to): Move from tui-win.c.
7010
7011 2020-02-22 Tom Tromey <tom@tromey.com>
7012
7013 * tui/tui-layout.c (make_standard_window, get_locator_window): New
7014 functions.
7015 (known_window_types): New global.
7016 (tui_get_window_by_name): Reimplement.
7017 (initialize_known_windows): New function.
7018 (validate_window_name): Rewrite.
7019 (_initialize_tui_layout): Call initialize_known_windows.
7020
7021 2020-02-22 Tom Tromey <tom@tromey.com>
7022
7023 * tui/tui.h (enum tui_win_type) <LOCATOR_WIN, DATA_ITEM_WIN>:
7024 Remove constants.
7025 * tui/tui-winsource.h (struct tui_source_window_base)
7026 <tui_source_window_base>: Remove parameter.
7027 * tui/tui-winsource.c
7028 (tui_source_window_base::tui_source_window_base): Remove
7029 parameter.
7030 (tui_source_window_base::refill): Update.
7031 * tui/tui-stack.h (struct tui_locator_window)
7032 <tui_locator_window>: Update.
7033 * tui/tui-source.h (struct tui_source_window) <tui_source_window>:
7034 Default the constructor.
7035 * tui/tui-regs.h (struct tui_data_item_window)
7036 <tui_data_item_window>: Default the constructor.
7037 (struct tui_data_window) <tui_data_window>: Likewise.
7038 * tui/tui-disasm.h (struct tui_disasm_window) <tui_disasm_window>:
7039 Default the constructor.
7040 * tui/tui-data.h (struct tui_gen_win_info) <tui_gen_win_info>:
7041 Default the constructor.
7042 <type>: Remove.
7043 (struct tui_win_info) <tui_win_info>: Default the constructor.
7044 * tui/tui-data.c (tui_win_info::tui_win_info): Remove.
7045 * tui/tui-command.h (struct tui_cmd_window) <tui_cmd_window>:
7046 Default the constructor.
7047
7048 2020-02-22 Tom Tromey <tom@tromey.com>
7049
7050 * tui/tui-wingeneral.h (tui_make_all_invisible): Don't declare.
7051 * tui/tui-wingeneral.c (tui_make_all_invisible): Remove.
7052 * tui/tui-win.c (tui_resize_all): Don't call
7053 tui_delete_invisible_windows.
7054 * tui/tui-layout.c (tui_apply_current_layout): Delete windows when
7055 done.
7056 (tui_set_layout): Update.
7057 (tui_add_win_to_layout): Don't call tui_delete_invisible_windows.
7058 * tui/tui-data.h (tui_delete_invisible_windows): Don't declare.
7059 * tui/tui-data.c (tui_delete_invisible_windows): Remove.
7060
7061 2020-02-22 Tom Tromey <tom@tromey.com>
7062
7063 * tui/tui-win.c (tui_partial_win_by_name): Handle ambiguity
7064 correctly.
7065
7066 2020-02-22 Tom Tromey <tom@tromey.com>
7067
7068 * tui/tui-data.c (tui_next_win, tui_prev_win): Reimplement.
7069
7070 2020-02-22 Tom Tromey <tom@tromey.com>
7071
7072 * tui/tui-winsource.h (struct tui_source_window_iterator)
7073 <inner_iterator>: New etytypedef.
7074 <tui_source_window_iterator>: Take "end" parameter.
7075 <tui_source_window_iterator>: Take iterator.
7076 <operator*, advance>: Update.
7077 <m_iter>: Change type.
7078 <m_end>: New field.
7079 (struct tui_source_windows) <begin, end>: Update.
7080 * tui/tui-layout.c (tui_windows): New global.
7081 (tui_apply_current_layout): Clear tui_windows.
7082 (tui_layout_window::apply): Update tui_windows.
7083 * tui/tui-data.h (tui_windows): Declare.
7084 (all_tui_windows): Now inline function.
7085 (class tui_window_iterator, struct all_tui_windows): Remove.
7086
7087 2020-02-22 Tom Tromey <tom@tromey.com>
7088
7089 PR tui/17850:
7090 * tui/tui-win.c (tui_gen_win_info::max_width): New method.
7091 * tui/tui-layout.h (class tui_layout_base) <get_sizes>: Add
7092 "height" argument.
7093 (class tui_layout_window) <get_sizes>: Likewise.
7094 (class tui_layout_split) <tui_layout_split>: Add "vertical"
7095 argument.
7096 <get_sizes>: Add "height" argument.
7097 <m_vertical>: New field.
7098 * tui/tui-layout.c (tui_layout_split::clone): Update.
7099 (tui_layout_split::get_sizes): Add "height" argument.
7100 (tui_layout_split::adjust_size, tui_layout_split::apply): Update.
7101 (tui_new_layout_command): Parse "-horizontal".
7102 (_initialize_tui_layout): Update help string.
7103 (tui_layout_split::specification): Add "-horizontal" when needed.
7104 * tui/tui-layout.c (tui_layout_window::get_sizes): Add "height"
7105 argument.
7106 * tui/tui-data.h (struct tui_gen_win_info) <max_width, min_width>:
7107 New methods.
7108
7109 2020-02-22 Tom Tromey <tom@tromey.com>
7110
7111 * tui/tui-layout.h (enum tui_adjust_result): New.
7112 (class tui_layout_base) <adjust_size>: Return tui_adjust_result.
7113 (class tui_layout_window) <adjust_size>: Return
7114 tui_adjust_result. Rewrite.
7115 (class tui_layout_split) <adjust_size>: Return tui_adjust_result.
7116 * tui/tui-layout.c (tui_layout_split::adjust_size): Update.
7117
7118 2020-02-22 Tom Tromey <tom@tromey.com>
7119
7120 * tui/tui-layout.h (class tui_layout_split) <add_split>: Change
7121 parameter and return types.
7122 (class tui_layout_base) <specification>: Add "depth".
7123 (class tui_layout_window) <specification>: Add "depth".
7124 (class tui_layout_split) <specification>: Add "depth".
7125 * tui/tui-layout.c (tui_layout_split::add_split): Change parameter
7126 and return types.
7127 (tui_new_layout_command): Parse sub-layouts.
7128 (_initialize_tui_layout): Update help string.
7129 (tui_layout_window::specification): Add "depth".
7130 (add_layout_command): Update.
7131
7132 2020-02-22 Tom Tromey <tom@tromey.com>
7133
7134 * NEWS: Add "tui new-layout" item.
7135 * tui/tui-layout.c (add_layout_command): Return cmd_list_element.
7136 Add new-layout command to help text.
7137 (validate_window_name): New function.
7138 (tui_new_layout_command): New function.
7139 (_initialize_tui_layout): Register "new-layout".
7140 (tui_layout_window::specification): New method.
7141 (tui_layout_window::specification): New method.
7142 * tui/tui-layout.h (class tui_layout_base) <specification>: New
7143 method.
7144 (class tui_layout_window) <specification>: New method.
7145 (class tui_layout_split) <specification>: New method.
7146
7147 2020-02-22 Tom Tromey <tom@tromey.com>
7148
7149 * tui/tui.c (tui_enable): Call tui_set_initial_layout.
7150 * tui/tui-win.c (window_name_completer): Update comment.
7151 * tui/tui-layout.h (class tui_layout_base) <replace_window>:
7152 Declare method.
7153 (class tui_layout_window) <replace_window>: Likewise.
7154 (class tui_layout_split) <replace_window>: Likewise.
7155 (tui_set_layout): Don't declare.
7156 (tui_set_initial_layout): Declare function.
7157 * tui/tui-layout.c (layouts, applied_skeleton, src_regs_layout)
7158 (asm_regs_layout): New globals.
7159 (tui_current_layout, show_layout): Remove.
7160 (tui_set_layout, tui_add_win_to_layout): Rewrite.
7161 (find_layout, tui_apply_layout): New function.
7162 (layout_completer): Remove.
7163 (tui_next_layout): Reimplement.
7164 (tui_next_layout_command): New function.
7165 (tui_set_initial_layout, tui_prev_layout_command): New functions.
7166 (tui_regs_layout): Reimplement.
7167 (tui_regs_layout_command): New function.
7168 (extract_display_start_addr): Rewrite.
7169 (next_layout, prev_layout): Remove.
7170 (tui_layout_window::replace_window): New method.
7171 (tui_layout_split::replace_window): New method.
7172 (destroy_layout): New function.
7173 (layout_list): New global.
7174 (add_layout_command): New function.
7175 (initialize_layouts): Update.
7176 (tui_layout_command): New function.
7177 (_initialize_tui_layout): Install "layout" commands.
7178 * tui/tui-data.h (enum tui_layout_type): Remove.
7179 (tui_current_layout): Don't declare.
7180
7181 2020-02-22 Tom Tromey <tom@tromey.com>
7182
7183 * tui/tui-regs.c (tui_reg_layout): Remove.
7184 (tui_reg_command): Use tui_regs_layout.
7185 * tui/tui-layout.h (tui_reg_command): Declare.
7186 * tui/tui-layout.c (tui_reg_command): New function.
7187
7188 2020-02-22 Tom Tromey <tom@tromey.com>
7189
7190 * tui/tui.c (tui_rl_delete_other_windows): Call
7191 tui_remove_some_windows.
7192 * tui/tui-layout.h (class tui_layout_base) <remove_windows>:
7193 Declare method.
7194 (class tui_layout_window) <remove_windows>: New method.
7195 (class tui_layout_split) <remove_windows>: Declare.
7196 (tui_remove_some_windows): Declare.
7197 * tui/tui-layout.c (tui_remove_some_windows): New function.
7198 (tui_layout_split::remove_windows): New method.
7199
7200 2020-02-22 Tom Tromey <tom@tromey.com>
7201
7202 * tui/tui.c (tui_rl_change_windows): Call tui_next_layout.
7203 * tui/tui-layout.h (tui_next_layout): Declare.
7204 * tui/tui-layout.c (tui_next_layout): New function.
7205
7206 2020-02-22 Tom Tromey <tom@tromey.com>
7207
7208 * tui/tui-regs.c (tui_data_window::display_registers_from): Use
7209 correct coordinates.
7210
7211 2020-02-22 Tom Tromey <tom@tromey.com>
7212
7213 * tui/tui-layout.h (tui_add_win_to_layout): Add comment.
7214 * tui/tui-layout.c (tui_add_win_to_layout): Add assert. Remove
7215 DATA_WIN case.
7216
7217 2020-02-22 Tom Tromey <tom@tromey.com>
7218
7219 * tui/tui-disasm.c (tui_get_low_disassembly_address): Use
7220 TUI_DISASM_WIN, not tui_win_list.
7221
7222 2020-02-22 Tom Tromey <tom@tromey.com>
7223
7224 * valprint.c (generic_val_print_enum_1)
7225 (val_print_type_code_flags): Style member names.
7226 * rust-lang.c (val_print_struct, rust_print_enum)
7227 (rust_print_struct_def, rust_internal_print_type): Style member
7228 names.
7229 * p-valprint.c (pascal_object_print_value_fields): Style member
7230 names. Only call fprintf_symbol_filtered for static members.
7231 * m2-typeprint.c (m2_record_fields, m2_enum): Style member names.
7232 * f-valprint.c (f_val_print): Style member names.
7233 * f-typeprint.c (f_type_print_base): Style member names.
7234 * cp-valprint.c (cp_print_value_fields): Style member names. Only
7235 call fprintf_symbol_filtered for static members.
7236 (cp_print_class_member): Style member names.
7237 * c-typeprint.c (c_print_type_1, c_type_print_base_1): Style
7238 member names.
7239 * ada-valprint.c (ada_print_scalar): Style enum names.
7240 (ada_val_print_enum): Likewise.
7241 * ada-typeprint.c (print_enum_type): Style enum names.
7242
7243 2020-02-21 Tom Tromey <tom@tromey.com>
7244
7245 * psympriv.h (struct partial_symtab): Update comment.
7246
7247 2020-02-21 Tom Tromey <tromey@adacore.com>
7248
7249 * mips-tdep.h (mips_pc_is_mips16, mips_pc_is_micromips): Parameter
7250 type is CORE_ADDR.
7251
7252 2020-02-21 Tom de Vries <tdevries@suse.de>
7253
7254 PR gdb/25534
7255 * psymtab.c (partial_symtab::read_dependencies): Don't read dependency
7256 if dependencies[i]->user != NULL.
7257
7258 2020-02-21 Ali Tamur <tamur@google.com>
7259
7260 * dwarf2/read.c (dwarf2_name): Add null check.
7261
7262 2020-02-20 Tom Tromey <tom@tromey.com>
7263
7264 * dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
7265 ">=", in binary search.
7266 (dwarf2_find_containing_comp_unit): New overload.
7267 (run_test): New self-test.
7268 (_initialize_dwarf2_read): Register new test.
7269
7270 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
7271
7272 * riscv-tdep.c: Updated since the DECLARE_CSR is changed.
7273 * riscv-tdep.h: Likewise.
7274 * features/riscv/rebuild-csr-xml.sh: Generate the 64bit-csr.xml without
7275 rv32-only CSR.
7276 * features/riscv/64bit-csr.xml: Regenerated.
7277
7278 2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
7279 Tom Tromey <tom@tromey.com>
7280
7281 * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
7282 of 'fputc_unfiltered'.
7283 (putchar_unfiltered): Call 'fputc_unfiltered'.
7284 (fputc_unfiltered): Call 'fputs_unfiltered'.
7285
7286 2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
7287
7288 * config.in: Regenerate.
7289 * configure: Regenerate.
7290 * configure.ac: Add --with-python-libdir option.
7291 * main.c: Use WITH_PYTHON_LIBDIR.
7292
7293 2020-02-19 Tom Tromey <tom@tromey.com>
7294
7295 * symtab.c (general_symbol_info::compute_and_set_names): Use
7296 obstack_strndup. Simplify call to symbol_set_demangled_name.
7297
7298 2020-02-19 Simon Marchi <simon.marchi@efficios.com>
7299
7300 * dwarf2/read.c (allocate_signatured_type_table,
7301 allocate_dwo_unit_table, allocate_type_unit_groups_table,
7302 allocate_dwo_file_hash_table, allocate_dwp_loaded_cutus_table):
7303 Remove objfile parameter, update all callers.
7304
7305 2020-02-19 Doug Evans <dje@google.com>
7306
7307 PR rust/25535
7308 * rust-lang.c (rust_print_enum): Apply embedded_offset to
7309 rust_enum_variant calculation.
7310
7311 2020-02-19 Tom Tromey <tromey@adacore.com>
7312
7313 * mips-tdep.h (mips_pc_is_mips): Parameter type is CORE_ADDR.
7314
7315 2020-02-19 Tom Tromey <tromey@adacore.com>
7316
7317 * ada-lang.c (cache_symbol): Use obstack_strdup.
7318
7319 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
7320
7321 * configure: Regenerate.
7322
7323 2020-02-19 Tom Tromey <tromey@adacore.com>
7324
7325 * python/python.c (do_start_initialization): Use XNEWVEC. Remove
7326 NULL check.
7327
7328 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
7329
7330 * NEWS: Mention RISC-V GNU/Linux GDBserver support.
7331
7332 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
7333
7334 * arch/riscv.c (struct riscv_gdbarch_features_hasher): Only define
7335 if GDBSERVER is not defined.
7336 (riscv_tdesc_cache): Likewise, also store const target_desc.
7337 (STATIC_IN_GDB): Define.
7338 (riscv_create_target_description): Update declaration with
7339 STATIC_IN_GDB.
7340 (riscv_lookup_target_description): New function, only define if
7341 GDBSERVER is not defined.
7342 * arch/riscv.h (riscv_create_target_description): Declare only
7343 when GDBSERVER is defined.
7344 (riscv_lookup_target_description): New declaration when GDBSERVER
7345 is not defined.
7346 * nat/riscv-linux-tdesc.c (riscv_linux_read_description): Rename to...
7347 (riscv_linux_read_features): ...this, and return
7348 riscv_gdbarch_features instead of target_desc.
7349 * nat/riscv-linux-tdesc.h: Include 'arch/riscv.h'.
7350 (riscv_linux_read_description): Rename to...
7351 (riscv_linux_read_features): ...this.
7352 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
7353 Update to use riscv_gdbarch_features and
7354 riscv_lookup_target_description.
7355 * riscv-tdep.c (riscv_find_default_target_description): Use
7356 riscv_lookup_target_description instead of
7357 riscv_create_target_description.
7358
7359 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7360
7361 * valprint.c (generic_val_print_enum_1): When printing a flag
7362 enum with value 0 and there is no enumerator with value 0, print
7363 just "0" instead of "(unknown: 0x0)".
7364
7365 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7366
7367 * valprint.c (generic_val_print_enum_1): Print unknown part of
7368 flag enum in hex.
7369
7370 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7371
7372 * dwarf2/read.c (update_enumeration_type_from_children): Allow
7373 flag enums to contain duplicate enumerators.
7374 * valprint.c (generic_val_print_enum_1): Update comment.
7375
7376 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7377
7378 * dwarf2/read.c: Include "count-one-bits.h".
7379 (update_enumeration_type_from_children): If an enumerator has
7380 multiple bits set, don't treat the enumeration as a "flag enum".
7381 * valprint.c (generic_val_print_enum_1): Assert that enumerators
7382 of flag enums have 0 or 1 bit set.
7383
7384 2020-02-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
7385
7386 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use an explicit
7387 conversion.
7388 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
7389 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
7390 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
7391 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
7392 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
7393
7394 2020-02-18 Simon Marchi <simon.marchi@efficios.com>
7395
7396 * MAINTAINERS: Change palmer@sifive.com to palmer@dabbelt.com.
7397
7398 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
7399
7400 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use
7401 displaced_step_closure_up.
7402 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
7403 (struct displaced_step_closure_up):
7404 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
7405 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
7406 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn):
7407 Likewise.
7408 * gdbarch.sh (displaced_step_copy_insn): Likewise.
7409 * gdbarch.c, gdbarch.h: Re-generate.
7410 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use
7411 displaced_step_closure_up.
7412 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
7413 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
7414 * infrun.h (displaced_step_closure_up): New type alias.
7415 (struct displaced_step_inferior_state) <step_closure>: Change
7416 type to displaced_step_closure_up.
7417 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use
7418 displaced_step_closure_up.
7419 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
7420
7421 2020-02-14 Tom Tromey <tom@tromey.com>
7422
7423 * minidebug.c (gnu_debug_key): New global.
7424 (find_separate_debug_file_in_section): Use it.
7425
7426 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
7427
7428 * gdbarch.sh (displaced_step_copy_insn): Change return type to an
7429 std::unique_ptr.
7430 * gdbarch.c: Re-generate.
7431 * gdbarch.h: Re-generate.
7432 * infrun.c (displaced_step_prepare_throw): Adjust to std::unique_ptr
7433 change.
7434 * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Change return
7435 type to std::unique_ptr.
7436 * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise.
7437 * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise.
7438 * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise.
7439 * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise.
7440 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Likewise.
7441 * i386-tdep.c (i386_displaced_step_copy_insn): Likewise.
7442 * i386-tdep.h (i386_displaced_step_copy_insn): Likewise.
7443 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Likewise.
7444 * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
7445
7446 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
7447
7448 * infrun.c (get_displaced_step_closure_by_addr): Adjust to
7449 std::unique_ptr.
7450 (displaced_step_clear): Rename to...
7451 (displaced_step_reset): ... this. Just call displaced->reset ().
7452 (displaced_step_clear_cleanup): Rename to...
7453 (displaced_step_reset_cleanup): ... this.
7454 (displaced_step_prepare_throw): Adjust to std::unique_ptr.
7455 (displaced_step_fixup): Likewise.
7456 (resume_1): Likewise.
7457 (handle_inferior_event): Restore child's memory before calling
7458 displaced_step_fixup on the parent.
7459 * infrun.h (displaced_step_inferior_state) <reset>: Adjust
7460 to std::unique_ptr.
7461 <step_closure>: Change type to std::unique_ptr.
7462
7463 2020-02-14 Simon Marchi <simon.marchi@efficios.com>
7464
7465 * arm-tdep.c: Include count-one-bits.h.
7466 (cleanup_block_store_pc): Use count_one_bits.
7467 (cleanup_block_load_pc): Use count_one_bits.
7468 (arm_copy_block_xfer): Use count_one_bits.
7469 (thumb2_copy_block_xfer): Use count_one_bits.
7470 (thumb_copy_pop_pc_16bit): Use count_one_bits.
7471 * arch/arm-get-next-pcs.c: Include count-one-bits.h.
7472 (thumb_get_next_pcs_raw): Use count_one_bits.
7473 (arm_get_next_pcs_raw): Use count_one_bits_l.
7474 * arch/arm.c (bitcount): Remove.
7475 * arch/arm.h (bitcount): Remove.
7476
7477 2020-02-14 Tom Tromey <tromey@adacore.com>
7478
7479 * dwarf2/frame-tailcall.c (dwarf2_tailcall_sniffer_first):
7480 Update.
7481 * dwarf2/loc.h (call_site_find_chain): Return unique_xmalloc_ptr.
7482 * dwarf2/loc.c (call_site_find_chain_1): Return
7483 unique_xmalloc_ptr.
7484 (call_site_find_chain): Likewise.
7485
7486 2020-02-14 Richard Biener <rguenther@suse.de>
7487
7488 * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
7489 on expression with division operators.
7490
7491 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
7492
7493 * MAINTAINERS (Write After Approval): Adding myself.
7494
7495 2020-02-12 Tom Tromey <tom@tromey.com>
7496
7497 * event-loop.c (event_data, gdb_event, event_handler_func):
7498 Remove.
7499
7500 2020-02-12 Tom Tromey <tom@tromey.com>
7501
7502 * dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
7503 (dwarf2_frame_objfile_data): Add comment.
7504 (find_comp_unit, set_comp_unit): New functions.
7505 (dwarf2_frame_find_fde): Use find_comp_unit.
7506 (dwarf2_build_frame_info): Use set_comp_unit.
7507
7508 2020-02-12 Tom Tromey <tom@tromey.com>
7509
7510 * dwarf2/frame.c (struct comp_unit) <objfile>: Remove.
7511 (comp_unit): Don't initialize objfile.
7512 (execute_cfa_program): Add text_offset parameter.
7513 (execute_cfa_program_test, dwarf2_fetch_cfa_info)
7514 (dwarf2_frame_cache): Update.
7515 (dwarf2_build_frame_info): Don't set "objfile" member.
7516
7517 2020-02-12 Tom Tromey <tom@tromey.com>
7518
7519 * dwarf2/frame.c (decode_frame_entry_1): Add gdbarch parameter.
7520 (decode_frame_entry): Likewise.
7521 (dwarf2_build_frame_info): Update.
7522
7523 2020-02-12 Tom Tromey <tom@tromey.com>
7524
7525 * dwarf2/frame.c (struct comp_unit) <obstack>: New member.
7526 (decode_frame_entry_1): Use the comp_unit obstack.
7527
7528 2020-02-12 Tom Tromey <tom@tromey.com>
7529
7530 * dwarf2/frame.c (struct comp_unit): Add initializers and
7531 constructor.
7532 (dwarf2_frame_objfile_data): Store a comp_unit.
7533 (dwarf2_frame_find_fde): Update.
7534 (dwarf2_build_frame_info): Use "new".
7535
7536 2020-02-12 Tom Tromey <tom@tromey.com>
7537
7538 * dwarf2/frame.c (struct dwarf2_fde_table): Remove.
7539 (dwarf2_fde_table): Typedef for std::vector.
7540 (dwarf2_frame_objfile_data): Remove the deleter. Now static.
7541 (dwarf2_frame_find_fde, add_fde, decode_frame_entry_1)
7542 (decode_frame_entry): Update.
7543 (dwarf2_build_frame_info): Use "new".
7544
7545 2020-02-12 Christian Biesinger <cbiesinger@google.com>
7546
7547 * arm-tdep.c (arm_gdbarch_init): Update.
7548 * arm-tdep.h (struct gdbarch_tdep) <have_fpa_registers,
7549 have_wmmx_registers, have_vfp_pseudos, have_neon_pseudos,
7550 have_neon, is_m>: Change to bool.
7551
7552 2020-02-12 Christian Biesinger <cbiesinger@google.com>
7553
7554 * arm-tdep.c (arm_dump_tdep): Print more fields of tdep.
7555
7556 2020-02-12 Tom Tromey <tom@tromey.com>
7557
7558 * dwarf2/loc.c (struct dwarf_expr_baton): Remove.
7559
7560 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
7561
7562 * windows-tdep.c (struct windows_gdbarch_data): Add tib_ptr_type.
7563 (windows_get_tlb_type): Use windows_gdbarch_data->tib_ptr_type.
7564
7565 2020-02-11 Tom Tromey <tom@tromey.com>
7566
7567 * psymtab.h: Update comment.
7568
7569 2020-02-11 Tom Tromey <tom@tromey.com>
7570
7571 * gdb_obstack.h (struct auto_obstack): Use
7572 DISABLE_COPY_AND_ASSIGN.
7573
7574 2020-02-11 Tom Tromey <tom@tromey.com>
7575
7576 * dwarf2/frame.h (struct objfile): Don't forward declare.
7577
7578 2020-02-11 Christian Biesinger <cbiesinger@google.com>
7579
7580 * cris-tdep.c (cris_supply_gregset): Change signature to match
7581 what struct regset expects.
7582 (cris_regset): New struct.
7583 (fetch_core_registers): Remove.
7584 (cris_iterate_over_regset_sections): New function.
7585 (_initialize_cris_tdep): Don't call deprecated_add_core_fns.
7586 (cris_gdbarch_init): Call set_gdbarch_iterate_over_regset_sections.
7587
7588 2020-02-11 Christian Biesinger <cbiesinger@google.com>
7589
7590 * arch/arm.h (enum gdb_regnum): Add comment for the FP0..7
7591 registers.
7592
7593 2020-02-11 Christian Biesinger <cbiesinger@google.com>
7594
7595 * arm-tdep.c (arm_dump_tdep): Add \n in fprintf.
7596
7597 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
7598
7599 * configure: Re-generate.
7600
7601 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
7602
7603 * configure: Re-generate.
7604
7605 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
7606
7607 * acinclude: Update warning.m4 path.
7608 * warning.m4: Move to gdbsupport.
7609
7610 2020-02-11 Tom Tromey <tromey@adacore.com>
7611
7612 * remote.c (remote_console_output): Update.
7613 * printcmd.c (printf_command): Update.
7614 * event-loop.c (gdb_wait_for_event): Update.
7615 * linux-nat.c (sigchld_handler): Update.
7616 * remote-sim.c (gdb_os_write_stdout): Update.
7617 (gdb_os_flush_stdout): Update.
7618 (gdb_os_flush_stderr): Update.
7619 (gdb_os_write_stderr): Update.
7620 * exceptions.c (print_exception): Update.
7621 * remote-fileio.c (remote_fileio_func_read): Update.
7622 (remote_fileio_func_write): Update.
7623 * tui/tui.c (tui_enable): Update.
7624 * tui/tui-interp.c (tui_interp::init): Update.
7625 * utils.c (init_page_info): Update.
7626 (putchar_unfiltered, fputc_unfiltered): Update.
7627 (gdb_flush): Update.
7628 (emit_style_escape): Update.
7629 (flush_wrap_buffer, fputs_maybe_filtered): Update.
7630 * ui-file.c (ui_file_isatty, ui_file_read, ui_file_write)
7631 (ui_file_write_async_safe, ui_file_flush, ui_file_puts): Remove.
7632 (stderr_file::write): Update.
7633 (stderr_file::puts): Update.
7634 * ui-file.h (ui_file_isatty, ui_file_write)
7635 (ui_file_write_async_safe, ui_file_read, ui_file_flush)
7636 (ui_file_puts): Don't declare.
7637
7638 2020-02-10 Tom de Vries <tdevries@suse.de>
7639
7640 * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
7641 sentinel to char *.
7642
7643 2020-02-09 Tom de Vries <tdevries@suse.de>
7644
7645 * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
7646 filename if it matches "<artificial>".
7647
7648 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
7649
7650 * windows-tdep.c (struct enum_value_name): New struct.
7651 (create_enum): New function.
7652 (windows_get_siginfo_type): Create and use enum types.
7653
7654 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
7655
7656 * NEWS: Mention $_siginfo support for Windows.
7657 * windows-nat.c (handle_exception): Set siginfo_er.
7658 (windows_nat_target::mourn_inferior): Reset siginfo_er.
7659 (windows_xfer_siginfo): New function.
7660 (windows_nat_target::xfer_partial): Call windows_xfer_siginfo.
7661 * windows-tdep.c (struct windows_gdbarch_data): New struct.
7662 (init_windows_gdbarch_data): New function.
7663 (get_windows_gdbarch_data): New function.
7664 (windows_get_siginfo_type): New function.
7665 (windows_init_abi): Register windows_get_siginfo_type.
7666 (_initialize_windows_tdep): Register init_windows_gdbarch_data.
7667
7668 2020-02-08 Tom Tromey <tom@tromey.com>
7669
7670 * dwarf2/read.c (class cutu_reader) <cutu_reader,
7671 init_tu_and_read_dwo_dies>: Remove "keep" parameter.
7672 <keep>: Declare method.
7673 <m_keep>: Remove member.
7674 <~cutu_reader>: Remove.
7675 (cutu_reader::init_tu_and_read_dwo_dies): Update.
7676 (cutu_reader::cutu_reader): Update.
7677 (cutu_reader::keep): Rename from ~cutu_reader.
7678 (process_psymtab_comp_unit, build_type_psymtabs_1)
7679 (process_skeletonless_type_unit, load_partial_comp_unit)
7680 (load_full_comp_unit, dwarf2_read_addr_index)
7681 (read_signatured_type): Update.
7682
7683 2020-02-08 Tom Tromey <tom@tromey.com>
7684
7685 * dwarf2/read.c (process_psymtab_comp_unit_reader): Remove
7686 "want_partial_unit" parameter.
7687 (process_psymtab_comp_unit): Change want_partial_unit to bool.
7688 Inline check for DW_TAG_partial_unit.
7689 (dwarf2_build_psymtabs_hard, scan_partial_symbols): Update.
7690
7691 2020-02-08 Tom Tromey <tom@tromey.com>
7692
7693 * dwarf2/read.c (read_n_bytes, read_direct_string): Move to
7694 read.c.
7695 * dwarf2/leb.h (read_n_bytes, read_direct_string): Move from
7696 read.c.
7697
7698 2020-02-08 Tom Tromey <tom@tromey.com>
7699
7700 * dwarf2/read.c (read_address): Move to comp-unit.c.
7701 (dwarf2_rnglists_process, dwarf2_ranges_process)
7702 (read_attribute_value, dwarf_decode_lines_1)
7703 (var_decode_location, decode_locdesc): Update.
7704 * dwarf2/comp-unit.c (comp_unit_head::read_address): Move from
7705 read.c. Remove "cu" parameter.
7706 * dwarf2/comp-unit.h (struct comp_unit_head) <read_address>: New
7707 method.
7708
7709 2020-02-08 Tom Tromey <tom@tromey.com>
7710
7711 * dwarf2/read.c (read_attribute_value, read_indirect_string)
7712 (read_indirect_line_string): Update.
7713 * dwarf2/comp-unit.c (read_offset): Remove.
7714 (read_comp_unit_head): Update.
7715 * dwarf2/comp-unit.h (struct comp_unit_head) <read_offset>: New
7716 method.
7717 (read_offset): Don't declare.
7718
7719 2020-02-08 Tom Tromey <tom@tromey.com>
7720
7721 * Makefile.in (COMMON_SFILES): Add dwarf2/comp-unit.c.
7722 * dwarf2/read.c (struct comp_unit_head): Move to
7723 dwarf2/comp-unit.h.
7724 (enum class rcuh_kind): Move to comp-unit.h.
7725 (get_cu_length, offset_in_cu_p): Now methods on comp_unit_head.
7726 (read_comp_unit_head, error_check_comp_unit_head)
7727 (read_and_check_comp_unit_head): Move to comp-unit.c.
7728 (read_offset, dwarf_unit_type_name): Likewise.
7729 (create_debug_type_hash_table, read_cutu_die_from_dwo)
7730 (cutu_reader::cutu_reader, read_call_site_scope)
7731 (find_partial_die, follow_die_offset): Update.
7732 * dwarf2/comp-unit.h: New file, from dwarf2read.c.
7733
7734 2020-02-08 Tom Tromey <tom@tromey.com>
7735
7736 * dwarf2/read.c (read_offset_1): Move to leb.c.
7737 (read_abbrev_offset, read_offset, dwarf_decode_line_header)
7738 (dwarf_decode_macro_bytes): Update.
7739 * dwarf2/leb.c (read_offset): Rename; move from read.c.
7740 * dwarf2/leb.h (read_offset): Declare.
7741
7742 2020-02-08 Tom Tromey <tom@tromey.com>
7743
7744 * dwarf2/read.c (dwarf2_section_size): Remove.
7745 (error_check_comp_unit_head, dwarf2_symbol_mark_computed):
7746 Update.
7747 * dwarf2/section.h (struct dwarf2_section_info) <get_size>: New method.
7748
7749 2020-02-08 Tom Tromey <tom@tromey.com>
7750
7751 * dwarf2/read.c (read_initial_length): Move to leb.c.
7752 * dwarf2/leb.h (read_initial_length): Declare.
7753 * dwarf2/leb.c (read_initial_length): Move from read.c. Add
7754 handle_nonstd parameter.
7755 * dwarf2/frame.c (read_initial_length): Remove.
7756 (decode_frame_entry_1): Update.
7757
7758 2020-02-08 Tom Tromey <tom@tromey.com>
7759
7760 * dwarf2/loc.c (dwarf2_find_location_expression)
7761 (dwarf_evaluate_loc_desc::get_tls_address)
7762 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
7763 (rw_pieced_value, dwarf2_evaluate_loc_desc_full)
7764 (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property)
7765 (dwarf2_compile_property_to_c)
7766 (dwarf2_loc_desc_get_symbol_read_needs)
7767 (dwarf2_compile_expr_to_ax, locexpr_describe_location)
7768 (locexpr_tracepoint_var_ref, locexpr_generate_c_location)
7769 (loclist_describe_location, loclist_tracepoint_var_ref)
7770 (loclist_generate_c_location): Update.
7771 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update.
7772 * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size)
7773 (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size)
7774 (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare.
7775 * dwarf2/read.c (dwarf2_per_cu_data::objfile)
7776 (dwarf2_per_cu_data::addr_size)
7777 (dwarf2_per_cu_data::ref_addr_size)
7778 (dwarf2_per_cu_data::text_offset)
7779 (dwarf2_per_cu_data::addr_type): Now methods.
7780 (per_cu_header_read_in): Make per_cu "const".
7781 (dwarf2_version): Remove.
7782 (dwarf2_per_cu_data::int_type): Now a method.
7783 (dwarf2_per_cu_data::_addr_sized_int_type): Likewise.
7784 (set_die_type, read_array_type, read_subrange_index_type)
7785 (read_tag_string_type, read_subrange_type): Update.
7786 * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size,
7787 offset_size, ref_addr_size, text_offset, addr_type, version,
7788 objfile, int_type, addr_sized_int_type>: Declare methods.
7789
7790 2020-02-08 Tom Tromey <tom@tromey.com>
7791
7792 * dwarf2/read.h (struct dwarf2_per_cu_data) <imported_symtabs>:
7793 Move earlier.
7794
7795 2020-02-08 Tom Tromey <tom@tromey.com>
7796
7797 * dwarf2/read.h (dwarf_line_debug): Declare.
7798 * Makefile.in (COMMON_SFILES): Add dwarf2/line-header.c.
7799 * dwarf2/read.c: Move line_header code to new files.
7800 (dwarf_line_debug): No longer static.
7801 * dwarf2/line-header.c: New file.
7802 * dwarf2/line-header.h: New file.
7803
7804 2020-02-08 Tom Tromey <tom@tromey.com>
7805
7806 * dwarf2/read.c (struct line_header) <file_full_name,
7807 file_file_name>: Return unique_xmalloc_ptr.
7808 (line_header::file_file_name): Update.
7809 (line_header::file_full_name): Update.
7810 (dw2_get_file_names_reader): Update.
7811 (macro_start_file): Update.
7812
7813 2020-02-08 Tom Tromey <tom@tromey.com>
7814
7815 * dwarf2/read.c (struct line_header) <file_full_name,
7816 file_file_name>: Declare methods.
7817 (dw2_get_file_names_reader): Update.
7818 (file_file_name): Now a method.
7819 (file_full_name): Likewise.
7820 (macro_start_file): Update.
7821
7822 2020-02-08 Tom Tromey <tom@tromey.com>
7823
7824 * dwarf2/read.c (dwarf_always_disassemble)
7825 (show_dwarf_always_disassemble): Move to loc.c.
7826 (_initialize_dwarf2_read): Move "always-disassemble" registration
7827 to loc.c.
7828 * dwarf2/read.h (dwarf_always_disassemble): Don't declare.
7829 * dwarf2/loc.c (dwarf_always_disassemble): Move from read.c. Now
7830 static.
7831 (show_dwarf_always_disassemble): Move from read.c.
7832 (_initialize_dwarf2loc): Move always-disassemble from read.c.
7833
7834 2020-02-08 Tom Tromey <tom@tromey.com>
7835
7836 * dwarf2/read.c (~dwarf2_per_objfile): Update.
7837 (create_quick_file_names_table): Return htab_up.
7838 (dw2_get_file_names_reader, dw2_forget_cached_source_info):
7839 Update.
7840 * dwarf2/read.h (struct dwarf2_per_objfile)
7841 <quick_file_names_table>: Now htab_up.
7842
7843 2020-02-08 Tom Tromey <tom@tromey.com>
7844
7845 * dwarf2/abbrev.c (abbrev_table::read): Simplify.
7846
7847 2020-02-08 Tom Tromey <tom@tromey.com>
7848
7849 * dwarf2/abbrev.c (abbrev_table): Move constructor from header.
7850 Rewrite.
7851 (abbrev_table::add_abbrev, abbrev_table::lookup_abbrev): Rewrite.
7852 * dwarf2/abbrev.h (struct abbrev_info) <next>: Remove.
7853 (abbrev_table::abbrev_table): No longer inline.
7854 (ABBREV_HASH_SIZE): Remove.
7855 (abbrev_table::m_abbrevs): Now an htab_up.
7856
7857 2020-02-08 Tom Tromey <tom@tromey.com>
7858
7859 * dwarf2/read.c (read_cutu_die_from_dwo): Update.
7860 (cutu_reader): Update.
7861 (build_type_psymtabs_1): Update.
7862 * dwarf2/abbrev.c (abbrev_table::read): Rename.
7863 (abbrev_table::alloc_abbrev): Update.
7864 * dwarf2/abbrev.h (abbrev_table_up): Move earlier.
7865 (abbrev_table::read): New static method, renamed from
7866 abbrev_table_read_table.
7867 (abbrev_table::alloc_abbrev)
7868 (abbrev_table::add_abbrev): Now private.
7869 (abbrev_table::abbrev_table): Now private.
7870 (abbrev_table::m_abbrev_obstack): Now private. Rename.
7871
7872 2020-02-08 Tom Tromey <tom@tromey.com>
7873
7874 * dwarf2/read.c (set_die_type, get_die_type_at_offset): Update.
7875 * dwarf2/read.h (struct dwarf2_per_objfile) <die_type_hash>: Now
7876 htab_up.
7877
7878 2020-02-08 Tom Tromey <tom@tromey.com>
7879
7880 * dwarf2/read.c (struct dwp_file) <loaded_cus, loaded_tus>: Now
7881 htab_up.
7882 (lookup_dwo_unit_in_dwp): Update.
7883 (allocate_dwp_loaded_cutus_table): Return htab_up. Don't allocate
7884 on obstack.
7885
7886 2020-02-08 Tom Tromey <tom@tromey.com>
7887
7888 * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
7889 obstack.
7890
7891 2020-02-08 Tom Tromey <tom@tromey.com>
7892
7893 * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
7894 line_header_hash.
7895 (handle_DW_AT_stmt_list): Update. Don't allocate on obstack.
7896 * dwarf2/read.h (struct dwarf2_per_objfile) <line_header_hash>:
7897 Change type to htab_up.
7898
7899 2020-02-08 Tom Tromey <tom@tromey.com>
7900
7901 * dwarf2/read.c (allocate_type_unit_groups_table): Return
7902 htab_up. Don't allocate on obstack.
7903 (get_type_unit_group, dwarf2_build_psymtabs_hard): Update.
7904 * dwarf2/read.h (struct dwarf2_per_objfile) <type_unit_groups>:
7905 Change type to htab_up.
7906
7907 2020-02-08 Tom Tromey <tom@tromey.com>
7908
7909 * dwarf2/read.h (struct dwarf2_per_objfile) <signatured_types>:
7910 Change type to htab_up.
7911 * dwarf2/read.c (create_signatured_type_table_from_index)
7912 (create_signatured_type_table_from_debug_names)
7913 (create_all_type_units, add_type_unit)
7914 (lookup_dwo_signatured_type, lookup_signatured_type)
7915 (process_skeletonless_type_unit): Update.
7916 (create_debug_type_hash_table, create_debug_types_hash_table):
7917 Change type of types_htab.
7918 (allocate_signatured_type_table, allocate_dwo_unit_table): Return
7919 htab_up. Don't allocate on obstack.
7920 (create_cus_hash_table): Change type of cus_htab parameter.
7921 (struct dwo_file) <cus, tus>: Now htab_up.
7922 (lookup_dwo_signatured_type, lookup_dwo_cutu)
7923 (process_dwo_file_for_skeletonless_type_units, lookup_dwo_cutu)
7924 (queue_and_load_all_dwo_tus): Update.
7925 * dwarf2/index-write.c (write_gdbindex): Update.
7926 (write_debug_names): Update.
7927
7928 2020-02-08 Tom Tromey <tom@tromey.com>
7929
7930 * dwarf2/read.h (struct dwarf2_queue_item): Move from
7931 dwarf2/read.c. Remove "next" member. Add constructor ntad
7932 destructor.
7933 (struct dwarf2_per_objfile) <queue>: New member.
7934 * dwarf2/read.c (struct dwarf2_queue_item): Move to
7935 dwarf2/read.h.
7936 (dwarf2_queue, dwarf2_queue_tail): Remove.
7937 (class dwarf2_queue_guard): Add parameter to constructor. Use
7938 DISABLE_COPY_AND_ASSIGN.
7939 <m_per_objfile>: New member.
7940 <~dwarf2_queue_guard>: Rewrite.
7941 (dw2_do_instantiate_symtab, queue_comp_unit, process_queue):
7942 Update.
7943 (~dwarf2_queue_item): New.
7944
7945 2020-02-08 Tom Tromey <tom@tromey.com>
7946
7947 * dwarf2/read.c (struct die_info) <has_children>: New member.
7948 (dw2_get_file_names_reader): Remove has_children.
7949 (dw2_get_file_names): Update.
7950 (read_cutu_die_from_dwo): Remove has_children.
7951 (cutu_reader::init_tu_and_read_dwo_dies)
7952 (cutu_reader::cutu_reader): Update.
7953 (process_psymtab_comp_unit_reader, build_type_psymtabs_reader):
7954 Remove has_children.
7955 (build_type_psymtabs_1, process_skeletonless_type_unit)
7956 (load_partial_comp_unit, load_full_comp_unit): Update.
7957 (create_dwo_cu_reader): Remove has_children.
7958 (create_cus_hash_table, read_die_and_children): Update.
7959 (read_full_die_1,read_full_die): Remove has_children.
7960 (read_signatured_type): Update.
7961 (class cutu_reader) <has_children>: Remove.
7962
7963 2020-02-08 Tom Tromey <tom@tromey.com>
7964
7965 * dwarf2/expr.c: Rename from dwarf2expr.c.
7966 * dwarf2/expr.h: Rename from dwarf2expr.h.
7967 * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
7968 * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
7969 * dwarf2/frame.c: Rename from dwarf2-frame.c.
7970 * dwarf2/frame.h: Rename from dwarf2-frame.h.
7971 * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
7972 * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
7973 * dwarf2/index-common.c: Rename from dwarf-index-common.c.
7974 * dwarf2/index-common.h: Rename from dwarf-index-common.h.
7975 * dwarf2/index-write.c: Rename from dwarf-index-write.c.
7976 * dwarf2/index-write.h: Rename from dwarf-index-write.h.
7977 * dwarf2/loc.c: Rename from dwarf2loc.c.
7978 * dwarf2/loc.h: Rename from dwarf2loc.h.
7979 * dwarf2/read.c: Rename from dwarf2read.c.
7980 * dwarf2/read.h: Rename from dwarf2read.h.
7981 * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
7982 amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
7983 compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
7984 compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
7985 gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
7986 hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
7987 i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
7988 m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
7989 msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
7990 riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
7991 s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
7992 sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
7993 tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
7994 Update.
7995 * Makefile.in (COMMON_SFILES): Update.
7996 (HFILES_NO_SRCDIR): Update.
7997
7998 2020-02-08 Tom Tromey <tom@tromey.com>
7999
8000 * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
8001 (init_cu_die_reader, read_cutu_die_from_dwo): Update.
8002
8003 2020-02-08 Tom Tromey <tom@tromey.com>
8004
8005 * dwarf2read.h (struct die_info): Don't declare.
8006
8007 2020-02-08 Tom Tromey <tom@tromey.com>
8008
8009 * dwarf2read.h (die_info_ptr): Remove typedef.
8010
8011 2020-02-08 Tom Tromey <tom@tromey.com>
8012
8013 * dwarf2read.c (read_call_site_scope)
8014 (handle_data_member_location, dwarf2_add_member_fn)
8015 (mark_common_block_symbol_computed, read_common_block)
8016 (attr_to_dynamic_prop, partial_die_info::read)
8017 (var_decode_location, dwarf2_fetch_die_loc_sect_off)
8018 (dwarf2_symbol_mark_computed, set_die_type): Update.
8019 * dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
8020 method.
8021 (attr_form_is_block): Don't declare.
8022 * dwarf2/attribute.c (attribute::form_is_block): Now a method.
8023
8024 2020-02-08 Tom Tromey <tom@tromey.com>
8025
8026 * dwarf2read.c (dwarf2_find_base_address, )
8027 (read_call_site_scope, rust_containing_type)
8028 (dwarf2_get_pc_bounds, dwarf2_record_block_ranges)
8029 (handle_data_member_location, dwarf2_add_member_fn)
8030 (get_alignment, read_structure_type, process_structure_scope)
8031 (mark_common_block_symbol_computed, read_common_block)
8032 (read_tag_string_type, attr_to_dynamic_prop, read_subrange_type)
8033 (partial_die_info::read, read_attribute_value, new_symbol)
8034 (lookup_die_type, dwarf2_get_ref_die_offset)
8035 (dwarf2_get_attr_constant_value, follow_die_ref_or_sig)
8036 (dwarf2_fetch_die_loc_sect_off, get_DW_AT_signature_type)
8037 (dwarf2_symbol_mark_computed): Update.
8038 * dwarf2/attribute.h (struct attribute) <value_as_address,
8039 form_is_section_offset, form_is_constant, form_is_ref>: Declare
8040 methods.
8041 (value_as_address, attr_form_is_section_offset)
8042 (attr_form_is_constant, attr_form_is_ref): Don't declare.
8043 * dwarf2/attribute.c (attribute::value_as_address)
8044 (attribute::form_is_section_offset, attribute::form_is_constant)
8045 (attribute::form_is_ref): Now methods.
8046
8047 2020-02-08 Tom Tromey <tom@tromey.com>
8048
8049 * dwarf2read.c (struct attribute, DW_STRING)
8050 (DW_STRING_IS_CANONICAL, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR)
8051 (DW_SIGNATURE, struct dwarf_block, attr_value_as_address)
8052 (attr_form_is_block, attr_form_is_section_offset)
8053 (attr_form_is_constant, attr_form_is_ref): Move.
8054 * dwarf2/attribute.h: New file.
8055 * dwarf2/attribute.c: New file, from dwarf2read.c.
8056 * Makefile.in (COMMON_SFILES): Add dwarf2/attribute.c.
8057
8058 2020-02-08 Tom Tromey <tom@tromey.com>
8059
8060 * dwarf2read.c (abbrev_table_up, struct abbrev_info)
8061 (struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
8062 Move.
8063 (read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
8064 (abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
8065 (abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
8066 abbrev.c.
8067 * dwarf2/abbrev.h: New file.
8068 * dwarf2/abbrev.c: New file, from dwarf2read.c.
8069 * Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.
8070
8071 2020-02-08 Tom Tromey <tom@tromey.com>
8072
8073 * dwarf2read.c (dwarf2_section_buffer_overflow_complaint)
8074 (dwarf2_section_size, dwarf2_get_section_info)
8075 (create_signatured_type_table_from_debug_names)
8076 (create_addrmap_from_aranges, read_debug_names_from_section)
8077 (get_gdb_index_contents_from_section, read_comp_unit_head)
8078 (error_check_comp_unit_head, read_abbrev_offset)
8079 (create_debug_type_hash_table, init_cu_die_reader)
8080 (read_cutu_die_from_dwo, dwarf2_build_psymtabs_hard)
8081 (read_comp_units_from_section, create_cus_hash_table)
8082 (create_dwp_hash_table, create_dwo_unit_in_dwp_v1)
8083 (create_dwp_v2_section, dwarf2_rnglists_process)
8084 (dwarf2_ranges_process, read_die_and_siblings, read_full_die)
8085 (abbrev_table_read_table, read_indirect_string_at_offset_from)
8086 (read_indirect_string_from_dwz, read_addr_index_1)
8087 (read_str_index, dwarf_decode_line_header, skip_form_bytes)
8088 (dwarf_decode_macro_bytes, dwarf_decode_macros)
8089 (fill_in_loclist_baton): Update.
8090 * dwarf2/section.h (struct dwarf2_section_info) <get_name,
8091 get_containing_section, get_bfd_owner, get_bfd_section,
8092 get_file_name, get_id, get_flags, empty, read>: Declare methods.
8093 (dwarf2_read_section, get_section_name, get_section_file_name)
8094 (get_containing_section, get_section_bfd_owner)
8095 (get_section_bfd_section, get_section_name, get_section_file_name)
8096 (get_section_id, get_section_flags, dwarf2_section_empty_p): Don't
8097 declare.
8098 * dwarf2/section.c (dwarf2_section_info::get_containing_section)
8099 (dwarf2_section_info::get_bfd_owner)
8100 (dwarf2_section_info::get_bfd_section)
8101 (dwarf2_section_info::get_name)
8102 (dwarf2_section_info::get_file_name, dwarf2_section_info::get_id)
8103 (dwarf2_section_info::get_flags, dwarf2_section_info::empty)
8104 (dwarf2_section_info::read): Now methods.
8105 * dwarf-index-write.c (class debug_names): Update.
8106
8107 2020-02-08 Tom Tromey <tom@tromey.com>
8108
8109 * dwarf2read.h (struct dwarf2_section_info, dwarf2_read_section):
8110 Move to dwarf2/section.h.
8111 * dwarf2read.c (get_containing_section, get_section_bfd_owner)
8112 (get_section_bfd_section, get_section_name)
8113 (get_section_file_name, get_section_id, get_section_flags)
8114 (dwarf2_section_empty_p, dwarf2_read_section): Moe to
8115 dwarf2/section.c.
8116 * dwarf2/section.h: New file.
8117 * dwarf2/section.c: New file, from dwarf2read.c.
8118 * Makefile.in (COMMON_SFILES): Add dwarf2/section.c.
8119
8120 2020-02-08 Tom Tromey <tom@tromey.com>
8121
8122 * dwarf2read.h (read_unsigned_leb128): Don't declare.
8123 * dwarf2read.c (read_1_byte, read_1_signed_byte, read_2_bytes)
8124 (read_2_signed_bytes, read_3_bytes, read_4_bytes)
8125 (read_4_signed_bytes, read_8_bytes): Move to dwarf2/leb.h.
8126 (read_unsigned_leb128, read_signed_leb128): Move to dwarf2/leb.c.
8127 * dwarf2/leb.h: New file, from dwarf2read.c.
8128 * dwarf2/leb.c: New file, from dwarf2read.c.
8129 * dwarf2-frame.c (read_1_byte, read_4_bytes, read_8_bytes):
8130 Remove.
8131 * Makefile.in (CONFIG_SRC_SUBDIR): Add dwarf2.
8132 (COMMON_SFILES): Add dwarf2/leb.c.
8133
8134 2020-02-08 Joel Brobecker <brobecker@adacore.com>
8135
8136 GDB 9.1 released.
8137
8138 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
8139
8140 PR gdb/25190:
8141 * gdb/remote-sim.c (gdb_os_write_stderr): Update.
8142 * gdb/remote.c (remote_console_output): Update.
8143 * gdb/ui-file.c (fputs_unfiltered): Rename to...
8144 (ui_file_puts): ...this.
8145 * gdb/ui-file.h (ui_file_puts): Add declaration.
8146 * gdb/utils.c (emit_style_escape): Update.
8147 (flush_wrap_buffer): Update.
8148 (fputs_maybe_filtered): Update.
8149 (fputs_unfiltered): Add function.
8150
8151 2020-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
8152
8153 * gdb/event-loop.c (gdb_wait_for_event): Update.
8154 * gdb/printcmd.c (printf_command): Update.
8155 * gdb/remote-fileio.c (remote_fileio_func_write): Update.
8156 * gdb/remote-sim.c (gdb_os_flush_stdout): Update.
8157 (gdb_os_flush_stderr): Update.
8158 * gdb/remote.c (remote_console_output): Update.
8159 * gdb/ui-file.c (gdb_flush): Rename to...
8160 (ui_file_flush): ...this.
8161 (stderr_file::write): Update.
8162 (stderr_file::puts): Update.
8163 * gdb/ui-file.h (gdb_flush): Rename to...
8164 (ui_file_flush): ...this.
8165 * gdb/utils.c (gdb_flush): Add function.
8166 * gdb/utils.h (gdb_flush): Add declaration.
8167
8168 2020-02-07 Tom Tromey <tromey@adacore.com>
8169
8170 PR breakpoints/24915:
8171 * source.c (find_and_open_source): Do not check basenames_may_differ.
8172
8173 2020-02-07 Tom Tromey <tom@tromey.com>
8174
8175 * README: Update gdbserver documentation.
8176 * gdbserver: Move to top level.
8177 * configure.tgt (build_gdbserver): Remove.
8178 * configure.ac: Remove --enable-gdbserver.
8179 * configure: Rebuild.
8180 * Makefile.in (distclean): Don't mention gdbserver.
8181
8182 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
8183
8184 * source-cache.c (source_cache::ensure): Surround
8185 get_plain_source_lines with a try/catch.
8186 (source_cache::get_line_charpos): Get rid of try/catch
8187 and only check for the return value of "ensure".
8188 * tui/tui-source.c (tui_source_window::set_contents):
8189 Simplify "nlines" calculation.
8190
8191 2020-02-06 Shahab Vahedi <shahab@synopsys.com>
8192
8193 * MAINTAINERS (Write After Approval): Add myself.
8194
8195 2020-02-05 Christian Biesinger <cbiesinger@google.com>
8196
8197 * sparc-nat.h (struct sparc_target) <xfer_partial>: Fix base class
8198 function call.
8199
8200 2020-02-05 Christian Biesinger <cbiesinger@google.com>
8201
8202 * ppc-nbsd-tdep.h: Fix macro name in #endif comment.
8203
8204 2020-02-05 Maciej W. Rozycki <macro@wdc.com>
8205
8206 * nat/riscv-linux-tdesc.h: New file.
8207 * nat/riscv-linux-tdesc.c: New file, taking code from...
8208 * riscv-linux-nat.c (riscv_linux_nat_target::read_description):
8209 ... here.
8210 * configure.nat <linux> <riscv*>: Add nat/riscv-linux-tdesc.o to
8211 NATDEPFILES.
8212
8213 2020-02-04 Andrew Burgess <andrew.burgess@embecosm.com>
8214
8215 * remote-sim.c (sim_inferior_data::sim_inferior_data): Assert that
8216 we don't set the fake simulator ptid to the null_ptid.
8217
8218 2020-02-03 Simon Marchi <simon.marchi@efficios.com>
8219
8220 * fork-child.c (gdb_startup_inferior): Use bool instead of int.
8221 * gdbthread.h (class thread_info) <resumed>: Likewise.
8222 * infrun.c (resume_1): Likewise.
8223 (proceed): Likewise.
8224 (infrun_thread_stop_requested): Likewise.
8225 (stop_all_threads): Likewise.
8226 (handle_inferior_event): Likewise.
8227 (restart_threads): Likewise.
8228 (finish_step_over): Likewise.
8229 (keep_going_stepped_thread): Likewise.
8230 * linux-nat.c (attach_proc_task_lwp_callback): Likewise.
8231 (linux_handle_extended_wait): Likewise.
8232 * record-btrace.c (get_thread_current_frame_id): Likewise.
8233 * record-full.c (record_full_wait_1): Likewise.
8234 * remote.c (remote_target::process_initial_stop_replies): Likewise.
8235 * target.c (target_resume): Likewise.
8236 * thread.c (set_running_thread): Likewise.
8237
8238 2020-02-03 Alok Kumar Sharma <AlokKumar.Sharma@amd.com>
8239
8240 * f-valprint.c (f77_print_array_1): Changed datatype of index
8241 variable to LONGEST from int to enable it to contain bound
8242 values correctly.
8243
8244 2020-02-03 Maciej W. Rozycki <macro@wdc.com>
8245
8246 * riscv-linux-nat.c [!NFPREG] (NFPREG): New macro.
8247 (supply_fpregset_regnum, fill_fpregset): Handle regset buffer
8248 offsets according to FLEN determined.
8249 (riscv_linux_nat_target::read_description): Determine FLEN
8250 dynamically.
8251 (riscv_linux_nat_target::fetch_registers): Size regset buffer
8252 according to FLEN determined.
8253 (riscv_linux_nat_target::store_registers): Likewise.
8254
8255 2020-02-01 Shahab Vahedi <shahab@synopsys.com>
8256
8257 * target-descriptions.c (tdesc_register_in_reggroup_p): Return 0
8258 when reg->group is empty and reggroup is not.
8259
8260 2020-01-31 Tom Tromey <tromey@adacore.com>
8261
8262 * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior):
8263 Call beneath target's mourn_inferior after unpushing.
8264
8265 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
8266
8267 PR tui/9765
8268 * tui/tui-disasm.c (tui_find_disassembly_address): If we don't
8269 have enough lines to fill the screen, still return the lowest
8270 address we found.
8271
8272 2020-01-31 Andrew Burgess <andrew.burgess@embecosm.com>
8273
8274 * tui/tui-win.c (_initialize_tui_win): Update help text for '+',
8275 '-', '<', and '>' commands.
8276
8277 2020-01-29 Pedro Alves <palves@redhat.com>
8278 Sergio Durigan Junior <sergiodj@redhat.com>
8279
8280 * infcmd.c (construct_inferior_arguments): Assert that
8281 'argc' is greater than 0.
8282
8283 2020-01-29 Luis Machado <luis.machado@linaro.org>
8284
8285 * aarch64-tdep.c (BRK_INSN_MASK): Define to 0xffe0001f.
8286 (BRK_INSN_MASK): Define to 0xd4200000.
8287 (aarch64_program_breakpoint_here_p): New function.
8288 (aarch64_gdbarch_init): Set gdbarch_program_breakpoint_here_p hook.
8289 * arch-utils.c (default_program_breakpoint_here_p): Moved from
8290 breakpoint.c.
8291 * arch-utils.h (default_program_breakpoint_here_p): Moved from
8292 breakpoint.h
8293 * breakpoint.c (bp_loc_is_permanent): Changed return type to bool and
8294 call gdbarch_program_breakpoint_here_p.
8295 (program_breakpoint_here): Moved to arch-utils.c, renamed to
8296 default_program_breakpoint_here_p, changed return type to bool and
8297 simplified.
8298 * breakpoint.h (program_breakpoint_here): Moved prototype to
8299 arch-utils.h, renamed to default_program_breakpoint_here_p and changed
8300 return type to bool.
8301 * gdbarch.c: Regenerate.
8302 * gdbarch.h: Regenerate.
8303 * gdbarch.sh (program_breakpoint_here_p): New method.
8304 * infrun.c (handle_signal_stop): Call
8305 gdbarch_program_breakpoint_here_p.
8306
8307 2020-01-26 Tom Tromey <tom@tromey.com>
8308
8309 * ctfread.c (struct ctf_fp_info): Reindent.
8310 (_initialize_ctfread): Remove.
8311
8312 2020-01-26 Tom Tromey <tom@tromey.com>
8313
8314 * psymtab.c (partial_map_expand_apply)
8315 (psym_find_pc_sect_compunit_symtab, psym_lookup_symbol)
8316 (psymtab_to_symtab, psym_find_last_source_symtab, dump_psymtab)
8317 (psym_print_stats, psym_expand_symtabs_for_function)
8318 (psym_map_symbol_filenames, psym_map_matching_symbols)
8319 (psym_expand_symtabs_matching)
8320 (partial_symtab::read_dependencies, maintenance_info_psymtabs)
8321 (maintenance_check_psymtabs): Use new methods.
8322 * psympriv.h (struct partial_symtab) <readin_p,
8323 get_compunit_symtab>: New methods.
8324 <readin, compunit_symtab>: Remove members.
8325 (struct standard_psymtab): New.
8326 (struct legacy_psymtab): Derive from standard_psymtab.
8327 * dwarf2read.h (struct dwarf2_psymtab): Derive from
8328 standard_psymtab.
8329 * ctfread.c (struct ctf_psymtab): Derive from standard_psymtab.
8330
8331 2020-01-26 Tom Tromey <tom@tromey.com>
8332
8333 * xcoffread.c (xcoff_psymtab_to_symtab_1): Call
8334 read_dependencies. Add assert.
8335 * psymtab.c (partial_symtab::read_dependencies): New method.
8336 * psympriv.h (struct partial_symtab) <read_dependencies>: New
8337 method.
8338 * mdebugread.c (psymtab_to_symtab_1): Call read_dependencies.
8339 * dwarf2read.c (dwarf2_psymtab::expand_psymtab): Call
8340 read_dependencies.
8341 * dbxread.c (dbx_psymtab_to_symtab_1): Call read_dependencies.
8342 Add assert.
8343
8344 2020-01-26 Tom Tromey <tom@tromey.com>
8345
8346 * xcoffread.c (xcoff_psymtab_to_symtab_1): Change argument order.
8347 Call expand_psymtab.
8348 (xcoff_read_symtab): Call expand_psymtab.
8349 (xcoff_start_psymtab, xcoff_end_psymtab): Set
8350 legacy_expand_psymtab.
8351 * psympriv.h (struct partial_symtab) <expand_psymtab>: New
8352 method.
8353 (struct legacy_psymtab) <expand_psymtab>: Implement.
8354 <legacy_expand_psymtab>: New member.
8355 * mdebugread.c (mdebug_read_symtab): Call expand_psymtab.
8356 (parse_partial_symbols): Set legacy_expand_psymtab.
8357 (psymtab_to_symtab_1): Change argument order. Call
8358 expand_psymtab.
8359 (new_psymtab): Set legacy_expand_psymtab.
8360 * dwarf2read.h (struct dwarf2_psymtab) <expand_psymtab>: Declare.
8361 * dwarf2read.c (dwarf2_psymtab::read_symtab): Call
8362 expand_psymtab.
8363 (dwarf2_psymtab::expand_psymtab): Rename from
8364 psymtab_to_symtab_1. Call expand_psymtab.
8365 * dbxread.c (start_psymtab): Set legacy_expand_psymtab.
8366 (dbx_end_psymtab): Likewise.
8367 (dbx_psymtab_to_symtab_1): Change argument order. Call
8368 expand_psymtab.
8369 (dbx_read_symtab): Call expand_psymtab.
8370 * ctfread.c (struct ctf_psymtab) <expand_psymtab>: Declare.
8371 (ctf_psymtab::expand_psymtab): Rename from psymtab_to_symtab.
8372 (ctf_psymtab::read_symtab): Call expand_psymtab.
8373
8374 2020-01-26 Tom Tromey <tom@tromey.com>
8375
8376 * xcoffread.c (xcoff_read_symtab): Remove prints. Add assert.
8377 * psymtab.c (psymtab_to_symtab): Print verbose "Reading"
8378 messages.
8379 * mdebugread.c (mdebug_read_symtab): Remove prints.
8380 * dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints. Add
8381 assert.
8382 * dbxread.c (dbx_read_symtab): Remove prints. Add assert.
8383
8384 2020-01-26 Tom Tromey <tom@tromey.com>
8385
8386 * xcoffread.c (this_symtab_psymtab, read_xcoff_symtab)
8387 (xcoff_psymtab_to_symtab_1, xcoff_read_symtab)
8388 (xcoff_start_psymtab, xcoff_end_psymtab, scan_xcoff_symtab): Use
8389 legacy_symtab.
8390 * stabsread.h (dbx_end_psymtab): Use legacy_symtab.
8391 * psymtab.c (psymtab_to_symtab): Call method.
8392 (dump_psymtab): Update.
8393 * psympriv.h (struct partial_symtab): Add virtual destructor.
8394 <read_symtab>: New method.
8395 (struct legacy_symtab): New.
8396 * mdebugread.c (mdebug_read_symtab): Use legacy_psymtab.
8397 (struct pst_map) <pst>: Now a legacy_psymtab.
8398 (parse_procedure, parse_partial_symbols, psymtab_to_symtab_1)
8399 (new_psymtab): Use legacy_psymtab.
8400 * dwarf2read.h (struct dwarf2_psymtab): New.
8401 (struct dwarf2_per_cu_data) <psymtab>: Use it.
8402 * dwarf2read.c (dwarf2_create_include_psymtab)
8403 (dwarf2_build_include_psymtabs, create_type_unit_group)
8404 (create_partial_symtab, process_psymtab_comp_unit_reader)
8405 (build_type_psymtabs_reader, build_type_psymtab_dependencies)
8406 (set_partial_user): Use dwarf2_psymtab.
8407 (dwarf2_psymtab::read_symtab): Rename from dwarf2_read_symtab.
8408 (psymtab_to_symtab_1, process_full_comp_unit)
8409 (process_full_type_unit, dwarf2_ranges_read)
8410 (dwarf2_get_pc_bounds, psymtab_include_file_name)
8411 (dwarf_decode_lines): Use dwarf2_psymtab.
8412 * dwarf-index-write.c (psym_index_map): Use dwarf2_psymtab.
8413 (add_address_entry_worker, write_one_signatured_type)
8414 (recursively_count_psymbols, recursively_write_psymbols)
8415 (write_one_signatured_type, psyms_seen_size, write_gdbindex)
8416 (write_debug_names): Likewise.
8417 * dbxread.c (struct header_file_location): Take a legacy_psymtab.
8418 <pst>: Now a legacy_psymtab.
8419 (find_corresponding_bincl_psymtab): Return a legacy_psymtab.
8420 (read_dbx_symtab, start_psymtab, dbx_end_psymtab)
8421 (dbx_psymtab_to_symtab_1, read_ofile_symtab): Use legacy_psymtab.
8422 * ctfread.c (struct ctf_psymtab): New.
8423 (ctf_start_symtab, ctf_end_symtab, psymtab_to_symtab): Take a
8424 ctf_psymtab.
8425 (ctf_psymtab::read_symtab): Rename from ctf_read_symtab.
8426 (create_partial_symtab): Return a ctf_psymtab.
8427 (scan_partial_symbols): Update.
8428
8429 2020-01-26 Tom Tromey <tom@tromey.com>
8430
8431 * xcoffread.c (xcoff_start_psymtab): Use new.
8432 * psymtab.c (partial_symtab::partial_symtab): New constructor,
8433 renamed from start_psymtab_common.
8434 * psympriv.h (struct partial_symtab): Add new constructor.
8435 (start_psymtab_common): Don't declare.
8436 * mdebugread.c (parse_partial_symbols): Use new.
8437 * dwarf2read.c (create_partial_symtab): Use new.
8438 * dbxread.c (start_psymtab): Use new.
8439 * ctfread.c (create_partial_symtab): Use new.
8440
8441 2020-01-26 Tom Tromey <tom@tromey.com>
8442
8443 * xcoffread.c (xcoff_end_psymtab): Use new.
8444 * psymtab.c (start_psymtab_common): Use new.
8445 (partial_symtab::partial_symtab): Rename from allocate_psymtab.
8446 Update.
8447 * psympriv.h (struct partial_symtab): Add parameters to
8448 constructor. Don't inline.
8449 (allocate_psymtab): Don't declare.
8450 * mdebugread.c (new_psymtab): Use new.
8451 * dwarf2read.c (dwarf2_create_include_psymtab): Use new.
8452 * dbxread.c (dbx_end_psymtab): Use new.
8453
8454 2020-01-26 Tom Tromey <tom@tromey.com>
8455
8456 * psymtab.h (class psymtab_storage) <install_psymtab>: Rename from
8457 allocate_psymtab. Update documentation.
8458 * psymtab.c (psymtab_storage::install_psymtab): Rename from
8459 allocate_psymtab. Do not use new.
8460 (allocate_psymtab): Use new. Update.
8461
8462 2020-01-26 Tom Tromey <tom@tromey.com>
8463
8464 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
8465 * psymtab.c (psym_print_stats): Update.
8466 * psympriv.h (struct partial_symtab) <readin,
8467 psymtabs_addrmap_supported, anonymous>: Now bool.
8468 * mdebugread.c (psymtab_to_symtab_1): Update.
8469 * dwarf2read.c (create_type_unit_group, create_partial_symtab)
8470 (build_type_psymtabs_reader, psymtab_to_symtab_1)
8471 (process_full_comp_unit, process_full_type_unit): Update.
8472 * dbxread.c (dbx_psymtab_to_symtab_1): Update.
8473 * ctfread.c (psymtab_to_symtab): Update.
8474
8475 2020-01-26 Tom Tromey <tom@tromey.com>
8476
8477 * mdebugread.c (parse_partial_symbols): Use discard_psymtab.
8478 * psymtab.h (class psymtab_storage) <free_psymtabs>: Remove.
8479 * psymtab.c (psymtab_storage): Delete psymtabs.
8480 (psymtab_storage::allocate_psymtab): Use new.
8481 (psymtab_storage::discard_psymtab): Use delete.
8482 * psympriv.h (struct partial_symtab): Add constructor and
8483 initializers.
8484
8485 2020-01-26 Tom Tromey <tom@tromey.com>
8486
8487 * machoread.c: Do not include psympriv.h.
8488
8489 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8490
8491 * NEWS: Mention the new option and the set/show commands.
8492
8493 2020-01-25 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8494
8495 * exec.c (exec_file_mismatch_names, exec_file_mismatch_mode)
8496 (show_exec_file_mismatch_command, set_exec_file_mismatch_command)
8497 (validate_exec_file): New variables, enums, functions.
8498 (exec_file_locate_attach, print_section_info): Style the filenames.
8499 (_initialize_exec): Install show_exec_file_mismatch_command and
8500 set_exec_file_mismatch_command.
8501 * gdbcore.h (validate_exec_file): Declare.
8502 * infcmd.c (attach_command): Call validate_exec_file.
8503 * remote.c ( remote_target::remote_add_inferior): Likewise.
8504
8505 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
8506
8507 * frame.c (find_frame_sal): Move call to get_next_frame into more
8508 inner scope.
8509 * inline-frame.c (inilne_state) <inline_state>: Update argument
8510 types.
8511 (inilne_state) <skipped_symbol>: Rename to...
8512 (inilne_state) <skipped_symbols>: ...this, and change to a vector.
8513 (skip_inline_frames): Build vector of skipped symbols and use this
8514 to reate the inline_state.
8515 (inline_skipped_symbol): Add a comment and some assertions, fetch
8516 skipped symbol from the list.
8517
8518 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
8519
8520 * buildsym.c (lte_is_less_than): Delete.
8521 (buildsym_compunit::end_symtab_with_blockvector): Create local
8522 lambda function to sort line table entries, and use
8523 std::stable_sort instead of std::sort.
8524 * symtab.c (find_pc_sect_line): Skip backward over end of sequence
8525 markers when looking for a previous line.
8526
8527 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
8528
8529 * dwarf2read.c (lnp_state_machine::record_line): Include
8530 end_sequence parameter in debug print out. Record the line if we
8531 are at an end_sequence marker even if it's not the start of a
8532 statement.
8533 * symmisc.c (maintenance_print_one_line_table): Print end of
8534 sequence markers with 'END' not '0'.
8535
8536 2020-01-24 Pedro Alves <palves@redhat.com>
8537
8538 PR gdb/25410
8539 * thread.c (scoped_restore_current_thread::restore): Use
8540 switch_to_inferior_no_thread.
8541 * exec.c: Include "progspace-and-thread.h".
8542 (add_target_sections, remove_target_sections):
8543 scoped_restore_current_pspace_and_thread instead of
8544 scoped_restore_current_thread.
8545 * infrun.c (handle_vfork_child_exec_or_exit): Assign the pspace
8546 and aspace to the inferior before calling clone_program_space.
8547 Remove stale comment.
8548
8549 2020-01-24 Christian Biesinger <cbiesinger@google.com>
8550
8551 * arm-nbsd-nat.c (arm_nbsd_nat_target::fetch_registers): Rename to...
8552 (arm_netbsd_nat_target::fetch_registers): ...this.
8553 (arm_nbsd_nat_target::store_registers): Rename to...
8554 (arm_netbsd_nat_target::store_registers): ...this.
8555
8556 2020-01-24 Christian Biesinger <cbiesinger@google.com>
8557
8558 * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
8559 register_t.
8560
8561 2020-01-24 Christian Biesinger <cbiesinger@google.com>
8562
8563 * aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
8564 Update comment.
8565 * aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
8566 Likewise.
8567 * arm-fbsd-tdep.c (arm_fbsd_iterate_over_regset_sections): Likewise.
8568 * gdbcore.h (deprecated_add_core_fns): Update comment to point to
8569 the correct replacement (iterate_over_regset_sections).
8570 * riscv-fbsd-tdep.c (riscv_fbsd_iterate_over_regset_sections):
8571 Update comment.
8572
8573 2020-01-24 Graham Markall <graham.markall@embecosm.com>
8574
8575 PR gdb/23718
8576 * gdb/python/python.c (execute_gdb_command): Call
8577 async_enable_stdin in catch block.
8578
8579 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
8580
8581 * event-loop.c (start_event_loop): Wrap async_enable_stdin with
8582 SWITCH_THRU_ALL_UIS.
8583
8584 2020-01-24 Andrew Burgess <andrew.burgess@embecosm.com>
8585
8586 PR tui/9765
8587 * minsyms.c (lookup_minimal_symbol_by_pc_section): Update header
8588 comment, add extra parameter, and update to store previous symbol
8589 when appropriate.
8590 * minsyms.h (lookup_minimal_symbol_by_pc_section): Update comment,
8591 add extra parameter.
8592 * tui/tui-disasm.c (tui_disassemble): Update header comment,
8593 remove unneeded parameter, add try/catch around gdb_print_insn,
8594 rewrite to add items to asm_lines vector.
8595 (tui_find_backward_disassembly_start_address): New function.
8596 (tui_find_disassembly_address): Updated throughout.
8597 (tui_disasm_window::set_contents): Update for changes to
8598 tui_disassemble.
8599 (tui_disasm_window::do_scroll_vertical): No need to adjust the
8600 number of lines to scroll.
8601
8602 2020-01-23 Simon Marchi <simon.marchi@polymtl.ca>
8603
8604 * objfiles.h (ALL_OBJFILE_OSECTIONS): Move up.
8605 (SECT_OFF_DATA): Likewise.
8606 (SECT_OFF_RODATA): Likewise.
8607 (SECT_OFF_TEXT): Likewise.
8608 (SECT_OFF_BSS): Likewise.
8609 (struct objfile) <text_section_offset, data_section_offset>: New
8610 methods.
8611 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Use
8612 objfile::text_section_offset.
8613 * coff-pe-read.c (add_pe_forwarded_sym): Likewise.
8614 * coffread.c (coff_symtab_read): Likewise.
8615 (enter_linenos): Likewise.
8616 (process_coff_symbol): Likewise.
8617 * ctfread.c (get_objfile_text_range): Likewise.
8618 * dtrace-probe.c (dtrace_probe::get_relocated_address):
8619 Use objfile::data_section_offset.
8620 * dwarf2-frame.c (execute_cfa_program): Use
8621 objfile::text_section_offset.
8622 (dwarf2_frame_find_fde): Likewise.
8623 * dwarf2read.c (create_addrmap_from_index): Likewise.
8624 (create_addrmap_from_aranges): Likewise.
8625 (dw2_find_pc_sect_compunit_symtab): Likewise.
8626 (process_psymtab_comp_unit_reader): Likewise.
8627 (add_partial_symbol): Likewise.
8628 (add_partial_subprogram): Likewise.
8629 (process_full_comp_unit): Likewise.
8630 (read_file_scope): Likewise.
8631 (read_func_scope): Likewise.
8632 (read_lexical_block_scope): Likewise.
8633 (read_call_site_scope): Likewise.
8634 (dwarf2_rnglists_process): Likewise.
8635 (dwarf2_ranges_process): Likewise.
8636 (dwarf2_ranges_read): Likewise.
8637 (dwarf_decode_lines_1): Likewise.
8638 (new_symbol): Likewise.
8639 (dwarf2_fetch_die_loc_sect_off): Likewise.
8640 (dwarf2_per_cu_text_offset): Likewise.
8641 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Likewise.
8642 * hppa-tdep.c (read_unwind_info): Likewise.
8643 * ia64-tdep.c (ia64_find_unwind_table): Likewise.
8644 * psympriv.h (struct partial_symtab): Likewise.
8645 * psymtab.c (find_pc_sect_psymtab): Likewise.
8646 * solib-svr4.c (enable_break): Likewise.
8647 * stap-probe.c (relocate_address): Use
8648 objfile::data_section_offset.
8649 * xcoffread.c (enter_line_range): Use
8650 objfile::text_section_offset.
8651 (read_xcoff_symtab): Likewise.
8652
8653 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
8654
8655 * darwin-nat.c (darwin_nat_target::wait_1): Move `inf`
8656 declaration to narrower scopes.
8657
8658 2020-01-23 Simon Marchi <simon.marchi@efficios.com>
8659
8660 * darwin-nat.h (struct darwin_exception_msg, enum
8661 darwin_msg_state, struct darwin_thread_info, darwin_thread_t):
8662 Move up.
8663 (class darwin_nat_target) <wait_1, check_new_threads,
8664 decode_exception_message, decode_message, stop_inferior,
8665 init_thread_list, ptrace_him, cancel_breakpoint>: Declare.
8666 * darwin-nat.c (darwin_check_new_threads): Rename to...
8667 (darwin_nat_target::check_new_threads): ... this.
8668 (darwin_suspend_inferior_it): Remove.
8669 (darwin_decode_exception_message): Rename to...
8670 (darwin_nat_target::decode_exception_message): ... this.
8671 (darwin_nat_target::resume): Pass target to find_inferior_ptid.
8672 (darwin_decode_message): Rename to...
8673 (darwin_nat_target::decode_message): ... this.
8674 (cancel_breakpoint): Rename to...
8675 (darwin_nat_target::cancel_breakpoint): ... this.
8676 (darwin_wait): Rename to...
8677 (darwin_nat_target::wait_1): ... this. Use range-based for loop
8678 instead of iterate_over_inferiors.
8679 (darwin_nat_target::wait): Call wait_1 instead of darwin_wait.
8680 (darwin_stop_inferior): Rename to...
8681 (darwin_nat_target::stop_inferior): ... this.
8682 (darwin_nat_target::kill): Call wait_1 instead of darwin_wait.
8683 (darwin_init_thread_list): Rename to...
8684 (darwin_nat_target::init_thread_list): ... this.
8685 (darwin_ptrace_him): Rename to...
8686 (darwin_nat_target::ptrace_him): ... this.
8687 (darwin_nat_target::create_inferior): Pass lambda function to
8688 fork_inferior.
8689 (darwin_nat_target::detach): Call stop_inferior instead of
8690 darwin_stop_inferior.
8691 * fork-inferior.h (fork_inferior): Change init_trace_fun
8692 parameter to gdb::function_view.
8693 * fork-inferior.c (fork_inferior): Likewise.
8694
8695 2020-01-23 Hannes Domani <ssbssa@yahoo.de>
8696
8697 * i386-cygwin-tdep.c (core_process_module_section): Update.
8698 * windows-nat.c (struct lm_info_windows): Add text_offset.
8699 (windows_xfer_shared_libraries): Update.
8700 * windows-tdep.c (windows_xfer_shared_library):
8701 Add text_offset_cached argument.
8702 * windows-tdep.h (windows_xfer_shared_library): Update.
8703
8704 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
8705
8706 * gdbarch.sh: Add declaration for _initialize_gdbarch.
8707
8708 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
8709
8710 * remote-sim.c (check_for_duplicate_sim_descriptor): Remove.
8711 (get_sim_inferior_data): Remove use of iterate_over_inferiors,
8712 replace with range-based for.
8713 (gdbsim_interrupt_inferior): Remove.
8714 (gdbsim_target::interrupt): Replace iterate_over_inferiors use
8715 with a range-based for. Inline code from
8716 gdbsim_interrupt_inferior.
8717
8718 2020-01-21 Simon Marchi <simon.marchi@efficios.com>
8719
8720 * infrun.c (proceed): Fix indentation.
8721
8722 2020-01-21 Tom Tromey <tromey@adacore.com>
8723
8724 * source-cache.c (source_cache::ensure): Call ext_lang_colorize.
8725 * python/python.c (python_extension_ops): Update.
8726 (gdbpy_colorize): New function.
8727 * python/lib/gdb/__init__.py (colorize): New function.
8728 * extension.h (ext_lang_colorize): Declare.
8729 * extension.c (ext_lang_colorize): New function.
8730 * extension-priv.h (struct extension_language_ops) <colorize>: New
8731 member.
8732 * cli/cli-style.c (_initialize_cli_style): Update help text.
8733
8734 2020-01-21 Luis Machado <luis.machado@linaro.org>
8735
8736 * aarch64-tdep.c (struct aarch64_displaced_step_closure)
8737 <cond>: Change type to bool.
8738 (aarch64_displaced_step_b_cond): Update cond to use bool type.
8739 (aarch64_displaced_step_cb): Likewise.
8740 (aarch64_displaced_step_tb): Likewise.
8741
8742 2020-01-21 Luis Machado <luis.machado@linaro.org>
8743
8744 * aarch64-tdep.c (aarch64_displaced_step_fixup): Add more debugging
8745 output.
8746
8747 2020-01-21 Luis Machado <luis.machado@linaro.org>
8748
8749 * aarch64-tdep.c (struct aarch64_displaced_step_closure )
8750 <pc_adjust>: Adjust the documentation.
8751 (aarch64_displaced_step_fixup): Check if PC really moved before
8752 adjusting it.
8753
8754 2020-01-19 Tom Tromey <tom@tromey.com>
8755
8756 * disasm.c (~gdb_disassembler): New destructor.
8757 (gdb_buffered_insn_length): Call disassemble_free_target.
8758 * disasm.h (class gdb_disassembler): Declare destructor. Use
8759 DISABLE_COPY_AND_ASSIGN.
8760
8761 2020-01-19 Tom Tromey <tom@tromey.com>
8762
8763 * dwarf2read.c (abbrev_table_up): Move typedef earlier.
8764 (die_reader_func_ftype): Remove.
8765 (cutu_reader): New class.
8766 (dw2_get_file_names_reader): Remove "data" parameter.
8767 (dw2_get_file_names): Use cutu_reader.
8768 (create_debug_type_hash_table): Update.
8769 (read_cutu_die_from_dwo): Update comment.
8770 (lookup_dwo_unit): Add dwo_name parameter.
8771 (cutu_reader::init_tu_and_read_dwo_dies): Now a method. Remove
8772 die_reader_func_ftype and data parameters.
8773 (cutu_reader::cutu_reader): Rename from init_cutu_and_read_dies.
8774 Remove die_reader_func_ftype and data parameters.
8775 (~cutu_reader): New; from init_cutu_and_read_dies.
8776 (cutu_reader::cutu_reader): Rename from
8777 init_cutu_and_read_dies_no_follow. Remove die_reader_func_ftype
8778 and data parameters.
8779 (init_cutu_and_read_dies_simple): Remove.
8780 (struct process_psymtab_comp_unit_data): Remove.
8781 (process_psymtab_comp_unit_reader): Remove data parameter; add
8782 want_partial_unit and pretend_language parameters.
8783 (process_psymtab_comp_unit): Use cutu_reader.
8784 (build_type_psymtabs_reader): Remove data parameter.
8785 (build_type_psymtabs_1): Use cutu_reader.
8786 (process_skeletonless_type_unit): Likewise.
8787 (load_partial_comp_unit_reader): Remove.
8788 (load_partial_comp_unit): Use cutu_reader.
8789 (load_full_comp_unit_reader): Remove.
8790 (load_full_comp_unit): Use cutu_reader.
8791 (struct create_dwo_cu_data): Remove.
8792 (create_dwo_cu_reader): Remove datap parameter; add dwo_file and
8793 dwo_unit parameters.
8794 (create_cus_hash_table): Use cutu_reader.
8795 (struct dwarf2_read_addr_index_data): Remove.
8796 (dwarf2_read_addr_index_reader): Remove.
8797 (dwarf2_read_addr_index): Use cutu_reader.
8798 (read_signatured_type_reader): Remove.
8799 (read_signatured_type): Use cutu_reader.
8800
8801 2020-01-19 Tom Tromey <tom@tromey.com>
8802
8803 * tui/tui.c (tui_show_assembly): Use tui_suppress_output.
8804 * tui/tui-wingeneral.h (class tui_suppress_output): New.
8805 (tui_wrefresh): Declare.
8806 * tui/tui-wingeneral.c (suppress_output): New global.
8807 (tui_suppress_output, ~tui_suppress_output): New constructor and
8808 destructor.
8809 (tui_wrefresh): New function.
8810 (tui_gen_win_info::refresh_window): Use tui_wrefresh.
8811 (tui_gen_win_info::make_window): Call wnoutrefresh when needed.
8812 * tui/tui-regs.h (struct tui_data_window) <no_refresh>: Declare
8813 method.
8814 * tui/tui-regs.c (tui_data_window::erase_data_content): Call
8815 tui_wrefresh.
8816 (tui_data_window::no_refresh): New method.
8817 (tui_data_item_window::refresh_window): Call tui_wrefresh.
8818 (tui_reg_command): Use tui_suppress_output
8819 * tui/tui-layout.c (tui_set_layout): Use tui_suppress_output.
8820 * tui/tui-data.h (struct tui_gen_win_info) <no_refresh>: New
8821 method.
8822 * tui/tui-command.c (tui_refresh_cmd_win): Call tui_wrefresh.
8823
8824 2020-01-19 Tom Tromey <tom@tromey.com>
8825
8826 * tui/tui-winsource.c (tui_update_source_windows_with_line):
8827 Handle case where symtab is null.
8828
8829 2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
8830
8831 * linux-fork.c (one_fork_p): Simplify.
8832
8833 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
8834
8835 * top.c (struct qt_args): Remove.
8836 (kill_or_detach): Change return type to void, replace `void *`
8837 parameter with a proper one.
8838 (print_inferior_quit_action): Likewise.
8839 (quit_confirm): Use range-based for loop to iterate over inferiors.
8840 (quit_force): Likewise.
8841
8842 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
8843
8844 * mi/mi-main.c (run_one_inferior): Change return type to void, replace
8845 `void *` parameter with proper parameters.
8846 (mi_cmd_exec_run): Use range-based loop to iterate over inferiors.
8847 (print_one_inferior): Change return type to void, replace `void *`
8848 parameter with proper parameters.
8849 (mi_cmd_list_thread_groups): Use range-based loop to iterate over
8850 inferiors.
8851 (get_other_inferior): Remove.
8852 (mi_cmd_remove_inferior): Use range-based loop to iterate over
8853 inferiors.
8854
8855 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
8856
8857 * mi/mi-interp.c (report_initial_inferior): Remove.
8858 (mi_interp::init): Use range-based for to iterate over inferiors.
8859
8860 2020-01-17 Simon Marchi <simon.marchi@efficios.com>
8861
8862 * python/py-inferior.c (build_inferior_list): Remove.
8863 (gdbpy_ref): Use range-based for loop to iterate over inferiors.
8864
8865 2020-01-16 Christian Biesinger <cbiesinger@google.com>
8866
8867 * btrace.c (btrace_compute_ftrace_1): Fix spelling error (Unkown).
8868 (btrace_stitch_trace): Likewise.
8869 * charset.c (intermediate_encoding): Likewise (vaild).
8870 * nat/linux-btrace.c (linux_read_pt): Likewise (Unkown).
8871 * python/py-record-btrace.c (struct PyMethodDef): Likewise (occurences).
8872 * record-btrace.c (record_btrace_print_conf): Likewise (unkown).
8873
8874 2020-01-16 Hannes Domani <ssbssa@yahoo.de>
8875
8876 * windows-tdep.c (windows_get_tlb_type):
8877 Add rtl_user_process_parameters type.
8878
8879 2020-01-16 Pedro Alves <palves@redhat.com>
8880 Norbert Lange <nolange79@gmail.com>
8881
8882 PR build/24805
8883 * gdbsupport/gdb_proc_service.h (PS_EXPORT): New.
8884 (ps_get_thread_area, ps_getpid, ps_lcontinue, ps_lgetfpregs)
8885 (ps_lgetregs, ps_lsetfpregs, ps_lsetregs, ps_lstop, ps_pcontinue)
8886 (ps_pdread, ps_pdwrite, ps_pglobal_lookup, ps_pstop, ps_ptread)
8887 (ps_ptwrite, ps_lgetxregs, ps_lgetxregsize, ps_lsetxregs)
8888 (ps_plog): Redeclare exported functions with default visibility.
8889
8890 2020-01-16 Nitika Achra <Nitika.Achra@amd.com>
8891
8892 * dwarf2loc.c (decode_debug_loclists_addresses): Handle
8893 DW_LLE_base_addressx, DW_LLE_startx_length, DW_LLE_start_length.
8894
8895 2020-01-15 Simon Marchi <simon.marchi@efficios.com>
8896
8897 * infcmd.c (post_create_inferior): Use get_thread_regcache
8898 instead of get_current_regcache.
8899
8900 2020-01-14 Tom Tromey <tom@tromey.com>
8901
8902 PR symtab/12535:
8903 * python/python.c (gdbpy_decode_line): Treat empty string the same
8904 as no argument.
8905
8906 2020-01-14 Tom Tromey <tom@tromey.com>
8907
8908 * Makefile.in (CLIBS): Remove second use of $(LIBIBERTY).
8909
8910 2020-01-14 Tom Tromey <tom@tromey.com>
8911
8912 * nat/linux-btrace.c: Don't include <config.h>.
8913 * nat/linux-ptrace.c: Don't include <config.h>.
8914 * nat/x86-linux-dregs.c: Don't include <config.h>.
8915
8916 2020-01-14 Tom Tromey <tom@tromey.com>
8917
8918 * configure: Rebuild.
8919 * configure.ac: Move many checks to ../gdbsupport/common.m4.
8920
8921 2020-01-14 Tom Tromey <tom@tromey.com>
8922
8923 * nat/x86-linux-dregs.c: Include configh.h.
8924 * nat/linux-ptrace.c: Include configh.h.
8925 * nat/linux-btrace.c: Include configh.h.
8926 * defs.h: Include config.h, bfd.h.
8927 * configure.ac: Don't source common.host.
8928 (CONFIG_OBS, CONFIG_SRCS): Remove gdbsupport files.
8929 * configure: Rebuild.
8930 * acinclude.m4: Update path.
8931 * Makefile.in (SUPPORT, LIBSUPPORT, INCSUPPORT): New variables.
8932 (CONFIG_SRC_SUBDIR): Remove gdbsupport.
8933 (INTERNAL_CFLAGS_BASE): Add INCSUPPORT.
8934 (CLIBS): Add LIBSUPPORT.
8935 (CDEPS): Likewise.
8936 (COMMON_SFILES): Remove gdbsupport files.
8937 (HFILES_NO_SRCDIR): Likewise.
8938 (stamp-version): Update path to create-version.sh.
8939 (ALLDEPFILES): Remove gdbsupport files.
8940
8941 2020-01-14 Tom Tromey <tom@tromey.com>
8942
8943 * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
8944 USE_WIN32API when needed.
8945 * configure.ac (USE_WIN32API): Don't define.
8946 (WIN32LIBS): Use WIN32APILIBS.
8947 * configure: Rebuild.
8948
8949 2020-01-14 Tom Tromey <tom@tromey.com>
8950
8951 * configure: Rebuild.
8952 * gdbsupport/common.m4 (GDB_AC_COMMON): Fix indentation.
8953
8954 2020-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8955
8956 * skip.c (skip_function_command): Make skip w/o arguments use the
8957 name of the inlined function if pc is inside any inlined function.
8958
8959 2020-01-14 Luis Machado <luis.machado@linaro.org>
8960
8961 * inf-ptrace.c (inf_ptrace_target::resume): Update comments.
8962 * infrun.c (resume_1): Likewise.
8963 (handle_inferior_event): Remove stale comment.
8964 * linux-nat.c (linux_nat_target::resume): Update comments.
8965 (save_stop_reason): Likewise.
8966 (linux_nat_filter_event): Likewise.
8967 * linux-nat.h (struct lwp_info) <stop_pc>, <stop_reason>: Likewise.
8968
8969 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
8970
8971 * elfread.c (record_minimal_symbol): Set section index to 0 for
8972 non-allocatable sections.
8973
8974
8975 2020-01-13 Ali Tamur <tamur@google.com>
8976
8977 * dwarf2read.c (dwarf2_debug_sections): Add debug_str_offsets sections.
8978 (dwarf2_cu): Add str_offsets_base field. Change the type of addr_base
8979 to gdb::optional. Update comments.
8980 (dwo_file): Update comments.
8981 (read_attribute): Update API to take an additional out parameter,
8982 need_reprocess. This is used to mark attributes that need other
8983 attributes (e.g. str_offsets_base) for correct computation which may not
8984 have been read yet.
8985 (read_attribute_reprocess): New function declaration.
8986 (read_addr_index): Likewise.
8987 (read_dwo_str_index): Likewise.
8988 (read_stub_str_index): Likewise.
8989 (dwarf2_per_objfile::locate_sections): Handle debug_str_offsets section.
8990 (lookup_addr_base): New function definition.
8991 (lookup_ranges_base): Likewise.
8992 (read_cutu_die_from_dwo): Use the new functions: lookup_addr_base,
8993 lookup_ranges_base.
8994 (init_cutu_and_read_dies): Update comments.
8995 (init_cutu_and_read_dies_no_follow): Change API to take parent compile
8996 unit. This is used to inherit parent's str_offsets_base and addr_base.
8997 Update comments.
8998 (init_cutu_and_read_dies_simple): Reflect API changes.
8999 (skip_one_die): Reflect API changes. Handle DW_FORM_rnglistx.
9000 (create_cus_hash_table): Change API to take parent compile unit.
9001 Reflect API changes.
9002 (open_and_init_dwo_file): Reflect API changes.
9003 (dwarf2_get_pc_bounds): Update comments.
9004 (dwarf2_record_block_ranges): Likewise.
9005 (read_full_die_1): Change implementation to reprocess attributes that
9006 need str_offsets_base and addr_base.
9007 (partial_die_info::read): Likewise.
9008 (read_attribute_reprocess): New function definition.
9009 (read_attribute_value): Change API to take an additional out parameter,
9010 need_reprocess. Handle DW_FORM_rnglistx. No longer trigger an error
9011 when a non-dwo compile unit has index based attributes.
9012 (read_attribute): Reflect API changes.
9013 (read_addr_index_1): Reflect API changes. Update comments.
9014 (dwarf2_read_addr_index_data): Reflect API changes.
9015 (dwarf2_read_addr_index): Likewise.
9016 (read_str_index): Change API and implementation. This becomes a helper
9017 to be used by the new string index related methods. Update error
9018 message and comments.
9019 (read_dwo_str_index): New function definition.
9020 (read_stub_str_index): Likewise.
9021 * dwarf2read.h (dwarf2_per_objfile): Add str_offsets field.
9022 * symfile.h (dwarf2_debug_sections): Likewise.
9023 * xcoffread.c (dwarf2_debug_sections): Likewise.
9024
9025 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9026
9027 * gdbcore.h (struct core_fns) <core_read_registers>: Change
9028 core_reg_sect type to gdb_byte *.
9029 * arm-nbsd-nat.c (fetch_elfcore_registers): Likewise.
9030 * cris-tdep.c (fetch_core_registers): Likewise.
9031 * corelow.c (core_target::get_core_register_section): Change
9032 type of `contents` to gdb::byte_vector.
9033
9034 2020-01-13 Andrew Burgess <andrew.burgess@embecosm.com>
9035
9036 * tui/tui-wingeneral.c (box_win): Position the title in the center
9037 of the border.
9038
9039 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
9040
9041 * corelow.c (core_target::get_core_register_section): Use
9042 std::vector instead of alloca.
9043
9044 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9045
9046 * warning.m4: Add -Wmissing-declarations to build_warnings.
9047 * configure: Re-generate.
9048
9049 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9050
9051 * python/python.c (init__gdb_module): Add declaration.
9052
9053 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
9054
9055 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration.
9056 * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration.
9057 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration.
9058 * aarch64-linux-tdep.c (_initialize_aarch64_linux_tdep): Add declaration.
9059 * aarch64-newlib-tdep.c (_initialize_aarch64_newlib_tdep): Add declaration.
9060 * aarch64-tdep.c (_initialize_aarch64_tdep): Add declaration.
9061 * ada-exp.y (_initialize_ada_exp): Add declaration.
9062 * ada-lang.c (_initialize_ada_language): Add declaration.
9063 * ada-tasks.c (_initialize_tasks): Add declaration.
9064 * agent.c (_initialize_agent): Add declaration.
9065 * aix-thread.c (_initialize_aix_thread): Add declaration.
9066 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Add declaration.
9067 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Add declaration.
9068 * alpha-linux-tdep.c (_initialize_alpha_linux_tdep): Add declaration.
9069 * alpha-nbsd-tdep.c (_initialize_alphanbsd_tdep): Add declaration.
9070 * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Add declaration.
9071 * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
9072 * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): Add declaration.
9073 * amd64-dicos-tdep.c (_initialize_amd64_dicos_tdep): Add declaration.
9074 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Add declaration.
9075 * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Add declaration.
9076 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Add declaration.
9077 * amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Add declaration.
9078 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Add declaration.
9079 * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Add declaration.
9080 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Add declaration.
9081 * amd64-obsd-tdep.c (_initialize_amd64obsd_tdep): Add declaration.
9082 * amd64-sol2-tdep.c (_initialize_amd64_sol2_tdep): Add declaration.
9083 * amd64-tdep.c (_initialize_amd64_tdep): Add declaration.
9084 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Add declaration.
9085 * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Add declaration.
9086 * annotate.c (_initialize_annotate): Add declaration.
9087 * arc-newlib-tdep.c (_initialize_arc_newlib_tdep): Add declaration.
9088 * arc-tdep.c (_initialize_arc_tdep): Add declaration.
9089 * arch-utils.c (_initialize_gdbarch_utils): Add declaration.
9090 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Add declaration.
9091 * arm-fbsd-tdep.c (_initialize_arm_fbsd_tdep): Add declaration.
9092 * arm-linux-nat.c (_initialize_arm_linux_nat): Add declaration.
9093 * arm-linux-tdep.c (_initialize_arm_linux_tdep): Add declaration.
9094 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Add declaration.
9095 * arm-nbsd-tdep.c (_initialize_arm_netbsd_tdep): Add declaration.
9096 * arm-obsd-tdep.c (_initialize_armobsd_tdep): Add declaration.
9097 * arm-pikeos-tdep.c (_initialize_arm_pikeos_tdep): Add declaration.
9098 * arm-symbian-tdep.c (_initialize_arm_symbian_tdep): Add declaration.
9099 * arm-tdep.c (_initialize_arm_tdep): Add declaration.
9100 * arm-wince-tdep.c (_initialize_arm_wince_tdep): Add declaration.
9101 * auto-load.c (_initialize_auto_load): Add declaration.
9102 * auxv.c (_initialize_auxv): Add declaration.
9103 * avr-tdep.c (_initialize_avr_tdep): Add declaration.
9104 * ax-gdb.c (_initialize_ax_gdb): Add declaration.
9105 * bfin-linux-tdep.c (_initialize_bfin_linux_tdep): Add declaration.
9106 * bfin-tdep.c (_initialize_bfin_tdep): Add declaration.
9107 * break-catch-sig.c (_initialize_break_catch_sig): Add declaration.
9108 * break-catch-syscall.c (_initialize_break_catch_syscall): Add declaration.
9109 * break-catch-throw.c (_initialize_break_catch_throw): Add declaration.
9110 * breakpoint.c (_initialize_breakpoint): Add declaration.
9111 * bsd-uthread.c (_initialize_bsd_uthread): Add declaration.
9112 * btrace.c (_initialize_btrace): Add declaration.
9113 * charset.c (_initialize_charset): Add declaration.
9114 * cli/cli-cmds.c (_initialize_cli_cmds): Add declaration.
9115 * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
9116 * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
9117 * cli/cli-logging.c (_initialize_cli_logging): Add declaration.
9118 * cli/cli-script.c (_initialize_cli_script): Add declaration.
9119 * cli/cli-style.c (_initialize_cli_style): Add declaration.
9120 * coff-pe-read.c (_initialize_coff_pe_read): Add declaration.
9121 * coffread.c (_initialize_coffread): Add declaration.
9122 * compile/compile-cplus-types.c (_initialize_compile_cplus_types): Add declaration.
9123 * compile/compile.c (_initialize_compile): Add declaration.
9124 * complaints.c (_initialize_complaints): Add declaration.
9125 * completer.c (_initialize_completer): Add declaration.
9126 * copying.c (_initialize_copying): Add declaration.
9127 * corefile.c (_initialize_core): Add declaration.
9128 * corelow.c (_initialize_corelow): Add declaration.
9129 * cp-abi.c (_initialize_cp_abi): Add declaration.
9130 * cp-namespace.c (_initialize_cp_namespace): Add declaration.
9131 * cp-support.c (_initialize_cp_support): Add declaration.
9132 * cp-valprint.c (_initialize_cp_valprint): Add declaration.
9133 * cris-linux-tdep.c (_initialize_cris_linux_tdep): Add declaration.
9134 * cris-tdep.c (_initialize_cris_tdep): Add declaration.
9135 * csky-linux-tdep.c (_initialize_csky_linux_tdep): Add declaration.
9136 * csky-tdep.c (_initialize_csky_tdep): Add declaration.
9137 * ctfread.c (_initialize_ctfread): Add declaration.
9138 * d-lang.c (_initialize_d_language): Add declaration.
9139 * darwin-nat-info.c (_initialize_darwin_info_commands): Add declaration.
9140 * darwin-nat.c (_initialize_darwin_nat): Add declaration.
9141 * dbxread.c (_initialize_dbxread): Add declaration.
9142 * dcache.c (_initialize_dcache): Add declaration.
9143 * disasm-selftests.c (_initialize_disasm_selftests): Add declaration.
9144 * disasm.c (_initialize_disasm): Add declaration.
9145 * dtrace-probe.c (_initialize_dtrace_probe): Add declaration.
9146 * dummy-frame.c (_initialize_dummy_frame): Add declaration.
9147 * dwarf-index-cache.c (_initialize_index_cache): Add declaration.
9148 * dwarf-index-write.c (_initialize_dwarf_index_write): Add declaration.
9149 * dwarf2-frame-tailcall.c (_initialize_tailcall_frame): Add declaration.
9150 * dwarf2-frame.c (_initialize_dwarf2_frame): Add declaration.
9151 * dwarf2expr.c (_initialize_dwarf2expr): Add declaration.
9152 * dwarf2loc.c (_initialize_dwarf2loc): Add declaration.
9153 * dwarf2read.c (_initialize_dwarf2_read): Add declaration.
9154 * elfread.c (_initialize_elfread): Add declaration.
9155 * exec.c (_initialize_exec): Add declaration.
9156 * extension.c (_initialize_extension): Add declaration.
9157 * f-lang.c (_initialize_f_language): Add declaration.
9158 * f-valprint.c (_initialize_f_valprint): Add declaration.
9159 * fbsd-nat.c (_initialize_fbsd_nat): Add declaration.
9160 * fbsd-tdep.c (_initialize_fbsd_tdep): Add declaration.
9161 * filesystem.c (_initialize_filesystem): Add declaration.
9162 * findcmd.c (_initialize_mem_search): Add declaration.
9163 * findvar.c (_initialize_findvar): Add declaration.
9164 * fork-child.c (_initialize_fork_child): Add declaration.
9165 * frame-base.c (_initialize_frame_base): Add declaration.
9166 * frame-unwind.c (_initialize_frame_unwind): Add declaration.
9167 * frame.c (_initialize_frame): Add declaration.
9168 * frv-linux-tdep.c (_initialize_frv_linux_tdep): Add declaration.
9169 * frv-tdep.c (_initialize_frv_tdep): Add declaration.
9170 * ft32-tdep.c (_initialize_ft32_tdep): Add declaration.
9171 * gcore.c (_initialize_gcore): Add declaration.
9172 * gdb-demangle.c (_initialize_gdb_demangle): Add declaration.
9173 * gdb_bfd.c (_initialize_gdb_bfd): Add declaration.
9174 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Add declaration.
9175 * gdbarch.c (_initialize_gdbarch): Add declaration.
9176 * gdbtypes.c (_initialize_gdbtypes): Add declaration.
9177 * gnu-nat.c (_initialize_gnu_nat): Add declaration.
9178 * gnu-v2-abi.c (_initialize_gnu_v2_abi): Add declaration.
9179 * gnu-v3-abi.c (_initialize_gnu_v3_abi): Add declaration.
9180 * go-lang.c (_initialize_go_language): Add declaration.
9181 * go32-nat.c (_initialize_go32_nat): Add declaration.
9182 * guile/guile.c (_initialize_guile): Add declaration.
9183 * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
9184 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Add declaration.
9185 * hppa-linux-tdep.c (_initialize_hppa_linux_tdep): Add declaration.
9186 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Add declaration.
9187 * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Add declaration.
9188 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Add declaration.
9189 * hppa-obsd-tdep.c (_initialize_hppabsd_tdep): Add declaration.
9190 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
9191 * i386-bsd-nat.c (_initialize_i386bsd_nat): Add declaration.
9192 * i386-cygwin-tdep.c (_initialize_i386_cygwin_tdep): Add declaration.
9193 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Add declaration.
9194 * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): Add declaration.
9195 * i386-dicos-tdep.c (_initialize_i386_dicos_tdep): Add declaration.
9196 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Add declaration.
9197 * i386-fbsd-tdep.c (_initialize_i386fbsd_tdep): Add declaration.
9198 * i386-gnu-nat.c (_initialize_i386gnu_nat): Add declaration.
9199 * i386-gnu-tdep.c (_initialize_i386gnu_tdep): Add declaration.
9200 * i386-go32-tdep.c (_initialize_i386_go32_tdep): Add declaration.
9201 * i386-linux-nat.c (_initialize_i386_linux_nat): Add declaration.
9202 * i386-linux-tdep.c (_initialize_i386_linux_tdep): Add declaration.
9203 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Add declaration.
9204 * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Add declaration.
9205 * i386-nto-tdep.c (_initialize_i386nto_tdep): Add declaration.
9206 * i386-obsd-nat.c (_initialize_i386obsd_nat): Add declaration.
9207 * i386-obsd-tdep.c (_initialize_i386obsd_tdep): Add declaration.
9208 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Add declaration.
9209 * i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Add declaration.
9210 * i386-tdep.c (_initialize_i386_tdep): Add declaration.
9211 * i386-windows-nat.c (_initialize_i386_windows_nat): Add declaration.
9212 * ia64-libunwind-tdep.c (_initialize_libunwind_frame): Add declaration.
9213 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Add declaration.
9214 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Add declaration.
9215 * ia64-tdep.c (_initialize_ia64_tdep): Add declaration.
9216 * ia64-vms-tdep.c (_initialize_ia64_vms_tdep): Add declaration.
9217 * infcall.c (_initialize_infcall): Add declaration.
9218 * infcmd.c (_initialize_infcmd): Add declaration.
9219 * inflow.c (_initialize_inflow): Add declaration.
9220 * infrun.c (_initialize_infrun): Add declaration.
9221 * interps.c (_initialize_interpreter): Add declaration.
9222 * iq2000-tdep.c (_initialize_iq2000_tdep): Add declaration.
9223 * jit.c (_initialize_jit): Add declaration.
9224 * language.c (_initialize_language): Add declaration.
9225 * linux-fork.c (_initialize_linux_fork): Add declaration.
9226 * linux-nat.c (_initialize_linux_nat): Add declaration.
9227 * linux-tdep.c (_initialize_linux_tdep): Add declaration.
9228 * linux-thread-db.c (_initialize_thread_db): Add declaration.
9229 * lm32-tdep.c (_initialize_lm32_tdep): Add declaration.
9230 * m2-lang.c (_initialize_m2_language): Add declaration.
9231 * m32c-tdep.c (_initialize_m32c_tdep): Add declaration.
9232 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Add declaration.
9233 * m32r-linux-tdep.c (_initialize_m32r_linux_tdep): Add declaration.
9234 * m32r-tdep.c (_initialize_m32r_tdep): Add declaration.
9235 * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
9236 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Add declaration.
9237 * m68k-bsd-tdep.c (_initialize_m68kbsd_tdep): Add declaration.
9238 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Add declaration.
9239 * m68k-linux-tdep.c (_initialize_m68k_linux_tdep): Add declaration.
9240 * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
9241 * machoread.c (_initialize_machoread): Add declaration.
9242 * macrocmd.c (_initialize_macrocmd): Add declaration.
9243 * macroscope.c (_initialize_macroscope): Add declaration.
9244 * maint-test-options.c (_initialize_maint_test_options): Add declaration.
9245 * maint-test-settings.c (_initialize_maint_test_settings): Add declaration.
9246 * maint.c (_initialize_maint_cmds): Add declaration.
9247 * mdebugread.c (_initialize_mdebugread): Add declaration.
9248 * memattr.c (_initialize_mem): Add declaration.
9249 * mep-tdep.c (_initialize_mep_tdep): Add declaration.
9250 * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Add declaration.
9251 * mi/mi-cmds.c (_initialize_mi_cmds): Add declaration.
9252 * mi/mi-interp.c (_initialize_mi_interp): Add declaration.
9253 * mi/mi-main.c (_initialize_mi_main): Add declaration.
9254 * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): Add declaration.
9255 * microblaze-tdep.c (_initialize_microblaze_tdep): Add declaration.
9256 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Add declaration.
9257 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Add declaration.
9258 * mips-linux-nat.c (_initialize_mips_linux_nat): Add declaration.
9259 * mips-linux-tdep.c (_initialize_mips_linux_tdep): Add declaration.
9260 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Add declaration.
9261 * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Add declaration.
9262 * mips-sde-tdep.c (_initialize_mips_sde_tdep): Add declaration.
9263 * mips-tdep.c (_initialize_mips_tdep): Add declaration.
9264 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Add declaration.
9265 * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Add declaration.
9266 * mipsread.c (_initialize_mipsread): Add declaration.
9267 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Add declaration.
9268 * mn10300-tdep.c (_initialize_mn10300_tdep): Add declaration.
9269 * moxie-tdep.c (_initialize_moxie_tdep): Add declaration.
9270 * msp430-tdep.c (_initialize_msp430_tdep): Add declaration.
9271 * nds32-tdep.c (_initialize_nds32_tdep): Add declaration.
9272 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Add declaration.
9273 * nios2-tdep.c (_initialize_nios2_tdep): Add declaration.
9274 * nto-procfs.c (_initialize_procfs): Add declaration.
9275 * objc-lang.c (_initialize_objc_language): Add declaration.
9276 * observable.c (_initialize_observer): Add declaration.
9277 * opencl-lang.c (_initialize_opencl_language): Add declaration.
9278 * or1k-linux-tdep.c (_initialize_or1k_linux_tdep): Add declaration.
9279 * or1k-tdep.c (_initialize_or1k_tdep): Add declaration.
9280 * osabi.c (_initialize_gdb_osabi): Add declaration.
9281 * osdata.c (_initialize_osdata): Add declaration.
9282 * p-valprint.c (_initialize_pascal_valprint): Add declaration.
9283 * parse.c (_initialize_parse): Add declaration.
9284 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Add declaration.
9285 * ppc-fbsd-tdep.c (_initialize_ppcfbsd_tdep): Add declaration.
9286 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Add declaration.
9287 * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Add declaration.
9288 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Add declaration.
9289 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Add declaration.
9290 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Add declaration.
9291 * ppc-obsd-tdep.c (_initialize_ppcobsd_tdep): Add declaration.
9292 * printcmd.c (_initialize_printcmd): Add declaration.
9293 * probe.c (_initialize_probe): Add declaration.
9294 * proc-api.c (_initialize_proc_api): Add declaration.
9295 * proc-events.c (_initialize_proc_events): Add declaration.
9296 * proc-service.c (_initialize_proc_service): Add declaration.
9297 * procfs.c (_initialize_procfs): Add declaration.
9298 * producer.c (_initialize_producer): Add declaration.
9299 * psymtab.c (_initialize_psymtab): Add declaration.
9300 * python/python.c (_initialize_python): Add declaration.
9301 * ravenscar-thread.c (_initialize_ravenscar): Add declaration.
9302 * record-btrace.c (_initialize_record_btrace): Add declaration.
9303 * record-full.c (_initialize_record_full): Add declaration.
9304 * record.c (_initialize_record): Add declaration.
9305 * regcache-dump.c (_initialize_regcache_dump): Add declaration.
9306 * regcache.c (_initialize_regcache): Add declaration.
9307 * reggroups.c (_initialize_reggroup): Add declaration.
9308 * remote-notif.c (_initialize_notif): Add declaration.
9309 * remote-sim.c (_initialize_remote_sim): Add declaration.
9310 * remote.c (_initialize_remote): Add declaration.
9311 * reverse.c (_initialize_reverse): Add declaration.
9312 * riscv-fbsd-nat.c (_initialize_riscv_fbsd_nat): Add declaration.
9313 * riscv-fbsd-tdep.c (_initialize_riscv_fbsd_tdep): Add declaration.
9314 * riscv-linux-nat.c (_initialize_riscv_linux_nat): Add declaration.
9315 * riscv-linux-tdep.c (_initialize_riscv_linux_tdep): Add declaration.
9316 * riscv-tdep.c (_initialize_riscv_tdep): Add declaration.
9317 * rl78-tdep.c (_initialize_rl78_tdep): Add declaration.
9318 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Add declaration.
9319 * rs6000-lynx178-tdep.c (_initialize_rs6000_lynx178_tdep):
9320 Add declaration.
9321 * rs6000-nat.c (_initialize_rs6000_nat): Add declaration.
9322 * rs6000-tdep.c (_initialize_rs6000_tdep): Add declaration.
9323 * run-on-main-thread.c (_initialize_run_on_main_thread): Add declaration.
9324 * rust-exp.y (_initialize_rust_exp): Add declaration.
9325 * rx-tdep.c (_initialize_rx_tdep): Add declaration.
9326 * s12z-tdep.c (_initialize_s12z_tdep): Add declaration.
9327 * s390-linux-nat.c (_initialize_s390_nat): Add declaration.
9328 * s390-linux-tdep.c (_initialize_s390_linux_tdep): Add declaration.
9329 * s390-tdep.c (_initialize_s390_tdep): Add declaration.
9330 * score-tdep.c (_initialize_score_tdep): Add declaration.
9331 * ser-go32.c (_initialize_ser_dos): Add declaration.
9332 * ser-mingw.c (_initialize_ser_windows): Add declaration.
9333 * ser-pipe.c (_initialize_ser_pipe): Add declaration.
9334 * ser-tcp.c (_initialize_ser_tcp): Add declaration.
9335 * ser-uds.c (_initialize_ser_socket): Add declaration.
9336 * ser-unix.c (_initialize_ser_hardwire): Add declaration.
9337 * serial.c (_initialize_serial): Add declaration.
9338 * sh-linux-tdep.c (_initialize_sh_linux_tdep): Add declaration.
9339 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Add declaration.
9340 * sh-nbsd-tdep.c (_initialize_shnbsd_tdep): Add declaration.
9341 * sh-tdep.c (_initialize_sh_tdep): Add declaration.
9342 * skip.c (_initialize_step_skip): Add declaration.
9343 * sol-thread.c (_initialize_sol_thread): Add declaration.
9344 * solib-aix.c (_initialize_solib_aix): Add declaration.
9345 * solib-darwin.c (_initialize_darwin_solib): Add declaration.
9346 * solib-dsbt.c (_initialize_dsbt_solib): Add declaration.
9347 * solib-frv.c (_initialize_frv_solib): Add declaration.
9348 * solib-svr4.c (_initialize_svr4_solib): Add declaration.
9349 * solib-target.c (_initialize_solib_target): Add declaration.
9350 * solib.c (_initialize_solib): Add declaration.
9351 * source-cache.c (_initialize_source_cache): Add declaration.
9352 * source.c (_initialize_source): Add declaration.
9353 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Add declaration.
9354 * sparc-linux-tdep.c (_initialize_sparc_linux_tdep): Add declaration.
9355 * sparc-nat.c (_initialize_sparc_nat): Add declaration.
9356 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Add declaration.
9357 * sparc-nbsd-tdep.c (_initialize_sparcnbsd_tdep): Add declaration.
9358 * sparc-obsd-tdep.c (_initialize_sparc32obsd_tdep): Add declaration.
9359 * sparc-sol2-tdep.c (_initialize_sparc_sol2_tdep): Add declaration.
9360 * sparc-tdep.c (_initialize_sparc_tdep): Add declaration.
9361 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Add declaration.
9362 * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Add declaration.
9363 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Add declaration.
9364 * sparc64-linux-tdep.c (_initialize_sparc64_linux_tdep): Add declaration.
9365 * sparc64-nat.c (_initialize_sparc64_nat): Add declaration.
9366 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Add declaration.
9367 * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Add declaration.
9368 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Add declaration.
9369 * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Add declaration.
9370 * sparc64-sol2-tdep.c (_initialize_sparc64_sol2_tdep): Add declaration.
9371 * sparc64-tdep.c (_initialize_sparc64_adi_tdep): Add declaration.
9372 * stabsread.c (_initialize_stabsread): Add declaration.
9373 * stack.c (_initialize_stack): Add declaration.
9374 * stap-probe.c (_initialize_stap_probe): Add declaration.
9375 * std-regs.c (_initialize_frame_reg): Add declaration.
9376 * symfile-debug.c (_initialize_symfile_debug): Add declaration.
9377 * symfile-mem.c (_initialize_symfile_mem): Add declaration.
9378 * symfile.c (_initialize_symfile): Add declaration.
9379 * symmisc.c (_initialize_symmisc): Add declaration.
9380 * symtab.c (_initialize_symtab): Add declaration.
9381 * target.c (_initialize_target): Add declaration.
9382 * target-connection.c (_initialize_target_connection): Add
9383 declaration.
9384 * target-dcache.c (_initialize_target_dcache): Add declaration.
9385 * target-descriptions.c (_initialize_target_descriptions): Add declaration.
9386 * thread.c (_initialize_thread): Add declaration.
9387 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Add declaration.
9388 * tic6x-tdep.c (_initialize_tic6x_tdep): Add declaration.
9389 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Add declaration.
9390 * tilegx-linux-tdep.c (_initialize_tilegx_linux_tdep): Add declaration.
9391 * tilegx-tdep.c (_initialize_tilegx_tdep): Add declaration.
9392 * tracectf.c (_initialize_ctf): Add declaration.
9393 * tracefile-tfile.c (_initialize_tracefile_tfile): Add declaration.
9394 * tracefile.c (_initialize_tracefile): Add declaration.
9395 * tracepoint.c (_initialize_tracepoint): Add declaration.
9396 * tui/tui-hooks.c (_initialize_tui_hooks): Add declaration.
9397 * tui/tui-interp.c (_initialize_tui_interp): Add declaration.
9398 * tui/tui-layout.c (_initialize_tui_layout): Add declaration.
9399 * tui/tui-regs.c (_initialize_tui_regs): Add declaration.
9400 * tui/tui-stack.c (_initialize_tui_stack): Add declaration.
9401 * tui/tui-win.c (_initialize_tui_win): Add declaration.
9402 * tui/tui.c (_initialize_tui): Add declaration.
9403 * typeprint.c (_initialize_typeprint): Add declaration.
9404 * ui-style.c (_initialize_ui_style): Add declaration.
9405 * unittests/array-view-selftests.c (_initialize_array_view_selftests): Add declaration.
9406 * unittests/child-path-selftests.c (_initialize_child_path_selftests): Add declaration.
9407 * unittests/cli-utils-selftests.c (_initialize_cli_utils_selftests): Add declaration.
9408 * unittests/common-utils-selftests.c (_initialize_common_utils_selftests): Add declaration.
9409 * unittests/copy_bitwise-selftests.c (_initialize_copy_bitwise_utils_selftests): Add declaration.
9410 * unittests/environ-selftests.c (_initialize_environ_selftests): Add declaration.
9411 * unittests/filtered_iterator-selftests.c
9412 (_initialize_filtered_iterator_selftests): Add declaration.
9413 * unittests/format_pieces-selftests.c (_initialize_format_pieces_selftests): Add declaration.
9414 * unittests/function-view-selftests.c (_initialize_function_view_selftests): Add declaration.
9415 * unittests/help-doc-selftests.c (_initialize_help_doc_selftests): Add declaration.
9416 * unittests/lookup_name_info-selftests.c (_initialize_lookup_name_info_selftests): Add declaration.
9417 * unittests/main-thread-selftests.c
9418 (_initialize_main_thread_selftests): Add declaration.
9419 * unittests/memory-map-selftests.c (_initialize_memory_map_selftests): Add declaration.
9420 * unittests/memrange-selftests.c (_initialize_memrange_selftests): Add declaration.
9421 * unittests/mkdir-recursive-selftests.c (_initialize_mkdir_recursive_selftests): Add declaration.
9422 * unittests/observable-selftests.c (_initialize_observer_selftest): Add declaration.
9423 * unittests/offset-type-selftests.c (_initialize_offset_type_selftests): Add declaration.
9424 * unittests/optional-selftests.c (_initialize_optional_selftests): Add declaration.
9425 * unittests/parse-connection-spec-selftests.c (_initialize_parse_connection_spec_selftests): Add declaration.
9426 * unittests/rsp-low-selftests.c (_initialize_rsp_low_selftests): Add declaration.
9427 * unittests/scoped_fd-selftests.c (_initialize_scoped_fd_selftests): Add declaration.
9428 * unittests/scoped_mmap-selftests.c (_initialize_scoped_mmap_selftests): Add declaration.
9429 * unittests/scoped_restore-selftests.c (_initialize_scoped_restore_selftests): Add declaration.
9430 * unittests/string_view-selftests.c (_initialize_string_view_selftests): Add declaration.
9431 * unittests/style-selftests.c (_initialize_style_selftest): Add declaration.
9432 * unittests/tracepoint-selftests.c (_initialize_tracepoint_selftests): Add declaration.
9433 * unittests/tui-selftests.c (_initialize_tui_selftest): Add
9434 declaration.
9435 * unittests/unpack-selftests.c (_initialize_unpack_selftests): Add declaration.
9436 * unittests/utils-selftests.c (_initialize_utils_selftests): Add declaration.
9437 * unittests/vec-utils-selftests.c (_initialize_vec_utils_selftests): Add declaration.
9438 * unittests/xml-utils-selftests.c (_initialize_xml_utils): Add declaration.
9439 * user-regs.c (_initialize_user_regs): Add declaration.
9440 * utils.c (_initialize_utils): Add declaration.
9441 * v850-tdep.c (_initialize_v850_tdep): Add declaration.
9442 * valops.c (_initialize_valops): Add declaration.
9443 * valprint.c (_initialize_valprint): Add declaration.
9444 * value.c (_initialize_values): Add declaration.
9445 * varobj.c (_initialize_varobj): Add declaration.
9446 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Add declaration.
9447 * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Add declaration.
9448 * vax-tdep.c (_initialize_vax_tdep): Add declaration.
9449 * windows-nat.c (_initialize_windows_nat): Add declaration.
9450 (_initialize_check_for_gdb_ini): Add declaration.
9451 (_initialize_loadable): Add declaration.
9452 * windows-tdep.c (_initialize_windows_tdep): Add declaration.
9453 * x86-bsd-nat.c (_initialize_x86_bsd_nat): Add declaration.
9454 * x86-linux-nat.c (_initialize_x86_linux_nat): Add declaration.
9455 * xcoffread.c (_initialize_xcoffread): Add declaration.
9456 * xml-support.c (_initialize_xml_support): Add declaration.
9457 * xstormy16-tdep.c (_initialize_xstormy16_tdep): Add declaration.
9458 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Add declaration.
9459 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Add declaration.
9460 * xtensa-tdep.c (_initialize_xtensa_tdep): Add declaration.
9461
9462 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
9463
9464 * regformats/regdat.sh: Generate declaration for init function.
9465
9466 2020-01-13 Simon Marchi <simon.marchi@polymtl.ca>
9467
9468 * remote-sim.c (next_pid, INITIAL_PID, sim_inferior_data): Move
9469 up.
9470 (gdbsim_target) <get_inferior_data_by_ptid, resume_one_inferior,
9471 close_one_inferior>: New methods.
9472 (get_sim_inferior_data_by_ptid): Move to gdbsim_target,
9473 pass down target to find_inferior_pid.
9474 (gdbsim_target::fetch_registers, gdbsim_target::store_registers):
9475 Pass down target to find_inferior_ptid.
9476 (gdbsim_target::create_inferior): Pass down target to
9477 add_thread_silent.
9478 (gdbsim_close_inferior): Move to gdbsim_close_inferior, pass
9479 target down to find_inferior_ptid and switch_to_thread.
9480 (gdbsim_target::close): Update to call close_one_inferior.
9481 (struct resume_data): Remove.
9482 (gdbsim_resume_inferior): Move to gdbsim_target. Take arguments
9483 directly, rather than through a void pointer.
9484 (gdbsim_target::resume): Update to call resume_one_inferior.
9485
9486 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
9487
9488 * gdbsupport/gdb_wait.c: Include gdb_wait.h.
9489
9490 2020-01-12 Pedro Alves <palves@redhat.com>
9491
9492 * bsd-kvm.c (bsd_kvm_target::close): Call exit_inferior_silent
9493 directly for the current inferior instead of
9494 discard_all_inferiors.
9495 (discard_all_inferiors): Delete.
9496
9497 2020-01-11 Tom Tromey <tom@tromey.com>
9498
9499 * tui/tui-wingeneral.c (box_win): Check cli_styling.
9500 * tui/tui-winsource.c (tui_source_window_base::refill): Use
9501 deprecated_safe_get_selected_frame.
9502
9503 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
9504
9505 * inferior.c (print_inferior): Switch inferior before printing it.
9506
9507 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
9508 Pedro Alves <palves@redhat.com>
9509
9510 * progspace-and-thread.c (switch_to_program_space_and_thread):
9511 Assert there's an inferior for PSPACE. Use
9512 switch_to_inferior_no_thread to switch the inferior too.
9513 * progspace.c (program_space::~program_space): Call
9514 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
9515 (program_space::free_all_objfiles): Don't call clear_symtab_users
9516 here.
9517 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
9518
9519 2020-01-10 Pedro Alves <palves@redhat.com>
9520
9521 * NEWS: Mention multi-target debugging, "info connections", and
9522 "add-inferior -no-connection".
9523
9524 2020-01-10 Pedro Alves <palves@redhat.com>
9525
9526 * infrun.c: Include "target-connection.h".
9527 (check_multi_target_resumption): New.
9528 (proceed): Call it.
9529 * target-connection.c (make_target_connection_string): Make
9530 extern.
9531 * target-connection.h (make_target_connection_string): Declare.
9532
9533 2020-01-10 Pedro Alves <palves@redhat.com>
9534
9535 * Makefile.in (COMMON_SFILES): Add target-connection.c.
9536 * inferior.c (uiout_field_connection): New function.
9537 (print_inferior): Add new "connection-id" column.
9538 (add_inferior_command): Show connection number/string of added
9539 inferior.
9540 * process-stratum-target.h
9541 (process_stratum_target::connection_string): New virtual method.
9542 (process_stratum_target::connection_number): New field.
9543 * remote.c (remote_target::connection_string): New override.
9544 * target-connection.c: New file.
9545 * target-connection.h: New file.
9546 * target.c (decref_target): Remove process_stratum targets from
9547 the connection list.
9548 (target_stack::push): Add process_stratum targets to the
9549 connection list.
9550
9551 2020-01-10 Pedro Alves <palves@redhat.com>
9552
9553 Revert:
9554 2016-04-12 Pedro Alves <palves@redhat.com>
9555 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
9556 Remove references to name.
9557 * serial.h (struct serial) <name>: Delete.
9558
9559 2020-01-10 Pedro Alves <palves@redhat.com>
9560
9561 * gdbarch-selftests.c (register_to_value_test): Remove "target
9562 already pushed" check.
9563
9564 2020-01-10 Pedro Alves <palves@redhat.com>
9565 John Baldwin <jhb@FreeBSD.org>
9566
9567 * aarch64-linux-nat.c
9568 (aarch64_linux_nat_target::thread_architecture): Adjust.
9569 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
9570 (task_command_1): Likewise.
9571 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
9572 (aix_thread_target::wait, aix_thread_target::fetch_registers)
9573 (aix_thread_target::store_registers)
9574 (aix_thread_target::thread_alive): Adjust.
9575 * amd64-fbsd-tdep.c: Include "inferior.h".
9576 (amd64fbsd_get_thread_local_address): Pass down target.
9577 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
9578 thread's gdbarch instead of target_gdbarch.
9579 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
9580 get_last_target_status.
9581 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
9582 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
9583 inferiors.
9584 (update_inserted_breakpoint_locations): Skip if inferiors with no
9585 execution.
9586 (update_global_location_list): When handling moribund locations,
9587 find representative inferior for location's pspace, and use thread
9588 count of its process_stratum target.
9589 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
9590 * bsd-uthread.c (bsd_uthread_target::wait): Use
9591 as_process_stratum_target and adjust thread_change_ptid and
9592 add_thread calls.
9593 (bsd_uthread_target::update_thread_list): Use
9594 as_process_stratum_target and adjust find_thread_ptid,
9595 thread_change_ptid and add_thread calls.
9596 * btrace.c (maint_btrace_packet_history_cmd): Adjust
9597 find_thread_ptid call.
9598 * corelow.c (add_to_thread_list): Adjust add_thread call.
9599 (core_target_open): Adjust add_thread_silent and thread_count
9600 calls.
9601 (core_target::pid_to_str): Adjust find_inferior_ptid call.
9602 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
9603 * event-top.c (async_disconnect): Pop targets from all inferiors.
9604 * exec.c (add_target_sections): Push exec target on all inferiors
9605 sharing the program space.
9606 (remove_target_sections): Remove the exec target from all
9607 inferiors sharing the program space.
9608 (exec_on_vfork): New.
9609 * exec.h (exec_on_vfork): Declare.
9610 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
9611 Pass it down.
9612 (fbsd_nat_target::update_thread_list): Adjust.
9613 (fbsd_nat_target::resume): Adjust.
9614 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
9615 down.
9616 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
9617 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
9618 get_thread_arch_regcache call.
9619 * fork-child.c (gdb_startup_inferior): Pass target down to
9620 startup_inferior and set_executing.
9621 * gdbthread.h (struct process_stratum_target): Forward declare.
9622 (add_thread, add_thread_silent, add_thread_with_info)
9623 (in_thread_list): Add process_stratum_target parameter.
9624 (find_thread_ptid(inferior*, ptid_t)): New overload.
9625 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
9626 parameter.
9627 (all_threads()): Delete overload.
9628 (all_threads, all_non_exited_threads): Add process_stratum_target
9629 parameter.
9630 (all_threads_safe): Use brace initialization.
9631 (thread_count): Add process_stratum_target parameter.
9632 (set_resumed, set_running, set_stop_requested, set_executing)
9633 (threads_are_executing, finish_thread_state): Add
9634 process_stratum_target parameter.
9635 (switch_to_thread): Use is_current_thread.
9636 * i386-fbsd-tdep.c: Include "inferior.h".
9637 (i386fbsd_get_thread_local_address): Pass down target.
9638 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
9639 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
9640 have_inferiors check.
9641 * inf-ptrace.c (inf_ptrace_target::create_inferior)
9642 (inf_ptrace_target::attach): Adjust.
9643 * infcall.c (run_inferior_call): Adjust.
9644 * infcmd.c (run_command_1): Pass target to
9645 scoped_finish_thread_state.
9646 (proceed_thread_callback): Skip inferiors with no execution.
9647 (continue_command): Rename 'all_threads' local to avoid hiding
9648 'all_threads' function. Adjust get_last_target_status call.
9649 (prepare_one_step): Adjust set_running call.
9650 (signal_command): Use user_visible_resume_target. Compare thread
9651 pointers instead of inferior_ptid.
9652 (info_program_command): Adjust to pass down target.
9653 (attach_command): Mark target's 'thread_executing' flag.
9654 (stop_current_target_threads_ns): New, factored out from ...
9655 (interrupt_target_1): ... this. Switch inferior before making
9656 target calls.
9657 * inferior-iter.h
9658 (struct all_inferiors_iterator, struct all_inferiors_range)
9659 (struct all_inferiors_safe_range)
9660 (struct all_non_exited_inferiors_range): Filter on
9661 process_stratum_target too. Remove explicit.
9662 * inferior.c (inferior::inferior): Push dummy target on target
9663 stack.
9664 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
9665 Add process_stratum_target parameter, and pass it down.
9666 (have_live_inferiors): Adjust.
9667 (switch_to_inferior_and_push_target): New.
9668 (add_inferior_command, clone_inferior_command): Handle
9669 "-no-connection" parameter. Use
9670 switch_to_inferior_and_push_target.
9671 (_initialize_inferior): Mention "-no-connection" option in
9672 the help of "add-inferior" and "clone-inferior" commands.
9673 * inferior.h: Include "process-stratum-target.h".
9674 (interrupt_target_1): Use bool.
9675 (struct inferior) <push_target, unpush_target, target_is_pushed,
9676 find_target_beneath, top_target, process_target, target_at,
9677 m_stack>: New.
9678 (discard_all_inferiors): Delete.
9679 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
9680 (all_inferiors, all_non_exited_inferiors): Add
9681 process_stratum_target parameter.
9682 * infrun.c: Include "gdb_select.h" and <unordered_map>.
9683 (target_last_proc_target): New global.
9684 (follow_fork_inferior): Push target on new inferior. Pass target
9685 to add_thread_silent. Call exec_on_vfork. Handle target's
9686 reference count.
9687 (follow_fork): Adjust get_last_target_status call. Also consider
9688 target.
9689 (follow_exec): Push target on new inferior.
9690 (struct execution_control_state) <target>: New field.
9691 (user_visible_resume_target): New.
9692 (do_target_resume): Call target_async.
9693 (resume_1): Set target's threads_executing flag. Consider resume
9694 target.
9695 (commit_resume_all_targets): New.
9696 (proceed): Also consider resume target. Skip threads of inferiors
9697 with no execution. Commit resumtion in all targets.
9698 (start_remote): Pass current inferior to wait_for_inferior.
9699 (infrun_thread_stop_requested): Consider target as well. Pass
9700 thread_info pointer to clear_inline_frame_state instead of ptid.
9701 (infrun_thread_thread_exit): Consider target as well.
9702 (random_pending_event_thread): New inferior parameter. Use it.
9703 (do_target_wait): Rename to ...
9704 (do_target_wait_1): ... this. Add inferior parameter, and pass it
9705 down.
9706 (threads_are_resumed_pending_p, do_target_wait): New.
9707 (prepare_for_detach): Adjust calls.
9708 (wait_for_inferior): New inferior parameter. Handle it. Use
9709 do_target_wait_1 instead of do_target_wait.
9710 (fetch_inferior_event): Adjust. Switch to representative
9711 inferior. Pass target down.
9712 (set_last_target_status): Add process_stratum_target parameter.
9713 Save target in global.
9714 (get_last_target_status): Add process_stratum_target parameter and
9715 handle it.
9716 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
9717 (context_switch): Check inferior_ptid == null_ptid before calling
9718 inferior_thread().
9719 (get_inferior_stop_soon): Pass down target.
9720 (wait_one): Rename to ...
9721 (poll_one_curr_target): ... this.
9722 (struct wait_one_event): New.
9723 (wait_one): New.
9724 (stop_all_threads): Adjust.
9725 (handle_no_resumed, handle_inferior_event): Adjust to consider the
9726 event's target.
9727 (switch_back_to_stepped_thread): Also consider target.
9728 (print_stop_event): Update.
9729 (normal_stop): Update. Also consider the resume target.
9730 * infrun.h (wait_for_inferior): Remove declaration.
9731 (user_visible_resume_target): New declaration.
9732 (get_last_target_status, set_last_target_status): New
9733 process_stratum_target parameter.
9734 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
9735 process_stratum_target parameter, and use it.
9736 (clear_inline_frame_state (thread_info*)): New.
9737 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
9738 process_stratum_target parameter.
9739 (clear_inline_frame_state (thread_info*)): Declare.
9740 * linux-fork.c (delete_checkpoint_command): Pass target down to
9741 find_thread_ptid.
9742 (checkpoint_command): Adjust.
9743 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
9744 instead of just tweaking inferior_ptid.
9745 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
9746 (exit_lwp): Pass target down to find_thread_ptid.
9747 (attach_proc_task_lwp_callback): Pass target down to
9748 add_thread/set_running/set_executing.
9749 (linux_nat_target::attach): Pass target down to
9750 thread_change_ptid.
9751 (get_detach_signal): Pass target down to find_thread_ptid.
9752 Consider last target status's target.
9753 (linux_resume_one_lwp_throw, resume_lwp)
9754 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
9755 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
9756 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
9757 (linux_nat_target::async_wait_fd): New.
9758 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
9759 target down.
9760 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
9761 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
9762 * linux-thread-db.c (struct thread_db_info::process_target): New
9763 field.
9764 (add_thread_db_info): Save target.
9765 (get_thread_db_info): New process_stratum_target parameter. Also
9766 match target.
9767 (delete_thread_db_info): New process_stratum_target parameter.
9768 Also match target.
9769 (thread_from_lwp): Adjust to pass down target.
9770 (thread_db_notice_clone): Pass down target.
9771 (check_thread_db_callback): Pass down target.
9772 (try_thread_db_load_1): Always push the thread_db target.
9773 (try_thread_db_load, record_thread): Pass target down.
9774 (thread_db_target::detach): Pass target down. Always unpush the
9775 thread_db target.
9776 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
9777 target down. Always unpush the thread_db target.
9778 (find_new_threads_callback, thread_db_find_new_threads_2)
9779 (thread_db_target::update_thread_list): Pass target down.
9780 (thread_db_target::pid_to_str): Pass current inferior down.
9781 (thread_db_target::get_thread_local_address): Pass target down.
9782 (thread_db_target::resume, maintenance_check_libthread_db): Pass
9783 target down.
9784 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
9785 * procfs.c (procfs_target::procfs_init_inferior): Declare.
9786 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
9787 (procfs_init_inferior): Rename to ...
9788 (procfs_target::procfs_init_inferior): ... this and adjust.
9789 (procfs_target::create_inferior, procfs_notice_thread)
9790 (procfs_do_thread_registers): Adjust.
9791 * ppc-fbsd-tdep.c: Include "inferior.h".
9792 (ppcfbsd_get_thread_local_address): Pass down target.
9793 * proc-service.c (ps_xfer_memory): Switch current inferior and
9794 program space as well.
9795 (get_ps_regcache): Pass target down.
9796 * process-stratum-target.c
9797 (process_stratum_target::thread_address_space)
9798 (process_stratum_target::thread_architecture): Pass target down.
9799 * process-stratum-target.h
9800 (process_stratum_target::threads_executing): New field.
9801 (as_process_stratum_target): New.
9802 * ravenscar-thread.c
9803 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
9804 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
9805 down.
9806 * record-btrace.c (record_btrace_target::info_record): Adjust.
9807 (record_btrace_target::record_method)
9808 (record_btrace_target::record_is_replaying)
9809 (record_btrace_target::fetch_registers)
9810 (get_thread_current_frame_id, record_btrace_target::resume)
9811 (record_btrace_target::wait, record_btrace_target::stop): Pass
9812 target down.
9813 * record-full.c (record_full_wait_1): Switch to event thread.
9814 Pass target down.
9815 * regcache.c (regcache::regcache)
9816 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
9817 process_stratum_target parameter and handle it.
9818 (current_thread_target): New global.
9819 (get_thread_regcache): Add process_stratum_target parameter and
9820 handle it. Switch inferior before calling target method.
9821 (get_thread_regcache): Pass target down.
9822 (get_thread_regcache_for_ptid): Pass target down.
9823 (registers_changed_ptid): Add process_stratum_target parameter and
9824 handle it.
9825 (registers_changed_thread, registers_changed): Pass target down.
9826 (test_get_thread_arch_aspace_regcache): New.
9827 (current_regcache_test): Define a couple local test_target_ops
9828 instances and use them for testing.
9829 (readwrite_regcache): Pass process_stratum_target parameter.
9830 (cooked_read_test, cooked_write_test): Pass mock_target down.
9831 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
9832 (get_thread_arch_aspace_regcache): Add process_stratum_target
9833 parameter.
9834 (regcache::target): New method.
9835 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
9836 (regcache::registers_changed_ptid): Add process_stratum_target
9837 parameter.
9838 (regcache::m_target): New field.
9839 (registers_changed_ptid): Add process_stratum_target parameter.
9840 * remote.c (remote_state::supports_vCont_probed): New field.
9841 (remote_target::async_wait_fd): New method.
9842 (remote_unpush_and_throw): Add remote_target parameter.
9843 (get_current_remote_target): Adjust.
9844 (remote_target::remote_add_inferior): Push target.
9845 (remote_target::remote_add_thread)
9846 (remote_target::remote_notice_new_inferior)
9847 (get_remote_thread_info): Pass target down.
9848 (remote_target::update_thread_list): Skip threads of inferiors
9849 bound to other targets. (remote_target::close): Don't discard
9850 inferiors. (remote_target::add_current_inferior_and_thread)
9851 (remote_target::process_initial_stop_replies)
9852 (remote_target::start_remote)
9853 (remote_target::remote_serial_quit_handler): Pass down target.
9854 (remote_target::remote_unpush_target): New remote_target
9855 parameter. Unpush the target from all inferiors.
9856 (remote_target::remote_unpush_and_throw): New remote_target
9857 parameter. Pass it down.
9858 (remote_target::open_1): Check whether the current inferior has
9859 execution instead of checking whether any inferior is live. Pass
9860 target down.
9861 (remote_target::remote_detach_1): Pass down target. Use
9862 remote_unpush_target.
9863 (extended_remote_target::attach): Pass down target.
9864 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
9865 (remote_target::append_resumption): Pass down target.
9866 (remote_target::append_pending_thread_resumptions)
9867 (remote_target::remote_resume_with_hc, remote_target::resume)
9868 (remote_target::commit_resume): Pass down target.
9869 (remote_target::remote_stop_ns): Check supports_vCont_probed.
9870 (remote_target::interrupt_query)
9871 (remote_target::remove_new_fork_children)
9872 (remote_target::check_pending_events_prevent_wildcard_vcont)
9873 (remote_target::remote_parse_stop_reply)
9874 (remote_target::process_stop_reply): Pass down target.
9875 (first_remote_resumed_thread): New remote_target parameter. Pass
9876 it down.
9877 (remote_target::wait_as): Pass down target.
9878 (unpush_and_perror): New remote_target parameter. Pass it down.
9879 (remote_target::readchar, remote_target::remote_serial_write)
9880 (remote_target::getpkt_or_notif_sane_1)
9881 (remote_target::kill_new_fork_children, remote_target::kill): Pass
9882 down target.
9883 (remote_target::mourn_inferior): Pass down target. Use
9884 remote_unpush_target.
9885 (remote_target::core_of_thread)
9886 (remote_target::remote_btrace_maybe_reopen): Pass down target.
9887 (remote_target::pid_to_exec_file)
9888 (remote_target::thread_handle_to_thread_info): Pass down target.
9889 (remote_target::async_wait_fd): New.
9890 * riscv-fbsd-tdep.c: Include "inferior.h".
9891 (riscv_fbsd_get_thread_local_address): Pass down target.
9892 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
9893 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
9894 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
9895 Adjust.
9896 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
9897 * solib-svr4.c (enable_break): Pass down target.
9898 * spu-multiarch.c (parse_spufs_run): Pass down target.
9899 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
9900 * target-delegates.c: Regenerate.
9901 * target.c (g_target_stack): Delete.
9902 (current_top_target): Return the current inferior's top target.
9903 (target_has_execution_1): Refer to the passed-in inferior's top
9904 target.
9905 (target_supports_terminal_ours): Check whether the initial
9906 inferior was already created.
9907 (decref_target): New.
9908 (target_stack::push): Incref/decref the target.
9909 (push_target, push_target, unpush_target): Adjust.
9910 (target_stack::unpush): Defref target.
9911 (target_is_pushed): Return bool. Adjust to refer to the current
9912 inferior's target stack.
9913 (dispose_inferior): Delete, and inline parts ...
9914 (target_preopen): ... here. Only dispose of the current inferior.
9915 (target_detach): Hold strong target reference while detaching.
9916 Pass target down.
9917 (target_thread_name): Add assertion.
9918 (target_resume): Pass down target.
9919 (target_ops::beneath, find_target_at): Adjust to refer to the
9920 current inferior's target stack.
9921 (get_dummy_target): New.
9922 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
9923 has a thread running.
9924 (initialize_targets): Rename to ...
9925 (_initialize_target): ... this.
9926 * target.h: Include "gdbsupport/refcounted-object.h".
9927 (struct target_ops): Inherit refcounted_object.
9928 (target_ops::shortname, target_ops::longname): Make const.
9929 (target_ops::async_wait_fd): New method.
9930 (decref_target): Declare.
9931 (struct target_ops_ref_policy): New.
9932 (target_ops_ref): New typedef.
9933 (get_dummy_target): Declare function.
9934 (target_is_pushed): Return bool.
9935 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
9936 (all_matching_threads_iterator::all_matching_threads_iterator):
9937 Handle filter target.
9938 * thread-iter.h (struct all_matching_threads_iterator, struct
9939 all_matching_threads_range, class all_non_exited_threads_range):
9940 Filter by target too. Remove explicit.
9941 * thread.c (threads_executing): Delete.
9942 (inferior_thread): Pass down current inferior.
9943 (clear_thread_inferior_resources): Pass down thread pointer
9944 instead of ptid_t.
9945 (add_thread_silent, add_thread_with_info, add_thread): Add
9946 process_stratum_target parameter. Use it for thread and inferior
9947 searches.
9948 (is_current_thread): New.
9949 (thread_info::deletable): Use it.
9950 (find_thread_ptid, thread_count, in_thread_list)
9951 (thread_change_ptid, set_resumed, set_running): New
9952 process_stratum_target parameter. Pass it down.
9953 (set_executing): New process_stratum_target parameter. Pass it
9954 down. Adjust reference to 'threads_executing'.
9955 (threads_are_executing): New process_stratum_target parameter.
9956 Adjust reference to 'threads_executing'.
9957 (set_stop_requested, finish_thread_state): New
9958 process_stratum_target parameter. Pass it down.
9959 (switch_to_thread): Also match inferior.
9960 (switch_to_thread): New process_stratum_target parameter. Pass it
9961 down.
9962 (update_threads_executing): Reimplement.
9963 * top.c (quit_force): Pop targets from all inferior.
9964 (gdb_init): Don't call initialize_targets.
9965 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
9966 Declare.
9967 (windows_add_thread, windows_delete_thread): Adjust.
9968 (get_windows_debug_event): Rename to ...
9969 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
9970 * tracefile-tfile.c (tfile_target_open): Pass down target.
9971 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
9972 Forward declare.
9973 (switch_to_thread): Add process_stratum_target parameter.
9974 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
9975 parameter. Use it.
9976 (mi_on_resume): Pass target down.
9977 * nat/fork-inferior.c (startup_inferior): Add
9978 process_stratum_target parameter. Pass it down.
9979 * nat/fork-inferior.h (startup_inferior): Add
9980 process_stratum_target parameter.
9981 * python/py-threadevent.c (py_get_event_thread): Pass target down.
9982
9983 2020-01-10 Pedro Alves <palves@redhat.com>
9984
9985 * remote.c (remote_target::start_remote): Don't set inferior_ptid
9986 directly. Instead find the first thread in the thread list and
9987 use switch_to_thread.
9988
9989 2020-01-10 Pedro Alves <palves@redhat.com>
9990
9991 * remote.c (remote_target::remote_add_inferior): Don't bind a
9992 process to the current inferior if the current inferior is already
9993 bound to a process.
9994
9995 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
9996 Pedro Alves <palves@redhat.com>
9997
9998 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
9999 If no process is specified, return null_ptid instead of
10000 inferior_ptid.
10001 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
10002 TARGET_WAITKIND_SIGNALLED with no pid.
10003
10004 2020-01-10 Pedro Alves <palves@redhat.com>
10005
10006 * remote.c (first_remote_resumed_thread): New.
10007 (remote_target::wait_as): Use it as default event_ptid instead of
10008 inferior_ptid.
10009
10010 2020-01-10 Pedro Alves <palves@redhat.com>
10011
10012 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
10013
10014 2020-01-10 Pedro Alves <palves@redhat.com>
10015
10016 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
10017 not -1.
10018
10019 2020-01-10 Pedro Alves <palves@redhat.com>
10020
10021 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
10022 ptid to get_last_target_status.
10023 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
10024 ptid to get_last_target_status.
10025 * infcmd.c (continue_command): Don't pass a target_waitstatus to
10026 get_last_target_status.
10027 (info_program_command): Don't pass a target_waitstatus to
10028 get_last_target_status.
10029 * infrun.c (init_wait_for_inferior): Use
10030 nullify_last_target_wait_ptid.
10031 (get_last_target_status): Handle nullptr arguments.
10032 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
10033 (print_stop_event): Don't pass a ptid to get_last_target_status.
10034 (normal_stop): Don't pass a ptid to get_last_target_status.
10035 * infrun.h (get_last_target_status, set_last_target_status): Move
10036 comments here and update.
10037 (nullify_last_target_wait_ptid): Declare.
10038 * linux-fork.c (fork_load_infrun_state): Remove local extern
10039 declaration of nullify_last_target_wait_ptid.
10040 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
10041 to get_last_target_status.
10042
10043 2020-01-10 Pedro Alves <palves@redhat.com>
10044
10045 * gdbthread.h (scoped_restore_current_thread)
10046 <dont_restore, restore, m_dont_restore>: Declare.
10047 * thread.c (thread_alive): Add assertion. Return bool.
10048 (switch_to_thread_if_alive): New.
10049 (prune_threads): Switch inferior/thread.
10050 (print_thread_info_1): Switch thread before calling target methods.
10051 (scoped_restore_current_thread::restore): New, factored out from
10052 ...
10053 (scoped_restore_current_thread::~scoped_restore_current_thread):
10054 ... this.
10055 (scoped_restore_current_thread::scoped_restore_current_thread):
10056 Add assertion.
10057 (thread_apply_all_command, thread_select): Use
10058 switch_to_thread_if_alive.
10059 * infrun.c (proceed, restart_threads, handle_signal_stop)
10060 (switch_back_to_stepped_thread): Switch current thread before
10061 calling target methods.
10062
10063 2020-01-10 Pedro Alves <palves@redhat.com>
10064
10065 * inferior.c (switch_to_inferior_no_thread): New function,
10066 factored out from ...
10067 (inferior_command): ... here.
10068 * inferior.h (switch_to_inferior_no_thread): Declare.
10069 * mi/mi-main.c (run_one_inferior): Use
10070 switch_to_inferior_no_thread.
10071
10072 2020-01-10 Pedro Alves <palves@redhat.com>
10073
10074 * infcmd.c (kill_command): Remove dead code.
10075
10076 2020-01-10 Pedro Alves <palves@redhat.com>
10077
10078 * remote.c (remote_target::mourn_inferior): No longer check
10079 whether the target is running.
10080
10081 2020-01-10 Pedro Alves <palves@redhat.com>
10082
10083 * corelow.c (core_target::has_execution): Change parameter type to
10084 inferior pointer.
10085 * inferior.c (number_of_live_inferiors): Use
10086 inferior::has_execution instead of target_has_execution_1.
10087 * inferior.h (inferior::has_execution): New.
10088 * linux-thread-db.c (thread_db_target::update_thread_list): Use
10089 inferior::has_execution instead of target_has_execution_1.
10090 * process-stratum-target.c
10091 (process_stratum_target::has_execution): Change parameter type to
10092 inferior pointer. Check the inferior's PID instead of
10093 inferior_ptid.
10094 * process-stratum-target.h
10095 (process_stratum_target::has_execution): Change parameter type to
10096 inferior pointer.
10097 * record-full.c (record_full_core_target::has_execution): Change
10098 parameter type to inferior pointer.
10099 * target.c (target_has_execution_1): Change parameter type to
10100 inferior pointer.
10101 (target_has_execution_current): Adjust.
10102 * target.h (target_ops::has_execution): Change parameter type to
10103 inferior pointer.
10104 (target_has_execution_1): Change parameter type to inferior
10105 pointer. Change return type to bool.
10106 * tracefile.h (tracefile_target::has_execution): Change parameter
10107 type to inferior pointer.
10108
10109 2020-01-10 Pedro Alves <palves@redhat.com>
10110
10111 * exceptions.c (print_flush): Remove current_top_target() check.
10112
10113 2020-01-10 Pedro Alves <palves@redhat.com>
10114
10115 * remote.c (show_remote_exec_file): Show the current inferior's
10116 exec-file instead of the command variable's value.
10117
10118 2020-01-10 Pedro Alves <palves@redhat.com>
10119
10120 * record-full.c (record_full_resume_ptid): New global.
10121 (record_full_target::resume): Set it.
10122 (record_full_wait_1): Use record_full_resume_ptid instead of
10123 inferior_ptid.
10124
10125 2020-01-10 Pedro Alves <palves@redhat.com>
10126
10127 * gdbthread.h (scoped_restore_current_thread)
10128 <dont_restore, restore, m_dont_restore>: Declare.
10129 * thread.c (thread_alive): Add assertion. Return bool.
10130 (switch_to_thread_if_alive): New.
10131 (prune_threads): Switch inferior/thread.
10132 (print_thread_info_1): Switch thread before calling target methods.
10133 (scoped_restore_current_thread::restore): New, factored out from
10134 ...
10135 (scoped_restore_current_thread::~scoped_restore_current_thread):
10136 ... this.
10137 (scoped_restore_current_thread::scoped_restore_current_thread):
10138 Add assertion.
10139 (thread_apply_all_command, thread_select): Use
10140 switch_to_thread_if_alive.
10141
10142 2020-01-10 George Barrett <bob@bob131.so>
10143
10144 * stap-probe.c (stap_modify_semaphore): Don't check for null
10145 semaphores.
10146 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
10147 for null semaphores.
10148
10149 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
10150
10151 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
10152 all source windows, and maintain horizontal scroll status while
10153 doing so.
10154
10155 2020-01-09 Tom Tromey <tom@tromey.com>
10156
10157 PR tui/18932:
10158 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
10159 update_source_window, not print_source_lines.
10160
10161 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
10162
10163 * tui/tui.c (tui_enable): Register tui hooks after calling
10164 tui_display_main.
10165
10166 2020-01-09 Christian Biesinger <cbiesinger@google.com>
10167
10168 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
10169
10170 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
10171
10172 * thread.c (print_thread_info_1): Fix indentation.
10173
10174 2020-01-09 Christian Biesinger <cbiesinger@google.com>
10175
10176 * symtab.c (general_symbol_info::compute_and_set_names): Move the
10177 unique_xmalloc_ptr outside the if to always free the demangled name.
10178
10179 2020-01-08 Tom Tromey <tromey@adacore.com>
10180
10181 * xcoffread.c (enter_line_range, read_xcoff_symtab)
10182 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
10183 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
10184 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
10185 Remove.
10186 (section_offsets): New typedef.
10187 * symtab.c (fixup_section, get_msymbol_address): Update.
10188 * symmisc.c (dump_msymbols): Update.
10189 * symfile.h (relative_addr_info_to_section_offsets)
10190 (symfile_map_offsets_to_segments): Update.
10191 * symfile.c (build_section_addr_info_from_objfile)
10192 (init_objfile_sect_indices): Update.
10193 (struct place_section_arg): Change type of "offsets".
10194 (place_section): Update.
10195 (relative_addr_info_to_section_offsets): Change type of
10196 "section_offsets". Remove "num_sections" parameter.
10197 (default_symfile_offsets, syms_from_objfile_1)
10198 (set_objfile_default_section_offset): Update.
10199 (reread_symbols): No need to preserve section offsets by hand.
10200 (symfile_map_offsets_to_segments): Change type of "offsets".
10201 * stap-probe.c (relocate_address): Update.
10202 * stabsread.h (process_one_symbol): Update.
10203 * solib-target.c (struct lm_info_target) <offsets>: Change type.
10204 (solib_target_relocate_section_addresses): Update.
10205 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
10206 Update.
10207 * solib-frv.c (frv_relocate_main_executable): Update.
10208 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
10209 * solib-aix.c (solib_aix_get_section_offsets): Change return
10210 type.
10211 (solib_aix_solib_create_inferior_hook): Update.
10212 * remote.c (remote_target::get_offsets): Update.
10213 * psymtab.c (find_pc_sect_psymtab): Update.
10214 * psympriv.h (struct partial_symbol) <address, text_low,
10215 text_high>: Update.
10216 * objfiles.h (obj_section_offset): Update.
10217 (struct objfile) <section_offsets>: Change type.
10218 <num_sections>: Remove.
10219 (objfile_relocate): Update.
10220 * objfiles.c (entry_point_address_query): Update
10221 (relocate_one_symbol): Change type of "section_offsets".
10222 (objfile_relocate1, objfile_relocate1): Change type of
10223 "new_offsets".
10224 (objfile_rebase1): Update.
10225 * mipsread.c (mipscoff_symfile_read): Update.
10226 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
10227 parameter.
10228 * mdebugread.c (parse_symbol): Change type of "section_offsets".
10229 (parse_external, psymtab_to_symtab_1): Update.
10230 * machoread.c (macho_symfile_offsets): Update.
10231 * ia64-tdep.c (ia64_find_unwind_table): Update.
10232 * hppa-tdep.c (read_unwind_info): Update.
10233 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
10234 * dwarf2read.c (create_addrmap_from_index)
10235 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
10236 (process_psymtab_comp_unit_reader, add_partial_symbol)
10237 (add_partial_subprogram, process_full_comp_unit)
10238 (read_file_scope, read_func_scope, read_lexical_block_scope)
10239 (read_call_site_scope, dwarf2_rnglists_process)
10240 (dwarf2_ranges_process, dwarf2_ranges_read)
10241 (dwarf_decode_lines_1, var_decode_location, new_symbol)
10242 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
10243 Update.
10244 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
10245 Update.
10246 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
10247 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
10248 (process_one_symbol): Change type of "section_offsets".
10249 * ctfread.c (get_objfile_text_range): Update.
10250 * coffread.c (coff_symtab_read, enter_linenos)
10251 (process_coff_symbol): Update.
10252 * coff-pe-read.c (add_pe_forwarded_sym): Update.
10253 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
10254
10255 2020-01-08 Tom Tromey <tromey@adacore.com>
10256
10257 * dwarf2read.c (parse_macro_definition): Use std::string.
10258 (parse_macro_definition): Likewise.
10259
10260 2020-01-08 Tom Tromey <tromey@adacore.com>
10261
10262 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
10263 (ATTR_ALLOC_CHUNK): Remove.
10264
10265 2020-01-08 Tom Tromey <tromey@adacore.com>
10266
10267 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
10268
10269 2020-01-08 Tom Tromey <tromey@adacore.com>
10270
10271 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
10272 (dwarf2_compute_name, open_dwo_file): Likewise.
10273 (process_enumeration_scope): Use std::vector.
10274 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
10275 (partial_die_info::fixup, dwarf2_start_subfile)
10276 (guess_full_die_structure_name, dwarf2_name): Likewise.
10277 (determine_prefix): Update.
10278 (guess_full_die_structure_name): Make return type const.
10279 (partial_die_full_name): Return unique_xmalloc_ptr.
10280 (DW_FIELD_ALLOC_CHUNK): Remove.
10281
10282 2020-01-07 Tom Tromey <tromey@adacore.com>
10283
10284 PR build/24937:
10285 * stap-probe.c (class stap_static_probe_ops): Add constructor.
10286
10287 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
10288
10289 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
10290
10291 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
10292
10293 * stack.c (print_frame_info): Move disassemble_next_line code
10294 inside source_print block.
10295
10296 2020-01-06 Eli Zaretskii <eliz@gnu.org>
10297
10298 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
10299 gdb/signals.h, as we are now using native signal symbols.
10300
10301 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
10302
10303 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
10304 overflow by an early check of content vs threshold.
10305 * tui/tui-source.c (tui_source_window::line_is_displayed):
10306 Likewise.
10307
10308 2020-01-06 Eli Zaretskii <eliz@gnu.org>
10309
10310 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
10311
10312 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
10313
10314 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
10315 export table if no section contains it's RVA.
10316
10317 2020-01-06 Eli Zaretskii <eliz@gnu.org>
10318
10319 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
10320
10321 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
10322
10323 * source.c (print_source_lines_base): Set last_line_listed.
10324
10325 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
10326
10327 * tui/tui-disasm.c: Remove trailing spaces.
10328
10329 2020-01-06 Eli Zaretskii <eliz@gnu.org>
10330 Pedro Alves <palves@redhat.com>
10331
10332 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
10333 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
10334 (windows_gdb_signal_to_target): New function, uses the above
10335 enumeration to convert GDB internal signal codes to equivalent
10336 Windows codes.
10337 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
10338 * windows-nat.c: Include "gdb_wait.h".
10339 (get_windows_debug_event): Extract the fatal exception from the
10340 exit status and convert to the equivalent Posix signal number.
10341 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
10342 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
10343 * gdbsupport/gdb_wait.c: New file, implements
10344 windows_status_to_termsig.
10345 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
10346 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
10347
10348 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
10349
10350 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
10351 show_layout.
10352
10353 2020-01-05 Luis Machado <luis.machado@linaro.org>
10354
10355 * aarch64-linux-nat.c
10356 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
10357 and bfd_mach_aarch64.
10358
10359 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10360
10361 * ui-file.c (stdio_file::can_emit_style_escape)
10362 (tee_file::can_emit_style_escape): Ensure style is used also on
10363 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
10364 to gdb_stdout.
10365 * main.c (set_gdb_data_directory): Use file style to output the
10366 warning that the given pathname is not a directory.
10367 * top.c (show_history_filename, gdb_safe_append_history)
10368 (show_gdb_datadir): Use file style.
10369
10370 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
10371
10372 * solib-target.c (struct lm_info_target):
10373 Change offsets to be a unique_xmalloc_ptr.
10374 (solib_target_relocate_section_addresses): Update.
10375
10376 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
10377
10378 * windows-nat.c (windows_clear_solib): Free so_list linked list.
10379
10380 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
10381
10382 * MAINTAINERS (Write After Approval): Add myself.
10383
10384 2020-01-02 Luis Machado <luis.machado@linaro.org>
10385
10386 * proc-service.c (get_ps_regcache): Remove reference to obsolete
10387 Cell BE architecture.
10388 * target.h (struct target_ops) <thread_architecture>: Likewise.
10389
10390 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
10391
10392 * Makefile.in: Use INSTALL_PROGRAM_ENV.
10393
10394 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
10395
10396 * MAINTAINERS (Write After Approval): Add myself.
10397
10398 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10399
10400 * gdbarch.sh: Update copyright year range of generated files.
10401
10402 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10403
10404 Update copyright year range in all GDB files.
10405
10406 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10407
10408 * copyright.py: Convert to Python 3.
10409
10410 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10411
10412 * copyright.py: Adapt after move of gnulib directory from gdb
10413 directory to toplevel directory.
10414
10415 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10416
10417 * copyright.py (main): Exit if run from the wrong directory.
10418
10419 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10420
10421 * top.c (print_gdb_version): Change copyright year to 2020.
10422
10423 2020-01-01 Joel Brobecker <brobecker@adacore.com>
10424
10425 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
10426
10427 For older changes see ChangeLog-2019.
10428 \f
10429 Local Variables:
10430 mode: change-log
10431 left-margin: 8
10432 fill-column: 74
10433 version-control: never
10434 coding: utf-8
10435 End: