Replace "return" with "break"
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
256afbc2
TT
12017-05-12 Tom Tromey <tom@tromey.com>
2
3 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
4
94bb8dfe
YQ
52017-05-09 Yao Qi <yao.qi@linaro.org>
6
7 * regcache.c: Include <forward_list>.
8 (struct regcache_list): Remove.
9 (current_regcache): Update.
10 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11 (regcache_thread_ptid_changed): Likewise.
12 (registers_changed_ptid): Likewise.
13 (current_regcache_size): Likewise.
14
8248946c
YQ
152017-05-09 Yao Qi <yao.qi@linaro.org>
16
17 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
18 (current_regcache_size): New function.
19 (current_regcache_test): New function.
20 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
21
313c5961
AH
222017-05-08 Alan Hayward <alan.hayward@arm.com>
23
24 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
25 (print_gp_register_row): Use get_frame_register_value.
26
27bfc1d1
AH
272017-05-08 Alan Hayward <alan.hayward@arm.com>
28
29 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
30 (mips_supply_fpregset): Likewise.
31 (mips64_supply_gregset): Likewise.
32
146e6c5c
AH
332017-05-08 Alan Hayward <alan.hayward@arm.com>
34
35 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
36 regcache->raw_supply_zeroed.
37
e50f25ec
SDJ
382017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
39
40 * configure.nat: Rearrange 'case' statements to match
41 host before cpu.
42
21ea5acd
SDJ
432017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
44
45 * Makefile.in: Remove "@host_makefile_frag@". Add variables
46 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
47 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
48 "@nat_extra_makefile_frag@".
49 (Makefile): Remove dependency on "@frags@".
50 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
51 (data-directory/Makefile): Likewise.
52 * config/aarch64/linux.mh: Deleted; moved contents to
53 "gdb/configure.nat".
54 * config/alpha/alpha-linux.mh: Likewise.
55 * config/alpha/nbsd.mh: Likewise.
56 * config/arm/linux.mh: Likewise.
57 * config/arm/nbsdelf.mh: Likewise.
58 * config/i386/cygwin.mh: Likewise.
59 * config/i386/cygwin64.mh: Likewise.
60 * config/i386/darwin.mh: Likewise.
61 * config/i386/fbsd.mh: Likewise.
62 * config/i386/fbsd64.mh: Likewise.
63 * config/i386/go32.mh: Likewise.
64 * config/i386/i386gnu.mh: Likewise.
65 * config/i386/i386sol2.mh: Likewise.
66 * config/i386/linux.mh: Likewise.
67 * config/i386/linux64.mh: Likewise.
68 * config/i386/mingw.mh: Likewise.
69 * config/i386/mingw64.mh: Likewise.
70 * config/i386/nbsd64.mh: Likewise.
71 * config/i386/nbsdelf.mh: Likewise.
72 * config/i386/nto.mh: Likewise.
73 * config/i386/obsd.mh: Likewise.
74 * config/i386/obsd64.mh: Likewise.
75 * config/i386/sol2-64.mh: Likewise.
76 * config/ia64/linux.mh: Likewise.
77 * config/m32r/linux.mh: Likewise.
78 * config/m68k/linux.mh: Likewise.
79 * config/m68k/nbsdelf.mh: Likewise.
80 * config/m68k/obsd.mh: Likewise.
81 * config/m88k/obsd.mh: Likewise.
82 * config/mips/fbsd.mh: Likewise.
83 * config/mips/linux.mh: Likewise.
84 * config/mips/nbsd.mh: Likewise.
85 * config/mips/obsd64.mh: Likewise.
86 * config/pa/linux.mh: Likewise.
87 * config/pa/nbsd.mh: Likewise.
88 * config/pa/obsd.mh: Likewise.
89 * config/powerpc/aix.mh: Likewise.
90 * config/powerpc/fbsd.mh: Likewise.
91 * config/powerpc/linux.mh: Likewise.
92 * config/powerpc/nbsd.mh: Likewise.
93 * config/powerpc/obsd.mh: Likewise.
94 * config/powerpc/ppc64-linux.mh: Likewise.
95 * config/powerpc/spu-linux.mh: Likewise.
96 * config/s390/linux.mh: Likewise.
97 * config/sh/nbsd.mh: Likewise.
98 * config/sparc/fbsd.mh: Likewise.
99 * config/sparc/linux.mh: Likewise.
100 * config/sparc/linux64.mh: Likewise.
101 * config/sparc/nbsd64.mh: Likewise.
102 * config/sparc/nbsdelf.mh: Likewise.
103 * config/sparc/obsd64.mh: Likewise.
104 * config/sparc/sol2.mh: Likewise.
105 * config/tilegx/linux.mh: Likewise.
106 * config/vax/nbsdelf.mh: Likewise.
107 * config/vax/obsd.mh: Likewise.
108 * config/xtensa/linux.mh: Likewise.
109 * config/i386/i386gnu.mn: New file, with excerpts from
110 "config/i386/i386gnu.mh".
111 * configure: Regenerate.
112 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
113 *.mh files under "gdb/config".
114 * configure.nat: New file, with contents from the
115 "gdb/config/*/*.mh" files.
116
7ed1acaf
TW
1172017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
118
119 * btrace.c (btrace_clear): Free insn vector.
120
e13cb306
PA
1212017-05-05 Pedro Alves <palves@redhat.com>
122
123 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
124 * configure: Regenerate.
125
5ed8105e
PA
1262017-05-04 Pedro Alves <palves@redhat.com>
127
128 * Makefile.in (SFILES): Add progspace-and-thread.c.
129 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
130 (COMMON_OBS): Add progspace-and-thread.o.
131 * breakpoint.c: Include "progspace-and-thread.h".
132 (update_inserted_breakpoint_locations)
133 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
134 Use scoped_restore_current_pspace_and_thread.
135 (create_std_terminate_master_breakpoint): Use
136 scoped_restore_current_program_space.
137 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
138 (print_breakpoint_location): Use
139 scoped_restore_current_program_space.
140 (bp_loc_is_permanent): Use
141 scoped_restore_current_pspace_and_thread.
142 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
143 (download_tracepoint_locations): Use
144 scoped_restore_current_pspace_and_thread.
145 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
146 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
147 (enum step_over_calls_kind): Moved from inferior.h.
148 (class scoped_restore_current_thread): New class.
149 * gdbthread.h (make_cleanup_restore_current_thread): Delete
150 declaration.
151 (scoped_restore_current_thread): New class.
152 * infcmd.c: Include "common/gdb_optional.h".
153 (continue_1, proceed_after_attach): Use
154 scoped_restore_current_thread.
155 (notice_new_inferior): Use scoped_restore_current_thread.
156 * inferior.c: Include "progspace-and-thread.h".
157 (restore_inferior, save_current_inferior): Delete.
158 (add_inferior_command, clone_inferior_command): Use
159 scoped_restore_current_pspace_and_thread.
160 * inferior.h (scoped_restore_current_inferior): New class.
161 * infrun.c: Include "progspace-and-thread.h" and
162 "common/gdb_optional.h".
163 (follow_fork_inferior): Use
164 scoped_restore_current_pspace_and_thread.
165 (scoped_restore_exited_inferior): New class.
166 (handle_vfork_child_exec_or_exit): Use
167 scoped_restore_exited_inferior,
168 scoped_restore_current_pspace_and_thread,
169 scoped_restore_current_thread and scoped_restore.
170 (fetch_inferior_event): Use scoped_restore_current_thread.
171 * linespec.c (decode_line_full, decode_line_1): Use
172 scoped_restore_current_program_space.
173 * mi/mi-main.c: Include "progspace-and-thread.h".
174 (exec_continue): Use scoped_restore_current_thread.
175 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
176 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
177 * proc-service.c (ps_pglobal_lookup): Use
178 scoped_restore_current_program_space.
179 * progspace-and-thread.c: New file.
180 * progspace-and-thread.h: New file.
181 * progspace.c (release_program_space, clone_program_space): Use
182 scoped_restore_current_program_space.
183 (restore_program_space, save_current_program_space)
184 (save_current_space_and_thread): Delete.
185 (switch_to_program_space_and_thread): Moved to
186 progspace-and-thread.c.
187 * progspace.h (save_current_program_space)
188 (save_current_space_and_thread): Delete declarations.
189 (scoped_restore_current_program_space): New class.
190 * remote.c (remote_btrace_maybe_reopen): Use
191 scoped_restore_current_thread.
192 * symtab.c: Include "progspace-and-thread.h".
193 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
194 * thread.c (print_thread_info_1): Use
195 scoped_restore_current_thread.
196 (struct current_thread_cleanup): Delete.
197 (do_restore_current_thread_cleanup)
198 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
199 (scoped_restore_current_thread::~scoped_restore_current_thread):
200 ... this new dtor.
201 (make_cleanup_restore_current_thread): Rename/convert to ...
202 (scoped_restore_current_thread::scoped_restore_current_thread):
203 ... this new ctor.
204 (thread_apply_all_command): Use scoped_restore_current_thread.
205 (thread_apply_command): Use scoped_restore_current_thread.
206 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
207 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
208
f6223dbb
PA
2092017-05-04 Pedro Alves <palves@redhat.com>
210
211 * thread.c (make_cleanup_restore_current_thread): Move
212 find_thread_ptid call before the is_stopped call. Assert that the
213 thread is found. Replace is_stopped call by checking the thread's
214 state directly. Remove unnecessary NULL-thread check.
215
3c3ae77e
PA
2162017-05-04 Pedro Alves <palves@redhat.com>
217
218 * corelow.c (thread_section_name): New class.
219 (get_core_register_section, get_core_siginfo): Use it.
220
45eba0ab
AA
2212017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
222
223 * corelow.c (sniff_core_bfd): Remove extra semicolon.
224 (get_core_register_section): Remove xfree of NULL pointer.
225
f81fdd35
AH
2262017-05-03 Alan Hayward <alan.hayward@arm.com>
227
228 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
229 * regcache.c (regcache::raw_supply_zeroed): New function.
230 * regcache.h (regcache::raw_supply_zeroed): New declaration.
231
35837774
SM
2322017-05-03 Simon Marchi <simon.marchi@ericsson.com>
233
234 * gdbarch.sh: Remove commented out definition of
235 TARGET_CHAR_BIT.
236 * gdbarch.h: Re-generate.
237
c94fee56
SDJ
2382017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
239
240 * configure: Regenerate.
241
d17f7b36
SM
2422017-05-02 Simon Marchi <simon.marchi@ericsson.com>
243
244 * solib-target.c (solib_target_relocate_section_addresses):
245 Remove num_section_bases, num_bases, segment_bases variables.
246
b560ebd6
SM
2472017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
248
249 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
250
f2f46dfc
SM
2512017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
252
253 * solib-target.c: Include <vector>
254 (struct lm_info_target) <~lm_info_target>: Remove.
255 <segment_bases, section_bases>: Change type to
256 std::vector<CORE_ADDR>.
257 (library_list_start_segment, library_list_start_section,
258 library_list_end_library,
259 solib_target_relocate_section_addresses): Adjust.
260
a0ff9e1a
SM
2612017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
262
263 * gdbarch.sh (software_single_step): Change return type to
264 std::vector<CORE_ADDR>.
265 * gdbarch.c, gdbarch.h: Re-generate.
266 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
267 Adjust.
268 (arm_deal_with_atomic_sequence_raw): Adjust.
269 (thumb_get_next_pcs_raw): Adjust.
270 (arm_get_next_pcs_raw): Adjust.
271 (arm_get_next_pcs): Adjust.
272 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
273 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
274 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
275 (alpha_software_single_step): Adjust.
276 * alpha-tdep.h (alpha_software_single_step): Adjust.
277 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
278 * arm-tdep.c (arm_software_single_step): Adjust.
279 (arm_breakpoint_kind_from_current_state): Adjust.
280 * arm-tdep.h (arm_software_single_step): Adjust.
281 * breakpoint.c (insert_single_step_breakpoint): Adjust.
282 * cris-tdep.c (cris_software_single_step): Adjust.
283 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
284 (micromips_deal_with_atomic_sequence): Adjust.
285 (deal_with_atomic_sequence): Adjust.
286 (mips_software_single_step): Adjust.
287 * mips-tdep.h (mips_software_single_step): Adjust.
288 * moxie-tdep.c (moxie_software_single_step): Adjust.
289 * nios2-tdep.c (nios2_software_single_step): Adjust.
290 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
291 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
292 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
293 * s390-linux-tdep.c (s390_software_single_step): Adjust.
294 * sparc-tdep.c (sparc_software_single_step): Adjust.
295 * spu-tdep.c (spu_software_single_step): Adjust.
296 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
297
ea480a30
SM
2982017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
299
300 * gdbarch.sh: Use semi-colon as field separator instead of colon.
301 * gdbarch.h: Re-generate.
302
d050f7d7
TW
3032017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
304
305 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
306 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
307 * python/py-instruction.c, python/py-instruction.h: New file.
308 * python/py-record.c: Add py-instruction.h include.
309 (gdbpy_initialize_record): Make gdb.Instruction a super class of
310 gdb.RecordInstruction.
311 * python/python-internal.h: Add gdbpy_initialize_instruction
312 declaration.
313 * python/python.c (do_start_initialization): Add
314 gdbpy_initialize_instruction.
315
14f819c8
TW
3162017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
317
318 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
319 Remove.
320 (btrace_func_from_recpy_func): New function.
321 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
322 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
323 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
324 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
325 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
326 Also, use new helper functions.
327 (btpy_list_item): Use new helper functions.
328 (recpy_bt_function_call_history): Use new type name.
329 (btpy_call_getset): Remove.
330 (gdbpy_initialize_btrace): Remove code to initialize
331 gdb.BtraceFunctionCall.
332 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
333 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
334 recpy_bt_func_prev, recpy_bt_func_next): New export.
335 * python/py-record.c (recpy_func_type): New static object.
336 (recpy_func_new, recpy_func_level, recpy_func_symbol,
337 recpy_func_instructions, recpy_func_up, recpy_func_prev,
338 recpy_func_next): New function.
339 (recpy_element_hash, recpy_element_richcompare): Updated comment.
340 (recpy_func_getset): New static object.
341 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
342 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
343
0ed5da75
TW
3442017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
345
346 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
347 (btpy_object, btpy_insn_type, btpy_new): Remove.
348 (btpy_list_object): Use gdb.RecordInstruction type instead of
349 gdb.BtraceInstruction type.
350 (btrace_insn_from_recpy_insn): New function.
351 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
352 btpy_new.
353 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
354 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
355 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
356 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
357 instead of btpy_object.
358 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
359 btpy_insn_data, btpy_insn_decode): Rename to ...
360 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
361 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
362 recpy_bt_insn_decode): This. Also, use new helper functions.
363 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
364 recpy_insn_type.
365 (btpy_insn_getset): Remove.
366 (gdbpy_initialize_btrace): Remove code to initialize
367 gdb.BtraceInstruction. Use recpy_element_object.
368 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
369 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
370 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
371 * python/py-record.c (recpy_insn_type): New static object.
372 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
373 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
374 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
375 New function.
376 (recpy_insn_getset): New static object.
377 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
378 * python/py-record.h (recpy_element_object): New typedef.
379 (recpy_insn_type, recpy_insn_new): New export.
380
913aeadd
TW
3812017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
382
383 * py-record-btrace.c (btpy_insn_new): Removed.
384 (btpy_insn_or_gap_new): New function.
385 (btpy_insn_error): Removed.
386 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
387 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
388 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
389 btpy_insn_or_gap_new instead of btpy_insn_new.
390 (btpy_insn_getset): Remove btpy_insn_error.
391 * py-record.c (recpy_gap_type): New static object.
392 (recpy_gap_object): New typedef.
393 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
394 recpy_gap_reason_string): New function.
395 (recpy_gap_getset): New static object.
396 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
397 * py-record.h (recpy_gap_new): New export.
398
a3be24ad
TW
3992017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
400
401 * python/py-record.c (recpy_ptid): Remove.
402 (recpy_record_getset): Remove recpy_ptid.
403
ae20e79a
TW
4042017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
405
406 * btrace.c (btrace_fetch): Set inferior_ptid.
407 * python/py-record-btrace.c: Add "py-record.h" include.
408 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
409 recpy_bt_end, recpy_bt_instruction_history,
410 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
411 in gdb.Record object instead of current ptid.
412 * python/py-record.c: Include new "py-record.h" file.
413 (recpy_record_object): Moved to py-record.h.
414 * python/py-record.h: New file.
415
8d0050ea
TW
4162017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
417
418 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
419 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
420 indentation.
421
3f380b50
JB
4222017-05-01 Joel Brobecker <brobecker@adacore.com>
423
424 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
425 the past maintainers section.
426
07495424
YQ
4272017-04-28 Yao Qi <yao.qi@linaro.org>
428
429 * infcmd.c (get_return_value): Use regcache ctor, and remove
430 cleanup.
431
deb1fa3e
YQ
4322017-04-28 Yao Qi <yao.qi@linaro.org>
433 Pedro Alves <palves@redhat.com>
434
435 * regcache.c (regcache::regcache): New tag dispatch ctor.
436 (do_cooked_read): Moved above.
437 (regcache_dup): Use the tag dispatch ctor..
438 * regcache.h (regcache): Declare ctor, delete copy ctor and
439 assignment operator, remove friend regcache_dup.
440
b421c83c
YQ
4412017-04-28 Yao Qi <yao.qi@linaro.org>
442
443 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
444 call method save instead of regcache_cpy.
445 * regcache.h (struct regcache): Make regcache_dup a friend.
446
ef79d9a3
YQ
4472017-04-28 Yao Qi <yao.qi@linaro.org>
448
449 * regcache.c (struct regcache): Move to regcache.h
450 (regcache::arch): New method.
451 (regcache_get_ptid): Update.
452 (get_regcache_arch): Call arch method.
453 (get_regcache_aspace): Call method aspace.
454 (register_buffer): Change it to method.
455 (regcache_save): Change it to regcache::save.
456 (regcache_restore): Likewise.
457 (regcache_cpy_no_passthrough): Remove the declaration.
458 (regcache_cpy): Call methods restore and cpy_no_passthrough.
459 (regcache_cpy_no_passthrough): Change it to method
460 cpy_no_passthrough.
461 (regcache_register_status): Change it to method
462 get_register_status.
463 (regcache_invalidate): Change it to method invalidate.
464 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
465 (regcache_raw_update): Change it to method raw_update.
466 (regcache_raw_read): Likewise.
467 (regcache_raw_read_signed): Likewise.
468 (regcache_raw_read_unsigned): Likewise.
469 (regcache_raw_write_signed): Likewise.
470 (regcache_raw_write_unsigned): Likewise.
471 (regcache_cooked_read): Likewise.
472 (regcache_cooked_read_value): Likewise.
473 (regcache_cooked_read_signed): Likewise.
474 (regcache_cooked_read_unsigned): Likewise.
475 (regcache_cooked_write_signed): Likewise.
476 (regcache_cooked_write_unsigned): Likewise.
477 (regcache_raw_set_cached_value): Likewise.
478 (regcache_raw_write): Likewise.
479 (regcache_cooked_write): Likewise.
480 (regcache_xfer_part): Likewise.
481 (regcache_raw_read_part): Likewise.
482 (regcache_raw_write_part): Likewise.
483 (regcache_cooked_read_part): Likewise.
484 (regcache_cooked_write_part): Likewise.
485 (regcache_raw_supply): Likewise.
486 (regcache_raw_collect): Likewise.
487 (regcache_transfer_regset): Likewise.
488 (regcache_supply_regset): Likewise.
489 (regcache_collect_regset): Likewise.
490 (regcache_debug_print_register): Likewise.
491 (enum regcache_dump_what): Move it to regcache.h.
492 (regcache_dump): Change it to method dump.
493 * regcache.h (enum regcache_dump_what): New.
494 (class regcache): New.
495 * target.c (target_fetch_registers): Call method
496 debug_print_register.
497 (target_store_registers): Likewise.
498
f8fdb78e
SM
4992017-04-28 Simon Marchi <simon.marchi@ericsson.com>
500
501 * windows-nat.c (struct lm_info_windows): Initialize field.
502 (windows_make_so): Allocate lm_info_windows with new.
503 (windows_free_so): Free lm_info_windows with delete.
504
9ccbfd7b
SM
5052017-04-28 Simon Marchi <simon.marchi@ericsson.com>
506
507 * solib-darwin.c (struct lm_info_darwin): Initialize field.
508 (darwin_current_sos): Allocate lm_info_darwin with new, remove
509 cleanup.
510 (darwin_free_so): Free lm_info_darwin with delete.
511
76e75227
SM
5122017-04-28 Simon Marchi <simon.marchi@ericsson.com>
513
514 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
515 <l_addr_p>: Change type to bool.
516 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
517 (svr4_free_so): Free lm_info_svr4 with delete.
518 (svr4_copy_library_list): Replace memcpy with call to copy
519 constructor.
520 (library_list_start_library, svr4_default_sos): Allocate
521 lm_info_svr4 with new.
522
51046d9e
SM
5232017-04-28 Simon Marchi <simon.marchi@ericsson.com>
524
525 * solib-target.c (struct lm_info_target): Add destructor,
526 initialize fields.
527 <name>: Change type to std::string.
528 (library_list_start_library): Allocate lm_info_target with new.
529 (solib_target_free_library_list): Free lm_info_target with
530 delete.
531 (solib_target_current_sos): Adapt to std::string.
532 (solib_target_free_so): Free lm_info_target with delete.
533
4023ae76
SM
5342017-04-28 Simon Marchi <simon.marchi@ericsson.com>
535
536 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
537 fields.
538 (frv_current_sos): Allocate lm_info_frv with new.
539 (frv_relocate_main_executable): Free lm_info_frv with delete,
540 allocate with new.
541 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
542
af43057b
SM
5432017-04-28 Simon Marchi <simon.marchi@ericsson.com>
544
545 * solib-frv.c (struct lm_info_frv): Fix indentation.
546
b0911207
SM
5472017-04-28 Simon Marchi <simon.marchi@ericsson.com>
548
549 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
550 map field.
551 (dsbt_current_sos): Allocate lm_info_dsbt with new.
552 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
553 and allocate with new.
554 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
555
6c401f72
SM
5562017-04-28 Simon Marchi <simon.marchi@ericsson.com>
557
558 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
559 <filename, member_name>: Change type to std::string.
560 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
561 (library_list_start_library): Allocate lm_info_aix with new.
562 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
563 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
564 with copy constructor.
565
d0e449a1
SM
5662017-04-28 Simon Marchi <simon.marchi@ericsson.com>
567
568 * solist.h (struct lm_info): Remove.
569 (struct lm_info_base): New class.
570 (struct so_list) <lm_info>: Change type to lm_info_base *.
571 * nto-tdep.c (struct lm_info): Remove.
572 (lm_addr): Adjust.
573 * solib-aix.c (struct lm_info): Rename to ...
574 (struct lm_info_aix): ... this. Extend lm_info_base.
575 (lm_info_p): Rename to ...
576 (lm_info_aix_p): ... this, and adjust.
577 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
578 solib_aix_parse_libraries, library_list_start_library,
579 solib_aix_free_library_list, solib_aix_parse_libraries,
580 solib_aix_get_library_list,
581 solib_aix_relocate_section_addresses, solib_aix_free_so,
582 solib_aix_get_section_offsets,
583 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
584 Adjust.
585 (struct solib_aix_inferior_data) <library_list>: Adjust.
586 * solib-darwin.c (struct lm_info): Rename to ...
587 (struct lm_info_darwin): ... this. Extend lm_info_base.
588 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
589 * solib-dsbt.c (struct lm_info): Rename to ...
590 (struct lm_info_dsbt): ... this. Extend lm_info_base.
591 (struct dsbt_info) <main_executable_lm_info): Adjust.
592 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
593 dsbt_relocate_section_addresses): Adjust.
594 * solib-frv.c (struct lm_info): Rename to ...
595 (struct lm_info_frv): ... this. Extend lm_info_base.
596 (main_executable_lm_info): Adjust.
597 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
598 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
599 find_canonical_descriptor_in_load_object,
600 frv_fdpic_find_canonical_descriptor): Adjust.
601 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
602 to lm_info_svr4.
603 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
604 svr4_clear_so, svr4_copy_library_list,
605 library_list_start_library, svr4_default_sos, svr4_read_so_list,
606 svr4_current_sos, svr4_fetch_objfile_link_map,
607 solist_update_incremental): Adjust.
608 * solib-svr4.h (struct lm_info_svr4): Move here from
609 solib-svr4.c.
610 * solib-target.c (struct lm_info): Rename to ...
611 (struct lm_info_target): ... this. Extend lm_info_base.
612 (lm_info_p): Rename to ...
613 (lm_info_target_p): ... this.
614 (solib_target_parse_libraries, library_list_start_segment,
615 library_list_start_section, library_list_start_library,
616 library_list_end_library, solib_target_free_library_list,
617 solib_target_current_sos, solib_target_free_so,
618 solib_target_relocate_section_addresses): Adjust.
619 * windows-nat.c (struct lm_info): Rename to ...
620 (struct lm_info_windows): ... this. Extend lm_info_base.
621 (windows_make_so, handle_load_dll, handle_unload_dll,
622 windows_xfer_shared_libraries): Adjust.
623
434a4023
SM
6242017-04-28 Simon Marchi <simon.marchi@ericsson.com>
625
626 * solib-darwin.c (struct darwin_so_list): Remove.
627 (darwin_current_sos): Allocate an so_list object instead of a
628 darwin_so_list, separately allocate an lm_info object.
629 (darwin_free_so): Free lm_info.
630
428544e8
JB
6312017-04-28 John Baldwin <jhb@FreeBSD.org>
632
633 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
634 with fprintf_filtered.
635
4621115f
YQ
6362017-04-28 Yao Qi <yao.qi@linaro.org>
637
638 * regcache.c (regcache::regcache): New function.
639 (regcache::~regcache): New function.
640 (regcache_xmalloc_1): Remove.
641 (regcache_xmalloc): Call new regcache.
642 (regcache_xfree): Call delete regcache.
643 (get_thread_arch_aspace_regcache): Call new regcache.
644
339053c2
YQ
6452017-04-28 Yao Qi <yao.qi@linaro.org>
646
647 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
648 lwp instead of ptid_get_lwp.
649
7974a605
YQ
6502017-04-28 Yao Qi <yao.qi@linaro.org>
651
652 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
653 lwp_info instead of getting from inferior_ptid.
654
e15c3eb4
KS
6552017-04-27 Keith Seitz <keiths@redhat.com>
656
657 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
658 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
659 (CV_CONVERSION_BADNESS): Define.
660 (rank_one_type): Remove overly restrictive rvalue reference
661 rank checks.
662 Add cv-qualifier checks and subranks for type equality.
663 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
664 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
665 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
666
72bc1d24
SM
6672017-04-27 Simon Marchi <simon.marchi@ericsson.com>
668
669 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
670 count when creating the object.
671
55bcecda
UW
6722017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
673 Ulrich Weigand <uweigand@de.ibm.com>
674
675 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
676 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
677 is used in AIX.
678 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
679 (process_xcoff_symbol): Likewise.
680 (scan_xcoff_symtab): Likewise.
681
5c99fcf8
AH
6822017-04-26 Alan Hayward <alan.hayward@arm.com>
683
684 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
685 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
686 (ia64_access_reg): Use get_frame_register_unsigned.
687 (ia64_access_rse_reg): Likewise.
688 (ia64_libunwind_frame_prev_register): Likewise.
689
b41c5a85
JW
6902017-04-26 Jiong Wang <jiong.wang@arm.com>
691
692 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
693 * gdbarch.c: Regenerated.
694 * gdbarch.h: Regenerated.
695 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
696 visibility external.
697 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
698 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
699 (enum cfa_how_kind): Move to ...
700 (struct dwarf2_frame_state_reg_info): Likewise.
701 (struct dwarf2_frame_state): Likewise.
702 * dwarf2-frame.h: ... here.
703 (dwarf2_frame_state_alloc_regs): New declaration.
704 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
705 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
706
c185f580
AH
7072017-04-26 Alan Hayward <alan.hayward@arm.com>
708
709 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
710 regcache_raw_read_unsigned.
711 (xtensa_pseudo_register_write): Likewise.
712
19c45594
AH
7132017-04-26 Alan Hayward <alan.hayward@arm.com>
714
715 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
716 (nds32_pseudo_register_write): Likewise.
717
4658f12e
YQ
7182017-04-25 Yao Qi <yao.qi@linaro.org>
719
720 * regcache.c (struct regcache) <readonly_p>: Change its type
721 to bool.
722 (regcache_xmalloc_1): Update parameter type and callers update.
723
d581dda8
YQ
7242017-04-25 Yao Qi <yao.qi@linaro.org>
725
726 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
727 set_gdbarch_wchar_bit.
728 * arm-tdep.c (arm_gdbarch_init): Likewise.
729
debed3db
PA
7302017-04-25 Pedro Alves <palves@redhat.com>
731
732 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
733 (BothAreRelocatable, memcopy, memmove): Don't define.
734 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
735 macros.
736
b0b92aeb
PA
7372017-04-25 Pedro Alves <palves@redhat.com>
738
739 * common/common-defs.h: Include "common/poison.h".
740 * common/function-view.h: (Not, Or, Requires): Move to traits.h
741 and adjust.
742 * common/poison.h: New file.
743 * common/traits.h: Include <type_traits>.
744 (Not, Or, Requires): New, moved from common/function-view.h.
745
16c4d54a
PA
7462017-04-25 Pedro Alves <palves@redhat.com>
747
748 * breakpoint.h (struct breakpoint): In-class initialize all
749 fields. Make boolean fields "bool".
750 * breakpoint.c (init_raw_breakpoint_without_location): Remove
751 memset call and initializations no longer necessary.
752
b5c36682
PA
7532017-04-25 Pedro Alves <palves@redhat.com>
754
755 * btrace.c (pt_btrace_insn_flags): Change parameter type to
756 reference.
757 (pt_btrace_insn): New function.
758 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
759
5625a286
PA
7602017-04-25 Pedro Alves <palves@redhat.com>
761
762 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
763 "base" field and inherit from "bp_location" instead. Add
764 non-default ctor.
765 (allocate_location_exception): Use new non-default ctor.
766 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
767 (init_bp_location): Convert to ...
768 (bp_location::bp_location): ... this new ctor, and remove memset
769 call.
770 (base_breakpoint_allocate_location): Use the new non-default ctor.
771 * breakpoint.h (bp_location): Now a class. Declare default and
772 non-default ctors. In-class initialize all members.
773 (init_bp_location): Remove declaration.
774
23bcc18f
PA
7752017-04-25 Pedro Alves <palves@redhat.com>
776
777 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
778 assignment operator.
779
e1ba3053
YQ
7802017-04-24 Yao Qi <yao.qi@linaro.org>
781
782 * doublest.c (convert_doublest_to_floatformat): Call
783 floatformat_totalsize_bytes.
784
10f489e5
TT
7852017-04-22 Tom Tromey <tom@tromey.com>
786
787 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
788 ui_out_emit_list.
789 * stack.c (print_frame): Use ui_out_emit_list.
790 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
791 ui_out_emit_list.
792 * mi/mi-main.c (print_one_inferior)
793 (mi_cmd_data_list_register_names)
794 (mi_cmd_data_list_register_values, mi_cmd_list_features)
795 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
796 ui_out_emit_list.
797 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
798 (mi_output_solib_attribs): Use ui_out_emit_list,
799 ui_out_emit_tuple.
800 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
801 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
802 (mi_cmd_stack_list_args, list_args_or_locals): Use
803 ui_out_emit_list.
804 * disasm.c (do_assembly_only): Use ui_out_emit_list.
805 * breakpoint.c (print_solib_event, output_thread_groups): Use
806 ui_out_emit_list.
807
0092b74d
TT
8082017-04-22 Tom Tromey <tom@tromey.com>
809
810 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
811 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
812 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
813
a14a62dd
TT
8142017-04-22 Tom Tromey <tom@tromey.com>
815
816 * tracepoint.c (tvariables_info_1)
817 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
818
46b9c129
TT
8192017-04-22 Tom Tromey <tom@tromey.com>
820
821 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
822 annotate_arg_emitter.
823 * breakpoint.c (print_mention_watchpoint)
824 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
825 * annotate.h (struct annotate_arg_emitter): New.
826
2e783024
TT
8272017-04-22 Tom Tromey <tom@tromey.com>
828
829 * record-btrace.c (record_btrace_insn_history)
830 (record_btrace_insn_history_range, record_btrace_call_history)
831 (record_btrace_call_history_range): Use ui_out_emit_tuple.
832 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
833 ui_out_emit_tuple.
834 * stack.c (print_frame_info): Use ui_out_emit_tuple.
835 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
836 * skip.c (skip_info): Use ui_out_emit_tuple.
837 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
838 * progspace.c (print_program_space): Use ui_out_emit_tuple.
839 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
840 * osdata.c (info_osdata): Use ui_out_emit_tuple.
841 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
842 ui_out_emit_tuple.
843 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
844 (output_register, mi_cmd_data_read_memory)
845 (mi_cmd_data_read_memory_bytes, mi_load_progress)
846 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
847 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
848 Use ui_out_emit_tuple.
849 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
850 ui_out_emit_tuple.
851 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
852 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
853 * linux-thread-db.c (info_auto_load_libthread_db): Use
854 ui_out_emit_tuple.
855 * inferior.c (print_inferior): Use ui_out_emit_tuple.
856 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
857 * disasm.c (do_mixed_source_and_assembly_deprecated)
858 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
859 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
860 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
861 * breakpoint.c (print_one_breakpoint_location)
862 (print_one_breakpoint): Use ui_out_emit_tuple.
863 * auto-load.c (print_script, info_auto_load_cmd): Use
864 ui_out_emit_tuple.
865 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
866
9be21bb4
SM
8672017-04-21 Simon Marchi <simon.marchi@ericsson.com>
868
869 * thread.c (print_thread_info_1): Remove dead code.
870
0d4c07af
JK
8712017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
872
873 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
874 GDB_SELF_TEST.
875 * arm-tdep.c (selftests::arm_record_test): Likewise.
876
4daf993d
YQ
8772017-04-21 Yao Qi <yao.qi@linaro.org>
878
879 * regcache.c (regcache_restore): Remove argument 2. Replace
880 argument 3 with regcache. Get register status from
881 src->register_status and get register contents from
882 register_buffer (src, regnum).
883 (regcache_cpy): Update.
884
a6c21d4a
PA
8852017-04-19 Pedro Alves <palves@redhat.com>
886
887 * gdbthread.h (thread): Add missing closing parenthesis in
888 comment.
889
3a3fd0fd
PA
8902017-04-19 Pedro Alves <palves@redhat.com>
891
892 * common/refcounted-object.h: New file.
893 * gdbthread.h: Include "common/refcounted-object.h".
894 (thread_info): Inherit from refcounted_object and add comments.
895 (thread_info::incref, thread_info::decref)
896 (thread_info::m_refcount): Delete.
897 (thread_info::deletable): Use the refcounted_object::refcount()
898 method.
899 * inferior.c (current_inferior_): Add comment.
900 (set_current_inferior): Increment/decrement refcounts.
901 (prune_inferiors, remove_inferior_command): Skip inferiors marked
902 not-deletable instead of comparing with the current inferior.
903 (initialize_inferiors): Increment the initial inferior's refcount.
904 * inferior.h (struct inferior): Forward declare.
905 Include "common/refcounted-object.h".
906 (current_inferior, set_current_inferior): Move declaration to
907 before struct inferior's definition, and fix comment.
908 (inferior): Inherit from refcounted_object. Add comments.
909 * thread.c (switch_to_thread_no_regs): Reference the thread's
910 inferior pointer directly instead of doing a ptid lookup.
911 (switch_to_no_thread): New function.
912 (switch_to_thread(thread_info *)): New function, factored out
913 from ...
914 (switch_to_thread(ptid_t)): ... this.
915 (restore_current_thread): Delete.
916 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
917 fields, and add 'inf' field.
918 (do_restore_current_thread_cleanup): Check whether old->inf is
919 alive instead of looking up an inferior by ptid. Use
920 switch_to_thread and switch_to_no_thread.
921 (restore_current_thread_cleanup_dtor): Use old->inf directly
922 instead of lookup up an inferior by id. Decref the inferior.
923 Don't restore 'removable'.
924 (make_cleanup_restore_current_thread): Same the inferior pointer
925 in old, instead of the inferior number. Incref the inferior.
926 Don't save/clear 'removable'.
927
9bcb1f16
PA
9282017-04-19 Pedro Alves <palves@redhat.com>
929
930 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
931 unittests/scoped_restore-selftests.c.
932 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
933 * common/scoped_restore.h (scoped_restore_base): Make "class".
934 (scoped_restore_base::release): New public method.
935 (scoped_restore_base::scoped_restore_base): New protected ctor.
936 (scoped_restore_base::m_saved_var): New protected field.
937 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
938 scoped_restore_base base class instead of m_saved_var directly.
939 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
940 (scoped_restore_tmpl::scoped_restore_tmpl(const
941 scoped_restore_tmpl<T>&)): Likewise.
942 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
943 method.
944 (scoped_restore_tmpl::saved_var): New method.
945 (scoped_restore_tmpl::m_saved_var): Delete.
946 * inferior.h (inferior::detaching): Now a bool.
947 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
948 cleanup.
949 * unittests/scoped_restore-selftests.c: New file.
950
26fcd539
PA
9512017-04-19 Pedro Alves <palves@redhat.com>
952
953 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
954 Re-sort in alphabetic order.
955
fdd243b0
PA
9562017-04-18 Pedro Alves <palves@redhat.com>
957
958 * xml-support.c (obstack_xml_printf): Delete.
959 * xml-support.h (obstack_xml_printf): Delete.
960
4895cde2
PA
9612017-04-18 Pedro Alves <palves@redhat.com>
962
963 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
964 vdebug, verror, body_text, start_element, end_element, name,
965 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
966 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
967 is_xinclude>: Make private and add m_ prefix.
968 (gdb_xml_parser::body_text): New method, based on ...
969 (gdb_xml_body_text): ... this. Adjust.
970 (gdb_xml_parser::vdebug): New method, based on ...
971 (gdb_xml_debug): ... this. Adjust.
972 (gdb_xml_parser::verror): New method, based on ...
973 (gdb_xml_error): ... this. Adjust.
974 (gdb_xml_parser::start_element): New method, based on ...
975 (gdb_xml_start_element): ... this. Adjust.
976 (gdb_xml_start_element_wrapper): Defer to
977 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
978 (gdb_xml_parser::end_element): New method, based on ...
979 (gdb_xml_end_element_wrapper): ... this. Adjust.
980 (gdb_xml_parser::~gdb_xml_parser): Adjust.
981 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
982 (gdb_xml_parser::use_dtd): New method, based on ...
983 (gdb_xml_use_dtd): ... this. Adjust.
984 (gdb_xml_parser::parse): New method, based on ...
985 (gdb_xml_parse): ... this. Adjust.
986 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
987 (xinclude_start_include): Adjust to call the parser's name method.
988 (xml_xinclude_default, xml_xinclude_start_doctype)
989 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
990 method.
991 (xml_process_xincludes): Adjust to call parser methods.
992 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
993 declarations.
994
bd8a901f
PA
9952017-04-18 Pedro Alves <palves@redhat.com>
996
997 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
998 gdb::optional<std::string>.
999 * xml-support.c: Include <string>.
1000 (scope_level::scope_level(scope_level &&))
1001 (scope_level::~scope_level): Delete.
1002 (scope_level::body): Now a std::string.
1003 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
1004 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
1005 parameter.
1006 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
1007 (xinclude_parsing_data::output): Now a std::string reference.
1008 (xinclude_start_include): Adjust.
1009 (xml_xinclude_default): Adjust.
1010 (xml_process_xincludes): Add 'output' parameter, and return bool.
1011 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
1012 and return bool.
1013 * xml-tdesc.c: Include <unordered_map> and <string>.
1014 (tdesc_xml_cache): Delete.
1015 (tdesc_xml_cache_s): Delete.
1016 (xml_cache): Now an std::unordered_map.
1017 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
1018 (target_fetch_description_xml): Change return type to
1019 gdb::optional<std::string>, and adjust.
1020 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
1021 (target_fetch_description_xml): Change return type to
1022 gdb::optional<std::string>.
1023
d35d1958
PA
10242017-04-18 Pedro Alves <palves@redhat.com>
1025
1026 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1027 unittests/optional-selftests.c.
1028 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
1029 * unittests/optional-selftests.c: New file.
1030 * unittests/optional/assignment/1.cc: New file.
1031 * unittests/optional/assignment/2.cc: New file.
1032 * unittests/optional/assignment/3.cc: New file.
1033 * unittests/optional/assignment/4.cc: New file.
1034 * unittests/optional/assignment/5.cc: New file.
1035 * unittests/optional/assignment/6.cc: New file.
1036 * unittests/optional/assignment/7.cc: New file.
1037 * unittests/optional/cons/copy.cc: New file.
1038 * unittests/optional/cons/default.cc: New file.
1039 * unittests/optional/cons/move.cc: New file.
1040 * unittests/optional/cons/value.cc: New file.
1041 * unittests/optional/in_place.cc: New file.
1042 * unittests/optional/observers/1.cc: New file.
1043 * unittests/optional/observers/2.cc: New file.
1044
22796e97
PA
10452017-04-18 Pedro Alves <palves@redhat.com>
1046
1047 * common/gdb_optional.h: Include common/traits.h.
1048 (in_place_t): New type.
1049 (in_place): New constexpr variable.
1050 (optional::optional): Remove member initialization of
1051 m_instantiated.
1052 (optional::optional(in_place_t...)): New constructor.
1053 (optional::~optional): Use reset.
1054 (optional::optional(const optional&)): New.
1055 (optional::optional(const optional&&)): New.
1056 (optional::optional(T &)): New.
1057 (optional::optional(T &&)): New.
1058 (operator::operator=(const optional &)): New.
1059 (operator::operator=(optional &&)): New.
1060 (operator::operator= (const T &))
1061 (operator::operator= (T &&))
1062 (operator::emplace (Args &&... args)): Return a T&. Use reset.
1063 (operator::reset): New.
1064 (operator::m_instantiated):: Add in-class initializer.
1065 * common/traits.h: Include <type_traits>.
1066 (struct And): New types.
1067
a7fc9b61
PA
10682017-04-18 Pedro Alves <palves@redhat.com>
1069
1070 * xml-support.c: Include <vector>.
1071 (scope_level::scope_level(const gdb_xml_element *))
1072 (scope_level::scope_level(scope_level&&)): New.
1073 (scope_level::~scope_level): New.
1074 (scope_level_s): Delete.
1075 (gdb_xml_parser::scopes): Now a std::vector.
1076 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
1077 Use std::vector.
1078 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
1079 scope cleanup code.
1080 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
1081 of the scopes member. Use std::vector::emplace_back.
1082
010151c9
PA
10832017-04-18 Pedro Alves <palves@redhat.com>
1084
1085 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
1086 a bool.
1087 (gdb_xml_end_element): Change type of first parameter.
1088 (gdb_xml_cleanup): Rename to ...
1089 (gdb_xml_parser::~gdb_xml_parser): ... this.
1090 (gdb_xml_create_parser_and_cleanup): Delete with ...
1091 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
1092 to this new ctor.
1093 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
1094 using gdb_xml_create_parser_and_cleanup.
1095 (xinclude_parsing_data): Add ctor/dtor.
1096 (xml_xinclude_cleanup): Delete.
1097 (xml_process_xincludes): Create a local xinclude_parsing_data
1098 instead of heap-allocating one. Create a local gdb_xml_parser
1099 instead of heap-allocating one with
1100 gdb_xml_create_parser_and_cleanup.
1101
d56060f0
JB
11022017-04-18 John Baldwin <jhb@FreeBSD.org>
1103
1104 PR threads/20743
1105 * fbsd-nat.c (resume_one_thread_cb): Remove.
1106 (resume_all_threads_cb): Remove.
1107 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
1108 iterate_over_threads.
1109
305d16a9
JB
11102017-04-17 Joel Brobecker <brobecker@adacore.com>
1111
1112 * NEWS: Create a new section for the next release branch.
1113 Rename the section of the current branch, now that it has
1114 been cut.
1115
8bb57231
JB
11162017-04-17 Joel Brobecker <brobecker@adacore.com>
1117
1118 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
1119 * version.in: Bump version to 8.0.50.DATE-git.
1120
096c92dd
SDJ
11212017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
1122
1123 PR gdb/21385
1124 * windows-nat.c (windows_create_inferior): Declare 'allargs'
1125 independently of the host, and fix build breakage on Cygwin.
1126
0550c955
PA
11272017-04-13 Pedro Alves <palves@redhat.com>
1128
1129 * inferior.c (free_inferior): Convert to ...
1130 (inferior::~inferior): ... this dtor.
1131 (inferior::inferior): New ctor, factored out from ...
1132 (add_inferior_silent): ... here. Allocate the inferior with a new
1133 expression.
1134 (delete_inferior): Call delete instead of free_inferior.
1135 * inferior.h (gdb_environ, continuation): Forward declare.
1136 (inferior): Now a class. Add in-class initialization to all
1137 members. Make boolean fields bool, except 'detaching'.
1138 (inferior::inferior): New explicit ctor.
1139 (inferior::~inferior): New.
1140
e3d60dfc
PA
11412017-04-13 Pedro Alves <palves@redhat.com>
1142
1143 * inferior.c (init_inferior_list): Delete.
1144 * inferior.h (init_inferior_list): Delete.
1145
5fd69d0a
PA
11462017-04-13 Pedro Alves <palves@redhat.com>
1147
1148 PR threads/13217
1149 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
1150 (top level): Call it twice, with different thread sets.
1151
c6609450
PA
11522017-04-13 Pedro Alves <palves@redhat.com>
1153
1154 * thread.c: Include <algorithm>.
1155 (thread_array_cleanup): Delete.
1156 (scoped_inc_dec_ref): New class.
1157 (live_threads_count): New function.
1158 (set_thread_refcount): Delete.
1159 (tp_array_compar_ascending): Now a bool.
1160 (tp_array_compar): Convert to a std::sort comparison function.
1161 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
1162 and live_threads_count.
1163
2a00d7ce
PA
11642017-04-13 Pedro Alves <palves@redhat.com>
1165
1166 * infrun.c (follow_fork_inferior): Also switch the current
1167 inferior.
1168
441d7c93
PA
11692017-04-13 Pedro Alves <palves@redhat.com>
1170
1171 * breakpoint.c (watch_command_1): Save watchpoint-frame info
1172 before calling create_internal_breakpoint.
1173
808480f6
PA
11742017-04-13 Pedro Alves <palves@redhat.com>
1175
1176 * fork-child.c (execv_argv): New class.
1177 (breakup_args): Refactored as ...
1178 (execv_argv::init_for_no_shell): .. this method of execv_argv.
1179 Copy arguments to storage and replace separators with NULL
1180 terminators in place.
1181 (escape_bang_in_quoted_argument): Adjust to return bool.
1182 (execv_argv::execv_argv): New ctor.
1183 (execv_argv::init_for_shell): New method, factored out from
1184 fork_inferior. Don't strdup strings into the vector.
1185 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
1186 Remove free_vector_argv call.
1187
ad3d022a
YQ
11882017-04-13 Yao Qi <yao.qi@linaro.org>
1189
1190 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
1191 tdep->rx_psw_type.
1192
e6ddc3bf
YQ
11932017-04-13 Yao Qi <yao.qi@linaro.org>
1194
1195 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
1196 * rx-tdep.c (rx_gdbarch_init): Likewise.
1197
bfb8cf90
PA
11982017-04-13 Pedro Alves <palves@redhat.com>
1199
1200 * breakpoint.h (struct breakpoint): Reindent.
1201
f5336ca5
PA
12022017-04-13 Pedro Alves <palves@redhat.com>
1203
1204 * breakpoint.c (bp_location): Rename to ...
1205 (bp_locations): ... this. All references updated.
1206 (bp_location_count): Rename to ...
1207 (bp_locations_count): ... this. All references updated.
1208 (bp_location_placed_address_before_address_max): Rename to ...
1209 (bp_locations_placed_address_before_address_max): ... this. All
1210 references updated.
1211 (bp_location_shadow_len_after_address_max): Rename to ...
1212 (bp_locations_shadow_len_after_address_max): ... this. All
1213 references updated.
1214 (bp_location_compare_addrs): Rename to ...
1215 (bp_locations_compare_addrs): ... this. All references updated.
1216 (bp_location_compare):Rename to ...
1217 (bp_locations_compare): ... this. All references updated.
1218 (bp_location_target_extensions_update): Rename to ...
1219 (bp_locations_target_extensions_update): ... this. All references
1220 updated.
1221
be628ab8
SDJ
12222017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1223
1224 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
1225 * common/common.m4: Check headers 'termios.h', 'termio.h' and
1226 'sgtty.h'.
1227 * common/gdb_termios.h: New file, with parts of "terminal.h".
1228 * inflow.c: Include "gdb_termios.h".
1229 * ser-unix.c: Include "gdb_termios.h".
1230 * terminal.h: Move terminal-related defines to
1231 "common/gdb_termios.h".
1232
8e9e35b1
TT
12332017-04-12 Tom Tromey <tom@tromey.com>
1234
1235 * probe.c (parse_probes): Update.
1236 * location.h (delete_event_location): Don't declare.
1237 (event_location_deleter::operator()): Update.
1238 * location.c (event_location_deleter::operator()): Rename from
1239 delete_event_location.
1240 * linespec.h (linespec_result) <location>: Change type to
1241 event_location_up.
1242 * linespec.c (canonicalize_linespec, event_location_to_sals)
1243 (decode_objc): Update.
1244 (linespec_result): Don't call delete_event_location.
1245 * breakpoint.c (create_breakpoints_sal)
1246 (bkpt_probe_create_sals_from_location)
1247 (strace_marker_create_sals_from_location): Update.
1248
16e802b9
TT
12492017-04-12 Tom Tromey <tom@tromey.com>
1250
1251 * linespec.h (struct linespec_result): Add constructor and
1252 destructor.
1253 (init_linespec_result, destroy_linespec_result)
1254 (make_cleanup_destroy_linespec_result): Don't declare.
1255 * linespec.c (init_linespec_result): Remove.
1256 (linespec_result::~linespec_result): Rename from
1257 destroy_linespec_result. Update.
1258 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
1259 Remove.
1260 * breakpoint.c (create_breakpoint, break_range_command)
1261 (decode_location_default): Update.
1262 * ax-gdb.c (agent_command_1): Update.
1263
d28cd78a
TT
12642017-04-12 Tom Tromey <tom@tromey.com>
1265
1266 * remote.c (remote_download_tracepoint): Update.
1267 * python/py-breakpoint.c (bppy_get_location): Update.
1268 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
1269 (gdbscm_breakpoint_location): Update.
1270 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
1271 * breakpoint.h (struct breakpoint) <location, location_range_end>:
1272 Change type to event_location_up.
1273 * breakpoint.c (create_overlay_event_breakpoint)
1274 (create_longjmp_master_breakpoint)
1275 (create_std_terminate_master_breakpoint)
1276 (create_exception_master_breakpoint)
1277 (breakpoint_event_location_empty_p, print_breakpoint_location)
1278 (print_one_breakpoint_location, create_thread_event_breakpoint)
1279 (init_breakpoint_sal, create_breakpoint)
1280 (print_recreate_ranged_breakpoint, break_range_command)
1281 (init_ada_exception_breakpoint, say_where): Update.
1282 (base_breakpoint_dtor): Don't call delete_event_location.
1283 (bkpt_print_recreate, tracepoint_print_recreate)
1284 (dprintf_print_recreate, update_static_tracepoint)
1285 (breakpoint_re_set_default): Update.
1286
711799d5
TT
12872017-04-12 Tom Tromey <tom@tromey.com>
1288
1289 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1290 type of "to_do". Update.
1291 (compute_stack_depth): Use std::vector.
1292
52d214d3
TT
12932017-04-12 Tom Tromey <tom@tromey.com>
1294
1295 * printcmd.c (find_instruction_backward): Use std::vector.
1296
4c404b8b
TT
12972017-04-12 Tom Tromey <tom@tromey.com>
1298
1299 * symfile.c (objfilep): Remove typedef.
1300 (reread_symbols): Use a std::vector.
1301
156d9eab
TT
13022017-04-12 Tom Tromey <tom@tromey.com>
1303
1304 * mi/mi-main.c (exec_direction_forward): Remove.
1305 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
1306 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1307 scoped_restore.
1308 * guile/guile.c (guile_repl_command, guile_command)
1309 (gdbscm_execute_gdb_command): Use scoped_restore.
1310 * go-exp.y (go_parse): Use scoped_restore.
1311 * d-exp.y (d_parse): Use scoped_restore.
1312 * cli/cli-decode.c (cmd_func): Use scoped_restore.
1313 * c-exp.y (c_parse): Use scoped_restore.
1314
4d89769a
TT
13152017-04-12 Tom Tromey <tom@tromey.com>
1316
1317 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
1318 (mi_parse): Update return type.
1319 (mi_parse_free): Remove.
1320 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
1321 (mi_parse::~mi_parse): Rename from mi_parse_free.
1322 (mi_parse_cleanup): Remove.
1323 (mi_parse): Return a unique_ptr. Use new.
1324 * mi/mi-main.c (mi_execute_command): Update.
1325
4b217cc7
TT
13262017-04-12 Tom Tromey <tom@tromey.com>
1327
1328 * location.c (explicit_location_lex_one): Return a
1329 unique_xmalloc_ptr.
1330 (string_to_explicit_location): Update. Remove cleanups.
1331
59d3651b
TT
13322017-04-12 Tom Tromey <tom@tromey.com>
1333
1334 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
1335 (compare_value_and_voffset): Change type. Update.
1336 (compute_vtable_size): Change type of "offset_vec".
1337 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
1338 (gnuv3_get_typeid): Remove extraneous declaration.
1339
b24b0d6c
TT
13402017-04-12 Tom Tromey <tom@tromey.com>
1341
1342 * charset.h (wchar_iterator): Fix comment.
1343
80a3b8c5
TT
13442017-04-12 Tom Tromey <tom@tromey.com>
1345
1346 * charset.c (iconv_wrapper): New class.
1347 (cleanup_iconv): Remove.
1348 (convert_between_encodings): Use it.
1349
c83dd867
TT
13502017-04-12 Tom Tromey <tom@tromey.com>
1351
1352 * symfile.h (increment_reading_symtab): Update type.
1353 * symfile.c (decrement_reading_symtab): Remove.
1354 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
1355 * psymtab.c (psymtab_to_symtab): Update.
1356 * dwarf2read.c (dw2_instantiate_symtab): Update.
1357
0e8621a0
TT
13582017-04-12 Tom Tromey <tom@tromey.com>
1359
1360 * jit.c (struct jit_reader): Declare separately. Add constructor
1361 and destructor. Change type of "handle".
1362 (loaded_jit_reader): Define separately.
1363 (jit_reader_load): Update. New "new".
1364 (jit_reader_unload_command): Use "delete".
1365 * gdb-dlfcn.h (struct dlclose_deleter): New.
1366 (gdb_dlhandle_up): New typedef.
1367 (gdb_dlopen, gdb_dlsym): Update types.
1368 (gdb_dlclose): Remove.
1369 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
1370 (gdb_dlsym): Change type of "handle".
1371 (make_cleanup_dlclose): Remove.
1372 (dlclose_deleter::operator()): Rename from gdb_dlclose.
1373 * compile/compile-c-support.c (load_libcc): Update.
1374
67d89901
TT
13752017-04-12 Tom Tromey <tom@tromey.com>
1376
1377 * symtab.h (find_pcs_for_symtab_line): Change return type.
1378 * symtab.c (find_pcs_for_symtab_line): Change return type.
1379 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
1380 type of "vec". Update.
1381 (ltpy_get_pcs_for_line): Update.
1382 * linespec.c (decode_digits_ordinary): Update.
1383
93921405
TT
13842017-04-12 Tom Tromey <tom@tromey.com>
1385
1386 * tracepoint.c (actions_command): Update.
1387 * python/python.c (python_command, python_interactive_command):
1388 Update.
1389 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1390 * guile/guile.c (guile_command): Update.
1391 * defs.h (read_command_lines, read_command_lines_1): Return
1392 command_line_up.
1393 (command_lines_deleter): New struct.
1394 (command_line_up): New typedef.
1395 * compile/compile.c (compile_code_command)
1396 (compile_print_command): Update.
1397 * cli/cli-script.h (get_command_line, copy_command_lines): Return
1398 command_line_up.
1399 (make_cleanup_free_command_lines): Remove.
1400 * cli/cli-script.c (get_command_line, read_command_lines_1)
1401 (copy_command_lines): Return command_line_up.
1402 (while_command, if_command, read_command_lines, define_command)
1403 (document_command): Update.
1404 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
1405 Remove.
1406 * breakpoint.h (breakpoint_set_commands): Change type of
1407 "commands".
1408 * breakpoint.c (breakpoint_set_commands): Change type of
1409 "commands". Update.
1410 (do_map_commands_command, update_dprintf_command_list)
1411 (create_tracepoint_from_upload): Update.
1412
ffc2605c
TT
14132017-04-12 Tom Tromey <tom@tromey.com>
1414
1415 * tracepoint.c (scope_info): Update.
1416 * spu-tdep.c (spu_catch_start): Update.
1417 * python/python.c (gdbpy_decode_line): Update.
1418 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
1419 * python/py-breakpoint.c (bppy_init): Update.
1420 * probe.c (parse_probes): Update.
1421 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
1422 * location.h (event_location_deleter): New struct.
1423 (event_location_up): New typedef.
1424 (new_linespec_location, new_address_location, new_probe_location)
1425 (new_explicit_location, copy_event_location)
1426 (string_to_event_location, string_to_event_location_basic)
1427 (string_to_explicit_location): Update return type.
1428 (make_cleanup_delete_event_location): Remove.
1429 * location.c (new_linespec_location, new_address_location)
1430 (new_probe_location, new_explicit_location, copy_event_location):
1431 Return event_location_up.
1432 (delete_event_location_cleanup)
1433 (make_cleanup_delete_event_location): Remove.
1434 (string_to_explicit_location, string_to_event_location_basic)
1435 (string_to_event_location): Return event_location_up.
1436 * linespec.c (canonicalize_linespec, event_location_to_sals)
1437 (decode_line_with_current_source)
1438 (decode_line_with_last_displayed, decode_objc): Update.
1439 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
1440 * completer.c (location_completer): Update.
1441 * cli/cli-cmds.c (edit_command, list_command): Update.
1442 * breakpoint.c (create_overlay_event_breakpoint)
1443 (create_longjmp_master_breakpoint)
1444 (create_std_terminate_master_breakpoint)
1445 (create_exception_master_breakpoint)
1446 (create_thread_event_breakpoint): Update.
1447 (init_breakpoint_sal): Update. Remove some dead code.
1448 (create_breakpoint_sal): Change type of "location". Update.
1449 (create_breakpoints_sal, create_breakpoint, break_command_1)
1450 (dprintf_command, break_range_command, until_break_command)
1451 (init_ada_exception_breakpoint)
1452 (strace_marker_create_sals_from_location)
1453 (update_static_tracepoint, trace_command, ftrace_command)
1454 (strace_command, create_tracepoint_from_upload): Update.
1455 * break-catch-throw.c (re_set_exception_catchpoint): Update.
1456 * ax-gdb.c (agent_command_1): Update.
1457
8f10c932
PA
14582017-04-12 Pedro Alves <palves@redhat.com>
1459
1460 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
1461 * configure.tgt: Handle i[34567]86-*-go32* and
1462 i[34567]86-*-msdosdjgpp*.
1463 * i386-tdep.c (i386_svr4_reg_to_regnum):
1464 Make extern.
1465 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
1466 i386-go32-tdep.c.
1467 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
1468 * i386-go32-tdep.c: New file.
1469 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
1470 declarations.
1471
0a31ccfb
SM
14722017-04-12 Simon Marchi <simon.marchi@ericsson.com>
1473
1474 * aix-thread.c (pd_status2str): Change return type to const char *.
1475
e9bb3fbb
PA
14762017-04-12 Pedro Alves <palves@redhat.com>
1477
1478 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
1479 calls to set_gdbarch_gnu_triplet_regexp.
1480
53375380
PA
14812017-04-12 Pedro Alves <palves@redhat.com>
1482
1483 PR gdb/21323
1484 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
1485 New enum value.
1486 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
1487 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
1488 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
1489 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
1490 * gdbarch.h, gdbarch.c: Regenerate.
1491 * aarch64-tdep.c (aarch64_gdbarch_init): Override
1492 gdbarch_wchar_bit and gdbarch_wchar_signed.
1493 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
1494 * arm-tdep.c (arm_gdbarch_init): Likewise.
1495 * avr-tdep.c (avr_gdbarch_init): Likewise.
1496 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
1497 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
1498 * i386-tdep.c (i386_go32_init_abi): Likewise.
1499 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1500 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1501 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1502 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
1503 * sh-tdep.c (sh_gdbarch_init): Likewise.
1504 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1505 * sparc64-tdep.c (sparc64_init_abi): Likewise.
1506 * windows-tdep.c (windows_init_abi): Likewise.
1507 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
1508
53e710ac
PA
15092017-04-12 Pedro Alves <palves@redhat.com>
1510
1511 PR c++/21323
1512 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
1513 cplus_primitive_type_char32_t>: New enum values.
1514 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
1515 and cplus_primitive_type_char32_t.
1516 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
1517 32, use the archtecture's built-in type for char16_t and char32_t,
1518 respectively. Otherwise, fallback to init_integer_type as before,
1519 but make the type unsigned, and issue a complaint.
1520 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
1521
ab0538b8
AH
15222017-04-12 Alan Hayward <alan.hayward@arm.com>
1523
5e0e0422 1524 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
1525 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
1526
5430098f
SDJ
15272017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1528
1529 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
1530 'const char *'.
1531
7c5ded6a
SDJ
15322017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1533
1534 * common/common-utils.c (free_vector_argv): New function.
1535 * common/common-utils.h: Include <vector>.
1536 (free_vector_argv): New prototype.
1537 * darwin-nat.c (darwin_create_inferior): Rewrite function
1538 prototype in order to constify "exec_file" and accept a
1539 "std::string" for "allargs".
1540 * fork-child.c: Include <vector>.
1541 (breakup_args): Rewrite function, using C++.
1542 (fork_inferior): Rewrite function header, constify "exec_file_arg"
1543 and accept "std::string" for "allargs". Update the code to
1544 calculate "argv" based on "allargs". Update calls to "exec_fun"
1545 and "execvp".
1546 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
1547 order to constify "exec_file" and accept a "std::string" for
1548 "allargs".
1549 * go32-nat.c (go32_create_inferior): Likewise.
1550 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
1551 * infcmd.c (run_command_1): Constify "exec_file". Use
1552 "std::string" for inferior arguments.
1553 * inferior.h (fork_inferior): Update prototype.
1554 * linux-nat.c (linux_nat_create_inferior): Rewrite function
1555 prototype in order to constify "exec_file" and accept a
1556 "std::string" for "allargs".
1557 * nto-procfs.c (procfs_create_inferior): Likewise.
1558 * procfs.c (procfs_create_inferior): Likewise.
1559 * remote-sim.c (gdbsim_create_inferior): Likewise.
1560 * remote.c (extended_remote_run): Update code to accept
1561 "std::string" as argument.
1562 (extended_remote_create_inferior): Rewrite function prototype in
1563 order to constify "exec_file" and accept a "std::string" for
1564 "allargs".
1565 * rs6000-nat.c (super_create_inferior): Likewise.
1566 (rs6000_create_inferior): Likewise.
1567 * target.h (struct target_ops) <to_create_inferior>: Likewise.
1568 * windows-nat.c (windows_create_inferior): Likewise.
1569
ae0eee42
PA
15702017-04-11 Pedro Alves <palves@redhat.com>
1571
1572 * thread.c: Fix whitespace throughout.
1573
a6acac06
PR
15742017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
1575
1576 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
1577
64403bd1
AH
15782017-04-11 Alan Hayward <alan.hayward@arm.com>
1579
1580 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
1581
a5bef50f
SDJ
15822017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
1583
1584 PR gdb/21364
1585 * osdata.c (info_osdata): Check if 'type' is an empty string
1586 instead of NULL.
1587
9295a5a9
PA
15882017-04-10 Pedro Alves <palves@redhat.com>
1589
1590 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
1591 (ptid_to_global_thread_id, in_thread_list)
1592 (do_captured_list_thread_ids, set_resumed, set_running)
1593 (set_executing, set_stop_requested, finish_thread_state)
1594 (validate_registers_access, can_access_registers_ptid)
1595 (print_thread_info_1, switch_to_thread)
1596 (do_restore_current_thread_cleanup)
1597 (make_cleanup_restore_current_thread, thread_command)
1598 (thread_name_command): Use operator== instead of ptid_equal.
1599
996812e3
PA
16002017-04-10 Pedro Alves <palves@redhat.com>
1601
1602 * thread.c (struct current_thread_cleanup) <next>: Delete field.
1603 (current_thread_cleanup_chain): Delete.
1604 (restore_current_thread_cleanup_dtor)
1605 (make_cleanup_restore_current_thread): Remove references to
1606 current_thread_cleanup_chain.
1607
845b344f
AH
16082017-04-10 Alan Hayward <alan.hayward@arm.com>
1609
1610 * msp430-tdep.c (msp430_pseudo_register_read): Never return
1611 REG_UNKNOWN.
1612
803bdfe4
YQ
16132017-04-10 Yao Qi <yao.qi@linaro.org>
1614
1615 PR gdb/19942
1616 * gdbthread.h (thread_info::deletable): New method.
1617 (thread_info::incref): New method.
1618 (thread_info::decref): New method.
1619 (thread_info::refcount): Move it to private.
1620 * infrun.c (save_stop_context): Call inc_refcount.
1621 (release_stop_context_cleanup): Likewise.
1622 * thread.c (set_thread_exited): New function.
1623 (init_thread_list): Delete "tp" only it is deletable, otherwise
1624 call set_thread_exited.
1625 (delete_thread_1): Call set_thread_exited.
1626 (current_thread_cleanup) <inferior_pid>: Remove.
1627 <thread>: New field.
1628 (restore_current_thread_ptid_changed): Removed.
1629 (do_restore_current_thread_cleanup): Adjust.
1630 (restore_current_thread_cleanup_dtor): Don't call
1631 find_thread_ptid.
1632 (set_thread_refcount): Use dec_refcount.
1633 (make_cleanup_restore_current_thread): Adjust.
1634 (thread_apply_all_command): Call inc_refcount.
1635 (_initialize_thread): Don't call
1636 observer_attach_thread_ptid_changed.
1637
8c25b497
YQ
16382017-04-10 Yao Qi <yao.qi@linaro.org>
1639
1640 * thread.c (delete_thread_1): Hoist code on marking thread as
1641 exited.
1642
8473b447
SM
16432017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
1644
1645 * windows-nat.c (windows_detach): Initialize ptid with
1646 minus_one_ptid.
1647
6670ec13
SM
16482017-04-07 Simon Marchi <simon.marchi@ericsson.com>
1649
1650 * unittests/ptid-selftests.c: Fix erroneous assert messages.
1651
ba2f91bb
AH
16522017-04-07 Alan Hayward <alan.hayward@arm.com>
1653
1654 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
1655 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
1656 (bfin_pseudo_register_write): Likewise
1657
436252de
SM
16582017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * common/ptid.h (struct ptid): Change to...
1661 (class ptid_t): ... this.
1662 <ptid_t>: New constructors.
1663 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
1664 matches>: New methods.
1665 <make_null, make_minus_one>: New static methods.
1666 <pid>: Rename to...
1667 <m_pid>: ...this.
1668 <lwp>: Rename to...
1669 <m_lwp>: ...this.
1670 <tid>: Rename to...
1671 <m_tid>: ...this.
1672 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
1673 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
1674 as references, move comment to class ptid_t.
1675 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
1676 ptid_t static methods.
1677 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
1678 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
1679 Take ptid arguments as references, implement using ptid_t methods.
1680 * unittests/ptid-selftests.c: New file.
1681 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1682 unittests/ptid-selftests.c.
1683 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
1684
0dedf377
TP
16852017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
1686
1687 * python/python.c (python_run_simple_file): Cast mode literal to
1688 non-const char pointer as expected by PyFile_FromString.
1689
4e9868d4
SM
16902017-04-05 Simon Marchi <simon.marchi@ericsson.com>
1691
1692 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
1693 minus_one_ptid and null_ptid.
1694
9bf2a700
PA
16952017-04-05 Pedro Alves <palves@redhat.com>
1696
1697 * warning.m4 (build_warnings): Remove -Wno-write-strings.
1698 * configure: Regenerate.
1699
a121b7c1
PA
17002017-04-05 Pedro Alves <palves@redhat.com>
1701
1702 * ada-exp.y (yyerror): Constify.
1703 * ada-lang.c (bound_name, get_selections)
1704 (ada_variant_discrim_type)
1705 (ada_variant_discrim_name, ada_value_struct_elt)
1706 (ada_lookup_struct_elt_type, is_unchecked_variant)
1707 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
1708 (catch_ada_exception_command_split)
1709 (catch_ada_assert_command_split, catch_assert_command)
1710 (ada_op_name): Constify.
1711 * ada-lang.h (ada_yyerror, get_selections)
1712 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
1713 * arc-tdep.c (arc_print_frame_cache): Constify.
1714 * arm-tdep.c (arm_skip_stub): Constify.
1715 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
1716 (gen_aggregate_elt_ref): Constify.
1717 * bcache.c (print_bcache_statistics): Constify.
1718 * bcache.h (print_bcache_statistics): Constify.
1719 * break-catch-throw.c (catch_exception_command_1):
1720 * breakpoint.c (struct ep_type_description::description):
1721 Constify.
1722 (add_solib_catchpoint): Constify.
1723 (catch_fork_command_1): Add cast.
1724 (add_catch_command): Constify.
1725 * breakpoint.h (add_catch_command, add_solib_catchpoint):
1726 Constify.
1727 * bsd-uthread.c (bsd_uthread_state): Constify.
1728 * buildsym.c (patch_subfile_names): Constify.
1729 * buildsym.h (next_symbol_text_func, patch_subfile_names):
1730 Constify.
1731 * c-exp.y (yyerror): Constify.
1732 (token::oper): Constify.
1733 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
1734 * c-varobj.c (cplus_describe_child): Constify.
1735 * charset.c (find_charset_names): Add cast.
1736 (find_charset_names): Constify array and add const_cast.
1737 * cli/cli-cmds.c (complete_command, cd_command): Constify.
1738 (edit_command): Constify.
1739 * cli/cli-decode.c (lookup_cmd): Constify.
1740 * cli/cli-dump.c (dump_memory_command, dump_value_command):
1741 Constify.
1742 (struct dump_context): Constify.
1743 (add_dump_command, restore_command): Constify.
1744 * cli/cli-script.c (get_command_line): Constify.
1745 * cli/cli-script.h (get_command_line): Constify.
1746 * cli/cli-utils.c (check_for_argument): Constify.
1747 * cli/cli-utils.h (check_for_argument): Constify.
1748 * coff-pe-read.c (struct read_pe_section_data): Constify.
1749 * command.h (lookup_cmd): Constify.
1750 * common/print-utils.c (decimal2str): Constify.
1751 * completer.c (gdb_print_filename): Constify.
1752 * corefile.c (set_gnutarget): Constify.
1753 * cp-name-parser.y (yyerror): Constify.
1754 * cp-valprint.c (cp_print_class_member): Constify.
1755 * cris-tdep.c (cris_register_name, crisv32_register_name):
1756 Constify.
1757 * d-exp.y (yyerror): Constify.
1758 (struct token::oper): Constify.
1759 * d-lang.h (d_yyerror): Constify.
1760 * dbxread.c (struct header_file_location::name): Constify.
1761 (add_old_header_file, add_new_header_file, last_function_name)
1762 (dbx_next_symbol_text, add_bincl_to_list)
1763 (find_corresponding_bincl_psymtab, set_namestring)
1764 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
1765 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
1766 * defs.h (command_line_input, print_address_symbolic)
1767 (deprecated_readline_begin_hook): Constify.
1768 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
1769 Constify.
1770 * event-top.c (handle_line_of_input): Constify and add cast.
1771 * exceptions.c (catch_errors): Constify.
1772 * exceptions.h (catch_errors): Constify.
1773 * expprint.c (print_subexp_standard, op_string, op_name)
1774 (op_name_standard, dump_raw_expression, dump_raw_expression):
1775 * expression.h (op_name, op_string, dump_raw_expression):
1776 Constify.
1777 * f-exp.y (yyerror): Constify.
1778 (struct token::oper): Constify.
1779 (struct f77_boolean_val::name): Constify.
1780 * f-lang.c (f_word_break_characters): Constify.
1781 * f-lang.h (f_yyerror): Constify.
1782 * fork-child.c (fork_inferior): Add cast.
1783 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
1784 (new_variant): Constify.
1785 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
1786 * gdbarch.c: Regenerate.
1787 * gdbcore.h (set_gnutarget): Constify.
1788 * go-exp.y (yyerror): Constify.
1789 (token::oper): Constify.
1790 * go-lang.h (go_yyerror): Constify.
1791 * go32-nat.c (go32_sysinfo): Constify.
1792 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
1793 * guile/scm-cmd.c (cmdscm_function): Constify.
1794 * guile/scm-param.c (pascm_param_value): Constify.
1795 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
1796 (h8300sx_register_name): Constify.
1797 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
1798 Constify.
1799 * ia64-tdep.c (ia64_register_names): Constify.
1800 * infcmd.c (construct_inferior_arguments): Constify.
1801 (path_command, attach_post_wait): Constify.
1802 * language.c (show_range_command, show_case_command)
1803 (unk_lang_error): Constify.
1804 * language.h (language_defn::la_error)
1805 (language_defn::la_name_of_this): Constify.
1806 * linespec.c (decode_line_2): Constify.
1807 * linux-thread-db.c (thread_db_err_str): Constify.
1808 * lm32-tdep.c (lm32_register_name): Constify.
1809 * m2-exp.y (yyerror): Constify.
1810 * m2-lang.h (m2_yyerror): Constify.
1811 * m32r-tdep.c (m32r_register_names): Constify and make static.
1812 * m68hc11-tdep.c (m68hc11_register_names): Constify.
1813 * m88k-tdep.c (m88k_register_name): Constify.
1814 * macroexp.c (appendmem): Constify.
1815 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
1816 (upgrade_type, parse_external, parse_partial_symbols)
1817 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
1818 (new_symbol): Constify.
1819 * memattr.c (mem_info_command): Constify.
1820 * mep-tdep.c (register_name_from_keyword): Constify.
1821 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
1822 Constify.
1823 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
1824 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
1825 * mi/mi-main.c (captured_mi_execute_command): Constify and add
1826 cast.
1827 (mi_execute_async_cli_command): Constify.
1828 * mips-tdep.c (mips_register_name): Constify.
1829 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
1830 (am33_register_name, am33_2_register_name)
1831 * moxie-tdep.c (moxie_register_names): Constify.
1832 * nat/linux-osdata.c (osdata_type): Constify fields.
1833 * nto-tdep.c (nto_parse_redirection): Constify.
1834 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
1835 (lookup_child_selector): Constify.
1836 (objc_methcall::name): Constify.
1837 * objc-lang.h (lookup_objc_class, lookup_child_selector)
1838 (lookup_struct_typedef): Constify.
1839 * objfiles.c (pc_in_section): Constify.
1840 * objfiles.h (pc_in_section): Constify.
1841 * p-exp.y (struct token::oper): Constify.
1842 (yyerror): Constify.
1843 * p-lang.h (pascal_yyerror): Constify.
1844 * parser-defs.h (op_name_standard): Constify.
1845 (op_print::string): Constify.
1846 (exp_descriptor::op_name): Constify.
1847 * printcmd.c (print_address_symbolic): Constify.
1848 * psymtab.c (print_partial_symbols): Constify.
1849 * python/py-breakpoint.c (stop_func): Constify.
1850 (bppy_get_expression): Constify.
1851 * python/py-cmd.c (cmdpy_completer::name): Constify.
1852 (cmdpy_function): Constify.
1853 * python/py-event.c (evpy_add_attribute)
1854 (gdbpy_initialize_event_generic): Constify.
1855 * python/py-event.h (evpy_add_attribute)
1856 (gdbpy_initialize_event_generic): Constify.
1857 * python/py-evts.c (add_new_registry): Constify.
1858 * python/py-finishbreakpoint.c (outofscope_func): Constify.
1859 * python/py-framefilter.c (get_py_iter_from_func): Constify.
1860 * python/py-inferior.c (get_buffer): Add cast.
1861 * python/py-param.c (parm_constant::name): Constify.
1862 * python/py-unwind.c (fprint_frame_id): Constify.
1863 * python/python.c (gdbpy_parameter_value): Constify.
1864 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
1865 * remote.c (memory_packet_config::name): Constify.
1866 (show_packet_config_cmd, remote_write_bytes)
1867 (remote_buffer_add_string):
1868 * reverse.c (exec_reverse_once): Constify.
1869 * rs6000-tdep.c (variant::name, variant::description): Constify.
1870 * rust-exp.y (rustyyerror): Constify.
1871 * rust-lang.c (rust_op_name): Constify.
1872 * rust-lang.h (rustyyerror): Constify.
1873 * serial.h (serial_ops::name): Constify.
1874 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
1875 (sh_sh3e_register_name, sh_sh2e_register_name)
1876 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
1877 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
1878 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
1879 (sh_sh4al_dsp_register_name): Constify.
1880 * sh64-tdep.c (sh64_register_name): Constify.
1881 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
1882 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
1883 * stabsread.c (patch_block_stabs, read_type_number)
1884 (ref_map::stabs, ref_add, process_reference)
1885 (symbol_reference_defined, define_symbol, define_symbol)
1886 (error_type, read_type, read_member_functions, read_cpp_abbrev)
1887 (read_one_struct_field, read_struct_fields, read_baseclasses)
1888 (read_tilde_fields, read_struct_type, read_array_type)
1889 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
1890 (read_huge_number, read_range_type, read_args, common_block_start)
1891 (find_name_end): Constify.
1892 * stabsread.h (common_block_start, define_symbol)
1893 (process_one_symbol, symbol_reference_defined, ref_add):
1894 * symfile.c (get_section_index, add_symbol_file_command):
1895 * symfile.h (get_section_index): Constify.
1896 * target-descriptions.c (tdesc_type::name): Constify.
1897 (tdesc_free_type): Add cast.
1898 * target.c (find_default_run_target):
1899 (add_deprecated_target_alias, find_default_run_target)
1900 (target_announce_detach): Constify.
1901 (do_option): Constify.
1902 * target.h (add_deprecated_target_alias): Constify.
1903 * thread.c (print_thread_info_1): Constify.
1904 * top.c (deprecated_readline_begin_hook, command_line_input):
1905 Constify.
1906 (init_main): Add casts.
1907 * top.h (handle_line_of_input): Constify.
1908 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
1909 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
1910 (tfind_command): Rename to ...
1911 (tfind_command_1): ... this and constify.
1912 (tfind_command): New function.
1913 (tfind_end_command, tfind_start_command): Adjust.
1914 (encode_source_string): Constify.
1915 * tracepoint.h (encode_source_string): Constify.
1916 * tui/tui-data.c (tui_partial_win_by_name): Constify.
1917 * tui/tui-data.h (tui_partial_win_by_name): Constify.
1918 * tui/tui-source.c (tui_set_source_content_nil): Constify.
1919 * tui/tui-source.h (tui_set_source_content_nil): Constify.
1920 * tui/tui-win.c (parse_scrolling_args): Constify.
1921 * tui/tui-windata.c (tui_erase_data_content): Constify.
1922 * tui/tui-windata.h (tui_erase_data_content): Constify.
1923 * tui/tui-winsource.c (tui_erase_source_content): Constify.
1924 * tui/tui.c (tui_enable): Add cast.
1925 * utils.c (defaulted_query): Constify.
1926 (init_page_info): Add cast.
1927 (puts_debug, subset_compare): Constify.
1928 * utils.h (subset_compare): Constify.
1929 * varobj.c (varobj_format_string): Constify.
1930 * varobj.h (varobj_format_string): Constify.
1931 * vax-tdep.c (vax_register_name): Constify.
1932 * windows-nat.c (windows_detach): Constify.
1933 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
1934 * xml-support.c (gdb_xml_end_element): Constify.
1935 * xml-tdesc.c (tdesc_start_reg): Constify.
1936 * xstormy16-tdep.c (xstormy16_register_name): Constify.
1937 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
1938 * xtensa-tdep.h (xtensa_register_t::name): Constify.
1939
995816ba
PA
19402017-04-05 Pedro Alves <palves@redhat.com>
1941
1942 * proc-api.c (struct trans): Constify.
1943 (procfs_note): Constify.
1944 * proc-events.c (struct trans, syscall_table):
1945 * proc-flags.c (struct trans): Constify.
1946 * proc-utils.h (procfs_note): Constify.
1947 * proc-why.c (struct trans): Constify.
1948 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
1949 (procfs_detach): Constify.
1950 * sol-thread.c (struct string_map): Constify.
1951 (td_err_string, td_state_string): Constify.
1952
3e83a920
PA
19532017-04-05 Pedro Alves <palves@redhat.com>
1954
1955 * proc-api.c (procfs_filename): Don't initialize
1956 procfs_filename.
1957 (prepare_to_trace): Assume procfs_filename is non-NULL.
1958 (_initialize_proc_api): Give procfs_filename a default value here.
1959
63160a43
PA
19602017-04-05 Pedro Alves <palves@redhat.com>
1961
1962 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
1963 'cond_string' parameter.
1964 (extract_exception_regexp): Constify 'string' parameter.
1965 (catch_exception_command_1): Constify.
1966 * breakpoint.c (init_catchpoint)
1967 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
1968 parameter.
1969 (ep_parse_optional_if_clause, catch_fork_command_1)
1970 (catch_exec_command_1): Constify.
1971 * breakpoint.h (init_catchpoint): Constify 'cond_string'
1972 parameter.
1973 (ep_parse_optional_if_clause): Constify.
1974 * cli/cli-utils.c (remove_trailing_whitespace)
1975 (check_for_argument): Constify.
1976 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
1977 non-const overload.
1978 (check_for_argument): Likewise.
1979
9b2eba3d
PA
19802017-04-05 Pedro Alves <palves@redhat.com>
1981
1982 * event-top.c (command_line_handler): Add cast to execute_command
1983 call.
1984 * record-btrace.c (cmd_record_btrace_bts_start)
1985 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
1986 (cmd_record_btrace_start): Add cast to execute_command call.
1987 * record-full.c (record_full_goto_insn):
1988 * record.c (record_start, record_stop): Add cast to
1989 execute_command_to_string calls.
1990 (cmd_record_start): Add cast to execute_command calls.
1991
2adadf51
PA
19922017-04-05 Pedro Alves <palves@redhat.com>
1993
1994 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
1995 static inline function.
1996 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
1997 array and use gdb_PyArg_ParseTupleAndKeywords.
1998 * python/py-cmd.c (cmdpy_init): Likewise.
1999 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
2000 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
2001 (infpy_search_memory): Likewise.
2002 * python/py-objfile.c (objfpy_add_separate_debug_file)
2003 (gdbpy_lookup_objfile): Likewise.
2004 * python/py-symbol.c (gdbpy_lookup_symbol)
2005 (gdbpy_lookup_global_symbol): Likewise.
2006 * python/py-type.c (gdbpy_lookup_type): Likewise.
2007 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
2008 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
2009 Likewise.
2010
0d1f4ceb
PA
20112017-04-05 Pedro Alves <palves@redhat.com>
2012
2013 * python/python-internal.h (gdb_PyGetSetDef): New type.
2014 * python/py-block.c (block_object_getset)
2015 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
2016 * python/py-event.c (event_object_getset)
2017 (finish_breakpoint_object_getset): Likewise.
2018 * python/py-inferior.c (inferior_object_getset): Likewise.
2019 * python/py-infthread.c (thread_object_getset): Likewise.
2020 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
2021 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
2022 * python/py-objfile.c (objfile_getset): Likewise.
2023 * python/py-progspace.c (pspace_getset): Likewise.
2024 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
2025 Likewise.
2026 * python/py-record.c (recpy_record_getset): Likewise.
2027 * python/py-symbol.c (symbol_object_getset): Likewise.
2028 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
2029 Likewise.
2030 * python/py-type.c (type_object_getset, field_object_getset):
2031 Likewise.
2032 * python/py-value.c (value_object_getset): Likewise.
2033
4d759979
PA
20342017-04-05 Pedro Alves <palves@redhat.com>
2035
2036 * python/python-internal.h (gdb_PyObject_CallMethod)
2037 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
2038 New functions.
2039 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
2040 (PySys_GetObject, PySys_SetPath): New macros.
2041
fdf9e36f
PA
20422017-04-05 Pedro Alves <palves@redhat.com>
2043
2044 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
2045 info_osdata_command.
2046 * osdata.c (info_osdata_command): Rename to ...
2047 (info_osdata): ... this. Constify 'type' parameter, and remove
2048 the 'from_tty' parameter. Accept NULL TYPE.
2049 (info_osdata_command): New function.
2050 * osdata.h (info_osdata_command): Remove declaration.
2051 (info_osdata): New declaration.
2052
9f33b8b7
PA
20532017-04-05 Pedro Alves <palves@redhat.com>
2054
2055 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
2056 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
2057 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
2058 parameter.
2059 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
2060 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
2061 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
2062 parameter.
2063 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
2064 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
2065 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
2066 (mi_cmd_file_list_exec_source_files)
2067 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
2068 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
2069 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
2070 parameter.
2071 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
2072 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
2073 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
2074 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
2075 (mi_cmd_stack_info_frame): Constify 'command' parameter.
2076 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
2077 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
2078 'command' parameter.
2079 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
2080 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
2081 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
2082 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
2083 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
2084 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
2085 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
2086 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
2087 (mi_cmd_var_set_update_range): Constify 'command' parameter.
2088 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
2089 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
2090 parameter.
2091 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
2092 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
2093 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
2094 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
2095 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
2096 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
2097 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
2098 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
2099 (mi_cmd_data_list_changed_registers)
2100 (mi_cmd_data_write_register_values)
2101 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
2102 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
2103 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
2104 (mi_cmd_list_features, mi_cmd_list_target_features)
2105 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
2106 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
2107 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
2108 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
2109 (mi_cmd_trace_frame_collected): Constify 'command'
2110 parameter.
2111 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
2112 'command' parameter.
2113
67cb5b2d
PA
21142017-04-05 Pedro Alves <palves@redhat.com>
2115
2116 * ada-lang.c (ada_completer_word_break_characters): Now a const
2117 array.
2118 (ada_get_gdb_completer_word_break_characters): Constify.
2119 * completer.c (gdb_completer_command_word_break_characters)
2120 (gdb_completer_file_name_break_characters)
2121 (gdb_completer_quote_characters): Now const arrays.
2122 (get_gdb_completer_quote_characters): Constify.
2123 (set_rl_completer_word_break_characters): New function.
2124 (set_gdb_completion_word_break_characters)
2125 (complete_line_internal): Use it.
2126 * completer.h (get_gdb_completer_quote_characters): Constify.
2127 (set_rl_completer_word_break_characters): Declare.
2128 * f-lang.c (f_word_break_characters): Constify.
2129 * language.c (default_word_break_characters): Constify.
2130 * language.h (language_defn::la_word_break_characters): Constify.
2131 (default_word_break_characters): Constify.
2132 * top.c (init_main): Use set_rl_completer_word_break_characters.
2133
7a114964
PA
21342017-04-05 Pedro Alves <palves@redhat.com>
2135
2136 * aix-thread.c (aix_thread_pid_to_str)
2137 (aix_thread_extra_thread_info): Constify.
2138 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
2139 * bsd-uthread.c (bsd_uthread_extra_thread_info)
2140 (bsd_uthread_pid_to_str): Constify.
2141 * corelow.c (core_pid_to_str): Constify.
2142 * darwin-nat.c (darwin_pid_to_str): Constify.
2143 * fbsd-nat.c (fbsd_pid_to_str): Constify.
2144 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
2145 Constify.
2146 * gnu-nat.c (gnu_pid_to_str): Constify.
2147 * go32-nat.c (go32_pid_to_str): Constify.
2148 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
2149 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
2150 * inferior.c (inferior_pid_to_str): Constify.
2151 * linux-nat.c (linux_nat_pid_to_str): Constify.
2152 * linux-tdep.c (linux_core_pid_to_str): Constify.
2153 * linux-thread-db.c (thread_db_pid_to_str)
2154 (thread_db_extra_thread_info): Constify.
2155 * nto-tdep.c (nto_extra_thread_info): Constify.
2156 * nto-tdep.h (nto_extra_thread_info): Constify.
2157 * obsd-nat.c (obsd_pid_to_str): Constify.
2158 * procfs.c (procfs_pid_to_str): Constify.
2159 * ravenscar-thread.c (ravenscar_extra_thread_info)
2160 (ravenscar_pid_to_str): Constify.
2161 * remote-sim.c (gdbsim_pid_to_str): Constify.
2162 * remote.c (remote_threads_extra_info, remote_pid_to_str):
2163 Constify.
2164 * sol-thread.c (solaris_pid_to_str): Constify.
2165 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
2166 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
2167 * target.c (default_pid_to_str, target_pid_to_str)
2168 (normal_pid_to_str, default_pid_to_str): Constify.
2169 * target.h (target_ops::to_pid_to_str)
2170 (target_ops::to_extra_thread_info): Constify.
2171 (target_pid_to_str, normal_pid_to_str): Constify.
2172 * windows-nat.c (windows_pid_to_str): Constify.
2173 * gdbarch.sh (core_pid_to_str): Constify.
2174 * target-delegates.c: Regenerate.
2175 * gdbarch.h, gdbarch.c: Regenerate.
2176
69bbf465
PA
21772017-04-05 Pedro Alves <palves@redhat.com>
2178
2179 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
2180 the memory of the temporary warning_pre_print override.
2181 * utils.c (warning_pre_print): Constify.
2182 * utils.h (warning_pre_print): Constify.
2183
be47f9e8
PA
21842017-04-05 Pedro Alves <palves@redhat.com>
2185
2186 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
2187 (shell_command): New function.
2188 (make_command): Use std::string.
2189 (init_cli_cmds): Register shell_command instead of shell_escape.
2190
bde6261a
PA
21912017-04-05 Pedro Alves <palves@redhat.com>
2192
2193 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
2194 * tracepoint.c (default_collect): Don't initialize.
2195
b38ef47f
PA
21962017-04-05 Pedro Alves <palves@redhat.com>
2197
2198 * macroexp.c (macro_buffer::shared): Now a bool.
2199 (init_buffer): Update.
2200 (init_shared_buffer): Constify 'addr' parameter.
2201 (substitute_args, expand, macro_expand, macro_expand_next): Remove
2202 casts.
2203
f995bbe8
PA
22042017-04-05 Pedro Alves <palves@redhat.com>
2205
2206 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
2207 * disasm.c (set_disassembler_options): Constify local.
2208 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
2209
4a596fe2
SDJ
22102017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
2211
2212 PR gdb/21352
2213 * tracefile.c (tsave_command): Fix argument parsing for '-r'
2214 option.
2215
2cad08ea
YQ
22162017-04-05 Yao Qi <yao.qi@linaro.org>
2217
2218 * frame.c (frame_unwind_register_unsigned): Call
2219 frame_unwind_register_value.
2220
55a98976
YQ
22212017-04-05 Yao Qi <yao.qi@linaro.org>
2222
2223 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
2224 Use gdb_test_multiple, and don't match anchor.
2225
4ac40124
PA
22262017-04-05 Pedro Alves <palves@redhat.com>
2227
2228 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
2229 (Write After Approval): Remove Simon Marchi.
2230
c053b654
PA
22312017-04-05 Pedro Alves <palves@redhat.com>
2232
2233 * common/gdb_optional.h (optional::optional): Make constexpr and
2234 initialize m_dummy.
2235
4c7bf4f9
JB
22362017-04-04 John Baldwin <jhb@FreeBSD.org>
2237
2238 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
2239 (amd64fbsd_jmp_buf_reg_offset): Remove.
2240 (amd64fbsd_supply_uthread): Remove function.
2241 (amd64fbsd_collect_uthread): Remove function.
2242 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
2243 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
2244 (x86_64-*-freebsd*): Remove bsd-uthread.o.
2245 (fbsd-nat.c): Update comment.
2246 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
2247 (i386fbsd_jmp_buf_reg_offset): Remove.
2248 (i386fbsd_supply_uthread): Remove function.
2249 (i386fbsd_collect_uthread): Remove function.
2250 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
2251
1e1a8bef
JB
22522017-04-04 John Baldwin <jhb@FreeBSD.org>
2253
2254 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
2255 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
2256 * NEWS: Mention that support for FreeBSD/alpha was removed.
2257 * alpha-fbsd-tdep.c: Delete file.
2258 * config/alpha/fbsd.mh: Delete file.
2259 * configure.host: Delete alpha*-*-freebsd* and
2260 alpha*-*-kfreebsd*-gnu.
2261 * configure.tgt: Delete alpha*-*-freebsd* and
2262 alpha*-*-kfreebsd*-gnu.
2263
49907934
JB
22642017-04-04 John Baldwin <jhb@FreeBSD.org>
2265
2266 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
2267 amd64bsd_store_inferior_registers): Use ptid from regcache.
2268
6f77053d
PA
22692017-04-04 Pedro Alves <palves@redhat.com>
2270
2271 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
2272 data fields, make them private and add "m_" prefixes.
2273 (lnp_state_machine::lnp_state_machine): New ctor.
2274 (record_line, check_line_address, handle_set_discriminator)
2275 (handle_set_address, handle_advance_pc, handle_special_opcode)
2276 (handle_advance_line, handle_set_file, handle_negate_stmt)
2277 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
2278 (end_sequence, advance_line): New methods.
2279 (m_gdbarch, m_record_lines_p): New fields.
2280 (lnp_reader_state): Delete.
2281 (dwarf_record_line): Rename to ...
2282 (lnp_state_machine::record_line): ... adjust.
2283 (init_lnp_state_machine): Delete.
2284 (lnp_state_machine::lnp_state_machine): New.
2285 (check_line_address): Rename to ...
2286 (lnp_state_machine::check_line_address): This.
2287 (dwarf_decode_lines_1): Remove reference to "reader_state".
2288 Adjust lnp_state_machine having a non-default ctor. Use bool.
2289 State machine internal state manipulation moved to
2290 lnp_state_machine methods.
2291
9c541725
PA
22922017-04-04 Pedro Alves <palves@redhat.com>
2293
2294 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2295 unittests/offset-type-selftests.c.
2296 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
2297 * common/offset-type.h: New file.
2298 * common/preprocessor.h: New file.
2299 * common/traits.h: New file.
2300 * common/valid-expr.h: New file.
2301 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
2302 sect_offset and cu_offset strong typedefs throughout.
2303 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
2304 typedefs throughout.
2305 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
2306 sect_offset and cu_offset strong typedefs throughout.
2307 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
2308 typedefs throughout.
2309 * gdbtypes.h: Include "common/offset-type.h".
2310 (cu_offset): Now an offset type (strong typedef) instead of a
2311 struct.
2312 (sect_offset): Likewise.
2313 (union call_site_parameter_u): Rename "param_offset" field to
2314 "param_cu_off".
2315 * unittests/offset-type-selftests.c: New file.
2316
ecfb656c
PA
23172017-04-04 Pedro Alves <palves@redhat.com>
2318
2319 * common/underlying.h: New file.
2320 * dwarf2read.c: Include "common/gdb_optional.h" and
2321 "common/underlying.h".
2322 (dir_index, file_name_index): New types.
2323 (file_entry): Use them.
2324 (file_entry::include): Use to_underlying.
2325 (line_header::add_file_name): Use dir_index.
2326 (read_formatted_entries): Use gdb::optional. Read form before
2327 writting to file_entry.
2328 (dwarf_decode_line_header): Use dir_index.
2329 (lnp_state_machine::current_file): Use to_underlying.
2330 (lnp_state_machine::file): Change type to file_name_index.
2331 (dwarf_record_line): Use to_underlying.
2332 (init_lnp_state_machine): Use file_name_index.
2333 (dwarf_decode_lines_1): Use dir_index and file_name_index.
2334
d194f1fe
PA
23352017-04-04 Pedro Alves <palves@redhat.com>
2336
2337 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
2338 operator bool, has_value and get methods.
2339
fff8551c
PA
23402017-04-04 Pedro Alves <palves@redhat.com>
2341
2342 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
2343 fields.
2344 (line_header): Initialize all data fields. Change type of
2345 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
2346 Change type of include_dirs to std::vector<const char *>. Remove
2347 num_include_dirs, include_dirs_size. Change type of file_names to
2348 std::vector<file_entry>. Remove num_file_names, file_names_size.
2349 (line_header::line_header): New.
2350 (line_header::add_include_dir, line_header::add_file_name): New
2351 methods.
2352 (line_header::include_dir_at): Remove NULL check.
2353 (line_header::file_name_at): Add const overload.
2354 (line_header_up): New unique_ptr typedef.
2355 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
2356 std::vector. Remove free_line_header call.
2357 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
2358 free_line_header call.
2359 (free_cu_line_header): Delete.
2360 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
2361 (setup_type_unit_groups): Use line_header_up instead of cleanups.
2362 Adjust to use std::vector.
2363 (free_line_header): Delete.
2364 (free_line_header_voidp): Use delete.
2365 (add_include_dir): Replace with ...
2366 (line_header::add_include_dir): ... this method. Use std::vector.
2367 (add_file_name): Replace with ...
2368 (line_header::add_file_name): ... this method. Use std::vector.
2369 (add_include_dir_stub): Delete.
2370 (read_formatted_entries): Remove memset.
2371 (dwarf_decode_line_header): Return a line_header_up instead of a
2372 raw pointer. Remove cleanup handling. Pass lambdas to
2373 read_formatted_entries. Adjust to use line_header methods.
2374 (dwarf_decode_lines_1): Adjust to use line_header methods.
2375 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
2376 use std::vector.
2377
d62a8ae2
SM
23782017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
2379
2380 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
2381 instead of struct ptid.
2382
db3a1dc7
AH
23832017-05-04 Alan Hayward <alan.hayward@arm.com>
2384
2385 * frame.c (get_frame_register_bytes): Unwind using value.
2386 (put_frame_register_bytes): Likewise.
2387
b1b45502
IB
23882017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
2389
2390 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
2391 aggregate-like.
2392
ec13808e
JK
23932017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
2394
2395 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
2396
12316564
YQ
23972017-03-29 Yao Qi <yao.qi@linaro.org>
2398
2399 * gdbthread.h (struct thread_info): Declare constructor and
2400 destructor. Add some in-class member initializers.
2401 * thread.c (free_thread): Remove.
2402 (init_thread_list): Call delete instead of free_thread.
2403 (new_thread): Call thread_info constructor.
2404 (thread_info::thread_info): New function.
2405 (thread_info::~thread_info): New function.
2406 (delete_thread_1): Call delete instead of free_thread.
2407 (make_cleanup_restore_current_thread): Move tp and frame to
2408 inner block.
2409
fe5f7374
AK
24102017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
2411
2412 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
2413 (arc_skip_prologue): Likewise.
2414 (arc_make_frame_cache): Likewise.
2415 (arc_pv_get_operand): New function.
2416 (arc_is_in_prologue): Likewise.
2417 (arc_analyze_prologue): Likewise.
2418 (arc_print_frame_cache): Likewise.
2419 (MAX_PROLOGUE_LENGTH): New constant.
2420
eea78757
AK
24212017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
2422
2423 * configure.tgt: Add arc-insn.o.
2424 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
2425 (dump_arc_instruction_command): New function.
2426 (arc_fprintf_disasm): Likewise.
2427 (arc_disassemble_info): Likewise.
2428 (arc_insn_get_operand_value): Likewise.
2429 (arc_insn_get_operand_value_signed): Likewise.
2430 (arc_insn_get_memory_base_reg): Likewise.
2431 (arc_insn_get_memory_offset): Likewise.
2432 (arc_insn_get_branch_target): Likewise.
2433 (arc_insn_dump): Likewise.
2434 (arc_insn_get_linear_next_pc): Likewise.
2435 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
2436 (arc_disassemble_info): Likewise.
2437 (arc_insn_get_branch_target): Likewise.
2438 (arc_insn_get_linear_next_pc): Likewise.
2439 * NEWS: Mention new "maint print arc arc-instruction".
2440
3be78afd
AK
24412017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
2442
2443 * arc-tdep (maintenance_print_arc_list): New variable.
2444 (maintenance_print_arc_command): New function.
2445
296ec4fa
AK
24462017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
2447
2448 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
2449 Add "limm" and "reserved".
2450 (arc_cannot_fetch_register, arc_cannot_store_register): Add
2451 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
2452 * arc-tdep.h (arc_regnum): Likewise.
2453
f74f865e
MF
24542017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2455
2456 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
2457 for THREADPTR register.
2458 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
2459 register.
2460 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
2461 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
2462 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
2463
0d0bf81a
MF
24642017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2465
2466 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
2467 registers above gdbarch_num_regs (gdbarch) as privileged in
2468 call0 ABI.
2469
0ce4291e
MF
24702017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2471
2472 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
2473 for a single specified register or for all registers in
2474 a0_base..a0_base + C0_NREGS range.
2475 (supply_gregset_reg): Call regcache_raw_supply for a single
2476 specified register or for all registers in a0_base..a0_base +
2477 C0_NREGS range.
2478
c56054f9
MF
24792017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2480
2481 * arch/xtensa.h (C0_NREGS): Add definition.
2482 * xtensa-tdep.c (C0_NREGS): Remove definition.
2483
a4398628
MF
24842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2485
2486 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
2487 Drop xtensa_default_isa initialization.
2488 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
2489
8c43009f
PA
24902017-03-27 Pedro Alves <palves@redhat.com>
2491
2492 * dwarf2read.c (file_entry) <dir_index>: Add comment.
2493 (file_entry::include_dir): New method.
2494 (line_header::include_dir_at, line_header::file_name_at): New
2495 methods.
2496 (setup_type_unit_groups, setup_type_unit_groups)
2497 (psymtab_include_file_name): Simplify using the new methods.
2498 (lnp_state_machine) <the_line_header>: New field.
2499 <file>: Add comment.
2500 (lnp_state_machine::current_file): New method.
2501 (dwarf_record_line): Simplify using the new methods.
2502 (init_lnp_state_machine): Initialize the "the_line_header" field.
2503 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
2504 Simplify using the new methods.
2505
a7e80b9e
PA
25062017-03-27 Pedro Alves <palves@redhat.com>
2507
2508 * cp-name-parser.y (make_empty): Delete.
2509 (demangler_special, nested_name, ptr_operator, array_indicator)
2510 (direct_declarator, declarator_1): Use fill_comp instead of
2511 make_empty.
2512
21047726
PA
25132017-03-27 Pedro Alves <palves@redhat.com>
2514
2515 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
2516 to ATTRIBUTE_PRINTF.
2517 * solib-target.c (library_list_start_list): Print "string" not
2518 "version".
2519 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
2520 gdb_xml_error call.
2521
d721ba37
PA
25222017-03-27 Pedro Alves <palves@redhat.com>
2523
2524 * dwarf2read.c (struct file_and_directory): New.
2525 (dwarf2_get_dwz_file): Adjust to use std::string.
2526 (dw2_get_file_names_reader): Adjust to use file_and_directory.
2527 (find_file_and_directory): Adjust to return a file_and_directory
2528 object.
2529 (read_file_scope): Adjust to use file_and_directory. Remove
2530 make_cleanup/do_cleanups calls.
2531 (open_and_init_dwp_file): Adjust to use std::string. Remove
2532 make_cleanup/do_cleanups calls.
2533 * python/python.c (do_start_initialization): Adjust to ldirname
2534 returning a std::string.
2535 * utils.c (ldirname): Now returns a std::string.
2536 * utils.h (ldirname): Change return type to std::string.
2537 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
2538 returning a std::string.
2539 * xml-tdesc.c (file_read_description_xml): Likewise.
2540
ed771251
AH
25412017-03-24 Alan Hayward <alan.hayward@arm.com>
2542
2543 * regcache.c (regcache_debug_print_register): New function.
2544 * regcache.h (regcache_debug_print_register): New declaration.
2545 * target.c (debug_print_register): Remove.
2546 (target_fetch_registers): Call regcache_debug_print_register.
2547 (target_store_registers): Likewise.
2548
568c1b9f
PB
25492017-03-24 Pádraig Brady <pbrady@fb.com>
2550
2551 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
2552 reference beyond the 'lh->include_dirs' array before accessing to
2553 it.
2554 (psymtab_include_file_name): Likewise.
2555 (dwarf_decode_lines_1): Likewise.
2556 (dwarf_decode_lines): Likewise.
2557 (file_file_name): Likewise.
2558
3e00d44f
SM
25592017-03-23 Simon Marchi <simon.marchi@ericsson.com>
2560
2561 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
2562 inferior_ptid.
2563 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
2564 ps_lsetfpregs): Likewise.
2565 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
2566 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
2567 ps_lsetfpregs): Likewise.
2568 * target.c (target_fetch_registers, target_store_registers):
2569 Remove asserts.
2570
077ae656
AH
25712017-03-23 Alan Hayward <alan.hayward@arm.com>
2572
2573 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
2574
1e2b521d
YQ
25752017-03-23 Yao Qi <yao.qi@linaro.org>
2576
2577 * aarch64-tdep.c (aarch64_process_record_test): Declare.
2578 (_initialize_aarch64_tdep): Register it.
2579 (aarch64_record_load_store): Handle PRFM instruction.
2580 (aarch64_process_record_test): New function.
2581
33877125
YQ
25822017-03-23 Yao Qi <yao.qi@linaro.org>
2583
2584 * aarch64-tdep.c (aarch64_record_load_store): Fix code
2585 indentation.
2586
a0eef940
YQ
25872017-03-23 Yao Qi <yao.qi@linaro.org>
2588
2589 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
2590
3f2a3564
PR
25912017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
2592
2593 python/python.c (do_start_initialization): Fix memory leak.
2594
b67aeab0
SM
25952017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
2596
2597 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
2598 using get_ptrace_pid.
2599 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
2600 inferior_ptid.
2601 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
2602 inferior_ptid instead of pid.
2603
ffdbe864
YQ
26042017-03-22 Yao Qi <yao.qi@linaro.org>
2605
2606 * aarch64-tdep.c: Wrap locally used classes in anonymous
2607 namespace.
2608 * arm-tdep.c: Likewise.
2609 * linespec.c: Likewise.
2610 * ui-out.c: Likewise.
2611
9d736fbf
JG
26122017-03-22 Jonah Graham <jonah@kichwacoders.com>
2613
2614 PR gdb/19637
2615 * python/lib/gdb/printer/bound_registers.py: Import sys.
2616
3de88e9a
SM
26172017-03-21 Simon Marchi <simon.marchi@ericsson.com>
2618
2619 * windows-nat.c (do_windows_fetch_inferior_registers): Add
2620 windows_thread_info parameter and use it instead of
2621 current_thread.
2622 (windows_fetch_inferior_registers): Don't set current_thread,
2623 pass the thread to do_windows_fetch_inferior_registers. Use
2624 ptid from regcache instead of inferior_ptid.
2625 (do_windows_store_inferior_registers): Add windows_thread_info
2626 parameter and use it instead of current_thread.
2627 (windows_store_inferior_registers): Don't set current_thread,
2628 pass the thread to do_windows_store_inferior_registers. Use
2629 ptid from regcache instead of inferior_ptid.
2630
0e7b8f61
SM
26312017-03-21 Simon Marchi <simon.marchi@ericsson.com>
2632
2633 * ser-mingw.c (ser_windows_raw): Remove reference to
2634 struct serial::current_timeout.
2635
5badf10a
IR
26362017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
2637
2638 PR tdep/20928
2639 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
2640 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
2641 (sparc64_fsr_type): Fix %fsr decoding.
2642
cee59b3f
TW
26432017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
2644
2645 * python/py-record-btrace.c (btpy_insn_data): Change return type
2646 for Python 2.
2647
639a9038
SM
26482017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
2649
2650 * spu-linux-nat.c (spu_fetch_inferior_registers,
2651 spu_store_inferior_registers): Use ptid from regcache, set and
2652 restore inferior_ptid.
2653 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
2654 Likewise.
2655
bcc0c096
SM
26562017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
2657
2658 * i386-linux-nat.c (fetch_register, store_register,
2659 i386_linux_fetch_inferior_registers,
2660 i386_linux_store_inferior_registers): Use ptid from regcache.
2661 * ia64-linux-nat.c (ia64_linux_fetch_register,
2662 ia64_linux_store_register): Likewise.
2663 * inf-ptrace.c (inf_ptrace_fetch_register,
2664 inf_ptrace_store_register): Likewise.
2665 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
2666 m32r_linux_store_inferior_registers): Likewise.
2667 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
2668 m68kbsd_store_inferior_registers): Likewise.
2669 * m68k-linux-nat.c (fetch_register, store_register,
2670 m68k_linux_fetch_inferior_registers,
2671 m68k_linux_store_inferior_registers): Likewise.
2672 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
2673 m88kbsd_store_inferior_registers): Likewise.
2674 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
2675 mips_fbsd_store_inferior_registers): Likewise.
2676 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
2677 mips64_linux_regsets_store_registers): Likewise.
2678 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
2679 mipsnbsd_store_inferior_registers): Likewise.
2680 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
2681 mips64obsd_store_inferior_registers): Likewise.
2682 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
2683 Likewise.
2684 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
2685 ppcfbsd_store_inferior_registers): Likewise.
2686 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
2687 ppc_linux_store_inferior_registers): Likewise.
2688 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
2689 ppcnbsd_store_inferior_registers): Likewise.
2690 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
2691 ppcobsd_store_registers): Likewise.
2692 * procfs.c (procfs_fetch_registers, procfs_store_registers):
2693 Likewise.
2694 * ravenscar-thread.c (ravenscar_fetch_registers,
2695 ravenscar_store_registers, ravenscar_prepare_to_store):
2696 Likewise.
2697 * record-btrace.c (record_btrace_fetch_registers,
2698 record_btrace_store_registers, record_btrace_prepare_to_store):
2699 Likewise.
2700 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
2701 Lookup inferior using ptid from regcache, instead of
2702 current_inferior.
2703 * remote.c (remote_fetch_registers, remote_store_registers): Use
2704 ptid from regcache.
2705 * rs6000-nat.c (fetch_register, store_register): Likewise.
2706 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
2707 s390_linux_store_inferior_registers): Likewise.
2708 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
2709 shnbsd_store_inferior_registers): Likewise.
2710 * sol-thread.c (sol_thread_fetch_registers,
2711 sol_thread_store_registers): Likewise.
2712 * sparc-nat.c (sparc_fetch_inferior_registers,
2713 sparc_store_inferior_registers): Likewise.
2714 * tilegx-linux-nat.c (fetch_inferior_registers,
2715 store_inferior_registers): Likewise.
2716 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
2717 vaxbsd_store_inferior_registers): Likewise.
2718 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
2719 store_xtregs): Likewise.
2720
c0f55cc6
AV
27212017-03-20 Artemiy Volkov <artemiyv@acm.org>
2722
2723 PR gdb/14441
2724 * NEWS: Mention support for rvalue references in GDB and python.
2725 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
2726 supports both lvalue and rvalue references.
2727
15c0a2a9
AV
27282017-03-20 Artemiy Volkov <artemiyv@acm.org>
2729
2730 PR gdb/14441
2731 * gdbtypes.c (rank_one_type): Implement overloading
2732 resolution rules regarding rvalue references.
2733
aa006118
AV
27342017-03-20 Artemiy Volkov <artemiyv@acm.org>
2735
2736 PR gdb/14441
2737 * aarch64-tdep.c (aarch64_type_align)
2738 (aarch64_extract_return_value, aarch64_store_return_value): Change
2739 lvalue reference type checks to general reference type checks.
2740 * amd64-tdep.c (amd64_classify): Likewise.
2741 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
2742 Likewise.
2743 * arm-tdep.c (arm_type_align, arm_extract_return_value)
2744 (arm_store_return_value): Likewise.
2745 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
2746 * c-typeprint.c (c_print_type): Likewise.
2747 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
2748 (cplus_number_of_children, cplus_describe_child): Likewise.
2749 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2750 * completer.c (expression_completer): Likewise.
2751 * cp-support.c (make_symbol_overload_list_adl_namespace):
2752 Likewise.
2753 * darwin-nat-info.c (info_mach_region_command): Likewise.
2754 * dwarf2loc.c (entry_data_value_coerce_ref)
2755 (value_of_dwarf_reg_entry): Likewise.
2756 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
2757 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
2758 Likewise.
2759 * findvar.c (extract_typed_address, store_typed_address):
2760 Likewise.
2761 * gdbtypes.c (rank_one_type): Likewise.
2762 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
2763 * infcall.c (value_arg_coerce): Likewise.
2764 * language.c (pointer_type): Likewise.
2765 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
2766 Likewise.
2767 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
2768 * mn10300-tdep.c (mn10300_type_align): Likewise.
2769 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
2770 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
2771 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
2772 Likewise.
2773 * printcmd.c (print_formatted, x_command): Likewise.
2774 * python/py-type.c (typy_get_composite, typy_template_argument):
2775 Likewise.
2776 * python/py-value.c (valpy_referenced_value)
2777 (valpy_get_dynamic_type, value_has_field): Likewise.
2778 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
2779 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
2780 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
2781 * spu-tdep.c (spu_scalar_value_p): Likewise.
2782 * symtab.c (lookup_symbol_aux): Likewise.
2783 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
2784 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
2785 Likewise.
2786 * valops.c (value_cast_pointers, value_cast)
2787 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
2788 (value_struct_elt, value_struct_elt_bitpos)
2789 (value_find_oload_method_list, find_overload_match)
2790 (value_rtti_indirect_type): Likewise.
2791 * valprint.c (val_print_scalar_type_p, generic_val_print):
2792 Likewise.
2793 * value.c (value_actual_type, value_as_address, unpack_long)
2794 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
2795 (coerce_ref): Likewise.
2796 * varobj.c (varobj_get_value_type): Likewise.
2797
3fcf899d
AV
27982017-03-20 Artemiy Volkov <artemiyv@acm.org>
2799
2800 PR gdb/14441
2801 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
2802 table of constants.
2803 * python/lib/gdb/command/explore.py: Support exploring values
2804 of rvalue reference types.
2805 * python/lib/gdb/types.py: Implement get_basic_type() for
2806 rvalue reference types.
2807 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
2808 constant.
2809 * python/py-value.c (valpy_getitem): Add an rvalue reference
2810 check.
2811 (valpy_reference_value): Add new parameter "refcode".
2812 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
2813 New wrappers for valpy_reference_value().
2814 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
2815 (gdbpy_invoke_xmethod): Likewise.
2816
4297a3f0
AV
28172017-03-20 Artemiy Volkov <artemiyv@acm.org>
2818
2819 PR gdb/14441
2820 * dwarf2read.c (process_die, read_type_die_1): Handle the
2821 DW_TAG_rvalue_reference_type DIE.
2822 (read_tag_reference_type): Add new parameter "refcode".
2823
e1cb3213
AV
28242017-03-20 Artemiy Volkov <artemiyv@acm.org>
2825
2826 PR gdb/14441
2827 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
2828 (c_type_print_modifier, c_type_print_varspec_suffix)
2829 (c_type_print_base): Support printing rvalue reference types.
2830 * c-valprint.c (c_val_print, c_value_print): Support printing
2831 rvalue reference values.
2832
e4347c89
AV
28332017-03-20 Artemiy Volkov <artemiyv@acm.org>
2834
2835 PR gdb/14441
2836 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
2837 typename.
2838 * cp-support.c (replace_typedefs): Handle
2839 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
2840 * python/py-type.c (typy_lookup_type): Likewise.
2841
53cc15f5
AV
28422017-03-20 Artemiy Volkov <artemiyv@acm.org>
2843
2844 PR gdb/14441
2845 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
2846 * parse.c (insert_type): Change assert statement.
2847 (follow_types): Handle rvalue reference types.
2848 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
2849 constant.
2850
a65cfae5
AV
28512017-03-20 Artemiy Volkov <artemiyv@acm.org>
2852
2853 PR gdb/14441
2854 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
2855 value_ref() interface.
2856 * c-valprint.c (c_value_print): Likewise.
2857 * infcall.c (value_arg_coerce): Likewise.
2858 * python/py-value.c (valpy_reference_value): Likewise.
2859 * valops.c (value_cast, value_reinterpret_cast)
2860 (value_dynamic_cast, typecmp): Likewise.
2861 (value_ref): Parameterize by kind of return value reference type.
2862 * value.h (value_ref): Add new parameter "refcode".
2863
3b224330
AV
28642017-03-20 Artemiy Volkov <artemiyv@acm.org>
2865
2866 PR gdb/14441
2867 * dwarf2read.c (read_tag_reference_type): Use
2868 lookup_lvalue_reference_type() instead of lookup_reference_type().
2869 * eval.c (evaluate_subexp_standard): Likewise.
2870 * f-exp.y: Likewise.
2871 * gdbtypes.c (make_reference_type, lookup_reference_type):
2872 Generalize with rvalue reference types.
2873 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
2874 convenience wrappers for lookup_reference_type().
2875 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
2876 reference kind parameter.
2877 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
2878 wrappers for lookup_reference_type().
2879 * guile/scm-type.c (gdbscm_type_reference): Use
2880 lookup_lvalue_reference_type() instead of lookup_reference_type().
2881 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
2882 * parse.c (follow_types): Likewise.
2883 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
2884 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
2885 Likewise.
2886 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
2887 (gdbpy_invoke_xmethod): Likewise.
2888 * stabsread.c: Provide extra argument to make_reference_type()
2889 call.
2890 * valops.c (value_ref, value_rtti_indirect_type): Use
2891 lookup_lvalue_reference_type() instead of lookup_reference_type().
2892
f9aeb8d4
AV
28932017-03-20 Artemiy Volkov <artemiyv@acm.org>
2894
2895 PR gdb/14441
2896 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
2897 (TYPE_IS_REFERENCE): New macro.
2898 (struct type): Add rvalue_reference_type field.
2899 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
2900
51457a05
MAL
29012017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2902
2903 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
2904 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
2905 New function definition.
2906 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
2907 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
2908 New function declaration.
2909 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
2910 * mi/mi-interp.h: New file.
2911 * solib.c (info_sharedlibrary_command): Replace for loop with
2912 ALL_SO_LIBS macro
2913 * solib.h (update_solib_list): New function declaration.
2914 (so_list_head): Move macro.
2915 * solist.h (ALL_SO_LIBS): New macro.
2916
e696b3ad
MAL
29172017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2918
2919 * infcmd.c (post_create_inferior): Remove unused argument in
2920 call to solib_add.
2921 * remote.c (remote_start_remote): Likewise.
2922 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
2923 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
2924 (enable_break): Likewise.
2925 * solib.c (update_solib_list): Remove unused target argument
2926 and its documentation.
2927 (solib_add): Remove unused target argument. Remove unused
2928 argument in call to update_solib_list.
2929 (info_sharedlibrary_command): Remove unused argument in call
2930 to update_solib_list.
2931 (sharedlibrary_command): Remove unused argument in call to
2932 solib_add.
2933 (handle_solib_event): Likewise.
2934 (reload_shared_libraries): Likewise.
2935 * solib.h (solib_add): Remove unused target argument.
2936
dcb84eda
AA
29372017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
2938
2939 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
2940 (s390_displaced_step_fixup): Cover relative branches with the
2941 default fixup handling. This fixes lack of support for some
2942 relative branch instructions.
2943
d9cb6cdc
SM
29442017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2945
2946 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
2947 ptid from regcache.
2948
1afaf9f4
SM
29492017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2950
2951 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
2952 i386_darwin_store_inferior_registers): Use ptid from regcache.
2953
aac12e24
SM
29542017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2955
2956 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
2957 i386bsd_store_inferior_registers): Use ptid from regcache.
2958
bbe1eef1
SM
29592017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2960
2961 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
2962 hppaobsd_store_registers): Use ptid from regcache.
2963
10799020
SM
29642017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2965
2966 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
2967 hppanbsd_store_registers): Use ptid from regcache.
2968
00204cf7
SM
29692017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2970
2971 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
2972 from regcache. Use get_ptrace_pid.
2973
11a33714
SM
29742017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2975
2976 * corelow.c (get_core_register_section): Use ptid from regcache,
2977 update doc.
2978
317cd492
SM
29792017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2980
2981 * bsd-uthread.c (bsd_uthread_fetch_registers,
2982 bsd_uthread_store_registers): Use ptid from regcache, set and
2983 restore inferior_ptid.
2984
9ac8a7c2
SM
29852017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2986
2987 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
2988 fetch_fp_regs, store_register, store_regs, store_fp_register,
2989 store_fp_regs): Use ptid from regcache.
2990
4ac4bb6a
SM
29912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2992
2993 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
2994 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
2995 store_vfp_regs): Use ptid from regcache.
2996
9bcbdca8
PA
29972017-03-17 Pedro Alves <palves@redhat.com>
2998
2999 PR remote/21188
3000 * ser-base.c (ser_base_wait_for): Add comment.
3001 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
3002 version.
3003 * ser-unix.c (hardwire_raw): Remove reference to
3004 scb->current_timeout.
3005 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
3006 (hardwire_ops): Install ser_base_readchar instead of
3007 hardwire_readchar.
3008 * serial.h (struct serial) <current_timeout, timeout_remaining>:
3009 Remove fields.
3010
7503099f
JG
30112017-03-17 Jonah Graham <jonah@kichwacoders.com>
3012
3013 PR gdb/19637
3014 * python/lib/gdb/printer/bound_registers.py: Add support for
3015 Python 3.
3016
7942e96e
AA
30172017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3018
3019 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
3020 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
3021 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
3022 byte_offset to subobj_byte_offset. Fix the handling of
3023 DWARF_VALUE_STACK on big-endian targets when coming via an
3024 implicit pointer.
3025 (dwarf2_evaluate_loc_desc): Adjust call to
3026 dwarf2_evaluate_loc_desc_full.
3027 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
3028 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
3029
ba14f379
YQ
30302017-03-16 Yao Qi <yao.qi@linaro.org>
3031
3032 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
3033 and REVSH instructions.
3034
b121eeb9
YQ
30352017-03-16 Yao Qi <yao.qi@linaro.org>
3036
3037 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
3038 (arm_record_test): Declare.
3039 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
3040 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
3041 align with the manual.
3042 (thumb_record_misc): Adjust the code order to align with the
3043 manual.
3044 (thumb2_record_decode_insn_handler): Fix instruction matching.
3045 (instruction_reader_thumb): New class.
3046 (arm_record_test): New function.
3047
728a7913
YQ
30482017-03-16 Yao Qi <yao.qi@linaro.org>
3049
3050 * arm-tdep.c (abstract_memory_reader): New class.
3051 (instruction_reader): New class.
3052 (extract_arm_insn): Add argument 'reader'. Callers updated.
3053 (decode_insn): Likewise.
3054
34b43320
DE
30552017-03-16 Doug Evans <dje@google.com>
3056
a7c0469f
DE
3057 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
3058 member. Change type of TYPE member to SCM. All uses updated.
3059 (lsscm_make_lazy_string_smob): Add assert.
3060 (lsscm_make_lazy_string): Flag bad length values.
3061 (lsscm_elt_type): New function.
3062 (gdbscm_lazy_string_to_value): Rewrite to use
3063 lsscm_safe_lazy_string_to_value.
3064 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
3065 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
3066 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
3067 in incoming type.
3068 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
3069 * guile/scm-type.c (tyscm_scm_to_type): New function.
3070
30712017-03-15 Doug Evans <dje@google.com>
3072
34b43320
DE
3073 PR python/17728, python/18439, python/18779
3074 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
3075 member. Change type of TYPE member to PyObject *. All uses updated.
3076 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
3077 (gdbpy_create_lazy_string_object): Flag bad length values.
3078 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
3079 Handle typedefs in incoming type.
3080 (stpy_lazy_string_elt_type): New function.
3081 (gdbpy_extract_lazy_string): Call it.
3082 * python/py-value.c (valpy_lazy_string): Flag bad length values.
3083 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
3084 typedefs in incoming type.
3085
a3a5fecc
DE
30862017-03-16 Doug Evans <dje@google.com>
3087
3088 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
3089 * guile/scm-type.c (tyscm_scm_to_type): New function.
3090
28f1c605
JW
30912017-03-16 Jiong Wang <jiong.wang@arm.com>
3092
3093 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
3094 "ULONGEST" for "skip".
3095
87c336f6
AA
30962017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
3097
3098 PR gdb/21220
3099 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
3100 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
3101 (inf_ptrace_peek_poke): ...here. New function. Now also loop
3102 over ptrace peek/poke until end of buffer or error.
3103
cf81cf60
SM
31042017-03-14 Simon Marchi <simon.marchi@ericsson.com>
3105
3106 * parse.c (length_of_subexp): Make static.
3107 * parser-defs.h (length_of_subexp): Remove.
3108
a379284a
AA
31092017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
3110
3111 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
3112 as well.
3113
8a6200ba
PA
31142017-03-14 Pedro Alves <palves@redhat.com>
3115
3116 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
3117 (main): Use std::unique_ptr. Remove calls to
3118 cp_demangled_name_parse_free.
3119
f79ec206
SM
31202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3121
3122 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
3123 alphabsd_store_inferior_registers): Use regcache->ptid instead
3124 of inferior_ptid.
3125
edb5fb00
SM
31262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3127
3128 * aix-thread.c (aix_thread_fetch_registers,
3129 aix_thread_store_registers): Use regcache->ptid instead of
3130 inferior_ptid.
3131
55119686
SM
31322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3133
3134 * aarch64-linux-nat.c (fetch_gregs_from_thread,
3135 store_gregs_to_thread, fetch_fpregs_from_thread,
3136 store_fpregs_to_thread): Use regcache->ptid instead of
3137 inferior_ptid.
3138
6a06fbb7
SM
31392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3140
3141 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
3142 amd64_linux_fetch_inferior_registers): Use regcache->ptid
3143 instead of inferior_ptid.
3144
c6386875
SM
31452017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3146
3147 * target.c (target_fetch_registers, target_store_registers): Add
3148 assert.
3149
ddaaf0fb
SM
31502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3151
3152 * regcache.h (regcache_get_ptid): New function.
3153 * regcache.c (regcache_get_ptid): New function.
3154
b9da89d1 31552017-03-13 Mark Wielaard <mark@klomp.org>
3156
3157 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
3158
5f4d1085
KS
31592017-03-10 Keith Seitz <keiths@redhat.com>
3160
3161 PR c++/8218
3162 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
3163
c65d6b55
PA
31642017-03-08 Pedro Alves <palves@redhat.com>
3165
3166 PR gdb/18360
3167 * infrun.c (start_step_over, do_target_resume, resume)
3168 (restart_threads): Assert we're not resuming a thread that is
3169 meant to be stopped.
3170 (infrun_thread_stop_requested_callback): Delete.
3171 (infrun_thread_stop_requested): If the thread is internally
3172 stopped, queue a pending stop event and clear the thread's
3173 inline-frame state.
3174 (handle_stop_requested): New function.
3175 (handle_syscall_event, handle_inferior_event_1): Use
3176 handle_stop_requested.
3177 (handle_stop_requested): New function.
3178 (handle_signal_stop): Set the thread's stop_signal here instead of
3179 at caller.
3180 (finish_step_over): Clear step over info unconditionally.
3181 (handle_signal_stop): If the user had interrupted the event
3182 thread, consider the stop a random signal.
3183 (handle_signal_stop) <signal arrived while stepping over
3184 breakpoint>: Don't restart threads here.
3185 (stop_waiting): Don't clear step-over info here.
3186
15c22686
PA
31872017-03-08 Pedro Alves <palves@redhat.com>
3188
3189 PR 21206
3190 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
3191 goes to argument 2, not 1.
3192
6e5d74e7
PA
31932017-03-08 Pedro Alves <palves@redhat.com>
3194
3195 PR cli/21218
3196 * top.c (gdb_readline_wrapper): Avoid passing NULL to
3197 display_gdb_prompt.
3198 (command_line_input): Add comment.
3199
9753a2f6
PA
32002017-03-08 Pedro Alves <palves@redhat.com>
3201
3202 PR tui/21216
3203 * tui/tui-file.c (tui_file::write): New.
3204 * tui/tui-file.h (tui_file): Override "write".
3205 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
3206 factored out from ...
3207 (tui_puts): ... here.
3208 (tui_putc): Use them.
3209 (tui_write): New function.
3210 * tui/tui-io.h (tui_write): Declare.
3211
1672e0d9
SDJ
32122017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3213
3214 * Makefile.in (SFILES): Replace "environ.c" with
3215 "common/environ.c".
3216 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
3217 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
3218 to...
3219 * common/environ.c: ... here.
3220 * environ.h: Moved to...
3221 * common/environ.h: ... here.
3222
f7bb4e3a
PB
32232017-03-07 Peter Bergner <bergner@vnet.ibm.com>
3224
3225 * gdbarch.sh (pstring_ptr): New static function.
3226 (gdbarch_disassembler_options): Use it.
3227 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
3228 not valid_disassembler_option->name.
3229 * gdbarch.c: Regenerate.
3230
e45ced6c
PB
32312017-03-07 Peter Bergner <bergner@vnet.ibm.com>
3232
3233 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
3234
5f6fd321
PA
32352017-03-07 Pedro Alves <palves@redhat.com>
3236
3237 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
3238
6dbb839a 32392017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
3240
3241 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
3242 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
3243 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 3244 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 3245
d274ecf4
SM
32462017-03-06 Simon Marchi <simon.marchi@ericsson.com>
3247
3248 * xtensa-linux-nat.c (fetch_gregs): Remove const.
3249
df97be55
SM
32502017-03-03 Simon Marchi <simon.marchi@ericsson.com>
3251
3252 * remote.c (remote_add_target_side_commands): Use range-based
3253 for loop.
3254
7d45f3df
YQ
32552017-03-03 Yao Qi <yao.qi@linaro.org>
3256
3257 PR gdb/21165
3258 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
3259 value is lazy.
3260 * valprint.c (common_val_print): Likewise.
3261
65b48a81
PB
32622017-02-28 Peter Bergner <bergner@vnet.ibm.com>
3263
3264 * NEWS: Mention new set/show disassembler-options commands.
3265 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
3266 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
3267 (prospective_options): New static variable.
3268 (gdb_disassembler::gdb_disassembler): Initialize
3269 m_di.disassembler_options.
3270 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
3271 (get_disassembler_options): New function.
3272 (set_disassembler_options): Likewise.
3273 (set_disassembler_options_sfunc): Likewise.
3274 (show_disassembler_options_sfunc): Likewise.
3275 (disassembler_options_completer): Likewise.
3276 (_initialize_disasm): Likewise.
3277 * disasm.h (get_disassembler_options): New prototype.
3278 (set_disassembler_options): Likewise.
3279 * gdbarch.sh (gdbarch_disassembler_options): New variable.
3280 (gdbarch_verify_disassembler_options): Likewise.
3281 * gdbarch.c: Regenerate.
3282 * gdbarch.h: Likewise.
3283 * arm-tdep.c (num_disassembly_options): Delete.
3284 (set_disassembly_style): Likewise.
3285 (arm_disassembler_options): New static variable.
3286 (set_disassembly_style_sfunc): Convert short style name into long
3287 option name. Call set_disassembler_options.
3288 (show_disassembly_style_sfunc): New function.
3289 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
3290 set_gdbarch_verify_disassembler_options.
3291 (_initialize_arm_tdep): Delete regnames variable and update callers.
3292 (arm_disassembler_options): Initialize.
3293 (disasm_options): New variable.
3294 (num_disassembly_options): Rename from this...
3295 (num_disassembly_styles): ...to this. Compute by scanning through
3296 disasm_options.
3297 (valid_disassembly_styles): Initialize using disasm_options.
3298 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
3299 set_arm_regname_option.
3300 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
3301 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
3302 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
3303 set_gdbarch_verify_disassembler_options.
3304 * s390-tdep.c (s390_disassembler_options): New static variable.
3305 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
3306 set_gdbarch_verify_disassembler_options.
3307
d538e36d
SM
33082017-02-27 Simon Marchi <simon.marchi@ericsson.com>
3309
3310 * remote.c (remote_add_target_side_condition): Remove "struct"
3311 keyword from range-based for loop.
3312
83621223
SM
33132017-02-27 Simon Marchi <simon.marchi@ericsson.com>
3314
3315 * remote.c (remote_add_target_side_condition): Use range-based
3316 for loop. Update comment.
3317
2123df0e
YQ
33182017-02-27 Yao Qi <yao.qi@linaro.org>
3319
3320 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
3321
8e368124
AH
33222017-02-26 Alan Hayward <alan.hayward@arm.com>
3323
3324 * regcache.c (regcache_raw_update): New function.
3325 (regcache_raw_read): Move code to regcache_raw_update.
3326 * regcache.h (regcache_raw_update): New declaration.
3327 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
3328
a49dd8dd
JK
33292017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
3330
3331 * dwarf2read.c (create_debug_type_hash_table): Initialize
3332 header.signature and header.type_offset_in_tu.
3333
34e4bae9
PA
33342017-02-24 Pedro Alves <palves@redhat.com>
3335
3336 * symtab.c (make_file_symbol_completion_list_1): Use
3337 add_symtab_completions.
3338
b0e4b369
AH
33392017-02-24 Alan Hayward <alan.hayward@arm.com>
3340
3341 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
3342
975c21ab
AH
33432017-02-24 Alan Hayward <alan.hayward@arm.com>
3344
3345 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
3346 I386_MAX_REGISTER_SIZE.
3347 (i386_pseudo_register_write): Likewise.
3348 (i386_process_record): Likewise.
3349 * i387-tdep.c (i387_supply_xsave): Likewise.
3350 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
3351 (store_register): Likewise.
3352
14bc53a8
PA
33532017-02-23 Pedro Alves <palves@redhat.com>
3354
3355 * ada-lang.c: Include "common/function-view.h".
3356 (ada_iterate_over_symbols): Adjust to use function_view as
3357 callback type.
3358 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
3359 (ada_make_symbol_completion_list): Use a lambda.
3360 (ada_exc_search_name_matches): Delete.
3361 (name_matches_regex): New.
3362 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
3363 * compile/compile-c-support.c: Include "common/function-view.h".
3364 (print_one_macro): Change prototype to accept a ui_file pointer.
3365 (write_macro_definitions): Use a lambda.
3366 * dwarf2read.c: Include "common/function-view.h".
3367 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
3368 (dw2_expand_symtabs_matching): Adjust to use function_view as
3369 callback type.
3370 * language.h: Include "common/function-view.h".
3371 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
3372 function_view as callback type.
3373 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
3374 * linespec.c: Include "common/function-view.h".
3375 (collect_info::add_symbol): New method.
3376 (struct symbol_and_data_callback, iterate_inline_only, struct
3377 symbol_matcher_data, iterate_name_matcher): Delete.
3378 (iterate_over_all_matching_symtabs): Adjust to use function_view
3379 as callback type and lambdas.
3380 (iterate_over_file_blocks): Adjust to use function_view as
3381 callback type.
3382 (decode_compound_collector): Now a class with private fields.
3383 (decode_compound_collector::release_symbols): New method.
3384 (collect_one_symbol): Rename to...
3385 (decode_compound_collector::operator()): ... this and adjust.
3386 (lookup_prefix_sym): decode_compound_collector construction bits
3387 move to decode_compound_collector ctor. Pass the
3388 decode_compound_collector object directly as callback. Remove
3389 cleanups and use decode_compound_collector::release_symbols
3390 instead.
3391 (symtab_collector): Now a class with private fields.
3392 (symtab_collector::release_symtabs): New method.
3393 (add_symtabs_to_list): Rename to...
3394 (symtab_collector::operator()): ... this and adjust.
3395 (collect_symtabs_from_filename): symtab_collector construction
3396 bits move to symtab_collector ctor. Pass the symtab_collector
3397 object directly as callback. Remove cleanups and use
3398 symtab_collector::release_symtabs instead.
3399 (collect_symbols): Delete.
3400 (add_matching_symbols_to_info): Use lambdas.
3401 * macrocmd.c (print_macro_callback): Delete.
3402 (info_macro_command): Use a lambda.
3403 (info_macros_command): Pass print_macro_definition as callable
3404 directly.
3405 (print_one_macro): Remove 'ignore' parameter.
3406 (macro_list_command): Adjust.
3407 * macrotab.c (macro_for_each_data::fn): Now a function_view.
3408 (macro_for_each_data::user_data): Delete field.
3409 (foreach_macro): Adjust to call the function_view.
3410 (macro_for_each): Adjust to use function_view as callback type.
3411 (foreach_macro_in_scope): Adjust to call the function_view.
3412 (macro_for_each_in_scope): Adjust to use function_view as callback
3413 type.
3414 * macrotab.h: Include "common/function-view.h".
3415 (macro_callback_fn): Declare a prototype instead of a pointer.
3416 Remove "user_data" parameter.
3417 (macro_for_each, macro_for_each_in_scope): Adjust to use
3418 function_view as callback type.
3419 * psymtab.c (partial_map_expand_apply)
3420 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
3421 Adjust to use function_view as callback type and to return bool.
3422 (psym_expand_symtabs_matching): Adjust to use function_view as
3423 callback types.
3424 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
3425 to use function_view as callback type and to return bool.
3426 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
3427 callback types.
3428 * symfile.c (expand_symtabs_matching): Adjust to use function_view
3429 as callback types.
3430 * symfile.h: Include "common/function-view.h".
3431 (expand_symtabs_file_matcher_ftype)
3432 (expand_symtabs_symbol_matcher_ftype)
3433 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
3434 return bool.
3435 (quick_symbol_functions::map_symtabs_matching_filename)
3436 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
3437 function_view as callback type and return bool.
3438 (expand_symtabs_matching): Adjust to use function_view as callback
3439 type.
3440 (maintenance_expand_name_matcher)
3441 (maintenance_expand_file_matcher): Delete.
3442 (maintenance_expand_symtabs): Use lambdas.
3443 * symtab.c (iterate_over_some_symtabs): Adjust to use
3444 function_view as callback types and return bool.
3445 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
3446 of a cleanup.
3447 (lookup_symtab_callback): Delete.
3448 (lookup_symtab): Use a lambda.
3449 (iterate_over_symbols): Adjust to use function_view as callback
3450 type.
3451 (struct search_symbols_data, search_symbols_file_matches)
3452 (search_symbols_name_matches): Delete.
3453 (search_symbols): Use a pair of lambdas.
3454 (struct add_name_data, add_macro_name, symbol_completion_matcher)
3455 (symtab_expansion_callback): Delete.
3456 (default_make_symbol_completion_list_break_on_1): Use lambdas.
3457 * symtab.h: Include "common/function-view.h".
3458 (iterate_over_some_symtabs): Adjust to use function_view as
3459 callback type and return bool.
3460 (iterate_over_symtabs): Adjust to use function_view as callback
3461 type.
3462 (symbol_found_callback_ftype): Remove 'data' parameter and return
3463 bool.
3464 (iterate_over_symbols): Adjust to use function_view as callback
3465 type.
3466
07e253aa
PA
34672017-02-23 Pedro Alves <palves@redhat.com>
3468
3469 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
3470 (%.o) <unittests/%.c>: New pattern.
3471 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
3472 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
3473 * common/function-view.h: New file.
3474 * unittests/function-view-selftests.c: New file.
3475 * configure: Regenerate.
3476
8eaf5320
SM
34772017-02-23 Simon Marchi <simon.marchi@ericsson.com>
3478
3479 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
3480 inferior_ptid.
3481 * go32-nat.c (go32_thread_alive): Likewise.
3482
38768751
YQ
34832017-02-23 Yao Qi <yao.qi@linaro.org>
3484
3485 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
3486 delete.
3487
0a8beaba
YQ
34882017-02-23 Yao Qi <yao.qi@linaro.org>
3489
3490 * varobj.c (varobj_clear_saved_item): Use delete instead of
3491 xfree.
3492 (update_dynamic_varobj_children): Likewise.
3493
58fdfd2c
JK
34942017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3495
3496 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
3497
1b90b139
SM
34982017-02-21 Simon Marchi <simon.marchi@ericsson.com>
3499
3500 * common/enum-flags.h (enum_flags::enum_flags): Initialize
3501 m_enum_value to 0 in default constructor.
3502
2039d74e
EBM
35032017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3504
3505 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
3506 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
3507 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
3508 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
3509 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
3510 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
3511 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
3512 IS_STORE_CONDITIONAL_INSN.
3513
7814882a
JK
35142017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3515
3516 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
3517
0ae60b63
JK
35182017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3519
3520 * NEWS (Changes since GDB 7.12): Add DWARF-5.
3521
0224619f
JK
35222017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3523
3524 * dwarf2read.c (skip_one_die, read_attribute_value)
3525 (dwarf2_const_value_attr, dump_die_shallow)
3526 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3527 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
3528
0af92d60
JK
35292017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3530
3531 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
3532 (dwarf_parse_macro_header): Accept DWARF version 5.
3533 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
3534
216f72a1
JK
35352017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3536
3537 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
3538 DW_AT_GNU_*.
3539 * common/common-exceptions.h (enum errors): Likewise.
3540 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
3541 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
3542 (dwarf_expr_context::execute_stack_op): Likewise.
3543 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
3544 Likewise.
3545 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
3546 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
3547 (show_entry_values_debug, call_site_to_target_addr)
3548 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
3549 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
3550 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
3551 (value_of_dwarf_block_entry, indirect_pieced_value)
3552 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
3553 (disassemble_dwarf_expression): Likewise.
3554 * dwarf2read.c (process_die, inherit_abstract_dies)
3555 (read_call_site_scope): Likewise.
3556 * gdbtypes.h (struct func_type, struct call_site_parameter)
3557 (struct call_site): Likewise.
3558 * stack.c (read_frame_arg): Likewise.
3559 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
3560
43988095
JK
35612017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3562
3563 * defs.h (read_unsigned_leb128): New declaration.
3564 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
3565 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
3566 (dwarf2_find_location_expression): Call also
3567 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
3568 * dwarf2loc.h (dwarf2_version): New declaration.
3569 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
3570 rnglists.
3571 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
3572 .debug_rnglists.
3573 (struct dwop_section_names): Add loclists_dwo.
3574 (dwop_section_names): Add .debug_loclists.dwo.
3575 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
3576 (struct dwarf2_per_cu_data): Add dwarf_version.
3577 (struct dwo_sections): Add loclists.
3578 (struct attr_abbrev): Add implicit_const.
3579 (read_indirect_line_string): New declaration.
3580 (read_unsigned_leb128): Delete declaration.
3581 (rcuh_kind): New definition.
3582 (read_and_check_comp_unit_head): Change parameter
3583 is_debug_types_section to section_kind.
3584 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
3585 (read_comp_unit_head): Change parameter abfd to section, add parameter
3586 section_kind. Handle DWARF-5.
3587 (error_check_comp_unit_head): Accept also DWARF version 5.
3588 (read_and_check_comp_unit_head): Change parameter
3589 is_debug_types_section to section_kind.
3590 (read_and_check_type_unit_head): Delete function.
3591 (read_abbrev_offset): Handle DWARF-5.
3592 (create_debug_type_hash_table): Add parameter section_kind. Process
3593 only DW_UT_type. Use signature and type_offset_in_tu from struct
3594 comp_unit_head.
3595 (create_debug_types_hash_table): Update create_debug_type_hash_table
3596 caller.
3597 (create_all_type_units): Call create_debug_type_hash_table.
3598 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
3599 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
3600 caller.
3601 (skip_one_die): Handle DW_FORM_implicit_const.
3602 (dwarf2_rnglists_process): New function.
3603 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
3604 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
3605 (read_attribute_value): Handle DW_FORM_implicit_const,
3606 DW_FORM_line_strp.
3607 (read_attribute): Handle DW_FORM_implicit_const.
3608 (read_indirect_string_at_offset_from): New function from
3609 read_indirect_string_at_offset.
3610 (read_indirect_string_at_offset): Call
3611 read_indirect_string_at_offset_from.
3612 (read_indirect_line_string_at_offset): New function.
3613 (read_indirect_string): New function comment.
3614 (read_indirect_line_string): New function.
3615 (read_unsigned_leb128): Make it global.
3616 (dwarf2_string_attr): Handle DWARF-5.
3617 (add_include_dir_stub, read_formatted_entries): New functions.
3618 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
3619 Handle DWARF-5.
3620 (per_cu_header_read_in): Update read_comp_unit_head caller.
3621 (dwarf2_version): New function.
3622 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
3623 rnglists.
3624 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
3625 fields.
3626
22d2f3ab
JK
36272017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3628
3629 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
3630
5f46c5a5
JK
36312017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3632
3633 * dwarf2read.c (dwarf2_ranges_process): New function from
3634 dwarf2_ranges_read.
3635 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
3636 dwarf2_ranges_process.
3637
78d4d2c5
JK
36382017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
3639
3640 * dwarf2read.c (create_debug_type_hash_table): New function from
3641 create_debug_types_hash_table.
3642 (create_debug_types_hash_table): Call create_debug_type_hash_table.
3643 (create_all_type_units, open_and_init_dwo_file): Update
3644 create_debug_types_hash_table callers.
3645
1b076f25
SDJ
36462017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
3647
3648 PR gdb/16188
3649 * fork-child.c (trace_start_error): Fix thinko. va_end should
3650 refer to 'ap', not 'args'.
3651
0db8980c
SDJ
36522017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
3653 Pedro Alves <palves@redhat.com>
3654
3655 PR gdb/16188
3656 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
3657 calls succeeded.
3658 * fork-child.c (trace_start_error): New function.
3659 (trace_start_error_with_name): Likewise.
3660 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
3661 * inf-ptrace.c (inf_ptrace_me): Likewise.
3662 * inferior.h (trace_start_error): New prototype.
3663 (trace_start_error_with_name): Likewise.
3664
99e8a4f9
SDJ
36652017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
3666
3667 PR gdb/21164
3668 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
3669 NULL before using it.
3670 * symmisc.c (maintenance_print_symbols): Likewise.
3671 (maintenance_print_msymbols): Likewise.
3672
4e746bb6
TW
36732017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3674
3675 * NEWS: Add record Python bindings entry.
3676
36772017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3678
3679 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
3680 py-record-full.o.
3681 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
3682 * python/py-record-btrace.c, python/py-record-btrace.h,
3683 python/py-record-full.c, python/py-record-full.h: New file.
3684 * python/py-record.c: Add include for py-record-btrace.h and
3685 py-record-full.h.
3686 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
3687 recpy_instruction_history, recpy_function_call_history, recpy_begin,
3688 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
3689 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
3690 New definition.
3691 (gdbpy_initialize_btrace): New export.
3692 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
3693
36942017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3695
3696 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
3697 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
3698 * python/py-record.c: New file.
3699 * python/python-internal.h (gdbpy_start_recording,
3700 gdbpy_current_recording, gdpy_stop_recording,
3701 gdbpy_initialize_record): New export.
3702 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
3703 (python_GdbMethods): Add gdbpy_start_recording,
3704 gdbpy_current_recording and gdbpy_stop_recording.
3705
37062017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3707
3708 * record-btrace.c (record_btrace_record_method): New function.
3709 (init_record_btrace_ops): Initialize to_record_method.
3710 * record-full.c (record_full_record_method): New function.
3711 (init_record_full_ops, init_record_full_core_ops): Add
3712 record_full_record_method.
3713 * record.h (enum record_method): New enum.
3714 * target-debug.h (target_debug_print_enum_record_method: New define.
3715 * target-delegates.c: Regenerate.
3716 * target.c (target_record_method): New function.
3717 * target.h: Include record.h.
3718 (struct target_ops) <to_record_method>: New field.
3719 (target_record_method): New export.
3720
37212017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3722
3723 * record.h (record_start, record_stop): New export.
3724 * record.c (record_start, record_stop): New function.
3725
37262017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3727
3728 * btrace.c (btrace_fetch): Copy function call segments pointer
3729 into a vector.
3730 (btrace_clear): Clear the vector.
3731 (btrace_find_insn_by_number): Use binary search to find the correct
3732 function call segment.
3733 * btrace.h (brace_fun_p): New typedef.
3734 (struct btrace_thread_info) <functions>: New field.
3735
37362017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3737
3738 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
3739 * btrace.c (btrace_decode_error): ... here. New function.
3740 * btrace.h (btrace_decode_error): New export.
3741
37422017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
3743
3744 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
3745 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
3746 btrace_find_insn_by_number): Remove special case for gaps.
3747 * btrace.h (btrace_insn_get_error): New export.
3748 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
3749 * record-btrace.c (btrace_insn_history): Print number for gaps.
3750 (record_btrace_info, record_btrace_goto): Handle gaps.
3751
3f77c769
TT
37522017-02-14 Tom Tromey <tom@tromey.com>
3753
3754 PR python/13598:
3755 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
3756 event.
3757 * python/py-evts.c (gdbpy_initialize_py_events): Add
3758 before_prompt registry.
3759 * python/py-events.h (events_object) <before_prompt>: New field.
3760
4c2c7ac6
MM
37612017-02-14 Markus Metzger <markus.t.metzger@intel.com>
3762
3763 * btrace.c (ftrace_new_switch): Preserve up link and flags.
3764
5cf30ebf
LM
37652017-02-13 Luis Machado <lgustavo@codesourcery.com>
3766
3767 * symfile (_initialize_symfile): Add usage text to the load command's
3768 help text.
3769
26a06916
SM
37702017-02-10 Simon Marchi <simon.marchi@ericsson.com>
3771
3772 * utils.c (defaulted_query): Don't query on secondary UIs.
3773
0b145e37
TT
37742017-02-10 Tom Tromey <tom@tromey.com>
3775
3776 * rust-lang.c (rust_get_disr_info): Remove unused variable.
3777
2d8365c4
TT
37782017-02-10 Tom Tromey <tom@tromey.com>
3779
3780 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
3781 "cleanup" local.
3782 * python/py-type.c (typy_legacy_template_argument): Remove
3783 unnecessary "cleanup" local.
3784
2bb8f231
TT
37852017-02-10 Tom Tromey <tom@tromey.com>
3786
3787 * python/python.c (do_start_initialization): New function, from
3788 _initialize_python.
3789 (_initialize_python): Call do_start_initialization.
3790 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
3791 goto.
3792
1bdfaf42
TT
37932017-02-10 Tom Tromey <tom@tromey.com>
3794
3795 * python/py-prettyprint.c (pretty_print_one_value): Use
3796 gdbpy_ref.
3797
88b6faea
TT
37982017-02-10 Tom Tromey <tom@tromey.com>
3799
3800 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
3801 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
3802 gdbpy_ref.
3803 * python/py-type.c (field_new): Use gdbpy_ref.
3804 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
3805 gdbpy_ref.
3806 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
3807 (py_free_pspace): Likewise.
3808 (pspace_to_pspace_object): Likewise.
3809 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
3810 (py_free_objfile): Likewise.
3811 (objfile_to_objfile_object): Likewise.
3812 * python/py-inferior.c (delete_thread_object): Use
3813 gdbpy_ref.
3814 (infpy_read_memory): Likewise.
3815 (py_free_inferior): Likewise.
3816 * python/py-evtregistry.c (create_eventregistry_object): Use
3817 gdbpy_ref.
3818 * python/py-event.c (create_event_object): Use gdbpy_ref.
3819
7780f186
TT
38202017-02-10 Tom Tromey <tom@tromey.com>
3821
3822 * python/py-ref.h (gdbpy_ref_policy): Now a template.
3823 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
3824 used.
3825 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
3826 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
3827 python/py-exitedevent.c, python/py-finishbreakpoint.c,
3828 python/py-framefilter.c, python/py-function.c,
3829 python/py-inferior.c, python/py-infevents.c,
3830 python/py-linetable.c, python/py-newobjfileevent.c,
3831 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
3832 python/py-signalevent.c, python/py-stopevent.c,
3833 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
3834 python/py-unwind.c, python/py-utils.c, python/py-value.c,
3835 python/py-varobj.c, python/py-xmethods.c, python/python.c,
3836 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
3837
d4b0bb18
TT
38382017-02-10 Tom Tromey <tom@tromey.com>
3839
3840 * ui-out.h (ui_out_emit_type): New class.
3841 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
3842 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
3843 and ui_out_emit_tuple.
3844 (enumerate_locals): Likewise.
3845 (py_mi_print_variables, py_print_locals, py_print_args): Use
3846 ui_out_emit_list.
3847 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
3848 ui_out_emit_list.
3849 * common/gdb_optional.h: New file.
3850
f67f945c
MG
38512017-02-10 Martin Galvan <martingalvan@sourceware.org>
3852
3853 * MAINTAINERS (Write After Approval): Update my e-mail address.
3854
18da0c51
MG
38552017-02-10 Martin Galvan <martingalvan@sourceware.org>
3856
3857 PR gdb/21122
3858 * breakpoint.c (_initialize_breakpoint): Update the help description
3859 of the 'commands' command to indicate that it takes a list argument.
3860
62c14536
SM
38612017-02-09 Simon Marchi <simon.marchi@ericsson.com>
3862
3863 * interps.c (current_interp_set_logging): Remove "return".
3864
ff6fa247
GB
38652017-02-09 Gary Benson <gbenson@redhat.com>
3866
3867 * symtab.c (add_symtab_completions): Prevent NULL pointer
3868 dereference.
3869
a474bd8e
PA
38702017-02-08 Pedro Alves <palves@redhat.com>
3871
3872 * interps.c (interp::interp): Remove reference to quiet_p.
3873 (interp_set): Make static. Remove dead "Switching to" output
3874 code.
3875 (interp_quiet_p, interp_set_quiet): Delete.
3876 (interpreter_exec_cmd): Don't set the interpreter quiet.
3877 * interps.h (interp_quiet_p): Make static.
3878 (class interp) <quiet_p>: Remove field
3879
3d7b173c
JG
38802017-02-08 Jerome Guitton <guitton@adacore.com>
3881
604c4576
JG
3882 * cli/cli-decode.c (find_command_name_length): Make it extern.
3883 * cli/cli-decode.h (find_command_name_length): Declare.
3884 * cli/cli-script.c (command_name_equals, line_first_arg):
3885 New functions.
3886 (process_next_line): Use cli-decode to parse command names.
3887 (build_command_line): Make args a constant pointer.
3888
38892017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 3890
3d7b173c
JG
3891 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
3892 Remove case-insensitive search.
3893
1291063d
JM
38942017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
3895
3896 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
3897 at the end of the line. Avoids an ARI warning.
3898
20b477a7
LM
38992017-02-06 Luis Machado <lgustavo@codesourcery.com>
3900
3901 * NEWS: Mention support for record/replay of Intel 64 rdrand and
3902 rdseed instructions.
3903 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
3904
3f7b46f2
IR
39052017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
3906
3907 PR tdep/20936
3908 Provide and use sparc32 and sparc64 target description XML files.
3909 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
3910 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
3911 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
3912 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
3913 * features/sparc/sparc32-solaris.xml: New file.
3914 * features/sparc/sparc64-solaris.xml: New file.
3915 * features/sparc/sparc32-solaris.c: Generated.
3916 * features/sparc/sparc64-solaris.c: Generated.
3917 * sparc-tdep.h: Account for differences in target descriptions.
3918 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
3919 (sparc32_register_type): Use target provided registers.
3920 (validate_tdesc_registers): New function.
3921 (sparc32_gdbarch_init): Use tdesc_has_registers.
3922 Set pseudoregister functions.
3923 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
3924 (sparc64_register_type): Use target provided registers.
3925 (sparc64_init_abi): Set pseudoregister functions.
3926
f0fd41c1
TT
39272017-02-03 Tom Tromey <tom@tromey.com>
3928
3929 PR rust/21097:
3930 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
3931 with a single member.
3932
d6f9b0fb
PA
39332017-02-03 Pedro Alves <palves@redhat.com>
3934
3935 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
3936 (cli_interp_base::~cli_interp_base): New.
3937 (cli_interp): New struct.
3938 (as_cli_interp): Cast the interp itself to cli_interp.
3939 (cli_interpreter_pre_command_loop): Rename to ...
3940 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
3941 parameter.
3942 (cli_interpreter_init): Rename to ...
3943 (cli_interp::init): ... this. Remove 'self' parameter. Use
3944 boolean. Make extern.
3945 (cli_interpreter_resume): Rename to ...
3946 (cli_interp::resume): ... this. Remove 'data' parameter. Make
3947 extern.
3948 (cli_interpreter_suspend): Rename to ...
3949 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
3950 extern.
3951 (cli_interpreter_exec): Rename to ...
3952 (cli_interp::exec): ... this. Remove 'data' parameter. Make
3953 extern.
3954 (cli_interpreter_supports_command_editing): Rename to ...
3955 (cli_interp_base::supports_command_editing): ... this. Remove
3956 'interp' parameter. Make extern.
3957 (cli_ui_out): Rename to ...
3958 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
3959 Make extern.
3960 (cli_set_logging): Rename to ...
3961 (cli_interp_base::set_logging): ... this. Remove 'interp'
3962 parameter. Make extern.
3963 (cli_interp_procs): Delete.
3964 (cli_interp_factory): Adjust to use "new".
3965 * cli/cli-interp.h: Include "interps.h".
3966 (struct cli_interp_base): New struct.
3967 * interps.c (struct interp): Delete. Fields moved to interps.h.
3968 (interp_new): Delete.
3969 (interp::interp, interp::~interp): New.
3970 (interp_set): Use bool, and return void. Assume the interpreter
3971 has suspend, init and resume methods, and that the all return
3972 void.
3973 (set_top_level_interpreter): interp_set returns void.
3974 (interp_ui_out): Adapt.
3975 (current_interp_set_logging): Adapt.
3976 (interp_data): Delete.
3977 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
3978 (interp_exec): Adapt.
3979 (top_level_interpreter_data): Delete.
3980 * interps.h (interp_init_ftype, interp_resume_ftype)
3981 (interp_suspend_ftype, interp_exec_ftype)
3982 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
3983 (class interp): New.
3984 (interp_new): Delete.
3985 (interp_set): Now returns void. Use bool.
3986 (interp_data, top_level_interpreter_data): Delete.
3987 * mi/mi-common.h: Include interps.h.
3988 (class mi_interp): Inherit from interp. Define a ctor. Declare
3989 init, resume, suspect, exec, interp_ui_out, set_logging and
3990 pre_command_loop methods.
3991 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
3992 (mi_interpreter_init): Rename to ...
3993 (mi_interp::init): ... this. Remove the 'interp' parameter, use
3994 bool, return void and make extern. Adjust.
3995 (mi_interpreter_resume): ... Rename to ...
3996 (mi_interp::resume): ... this. Remove the 'data' parameter,
3997 return void and make extern. Adjust.
3998 (mi_interpreter_suspend): ... Rename to ...
3999 (mi_interp::suspend): ... this. Remove the 'data' parameter,
4000 return void and make extern. Adjust.
4001 (mi_interpreter_exec): ... Rename to ...
4002 (mi_interp::exec): ... this. Remove the 'data' parameter and make
4003 extern. Adjust.
4004 (mi_interpreter_pre_command_loop): ... Rename to ...
4005 (mi_interp::pre_command_loop): ... this. Remove the 'self'
4006 parameter and make extern.
4007 (mi_on_normal_stop_1): Adjust.
4008 (mi_ui_out): Rename to ...
4009 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
4010 parameter and make extern. Adjust.
4011 (mi_set_logging): Rename to ...
4012 (mi_interp::set_logging): ... this. Remove the 'interp'
4013 parameter and make extern. Adjust.
4014 (mi_interp_procs): Delete.
4015 (mi_interp_factory): Adjust to use 'new'.
4016 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
4017 (mi_print_exception, mi_execute_command, mi_load_progress):
4018 Adjust.
4019 * tui/tui-interp.c (tui_interp): New class.
4020 (as_tui_interp): Return a tui_interp pointer.
4021 (tui_on_normal_stop, tui_on_signal_received)
4022 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
4023 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
4024 to use interp::interp_ui_out.
4025 (tui_init): Rename to ...
4026 (tui_interp::init): ... this. Remove the 'self' parameter, use
4027 bool, return void and make extern. Adjust.
4028 (tui_resume): Rename to ...
4029 (tui_interp::resume): ... this. Remove the 'data' parameter,
4030 return void and make extern. Adjust.
4031 (tui_suspend): Rename to ...
4032 (tui_interp::suspend): ... this. Remove the 'data' parameter,
4033 return void and make extern. Adjust.
4034 (tui_ui_out): Rename to ...
4035 (tui_interp::interp_ui_out): ... this. Remove the 'self'
4036 parameter, and make extern. Adjust.
4037 (tui_exec): Rename to ...
4038 (tui_interp::exec): ... this. Remove the 'data' parameter and
4039 make extern.
4040 (tui_interp_procs): Delete.
4041 (tui_interp_factory): Use "new".
4042
65c40c95
TT
40432017-02-02 Tom Tromey <tom@tromey.com>
4044
4045 * rust-exp.y (ends_raw_string, space_then_number)
4046 (rust_identifier_start_p): Return bool.
4047 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
4048 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
4049 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
4050 (rust_chartype_p): Return bool.
4051 (val_print_struct, rust_print_struct_def, rust_print_type):
4052 Update.
4053 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
4054 Return bool.
4055
b50f188d
TT
40562017-02-02 Tom Tromey <tom@tromey.com>
4057
4058 * rust-lang.c: Reindent.
4059
03c85b11
TT
40602017-02-02 Tom Tromey <tom@tromey.com>
4061
4062 * rust-lang.h (rust_crate_for_block): Update.
4063 * rust-lang.c (rust_crate_for_block): Return std::string.
4064 (rust_get_disr_info): Use std:;string, not
4065 gdb::unique_xmalloc_ptr.
4066 * rust-exp.y (crate_name): Update.
4067
9b6da501
PA
40682017-02-02 Pedro Alves <palves@redhat.com>
4069
4070 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
4071 field out of gdb_disassembler_test and make it static.
4072
ec4cb20b
PA
40732017-02-02 Pedro Alves <palves@redhat.com>
4074
4075 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
4076 mi1_interp and mi_interp fields.
4077
5be5dbf0
PA
40782017-02-02 Pedro Alves <palves@redhat.com>
4079
616268b6
PA
4080 * cli/cli-interp.c (struct saved_output_files, saved_output):
4081 Moved from cli/cli-logging.c.
4082 (cli_set_logging): New function.
4083 (cli_interp_procs): Install cli_set_logging.
4084 * cli/cli-interp.h (make_logging_output, cli_set_logging):
4085 Declare.
4086 * cli/cli-logging.c (struct saved_output_files, saved_output):
4087 Moved to cli/cli-interp.c.
4088 (pop_output_files): Don't save outputs here.
4089 (make_logging_output): New function.
4090 (handle_redirections): Don't build tee nor save previous outputs
4091 here.
4092 * interps.c (current_interp_set_logging): Change prototype.
4093 Assume there's always a set_logging_proc method installed.
4094 * interps.h (interp_set_logging_ftype): Change prototype.
4095 (current_interp_set_logging): Change prototype and adjust comment.
4096 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
4097 use make_logging_output.
4098 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
40992017-02-02 Pedro Alves <palves@redhat.com>
4100
5be5dbf0
PA
4101 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
4102 from ...
4103 (set_logging_overwrite): ... here.
4104 (logging_no_redirect_file): Delete.
4105 (set_logging_redirect): Don't handle redirection on the fly.
4106 Instead warn that "logging off" / "logging on" is necessary.
4107 (pop_output_files): Delete references to logging_no_redirect_file.
4108 (show_logging_command): Always speak in terms of what will happen
4109 once logging is reenabled.
4110
c99cc448
PA
41112017-02-02 Pedro Alves <palves@redhat.com>
4112
4113 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
4114
8b172ce7
PA
41152017-02-02 Pedro Alves <palves@redhat.com>
4116
4117 * disasm.c (gdb_pretty_print_insn): Rename to ...
4118 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
4119 Remove gdbarch parameter. Adapt to clear the object's buffers
4120 instead of allocating new buffers, and to print using the object's
4121 gdb_disassembler instead of calling gdb_print_insn.
4122 (dump_insns): Use gdb_pretty_print_disassembler.
4123 * disasm.h (gdb_pretty_print_insn): Delete declaration.
4124 (gdb_pretty_print_disassembler): New class.
4125 * record-btrace.c (btrace_insn_history): Use
4126 gdb_pretty_print_disassembler.
4127
d7e74731
PA
41282017-02-02 Pedro Alves <palves@redhat.com>
4129
4130 * ada-lang.c (type_as_string): Use string_file.
4131 * ada-valprint.c (ada_print_floating): Use string_file.
4132 * ada-varobj.c (ada_varobj_scalar_image)
4133 (ada_varobj_get_value_image): Use string_file.
4134 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
4135 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
4136 * breakpoint.c (update_inserted_breakpoint_locations)
4137 (insert_breakpoint_locations, reattach_breakpoints)
4138 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
4139 (print_it_watchpoint): Use string_file.
4140 (save_breakpoints): Use stdio_file.
4141 * c-exp.y (oper): Use string_file.
4142 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
4143 tee_file.
4144 (pop_output_files): Use delete.
4145 (handle_redirections): Use stdio_file and tee_file.
4146 * cli/cli-setshow.c (do_show_command): Use string_file.
4147 * compile/compile-c-support.c (c_compute_program): Use
4148 string_file.
4149 * compile/compile-c-symbols.c (generate_vla_size): Take a
4150 'string_file &' instead of a 'ui_file *'.
4151 (generate_c_for_for_one_variable): Take a 'string_file &' instead
4152 of a 'ui_file *'. Use string_file.
4153 (generate_c_for_variable_locations): Take a 'string_file &'
4154 instead of a 'ui_file *'.
4155 * compile/compile-internal.h (generate_c_for_for_one_variable):
4156 Take a 'string_file &' instead of a 'ui_file *'.
4157 * compile/compile-loc2c.c (push, pushf, unary, binary)
4158 (print_label, pushf_register_address, pushf_register)
4159 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
4160 'ui_file *'. Adjust.
4161 * compile/compile.c (compile_to_object): Use string_file.
4162 * compile/compile.h (compile_dwarf_expr_to_c)
4163 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
4164 'ui_file *'.
4165 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
4166 (replace_typedefs_qualified_name): Use string_file and
4167 obstack_copy0.
4168 * disasm.c (gdb_pretty_print_insn): Use string_file.
4169 (gdb_disassembly): Adjust reference the null_stream global.
4170 (do_ui_file_delete): Delete.
4171 (gdb_insn_length): Use null_stream.
4172 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
4173 * dwarf2loc.c (dwarf2_compile_property_to_c)
4174 (locexpr_generate_c_location, loclist_generate_c_location): Take a
4175 'string_file &' instead of a 'ui_file *'.
4176 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
4177 * dwarf2read.c (do_ui_file_peek_last): Delete.
4178 (dwarf2_compute_name): Use string_file.
4179 * event-top.c (gdb_setup_readline): Use stdio_file.
4180 * gdbarch.sh (verify_gdbarch): Use string_file.
4181 * gdbtypes.c (safe_parse_type): Use null_stream.
4182 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
4183 string_file.
4184 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
4185 'string_file *' instead of a 'ui_file *'.
4186 (gdbscm_arch_disassemble): Use string_file.
4187 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
4188 * guile/scm-ports.c (class ioscm_file_port): Now a class that
4189 inherits from ui_file.
4190 (ioscm_file_port_delete, ioscm_file_port_rewind)
4191 (ioscm_file_port_put): Delete.
4192 (ioscm_file_port_write): Rename to ...
4193 (ioscm_file_port::write): ... this. Remove file_port_magic
4194 checks.
4195 (ioscm_file_port_new): Delete.
4196 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
4197 ui_file_up.
4198 * guile/scm-type.c (tyscm_type_name): Use string_file.
4199 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
4200 Use string_file.
4201 * infcmd.c (print_return_value_1): Use string_file.
4202 * infrun.c (print_target_wait_results): Use string_file.
4203 * language.c (add_language): Use string_file.
4204 * location.c (explicit_to_string_internal): Use string_file.
4205 * main.c (captured_main_1): Use null_file.
4206 * maint.c (maintenance_print_architecture): Use stdio_file.
4207 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
4208 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
4209 event_channel>: Change type to mi_console_file pointer.
4210 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
4211 (mi_console_file_delete): Delete.
4212 (struct mi_console_file): Delete.
4213 (mi_console_file_magic): Delete.
4214 (mi_console_file_new): Delete.
4215 (mi_console_file::mi_console_file): New.
4216 (mi_console_file_delete): Delete.
4217 (mi_console_file_fputs): Delete.
4218 (mi_console_file::write): New.
4219 (mi_console_raw_packet): Delete.
4220 (mi_console_file::flush): New.
4221 (mi_console_file_flush): Delete.
4222 (mi_console_set_raw): Rename to ...
4223 (mi_console_file::set_raw): ... this.
4224 * mi/mi-console.h (class mi_console_file): New class.
4225 (mi_console_file_new, mi_console_set_raw): Delete.
4226 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
4227 (mi_set_logging): Use delete and tee_file. Adjust.
4228 * mi/mi-main.c (output_register): Use string_file.
4229 (mi_cmd_data_evaluate_expression): Use string_file.
4230 (mi_cmd_data_read_memory): Use string_file.
4231 (mi_cmd_execute, print_variable_or_computed): Use string_file.
4232 * mi/mi-out.c (mi_ui_out::main_stream): New.
4233 (mi_ui_out::rewind): Use main_stream and
4234 string_file.
4235 (mi_ui_out::put): Use main_stream and string_file.
4236 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
4237 Allocate a 'string_file' instead.
4238 (mi_out_new): Don't allocate a mem_fileopen stream here.
4239 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
4240 (mi_ui_out::main_stream): Declare method.
4241 * printcmd.c (eval_command): Use string_file.
4242 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
4243 * python/py-arch.c (archpy_disassemble): Use string_file.
4244 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
4245 * python/py-frame.c (frapy_str): Use string_file.
4246 * python/py-framefilter.c (py_print_type, py_print_single_arg):
4247 Use string_file.
4248 * python/py-type.c (typy_str): Use string_file.
4249 * python/py-unwind.c (unwind_infopy_str): Use string_file.
4250 * python/py-value.c (valpy_str): Use string_file.
4251 * record-btrace.c (btrace_insn_history): Use string_file.
4252 * regcache.c (regcache_print): Use stdio_file.
4253 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
4254 * remote.c (escape_buffer): Use string_file.
4255 * rust-lang.c (rust_get_disr_info): Use string_file.
4256 * serial.c (serial_open_ops_1): Use stdio_file.
4257 (do_serial_close): Use delete.
4258 * stack.c (print_frame_arg): Use string_file.
4259 (print_frame_args): Remove local mem_fileopen stream, not used.
4260 (print_frame): Use string_file.
4261 * symmisc.c (maintenance_print_symbols): Use stdio_file.
4262 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4263 Take a 'string_file *' instead of a 'ui_file *'.
4264 * top.c (new_ui): Use stdio_file and stderr_file.
4265 (free_ui): Use delete.
4266 (execute_command_to_string): Use string_file.
4267 (quit_confirm): Use string_file.
4268 * tracepoint.c (collection_list::append_exp): Use string_file.
4269 * tui/tui-disasm.c (tui_disassemble): Use string_file.
4270 * tui/tui-file.c: Don't include "ui-file.h".
4271 (enum streamtype, struct tui_stream): Delete.
4272 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
4273 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
4274 (tui_file::tui_file): New method.
4275 (tui_file_fputs): Delete.
4276 (tui_file_get_strbuf): Delete.
4277 (tui_file::puts): New method.
4278 (tui_file_adjust_strbuf): Delete.
4279 (tui_file_flush): Delete.
4280 (tui_file::flush): New method.
4281 * tui/tui-file.h: Tweak intro comment.
4282 Include ui-file.h.
4283 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
4284 (tui_file_adjust_strbuf): Delete declarations.
4285 (class tui_file): New class.
4286 * tui/tui-io.c (tui_initialize_io): Use tui_file.
4287 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
4288 (tui_register_format): Use string_stream.
4289 * tui/tui-stack.c (tui_make_status_line): Use string_file.
4290 (tui_get_function_from_frame): Use string_file.
4291 * typeprint.c (type_to_string): Use string_file.
4292 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
4293 (null_stream): New global.
4294 (ui_file_delete): Delete.
4295 (ui_file::ui_file): New.
4296 (null_file_isatty): Delete.
4297 (ui_file::~ui_file): New.
4298 (null_file_rewind): Delete.
4299 (ui_file::printf): New.
4300 (null_file_put): Delete.
4301 (null_file_flush): Delete.
4302 (ui_file::putstr): New.
4303 (null_file_write): Delete.
4304 (ui_file::putstrn): New.
4305 (null_file_read): Delete.
4306 (ui_file::putc): New.
4307 (null_file_fputs): Delete.
4308 (null_file_write_async_safe): Delete.
4309 (ui_file::vprintf): New.
4310 (null_file_delete): Delete.
4311 (null_file::write): New.
4312 (null_file_fseek): Delete.
4313 (null_file::puts): New.
4314 (ui_file_data): Delete.
4315 (null_file::write_async_safe): New.
4316 (gdb_flush, ui_file_isatty): Adjust.
4317 (ui_file_put, ui_file_rewind): Delete.
4318 (ui_file_write): Adjust.
4319 (ui_file_write_for_put): Delete.
4320 (ui_file_write_async_safe, ui_file_read): Adjust.
4321 (ui_file_fseek): Delete.
4322 (fputs_unfiltered): Adjust.
4323 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
4324 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
4325 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
4326 (set_ui_file_data): Delete.
4327 (string_file::~string_file, string_file::write)
4328 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
4329 (do_ui_file_as_string, ui_file_as_string): Delete.
4330 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
4331 (struct mem_file): Delete.
4332 (mem_file_new): Delete.
4333 (stdio_file::stdio_file): New.
4334 (mem_file_delete): Delete.
4335 (stdio_file::stdio_file): New.
4336 (mem_fileopen): Delete.
4337 (stdio_file::~stdio_file): New.
4338 (mem_file_rewind): Delete.
4339 (stdio_file::set_stream): New.
4340 (mem_file_put): Delete.
4341 (stdio_file::open): New.
4342 (mem_file_write): Delete.
4343 (stdio_file_magic, struct stdio_file): Delete.
4344 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
4345 (stdio_file::flush): New.
4346 (stdio_file_read): Rename to ...
4347 (stdio_file::read): ... this. Adjust.
4348 (stdio_file_write): Rename to ...
4349 (stdio_file::write): ... this. Adjust.
4350 (stdio_file_write_async_safe): Rename to ...
4351 (stdio_file::write_async_safe) ... this. Adjust.
4352 (stdio_file_fputs): Rename to ...
4353 (stdio_file::puts) ... this. Adjust.
4354 (stdio_file_isatty): Delete.
4355 (stdio_file_fseek): Delete.
4356 (stdio_file::isatty): New.
4357 (stderr_file_write): Rename to ...
4358 (stderr_file::write) ... this. Adjust.
4359 (stderr_file_fputs): Rename to ...
4360 (stderr_file::puts) ... this. Adjust.
4361 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
4362 (stderr_file::stderr_file): New.
4363 (tee_file_magic): Delete.
4364 (struct tee_file): Delete.
4365 (tee_file::tee_file): New.
4366 (tee_file_new): Delete.
4367 (tee_file::~tee_file): New.
4368 (tee_file_delete): Delete.
4369 (tee_file_flush): Rename to ...
4370 (tee_file::flush): ... this. Adjust.
4371 (tee_file_write): Rename to ...
4372 (tee_file::write): ... this. Adjust.
4373 (tee_file::write_async_safe): New.
4374 (tee_file_fputs): Rename to ...
4375 (tee_file::puts): ... this. Adjust.
4376 (tee_file_isatty): Rename to ...
4377 (tee_file::isatty): ... this. Adjust.
4378 * ui-file.h (struct obstack, struct ui_file): Don't
4379 forward-declare.
4380 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
4381 (ui_file_write_ftype)
4382 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
4383 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
4384 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
4385 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
4386 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
4387 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
4388 (set_ui_file_fseek): Delete.
4389 (ui_file_data, ui_file_delete, ui_file_rewind)
4390 (struct ui_file): New.
4391 (ui_file_up): New.
4392 (class null_file): New.
4393 (null_stream): Declare.
4394 (ui_file_write_for_put, ui_file_put): Delete.
4395 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
4396 Delete.
4397 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
4398 (gdb_fopen, tee_file_new): Delete.
4399 (struct string_file): New.
4400 (struct stdio_file): New.
4401 (stdio_file_up): New.
4402 (struct stderr_file): New.
4403 (class tee_file): New.
4404 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
4405 of a 'ui_file *'. Adjust.
4406 * ui-out.h (class ui_out) <field_stream>: Likewise.
4407 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
4408 (null_stream): Delete.
4409 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
4410 Adjust.
4411 * utils.h (struct ui_file): Delete forward declaration..
4412 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
4413 (error_stream): Take a 'string_file &' instead of a
4414 'ui_file *'.
4415 * varobj.c (varobj_value_get_print_value): Use string_file.
4416 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
4417 * gdbarch.c: Regenerate.
4418
187808b0
PA
44192017-02-02 Pedro Alves <palves@redhat.com>
4420
4421 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
4422 (gdb_pretty_print_insn): ... this. Now a free function. Add back
4423 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
4424 Adjust to call gdb_print_insn instead of
4425 gdb_disassembler::print_insn.
4426 (dump_insns, do_mixed_source_and_assembly_deprecated)
4427 (do_mixed_source_and_assembly, do_assembly_only): Add back a
4428 'gdbarch' parameter. Remove gdb_disassembler parameter.
4429 (gdb_disassembly): Don't allocate a gdb_disassembler here.
4430 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
4431 declaration.
4432 (gdb_pretty_print_insn): Re-add declaration.
4433 * record-btrace.c (btrace_insn_history): Don't allocate a
4434 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
4435
7a8eb317
SM
44362017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
4437
4438 * disasm.h (gdb_disassembly): Remove file_string parameter.
4439 * disasm.c (gdb_disassembly): Likewise.
4440 * cli/cli-cmds.c (print_disassembly): Adapt.
4441 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
4442 * stack.c (do_gdb_disassembly): Likewise.
4443
7346ef59
AA
44442017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
4445
4446 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
4447 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
4448 targets. And if the implicit value is longer than needed, extract
4449 the first bytes instead of the "least significant" ones.
4450
cd4007e4
MM
44512017-02-01 Markus Metzger <markus.t.metzger@intel.com>
4452
4453 * btrace.c (btrace_enable): Do not call btrace_add_pc for
4454 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
4455 (btrace_fetch): Assert can_access_registers_ptid.
4456 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
4457 validate_registers_access.
4458
cf77c34e
MM
44592017-02-01 Markus Metzger <markus.t.metzger@intel.com>
4460
4461 * gdbthread.h (can_access_registers_ptid): New.
4462 * thread.c (can_access_registers_ptid): New.
4463
be85ce7d
PA
44642017-02-01 Pedro Alves <palves@redhat.com>
4465
4466 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
4467
29b0b251
PA
44682017-01-31 Pedro Alves <palves@redhat.com>
4469
4470 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
4471 Fix typos.
4472
289b5b24
PA
44732017-01-31 Pedro Alves <palves@redhat.com>
4474
4475 * stack.c (print_frame_args): Remove local mem_fileopen stream,
4476 not used.
4477
b47413b4
PA
44782017-01-31 Pedro Alves <palves@redhat.com>
4479
4480 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
4481
60adb36c
PA
44822017-01-31 Pedro Alves <palves@redhat.com>
4483
4484 * common/scoped_restore.h
4485 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
4486 change the value's parameter type to T2.
4487 (make_scoped_restore): Likewise.
4488
2735833d
WT
44892017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4490 Richard Henderson <rth@redhat.com>
4491
4492 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
4493 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
4494 GS_BASE for older kernels.
4495 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
4496 GS_BASE for older kernels.
4497 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
4498 and GS_BASE to the offset table.
4499 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
4500 system register group.
4501 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
4502 for older kernels.
4503 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
4504 amd64 ABI.
4505 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
4506 AMD64_GSBASE_REGNUM.
4507 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
4508 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
4509 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
4510 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
4511 i386/64bit-segments.xml in those rules.
4512 * features/i386/64bit-segments.xml: New file.
4513 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
4514 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
4515 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
4516 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
4517 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
4518 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
4519 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
4520 * features/i386/amd64-avx-linux.c: Regenerated.
4521 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
4522 * features/i386/amd64-avx-mpx.c: Regenerated.
4523 * features/i386/amd64-avx512-linux.c: Regenerated.
4524 * features/i386/amd64-linux.c: Regenerated.
4525 * features/i386/amd64-mpx-linux.c: Regenerated.
4526 * features/i386/i386-avx-mpx-linux.c: Regenerated.
4527 * features/i386/i386-avx-mpx.c: Regenerated.
4528 * features/i386/x32-avx-linux.c: Regenerated.
4529 * features/i386/x32-avx512-linux.c: Regenerated.
4530 * regformats/i386/amd64-avx-linux.dat: Regenerated.
4531 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
4532 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
4533 * regformats/i386/amd64-linux.dat: Regenerated.
4534 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
4535 * regformats/i386/x32-avx-linux.dat: Regenerated.
4536 * regformats/i386/x32-avx512-linux.dat: Regenerated.
4537 * regformats/i386/x32-linux.dat: Regenerated.
4538
8884e97e
WT
45392017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4540
4541 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
4542 Set to AMD64_NUM_REGS.
4543
7005d26a
WT
45442017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4545
4546 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
4547 that checks validity of a register number.
4548
4bd2e1b2
KC
45492017-01-27 Kees Cook <keescook@google.com>
4550
4551 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
4552 fetch_fpregs if target has fpa registers.
4553 (arm_linux_store_inferior_registers): Call store_fpregs if target
4554 has fpa registers.
4555
7cf1de6c
AA
45562017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
4557
4558 * cris-tdep.c (cris_gdbarch_init): Remove check for
4559 info.byte_order and force it to BFD_ENDIAN_LITTLE.
4560
874a1c8c
AT
45612017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
4562
4563 * corelow.c (get_core_register_section): Check for regset
4564 existence before checking for REGSET_VARIABLE_SIZE.
4565
d8b49cf0
YQ
45662017-01-26 Yao Qi <yao.qi@linaro.org>
4567 Pedro Alves <palves@redhat.com>
4568
4569 PR gdb/20939
4570 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
4571 call memory_error, save memaddr instead.
4572 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
4573 negative, cal memory_error.
4574 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
4575
658ca58c
YQ
45762017-01-26 Yao Qi <yao.qi@linaro.org>
4577
4578 * disasm-selftests.c (memory_error_test): New function.
4579 (_initialize_disasm_selftests): Register memory_error_test.
4580
79843d45
YQ
45812017-01-26 Yao Qi <yao.qi@linaro.org>
4582
4583 * Makefile.in (SFILES): Add disasm-selftests.c and
4584 selftest-arch.c.
4585 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
4586 * disasm-selftests.c: New file.
4587 * selftest-arch.c: New file.
4588 * selftest-arch.h: New file.
4589
8cafda32
YQ
45902017-01-26 Yao Qi <yao.qi@linaro.org>
4591
4592 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
4593 to bfd_arch_mep. Don't return 0 if section is not
4594 found. Call print_insn_mep.
4595
e47ad6c0
YQ
45962017-01-26 Pedro Alves <palves@redhat.com>
4597 Yao Qi <yao.qi@linaro.org>
4598
4599 * arm-tdep.c: Include "disasm.h".
4600 (gdb_print_insn_arm): Update code to get gdbarch.
4601 * disasm.c (dis_asm_read_memory): Change it to
4602 gdb_disassembler::dis_asm_read_memory.
4603 (dis_asm_memory_error): Likewise.
4604 (dis_asm_print_address): Likewise.
4605 (gdb_pretty_print_insn): Change it to
4606 gdb_disassembler::pretty_print_insn.
4607 (dump_insns): Add one argument gdb_disassemlber. All
4608 callers updated.
4609 (do_mixed_source_and_assembly_deprecated): Likewise.
4610 (do_mixed_source_and_assembly): Likewise.
4611 (do_assembly_only): Likewise.
4612 (gdb_disassembler::gdb_disassembler): New.
4613 (gdb_disassembler::print_insn): New.
4614 * disasm.h (class gdb_disassembler): New.
4615 (gdb_pretty_print_insn): Remove declaration.
4616 (gdb_disassemble_info): Likewise.
4617 * guile/scm-disasm.c (class gdbscm_disassembler): New.
4618 (gdbscm_disasm_read_memory_worker): Update.
4619 (gdbscm_disasm_read_memory): Update.
4620 (gdbscm_disasm_memory_error): Remove.
4621 (gdbscm_disasm_print_address): Remove.
4622 (gdbscm_disassembler::gdbscm_disassembler): New.
4623 (gdbscm_print_insn_from_port): Update.
4624 * mips-tdep.c: Include disasm.h.
4625 (gdb_print_insn_mips): Update code to get gdbarch.
4626 * record-btrace.c (btrace_insn_history): Update.
4627 * spu-tdep.c: Include disasm.h.
4628 (struct spu_dis_asm_data): Remove.
4629 (struct spu_dis_asm_info): New.
4630 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
4631 SPU id.
4632 (gdb_print_insn_spu): Cast disassemble_info to
4633 spu_dis_asm_info.
4634
80d75874
YQ
46352017-01-26 Yao Qi <yao.qi@linaro.org>
4636
4637 * disasm.c (do_ui_file_delete): Delete.
4638 (gdb_insn_length): Move code creating stream to ...
4639 * utils.c (null_stream): ... here. New function.
4640 * utils.h (null_stream): Declare.
4641
60685cd0
SM
46422017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
4643
4644 * python/py-inferior.c (find_thread_object): Return directly
4645 from the loop. Remove "found" variable.
4646
eb1cdb62
JB
46472017-01-21 Joel Brobecker <brobecker@adacore.com>
4648
4649 GDB 7.12.1 released.
4650
b1ce6568
SM
46512017-01-20 Simon Marchi <simon.marchi@ericsson.com>
4652
4653 * python/py-function.c (fnpy_call): Reorder declarations to have
4654 the gdbpy_enter object declared first.
4655 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
4656
6f8b0407
SM
46572017-01-20 Simon Marchi <simon.marchi@ericsson.com>
4658
fec93fb1 4659 PR python/21068
6f8b0407
SM
4660 * python/python-internal.h (PyMem_RawMalloc): Define for
4661 Python < 3.4.
4662 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
4663 PyMem_RawMalloc instead of PyMem_Malloc.
4664
78cbbba8
LM
46652017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
4666 Luis Machado <lgustavo@codesourcery.com>
4667
4668 * NEWS (New commands): Mention flash-erase.
4669 (New MI commands): Mention target-flash-erase.
4670 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
4671 command.
4672 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
4673 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
4674 * target.c (flash_erase_command): New function.
4675 (initialize_targets): Add new flash-erase command.
4676 * target.h (flash_erase_command): New declaration.
4677
2132fe85
JB
46782017-01-20 Joel Brobecker <brobecker@adacore.com>
4679
4680 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
4681 HAVE_SYS_PROCFS_H is defined.
4682
d1dff226
AH
46832017-01-18 Alan Hayward <alan.hayward@arm.com>
4684
4685 * remote.c (struct cached_reg): Change data into a pointer.
4686 * (stop_reply_dtr): Free data pointers before deleting vector.
4687 (process_stop_reply): Likewise.
4688 (remote_parse_stop_reply): Allocate space for data
4689
9890e433
AH
46902017-01-18 Alan Hayward <alan.hayward@arm.com>
4691
4692 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
4693 MAX_REGISTER_SIZE.
4694 (amd64_pseudo_register_read_value): Likewise.
4695 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
4696 (store_register_using_P): Likewise.
4697 * regcache.c (regcache_xfer_part): Likewise.
4698
7a36499a
IR
46992017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
4700
4701 Split real and pseudo registers.
4702 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
4703 (sparc32_pseudo_regnum): New enum.
4704 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
4705 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
4706 (SPARC32_CP0_REGISTERS): New macro.
4707 (sparc32_pseudo_register_name): New function.
4708 (sparc32_register_name): Use sparc32_pseudo_register_name.
4709 (sparc32_pseudo_register_type): New function.
4710 (sparc32_register_type): Use sparc32_pseudo_register_type.
4711 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
4712 pseudo register numbers.
4713 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
4714 (SPARC64_CP0_REGISTERS): New macro.
4715 (sparc64_pseudo_register_name): New function.
4716 (sparc64_register_name): Use sparc64_pseudo_register_name.
4717 (sparc64_pseudo_register_type): New function.
4718 (sparc64_register_type): Use sparc64_pseudo_register_type.
4719 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
4720 pseudo register numbers.
4721 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
4722 sparc64_store_arguments): Handle pseudo register numbers.
4723
6f8976bf
YQ
47242017-01-13 Yao Qi <yao.qi@linaro.org>
4725
4726 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
4727 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
4728 output.
4729 (getpkt_or_notif_sane_1): Likewise.
4730
e4241ace
YQ
47312017-01-13 Yao Qi <yao.qi@linaro.org>
4732
4733 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
4734 of CC. Pass "-x c++-header" instead of "-x c".
4735
3015c064
SM
47362017-01-12 Simon Marchi <simon.marchi@ericsson.com>
4737
4738 * remote.c (remote_can_async_p): Update comment.
4739
fde1b17d
SM
47402017-01-12 Simon Marchi <simon.marchi@ericsson.com>
4741
4742 * linux-nat.c (linux_nat_can_async_p): Update comment.
4743
ca1ca08b
SM
47442017-01-12 Simon Marchi <simon.marchi@ericsson.com>
4745
4746 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
4747
4ad2da73
SM
47482017-01-11 Simon Marchi <simon.marchi@ericsson.com>
4749
4750 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
4751
c8b23b3f
TT
47522017-01-10 Tom Tromey <tom@tromey.com>
4753
4754 * python/py-type.c (typy_legacy_template_argument): Update.
4755 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
4756 ~demangle_parse_info): Declare new members.
4757 (cp_demangled_name_to_comp): Return unique_ptr.
4758 (cp_demangled_name_parse_free)
4759 (make_cleanup_cp_demangled_name_parse_free)
4760 (cp_new_demangle_parse_info): Remove.
4761 * cp-support.c (do_demangled_name_parse_free_cleanup)
4762 (make_cleanup_cp_demangled_name_parse_free): Remove.
4763 (inspect_type, cp_canonicalize_string_full)
4764 (cp_canonicalize_string): Update.
4765 (mangled_name_to_comp): Change return type.
4766 (cp_class_name_from_physname, method_name_from_physname)
4767 (cp_func_name, cp_remove_params): Update.
4768 * cp-name-parser.y (demangle_parse_info): New constructor, from
4769 cp_new_demangle_parse_info.
4770 (~demangle_parse_info): New destructor, from
4771 cp_demangled_name_parse_free.
4772 (cp_merge_demangle_parse_infos): Update.
4773 (cp_demangled_name_to_comp): Change return type.
4774
1ac32117
TT
47752017-01-10 Tom Tromey <tom@tromey.com>
4776
4777 * top.c (prevent_dont_repeat): Change return type.
4778 * python/python.c (execute_gdb_command): Use std::string.
4779 Update.
4780 * guile/guile.c (gdbscm_execute_gdb_command): Update.
4781 * command.h (prevent_dont_repeat): Change return type.
4782 * breakpoint.c (bpstat_do_actions_1): Update.
4783
0cf08227
TT
47842017-01-10 Tom Tromey <tom@tromey.com>
4785
4786 * value.h (scoped_value_mark::~scoped_value_mark): Call
4787 free_to_mark.
4788 (scoped_value_mark::free_to_mark): New method.
4789 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
4790 scoped_value_mark.
4791
eb115069
TT
47922017-01-10 Tom Tromey <tom@tromey.com>
4793
4794 * python/py-value.c (valpy_dereference, valpy_referenced_value)
4795 (valpy_reference_value, valpy_const_value, valpy_get_address)
4796 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
4797 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
4798 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
4799 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
4800 scoped_value_mark.
4801 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
4802 * value.h (scoped_value_mark): New class.
4803
906768f9
TT
48042017-01-10 Tom Tromey <tom@tromey.com>
4805
4806 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
4807 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
4808 * psymtab.c (discard_psymtabs_upto): Remove.
4809 (make_cleanup_discard_psymtabs): Remove.
4810 (struct psymtab_state): Remove.
4811
bef155c3
TT
48122017-01-10 Tom Tromey <tom@tromey.com>
4813
4814 * record-full.c (record_full_save_cleanups): Remove.
4815 (record_full_save): Use gdb::unlinker.
4816 * gcore.c (do_bfd_delete_cleanup): Remove.
4817 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
4818 cleanups.
4819 * dwarf2read.c (unlink_if_set): Remove.
4820 (write_psymtabs_to_index): Use gdb::unlinker.
4821 * common/gdb_unlinker.h: New file.
4822
192b62ce
TT
48232017-01-10 Tom Tromey <tom@tromey.com>
4824
4825 * windows-tdep.c (windows_xfer_shared_library): Update.
4826 * windows-nat.c (windows_make_so): Update.
4827 * utils.h (make_cleanup_bfd_unref): Remove.
4828 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
4829 * symfile.h (symfile_bfd_open)
4830 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
4831 * symfile.c (read_symbols, symbol_file_add)
4832 (separate_debug_file_exists): Update.
4833 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
4834 (generic_load, reread_symbols): Update.
4835 * symfile-mem.c (symbol_file_add_from_memory): Update.
4836 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
4837 (spu_symbol_file_add_from_memory): Update.
4838 * solist.h (struct target_so_ops) <bfd_open>: Return
4839 gdb_bfd_ref_ptr.
4840 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
4841 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
4842 gdb_bfd_ref_ptr.
4843 (solib_map_sections, reload_shared_libraries_1): Update.
4844 * solib-svr4.c (enable_break): Update.
4845 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
4846 * solib-frv.c (enable_break2): Update.
4847 * solib-dsbt.c (enable_break): Update.
4848 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
4849 gdb_bfd_ref_ptr.
4850 (darwin_solib_get_all_image_info_addr_at_init): Update.
4851 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
4852 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
4853 * record-full.c (record_full_save): Update.
4854 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
4855 * procfs.c (insert_dbx_link_bpt_in_file): Update.
4856 * minidebug.c (find_separate_debug_file_in_section): Return
4857 gdb_bfd_ref_ptr.
4858 * machoread.c (macho_add_oso_symfile): Change abfd to
4859 gdb_bfd_ref_ptr.
4860 (macho_symfile_read_all_oso): Update.
4861 (macho_check_dsym): Return gdb_bfd_ref_ptr.
4862 (macho_symfile_read): Update.
4863 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
4864 (jit_bfd_try_read_symtab): Update.
4865 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4866 (gdb_bfd_openw, gdb_bfd_openr_iovec)
4867 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
4868 gdb_bfd_ref_ptr.
4869 (gdb_bfd_ref_policy): New struct.
4870 (gdb_bfd_ref_ptr): New typedef.
4871 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4872 (gdb_bfd_openw, gdb_bfd_openr_iovec)
4873 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
4874 gdb_bfd_ref_ptr.
4875 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
4876 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
4877 (gcore_command): Update.
4878 * exec.c (exec_file_attach): Update.
4879 * elfread.c (elf_symfile_read): Update.
4880 * dwarf2read.c (dwarf2_get_dwz_file): Update.
4881 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
4882 (open_and_init_dwo_file): Update.
4883 (open_dwp_file): Return gdb_bfd_ref_ptr.
4884 (open_and_init_dwp_file): Update.
4885 * corelow.c (core_open): Update.
4886 * compile/compile-object-load.c (compile_object_load): Update.
4887 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
4888 * coffread.c (coff_symfile_read): Update.
4889 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
4890 gdb_bfd_ref_ptr. Rename.
4891 (dump_bfd_file, restore_command): Update.
4892 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
4893 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
4894 (find_separate_debug_file_by_buildid): Update.
4895
50315b21
TT
48962017-01-10 Tom Tromey <tom@tromey.com>
4897
4898 * common/gdb_ref_ptr.h: New file.
4899 * python/py-ref.h (struct gdbpy_ref_policy): New.
4900 (gdbpy_ref): Now a typedef.
4901
fc4007c9
TT
49022017-01-10 Tom Tromey <tom@tromey.com>
4903
4904 * utils.h (make_cleanup_htab_delete): Don't declare.
4905 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
4906 Remove.
4907 * linespec.c (decode_compound_collector): Add constructor,
4908 destructor.
4909 (lookup_prefix_sym): Remove cleanup.
4910 (symtab_collector): Add constructor, destructor.
4911 (collect_symtabs_from_filename): Remove cleanup.
4912 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
4913 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4914 Use htab_up.
4915 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
4916 * dwarf2read.c (dw2_expand_symtabs_matching)
4917 (dw2_map_symbol_filenames, dwarf_decode_macros)
4918 (write_psymtabs_to_index): Use htab_up.
4919 * dwarf2loc.c (func_verify_no_selftailcall)
4920 (call_site_find_chain_1, func_verify_no_selftailcall)
4921 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
4922 std::vector, gdb::unique_xmalloc_ptr.
4923 (call_sitep): Remove typedef.
4924 (dwarf2_locexpr_baton_eval): Remove unused variable.
4925
8dbcee67
TT
49262017-01-10 Tom Tromey <tom@tromey.com>
4927
4928 * python/python-internal.h (make_cleanup_py_decref)
4929 (make_cleanup_py_xdecref): Don't declare.
4930 * python/py-utils.c (py_decref, make_cleanup_py_decref)
4931 (py_xdecref, make_cleanup_py_xdecref): Remove.
4932
13df46cc
TT
49332017-01-10 Tom Tromey <tom@tromey.com>
4934
4935 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
4936 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
4937
06fc9bf7
TT
49382017-01-10 Tom Tromey <tom@tromey.com>
4939
4940 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
4941
830a4934
TT
49422017-01-10 Tom Tromey <tom@tromey.com>
4943
4944 * python/py-utils.c (unicode_to_encoded_string)
4945 (python_string_to_target_string)
4946 (python_string_to_target_python_string)
4947 (python_string_to_host_string, gdbpy_obj_to_string)
4948 (get_addr_from_python): Use gdbpy_ref.
4949
4586d543
TT
49502017-01-10 Tom Tromey <tom@tromey.com>
4951
4952 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
4953 gdbpy_ref.
4954
59876f8f
TT
49552017-01-10 Tom Tromey <tom@tromey.com>
4956
4957 * python/python.c (eval_python_command, gdbpy_decode_line)
4958 (gdbpy_run_events, gdbpy_start_type_printers)
4959 (gdbpy_apply_type_printers): Use gdbpy_ref.
4960
97d83487
TT
49612017-01-10 Tom Tromey <tom@tromey.com>
4962
4963 * python/py-param.c (get_doc_string, compute_enum_values): Use
4964 gdbpy_ref.
4965
9205649a
TT
49662017-01-10 Tom Tromey <tom@tromey.com>
4967
4968 * python/py-inferior.c (find_thread_object, build_inferior_list):
4969 Use gdbpy_ref.
4970
74c49d45
TT
49712017-01-10 Tom Tromey <tom@tromey.com>
4972
4973 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
4974
16361ffb
TT
49752017-01-10 Tom Tromey <tom@tromey.com>
4976
4977 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
4978 gdbpy_ref.
4979
905f2cca
TT
49802017-01-10 Tom Tromey <tom@tromey.com>
4981
4982 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
4983 extra incref.
4984 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
4985 Use gdbpy_ref.
4986
64081434
TT
49872017-01-10 Tom Tromey <tom@tromey.com>
4988
4989 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
4990 gdbpy_ref.
4991
59e9e831
TT
49922017-01-10 Tom Tromey <tom@tromey.com>
4993
4994 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
4995 decref results of PyArg_ParseTupleAndKeywords.
4996
9de10f6d
TT
49972017-01-10 Tom Tromey <tom@tromey.com>
4998
4999 * python/python.c (python_run_simple_file): Use
5000 unique_xmalloc_ptr, gdbpy_ref.
5001
2bd5759d
TT
50022017-01-10 Tom Tromey <tom@tromey.com>
5003
5004 * python/py-prettyprint.c (print_stack_unless_memory_error)
5005 (print_string_repr, print_children): Use gdbpy_ref.
5006 (dummy_python_frame): New class.
5007 (dummy_python_frame::dummy_python_frame): Rename from
5008 push_dummy_python_frame.
5009 (py_restore_tstate): Remove.
5010
3b4e0e01
TT
50112017-01-10 Tom Tromey <tom@tromey.com>
5012
5013 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
5014
17a22718
TT
50152017-01-10 Tom Tromey <tom@tromey.com>
5016
5017 * python/python.c (ensure_python_env, restore_python_env):
5018 Remove.
5019 * python/python-internal.h (ensure_python_env): Don't declare.
5020 * varobj.h (varobj_ensure_python_env): Don't declare.
5021 * varobj.c (varobj_ensure_python_env): Remove.
5022
68cdc557
TT
50232017-01-10 Tom Tromey <tom@tromey.com>
5024
5025 * varobj.c (varobj_value_get_print_value): Use
5026 gdbpy_enter_varobj.
5027
1eba6383
TT
50282017-01-10 Tom Tromey <tom@tromey.com>
5029
5030 * python/py-prettyprint.c (print_string_repr, print_children):
5031 Update.
5032 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
5033 of "encoding".
5034 * varobj.c (varobj_value_get_print_value): Update.
5035 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
5036
bde7b3e3
TT
50372017-01-10 Tom Tromey <tom@tromey.com>
5038
5039 * varobj.c (varobj_get_display_hint)
5040 (dynamic_varobj_has_child_method, install_new_value_visualizer)
5041 (varobj_set_visualizer, free_variable): Use
5042 gdbpy_enter_varobj.
5043
a7785f8c
TT
50442017-01-10 Tom Tromey <tom@tromey.com>
5045
5046 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
5047 (do_finish_initialization): New function. Use gdbpy_ref.
5048 (gdbpy_finish_initialization): Use gdbpy_enter. Call
5049 do_finish_initialization.
5050
2865bfce
TT
50512017-01-10 Tom Tromey <tom@tromey.com>
5052
5053 * python/py-param.c (get_set_value, get_show_value): Use
5054 gdbpy_enter, gdbpy_ref.
5055
0e9dcc75
TT
50562017-01-10 Tom Tromey <tom@tromey.com>
5057
5058 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
5059
12a5cedd
TT
50602017-01-10 Tom Tromey <tom@tromey.com>
5061
5062 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
5063
788f2586
TT
50642017-01-10 Tom Tromey <tom@tromey.com>
5065
5066 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
5067 Use gdbpy_enter_varobj.
5068
6cd67bea
TT
50692017-01-10 Tom Tromey <tom@tromey.com>
5070
5071 * varobj.c (gdbpy_enter_varobj): New constructor.
5072 * python/python-internal.h (gdbpy_enter_varobj): New class.
5073 * python/py-varobj.c (py_varobj_get_iterator): Use
5074 gdbpy_enter_varobj.
5075
14b122bf
TT
50762017-01-10 Tom Tromey <tom@tromey.com>
5077
5078 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
5079 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
5080 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
5081 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
5082 unique_xmalloc_ptr.
5083 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
5084
bf1ca3b9
TT
50852017-01-10 Tom Tromey <tom@tromey.com>
5086
5087 * python/py-xmethods.c (invoke_match_method): Use
5088 gdbpy_ref.
5089
572a5524
TT
50902017-01-10 Tom Tromey <tom@tromey.com>
5091
5092 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
5093 gdbpy_enter, gdbpy_ref.
5094
396a78b6
TT
50952017-01-10 Tom Tromey <tom@tromey.com>
5096
5097 * python/python.c (python_interactive_command): Use gdbpy_enter.
5098
a88b13c7
TT
50992017-01-10 Tom Tromey <tom@tromey.com>
5100
5101 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
5102 gdbpy_ref.
5103
e9f0c363
TT
51042017-01-10 Tom Tromey <tom@tromey.com>
5105
5106 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
5107 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
5108
6349f452
TT
51092017-01-10 Tom Tromey <tom@tromey.com>
5110
5111 * utils.h (htab_deleter): New struct.
5112 (htab_up): New typedef.
5113 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
5114 gdbpy_enter, gdbpy_ref, htab_up.
5115
c0171de6
TT
51162017-01-10 Tom Tromey <tom@tromey.com>
5117
5118 * python/py-unwind.c (pending_frame_invalidate): Remove.
5119 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
5120
f18e226f
TT
51212017-01-10 Tom Tromey <tom@tromey.com>
5122
5123 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
5124 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
5125
c57af3f1
TT
51262017-01-10 Tom Tromey <tom@tromey.com>
5127
5128 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
5129
60e600ec
TT
51302017-01-10 Tom Tromey <tom@tromey.com>
5131
5132 * python/python.c (gdbpy_eval_from_control_command)
5133 (gdbpy_source_script, gdbpy_run_events)
5134 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
5135 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
5136 gdbpy_enter.
5137
bf7da5b0
TT
51382017-01-10 Tom Tromey <tom@tromey.com>
5139
5140 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
5141
2d38bced
TT
51422017-01-10 Tom Tromey <tom@tromey.com>
5143
5144 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
5145
07bc7329
TT
51462017-01-10 Tom Tromey <tom@tromey.com>
5147
5148 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
5149 (python_on_inferior_call_pre, python_on_inferior_call_post)
5150 (python_on_memory_change, python_on_register_change)
5151 (python_inferior_exit, python_new_objfile, add_thread_object)
5152 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
5153
6e7c365e
TT
51542017-01-10 Tom Tromey <tom@tromey.com>
5155
5156 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
5157 (bpfinishpy_handle_exit): Use gdbpy_enter.
5158
6ba0cd40
TT
51592017-01-10 Tom Tromey <tom@tromey.com>
5160
5161 * python/py-cmd.c (cmdpy_destroyer)
5162 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
5163 gdbpy_enter.
5164
de2dc875
TT
51652017-01-10 Tom Tromey <tom@tromey.com>
5166
5167 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
5168 gdbpy_enter.
5169 (gdbpy_breakpoint_has_cond): Likewise.
5170
4ecee2c4
TT
51712017-01-10 Tom Tromey <tom@tromey.com>
5172
5173 * python/python.c (gdbpy_enter): New constructor.
5174 (~gdbpy_enter): New destructor.
5175 (restore_python_env, ensure_python_env): Rewrite.
5176 * python/python-internal.h (gdbpy_enter): New class.
5177
37fce74f
TT
51782017-01-10 Tom Tromey <tom@tromey.com>
5179
5180 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
5181
53a0cca3
TT
51822017-01-10 Tom Tromey <tom@tromey.com>
5183
5184 * python/py-value.c (value_has_field, get_field_flag)
5185 (get_field_type, valpy_getitem, convert_value_from_python): Use
5186 gdbpy_ref.
5187
ff3724f5
TT
51882017-01-10 Tom Tromey <tom@tromey.com>
5189
5190 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
5191 gdbpy_ref.
5192
0700aea5
TT
51932017-01-10 Tom Tromey <tom@tromey.com>
5194
5195 * python/py-prettyprint.c (search_pp_list)
5196 (find_pretty_printer_from_objfiles)
5197 (find_pretty_printer_from_progspace)
5198 (find_pretty_printer_from_gdb, find_pretty_printer)
5199 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
5200 gdbpy_ref.
5201
1bb44c9f
TT
52022017-01-10 Tom Tromey <tom@tromey.com>
5203
5204 * python/py-param.c (call_doc_function): Use gdbpy_ref.
5205
87ce03fd
TT
52062017-01-10 Tom Tromey <tom@tromey.com>
5207
5208 * python/py-linetable.c (build_line_table_tuple_from_pcs)
5209 (ltpy_get_all_source_lines): Use gdbpy_ref.
5210
ee0a3fb8
TT
52112017-01-10 Tom Tromey <tom@tromey.com>
5212
5213 * python/py-framefilter.c (extract_sym, extract_value)
5214 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
5215 gdbpy_ref.
5216
bf2a52fa
TT
52172017-01-10 Tom Tromey <tom@tromey.com>
5218
5219 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
5220
f59fe7f8
TT
52212017-01-10 Tom Tromey <tom@tromey.com>
5222
5223 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
5224
80bd970a
TT
52252017-01-10 Tom Tromey <tom@tromey.com>
5226
5227 * python/py-function.c (convert_values_to_python, fnpy_init): Use
5228 gdbpy_ref.
5229
d1b3de2e
TT
52302017-01-10 Tom Tromey <tom@tromey.com>
5231
5232 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
5233
3bb43384
TT
52342017-01-10 Tom Tromey <tom@tromey.com>
5235
5236 * python/py-type.c (convert_field, make_fielditem, typy_fields)
5237 (typy_range): Use gdbpy_ref.
5238
abf5651e
TT
52392017-01-10 Tom Tromey <tom@tromey.com>
5240
5241 * python/py-threadevent.c (create_thread_event_object): Use
5242 gdbpy_ref.
5243 * python/py-stopevent.c (create_stop_event_object): Simplify.
5244 (emit_stop_event): Use gdbpy_ref.
5245 * python/py-signalevent.c (create_signal_event_object): Use
5246 gdbpy_ref.
5247 * python/py-newobjfileevent.c (create_new_objfile_event_object)
5248 (emit_new_objfile_event, create_clear_objfiles_event_object)
5249 (emit_clear_objfiles_event): Use gdbpy_ref.
5250 * python/py-infevents.c (create_inferior_call_event_object)
5251 (create_register_changed_event_object)
5252 (create_memory_changed_event_object, emit_inferior_call_event)
5253 (emit_memory_changed_event, emit_register_changed_event): Use
5254 gdbpy_ref.
5255 * python/py-exitedevent.c (create_exited_event_object)
5256 (emit_exited_event): Use gdbpy_ref.
5257 * python/py-event.h (evpy_emit_event): Remove
5258 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
5259 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
5260 * python/py-continueevent.c (emit_continue_event): Use
5261 gdbpy_ref.
5262 * python/py-breakpoint.c (gdbpy_breakpoint_created)
5263 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
5264 gdbpy_ref.
5265 * python/py-bpevent.c (create_breakpoint_event_object): Use
5266 gdbpy_ref.
5267
a68ff33e
TT
52682017-01-10 Tom Tromey <tom@tromey.com>
5269
5270 * python/py-ref.h: New file.
5271
7becfd03
SM
52722017-01-10 Simon Marchi <simon.marchi@ericsson.com>
5273
5274 * cli-out.c (cli_ui_out::do_redirect): Change return type to
5275 void.
5276 * cli-out.h (cli_ui_out::do_redirect): Likewise.
5277 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
5278 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
5279 * ui-out.c (ui_out::redirect): Likewise.
5280 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
5281 * cli/cli-logging.c (set_logging_redirect): Update call site of
5282 ui_out::redirect.
5283 (handle_redirections): Likewise.
5284 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
5285 * top.c (execute_command_to_string): Likewise.
5286 * utils.c (do_ui_out_redirect_pop): Likewise.
5287
df294654
SM
52882017-01-10 Simon Marchi <simon.marchi@ericsson.com>
5289
5290 * stack.c (_initialize_stack): Update "frame" command help message.
5291
f5e6296e
IB
52922017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
5293
5294 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
5295
0e2d6fa6
YQ
52962017-01-06 Yao Qi <yao.qi@linaro.org>
5297
5298 * x86-linux-nat.h: Include gdb_proc_service.h.
5299
44d6d3f9
YQ
53002017-01-06 Yao Qi <yao.qi@linaro.org>
5301
5302 * ser-base.h: Include serial.h.
5303
656731fe
YQ
53042017-01-06 Yao Qi <yao.qi@linaro.org>
5305
5306 * ppc-linux-tdep.h: Include ppc-tdep.h.
5307
1ca8f924
YQ
53082017-01-06 Yao Qi <yao.qi@linaro.org>
5309
5310 * nat/amd64-linux-siginfo.h: Include signal.h.
5311
bc3008c4
YQ
53122017-01-06 Yao Qi <yao.qi@linaro.org>
5313
5314 * nat/aarch64-linux-hw-point.h: Include break-common.h.
5315
66c80d03
YQ
53162017-01-06 Yao Qi <yao.qi@linaro.org>
5317
5318 * mi/mi-parse.h: Include mi-cmds.h.
5319
051d2dda
YQ
53202017-01-06 Yao Qi <yao.qi@linaro.org>
5321
5322 * inf-loop.c: Don't include "target.h".
5323 * inf-loop.h: Include it here.
5324
8018d34f
YQ
53252017-01-06 Yao Qi <yao.qi@linaro.org>
5326
5327 * dfp.h: Include "dboulest.h" and "expression.h".
5328
c0b8369c
YQ
53292017-01-06 Yao Qi <yao.qi@linaro.org>
5330
5331 * ax-gdb.h: Include "ax.h".
5332
ad5cba2a
YQ
53332017-01-06 Yao Qi <yao.qi@linaro.org>
5334
5335 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
5336 with nat/gdb_ptrace.h.
5337
1c33cd7f
YQ
53382017-01-05 Yao Qi <yao.qi@linaro.org>
5339
5340 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
5341 new line.
5342 (mips64_fbsd_sigframe_init): Likewise.
5343
c988ac1d
JB
53442017-01-04 John Baldwin <jhb@FreeBSD.org>
5345
5346 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
5347 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
5348
b268007c
JB
53492017-01-04 John Baldwin <jhb@FreeBSD.org>
5350
5351 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5352 * NEWS: Mention new FreeBSD/mips native configuration.
5353 * config/mips/fbsd.mh: New file.
5354 * configure.host: Add mips*-*-freebsd*.
5355 * mips-fbsd-nat.c: New file.
5356
387360da
JB
53572017-01-04 John Baldwin <jhb@FreeBSD.org>
5358
5359 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
5360 (ALLDEPFILES): Add mips-fbsd-tdep.c.
5361 * NEWS: Mention new FreeBSD/mips target.
5362 * configure.tgt: Add mips*-*-freebsd*.
5363 * mips-fbsd-tdep.c: New file.
5364 * mips-fbsd-tdep.h: New file.
5365
2aaaf250
YQ
53662017-01-04 Yao Qi <yao.qi@linaro.org>
5367
5368 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
5369 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
5370
61baf725
JB
53712017-01-01 Joel Brobecker <brobecker@adacore.com>
5372
6dbb839a 5373 Update copyright year range in all GDB files.
61baf725 5374
c113e7ff 53752017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 5376
c113e7ff 5377 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 5378
c113e7ff 5379For older changes see ChangeLog-2016.
c906108c
SS
5380\f
5381Local Variables:
5382mode: change-log
5383left-margin: 8
5384fill-column: 74
5385version-control: never
57da7796 5386coding: utf-8
c906108c 5387End:
This page took 2.663671 seconds and 4 git commands to generate.