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