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