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