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