record-btrace: indicate gaps
[external/binutils.git] / gdb / ChangeLog
1 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2
3         * btrace.c (ftrace_find_call): Skip gaps.
4         (ftrace_new_function): Initialize level.
5         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return)
6         (ftrace_new_switch): Update
7         level computation.
8         (ftrace_new_gap): New.
9         (ftrace_update_function): Create new function after gap.
10         (btrace_compute_ftrace_bts): Create gap on error.
11         (btrace_stitch_bts): Update parameters.  Clear trace if it
12         becomes empty.
13         (btrace_stitch_trace): Update parameters.  Update callers.
14         (btrace_clear): Reset the number of gaps.
15         (btrace_insn_get): Return NULL if the iterator points to a gap.
16         (btrace_insn_number): Return zero if the iterator points to a gap.
17         (btrace_insn_end): Allow gaps at the end.
18         (btrace_insn_next, btrace_insn_prev, btrace_insn_cmp): Handle gaps.
19         (btrace_find_insn_by_number): Assert that the found iterator does
20         not point to a gap.
21         (btrace_call_next, btrace_call_prev): Assert that the last function
22         is not a gap.
23         * btrace.h (btrace_bts_error): New.
24         (btrace_function): Update comment.
25         (btrace_function) <insn, insn_offset, number>: Update comment.
26         (btrace_function) <errcode>: New.
27         (btrace_thread_info) <ngaps>: New.
28         (btrace_thread_info) <replay>: Update comment.
29         (btrace_insn_get): Update comment.
30         * record-btrace.c (btrace_ui_out_decode_error): New.
31         (record_btrace_info): Print number of gaps.
32         (btrace_insn_history, btrace_call_history): Call
33         btrace_ui_out_decode_error for gaps.
34         (record_btrace_step_thread, record_btrace_start_replaying): Skip gaps.
35
36 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
37
38         * common/btrace-common.h (btrace_cpu_vendor, btrace_cpu): New.
39         * nat/linux-btrace.c: (btrace_this_cpu): New.
40         (cpu_supports_bts): Call btrace_this_cpu.
41         (intel_supports_bts): Add cpu parameter.
42
43 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
44
45         * btrace.h (btrace_insn_class): New.
46         (btrace_insn) <size, iclass>: New.
47         * btrace.c (ftrace_find_call): Update parameters.  Update users.
48         Use instruction classification.
49         (ftrace_new_return): Update parameters.  Update users.
50         (ftrace_update_function): Update parameters.  Update users.  Use
51         instruction classification.
52         (ftrace_update_insns): Update parameters.  Update users.
53         (ftrace_classify_insn): New.
54         (btrace_compute_ftrace_bts): Fill in new btrace_insn fields.  Add
55         TRY_CATCH around call to gdb_insn_length.
56
57 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
58
59         * btrace.c (btrace_compute_ftrace_bts, btrace_compute_ftrace):
60         Update parameters.  Update users.
61
62 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
63
64         * btrace.c (parse_xml_btrace_conf_bts): Add size.
65         (btrace_conf_bts_attributes): New.
66         (btrace_conf_children): Add attributes.
67         * common/btrace-common.h (btrace_config_bts): New.
68         (btrace_config)<bts>: New.
69         (btrace_config): Update comment.
70         * nat/linux-btrace.c (linux_enable_btrace, linux_enable_bts):
71         Use config.
72         * features/btrace-conf.dtd: Increment version.  Add size
73         attribute to bts element.
74         * record-btrace.c (set_record_btrace_bts_cmdlist,
75         show_record_btrace_bts_cmdlist): New.
76         (record_btrace_adjust_size, record_btrace_print_bts_conf,
77         record_btrace_print_conf, cmd_set_record_btrace_bts,
78         cmd_show_record_btrace_bts): New.
79         (record_btrace_info): Call record_btrace_print_conf.
80         (_initialize_record_btrace): Add commands.
81         * remote.c: Add PACKET_Qbtrace_conf_bts_size enum.
82         (remote_protocol_features): Add Qbtrace-conf:bts:size packet.
83         (btrace_sync_conf): Synchronize bts size.
84         (_initialize_remote): Add Qbtrace-conf:bts:size packet.
85         * NEWS: Announce new commands and new packets.
86
87 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
88
89         * Makefile.in (XMLFILES): Add btrace-conf.dtd.
90         * x86-linux-nat.c (x86_linux_enable_btrace): Update parameters.
91         (x86_linux_btrace_conf): New.
92         (x86_linux_create_target): Initialize to_btrace_conf.
93         * nat/linux-btrace.c (linux_enable_btrace): Update parameters.
94         Check format.  Split into this and ...
95         (linux_enable_bts): ... this.
96         (linux_btrace_conf): New.
97         (perf_event_skip_record): Renamed into ...
98         (perf_event_skip_bts_record): ... this.  Updated users.
99         (linux_disable_btrace): Split into this and ...
100         (linux_disable_bts): ... this.
101         (linux_read_btrace): Check format.
102         * nat/linux-btrace.h (linux_enable_btrace): Update parameters.
103         (linux_btrace_conf): New.
104         (btrace_target_info)<ptid>: Moved.
105         (btrace_target_info)<conf>: New.
106         (btrace_target_info): Split into this and ...
107         (btrace_tinfo_bts): ... this.  Updated users.
108         * btrace.c (btrace_enable): Update parameters.
109         (btrace_conf, parse_xml_btrace_conf_bts, parse_xml_btrace_conf)
110         (btrace_conf_children, btrace_conf_attributes)
111         (btrace_conf_elements): New.
112         * btrace.h (btrace_enable): Update parameters.
113         (btrace_conf, parse_xml_btrace_conf): New.
114         * common/btrace-common.h (btrace_config): New.
115         * feature/btrace-conf.dtd: New.
116         * record-btrace.c (record_btrace_conf): New.
117         (record_btrace_cmdlist): New.
118         (record_btrace_enable_warn, record_btrace_open): Pass
119         &record_btrace_conf.
120         (record_btrace_info): Print recording format.
121         (cmd_record_btrace_bts_start): New.
122         (cmd_record_btrace_start): Call cmd_record_btrace_bts_start.
123         (_initialize_record_btrace): Add "record btrace bts" subcommand.
124         Add "record bts" alias command.
125         * remote.c (remote_state)<btrace_config>: New.
126         (remote_btrace_reset, PACKET_qXfer_btrace_conf): New.
127         (remote_protocol_features): Add qXfer:btrace-conf:read.
128         (remote_open_1): Call remote_btrace_reset.
129         (remote_xfer_partial): Handle TARGET_OBJECT_BTRACE_CONF.
130         (btrace_target_info)<conf>: New.
131         (btrace_sync_conf, btrace_read_config): New.
132         (remote_enable_btrace): Update parameters.  Call btrace_sync_conf and
133         btrace_read_conf.
134         (remote_btrace_conf): New.
135         (init_remote_ops): Initialize to_btrace_conf.
136         (_initialize_remote): Add qXfer:btrace-conf packet.
137         * target.c (target_enable_btrace): Update parameters.
138         (target_btrace_conf): New.
139         * target.h (target_enable_btrace): Update parameters.
140         (target_btrace_conf): New.
141         (target_object)<TARGET_OBJECT_BTRACE_CONF>: New.
142         (target_ops)<to_enable_btrace>: Update parameters and comment.
143         (target_ops)<to_btrace_conf>: New.
144         * target-delegates: Regenerate.
145         * target-debug.h (target_debug_print_const_struct_btrace_config_p)
146         (target_debug_print_const_struct_btrace_target_info_p): New.
147         * NEWS: Announce new command and new packet.
148
149 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
150
151         * nat/linux-btrace.h (perf_event_buffer): New.
152         (btrace_target_info) <buffer, size, data_head>: Replace with ...
153         <bts>: ... this.
154         * nat/linux-btrace.c (perf_event_header, perf_event_mmap_size)
155         (perf_event_buffer_size, perf_event_buffer_begin)
156         (perf_event_buffer_end, linux_btrace_has_changed): Removed.
157         Updated users.
158         (perf_event_new_data): New.
159
160 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
161
162         * btrace.c (btrace_enable): Pass BTRACE_FORMAT_BTS.
163         * record-btrace.c (record_btrace_open): Remove call to
164         target_supports_btrace.
165         * remote.c (remote_supports_btrace): Update parameters.
166         * target.c (target_supports_btrace): Update parameters.
167         * target.h (to_supports_btrace, target_supports_btrace): Update
168         parameters.
169         * target-delegates.c: Regenerate.
170         * target-debug.h (target_debug_print_enum_btrace_format): New.
171         * nat/linux-btrace.c
172         (kernel_supports_btrace): Rename into ...
173         (kernel_supports_bts): ... this.  Update users.  Update warning text.
174         (intel_supports_btrace): Rename into ...
175         (intel_supports_bts): ... this.  Update users.
176         (cpu_supports_btrace): Rename into ...
177         (cpu_supports_bts): ... this.  Update users.
178         (linux_supports_btrace): Update parameters.  Split into this and ...
179         (linux_supports_bts): ... this.
180         * nat/linux-btrace.h (linux_supports_btrace): Update parameters.
181
182 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
183
184         * Makefile.in (SFILES): Add common/btrace-common.c.
185         (COMMON_OBS): Add common/btrace-common.o.
186         (btrace-common.o): Add build rules.
187         * btrace.c (parse_xml_btrace): Update parameters.
188         (parse_xml_btrace_block): Set format field.
189         (btrace_add_pc, btrace_fetch): Use struct btrace_data.
190         (do_btrace_data_cleanup, make_cleanup_btrace_data): New.
191         (btrace_compute_ftrace): Split into this and...
192         (btrace_compute_ftrace_bts): ...this.
193         (btrace_stitch_trace): Split into this and...
194         (btrace_stitch_bts): ...this.
195         * btrace.h (parse_xml_btrace): Update parameters.
196         (make_cleanup_btrace_data): New.
197         * common/btrace-common.c: New.
198         * common/btrace-common.h: Include common-defs.h.
199         (btrace_block_s): Update comment.
200         (btrace_format): New.
201         (btrace_format_string): New.
202         (btrace_data_bts): New.
203         (btrace_data): New.
204         (btrace_data_init, btrace_data_fini, btrace_data_empty): New.
205         * remote.c (remote_read_btrace): Update parameters.
206         * target.c (target_read_btrace): Update parameters.
207         * target.h (target_read_btrace): Update parameters.
208         (target_ops)<to_read_btrace>: Update parameters.
209         * x86-linux-nat.c (x86_linux_read_btrace): Update parameters.
210         * target-delegates.c: Regenerate.
211         * target-debug (target_debug_print_struct_btrace_data_p): New.
212         * nat/linux-btrace.c (linux_read_btrace): Split into this and...
213         (linux_read_bts): ...this.
214         * nat/linux-btrace.h (linux_read_btrace): Update parameters.
215
216 2015-02-06  Doug Evans  <dje@google.com>
217
218         * remote-m32r-sdi.c: Include symfile.h.
219
220 2015-02-06  Doug Evans  <dje@google.com>
221
222         * symtab.h (clear_symtab_users, deduce_language_from_filename): Move
223         * symfile.h (clear_symtab_users, deduce_language_from_filename): ...
224         to here.
225
226 2015-02-06  Pedro Alves  <palves@redhat.com>
227
228         * linux-thread-db.c (find_new_threads_callback): Add debug output.
229
230 2015-02-06  Simon Marchi  <simon.marchi@ericsson.com>
231
232         PR gdb/15678
233         * breakpoint.c (map_breakpoint_numbers): Check for empty args string.
234         (enable_count_command): Check args for NULL value.
235
236 2015-02-05  Doug Evans  <xdje42@gmail.com>
237
238         * guile/scm-frame.c: Fix spelling errors in a comment.
239
240 2015-02-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
241
242         * python/python-internal.h (Py_hash_t): Define it for Python <3.2.
243         * python/py-value.c (valpy_fetch_lazy): Use it.  Remove cast to the
244         return type.
245
246 2015-02-04  Pedro Alves  <palves@redhat.com>
247
248         * linux-nat.c (handle_extended_wait): Don't resume LWPs here.
249         (wait_lwp): Don't call wait_lwp if linux_handle_extended_wait
250         returns true.
251         (resume_stopped_resumed_lwps): Don't check whether the thread is
252         marked as executing.
253         (linux_nat_wait_1): Use resume_stopped_resumed_lwps.
254
255 2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
256
257         * regset.h (struct regset): Add flags field.
258         (REGSET_VARIABLE_SIZE): New value for a regset's flags field.
259         * corelow.c (get_core_register_section): Add warning if the size
260         exceeds the requested size and the regset does not have the
261         REGSET_VARIABLE_SIZE flag set.
262         * alphanbsd-tdep.c (alphanbsd_gregset): Add REGSET_VARIABLE_SIZE
263         flag.
264         * armbsd-tdep.c (armbsd_gregset): Likewise.
265         * hppa-hpux-tdep.c (hppa_hpux_regset): Likewise.
266         * hppaobsd-tdep.c (hppaobsd_gregset): Likewise.
267         * m68kbsd-tdep.c (m68kbsd_gregset): Likewise.
268         * mipsnbsd-tdep.c (mipsnbsd_gregset): Likewise.
269
270 2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
271
272         * amd64-linux-tdep.c (amd64_linux_iterate_over_regset_sections):
273         For ".reg-xstate", explicitly specify the requested section size
274         via X86_XSTATE_SIZE instead of just 0 on input and
275         X86_XSTATE_MAX_SIZE on output.
276         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections):
277         Likewise.
278
279 2015-02-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
280
281         PR corefiles/17808:
282         * gdbarch.sh (iterate_over_regset_sections_cb): Document this
283         function type, particularly its SIZE parameter.
284         * gdbarch.h: Regenerate.
285         * amd64-tdep.c (amd64_supply_fpregset): In gdb_assert, compare
286         actual against required size using ">=" instead of "==".
287         (amd64_collect_fpregset): Likewise.
288         * i386-tdep.c (i386_supply_gregset): Likewise.
289         (i386_collect_gregset): Likewise.
290         (i386_supply_fpregset): Likewise.
291         (i386_collect_fpregset): Likewise.
292         * mips-linux-tdep.c (mips_supply_gregset_wrapper): Likewise.
293         (mips_fill_gregset_wrapper): Likewise.
294         (mips_supply_fpregset_wrapper): Likewise.
295         (mips_fill_fpregset_wrapper): Likewise.
296         (mips64_supply_gregset_wrapper): Likewise.
297         (mips64_fill_gregset_wrapper): Likewise.
298         (mips64_supply_fpregset_wrapper): Likewise.
299         (mips64_fill_fpregset_wrapper): Likewise.
300         * mn10300-linux-tdep.c (am33_supply_gregset_method): Likewise.
301         (am33_supply_fpregset_method): Likewise.
302         (am33_collect_gregset_method): Likewise.
303         (am33_collect_fpregset_method): Likewise.
304
305 2015-02-04  Doug Evans  <dje@google.com>
306             Pedro Alves  <palves@redhat.com>
307             Eli Zaretskii  <eliz@gnu.org>
308
309         PR tui/17810
310         * tui/tui-command.c (tui_refresh_cmd_win): New function.
311         * tui/tui-command.c (tui_refresh_cmd_win): Declare.
312         * tui/tui-file.c: #include tui/tui-command.h.
313         (tui_file_fputs): Refresh command window if stream is not gdb_stdout.
314         (tui_file_flush): Refresh command window if stream is gdb_stdout.
315         * tui/tui-io.c (tui_puts): Remove calls to wrefresh, fflush.
316
317 2015-02-04  Pedro Alves  <palves@redhat.com>
318
319         Fix build breakage.
320         * event-loop.c (gdb_do_one_event): Add default switch case.
321
322 2015-02-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
323
324         Filter out inferior gcc option -fpreprocessed.
325         * compile/compile.c (filter_args): New function.
326         (get_args): Use it.
327
328 2015-02-03  Pedro Alves  <palves@redhat.com>
329
330         * event-loop.c: Don't declare nor define a queue type for
331         gdb_event_p.
332         (event_queue): Delete.
333         (create_event, create_file_event, gdb_event_xfree)
334         (initialize_event_loop, process_event): Delete.
335         (gdb_do_one_event): Return as soon as one event is handled.
336         (handle_file_event): Change prototype.  Used the passed in
337         file_handler pointer and ready_mask instead of looping over all
338         file handlers.
339         (gdb_wait_for_event): Update the poll/select timeouts before
340         blocking.  Run event handlers directly instead of queueing events.
341         Return as soon as one event is handled.
342         (struct async_event_handler_data): Delete.
343         (invoke_async_event_handler): Delete.
344         (check_async_event_handlers): Change return type to int.  Run
345         event handlers directly instead of queueing events.  Return as
346         soon as one event is handled.
347         (handle_timer_event): Delete.
348         (update_wait_timeout): New function, factored out from
349         poll_timers.
350         (poll_timers): Reimplement.
351         * event-loop.h (initialize_event_loop): Delete declaration.
352         * top.c (gdb_init): Don't call initialize_event_loop.
353
354 2015-02-03  Pedro Alves  <palves@redhat.com>
355
356         * event-loop.c (clear_async_event_handler): New function.
357         * event-loop.h (clear_async_event_handler): New declaration.
358         * record-btrace.c (record_btrace_async): New function.
359         (init_record_btrace_ops): Install record_btrace_async.
360         * record-full.c (record_full_async): New function.
361         (record_full_resume): Don't mark the async event source here.
362         (init_record_full_ops): Install record_full_async.
363         (record_full_core_resume): Don't mark the async event source here.
364         (init_record_full_core_ops): Install record_full_async.
365         * remote.c (remote_async): Mark and clear the async stop reply
366         queue event-loop token as appropriate.
367
368 2015-02-03  Pedro Alves  <palves@redhat.com>
369
370         * linux-nat.c (linux_child_follow_fork, linux_nat_wait_1): Use
371         target_is_async_p instead of target_can_async.
372         (linux_nat_wait): Use target_is_async_p instead of
373         target_can_async.  Don't enable async here.
374         * remote.c (interrupt_query, remote_wait, putpkt_binary): Use
375         target_is_async_p instead of target_can_async.
376
377 2015-02-02  Simon Marchi  <simon.marchi@ericsson.com>
378
379         * varobj.h (lang_varobj_ops): Mention which return values need
380         to be freed.
381
382 2015-02-02  Joel Brobecker  <brobecker@adacore.com>
383
384         * dwarf2loc.c (dwarf2_evaluate_property): Add i18n marker.
385
386 2015-02-02  Joel Brobecker  <brobecker@adacore.com>
387
388         PR gdb/17856:
389         * ada-lang.c (ada_lookup_symbol_list_worker): Do not re-cache
390         results found in the cache.
391
392 2015-02-02  Joel Brobecker  <brobecker@adacore.com>
393
394         PR gdb/17854:
395         * ada-lang.c (ada_get_symbol_cache): Set pspace_data->sym_cache
396         when allocating a new one.
397
398 2015-02-01  Tom Tromey  <tom@tromey.com>
399
400         * MAINTAINERS: Remove myself.
401
402 2015-01-31  Doug Evans  <xdje42@gmail.com>
403
404         * dwarf2read.c (process_structure_scope): Update setting of
405         TYPE_VPTR_BASETYPE, TYPE_VPTR_FIELDNO.
406         * gdbtypes.c (internal_type_vptr_fieldno): New function.
407         (set_type_vptr_fieldno): New function.
408         (internal_type_vptr_basetype): New function.
409         (set_type_vptr_basetype): New function.
410         (get_vptr_fieldno): Update setting of TYPE_VPTR_FIELDNO,
411         TYPE_VPTR_BASETYPE.
412         (allocate_cplus_struct_type): Initialize vptr_fieldno.
413         (recursive_dump_type): Printing of vptr_fieldno, vptr_basetype ...
414         (print_cplus_stuff): ... moved here.
415         (copy_type_recursive): Don't copy TYPE_VPTR_BASETYPE.
416         * gdbtypes.h (struct main_type): Members vptr_fieldno, vptr_basetype
417         moved to ...
418         (struct cplus_struct_type): ... here.  All uses updated.
419         (TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE): Rewrite.
420         (internal_type_vptr_fieldno, set_type_vptr_fieldno): Declare.
421         (internal_type_vptr_basetype, set_type_vptr_basetype): Declare.
422         * stabsread.c (read_tilde_fields): Update setting of
423         TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE.
424
425 2015-01-31  Doug Evans  <xdje42@gmail.com>
426
427         * cp-valprint.c (cp_find_class_member): Rename parameter domain_p
428         to self_p.
429         (cp_print_class_member): Rename local domain to self_type.
430         * dwarf2read.c (quirk_gcc_member_function_pointer): Rename local
431         domain_type to self_type.
432         (set_die_type) <need_gnat_info>: Handle
433         TYPE_CODE_METHODPTR, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHOD.
434         * gdb-gdb.py (StructMainTypePrettyPrinter): Handle
435         TYPE_SPECIFIC_SELF_TYPE.
436         * gdbtypes.c (internal_type_self_type): New function.
437         (set_type_self_type): New function.
438         (smash_to_memberptr_type): Rename parameter domain to self_type.
439         Update setting of TYPE_SELF_TYPE.
440         (smash_to_methodptr_type): Update setting of TYPE_SELF_TYPE.
441         (smash_to_method_type): Rename parameter domain to self_type.
442         Update setting of TYPE_SELF_TYPE.
443         (check_stub_method): Call smash_to_method_type.
444         (recursive_dump_type): Handle TYPE_SPECIFIC_SELF_TYPE.
445         (copy_type_recursive): Ditto.
446         * gdbtypes.h (enum type_specific_kind): New value
447         TYPE_SPECIFIC_SELF_TYPE.
448         (struct main_type) <type_specific>: New member self_type.
449         (struct cplus_struct_type) <fn_field.type>: Update comment.
450         (TYPE_SELF_TYPE): Rewrite.
451         (internal_type_self_type, set_type_self_type): Declare.
452         * gnu-v3-abi.c (gnuv3_print_method_ptr): Rename local domain to
453         self_type.
454         (gnuv3_method_ptr_to_value): Rename local domain_type to self_type.
455         * m2-typeprint.c (m2_range): Replace TYPE_SELF_TYPE with
456         TYPE_TARGET_TYPE.
457         * stabsread.c (read_member_functions): Mark methods with
458         TYPE_CODE_METHOD, not TYPE_CODE_FUNC.  Update setting of
459         TYPE_SELF_TYPE.
460
461 2015-01-31  Doug Evans  <xdje42@gmail.com>
462
463         * gdbtypes.h (TYPE_SELF_TYPE): Renamed from TYPE_DOMAIN_TYPE.
464         All uses updated.
465
466 2015-01-31  Doug Evans  <xdje42@gmail.com>
467
468         * gnu-v3-abi.c (gnuv3_dynamic_class): Assert only passed structs
469         or unions.  Return zero if union.
470         (gnuv3_get_vtable): Call check_typedef.  Assert only passed structs.
471         (gnuv3_rtti_type): Pass already-check_typedef'd value to
472         gnuv3_get_vtable.
473         (compute_vtable_size): Assert only passed structs.
474         (gnuv3_print_vtable): Don't call gnuv3_get_vtable for non-structs.
475
476 2015-01-31  Doug Evans  <xdje42@gmail.com>
477
478         * gdbtypes.c (copy_type_recursive): Handle all TYPE_SPECIFIC_FIELD
479         kinds.
480
481 2015-01-31  Gary Benson <gbenson@redhat.com>
482             Doug Evans  <dje@google.com>
483
484         PR cli/9007
485         PR cli/11920
486         PR cli/15548
487         * cli/cli-cmds.c (complete_command): Notify user if max-completions
488         reached.
489         * common/common-exceptions.h (enum errors)
490         <MAX_COMPLETIONS_REACHED_ERROR>: New value.
491         * completer.h (get_max_completions_reached_message): New declaration.
492         (max_completions): Likewise.
493         (completion_tracker_t): New typedef.
494         (new_completion_tracker): New declaration.
495         (make_cleanup_free_completion_tracker): Likewise.
496         (maybe_add_completion_enum): New enum.
497         (maybe_add_completion): New declaration.
498         (throw_max_completions_reached_error): Likewise.
499         * completer.c (max_completions): New global variable.
500         (new_completion_tracker): New function.
501         (free_completion_tracker): Likewise.
502         (make_cleanup_free_completion_tracker): Likewise.
503         (maybe_add_completions): Likewise.
504         (throw_max_completions_reached_error): Likewise.
505         (complete_line): Remove duplicates and limit result to max_completions
506         entries.
507         (get_max_completions_reached_message): New function.
508         (gdb_display_match_list): Handle max_completions.
509         (_initialize_completer): New declaration and function.
510         * symtab.c: Include completer.h.
511         (completion_tracker): New static variable.
512         (completion_list_add_name): Call maybe_add_completion.
513         (default_make_symbol_completion_list_break_on_1): Renamed from
514         default_make_symbol_completion_list_break_on.  Maintain
515         completion_tracker across calls to completion_list_add_name.
516         (default_make_symbol_completion_list_break_on): New function.
517         * top.c (init_main): Set rl_completion_display_matches_hook.
518         * tui/tui-io.c: Include completer.h.
519         (tui_old_rl_display_matches_hook): New static global.
520         (tui_rl_display_match_list): Notify user if max-completions reached.
521         (tui_setup_io): Save/restore rl_completion_display_matches_hook.
522         * NEWS (New Options): Mention set/show max-completions.
523
524 2015-01-31  Gary Benson  <gbenson@redhat.com>
525
526         * symtab.c (struct add_name_data) <code>: New field.
527         Updated comments.
528         (add_symtab_completions): New function.
529         (symtab_expansion_callback): Likewise.
530         (default_make_symbol_completion_list_break_on): Set datum.code.
531         Move minimal symbol scan before calling expand_symtabs_matching.
532         Scan known primary symtabs for externs and statics before calling
533         expand_symtabs_matching.  Pass symtab_expansion_callback as
534         expansion_notify argument to expand_symtabs_matching.  Do not scan
535         primary symtabs for externs and statics after calling
536         expand_symtabs_matching.
537
538 2015-01-31  Gary Benson  <gbenson@redhat.com>
539
540         * symfile.h (expand_symtabs_exp_notify_ftype): New typedef.
541         (struct quick_symbol_functions) <expand_symtabs_matching>:
542         New argument expansion_notify.  All uses updated.
543         (expand_symtabs_matching): New argument expansion_notify.
544         All uses updated.
545         * symfile-debug.c (debug_qf_expand_symtabs_matching):
546         Also print expansion notify.
547         * symtab.c (expand_symtabs_matching_via_partial): Call
548         expansion_notify whenever a partial symbol table is expanded.
549         * dwarf2read.c (dw2_expand_symtabs_matching): Call
550         expansion_notify whenever a symbol table is instantiated.
551
552 2015-01-31  Doug Evans  <xdje42@gmail.com>
553
554         * cli-out.c: #include completer.h, readline/readline.h.
555         (cli_mld_crlf, cli_mld_putch, cli_mld_puts): New functions.
556         (cli_mld_flush, cld_mld_erase_entire_line): Ditto.
557         (cli_mld_beep, cli_mld_read_key, cli_display_match_list): Ditto.
558         * cli-out.h (cli_display_match_list): Declare.
559         * completer.c (MB_INVALIDCH, MB_NULLWCH): New macros.
560         (ELLIPSIS_LEN): Ditto.
561         (gdb_get_y_or_n, gdb_display_match_list_pager): New functions.
562         (gdb_path_isdir, gdb_printable_part, gdb_fnwidth): Ditto.
563         (gdb_fnprint, gdb_print_filename): Ditto.
564         (gdb_complete_get_screenwidth, gdb_display_match_list_1): Ditto.
565         (gdb_display_match_list): Ditto.
566         * completer.h (mld_crlf_ftype, mld_putch_ftype): New typedefs.
567         (mld_puts_ftype, mld_flush_ftype, mld_erase_entire_line_ftype): Ditto.
568         (mld_beep_ftype, mld_read_key_ftype): Ditto.
569         (match_list_displayer): New struct.
570         (gdb_display_match_list): Declare.
571         * top.c (init_main): Set rl_completion_display_matches_hook.
572         * tui/tui-io.c: #include completer.h.
573         (printable_part, PUTX, print_filename, get_y_or_n): Delete.
574         (tui_mld_crlf, tui_mld_putch, tui_mld_puts): New functions.
575         (tui_mld_flush, tui_mld_erase_entire_line, tui_mld_beep): Ditto.
576         (tui_mld_getc, tui_mld_read_key): Ditto.
577         (tui_rl_display_match_list): Rewrite.
578         (tui_handle_resize_during_io): New arg for_completion.  All callers
579         updated.
580
581 2015-01-31  Doug Evans  <xdje42@gmail.com>
582
583         Add symbol lookup cache.
584         * NEWS: Document new options and commands.
585         * symtab.c (symbol_cache_key): New static global.
586         (DEFAULT_SYMBOL_CACHE_SIZE, MAX_SYMBOL_CACHE_SIZE): New macros.
587         (SYMBOL_LOOKUP_FAILED): New macro.
588         (symbol_cache_slot_state): New enum.
589         (block_symbol_cache): New struct.
590         (symbol_cache): New struct.
591         (new_symbol_cache_size, symbol_cache_size): New static globals.
592         (hash_symbol_entry, eq_symbol_entry): New functions.
593         (symbol_cache_byte_size, resize_symbol_cache): New functions.
594         (make_symbol_cache, free_symbol_cache): New functions.
595         (get_symbol_cache, symbol_cache_cleanup): New function.
596         (set_symbol_cache_size, set_symbol_cache_size_handler): New functions.
597         (symbol_cache_lookup, symbol_cache_clear_slot): New function.
598         (symbol_cache_mark_found, symbol_cache_mark_not_found): New functions.
599         (symbol_cache_flush, symbol_cache_dump): New functions.
600         (maintenance_print_symbol_cache): New function.
601         (maintenance_flush_symbol_cache): New function.
602         (symbol_cache_stats): New function.
603         (maintenance_print_symbol_cache_statistics): New function.
604         (symtab_new_objfile_observer): New function.
605         (symtab_free_objfile_observer): New function.
606         (lookup_static_symbol, lookup_global_symbol): Use symbol cache.
607         (_initialize_symtab): Init symbol_cache_key.  New parameter
608         maint symbol-cache-size.  New maint commands print symbol-cache,
609         print symbol-cache-statistics, flush-symbol-cache.
610         Install new_objfile, free_objfile observers.
611
612 2015-01-31  Joel Brobecker  <brobecker@adacore.com>
613
614         PR symtab/17855
615         * symfile.c (clear_symtab_users): Move call to breakpoint_re_set
616         to end.
617
618 2015-01-31  Doug Evans  <xdje42@gmail.com>
619
620         * NEWS: Mention inlined scripts in .debug_gdb_scripts section.
621         * auto-load.c: #include ctype.h.
622         (struct auto_load_pspace_info): Replace member loaded_scripts with
623         new members loaded_script_files, loaded_script_texts.
624         (auto_load_pspace_data_cleanup): Update.
625         (init_loaded_scripts_info): Update.
626         (get_auto_load_pspace_data_for_loading): Update.
627         (maybe_add_script_file): Renamed from maybe_add_script.  All callers
628         updated.
629         (maybe_add_script_text): New function.
630         (clear_section_scripts): Update.
631         (source_script_file, execute_script_contents): New functions.
632         (source_section_scripts): Add support for
633         SECTION_SCRIPT_ID_PYTHON_TEXT, SECTION_SCRIPT_ID_GUILE_TEXT.
634         (print_scripts): New function.
635         (auto_load_info_scripts): Also print inlined scripts.
636         (maybe_print_unsupported_script_warning): Renamed from
637         unsupported_script_warning_print.  All callers updated.
638         (maybe_print_script_not_found_warning): Renamed from
639         script_not_found_warning_print.  All callers updated.
640         * extension-priv.h (struct extension_language_script_ops): New member
641         objfile_script_executor.
642         * extension.c (ext_lang_objfile_script_executor): New function.
643         * extension.h (objfile_script_executor_func): New typedef.
644         (ext_lang_objfile_script_executor): Declare.
645         * guile/guile-internal.h (gdbscm_execute_objfile_script): Declare.
646         * guile/guile.c (guile_extension_script_ops): Update.
647         * guile/scm-objfile.c (gdbscm_execute_objfile_script): New function.
648         * python/python.c (python_extension_script_ops): Update.
649         (gdbpy_execute_objfile_script): New function.
650
651 2015-01-31  Eli Zaretskii  <eliz@gnu.org>
652
653         * tui/tui-io.c (tui_expand_tabs): New function.
654         (tui_puts, tui_redisplay_readline): Expand TABs into the
655         appropriate number of spaces.
656         * tui/tui-regs.c: Include tui-io.h.
657         (tui_register_format): Call tui_expand_tabs to expand TABs into
658         the appropriate number of spaces.
659         * tui/tui-io.h: Add prototype for tui_expand_tabs.
660
661 2015-01-30  Doug Evans  <dje@google.com>
662
663         * NEWS: "info source" command now display producer string if present.
664         * source.c (source_info): Print producer string if present.
665
666 2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
667
668         * varobj.c (varobj_delete): Fix comment.
669
670 2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
671
672         * varobj.c (create_child): Modify comment.
673
674 2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
675
676         * ada-varobj.c (ada_number_of_children): Constify struct varobj *
677         parameter.
678         (ada_name_of_variable): Same.
679         (ada_path_expr_of_child): Same.
680         (ada_value_of_variable): Same.
681         (ada_value_is_changeable_p): Same.
682         (ada_value_has_mutated): Same.
683         * c-varobj.c (varobj_is_anonymous_child): Same.
684         (c_is_path_expr_parent): Same.
685         (c_number_of_children): Same.
686         (c_name_of_variable): Same.
687         (c_path_expr_of_child): Same.
688         (get_type): Same.
689         (c_value_of_variable): Same.
690         (cplus_number_of_children): Same.
691         (cplus_name_of_variable): Same.
692         (cplus_path_expr_of_child): Same.
693         (cplus_value_of_variable): Same.
694         * jv-varobj.c (java_number_of_children): Same.
695         (java_name_of_variable): Same.
696         (java_path_expr_of_child): Same.
697         (java_value_of_variable): Same.
698         * varobj.c (number_of_children): Same.
699         (name_of_variable): Same.
700         (is_root_p): Same.
701         (varobj_ensure_python_env): Same.
702         (varobj_get_objname): Same.
703         (varobj_get_expression): Same.
704         (varobj_get_display_format): Same.
705         (varobj_get_display_hint): Same.
706         (varobj_has_more): Same.
707         (varobj_get_thread_id): Same.
708         (varobj_get_frozen): Same.
709         (dynamic_varobj_has_child_method): Same.
710         (varobj_get_gdb_type): Same.
711         (is_path_expr_parent): Same.
712         (varobj_default_is_path_expr_parent): Same.
713         (varobj_get_language): Same.
714         (varobj_get_attributes): Same.
715         (varobj_is_dynamic_p): Same.
716         (varobj_get_child_range): Same.
717         (varobj_value_has_mutated): Same.
718         (varobj_get_value_type): Same.
719         (number_of_children): Same.
720         (name_of_variable): Same.
721         (check_scope): Same.
722         (varobj_editable_p): Same.
723         (varobj_value_is_changeable_p): Same.
724         (varobj_floating_p): Same.
725         (varobj_default_value_is_changeable_p): Same.
726
727 2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
728
729         * varobj.c (varobj_get_path_expr): Set var->path_expr.
730         * c-varobj.c (c_path_expr_of_child): Set local var instead of
731         child->path_expr.
732         (cplus_path_expr_of_child): Same.
733
734 2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
735
736         * mi-cmd-var.c (print_varobj): Free varobj_get_expression
737         result.
738         (mi_cmd_var_info_expression): Same.
739         * varobj.c (varobj_get_expression): Mention in the comment that
740         the result must by freed by the caller.
741
742 2015-01-30  Simon Marchi  <simon.marchi@ericsson.com>
743
744         * mi/mi-cmd-var.c (mi_cmd_var_info_type): Free result of
745         varobj_get_type.
746         (varobj_update_one): Same.
747         * varobj.c (update_type_if_necessary): Free curr_type_str and
748         new_type_str.
749         (varobj_get_type): Specify in comment that the result needs to be
750         freed by the caller.
751
752 2015-01-29  Doug Evans  <dje@google.com>
753
754         PR symtab/17890
755         * dwarf2read.c (dwarf_decode_line_header): Punt if version > 4.
756
757 2015-01-25  Mark Wielaard  <mjw@redhat.com>
758
759         * dwarf2read.c (checkproducer): Call producer_is_gcc.
760         * utils.c (producer_is_gcc_ge_4): Likewise.
761         (producer_is_gcc): New function.
762         * utils.h (producer_is_gcc): New declaration.
763
764 2015-01-29  Joel Brobecker  <brobecker@adacore.com>
765
766         * gdbtypes.h (struct dynamic_prop): New PROP_ADDR_OFFSET enum
767         kind.
768         * gdbtypes.c (resolve_dynamic_type_internal): Replace "addr"
769         parameter by "addr_stack" parameter.
770         (resolve_dynamic_range): Replace "addr" parameter by
771         "stack_addr" parameter.  Update function documentation.
772         Update code accordingly.
773         (resolve_dynamic_array, resolve_dynamic_union)
774         (resolve_dynamic_struct, resolve_dynamic_type_internal): Likewise.
775         (resolve_dynamic_type): Update code, following the changes made
776         to resolve_dynamic_type_internal's interface.
777         * dwarf2loc.h (struct property_addr_info): New.
778         (dwarf2_evaluate_property): Replace "address" parameter
779         by "addr_stack" parameter.  Adjust function documentation.
780         (struct dwarf2_offset_baton): New.
781         (struct dwarf2_property_baton): Update documentation of
782         field "referenced_type" to be more general. New field
783         "offset_info" in union data field.
784         * dwarf2loc.c (dwarf2_evaluate_property): Replace "address"
785         parameter by "addr_stack" parameter.  Adjust code accordingly.
786         Add support for PROP_ADDR_OFFSET properties.
787         * dwarf2read.c (attr_to_dynamic_prop): Add support for
788         DW_AT_data_member_location attributes as well.  Use case
789         statements instead of if/else condition.
790
791 2015-01-29  Joel Brobecker  <brobecker@adacore.com>
792
793         * ada-varobj.c (ada_varobj_get_array_number_of_children):
794         Return zero if PARENT_VALUE is NULL and parent_type's
795         range type is dynamic.
796
797 2015-01-29  Joel Brobecker  <brobecker@adacore.com>
798
799         * gdbtypes.c (is_dynamic_type_internal) <TYPE_CODE_RANGE>: Return
800         nonzero if the type's subtype is dynamic.
801         (resolve_dynamic_range): Also resolve the range's subtype.
802
803 2015-01-29  Alexander Klimov  <alserkli@inbox.ru>  (tiny patch)
804
805         Pushed by Joel Brobecker  <brobecker@adacore.com>.
806         * symfile.c (unmap_overlay_command): Initialize sec to NULL.
807
808 2015-01-27  Doug Evans  <dje@google.com>
809
810         * NEWS: Mention gdb.Objfile.username.
811         * python/py-objfile.c (objfpy_get_username): New function.
812         (objfile_getset): Add "username".
813
814 2015-01-24  Mark Wielaard  <mjw@redhat.com>
815
816         * stack.c (return_command): Markup warning message with _.
817
818 2015-01-24  Doug Evans  <xdje42@gmail.com>
819
820         * gdbtypes.h (TYPE_TYPE_SPECIFIC): Delete.
821
822 2015-01-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
823
824         Fix 100x slowdown regression on DWZ files.
825         * dwarf2read.c (struct dwarf2_per_objfile): Add line_header_hash.
826         (struct line_header): Add offset and offset_in_dwz.
827         (dwarf_decode_lines): Add parameter decode_mapping to the declaration.
828         (free_line_header_voidp): New declaration.
829         (line_header_hash, line_header_hash_voidp, line_header_eq_voidp): New
830         functions.
831         (dwarf2_build_include_psymtabs): Update dwarf_decode_lines caller.
832         (handle_DW_AT_stmt_list): Use line_header_hash.
833         (free_line_header_voidp): New function.
834         (dwarf_decode_line_header): Initialize offset and offset_in_dwz.
835         (dwarf_decode_lines): New parameter decode_mapping, use it.
836         (dwarf2_free_objfile): Free line_header_hash.
837
838 2015-01-23  Simon Marchi  <simon.marchi@ericsson.com>
839
840         PR gdb/17416
841         * valops.c (value_rtti_indirect_type): Catch exception thrown by
842         value_ind.
843
844 2015-01-15  Mark Wielaard  <mjw@redhat.com>
845
846         * dwarf2read.c (read_subroutine_type): Set TYPE_NO_RETURN from
847         DW_AT_noreturn.
848         * gdbtypes.h (struct func_type): Add is_noreturn field flag. Make
849         calling_convention an 8 bit bit field.
850         (TYPE_NO_RETURN): New macro.
851         * infcmd.c (finish_command): Query if function does not return
852         normally.
853         * stack.c (return_command): Likewise.
854
855 2015-01-23  Pedro Alves  <palves@redhat.com>
856
857         * linux-nat.c (linux_is_async_p): New macro.
858         (linux_nat_is_async_p):
859         (linux_nat_terminal_inferior): Check whether the target can async
860         instead of whether it is already async.
861         (linux_nat_terminal_ours): Don't check whether the target is
862         async.
863         (linux_async_pipe): Use linux_is_async_p.
864
865 2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
866
867         * NEWS (Changes since GDB 7.9): Add 'thread apply all' option
868         '-ascending'.
869         * thread.c (tp_array_compar_ascending, tp_array_compar): New.
870         (thread_apply_all_command): Parse CMD for tp_array_compar_ascending.
871         Sort tp_array using tp_array_compar.
872         (_initialize_thread): Extend thread_apply_all_command help.
873
874 2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
875
876         * corelow.c (core_open): Call also thread_command.
877         * gdbthread.h (thread_command): New prototype moved from ...
878         * thread.c (thread_command): ... here.
879         (thread_command): Make it global.
880
881 2015-01-22  Pedro Alves  <palves@redhat.com>
882
883         * configure.ac [*mingw32*]: Check $curses_found instead of
884         $prefer_curses.
885         * configure: Regenerate.
886         * windows-termcap.c: Remove HAVE_CURSES_H, HAVE_NCURSES_H and
887         HAVE_NCURSES_NCURSES_H checks.
888
889 2015-01-22  Eli Zaretskii  <eliz@gnu.org>
890
891         * tui/tui.c (tui_enable) [__MINGW32__]: If the call to 'newterm'
892         fails with the 1st arg NULL, try again with "unknown".  Don't test
893         the "cup" capability: it isn't supported by the Windows port of
894         ncurses, but the Windows console driver is still capable of
895         supporting TUI.
896
897 2015-01-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
898
899         * compile/compile.c (_initialize_compile): Use -fPIE for compile_args.
900
901 2015-01-22  Eli Zaretskii  <eliz@gnu.org>
902
903         * Makefile.in (HFILES_NO_SRCDIR): Remove ada-varobj.h.
904         (ALLDEPFILES): Remove irix5-nat.c.  These two are part of the
905         reason that "make TAGS" is broken.
906
907 2015-01-22  Chen Gang  <gang.chen.5i5j@gmail.com>
908
909         * hppa-tdep.c (inst_saves_gr): Fix logical working flow issues
910         and check additional store instructions.
911
912 2015-01-21  Wei-cheng Wang  <cole945@gmail.com>
913
914         * MAINTAINERS (Write After Approval): Add "Wei-cheng Wang".
915
916 2015-01-21  Wei-cheng Wang  <cole945@gmail.com>
917
918         * ppc-linux-tdep.c (ppc_skip_trampoline_code,
919         ppc_canonicalize_syscall, ppc_linux_syscall_record,
920         ppc_linux_record_signal, ppc_init_linux_record_tdep): Add comments.
921         * ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
922         * rs6000-tdep.c (rs6000_epilogue_frame_cache,
923         rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register,
924         rs6000_epilogue_frame_sniffer, ppc_record_vsr, ppc_process_record_op4,
925         ppc_process_record_op19, ppc_process_record_op31,
926         ppc_process_record_op59, ppc_process_record_op60,
927         ppc_process_record_op63): Likewise.
928
929 2015-01-20  Joel Brobecker  <brobecker@adacore.com>
930
931         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason_string)
932         (linux_ptrace_test_ret_to_nx): Use safe_strerror instead of
933         strerror.
934
935 2015-01-20  Wei-cheng Wang  <cole945@gmail.com>
936
937         * rs6000-tdep.c (ppc_process_record_op4, ppc_process_record_op19,
938         ppc_process_record_op31, ppc_process_record_op59,
939         ppc_process_record_op60, ppc_process_record_op63,
940         ppc_process_record): Fix -Wformat warning.
941         * rs6000-tdep.c (rs6000_epilogue_frame_cache, ppc_process_record_op60):
942         Remove unused variables.
943
944 2015-01-20  Chen Gang  <gang.chen.5i5j@gmail.com>
945
946         * MAINTAINERS (Write After Approval): Add "Chen Gang".
947
948 2015-01-19  Eli Zaretskii  <eliz@gnu.org>
949
950         * configure.ac [*mingw32*]: Only add windows-termcap.o to
951         CONFIG_OBS if not building with a curses library.
952         * configure: Regenerate.
953
954         * windows-termcap.c: Include defs.h.  Make the whole body empty if
955         either one of HAVE_CURSES_H or HAVE_NCURSES_H or
956         HAVE_NCURSES_NCURSES_H is defined.
957
958 2015-01-19  Joel Brobecker  <brobecker@adacore.com>
959
960         * rs6000-tdep.c (rs6000_gdbarch_init): Move divide operator
961         from end of line to start of next line.
962
963 2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
964
965         * ppc-linux-tdep.c (ppc_skip_trampoline_code):
966         Scan PLT stub backward for reverse debugging.
967         * ppc64-tdep.c (ppc64_skip_trampoline_code): Likewise.
968
969 2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
970             Ulrich Weigand  <uweigand@de.ibm.com>
971
972         * configure.tgt (powerpc*-*-linux): Add linux-record.o to
973         gdb_target_obs.
974         (ppc_linux_record_tdep, ppc64_linux_record_tdep): New for linux syscall
975         record.
976         (ppc_canonicalize_syscall, ppc_linux_syscall_record,
977         ppc_linux_record_signal, ppc_init_linux_record_tdep): New functions.
978         (ppc_linux_init_abi): Set process_record, process_record_signal.
979         * ppc-tdep.h (struct gdbarch_tdep): Add ppc_syscall_record and
980         ppc_linux_record_tdep to gdbarch_tdep.
981         (ppc_process_record): New declaration.
982         * rs6000-tdep.c (ppc_record_vsr, ppc_process_record_op4,
983         ppc_process_record_op19, ppc_process_record_op31,
984         ppc_process_record_op59, ppc_process_record_op60,
985         ppc_process_record_op63, ppc_process_record): New functions.
986
987 2015-01-17  Wei-cheng Wang  <cole945@gmail.com>
988
989         * rs6000-tdep.c (rs6000_in_function_epilogue_p): Rename to
990         rs6000_in_function_epilogue_frame_p and add an argument
991         for frame_info.
992         (rs6000_epilogue_frame_cache, rs6000_epilogue_frame_this_id,
993         rs6000_epilogue_frame_prev_register, rs6000_epilogue_frame_sniffer):
994         New functions.
995         (rs6000_epilogue_frame_unwind): New.
996         (rs6000_gdbarch_init): Append epilogue unwinder.
997
998 2015-01-16  Sergio Durigan Junior  <sergiodj@redhat.com>
999
1000         * nat/linux-personality.c: Replace "#ifndef
1001         HAVE_DECL_ADDR_NO_RANDOMIZE" by "#if
1002         !HAVE_DECL_ADDR_NO_RANDOMIZE", fixing a regression in RHEL-5
1003         systems.
1004
1005 2015-01-16  Eli Zaretskii  <eliz@gnu.org>
1006
1007         * tui/tui-win.c (tui_rehighlight_all, tui_set_var_cmd): New
1008         functions.
1009         (_initialize_tui_win) <border-kind, border-mode>:
1010         <active-border-mode>: Use tui_set_var_cmd as the "set" function.
1011         (tui_set_tab_width_command): Fix the commentary.
1012
1013         * tui/tui-win.h: Add prototype for tui_rehighlight_all.
1014
1015         * tui/tui-win.c (tui_scroll_left_command, tui_scroll_right_command):
1016         Doc fix.
1017         (tui_set_tab_width_command): Delete and recreate the source and
1018         the disassembly windows, to show the effect of the changed tab
1019         size immediately.
1020
1021         * tui/tui-data.h (LINE_PREFIX): Make shorter
1022         (MAX_PID_WIDTH): Enlarge from 14 to 19, to leave enough space for
1023         "Thread NNNNN.XXXX" thread ID notation on Windows.
1024
1025 2015-01-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
1026
1027         Fix gcc-5 compilation.
1028         * hppa-tdep.c (inst_saves_gr): Fix parentheses typo.
1029
1030 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1031
1032         * Makefile.in (HFILES_NO_SRCDIR): Add nat/linux-personality.h.
1033         (linux-personality.o): New rule.
1034         * common/common-defs.h: Include <stdint.h>.
1035         * config/aarch64/linux.mh (NATDEPFILES): Include
1036         linux-personality.o.
1037         * config/alpha/alpha-linux.mh (NATDEPFILES): Likewise.
1038         * config/arm/linux.mh (NATDEPFILES): Likewise.
1039         * config/i386/linux64.mh (NATDEPFILES): Likewise.
1040         * config/i386/linux.mh (NATDEPFILES): Likewise.
1041         * config/ia64/linux.mh (NATDEPFILES): Likewise.
1042         * config/m32r/linux.mh (NATDEPFILES): Likewise.
1043         * config/m68k/linux.mh (NATDEPFILES): Likewise.
1044         * config/mips/linux.mh (NATDEPFILES): Likewise.
1045         * config/pa/linux.mh (NATDEPFILES): Likewise.
1046         * config/powerpc/linux.mh (NATDEPFILES): Likewise.
1047         * config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise.
1048         * config/powerpc/spu-linux.mh (NATDEPFILES): Likewise.
1049         * config/s390/linux.mh (NATDEPFILES): Likewise.
1050         * config/sparc/linux64.mh (NATDEPFILES): Likewise.
1051         * config/sparc/linux.mh (NATDEPFILES): Likewise.
1052         * config/tilegx/linux.mh (NATDEPFILES): Likewise.
1053         * config/xtensa/linux.mh (NATDEPFILES): Likewise.
1054         * defs.h: Remove #include <stdint.h> (moved to
1055         common/common-defs.h).
1056         * linux-nat.c: Include nat/linux-personality.h.  Remove #include
1057         <sys/personality.h>; do not define ADDR_NO_RANDOMIZE (moved to
1058         nat/linux-personality.c).
1059         (linux_nat_create_inferior): Remove code to disable address space
1060         randomization (moved to nat/linux-personality.c).  Create cleanup
1061         to disable address space randomization.
1062         * nat/linux-personality.c: New file.
1063         * nat/linux-personality.h: Likewise.
1064
1065 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1066
1067         * Makefile.in (ALLDEPFILES): Including common/mingw-strerror.c and
1068         common/posix-strerror.c.
1069         (posix-strerror.o): New rule.
1070         (mingw-strerror.o): Likewise.
1071         * common/common-utils.h (safe_strerror): Move prototype to here,
1072         from utils.h.
1073         * common/common.host: New file.
1074         * common/mingw-strerror.c: Likewise.
1075         * common/posix-strerror.c: Likewise.
1076         * configure: Regenerated.
1077         * configure.ac: Source common/common.host.  Add variable
1078         common_host_obs to gdb_host_obs.
1079         * contrib/ari/gdb_ari.sh: Mention gdb/common/mingw-strerror.c and
1080         gdb/common/posix-strerror.c when warning about the use of
1081         strerror.
1082         * mingw-hdep.c (safe_strerror): Remove definition; move it to
1083         common/mingw-strerror.c.
1084         * posix-hdep.c (safe_strerror): Remove definition; move it to
1085         common/posix-hdep.c.
1086         * utils.h (safe_strerror): Remove prototype; move to
1087         common/common-utils.h.
1088
1089 2015-01-15  Joel Brobecker  <brobecker@adacore.com>
1090
1091         GDB 7.8.2 released.
1092
1093 2015-01-15  Joel Brobecker  <brobecker@adacore.com>
1094
1095         * ada-lang.c (ada_array_bound_from_type): Ignore array's parallel
1096         ___XA type if the array has already been fixed.
1097
1098 2015-01-14  Yao Qi  <yao@codesourcery.com>
1099
1100         * Makefile.in (ppc-linux.o): New rule.
1101         * config/powerpc/ppc64-linux.mh (NATDEPFILES): Add ppc-linux.o.
1102         * configure.ac: AC_CHECK_FUNCS(getauxval).
1103         * config.in: Re-generated.
1104         * configure: Re-generated.
1105         * nat/ppc-linux.h [__powerpc64__] (ppc64_64bit_inferior_p):
1106         Declare.
1107         * nat/ppc-linux.c: New file.
1108         * ppc-linux-nat.c (ppc_linux_target_wordsize) [__powerpc64__]:
1109         Call ppc64_64bit_inferior_p.
1110
1111 2015-01-14  Yao Qi  <yao@codesourcery.com>
1112
1113         * ppc-linux-nat.c (PT_ORIG_R3, PT_TRAP): Move to
1114         nat/ppc-linux.h.
1115         (PPC_FEATURE_CELL, PPC_FEATURE_BOOKE): Likewise.
1116         (PPC_FEATURE_HAS_DFP): Likewise.
1117         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1118         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1119         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1120         Include "nat/ppc-linux.h".
1121         * nat/ppc-linux.h: New file.
1122         * Makefile.in (HFILES_NO_SRCDIR): Add nat/ppc-linux.h.
1123
1124 2015-01-14  Pedro Alves  <palves@redhat.com>
1125
1126         PR gdb/17525
1127         * breakpoint.c: Include "interps.h".
1128         (bpstat_do_actions_1): Also check whether the interpreter is
1129         async.
1130
1131 2015-01-14  Pedro Alves  <palves@redhat.com>
1132
1133         PR cli/17828
1134         * infrun.c (reinstall_readline_callback_handler_cleanup): Don't
1135         reinstall if the interpreter is sync.
1136
1137 2015-01-13  Doug Evans  <dje@google.com>
1138
1139         * objfiles.c (objfile_filename): New function.
1140         * objfiles.h (objfile_filename): Declare it.
1141         (objfile_name): Add function comment.
1142         * python/py-objfile.c (objfpy_lookup_objfile_by_name): Try both the
1143         bfd file name (which may be realpath'd), and the original name.
1144
1145 2015-01-13  Joel Brobecker  <brobecker@adacore.com>
1146
1147         * NEWS: Create a new section for the next release branch.
1148         Rename the section of the current branch, now that it has
1149         been cut.
1150
1151 2015-01-13  Joel Brobecker  <brobecker@adacore.com>
1152
1153         GDB 7.9 branch created (92fc2e6978d9a7c8324c7e851dbee59e22ec7a37):
1154         * version.in: Bump version to 7.9.50.DATE-cvs.
1155
1156 2015-01-13  Joel Brobecker  <brobecker@adacore.com>
1157
1158         * nat/linux-procfs.c (linux_proc_attach_tgid_threads):
1159         Remove trailing new-line in argument of call to warning.
1160
1161 2015-01-13  Joel Brobecker  <brobecker@adacore.com>
1162
1163         * linux-nat.c (attach_proc_task_lwp_callback): Remove trailing
1164         new-line in argument of call to "warning".
1165
1166 2015-01-13  Joel Brobecker  <brobecker@adacore.com>
1167
1168         * ada-lang.c (ada_lookup_symbol_nonlocal): If name not found
1169         in static block, then try searching for primitive types.
1170
1171 2015-01-12  Patrick Palka  <patrick@parcs.ath.cx>
1172
1173         * top.h (gdb_add_history): Declare.
1174         * top.c (command_count): New variable.
1175         (gdb_add_history): New function.
1176         (gdb_safe_append_history): New static function.
1177         (quit_force): Call it.
1178         (command_line_input): Use gdb_add_history instead of
1179         add_history.
1180         * event-top.c (command_line_handler): Likewise.
1181
1182 2015-01-12  James Clarke  <jrtc27@jrtc27.com>  (tiny patch)
1183
1184         PR gdb/17046
1185         * darwin-nat.c: Replace <machine/setjmp.h> #include by
1186         <setjmp.h> #include.
1187
1188 2015-01-11  Doug Evans  <xdje42@gmail.com>
1189
1190         * dwarf2read.c (compute_delayed_physnames): Use TYPE_FN_FIELD_PHYSNAME.
1191
1192 2015-01-11  Doug Evans  <xdje42@gmail.com>
1193
1194         PR gdb/15830
1195         * NEWS: The "maint demangle" command is renamed as "demangle".
1196         * demangle.c: #include cli/cli-utils.h, language.h.
1197         (demangle_command): New function.
1198         (_initialize_demangle): Add new command "demangle".
1199         * maint.c (maintenance_demangle): Stub out.
1200         (_initialize_maint_cmds): Update help text for "maint demangle",
1201         and mark as deprecated.
1202
1203 2015-01-11  Mark Kettenis  <kettenis@gnu.org>
1204
1205         * inf-ptrace.c (inf_ptrace_follow_fork): Adjust now that
1206         inferior_thread is a function.
1207
1208 2015-01-09  Patrick Palka  <patrick@parcs.ath.cx>
1209
1210         * Makefile.in (.y.c): Don't munge yacc's #line
1211         directives.
1212
1213 2015-01-09  Patrick Palka  <patrick@parcs.ath.cx>
1214
1215         * utils.c (defaulted_query): Rewrite to use gdb_readline_wrapper
1216         to prompt for input.
1217         * tui/tui-hooks.c (tui_query_hook): Remove.
1218         (tui_install_hooks): Don't set deprecated_query_hook.
1219         * tui/tui-io.c (tui_redisplay_readline): Fix off-by-one error in
1220         height calculation.  Always update the command window's cur_line.
1221
1222 2015-01-09  Pedro Alves  <palves@redhat.com>
1223
1224         * breakpoint.c (hardware_breakpoint_inserted_here_p): New
1225         function.
1226         * breakpoint.h (hardware_breakpoint_inserted_here_p): New
1227         declaration.
1228         * linux-nat.c (linux_nat_status_is_event): Move higher up in file.
1229         (linux_resume_one_lwp): Store the thread's PC.  Adjust to clear
1230         stop_reason.
1231         (check_stopped_by_watchpoint): New function.
1232         (save_sigtrap): Reimplement.
1233         (linux_nat_stopped_by_watchpoint): Adjust.
1234         (linux_nat_lp_status_is_event): Delete.
1235         (stop_wait_callback): Only call save_sigtrap after storing the
1236         pending status.
1237         (status_callback): If the thread had been stopped for a breakpoint
1238         that has since been removed, discard the event and resume the LWP.
1239         (count_events_callback, select_event_lwp_callback): Use
1240         lwp_status_pending_p instead of linux_nat_lp_status_is_event.
1241         (cancel_breakpoint): Rename to ...
1242         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
1243         stopped for a software breakpoint or hardware breakpoint.
1244         (select_event_lwp): Only give preference to the stepping LWP in
1245         all-stop mode.  Adjust comments.
1246         (stop_and_resume_callback): Remove references to new_pending_p.
1247         (linux_nat_filter_event): Likewise.  Leave exit events of the
1248         leader thread pending here.  Handle signal short circuiting here.
1249         Only call save_sigtrap after storing the pending waitstatus.
1250         (linux_nat_wait_1): Remove 'retry' label.  Remove references to
1251         new_pending.  Don't handle leaving events the caller is not
1252         interested in pending here, nor handle signal short-circuiting
1253         here.  Also give equal priority to all LWPs that have had events
1254         in non-stop mode.  If reporting a software breakpoint event,
1255         unadjust the LWP's PC.
1256         * linux-nat.h (enum lwp_stop_reason): New.
1257         (struct lwp_info) <stop_pc>: New field.
1258         (struct lwp_info) <stopped_by_watchpoint>: Delete field.
1259         (struct lwp_info) <stop_reason>: New field.
1260         * x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
1261
1262 2015-01-09  Pedro Alves  <palves@redhat.com>
1263
1264         * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
1265         Set the LWP's 'resumed' flag.
1266
1267 2015-01-09  Pedro Alves  <palves@redhat.com>
1268
1269         * linux-nat.c (linux_resume_one_lwp): New function.
1270         (resume_lwp): Use lwp_status_pending_p and linux_resume_one_lwp.
1271         (linux_nat_resume): Use lwp_status_pending_p and
1272         linux_resume_one_lwp.
1273         (linux_handle_syscall_trap): Use linux_resume_one_lwp.
1274         (linux_handle_extended_wait): Use linux_resume_one_lwp.
1275         (status_callback, running_callback): Use lwp_status_pending_p.
1276         (lwp_status_pending_p): New function.
1277         (stop_and_resume_callback): Use lwp_status_pending_p.
1278         (linux_nat_filter_event): Use linux_resume_one_lwp.
1279         (linux_nat_wait_1): Always use status_callback to look for an LWP
1280         with a pending status.  Use linux_resume_one_lwp.
1281         (resume_stopped_resumed_lwps): Use lwp_status_pending_p and
1282         linux_resume_one_lwp.
1283
1284 2015-01-09  Pedro Alves  <palves@redhat.com>
1285
1286         * breakpoint.c (bp_location_inserted_here_p): New function,
1287         factored out from ...
1288         (breakpoint_inserted_here_p): ... here.  Use
1289         ALL_BP_LOCATIONS_AT_ADDR.
1290         (software_breakpoint_inserted_here_p): Use
1291         bp_location_inserted_here_p and ALL_BP_LOCATIONS_AT_ADDR.
1292
1293 2014-01-09  Pedro Alves  <palves@redhat.com>
1294
1295         Skip enabling event reporting if the kernel supports
1296         PTRACE_EVENT_CLONE.
1297         * linux-thread-db.c: Include "nat/linux-ptrace.h".
1298         (thread_db_use_events): New function.
1299         (try_thread_db_load_1): Check thread_db_use_events before enabling
1300         event reporting.
1301         (update_thread_state): New function.
1302         (attach_thread): Use it.  Check thread_db_use_events before
1303         enabling event reporting.
1304         (thread_db_detach): Check thread_db_use_events before disabling
1305         event reporting.
1306         (find_new_threads_callback): Check thread_db_use_events before
1307         enabling event reporting.  Update the thread's state if not using
1308         libthread_db events.
1309
1310 2015-01-09  Pedro Alves  <palves@redhat.com>
1311
1312         * linux-nat.c (lin_lwp_attach_lwp): Assert that the lwp id we're
1313         about to wait for is > 0.
1314         * linux-thread-db.c (find_new_threads_callback): Ignore thread if
1315         the kernel thread ID is -1.
1316
1317 2015-01-09  Pedro Alves  <palves@redhat.com>
1318
1319         * linux-nat.c (attach_proc_task_lwp_callback): New function.
1320         (linux_nat_attach): Use linux_proc_attach_tgid_threads.
1321         (wait_lwp, linux_nat_filter_event): If not set yet, set the lwp's
1322         ptrace option flags.
1323         * linux-nat.h (struct lwp_info) <must_set_ptrace_flags>: New
1324         field.
1325         * nat/linux-procfs.c: Include <dirent.h>.
1326         (linux_proc_get_int): New parameter "warn".  Handle it.
1327         (linux_proc_get_tgid): Adjust.
1328         (linux_proc_get_tracerpid): Rename to ...
1329         (linux_proc_get_tracerpid_nowarn): ... this.
1330         (linux_proc_pid_get_state): New function, factored out from
1331         (linux_proc_pid_has_state): ... this.  Add new parameter "warn"
1332         and handle it.
1333         (linux_proc_pid_is_gone): New function.
1334         (linux_proc_pid_is_stopped): Adjust.
1335         (linux_proc_pid_is_zombie_maybe_warn)
1336         (linux_proc_pid_is_zombie_nowarn): New functions.
1337         (linux_proc_pid_is_zombie): Use
1338         linux_proc_pid_is_zombie_maybe_warn.
1339         (linux_proc_attach_tgid_threads): New function.
1340         * nat/linux-procfs.h (linux_proc_get_tgid): Update comment.
1341         (linux_proc_get_tracerpid): Rename to ...
1342         (linux_proc_get_tracerpid_nowarn): ... this, and update comment.
1343         (linux_proc_pid_is_gone): New declaration.
1344         (linux_proc_pid_is_zombie): Update comment.
1345         (linux_proc_pid_is_zombie_nowarn): New declaration.
1346         (linux_proc_attach_lwp_func): New typedef.
1347         (linux_proc_attach_tgid_threads): New declaration.
1348         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Adjust to
1349         use nowarn functions.
1350         (linux_ptrace_attach_fail_reason_string): Move here from
1351         gdbserver/linux-low.c and rename.
1352         (ptrace_supports_feature): If the current ptrace options are not
1353         known yet, check them now, instead of asserting.
1354         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason_string):
1355         Declare.
1356
1357 2015-01-09  Pedro Alves  <palves@redhat.com>
1358
1359         * linux-thread-db.c (thread_db_find_new_threads_silently)
1360         (try_thread_db_load_1, try_thread_db_load, thread_db_load_search)
1361         (find_new_threads_once): Print debug output on gdb_stdlog.
1362
1363 2015-01-09  Chen Gang  <gang.chen.5i5j@gmail.com>
1364             Pedro Alves  <palves@redhat.com>
1365
1366         * compile/compile.c: Include "gdb_wait.h".
1367         (do_rmdir): Check return value, and free 'zap'.
1368
1369 2015-01-08  Pedro Alves  <palves@redhat.com>
1370             Yao Qi  <yao@codesourcery.com>
1371
1372         * dwarf2loc.c (indirect_pieced_value): Don't call
1373         gdb_sign_extend.  Call extract_signed_integer instead.
1374         * utils.c (gdb_sign_extend): Remove.
1375         * utils.h (gdb_sign_extend): Remove declaration.
1376
1377 2015-01-07  Pierre Muller  <muller@sourceware.org>
1378
1379         PR symtab/17811
1380         * stabsread.c (define_symbol): Set language for C++ special symbols.
1381
1382 2015-01-07  Patrick Palka  <patrick@parcs.ath.cx>
1383
1384         * inflow.c (initial_gdb_ttystate): Tweak comment.
1385
1386 2015-01-07  Joel Brobecker  <brobecker@adacore.com>
1387
1388         * inflow.c (set_initial_gdb_ttystate): Add empty line after
1389         comment documenting function.
1390
1391 2015-01-07  Patrick Palka  <patrick@parcs.ath.cx>
1392
1393         * terminal.h (set_initial_gdb_ttystate): Declare.
1394         * inflow.c (initial_gdb_ttystate): New static variable.
1395         (set_initial_gdb_ttystate): New setter.
1396         (child_terminal_init_with_pgrp): Copy initial_gdb_ttystate
1397         instead of our current terminal state.
1398         * top.c (gdb_init): Call set_initial_gdb_ttystate.
1399
1400 2015-01-07  Joel Brobecker  <brobecker@adacore.com>
1401
1402         * guile/scm-type.c (tyscm_array_1): Add comment.
1403         * python/py-type.c (typy_array_1): Add comment.
1404
1405 2015-01-06  Joel Brobecker  <brobecker@adacore.com>
1406
1407         * guile/scm-type.c (tyscm_array_1): Do not raise out-of-range
1408         error if N2 is equal to N1 - 1.
1409
1410 2015-01-06  Joel Brobecker  <brobecker@adacore.com>
1411
1412         * python/py-type.c (typy_array_1): Do not raise negative-length
1413         exception if N2 is equal to N1 - 1.
1414
1415 2015-01-03  Doug Evans  <xdje42@gmail.com>
1416
1417         * c-exp.y: Whitespace cleanup.
1418         (classify_inner_name): Remove extra ;.
1419
1420 2015-01-02  Maciej W. Rozycki  <macro@codesourcery.com>
1421
1422         * mips-tdep.c (mips32_scan_prologue): Keep the extracted stack
1423         offset signed.
1424
1425 2015-01-02  Doug Evans  <dje@google.com>
1426
1427         * dwarf2read.c (setup_type_unit_groups): Remove outdated comment.
1428
1429 2015-01-02  Doug Evans  <dje@google.com>
1430
1431         * symtab.h (struct symbol): Fix typo in comment.
1432
1433 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
1434
1435         Update year range in copyright notice of all files.
1436
1437 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
1438
1439         * top.c (print_gdb_version): Update copyright year to 2015.
1440
1441 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
1442
1443         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2014.
1444
1445 For older changes see ChangeLog-2014.
1446 \f
1447 Local Variables:
1448 mode: change-log
1449 left-margin: 8
1450 fill-column: 74
1451 version-control: never
1452 coding: utf-8
1453 End: