4bd70e516dd8d5a9777b993dad7438b8e933c13e
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * Makefile.in (SFILES): Add "common/job-control.c".
4 (HFILES_NO_SRCDIR): Add "common/job-control.h".
5 (COMMON_OBS): Add "job-control.o".
6 * common/job-control.c: New file, with contents from
7 "gdb/inflow.c".
8 * common/job-control.h: New file, with contents from "terminal.h".
9 * fork-child.c: Include "job-control.h".
10 * inflow.c: Include "job-control.h".
11 (gdb_setpgid): Move to "common/common-inflow.c".
12 (_initialize_inflow): Move setting of "job_control" to
13 "handle_job_control".
14 * terminal.h (job_control): Moved to "common/common-terminal.h".
15 (gdb_setpgid): Likewise.
16 * top.c: Include "job_control.h".
17 * utils.c: Likewise.
18 (job_control): Moved to "job-control.c".
19
20 2017-06-07 Pedro Alves <palves@redhat.com>
21
22 * Makefile.in (SFILES): Add gdb_regex.c.
23 (COMMON_OBS): Add gdb_regex.o.
24 * ada-lang.c (ada_add_standard_exceptions)
25 (ada_add_exceptions_from_frame, name_matches_regex)
26 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
27 parameter type to compiled_regex. Adjust.
28 (ada_exceptions_list): Use compiled_regex.
29 * break-catch-throw.c (exception_catchpoint::pattern): Now a
30 std::unique_ptr<compiled_regex>.
31 (exception_catchpoint::~exception_catchpoint): Remove regfree
32 call.
33 (check_status_exception_catchpoint): Adjust to use compiled_regex.
34 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
35 * breakpoint.c (solib_catchpoint::compiled): Now a
36 std::unique_ptr<compiled_regex>.
37 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
38 (check_status_catch_solib): Adjust to use compiled_regex.
39 (add_solib_catchpoint): Adjust to use compiled_regex.
40 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
41 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
42 compiled_regex reference. Adjust to use it.
43 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
44 declaration. Include "gdb_regex.h".
45 (apropos_cmd): Change regex parameter to compiled_regex reference.
46 * gdb_regex.c: New file.
47 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
48 declarations.
49 (class compiled_regex): New.
50 * linux-tdep.c: Include "common/gdb_optional.h".
51 (struct mapping_regexes): New, factored out from
52 mapping_is_anonymous_p, and adjusted to use compiled_regex.
53 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
54 gdb::optional and remove cleanups. Adjust to compiled_regex.
55 * probe.c: Include "common/gdb_optional.h".
56 (collect_probes): Use compiled_regex and gdb::optional and remove
57 cleanups.
58 * skip.c: Include "common/gdb_optional.h".
59 (skiplist_entry::compiled_function_regexp): Now a
60 gdb::optional<compiled_regex>.
61 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
62 (free_skiplist_entry): Remove regfree call.
63 (compile_skip_regexp, skip_rfunction_p): Adjust to use
64 compiled_regex and gdb::optional.
65 * symtab.c: Include "common/gdb_optional.h".
66 (search_symbols): Use compiled_regex and gdb::optional.
67 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
68 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
69 to gdb_regex.c.
70
71 2017-06-07 Alan Hayward <alan.hayward@arm.com>
72
73 * regcache.c (regcache::save): Avoid buffer use.
74 (regcache::dump): Likewise.
75
76 2017-06-07 Alan Hayward <alan.hayward@arm.com>
77
78 * sh-tdep.c (sh_pseudo_register_read): Remove
79 MAX_REGISTER_SIZE.
80 (sh_pseudo_register_write): Likewise.
81 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
82 (sh64_pseudo_register_write): Likewise
83
84 2017-06-07 Alan Hayward <alan.hayward@arm.com>
85
86 * aarch64-tdep.c (aarch64_store_return_value): Use
87 V_REGISTER_SIZE.
88 (aarch64_pseudo_read_value): Likewise.
89 (aarch64_pseudo_write): Likewise.
90
91 2017-06-06 Yao Qi <yao.qi@linaro.org>
92
93 * regformats/regdef.h (set_register_cache): Remove the
94 declaration.
95
96 2017-06-06 Alan Hayward <alan.hayward@arm.com>
97
98 * frame.c (frame_unwind_register_signed): Use
99 frame_unwind_register_value.
100
101 2017-06-06 Pedro Alves <palves@redhat.com>
102
103 PR breakpoints/21553
104 * breakpoint.c (create_breakpoints_sal_default)
105 (init_breakpoint_sal, create_breakpoint_sal): Use
106 gdb::unique_xmalloc_ptr for string parameters.
107 (create_breakpoint): Constify 'extra_string' and 'cond_string'
108 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
109 (base_breakpoint_create_breakpoints_sal)
110 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
111 (strace_marker_create_breakpoints_sal)
112 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
113 string parameters.
114 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
115 gdb::unique_xmalloc_ptr for string parameters.
116 (create_breakpoint): Constify 'extra_string' and 'cond_string'
117 parameters.
118
119 2017-06-06 Alan Hayward <alan.hayward@arm.com>
120
121 * alpha-tdep.c (alpha_register_to_value): Use
122 get_frame_register_value.
123 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
124
125 2017-06-06 Alan Hayward <alan.hayward@arm.com>
126
127 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
128 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
129 (ia64_value_to_register): Likewise.
130 (ia64_extract_return_value): Likewise.
131 (ia64_store_return_value): Likewise.
132 (ia64_push_dummy_call): Likewise.
133
134 2017-06-04 Joel Brobecker <brobecker@adacore.com>
135
136 GDB 8.0 released.
137
138 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
139
140 * x86-linux-nat.c (struct arch_lwp_info): Remove.
141
142 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
143
144 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
145 parameter.
146 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
147
148 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
149
150 * event-loop.c (poll_timers): Unallocate timer using delete
151 instead of xfree.
152
153 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
154
155 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
156 (struct breakpoint) <~breakpoint>: New.
157 (struct watchpoint): Inherit from breakpoint.
158 <~watchpoint>: New.
159 <base>: Remove.
160 (struct tracepoint): Inherit from breakpoint.
161 <base>: Remove.
162 * breakpoint.c (longjmp_breakpoint_ops): Remove.
163 (struct longjmp_breakpoint): Inherit from breakpoint.
164 <~longjmp_breakpoint>: New.
165 <base>: Remove.
166 (new_breakpoint_from_type): Remove casts.
167 (watchpoint_in_thread_scope): Remove reference to base field.
168 (watchpoint_del_at_next_stop): Likewise.
169 (update_watchpoint): Likewise.
170 (watchpoint_check): Likewise.
171 (bpstat_check_watchpoint): Likewise.
172 (set_longjmp_breakpoint): Likewise.
173 (struct fork_catchpoint): Inherit from breakpoint.
174 <base>: Remove.
175 (struct solib_catchpoint): Inherit from breakpoint.
176 <~solib_catchpoint>: New.
177 <base>: Remove.
178 (dtor_catch_solib): Change to ...
179 (solib_catchpoint::~solib_catchpoint): ... this.
180 (breakpoint_hit_catch_solib): Remove reference to base field.
181 (add_solib_catchpoint): Likewise.
182 (create_fork_vfork_event_catchpoint): Likewise.
183 (struct exec_catchpoint): Inherit from breakpoint.
184 <~exec_catchpoint>: New.
185 <base>: Remove.
186 (dtor_catch_exec): Change to ...
187 (exec_catchpoint::~exec_catchpoint): ... this.
188 (dtor_watchpoint): Change to ...
189 (watchpoint::~watchpoint): ... this.
190 (watch_command_1): Remove reference to base field.
191 (catch_exec_command_1): Likewise.
192 (base_breakpoint_dtor): Change to ...
193 (breakpoint::~breakpoint): ... this.
194 (base_breakpoint_ops): Remove dtor field value.
195 (longjmp_bkpt_dtor): Change to ...
196 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
197 (strace_marker_create_breakpoints_sal): Remove reference to base
198 field.
199 (delete_breakpoint): Don't manually call breakpoint destructor.
200 (create_tracepoint_from_upload): Remove reference to base field.
201 (trace_pass_set_count): Likewise.
202 (initialize_breakpoint_ops): Don't initialize
203 momentary_breakpoint_ops, don't set dtors.
204 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
205 <~ada_catchpoint>: New.
206 <base>: Remove.
207 (create_excep_cond_exprs): Remove reference to base field.
208 (dtor_exception): Change to ...
209 (ada_catchpoint::~ada_catchpoint): ... this.
210 (dtor_catch_exception): Remove.
211 (dtor_catch_exception_unhandled): Remove.
212 (dtor_catch_assert): Remove.
213 (create_ada_exception_catchpoint): Remove reference to base
214 field.
215 (initialize_ada_catchpoint_ops): Don't set dtors.
216 * break-catch-sig.c (struct signal_catchpoint): Inherit from
217 breakpoint.
218 <~signal_catchpoint>: New.
219 <base>: Remove.
220 (signal_catchpoint_dtor): Change to ...
221 (signal_catchpoint::~signal_catchpoint): ... this.
222 (create_signal_catchpoint): Remove reference to base field.
223 (initialize_signal_catchpoint_ops): Don't set dtor.
224 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
225 from breakpoint.
226 <~syscall_catchpoint>: New.
227 <base>: Remove.
228 (dtor_catch_syscall): Change to ...
229 (syscall_catchpoint::~syscall_catchpoint): ... this.
230 (create_syscall_event_catchpoint): Remove reference to base
231 field.
232 (initialize_syscall_catchpoint_ops): Don't set dtor.
233 * break-catch-throw.c (struct exception_catchpoint): Inherit
234 from breakpoint.
235 <~exception_catchpoint>: New.
236 <base>: Remove.
237 (dtor_exception_catchpoint): Change to ...
238 (exception_catchpoint::~exception_catchpoint): ... this.
239 (handle_gnu_v3_exceptions): Remove reference to base field.
240 (initialize_throw_catchpoint_ops): Don't set dtor.
241 * ctf.c (ctf_get_traceframe_address): Remove reference to base
242 field.
243 * remote.c (remote_get_tracepoint_status): Likewise.
244 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
245 * tracefile.c (tracefile_fetch_registers): Likewise.
246 * tracepoint.c (actions_command): Likewise.
247 (validate_actionline): Likewise.
248 (tfind_1): Likewise.
249 (get_traceframe_location): Likewise.
250 (find_matching_tracepoint_location): Likewise.
251 (parse_tracepoint_status): Likewise.
252 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
253
254 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
255
256 * breakpoint.c (struct longjmp_breakpoint): New struct.
257 (is_tracepoint_type): Change return type to bool.
258 (is_longjmp_type): New function.
259 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
260 (set_raw_breakpoint_without_location): Use
261 new_breakpoint_from_type.
262 (set_raw_breakpoint): Likewise.
263
264 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
265
266 * breakpoint.c (new_breakpoint_from_type): New function.
267 (create_breakpoint_sal): Use new_breakpoint_from_type and
268 unique_ptr.
269 (create_breakpoint): Likewise.
270
271 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
272
273 * memattr.c (mem_info_command): Rename to ...
274 (info_mem_command): ... this.
275 (mem_enable_command): Rename to ...
276 (enable_mem_command): ... this.
277 (mem_disable_command): Rename to ...
278 (disable_mem_command): ... this.
279 (mem_delete_command): Rename to ...
280 (delete_mem_command): ... this.
281 (_initialize_mem): Adjust function names.
282
283 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
284
285 * btrace.c (handle_pt_insn_events): New.
286 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
287 STATUS. Split into this and ...
288 (handle_pt_insn_event_flags): ... this.
289
290 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
291
292 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
293 and struct pt_insn.resynced.
294 * configure: Regenerated.
295 * config.in: Regenerated.
296
297 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
298
299 * btrace.c (ftrace_find_call_by_number): New function.
300 (ftrace_new_function): Store objects, not pointers.
301 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
302 ftrace_new_gap, ftrace_update_function,
303 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
304 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
305 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
306 btrace_ends_with_single_insn, btrace_call_get): Account for
307 btrace_thread_info::functions now storing objects.
308 * btrace.h (struct btrace_thread_info): Add constructor.
309 (struct btrace_thread_info) <functions>: Make std::vector.
310 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
311 Initialize with default values.
312 * record-btrace.c (record_btrace_frame_sniffer): Account for
313 btrace_thread_info::functions now storing objects.
314
315 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
316
317 * btrace.c: Remove typedef bfun_s.
318 (ftrace_new_gap): Directly add gaps to the list of gaps.
319 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
320 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
321 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
322 instead of gdb VEC.
323
324 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
325
326 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
327 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
328 with btrace_thread_info::next_segment and
329 btrace_thread_info::prev_segment.
330 * btrace.h: Remove struct btrace_func_link.
331 (struct btrace_function): Replace pair of function segment pointers
332 with pair of indices.
333 * python/py-record-btrace.c (btpy_call_prev_sibling,
334 btpy_call_next_sibling): Replace references to
335 btrace_thread_info::segment with btrace_thread_info::next_segment and
336 btrace_thread_info::prev_segment.
337 * record-btrace.c (record_btrace_frame_this_id): Use
338 btrace_find_call_by_number.
339
340 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
341
342 * btrace.c (ftrace_new_function, ftrace_fixup_level,
343 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
344 btrace_insn_next, btrace_insn_prev): Remove references to
345 btrace_thread_info::flow.
346 * btrace.h (struct btrace_function): Remove FLOW.
347
348 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
349
350 * btrace.c (ftrace_find_call_by_number): New function.
351 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
352 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
353 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
354 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
355 index.
356 * btrace.h (struct btrace_function): Turn UP into an index.
357 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
358 as an index.
359 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
360 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
361 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
362
363 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
364
365 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
366 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
367 ftrace_update_function, ftrace_compute_global_level_offset,
368 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
369 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
370 btrace_insn_end, btrace_is_empty): Remove references to
371 btrace_thread_info::begin and btrace_thread_info::end.
372 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
373 (struct btrace_thread_info) <functions>: Adjust comment.
374 * record-btrace.c (record_btrace_start_replaying): Remove reference to
375 btrace_thread_info::begin.
376
377 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
378
379 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
380 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
381 ftrace_update_function): Remove arguments that implicitly were always
382 BTINFO->END.
383 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
384 Don't pass BTINFO->END.
385
386 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
387
388 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
389 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
390 btrace_find_insn_by_number): Replace function segment pointer with
391 index.
392 (btrace_insn_cmp): Simplify.
393 * btrace.h: (struct btrace_insn_iterator) Rename index to
394 insn_index. Replace function segment pointer with index into function
395 segment vector.
396 * record-btrace.c (record_btrace_call_history): Replace function
397 segment pointer use with index.
398 (record_btrace_frame_sniffer): Retrieve function call segment through
399 vector.
400 (record_btrace_set_replay): Remove defunc't safety check.
401
402 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
403
404 * btrace.c (btrace_ends_with_single_insn): New function.
405 (btrace_call_get, btrace_call_number, btrace_call_begin,
406 btrace_call_end, btrace_call_next, btrace_call_prev,
407 btrace_find_call_by_number): Use index into call segment vector
408 instead of pointer.
409 (btrace_call_cmp): Simplify.
410 * btrace.h (struct btrace_call_iterator): Replace function call segment
411 pointer with index into vector.
412 * record-btrace.c (record_btrace_call_history): Use index instead of
413 pointer.
414
415 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
416
417 * btrace.c (btrace_insn_begin, btrace_insn_end,
418 btrace_find_insn_by_number): Add btinfo to iterator.
419 * btrace.h (struct btrace_insn_iterator): Add btinfo.
420
421 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
422
423 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
424 and save pointers directly.
425 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
426 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
427 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
428 changed signature of functions.
429 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
430 (btrace_fetch): Remove code that adds btrace_function pointers to
431 vector of btrace_functions.
432 (btrace_clear): Simplify freeing vector of btrace_functions.
433
434 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
435
436 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
437 Replace VEC_* with std::vector functions.
438 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
439 (struct btrace_thread_info)<functions>: Change type to std::vector.
440
441 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
442
443 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
444 "Removed targets and native configurations" up. Merge duplicate
445 "New commands" sub-sections. Add "New options" sub-sections.
446
447 2017-05-26 Alan Hayward <alan.hayward@arm.com>
448
449 * defs.h (copy_integer_to_size): New declaration.
450 * findvar.c (copy_integer_to_size): New function.
451 (do_cint_test): New selftest function.
452 (copy_integer_to_size_test): Likewise.
453 (_initialize_findvar): Likewise.
454 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
455 (mips_fbsd_collect_reg): Use raw_collect_integer.
456 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
457 (mips64_fill_gregset): Use raw_collect_integer
458 (mips64_fill_fpregset): Use raw_supply_integer.
459 * regcache.c (regcache::raw_supply_integer): New function.
460 (regcache::raw_collect_integer): Likewise.
461 * regcache.h: (regcache::raw_supply_integer): New declaration.
462 (regcache::raw_collect_integer): Likewise.
463
464 2017-05-24 Yao Qi <yao.qi@linaro.org>
465
466 * Makefile.in (SFILES): Add gdbarch-selftests.c.
467 (COMMON_OBS): Add gdbarch-selftests.o.
468 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
469 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
470 * gdbarch-selftests.c: New file.
471 * regcache.h (regcache) <~regcache>: Mark it virtual if
472 GDB_SELF_TEST.
473 <raw_write>: Likewise.
474
475 2017-05-24 Yao Qi <yao.qi@linaro.org>
476
477 * regcache.c (current_regcache): Change it to
478 regcache::current_regcache.
479 (regcache_observer_target_changed): Update.
480 (regcache_thread_ptid_changed): Make it a regcache static
481 method.
482 (regcache_thread_ptid_changed): Update.
483 (class regcache_access): New.
484 (current_regcache_test): Update.
485 (_initialize_regcache): Update.
486 * regcache.h: Include forward_list.
487 (regcache): Declare regcache_thread_ptid_changed and declare
488 registers_changed_ptid as friend.
489
490 2017-05-24 Yao Qi <yao.qi@linaro.org>
491
492 * i387-tdep.c (i387_register_to_value): Use register_size
493 instead of TYPE_LENGTH.
494 * m68k-tdep.c (m68k_register_to_value): Likewise.
495
496 2017-05-24 Yao Qi <yao.qi@linaro.org>
497
498 * i387-tdep.c (i387_convert_register_p): Return false if type
499 code isn't TYPE_CODE_FLT.
500
501 2017-05-24 Yao Qi <yao.qi@linaro.org>
502
503 * alpha-tdep.c (alpha_convert_register_p): Return true if type
504 length is 4.
505 (alpha_register_to_value): Remove type length check.
506 (alpha_value_to_register): Likewise.
507
508 2017-05-24 Yao Qi <yao.qi@linaro.org>
509
510 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
511 TYPE_CODE_FLT.
512
513 2017-05-24 Yao Qi <yao.qi@linaro.org>
514
515 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
516 TYPE_CODE_FLT or not.
517
518 2017-05-24 Yao Qi <yao.qi@linaro.org>
519
520 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
521 * avr-tdep.c (avr_gdbarch_init): Likewise.
522 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
523 * cris-tdep.c (cris_gdbarch_init): Likewise.
524 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
525 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
526 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
527 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
528 * mep-tdep.c (mep_gdbarch_init): Likewise.
529 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
530 * mips-tdep.c (mips_gdbarch_init): Likewise.
531 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
532 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
533 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
534 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
535 * v850-tdep.c (v850_gdbarch_init): Likewise.
536
537 2017-05-24 Yao Qi <yao.qi@linaro.org>
538
539 * selftest-arch.c (tests_with_arch): Call registers_changed
540 and reinit_frame_cache.
541 * selftest.c (run_self_tests): Likewise.
542
543 2017-05-24 Yao Qi <yao.qi@linaro.org>
544
545 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
546 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
547
548 2017-05-24 Yao Qi <yao.qi@linaro.org>
549
550 * rl78-tdep.c (rl78_gdbarch_init): Don't call
551 set_gdbarch_print_insn.
552
553 2017-05-24 Yao Qi <yao.qi@linaro.org>
554
555 * h8300-tdep.c (h8300_gdbarch_init): Don't call
556 set_gdbarch_print_insn.
557
558 2017-05-24 Yao Qi <yao.qi@linaro.org>
559
560 * alpha-tdep.c (alpha_gdbarch_init): Don't call
561 set_gdbarch_print_insn.
562 * arc-tdep.c (arc_gdbarch_init): Likewise.
563 * arch-utils.c: include dis-asm.h.
564 (default_print_insn): New function.
565 * arch-utils.h (default_print_insn): Declare.
566 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
567 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
568 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
569 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
570 * frv-tdep.c (frv_gdbarch_init): Likewise.
571 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
572 * gdbarch.sh (print_insn): Use default_print_insn.
573 * gdbarch.c: Regenerated.
574 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
575 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
576 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
577 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
578 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
579 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
580 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
581 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
582 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
583 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
584 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
585 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
586 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
587 * mt-tdep.c (mt_gdbarch_init): Likewise.
588 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
589 * nios2-tdep.c (nios2_print_insn): Remove.
590 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
591 * rx-tdep.c (rx_gdbarch_init): Likewise.
592 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
593 * score-tdep.c (score_print_insn): Remove.
594 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
595 * sh-tdep.c (sh_gdbarch_init): Likewise.
596 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
597 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
598 * tic6x-tdep.c (tic6x_print_insn): Remove.
599 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
600 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
601 * v850-tdep.c (v850_gdbarch_init): Likewise.
602 * vax-tdep.c (vax_gdbarch_init): Likewise.
603 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
604 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
605
606 2017-05-23 John Baldwin <jhb@FreeBSD.org>
607
608 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
609 (MIPS_FP0_REGNUM): Remove.
610 (MIPS_FSR_REGNUM): Remove.
611 (mips_fbsd_supply_fpregs): Use mips_regnum.
612 (mips_fbsd_supply_gregs): Likewise.
613 (mips_fbsd_collect_fpregs): Likewise.
614 (mips_fbsd_collect_gregs): Likewise.
615
616 2017-05-23 John Baldwin <jhb@FreeBSD.org>
617
618 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
619 (getpfpregs_supplies): New function.
620 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
621 getfpregs_supplies.
622 (mips_fbsd_store_inferior_registers): Likewise.
623
624 2017-05-22 Pedro Alves <palves@redhat.com>
625
626 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
627 maintainer.
628
629 2017-05-22 Alan Hayward <alan.hayward@arm.com>
630
631 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
632 (store_register): Likewise.
633 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
634 (get_decimal_float_return_value): Likewise.
635 (do_ppc_sysv_return_value): Likewise.
636 (ppc64_sysv_abi_push_integer): Likewise.
637 (ppc64_sysv_abi_push_freg): Likewise.
638 (ppc64_sysv_abi_return_value_base): Likewise.
639 (ppc64_sysv_abi_return_value): Likewise.
640 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
641 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
642 * rs6000-nat.c: Likewise.
643 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
644 (rs6000_value_to_register): Likewise.
645 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
646
647 2017-05-21 Tom Tromey <tom@tromey.com>
648
649 PR rust/21466:
650 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
651 arrays as "[T]", not "[T; ]".
652
653 2017-05-19 Tom Tromey <tom@tromey.com>
654
655 PR rust/21484:
656 * rust-lang.c (exp_descriptor_rust): New function.
657 (rust_language_defn): Use it.
658 * p-lang.c (pascal_language_defn): Update.
659 * opencl-lang.c (opencl_language_defn): Update.
660 * objc-lang.c (objc_language_defn): Update.
661 * m2-lang.c (m2_language_defn): Update.
662 * language.h (struct language_defn)
663 <la_watch_location_expression>: New member.
664 * language.c (unknown_language_defn, auto_language_defn)
665 (local_language_defn): Update.
666 * go-lang.c (go_language_defn): Update.
667 * f-lang.c (f_language_defn): Update.
668 * d-lang.c (d_language_defn): Update.
669 * c-lang.h (c_watch_location_expression): Declare.
670 * c-lang.c (c_watch_location_expression): New function.
671 (c_language_defn, cplus_language_defn, asm_language_defn)
672 (minimal_language_defn): Use it.
673 * breakpoint.c (watch_command_1): Call
674 la_watch_location_expression.
675 * ada-lang.c (ada_language_defn): Update.
676
677 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
678
679 PR tui/21482
680 * gdb_curses.h (NOMACROS): Define.
681 (NCURSES_NOMACROS): Define.
682
683 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
684
685 PR tui/21482
686 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
687 arg to char *.
688 * tui/tui-wingeneral.c (box_win): Likewise.
689 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
690 (tui_show_source_line): Likewise.
691 (tui_show_exec_info_content): Likewise.
692
693 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
694
695 * sparc-tdep.c (sparc_structure_return_p)
696 (sparc_arg_on_registers_p): New functions.
697 (sparc32_store_arguments): Use them.
698 * sparc64-tdep.c (sparc64_16_byte_align_p)
699 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
700 Handle TYPE_CODE_ARRAY.
701
702 2017-05-17 Yao Qi <yao.qi@linaro.org>
703
704 * cli/cli-decode.c (add_alias_cmd): New function.
705 * command.h (add_alias_cmd): Declare.
706 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
707 instead call add_alias_cmd.
708
709 2017-05-17 Pedro Alves <palves@redhat.com>
710
711 * Makefile.in (nat_extra_makefile_frag): Rename to ...
712 (nat_makefile_frag): ... this. All references updated.
713 * configure.ac: Likewise.
714 * configure.nat: Likewise. Enhance comments.
715 * configure: Regenerate.
716
717 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
718
719 * procfs.c (procfs_create_inferior): Change prototype to match
720 definition.
721
722 2017-05-13 Eli Zaretskii <eliz@gnu.org>
723
724 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
725 C++ compiler warning.
726
727 2017-05-12 Tom Tromey <tom@tromey.com>
728
729 PR rust/21483:
730 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
731 recurse, just call value_struct_elt directly.
732
733 2017-05-12 Tom Tromey <tom@tromey.com>
734
735 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
736 OP_RUST_ARRAY>: Fix.
737
738 2017-05-12 Tom Tromey <tom@tromey.com>
739
740 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
741
742 2017-05-09 Yao Qi <yao.qi@linaro.org>
743
744 * regcache.c: Include <forward_list>.
745 (struct regcache_list): Remove.
746 (current_regcache): Update.
747 (get_thread_arch_aspace_regcache): Update for std::forward_list.
748 (regcache_thread_ptid_changed): Likewise.
749 (registers_changed_ptid): Likewise.
750 (current_regcache_size): Likewise.
751
752 2017-05-09 Yao Qi <yao.qi@linaro.org>
753
754 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
755 (current_regcache_size): New function.
756 (current_regcache_test): New function.
757 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
758
759 2017-05-08 Alan Hayward <alan.hayward@arm.com>
760
761 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
762 (print_gp_register_row): Use get_frame_register_value.
763
764 2017-05-08 Alan Hayward <alan.hayward@arm.com>
765
766 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
767 (mips_supply_fpregset): Likewise.
768 (mips64_supply_gregset): Likewise.
769
770 2017-05-08 Alan Hayward <alan.hayward@arm.com>
771
772 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
773 regcache->raw_supply_zeroed.
774
775 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
776
777 * configure.nat: Rearrange 'case' statements to match
778 host before cpu.
779
780 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
781
782 * Makefile.in: Remove "@host_makefile_frag@". Add variables
783 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
784 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
785 "@nat_extra_makefile_frag@".
786 (Makefile): Remove dependency on "@frags@".
787 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
788 (data-directory/Makefile): Likewise.
789 * config/aarch64/linux.mh: Deleted; moved contents to
790 "gdb/configure.nat".
791 * config/alpha/alpha-linux.mh: Likewise.
792 * config/alpha/nbsd.mh: Likewise.
793 * config/arm/linux.mh: Likewise.
794 * config/arm/nbsdelf.mh: Likewise.
795 * config/i386/cygwin.mh: Likewise.
796 * config/i386/cygwin64.mh: Likewise.
797 * config/i386/darwin.mh: Likewise.
798 * config/i386/fbsd.mh: Likewise.
799 * config/i386/fbsd64.mh: Likewise.
800 * config/i386/go32.mh: Likewise.
801 * config/i386/i386gnu.mh: Likewise.
802 * config/i386/i386sol2.mh: Likewise.
803 * config/i386/linux.mh: Likewise.
804 * config/i386/linux64.mh: Likewise.
805 * config/i386/mingw.mh: Likewise.
806 * config/i386/mingw64.mh: Likewise.
807 * config/i386/nbsd64.mh: Likewise.
808 * config/i386/nbsdelf.mh: Likewise.
809 * config/i386/nto.mh: Likewise.
810 * config/i386/obsd.mh: Likewise.
811 * config/i386/obsd64.mh: Likewise.
812 * config/i386/sol2-64.mh: Likewise.
813 * config/ia64/linux.mh: Likewise.
814 * config/m32r/linux.mh: Likewise.
815 * config/m68k/linux.mh: Likewise.
816 * config/m68k/nbsdelf.mh: Likewise.
817 * config/m68k/obsd.mh: Likewise.
818 * config/m88k/obsd.mh: Likewise.
819 * config/mips/fbsd.mh: Likewise.
820 * config/mips/linux.mh: Likewise.
821 * config/mips/nbsd.mh: Likewise.
822 * config/mips/obsd64.mh: Likewise.
823 * config/pa/linux.mh: Likewise.
824 * config/pa/nbsd.mh: Likewise.
825 * config/pa/obsd.mh: Likewise.
826 * config/powerpc/aix.mh: Likewise.
827 * config/powerpc/fbsd.mh: Likewise.
828 * config/powerpc/linux.mh: Likewise.
829 * config/powerpc/nbsd.mh: Likewise.
830 * config/powerpc/obsd.mh: Likewise.
831 * config/powerpc/ppc64-linux.mh: Likewise.
832 * config/powerpc/spu-linux.mh: Likewise.
833 * config/s390/linux.mh: Likewise.
834 * config/sh/nbsd.mh: Likewise.
835 * config/sparc/fbsd.mh: Likewise.
836 * config/sparc/linux.mh: Likewise.
837 * config/sparc/linux64.mh: Likewise.
838 * config/sparc/nbsd64.mh: Likewise.
839 * config/sparc/nbsdelf.mh: Likewise.
840 * config/sparc/obsd64.mh: Likewise.
841 * config/sparc/sol2.mh: Likewise.
842 * config/tilegx/linux.mh: Likewise.
843 * config/vax/nbsdelf.mh: Likewise.
844 * config/vax/obsd.mh: Likewise.
845 * config/xtensa/linux.mh: Likewise.
846 * config/i386/i386gnu.mn: New file, with excerpts from
847 "config/i386/i386gnu.mh".
848 * configure: Regenerate.
849 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
850 *.mh files under "gdb/config".
851 * configure.nat: New file, with contents from the
852 "gdb/config/*/*.mh" files.
853
854 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
855
856 * btrace.c (btrace_clear): Free insn vector.
857
858 2017-05-05 Pedro Alves <palves@redhat.com>
859
860 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
861 * configure: Regenerate.
862
863 2017-05-04 Pedro Alves <palves@redhat.com>
864
865 * Makefile.in (SFILES): Add progspace-and-thread.c.
866 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
867 (COMMON_OBS): Add progspace-and-thread.o.
868 * breakpoint.c: Include "progspace-and-thread.h".
869 (update_inserted_breakpoint_locations)
870 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
871 Use scoped_restore_current_pspace_and_thread.
872 (create_std_terminate_master_breakpoint): Use
873 scoped_restore_current_program_space.
874 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
875 (print_breakpoint_location): Use
876 scoped_restore_current_program_space.
877 (bp_loc_is_permanent): Use
878 scoped_restore_current_pspace_and_thread.
879 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
880 (download_tracepoint_locations): Use
881 scoped_restore_current_pspace_and_thread.
882 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
883 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
884 (enum step_over_calls_kind): Moved from inferior.h.
885 (class scoped_restore_current_thread): New class.
886 * gdbthread.h (make_cleanup_restore_current_thread): Delete
887 declaration.
888 (scoped_restore_current_thread): New class.
889 * infcmd.c: Include "common/gdb_optional.h".
890 (continue_1, proceed_after_attach): Use
891 scoped_restore_current_thread.
892 (notice_new_inferior): Use scoped_restore_current_thread.
893 * inferior.c: Include "progspace-and-thread.h".
894 (restore_inferior, save_current_inferior): Delete.
895 (add_inferior_command, clone_inferior_command): Use
896 scoped_restore_current_pspace_and_thread.
897 * inferior.h (scoped_restore_current_inferior): New class.
898 * infrun.c: Include "progspace-and-thread.h" and
899 "common/gdb_optional.h".
900 (follow_fork_inferior): Use
901 scoped_restore_current_pspace_and_thread.
902 (scoped_restore_exited_inferior): New class.
903 (handle_vfork_child_exec_or_exit): Use
904 scoped_restore_exited_inferior,
905 scoped_restore_current_pspace_and_thread,
906 scoped_restore_current_thread and scoped_restore.
907 (fetch_inferior_event): Use scoped_restore_current_thread.
908 * linespec.c (decode_line_full, decode_line_1): Use
909 scoped_restore_current_program_space.
910 * mi/mi-main.c: Include "progspace-and-thread.h".
911 (exec_continue): Use scoped_restore_current_thread.
912 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
913 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
914 * proc-service.c (ps_pglobal_lookup): Use
915 scoped_restore_current_program_space.
916 * progspace-and-thread.c: New file.
917 * progspace-and-thread.h: New file.
918 * progspace.c (release_program_space, clone_program_space): Use
919 scoped_restore_current_program_space.
920 (restore_program_space, save_current_program_space)
921 (save_current_space_and_thread): Delete.
922 (switch_to_program_space_and_thread): Moved to
923 progspace-and-thread.c.
924 * progspace.h (save_current_program_space)
925 (save_current_space_and_thread): Delete declarations.
926 (scoped_restore_current_program_space): New class.
927 * remote.c (remote_btrace_maybe_reopen): Use
928 scoped_restore_current_thread.
929 * symtab.c: Include "progspace-and-thread.h".
930 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
931 * thread.c (print_thread_info_1): Use
932 scoped_restore_current_thread.
933 (struct current_thread_cleanup): Delete.
934 (do_restore_current_thread_cleanup)
935 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
936 (scoped_restore_current_thread::~scoped_restore_current_thread):
937 ... this new dtor.
938 (make_cleanup_restore_current_thread): Rename/convert to ...
939 (scoped_restore_current_thread::scoped_restore_current_thread):
940 ... this new ctor.
941 (thread_apply_all_command): Use scoped_restore_current_thread.
942 (thread_apply_command): Use scoped_restore_current_thread.
943 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
944 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
945
946 2017-05-04 Pedro Alves <palves@redhat.com>
947
948 * thread.c (make_cleanup_restore_current_thread): Move
949 find_thread_ptid call before the is_stopped call. Assert that the
950 thread is found. Replace is_stopped call by checking the thread's
951 state directly. Remove unnecessary NULL-thread check.
952
953 2017-05-04 Pedro Alves <palves@redhat.com>
954
955 * corelow.c (thread_section_name): New class.
956 (get_core_register_section, get_core_siginfo): Use it.
957
958 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
959
960 * corelow.c (sniff_core_bfd): Remove extra semicolon.
961 (get_core_register_section): Remove xfree of NULL pointer.
962
963 2017-05-03 Alan Hayward <alan.hayward@arm.com>
964
965 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
966 * regcache.c (regcache::raw_supply_zeroed): New function.
967 * regcache.h (regcache::raw_supply_zeroed): New declaration.
968
969 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
970
971 * gdbarch.sh: Remove commented out definition of
972 TARGET_CHAR_BIT.
973 * gdbarch.h: Re-generate.
974
975 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
976
977 * configure: Regenerate.
978
979 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
980
981 * solib-target.c (solib_target_relocate_section_addresses):
982 Remove num_section_bases, num_bases, segment_bases variables.
983
984 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
985
986 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
987
988 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
989
990 * solib-target.c: Include <vector>
991 (struct lm_info_target) <~lm_info_target>: Remove.
992 <segment_bases, section_bases>: Change type to
993 std::vector<CORE_ADDR>.
994 (library_list_start_segment, library_list_start_section,
995 library_list_end_library,
996 solib_target_relocate_section_addresses): Adjust.
997
998 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
999
1000 * gdbarch.sh (software_single_step): Change return type to
1001 std::vector<CORE_ADDR>.
1002 * gdbarch.c, gdbarch.h: Re-generate.
1003 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
1004 Adjust.
1005 (arm_deal_with_atomic_sequence_raw): Adjust.
1006 (thumb_get_next_pcs_raw): Adjust.
1007 (arm_get_next_pcs_raw): Adjust.
1008 (arm_get_next_pcs): Adjust.
1009 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
1010 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
1011 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
1012 (alpha_software_single_step): Adjust.
1013 * alpha-tdep.h (alpha_software_single_step): Adjust.
1014 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
1015 * arm-tdep.c (arm_software_single_step): Adjust.
1016 (arm_breakpoint_kind_from_current_state): Adjust.
1017 * arm-tdep.h (arm_software_single_step): Adjust.
1018 * breakpoint.c (insert_single_step_breakpoint): Adjust.
1019 * cris-tdep.c (cris_software_single_step): Adjust.
1020 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
1021 (micromips_deal_with_atomic_sequence): Adjust.
1022 (deal_with_atomic_sequence): Adjust.
1023 (mips_software_single_step): Adjust.
1024 * mips-tdep.h (mips_software_single_step): Adjust.
1025 * moxie-tdep.c (moxie_software_single_step): Adjust.
1026 * nios2-tdep.c (nios2_software_single_step): Adjust.
1027 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
1028 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
1029 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
1030 * s390-linux-tdep.c (s390_software_single_step): Adjust.
1031 * sparc-tdep.c (sparc_software_single_step): Adjust.
1032 * spu-tdep.c (spu_software_single_step): Adjust.
1033 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
1034
1035 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1036
1037 * gdbarch.sh: Use semi-colon as field separator instead of colon.
1038 * gdbarch.h: Re-generate.
1039
1040 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1041
1042 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
1043 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
1044 * python/py-instruction.c, python/py-instruction.h: New file.
1045 * python/py-record.c: Add py-instruction.h include.
1046 (gdbpy_initialize_record): Make gdb.Instruction a super class of
1047 gdb.RecordInstruction.
1048 * python/python-internal.h: Add gdbpy_initialize_instruction
1049 declaration.
1050 * python/python.c (do_start_initialization): Add
1051 gdbpy_initialize_instruction.
1052
1053 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1054
1055 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
1056 Remove.
1057 (btrace_func_from_recpy_func): New function.
1058 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
1059 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
1060 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
1061 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
1062 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
1063 Also, use new helper functions.
1064 (btpy_list_item): Use new helper functions.
1065 (recpy_bt_function_call_history): Use new type name.
1066 (btpy_call_getset): Remove.
1067 (gdbpy_initialize_btrace): Remove code to initialize
1068 gdb.BtraceFunctionCall.
1069 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
1070 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
1071 recpy_bt_func_prev, recpy_bt_func_next): New export.
1072 * python/py-record.c (recpy_func_type): New static object.
1073 (recpy_func_new, recpy_func_level, recpy_func_symbol,
1074 recpy_func_instructions, recpy_func_up, recpy_func_prev,
1075 recpy_func_next): New function.
1076 (recpy_element_hash, recpy_element_richcompare): Updated comment.
1077 (recpy_func_getset): New static object.
1078 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
1079 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
1080
1081 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1082
1083 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
1084 (btpy_object, btpy_insn_type, btpy_new): Remove.
1085 (btpy_list_object): Use gdb.RecordInstruction type instead of
1086 gdb.BtraceInstruction type.
1087 (btrace_insn_from_recpy_insn): New function.
1088 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
1089 btpy_new.
1090 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
1091 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
1092 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
1093 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
1094 instead of btpy_object.
1095 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
1096 btpy_insn_data, btpy_insn_decode): Rename to ...
1097 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
1098 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
1099 recpy_bt_insn_decode): This. Also, use new helper functions.
1100 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
1101 recpy_insn_type.
1102 (btpy_insn_getset): Remove.
1103 (gdbpy_initialize_btrace): Remove code to initialize
1104 gdb.BtraceInstruction. Use recpy_element_object.
1105 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
1106 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
1107 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
1108 * python/py-record.c (recpy_insn_type): New static object.
1109 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
1110 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
1111 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
1112 New function.
1113 (recpy_insn_getset): New static object.
1114 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
1115 * python/py-record.h (recpy_element_object): New typedef.
1116 (recpy_insn_type, recpy_insn_new): New export.
1117
1118 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1119
1120 * py-record-btrace.c (btpy_insn_new): Removed.
1121 (btpy_insn_or_gap_new): New function.
1122 (btpy_insn_error): Removed.
1123 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
1124 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
1125 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
1126 btpy_insn_or_gap_new instead of btpy_insn_new.
1127 (btpy_insn_getset): Remove btpy_insn_error.
1128 * py-record.c (recpy_gap_type): New static object.
1129 (recpy_gap_object): New typedef.
1130 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
1131 recpy_gap_reason_string): New function.
1132 (recpy_gap_getset): New static object.
1133 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
1134 * py-record.h (recpy_gap_new): New export.
1135
1136 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1137
1138 * python/py-record.c (recpy_ptid): Remove.
1139 (recpy_record_getset): Remove recpy_ptid.
1140
1141 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1142
1143 * btrace.c (btrace_fetch): Set inferior_ptid.
1144 * python/py-record-btrace.c: Add "py-record.h" include.
1145 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
1146 recpy_bt_end, recpy_bt_instruction_history,
1147 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
1148 in gdb.Record object instead of current ptid.
1149 * python/py-record.c: Include new "py-record.h" file.
1150 (recpy_record_object): Moved to py-record.h.
1151 * python/py-record.h: New file.
1152
1153 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1154
1155 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
1156 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
1157 indentation.
1158
1159 2017-05-01 Joel Brobecker <brobecker@adacore.com>
1160
1161 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
1162 the past maintainers section.
1163
1164 2017-04-28 Yao Qi <yao.qi@linaro.org>
1165
1166 * infcmd.c (get_return_value): Use regcache ctor, and remove
1167 cleanup.
1168
1169 2017-04-28 Yao Qi <yao.qi@linaro.org>
1170 Pedro Alves <palves@redhat.com>
1171
1172 * regcache.c (regcache::regcache): New tag dispatch ctor.
1173 (do_cooked_read): Moved above.
1174 (regcache_dup): Use the tag dispatch ctor..
1175 * regcache.h (regcache): Declare ctor, delete copy ctor and
1176 assignment operator, remove friend regcache_dup.
1177
1178 2017-04-28 Yao Qi <yao.qi@linaro.org>
1179
1180 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
1181 call method save instead of regcache_cpy.
1182 * regcache.h (struct regcache): Make regcache_dup a friend.
1183
1184 2017-04-28 Yao Qi <yao.qi@linaro.org>
1185
1186 * regcache.c (struct regcache): Move to regcache.h
1187 (regcache::arch): New method.
1188 (regcache_get_ptid): Update.
1189 (get_regcache_arch): Call arch method.
1190 (get_regcache_aspace): Call method aspace.
1191 (register_buffer): Change it to method.
1192 (regcache_save): Change it to regcache::save.
1193 (regcache_restore): Likewise.
1194 (regcache_cpy_no_passthrough): Remove the declaration.
1195 (regcache_cpy): Call methods restore and cpy_no_passthrough.
1196 (regcache_cpy_no_passthrough): Change it to method
1197 cpy_no_passthrough.
1198 (regcache_register_status): Change it to method
1199 get_register_status.
1200 (regcache_invalidate): Change it to method invalidate.
1201 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
1202 (regcache_raw_update): Change it to method raw_update.
1203 (regcache_raw_read): Likewise.
1204 (regcache_raw_read_signed): Likewise.
1205 (regcache_raw_read_unsigned): Likewise.
1206 (regcache_raw_write_signed): Likewise.
1207 (regcache_raw_write_unsigned): Likewise.
1208 (regcache_cooked_read): Likewise.
1209 (regcache_cooked_read_value): Likewise.
1210 (regcache_cooked_read_signed): Likewise.
1211 (regcache_cooked_read_unsigned): Likewise.
1212 (regcache_cooked_write_signed): Likewise.
1213 (regcache_cooked_write_unsigned): Likewise.
1214 (regcache_raw_set_cached_value): Likewise.
1215 (regcache_raw_write): Likewise.
1216 (regcache_cooked_write): Likewise.
1217 (regcache_xfer_part): Likewise.
1218 (regcache_raw_read_part): Likewise.
1219 (regcache_raw_write_part): Likewise.
1220 (regcache_cooked_read_part): Likewise.
1221 (regcache_cooked_write_part): Likewise.
1222 (regcache_raw_supply): Likewise.
1223 (regcache_raw_collect): Likewise.
1224 (regcache_transfer_regset): Likewise.
1225 (regcache_supply_regset): Likewise.
1226 (regcache_collect_regset): Likewise.
1227 (regcache_debug_print_register): Likewise.
1228 (enum regcache_dump_what): Move it to regcache.h.
1229 (regcache_dump): Change it to method dump.
1230 * regcache.h (enum regcache_dump_what): New.
1231 (class regcache): New.
1232 * target.c (target_fetch_registers): Call method
1233 debug_print_register.
1234 (target_store_registers): Likewise.
1235
1236 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * windows-nat.c (struct lm_info_windows): Initialize field.
1239 (windows_make_so): Allocate lm_info_windows with new.
1240 (windows_free_so): Free lm_info_windows with delete.
1241
1242 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1243
1244 * solib-darwin.c (struct lm_info_darwin): Initialize field.
1245 (darwin_current_sos): Allocate lm_info_darwin with new, remove
1246 cleanup.
1247 (darwin_free_so): Free lm_info_darwin with delete.
1248
1249 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1250
1251 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
1252 <l_addr_p>: Change type to bool.
1253 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
1254 (svr4_free_so): Free lm_info_svr4 with delete.
1255 (svr4_copy_library_list): Replace memcpy with call to copy
1256 constructor.
1257 (library_list_start_library, svr4_default_sos): Allocate
1258 lm_info_svr4 with new.
1259
1260 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1261
1262 * solib-target.c (struct lm_info_target): Add destructor,
1263 initialize fields.
1264 <name>: Change type to std::string.
1265 (library_list_start_library): Allocate lm_info_target with new.
1266 (solib_target_free_library_list): Free lm_info_target with
1267 delete.
1268 (solib_target_current_sos): Adapt to std::string.
1269 (solib_target_free_so): Free lm_info_target with delete.
1270
1271 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1272
1273 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
1274 fields.
1275 (frv_current_sos): Allocate lm_info_frv with new.
1276 (frv_relocate_main_executable): Free lm_info_frv with delete,
1277 allocate with new.
1278 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
1279
1280 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1281
1282 * solib-frv.c (struct lm_info_frv): Fix indentation.
1283
1284 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1285
1286 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
1287 map field.
1288 (dsbt_current_sos): Allocate lm_info_dsbt with new.
1289 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
1290 and allocate with new.
1291 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
1292
1293 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1294
1295 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
1296 <filename, member_name>: Change type to std::string.
1297 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
1298 (library_list_start_library): Allocate lm_info_aix with new.
1299 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
1300 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
1301 with copy constructor.
1302
1303 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1304
1305 * solist.h (struct lm_info): Remove.
1306 (struct lm_info_base): New class.
1307 (struct so_list) <lm_info>: Change type to lm_info_base *.
1308 * nto-tdep.c (struct lm_info): Remove.
1309 (lm_addr): Adjust.
1310 * solib-aix.c (struct lm_info): Rename to ...
1311 (struct lm_info_aix): ... this. Extend lm_info_base.
1312 (lm_info_p): Rename to ...
1313 (lm_info_aix_p): ... this, and adjust.
1314 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
1315 solib_aix_parse_libraries, library_list_start_library,
1316 solib_aix_free_library_list, solib_aix_parse_libraries,
1317 solib_aix_get_library_list,
1318 solib_aix_relocate_section_addresses, solib_aix_free_so,
1319 solib_aix_get_section_offsets,
1320 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
1321 Adjust.
1322 (struct solib_aix_inferior_data) <library_list>: Adjust.
1323 * solib-darwin.c (struct lm_info): Rename to ...
1324 (struct lm_info_darwin): ... this. Extend lm_info_base.
1325 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
1326 * solib-dsbt.c (struct lm_info): Rename to ...
1327 (struct lm_info_dsbt): ... this. Extend lm_info_base.
1328 (struct dsbt_info) <main_executable_lm_info): Adjust.
1329 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
1330 dsbt_relocate_section_addresses): Adjust.
1331 * solib-frv.c (struct lm_info): Rename to ...
1332 (struct lm_info_frv): ... this. Extend lm_info_base.
1333 (main_executable_lm_info): Adjust.
1334 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
1335 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
1336 find_canonical_descriptor_in_load_object,
1337 frv_fdpic_find_canonical_descriptor): Adjust.
1338 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
1339 to lm_info_svr4.
1340 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
1341 svr4_clear_so, svr4_copy_library_list,
1342 library_list_start_library, svr4_default_sos, svr4_read_so_list,
1343 svr4_current_sos, svr4_fetch_objfile_link_map,
1344 solist_update_incremental): Adjust.
1345 * solib-svr4.h (struct lm_info_svr4): Move here from
1346 solib-svr4.c.
1347 * solib-target.c (struct lm_info): Rename to ...
1348 (struct lm_info_target): ... this. Extend lm_info_base.
1349 (lm_info_p): Rename to ...
1350 (lm_info_target_p): ... this.
1351 (solib_target_parse_libraries, library_list_start_segment,
1352 library_list_start_section, library_list_start_library,
1353 library_list_end_library, solib_target_free_library_list,
1354 solib_target_current_sos, solib_target_free_so,
1355 solib_target_relocate_section_addresses): Adjust.
1356 * windows-nat.c (struct lm_info): Rename to ...
1357 (struct lm_info_windows): ... this. Extend lm_info_base.
1358 (windows_make_so, handle_load_dll, handle_unload_dll,
1359 windows_xfer_shared_libraries): Adjust.
1360
1361 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1362
1363 * solib-darwin.c (struct darwin_so_list): Remove.
1364 (darwin_current_sos): Allocate an so_list object instead of a
1365 darwin_so_list, separately allocate an lm_info object.
1366 (darwin_free_so): Free lm_info.
1367
1368 2017-04-28 John Baldwin <jhb@FreeBSD.org>
1369
1370 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
1371 with fprintf_filtered.
1372
1373 2017-04-28 Yao Qi <yao.qi@linaro.org>
1374
1375 * regcache.c (regcache::regcache): New function.
1376 (regcache::~regcache): New function.
1377 (regcache_xmalloc_1): Remove.
1378 (regcache_xmalloc): Call new regcache.
1379 (regcache_xfree): Call delete regcache.
1380 (get_thread_arch_aspace_regcache): Call new regcache.
1381
1382 2017-04-28 Yao Qi <yao.qi@linaro.org>
1383
1384 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
1385 lwp instead of ptid_get_lwp.
1386
1387 2017-04-28 Yao Qi <yao.qi@linaro.org>
1388
1389 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
1390 lwp_info instead of getting from inferior_ptid.
1391
1392 2017-04-27 Keith Seitz <keiths@redhat.com>
1393
1394 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
1395 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
1396 (CV_CONVERSION_BADNESS): Define.
1397 (rank_one_type): Remove overly restrictive rvalue reference
1398 rank checks.
1399 Add cv-qualifier checks and subranks for type equality.
1400 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
1401 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
1402 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
1403
1404 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
1405
1406 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
1407 count when creating the object.
1408
1409 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1410 Ulrich Weigand <uweigand@de.ibm.com>
1411
1412 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
1413 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
1414 is used in AIX.
1415 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
1416 (process_xcoff_symbol): Likewise.
1417 (scan_xcoff_symtab): Likewise.
1418
1419 2017-04-26 Alan Hayward <alan.hayward@arm.com>
1420
1421 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
1422 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
1423 (ia64_access_reg): Use get_frame_register_unsigned.
1424 (ia64_access_rse_reg): Likewise.
1425 (ia64_libunwind_frame_prev_register): Likewise.
1426
1427 2017-04-26 Jiong Wang <jiong.wang@arm.com>
1428
1429 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
1430 * gdbarch.c: Regenerated.
1431 * gdbarch.h: Regenerated.
1432 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
1433 visibility external.
1434 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
1435 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
1436 (enum cfa_how_kind): Move to ...
1437 (struct dwarf2_frame_state_reg_info): Likewise.
1438 (struct dwarf2_frame_state): Likewise.
1439 * dwarf2-frame.h: ... here.
1440 (dwarf2_frame_state_alloc_regs): New declaration.
1441 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
1442 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
1443
1444 2017-04-26 Alan Hayward <alan.hayward@arm.com>
1445
1446 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
1447 regcache_raw_read_unsigned.
1448 (xtensa_pseudo_register_write): Likewise.
1449
1450 2017-04-26 Alan Hayward <alan.hayward@arm.com>
1451
1452 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
1453 (nds32_pseudo_register_write): Likewise.
1454
1455 2017-04-25 Yao Qi <yao.qi@linaro.org>
1456
1457 * regcache.c (struct regcache) <readonly_p>: Change its type
1458 to bool.
1459 (regcache_xmalloc_1): Update parameter type and callers update.
1460
1461 2017-04-25 Yao Qi <yao.qi@linaro.org>
1462
1463 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
1464 set_gdbarch_wchar_bit.
1465 * arm-tdep.c (arm_gdbarch_init): Likewise.
1466
1467 2017-04-25 Pedro Alves <palves@redhat.com>
1468
1469 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
1470 (BothAreRelocatable, memcopy, memmove): Don't define.
1471 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
1472 macros.
1473
1474 2017-04-25 Pedro Alves <palves@redhat.com>
1475
1476 * common/common-defs.h: Include "common/poison.h".
1477 * common/function-view.h: (Not, Or, Requires): Move to traits.h
1478 and adjust.
1479 * common/poison.h: New file.
1480 * common/traits.h: Include <type_traits>.
1481 (Not, Or, Requires): New, moved from common/function-view.h.
1482
1483 2017-04-25 Pedro Alves <palves@redhat.com>
1484
1485 * breakpoint.h (struct breakpoint): In-class initialize all
1486 fields. Make boolean fields "bool".
1487 * breakpoint.c (init_raw_breakpoint_without_location): Remove
1488 memset call and initializations no longer necessary.
1489
1490 2017-04-25 Pedro Alves <palves@redhat.com>
1491
1492 * btrace.c (pt_btrace_insn_flags): Change parameter type to
1493 reference.
1494 (pt_btrace_insn): New function.
1495 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
1496
1497 2017-04-25 Pedro Alves <palves@redhat.com>
1498
1499 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
1500 "base" field and inherit from "bp_location" instead. Add
1501 non-default ctor.
1502 (allocate_location_exception): Use new non-default ctor.
1503 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
1504 (init_bp_location): Convert to ...
1505 (bp_location::bp_location): ... this new ctor, and remove memset
1506 call.
1507 (base_breakpoint_allocate_location): Use the new non-default ctor.
1508 * breakpoint.h (bp_location): Now a class. Declare default and
1509 non-default ctors. In-class initialize all members.
1510 (init_bp_location): Remove declaration.
1511
1512 2017-04-25 Pedro Alves <palves@redhat.com>
1513
1514 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
1515 assignment operator.
1516
1517 2017-04-24 Yao Qi <yao.qi@linaro.org>
1518
1519 * doublest.c (convert_doublest_to_floatformat): Call
1520 floatformat_totalsize_bytes.
1521
1522 2017-04-22 Tom Tromey <tom@tromey.com>
1523
1524 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1525 ui_out_emit_list.
1526 * stack.c (print_frame): Use ui_out_emit_list.
1527 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
1528 ui_out_emit_list.
1529 * mi/mi-main.c (print_one_inferior)
1530 (mi_cmd_data_list_register_names)
1531 (mi_cmd_data_list_register_values, mi_cmd_list_features)
1532 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
1533 ui_out_emit_list.
1534 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
1535 (mi_output_solib_attribs): Use ui_out_emit_list,
1536 ui_out_emit_tuple.
1537 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
1538 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
1539 (mi_cmd_stack_list_args, list_args_or_locals): Use
1540 ui_out_emit_list.
1541 * disasm.c (do_assembly_only): Use ui_out_emit_list.
1542 * breakpoint.c (print_solib_event, output_thread_groups): Use
1543 ui_out_emit_list.
1544
1545 2017-04-22 Tom Tromey <tom@tromey.com>
1546
1547 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
1548 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
1549 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
1550
1551 2017-04-22 Tom Tromey <tom@tromey.com>
1552
1553 * tracepoint.c (tvariables_info_1)
1554 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
1555
1556 2017-04-22 Tom Tromey <tom@tromey.com>
1557
1558 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
1559 annotate_arg_emitter.
1560 * breakpoint.c (print_mention_watchpoint)
1561 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
1562 * annotate.h (struct annotate_arg_emitter): New.
1563
1564 2017-04-22 Tom Tromey <tom@tromey.com>
1565
1566 * record-btrace.c (record_btrace_insn_history)
1567 (record_btrace_insn_history_range, record_btrace_call_history)
1568 (record_btrace_call_history_range): Use ui_out_emit_tuple.
1569 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
1570 ui_out_emit_tuple.
1571 * stack.c (print_frame_info): Use ui_out_emit_tuple.
1572 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
1573 * skip.c (skip_info): Use ui_out_emit_tuple.
1574 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
1575 * progspace.c (print_program_space): Use ui_out_emit_tuple.
1576 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
1577 * osdata.c (info_osdata): Use ui_out_emit_tuple.
1578 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
1579 ui_out_emit_tuple.
1580 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
1581 (output_register, mi_cmd_data_read_memory)
1582 (mi_cmd_data_read_memory_bytes, mi_load_progress)
1583 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
1584 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
1585 Use ui_out_emit_tuple.
1586 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
1587 ui_out_emit_tuple.
1588 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
1589 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
1590 * linux-thread-db.c (info_auto_load_libthread_db): Use
1591 ui_out_emit_tuple.
1592 * inferior.c (print_inferior): Use ui_out_emit_tuple.
1593 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
1594 * disasm.c (do_mixed_source_and_assembly_deprecated)
1595 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
1596 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
1597 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
1598 * breakpoint.c (print_one_breakpoint_location)
1599 (print_one_breakpoint): Use ui_out_emit_tuple.
1600 * auto-load.c (print_script, info_auto_load_cmd): Use
1601 ui_out_emit_tuple.
1602 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
1603
1604 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
1605
1606 * thread.c (print_thread_info_1): Remove dead code.
1607
1608 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1609
1610 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
1611 GDB_SELF_TEST.
1612 * arm-tdep.c (selftests::arm_record_test): Likewise.
1613
1614 2017-04-21 Yao Qi <yao.qi@linaro.org>
1615
1616 * regcache.c (regcache_restore): Remove argument 2. Replace
1617 argument 3 with regcache. Get register status from
1618 src->register_status and get register contents from
1619 register_buffer (src, regnum).
1620 (regcache_cpy): Update.
1621
1622 2017-04-19 Pedro Alves <palves@redhat.com>
1623
1624 * gdbthread.h (thread): Add missing closing parenthesis in
1625 comment.
1626
1627 2017-04-19 Pedro Alves <palves@redhat.com>
1628
1629 * common/refcounted-object.h: New file.
1630 * gdbthread.h: Include "common/refcounted-object.h".
1631 (thread_info): Inherit from refcounted_object and add comments.
1632 (thread_info::incref, thread_info::decref)
1633 (thread_info::m_refcount): Delete.
1634 (thread_info::deletable): Use the refcounted_object::refcount()
1635 method.
1636 * inferior.c (current_inferior_): Add comment.
1637 (set_current_inferior): Increment/decrement refcounts.
1638 (prune_inferiors, remove_inferior_command): Skip inferiors marked
1639 not-deletable instead of comparing with the current inferior.
1640 (initialize_inferiors): Increment the initial inferior's refcount.
1641 * inferior.h (struct inferior): Forward declare.
1642 Include "common/refcounted-object.h".
1643 (current_inferior, set_current_inferior): Move declaration to
1644 before struct inferior's definition, and fix comment.
1645 (inferior): Inherit from refcounted_object. Add comments.
1646 * thread.c (switch_to_thread_no_regs): Reference the thread's
1647 inferior pointer directly instead of doing a ptid lookup.
1648 (switch_to_no_thread): New function.
1649 (switch_to_thread(thread_info *)): New function, factored out
1650 from ...
1651 (switch_to_thread(ptid_t)): ... this.
1652 (restore_current_thread): Delete.
1653 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
1654 fields, and add 'inf' field.
1655 (do_restore_current_thread_cleanup): Check whether old->inf is
1656 alive instead of looking up an inferior by ptid. Use
1657 switch_to_thread and switch_to_no_thread.
1658 (restore_current_thread_cleanup_dtor): Use old->inf directly
1659 instead of lookup up an inferior by id. Decref the inferior.
1660 Don't restore 'removable'.
1661 (make_cleanup_restore_current_thread): Same the inferior pointer
1662 in old, instead of the inferior number. Incref the inferior.
1663 Don't save/clear 'removable'.
1664
1665 2017-04-19 Pedro Alves <palves@redhat.com>
1666
1667 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1668 unittests/scoped_restore-selftests.c.
1669 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
1670 * common/scoped_restore.h (scoped_restore_base): Make "class".
1671 (scoped_restore_base::release): New public method.
1672 (scoped_restore_base::scoped_restore_base): New protected ctor.
1673 (scoped_restore_base::m_saved_var): New protected field.
1674 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
1675 scoped_restore_base base class instead of m_saved_var directly.
1676 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
1677 (scoped_restore_tmpl::scoped_restore_tmpl(const
1678 scoped_restore_tmpl<T>&)): Likewise.
1679 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
1680 method.
1681 (scoped_restore_tmpl::saved_var): New method.
1682 (scoped_restore_tmpl::m_saved_var): Delete.
1683 * inferior.h (inferior::detaching): Now a bool.
1684 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
1685 cleanup.
1686 * unittests/scoped_restore-selftests.c: New file.
1687
1688 2017-04-19 Pedro Alves <palves@redhat.com>
1689
1690 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
1691 Re-sort in alphabetic order.
1692
1693 2017-04-18 Pedro Alves <palves@redhat.com>
1694
1695 * xml-support.c (obstack_xml_printf): Delete.
1696 * xml-support.h (obstack_xml_printf): Delete.
1697
1698 2017-04-18 Pedro Alves <palves@redhat.com>
1699
1700 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
1701 vdebug, verror, body_text, start_element, end_element, name,
1702 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
1703 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
1704 is_xinclude>: Make private and add m_ prefix.
1705 (gdb_xml_parser::body_text): New method, based on ...
1706 (gdb_xml_body_text): ... this. Adjust.
1707 (gdb_xml_parser::vdebug): New method, based on ...
1708 (gdb_xml_debug): ... this. Adjust.
1709 (gdb_xml_parser::verror): New method, based on ...
1710 (gdb_xml_error): ... this. Adjust.
1711 (gdb_xml_parser::start_element): New method, based on ...
1712 (gdb_xml_start_element): ... this. Adjust.
1713 (gdb_xml_start_element_wrapper): Defer to
1714 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
1715 (gdb_xml_parser::end_element): New method, based on ...
1716 (gdb_xml_end_element_wrapper): ... this. Adjust.
1717 (gdb_xml_parser::~gdb_xml_parser): Adjust.
1718 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
1719 (gdb_xml_parser::use_dtd): New method, based on ...
1720 (gdb_xml_use_dtd): ... this. Adjust.
1721 (gdb_xml_parser::parse): New method, based on ...
1722 (gdb_xml_parse): ... this. Adjust.
1723 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
1724 (xinclude_start_include): Adjust to call the parser's name method.
1725 (xml_xinclude_default, xml_xinclude_start_doctype)
1726 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
1727 method.
1728 (xml_process_xincludes): Adjust to call parser methods.
1729 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
1730 declarations.
1731
1732 2017-04-18 Pedro Alves <palves@redhat.com>
1733
1734 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
1735 gdb::optional<std::string>.
1736 * xml-support.c: Include <string>.
1737 (scope_level::scope_level(scope_level &&))
1738 (scope_level::~scope_level): Delete.
1739 (scope_level::body): Now a std::string.
1740 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
1741 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
1742 parameter.
1743 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
1744 (xinclude_parsing_data::output): Now a std::string reference.
1745 (xinclude_start_include): Adjust.
1746 (xml_xinclude_default): Adjust.
1747 (xml_process_xincludes): Add 'output' parameter, and return bool.
1748 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
1749 and return bool.
1750 * xml-tdesc.c: Include <unordered_map> and <string>.
1751 (tdesc_xml_cache): Delete.
1752 (tdesc_xml_cache_s): Delete.
1753 (xml_cache): Now an std::unordered_map.
1754 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
1755 (target_fetch_description_xml): Change return type to
1756 gdb::optional<std::string>, and adjust.
1757 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
1758 (target_fetch_description_xml): Change return type to
1759 gdb::optional<std::string>.
1760
1761 2017-04-18 Pedro Alves <palves@redhat.com>
1762
1763 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1764 unittests/optional-selftests.c.
1765 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
1766 * unittests/optional-selftests.c: New file.
1767 * unittests/optional/assignment/1.cc: New file.
1768 * unittests/optional/assignment/2.cc: New file.
1769 * unittests/optional/assignment/3.cc: New file.
1770 * unittests/optional/assignment/4.cc: New file.
1771 * unittests/optional/assignment/5.cc: New file.
1772 * unittests/optional/assignment/6.cc: New file.
1773 * unittests/optional/assignment/7.cc: New file.
1774 * unittests/optional/cons/copy.cc: New file.
1775 * unittests/optional/cons/default.cc: New file.
1776 * unittests/optional/cons/move.cc: New file.
1777 * unittests/optional/cons/value.cc: New file.
1778 * unittests/optional/in_place.cc: New file.
1779 * unittests/optional/observers/1.cc: New file.
1780 * unittests/optional/observers/2.cc: New file.
1781
1782 2017-04-18 Pedro Alves <palves@redhat.com>
1783
1784 * common/gdb_optional.h: Include common/traits.h.
1785 (in_place_t): New type.
1786 (in_place): New constexpr variable.
1787 (optional::optional): Remove member initialization of
1788 m_instantiated.
1789 (optional::optional(in_place_t...)): New constructor.
1790 (optional::~optional): Use reset.
1791 (optional::optional(const optional&)): New.
1792 (optional::optional(const optional&&)): New.
1793 (optional::optional(T &)): New.
1794 (optional::optional(T &&)): New.
1795 (operator::operator=(const optional &)): New.
1796 (operator::operator=(optional &&)): New.
1797 (operator::operator= (const T &))
1798 (operator::operator= (T &&))
1799 (operator::emplace (Args &&... args)): Return a T&. Use reset.
1800 (operator::reset): New.
1801 (operator::m_instantiated):: Add in-class initializer.
1802 * common/traits.h: Include <type_traits>.
1803 (struct And): New types.
1804
1805 2017-04-18 Pedro Alves <palves@redhat.com>
1806
1807 * xml-support.c: Include <vector>.
1808 (scope_level::scope_level(const gdb_xml_element *))
1809 (scope_level::scope_level(scope_level&&)): New.
1810 (scope_level::~scope_level): New.
1811 (scope_level_s): Delete.
1812 (gdb_xml_parser::scopes): Now a std::vector.
1813 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
1814 Use std::vector.
1815 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
1816 scope cleanup code.
1817 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
1818 of the scopes member. Use std::vector::emplace_back.
1819
1820 2017-04-18 Pedro Alves <palves@redhat.com>
1821
1822 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
1823 a bool.
1824 (gdb_xml_end_element): Change type of first parameter.
1825 (gdb_xml_cleanup): Rename to ...
1826 (gdb_xml_parser::~gdb_xml_parser): ... this.
1827 (gdb_xml_create_parser_and_cleanup): Delete with ...
1828 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
1829 to this new ctor.
1830 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
1831 using gdb_xml_create_parser_and_cleanup.
1832 (xinclude_parsing_data): Add ctor/dtor.
1833 (xml_xinclude_cleanup): Delete.
1834 (xml_process_xincludes): Create a local xinclude_parsing_data
1835 instead of heap-allocating one. Create a local gdb_xml_parser
1836 instead of heap-allocating one with
1837 gdb_xml_create_parser_and_cleanup.
1838
1839 2017-04-18 John Baldwin <jhb@FreeBSD.org>
1840
1841 PR threads/20743
1842 * fbsd-nat.c (resume_one_thread_cb): Remove.
1843 (resume_all_threads_cb): Remove.
1844 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
1845 iterate_over_threads.
1846
1847 2017-04-17 Joel Brobecker <brobecker@adacore.com>
1848
1849 * NEWS: Create a new section for the next release branch.
1850 Rename the section of the current branch, now that it has
1851 been cut.
1852
1853 2017-04-17 Joel Brobecker <brobecker@adacore.com>
1854
1855 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
1856 * version.in: Bump version to 8.0.50.DATE-git.
1857
1858 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
1859
1860 PR gdb/21385
1861 * windows-nat.c (windows_create_inferior): Declare 'allargs'
1862 independently of the host, and fix build breakage on Cygwin.
1863
1864 2017-04-13 Pedro Alves <palves@redhat.com>
1865
1866 * inferior.c (free_inferior): Convert to ...
1867 (inferior::~inferior): ... this dtor.
1868 (inferior::inferior): New ctor, factored out from ...
1869 (add_inferior_silent): ... here. Allocate the inferior with a new
1870 expression.
1871 (delete_inferior): Call delete instead of free_inferior.
1872 * inferior.h (gdb_environ, continuation): Forward declare.
1873 (inferior): Now a class. Add in-class initialization to all
1874 members. Make boolean fields bool, except 'detaching'.
1875 (inferior::inferior): New explicit ctor.
1876 (inferior::~inferior): New.
1877
1878 2017-04-13 Pedro Alves <palves@redhat.com>
1879
1880 * inferior.c (init_inferior_list): Delete.
1881 * inferior.h (init_inferior_list): Delete.
1882
1883 2017-04-13 Pedro Alves <palves@redhat.com>
1884
1885 PR threads/13217
1886 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
1887 (top level): Call it twice, with different thread sets.
1888
1889 2017-04-13 Pedro Alves <palves@redhat.com>
1890
1891 * thread.c: Include <algorithm>.
1892 (thread_array_cleanup): Delete.
1893 (scoped_inc_dec_ref): New class.
1894 (live_threads_count): New function.
1895 (set_thread_refcount): Delete.
1896 (tp_array_compar_ascending): Now a bool.
1897 (tp_array_compar): Convert to a std::sort comparison function.
1898 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
1899 and live_threads_count.
1900
1901 2017-04-13 Pedro Alves <palves@redhat.com>
1902
1903 * infrun.c (follow_fork_inferior): Also switch the current
1904 inferior.
1905
1906 2017-04-13 Pedro Alves <palves@redhat.com>
1907
1908 * breakpoint.c (watch_command_1): Save watchpoint-frame info
1909 before calling create_internal_breakpoint.
1910
1911 2017-04-13 Pedro Alves <palves@redhat.com>
1912
1913 * fork-child.c (execv_argv): New class.
1914 (breakup_args): Refactored as ...
1915 (execv_argv::init_for_no_shell): .. this method of execv_argv.
1916 Copy arguments to storage and replace separators with NULL
1917 terminators in place.
1918 (escape_bang_in_quoted_argument): Adjust to return bool.
1919 (execv_argv::execv_argv): New ctor.
1920 (execv_argv::init_for_shell): New method, factored out from
1921 fork_inferior. Don't strdup strings into the vector.
1922 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
1923 Remove free_vector_argv call.
1924
1925 2017-04-13 Yao Qi <yao.qi@linaro.org>
1926
1927 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
1928 tdep->rx_psw_type.
1929
1930 2017-04-13 Yao Qi <yao.qi@linaro.org>
1931
1932 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
1933 * rx-tdep.c (rx_gdbarch_init): Likewise.
1934
1935 2017-04-13 Pedro Alves <palves@redhat.com>
1936
1937 * breakpoint.h (struct breakpoint): Reindent.
1938
1939 2017-04-13 Pedro Alves <palves@redhat.com>
1940
1941 * breakpoint.c (bp_location): Rename to ...
1942 (bp_locations): ... this. All references updated.
1943 (bp_location_count): Rename to ...
1944 (bp_locations_count): ... this. All references updated.
1945 (bp_location_placed_address_before_address_max): Rename to ...
1946 (bp_locations_placed_address_before_address_max): ... this. All
1947 references updated.
1948 (bp_location_shadow_len_after_address_max): Rename to ...
1949 (bp_locations_shadow_len_after_address_max): ... this. All
1950 references updated.
1951 (bp_location_compare_addrs): Rename to ...
1952 (bp_locations_compare_addrs): ... this. All references updated.
1953 (bp_location_compare):Rename to ...
1954 (bp_locations_compare): ... this. All references updated.
1955 (bp_location_target_extensions_update): Rename to ...
1956 (bp_locations_target_extensions_update): ... this. All references
1957 updated.
1958
1959 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1960
1961 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
1962 * common/common.m4: Check headers 'termios.h', 'termio.h' and
1963 'sgtty.h'.
1964 * common/gdb_termios.h: New file, with parts of "terminal.h".
1965 * inflow.c: Include "gdb_termios.h".
1966 * ser-unix.c: Include "gdb_termios.h".
1967 * terminal.h: Move terminal-related defines to
1968 "common/gdb_termios.h".
1969
1970 2017-04-12 Tom Tromey <tom@tromey.com>
1971
1972 * probe.c (parse_probes): Update.
1973 * location.h (delete_event_location): Don't declare.
1974 (event_location_deleter::operator()): Update.
1975 * location.c (event_location_deleter::operator()): Rename from
1976 delete_event_location.
1977 * linespec.h (linespec_result) <location>: Change type to
1978 event_location_up.
1979 * linespec.c (canonicalize_linespec, event_location_to_sals)
1980 (decode_objc): Update.
1981 (linespec_result): Don't call delete_event_location.
1982 * breakpoint.c (create_breakpoints_sal)
1983 (bkpt_probe_create_sals_from_location)
1984 (strace_marker_create_sals_from_location): Update.
1985
1986 2017-04-12 Tom Tromey <tom@tromey.com>
1987
1988 * linespec.h (struct linespec_result): Add constructor and
1989 destructor.
1990 (init_linespec_result, destroy_linespec_result)
1991 (make_cleanup_destroy_linespec_result): Don't declare.
1992 * linespec.c (init_linespec_result): Remove.
1993 (linespec_result::~linespec_result): Rename from
1994 destroy_linespec_result. Update.
1995 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
1996 Remove.
1997 * breakpoint.c (create_breakpoint, break_range_command)
1998 (decode_location_default): Update.
1999 * ax-gdb.c (agent_command_1): Update.
2000
2001 2017-04-12 Tom Tromey <tom@tromey.com>
2002
2003 * remote.c (remote_download_tracepoint): Update.
2004 * python/py-breakpoint.c (bppy_get_location): Update.
2005 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
2006 (gdbscm_breakpoint_location): Update.
2007 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
2008 * breakpoint.h (struct breakpoint) <location, location_range_end>:
2009 Change type to event_location_up.
2010 * breakpoint.c (create_overlay_event_breakpoint)
2011 (create_longjmp_master_breakpoint)
2012 (create_std_terminate_master_breakpoint)
2013 (create_exception_master_breakpoint)
2014 (breakpoint_event_location_empty_p, print_breakpoint_location)
2015 (print_one_breakpoint_location, create_thread_event_breakpoint)
2016 (init_breakpoint_sal, create_breakpoint)
2017 (print_recreate_ranged_breakpoint, break_range_command)
2018 (init_ada_exception_breakpoint, say_where): Update.
2019 (base_breakpoint_dtor): Don't call delete_event_location.
2020 (bkpt_print_recreate, tracepoint_print_recreate)
2021 (dprintf_print_recreate, update_static_tracepoint)
2022 (breakpoint_re_set_default): Update.
2023
2024 2017-04-12 Tom Tromey <tom@tromey.com>
2025
2026 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2027 type of "to_do". Update.
2028 (compute_stack_depth): Use std::vector.
2029
2030 2017-04-12 Tom Tromey <tom@tromey.com>
2031
2032 * printcmd.c (find_instruction_backward): Use std::vector.
2033
2034 2017-04-12 Tom Tromey <tom@tromey.com>
2035
2036 * symfile.c (objfilep): Remove typedef.
2037 (reread_symbols): Use a std::vector.
2038
2039 2017-04-12 Tom Tromey <tom@tromey.com>
2040
2041 * mi/mi-main.c (exec_direction_forward): Remove.
2042 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
2043 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2044 scoped_restore.
2045 * guile/guile.c (guile_repl_command, guile_command)
2046 (gdbscm_execute_gdb_command): Use scoped_restore.
2047 * go-exp.y (go_parse): Use scoped_restore.
2048 * d-exp.y (d_parse): Use scoped_restore.
2049 * cli/cli-decode.c (cmd_func): Use scoped_restore.
2050 * c-exp.y (c_parse): Use scoped_restore.
2051
2052 2017-04-12 Tom Tromey <tom@tromey.com>
2053
2054 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
2055 (mi_parse): Update return type.
2056 (mi_parse_free): Remove.
2057 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
2058 (mi_parse::~mi_parse): Rename from mi_parse_free.
2059 (mi_parse_cleanup): Remove.
2060 (mi_parse): Return a unique_ptr. Use new.
2061 * mi/mi-main.c (mi_execute_command): Update.
2062
2063 2017-04-12 Tom Tromey <tom@tromey.com>
2064
2065 * location.c (explicit_location_lex_one): Return a
2066 unique_xmalloc_ptr.
2067 (string_to_explicit_location): Update. Remove cleanups.
2068
2069 2017-04-12 Tom Tromey <tom@tromey.com>
2070
2071 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
2072 (compare_value_and_voffset): Change type. Update.
2073 (compute_vtable_size): Change type of "offset_vec".
2074 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
2075 (gnuv3_get_typeid): Remove extraneous declaration.
2076
2077 2017-04-12 Tom Tromey <tom@tromey.com>
2078
2079 * charset.h (wchar_iterator): Fix comment.
2080
2081 2017-04-12 Tom Tromey <tom@tromey.com>
2082
2083 * charset.c (iconv_wrapper): New class.
2084 (cleanup_iconv): Remove.
2085 (convert_between_encodings): Use it.
2086
2087 2017-04-12 Tom Tromey <tom@tromey.com>
2088
2089 * symfile.h (increment_reading_symtab): Update type.
2090 * symfile.c (decrement_reading_symtab): Remove.
2091 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
2092 * psymtab.c (psymtab_to_symtab): Update.
2093 * dwarf2read.c (dw2_instantiate_symtab): Update.
2094
2095 2017-04-12 Tom Tromey <tom@tromey.com>
2096
2097 * jit.c (struct jit_reader): Declare separately. Add constructor
2098 and destructor. Change type of "handle".
2099 (loaded_jit_reader): Define separately.
2100 (jit_reader_load): Update. New "new".
2101 (jit_reader_unload_command): Use "delete".
2102 * gdb-dlfcn.h (struct dlclose_deleter): New.
2103 (gdb_dlhandle_up): New typedef.
2104 (gdb_dlopen, gdb_dlsym): Update types.
2105 (gdb_dlclose): Remove.
2106 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
2107 (gdb_dlsym): Change type of "handle".
2108 (make_cleanup_dlclose): Remove.
2109 (dlclose_deleter::operator()): Rename from gdb_dlclose.
2110 * compile/compile-c-support.c (load_libcc): Update.
2111
2112 2017-04-12 Tom Tromey <tom@tromey.com>
2113
2114 * symtab.h (find_pcs_for_symtab_line): Change return type.
2115 * symtab.c (find_pcs_for_symtab_line): Change return type.
2116 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
2117 type of "vec". Update.
2118 (ltpy_get_pcs_for_line): Update.
2119 * linespec.c (decode_digits_ordinary): Update.
2120
2121 2017-04-12 Tom Tromey <tom@tromey.com>
2122
2123 * tracepoint.c (actions_command): Update.
2124 * python/python.c (python_command, python_interactive_command):
2125 Update.
2126 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2127 * guile/guile.c (guile_command): Update.
2128 * defs.h (read_command_lines, read_command_lines_1): Return
2129 command_line_up.
2130 (command_lines_deleter): New struct.
2131 (command_line_up): New typedef.
2132 * compile/compile.c (compile_code_command)
2133 (compile_print_command): Update.
2134 * cli/cli-script.h (get_command_line, copy_command_lines): Return
2135 command_line_up.
2136 (make_cleanup_free_command_lines): Remove.
2137 * cli/cli-script.c (get_command_line, read_command_lines_1)
2138 (copy_command_lines): Return command_line_up.
2139 (while_command, if_command, read_command_lines, define_command)
2140 (document_command): Update.
2141 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
2142 Remove.
2143 * breakpoint.h (breakpoint_set_commands): Change type of
2144 "commands".
2145 * breakpoint.c (breakpoint_set_commands): Change type of
2146 "commands". Update.
2147 (do_map_commands_command, update_dprintf_command_list)
2148 (create_tracepoint_from_upload): Update.
2149
2150 2017-04-12 Tom Tromey <tom@tromey.com>
2151
2152 * tracepoint.c (scope_info): Update.
2153 * spu-tdep.c (spu_catch_start): Update.
2154 * python/python.c (gdbpy_decode_line): Update.
2155 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
2156 * python/py-breakpoint.c (bppy_init): Update.
2157 * probe.c (parse_probes): Update.
2158 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
2159 * location.h (event_location_deleter): New struct.
2160 (event_location_up): New typedef.
2161 (new_linespec_location, new_address_location, new_probe_location)
2162 (new_explicit_location, copy_event_location)
2163 (string_to_event_location, string_to_event_location_basic)
2164 (string_to_explicit_location): Update return type.
2165 (make_cleanup_delete_event_location): Remove.
2166 * location.c (new_linespec_location, new_address_location)
2167 (new_probe_location, new_explicit_location, copy_event_location):
2168 Return event_location_up.
2169 (delete_event_location_cleanup)
2170 (make_cleanup_delete_event_location): Remove.
2171 (string_to_explicit_location, string_to_event_location_basic)
2172 (string_to_event_location): Return event_location_up.
2173 * linespec.c (canonicalize_linespec, event_location_to_sals)
2174 (decode_line_with_current_source)
2175 (decode_line_with_last_displayed, decode_objc): Update.
2176 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
2177 * completer.c (location_completer): Update.
2178 * cli/cli-cmds.c (edit_command, list_command): Update.
2179 * breakpoint.c (create_overlay_event_breakpoint)
2180 (create_longjmp_master_breakpoint)
2181 (create_std_terminate_master_breakpoint)
2182 (create_exception_master_breakpoint)
2183 (create_thread_event_breakpoint): Update.
2184 (init_breakpoint_sal): Update. Remove some dead code.
2185 (create_breakpoint_sal): Change type of "location". Update.
2186 (create_breakpoints_sal, create_breakpoint, break_command_1)
2187 (dprintf_command, break_range_command, until_break_command)
2188 (init_ada_exception_breakpoint)
2189 (strace_marker_create_sals_from_location)
2190 (update_static_tracepoint, trace_command, ftrace_command)
2191 (strace_command, create_tracepoint_from_upload): Update.
2192 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2193 * ax-gdb.c (agent_command_1): Update.
2194
2195 2017-04-12 Pedro Alves <palves@redhat.com>
2196
2197 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
2198 * configure.tgt: Handle i[34567]86-*-go32* and
2199 i[34567]86-*-msdosdjgpp*.
2200 * i386-tdep.c (i386_svr4_reg_to_regnum):
2201 Make extern.
2202 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
2203 i386-go32-tdep.c.
2204 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
2205 * i386-go32-tdep.c: New file.
2206 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
2207 declarations.
2208
2209 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
2210
2211 * aix-thread.c (pd_status2str): Change return type to const char *.
2212
2213 2017-04-12 Pedro Alves <palves@redhat.com>
2214
2215 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
2216 calls to set_gdbarch_gnu_triplet_regexp.
2217
2218 2017-04-12 Pedro Alves <palves@redhat.com>
2219
2220 PR gdb/21323
2221 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
2222 New enum value.
2223 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
2224 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
2225 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
2226 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
2227 * gdbarch.h, gdbarch.c: Regenerate.
2228 * aarch64-tdep.c (aarch64_gdbarch_init): Override
2229 gdbarch_wchar_bit and gdbarch_wchar_signed.
2230 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
2231 * arm-tdep.c (arm_gdbarch_init): Likewise.
2232 * avr-tdep.c (avr_gdbarch_init): Likewise.
2233 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
2234 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
2235 * i386-tdep.c (i386_go32_init_abi): Likewise.
2236 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2237 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2238 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2239 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
2240 * sh-tdep.c (sh_gdbarch_init): Likewise.
2241 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2242 * sparc64-tdep.c (sparc64_init_abi): Likewise.
2243 * windows-tdep.c (windows_init_abi): Likewise.
2244 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
2245
2246 2017-04-12 Pedro Alves <palves@redhat.com>
2247
2248 PR c++/21323
2249 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
2250 cplus_primitive_type_char32_t>: New enum values.
2251 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
2252 and cplus_primitive_type_char32_t.
2253 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
2254 32, use the archtecture's built-in type for char16_t and char32_t,
2255 respectively. Otherwise, fallback to init_integer_type as before,
2256 but make the type unsigned, and issue a complaint.
2257 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
2258
2259 2017-04-12 Alan Hayward <alan.hayward@arm.com>
2260
2261 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
2262 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
2263
2264 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2265
2266 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
2267 'const char *'.
2268
2269 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2270
2271 * common/common-utils.c (free_vector_argv): New function.
2272 * common/common-utils.h: Include <vector>.
2273 (free_vector_argv): New prototype.
2274 * darwin-nat.c (darwin_create_inferior): Rewrite function
2275 prototype in order to constify "exec_file" and accept a
2276 "std::string" for "allargs".
2277 * fork-child.c: Include <vector>.
2278 (breakup_args): Rewrite function, using C++.
2279 (fork_inferior): Rewrite function header, constify "exec_file_arg"
2280 and accept "std::string" for "allargs". Update the code to
2281 calculate "argv" based on "allargs". Update calls to "exec_fun"
2282 and "execvp".
2283 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
2284 order to constify "exec_file" and accept a "std::string" for
2285 "allargs".
2286 * go32-nat.c (go32_create_inferior): Likewise.
2287 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
2288 * infcmd.c (run_command_1): Constify "exec_file". Use
2289 "std::string" for inferior arguments.
2290 * inferior.h (fork_inferior): Update prototype.
2291 * linux-nat.c (linux_nat_create_inferior): Rewrite function
2292 prototype in order to constify "exec_file" and accept a
2293 "std::string" for "allargs".
2294 * nto-procfs.c (procfs_create_inferior): Likewise.
2295 * procfs.c (procfs_create_inferior): Likewise.
2296 * remote-sim.c (gdbsim_create_inferior): Likewise.
2297 * remote.c (extended_remote_run): Update code to accept
2298 "std::string" as argument.
2299 (extended_remote_create_inferior): Rewrite function prototype in
2300 order to constify "exec_file" and accept a "std::string" for
2301 "allargs".
2302 * rs6000-nat.c (super_create_inferior): Likewise.
2303 (rs6000_create_inferior): Likewise.
2304 * target.h (struct target_ops) <to_create_inferior>: Likewise.
2305 * windows-nat.c (windows_create_inferior): Likewise.
2306
2307 2017-04-11 Pedro Alves <palves@redhat.com>
2308
2309 * thread.c: Fix whitespace throughout.
2310
2311 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
2312
2313 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
2314
2315 2017-04-11 Alan Hayward <alan.hayward@arm.com>
2316
2317 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
2318
2319 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
2320
2321 PR gdb/21364
2322 * osdata.c (info_osdata): Check if 'type' is an empty string
2323 instead of NULL.
2324
2325 2017-04-10 Pedro Alves <palves@redhat.com>
2326
2327 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
2328 (ptid_to_global_thread_id, in_thread_list)
2329 (do_captured_list_thread_ids, set_resumed, set_running)
2330 (set_executing, set_stop_requested, finish_thread_state)
2331 (validate_registers_access, can_access_registers_ptid)
2332 (print_thread_info_1, switch_to_thread)
2333 (do_restore_current_thread_cleanup)
2334 (make_cleanup_restore_current_thread, thread_command)
2335 (thread_name_command): Use operator== instead of ptid_equal.
2336
2337 2017-04-10 Pedro Alves <palves@redhat.com>
2338
2339 * thread.c (struct current_thread_cleanup) <next>: Delete field.
2340 (current_thread_cleanup_chain): Delete.
2341 (restore_current_thread_cleanup_dtor)
2342 (make_cleanup_restore_current_thread): Remove references to
2343 current_thread_cleanup_chain.
2344
2345 2017-04-10 Alan Hayward <alan.hayward@arm.com>
2346
2347 * msp430-tdep.c (msp430_pseudo_register_read): Never return
2348 REG_UNKNOWN.
2349
2350 2017-04-10 Yao Qi <yao.qi@linaro.org>
2351
2352 PR gdb/19942
2353 * gdbthread.h (thread_info::deletable): New method.
2354 (thread_info::incref): New method.
2355 (thread_info::decref): New method.
2356 (thread_info::refcount): Move it to private.
2357 * infrun.c (save_stop_context): Call inc_refcount.
2358 (release_stop_context_cleanup): Likewise.
2359 * thread.c (set_thread_exited): New function.
2360 (init_thread_list): Delete "tp" only it is deletable, otherwise
2361 call set_thread_exited.
2362 (delete_thread_1): Call set_thread_exited.
2363 (current_thread_cleanup) <inferior_pid>: Remove.
2364 <thread>: New field.
2365 (restore_current_thread_ptid_changed): Removed.
2366 (do_restore_current_thread_cleanup): Adjust.
2367 (restore_current_thread_cleanup_dtor): Don't call
2368 find_thread_ptid.
2369 (set_thread_refcount): Use dec_refcount.
2370 (make_cleanup_restore_current_thread): Adjust.
2371 (thread_apply_all_command): Call inc_refcount.
2372 (_initialize_thread): Don't call
2373 observer_attach_thread_ptid_changed.
2374
2375 2017-04-10 Yao Qi <yao.qi@linaro.org>
2376
2377 * thread.c (delete_thread_1): Hoist code on marking thread as
2378 exited.
2379
2380 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2381
2382 * windows-nat.c (windows_detach): Initialize ptid with
2383 minus_one_ptid.
2384
2385 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
2386
2387 * unittests/ptid-selftests.c: Fix erroneous assert messages.
2388
2389 2017-04-07 Alan Hayward <alan.hayward@arm.com>
2390
2391 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
2392 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
2393 (bfin_pseudo_register_write): Likewise
2394
2395 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 * common/ptid.h (struct ptid): Change to...
2398 (class ptid_t): ... this.
2399 <ptid_t>: New constructors.
2400 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
2401 matches>: New methods.
2402 <make_null, make_minus_one>: New static methods.
2403 <pid>: Rename to...
2404 <m_pid>: ...this.
2405 <lwp>: Rename to...
2406 <m_lwp>: ...this.
2407 <tid>: Rename to...
2408 <m_tid>: ...this.
2409 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
2410 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
2411 as references, move comment to class ptid_t.
2412 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
2413 ptid_t static methods.
2414 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
2415 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
2416 Take ptid arguments as references, implement using ptid_t methods.
2417 * unittests/ptid-selftests.c: New file.
2418 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2419 unittests/ptid-selftests.c.
2420 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
2421
2422 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
2423
2424 * python/python.c (python_run_simple_file): Cast mode literal to
2425 non-const char pointer as expected by PyFile_FromString.
2426
2427 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
2428
2429 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
2430 minus_one_ptid and null_ptid.
2431
2432 2017-04-05 Pedro Alves <palves@redhat.com>
2433
2434 * warning.m4 (build_warnings): Remove -Wno-write-strings.
2435 * configure: Regenerate.
2436
2437 2017-04-05 Pedro Alves <palves@redhat.com>
2438
2439 * ada-exp.y (yyerror): Constify.
2440 * ada-lang.c (bound_name, get_selections)
2441 (ada_variant_discrim_type)
2442 (ada_variant_discrim_name, ada_value_struct_elt)
2443 (ada_lookup_struct_elt_type, is_unchecked_variant)
2444 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
2445 (catch_ada_exception_command_split)
2446 (catch_ada_assert_command_split, catch_assert_command)
2447 (ada_op_name): Constify.
2448 * ada-lang.h (ada_yyerror, get_selections)
2449 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
2450 * arc-tdep.c (arc_print_frame_cache): Constify.
2451 * arm-tdep.c (arm_skip_stub): Constify.
2452 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
2453 (gen_aggregate_elt_ref): Constify.
2454 * bcache.c (print_bcache_statistics): Constify.
2455 * bcache.h (print_bcache_statistics): Constify.
2456 * break-catch-throw.c (catch_exception_command_1):
2457 * breakpoint.c (struct ep_type_description::description):
2458 Constify.
2459 (add_solib_catchpoint): Constify.
2460 (catch_fork_command_1): Add cast.
2461 (add_catch_command): Constify.
2462 * breakpoint.h (add_catch_command, add_solib_catchpoint):
2463 Constify.
2464 * bsd-uthread.c (bsd_uthread_state): Constify.
2465 * buildsym.c (patch_subfile_names): Constify.
2466 * buildsym.h (next_symbol_text_func, patch_subfile_names):
2467 Constify.
2468 * c-exp.y (yyerror): Constify.
2469 (token::oper): Constify.
2470 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
2471 * c-varobj.c (cplus_describe_child): Constify.
2472 * charset.c (find_charset_names): Add cast.
2473 (find_charset_names): Constify array and add const_cast.
2474 * cli/cli-cmds.c (complete_command, cd_command): Constify.
2475 (edit_command): Constify.
2476 * cli/cli-decode.c (lookup_cmd): Constify.
2477 * cli/cli-dump.c (dump_memory_command, dump_value_command):
2478 Constify.
2479 (struct dump_context): Constify.
2480 (add_dump_command, restore_command): Constify.
2481 * cli/cli-script.c (get_command_line): Constify.
2482 * cli/cli-script.h (get_command_line): Constify.
2483 * cli/cli-utils.c (check_for_argument): Constify.
2484 * cli/cli-utils.h (check_for_argument): Constify.
2485 * coff-pe-read.c (struct read_pe_section_data): Constify.
2486 * command.h (lookup_cmd): Constify.
2487 * common/print-utils.c (decimal2str): Constify.
2488 * completer.c (gdb_print_filename): Constify.
2489 * corefile.c (set_gnutarget): Constify.
2490 * cp-name-parser.y (yyerror): Constify.
2491 * cp-valprint.c (cp_print_class_member): Constify.
2492 * cris-tdep.c (cris_register_name, crisv32_register_name):
2493 Constify.
2494 * d-exp.y (yyerror): Constify.
2495 (struct token::oper): Constify.
2496 * d-lang.h (d_yyerror): Constify.
2497 * dbxread.c (struct header_file_location::name): Constify.
2498 (add_old_header_file, add_new_header_file, last_function_name)
2499 (dbx_next_symbol_text, add_bincl_to_list)
2500 (find_corresponding_bincl_psymtab, set_namestring)
2501 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
2502 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
2503 * defs.h (command_line_input, print_address_symbolic)
2504 (deprecated_readline_begin_hook): Constify.
2505 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
2506 Constify.
2507 * event-top.c (handle_line_of_input): Constify and add cast.
2508 * exceptions.c (catch_errors): Constify.
2509 * exceptions.h (catch_errors): Constify.
2510 * expprint.c (print_subexp_standard, op_string, op_name)
2511 (op_name_standard, dump_raw_expression, dump_raw_expression):
2512 * expression.h (op_name, op_string, dump_raw_expression):
2513 Constify.
2514 * f-exp.y (yyerror): Constify.
2515 (struct token::oper): Constify.
2516 (struct f77_boolean_val::name): Constify.
2517 * f-lang.c (f_word_break_characters): Constify.
2518 * f-lang.h (f_yyerror): Constify.
2519 * fork-child.c (fork_inferior): Add cast.
2520 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
2521 (new_variant): Constify.
2522 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
2523 * gdbarch.c: Regenerate.
2524 * gdbcore.h (set_gnutarget): Constify.
2525 * go-exp.y (yyerror): Constify.
2526 (token::oper): Constify.
2527 * go-lang.h (go_yyerror): Constify.
2528 * go32-nat.c (go32_sysinfo): Constify.
2529 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
2530 * guile/scm-cmd.c (cmdscm_function): Constify.
2531 * guile/scm-param.c (pascm_param_value): Constify.
2532 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
2533 (h8300sx_register_name): Constify.
2534 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
2535 Constify.
2536 * ia64-tdep.c (ia64_register_names): Constify.
2537 * infcmd.c (construct_inferior_arguments): Constify.
2538 (path_command, attach_post_wait): Constify.
2539 * language.c (show_range_command, show_case_command)
2540 (unk_lang_error): Constify.
2541 * language.h (language_defn::la_error)
2542 (language_defn::la_name_of_this): Constify.
2543 * linespec.c (decode_line_2): Constify.
2544 * linux-thread-db.c (thread_db_err_str): Constify.
2545 * lm32-tdep.c (lm32_register_name): Constify.
2546 * m2-exp.y (yyerror): Constify.
2547 * m2-lang.h (m2_yyerror): Constify.
2548 * m32r-tdep.c (m32r_register_names): Constify and make static.
2549 * m68hc11-tdep.c (m68hc11_register_names): Constify.
2550 * m88k-tdep.c (m88k_register_name): Constify.
2551 * macroexp.c (appendmem): Constify.
2552 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
2553 (upgrade_type, parse_external, parse_partial_symbols)
2554 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
2555 (new_symbol): Constify.
2556 * memattr.c (mem_info_command): Constify.
2557 * mep-tdep.c (register_name_from_keyword): Constify.
2558 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
2559 Constify.
2560 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
2561 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
2562 * mi/mi-main.c (captured_mi_execute_command): Constify and add
2563 cast.
2564 (mi_execute_async_cli_command): Constify.
2565 * mips-tdep.c (mips_register_name): Constify.
2566 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
2567 (am33_register_name, am33_2_register_name)
2568 * moxie-tdep.c (moxie_register_names): Constify.
2569 * nat/linux-osdata.c (osdata_type): Constify fields.
2570 * nto-tdep.c (nto_parse_redirection): Constify.
2571 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
2572 (lookup_child_selector): Constify.
2573 (objc_methcall::name): Constify.
2574 * objc-lang.h (lookup_objc_class, lookup_child_selector)
2575 (lookup_struct_typedef): Constify.
2576 * objfiles.c (pc_in_section): Constify.
2577 * objfiles.h (pc_in_section): Constify.
2578 * p-exp.y (struct token::oper): Constify.
2579 (yyerror): Constify.
2580 * p-lang.h (pascal_yyerror): Constify.
2581 * parser-defs.h (op_name_standard): Constify.
2582 (op_print::string): Constify.
2583 (exp_descriptor::op_name): Constify.
2584 * printcmd.c (print_address_symbolic): Constify.
2585 * psymtab.c (print_partial_symbols): Constify.
2586 * python/py-breakpoint.c (stop_func): Constify.
2587 (bppy_get_expression): Constify.
2588 * python/py-cmd.c (cmdpy_completer::name): Constify.
2589 (cmdpy_function): Constify.
2590 * python/py-event.c (evpy_add_attribute)
2591 (gdbpy_initialize_event_generic): Constify.
2592 * python/py-event.h (evpy_add_attribute)
2593 (gdbpy_initialize_event_generic): Constify.
2594 * python/py-evts.c (add_new_registry): Constify.
2595 * python/py-finishbreakpoint.c (outofscope_func): Constify.
2596 * python/py-framefilter.c (get_py_iter_from_func): Constify.
2597 * python/py-inferior.c (get_buffer): Add cast.
2598 * python/py-param.c (parm_constant::name): Constify.
2599 * python/py-unwind.c (fprint_frame_id): Constify.
2600 * python/python.c (gdbpy_parameter_value): Constify.
2601 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
2602 * remote.c (memory_packet_config::name): Constify.
2603 (show_packet_config_cmd, remote_write_bytes)
2604 (remote_buffer_add_string):
2605 * reverse.c (exec_reverse_once): Constify.
2606 * rs6000-tdep.c (variant::name, variant::description): Constify.
2607 * rust-exp.y (rustyyerror): Constify.
2608 * rust-lang.c (rust_op_name): Constify.
2609 * rust-lang.h (rustyyerror): Constify.
2610 * serial.h (serial_ops::name): Constify.
2611 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
2612 (sh_sh3e_register_name, sh_sh2e_register_name)
2613 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
2614 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
2615 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
2616 (sh_sh4al_dsp_register_name): Constify.
2617 * sh64-tdep.c (sh64_register_name): Constify.
2618 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
2619 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
2620 * stabsread.c (patch_block_stabs, read_type_number)
2621 (ref_map::stabs, ref_add, process_reference)
2622 (symbol_reference_defined, define_symbol, define_symbol)
2623 (error_type, read_type, read_member_functions, read_cpp_abbrev)
2624 (read_one_struct_field, read_struct_fields, read_baseclasses)
2625 (read_tilde_fields, read_struct_type, read_array_type)
2626 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
2627 (read_huge_number, read_range_type, read_args, common_block_start)
2628 (find_name_end): Constify.
2629 * stabsread.h (common_block_start, define_symbol)
2630 (process_one_symbol, symbol_reference_defined, ref_add):
2631 * symfile.c (get_section_index, add_symbol_file_command):
2632 * symfile.h (get_section_index): Constify.
2633 * target-descriptions.c (tdesc_type::name): Constify.
2634 (tdesc_free_type): Add cast.
2635 * target.c (find_default_run_target):
2636 (add_deprecated_target_alias, find_default_run_target)
2637 (target_announce_detach): Constify.
2638 (do_option): Constify.
2639 * target.h (add_deprecated_target_alias): Constify.
2640 * thread.c (print_thread_info_1): Constify.
2641 * top.c (deprecated_readline_begin_hook, command_line_input):
2642 Constify.
2643 (init_main): Add casts.
2644 * top.h (handle_line_of_input): Constify.
2645 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
2646 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
2647 (tfind_command): Rename to ...
2648 (tfind_command_1): ... this and constify.
2649 (tfind_command): New function.
2650 (tfind_end_command, tfind_start_command): Adjust.
2651 (encode_source_string): Constify.
2652 * tracepoint.h (encode_source_string): Constify.
2653 * tui/tui-data.c (tui_partial_win_by_name): Constify.
2654 * tui/tui-data.h (tui_partial_win_by_name): Constify.
2655 * tui/tui-source.c (tui_set_source_content_nil): Constify.
2656 * tui/tui-source.h (tui_set_source_content_nil): Constify.
2657 * tui/tui-win.c (parse_scrolling_args): Constify.
2658 * tui/tui-windata.c (tui_erase_data_content): Constify.
2659 * tui/tui-windata.h (tui_erase_data_content): Constify.
2660 * tui/tui-winsource.c (tui_erase_source_content): Constify.
2661 * tui/tui.c (tui_enable): Add cast.
2662 * utils.c (defaulted_query): Constify.
2663 (init_page_info): Add cast.
2664 (puts_debug, subset_compare): Constify.
2665 * utils.h (subset_compare): Constify.
2666 * varobj.c (varobj_format_string): Constify.
2667 * varobj.h (varobj_format_string): Constify.
2668 * vax-tdep.c (vax_register_name): Constify.
2669 * windows-nat.c (windows_detach): Constify.
2670 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
2671 * xml-support.c (gdb_xml_end_element): Constify.
2672 * xml-tdesc.c (tdesc_start_reg): Constify.
2673 * xstormy16-tdep.c (xstormy16_register_name): Constify.
2674 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
2675 * xtensa-tdep.h (xtensa_register_t::name): Constify.
2676
2677 2017-04-05 Pedro Alves <palves@redhat.com>
2678
2679 * proc-api.c (struct trans): Constify.
2680 (procfs_note): Constify.
2681 * proc-events.c (struct trans, syscall_table):
2682 * proc-flags.c (struct trans): Constify.
2683 * proc-utils.h (procfs_note): Constify.
2684 * proc-why.c (struct trans): Constify.
2685 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
2686 (procfs_detach): Constify.
2687 * sol-thread.c (struct string_map): Constify.
2688 (td_err_string, td_state_string): Constify.
2689
2690 2017-04-05 Pedro Alves <palves@redhat.com>
2691
2692 * proc-api.c (procfs_filename): Don't initialize
2693 procfs_filename.
2694 (prepare_to_trace): Assume procfs_filename is non-NULL.
2695 (_initialize_proc_api): Give procfs_filename a default value here.
2696
2697 2017-04-05 Pedro Alves <palves@redhat.com>
2698
2699 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
2700 'cond_string' parameter.
2701 (extract_exception_regexp): Constify 'string' parameter.
2702 (catch_exception_command_1): Constify.
2703 * breakpoint.c (init_catchpoint)
2704 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
2705 parameter.
2706 (ep_parse_optional_if_clause, catch_fork_command_1)
2707 (catch_exec_command_1): Constify.
2708 * breakpoint.h (init_catchpoint): Constify 'cond_string'
2709 parameter.
2710 (ep_parse_optional_if_clause): Constify.
2711 * cli/cli-utils.c (remove_trailing_whitespace)
2712 (check_for_argument): Constify.
2713 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
2714 non-const overload.
2715 (check_for_argument): Likewise.
2716
2717 2017-04-05 Pedro Alves <palves@redhat.com>
2718
2719 * event-top.c (command_line_handler): Add cast to execute_command
2720 call.
2721 * record-btrace.c (cmd_record_btrace_bts_start)
2722 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
2723 (cmd_record_btrace_start): Add cast to execute_command call.
2724 * record-full.c (record_full_goto_insn):
2725 * record.c (record_start, record_stop): Add cast to
2726 execute_command_to_string calls.
2727 (cmd_record_start): Add cast to execute_command calls.
2728
2729 2017-04-05 Pedro Alves <palves@redhat.com>
2730
2731 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
2732 static inline function.
2733 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
2734 array and use gdb_PyArg_ParseTupleAndKeywords.
2735 * python/py-cmd.c (cmdpy_init): Likewise.
2736 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
2737 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
2738 (infpy_search_memory): Likewise.
2739 * python/py-objfile.c (objfpy_add_separate_debug_file)
2740 (gdbpy_lookup_objfile): Likewise.
2741 * python/py-symbol.c (gdbpy_lookup_symbol)
2742 (gdbpy_lookup_global_symbol): Likewise.
2743 * python/py-type.c (gdbpy_lookup_type): Likewise.
2744 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
2745 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
2746 Likewise.
2747
2748 2017-04-05 Pedro Alves <palves@redhat.com>
2749
2750 * python/python-internal.h (gdb_PyGetSetDef): New type.
2751 * python/py-block.c (block_object_getset)
2752 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
2753 * python/py-event.c (event_object_getset)
2754 (finish_breakpoint_object_getset): Likewise.
2755 * python/py-inferior.c (inferior_object_getset): Likewise.
2756 * python/py-infthread.c (thread_object_getset): Likewise.
2757 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
2758 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
2759 * python/py-objfile.c (objfile_getset): Likewise.
2760 * python/py-progspace.c (pspace_getset): Likewise.
2761 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
2762 Likewise.
2763 * python/py-record.c (recpy_record_getset): Likewise.
2764 * python/py-symbol.c (symbol_object_getset): Likewise.
2765 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
2766 Likewise.
2767 * python/py-type.c (type_object_getset, field_object_getset):
2768 Likewise.
2769 * python/py-value.c (value_object_getset): Likewise.
2770
2771 2017-04-05 Pedro Alves <palves@redhat.com>
2772
2773 * python/python-internal.h (gdb_PyObject_CallMethod)
2774 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
2775 New functions.
2776 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
2777 (PySys_GetObject, PySys_SetPath): New macros.
2778
2779 2017-04-05 Pedro Alves <palves@redhat.com>
2780
2781 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
2782 info_osdata_command.
2783 * osdata.c (info_osdata_command): Rename to ...
2784 (info_osdata): ... this. Constify 'type' parameter, and remove
2785 the 'from_tty' parameter. Accept NULL TYPE.
2786 (info_osdata_command): New function.
2787 * osdata.h (info_osdata_command): Remove declaration.
2788 (info_osdata): New declaration.
2789
2790 2017-04-05 Pedro Alves <palves@redhat.com>
2791
2792 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
2793 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
2794 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
2795 parameter.
2796 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
2797 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
2798 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
2799 parameter.
2800 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
2801 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
2802 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
2803 (mi_cmd_file_list_exec_source_files)
2804 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
2805 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
2806 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
2807 parameter.
2808 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
2809 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
2810 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
2811 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
2812 (mi_cmd_stack_info_frame): Constify 'command' parameter.
2813 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
2814 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
2815 'command' parameter.
2816 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
2817 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
2818 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
2819 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
2820 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
2821 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
2822 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
2823 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
2824 (mi_cmd_var_set_update_range): Constify 'command' parameter.
2825 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
2826 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
2827 parameter.
2828 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
2829 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
2830 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
2831 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
2832 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
2833 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
2834 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
2835 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
2836 (mi_cmd_data_list_changed_registers)
2837 (mi_cmd_data_write_register_values)
2838 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
2839 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
2840 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
2841 (mi_cmd_list_features, mi_cmd_list_target_features)
2842 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
2843 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
2844 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
2845 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
2846 (mi_cmd_trace_frame_collected): Constify 'command'
2847 parameter.
2848 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
2849 'command' parameter.
2850
2851 2017-04-05 Pedro Alves <palves@redhat.com>
2852
2853 * ada-lang.c (ada_completer_word_break_characters): Now a const
2854 array.
2855 (ada_get_gdb_completer_word_break_characters): Constify.
2856 * completer.c (gdb_completer_command_word_break_characters)
2857 (gdb_completer_file_name_break_characters)
2858 (gdb_completer_quote_characters): Now const arrays.
2859 (get_gdb_completer_quote_characters): Constify.
2860 (set_rl_completer_word_break_characters): New function.
2861 (set_gdb_completion_word_break_characters)
2862 (complete_line_internal): Use it.
2863 * completer.h (get_gdb_completer_quote_characters): Constify.
2864 (set_rl_completer_word_break_characters): Declare.
2865 * f-lang.c (f_word_break_characters): Constify.
2866 * language.c (default_word_break_characters): Constify.
2867 * language.h (language_defn::la_word_break_characters): Constify.
2868 (default_word_break_characters): Constify.
2869 * top.c (init_main): Use set_rl_completer_word_break_characters.
2870
2871 2017-04-05 Pedro Alves <palves@redhat.com>
2872
2873 * aix-thread.c (aix_thread_pid_to_str)
2874 (aix_thread_extra_thread_info): Constify.
2875 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
2876 * bsd-uthread.c (bsd_uthread_extra_thread_info)
2877 (bsd_uthread_pid_to_str): Constify.
2878 * corelow.c (core_pid_to_str): Constify.
2879 * darwin-nat.c (darwin_pid_to_str): Constify.
2880 * fbsd-nat.c (fbsd_pid_to_str): Constify.
2881 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
2882 Constify.
2883 * gnu-nat.c (gnu_pid_to_str): Constify.
2884 * go32-nat.c (go32_pid_to_str): Constify.
2885 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
2886 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
2887 * inferior.c (inferior_pid_to_str): Constify.
2888 * linux-nat.c (linux_nat_pid_to_str): Constify.
2889 * linux-tdep.c (linux_core_pid_to_str): Constify.
2890 * linux-thread-db.c (thread_db_pid_to_str)
2891 (thread_db_extra_thread_info): Constify.
2892 * nto-tdep.c (nto_extra_thread_info): Constify.
2893 * nto-tdep.h (nto_extra_thread_info): Constify.
2894 * obsd-nat.c (obsd_pid_to_str): Constify.
2895 * procfs.c (procfs_pid_to_str): Constify.
2896 * ravenscar-thread.c (ravenscar_extra_thread_info)
2897 (ravenscar_pid_to_str): Constify.
2898 * remote-sim.c (gdbsim_pid_to_str): Constify.
2899 * remote.c (remote_threads_extra_info, remote_pid_to_str):
2900 Constify.
2901 * sol-thread.c (solaris_pid_to_str): Constify.
2902 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
2903 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
2904 * target.c (default_pid_to_str, target_pid_to_str)
2905 (normal_pid_to_str, default_pid_to_str): Constify.
2906 * target.h (target_ops::to_pid_to_str)
2907 (target_ops::to_extra_thread_info): Constify.
2908 (target_pid_to_str, normal_pid_to_str): Constify.
2909 * windows-nat.c (windows_pid_to_str): Constify.
2910 * gdbarch.sh (core_pid_to_str): Constify.
2911 * target-delegates.c: Regenerate.
2912 * gdbarch.h, gdbarch.c: Regenerate.
2913
2914 2017-04-05 Pedro Alves <palves@redhat.com>
2915
2916 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
2917 the memory of the temporary warning_pre_print override.
2918 * utils.c (warning_pre_print): Constify.
2919 * utils.h (warning_pre_print): Constify.
2920
2921 2017-04-05 Pedro Alves <palves@redhat.com>
2922
2923 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
2924 (shell_command): New function.
2925 (make_command): Use std::string.
2926 (init_cli_cmds): Register shell_command instead of shell_escape.
2927
2928 2017-04-05 Pedro Alves <palves@redhat.com>
2929
2930 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
2931 * tracepoint.c (default_collect): Don't initialize.
2932
2933 2017-04-05 Pedro Alves <palves@redhat.com>
2934
2935 * macroexp.c (macro_buffer::shared): Now a bool.
2936 (init_buffer): Update.
2937 (init_shared_buffer): Constify 'addr' parameter.
2938 (substitute_args, expand, macro_expand, macro_expand_next): Remove
2939 casts.
2940
2941 2017-04-05 Pedro Alves <palves@redhat.com>
2942
2943 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
2944 * disasm.c (set_disassembler_options): Constify local.
2945 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
2946
2947 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
2948
2949 PR gdb/21352
2950 * tracefile.c (tsave_command): Fix argument parsing for '-r'
2951 option.
2952
2953 2017-04-05 Yao Qi <yao.qi@linaro.org>
2954
2955 * frame.c (frame_unwind_register_unsigned): Call
2956 frame_unwind_register_value.
2957
2958 2017-04-05 Yao Qi <yao.qi@linaro.org>
2959
2960 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
2961 Use gdb_test_multiple, and don't match anchor.
2962
2963 2017-04-05 Pedro Alves <palves@redhat.com>
2964
2965 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
2966 (Write After Approval): Remove Simon Marchi.
2967
2968 2017-04-05 Pedro Alves <palves@redhat.com>
2969
2970 * common/gdb_optional.h (optional::optional): Make constexpr and
2971 initialize m_dummy.
2972
2973 2017-04-04 John Baldwin <jhb@FreeBSD.org>
2974
2975 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
2976 (amd64fbsd_jmp_buf_reg_offset): Remove.
2977 (amd64fbsd_supply_uthread): Remove function.
2978 (amd64fbsd_collect_uthread): Remove function.
2979 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
2980 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
2981 (x86_64-*-freebsd*): Remove bsd-uthread.o.
2982 (fbsd-nat.c): Update comment.
2983 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
2984 (i386fbsd_jmp_buf_reg_offset): Remove.
2985 (i386fbsd_supply_uthread): Remove function.
2986 (i386fbsd_collect_uthread): Remove function.
2987 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
2988
2989 2017-04-04 John Baldwin <jhb@FreeBSD.org>
2990
2991 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
2992 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
2993 * NEWS: Mention that support for FreeBSD/alpha was removed.
2994 * alpha-fbsd-tdep.c: Delete file.
2995 * config/alpha/fbsd.mh: Delete file.
2996 * configure.host: Delete alpha*-*-freebsd* and
2997 alpha*-*-kfreebsd*-gnu.
2998 * configure.tgt: Delete alpha*-*-freebsd* and
2999 alpha*-*-kfreebsd*-gnu.
3000
3001 2017-04-04 John Baldwin <jhb@FreeBSD.org>
3002
3003 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
3004 amd64bsd_store_inferior_registers): Use ptid from regcache.
3005
3006 2017-04-04 Pedro Alves <palves@redhat.com>
3007
3008 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
3009 data fields, make them private and add "m_" prefixes.
3010 (lnp_state_machine::lnp_state_machine): New ctor.
3011 (record_line, check_line_address, handle_set_discriminator)
3012 (handle_set_address, handle_advance_pc, handle_special_opcode)
3013 (handle_advance_line, handle_set_file, handle_negate_stmt)
3014 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
3015 (end_sequence, advance_line): New methods.
3016 (m_gdbarch, m_record_lines_p): New fields.
3017 (lnp_reader_state): Delete.
3018 (dwarf_record_line): Rename to ...
3019 (lnp_state_machine::record_line): ... adjust.
3020 (init_lnp_state_machine): Delete.
3021 (lnp_state_machine::lnp_state_machine): New.
3022 (check_line_address): Rename to ...
3023 (lnp_state_machine::check_line_address): This.
3024 (dwarf_decode_lines_1): Remove reference to "reader_state".
3025 Adjust lnp_state_machine having a non-default ctor. Use bool.
3026 State machine internal state manipulation moved to
3027 lnp_state_machine methods.
3028
3029 2017-04-04 Pedro Alves <palves@redhat.com>
3030
3031 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3032 unittests/offset-type-selftests.c.
3033 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
3034 * common/offset-type.h: New file.
3035 * common/preprocessor.h: New file.
3036 * common/traits.h: New file.
3037 * common/valid-expr.h: New file.
3038 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
3039 sect_offset and cu_offset strong typedefs throughout.
3040 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
3041 typedefs throughout.
3042 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
3043 sect_offset and cu_offset strong typedefs throughout.
3044 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
3045 typedefs throughout.
3046 * gdbtypes.h: Include "common/offset-type.h".
3047 (cu_offset): Now an offset type (strong typedef) instead of a
3048 struct.
3049 (sect_offset): Likewise.
3050 (union call_site_parameter_u): Rename "param_offset" field to
3051 "param_cu_off".
3052 * unittests/offset-type-selftests.c: New file.
3053
3054 2017-04-04 Pedro Alves <palves@redhat.com>
3055
3056 * common/underlying.h: New file.
3057 * dwarf2read.c: Include "common/gdb_optional.h" and
3058 "common/underlying.h".
3059 (dir_index, file_name_index): New types.
3060 (file_entry): Use them.
3061 (file_entry::include): Use to_underlying.
3062 (line_header::add_file_name): Use dir_index.
3063 (read_formatted_entries): Use gdb::optional. Read form before
3064 writting to file_entry.
3065 (dwarf_decode_line_header): Use dir_index.
3066 (lnp_state_machine::current_file): Use to_underlying.
3067 (lnp_state_machine::file): Change type to file_name_index.
3068 (dwarf_record_line): Use to_underlying.
3069 (init_lnp_state_machine): Use file_name_index.
3070 (dwarf_decode_lines_1): Use dir_index and file_name_index.
3071
3072 2017-04-04 Pedro Alves <palves@redhat.com>
3073
3074 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
3075 operator bool, has_value and get methods.
3076
3077 2017-04-04 Pedro Alves <palves@redhat.com>
3078
3079 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
3080 fields.
3081 (line_header): Initialize all data fields. Change type of
3082 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
3083 Change type of include_dirs to std::vector<const char *>. Remove
3084 num_include_dirs, include_dirs_size. Change type of file_names to
3085 std::vector<file_entry>. Remove num_file_names, file_names_size.
3086 (line_header::line_header): New.
3087 (line_header::add_include_dir, line_header::add_file_name): New
3088 methods.
3089 (line_header::include_dir_at): Remove NULL check.
3090 (line_header::file_name_at): Add const overload.
3091 (line_header_up): New unique_ptr typedef.
3092 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
3093 std::vector. Remove free_line_header call.
3094 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
3095 free_line_header call.
3096 (free_cu_line_header): Delete.
3097 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
3098 (setup_type_unit_groups): Use line_header_up instead of cleanups.
3099 Adjust to use std::vector.
3100 (free_line_header): Delete.
3101 (free_line_header_voidp): Use delete.
3102 (add_include_dir): Replace with ...
3103 (line_header::add_include_dir): ... this method. Use std::vector.
3104 (add_file_name): Replace with ...
3105 (line_header::add_file_name): ... this method. Use std::vector.
3106 (add_include_dir_stub): Delete.
3107 (read_formatted_entries): Remove memset.
3108 (dwarf_decode_line_header): Return a line_header_up instead of a
3109 raw pointer. Remove cleanup handling. Pass lambdas to
3110 read_formatted_entries. Adjust to use line_header methods.
3111 (dwarf_decode_lines_1): Adjust to use line_header methods.
3112 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
3113 use std::vector.
3114
3115 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
3116
3117 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
3118 instead of struct ptid.
3119
3120 2017-05-04 Alan Hayward <alan.hayward@arm.com>
3121
3122 * frame.c (get_frame_register_bytes): Unwind using value.
3123 (put_frame_register_bytes): Likewise.
3124
3125 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
3126
3127 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
3128 aggregate-like.
3129
3130 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
3131
3132 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
3133
3134 2017-03-29 Yao Qi <yao.qi@linaro.org>
3135
3136 * gdbthread.h (struct thread_info): Declare constructor and
3137 destructor. Add some in-class member initializers.
3138 * thread.c (free_thread): Remove.
3139 (init_thread_list): Call delete instead of free_thread.
3140 (new_thread): Call thread_info constructor.
3141 (thread_info::thread_info): New function.
3142 (thread_info::~thread_info): New function.
3143 (delete_thread_1): Call delete instead of free_thread.
3144 (make_cleanup_restore_current_thread): Move tp and frame to
3145 inner block.
3146
3147 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
3148
3149 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
3150 (arc_skip_prologue): Likewise.
3151 (arc_make_frame_cache): Likewise.
3152 (arc_pv_get_operand): New function.
3153 (arc_is_in_prologue): Likewise.
3154 (arc_analyze_prologue): Likewise.
3155 (arc_print_frame_cache): Likewise.
3156 (MAX_PROLOGUE_LENGTH): New constant.
3157
3158 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
3159
3160 * configure.tgt: Add arc-insn.o.
3161 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
3162 (dump_arc_instruction_command): New function.
3163 (arc_fprintf_disasm): Likewise.
3164 (arc_disassemble_info): Likewise.
3165 (arc_insn_get_operand_value): Likewise.
3166 (arc_insn_get_operand_value_signed): Likewise.
3167 (arc_insn_get_memory_base_reg): Likewise.
3168 (arc_insn_get_memory_offset): Likewise.
3169 (arc_insn_get_branch_target): Likewise.
3170 (arc_insn_dump): Likewise.
3171 (arc_insn_get_linear_next_pc): Likewise.
3172 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
3173 (arc_disassemble_info): Likewise.
3174 (arc_insn_get_branch_target): Likewise.
3175 (arc_insn_get_linear_next_pc): Likewise.
3176 * NEWS: Mention new "maint print arc arc-instruction".
3177
3178 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
3179
3180 * arc-tdep (maintenance_print_arc_list): New variable.
3181 (maintenance_print_arc_command): New function.
3182
3183 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
3184
3185 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
3186 Add "limm" and "reserved".
3187 (arc_cannot_fetch_register, arc_cannot_store_register): Add
3188 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
3189 * arc-tdep.h (arc_regnum): Likewise.
3190
3191 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3192
3193 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
3194 for THREADPTR register.
3195 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
3196 register.
3197 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
3198 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
3199 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
3200
3201 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3202
3203 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
3204 registers above gdbarch_num_regs (gdbarch) as privileged in
3205 call0 ABI.
3206
3207 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3208
3209 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
3210 for a single specified register or for all registers in
3211 a0_base..a0_base + C0_NREGS range.
3212 (supply_gregset_reg): Call regcache_raw_supply for a single
3213 specified register or for all registers in a0_base..a0_base +
3214 C0_NREGS range.
3215
3216 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3217
3218 * arch/xtensa.h (C0_NREGS): Add definition.
3219 * xtensa-tdep.c (C0_NREGS): Remove definition.
3220
3221 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3222
3223 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
3224 Drop xtensa_default_isa initialization.
3225 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
3226
3227 2017-03-27 Pedro Alves <palves@redhat.com>
3228
3229 * dwarf2read.c (file_entry) <dir_index>: Add comment.
3230 (file_entry::include_dir): New method.
3231 (line_header::include_dir_at, line_header::file_name_at): New
3232 methods.
3233 (setup_type_unit_groups, setup_type_unit_groups)
3234 (psymtab_include_file_name): Simplify using the new methods.
3235 (lnp_state_machine) <the_line_header>: New field.
3236 <file>: Add comment.
3237 (lnp_state_machine::current_file): New method.
3238 (dwarf_record_line): Simplify using the new methods.
3239 (init_lnp_state_machine): Initialize the "the_line_header" field.
3240 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
3241 Simplify using the new methods.
3242
3243 2017-03-27 Pedro Alves <palves@redhat.com>
3244
3245 * cp-name-parser.y (make_empty): Delete.
3246 (demangler_special, nested_name, ptr_operator, array_indicator)
3247 (direct_declarator, declarator_1): Use fill_comp instead of
3248 make_empty.
3249
3250 2017-03-27 Pedro Alves <palves@redhat.com>
3251
3252 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
3253 to ATTRIBUTE_PRINTF.
3254 * solib-target.c (library_list_start_list): Print "string" not
3255 "version".
3256 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
3257 gdb_xml_error call.
3258
3259 2017-03-27 Pedro Alves <palves@redhat.com>
3260
3261 * dwarf2read.c (struct file_and_directory): New.
3262 (dwarf2_get_dwz_file): Adjust to use std::string.
3263 (dw2_get_file_names_reader): Adjust to use file_and_directory.
3264 (find_file_and_directory): Adjust to return a file_and_directory
3265 object.
3266 (read_file_scope): Adjust to use file_and_directory. Remove
3267 make_cleanup/do_cleanups calls.
3268 (open_and_init_dwp_file): Adjust to use std::string. Remove
3269 make_cleanup/do_cleanups calls.
3270 * python/python.c (do_start_initialization): Adjust to ldirname
3271 returning a std::string.
3272 * utils.c (ldirname): Now returns a std::string.
3273 * utils.h (ldirname): Change return type to std::string.
3274 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
3275 returning a std::string.
3276 * xml-tdesc.c (file_read_description_xml): Likewise.
3277
3278 2017-03-24 Alan Hayward <alan.hayward@arm.com>
3279
3280 * regcache.c (regcache_debug_print_register): New function.
3281 * regcache.h (regcache_debug_print_register): New declaration.
3282 * target.c (debug_print_register): Remove.
3283 (target_fetch_registers): Call regcache_debug_print_register.
3284 (target_store_registers): Likewise.
3285
3286 2017-03-24 Pádraig Brady <pbrady@fb.com>
3287
3288 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
3289 reference beyond the 'lh->include_dirs' array before accessing to
3290 it.
3291 (psymtab_include_file_name): Likewise.
3292 (dwarf_decode_lines_1): Likewise.
3293 (dwarf_decode_lines): Likewise.
3294 (file_file_name): Likewise.
3295
3296 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
3297
3298 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
3299 inferior_ptid.
3300 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
3301 ps_lsetfpregs): Likewise.
3302 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
3303 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
3304 ps_lsetfpregs): Likewise.
3305 * target.c (target_fetch_registers, target_store_registers):
3306 Remove asserts.
3307
3308 2017-03-23 Alan Hayward <alan.hayward@arm.com>
3309
3310 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
3311
3312 2017-03-23 Yao Qi <yao.qi@linaro.org>
3313
3314 * aarch64-tdep.c (aarch64_process_record_test): Declare.
3315 (_initialize_aarch64_tdep): Register it.
3316 (aarch64_record_load_store): Handle PRFM instruction.
3317 (aarch64_process_record_test): New function.
3318
3319 2017-03-23 Yao Qi <yao.qi@linaro.org>
3320
3321 * aarch64-tdep.c (aarch64_record_load_store): Fix code
3322 indentation.
3323
3324 2017-03-23 Yao Qi <yao.qi@linaro.org>
3325
3326 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
3327
3328 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3329
3330 python/python.c (do_start_initialization): Fix memory leak.
3331
3332 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3333
3334 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
3335 using get_ptrace_pid.
3336 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
3337 inferior_ptid.
3338 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
3339 inferior_ptid instead of pid.
3340
3341 2017-03-22 Yao Qi <yao.qi@linaro.org>
3342
3343 * aarch64-tdep.c: Wrap locally used classes in anonymous
3344 namespace.
3345 * arm-tdep.c: Likewise.
3346 * linespec.c: Likewise.
3347 * ui-out.c: Likewise.
3348
3349 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
3350
3351 PR gdb/19637
3352 * python/lib/gdb/printer/bound_registers.py: Import sys.
3353
3354 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
3355
3356 * windows-nat.c (do_windows_fetch_inferior_registers): Add
3357 windows_thread_info parameter and use it instead of
3358 current_thread.
3359 (windows_fetch_inferior_registers): Don't set current_thread,
3360 pass the thread to do_windows_fetch_inferior_registers. Use
3361 ptid from regcache instead of inferior_ptid.
3362 (do_windows_store_inferior_registers): Add windows_thread_info
3363 parameter and use it instead of current_thread.
3364 (windows_store_inferior_registers): Don't set current_thread,
3365 pass the thread to do_windows_store_inferior_registers. Use
3366 ptid from regcache instead of inferior_ptid.
3367
3368 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
3369
3370 * ser-mingw.c (ser_windows_raw): Remove reference to
3371 struct serial::current_timeout.
3372
3373 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
3374
3375 PR tdep/20928
3376 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
3377 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
3378 (sparc64_fsr_type): Fix %fsr decoding.
3379
3380 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
3381
3382 * python/py-record-btrace.c (btpy_insn_data): Change return type
3383 for Python 2.
3384
3385 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
3386
3387 * spu-linux-nat.c (spu_fetch_inferior_registers,
3388 spu_store_inferior_registers): Use ptid from regcache, set and
3389 restore inferior_ptid.
3390 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
3391 Likewise.
3392
3393 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
3394
3395 * i386-linux-nat.c (fetch_register, store_register,
3396 i386_linux_fetch_inferior_registers,
3397 i386_linux_store_inferior_registers): Use ptid from regcache.
3398 * ia64-linux-nat.c (ia64_linux_fetch_register,
3399 ia64_linux_store_register): Likewise.
3400 * inf-ptrace.c (inf_ptrace_fetch_register,
3401 inf_ptrace_store_register): Likewise.
3402 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
3403 m32r_linux_store_inferior_registers): Likewise.
3404 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
3405 m68kbsd_store_inferior_registers): Likewise.
3406 * m68k-linux-nat.c (fetch_register, store_register,
3407 m68k_linux_fetch_inferior_registers,
3408 m68k_linux_store_inferior_registers): Likewise.
3409 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
3410 m88kbsd_store_inferior_registers): Likewise.
3411 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
3412 mips_fbsd_store_inferior_registers): Likewise.
3413 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
3414 mips64_linux_regsets_store_registers): Likewise.
3415 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
3416 mipsnbsd_store_inferior_registers): Likewise.
3417 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
3418 mips64obsd_store_inferior_registers): Likewise.
3419 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
3420 Likewise.
3421 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
3422 ppcfbsd_store_inferior_registers): Likewise.
3423 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
3424 ppc_linux_store_inferior_registers): Likewise.
3425 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
3426 ppcnbsd_store_inferior_registers): Likewise.
3427 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
3428 ppcobsd_store_registers): Likewise.
3429 * procfs.c (procfs_fetch_registers, procfs_store_registers):
3430 Likewise.
3431 * ravenscar-thread.c (ravenscar_fetch_registers,
3432 ravenscar_store_registers, ravenscar_prepare_to_store):
3433 Likewise.
3434 * record-btrace.c (record_btrace_fetch_registers,
3435 record_btrace_store_registers, record_btrace_prepare_to_store):
3436 Likewise.
3437 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
3438 Lookup inferior using ptid from regcache, instead of
3439 current_inferior.
3440 * remote.c (remote_fetch_registers, remote_store_registers): Use
3441 ptid from regcache.
3442 * rs6000-nat.c (fetch_register, store_register): Likewise.
3443 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
3444 s390_linux_store_inferior_registers): Likewise.
3445 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
3446 shnbsd_store_inferior_registers): Likewise.
3447 * sol-thread.c (sol_thread_fetch_registers,
3448 sol_thread_store_registers): Likewise.
3449 * sparc-nat.c (sparc_fetch_inferior_registers,
3450 sparc_store_inferior_registers): Likewise.
3451 * tilegx-linux-nat.c (fetch_inferior_registers,
3452 store_inferior_registers): Likewise.
3453 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
3454 vaxbsd_store_inferior_registers): Likewise.
3455 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
3456 store_xtregs): Likewise.
3457
3458 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3459
3460 PR gdb/14441
3461 * NEWS: Mention support for rvalue references in GDB and python.
3462 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
3463 supports both lvalue and rvalue references.
3464
3465 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3466
3467 PR gdb/14441
3468 * gdbtypes.c (rank_one_type): Implement overloading
3469 resolution rules regarding rvalue references.
3470
3471 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3472
3473 PR gdb/14441
3474 * aarch64-tdep.c (aarch64_type_align)
3475 (aarch64_extract_return_value, aarch64_store_return_value): Change
3476 lvalue reference type checks to general reference type checks.
3477 * amd64-tdep.c (amd64_classify): Likewise.
3478 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
3479 Likewise.
3480 * arm-tdep.c (arm_type_align, arm_extract_return_value)
3481 (arm_store_return_value): Likewise.
3482 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
3483 * c-typeprint.c (c_print_type): Likewise.
3484 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
3485 (cplus_number_of_children, cplus_describe_child): Likewise.
3486 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3487 * completer.c (expression_completer): Likewise.
3488 * cp-support.c (make_symbol_overload_list_adl_namespace):
3489 Likewise.
3490 * darwin-nat-info.c (info_mach_region_command): Likewise.
3491 * dwarf2loc.c (entry_data_value_coerce_ref)
3492 (value_of_dwarf_reg_entry): Likewise.
3493 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
3494 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
3495 Likewise.
3496 * findvar.c (extract_typed_address, store_typed_address):
3497 Likewise.
3498 * gdbtypes.c (rank_one_type): Likewise.
3499 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
3500 * infcall.c (value_arg_coerce): Likewise.
3501 * language.c (pointer_type): Likewise.
3502 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
3503 Likewise.
3504 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
3505 * mn10300-tdep.c (mn10300_type_align): Likewise.
3506 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
3507 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
3508 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
3509 Likewise.
3510 * printcmd.c (print_formatted, x_command): Likewise.
3511 * python/py-type.c (typy_get_composite, typy_template_argument):
3512 Likewise.
3513 * python/py-value.c (valpy_referenced_value)
3514 (valpy_get_dynamic_type, value_has_field): Likewise.
3515 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
3516 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
3517 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
3518 * spu-tdep.c (spu_scalar_value_p): Likewise.
3519 * symtab.c (lookup_symbol_aux): Likewise.
3520 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
3521 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
3522 Likewise.
3523 * valops.c (value_cast_pointers, value_cast)
3524 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
3525 (value_struct_elt, value_struct_elt_bitpos)
3526 (value_find_oload_method_list, find_overload_match)
3527 (value_rtti_indirect_type): Likewise.
3528 * valprint.c (val_print_scalar_type_p, generic_val_print):
3529 Likewise.
3530 * value.c (value_actual_type, value_as_address, unpack_long)
3531 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
3532 (coerce_ref): Likewise.
3533 * varobj.c (varobj_get_value_type): Likewise.
3534
3535 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3536
3537 PR gdb/14441
3538 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
3539 table of constants.
3540 * python/lib/gdb/command/explore.py: Support exploring values
3541 of rvalue reference types.
3542 * python/lib/gdb/types.py: Implement get_basic_type() for
3543 rvalue reference types.
3544 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
3545 constant.
3546 * python/py-value.c (valpy_getitem): Add an rvalue reference
3547 check.
3548 (valpy_reference_value): Add new parameter "refcode".
3549 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
3550 New wrappers for valpy_reference_value().
3551 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
3552 (gdbpy_invoke_xmethod): Likewise.
3553
3554 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3555
3556 PR gdb/14441
3557 * dwarf2read.c (process_die, read_type_die_1): Handle the
3558 DW_TAG_rvalue_reference_type DIE.
3559 (read_tag_reference_type): Add new parameter "refcode".
3560
3561 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3562
3563 PR gdb/14441
3564 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
3565 (c_type_print_modifier, c_type_print_varspec_suffix)
3566 (c_type_print_base): Support printing rvalue reference types.
3567 * c-valprint.c (c_val_print, c_value_print): Support printing
3568 rvalue reference values.
3569
3570 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3571
3572 PR gdb/14441
3573 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
3574 typename.
3575 * cp-support.c (replace_typedefs): Handle
3576 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
3577 * python/py-type.c (typy_lookup_type): Likewise.
3578
3579 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3580
3581 PR gdb/14441
3582 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
3583 * parse.c (insert_type): Change assert statement.
3584 (follow_types): Handle rvalue reference types.
3585 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
3586 constant.
3587
3588 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3589
3590 PR gdb/14441
3591 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
3592 value_ref() interface.
3593 * c-valprint.c (c_value_print): Likewise.
3594 * infcall.c (value_arg_coerce): Likewise.
3595 * python/py-value.c (valpy_reference_value): Likewise.
3596 * valops.c (value_cast, value_reinterpret_cast)
3597 (value_dynamic_cast, typecmp): Likewise.
3598 (value_ref): Parameterize by kind of return value reference type.
3599 * value.h (value_ref): Add new parameter "refcode".
3600
3601 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3602
3603 PR gdb/14441
3604 * dwarf2read.c (read_tag_reference_type): Use
3605 lookup_lvalue_reference_type() instead of lookup_reference_type().
3606 * eval.c (evaluate_subexp_standard): Likewise.
3607 * f-exp.y: Likewise.
3608 * gdbtypes.c (make_reference_type, lookup_reference_type):
3609 Generalize with rvalue reference types.
3610 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
3611 convenience wrappers for lookup_reference_type().
3612 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
3613 reference kind parameter.
3614 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
3615 wrappers for lookup_reference_type().
3616 * guile/scm-type.c (gdbscm_type_reference): Use
3617 lookup_lvalue_reference_type() instead of lookup_reference_type().
3618 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
3619 * parse.c (follow_types): Likewise.
3620 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
3621 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
3622 Likewise.
3623 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
3624 (gdbpy_invoke_xmethod): Likewise.
3625 * stabsread.c: Provide extra argument to make_reference_type()
3626 call.
3627 * valops.c (value_ref, value_rtti_indirect_type): Use
3628 lookup_lvalue_reference_type() instead of lookup_reference_type().
3629
3630 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3631
3632 PR gdb/14441
3633 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
3634 (TYPE_IS_REFERENCE): New macro.
3635 (struct type): Add rvalue_reference_type field.
3636 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
3637
3638 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
3639
3640 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
3641 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
3642 New function definition.
3643 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
3644 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
3645 New function declaration.
3646 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
3647 * mi/mi-interp.h: New file.
3648 * solib.c (info_sharedlibrary_command): Replace for loop with
3649 ALL_SO_LIBS macro
3650 * solib.h (update_solib_list): New function declaration.
3651 (so_list_head): Move macro.
3652 * solist.h (ALL_SO_LIBS): New macro.
3653
3654 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
3655
3656 * infcmd.c (post_create_inferior): Remove unused argument in
3657 call to solib_add.
3658 * remote.c (remote_start_remote): Likewise.
3659 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
3660 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
3661 (enable_break): Likewise.
3662 * solib.c (update_solib_list): Remove unused target argument
3663 and its documentation.
3664 (solib_add): Remove unused target argument. Remove unused
3665 argument in call to update_solib_list.
3666 (info_sharedlibrary_command): Remove unused argument in call
3667 to update_solib_list.
3668 (sharedlibrary_command): Remove unused argument in call to
3669 solib_add.
3670 (handle_solib_event): Likewise.
3671 (reload_shared_libraries): Likewise.
3672 * solib.h (solib_add): Remove unused target argument.
3673
3674 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
3675
3676 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
3677 (s390_displaced_step_fixup): Cover relative branches with the
3678 default fixup handling. This fixes lack of support for some
3679 relative branch instructions.
3680
3681 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3682
3683 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
3684 ptid from regcache.
3685
3686 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3687
3688 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
3689 i386_darwin_store_inferior_registers): Use ptid from regcache.
3690
3691 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3692
3693 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
3694 i386bsd_store_inferior_registers): Use ptid from regcache.
3695
3696 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3697
3698 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
3699 hppaobsd_store_registers): Use ptid from regcache.
3700
3701 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3702
3703 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
3704 hppanbsd_store_registers): Use ptid from regcache.
3705
3706 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3707
3708 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
3709 from regcache. Use get_ptrace_pid.
3710
3711 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3712
3713 * corelow.c (get_core_register_section): Use ptid from regcache,
3714 update doc.
3715
3716 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3717
3718 * bsd-uthread.c (bsd_uthread_fetch_registers,
3719 bsd_uthread_store_registers): Use ptid from regcache, set and
3720 restore inferior_ptid.
3721
3722 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3723
3724 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
3725 fetch_fp_regs, store_register, store_regs, store_fp_register,
3726 store_fp_regs): Use ptid from regcache.
3727
3728 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
3729
3730 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
3731 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
3732 store_vfp_regs): Use ptid from regcache.
3733
3734 2017-03-17 Pedro Alves <palves@redhat.com>
3735
3736 PR remote/21188
3737 * ser-base.c (ser_base_wait_for): Add comment.
3738 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
3739 version.
3740 * ser-unix.c (hardwire_raw): Remove reference to
3741 scb->current_timeout.
3742 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
3743 (hardwire_ops): Install ser_base_readchar instead of
3744 hardwire_readchar.
3745 * serial.h (struct serial) <current_timeout, timeout_remaining>:
3746 Remove fields.
3747
3748 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
3749
3750 PR gdb/19637
3751 * python/lib/gdb/printer/bound_registers.py: Add support for
3752 Python 3.
3753
3754 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3755
3756 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
3757 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
3758 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
3759 byte_offset to subobj_byte_offset. Fix the handling of
3760 DWARF_VALUE_STACK on big-endian targets when coming via an
3761 implicit pointer.
3762 (dwarf2_evaluate_loc_desc): Adjust call to
3763 dwarf2_evaluate_loc_desc_full.
3764 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
3765 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
3766
3767 2017-03-16 Yao Qi <yao.qi@linaro.org>
3768
3769 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
3770 and REVSH instructions.
3771
3772 2017-03-16 Yao Qi <yao.qi@linaro.org>
3773
3774 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
3775 (arm_record_test): Declare.
3776 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
3777 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
3778 align with the manual.
3779 (thumb_record_misc): Adjust the code order to align with the
3780 manual.
3781 (thumb2_record_decode_insn_handler): Fix instruction matching.
3782 (instruction_reader_thumb): New class.
3783 (arm_record_test): New function.
3784
3785 2017-03-16 Yao Qi <yao.qi@linaro.org>
3786
3787 * arm-tdep.c (abstract_memory_reader): New class.
3788 (instruction_reader): New class.
3789 (extract_arm_insn): Add argument 'reader'. Callers updated.
3790 (decode_insn): Likewise.
3791
3792 2017-03-16 Doug Evans <dje@google.com>
3793
3794 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
3795 member. Change type of TYPE member to SCM. All uses updated.
3796 (lsscm_make_lazy_string_smob): Add assert.
3797 (lsscm_make_lazy_string): Flag bad length values.
3798 (lsscm_elt_type): New function.
3799 (gdbscm_lazy_string_to_value): Rewrite to use
3800 lsscm_safe_lazy_string_to_value.
3801 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
3802 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
3803 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
3804 in incoming type.
3805 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
3806 * guile/scm-type.c (tyscm_scm_to_type): New function.
3807
3808 2017-03-15 Doug Evans <dje@google.com>
3809
3810 PR python/17728, python/18439, python/18779
3811 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
3812 member. Change type of TYPE member to PyObject *. All uses updated.
3813 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
3814 (gdbpy_create_lazy_string_object): Flag bad length values.
3815 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
3816 Handle typedefs in incoming type.
3817 (stpy_lazy_string_elt_type): New function.
3818 (gdbpy_extract_lazy_string): Call it.
3819 * python/py-value.c (valpy_lazy_string): Flag bad length values.
3820 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
3821 typedefs in incoming type.
3822
3823 2017-03-16 Doug Evans <dje@google.com>
3824
3825 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
3826 * guile/scm-type.c (tyscm_scm_to_type): New function.
3827
3828 2017-03-16 Jiong Wang <jiong.wang@arm.com>
3829
3830 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
3831 "ULONGEST" for "skip".
3832
3833 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
3834
3835 PR gdb/21220
3836 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
3837 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
3838 (inf_ptrace_peek_poke): ...here. New function. Now also loop
3839 over ptrace peek/poke until end of buffer or error.
3840
3841 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
3842
3843 * parse.c (length_of_subexp): Make static.
3844 * parser-defs.h (length_of_subexp): Remove.
3845
3846 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
3847
3848 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
3849 as well.
3850
3851 2017-03-14 Pedro Alves <palves@redhat.com>
3852
3853 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
3854 (main): Use std::unique_ptr. Remove calls to
3855 cp_demangled_name_parse_free.
3856
3857 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3858
3859 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
3860 alphabsd_store_inferior_registers): Use regcache->ptid instead
3861 of inferior_ptid.
3862
3863 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3864
3865 * aix-thread.c (aix_thread_fetch_registers,
3866 aix_thread_store_registers): Use regcache->ptid instead of
3867 inferior_ptid.
3868
3869 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3870
3871 * aarch64-linux-nat.c (fetch_gregs_from_thread,
3872 store_gregs_to_thread, fetch_fpregs_from_thread,
3873 store_fpregs_to_thread): Use regcache->ptid instead of
3874 inferior_ptid.
3875
3876 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3877
3878 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
3879 amd64_linux_fetch_inferior_registers): Use regcache->ptid
3880 instead of inferior_ptid.
3881
3882 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3883
3884 * target.c (target_fetch_registers, target_store_registers): Add
3885 assert.
3886
3887 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3888
3889 * regcache.h (regcache_get_ptid): New function.
3890 * regcache.c (regcache_get_ptid): New function.
3891
3892 2017-03-13 Mark Wielaard <mark@klomp.org>
3893
3894 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
3895
3896 2017-03-10 Keith Seitz <keiths@redhat.com>
3897
3898 PR c++/8218
3899 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
3900
3901 2017-03-08 Pedro Alves <palves@redhat.com>
3902
3903 PR gdb/18360
3904 * infrun.c (start_step_over, do_target_resume, resume)
3905 (restart_threads): Assert we're not resuming a thread that is
3906 meant to be stopped.
3907 (infrun_thread_stop_requested_callback): Delete.
3908 (infrun_thread_stop_requested): If the thread is internally
3909 stopped, queue a pending stop event and clear the thread's
3910 inline-frame state.
3911 (handle_stop_requested): New function.
3912 (handle_syscall_event, handle_inferior_event_1): Use
3913 handle_stop_requested.
3914 (handle_stop_requested): New function.
3915 (handle_signal_stop): Set the thread's stop_signal here instead of
3916 at caller.
3917 (finish_step_over): Clear step over info unconditionally.
3918 (handle_signal_stop): If the user had interrupted the event
3919 thread, consider the stop a random signal.
3920 (handle_signal_stop) <signal arrived while stepping over
3921 breakpoint>: Don't restart threads here.
3922 (stop_waiting): Don't clear step-over info here.
3923
3924 2017-03-08 Pedro Alves <palves@redhat.com>
3925
3926 PR 21206
3927 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
3928 goes to argument 2, not 1.
3929
3930 2017-03-08 Pedro Alves <palves@redhat.com>
3931
3932 PR cli/21218
3933 * top.c (gdb_readline_wrapper): Avoid passing NULL to
3934 display_gdb_prompt.
3935 (command_line_input): Add comment.
3936
3937 2017-03-08 Pedro Alves <palves@redhat.com>
3938
3939 PR tui/21216
3940 * tui/tui-file.c (tui_file::write): New.
3941 * tui/tui-file.h (tui_file): Override "write".
3942 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
3943 factored out from ...
3944 (tui_puts): ... here.
3945 (tui_putc): Use them.
3946 (tui_write): New function.
3947 * tui/tui-io.h (tui_write): Declare.
3948
3949 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3950
3951 * Makefile.in (SFILES): Replace "environ.c" with
3952 "common/environ.c".
3953 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
3954 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
3955 to...
3956 * common/environ.c: ... here.
3957 * environ.h: Moved to...
3958 * common/environ.h: ... here.
3959
3960 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
3961
3962 * gdbarch.sh (pstring_ptr): New static function.
3963 (gdbarch_disassembler_options): Use it.
3964 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
3965 not valid_disassembler_option->name.
3966 * gdbarch.c: Regenerate.
3967
3968 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
3969
3970 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
3971
3972 2017-03-07 Pedro Alves <palves@redhat.com>
3973
3974 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
3975
3976 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
3977
3978 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
3979 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
3980 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
3981 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
3982
3983 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
3984
3985 * xtensa-linux-nat.c (fetch_gregs): Remove const.
3986
3987 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
3988
3989 * remote.c (remote_add_target_side_commands): Use range-based
3990 for loop.
3991
3992 2017-03-03 Yao Qi <yao.qi@linaro.org>
3993
3994 PR gdb/21165
3995 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
3996 value is lazy.
3997 * valprint.c (common_val_print): Likewise.
3998
3999 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
4000
4001 * NEWS: Mention new set/show disassembler-options commands.
4002 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
4003 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
4004 (prospective_options): New static variable.
4005 (gdb_disassembler::gdb_disassembler): Initialize
4006 m_di.disassembler_options.
4007 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
4008 (get_disassembler_options): New function.
4009 (set_disassembler_options): Likewise.
4010 (set_disassembler_options_sfunc): Likewise.
4011 (show_disassembler_options_sfunc): Likewise.
4012 (disassembler_options_completer): Likewise.
4013 (_initialize_disasm): Likewise.
4014 * disasm.h (get_disassembler_options): New prototype.
4015 (set_disassembler_options): Likewise.
4016 * gdbarch.sh (gdbarch_disassembler_options): New variable.
4017 (gdbarch_verify_disassembler_options): Likewise.
4018 * gdbarch.c: Regenerate.
4019 * gdbarch.h: Likewise.
4020 * arm-tdep.c (num_disassembly_options): Delete.
4021 (set_disassembly_style): Likewise.
4022 (arm_disassembler_options): New static variable.
4023 (set_disassembly_style_sfunc): Convert short style name into long
4024 option name. Call set_disassembler_options.
4025 (show_disassembly_style_sfunc): New function.
4026 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
4027 set_gdbarch_verify_disassembler_options.
4028 (_initialize_arm_tdep): Delete regnames variable and update callers.
4029 (arm_disassembler_options): Initialize.
4030 (disasm_options): New variable.
4031 (num_disassembly_options): Rename from this...
4032 (num_disassembly_styles): ...to this. Compute by scanning through
4033 disasm_options.
4034 (valid_disassembly_styles): Initialize using disasm_options.
4035 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
4036 set_arm_regname_option.
4037 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
4038 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
4039 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
4040 set_gdbarch_verify_disassembler_options.
4041 * s390-tdep.c (s390_disassembler_options): New static variable.
4042 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
4043 set_gdbarch_verify_disassembler_options.
4044
4045 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
4046
4047 * remote.c (remote_add_target_side_condition): Remove "struct"
4048 keyword from range-based for loop.
4049
4050 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
4051
4052 * remote.c (remote_add_target_side_condition): Use range-based
4053 for loop. Update comment.
4054
4055 2017-02-27 Yao Qi <yao.qi@linaro.org>
4056
4057 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
4058
4059 2017-02-26 Alan Hayward <alan.hayward@arm.com>
4060
4061 * regcache.c (regcache_raw_update): New function.
4062 (regcache_raw_read): Move code to regcache_raw_update.
4063 * regcache.h (regcache_raw_update): New declaration.
4064 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
4065
4066 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
4067
4068 * dwarf2read.c (create_debug_type_hash_table): Initialize
4069 header.signature and header.type_offset_in_tu.
4070
4071 2017-02-24 Pedro Alves <palves@redhat.com>
4072
4073 * symtab.c (make_file_symbol_completion_list_1): Use
4074 add_symtab_completions.
4075
4076 2017-02-24 Alan Hayward <alan.hayward@arm.com>
4077
4078 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
4079
4080 2017-02-24 Alan Hayward <alan.hayward@arm.com>
4081
4082 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
4083 I386_MAX_REGISTER_SIZE.
4084 (i386_pseudo_register_write): Likewise.
4085 (i386_process_record): Likewise.
4086 * i387-tdep.c (i387_supply_xsave): Likewise.
4087 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
4088 (store_register): Likewise.
4089
4090 2017-02-23 Pedro Alves <palves@redhat.com>
4091
4092 * ada-lang.c: Include "common/function-view.h".
4093 (ada_iterate_over_symbols): Adjust to use function_view as
4094 callback type.
4095 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
4096 (ada_make_symbol_completion_list): Use a lambda.
4097 (ada_exc_search_name_matches): Delete.
4098 (name_matches_regex): New.
4099 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
4100 * compile/compile-c-support.c: Include "common/function-view.h".
4101 (print_one_macro): Change prototype to accept a ui_file pointer.
4102 (write_macro_definitions): Use a lambda.
4103 * dwarf2read.c: Include "common/function-view.h".
4104 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
4105 (dw2_expand_symtabs_matching): Adjust to use function_view as
4106 callback type.
4107 * language.h: Include "common/function-view.h".
4108 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
4109 function_view as callback type.
4110 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
4111 * linespec.c: Include "common/function-view.h".
4112 (collect_info::add_symbol): New method.
4113 (struct symbol_and_data_callback, iterate_inline_only, struct
4114 symbol_matcher_data, iterate_name_matcher): Delete.
4115 (iterate_over_all_matching_symtabs): Adjust to use function_view
4116 as callback type and lambdas.
4117 (iterate_over_file_blocks): Adjust to use function_view as
4118 callback type.
4119 (decode_compound_collector): Now a class with private fields.
4120 (decode_compound_collector::release_symbols): New method.
4121 (collect_one_symbol): Rename to...
4122 (decode_compound_collector::operator()): ... this and adjust.
4123 (lookup_prefix_sym): decode_compound_collector construction bits
4124 move to decode_compound_collector ctor. Pass the
4125 decode_compound_collector object directly as callback. Remove
4126 cleanups and use decode_compound_collector::release_symbols
4127 instead.
4128 (symtab_collector): Now a class with private fields.
4129 (symtab_collector::release_symtabs): New method.
4130 (add_symtabs_to_list): Rename to...
4131 (symtab_collector::operator()): ... this and adjust.
4132 (collect_symtabs_from_filename): symtab_collector construction
4133 bits move to symtab_collector ctor. Pass the symtab_collector
4134 object directly as callback. Remove cleanups and use
4135 symtab_collector::release_symtabs instead.
4136 (collect_symbols): Delete.
4137 (add_matching_symbols_to_info): Use lambdas.
4138 * macrocmd.c (print_macro_callback): Delete.
4139 (info_macro_command): Use a lambda.
4140 (info_macros_command): Pass print_macro_definition as callable
4141 directly.
4142 (print_one_macro): Remove 'ignore' parameter.
4143 (macro_list_command): Adjust.
4144 * macrotab.c (macro_for_each_data::fn): Now a function_view.
4145 (macro_for_each_data::user_data): Delete field.
4146 (foreach_macro): Adjust to call the function_view.
4147 (macro_for_each): Adjust to use function_view as callback type.
4148 (foreach_macro_in_scope): Adjust to call the function_view.
4149 (macro_for_each_in_scope): Adjust to use function_view as callback
4150 type.
4151 * macrotab.h: Include "common/function-view.h".
4152 (macro_callback_fn): Declare a prototype instead of a pointer.
4153 Remove "user_data" parameter.
4154 (macro_for_each, macro_for_each_in_scope): Adjust to use
4155 function_view as callback type.
4156 * psymtab.c (partial_map_expand_apply)
4157 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
4158 Adjust to use function_view as callback type and to return bool.
4159 (psym_expand_symtabs_matching): Adjust to use function_view as
4160 callback types.
4161 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
4162 to use function_view as callback type and to return bool.
4163 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
4164 callback types.
4165 * symfile.c (expand_symtabs_matching): Adjust to use function_view
4166 as callback types.
4167 * symfile.h: Include "common/function-view.h".
4168 (expand_symtabs_file_matcher_ftype)
4169 (expand_symtabs_symbol_matcher_ftype)
4170 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
4171 return bool.
4172 (quick_symbol_functions::map_symtabs_matching_filename)
4173 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
4174 function_view as callback type and return bool.
4175 (expand_symtabs_matching): Adjust to use function_view as callback
4176 type.
4177 (maintenance_expand_name_matcher)
4178 (maintenance_expand_file_matcher): Delete.
4179 (maintenance_expand_symtabs): Use lambdas.
4180 * symtab.c (iterate_over_some_symtabs): Adjust to use
4181 function_view as callback types and return bool.
4182 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
4183 of a cleanup.
4184 (lookup_symtab_callback): Delete.
4185 (lookup_symtab): Use a lambda.
4186 (iterate_over_symbols): Adjust to use function_view as callback
4187 type.
4188 (struct search_symbols_data, search_symbols_file_matches)
4189 (search_symbols_name_matches): Delete.
4190 (search_symbols): Use a pair of lambdas.
4191 (struct add_name_data, add_macro_name, symbol_completion_matcher)
4192 (symtab_expansion_callback): Delete.
4193 (default_make_symbol_completion_list_break_on_1): Use lambdas.
4194 * symtab.h: Include "common/function-view.h".
4195 (iterate_over_some_symtabs): Adjust to use function_view as
4196 callback type and return bool.
4197 (iterate_over_symtabs): Adjust to use function_view as callback
4198 type.
4199 (symbol_found_callback_ftype): Remove 'data' parameter and return
4200 bool.
4201 (iterate_over_symbols): Adjust to use function_view as callback
4202 type.
4203
4204 2017-02-23 Pedro Alves <palves@redhat.com>
4205
4206 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
4207 (%.o) <unittests/%.c>: New pattern.
4208 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
4209 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
4210 * common/function-view.h: New file.
4211 * unittests/function-view-selftests.c: New file.
4212 * configure: Regenerate.
4213
4214 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
4215
4216 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
4217 inferior_ptid.
4218 * go32-nat.c (go32_thread_alive): Likewise.
4219
4220 2017-02-23 Yao Qi <yao.qi@linaro.org>
4221
4222 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
4223 delete.
4224
4225 2017-02-23 Yao Qi <yao.qi@linaro.org>
4226
4227 * varobj.c (varobj_clear_saved_item): Use delete instead of
4228 xfree.
4229 (update_dynamic_varobj_children): Likewise.
4230
4231 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4232
4233 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
4234
4235 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
4236
4237 * common/enum-flags.h (enum_flags::enum_flags): Initialize
4238 m_enum_value to 0 in default constructor.
4239
4240 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4241
4242 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
4243 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
4244 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
4245 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
4246 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
4247 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
4248 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
4249 IS_STORE_CONDITIONAL_INSN.
4250
4251 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4252
4253 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
4254
4255 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4256
4257 * NEWS (Changes since GDB 7.12): Add DWARF-5.
4258
4259 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4260
4261 * dwarf2read.c (skip_one_die, read_attribute_value)
4262 (dwarf2_const_value_attr, dump_die_shallow)
4263 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4264 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
4265
4266 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4267
4268 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
4269 (dwarf_parse_macro_header): Accept DWARF version 5.
4270 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
4271
4272 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4273
4274 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
4275 DW_AT_GNU_*.
4276 * common/common-exceptions.h (enum errors): Likewise.
4277 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
4278 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
4279 (dwarf_expr_context::execute_stack_op): Likewise.
4280 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
4281 Likewise.
4282 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
4283 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
4284 (show_entry_values_debug, call_site_to_target_addr)
4285 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
4286 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
4287 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
4288 (value_of_dwarf_block_entry, indirect_pieced_value)
4289 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
4290 (disassemble_dwarf_expression): Likewise.
4291 * dwarf2read.c (process_die, inherit_abstract_dies)
4292 (read_call_site_scope): Likewise.
4293 * gdbtypes.h (struct func_type, struct call_site_parameter)
4294 (struct call_site): Likewise.
4295 * stack.c (read_frame_arg): Likewise.
4296 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
4297
4298 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4299
4300 * defs.h (read_unsigned_leb128): New declaration.
4301 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
4302 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
4303 (dwarf2_find_location_expression): Call also
4304 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
4305 * dwarf2loc.h (dwarf2_version): New declaration.
4306 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
4307 rnglists.
4308 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
4309 .debug_rnglists.
4310 (struct dwop_section_names): Add loclists_dwo.
4311 (dwop_section_names): Add .debug_loclists.dwo.
4312 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
4313 (struct dwarf2_per_cu_data): Add dwarf_version.
4314 (struct dwo_sections): Add loclists.
4315 (struct attr_abbrev): Add implicit_const.
4316 (read_indirect_line_string): New declaration.
4317 (read_unsigned_leb128): Delete declaration.
4318 (rcuh_kind): New definition.
4319 (read_and_check_comp_unit_head): Change parameter
4320 is_debug_types_section to section_kind.
4321 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
4322 (read_comp_unit_head): Change parameter abfd to section, add parameter
4323 section_kind. Handle DWARF-5.
4324 (error_check_comp_unit_head): Accept also DWARF version 5.
4325 (read_and_check_comp_unit_head): Change parameter
4326 is_debug_types_section to section_kind.
4327 (read_and_check_type_unit_head): Delete function.
4328 (read_abbrev_offset): Handle DWARF-5.
4329 (create_debug_type_hash_table): Add parameter section_kind. Process
4330 only DW_UT_type. Use signature and type_offset_in_tu from struct
4331 comp_unit_head.
4332 (create_debug_types_hash_table): Update create_debug_type_hash_table
4333 caller.
4334 (create_all_type_units): Call create_debug_type_hash_table.
4335 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
4336 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
4337 caller.
4338 (skip_one_die): Handle DW_FORM_implicit_const.
4339 (dwarf2_rnglists_process): New function.
4340 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
4341 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
4342 (read_attribute_value): Handle DW_FORM_implicit_const,
4343 DW_FORM_line_strp.
4344 (read_attribute): Handle DW_FORM_implicit_const.
4345 (read_indirect_string_at_offset_from): New function from
4346 read_indirect_string_at_offset.
4347 (read_indirect_string_at_offset): Call
4348 read_indirect_string_at_offset_from.
4349 (read_indirect_line_string_at_offset): New function.
4350 (read_indirect_string): New function comment.
4351 (read_indirect_line_string): New function.
4352 (read_unsigned_leb128): Make it global.
4353 (dwarf2_string_attr): Handle DWARF-5.
4354 (add_include_dir_stub, read_formatted_entries): New functions.
4355 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
4356 Handle DWARF-5.
4357 (per_cu_header_read_in): Update read_comp_unit_head caller.
4358 (dwarf2_version): New function.
4359 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
4360 rnglists.
4361 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
4362 fields.
4363
4364 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4365
4366 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
4367
4368 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4369
4370 * dwarf2read.c (dwarf2_ranges_process): New function from
4371 dwarf2_ranges_read.
4372 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
4373 dwarf2_ranges_process.
4374
4375 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4376
4377 * dwarf2read.c (create_debug_type_hash_table): New function from
4378 create_debug_types_hash_table.
4379 (create_debug_types_hash_table): Call create_debug_type_hash_table.
4380 (create_all_type_units, open_and_init_dwo_file): Update
4381 create_debug_types_hash_table callers.
4382
4383 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
4384
4385 PR gdb/16188
4386 * fork-child.c (trace_start_error): Fix thinko. va_end should
4387 refer to 'ap', not 'args'.
4388
4389 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
4390 Pedro Alves <palves@redhat.com>
4391
4392 PR gdb/16188
4393 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
4394 calls succeeded.
4395 * fork-child.c (trace_start_error): New function.
4396 (trace_start_error_with_name): Likewise.
4397 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
4398 * inf-ptrace.c (inf_ptrace_me): Likewise.
4399 * inferior.h (trace_start_error): New prototype.
4400 (trace_start_error_with_name): Likewise.
4401
4402 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
4403
4404 PR gdb/21164
4405 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
4406 NULL before using it.
4407 * symmisc.c (maintenance_print_symbols): Likewise.
4408 (maintenance_print_msymbols): Likewise.
4409
4410 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4411
4412 * NEWS: Add record Python bindings entry.
4413
4414 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4415
4416 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
4417 py-record-full.o.
4418 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
4419 * python/py-record-btrace.c, python/py-record-btrace.h,
4420 python/py-record-full.c, python/py-record-full.h: New file.
4421 * python/py-record.c: Add include for py-record-btrace.h and
4422 py-record-full.h.
4423 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
4424 recpy_instruction_history, recpy_function_call_history, recpy_begin,
4425 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
4426 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
4427 New definition.
4428 (gdbpy_initialize_btrace): New export.
4429 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
4430
4431 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4432
4433 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
4434 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
4435 * python/py-record.c: New file.
4436 * python/python-internal.h (gdbpy_start_recording,
4437 gdbpy_current_recording, gdpy_stop_recording,
4438 gdbpy_initialize_record): New export.
4439 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
4440 (python_GdbMethods): Add gdbpy_start_recording,
4441 gdbpy_current_recording and gdbpy_stop_recording.
4442
4443 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4444
4445 * record-btrace.c (record_btrace_record_method): New function.
4446 (init_record_btrace_ops): Initialize to_record_method.
4447 * record-full.c (record_full_record_method): New function.
4448 (init_record_full_ops, init_record_full_core_ops): Add
4449 record_full_record_method.
4450 * record.h (enum record_method): New enum.
4451 * target-debug.h (target_debug_print_enum_record_method: New define.
4452 * target-delegates.c: Regenerate.
4453 * target.c (target_record_method): New function.
4454 * target.h: Include record.h.
4455 (struct target_ops) <to_record_method>: New field.
4456 (target_record_method): New export.
4457
4458 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4459
4460 * record.h (record_start, record_stop): New export.
4461 * record.c (record_start, record_stop): New function.
4462
4463 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4464
4465 * btrace.c (btrace_fetch): Copy function call segments pointer
4466 into a vector.
4467 (btrace_clear): Clear the vector.
4468 (btrace_find_insn_by_number): Use binary search to find the correct
4469 function call segment.
4470 * btrace.h (brace_fun_p): New typedef.
4471 (struct btrace_thread_info) <functions>: New field.
4472
4473 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4474
4475 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
4476 * btrace.c (btrace_decode_error): ... here. New function.
4477 * btrace.h (btrace_decode_error): New export.
4478
4479 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4480
4481 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
4482 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
4483 btrace_find_insn_by_number): Remove special case for gaps.
4484 * btrace.h (btrace_insn_get_error): New export.
4485 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
4486 * record-btrace.c (btrace_insn_history): Print number for gaps.
4487 (record_btrace_info, record_btrace_goto): Handle gaps.
4488
4489 2017-02-14 Tom Tromey <tom@tromey.com>
4490
4491 PR python/13598:
4492 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
4493 event.
4494 * python/py-evts.c (gdbpy_initialize_py_events): Add
4495 before_prompt registry.
4496 * python/py-events.h (events_object) <before_prompt>: New field.
4497
4498 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
4499
4500 * btrace.c (ftrace_new_switch): Preserve up link and flags.
4501
4502 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
4503
4504 * symfile (_initialize_symfile): Add usage text to the load command's
4505 help text.
4506
4507 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
4508
4509 * utils.c (defaulted_query): Don't query on secondary UIs.
4510
4511 2017-02-10 Tom Tromey <tom@tromey.com>
4512
4513 * rust-lang.c (rust_get_disr_info): Remove unused variable.
4514
4515 2017-02-10 Tom Tromey <tom@tromey.com>
4516
4517 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
4518 "cleanup" local.
4519 * python/py-type.c (typy_legacy_template_argument): Remove
4520 unnecessary "cleanup" local.
4521
4522 2017-02-10 Tom Tromey <tom@tromey.com>
4523
4524 * python/python.c (do_start_initialization): New function, from
4525 _initialize_python.
4526 (_initialize_python): Call do_start_initialization.
4527 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
4528 goto.
4529
4530 2017-02-10 Tom Tromey <tom@tromey.com>
4531
4532 * python/py-prettyprint.c (pretty_print_one_value): Use
4533 gdbpy_ref.
4534
4535 2017-02-10 Tom Tromey <tom@tromey.com>
4536
4537 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
4538 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
4539 gdbpy_ref.
4540 * python/py-type.c (field_new): Use gdbpy_ref.
4541 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
4542 gdbpy_ref.
4543 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
4544 (py_free_pspace): Likewise.
4545 (pspace_to_pspace_object): Likewise.
4546 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
4547 (py_free_objfile): Likewise.
4548 (objfile_to_objfile_object): Likewise.
4549 * python/py-inferior.c (delete_thread_object): Use
4550 gdbpy_ref.
4551 (infpy_read_memory): Likewise.
4552 (py_free_inferior): Likewise.
4553 * python/py-evtregistry.c (create_eventregistry_object): Use
4554 gdbpy_ref.
4555 * python/py-event.c (create_event_object): Use gdbpy_ref.
4556
4557 2017-02-10 Tom Tromey <tom@tromey.com>
4558
4559 * python/py-ref.h (gdbpy_ref_policy): Now a template.
4560 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
4561 used.
4562 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
4563 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
4564 python/py-exitedevent.c, python/py-finishbreakpoint.c,
4565 python/py-framefilter.c, python/py-function.c,
4566 python/py-inferior.c, python/py-infevents.c,
4567 python/py-linetable.c, python/py-newobjfileevent.c,
4568 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
4569 python/py-signalevent.c, python/py-stopevent.c,
4570 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
4571 python/py-unwind.c, python/py-utils.c, python/py-value.c,
4572 python/py-varobj.c, python/py-xmethods.c, python/python.c,
4573 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
4574
4575 2017-02-10 Tom Tromey <tom@tromey.com>
4576
4577 * ui-out.h (ui_out_emit_type): New class.
4578 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
4579 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
4580 and ui_out_emit_tuple.
4581 (enumerate_locals): Likewise.
4582 (py_mi_print_variables, py_print_locals, py_print_args): Use
4583 ui_out_emit_list.
4584 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
4585 ui_out_emit_list.
4586 * common/gdb_optional.h: New file.
4587
4588 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
4589
4590 * MAINTAINERS (Write After Approval): Update my e-mail address.
4591
4592 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
4593
4594 PR gdb/21122
4595 * breakpoint.c (_initialize_breakpoint): Update the help description
4596 of the 'commands' command to indicate that it takes a list argument.
4597
4598 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
4599
4600 * interps.c (current_interp_set_logging): Remove "return".
4601
4602 2017-02-09 Gary Benson <gbenson@redhat.com>
4603
4604 * symtab.c (add_symtab_completions): Prevent NULL pointer
4605 dereference.
4606
4607 2017-02-08 Pedro Alves <palves@redhat.com>
4608
4609 * interps.c (interp::interp): Remove reference to quiet_p.
4610 (interp_set): Make static. Remove dead "Switching to" output
4611 code.
4612 (interp_quiet_p, interp_set_quiet): Delete.
4613 (interpreter_exec_cmd): Don't set the interpreter quiet.
4614 * interps.h (interp_quiet_p): Make static.
4615 (class interp) <quiet_p>: Remove field
4616
4617 2017-02-08 Jerome Guitton <guitton@adacore.com>
4618
4619 * cli/cli-decode.c (find_command_name_length): Make it extern.
4620 * cli/cli-decode.h (find_command_name_length): Declare.
4621 * cli/cli-script.c (command_name_equals, line_first_arg):
4622 New functions.
4623 (process_next_line): Use cli-decode to parse command names.
4624 (build_command_line): Make args a constant pointer.
4625
4626 2017-02-08 Jerome Guitton <guitton@adacore.com>
4627
4628 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
4629 Remove case-insensitive search.
4630
4631 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
4632
4633 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
4634 at the end of the line. Avoids an ARI warning.
4635
4636 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
4637
4638 * NEWS: Mention support for record/replay of Intel 64 rdrand and
4639 rdseed instructions.
4640 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
4641
4642 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
4643
4644 PR tdep/20936
4645 Provide and use sparc32 and sparc64 target description XML files.
4646 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
4647 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
4648 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
4649 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
4650 * features/sparc/sparc32-solaris.xml: New file.
4651 * features/sparc/sparc64-solaris.xml: New file.
4652 * features/sparc/sparc32-solaris.c: Generated.
4653 * features/sparc/sparc64-solaris.c: Generated.
4654 * sparc-tdep.h: Account for differences in target descriptions.
4655 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
4656 (sparc32_register_type): Use target provided registers.
4657 (validate_tdesc_registers): New function.
4658 (sparc32_gdbarch_init): Use tdesc_has_registers.
4659 Set pseudoregister functions.
4660 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
4661 (sparc64_register_type): Use target provided registers.
4662 (sparc64_init_abi): Set pseudoregister functions.
4663
4664 2017-02-03 Tom Tromey <tom@tromey.com>
4665
4666 PR rust/21097:
4667 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
4668 with a single member.
4669
4670 2017-02-03 Pedro Alves <palves@redhat.com>
4671
4672 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
4673 (cli_interp_base::~cli_interp_base): New.
4674 (cli_interp): New struct.
4675 (as_cli_interp): Cast the interp itself to cli_interp.
4676 (cli_interpreter_pre_command_loop): Rename to ...
4677 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
4678 parameter.
4679 (cli_interpreter_init): Rename to ...
4680 (cli_interp::init): ... this. Remove 'self' parameter. Use
4681 boolean. Make extern.
4682 (cli_interpreter_resume): Rename to ...
4683 (cli_interp::resume): ... this. Remove 'data' parameter. Make
4684 extern.
4685 (cli_interpreter_suspend): Rename to ...
4686 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
4687 extern.
4688 (cli_interpreter_exec): Rename to ...
4689 (cli_interp::exec): ... this. Remove 'data' parameter. Make
4690 extern.
4691 (cli_interpreter_supports_command_editing): Rename to ...
4692 (cli_interp_base::supports_command_editing): ... this. Remove
4693 'interp' parameter. Make extern.
4694 (cli_ui_out): Rename to ...
4695 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
4696 Make extern.
4697 (cli_set_logging): Rename to ...
4698 (cli_interp_base::set_logging): ... this. Remove 'interp'
4699 parameter. Make extern.
4700 (cli_interp_procs): Delete.
4701 (cli_interp_factory): Adjust to use "new".
4702 * cli/cli-interp.h: Include "interps.h".
4703 (struct cli_interp_base): New struct.
4704 * interps.c (struct interp): Delete. Fields moved to interps.h.
4705 (interp_new): Delete.
4706 (interp::interp, interp::~interp): New.
4707 (interp_set): Use bool, and return void. Assume the interpreter
4708 has suspend, init and resume methods, and that the all return
4709 void.
4710 (set_top_level_interpreter): interp_set returns void.
4711 (interp_ui_out): Adapt.
4712 (current_interp_set_logging): Adapt.
4713 (interp_data): Delete.
4714 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
4715 (interp_exec): Adapt.
4716 (top_level_interpreter_data): Delete.
4717 * interps.h (interp_init_ftype, interp_resume_ftype)
4718 (interp_suspend_ftype, interp_exec_ftype)
4719 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
4720 (class interp): New.
4721 (interp_new): Delete.
4722 (interp_set): Now returns void. Use bool.
4723 (interp_data, top_level_interpreter_data): Delete.
4724 * mi/mi-common.h: Include interps.h.
4725 (class mi_interp): Inherit from interp. Define a ctor. Declare
4726 init, resume, suspect, exec, interp_ui_out, set_logging and
4727 pre_command_loop methods.
4728 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
4729 (mi_interpreter_init): Rename to ...
4730 (mi_interp::init): ... this. Remove the 'interp' parameter, use
4731 bool, return void and make extern. Adjust.
4732 (mi_interpreter_resume): ... Rename to ...
4733 (mi_interp::resume): ... this. Remove the 'data' parameter,
4734 return void and make extern. Adjust.
4735 (mi_interpreter_suspend): ... Rename to ...
4736 (mi_interp::suspend): ... this. Remove the 'data' parameter,
4737 return void and make extern. Adjust.
4738 (mi_interpreter_exec): ... Rename to ...
4739 (mi_interp::exec): ... this. Remove the 'data' parameter and make
4740 extern. Adjust.
4741 (mi_interpreter_pre_command_loop): ... Rename to ...
4742 (mi_interp::pre_command_loop): ... this. Remove the 'self'
4743 parameter and make extern.
4744 (mi_on_normal_stop_1): Adjust.
4745 (mi_ui_out): Rename to ...
4746 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
4747 parameter and make extern. Adjust.
4748 (mi_set_logging): Rename to ...
4749 (mi_interp::set_logging): ... this. Remove the 'interp'
4750 parameter and make extern. Adjust.
4751 (mi_interp_procs): Delete.
4752 (mi_interp_factory): Adjust to use 'new'.
4753 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
4754 (mi_print_exception, mi_execute_command, mi_load_progress):
4755 Adjust.
4756 * tui/tui-interp.c (tui_interp): New class.
4757 (as_tui_interp): Return a tui_interp pointer.
4758 (tui_on_normal_stop, tui_on_signal_received)
4759 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
4760 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
4761 to use interp::interp_ui_out.
4762 (tui_init): Rename to ...
4763 (tui_interp::init): ... this. Remove the 'self' parameter, use
4764 bool, return void and make extern. Adjust.
4765 (tui_resume): Rename to ...
4766 (tui_interp::resume): ... this. Remove the 'data' parameter,
4767 return void and make extern. Adjust.
4768 (tui_suspend): Rename to ...
4769 (tui_interp::suspend): ... this. Remove the 'data' parameter,
4770 return void and make extern. Adjust.
4771 (tui_ui_out): Rename to ...
4772 (tui_interp::interp_ui_out): ... this. Remove the 'self'
4773 parameter, and make extern. Adjust.
4774 (tui_exec): Rename to ...
4775 (tui_interp::exec): ... this. Remove the 'data' parameter and
4776 make extern.
4777 (tui_interp_procs): Delete.
4778 (tui_interp_factory): Use "new".
4779
4780 2017-02-02 Tom Tromey <tom@tromey.com>
4781
4782 * rust-exp.y (ends_raw_string, space_then_number)
4783 (rust_identifier_start_p): Return bool.
4784 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
4785 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
4786 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
4787 (rust_chartype_p): Return bool.
4788 (val_print_struct, rust_print_struct_def, rust_print_type):
4789 Update.
4790 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
4791 Return bool.
4792
4793 2017-02-02 Tom Tromey <tom@tromey.com>
4794
4795 * rust-lang.c: Reindent.
4796
4797 2017-02-02 Tom Tromey <tom@tromey.com>
4798
4799 * rust-lang.h (rust_crate_for_block): Update.
4800 * rust-lang.c (rust_crate_for_block): Return std::string.
4801 (rust_get_disr_info): Use std:;string, not
4802 gdb::unique_xmalloc_ptr.
4803 * rust-exp.y (crate_name): Update.
4804
4805 2017-02-02 Pedro Alves <palves@redhat.com>
4806
4807 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
4808 field out of gdb_disassembler_test and make it static.
4809
4810 2017-02-02 Pedro Alves <palves@redhat.com>
4811
4812 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
4813 mi1_interp and mi_interp fields.
4814
4815 2017-02-02 Pedro Alves <palves@redhat.com>
4816
4817 * cli/cli-interp.c (struct saved_output_files, saved_output):
4818 Moved from cli/cli-logging.c.
4819 (cli_set_logging): New function.
4820 (cli_interp_procs): Install cli_set_logging.
4821 * cli/cli-interp.h (make_logging_output, cli_set_logging):
4822 Declare.
4823 * cli/cli-logging.c (struct saved_output_files, saved_output):
4824 Moved to cli/cli-interp.c.
4825 (pop_output_files): Don't save outputs here.
4826 (make_logging_output): New function.
4827 (handle_redirections): Don't build tee nor save previous outputs
4828 here.
4829 * interps.c (current_interp_set_logging): Change prototype.
4830 Assume there's always a set_logging_proc method installed.
4831 * interps.h (interp_set_logging_ftype): Change prototype.
4832 (current_interp_set_logging): Change prototype and adjust comment.
4833 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
4834 use make_logging_output.
4835 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
4836 2017-02-02 Pedro Alves <palves@redhat.com>
4837
4838 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
4839 from ...
4840 (set_logging_overwrite): ... here.
4841 (logging_no_redirect_file): Delete.
4842 (set_logging_redirect): Don't handle redirection on the fly.
4843 Instead warn that "logging off" / "logging on" is necessary.
4844 (pop_output_files): Delete references to logging_no_redirect_file.
4845 (show_logging_command): Always speak in terms of what will happen
4846 once logging is reenabled.
4847
4848 2017-02-02 Pedro Alves <palves@redhat.com>
4849
4850 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
4851
4852 2017-02-02 Pedro Alves <palves@redhat.com>
4853
4854 * disasm.c (gdb_pretty_print_insn): Rename to ...
4855 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
4856 Remove gdbarch parameter. Adapt to clear the object's buffers
4857 instead of allocating new buffers, and to print using the object's
4858 gdb_disassembler instead of calling gdb_print_insn.
4859 (dump_insns): Use gdb_pretty_print_disassembler.
4860 * disasm.h (gdb_pretty_print_insn): Delete declaration.
4861 (gdb_pretty_print_disassembler): New class.
4862 * record-btrace.c (btrace_insn_history): Use
4863 gdb_pretty_print_disassembler.
4864
4865 2017-02-02 Pedro Alves <palves@redhat.com>
4866
4867 * ada-lang.c (type_as_string): Use string_file.
4868 * ada-valprint.c (ada_print_floating): Use string_file.
4869 * ada-varobj.c (ada_varobj_scalar_image)
4870 (ada_varobj_get_value_image): Use string_file.
4871 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
4872 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
4873 * breakpoint.c (update_inserted_breakpoint_locations)
4874 (insert_breakpoint_locations, reattach_breakpoints)
4875 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
4876 (print_it_watchpoint): Use string_file.
4877 (save_breakpoints): Use stdio_file.
4878 * c-exp.y (oper): Use string_file.
4879 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
4880 tee_file.
4881 (pop_output_files): Use delete.
4882 (handle_redirections): Use stdio_file and tee_file.
4883 * cli/cli-setshow.c (do_show_command): Use string_file.
4884 * compile/compile-c-support.c (c_compute_program): Use
4885 string_file.
4886 * compile/compile-c-symbols.c (generate_vla_size): Take a
4887 'string_file &' instead of a 'ui_file *'.
4888 (generate_c_for_for_one_variable): Take a 'string_file &' instead
4889 of a 'ui_file *'. Use string_file.
4890 (generate_c_for_variable_locations): Take a 'string_file &'
4891 instead of a 'ui_file *'.
4892 * compile/compile-internal.h (generate_c_for_for_one_variable):
4893 Take a 'string_file &' instead of a 'ui_file *'.
4894 * compile/compile-loc2c.c (push, pushf, unary, binary)
4895 (print_label, pushf_register_address, pushf_register)
4896 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
4897 'ui_file *'. Adjust.
4898 * compile/compile.c (compile_to_object): Use string_file.
4899 * compile/compile.h (compile_dwarf_expr_to_c)
4900 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
4901 'ui_file *'.
4902 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
4903 (replace_typedefs_qualified_name): Use string_file and
4904 obstack_copy0.
4905 * disasm.c (gdb_pretty_print_insn): Use string_file.
4906 (gdb_disassembly): Adjust reference the null_stream global.
4907 (do_ui_file_delete): Delete.
4908 (gdb_insn_length): Use null_stream.
4909 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
4910 * dwarf2loc.c (dwarf2_compile_property_to_c)
4911 (locexpr_generate_c_location, loclist_generate_c_location): Take a
4912 'string_file &' instead of a 'ui_file *'.
4913 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
4914 * dwarf2read.c (do_ui_file_peek_last): Delete.
4915 (dwarf2_compute_name): Use string_file.
4916 * event-top.c (gdb_setup_readline): Use stdio_file.
4917 * gdbarch.sh (verify_gdbarch): Use string_file.
4918 * gdbtypes.c (safe_parse_type): Use null_stream.
4919 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
4920 string_file.
4921 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
4922 'string_file *' instead of a 'ui_file *'.
4923 (gdbscm_arch_disassemble): Use string_file.
4924 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
4925 * guile/scm-ports.c (class ioscm_file_port): Now a class that
4926 inherits from ui_file.
4927 (ioscm_file_port_delete, ioscm_file_port_rewind)
4928 (ioscm_file_port_put): Delete.
4929 (ioscm_file_port_write): Rename to ...
4930 (ioscm_file_port::write): ... this. Remove file_port_magic
4931 checks.
4932 (ioscm_file_port_new): Delete.
4933 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
4934 ui_file_up.
4935 * guile/scm-type.c (tyscm_type_name): Use string_file.
4936 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
4937 Use string_file.
4938 * infcmd.c (print_return_value_1): Use string_file.
4939 * infrun.c (print_target_wait_results): Use string_file.
4940 * language.c (add_language): Use string_file.
4941 * location.c (explicit_to_string_internal): Use string_file.
4942 * main.c (captured_main_1): Use null_file.
4943 * maint.c (maintenance_print_architecture): Use stdio_file.
4944 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
4945 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
4946 event_channel>: Change type to mi_console_file pointer.
4947 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
4948 (mi_console_file_delete): Delete.
4949 (struct mi_console_file): Delete.
4950 (mi_console_file_magic): Delete.
4951 (mi_console_file_new): Delete.
4952 (mi_console_file::mi_console_file): New.
4953 (mi_console_file_delete): Delete.
4954 (mi_console_file_fputs): Delete.
4955 (mi_console_file::write): New.
4956 (mi_console_raw_packet): Delete.
4957 (mi_console_file::flush): New.
4958 (mi_console_file_flush): Delete.
4959 (mi_console_set_raw): Rename to ...
4960 (mi_console_file::set_raw): ... this.
4961 * mi/mi-console.h (class mi_console_file): New class.
4962 (mi_console_file_new, mi_console_set_raw): Delete.
4963 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
4964 (mi_set_logging): Use delete and tee_file. Adjust.
4965 * mi/mi-main.c (output_register): Use string_file.
4966 (mi_cmd_data_evaluate_expression): Use string_file.
4967 (mi_cmd_data_read_memory): Use string_file.
4968 (mi_cmd_execute, print_variable_or_computed): Use string_file.
4969 * mi/mi-out.c (mi_ui_out::main_stream): New.
4970 (mi_ui_out::rewind): Use main_stream and
4971 string_file.
4972 (mi_ui_out::put): Use main_stream and string_file.
4973 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
4974 Allocate a 'string_file' instead.
4975 (mi_out_new): Don't allocate a mem_fileopen stream here.
4976 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
4977 (mi_ui_out::main_stream): Declare method.
4978 * printcmd.c (eval_command): Use string_file.
4979 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
4980 * python/py-arch.c (archpy_disassemble): Use string_file.
4981 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
4982 * python/py-frame.c (frapy_str): Use string_file.
4983 * python/py-framefilter.c (py_print_type, py_print_single_arg):
4984 Use string_file.
4985 * python/py-type.c (typy_str): Use string_file.
4986 * python/py-unwind.c (unwind_infopy_str): Use string_file.
4987 * python/py-value.c (valpy_str): Use string_file.
4988 * record-btrace.c (btrace_insn_history): Use string_file.
4989 * regcache.c (regcache_print): Use stdio_file.
4990 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
4991 * remote.c (escape_buffer): Use string_file.
4992 * rust-lang.c (rust_get_disr_info): Use string_file.
4993 * serial.c (serial_open_ops_1): Use stdio_file.
4994 (do_serial_close): Use delete.
4995 * stack.c (print_frame_arg): Use string_file.
4996 (print_frame_args): Remove local mem_fileopen stream, not used.
4997 (print_frame): Use string_file.
4998 * symmisc.c (maintenance_print_symbols): Use stdio_file.
4999 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
5000 Take a 'string_file *' instead of a 'ui_file *'.
5001 * top.c (new_ui): Use stdio_file and stderr_file.
5002 (free_ui): Use delete.
5003 (execute_command_to_string): Use string_file.
5004 (quit_confirm): Use string_file.
5005 * tracepoint.c (collection_list::append_exp): Use string_file.
5006 * tui/tui-disasm.c (tui_disassemble): Use string_file.
5007 * tui/tui-file.c: Don't include "ui-file.h".
5008 (enum streamtype, struct tui_stream): Delete.
5009 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
5010 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
5011 (tui_file::tui_file): New method.
5012 (tui_file_fputs): Delete.
5013 (tui_file_get_strbuf): Delete.
5014 (tui_file::puts): New method.
5015 (tui_file_adjust_strbuf): Delete.
5016 (tui_file_flush): Delete.
5017 (tui_file::flush): New method.
5018 * tui/tui-file.h: Tweak intro comment.
5019 Include ui-file.h.
5020 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
5021 (tui_file_adjust_strbuf): Delete declarations.
5022 (class tui_file): New class.
5023 * tui/tui-io.c (tui_initialize_io): Use tui_file.
5024 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
5025 (tui_register_format): Use string_stream.
5026 * tui/tui-stack.c (tui_make_status_line): Use string_file.
5027 (tui_get_function_from_frame): Use string_file.
5028 * typeprint.c (type_to_string): Use string_file.
5029 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
5030 (null_stream): New global.
5031 (ui_file_delete): Delete.
5032 (ui_file::ui_file): New.
5033 (null_file_isatty): Delete.
5034 (ui_file::~ui_file): New.
5035 (null_file_rewind): Delete.
5036 (ui_file::printf): New.
5037 (null_file_put): Delete.
5038 (null_file_flush): Delete.
5039 (ui_file::putstr): New.
5040 (null_file_write): Delete.
5041 (ui_file::putstrn): New.
5042 (null_file_read): Delete.
5043 (ui_file::putc): New.
5044 (null_file_fputs): Delete.
5045 (null_file_write_async_safe): Delete.
5046 (ui_file::vprintf): New.
5047 (null_file_delete): Delete.
5048 (null_file::write): New.
5049 (null_file_fseek): Delete.
5050 (null_file::puts): New.
5051 (ui_file_data): Delete.
5052 (null_file::write_async_safe): New.
5053 (gdb_flush, ui_file_isatty): Adjust.
5054 (ui_file_put, ui_file_rewind): Delete.
5055 (ui_file_write): Adjust.
5056 (ui_file_write_for_put): Delete.
5057 (ui_file_write_async_safe, ui_file_read): Adjust.
5058 (ui_file_fseek): Delete.
5059 (fputs_unfiltered): Adjust.
5060 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
5061 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
5062 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
5063 (set_ui_file_data): Delete.
5064 (string_file::~string_file, string_file::write)
5065 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
5066 (do_ui_file_as_string, ui_file_as_string): Delete.
5067 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
5068 (struct mem_file): Delete.
5069 (mem_file_new): Delete.
5070 (stdio_file::stdio_file): New.
5071 (mem_file_delete): Delete.
5072 (stdio_file::stdio_file): New.
5073 (mem_fileopen): Delete.
5074 (stdio_file::~stdio_file): New.
5075 (mem_file_rewind): Delete.
5076 (stdio_file::set_stream): New.
5077 (mem_file_put): Delete.
5078 (stdio_file::open): New.
5079 (mem_file_write): Delete.
5080 (stdio_file_magic, struct stdio_file): Delete.
5081 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
5082 (stdio_file::flush): New.
5083 (stdio_file_read): Rename to ...
5084 (stdio_file::read): ... this. Adjust.
5085 (stdio_file_write): Rename to ...
5086 (stdio_file::write): ... this. Adjust.
5087 (stdio_file_write_async_safe): Rename to ...
5088 (stdio_file::write_async_safe) ... this. Adjust.
5089 (stdio_file_fputs): Rename to ...
5090 (stdio_file::puts) ... this. Adjust.
5091 (stdio_file_isatty): Delete.
5092 (stdio_file_fseek): Delete.
5093 (stdio_file::isatty): New.
5094 (stderr_file_write): Rename to ...
5095 (stderr_file::write) ... this. Adjust.
5096 (stderr_file_fputs): Rename to ...
5097 (stderr_file::puts) ... this. Adjust.
5098 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
5099 (stderr_file::stderr_file): New.
5100 (tee_file_magic): Delete.
5101 (struct tee_file): Delete.
5102 (tee_file::tee_file): New.
5103 (tee_file_new): Delete.
5104 (tee_file::~tee_file): New.
5105 (tee_file_delete): Delete.
5106 (tee_file_flush): Rename to ...
5107 (tee_file::flush): ... this. Adjust.
5108 (tee_file_write): Rename to ...
5109 (tee_file::write): ... this. Adjust.
5110 (tee_file::write_async_safe): New.
5111 (tee_file_fputs): Rename to ...
5112 (tee_file::puts): ... this. Adjust.
5113 (tee_file_isatty): Rename to ...
5114 (tee_file::isatty): ... this. Adjust.
5115 * ui-file.h (struct obstack, struct ui_file): Don't
5116 forward-declare.
5117 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
5118 (ui_file_write_ftype)
5119 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
5120 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
5121 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
5122 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
5123 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
5124 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
5125 (set_ui_file_fseek): Delete.
5126 (ui_file_data, ui_file_delete, ui_file_rewind)
5127 (struct ui_file): New.
5128 (ui_file_up): New.
5129 (class null_file): New.
5130 (null_stream): Declare.
5131 (ui_file_write_for_put, ui_file_put): Delete.
5132 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
5133 Delete.
5134 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
5135 (gdb_fopen, tee_file_new): Delete.
5136 (struct string_file): New.
5137 (struct stdio_file): New.
5138 (stdio_file_up): New.
5139 (struct stderr_file): New.
5140 (class tee_file): New.
5141 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
5142 of a 'ui_file *'. Adjust.
5143 * ui-out.h (class ui_out) <field_stream>: Likewise.
5144 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
5145 (null_stream): Delete.
5146 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
5147 Adjust.
5148 * utils.h (struct ui_file): Delete forward declaration..
5149 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
5150 (error_stream): Take a 'string_file &' instead of a
5151 'ui_file *'.
5152 * varobj.c (varobj_value_get_print_value): Use string_file.
5153 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
5154 * gdbarch.c: Regenerate.
5155
5156 2017-02-02 Pedro Alves <palves@redhat.com>
5157
5158 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
5159 (gdb_pretty_print_insn): ... this. Now a free function. Add back
5160 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
5161 Adjust to call gdb_print_insn instead of
5162 gdb_disassembler::print_insn.
5163 (dump_insns, do_mixed_source_and_assembly_deprecated)
5164 (do_mixed_source_and_assembly, do_assembly_only): Add back a
5165 'gdbarch' parameter. Remove gdb_disassembler parameter.
5166 (gdb_disassembly): Don't allocate a gdb_disassembler here.
5167 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
5168 declaration.
5169 (gdb_pretty_print_insn): Re-add declaration.
5170 * record-btrace.c (btrace_insn_history): Don't allocate a
5171 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
5172
5173 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
5174
5175 * disasm.h (gdb_disassembly): Remove file_string parameter.
5176 * disasm.c (gdb_disassembly): Likewise.
5177 * cli/cli-cmds.c (print_disassembly): Adapt.
5178 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
5179 * stack.c (do_gdb_disassembly): Likewise.
5180
5181 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
5182
5183 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
5184 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
5185 targets. And if the implicit value is longer than needed, extract
5186 the first bytes instead of the "least significant" ones.
5187
5188 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
5189
5190 * btrace.c (btrace_enable): Do not call btrace_add_pc for
5191 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
5192 (btrace_fetch): Assert can_access_registers_ptid.
5193 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
5194 validate_registers_access.
5195
5196 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
5197
5198 * gdbthread.h (can_access_registers_ptid): New.
5199 * thread.c (can_access_registers_ptid): New.
5200
5201 2017-02-01 Pedro Alves <palves@redhat.com>
5202
5203 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
5204
5205 2017-01-31 Pedro Alves <palves@redhat.com>
5206
5207 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
5208 Fix typos.
5209
5210 2017-01-31 Pedro Alves <palves@redhat.com>
5211
5212 * stack.c (print_frame_args): Remove local mem_fileopen stream,
5213 not used.
5214
5215 2017-01-31 Pedro Alves <palves@redhat.com>
5216
5217 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
5218
5219 2017-01-31 Pedro Alves <palves@redhat.com>
5220
5221 * common/scoped_restore.h
5222 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
5223 change the value's parameter type to T2.
5224 (make_scoped_restore): Likewise.
5225
5226 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5227 Richard Henderson <rth@redhat.com>
5228
5229 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
5230 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
5231 GS_BASE for older kernels.
5232 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
5233 GS_BASE for older kernels.
5234 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
5235 and GS_BASE to the offset table.
5236 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
5237 system register group.
5238 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
5239 for older kernels.
5240 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
5241 amd64 ABI.
5242 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
5243 AMD64_GSBASE_REGNUM.
5244 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
5245 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
5246 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
5247 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
5248 i386/64bit-segments.xml in those rules.
5249 * features/i386/64bit-segments.xml: New file.
5250 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
5251 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
5252 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
5253 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
5254 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
5255 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
5256 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
5257 * features/i386/amd64-avx-linux.c: Regenerated.
5258 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
5259 * features/i386/amd64-avx-mpx.c: Regenerated.
5260 * features/i386/amd64-avx512-linux.c: Regenerated.
5261 * features/i386/amd64-linux.c: Regenerated.
5262 * features/i386/amd64-mpx-linux.c: Regenerated.
5263 * features/i386/i386-avx-mpx-linux.c: Regenerated.
5264 * features/i386/i386-avx-mpx.c: Regenerated.
5265 * features/i386/x32-avx-linux.c: Regenerated.
5266 * features/i386/x32-avx512-linux.c: Regenerated.
5267 * regformats/i386/amd64-avx-linux.dat: Regenerated.
5268 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
5269 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
5270 * regformats/i386/amd64-linux.dat: Regenerated.
5271 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
5272 * regformats/i386/x32-avx-linux.dat: Regenerated.
5273 * regformats/i386/x32-avx512-linux.dat: Regenerated.
5274 * regformats/i386/x32-linux.dat: Regenerated.
5275
5276 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5277
5278 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
5279 Set to AMD64_NUM_REGS.
5280
5281 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5282
5283 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
5284 that checks validity of a register number.
5285
5286 2017-01-27 Kees Cook <keescook@google.com>
5287
5288 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
5289 fetch_fpregs if target has fpa registers.
5290 (arm_linux_store_inferior_registers): Call store_fpregs if target
5291 has fpa registers.
5292
5293 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
5294
5295 * cris-tdep.c (cris_gdbarch_init): Remove check for
5296 info.byte_order and force it to BFD_ENDIAN_LITTLE.
5297
5298 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
5299
5300 * corelow.c (get_core_register_section): Check for regset
5301 existence before checking for REGSET_VARIABLE_SIZE.
5302
5303 2017-01-26 Yao Qi <yao.qi@linaro.org>
5304 Pedro Alves <palves@redhat.com>
5305
5306 PR gdb/20939
5307 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
5308 call memory_error, save memaddr instead.
5309 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
5310 negative, cal memory_error.
5311 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
5312
5313 2017-01-26 Yao Qi <yao.qi@linaro.org>
5314
5315 * disasm-selftests.c (memory_error_test): New function.
5316 (_initialize_disasm_selftests): Register memory_error_test.
5317
5318 2017-01-26 Yao Qi <yao.qi@linaro.org>
5319
5320 * Makefile.in (SFILES): Add disasm-selftests.c and
5321 selftest-arch.c.
5322 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
5323 * disasm-selftests.c: New file.
5324 * selftest-arch.c: New file.
5325 * selftest-arch.h: New file.
5326
5327 2017-01-26 Yao Qi <yao.qi@linaro.org>
5328
5329 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
5330 to bfd_arch_mep. Don't return 0 if section is not
5331 found. Call print_insn_mep.
5332
5333 2017-01-26 Pedro Alves <palves@redhat.com>
5334 Yao Qi <yao.qi@linaro.org>
5335
5336 * arm-tdep.c: Include "disasm.h".
5337 (gdb_print_insn_arm): Update code to get gdbarch.
5338 * disasm.c (dis_asm_read_memory): Change it to
5339 gdb_disassembler::dis_asm_read_memory.
5340 (dis_asm_memory_error): Likewise.
5341 (dis_asm_print_address): Likewise.
5342 (gdb_pretty_print_insn): Change it to
5343 gdb_disassembler::pretty_print_insn.
5344 (dump_insns): Add one argument gdb_disassemlber. All
5345 callers updated.
5346 (do_mixed_source_and_assembly_deprecated): Likewise.
5347 (do_mixed_source_and_assembly): Likewise.
5348 (do_assembly_only): Likewise.
5349 (gdb_disassembler::gdb_disassembler): New.
5350 (gdb_disassembler::print_insn): New.
5351 * disasm.h (class gdb_disassembler): New.
5352 (gdb_pretty_print_insn): Remove declaration.
5353 (gdb_disassemble_info): Likewise.
5354 * guile/scm-disasm.c (class gdbscm_disassembler): New.
5355 (gdbscm_disasm_read_memory_worker): Update.
5356 (gdbscm_disasm_read_memory): Update.
5357 (gdbscm_disasm_memory_error): Remove.
5358 (gdbscm_disasm_print_address): Remove.
5359 (gdbscm_disassembler::gdbscm_disassembler): New.
5360 (gdbscm_print_insn_from_port): Update.
5361 * mips-tdep.c: Include disasm.h.
5362 (gdb_print_insn_mips): Update code to get gdbarch.
5363 * record-btrace.c (btrace_insn_history): Update.
5364 * spu-tdep.c: Include disasm.h.
5365 (struct spu_dis_asm_data): Remove.
5366 (struct spu_dis_asm_info): New.
5367 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
5368 SPU id.
5369 (gdb_print_insn_spu): Cast disassemble_info to
5370 spu_dis_asm_info.
5371
5372 2017-01-26 Yao Qi <yao.qi@linaro.org>
5373
5374 * disasm.c (do_ui_file_delete): Delete.
5375 (gdb_insn_length): Move code creating stream to ...
5376 * utils.c (null_stream): ... here. New function.
5377 * utils.h (null_stream): Declare.
5378
5379 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
5380
5381 * python/py-inferior.c (find_thread_object): Return directly
5382 from the loop. Remove "found" variable.
5383
5384 2017-01-21 Joel Brobecker <brobecker@adacore.com>
5385
5386 GDB 7.12.1 released.
5387
5388 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
5389
5390 * python/py-function.c (fnpy_call): Reorder declarations to have
5391 the gdbpy_enter object declared first.
5392 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
5393
5394 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
5395
5396 PR python/21068
5397 * python/python-internal.h (PyMem_RawMalloc): Define for
5398 Python < 3.4.
5399 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
5400 PyMem_RawMalloc instead of PyMem_Malloc.
5401
5402 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
5403 Luis Machado <lgustavo@codesourcery.com>
5404
5405 * NEWS (New commands): Mention flash-erase.
5406 (New MI commands): Mention target-flash-erase.
5407 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
5408 command.
5409 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
5410 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
5411 * target.c (flash_erase_command): New function.
5412 (initialize_targets): Add new flash-erase command.
5413 * target.h (flash_erase_command): New declaration.
5414
5415 2017-01-20 Joel Brobecker <brobecker@adacore.com>
5416
5417 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
5418 HAVE_SYS_PROCFS_H is defined.
5419
5420 2017-01-18 Alan Hayward <alan.hayward@arm.com>
5421
5422 * remote.c (struct cached_reg): Change data into a pointer.
5423 * (stop_reply_dtr): Free data pointers before deleting vector.
5424 (process_stop_reply): Likewise.
5425 (remote_parse_stop_reply): Allocate space for data
5426
5427 2017-01-18 Alan Hayward <alan.hayward@arm.com>
5428
5429 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
5430 MAX_REGISTER_SIZE.
5431 (amd64_pseudo_register_read_value): Likewise.
5432 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
5433 (store_register_using_P): Likewise.
5434 * regcache.c (regcache_xfer_part): Likewise.
5435
5436 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
5437
5438 Split real and pseudo registers.
5439 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
5440 (sparc32_pseudo_regnum): New enum.
5441 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
5442 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
5443 (SPARC32_CP0_REGISTERS): New macro.
5444 (sparc32_pseudo_register_name): New function.
5445 (sparc32_register_name): Use sparc32_pseudo_register_name.
5446 (sparc32_pseudo_register_type): New function.
5447 (sparc32_register_type): Use sparc32_pseudo_register_type.
5448 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
5449 pseudo register numbers.
5450 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
5451 (SPARC64_CP0_REGISTERS): New macro.
5452 (sparc64_pseudo_register_name): New function.
5453 (sparc64_register_name): Use sparc64_pseudo_register_name.
5454 (sparc64_pseudo_register_type): New function.
5455 (sparc64_register_type): Use sparc64_pseudo_register_type.
5456 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
5457 pseudo register numbers.
5458 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
5459 sparc64_store_arguments): Handle pseudo register numbers.
5460
5461 2017-01-13 Yao Qi <yao.qi@linaro.org>
5462
5463 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
5464 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
5465 output.
5466 (getpkt_or_notif_sane_1): Likewise.
5467
5468 2017-01-13 Yao Qi <yao.qi@linaro.org>
5469
5470 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
5471 of CC. Pass "-x c++-header" instead of "-x c".
5472
5473 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
5474
5475 * remote.c (remote_can_async_p): Update comment.
5476
5477 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
5478
5479 * linux-nat.c (linux_nat_can_async_p): Update comment.
5480
5481 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
5482
5483 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
5484
5485 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
5486
5487 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
5488
5489 2017-01-10 Tom Tromey <tom@tromey.com>
5490
5491 * python/py-type.c (typy_legacy_template_argument): Update.
5492 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
5493 ~demangle_parse_info): Declare new members.
5494 (cp_demangled_name_to_comp): Return unique_ptr.
5495 (cp_demangled_name_parse_free)
5496 (make_cleanup_cp_demangled_name_parse_free)
5497 (cp_new_demangle_parse_info): Remove.
5498 * cp-support.c (do_demangled_name_parse_free_cleanup)
5499 (make_cleanup_cp_demangled_name_parse_free): Remove.
5500 (inspect_type, cp_canonicalize_string_full)
5501 (cp_canonicalize_string): Update.
5502 (mangled_name_to_comp): Change return type.
5503 (cp_class_name_from_physname, method_name_from_physname)
5504 (cp_func_name, cp_remove_params): Update.
5505 * cp-name-parser.y (demangle_parse_info): New constructor, from
5506 cp_new_demangle_parse_info.
5507 (~demangle_parse_info): New destructor, from
5508 cp_demangled_name_parse_free.
5509 (cp_merge_demangle_parse_infos): Update.
5510 (cp_demangled_name_to_comp): Change return type.
5511
5512 2017-01-10 Tom Tromey <tom@tromey.com>
5513
5514 * top.c (prevent_dont_repeat): Change return type.
5515 * python/python.c (execute_gdb_command): Use std::string.
5516 Update.
5517 * guile/guile.c (gdbscm_execute_gdb_command): Update.
5518 * command.h (prevent_dont_repeat): Change return type.
5519 * breakpoint.c (bpstat_do_actions_1): Update.
5520
5521 2017-01-10 Tom Tromey <tom@tromey.com>
5522
5523 * value.h (scoped_value_mark::~scoped_value_mark): Call
5524 free_to_mark.
5525 (scoped_value_mark::free_to_mark): New method.
5526 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
5527 scoped_value_mark.
5528
5529 2017-01-10 Tom Tromey <tom@tromey.com>
5530
5531 * python/py-value.c (valpy_dereference, valpy_referenced_value)
5532 (valpy_reference_value, valpy_const_value, valpy_get_address)
5533 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
5534 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
5535 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
5536 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
5537 scoped_value_mark.
5538 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
5539 * value.h (scoped_value_mark): New class.
5540
5541 2017-01-10 Tom Tromey <tom@tromey.com>
5542
5543 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
5544 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
5545 * psymtab.c (discard_psymtabs_upto): Remove.
5546 (make_cleanup_discard_psymtabs): Remove.
5547 (struct psymtab_state): Remove.
5548
5549 2017-01-10 Tom Tromey <tom@tromey.com>
5550
5551 * record-full.c (record_full_save_cleanups): Remove.
5552 (record_full_save): Use gdb::unlinker.
5553 * gcore.c (do_bfd_delete_cleanup): Remove.
5554 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
5555 cleanups.
5556 * dwarf2read.c (unlink_if_set): Remove.
5557 (write_psymtabs_to_index): Use gdb::unlinker.
5558 * common/gdb_unlinker.h: New file.
5559
5560 2017-01-10 Tom Tromey <tom@tromey.com>
5561
5562 * windows-tdep.c (windows_xfer_shared_library): Update.
5563 * windows-nat.c (windows_make_so): Update.
5564 * utils.h (make_cleanup_bfd_unref): Remove.
5565 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
5566 * symfile.h (symfile_bfd_open)
5567 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
5568 * symfile.c (read_symbols, symbol_file_add)
5569 (separate_debug_file_exists): Update.
5570 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
5571 (generic_load, reread_symbols): Update.
5572 * symfile-mem.c (symbol_file_add_from_memory): Update.
5573 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
5574 (spu_symbol_file_add_from_memory): Update.
5575 * solist.h (struct target_so_ops) <bfd_open>: Return
5576 gdb_bfd_ref_ptr.
5577 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
5578 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
5579 gdb_bfd_ref_ptr.
5580 (solib_map_sections, reload_shared_libraries_1): Update.
5581 * solib-svr4.c (enable_break): Update.
5582 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
5583 * solib-frv.c (enable_break2): Update.
5584 * solib-dsbt.c (enable_break): Update.
5585 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
5586 gdb_bfd_ref_ptr.
5587 (darwin_solib_get_all_image_info_addr_at_init): Update.
5588 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
5589 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
5590 * record-full.c (record_full_save): Update.
5591 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
5592 * procfs.c (insert_dbx_link_bpt_in_file): Update.
5593 * minidebug.c (find_separate_debug_file_in_section): Return
5594 gdb_bfd_ref_ptr.
5595 * machoread.c (macho_add_oso_symfile): Change abfd to
5596 gdb_bfd_ref_ptr.
5597 (macho_symfile_read_all_oso): Update.
5598 (macho_check_dsym): Return gdb_bfd_ref_ptr.
5599 (macho_symfile_read): Update.
5600 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
5601 (jit_bfd_try_read_symtab): Update.
5602 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5603 (gdb_bfd_openw, gdb_bfd_openr_iovec)
5604 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
5605 gdb_bfd_ref_ptr.
5606 (gdb_bfd_ref_policy): New struct.
5607 (gdb_bfd_ref_ptr): New typedef.
5608 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5609 (gdb_bfd_openw, gdb_bfd_openr_iovec)
5610 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
5611 gdb_bfd_ref_ptr.
5612 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
5613 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
5614 (gcore_command): Update.
5615 * exec.c (exec_file_attach): Update.
5616 * elfread.c (elf_symfile_read): Update.
5617 * dwarf2read.c (dwarf2_get_dwz_file): Update.
5618 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
5619 (open_and_init_dwo_file): Update.
5620 (open_dwp_file): Return gdb_bfd_ref_ptr.
5621 (open_and_init_dwp_file): Update.
5622 * corelow.c (core_open): Update.
5623 * compile/compile-object-load.c (compile_object_load): Update.
5624 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
5625 * coffread.c (coff_symfile_read): Update.
5626 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
5627 gdb_bfd_ref_ptr. Rename.
5628 (dump_bfd_file, restore_command): Update.
5629 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
5630 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
5631 (find_separate_debug_file_by_buildid): Update.
5632
5633 2017-01-10 Tom Tromey <tom@tromey.com>
5634
5635 * common/gdb_ref_ptr.h: New file.
5636 * python/py-ref.h (struct gdbpy_ref_policy): New.
5637 (gdbpy_ref): Now a typedef.
5638
5639 2017-01-10 Tom Tromey <tom@tromey.com>
5640
5641 * utils.h (make_cleanup_htab_delete): Don't declare.
5642 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
5643 Remove.
5644 * linespec.c (decode_compound_collector): Add constructor,
5645 destructor.
5646 (lookup_prefix_sym): Remove cleanup.
5647 (symtab_collector): Add constructor, destructor.
5648 (collect_symtabs_from_filename): Remove cleanup.
5649 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
5650 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5651 Use htab_up.
5652 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
5653 * dwarf2read.c (dw2_expand_symtabs_matching)
5654 (dw2_map_symbol_filenames, dwarf_decode_macros)
5655 (write_psymtabs_to_index): Use htab_up.
5656 * dwarf2loc.c (func_verify_no_selftailcall)
5657 (call_site_find_chain_1, func_verify_no_selftailcall)
5658 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
5659 std::vector, gdb::unique_xmalloc_ptr.
5660 (call_sitep): Remove typedef.
5661 (dwarf2_locexpr_baton_eval): Remove unused variable.
5662
5663 2017-01-10 Tom Tromey <tom@tromey.com>
5664
5665 * python/python-internal.h (make_cleanup_py_decref)
5666 (make_cleanup_py_xdecref): Don't declare.
5667 * python/py-utils.c (py_decref, make_cleanup_py_decref)
5668 (py_xdecref, make_cleanup_py_xdecref): Remove.
5669
5670 2017-01-10 Tom Tromey <tom@tromey.com>
5671
5672 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
5673 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
5674
5675 2017-01-10 Tom Tromey <tom@tromey.com>
5676
5677 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
5678
5679 2017-01-10 Tom Tromey <tom@tromey.com>
5680
5681 * python/py-utils.c (unicode_to_encoded_string)
5682 (python_string_to_target_string)
5683 (python_string_to_target_python_string)
5684 (python_string_to_host_string, gdbpy_obj_to_string)
5685 (get_addr_from_python): Use gdbpy_ref.
5686
5687 2017-01-10 Tom Tromey <tom@tromey.com>
5688
5689 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
5690 gdbpy_ref.
5691
5692 2017-01-10 Tom Tromey <tom@tromey.com>
5693
5694 * python/python.c (eval_python_command, gdbpy_decode_line)
5695 (gdbpy_run_events, gdbpy_start_type_printers)
5696 (gdbpy_apply_type_printers): Use gdbpy_ref.
5697
5698 2017-01-10 Tom Tromey <tom@tromey.com>
5699
5700 * python/py-param.c (get_doc_string, compute_enum_values): Use
5701 gdbpy_ref.
5702
5703 2017-01-10 Tom Tromey <tom@tromey.com>
5704
5705 * python/py-inferior.c (find_thread_object, build_inferior_list):
5706 Use gdbpy_ref.
5707
5708 2017-01-10 Tom Tromey <tom@tromey.com>
5709
5710 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
5711
5712 2017-01-10 Tom Tromey <tom@tromey.com>
5713
5714 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
5715 gdbpy_ref.
5716
5717 2017-01-10 Tom Tromey <tom@tromey.com>
5718
5719 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
5720 extra incref.
5721 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
5722 Use gdbpy_ref.
5723
5724 2017-01-10 Tom Tromey <tom@tromey.com>
5725
5726 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
5727 gdbpy_ref.
5728
5729 2017-01-10 Tom Tromey <tom@tromey.com>
5730
5731 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
5732 decref results of PyArg_ParseTupleAndKeywords.
5733
5734 2017-01-10 Tom Tromey <tom@tromey.com>
5735
5736 * python/python.c (python_run_simple_file): Use
5737 unique_xmalloc_ptr, gdbpy_ref.
5738
5739 2017-01-10 Tom Tromey <tom@tromey.com>
5740
5741 * python/py-prettyprint.c (print_stack_unless_memory_error)
5742 (print_string_repr, print_children): Use gdbpy_ref.
5743 (dummy_python_frame): New class.
5744 (dummy_python_frame::dummy_python_frame): Rename from
5745 push_dummy_python_frame.
5746 (py_restore_tstate): Remove.
5747
5748 2017-01-10 Tom Tromey <tom@tromey.com>
5749
5750 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
5751
5752 2017-01-10 Tom Tromey <tom@tromey.com>
5753
5754 * python/python.c (ensure_python_env, restore_python_env):
5755 Remove.
5756 * python/python-internal.h (ensure_python_env): Don't declare.
5757 * varobj.h (varobj_ensure_python_env): Don't declare.
5758 * varobj.c (varobj_ensure_python_env): Remove.
5759
5760 2017-01-10 Tom Tromey <tom@tromey.com>
5761
5762 * varobj.c (varobj_value_get_print_value): Use
5763 gdbpy_enter_varobj.
5764
5765 2017-01-10 Tom Tromey <tom@tromey.com>
5766
5767 * python/py-prettyprint.c (print_string_repr, print_children):
5768 Update.
5769 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
5770 of "encoding".
5771 * varobj.c (varobj_value_get_print_value): Update.
5772 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
5773
5774 2017-01-10 Tom Tromey <tom@tromey.com>
5775
5776 * varobj.c (varobj_get_display_hint)
5777 (dynamic_varobj_has_child_method, install_new_value_visualizer)
5778 (varobj_set_visualizer, free_variable): Use
5779 gdbpy_enter_varobj.
5780
5781 2017-01-10 Tom Tromey <tom@tromey.com>
5782
5783 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
5784 (do_finish_initialization): New function. Use gdbpy_ref.
5785 (gdbpy_finish_initialization): Use gdbpy_enter. Call
5786 do_finish_initialization.
5787
5788 2017-01-10 Tom Tromey <tom@tromey.com>
5789
5790 * python/py-param.c (get_set_value, get_show_value): Use
5791 gdbpy_enter, gdbpy_ref.
5792
5793 2017-01-10 Tom Tromey <tom@tromey.com>
5794
5795 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
5796
5797 2017-01-10 Tom Tromey <tom@tromey.com>
5798
5799 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
5800
5801 2017-01-10 Tom Tromey <tom@tromey.com>
5802
5803 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
5804 Use gdbpy_enter_varobj.
5805
5806 2017-01-10 Tom Tromey <tom@tromey.com>
5807
5808 * varobj.c (gdbpy_enter_varobj): New constructor.
5809 * python/python-internal.h (gdbpy_enter_varobj): New class.
5810 * python/py-varobj.c (py_varobj_get_iterator): Use
5811 gdbpy_enter_varobj.
5812
5813 2017-01-10 Tom Tromey <tom@tromey.com>
5814
5815 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
5816 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
5817 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
5818 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
5819 unique_xmalloc_ptr.
5820 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
5821
5822 2017-01-10 Tom Tromey <tom@tromey.com>
5823
5824 * python/py-xmethods.c (invoke_match_method): Use
5825 gdbpy_ref.
5826
5827 2017-01-10 Tom Tromey <tom@tromey.com>
5828
5829 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
5830 gdbpy_enter, gdbpy_ref.
5831
5832 2017-01-10 Tom Tromey <tom@tromey.com>
5833
5834 * python/python.c (python_interactive_command): Use gdbpy_enter.
5835
5836 2017-01-10 Tom Tromey <tom@tromey.com>
5837
5838 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
5839 gdbpy_ref.
5840
5841 2017-01-10 Tom Tromey <tom@tromey.com>
5842
5843 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
5844 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
5845
5846 2017-01-10 Tom Tromey <tom@tromey.com>
5847
5848 * utils.h (htab_deleter): New struct.
5849 (htab_up): New typedef.
5850 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
5851 gdbpy_enter, gdbpy_ref, htab_up.
5852
5853 2017-01-10 Tom Tromey <tom@tromey.com>
5854
5855 * python/py-unwind.c (pending_frame_invalidate): Remove.
5856 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
5857
5858 2017-01-10 Tom Tromey <tom@tromey.com>
5859
5860 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
5861 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
5862
5863 2017-01-10 Tom Tromey <tom@tromey.com>
5864
5865 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
5866
5867 2017-01-10 Tom Tromey <tom@tromey.com>
5868
5869 * python/python.c (gdbpy_eval_from_control_command)
5870 (gdbpy_source_script, gdbpy_run_events)
5871 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
5872 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
5873 gdbpy_enter.
5874
5875 2017-01-10 Tom Tromey <tom@tromey.com>
5876
5877 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
5878
5879 2017-01-10 Tom Tromey <tom@tromey.com>
5880
5881 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
5882
5883 2017-01-10 Tom Tromey <tom@tromey.com>
5884
5885 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
5886 (python_on_inferior_call_pre, python_on_inferior_call_post)
5887 (python_on_memory_change, python_on_register_change)
5888 (python_inferior_exit, python_new_objfile, add_thread_object)
5889 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
5890
5891 2017-01-10 Tom Tromey <tom@tromey.com>
5892
5893 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
5894 (bpfinishpy_handle_exit): Use gdbpy_enter.
5895
5896 2017-01-10 Tom Tromey <tom@tromey.com>
5897
5898 * python/py-cmd.c (cmdpy_destroyer)
5899 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
5900 gdbpy_enter.
5901
5902 2017-01-10 Tom Tromey <tom@tromey.com>
5903
5904 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
5905 gdbpy_enter.
5906 (gdbpy_breakpoint_has_cond): Likewise.
5907
5908 2017-01-10 Tom Tromey <tom@tromey.com>
5909
5910 * python/python.c (gdbpy_enter): New constructor.
5911 (~gdbpy_enter): New destructor.
5912 (restore_python_env, ensure_python_env): Rewrite.
5913 * python/python-internal.h (gdbpy_enter): New class.
5914
5915 2017-01-10 Tom Tromey <tom@tromey.com>
5916
5917 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
5918
5919 2017-01-10 Tom Tromey <tom@tromey.com>
5920
5921 * python/py-value.c (value_has_field, get_field_flag)
5922 (get_field_type, valpy_getitem, convert_value_from_python): Use
5923 gdbpy_ref.
5924
5925 2017-01-10 Tom Tromey <tom@tromey.com>
5926
5927 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
5928 gdbpy_ref.
5929
5930 2017-01-10 Tom Tromey <tom@tromey.com>
5931
5932 * python/py-prettyprint.c (search_pp_list)
5933 (find_pretty_printer_from_objfiles)
5934 (find_pretty_printer_from_progspace)
5935 (find_pretty_printer_from_gdb, find_pretty_printer)
5936 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
5937 gdbpy_ref.
5938
5939 2017-01-10 Tom Tromey <tom@tromey.com>
5940
5941 * python/py-param.c (call_doc_function): Use gdbpy_ref.
5942
5943 2017-01-10 Tom Tromey <tom@tromey.com>
5944
5945 * python/py-linetable.c (build_line_table_tuple_from_pcs)
5946 (ltpy_get_all_source_lines): Use gdbpy_ref.
5947
5948 2017-01-10 Tom Tromey <tom@tromey.com>
5949
5950 * python/py-framefilter.c (extract_sym, extract_value)
5951 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
5952 gdbpy_ref.
5953
5954 2017-01-10 Tom Tromey <tom@tromey.com>
5955
5956 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
5957
5958 2017-01-10 Tom Tromey <tom@tromey.com>
5959
5960 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
5961
5962 2017-01-10 Tom Tromey <tom@tromey.com>
5963
5964 * python/py-function.c (convert_values_to_python, fnpy_init): Use
5965 gdbpy_ref.
5966
5967 2017-01-10 Tom Tromey <tom@tromey.com>
5968
5969 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
5970
5971 2017-01-10 Tom Tromey <tom@tromey.com>
5972
5973 * python/py-type.c (convert_field, make_fielditem, typy_fields)
5974 (typy_range): Use gdbpy_ref.
5975
5976 2017-01-10 Tom Tromey <tom@tromey.com>
5977
5978 * python/py-threadevent.c (create_thread_event_object): Use
5979 gdbpy_ref.
5980 * python/py-stopevent.c (create_stop_event_object): Simplify.
5981 (emit_stop_event): Use gdbpy_ref.
5982 * python/py-signalevent.c (create_signal_event_object): Use
5983 gdbpy_ref.
5984 * python/py-newobjfileevent.c (create_new_objfile_event_object)
5985 (emit_new_objfile_event, create_clear_objfiles_event_object)
5986 (emit_clear_objfiles_event): Use gdbpy_ref.
5987 * python/py-infevents.c (create_inferior_call_event_object)
5988 (create_register_changed_event_object)
5989 (create_memory_changed_event_object, emit_inferior_call_event)
5990 (emit_memory_changed_event, emit_register_changed_event): Use
5991 gdbpy_ref.
5992 * python/py-exitedevent.c (create_exited_event_object)
5993 (emit_exited_event): Use gdbpy_ref.
5994 * python/py-event.h (evpy_emit_event): Remove
5995 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
5996 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
5997 * python/py-continueevent.c (emit_continue_event): Use
5998 gdbpy_ref.
5999 * python/py-breakpoint.c (gdbpy_breakpoint_created)
6000 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
6001 gdbpy_ref.
6002 * python/py-bpevent.c (create_breakpoint_event_object): Use
6003 gdbpy_ref.
6004
6005 2017-01-10 Tom Tromey <tom@tromey.com>
6006
6007 * python/py-ref.h: New file.
6008
6009 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
6010
6011 * cli-out.c (cli_ui_out::do_redirect): Change return type to
6012 void.
6013 * cli-out.h (cli_ui_out::do_redirect): Likewise.
6014 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
6015 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
6016 * ui-out.c (ui_out::redirect): Likewise.
6017 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
6018 * cli/cli-logging.c (set_logging_redirect): Update call site of
6019 ui_out::redirect.
6020 (handle_redirections): Likewise.
6021 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
6022 * top.c (execute_command_to_string): Likewise.
6023 * utils.c (do_ui_out_redirect_pop): Likewise.
6024
6025 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
6026
6027 * stack.c (_initialize_stack): Update "frame" command help message.
6028
6029 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
6030
6031 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
6032
6033 2017-01-06 Yao Qi <yao.qi@linaro.org>
6034
6035 * x86-linux-nat.h: Include gdb_proc_service.h.
6036
6037 2017-01-06 Yao Qi <yao.qi@linaro.org>
6038
6039 * ser-base.h: Include serial.h.
6040
6041 2017-01-06 Yao Qi <yao.qi@linaro.org>
6042
6043 * ppc-linux-tdep.h: Include ppc-tdep.h.
6044
6045 2017-01-06 Yao Qi <yao.qi@linaro.org>
6046
6047 * nat/amd64-linux-siginfo.h: Include signal.h.
6048
6049 2017-01-06 Yao Qi <yao.qi@linaro.org>
6050
6051 * nat/aarch64-linux-hw-point.h: Include break-common.h.
6052
6053 2017-01-06 Yao Qi <yao.qi@linaro.org>
6054
6055 * mi/mi-parse.h: Include mi-cmds.h.
6056
6057 2017-01-06 Yao Qi <yao.qi@linaro.org>
6058
6059 * inf-loop.c: Don't include "target.h".
6060 * inf-loop.h: Include it here.
6061
6062 2017-01-06 Yao Qi <yao.qi@linaro.org>
6063
6064 * dfp.h: Include "dboulest.h" and "expression.h".
6065
6066 2017-01-06 Yao Qi <yao.qi@linaro.org>
6067
6068 * ax-gdb.h: Include "ax.h".
6069
6070 2017-01-06 Yao Qi <yao.qi@linaro.org>
6071
6072 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
6073 with nat/gdb_ptrace.h.
6074
6075 2017-01-05 Yao Qi <yao.qi@linaro.org>
6076
6077 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
6078 new line.
6079 (mips64_fbsd_sigframe_init): Likewise.
6080
6081 2017-01-04 John Baldwin <jhb@FreeBSD.org>
6082
6083 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
6084 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
6085
6086 2017-01-04 John Baldwin <jhb@FreeBSD.org>
6087
6088 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6089 * NEWS: Mention new FreeBSD/mips native configuration.
6090 * config/mips/fbsd.mh: New file.
6091 * configure.host: Add mips*-*-freebsd*.
6092 * mips-fbsd-nat.c: New file.
6093
6094 2017-01-04 John Baldwin <jhb@FreeBSD.org>
6095
6096 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
6097 (ALLDEPFILES): Add mips-fbsd-tdep.c.
6098 * NEWS: Mention new FreeBSD/mips target.
6099 * configure.tgt: Add mips*-*-freebsd*.
6100 * mips-fbsd-tdep.c: New file.
6101 * mips-fbsd-tdep.h: New file.
6102
6103 2017-01-04 Yao Qi <yao.qi@linaro.org>
6104
6105 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
6106 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
6107
6108 2017-01-01 Joel Brobecker <brobecker@adacore.com>
6109
6110 Update copyright year range in all GDB files.
6111
6112 2017-01-01 Joel Brobecker <brobecker@adacore.com>
6113
6114 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
6115
6116 For older changes see ChangeLog-2016.
6117 \f
6118 Local Variables:
6119 mode: change-log
6120 left-margin: 8
6121 fill-column: 74
6122 version-control: never
6123 coding: utf-8
6124 End:
This page took 0.222904 seconds and 3 git commands to generate.