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