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