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