Fix BFD leak in dwarf2_get_dwz_file.
[external/binutils.git] / gdb / ChangeLog
1 2019-02-25  John Baldwin  <jhb@FreeBSD.org>
2
3         * dwarf2read.c (dwarf2_get_dwz_file): Reset dwz_bfd to nullptr
4         instead of releasing ownership.
5
6 2019-02-25  Jordan Rupprecht  <rupprecht@google.com>
7
8         * dwarf2read.c (open_and_init_dwp_file): Call
9         elf_numsections instead of bfd_count_sections to initialize
10         dwp_file->num_sections.
11
12 2019-02-25  Tom Tromey  <tromey@adacore.com>
13
14         * solib-darwin.c (darwin_get_dyld_bfd): Don't release dyld_bfd.
15
16 2019-02-23  Sergio Durigan Junior  <sergiodj@redhat.com>
17
18         * gcore.in: Add '--readnever' option when invoking GDB.
19
20 2019-02-22  Simon Marchi  <simon.marchi@polymtl.ca>
21
22         * MAINTAINERS: Update my email address.
23
24 2019-02-22  Simon Marchi  <simon.marchi@polymtl.ca>
25
26         * build-id.c (build_id_to_debug_bfd_1): New function.
27         (build_id_to_debug_bfd): Look for separate debug file in
28         sysroot.
29
30 2019-02-22  Andrew Burgess  <andrew.burgess@embecosm.com>
31
32         * gdbarch.sh: Update the copyright year range that is placed into
33         generated files.
34
35 2019-02-22  Keith Seitz  <keiths@redhat.com>
36
37         PR symtab/23853
38         * linespec.c (create_sals_line_offset): Search for the default
39         symtab's filename instead of its fullname.
40
41 2019-02-21  Alan Hayward  <alan.hayward@arm.com>
42
43         * NEWS: Update style defaults.
44
45 2019-02-21  Alan Hayward  <alan.hayward@arm.com>
46
47         * main.c (captured_main_1): Disable styling in batch mode.
48
49 2019-02-20  Tom Tromey  <tom@tromey.com>
50
51         * symtab.c (symtab_symbol_info): Fix typos.
52
53 2019-02-20  Tom Tromey  <tromey@adacore.com>
54
55         * findcmd.c (_initialize_mem_search): Use upper case for
56         metasyntactic variables.
57
58 2019-02-20  Alan Hayward  <alan.hayward@arm.com>
59
60         * aarch64-tdep.c (aarch64_add_reggroups): New function.
61         (aarch64_gdbarch_init): Call aarch64_add_reggroups.
62
63 2019-02-19  Simon Marchi  <simon.marchi@polymtl.ca>
64
65         * top.h (source_file_name): Change to std::string.
66         * top.c (source_file_name): Likewise.
67         (command_line_input): Adjust.
68         * cli/cli-script.c (script_from_file): Adjust.
69
70 2019-02-19  Tom Tromey  <tromey@adacore.com>
71
72         * ravenscar-thread.c
73         (ravenscar_thread_target::update_thread_list): Don't call
74         ada_build_task_list.
75         * ada-lang.h (ada_build_task_list): Don't declare.
76         * ada-tasks.c (struct ada_tasks_inferior_data)
77         <task_list_valid_p>: Now bool.
78         (read_known_tasks, ada_task_list_changed)
79         (ada_tasks_invalidate_inferior_data): Update.
80         (read_known_tasks_array): Return bool.
81         (read_known_tasks_list): Likewise.
82         (read_known_tasks): Return void.
83         (ada_build_task_list): Now static.
84
85 2019-02-18  Andrew Burgess  <andrew.burgess@embecosm.com>
86
87         * gdbtypes.c (type_align): Allow alignment of TYPE_CODE_METHODPTR
88         and TYPE_CODE_MEMBERPTR to be overridden by the gdbarch.
89
90 2019-02-18  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
91
92         * ada-task.c (_initialize_tasks): Use 'with_cleanup' register
93         variant for ada_tasks_pspace_data_handle and
94         ada_tasks_inferior_data_handle.
95         (ada_tasks_pspace_data_cleanup): New function.
96         (ada_tasks_inferior_data_cleanup): New function.
97
98 2019-02-17  Tom Tromey  <tom@tromey.com>
99
100         * macrotab.h (macro_source_fullname): Return a std::string.
101         * macrotab.c (macro_include, check_for_redefinition)
102         (macro_undef, macro_lookup_definition, foreach_macro)
103         (foreach_macro_in_scope): Update.
104         (macro_source_fullname): Return a std::string.
105         * macrocmd.c (show_pp_source_pos): Update.
106
107 2019-02-17  Tom Tromey  <tom@tromey.com>
108
109         * macrocmd.c (show_pp_source_pos): Style the file names.
110
111 2019-02-17  Tom Tromey  <tom@tromey.com>
112
113         PR tui/24197:
114         * tui/tui-source.c (tui_set_source_content_nil): Rewrite.
115
116 2019-02-17  Tom Tromey  <tom@tromey.com>
117
118         * ada-lang.c (user_select_syms): Use filtered printing.
119         * utils.c (wrap_style): New global.
120         (desired_style): Remove.
121         (emit_style_escape): Add stream parameter.
122         (set_output_style, reset_terminal_style, prompt_for_continue):
123         Update.
124         (flush_wrap_buffer): Only flush gdb_stdout.
125         (wrap_here): Set wrap_style.
126         (fputs_maybe_filtered): Clear the wrap buffer on exception.  Don't
127         treat escape sequences as a character.  Change when wrap buffer is
128         flushed.
129         (fputs_styled): Do not set the output style when the default is
130         requested.
131         * ui-style.h (struct ui_file_style) <is_default>: New method.
132         * source.c (print_source_lines_base): Emit escape sequences in one
133         piece.
134
135 2019-02-17  Joel Brobecker  <brobecker@adacore.com>
136
137         * gdbtypes.c (type_align): Handle TYPE_CODE_RANGE the same as
138         integers and enumeration types.
139
140 2019-02-17  Joel Brobecker  <brobecker@adacore.com>
141
142         * ada-lang.c (standard_lookup): Use ada_lookup_encoded_symbol
143         instead of lookup_symbol_in_language
144         (do_exact_match): New function.
145         (ada_get_symbol_name_matcher): Return do_exact_match when
146         doing a verbatim match.
147
148 2019-02-15  Tom Tromey  <tromey@adacore.com>
149
150         * ravenscar-thread.c (ravenscar_thread_target::resume)
151         (ravenscar_thread_target::wait): Special case wildcard requests.
152
153 2019-02-15  Tom Tromey  <tromey@adacore.com>
154
155         * ravenscar-thread.c (base_ptid): Remove.
156         (struct ravenscar_thread_target) <close>: New method.
157         <m_base_ptid>: New member.
158         <update_inferior_ptid, active_task, task_is_currently_active,
159         runtime_initialized>: Declare methods.
160         <ravenscar_thread_target>: Add constructor.
161         (ravenscar_thread_target::task_is_currently_active)
162         (ravenscar_thread_target::update_inferior_ptid)
163         (ravenscar_runtime_initialized): Rename.  Now methods.
164         (ravenscar_thread_target::resume, ravenscar_thread_target::wait)
165         (ravenscar_thread_target::update_thread_list): Update.
166         (ravenscar_thread_target::active_task): Now method.
167         (ravenscar_thread_target::store_registers)
168         (ravenscar_thread_target::prepare_to_store)
169         (ravenscar_thread_target::prepare_to_store)
170         (ravenscar_thread_target::mourn_inferior): Update.
171         (ravenscar_inferior_created): Use "new" to create target.
172         (ravenscar_thread_target::get_ada_task_ptid): Update.
173         (_initialize_ravenscar): Don't initialize base_ptid.
174         (ravenscar_ops): Remove global.
175
176 2019-02-15  Tom Tromey  <tromey@adacore.com>
177
178         * target.h (push_target): Declare new overload.
179         * target.c (push_target): New overload, taking an rvalue reference.
180         * remote.c (remote_target::open_1): Use push_target overload.
181         * corelow.c (core_target_open): Use push_target overload.
182
183 2019-02-15  Tom Tromey  <tromey@adacore.com>
184
185         * ravenscar-thread.c (is_ravenscar_task)
186         (ravenscar_task_is_currently_active): Return bool.
187         (ravenscar_update_inferior_ptid, get_running_thread_msymbol)
188         (_initialize_ravenscar): Remove "(void)".
189         (has_ravenscar_runtime, ravenscar_runtime_initialized): Likewise.
190         Return bool.
191
192 2019-02-15  Tom Tromey  <tromey@adacore.com>
193
194         * ravenscar-thread.c (ravenscar_runtime_initializer)
195         (has_ravenscar_runtime, get_running_thread_id)
196         (ravenscar_thread_target::resume): Fix indentation.
197
198 2019-02-15  Tom Tromey  <tromey@adacore.com>
199
200         * sparc-ravenscar-thread.c (struct sparc_ravenscar_ops): Derive
201         from ravenscar_arch_ops.
202         (sparc_ravenscar_ops::fetch_registers)
203         (sparc_ravenscar_ops::store_registers): Now methods.
204         (sparc_ravenscar_prepare_to_store): Remove.
205         (sparc_ravenscar_ops): Redefine.
206         * ravenscar-thread.h (struct ravenscar_arch_ops): Add virtual
207         methods and destructor.  Remove members.
208         * ravenscar-thread.c (ravenscar_thread_target::fetch_registers)
209         (ravenscar_thread_target::store_registers)
210         (ravenscar_thread_target::prepare_to_store): Update.
211         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_prepare_to_store):
212         Remove.
213         (struct ppc_ravenscar_powerpc_ops): Derive from
214         ravenscar_arch_ops.
215         (ppc_ravenscar_powerpc_ops::fetch_registers)
216         (ppc_ravenscar_powerpc_ops::store_registers): Now methods.
217         (ppc_ravenscar_powerpc_ops): Redefine.
218         (struct ppc_ravenscar_e500_ops): Derive from ravenscar_arch_ops.
219         (ppc_ravenscar_e500_ops::fetch_registers)
220         (ppc_ravenscar_e500_ops::store_registers): Now methods.
221         (ppc_ravenscar_e500_ops): Redefine.
222         * aarch64-ravenscar-thread.c
223         (aarch64_ravenscar_generic_prepare_to_store): Remove.
224         (struct aarch64_ravenscar_ops): Derive from ravenscar_arch_ops.
225         (aarch64_ravenscar_fetch_registers)
226         (aarch64_ravenscar_store_registers): Now methods.
227         (aarch64_ravenscar_ops): Redefine.
228
229 2019-02-15  Tom Tromey  <tromey@adacore.com>
230
231         * ravenscar-thread.c (ravenscar_thread_target::stopped_by_sw_breakpoint)
232         (ravenscar_thread_target::stopped_by_hw_breakpoint)
233         (ravenscar_thread_target::stopped_by_watchpoint)
234         (ravenscar_thread_target::stopped_data_address)
235         (ravenscar_thread_target::core_of_thread): Use scoped_restore.
236
237 2019-02-15  Tom Tromey  <tromey@adacore.com>
238
239         * ravenscar-thread.c: Fix some typos.
240
241 2019-02-15  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
242             Tom Tromey  <tromey@adacore.com>
243
244         * ada-lang.c (ada_exception_sal): Change addr_string to a
245         std::string.
246         (create_ada_exception_catchpoint): Update.
247
248 2019-02-15  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
249             Tom Tromey  <tromey@adacore.com>
250
251         * breakpoint.c (~bp_location): Rename from bp_location_dtor.
252         (bp_location_ops): Remove.
253         (base_breakpoint_allocate_location): Update.
254         (free_bp_location): Update.
255         * ada-lang.c (class ada_catchpoint_location)
256         <ada_catchpoint_location>: Remove ops parameter.
257         (ada_catchpoint_location_dtor): Remove.
258         (ada_catchpoint_location_ops): Remove.
259         (allocate_location_exception): Update.
260         * breakpoint.h (struct bp_location_ops): Remove.
261         (class bp_location) <bp_location>: Remove bp_location_ops
262         parameter.
263         <~bp_location>: Add destructor.
264         <ops>: Remove.
265
266 2019-02-14  Thomas Schwinge  <thomas@codesourcery.com>
267             Pedro Alves  <palves@redhat.com>
268
269         * remote.c (remote_target::remote_parse_stop_reply): Avoid using
270         'PATH_MAX'.
271
272 2019-02-14  David Michael  <fedora.dm0@gmail.com>
273             Samuel Thibault  <samuel.thibault@gnu.org>
274             Thomas Schwinge  <thomas@codesourcery.com>
275
276         * gnu-nat.c (S_proc_getmsgport_reply, S_proc_task2proc_reply)
277         (S_proc_pid2proc_reply): Adjust to Hurd "proc" interface changes.
278
279 2019-02-14  Thomas Schwinge  <thomas@codesourcery.com>
280
281         * gnu-nat.c (gnu_write_inferior, parse_int_arg, _parse_bool_arg)
282         (check_empty): Use "const char *".
283
284         * gnu-nat.c (gnu_nat_target::detach): Instead of
285         'detach_inferior (pid)' call
286         'detach_inferior (find_inferior_pid (pid))'.
287
288         * configure.nat [gdb_host == i386gnu] (NATDEPFILES): Add
289         'nat/fork-inferior.o'.
290         * gnu-nat.c: #include "nat/fork-inferior.h".
291
292         * gnu-nat.c (gnu_nat_target::detach): Instead of
293         'inf_child_maybe_unpush_target (ops)' call 'maybe_unpush_target'.
294         * gnu-nat.h: #include "inf-child.h".
295         * i386-gnu-nat.c (gnu_fetch_registers): Rename/move to
296         'i386_gnu_nat_target::fetch_registers'.
297         (gnu_store_registers): Rename/move to
298         'i386_gnu_nat_target::store_registers'.
299
300         * config/i386/nm-i386gnu.h: Don't "#include" any files.
301         * gnu-nat.h (mach_thread_info): New function.
302         * gnu-nat.c (thread_takeover_sc_cmd): Use it.
303
304         * config/i386/nm-i386gnu.h (gnu_target_pid_to_str): Remove.
305
306 2019-02-14  Frederic Konrad  <konrad@adacore.com>
307
308         * riscv-rdep.c (riscv_type_alignment): Handle TYPE_CODE_RANGE.
309
310 2019-02-14  Joel Brobecker  <brobecker@adacore.com>
311
312         * windows-nat.c (windows_add_thread): Add new parameter
313         "main_thread_p" with default value set to false.  Update
314         function documentation as well as all callers.
315         (windows_delete_thread): Likewise.
316         (fake_create_process): Update call to windows_add_thread.
317         (get_windows_debug_event) <CREATE_THREAD_DEBUG_EVENT>
318         <CREATE_PROCESS_DEBUG_EVENT>: Likewise.
319         <EXIT_THREAD_DEBUG_EVENT, EXIT_PROCESS_DEBUG_EVENT>: Update
320         call to windows_delete_thread.
321
322 2019-02-13  Simon Marchi  <simon.marchi@ericsson.com>
323
324         * MAINTAINERS: Add Andrew Burgess as global maintainer.
325
326 2019-02-12  John Baldwin  <jhb@FreeBSD.org>
327
328         * symfile.c (find_separate_debug_file): Use canonical path of
329         sysroot with child_path instead of gdb_sysroot if it is valid.
330
331 2019-02-12  John Baldwin  <jhb@FreeBSD.org>
332
333         * symfile.c (find_separate_debug_file): Use child_path to
334         determine if an object file is under a sysroot.
335
336 2019-02-12  John Baldwin  <jhb@FreeBSD.org>
337
338         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
339         unittests/child-path-selftests.c.
340         * common/pathstuff.c (child_path): New function.
341         * common/pathstuff.h (child_path): New prototype.
342         * unittests/child-path-selftests.c: New file.
343
344 2019-02-12  John Baldwin  <jhb@FreeBSD.org>
345
346         * symfile.c (find_separate_debug_file): Look for separate debug
347         files in debug directories under the sysroot.
348
349 2019-02-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
350
351         * symtab.h (struct minimal_symbol data_p): New const method.
352         (struct minimal_symbol text_p): Likewise.
353         * symtab.c (output_source_filename): Use file name style
354         to print file name.
355         (print_symbol_info): Likewise.
356         (print_msymbol_info): Use address style to print addresses.
357         Use function name style to print executable text symbols.
358         (expand_symtab_containing_pc): Use data_p.
359         (find_pc_sect_compunit_symtab): Likewise.
360
361 2019-02-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
362
363         * breakpoint.c (describe_other_breakpoints): Use address style
364         to print addresses.
365         (say_where): Likewise.
366
367 2019-02-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
368
369         * ada-typeprint.c (print_func_type): Print function name
370         style to print function name.
371         * c-typeprint.c (c_print_type_1): Likewise.
372
373 2019-02-11  Alan Hayward  <alan.hayward@arm.com>
374
375         * aarch64-linux-tdep.c (aarch64_linux_get_syscall_number): Check
376         for execve.
377
378 2019-02-10  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
379
380         * c-exp.y (direct_abs_decl): Use emplace_back to record the
381         type_stack.
382
383 2019-02-10  Joel Brobecker  <brobecker@adacore.com>
384
385         * ada-varobj.c (ada_value_is_changeable_p): Add handling of
386         TYPE_CODE_REF types.
387
388 2019-02-08  Jim Wilson  <jimw@sifive.com>
389
390         * riscv-linux-tdep.c (riscv_linux_fregmap): New.
391         (riscv_linux_fregset): New.
392         (riscv_linux_iterate_over_regset_sections): Call cb for .reg2 section.
393
394 2019-02-07  Tom Tromey  <tom@tromey.com>
395
396         * thread.c (thread_cancel_execution_command): Update.
397         * thread-fsm.h (struct thread_fsm): Add constructor, destructor,
398         methods.
399         (struct thread_fsm_ops): Remove.
400         (thread_fsm_ctor, thread_fsm_delete, thread_fsm_clean_up)
401         (thread_fsm_should_stop, thread_fsm_return_value)
402         (thread_fsm_set_finished, thread_fsm_finished_p)
403         (thread_fsm_async_reply_reason, thread_fsm_should_notify_stop):
404         Don't declare.
405         * mi/mi-interp.c (mi_on_normal_stop_1): Update.
406         * infrun.c (clear_proceed_status_thread)
407         (clean_up_just_stopped_threads_fsms, fetch_inferior_event)
408         (print_stop_event): Update.
409         * infcmd.c (struct step_command_fsm): Inherit from thread_fsm.
410         Add constructor.
411         (step_command_fsm_ops): Remove.
412         (new_step_command_fsm): Remove.
413         (step_1): Update.
414         (step_command_fsm::should_stop): Rename from
415         step_command_fsm_should_stop.
416         (step_command_fsm::clean_up): Rename from
417         step_command_fsm_clean_up.
418         (step_command_fsm::do_async_reply_reason): Rename from
419         step_command_fsm_async_reply_reason.
420         (struct until_next_fsm): Inherit from thread_fsm.  Add
421         constructor.
422         (until_next_fsm_ops): Remove.
423         (new_until_next_fsm): Remove.
424         (until_next_fsm::should_stop): Rename from
425         until_next_fsm_should_stop.
426         (until_next_fsm::clean_up): Rename from until_next_fsm_clean_up.
427         (until_next_fsm::do_async_reply_reason): Rename from
428         until_next_fsm_async_reply_reason.
429         (struct finish_command_fsm): Inherit from thread_fsm.  Add
430         constructor.  Change type of breakpoint.
431         (finish_command_fsm_ops): Remove.
432         (new_finish_command_fsm): Remove.
433         (finish_command_fsm::should_stop): Rename from
434         finish_command_fsm_should_stop.
435         (finish_command_fsm::clean_up): Rename from
436         finish_command_fsm_clean_up.
437         (finish_command_fsm::return_value): Rename from
438         finish_command_fsm_return_value.
439         (finish_command_fsm::do_async_reply_reason): Rename from
440         finish_command_fsm_async_reply_reason.
441         (finish_command): Update.
442         * infcall.c (struct call_thread_fsm): Inherit from thread_fsm.
443         Add constructor.
444         (call_thread_fsm_ops): Remove.
445         (call_thread_fsm::call_thread_fsm): Rename from
446         new_call_thread_fsm.
447         (call_thread_fsm::should_stop): Rename from
448         call_thread_fsm_should_stop.
449         (call_thread_fsm::should_notify_stop): Rename from
450         call_thread_fsm_should_notify_stop.
451         (run_inferior_call, call_function_by_hand_dummy): Update.
452         * cli/cli-interp.c (should_print_stop_to_console): Update.
453         * breakpoint.c (struct until_break_fsm): Inherit from thread_fsm.
454         Add constructor.  Change type of location_breakpoint,
455         caller_breakpoint.
456         (until_break_fsm_ops): Remove.
457         (new_until_break_fsm): Remove.
458         (until_break_fsm::should_stop): Rename from
459         until_break_fsm_should_stop.
460         (until_break_fsm::clean_up): Rename from
461         until_break_fsm_clean_up.
462         (until_break_fsm::do_async_reply_reason): Rename from
463         until_break_fsm_async_reply_reason.
464         (until_break_command): Update.
465         * thread-fsm.c: Remove.
466         * Makefile.in (COMMON_SFILES): Remove thread-fsm.c.
467
468 2019-02-07  Tom Tromey  <tom@tromey.com>
469
470         * yy-remap.h: Add include guard.
471         * xtensa-tdep.h: Add include guard.
472         * xcoffread.h: Rename include guard.
473         * varobj-iter.h: Add include guard.
474         * tui/tui.h: Rename include guard.
475         * tui/tui-winsource.h: Rename include guard.
476         * tui/tui-wingeneral.h: Rename include guard.
477         * tui/tui-windata.h: Rename include guard.
478         * tui/tui-win.h: Rename include guard.
479         * tui/tui-stack.h: Rename include guard.
480         * tui/tui-source.h: Rename include guard.
481         * tui/tui-regs.h: Rename include guard.
482         * tui/tui-out.h: Rename include guard.
483         * tui/tui-layout.h: Rename include guard.
484         * tui/tui-io.h: Rename include guard.
485         * tui/tui-hooks.h: Rename include guard.
486         * tui/tui-file.h: Rename include guard.
487         * tui/tui-disasm.h: Rename include guard.
488         * tui/tui-data.h: Rename include guard.
489         * tui/tui-command.h: Rename include guard.
490         * tic6x-tdep.h: Add include guard.
491         * target/waitstatus.h: Rename include guard.
492         * target/wait.h: Rename include guard.
493         * target/target.h: Rename include guard.
494         * target/resume.h: Rename include guard.
495         * target-float.h: Rename include guard.
496         * stabsread.h: Add include guard.
497         * rs6000-tdep.h: Add include guard.
498         * riscv-fbsd-tdep.h: Add include guard.
499         * regformats/regdef.h: Rename include guard.
500         * record.h: Rename include guard.
501         * python/python.h: Rename include guard.
502         * python/python-internal.h: Rename include guard.
503         * python/py-stopevent.h: Rename include guard.
504         * python/py-ref.h: Rename include guard.
505         * python/py-record.h: Rename include guard.
506         * python/py-record-full.h: Rename include guard.
507         * python/py-record-btrace.h: Rename include guard.
508         * python/py-instruction.h: Rename include guard.
509         * python/py-events.h: Rename include guard.
510         * python/py-event.h: Rename include guard.
511         * procfs.h: Add include guard.
512         * proc-utils.h: Add include guard.
513         * p-lang.h: Add include guard.
514         * or1k-tdep.h: Rename include guard.
515         * observable.h: Rename include guard.
516         * nto-tdep.h: Rename include guard.
517         * nat/x86-linux.h: Rename include guard.
518         * nat/x86-linux-dregs.h: Rename include guard.
519         * nat/x86-gcc-cpuid.h: Add include guard.
520         * nat/x86-dregs.h: Rename include guard.
521         * nat/x86-cpuid.h: Rename include guard.
522         * nat/ppc-linux.h: Rename include guard.
523         * nat/mips-linux-watch.h: Rename include guard.
524         * nat/linux-waitpid.h: Rename include guard.
525         * nat/linux-ptrace.h: Rename include guard.
526         * nat/linux-procfs.h: Rename include guard.
527         * nat/linux-osdata.h: Rename include guard.
528         * nat/linux-nat.h: Rename include guard.
529         * nat/linux-namespaces.h: Rename include guard.
530         * nat/linux-btrace.h: Rename include guard.
531         * nat/glibc_thread_db.h: Rename include guard.
532         * nat/gdb_thread_db.h: Rename include guard.
533         * nat/gdb_ptrace.h: Rename include guard.
534         * nat/fork-inferior.h: Rename include guard.
535         * nat/amd64-linux-siginfo.h: Rename include guard.
536         * nat/aarch64-sve-linux-sigcontext.h: Rename include guard.
537         * nat/aarch64-sve-linux-ptrace.h: Rename include guard.
538         * nat/aarch64-linux.h: Rename include guard.
539         * nat/aarch64-linux-hw-point.h: Rename include guard.
540         * mn10300-tdep.h: Add include guard.
541         * mips-linux-tdep.h: Add include guard.
542         * mi/mi-parse.h: Rename include guard.
543         * mi/mi-out.h: Rename include guard.
544         * mi/mi-main.h: Rename include guard.
545         * mi/mi-interp.h: Rename include guard.
546         * mi/mi-getopt.h: Rename include guard.
547         * mi/mi-console.h: Rename include guard.
548         * mi/mi-common.h: Rename include guard.
549         * mi/mi-cmds.h: Rename include guard.
550         * mi/mi-cmd-break.h: Rename include guard.
551         * m2-lang.h: Add include guard.
552         * location.h: Rename include guard.
553         * linux-record.h: Rename include guard.
554         * linux-nat.h: Add include guard.
555         * linux-fork.h: Add include guard.
556         * i386-darwin-tdep.h: Rename include guard.
557         * hppa-linux-offsets.h: Add include guard.
558         * guile/guile.h: Rename include guard.
559         * guile/guile-internal.h: Rename include guard.
560         * gnu-nat.h: Rename include guard.
561         * gdb-stabs.h: Rename include guard.
562         * frv-tdep.h: Add include guard.
563         * f-lang.h: Add include guard.
564         * event-loop.h: Add include guard.
565         * darwin-nat.h: Rename include guard.
566         * cp-abi.h: Rename include guard.
567         * config/sparc/nm-sol2.h: Rename include guard.
568         * config/nm-nto.h: Rename include guard.
569         * config/nm-linux.h: Add include guard.
570         * config/i386/nm-i386gnu.h: Rename include guard.
571         * config/djgpp/nl_types.h: Rename include guard.
572         * config/djgpp/langinfo.h: Rename include guard.
573         * compile/gcc-cp-plugin.h: Add include guard.
574         * compile/gcc-c-plugin.h: Add include guard.
575         * compile/compile.h: Rename include guard.
576         * compile/compile-object-run.h: Rename include guard.
577         * compile/compile-object-load.h: Rename include guard.
578         * compile/compile-internal.h: Rename include guard.
579         * compile/compile-cplus.h: Rename include guard.
580         * compile/compile-c.h: Rename include guard.
581         * common/xml-utils.h: Rename include guard.
582         * common/x86-xstate.h: Rename include guard.
583         * common/version.h: Rename include guard.
584         * common/vec.h: Rename include guard.
585         * common/tdesc.h: Rename include guard.
586         * common/selftest.h: Rename include guard.
587         * common/scoped_restore.h: Rename include guard.
588         * common/scoped_mmap.h: Rename include guard.
589         * common/scoped_fd.h: Rename include guard.
590         * common/safe-iterator.h: Rename include guard.
591         * common/run-time-clock.h: Rename include guard.
592         * common/refcounted-object.h: Rename include guard.
593         * common/queue.h: Rename include guard.
594         * common/ptid.h: Rename include guard.
595         * common/print-utils.h: Rename include guard.
596         * common/preprocessor.h: Rename include guard.
597         * common/pathstuff.h: Rename include guard.
598         * common/observable.h: Rename include guard.
599         * common/netstuff.h: Rename include guard.
600         * common/job-control.h: Rename include guard.
601         * common/host-defs.h: Rename include guard.
602         * common/gdb_wait.h: Rename include guard.
603         * common/gdb_vecs.h: Rename include guard.
604         * common/gdb_unlinker.h: Rename include guard.
605         * common/gdb_unique_ptr.h: Rename include guard.
606         * common/gdb_tilde_expand.h: Rename include guard.
607         * common/gdb_sys_time.h: Rename include guard.
608         * common/gdb_string_view.h: Rename include guard.
609         * common/gdb_splay_tree.h: Rename include guard.
610         * common/gdb_setjmp.h: Rename include guard.
611         * common/gdb_ref_ptr.h: Rename include guard.
612         * common/gdb_optional.h: Rename include guard.
613         * common/gdb_locale.h: Rename include guard.
614         * common/gdb_assert.h: Rename include guard.
615         * common/filtered-iterator.h: Rename include guard.
616         * common/filestuff.h: Rename include guard.
617         * common/fileio.h: Rename include guard.
618         * common/environ.h: Rename include guard.
619         * common/common-utils.h: Rename include guard.
620         * common/common-types.h: Rename include guard.
621         * common/common-regcache.h: Rename include guard.
622         * common/common-inferior.h: Rename include guard.
623         * common/common-gdbthread.h: Rename include guard.
624         * common/common-exceptions.h: Rename include guard.
625         * common/common-defs.h: Rename include guard.
626         * common/common-debug.h: Rename include guard.
627         * common/cleanups.h: Rename include guard.
628         * common/buffer.h: Rename include guard.
629         * common/btrace-common.h: Rename include guard.
630         * common/break-common.h: Rename include guard.
631         * cli/cli-utils.h: Rename include guard.
632         * cli/cli-style.h: Rename include guard.
633         * cli/cli-setshow.h: Rename include guard.
634         * cli/cli-script.h: Rename include guard.
635         * cli/cli-interp.h: Rename include guard.
636         * cli/cli-decode.h: Rename include guard.
637         * cli/cli-cmds.h: Rename include guard.
638         * charset-list.h: Add include guard.
639         * buildsym-legacy.h: Rename include guard.
640         * bfin-tdep.h: Add include guard.
641         * ax.h: Rename include guard.
642         * arm-linux-tdep.h: Add include guard.
643         * arm-fbsd-tdep.h: Add include guard.
644         * arch/xtensa.h: Rename include guard.
645         * arch/tic6x.h: Add include guard.
646         * arch/i386.h: Add include guard.
647         * arch/arm.h: Rename include guard.
648         * arch/arm-linux.h: Rename include guard.
649         * arch/arm-get-next-pcs.h: Rename include guard.
650         * arch/amd64.h: Add include guard.
651         * arch/aarch64-insn.h: Rename include guard.
652         * arch-utils.h: Rename include guard.
653         * annotate.h: Add include guard.
654         * amd64-darwin-tdep.h: Rename include guard.
655         * aarch64-linux-tdep.h: Add include guard.
656         * aarch64-fbsd-tdep.h: Add include guard.
657         * aarch32-linux-nat.h: Add include guard.
658
659 2019-02-06  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
660
661         * macrotab.c (macro_define_internal): New function that
662         factorizes macro_define_object_internal and macro_define_function
663         code.
664         (macro_define_object_internal): Use macro_define_internal.
665         (macro_define_function): Likewise.
666
667 2019-02-06  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
668
669         * macrocmd.c (extract_identifier): Return
670         a gdb::unique_xmalloc_ptr<char> instead of a char *, and update
671         callers.
672
673 2019-02-06  John Baldwin  <jhb@FreeBSD.org>
674
675         * fbsd-nat.c (fbsd_fetch_cmdline): Join arguments with spaces.
676
677 2019-02-05  Tom Tromey  <tom@tromey.com>
678
679         * target.c (target_stack::unpush): Move assertion earlier.
680
681 2019-01-30  Tom Tromey  <tom@tromey.com>
682
683         PR python/23615:
684         * python/python.c (execute_gdb_command): Use gdbpy_allow_threads.
685         (gdbpy_parse_and_eval): Likewise.
686         * python/python-internal.h (gdbpy_allow_threads): New class.
687
688 2019-01-28  John Baldwin  <jhb@FreeBSD.org>
689
690         * aarch64-fbsd-tdep.c (aarch64_fbsd_gregmap)
691         (aarch64_fbsd_fpregmap): Move earlier.
692         (AARCH64_MCONTEXT_REG_SIZE, AARCH64_MCONTEXT_FPREG_SIZE): Delete.
693         (aarch64_fbsd_sigframe_init): Use trad_frame_set_reg_regmap
694         instead of individual calls to trad_frame_set_reg_addr.
695         * arm-fbsd-tdep.c (arm_fbsd_gregmap, arm_fbsd_vfpregmap): Move
696         earlier.
697         (ARM_MCONTEXT_REG_SIZE, ARM_MCONTEXT_VFP_REG_SIZE): Delete.
698         (arm_fbsd_sigframe_init): Use trad_frame_set_reg_regmap
699         instead of individual calls to trad_frame_set_reg_addr.
700
701 2019-01-28  Alan Hayward  <alan.hayward@arm.com>
702
703         * CONTRIBUTE: Replace contribution list with wiki link.
704
705 2019-01-25  Tom Tromey  <tom@tromey.com>
706
707         * Makefile.in (GDB_CFLAGS): Don't add -I for common.
708
709 2019-01-25  Tom Tromey  <tom@tromey.com>
710
711         * xtensa-linux-nat.c: Fix common/ includes.
712         * xml-support.h: Fix common/ includes.
713         * xml-support.c: Fix common/ includes.
714         * x86-linux-nat.c: Fix common/ includes.
715         * windows-nat.c: Fix common/ includes.
716         * varobj.h: Fix common/ includes.
717         * varobj.c: Fix common/ includes.
718         * value.c: Fix common/ includes.
719         * valops.c: Fix common/ includes.
720         * utils.c: Fix common/ includes.
721         * unittests/xml-utils-selftests.c: Fix common/ includes.
722         * unittests/utils-selftests.c: Fix common/ includes.
723         * unittests/unpack-selftests.c: Fix common/ includes.
724         * unittests/tracepoint-selftests.c: Fix common/ includes.
725         * unittests/style-selftests.c: Fix common/ includes.
726         * unittests/string_view-selftests.c: Fix common/ includes.
727         * unittests/scoped_restore-selftests.c: Fix common/ includes.
728         * unittests/scoped_mmap-selftests.c: Fix common/ includes.
729         * unittests/scoped_fd-selftests.c: Fix common/ includes.
730         * unittests/rsp-low-selftests.c: Fix common/ includes.
731         * unittests/parse-connection-spec-selftests.c: Fix common/
732         includes.
733         * unittests/optional-selftests.c: Fix common/ includes.
734         * unittests/offset-type-selftests.c: Fix common/ includes.
735         * unittests/observable-selftests.c: Fix common/ includes.
736         * unittests/mkdir-recursive-selftests.c: Fix common/ includes.
737         * unittests/memrange-selftests.c: Fix common/ includes.
738         * unittests/memory-map-selftests.c: Fix common/ includes.
739         * unittests/lookup_name_info-selftests.c: Fix common/ includes.
740         * unittests/function-view-selftests.c: Fix common/ includes.
741         * unittests/environ-selftests.c: Fix common/ includes.
742         * unittests/copy_bitwise-selftests.c: Fix common/ includes.
743         * unittests/common-utils-selftests.c: Fix common/ includes.
744         * unittests/cli-utils-selftests.c: Fix common/ includes.
745         * unittests/array-view-selftests.c: Fix common/ includes.
746         * ui-file.c: Fix common/ includes.
747         * tui/tui-io.c: Fix common/ includes.
748         * tracepoint.h: Fix common/ includes.
749         * tracepoint.c: Fix common/ includes.
750         * tracefile-tfile.c: Fix common/ includes.
751         * top.h: Fix common/ includes.
752         * top.c: Fix common/ includes.
753         * thread.c: Fix common/ includes.
754         * target/waitstatus.h: Fix common/ includes.
755         * target/waitstatus.c: Fix common/ includes.
756         * target.h: Fix common/ includes.
757         * target.c: Fix common/ includes.
758         * target-memory.c: Fix common/ includes.
759         * target-descriptions.c: Fix common/ includes.
760         * symtab.h: Fix common/ includes.
761         * symfile.c: Fix common/ includes.
762         * stap-probe.c: Fix common/ includes.
763         * spu-linux-nat.c: Fix common/ includes.
764         * sparc-nat.c: Fix common/ includes.
765         * source.c: Fix common/ includes.
766         * solib.c: Fix common/ includes.
767         * solib-target.c: Fix common/ includes.
768         * ser-unix.c: Fix common/ includes.
769         * ser-tcp.c: Fix common/ includes.
770         * ser-pipe.c: Fix common/ includes.
771         * ser-base.c: Fix common/ includes.
772         * selftest-arch.c: Fix common/ includes.
773         * s12z-tdep.c: Fix common/ includes.
774         * rust-exp.y: Fix common/ includes.
775         * rs6000-aix-tdep.c: Fix common/ includes.
776         * riscv-tdep.c: Fix common/ includes.
777         * remote.c: Fix common/ includes.
778         * remote-notif.h: Fix common/ includes.
779         * remote-fileio.h: Fix common/ includes.
780         * remote-fileio.c: Fix common/ includes.
781         * regcache.h: Fix common/ includes.
782         * regcache.c: Fix common/ includes.
783         * record-btrace.c: Fix common/ includes.
784         * python/python.c: Fix common/ includes.
785         * python/py-type.c: Fix common/ includes.
786         * python/py-inferior.c: Fix common/ includes.
787         * progspace.h: Fix common/ includes.
788         * producer.c: Fix common/ includes.
789         * procfs.c: Fix common/ includes.
790         * proc-api.c: Fix common/ includes.
791         * printcmd.c: Fix common/ includes.
792         * ppc-linux-nat.c: Fix common/ includes.
793         * parser-defs.h: Fix common/ includes.
794         * osdata.c: Fix common/ includes.
795         * obsd-nat.c: Fix common/ includes.
796         * nat/x86-linux.c: Fix common/ includes.
797         * nat/x86-linux-dregs.c: Fix common/ includes.
798         * nat/x86-dregs.h: Fix common/ includes.
799         * nat/x86-dregs.c: Fix common/ includes.
800         * nat/ppc-linux.c: Fix common/ includes.
801         * nat/mips-linux-watch.h: Fix common/ includes.
802         * nat/mips-linux-watch.c: Fix common/ includes.
803         * nat/linux-waitpid.c: Fix common/ includes.
804         * nat/linux-ptrace.h: Fix common/ includes.
805         * nat/linux-ptrace.c: Fix common/ includes.
806         * nat/linux-procfs.c: Fix common/ includes.
807         * nat/linux-personality.c: Fix common/ includes.
808         * nat/linux-osdata.c: Fix common/ includes.
809         * nat/linux-namespaces.c: Fix common/ includes.
810         * nat/linux-btrace.h: Fix common/ includes.
811         * nat/linux-btrace.c: Fix common/ includes.
812         * nat/fork-inferior.c: Fix common/ includes.
813         * nat/amd64-linux-siginfo.c: Fix common/ includes.
814         * nat/aarch64-sve-linux-ptrace.c: Fix common/ includes.
815         * nat/aarch64-linux.c: Fix common/ includes.
816         * nat/aarch64-linux-hw-point.h: Fix common/ includes.
817         * nat/aarch64-linux-hw-point.c: Fix common/ includes.
818         * namespace.h: Fix common/ includes.
819         * mips-linux-tdep.c: Fix common/ includes.
820         * minsyms.c: Fix common/ includes.
821         * mi/mi-parse.h: Fix common/ includes.
822         * mi/mi-main.c: Fix common/ includes.
823         * mi/mi-cmd-env.c: Fix common/ includes.
824         * memrange.h: Fix common/ includes.
825         * memattr.c: Fix common/ includes.
826         * maint.h: Fix common/ includes.
827         * maint.c: Fix common/ includes.
828         * main.c: Fix common/ includes.
829         * machoread.c: Fix common/ includes.
830         * location.c: Fix common/ includes.
831         * linux-thread-db.c: Fix common/ includes.
832         * linux-nat.c: Fix common/ includes.
833         * linux-fork.c: Fix common/ includes.
834         * inline-frame.c: Fix common/ includes.
835         * infrun.c: Fix common/ includes.
836         * inflow.c: Fix common/ includes.
837         * inferior.h: Fix common/ includes.
838         * inferior.c: Fix common/ includes.
839         * infcmd.c: Fix common/ includes.
840         * inf-ptrace.c: Fix common/ includes.
841         * inf-child.c: Fix common/ includes.
842         * ia64-linux-nat.c: Fix common/ includes.
843         * i387-tdep.c: Fix common/ includes.
844         * i386-tdep.c: Fix common/ includes.
845         * i386-linux-tdep.c: Fix common/ includes.
846         * i386-linux-nat.c: Fix common/ includes.
847         * i386-go32-tdep.c: Fix common/ includes.
848         * i386-fbsd-tdep.c: Fix common/ includes.
849         * i386-fbsd-nat.c: Fix common/ includes.
850         * guile/scm-type.c: Fix common/ includes.
851         * guile/guile.c: Fix common/ includes.
852         * go32-nat.c: Fix common/ includes.
853         * gnu-nat.c: Fix common/ includes.
854         * gdbthread.h: Fix common/ includes.
855         * gdbarch-selftests.c: Fix common/ includes.
856         * gdb_usleep.c: Fix common/ includes.
857         * gdb_select.h: Fix common/ includes.
858         * gdb_bfd.c: Fix common/ includes.
859         * gcore.c: Fix common/ includes.
860         * fork-child.c: Fix common/ includes.
861         * findvar.c: Fix common/ includes.
862         * fbsd-nat.c: Fix common/ includes.
863         * event-top.c: Fix common/ includes.
864         * event-loop.c: Fix common/ includes.
865         * dwarf2read.c: Fix common/ includes.
866         * dwarf2loc.c: Fix common/ includes.
867         * dwarf2-frame.c: Fix common/ includes.
868         * dwarf-index-cache.c: Fix common/ includes.
869         * dtrace-probe.c: Fix common/ includes.
870         * disasm-selftests.c: Fix common/ includes.
871         * defs.h: Fix common/ includes.
872         * csky-tdep.c: Fix common/ includes.
873         * cp-valprint.c: Fix common/ includes.
874         * cp-support.h: Fix common/ includes.
875         * cp-support.c: Fix common/ includes.
876         * corelow.c: Fix common/ includes.
877         * completer.h: Fix common/ includes.
878         * completer.c: Fix common/ includes.
879         * compile/compile.c: Fix common/ includes.
880         * compile/compile-loc2c.c: Fix common/ includes.
881         * compile/compile-cplus-types.c: Fix common/ includes.
882         * compile/compile-cplus-symbols.c: Fix common/ includes.
883         * command.h: Fix common/ includes.
884         * cli/cli-dump.c: Fix common/ includes.
885         * cli/cli-cmds.c: Fix common/ includes.
886         * charset.c: Fix common/ includes.
887         * build-id.c: Fix common/ includes.
888         * btrace.h: Fix common/ includes.
889         * btrace.c: Fix common/ includes.
890         * breakpoint.h: Fix common/ includes.
891         * breakpoint.c: Fix common/ includes.
892         * ax.h: 
893         (enum agent_op): Fix common/ includes.
894         * ax-general.c (struct aop_map): Fix common/ includes.
895         * ax-gdb.c: Fix common/ includes.
896         * auxv.c: Fix common/ includes.
897         * auto-load.c: Fix common/ includes.
898         * arm-tdep.c: Fix common/ includes.
899         * arch/riscv.c: Fix common/ includes.
900         * arch/ppc-linux-common.c: Fix common/ includes.
901         * arch/i386.c: Fix common/ includes.
902         * arch/arm.c: Fix common/ includes.
903         * arch/arm-linux.c: Fix common/ includes.
904         * arch/arm-get-next-pcs.c: Fix common/ includes.
905         * arch/amd64.c: Fix common/ includes.
906         * arch/aarch64.c: Fix common/ includes.
907         * arch/aarch64-insn.c: Fix common/ includes.
908         * arch-utils.c: Fix common/ includes.
909         * amd64-windows-tdep.c: Fix common/ includes.
910         * amd64-tdep.c: Fix common/ includes.
911         * amd64-sol2-tdep.c: Fix common/ includes.
912         * amd64-obsd-tdep.c: Fix common/ includes.
913         * amd64-nbsd-tdep.c: Fix common/ includes.
914         * amd64-linux-tdep.c: Fix common/ includes.
915         * amd64-linux-nat.c: Fix common/ includes.
916         * amd64-fbsd-tdep.c: Fix common/ includes.
917         * amd64-fbsd-nat.c: Fix common/ includes.
918         * amd64-dicos-tdep.c: Fix common/ includes.
919         * amd64-darwin-tdep.c: Fix common/ includes.
920         * agent.c: Fix common/ includes.
921         * ada-lang.h: Fix common/ includes.
922         * ada-lang.c: Fix common/ includes.
923         * aarch64-tdep.c: Fix common/ includes.
924
925 2019-01-25  Tom Tromey  <tom@tromey.com>
926
927         * common/create-version.sh: Use common/version.h.
928
929 2019-01-24  Pedro Alves  <palves@redhat.com>
930
931         * infrun.c (signal_stop, signal_print, signal_program)
932         (signal_catch, signal_pass): Now arrays instead of pointers.
933         (update_signals_program_target, do_target_resume)
934         (signal_catch_update, handle_command, _initialize_infrun): Adjust.
935         * linux-nat.c (linux_nat_target::pass_signals)
936         (linux_nat_target::create_inferior, linux_nat_target::attach):
937         Adjust.
938         * linux-nat.h (linux_nat_target::pass_signals): Adjust.
939         * nto-procfs.c (nto_procfs_target::pass_signals): Adjust.
940         * procfs.c (procfs_target::pass_signals): Adjust.
941         * record-full.c (record_full_target::resume): Adjust.
942         * remote.c (remote_target::pass_signals)
943         (remote_target::program_signals): Adjust.
944         * target-debug.h (target_debug_print_signals): Now takes a
945         gdb::array_view as parameter.  Adjust.
946         * target.h (target_ops) <pass_signals, program_signals>: Replace
947         pointer and length parameters with gdb::array_view.
948         (target_pass_signals, target_program_signals): Likewise.
949         * target-delegates.c: Regenerate.
950
951 2019-01-24  Pedro Alves  <palves@redhat.com>
952
953         * common/forward-scope-exit.h
954         (forward_scope_exit::forward_scope_exit): Pass arguments to
955         m_bind_function directly, instead of creating a std::bind and
956         copying that.
957
958 2019-01-24  Alan Hayward  <alan.hayward@arm.com>
959
960         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1): Check
961         for static members.
962         (pass_in_v_vfp_candidate): Likewise.
963
964 2019-01-23  Tom Tromey  <tom@tromey.com>
965             Pedro Alves  <palves@redhat.com>
966
967         * regcache.c (class regcache_invalidator): Remove.
968         (regcache::raw_write): Use make_scope_exit.
969
970 2019-01-23  Tom Tromey  <tom@tromey.com>
971
972         * ui-out.h (class ui_out_emit_type): Update comment.
973
974 2019-01-23  Tom Tromey  <tom@tromey.com>
975
976         * infrun.c (fetch_inferior_event): Update comment.
977
978 2019-01-23  Tom Tromey  <tom@tromey.com>
979             Pedro Alves  <palves@redhat.com>
980
981         * infrun.c (reinstall_readline_callback_handler_cleanup): Remove
982         parameter.
983         (fetch_inferior_event): Use SCOPE_EXIT.
984
985
986 2019-01-23  Tom Tromey  <tom@tromey.com>
987             Pedro Alves  <palves@redhat.com>
988
989         * infrun.c (disable_thread_events): Delete.
990         (stop_all_threads): Use SCOPE_EXIT.
991
992 2019-01-23  Tom Tromey  <tom@tromey.com>
993             Pedro Alves  <palves@redhat.com>
994
995         * symfile.c: Include forward-scope-exit.h.
996         (clear_symtab_users_cleanup): Replace forward declaration with
997         a FORWARD_SCOPE_EXIT.
998         (syms_from_objfile_1): Use the forward_scope_exit and
999         gdb::optional instead of cleanup_function.
1000         (reread_symbols): Use the forward_scope_exit instead of
1001         cleanup_function.
1002         (clear_symtab_users_cleanup): Remove function.
1003
1004 2019-01-23  Tom Tromey  <tom@tromey.com>
1005             Pedro Alves  <palves@redhat.com>
1006
1007         * linux-nat.c: Include scope-exit.h.
1008         (cleanup_target_stop): Remove.
1009         (linux_nat_target::static_tracepoint_markers_by_strid): Use
1010         SCOPE_EXIT.
1011
1012 2019-01-23  Tom Tromey  <tom@tromey.com>
1013             Pedro Alves  <palves@redhat.com>
1014
1015         * infcall.c (cleanup_delete_std_terminate_breakpoint): Remove.
1016         (call_function_by_hand_dummy): Use SCOPE_EXIT.
1017
1018 2019-01-23  Tom Tromey  <tom@tromey.com>
1019             Andrew Burgess  <andrew.burgess@embecosm.com>
1020             Pedro Alves  <palves@redhat.com>
1021
1022         * infrun.c (fetch_inferior_event): Use scope_exit.
1023         * utils.h (make_bpstat_clear_actions_cleanup): Don't declare.
1024         * top.c (execute_command): Use scope_exit.
1025         * breakpoint.c (bpstat_do_actions): Use scope_exit.
1026         * utils.c (do_bpstat_clear_actions_cleanup)
1027         (make_bpstat_clear_actions_cleanup): Remove.
1028
1029 2019-01-23  Tom Tromey  <tom@tromey.com>
1030             Pedro Alves  <palves@redhat.com>
1031
1032         * infrun.c: Include "common/scope-exit.h"
1033         (delete_just_stopped_threads_infrun_breakpoints_cleanup): Remove.
1034         (wait_for_inferior): Use SCOPE_EXIT.
1035         (fetch_inferior_event): Use scope_exit.
1036
1037 2019-01-23  Tom Tromey  <tom@tromey.com>
1038             Pedro Alves  <palves@redhat.com>
1039
1040         * breakpoint.c (create_breakpoint): Remove cleanup.
1041
1042 2019-01-23  Tom Tromey  <tom@tromey.com>
1043             Andrew Burgess  <andrew.burgess@embecosm.com>
1044             Pedro Alves  <palves@redhat.com>
1045
1046 2019-01-23  Pedro Alves  <palves@redhat.com>
1047
1048         * gdbarch-selftests.c (struct on_exit): Use SCOPE_EXIT.
1049
1050 2019-01-23  Pedro Alves  <palves@redhat.com>
1051             Andrew Burgess  <andrew.burgess@embecosm.com>
1052
1053         * gdbthread.h: Include "common/forward-scope-exit.h".
1054         (scoped_finish_thread_state): Redefine custom class in terms of
1055         forward_scope_exit.
1056
1057 2019-01-23  Pedro Alves  <palves@redhat.com>
1058             Andrew Burgess  <andrew.burgess@embecosm.com>
1059
1060         * common/forward-scope-exit.h: New file.
1061
1062 2019-01-23  Pedro Alves  <palves@redhat.com>
1063             Andrew Burgess  <andrew.burgess@embecosm.com>
1064             Tom Tromey  <tom@tromey.com>
1065
1066         * common/scope-exit.h: New file.
1067
1068 2019-01-23  Pedro Alves  <palves@redhat.com>
1069
1070         * common/preprocessor.h (ESC): Rename to ...
1071         (ESC_PARENS): ... this.
1072         * common/valid-expr.h (CHECK_VALID_EXPR_1, CHECK_VALID_EXPR_2)
1073         (CHECK_VALID_EXPR_3, CHECK_VALID_EXPR_4): Adjust.
1074
1075 2019-01-23  Tom Tromey  <tom@tromey.com>
1076
1077         * language.h (class scoped_switch_to_sym_language_if_auto):
1078         Initialize m_lang in both cases.
1079
1080 2019-01-23  Alan Hayward  <alan.hayward@arm.com>
1081
1082         * nat/aarch64-linux.c (aarch64_linux_new_thread): Replace XNEW
1083         with XCNEW.
1084
1085 2019-01-22  Tom Tromey  <tom@tromey.com>
1086
1087         * corelow.c: Do not include sys/file.h.
1088
1089 2019-01-22  Tom Tromey  <tom@tromey.com>
1090
1091         * tui/tui-wingeneral.h: Include gdb_curses.h.
1092
1093 2019-01-22  Tom Tromey  <tom@tromey.com>
1094
1095         * source-cache.h (class source_cache) <get_source_lines,
1096         get_plain_source_lines, extract_lines>: Rename "lines" parameter.
1097
1098 2019-01-22  Tom Tromey  <tom@tromey.com>
1099
1100         * remote-fileio.h (struct remote_target): Declare.
1101
1102 2019-01-22  Tom Tromey  <tom@tromey.com>
1103
1104         * python/py-arch.c: Do not include py-ref.h.
1105         * python/py-bpevent.c: Do not include py-ref.h.
1106         * python/py-cmd.c: Do not include py-ref.h.
1107         * python/py-continueevent.c: Do not include py-ref.h.
1108         * python/py-event.h: Do not include py-ref.h.
1109         * python/py-evtregistry.c: Do not include py-ref.h.
1110         * python/py-finishbreakpoint.c: Do not include py-ref.h.
1111         * python/py-frame.c: Do not include py-ref.h.
1112         * python/py-framefilter.c: Do not include py-ref.h.
1113         * python/py-function.c: Do not include py-ref.h.
1114         * python/py-infevents.c: Do not include py-ref.h.
1115         * python/py-linetable.c: Do not include py-ref.h.
1116         * python/py-objfile.c: Do not include py-ref.h.
1117         * python/py-param.c: Do not include py-ref.h.
1118         * python/py-prettyprint.c: Do not include py-ref.h.
1119         * python/py-progspace.c: Do not include py-ref.h.
1120         * python/py-symbol.c: Do not include py-ref.h.
1121         * python/py-symtab.c: Do not include py-ref.h.
1122         * python/py-type.c: Do not include py-ref.h.
1123         * python/py-unwind.c: Do not include py-ref.h.
1124         * python/py-utils.c: Do not include py-ref.h.
1125         * python/py-value.c: Do not include py-ref.h.
1126         * python/py-varobj.c: Do not include py-ref.h.
1127         * python/py-xmethods.c: Do not include py-ref.h.
1128         * python/python.c: Do not include py-ref.h.
1129         * varobj.c: Do not include py-ref.h.
1130
1131 2019-01-22  Tom Tromey  <tom@tromey.com>
1132
1133         * objfiles.h (struct objfile_per_bfd_storage): Use "struct"
1134         keyword for bcache.
1135
1136 2019-01-22  Tom Tromey  <tom@tromey.com>
1137
1138         * compile/compile-cplus-types.c: Remove a comment by #include.
1139
1140 2019-01-22  Tom Tromey  <tom@tromey.com>
1141
1142         * compile/gcc-c-plugin.h: Include compile-internal.h.
1143
1144 2019-01-22  Tom Tromey  <tom@tromey.com>
1145
1146         * stabsread.c (EXTERN): Do not define.
1147         (symnum, next_symbol_text_func, processing_gcc_compilation)
1148         (within_function, global_sym_chain, global_stabs)
1149         (previous_stab_code, this_object_header_files)
1150         (n_this_object_header_files)
1151         (n_allocated_this_object_header_files): Define.
1152         * stabsread.h (EXTERN): Never define.  Use "extern".
1153
1154 2019-01-22  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1155
1156         * event-top.c (handle_line_of_input): use unique_xmalloc_ptr for
1157         history_value.
1158
1159 2019-01-21  Tom Tromey  <tom@tromey.com>
1160
1161         * ui-out.c: Fix includes.
1162         * tui/tui-source.c: Fix includes.
1163         * target.c: Fix includes.
1164         * remote.c: Fix includes.
1165         * regcache.c: Fix includes.
1166         * python/py-block.c: Fix includes.
1167         * printcmd.c: Fix includes.
1168         * or1k-tdep.c: Fix includes.
1169         * mi/mi-main.c: Fix includes.
1170         * m32r-tdep.c: Fix includes.
1171         * csky-tdep.c: Fix includes.
1172         * compile/compile-cplus-types.c: Fix includes.
1173         * cli/cli-interp.c: Fix includes.
1174
1175 2019-01-21  Alan Hayward  <alan.hayward@arm.com>
1176
1177         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1): Check
1178         for padding.
1179
1180 2019-01-16  Tom Tromey  <tom@tromey.com>
1181
1182         * objfiles.h (struct minimal_symbol_iterator): Rename.  Move
1183         earlier.
1184         (struct objfile) <msymbols_range>: Move from top level.
1185         <msymbols>: New method.
1186         (class objfile_msymbols): Remove.
1187         * symtab.c (default_collect_symbol_completion_matches_break_on):
1188         Update.
1189         * symmisc.c (dump_msymbols): Update.
1190         * stabsread.c (scan_file_globals): Update.
1191         * objc-lang.c (info_selectors_command, info_classes_command)
1192         (find_methods): Update.
1193         * minsyms.c (find_solib_trampoline_target): Update.
1194         * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Update.
1195         * coffread.c (coff_symfile_read): Update.
1196         * ada-lang.c (ada_lookup_simple_minsym)
1197         (ada_collect_symbol_completion_matches): Update.
1198
1199 2019-01-16  Tom Tromey  <tom@tromey.com>
1200
1201         * objfiles.h (class objfile_msymbols) <iterator>: Change argument
1202         type.  Remove no-argument constructor.
1203         <iterator::operator++>: Simplify.
1204         <begin>: Update.
1205         <end>: Use minimal_symbol_count.
1206
1207 2019-01-16  Tom Tromey  <tom@tromey.com>
1208
1209         * objfiles.h (struct objfile) <psymtabs>: New method.
1210         (class objfile_psymtabs): Remove.
1211         * psymtab.h (class psymtab_storage) <partial_symtab_range>: New
1212         typedef.
1213         <range>: New method.
1214         (require_partial_symbols): Change return type.
1215         * psymtab.c (require_partial_symbols)
1216         (psym_expand_symtabs_matching): Update.
1217         * mdebugread.c (parse_partial_symbols): Update.
1218         * dbxread.c (dbx_end_psymtab): Update.
1219
1220 2019-01-15  Tom Tromey  <tom@tromey.com>
1221
1222         * symtab.c (lookup_objfile_from_block)
1223         (lookup_symbol_in_objfile_symtabs)
1224         (basic_lookup_transparent_type_1, find_pc_sect_compunit_symtab)
1225         (find_line_symtab, info_sources_command)
1226         (default_collect_symbol_completion_matches_break_on)
1227         (make_source_files_completion_list): Update.
1228         * symmisc.c (print_objfile_statistics, dump_objfile)
1229         (maintenance_print_symbols, maintenance_info_symtabs)
1230         (maintenance_check_symtabs, maintenance_info_line_tables):
1231         Update.
1232         * source.c (select_source_symtab)
1233         (forget_cached_source_info_for_objfile): Update.
1234         * objfiles.h (class objfile_compunits): Remove.
1235         (struct objfile) <compunits_range>: New typedef.
1236         (compunits): New method.
1237         * objfiles.c (objfile_relocate1): Update.
1238         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update.
1239         * maint.c (count_symtabs_and_blocks): Update.
1240         * linespec.c (iterate_over_all_matching_symtabs): Update.
1241         * cp-support.c (add_symbol_overload_list_qualified): Update.
1242         * coffread.c (coff_symtab_read): Update.
1243         * ada-lang.c (add_nonlocal_symbols)
1244         (ada_collect_symbol_completion_matches)
1245         (ada_add_global_exceptions): Update.
1246
1247 2019-01-15  Tom Tromey  <tom@tromey.com>
1248
1249         * progspace.h (program_space) <objfiles_safe_range>: New
1250         typedef.
1251         <objfiles_safe>: New method.
1252         * objfiles.h (class all_objfiles_safe): Remove.
1253         * objfiles.c (free_all_objfiles, objfile_purge_solibs): Update.
1254         * jit.c (jit_inferior_exit_hook): Update.
1255
1256 2019-01-17  Tom Tromey  <tom@tromey.com>
1257
1258         * progspace.h (program_space) <objfiles_range>: New typedef.
1259         <objfiles>: New method.
1260         <objfiles_head>: Rename from objfiles.
1261         (object_files): Update.
1262         * guile/scm-progspace.c (gdbscm_progspace_objfiles): Update.
1263         * guile/scm-pretty-print.c
1264         (ppscm_find_pretty_printer_from_objfiles): Update.
1265         * guile/scm-objfile.c (gdbscm_objfiles): Update.
1266         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1267         Update.
1268         * python/py-progspace.c (pspy_get_objfiles): Update.
1269         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1270         Update.
1271         * python/py-objfile.c (objfpy_lookup_objfile_by_name)
1272         (objfpy_lookup_objfile_by_build_id): Update.
1273         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update.
1274         * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
1275         Update.
1276         * symtab.c (iterate_over_symtabs, matching_obj_sections)
1277         (expand_symtab_containing_pc, lookup_objfile_from_block)
1278         (lookup_static_symbol, basic_lookup_transparent_type)
1279         (find_pc_sect_compunit_symtab, find_symbol_at_address)
1280         (find_line_symtab, info_sources_command)
1281         (default_collect_symbol_completion_matches_break_on)
1282         (make_source_files_completion_list, find_main_name): Update.
1283         * symmisc.c (print_symbol_bcache_statistics)
1284         (print_objfile_statistics, maintenance_print_symbols)
1285         (maintenance_print_msymbols, maintenance_print_objfiles)
1286         (maintenance_info_symtabs, maintenance_check_symtabs)
1287         (maintenance_expand_symtabs, maintenance_info_line_tables):
1288         Update.
1289         * symfile.c (remove_symbol_file_command, overlay_invalidate_all)
1290         (find_pc_overlay, find_pc_mapped_section, list_overlays_command)
1291         (map_overlay_command, unmap_overlay_command)
1292         (simple_overlay_update, expand_symtabs_matching)
1293         (map_symbol_filenames): Update.
1294         * symfile-debug.c (set_debug_symfile): Update.
1295         * spu-tdep.c (spu_overlay_update, spu_objfile_from_frame):
1296         Update.
1297         * source.c (select_source_symtab, forget_cached_source_info):
1298         Update.
1299         * solib.c (solib_read_symbols): Update.
1300         * solib-spu.c (append_ocl_sos): Update.
1301         * psymtab.c (maintenance_print_psymbols)
1302         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1303         * probe.c (parse_probes_in_pspace, find_probe_by_pc): Update.
1304         * printcmd.c (info_symbol_command): Update.
1305         * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created):
1306         Update.
1307         * objfiles.h (class all_objfiles): Remove.
1308         * objfiles.c (have_partial_symbols, have_full_symbols)
1309         (have_minimal_symbols, qsort_cmp, update_section_map)
1310         (shared_objfile_contains_address_p)
1311         (default_iterate_over_objfiles_in_search_order): Update.
1312         * objc-lang.c (info_selectors_command, info_classes_command)
1313         (find_methods): Update.
1314         * minsyms.c (find_solib_trampoline_target): Update.
1315         * maint.c (maintenance_info_sections)
1316         (maintenance_translate_address, count_symtabs_and_blocks):
1317         Update.
1318         * main.c (captured_main_1): Update.
1319         * linux-thread-db.c (try_thread_db_load_from_pdir)
1320         (has_libpthread): Update.
1321         * linespec.c (iterate_over_all_matching_symtabs)
1322         (search_minsyms_for_name): Update.
1323         * jit.c (jit_find_objf_with_entry_addr): Update.
1324         * hppa-tdep.c (find_unwind_entry)
1325         (hppa_lookup_stub_minimal_symbol): Update.
1326         * gcore.c (gcore_create_callback, objfile_find_memory_regions):
1327         Update.
1328         * elfread.c (elf_gnu_ifunc_resolve_by_cache)
1329         (elf_gnu_ifunc_resolve_by_got): Update.
1330         * dwarf2-frame.c (dwarf2_frame_find_fde): Update.
1331         * dwarf-index-write.c (save_gdb_index_command): Update.
1332         * cp-support.c (add_symbol_overload_list_qualified): Update.
1333         * breakpoint.c (create_overlay_event_breakpoint)
1334         (create_longjmp_master_breakpoint)
1335         (create_std_terminate_master_breakpoint)
1336         (create_exception_master_breakpoint): Update.
1337         * blockframe.c (find_pc_partial_function): Update.
1338         * ada-lang.c (ada_lookup_simple_minsym, add_nonlocal_symbols)
1339         (ada_collect_symbol_completion_matches)
1340         (ada_add_global_exceptions): Update.
1341
1342 2019-01-17  Tom Tromey  <tom@tromey.com>
1343
1344         * solib-target.c (lm_info_target_p): Remove typedef.  Don't
1345         declare VEC.
1346         (solib_target_parse_libraries): Change return type.
1347         (library_list_start_segment, library_list_start_section)
1348         (library_list_end_library, library_list_start_library); Update.
1349         (solib_target_free_library_list): Remove.
1350         (solib_target_parse_libraries): Remove cleanup.  Change return
1351         type.
1352         (solib_target_current_sos): Update.
1353
1354 2019-01-17  Tom Tromey  <tromey@bapiya>
1355
1356         * valprint.c: Replace "the the" with "the".
1357         * symtab.c: Replace "the the" with "the".
1358         * solib.c: Replace "the the" with "the".
1359         * solib-dsbt.c: Replace "the the" with "the".
1360         * linespec.c: Replace "the the" with "the".
1361         * dwarf2loc.h: Replace "the the" with "the".
1362         * amd64-windows-tdep.c: Replace "the the" with "the".
1363         * aarch64-tdep.c: Replace "the the" with "the".
1364
1365 2019-01-16  Keith Seitz  <keiths@redhat.com>
1366
1367         PR gdb/23773
1368         * dwarf2read.c (dwarf2_cu) <ancestor>: New field.
1369         <builder>: Rename to ..
1370         <m_builder>: ... this and make private.
1371         (dwarf2_cu::get_builder): New method.  Change all users of
1372         `builder' to use this method.
1373         (dwarf2_start_symtab): Move to ...
1374         (dwarf2_cu::start_symtab): ... here.  Update all callers
1375         (setup_type_unit_groups): Move to ...
1376         (dwarf2_cu::setup_type_unit_groups): ... here.  Update all
1377         callers.
1378         (dwarf2_cu::reset_builder): New method.
1379         (process_full_compunit, process_full_type_unit): Use
1380         dwarf2_cu::reset_builder.
1381         (follow_die_offset): Record the ancestor CU if it is different
1382         from the followed DIE's CU.
1383         (follow_die_sig_1): Likewise.
1384
1385 2019-01-15  Tom Tromey  <tom@tromey.com>
1386
1387         * remote.c (class remote_state) <buf>: Now a char_vector.
1388         <buf_size>: Remove.
1389         (remote_target::getpkt): Change type of buf.  Remove sizeof_buf
1390         parameter.
1391         (remote_target::getpkt_or_notif_sane_1)
1392         (remote_target::getpkt_sane)
1393         (remote_target::getpkt_or_notif_sane): Likewise.
1394         (class remote_target) <putpkt>: New overload.
1395         (remote_target::read_frame): Change type of "buf_p".  Remove
1396         sizeof_p parameter.
1397         (packet_ok): New overload.
1398         (packet_check_result): New overload.
1399         Update all uses.
1400
1401 2019-01-14  Tom Tromey  <tom@tromey.com>
1402
1403         * remote-notif.c (handle_notification, remote_notif_ack)
1404         (remote_notif_parse): Make "buf" const.
1405         * remote-notif.h (struct notif_client) <parse, ack>: Make "buf"
1406         const.
1407         (remote_notif_parse, remote_notif_ack, handle_notification):
1408         Likewise.
1409         * remote.c (remote_notif_stop_parse): Make "buf" const.
1410         (remote_target::remote_parse_stop_reply): Make "buf" const.
1411         (remote_notif_stop_ack): Make "buf" const.
1412
1413 2019-01-14  Tom Tromey  <tom@tromey.com>
1414
1415         * remote.c (remote_console_output): Make parameter const.
1416
1417 2019-01-14  Tom Tromey  <tom@tromey.com>
1418
1419         * target-debug.h (target_debug_print_signals): Constify.
1420         * nto-procfs.c (nto_procfs_target::pass_signals): Update.
1421         * procfs.c (procfs_target::pass_signals): Update.
1422         * linux-nat.c (linux_nat_target::pass_signals): Update.
1423         * linux-nat.h (class linux_nat_target) <pass_signals>: Update.
1424         * target-delegates.c: Rebuild.
1425         * remote.c (remote_target::program_signals): Update.
1426         (remote_target::pass_signals): Update.
1427         * target.c (target_pass_signals): Constify argument.
1428         (target_program_signals): Likewise.
1429         * target.h (struct target_ops) <pass_signals, program_signals>:
1430         Constify argument.
1431         (target_pass_signals, target_program_signals): Constify argument.
1432
1433 2019-01-14  Tom Tromey  <tom@tromey.com>
1434
1435         PR tui/28819:
1436         * tui/tui-io.c (gdb_wgetch): Print \r when needed.
1437
1438 2019-01-14  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1439
1440         * ppc-tdep.h (struct gdbarch_tdep) <ppc_v0_alias_regnum>: New
1441         field.
1442         * rs6000-tdep.c: Include reggroups.h.
1443         (IS_V_ALIAS_PSEUDOREG): Define.
1444         (rs6000_register_name): Return names for the "vX" aliases.
1445         (rs6000_pseudo_register_type): Return type for the "vX" aliases.
1446         (rs6000_pseudo_register_reggroup_p): Restore.  Handle "vX"
1447         aliases.  Call default_register_reggroup_p for all other
1448         pseudo-registers.
1449         (v_alias_pseudo_register_read, v_alias_pseudo_register_write):
1450         New functions.
1451         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
1452         Handle "vX" aliases.
1453         (v_alias_pseudo_register_collect): New function.
1454         (rs6000_ax_pseudo_register_collect): Handle "vX" aliases.
1455         (rs6000_gdbarch_init): Initialize "vX" aliases as
1456         pseudo-registers.  Restore registration of
1457         rs6000_pseudo_register_reggroup_p with
1458         set_tdesc_pseudo_register_reggroup_p.
1459
1460 2019-01-13  Max Filippov  <jcmvbkbc@gmail.com>
1461
1462         * xtensa-linux-tdep.c (xtensa_linux_init_abi): Update
1463         tdep->num_pseudo_regs. Add calls to set_gdbarch_num_regs and
1464         set_gdbarch_num_pseudo_regs.
1465
1466 2019-01-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1467
1468         * cli/cli-style.h (class cli_style_option): <add_setshow_commands>
1469         Remove arg prefixname, add do_set and do_show.
1470         Add member functions set_list and show_list.
1471         * cli/cli-style.c (class cli_style_option): Update accordingly.
1472         (style_set_list): Move to file scope.
1473         (style_show_list): Likewise.
1474         (set_style): Call help_list.
1475         (show_style): Call cmd_show_list.
1476         (_initialize_cli_style): New macro STYLE_ADD_SETSHOW_COMMANDS.
1477         Update to use the new macro.
1478
1479 2019-10-12  Joel Brobecker  <brobecker@adacore.com>
1480
1481         * ada-lang.c (_initialize_ada_language): Expand the help text
1482         for the "catch exception" command.
1483
1484 2019-01-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1485
1486         * symtab.c (matching_obj_sections): Initialize obj,
1487         declare it closer to its usage.
1488
1489 2019-01-10  Tom Tromey  <tom@tromey.com>
1490
1491         * thread-iter.h (inf_threads_iterator): Use next_iterator.
1492         (basic_inf_threads_range): Remove.
1493         (inf_threads_range, inf_non_exited_threads_range)
1494         (safe_inf_threads_range): Use next_adapter.
1495
1496 2019-01-10  Keith Seitz  <keiths@redhat.com>
1497
1498         PR gdb/23712
1499         PR symtab/23010
1500         * dwarf2read.c (dw2_add_symbol_to_list): Remove.
1501         (fixup_go_packaging, new_symbol): Use add_symbol_to_list.
1502
1503 2019-01-10  Keith Seitz  <keiths@redhat.com>
1504
1505         PR gdb/23712
1506         PR symtab/23010
1507         * dictionary.c (pending_to_vector): Remove.
1508         (dict_create_hashed_1, dict_create_linear_1, dict_add_pending_1):
1509         Remove _1 suffix, replacing functions of the same name.  Update
1510         all callers.
1511         (dict_create_hashed, dict_create_hashed_expandable)
1512         (dict_create_linear, dict_create_linear_expandable, dict_free)
1513         (dict_add_symbol, dict_add_pending, dict_size, dict_empty):
1514         Make functions static.
1515
1516 2019-01-10  Keith Seitz  <keiths@redhat.com>
1517
1518         PR gdb/23712
1519         PR symtab/23010
1520         * dictionary.h (struct dictionary): Replace declaration with
1521         multidictionary.
1522         (dict_create_hashed, dict_create_hashed_expandable)
1523         (dict_create_linear, dict_create_linear_expandable)
1524         (dict_free, dict_add_symbol, dict_add_pending, dict_empty)
1525         (dict_iterator_first, dict_iterator_next, dict_iter_match_first)
1526         (dict_iter_match_next, dict_size): Rename to "mdict_" versions
1527         taking multidictionary argument.
1528         [ALL_DICT_SYMBOLS]: Update for multidictionary.
1529         * block.h (struct block) <dict>: Change to multidictionary
1530         and rename `multidict'.
1531         * block.c, buildsym.c, jit.c, mdebugread.c, objfiles.c,
1532         symmisc.c: Update all dictionary references to multidictionary.
1533
1534 2019-01-10  Keith Seitz  <keiths@redhat.com>
1535
1536         PR gdb/23712
1537         PR symtab/23010
1538         * dictionary.c: Include unordered_map.
1539         (pending_to_vector): New function.
1540         (dict_create_hashed_1, dict_create_linear_1, dict_add_pending_1):
1541         Rewrite the non-"_1" functions to take vector instead
1542         of linked list.
1543         (dict_create_hashed, dict_create_linear, dict_add_pending): Use the
1544         "new" _1 versions of the same name.
1545         (multidictionary): Define.
1546         (std::hash<enum language): New definition.
1547         (collate_pending_symbols_by_language, mdict_create_hashed)
1548         (mdict_create_hashed_expandable, mdict_create_linear)
1549         (mdict_create_linear_expandable, mdict_free)
1550         (find_language_dictionary, create_new_language_dictionary)
1551         (mdict_add_symbol, mdict_add_pending, mdict_iterator_first)
1552         (mdict_iterator_next, mdict_iter_match_first, mdict_iter_match_next)
1553         (mdict_size, mdict_empty): New functions.
1554         * dictionary.h (mdict_iterator): Define.
1555
1556 2019-01-10  Pedro Alves  <palves@redhat.com>
1557
1558         * breakpoint.c (read_uploaded_action)
1559         (create_tracepoint_from_upload): Adjust to use
1560         gdb::unique_xmalloc_ptr.
1561         * ctf.c (ctf_write_uploaded_tp):
1562         (SET_ARRAY_FIELD): Use emplace_back.
1563         (SET_STRING_FIELD): Adjust to use gdb::unique_xmalloc_ptr.
1564         * tracefile-tfile.c (tfile_write_uploaded_tp):
1565         * tracepoint.c (parse_tracepoint_definition): Adjust to use
1566         gdb::unique_xmalloc_ptr.
1567         * tracepoint.h (struct uploaded_tp) <cond, actions, step_actions,
1568         at_string, cond_string, cmd_strings>: Replace char pointers
1569         with gdb::unique_xmalloc_ptr.
1570
1571 2019-01-10  Pedro Alves  <palves@redhat.com>
1572
1573         * solib-target.c (library_list_start_library): Don't xstrdup name.
1574
1575 2019-01-10  Pedro Alves  <palves@redhat.com>
1576
1577         * mdebugread.c (parse_partial_symbols): Use
1578         gdb::unique_xmalloc_ptr to manage heap-allocated 'stabsstring'.
1579
1580 2019-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1581
1582         * linux-fork.c (scoped_switch_fork_info)
1583         <~scoped_switch_fork_info>: Fix incorrect variable name.
1584
1585 2019-01-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1586
1587         * linux-fork.c (scoped_switch_fork_info)
1588         <scoped_switch_fork_info>: Make explicit.
1589         <~scoped_switch_fork_info>: Wrap core in TRY/CATCH.
1590
1591 2019-01-10  Tom Tromey  <tom@tromey.com>
1592
1593         * objfiles.h (objfile::reset_psymtabs): Update.
1594         * objfiles.c (objfile::objfile): Update.
1595         * psymtab.h (psymtab_storage::obstack): Update.
1596         (psymtab_storage::m_obstack): Use gdb::optional.
1597         (class psymtab_storage): Update comment.  Remove objfile
1598         parameter.
1599         * psymtab.c (psymtab_storage::psymtab_storage): Update.
1600
1601 2019-01-10  Tom Tromey  <tom@tromey.com>
1602
1603         * psymtab.h (psymtab_storage::allocate_psymtab): New method.
1604         <free_psymtabs>: Now private.
1605         * psymtab.c (psymtab_storage::allocate_psymtab): Implement.
1606         (allocate_psymtab): Use new method.
1607
1608 2019-01-10  Tom Tromey  <tom@tromey.com>
1609
1610         * xcoffread.c (xcoff_end_psymtab): Use allocate_dependencies.
1611         * psymtab.h (psymtab_storage::allocate_dependencies): New method.
1612         * mdebugread.c (parse_partial_symbols): Use
1613         allocate_dependencies.
1614         * dwarf2read.c (dwarf2_create_include_psymtab): Use
1615         allocate_dependencies.
1616         (process_psymtab_comp_unit_reader)
1617         (build_type_psymtab_dependencies): Likewise.
1618         * dbxread.c (dbx_end_psymtab): Use allocate_dependencies.
1619
1620 2019-01-10  Tom Tromey  <tom@tromey.com>
1621
1622         * psymtab.c (add_psymbol_to_bcache): Pass psymtab obstack to
1623         PSYMBOL_SET_LANGUAGE.
1624         (allocate_psymtab): Allocate psymtab on the psymtab obstack.
1625
1626 2019-01-10  Tom Tromey  <tom@tromey.com>
1627
1628         * psymtab.h (psymtab_storage::obstack): New method.
1629         <m_obstack>: Rename from obstack; now private.
1630         * psymtab.c (psymtab_storage): Update.
1631         * dwarf2read.c (create_addrmap_from_index)
1632         (create_addrmap_from_aranges, dwarf2_build_psymtabs_hard):
1633         Update.
1634
1635 2019-01-10  Tom Tromey  <tom@tromey.com>
1636
1637         * symfile.c (reread_symbols): Call objfile->reset_psymtabs.
1638         * objfiles.h (objfile::reset_psymtabs): New method.
1639
1640 2019-01-10  Tom Tromey  <tom@tromey.com>
1641
1642         * symmisc.c (print_symbol_bcache_statistics): Update.
1643         (print_objfile_statistics): Update.
1644         * symfile.c (reread_symbols): Update.
1645         * psymtab.h (class psymtab_storage): New.
1646         * psymtab.c (psymtab_storage): New constructor.
1647         (~psymtab_storage): New destructor.
1648         (require_partial_symbols): Update.
1649         (ALL_OBJFILE_PSYMTABS_REQUIRED): Rewrite.
1650         (find_pc_sect_psymtab, find_pc_sect_psymbol)
1651         (match_partial_symbol, lookup_partial_symbol, dump_psymtab)
1652         (psym_dump, recursively_search_psymtabs, psym_has_symbols)
1653         (psym_find_compunit_symtab_by_address, sort_pst_symbols)
1654         (start_psymtab_common, end_psymtab_common)
1655         (add_psymbol_to_bcache, add_psymbol_to_list, init_psymbol_list)
1656         (allocate_psymtab): Update.
1657         (psymtab_storage::discard_psymtab): Rename from discard_psymtab.
1658         Update.
1659         (dump_psymtab_addrmap, maintenance_print_psymbols)
1660         (maintenance_check_psymtabs): Update.
1661         (class objfile_psymtabs): Move to objfiles.h.
1662         * psympriv.h (discard_psymtab): Now inline.
1663         (psymtab_discarder::psymtab_discarder): Update.
1664         (psymtab_discarder::~psymtab_discarder): Update.
1665         (ALL_OBJFILE_PSYMTABS): Rewrite.
1666         * objfiles.h (struct objfile) <psymtabs, psymtabs_addrmap,
1667         free_psymtabs, psymbol_cache, global_psymbols, static_psymbols>:
1668         Remove fields.
1669         <partial_symtabs>: New field.
1670         (class objfile_psymtabs): Move from psymtab.h.  Update.
1671         * objfiles.c (objfile::objfile): Initialize partial_symtabs, not
1672         psymbol_cache.
1673         (objfile::~objfile): Don't destroy psymbol_cache.
1674         * mdebugread.c (parse_partial_symbols): Update.
1675         * dwarf2read.c (create_addrmap_from_index)
1676         (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
1677         (process_psymtab_comp_unit_reader, dwarf2_build_psymtabs_hard)
1678         (add_partial_subprogram, dwarf2_ranges_read): Update.
1679         * dwarf-index-write.c (write_address_map)
1680         (write_one_signatured_type, recursively_write_psymbols)
1681         (class debug_names, class debug_names, write_psymtabs_to_index):
1682         Update.
1683
1684 2019-01-10  Tom Tromey  <tom@tromey.com>
1685
1686         * symtab.h (SYMBOL_SET_NAMES): Update.
1687         (symbol_set_names): Update.
1688         (MSYMBOL_SET_NAMES): Update.
1689         * symtab.c (symbol_set_names): Change argument to be an
1690         objfile_per_bfd_storage.
1691         * psymtab.c (add_psymbol_to_bcache): Update.
1692         * psympriv.h (PSYMBOL_SET_NAMES): Take per_bfd argument.
1693
1694 2019-01-10  Tom Tromey  <tom@tromey.com>
1695
1696         * symtab.c (create_demangled_names_hash): Change argument to be an
1697         objfile_per_bfd_storage.
1698         (symbol_set_names): Update.
1699
1700 2019-01-10  Tom Tromey  <tom@tromey.com>
1701
1702         * xcoffread.c (xcoff_initial_scan): Unconditionally call
1703         init_psymbol_list.
1704         * psymtab.c (init_psymbol_list): Do nothing if already called.
1705         * psympriv.h (init_psymbol_list): Add comment.
1706         * dwarf2read.c (dwarf2_build_psymtabs): Unconditionally call
1707         init_psymbol_list.
1708         * dbxread.c (dbx_symfile_read): Unconditionally call
1709         init_psymbol_list.
1710
1711 2019-01-10  Tom Tromey  <tom@tromey.com>
1712
1713         * xcoffread.c (scan_xcoff_symtab): Update.
1714         * psymtab.c (add_psymbol_to_list): Replace "list" parameter with
1715         "where".
1716         * mdebugread.c (parse_partial_symbols)
1717         (handle_psymbol_enumerators): Update.
1718         * dwarf2read.c (add_partial_symbol, load_partial_dies): Update.
1719         * dbxread.c (read_dbx_symtab): Update.
1720         * psympriv.h (psymbol_placement): New enum.
1721         (add_psymbol_to_list): Update.
1722
1723 2019-01-10  Tom Tromey  <tom@tromey.com>
1724
1725         * xcoffread.c (xcoff_start_psymtab): Remove global_psymbols and
1726         static_psymbols parameters.
1727         (scan_xcoff_symtab): Update.
1728         * psymtab.c (start_psymtab_common): Remove global_psymbols and
1729         static_psymbols parameters.
1730         * psympriv.h (start_psymtab_common): Update.
1731         * mdebugread.c (parse_partial_symbols): Update.
1732         * dwarf2read.c (create_partial_symtab): Update.
1733         * dbxread.c (read_dbx_symtab): Update.
1734         (start_psymtab): Remove global_psymbols and static_psymbols
1735         parameters.
1736
1737 2019-01-10  Tom Tromey  <tom@tromey.com>
1738
1739         * xcoffread.c (xcoff_end_psymtab): Remove some initializations.
1740         * psymtab.c (allocate_psymtab): Add comment.
1741         * psympriv.h (allocate_psymtab): Add comment.
1742         * dwarf2read.c (dwarf2_create_include_psymtab): Remove some
1743         initializations.
1744         * dbxread.c (dbx_end_psymtab): Remove some initializations.
1745
1746 2019-01-10  Tom Tromey  <tom@tromey.com>
1747
1748         * symfile.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
1749         Don't declare.
1750         * mipsread.c: Include mdebugread.h.
1751         * mdebugread.h (mdebug_build_psymtabs, elfmdebug_build_psymtabs):
1752         Declare.
1753         * elfread.c: Include mdebugread.h.
1754
1755 2019-01-09  Tom Tromey  <tom@tromey.com>
1756
1757         * dbxread.c (dbx_end_psymtab): Use objfile_psymtabs.
1758         * mdebugread.c (parse_partial_symbols): Use objfile_psymtabs.
1759         * psymtab.c (ALL_OBJFILE_PSYMTABS_REQUIRED): Remove.
1760         (psym_map_symtabs_matching_filename, find_pc_sect_psymtab)
1761         (psym_lookup_symbol, psym_find_last_source_symtab)
1762         (psym_forget_cached_source_info, psym_print_stats)
1763         (psym_expand_symtabs_for_function, psym_expand_all_symtabs)
1764         (psym_expand_symtabs_with_fullname, psym_map_symbol_filenames)
1765         (psym_map_matching_symbols, psym_expand_symtabs_matching)
1766         (psym_find_compunit_symtab_by_address)
1767         (maintenance_print_psymbols, maintenance_info_psymtabs)
1768         (maintenance_check_psymtabs): Use ranged for.
1769         * psymtab.h (class objfile_psymtabs): New.
1770         (require_partial_symbols): Return objfile_psymtabs.
1771         * psympriv.h (ALL_OBJFILE_PSYMTABS): Remove.
1772
1773 2019-01-09  Tom Tromey  <tom@tromey.com>
1774
1775         * symfile.c (overlay_invalidate_all, find_pc_overlay)
1776         (find_pc_mapped_section, list_overlays_command)
1777         (map_overlay_command, unmap_overlay_command)
1778         (simple_overlay_update): Use all_objfiles.
1779         * spu-tdep.c (spu_overlay_update): Use all_objfiles.
1780         * printcmd.c (info_symbol_command): Use all_objfiles.
1781         * objfiles.h (ALL_OBJSECTIONS): Remove.
1782         * maint.c (maintenance_translate_address): Use all_objfiles.
1783         * gcore.c (gcore_create_callback): Use all_objfiles.
1784         (objfile_find_memory_regions): Likewise.
1785
1786 2019-01-09  Tom Tromey  <tom@tromey.com>
1787
1788         * symtab.c (find_line_symtab, info_sources_command)
1789         (make_source_files_completion_list): Use objfile_compunits.
1790         * source.c (select_source_symtab): Use objfile_compunits.
1791         * objfiles.h (struct objfile): Update comment.
1792         (ALL_OBJFILES): Remove.
1793         (ALL_FILETABS): Remove.
1794         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Use
1795         objfile_compunits.
1796
1797 2019-01-09  Tom Tromey  <tom@tromey.com>
1798
1799         * symmisc.c (print_objfile_statistics, dump_objfile)
1800         (maintenance_print_symbols): Use compunit_filetabs.
1801         * source.c (forget_cached_source_info_for_objfile): Use
1802         compunit_filetabs.
1803         * objfiles.h (ALL_OBJFILE_FILETABS): Remove.
1804         (ALL_FILETABS): Use compunit_filetabs.
1805         * objfiles.c (objfile_relocate1): Use compunit_filetabs.
1806         * coffread.c (coff_symtab_read): Use compunit_filetabs.
1807
1808 2019-01-09  Tom Tromey  <tom@tromey.com>
1809
1810         * symtab.h (ALL_COMPUNIT_FILETABS): Remove.
1811         (compunit_filetabs): New.
1812         * symtab.c (iterate_over_some_symtabs, find_pc_sect_line): Use
1813         compunit_filetabs.
1814         (info_sources_command, make_source_files_completion_list): Remove
1815         declaration.
1816         * symmisc.c (print_objfile_statistics, dump_objfile)
1817         (maintenance_print_symbols): Remove declaration.
1818         (maintenance_info_symtabs): Use compunit_filetabs.
1819         (maintenance_info_line_tables): Likewise.
1820         * source.c (select_source_symtab): Change local variable name.
1821         (forget_cached_source_info_for_objfile): Remove declaration.
1822         * objfiles.h (ALL_OBJFILE_FILETABS): Use compunit_filetabs.
1823         * objfiles.c (objfile_relocate1): Remove declaration.
1824         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
1825         declaration.
1826         * maint.c (count_symtabs_and_blocks): Use compunit_filetabs.
1827         * coffread.c (coff_symtab_read): Remove declaration.
1828         * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Use
1829         compunit_filetabs.
1830
1831 2019-01-09  Tom Tromey  <tom@tromey.com>
1832
1833         * symtab.c (lookup_objfile_from_block)
1834         (find_pc_sect_compunit_symtab, search_symbols)
1835         (default_collect_symbol_completion_matches_break_on): Use
1836         objfile_compunits.
1837         * objfiles.h (ALL_COMPUNITS): Remove.
1838         * maint.c (count_symtabs_and_blocks): Use objfile_compunits.
1839         * cp-support.c (add_symbol_overload_list_qualified): Use
1840         objfile_compunits.
1841         * ada-lang.c (ada_collect_symbol_completion_matches)
1842         (ada_add_global_exceptions): Use objfile_compunits.
1843
1844 2019-01-09  Tom Tromey  <tom@tromey.com>
1845
1846         * source.c (select_source_symtab)
1847         (forget_cached_source_info_for_objfile): Remove declaration.
1848         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove
1849         declaration.
1850         * maint.c (count_symtabs_and_blocks): Remove declaration.
1851         * cp-support.c (add_symbol_overload_list_qualified): Remove
1852         declaration.
1853         * coffread.c (coff_symtab_read): Remove declaration.
1854         * symtab.c (lookup_symbol_in_objfile_symtabs)
1855         (basic_lookup_transparent_type_1): Use objfile_compunits.
1856         (lookup_objfile_from_block, find_pc_sect_compunit_symtab)
1857         (info_sources_command, search_symbols)
1858         (default_collect_symbol_completion_matches_break_on)
1859         (make_source_files_completion_list): Remove declaration.
1860         * ada-lang.c (add_nonlocal_symbols): Use objfile_compunits.
1861         (ada_collect_symbol_completion_matches)
1862         (ada_add_global_exceptions): Remove declaration.
1863         * linespec.c (iterate_over_all_matching_symtabs): Use
1864         objfile_compunits.
1865         * objfiles.h (ALL_OBJFILE_COMPUNITS): Remove.
1866         (class objfile_compunits): New.
1867         (ALL_COMPUNITS): Use objfile_compunits.
1868         * symmisc.c (print_objfile_statistics, maintenance_info_symtabs)
1869         (maintenance_check_symtabs, maintenance_info_line_tables): Use
1870         objfile_compunits.
1871         * objfiles.c (objfile_relocate1): Use objfile_compunits.
1872
1873 2019-01-09  Tom Tromey  <tom@tromey.com>
1874
1875         * symtab.c (search_symbols)
1876         (default_collect_symbol_completion_matches_break_on): Use
1877         objfile_msymbols.
1878         * ada-lang.c (ada_lookup_simple_minsym)
1879         (ada_collect_symbol_completion_matches): Use objfile_msymbols.
1880         * minsyms.c (find_solib_trampoline_target): Use objfile_msymbols.
1881         * hppa-tdep.c (hppa_lookup_stub_minimal_symbol): Use
1882         objfile_msymbols.
1883         * coffread.c (coff_symfile_read): Use objfile_msymbols.
1884         * symmisc.c (dump_msymbols): Use objfile_msymbols.
1885         * objc-lang.c (find_methods): Use objfile_msymbols.
1886         (info_selectors_command, info_classes_command): Likewise.
1887         * stabsread.c (scan_file_globals): Use objfile_msymbols.
1888         * objfiles.h (class objfile_msymbols): New.
1889         (ALL_OBJFILE_MSYMBOLS): Remove.
1890         (ALL_MSYMBOLS): Remove.
1891
1892 2019-01-09  Tom Tromey  <tom@tromey.com>
1893
1894         * common/next-iterator.h (next_adapter): Add Iterator template
1895         parameter.
1896         * objfiles.h (ALL_OBJFILES_SAFE): Remove.
1897         (class all_objfiles_safe): New.
1898         * jit.c (jit_inferior_exit_hook): Use all_objfiles_safe.
1899         * objfiles.c (put_objfile_before): Update comment.
1900         (add_separate_debug_objfile): Likewise.
1901         (free_all_objfiles): Use all_objfiles_safe.
1902         (objfile_purge_solibs): Likewise.
1903
1904 2019-01-09  Tom Tromey  <tom@tromey.com>
1905
1906         * symtab.c (iterate_over_symtabs, matching_obj_sections)
1907         (expand_symtab_containing_pc, lookup_static_symbol)
1908         (basic_lookup_transparent_type, find_pc_sect_compunit_symtab)
1909         (find_symbol_at_address, find_line_symtab, find_main_name): Use
1910         all_objfiles.
1911         * probe.c (find_probe_by_pc, collect_probes): Use all_objfiles.
1912         * breakpoint.c (create_overlay_event_breakpoint)
1913         (create_longjmp_master_breakpoint)
1914         (create_std_terminate_master_breakpoint)
1915         (create_exception_master_breakpoint): Use all_objfiles.
1916         * linux-thread-db.c (try_thread_db_load_from_pdir)
1917         (has_libpthread): Use all_objfiles.
1918         * ada-lang.c (add_nonlocal_symbols): Use all_objfiles.
1919         * linespec.c (iterate_over_all_matching_symtabs)
1920         (search_minsyms_for_name): Use all_objfiles.
1921         * maint.c (maintenance_info_sections): Use all_objfiles.
1922         * main.c (captured_main_1): Use all_objfiles.
1923         * spu-tdep.c (spu_objfile_from_frame): Use all_objfiles.
1924         * guile/scm-objfile.c (gdbscm_objfiles): Use all_objfiles.
1925         * guile/scm-pretty-print.c
1926         (ppscm_find_pretty_printer_from_objfiles): Use all_objfiles.
1927         * solib-spu.c (append_ocl_sos): Use all_objfiles.
1928         * symmisc.c (maintenance_print_symbols): Use all_objfiles.
1929         (maintenance_print_msymbols): Use all_objfiles.
1930         * source.c (select_source_symtab): Use all_objfiles.
1931         * jit.c (jit_find_objf_with_entry_addr): Use all_objfiles.
1932         * symfile.c (remove_symbol_file_command)
1933         (expand_symtabs_matching, map_symbol_filenames): Use
1934         all_objfiles.
1935         * ppc-linux-tdep.c (ppc_linux_spe_context_inferior_created): Use
1936         all_objfiles.
1937         * dwarf2-frame.c (dwarf2_frame_find_fde): Use all_objfiles.
1938         * objc-lang.c (find_methods): Use all_objfiles.
1939         * objfiles.c (have_partial_symbols, have_full_symbols)
1940         (have_minimal_symbols, qsort_cmp)
1941         (default_iterate_over_objfiles_in_search_order): Use
1942         all_objfiles.
1943         * hppa-tdep.c (find_unwind_entry): Use all_objfiles.
1944         * psymtab.c (maintenance_print_psymbols): Use all_objfiles.
1945         (maintenance_check_psymtabs): Use all_objfiles.
1946         (ALL_PSYMTABS): Remove.
1947         * compile/compile-object-run.c (do_module_cleanup): Use
1948         all_objfiles.
1949         * blockframe.c (find_pc_partial_function): Use all_objfiles.
1950         * cp-support.c (add_symbol_overload_list_qualified): Use
1951         all_objfiles.
1952         * windows-tdep.c (windows_iterate_over_objfiles_in_search_order):
1953         Use all_objfiles.
1954         * dwarf-index-write.c (save_gdb_index_command): Use all_objfiles.
1955         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Use
1956         all_objfiles.
1957         * python/py-objfile.c (objfpy_lookup_objfile_by_name)
1958         (objfpy_lookup_objfile_by_build_id): Use all_objfiles.
1959         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1960         Uses all_objfiles.
1961         * solib.c (solib_read_symbols): Use all_objfiles
1962
1963 2019-01-09  Tom Tromey  <tom@tromey.com>
1964
1965         * probe.c (parse_probes_in_pspace): Use all_objfiles.
1966         * guile/scm-progspace.c (gdbscm_progspace_objfiles): Use
1967         all_objfiles.
1968         * objfiles.h (ALL_PSPACE_OBJFILES): Remove.
1969         * symmisc.c (print_symbol_bcache_statistics)
1970         (print_objfile_statistics, maintenance_print_objfiles)
1971         (maintenance_info_symtabs, maintenance_check_symtabs)
1972         (maintenance_expand_symtabs, maintenance_info_line_tables): Use
1973         all_objfiles.
1974         * source.c (forget_cached_source_info): Use all_objfiles.
1975         * symfile-debug.c (set_debug_symfile): Use all_objfiles.
1976         * elfread.c (elf_gnu_ifunc_resolve_by_cache)
1977         (elf_gnu_ifunc_resolve_by_got): Use all_objfiles.
1978         * objfiles.c (update_section_map): Use all_objfiles.
1979         (shared_objfile_contains_address_p): Likewise.
1980         * psymtab.c (maintenance_info_psymtabs): Use all_objfiles.
1981         * python/py-progspace.c (pspy_get_objfiles): Use all_objfiles.
1982
1983 2019-01-09  Tom Tromey  <tom@tromey.com>
1984
1985         * common/next-iterator.h: New file.
1986         * objfiles.h (class all_objfiles): New.
1987         (struct objfile_iterator): New.
1988
1989 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1990
1991         * NEWS: Move the description of the changed "frame", "select-frame",
1992          and "info frame" commands to the Changed commands section.
1993
1994 2019-01-09  Simon Marchi  <simon.marchi@ericsson.com>
1995
1996         * gdbtypes.c (check_stub_method_group): Remove handling of old
1997         mangling schemes.
1998         * linespec.c (find_methods): Likewise.
1999         * stabsread.c (read_member_functions): Likewise.
2000         * valops.c (search_struct_method): Likewise.
2001         (value_struct_elt_for_reference): Likewise.
2002         * NEWS: Mention this change.
2003
2004 2019-01-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2005
2006         * cli/cli-cmds.c (list_command): Pass a source_lines_range to
2007         print_source_lines.
2008         * source.c (print_source_lines_base): Update line number check.
2009         (print_source_lines): New function.
2010         (source_lines_range::source_lines_range): New function.
2011         * source.h (class source_lines_range): New class.
2012         (print_source_lines): New declaration.
2013
2014 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2015
2016         * linespec.c (linespec_state_destructor): Free self->canonical_names.
2017
2018 2019-01-08  Tom Tromey  <tom@tromey.com>
2019             Simon Marchi  <simon.marchi@ericsson.com>
2020
2021         PR gdb/24060
2022         * ada-exp.y (DOLLAR_VARIABLE): Rename from SPECIAL_VARIABLE.
2023         * ada-lex.l (DOLLAR_VARIABLE): Likewise.
2024         * c-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
2025         * f-exp.y (DOLLAR_VARIABLE): Likewise.
2026         * m2-exp.y (DOLLAR_VARIABLE): Rename from INTERNAL_VAR.
2027         * p-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
2028
2029 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2030
2031         * source.c (select_source_symtab): Move header comment to
2032         declaration in source.h.
2033         (forget_cached_source_info_for_objfile): Likewise.
2034         (forget_cached_source_info): Likewise.
2035         (identify_source_line): Likewise.
2036         * source.h (identify_source_line): Move declaration from symtab.h
2037         and add comment from source.c
2038         (print_source_lines): Likewise.
2039         (forget_cached_source_info_for_objfile): Likewise.
2040         (forget_cached_source_info): Likewise.
2041         (select_source_symtab): Likewise.
2042         (enum print_source_lines_flag): Move definition from symtab.h.
2043         * symtab.h (identify_source_line): Move declaration to source.h.
2044         (print_source_lines): Likewise.
2045         (forget_cached_source_info_for_objfile): Likewise.
2046         (forget_cached_source_info): Likewise.
2047         (select_source_symtab): Likewise.
2048         (enum print_source_lines_flag): Move definition to source.h.
2049         * tui/tui-hooks.c: Add 'source.h' include.
2050
2051 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2052
2053         * source.c (print_source_lines_base): Handle requests to print
2054         reverse line number sequences, and guard against empty lines
2055         string.
2056
2057 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2058
2059         * source.c (print_source_lines_base): Fix skip of '\r' if next
2060         character is '\n'.
2061
2062 2019-01-06  Tom Tromey  <tom@tromey.com>
2063
2064         * c-exp.y (struct c_parse_state) <macro_original_text,
2065         expansion_obstack>: New member.
2066         (macro_original_text, expansion_obstack): Remove globals.
2067         (scan_macro_expansion, scanning_macro_expansion)
2068         (finished_macro_expansion): Update.
2069         (scan_macro_cleanup): Remove.
2070         (yylex, c_parse): Update.
2071
2072 2019-01-06  Tom Tromey  <tom@tromey.com>
2073
2074         * c-exp.y (struct c_parse_state) <strings>: New member.
2075         (operator_stoken): Update.
2076
2077 2019-01-06  Tom Tromey  <tom@tromey.com>
2078
2079         * parser-defs.h (type_ptr): Remove typedef.  Don't declare VEC.
2080         (union type_stack_elt) <typelist_val>: Now a pointer to
2081         std::vector.
2082         (type_stack_cleanup): Don't declare.
2083         (push_typelist): Update.
2084         * parse.c (pop_typelist): Return a std::vector.
2085         (push_typelist): Take a std::vector.
2086         (follow_types): Update.  Do not free args.
2087         (type_stack_cleanup): Remove.
2088         * c-exp.y (struct c_parse_state): New.
2089         (cpstate): New global.
2090         (type_aggregate_p, exp, ptr_operator, parameter_typelist)
2091         (nonempty_typelist): Update.
2092         (func_mod): Create a new vector.
2093         (c_parse): Create a c_parse_state.
2094         (check_parameter_typelist): Do not delete params.
2095         (function_method): Update.  Do not delete type_list.
2096
2097 2019-01-06  Tom Tromey  <tom@tromey.com>
2098
2099         PR gdb/28155:
2100         * python/py-finishbreakpoint.c (bpfinishpy_init): Use
2101         check_typedef.
2102         * infcmd.c (finish_command_fsm_should_stop): Use check_typedef.
2103         (print_return_value): Likewise.
2104
2105 2019-01-05  Tom Tromey  <tom@tromey.com>
2106
2107         * contrib/cleanup_check.py: Remove.
2108         * contrib/gcc-with-excheck: Remove.
2109         * contrib/exsummary.py: Remove.
2110         * contrib/excheck.py: Remove.
2111
2112 2019-01-05  Joel Brobecker  <brobecker@adacore.com>
2113
2114         * thread.c (delete_thread_1): Add gdb_assert that THR is not
2115         NULL. Initialize tpprev to NULL instead of assigning it
2116         to NULL on the next statement.
2117         * windows-nat.c (windows_delete_thread): Remove check for
2118         main_thread_id before printing thread exit notifications.
2119         (get_windows_debug_event) <EXIT_THREAD_DEBUG_EVENT>:
2120         Remove thread ID check against main_thread_id.
2121         <CREATE_PROCESS_DEBUG_EVENT>: Remove call to
2122         windows_delete_thread.
2123         <EXIT_PROCESS_DEBUG_EVENT>: Add call to windows_delete_thread.
2124
2125 2019-01-04  Tom Tromey  <tom@tromey.com>
2126
2127         * compile/compile.c (_initialize_compile): Use upper case for
2128         metasyntactic variables.
2129         * symmisc.c (_initialize_symmisc): Use upper case for
2130         metasyntactic variables.
2131         * psymtab.c (_initialize_psymtab): Use upper case for
2132         metasyntactic variables.
2133         * demangle.c (demangle_command): Use upper case for metasyntactic
2134         variables.
2135         (_initialize_demangler): Likewise.
2136         * ax-gdb.c (_initialize_ax_gdb): Use upper case for metasyntactic
2137         variables.
2138
2139 2019-01-03  Tom Tromey  <tom@tromey.com>
2140
2141         * tui/tui-source.c (tui_set_source_content): Use xstrdup.
2142
2143 2019-01-03  Tom Tromey  <tom@tromey.com>
2144
2145         * python/py-symtab.c (salpy_str): Update.
2146         (struct salpy_sal_object) <symtab>: Now a PyObject.
2147         (salpy_dealloc): Update.
2148         (del_objfile_sal): Use gdbpy_ref.
2149
2150 2019-01-03  Tom Tromey  <tom@tromey.com>
2151
2152         * python/py-type.c (convert_field): Use new_reference.  Return
2153         gdbpy_ref.
2154         (make_fielditem): Return gdbpy_ref.
2155         (typy_fields): Update.
2156         (typy_getitem): Update.
2157         (field_name): Return gdbpy_ref.  Use new_reference.
2158         (typy_iterator_iternext): Update.
2159
2160 2019-01-03  Tom Tromey  <tom@tromey.com>
2161
2162         * python/py-record.c (gdbpy_stop_recording): Use Py_RETURN_NONE.
2163
2164 2019-01-03  Tom Tromey  <tom@tromey.com>
2165
2166         * python/py-value.c (valpy_dealloc): Use Py_XDECREF.
2167         * python/py-type.c (typy_fields_items): Use gdbpy_ref.
2168         * python/py-progspace.c (pspy_set_printers): Use gdbpy_ref.
2169         (pspy_set_frame_filters, pspy_set_frame_unwinders)
2170         (pspy_set_type_printers): Likewise.
2171         * python/py-function.c (fnpy_init): Use gdbpy_ref.
2172         * python/py-cmd.c (cmdpy_init): Use gdbpy_ref.
2173         * python/py-objfile.c (objfpy_set_printers): Use gdbpy_ref.
2174         (objfpy_set_frame_filters, objfpy_set_frame_unwinders)
2175         (objfpy_set_type_printers): Likewise.
2176
2177 2019-01-03  Tom Tromey  <tom@tromey.com>
2178
2179         * python/python.c (gdbpy_enter, ~gdbpy_enter): Update.
2180         (gdbpy_print_stack): Use gdbpy_err_fetch.
2181         * python/python-internal.h (class gdbpy_err_fetch): New class.
2182         (class gdbpy_enter) <m_error_type, m_error_value,
2183         m_error_traceback>: Remove.
2184         <m_error>: New member.
2185         (gdbpy_exception_to_string): Don't declare.
2186         * python/py-varobj.c (py_varobj_iter_next): Use gdbpy_err_fetch.
2187         * python/py-value.c (convert_value_from_python): Use
2188         gdbpy_err_fetch.
2189         * python/py-utils.c (gdbpy_err_fetch::to_string): Rename from
2190         gdbpy_exception_to_string.
2191         (gdbpy_handle_exception): Use gdbpy_err_fetch.
2192         * python/py-prettyprint.c (print_stack_unless_memory_error): Use
2193         gdbpy_err_fetch.
2194
2195 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2196
2197         * linux-nat.c (delete_lwp_cleanup): Delete.
2198         (struct lwp_deleter): New struct.
2199         (lwp_info_up): New typedef.
2200         (linux_nat_target::follow_fork): Delete cleanup, and make use of
2201         lwp_info_up.
2202
2203 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2204
2205         * linux-fork.c (class scoped_switch_fork_info): New class.
2206         (inferior_call_waitpid): Update to use scoped_switch_fork_info.
2207
2208 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2209
2210         * valops.c (find_overload_match): Remove use of null_cleanup, and
2211         calls to do_cleanups.
2212
2213 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2214
2215         * compile/compile-cplus-types.c
2216         (compile_cplus_instance::decl_name): Handle changes to
2217         cp_func_name.
2218         * cp-support.c (cp_func_name): Update header comment, update
2219         return type.
2220         * cp-support.h (cp_func_name): Update return type in declaration.
2221         * valops.c (find_overload_match): Move temp_func local to top
2222         level of function and change its type.  Use temp_func to hold and
2223         delete temporary string obtained from cp_func_name.
2224
2225 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2226
2227         * remote.c (remote_target::remote_check_symbols): Convert `msg` to
2228         gdb::char_vector, remove cleanup, and update uses of `msg`.
2229
2230 2019-01-03  Jim Wilson  <jimw@sifive.com>
2231
2232         * riscv-tdep.c (riscv_freg_feature): Drop s0 name from f8.
2233
2234 2019-01-02  Tom Tromey  <tom@tromey.com>
2235
2236         * xml-tdesc.c (xml_cache): Hold a target_desc_up.
2237         (tdesc_parse_xml): Remove cleanups.
2238         * target-descriptions.h (make_cleanup_free_target_description):
2239         Don't declare.
2240         (target_desc_deleter): New struct.
2241         (target_desc_up): New typedef.
2242         * target-descriptions.c (target_desc_deleter::operator()): Rename
2243         from free_target_description.
2244         (make_cleanup_free_target_description): Remove.
2245
2246 2019-01-02  Tom Tromey  <tom@tromey.com>
2247
2248         * linespec.c (struct linespec_parser): Rename from ls_parser.  Add
2249         constructor, destructor.
2250         (linespec_parser): Remove typedef.
2251         (~linespec_parser): Rename from linespec_parser_delete.
2252         (linespec_lex_to_end, linespec_complete_label)
2253         (linespec_complete): Update.
2254         (decode_line_full): Remove cleanups.
2255         (decode_line_1): Update.
2256
2257 2019-01-02  Tom Tromey  <tom@tromey.com>
2258
2259         * python/python-internal.h (inferior_to_inferior_object): Change
2260         return type.
2261         * python/py-exitedevent.c (create_exited_event_object): Update.
2262         * python/py-inferior.c (inferior_to_inferior_object): Return
2263         gdbpy_ref.
2264         (python_new_inferior, python_inferior_deleted)
2265         (thread_to_thread_object, delete_thread_object)
2266         (build_inferior_list, gdbpy_selected_inferior): Update.
2267         * python/py-infthread.c (create_thread_object): Update.  Also fail
2268         if inferior_to_inferior_object fails.
2269
2270 2019-01-02  Simon Marchi  <simon.marchi@ericsson.com>
2271
2272         * inferior.h (class inferior) <displaced_step_state>: New field.
2273         * infrun.h (struct displaced_step_state): Move here from
2274         infrun.c.  Initialize fields, add constructor.
2275         <inf>: Remove field.
2276         <reset>: New method.
2277         * infrun.c (struct displaced_step_inferior_state): Move to
2278         infrun.h.
2279         (displaced_step_inferior_states): Remove.
2280         (get_displaced_stepping_state): Adust.
2281         (displaced_step_in_progress_any_inferior): Adjust.
2282         (displaced_step_in_progress_thread): Adjust.
2283         (displaced_step_in_progress): Adjust.
2284         (add_displaced_stepping_state): Remove.
2285         (get_displaced_step_closure_by_addr): Adjust.
2286         (remove_displaced_stepping_state): Remove.
2287         (infrun_inferior_exit): Call displaced_step_state.reset.
2288         (use_displaced_stepping): Don't check for NULL.
2289         (displaced_step_prepare_throw): Call
2290         get_displaced_stepping_state.
2291         (displaced_step_fixup): Don't check for NULL.
2292         (prepare_for_detach): Don't check for NULL.
2293
2294 2019-01-02  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2295
2296         * infcall.c (call_function_by_hand_dummy): cleanup/destroy sm
2297          in case of call that did not complete.
2298
2299 2019-01-02  Andrey Utkin  <autkin@undo.io>
2300
2301         * symfile.c (find_separate_debug_file): Fix search of debug files for
2302         remote debuggee.
2303
2304 2019-01-02  Tom Tromey  <tom@tromey.com>
2305
2306         * python/py-inferior.c (gdbpy_initialize_inferior): Fix
2307         indentation.
2308         * python/py-frame.c (frapy_older): Remove cast.
2309         (frapy_newer): Likewise.
2310         * python/py-breakpoint.c (local_setattro): Remove cast.
2311         * python/py-arch.c (archpy_name): Remove local variable.
2312         * python/py-type.c (gdbpy_lookup_type): Remove cast.
2313
2314 2019-01-02  Joel Brobecker  <brobecker@adacore.com>
2315
2316         * unittests/basic_string_view/element_access/char/empty.cc:
2317         Fix year range in copyright header.
2318
2319 2019-01-01  Andrew Burgess  <andrew.burgess@embecosm.com>
2320
2321         * arch/riscv.h (struct riscv_gdbarch_features) <hw_float_abi>:
2322         Delete.
2323         <operator==>: Update with for removed field.
2324         <hash>: Likewise.
2325         * riscv-tdep.h (struct gdbarch_tdep) <features>: Renamed to...
2326         <isa_features>: ...this.
2327         <abi_features>: New field.
2328         (riscv_isa_flen): Update comment.
2329         (riscv_abi_xlen): New declaration.
2330         (riscv_abi_flen): New declaration.
2331         * riscv-tdep.c (riscv_isa_xlen): Update to get answer from
2332         isa_features.
2333         (riscv_abi_xlen): New function.
2334         (riscv_isa_flen): Update to get answer from isa_features.
2335         (riscv_abi_flen): New function.
2336         (riscv_has_fp_abi): Update to get answer from abi_features.
2337         (riscv_call_info::riscv_call_info): Use abi xlen and flen, not isa
2338         xlen and flen.
2339         (riscv_call_info) <xlen, flen>: Update comment.
2340         (riscv_call_arg_struct): Remove invalid assertions
2341         (riscv_features_from_gdbarch_info): Update now hw_float_abi field
2342         is removed.
2343         (riscv_gdbarch_init): Gather isa features and abi features
2344         separately, ensure both match on the gdbarch when reusing an old
2345         gdbarch.  Relax an error check to allow 32-bit abi float to run on
2346         a target with 64-bit float hardware.
2347
2348 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2349
2350         * source.c (search_command_helper): Stop reverse search
2351         when line 1 has been searched.
2352
2353 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2354
2355         * record-full.c (record_full_base_target::close): Rewrite
2356         record_full_core_buf_list free logic.
2357
2358 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2359
2360         * break-catch-syscall.c (print_one_catch_syscall): xfree
2361         the last text.
2362
2363 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
2364
2365         * top.c (print_gdb_version): Update Copyright year in version
2366         message.
2367
2368 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
2369
2370         Update copyright year range in all GDB files.
2371
2372 2019-01-01, 19  Joel Brobecker  <brobecker@adacore.com>
2373
2374         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2018.
2375
2376 For older changes see ChangeLog-2018.
2377 \f
2378 Local Variables:
2379 mode: change-log
2380 left-margin: 8
2381 fill-column: 74
2382 version-control: never
2383 coding: utf-8
2384 End:
2385