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