Fix leak in linespec.c
[external/binutils.git] / gdb / ChangeLog
1 2019-01-09  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2
3         * linespec.c (linespec_state_destructor): Free self->canonical_names.
4
5 2019-01-08  Tom Tromey  <tom@tromey.com>
6             Simon Marchi  <simon.marchi@ericsson.com>
7
8         PR gdb/24060
9         * ada-exp.y (DOLLAR_VARIABLE): Rename from SPECIAL_VARIABLE.
10         * ada-lex.l (DOLLAR_VARIABLE): Likewise.
11         * c-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
12         * f-exp.y (DOLLAR_VARIABLE): Likewise.
13         * m2-exp.y (DOLLAR_VARIABLE): Rename from INTERNAL_VAR.
14         * p-exp.y (DOLLAR_VARIABLE): Rename from VARIABLE.
15
16 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
17
18         * source.c (select_source_symtab): Move header comment to
19         declaration in source.h.
20         (forget_cached_source_info_for_objfile): Likewise.
21         (forget_cached_source_info): Likewise.
22         (identify_source_line): Likewise.
23         * source.h (identify_source_line): Move declaration from symtab.h
24         and add comment from source.c
25         (print_source_lines): Likewise.
26         (forget_cached_source_info_for_objfile): Likewise.
27         (forget_cached_source_info): Likewise.
28         (select_source_symtab): Likewise.
29         (enum print_source_lines_flag): Move definition from symtab.h.
30         * symtab.h (identify_source_line): Move declaration to source.h.
31         (print_source_lines): Likewise.
32         (forget_cached_source_info_for_objfile): Likewise.
33         (forget_cached_source_info): Likewise.
34         (select_source_symtab): Likewise.
35         (enum print_source_lines_flag): Move definition to source.h.
36         * tui/tui-hooks.c: Add 'source.h' include.
37
38 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
39
40         * source.c (print_source_lines_base): Handle requests to print
41         reverse line number sequences, and guard against empty lines
42         string.
43
44 2019-01-08  Andrew Burgess  <andrew.burgess@embecosm.com>
45
46         * source.c (print_source_lines_base): Fix skip of '\r' if next
47         character is '\n'.
48
49 2019-01-06  Tom Tromey  <tom@tromey.com>
50
51         * c-exp.y (struct c_parse_state) <macro_original_text,
52         expansion_obstack>: New member.
53         (macro_original_text, expansion_obstack): Remove globals.
54         (scan_macro_expansion, scanning_macro_expansion)
55         (finished_macro_expansion): Update.
56         (scan_macro_cleanup): Remove.
57         (yylex, c_parse): Update.
58
59 2019-01-06  Tom Tromey  <tom@tromey.com>
60
61         * c-exp.y (struct c_parse_state) <strings>: New member.
62         (operator_stoken): Update.
63
64 2019-01-06  Tom Tromey  <tom@tromey.com>
65
66         * parser-defs.h (type_ptr): Remove typedef.  Don't declare VEC.
67         (union type_stack_elt) <typelist_val>: Now a pointer to
68         std::vector.
69         (type_stack_cleanup): Don't declare.
70         (push_typelist): Update.
71         * parse.c (pop_typelist): Return a std::vector.
72         (push_typelist): Take a std::vector.
73         (follow_types): Update.  Do not free args.
74         (type_stack_cleanup): Remove.
75         * c-exp.y (struct c_parse_state): New.
76         (cpstate): New global.
77         (type_aggregate_p, exp, ptr_operator, parameter_typelist)
78         (nonempty_typelist): Update.
79         (func_mod): Create a new vector.
80         (c_parse): Create a c_parse_state.
81         (check_parameter_typelist): Do not delete params.
82         (function_method): Update.  Do not delete type_list.
83
84 2019-01-06  Tom Tromey  <tom@tromey.com>
85
86         PR gdb/28155:
87         * python/py-finishbreakpoint.c (bpfinishpy_init): Use
88         check_typedef.
89         * infcmd.c (finish_command_fsm_should_stop): Use check_typedef.
90         (print_return_value): Likewise.
91
92 2019-01-05  Tom Tromey  <tom@tromey.com>
93
94         * contrib/cleanup_check.py: Remove.
95         * contrib/gcc-with-excheck: Remove.
96         * contrib/exsummary.py: Remove.
97         * contrib/excheck.py: Remove.
98
99 2019-01-05  Joel Brobecker  <brobecker@adacore.com>
100
101         * thread.c (delete_thread_1): Add gdb_assert that THR is not
102         NULL. Initialize tpprev to NULL instead of assigning it
103         to NULL on the next statement.
104         * windows-nat.c (windows_delete_thread): Remove check for
105         main_thread_id before printing thread exit notifications.
106         (get_windows_debug_event) <EXIT_THREAD_DEBUG_EVENT>:
107         Remove thread ID check against main_thread_id.
108         <CREATE_PROCESS_DEBUG_EVENT>: Remove call to
109         windows_delete_thread.
110         <EXIT_PROCESS_DEBUG_EVENT>: Add call to windows_delete_thread.
111
112 2019-01-04  Tom Tromey  <tom@tromey.com>
113
114         * compile/compile.c (_initialize_compile): Use upper case for
115         metasyntactic variables.
116         * symmisc.c (_initialize_symmisc): Use upper case for
117         metasyntactic variables.
118         * psymtab.c (_initialize_psymtab): Use upper case for
119         metasyntactic variables.
120         * demangle.c (demangle_command): Use upper case for metasyntactic
121         variables.
122         (_initialize_demangler): Likewise.
123         * ax-gdb.c (_initialize_ax_gdb): Use upper case for metasyntactic
124         variables.
125
126 2019-01-03  Tom Tromey  <tom@tromey.com>
127
128         * tui/tui-source.c (tui_set_source_content): Use xstrdup.
129
130 2019-01-03  Tom Tromey  <tom@tromey.com>
131
132         * python/py-symtab.c (salpy_str): Update.
133         (struct salpy_sal_object) <symtab>: Now a PyObject.
134         (salpy_dealloc): Update.
135         (del_objfile_sal): Use gdbpy_ref.
136
137 2019-01-03  Tom Tromey  <tom@tromey.com>
138
139         * python/py-type.c (convert_field): Use new_reference.  Return
140         gdbpy_ref.
141         (make_fielditem): Return gdbpy_ref.
142         (typy_fields): Update.
143         (typy_getitem): Update.
144         (field_name): Return gdbpy_ref.  Use new_reference.
145         (typy_iterator_iternext): Update.
146
147 2019-01-03  Tom Tromey  <tom@tromey.com>
148
149         * python/py-record.c (gdbpy_stop_recording): Use Py_RETURN_NONE.
150
151 2019-01-03  Tom Tromey  <tom@tromey.com>
152
153         * python/py-value.c (valpy_dealloc): Use Py_XDECREF.
154         * python/py-type.c (typy_fields_items): Use gdbpy_ref.
155         * python/py-progspace.c (pspy_set_printers): Use gdbpy_ref.
156         (pspy_set_frame_filters, pspy_set_frame_unwinders)
157         (pspy_set_type_printers): Likewise.
158         * python/py-function.c (fnpy_init): Use gdbpy_ref.
159         * python/py-cmd.c (cmdpy_init): Use gdbpy_ref.
160         * python/py-objfile.c (objfpy_set_printers): Use gdbpy_ref.
161         (objfpy_set_frame_filters, objfpy_set_frame_unwinders)
162         (objfpy_set_type_printers): Likewise.
163
164 2019-01-03  Tom Tromey  <tom@tromey.com>
165
166         * python/python.c (gdbpy_enter, ~gdbpy_enter): Update.
167         (gdbpy_print_stack): Use gdbpy_err_fetch.
168         * python/python-internal.h (class gdbpy_err_fetch): New class.
169         (class gdbpy_enter) <m_error_type, m_error_value,
170         m_error_traceback>: Remove.
171         <m_error>: New member.
172         (gdbpy_exception_to_string): Don't declare.
173         * python/py-varobj.c (py_varobj_iter_next): Use gdbpy_err_fetch.
174         * python/py-value.c (convert_value_from_python): Use
175         gdbpy_err_fetch.
176         * python/py-utils.c (gdbpy_err_fetch::to_string): Rename from
177         gdbpy_exception_to_string.
178         (gdbpy_handle_exception): Use gdbpy_err_fetch.
179         * python/py-prettyprint.c (print_stack_unless_memory_error): Use
180         gdbpy_err_fetch.
181
182 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
183
184         * linux-nat.c (delete_lwp_cleanup): Delete.
185         (struct lwp_deleter): New struct.
186         (lwp_info_up): New typedef.
187         (linux_nat_target::follow_fork): Delete cleanup, and make use of
188         lwp_info_up.
189
190 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
191
192         * linux-fork.c (class scoped_switch_fork_info): New class.
193         (inferior_call_waitpid): Update to use scoped_switch_fork_info.
194
195 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
196
197         * valops.c (find_overload_match): Remove use of null_cleanup, and
198         calls to do_cleanups.
199
200 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
201
202         * compile/compile-cplus-types.c
203         (compile_cplus_instance::decl_name): Handle changes to
204         cp_func_name.
205         * cp-support.c (cp_func_name): Update header comment, update
206         return type.
207         * cp-support.h (cp_func_name): Update return type in declaration.
208         * valops.c (find_overload_match): Move temp_func local to top
209         level of function and change its type.  Use temp_func to hold and
210         delete temporary string obtained from cp_func_name.
211
212 2019-01-03  Andrew Burgess  <andrew.burgess@embecosm.com>
213
214         * remote.c (remote_target::remote_check_symbols): Convert `msg` to
215         gdb::char_vector, remove cleanup, and update uses of `msg`.
216
217 2019-01-03  Jim Wilson  <jimw@sifive.com>
218
219         * riscv-tdep.c (riscv_freg_feature): Drop s0 name from f8.
220
221 2019-01-02  Tom Tromey  <tom@tromey.com>
222
223         * xml-tdesc.c (xml_cache): Hold a target_desc_up.
224         (tdesc_parse_xml): Remove cleanups.
225         * target-descriptions.h (make_cleanup_free_target_description):
226         Don't declare.
227         (target_desc_deleter): New struct.
228         (target_desc_up): New typedef.
229         * target-descriptions.c (target_desc_deleter::operator()): Rename
230         from free_target_description.
231         (make_cleanup_free_target_description): Remove.
232
233 2019-01-02  Tom Tromey  <tom@tromey.com>
234
235         * linespec.c (struct linespec_parser): Rename from ls_parser.  Add
236         constructor, destructor.
237         (linespec_parser): Remove typedef.
238         (~linespec_parser): Rename from linespec_parser_delete.
239         (linespec_lex_to_end, linespec_complete_label)
240         (linespec_complete): Update.
241         (decode_line_full): Remove cleanups.
242         (decode_line_1): Update.
243
244 2019-01-02  Tom Tromey  <tom@tromey.com>
245
246         * python/python-internal.h (inferior_to_inferior_object): Change
247         return type.
248         * python/py-exitedevent.c (create_exited_event_object): Update.
249         * python/py-inferior.c (inferior_to_inferior_object): Return
250         gdbpy_ref.
251         (python_new_inferior, python_inferior_deleted)
252         (thread_to_thread_object, delete_thread_object)
253         (build_inferior_list, gdbpy_selected_inferior): Update.
254         * python/py-infthread.c (create_thread_object): Update.  Also fail
255         if inferior_to_inferior_object fails.
256
257 2019-01-02  Simon Marchi  <simon.marchi@ericsson.com>
258
259         * inferior.h (class inferior) <displaced_step_state>: New field.
260         * infrun.h (struct displaced_step_state): Move here from
261         infrun.c.  Initialize fields, add constructor.
262         <inf>: Remove field.
263         <reset>: New method.
264         * infrun.c (struct displaced_step_inferior_state): Move to
265         infrun.h.
266         (displaced_step_inferior_states): Remove.
267         (get_displaced_stepping_state): Adust.
268         (displaced_step_in_progress_any_inferior): Adjust.
269         (displaced_step_in_progress_thread): Adjust.
270         (displaced_step_in_progress): Adjust.
271         (add_displaced_stepping_state): Remove.
272         (get_displaced_step_closure_by_addr): Adjust.
273         (remove_displaced_stepping_state): Remove.
274         (infrun_inferior_exit): Call displaced_step_state.reset.
275         (use_displaced_stepping): Don't check for NULL.
276         (displaced_step_prepare_throw): Call
277         get_displaced_stepping_state.
278         (displaced_step_fixup): Don't check for NULL.
279         (prepare_for_detach): Don't check for NULL.
280
281 2019-01-02  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
282
283         * infcall.c (call_function_by_hand_dummy): cleanup/destroy sm
284          in case of call that did not complete.
285
286 2019-01-02  Andrey Utkin  <autkin@undo.io>
287
288         * symfile.c (find_separate_debug_file): Fix search of debug files for
289         remote debuggee.
290
291 2019-01-02  Tom Tromey  <tom@tromey.com>
292
293         * python/py-inferior.c (gdbpy_initialize_inferior): Fix
294         indentation.
295         * python/py-frame.c (frapy_older): Remove cast.
296         (frapy_newer): Likewise.
297         * python/py-breakpoint.c (local_setattro): Remove cast.
298         * python/py-arch.c (archpy_name): Remove local variable.
299         * python/py-type.c (gdbpy_lookup_type): Remove cast.
300
301 2019-01-02  Joel Brobecker  <brobecker@adacore.com>
302
303         * unittests/basic_string_view/element_access/char/empty.cc:
304         Fix year range in copyright header.
305
306 2019-01-01  Andrew Burgess  <andrew.burgess@embecosm.com>
307
308         * arch/riscv.h (struct riscv_gdbarch_features) <hw_float_abi>:
309         Delete.
310         <operator==>: Update with for removed field.
311         <hash>: Likewise.
312         * riscv-tdep.h (struct gdbarch_tdep) <features>: Renamed to...
313         <isa_features>: ...this.
314         <abi_features>: New field.
315         (riscv_isa_flen): Update comment.
316         (riscv_abi_xlen): New declaration.
317         (riscv_abi_flen): New declaration.
318         * riscv-tdep.c (riscv_isa_xlen): Update to get answer from
319         isa_features.
320         (riscv_abi_xlen): New function.
321         (riscv_isa_flen): Update to get answer from isa_features.
322         (riscv_abi_flen): New function.
323         (riscv_has_fp_abi): Update to get answer from abi_features.
324         (riscv_call_info::riscv_call_info): Use abi xlen and flen, not isa
325         xlen and flen.
326         (riscv_call_info) <xlen, flen>: Update comment.
327         (riscv_call_arg_struct): Remove invalid assertions
328         (riscv_features_from_gdbarch_info): Update now hw_float_abi field
329         is removed.
330         (riscv_gdbarch_init): Gather isa features and abi features
331         separately, ensure both match on the gdbarch when reusing an old
332         gdbarch.  Relax an error check to allow 32-bit abi float to run on
333         a target with 64-bit float hardware.
334
335 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
336
337         * source.c (search_command_helper): Stop reverse search
338         when line 1 has been searched.
339
340 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
341
342         * record-full.c (record_full_base_target::close): Rewrite
343         record_full_core_buf_list free logic.
344
345 2019-01-01  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
346
347         * break-catch-syscall.c (print_one_catch_syscall): xfree
348         the last text.
349
350 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
351
352         * top.c (print_gdb_version): Update Copyright year in version
353         message.
354
355 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
356
357         Update copyright year range in all GDB files.
358
359 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
360
361         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2018.
362
363 For older changes see ChangeLog-2018.
364 \f
365 Local Variables:
366 mode: change-log
367 left-margin: 8
368 fill-column: 74
369 version-control: never
370 coding: utf-8
371 End:
372