]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Introduce gdb_argv, a class wrapper for buildargv
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
773a1edc
TT
12017-08-03 Tom Tromey <tom@tromey.com>
2
3 * utils.h (struct gdb_argv_deleter): New.
4 (gdb_argv): New class.
5 * utils.c (gdb_argv::reset): New method.
6 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7 * tracefile.c (tsave_command): Use gdb_argv.
8 * top.c (new_ui_command): Use gdb_argv.
9 * symmisc.c (maintenance_print_symbols)
10 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
11 * symfile.c (symbol_file_command, generic_load)
12 (remove_symbol_file_command): Use gdb_argv.
13 * stack.c (backtrace_command): Use gdb_argv.
14 * source.c (add_path, show_substitute_path_command)
15 (unset_substitute_path_command, set_substitute_path_command):
16 Use gdb_argv.
17 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
18 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
19 * remote.c (extended_remote_run, remote_put_command)
20 (remote_get_command, remote_delete_command): Use gdb_argv.
21 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
22 (gdbsim_open): Use gdb_argv.
23 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
24 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
25 * procfs.c (procfs_info_proc): Use gdb_argv.
26 * interps.c (interpreter_exec_cmd): Use gdb_argv.
27 * infrun.c (handle_command): Use gdb_argv.
28 * inferior.c (add_inferior_command, clone_inferior_command):
29 Use gdb_argv.
30 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
31 * exec.c (exec_file_command): Use gdb_argv.
32 * cli/cli-cmds.c (alias_command): Use gdb_argv.
33 * compile/compile.c (build_argc_argv): Use gdb_argv.
34
0d50bde3
TT
352017-08-03 Tom Tromey <tom@tromey.com>
36
37 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
38
7f968c89
TT
392017-08-03 Tom Tromey <tom@tromey.com>
40
41 * python/python.c (compute_python_string): Return std::string.
42 (gdbpy_eval_from_control_command): Update.
43 (do_start_initialization): Use std::string.
44 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
45 xstrprintf.
46 * python/py-breakpoint.c (local_setattro): Use string_printf, not
47 xstrprintf.
48
3c9ebddd
TT
492017-08-03 Tom Tromey <tom@tromey.com>
50
51 * top.h (do_restore_instream_cleanup): Remove.
52 * top.c (do_restore_instream_cleanup): Remove.
53 (read_command_file): Use scoped_restore.
54 * cli/cli-script.c (execute_user_command): Use scoped_restore.
55
b51b225e
TT
562017-08-03 Tom Tromey <tom@tromey.com>
57
58 * cli/cli-script.c (execute_user_command)
59 (execute_control_command): Use scoped_restore.
60
ac991630
TT
612017-08-03 Tom Tromey <tom@tromey.com>
62
63 * cli/cli-script.c (do_restore_user_call_depth): Remove.
64 (execute_user_command): Remove user_call_depth; use
65 user_args_stack's size instead.
66
898e0c8e
TT
672017-08-03 Tom Tromey <tom@tromey.com>
68
69 * top.h (in_user_command): Remove.
70 * top.c (in_user_command): Remove.
71 * cli/cli-script.c (do_restore_user_call_depth)
72 (execute_user_command): Update.
73
26fcd5d7
TT
742017-08-03 Tom Tromey <tom@tromey.com>
75
76 * valops.c (search_struct_method): Use gdb::byte_vector.
77 * valarith.c (value_concat): Use std::vector.
78 * target.c (memory_xfer_partial): Use gdb::byte_vector.
79 (simple_search_memory): Likewise.
80 * printcmd.c (find_string_backward): Use gdb::byte_vector.
81 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
82 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
83 * elfread.c (elf_rel_plt_read): Use std::string.
84 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
85 * cli/cli-dump.c (restore_section_callback): Use
86 gdb::byte_vector.
87
7c218e6c
TT
882017-08-03 Tom Tromey <tom@tromey.com>
89
90 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
91
31b68d4a
TT
922017-08-03 Tom Tromey <tom@tromey.com>
93
94 * tui/tui-regs.c (tui_restore_gdbout): Remove.
95 (tui_register_format): Use scoped_restore.
96
2ec845e7
TT
972017-08-03 Tom Tromey <tom@tromey.com>
98
99 * reverse.c (exec_direction_default): Remove.
100 (exec_reverse_once): Use scoped_restore.
101 * remote.c (restore_remote_timeout): Remove.
102 (remote_flash_erase, remote_flash_write, remote_flash_done)
103 (readchar, remote_serial_write): Use scoped_restore.
104 * cli/cli-script.c (struct source_cleanup_lines_args)
105 (source_cleanup_lines): Remove.
106 (script_from_file): Use scoped_restore.
107 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
108 (source_command): Use scoped_restore.
109
b3bc8453
TT
1102017-08-03 Tom Tromey <tom@tromey.com>
111
112 * utils.h (make_cleanup_free_so): Remove.
113 * utils.c (do_free_so, make_cleanup_free_so): Remove.
114 * solist.h (struct so_deleter): New.
115 (so_list_up): New typedef.
116 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
117
e3ad2841
TT
1182017-08-03 Tom Tromey <tom@tromey.com>
119
120 * utils.h (make_cleanup_restore_current_language): Remove.
121 * utils.c (do_restore_current_language)
122 (make_cleanup_restore_current_language): Remove.
123 * parse.c (parse_exp_in_context_1)
124 (parse_expression_with_language): Use
125 scoped_restore_current_language.
126 * mi/mi-main.c (mi_cmd_execute): Use
127 scoped_restore_current_language.
128 * language.h (scoped_restore_current_language): New class.
129
b80cf838
TT
1302017-08-03 Tom Tromey <tom@tromey.com>
131
132 * compile/compile.c (cleanup_unlink_file): Remove.
133 (compile_to_object): Use gdb::unlinker.
134 (eval_compile_command): Likewise.
135
fad0444a
TT
1362017-08-03 Tom Tromey <tom@tromey.com>
137
138 * utils.h (make_cleanup_fclose): Remove.
139 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
140
6e7bc05c
TT
1412017-08-03 Tom Tromey <tom@tromey.com>
142
143 * top.c (open_terminal_stream): Return gdb_file_up.
144 (new_ui_command): Update.
145
4a45905b
TT
1462017-08-03 Tom Tromey <tom@tromey.com>
147
148 * source.c (print_source_lines_base, forward_search_command)
149 (reverse_search_command): Use gdb_file_up.
150
7cd06d6e
TT
1512017-08-03 Tom Tromey <tom@tromey.com>
152
153 * fbsd-nat.c (fbsd_find_memory_regions): Update.
154
ed166945
TT
1552017-08-03 Tom Tromey <tom@tromey.com>
156
157 * cli/cli-cmds.c (find_and_open_script): Change return type.
158 Remove "streamp" and "full_path" parameters.
159 (source_script_with_search): Update.
160 * auto-load.c (source_script_file): Update.
161 * cli/cli-cmds.h (find_and_open_script): Change type.
162 (open_script): New struct.
163
d419f42d
TT
1642017-08-03 Tom Tromey <tom@tromey.com>
165
166 * xml-support.c (xml_fetch_content_from_file): Update.
167 * ui-file.c (stdio_file::open): Update.
168 * tracefile-tfile.c (tfile_start): Update.
169 * remote.c (remote_file_put, remote_file_get): Update.
170 * nat/linux-procfs.c (linux_proc_get_int)
171 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
172 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
173 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
174 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
175 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
176 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
177 * linux-nat.c (linux_proc_pending_signals): Update.
178 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
179 (file_closer): Remove.
180 * compile/compile.c (compile_to_object): Update.
181 * common/filestuff.h (struct gdb_file_deleter): New.
182 (gdb_file_up): New typedef.
183 (gdb_fopen_cloexec): Change return type.
184 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
185 * cli/cli-dump.c (fopen_with_cleanup): Remove.
186 (dump_binary_file, restore_binary_file): Update.
187 * auto-load.c (auto_load_objfile_script_1): Update.
188
4a2b031d
TT
1892017-08-03 Tom Tromey <tom@tromey.com>
190
191 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
192 (info_static_tracepoint_markers_command): Likewise.
193 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
194 * skip.c (skip_info): Use ui_out_emit_table.
195 * progspace.c (print_program_space): Use ui_out_emit_table.
196 * osdata.c (info_osdata): Use ui_out_emit_table.
197 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
198 ui_out_emit_table.
199 * linux-thread-db.c (info_auto_load_libthread_db): Use
200 ui_out_emit_table.
201 * inferior.c (print_inferior): Use ui_out_emit_table.
202 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
203 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
204 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
205 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
206 * ui-out.h (class ui_out_emit_table): New.
207
a4f320fd
MR
2082017-08-02 Maciej W. Rozycki <macro@imgtec.com>
209
210 * mips-tdep.c (mips_fpu_type_str): New function.
211 (mips_dump_tdep): Call it.
212
a2f1f308
MR
2132017-08-01 Maciej W. Rozycki <macro@imgtec.com>
214
215 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
216 `->mips_fpu_type'.
217
7e5ed83b
XR
2182017-07-31 Xavier Roirand <roirand@adacore.com>
219
220 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
221
4c9dc811
XR
2222017-07-27 Xavier Roirand <roirand@adacore.com>
223
224 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
225
27d41eac
YQ
2262017-07-26 Yao Qi <yao.qi@linaro.org>
227
228 * cli/cli-cmds.c (maintenancechecklist): New variable.
229 * gdbcmd.h (maintenancechecklist): Declare it.
230 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
231 Call i386_linux_read_description with different masks.
232 * maint.c (maintenance_check_command): New function.
233 (_initialize_maint_cmds): Call add_prefix_cmd.
234 * target-descriptions.c (tdesc_reg): override operator != and ==.
235 (tdesc_type): Likewise.
236 (tdesc_feature): Likewise.
237 (target_desc): Likewise.
238 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
239 (maintenance_check_xml_descriptions): New function.
240 (_initialize_target_descriptions) Add command "xml-descriptions".
241 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
242
ea03d0d3
YQ
2432017-07-26 Yao Qi <yao.qi@linaro.org>
244
245 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
246 Include features/i386/32bit-*.c.
247 (i386_linux_read_description): Generate target description if it
248 doesn't exist.
249 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
250 functions.
251 * features/i386/32bit-linux.c: Re-generated.
252 * features/i386/32bit-sse.c: Likewise.
253 * target-descriptions.c (print_c_feature::visit): Print code to
254 set register number if needed.
255 (print_c_feature) <m_next_regnum>: New field.
256
25aa13e5
YQ
2572017-07-26 Yao Qi <yao.qi@linaro.org>
258
259 * features/Makefile (CFILES): Rename with TDESC_CFILES.
260 (FEATURE_XMLFILES): New.
261 (FEATURE_CFILES): New.
262 New rules.
263 (clean-cfiles): Remove generated c files.
264 * features/i386/32bit-avx.c: Generated.
265 * features/i386/32bit-avx512.c: Generated.
266 * features/i386/32bit-core.c: Generated.
267 * features/i386/32bit-linux.c: Generated.
268 * features/i386/32bit-mpx.c: Generated.
269 * features/i386/32bit-pkeys.c: Generated.
270 * features/i386/32bit-sse.c: Generated.
271 * target-descriptions.c: Include algorithm.
272 (tdesc_element_visitor): Add method visit_end.
273 (print_c_tdesc): Implement visit_end.
274 (print_c_tdesc:: m_filename_after_features): Move it to
275 protected.
276 (print_c_feature): New class.
277 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
278 name starts with "i386/32bit-".
279
6eb1e6a8
YQ
2802017-07-26 Yao Qi <yao.qi@linaro.org>
281
282 * target-descriptions.c (tdesc_element_visitor): New class.
283 (tdesc_element): New class.
284 (tdesc_reg): Inherit from tdesc_element.
285 (tdesc_reg::accept): New function.
286 (tdesc_type): Inherit from tdesc_element.
287 (tdesc_type::accept): New function.
288 (tdesc_feature): Inherit from tdesc_element.
289 (tdesc_feature::accept): New function.
290 (target_desc): Inherit from tdesc_element.
291 (target_desc::target_desc): New.
292 (target_desc::~target_desc): New.
293 (target_desc::accept): New.
294 (allocate_target_description): Use new.
295 (free_target_description): Use delete.
296 (print_c_tdesc): New class.
297 (maint_print_c_tdesc_cmd): Adjust.
298
299 * features/aarch64.c: Re-generated.
300 * features/arc-arcompact.c: Re-generated.
301 * features/arc-v2.c: Re-generated.
302 * features/arm/arm-with-iwmmxt.c: Re-generated.
303 * features/arm/arm-with-m.c: Re-generated.
304 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
305 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
306 * features/arm/arm-with-neon.c: Re-generated.
307 * features/arm/arm-with-vfpv2.c: Re-generated.
308 * features/arm/arm-with-vfpv3.c: Re-generated.
309 * features/i386/amd64-avx-avx512.c: Re-generated.
310 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
311 * features/i386/amd64-avx.c: Re-generated.
312 * features/i386/amd64-avx-linux.c: Re-generated.
313 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
314 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
315 * features/i386/amd64-avx-mpx.c: Re-generated.
316 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
317 * features/i386/amd64.c: Re-generated.
318 * features/i386/amd64-linux.c: Re-generated.
319 * features/i386/amd64-mpx.c: Re-generated.
320 * features/i386/amd64-mpx-linux.c: Re-generated.
321 * features/i386/i386-avx-avx512.c: Re-generated.
322 * features/i386/i386-avx-avx512-linux.c: Re-generated.
323 * features/i386/i386-avx.c: Re-generated.
324 * features/i386/i386-avx-linux.c: Re-generated.
325 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
326 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
327 * features/i386/i386-avx-mpx.c: Re-generated.
328 * features/i386/i386-avx-mpx-linux.c: Re-generated.
329 * features/i386/i386.c: Re-generated.
330 * features/i386/i386-linux.c: Re-generated.
331 * features/i386/i386-mmx.c: Re-generated.
332 * features/i386/i386-mmx-linux.c: Re-generated.
333 * features/i386/i386-mpx.c: Re-generated.
334 * features/i386/i386-mpx-linux.c: Re-generated.
335 * features/i386/x32-avx-avx512.c: Re-generated.
336 * features/i386/x32-avx-avx512-linux.c: Re-generated.
337 * features/i386/x32-avx.c: Re-generated.
338 * features/i386/x32-avx-linux.c: Re-generated.
339 * features/i386/x32.c: Re-generated.
340 * features/i386/x32-linux.c: Re-generated.
341 * features/microblaze.c: Re-generated.
342 * features/microblaze-with-stack-protect.c: Re-generated.
343 * features/mips64-dsp-linux.c: Re-generated.
344 * features/mips64-linux.c: Re-generated.
345 * features/mips-dsp-linux.c: Re-generated.
346 * features/mips-linux.c: Re-generated.
347 * features/nds32.c: Re-generated.
348 * features/nios2.c: Re-generated.
349 * features/nios2-linux.c: Re-generated.
350 * features/rs6000/powerpc-32.c: Re-generated.
351 * features/rs6000/powerpc-32l.c: Re-generated.
352 * features/rs6000/powerpc-403.c: Re-generated.
353 * features/rs6000/powerpc-403gc.c : Re-generated.
354 * features/rs6000/powerpc-405.c: Re-generated.
355 * features/rs6000/powerpc-505.c: Re-generated.
356 * features/rs6000/powerpc-601.c: Re-generated.
357 * features/rs6000/powerpc-602.c: Re-generated.
358 * features/rs6000/powerpc-603.c: Re-generated.
359 * features/rs6000/powerpc-604.c: Re-generated.
360 * features/rs6000/powerpc-64.c: Re-generated.
361 * features/rs6000/powerpc-64l.c: Re-generated.
362 * features/rs6000/powerpc-7400.c: Re-generated.
363 * features/rs6000/powerpc-750.c: Re-generated.
364 * features/rs6000/powerpc-860.c: Re-generated.
365 * features/rs6000/powerpc-altivec32.c: Re-generated.
366 * features/rs6000/powerpc-altivec32l.c: Re-generated.
367 * features/rs6000/powerpc-altivec64.c: Re-generated.
368 * features/rs6000/powerpc-altivec64l.c: Re-generated.
369 * features/rs6000/powerpc-cell32l.c: Re-generated.
370 * features/rs6000/powerpc-cell64l.c: Re-generated.
371 * features/rs6000/powerpc-e500.c: Re-generated.
372 * features/rs6000/powerpc-e500l.c: Re-generated.
373 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
374 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
375 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
376 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
377 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
378 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
379 * features/rs6000/powerpc-vsx32.c: Re-generated.
380 * features/rs6000/powerpc-vsx32l.c: Re-generated.
381 * features/rs6000/powerpc-vsx64.c: Re-generated.
382 * features/rs6000/powerpc-vsx64l.c: Re-generated.
383 * features/rs6000/rs6000.c: Re-generated.
384 * features/s390-linux32.c: Re-generated.
385 * features/s390-linux32v1.c: Re-generated.
386 * features/s390-linux32v2.c: Re-generated.
387 * features/s390-linux64.c: Re-generated.
388 * features/s390-linux64v1.c: Re-generated.
389 * features/s390-linux64v2.c: Re-generated.
390 * features/s390-te-linux64.c: Re-generated.
391 * features/s390-tevx-linux64.c: Re-generated.
392 * features/s390-vx-linux64.c: Re-generated.
393 * features/s390x-linux64.c: Re-generated.
394 * features/s390x-linux64v1.c: Re-generated.
395 * features/s390x-linux64v2.c: Re-generated.
396 * features/s390x-te-linux64.c: Re-generated.
397 * features/s390x-tevx-linux64.c: Re-generated.
398 * features/s390x-vx-linux64.c: Re-generated.
399 * features/sparc/sparc32-solaris.c: Re-generated.
400 * features/sparc/sparc64-solaris.c: Re-generated.
401 * features/tic6x-c62x.c: Re-generated.
402 * features/tic6x-c62x-linux.c: Re-generated.
403 * features/tic6x-c64x.c: Re-generated.
404 * features/tic6x-c64x-linux.c: Re-generated.
405 * features/tic6x-c64xp.c: Re-generated.
406 * features/tic6x-c64xp-linux.c: Re-generated.
407
35b4818d
YQ
4082017-07-26 Yao Qi <yao.qi@linaro.org>
409
410 * i386-linux-tdep.c (i386_linux_read_description): New function.
411 (i386_linux_core_read_description): Call
412 i386_linux_read_description.
413 * i386-linux-tdep.h (i386_linux_read_description): Declare.
414 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
415 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
416 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
417 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
418 * x86-linux-nat.c (x86_linux_read_description): Call
419 i386_linux_read_description.
420
8e2141c6
YQ
4212017-07-26 Yao Qi <yao.qi@linaro.org>
422
423 * NEWS: Mention it.
424 * features/Makefile (%.c: %.xml): Pass the xml file name to
425 command "maint print c-tdesc".
426 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
427 name from 'arg'.
428
b468ff4c
YQ
4292017-07-26 Yao Qi <yao.qi@linaro.org>
430
431 * target-descriptions.c (target_desc): Add ctor and dtor. Do
432 in-class initialization.
433 (tdesc_create_feature): Call new instead of XCNEW.
434 (free_target_description): Ue delete.
435
b9c0e1b4
JB
4362017-07-25 John Baldwin <jhb@FreeBSD.org>
437
438 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
439
a04b5337
YQ
4402017-07-25 Yao Qi <yao.qi@linaro.org>
441
442 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
443 constant.
444 (amd64_x32_init_abi): Likewise.
445 * amd64-tdep.h (amd64_init_abi): Update declaration.
446 (amd64_x32_init_abi): Likewise.
447
02ad7fc2
YQ
4482017-07-25 Yao Qi <yao.qi@linaro.org>
449
450 PR tdep/21717
451 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
452 condition for FPSCR.
453 (arm_linux_store_inferior_registers): Likewise.
454
b6f48cb0
TT
4552017-07-22 Tom Tromey <tom@tromey.com>
456
457 * break-catch-syscall.c (struct catch_syscall_inferior_data)
458 <syscalls_counts>: Now a std::vector.
459 (get_catch_syscall_inferior_data): Use "new".
460 (catch_syscall_inferior_data_cleanup): Use "delete".
461 (insert_catch_syscall, remove_catch_syscall)
462 (clear_syscall_counts): Update.
463
e12c9b7a
TT
4642017-07-22 Tom Tromey <tom@tromey.com>
465
466 * break-catch-syscall.c (syscall_catchpoint)
467 <syscalls_to_be_caught>: Now a std::vector<int>
468 (~syscall_catchpoint): Remove.
469 (insert_catch_syscall, remove_catch_syscall)
470 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
471 (print_mention_catch_syscall, print_recreate_catch_syscall):
472 Update.
473 (create_syscall_event_catchpoint): Change type of "filter"
474 parameter.
475 (catch_syscall_split_args): Return a std::vector.
476 (catch_syscall_command_1, catching_syscall_number_1): Update.
477
4fa8aeac
TT
4782017-07-22 Tom Tromey <tom@tromey.com>
479
480 * break-catch-throw.c (struct exception_catchpoint)
481 <exception_rx>: Now a std::string.
482 (~exception_catchpoint): Remove.
483 (print_one_detail_exception_catchpoint): Update.
484 (handle_gnu_v3_exceptions): Change type of except_rx.
485 (extract_exception_regexp): Return a std::string.
486 (catch_exception_command_1): Update.
487
f746a154
TT
4882017-07-22 Tom Tromey <tom@tromey.com>
489
490 * break-catch-sig.c (gdb_signal_type): Remove typedef.
491 (struct signal_catchpoint) <signals_to_be_caught>: Now a
492 std::vector.
493 <catch_all>: Now a bool.
494 (~signal_catchpoint): Remove.
495 (signal_catchpoint_insert_location)
496 (signal_catchpoint_remove_location)
497 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
498 (signal_catchpoint_print_mention)
499 (signal_catchpoint_print_recreate)
500 (signal_catchpoint_explains_signal): Update.
501 (create_signal_catchpoint): Change type of "filter" and
502 "catch_all".
503 (catch_signal_split_args): Return a std::vector. Change type of
504 "catch_all".
505 (catch_signal_command): Update.
506
47e77640
PA
5072017-07-20 Pedro Alves <palves@redhat.com>
508
509 * ada-lang.c (ada_language_defn): Make extern.
510 (_initialize_ada_language): Remove add_language call.
511 * c-lang.c (c_language_defn, cplus_language_defn)
512 (asm_language_defn, minimal_language_defn): Make extern.
513 (_initialize_c_language): Delete.
514 * completer.c (compare_cstrings): Delete, moved to utils.h.
515 * d-lang.c (d_language_defn): Make extern.
516 (_initialize_d_language): Remove add_language calls.
517 * defs.h (enum language): Add comment.
518 * f-lang.c (f_language_defn): Make extern.
519 (_initialize_f_language): Remove add_language call.
520 * go-lang.c (go_language_defn): Make extern.
521 (_initialize_go_language): Remove add_language call.
522 * language.c: Include <algorithm>.
523 (languages): Redefine as const array.
524 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
525 (set_language_command): Handle "local". Use for-range loop.
526 (set_language): Remove loop.
527 (language_enum): Rewrite.
528 (language_def, language_str): Remove loops.
529 (add_language): Delete.
530 (add_set_language_command): New, based on add_languages.
531 (skip_language_trampoline): Adjust.
532 (local_language_defn): Delete.
533 (language_gdbarch_post_init): Adjust.
534 (_initialize_language): Remove add_language calls. Call
535 add_set_language_command.
536 * language.h (add_language): Delete.
537 (auto_language_defn)
538 (unknown_language_defn, minimal_language_defn, ada_language_defn)
539 (asm_language_defn, c_language_defn, cplus_language_defn)
540 (d_language_defn, f_language_defn, go_language_defn)
541 (m2_language_defn, objc_language_defn, opencl_language_defn)
542 (pascal_language_defn, rust_language_defn): Declare.
543 * m2-lang.c (m2_language_defn): Make extern.
544 (_initialize_m2_language): Remove add_language call.
545 * objc-lang.c (objc_language_defn): Make extern.
546 (_initialize_objc_language): Remove add_language call.
547 * opencl-lang.c (opencl_language_defn): Make extern.
548 (_initialize_opencl_language): Remove add_language call.
549 * p-lang.c (pascal_language_defn): Make extern.
550 (_initialize_pascal_language): Delete.
551 * rust-lang.c (rust_language_defn): Make extern.
552 (_initialize_rust_language): Delete.
553 * utils.h (compare_cstrings): New static inline function.
554
edb0c9cb
PA
5552017-07-20 Pedro Alves <palves@redhat.com>
556
557 * ada-lang.c (ada_to_fixed_type_1): Adjust.
558 (get_var_value): Constify parameters.
559 (get_int_var_value): Change prototype.
560 (to_fixed_range_type): Adjust.
561 * ada-lang.h (get_int_var_value): Change prototype.
562
a778f165
PA
5632017-07-20 Pedro Alves <palves@redhat.com>
564
565 * dwarf2read.c (dw2_lookup_symbol): Use
566 SYMBOL_MATCHES_SEARCH_NAME.
567 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
568
42edd901
PA
5692017-07-20 Pedro Alves <palves@redhat.com>
570
571 * block.c (block_iter_name_step, block_iter_name_first)
572 (block_iter_name_next): Delete.
573 (block_lookup_symbol_primary): Adjust to use
574 dict_iter_match_first/dict_iter_match_next.
575 * block.h (block_iter_name_first, block_iter_name_next): Delete
576 declarations.
577 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
578 dict_iter_match_first/dict_iter_match_next.
579
cf325299
PA
5802017-07-20 Pedro Alves <palves@redhat.com>
581
582 * cp-support.c (cp_find_first_component_aux): Add missing case for
583 end of string.
584
c5ed0576
DB
5852017-07-18 David Blaikie <dblaikie@gmail.com>
586
587 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
588 of dwo_cu's dwo_file.
589
27841e76
YQ
5902017-07-18 Yao Qi <yao.qi@linaro.org>
591
592 * remote.c (store_registers_using_G): Remove one line comment.
593
cfb7e58b
YQ
5942017-07-18 Yao Qi <yao.qi@linaro.org>
595
596 * regcache.c (regcache_cpy): Simplify it.
597 (regcache::cpy_no_passthrough): Remove it.
598 * regcache.h (cpy_no_passthrough): Remove it.
599 (regcache_dup, regcache_cpy): Update comments.
600
386535dd
PA
6012017-07-18 Pedro Alves <palves@redhat.com>
602
603 * remote-sim.c (sim_command_completer): Adjust to work with a
604 completion_tracker instead of a VEC.
605
c45ec17c
PA
6062017-07-17 Pedro Alves <palves@redhat.com>
607
608 * completer.c (complete_source_filenames): New function.
609 (complete_address_and_linespec_locations): New function.
610 (location_completer): Use complete_address_and_linespec_locations.
611 (completion_tracker::build_completion_result): Honor the tracker's
612 request to suppress append.
613 * completer.h (completion_tracker::suppress_append_ws)
614 (completion_tracker::set_suppress_append_ws): New methods.
615 (completion_tracker::m_suppress_append_ws): New field.
616 (complete_source_filenames): New declaration.
617 * linespec.c (linespec_complete_what): New.
618 (struct ls_parser) <complete_what, completion_word,
619 completion_quote_char, completion_quote_end, completion_tracker>:
620 New fields.
621 (string_find_incomplete_keyword_at_end): New.
622 (linespec_lexer_lex_string): Record quote char. If in completion
623 mode, don't throw.
624 (linespec_lexer_consume_token): Advance the completion word point.
625 (linespec_lexer_peek_token): Save/restore completion info.
626 (save_stream_and_consume_token): New.
627 (set_completion_after_number): New.
628 (linespec_parse_basic): Set what to complete next depending on
629 token. Handle function and label completions specially.
630 (parse_linespec): Disable objc shortcut in completion mode. Set
631 what to complete next depending on token type. Skip keyword if in
632 completion mode.
633 (complete_linespec_component, linespec_complete): New.
634 * linespec.h (linespec_complete): Declare.
635
be966d42
PA
6362017-07-17 Pedro Alves <palves@redhat.com>
637
638 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
639 Handle 'operator<' / 'operator<<'.
640
a2459270
PA
6412017-07-17 Pedro Alves <palves@redhat.com>
642
643 * completer.c (collect_explicit_location_matches): Handle
644 MATCH_LABEL.
645 (convert_explicit_location_to_linespec): New, factored out from
646 ...
647 (convert_explicit_location_to_sals): ... this.
648 (complete_label): New.
649 (linespec_complete_label, find_label_symbols_in_block): New.
650 (find_label_symbols): Add completion_mode parameter and adjust to
651 call find_label_symbols_in_block.
652 * linespec.h (linespec_complete_label): Declare.
653
c6756f62
PA
6542017-07-17 Pedro Alves <palves@redhat.com>
655
656 * ada-lang.c (ada_collect_symbol_completion_matches): Add
657 complete_symbol_mode parameter.
658 * cli/cli-cmds.c (complete_command): Get the completion result out
659 of the handle_brkchars tracker if used a custom word point.
660 * completer.c: Include "linespec.h".
661 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
662 (advance_to_expression_complete_word_point): New.
663 (completion_tracker::completes_to_completion_word): New.
664 (complete_files_symbols): Pass down
665 complete_symbol_mode::EXPRESSION.
666 (explicit_options, probe_options): New.
667 (collect_explicit_location_matches): Complete on the
668 explictit_loc->foo instead of word. Use
669 linespec_complete_function. Handle MATCH_LINE. Handle offering
670 keyword and options completions.
671 (backup_text_ptr): Delete.
672 (skip_keyword): New.
673 (complete_explicit_location): Remove 'word' parameter. Add
674 language, quoted_arg_start and quoted_arg_end parameters.
675 Rewrite, parsing left to right.
676 (location_completer): Rewrite.
677 (location_completer_handle_brkchars): New function.
678 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
679 (enum complete_line_internal_reason): Adjust comments.
680 (completion_tracker::discard_completions): New.
681 (completer_handle_brkchars_func_for_completer): Handle
682 location_completer.
683 (gdb_custom_word_point_brkchars)
684 (gdb_org_rl_basic_quote_characters): New.
685 (gdb_completion_word_break_characters_throw)
686 (completion_find_completion_word): Handle trackers that use a
687 custom word point.
688 (completion_tracker::advance_custom_word_point_by): New.
689 (completion_tracker::build_completion_result): Don't rely on
690 readline appending the quote char.
691 (gdb_rl_attempted_completion_function_throw): Handle trackers that
692 use a custom word point.
693 (gdb_rl_attempted_completion_function): Restore
694 rl_basic_quote_characters.
695 * completer.h (class completion_tracker): Extend intro comment.
696 (completion_tracker::set_quote_char)
697 (completion_tracker::quote_char)
698 (completion_tracker::set_use_custom_word_point)
699 (completion_tracker::use_custom_word_point)
700 (completion_tracker::custom_word_point)
701 (completion_tracker::set_custom_word_point)
702 (completion_tracker::advance_custom_word_point_by)
703 (completion_tracker::completes_to_completion_word)
704 (completion_tracker::discard_completions): New methods.
705 (completion_tracker::m_quote_char)
706 (completion_tracker::m_use_custom_word_point)
707 (completion_tracker::m_custom_word_point): New fields.
708 (advance_to_expression_complete_word_point): Declare.
709 * f-lang.c (f_collect_symbol_completion_matches): Add
710 complete_symbol_mode parameter.
711 * language.h (struct language_defn)
712 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
713 parameter.
714 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
715 (linespec_complete_function): New function.
716 (linespec_lexer_lex_keyword): Adjust.
717 * linespec.h (linespec_keywords, linespec_complete_function): New
718 declarations.
719 * location.c (find_end_quote): New function.
720 (explicit_location_lex_one): Add explicit_completion_info
721 parameter. Save quoting info. Don't throw if being called for
722 completion. Don't handle Ada operators here.
723 (is_cp_operator, skip_op_false_positives, first_of)
724 (explicit_location_lex_one_function): New function.
725 (string_to_explicit_location): Replace 'dont_throw' parameter with
726 an explicit_completion_info pointer parameter. Handle it. Don't
727 use explicit_location_lex_one to lex function names. Use
728 explicit_location_lex_one_function instead.
729 * location.h (struct explicit_completion_info): New.
730 (string_to_explicit_location): Replace 'dont_throw' parameter with
731 an explicit_completion_info pointer parameter.
732 * symtab.c (default_collect_symbol_completion_matches_break_on):
733 Add complete_symbol_mode parameter. Handle LINESPEC mode.
734 (default_collect_symbol_completion_matches)
735 (collect_symbol_completion_matches): Add complete_symbol_mode
736 parameter.
737 (collect_symbol_completion_matches_type): Pass down
738 complete_symbol_mode::EXPRESSION.
739 (collect_file_symbol_completion_matches): Add complete_symbol_mode
740 parameter. Handle LINESPEC mode.
741 * symtab.h (complete_symbol_mode): New.
742 (default_collect_symbol_completion_matches_break_on)
743 (default_collect_symbol_completion_matches)
744 (collect_symbol_completion_matches)
745 (collect_file_symbol_completion_matches): Add complete_symbol_mode
746 parameter.
747
1d550c82
PA
7482017-07-17 Pedro Alves <palves@redhat.com>
749
750 * utils.c (enum class strncmp_iw_mode): New.
751 (strcmp_iw): Rename to ...
752 (strncmp_iw_with_mode): ... this. Add string2_len and mode
753 parameters. Handle them.
754 (strncmp_iw): New.
755 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
756 * utils.h (strncmp_iw): Declare.
757 (strcmp_iw): Move describing comments here.
758
8090b426
PA
7592017-07-17 Pedro Alves <palves@redhat.com>
760
761 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
762 CP_OPERATOR_STR.
763 * c-typeprint.c (is_type_conversion_operator): Use
764 CP_OPERATOR_STR.
765 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
766 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
767 CP_OPERATOR_LEN.
768 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
769 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
770 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
771 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
772 CP_OPERATOR_STR.
773 * location.c: Include "cp-support.h".
774 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
775 CP_OPERATOR_STR.
776 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
777 CP_OPERATOR_LEN.
778
6a2c1b87
PA
7792017-07-17 Pedro Alves <palves@redhat.com>
780
781 * cli/cli-cmds.c (complete_command): Use a completion tracker
782 along with completion_find_completion_word for handle_brkchars
783 phase.
784 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
785 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
786 (struct gdb_rl_completion_word_info): New.
787 (gdb_rl_find_completion_word): New.
788 (completion_find_completion_word): New.
789 * completer.h (completion_find_completion_word): Declare.
790
eb3ff9a5
PA
7912017-07-17 Pedro Alves <palves@redhat.com>
792
793 * ada-lang.c (symbol_completion_match): Adjust comments.
794 (symbol_completion_add): Replace vector parameter with
795 completion_tracker parameter. Use it.
796 (ada_make_symbol_completion_list): Rename to...
797 (ada_collect_symbol_completion_matches): ... this. Add
798 completion_tracker parameter and use it.
799 (ada_language_defn): Adjust.
800 * break-catch-syscall.c (catch_syscall_completer): Adjust
801 prototype and work with completion_tracker instead of VEC.
802 * breakpoint.c (condition_completer): Adjust prototype and work
803 with completion_tracker instead of VEC.
804 * c-lang.c (c_language_defn, cplus_language_defn)
805 (asm_language_defn, minimal_language_defn): Adjust to renames.
806 * cli/cli-cmds.c (complete_command): Rework using
807 completion_tracker. Catch exceptions when completing.
808 * cli/cli-decode.c (integer_unlimited_completer)
809 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
810 with completion_tracker instead of VEC.
811 * command.h (struct completion_tracker): Forward declare.
812 (completer_ftype, completer_handle_brkchars_ftype): Change
813 types.
814 (complete_on_cmdlist, complete_on_enum): Adjust.
815 * completer.c: Include <algorithm>.
816 (struct gdb_completer_state): New.
817 (current_completion): New global.
818 (readline_line_completion_function): Delete.
819 (noop_completer, filename_completer)
820 (filename_completer_handle_brkchars, complete_files_symbols)
821 (linespec_location_completer): Adjust to work with a
822 completion_tracker instead of a VEC.
823 (string_or_empty): New.
824 (collect_explicit_location_matches): Adjust to work with a
825 completion_tracker instead of a VEC.
826 (explicit_location_completer): Rename to ...
827 (complete_explicit_location): ... this and adjust to work with a
828 completion_tracker instead of a VEC.
829 (location_completer): Adjust to work with a completion_tracker
830 instead of a VEC.
831 (add_struct_fields): Adjust to work with a completion_list instead
832 of VEC.
833 (expression_completer): Rename to ...
834 (complete_expression): ... this and adjust to work with a
835 completion_tracker instead of a VEC. Use complete_files_symbols.
836 (expression_completer): Reimplement on top of complete_expression.
837 (symbol_completer): Adjust to work with a completion_tracker
838 instead of a VEC.
839 (enum complete_line_internal_reason): Add describing comments.
840 (complete_line_internal_normal_command): Adjust to work with a
841 completion_tracker instead of a VEC.
842 (complete_line_internal): Rename to ...
843 (complete_line_internal_1): ... this and adjust to work with a
844 completion_tracker instead of a VEC. Assert TEXT is NULL in the
845 handle_brkchars phase.
846 (new_completion_tracker): Delete.
847 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
848 complete_line_internal_1.
849 (free_completion_tracker): Delete.
850 (INITIAL_COMPLETION_HTAB_SIZE): New.
851 (completion_tracker::completion_tracker)
852 (completion_tracker::~completion_tracker): New.
853 (maybe_add_completion): Delete.
854 (completion_tracker::maybe_add_completion)
855 (completion_tracker::add_completion)
856 (completion_tracker::add_completions): New.
857 (throw_max_completions_reached_error): Delete.
858 (complete_line): Adjust to work with a completion_tracker instead
859 of a VEC. Don't create a completion_tracker_t or check for max
860 completions here.
861 (command_completer, command_completer_handle_brkchars)
862 (signal_completer, reg_or_group_completer_1)
863 (reg_or_group_completer, default_completer_handle_brkchars):
864 Adjust to work with a completion_tracker.
865 (gdb_completion_word_break_characters_throw): New.
866 (gdb_completion_word_break_characters): Reimplement.
867 (line_completion_function): Delete.
868 (completion_tracker::recompute_lowest_common_denominator)
869 (expand_preserving_ws)
870 (completion_tracker::build_completion_result)
871 (completion_result::completion_result)
872 (completion_result::completion_result)
873 (completion_result::~completion_result)
874 (completion_result::completion_result)
875 (completion_result::release_match_list, compare_cstrings)
876 (completion_result::sort_match_list)
877 (completion_result::reset_match_list)
878 (gdb_rl_attempted_completion_function_throw)
879 (gdb_rl_attempted_completion_function): New.
880 * completer.h (completion_list, struct completion_result)
881 (class completion_tracker): New.
882 (complete_line): Add completion_tracker parameter.
883 (readline_line_completion_function): Delete.
884 (gdb_rl_attempted_completion_function): New.
885 (noop_completer, filename_completer, expression_completer)
886 (location_completer, symbol_completer, command_completer)
887 (signal_completer, reg_or_group_completer): Update prototypes.
888 (completion_tracker_t, new_completion_tracker)
889 (make_cleanup_free_completion_tracker): Delete.
890 (enum maybe_add_completion_enum): Delete.
891 (maybe_add_completion): Delete.
892 (throw_max_completions_reached_error): Delete.
893 * corefile.c (complete_set_gnutarget): Adjust to work with a
894 completion_tracker instead of a VEC.
895 * cp-abi.c (cp_abi_completer): Adjust to work with a
896 completion_tracker instead of a VEC.
897 * d-lang.c (d_language_defn): Adjust.
898 * disasm.c (disassembler_options_completer): Adjust to work with a
899 completion_tracker instead of a VEC.
900 * f-lang.c (f_make_symbol_completion_list): Rename to ...
901 (f_collect_symbol_completion_matches): ... this. Adjust to work
902 with a completion_tracker instead of a VEC.
903 (f_language_defn): Adjust.
904 * go-lang.c (go_language_defn): Adjust.
905 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
906 Adjust to work with a completion_tracker instead of a VEC.
907 * infrun.c (handle_completer): Likewise.
908 * interps.c (interpreter_completer): Likewise.
909 * interps.h (interpreter_completer): Likewise.
910 * language.c (unknown_language_defn, auto_language_defn)
911 (local_language_defn): Adjust.
912 * language.h (language_defn::la_make_symbol_completion_list):
913 Rename to ...
914 (language_defn::la_collect_symbol_completion_matches): ... this
915 and adjust to work with a completion_tracker instead of a VEC.
916 * m2-lang.c (m2_language_defn): Adjust.
917 * objc-lang.c (objc_language_defn): Adjust.
918 * opencl-lang.c (opencl_language_defn): Adjust.
919 * p-lang.c (pascal_language_defn): Adjust.
920 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
921 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
922 with a completion_tracker.
923 * rust-lang.c (rust_language_defn): Adjust.
924 * symtab.c (free_completion_list, do_free_completion_list)
925 (return_val, completion_tracker): Delete.
926 (completion_list_add_name, completion_list_add_symbol)
927 (completion_list_add_msymbol, completion_list_objc_symbol)
928 (completion_list_add_fields, add_symtab_completions): Add
929 completion_tracker parameter and use it.
930 (default_make_symbol_completion_list_break_on_1): Rename to...
931 (default_collect_symbol_completion_matches_break_on): ... this.
932 Add completion_tracker parameter and use it instead of allocating
933 a completion tracker here.
934 (default_make_symbol_completion_list_break_on): Delete old
935 implementation.
936 (default_make_symbol_completion_list): Delete.
937 (default_collect_symbol_completion_matches): New.
938 (make_symbol_completion_list): Delete.
939 (collect_symbol_completion_matches): New.
940 (make_symbol_completion_type): Rename to ...
941 (collect_symbol_completion_matches_type): ... this. Add
942 completion_tracker parameter and use it instead of VEC.
943 (make_file_symbol_completion_list_1): Rename to...
944 (collect_file_symbol_completion_matches): ... this. Add
945 completion_tracker parameter and use it instead of VEC.
946 (make_file_symbol_completion_list): Delete.
947 (add_filename_to_list): Use completion_list instead of a VEC.
948 (add_partial_filename_data::list): Now a completion_list.
949 (make_source_files_completion_list): Work with a completion_list
950 instead of a VEC.
951 * symtab.h: Include "completer.h".
952 (default_make_symbol_completion_list_break_on)
953 (default_make_symbol_completion_list, make_symbol_completion_list)
954 (make_symbol_completion_type, make_file_symbol_completion_list)
955 (make_source_files_completion_list): Delete.
956 (default_collect_symbol_completion_matches_break_on)
957 (default_collect_symbol_completion_matches)
958 (collect_symbol_completion_matches)
959 (collect_symbol_completion_matches_type)
960 (collect_file_symbol_completion_matches)
961 (make_source_files_completion_list): New.
962 * top.c (init_main): Don't install a rl_completion_entry_function
963 hook. Install a rl_attempted_completion_function hook instead.
964 * tui/tui-layout.c (layout_completer): Adjust to work with a
965 completion_tracker.
966 * tui/tui-regs.c (tui_reggroup_completer):
967 * tui/tui-win.c (window_name_completer, focus_completer)
968 (winheight_completer): Adjust to work with a completion_tracker.
969 * value.c: Include "completer.h".
970 (complete_internalvar): Adjust to work with a completion_tracker.
971 * value.h (complete_internalvar): Likewise.
972
6e1dbf8c
PA
9732017-07-17 Pedro Alves <palves@redhat.com>
974
975 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
976 renames.
977 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
978 comments to completer_ftype's declaration.
979 <completer_handle_brkchars>: Change type to
980 completer_handle_brkchars_ftype.
981 * command.h (completer_ftype): Add describing comment and give
982 names to parameters.
983 (completer_ftype_void): Rename to ...
984 (completer_handle_brkchars_ftype) ... this. Add describing comment.
985 (set_cmd_completer_handle_brkchars): Adjust.
986 * completer.c (filename_completer_handle_brkchars): New function.
987 (complete_line_internal_normal_command): New function, factored
988 out from ...
989 (complete_line_internal): ... here.
990 (command_completer_handle_brkchars)
991 (default_completer_handle_brkchars)
992 (completer_handle_brkchars_func_for_completer): New functions.
993 * completer.h (set_gdb_completion_word_break_characters): Delete
994 declaration.
995 (completer_handle_brkchars_func_for_completer): New declaration.
996 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
997 completer_handle_brkchars_func_for_completer.
998
78b13106
PA
9992017-07-17 Pedro Alves <palves@redhat.com>
1000
1001 * completer.c (symbol_completer): New function, based on
1002 make_symbol_completion_list_fn.
1003 * completer.h (symbol_completer): New declaration.
1004 * guile/scm-cmd.c (cmdscm_completers): Adjust.
1005 * python/py-cmd.c (completers): Adjust.
1006 * symtab.c (make_symbol_completion_list_fn): Delete.
1007 * symtab.h (make_symbol_completion_list_fn): Delete.
1008 * cli/cli-decode.c (add_cmd): Adjust.
1009
bbf2f4df
PA
10102017-07-17 Pedro Alves <palves@redhat.com>
1011
1012 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
1013 * dwarf2read.c: Include "filename-seen-cache.h".
1014 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
1015 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
1016 * filename-seen-cache.c: New file.
1017 * filename-seen-cache.h: New file.
1018 * symtab.c: Include "filename-seen-cache.h".
1019 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
1020 (create_filename_seen_cache, clear_filename_seen_cache)
1021 (delete_filename_seen_cache, filename_seen): Delete, parts moved
1022 to filename-seen-cache.h/filename-seen-cache.c.
1023 (output_source_filename, sources_info)
1024 (maybe_add_partial_symtab_filename)
1025 (make_source_files_completion_list): Adjust to use
1026 filename_seen_cache.
1027
330cdd98
PA
10282017-07-17 Pedro Alves <palves@redhat.com>
1029
1030 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
1031 fields.
1032 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
1033 dwarf2_debug_sections*)): New.
1034 (dwarf2_per_objfile::dwarf2_per_objfile(const
1035 dwarf2_per_objfile&)): Declare as deleted.
1036 (dwarf2_per_objfile::operator=): Declare as deleted.
1037 (dwarf2_per_objfile::dwarf2_per_objfile)
1038 (dwarf2_per_objfile::~dwarf2_per_objfile)
1039 (dwarf2_per_objfile::free_cached_comp_units): New.
1040 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
1041 ctor. Call dwarf2_per_objfile's ctor manually.
1042 (dwarf2_locate_sections): Deleted/refactored as ...
1043 (dwarf2_per_objfile::locate_sections): ... this new method.
1044 (free_cached_comp_units): Defer to
1045 dwarf2_per_objfile::free_cached_comp_units.
1046 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
1047
8880f2a9
TT
10482017-07-14 Tom Tromey <tom@tromey.com>
1049
1050 PR rust/21764:
1051 * rust-exp.y (convert_ast_to_expression): Add "want_type"
1052 parameter.
1053 <UNOP_SIZEOF>: Split into separate case.
1054 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
1055
65547233
TT
10562017-07-14 Tom Tromey <tom@tromey.com>
1057
1058 PR rust/21763:
1059 * symtab.c (symbol_matches_domain): Add language_rust to special
1060 case.
1061 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
1062 treat LOC_TYPEDEF symbols as variables.
1063
8f14146e
PA
10642017-07-14 Pedro Alves <palves@redhat.com>
1065
1066 * symtab.c (make_file_symbol_completion_list_1): Iterate over
1067 symtabs matching all symtabs with SRCFILE as file name instead of
1068 only considering the first hit, with lookup_symtab.
1069
2347965c
SM
10702017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
1073 operator_name parameters.
1074 (gen_expr): Update function call.
1075
40f4af28
SM
10762017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
1079 parameter.
1080 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
1081 Likewise.
1082 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
1083 parameter, use agent_expr::gdbarch instead, update function
1084 calls.
1085 (locexpr_tracepoint_var_ref): Likewise.
1086 (loclist_tracepoint_var_ref): Likewise.
1087 * ax-gdb.c (gen_trace_static_fields): Likewise.
1088 (gen_traced_pop): Likewise.
1089 (gen_frame_args_address): Likewise.
1090 (gen_frame_locals_address): Likewise.
1091 (gen_var_ref): Likewise.
1092 (gen_struct_ref_recursive): Likewise.
1093 (gen_static_field): Likewise.
1094 (gen_maybe_namespace_elt): Likewise.
1095 (gen_expr): Likewise.
1096 (gen_trace_for_var): Likewise.
1097 (gen_trace_for_expr): Likewise.
1098 (gen_trace_for_return_address): Likewise.
1099
053f8057
SM
11002017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1101
1102 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
1103 parameter.
1104 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
1105
6661ad48
SM
11062017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1107
1108 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
1109 from ax, update calls.
1110 (gen_usual_arithmetic): Likewise.
1111 (gen_integral_promotions): Likewise.
1112 (gen_bitfield_ref): Likewise.
1113 (gen_primitive_field): Likewise.
1114 (gen_struct_ref_recursive): Likewise.
1115 (gen_struct_ref): Likewise.
1116 (gen_maybe_namespace_elt): Likewise.
1117 (gen_struct_elt_for_reference): Likewise.
1118 (gen_namespace_elt): Likewise.
1119 (gen_aggregate_elt_ref): Likewise.
1120 (gen_expr): Get gdbarch from ax, update calls.
1121 (gen_expr_binop_rest): Likewise.
1122
c55a47e7
PA
11232017-07-13 Pedro Alves <palves@redhat.com>
1124
1125 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
1126 as default tdesc.
1127 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
1128 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
1129 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
1130 tdesc_amd64_linux as default tdesc. Get final tdesc from the
1131 tdep.
1132 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
1133 Get final tdesc from the tdep.
1134 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
1135 default tdesc.
1136 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1137 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1138 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
1139 Use it as default tdesc.
1140 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
1141 down to amd_init_abi. No longer handle fallback tdesc here.
1142 * amd64-tdep.h (tdesc_x32): Declare.
1143 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
1144 parameter.
1145 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
1146 as default tdesc.
1147
55efceab
AA
11482017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1149
1150 * s390-linux-tdep.c (s390_process_record): Add support for
1151 instructions new in arch12.
1152
0aa37b65
JB
11532017-07-11 John Baldwin <jhb@FreeBSD.org>
1154
1155 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
1156 PT_GETFSBASE and PT_GETGSBASE.
1157 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
1158 PT_SETGSBASE.
1159
48aeef91
JB
11602017-07-11 John Baldwin <jhb@FreeBSD.org>
1161
1162 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
1163 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
1164 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
1165 those rules.
1166 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
1167 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
1168 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
1169 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
1170 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
1171 * features/i386/amd64.xml: Add 64bit-segments.xml.
1172 * features/i386/amd64-avx-avx512.c: Regenerated.
1173 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
1174 * features/i386/amd64-avx-mpx.c: Regenerated.
1175 * features/i386/amd64-avx.c: Regenerated.
1176 * features/i386/amd64-mpx.c: Regenerated.
1177 * features/i386/amd64.c: Regenerated.
1178 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
1179 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
1180 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
1181 * regformats/i386/amd64-avx.dat: Regenerated.
1182 * regformats/i386/amd64-mpx.dat: Regenerated.
1183 * regformats/i386/amd64.dat: Regenerated.
1184
77c501bc
YQ
11852017-07-10 Yao Qi <yao.qi@linaro.org>
1186
1187 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1188 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1189
6dc8d757
AK
11902017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
1191
1192 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
1193 unsetenv.
1194 * gnulib/aclocal.m4: Regenerate.
1195 * gnulib/config.in: Regenerate.
1196 * gnulib/configure: Regenerate.
1197 * gnulib/import/Makefile.am: Regenerate.
1198 * gnulib/import/Makefile.in: Regenerate.
1199 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1200 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1201 * gnulib/import/m4/environ.m4: New file.
1202 * gnulib/import/m4/setenv.m4: New file.
1203 * gnulib/import/setenv.c: New file.
1204 * gnulib/import/unsetenv.c: New file.
1205
266934d1
SM
12062017-07-09 Simon Marchi <simon.marchi@ericsson.com>
1207
1208 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
1209 address when op is DW_OP_addr.
1210
03278692
TT
12112017-07-09 Tom Tromey <tom@tromey.com>
1212
1213 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
1214 check and apply to outer type.
1215
4b654465
JB
12162017-07-07 John Baldwin <jhb@FreeBSD.org>
1217
1218 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
1219 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
1220 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
1221 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
1222
2af9fc44
JB
12232017-07-07 John Baldwin <jhb@FreeBSD.org>
1224
1225 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
1226
382b69bb
JB
12272017-07-07 John Baldwin <jhb@FreeBSD.org>
1228
1229 * corelow.c (get_core_siginfo): Remove.
1230 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
1231 instead of get_core_siginfo.
1232 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
1233 * gdbarch.h: Re-generate.
1234 * gdbarch.c: Re-generate.
1235 * linux-tdep.c (linux_core_xfer_siginfo): New.
1236 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
1237
6e5eab33
JB
12382017-07-07 John Baldwin <jhb@FreeBSD.org>
1239
1240 * corelow.c (thread_section_name): Move to ...
1241 * gdbcore.h (thread_section_name): ... here.
1242
929edea9
JB
12432017-07-07 John Baldwin <jhb@FreeBSD.org>
1244
1245 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
1246 (struct siginfo32): New.
1247 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
1248 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
1249 via ptrace(PT_LWPINFO).
1250
762c974a
JB
12512017-07-07 John Baldwin <jhb@FreeBSD.org>
1252
1253 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
1254 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
1255 (fbsd_get_siginfo_type): New.
1256 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
1257 (_initialize_fbsd_tdep): New.
1258
33c5cd75
DB
12592017-07-06 David Blaikie <dblaikie@gmail.com>
1260
1261 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
1262 a singular dwo_unit*) to support multiple CUs in the same way that
1263 multiple TUs are supported.
1264 (create_cus_hash_table): Replace create_dwo_cu with a function for
1265 parsing multiple CUs from a DWO file.
1266 (open_and_init_dwo_file): Use create_cus_hash_table rather than
1267 create_dwo_cu.
1268 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
1269 htab_find, rather than comparing the signature to a singleton CU in
1270 the dwo_file.
1271
8455d262
PA
12722017-07-06 Pedro Alves <palves@redhat.com>
1273
1274 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
1275
4da3eb35
PA
12762017-07-04 Pedro Alves <palves@redhat.com>
1277
1278 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
1279 * gdbtypes.h (TYPE_STATIC): Delete.
1280 (struct fn_field) <is_public, is_abstract, is_static, is_final,
1281 is_synchronized, is_native>: Delete.
1282 <dummy>: Bump.
1283 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
1284 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
1285 (TYPE_FN_FIELD_ABSTRACT): Delete.
1286
5bfd255c
SM
12872017-07-03 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * buffer.h (buffer_finish): Fix spelling mistakes.
1290
25c54127
EZ
12912017-07-01 Eli Zaretskii <eliz@gnu.org>
1292
1293 * .dir-locals.el: Automatically switch to C-style comments in
1294 versions of Emacs that support the feature.
1295
dc4bde35
SDJ
12962017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
1297 Pedro Alves <palves@redhat.com>
1298
1299 PR cli/21688
1300 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
1301 (process_next_line): New variable 'inline_cmd'.
1302 Adjust 'if' clauses for "python", "compile" and "guile" to use
1303 'command_name_equals' and check for '!inline_cmd'.
1304
51ed89aa
SDJ
13052017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
1306
1307 PR cli/21688
1308 * cli/cli-script.c (command_name_equals_not_inline): New function.
1309 (process_next_line): Adjust 'if' clauses for "python", "compile"
1310 and "guile" to use command_name_equals_not_inline.
1311
eb17d413
PA
13122017-06-29 Pedro Alves <palves@redhat.com>
1313
1314 * completer.c (expression_completer): Call
1315 linespec_location_completer instead of location_completer.
1316
195bcdd5
PA
13172017-06-29 Pedro Alves <palves@redhat.com>
1318
1319 * completer.c (expression_completer): Remove code that recomputes
1320 'text' from 'word'.
1321
adc764e7
YQ
13222017-06-29 Yao Qi <yao.qi@linaro.org>
1323
1324 * regformats/regdat.sh: Generate code with
1325 "ifndef IN_PROCESS_AGENT".
1326
6e75794e
PA
13272017-06-28 Pedro Alves <palves@redhat.com>
1328
1329 * command.h: Include "common/scoped_restore.h".
1330
bc491f2e
YQ
13312017-06-28 Yao Qi <yao.qi@linaro.org>
1332
1333 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
1334 instead of obstack_grow.
1335
41664b45
DG
13362017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
1337
1338 PR gdb/21337
1339 * symfile.c (reread_symbols): Call objfiles_changed just before
1340 read_symbols.
1341
6da67eb1
PA
13422017-06-27 Pedro Alves <palves@redhat.com>
1343
1344 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
1345 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
1346 (completion_list_add_symbol, completion_list_add_msymbol):
1347 ... these new functions.
1348 (add_symtab_completions)
1349 (default_make_symbol_completion_list_break_on_1): Adjust.
1350
23732b1e
PA
13512017-06-27 Pedro Alves <palves@redhat.com>
1352
1353 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
1354 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
1355 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
1356 dtor.
1357 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
1358 'storage_obstack' field an auto_obstack. In-class initialize all
1359 non-bitfield fields. Make minsyms_read bool.
1360 * symfile.c (read_symbols): Adjust.
1361
a4d1e79a
AH
13622017-06-27 Alan Hayward <alan.hayward@arm.com>
1363
1364 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
1365 (gdbsim_store_register): Likewise.
1366
8268c778
PA
13672017-06-27 Pedro Alves <palves@redhat.com>
1368
1369 * c-exp.y (name_obstack): Now an auto_obstack.
1370 (yylex): Use auto_obstack::clear.
1371 (c_parse): Use auto_obstack::clear instead of reinitializing and
1372 freeing the obstack.
1373 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
1374 * d-exp.y (name_obstack): Now an auto_obstack.
1375 (yylex): Use auto_obstack::clear.
1376 (d_parse): Use auto_obstack::clear instead of reinitializing and
1377 freeing the obstack.
1378 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
1379 auto_obstack.
1380 * dwarf2read.c (create_addrmap_from_index)
1381 (dwarf2_build_psymtabs_hard)
1382 (update_enumeration_type_from_children): Likewise.
1383 * gdb_obstack.h (auto_obstack): New type.
1384 * go-exp.y (name_obstack): Now an auto_obstack.
1385 (build_packaged_name): Use auto_obstack::clear.
1386 (go_parse): Use auto_obstack::clear instead of reinitializing and
1387 freeing the obstack.
1388 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
1389 auto_obstack.
1390 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
1391 * rust-exp.y (work_obstack): Now an auto_obstack.
1392 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
1393 reinitializing and freeing the obstack.
1394 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
1395 (host_char_to_target): Use auto_obstack.
1396 * utils.h (make_cleanup_obstack_free): Delete declaration.
1397 * valprint.c (generic_emit_char, generic_printstr): Use
1398 auto_obstack.
1399
db665f42
SM
14002017-06-27 Simon Marchi <simon.marchi@ericsson.com>
1401
1402 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
1403 thread.
1404 (darwin_init_thread_list): Don't update dummy thread.
1405 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
1406
873c0814
SM
14072017-06-26 Simon Marchi <simon.marchi@ericsson.com>
1408
1409 * record-full.c (netorder16): Remove.
1410
8b5a7a6e
SM
14112017-06-26 Simon Marchi <simon.marchi@ericsson.com>
1412
1413 * common/diagnostics.h: Define macros for GCC.
1414 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
1415 * common/vec.h: Include diagnostics.h.
1416 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
1417 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
1418 warning.
1419
d1435379
SM
14202017-06-26 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
1423 New macro.
1424 * ada-lex.l: Ignore deprecated register warnings.
1425
cc75e0fd
SM
14262017-06-25 Simon Marchi <simon.marchi@ericsson.com>
1427
1428 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
1429 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
1430
07809eaf
SM
14312017-06-25 Simon Marchi <simon.marchi@ericsson.com>
1432
1433 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
1434 its own line.
1435
f076f034
SM
14362017-06-25 Simon Marchi <simon.marchi@ericsson.com>
1437
1438 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
1439
0dd5cbc5
AH
14402017-06-23 Alan Hayward <alan.hayward@arm.com>
1441
1442 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
1443 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
1444 (xtensa_register_read_masked): Likewise.
1445
d4c6ce5b
SDJ
14462017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
1447
1448 * common/environ.c (gdb_environ::unset): Update comment.
1449
16892a03
AH
14502017-06-22 Alan Hayward <alan.hayward@arm.com>
1451
1452 * python/py-unwind.c (pyuw_sniffer): Allocate space for
1453 registers.
1454
d7dcbefc
AH
14552017-06-22 Alan Hayward <alan.hayward@arm.com>
1456
1457 * record-full.c (record_full_exec_insn): Use byte_vector.
1458
b30ff123
YQ
14592017-06-22 Yao Qi <yao.qi@linaro.org>
1460
1461 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
1462 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
1463
4fa847d7
AH
14642017-06-22 Alan Hayward <alan.hayward@arm.com>
1465
1466 * remote.c (cached_reg): Move from here...
1467 * regcache.h (cached_reg): ...to here.
1468 * python/py-unwind.c (struct reg_info): Remove.
1469 (cached_frame_info): Use cached_reg_t.
1470 (pyuw_prev_register): Likewise.
1471 (pyuw_sniffer): Use cached_reg_t and allocate registers.
1472 (pyuw_dealloc_cache): Free all registers.
1473
f4906a9a
PA
14742017-06-22 Pedro Alves <palves@redhat.com>
1475 Simon Marchi <simon.marchi@ericsson.com>
1476
1477 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
1478 warning.
1479 * common/diagnostics.h: New file.
1480
b45a1208
PA
14812017-06-22 Pedro Alves <palves@redhat.com>
1482
1483 * common/agent.h: Add include guards.
1484
e4da2c61
SM
14852017-06-21 Simon Marchi <simon.marchi@ericsson.com>
1486
1487 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
1488 talk about addressable units instead of bytes.
1489
96160d60
SDJ
14902017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1491
1492 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
1493 of '::const_iterator'.
1494
9a6c7d9c
SDJ
14952017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1496
1497 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1498 'unittests/environ-selftests.c'.
1499 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
1500 * charset.c (find_charset_names): Declare object 'iconv_env'.
1501 Update code to use 'iconv_env' object. Remove call to
1502 'free_environ'.
1503 * common/environ.c: Include <utility>.
1504 (make_environ): Delete function.
1505 (free_environ): Delete function.
1506 (gdb_environ::clear): New function.
1507 (gdb_environ::operator=): New function.
1508 (gdb_environ::get): Likewise.
1509 (environ_vector): Delete function.
1510 (set_in_environ): Delete function.
1511 (gdb_environ::set): New function.
1512 (unset_in_environ): Delete function.
1513 (gdb_environ::unset): New function.
1514 (gdb_environ::envp): Likewise.
1515 * common/environ.h: Include <vector>.
1516 (struct gdb_environ): Delete; transform into...
1517 (class gdb_environ): ... this class.
1518 (free_environ): Delete prototype.
1519 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
1520 environ_vector): Likewise.
1521 * infcmd.c (run_command_1): Update code to call
1522 'envp' from 'gdb_environ' class.
1523 (environment_info): Update code to call methods from 'gdb_environ'
1524 class.
1525 (unset_environment_command): Likewise.
1526 (path_info): Likewise.
1527 (path_command): Likewise.
1528 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
1529 (inferior::inferior): Initialize 'environment' using the host's
1530 information.
1531 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
1532 Include "environ.h".
1533 (class inferior) <environment>: Change type from 'struct
1534 gdb_environ' to 'gdb_environ'.
1535 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
1536 methods from 'gdb_environ' class.
1537 * solib.c (solib_find_1): Likewise
1538 * unittests/environ-selftests.c: New file.
1539
75c554cf
YQ
15402017-06-20 Yao Qi <yao.qi@linaro.org>
1541
1542 * features/i386/i386-linux.xml: Exchange the order of including
1543 32bit-linux.xml and 32bit-sse.xml.
1544 * features/i386/i386-linux.c: Regenerated.
1545
72ddacb7
YQ
15462017-06-20 Yao Qi <yao.qi@linaro.org>
1547
1548 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
1549 Delete copy ctor and assignment operator.
1550 (tdesc_type): Likewise.
1551 (tdesc_feature): Likewise.
1552 (tdesc_free_reg): Remove.
1553 (tdesc_create_reg): Use new.
1554 (tdesc_free_type): Remove.
1555 (tdesc_create_vector): Use new.
1556 (tdesc_create_union): Likewise.
1557 (tdesc_create_flags): Likewise.
1558 (tdesc_create_enum): Likewise.
1559 (tdesc_free_feature): Delete.
1560 (free_target_description): Use delete.
1561
325c9fd4
JB
15622017-06-19 John Baldwin <jhb@FreeBSD.org>
1563
1564 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
1565 registers.
1566
16b7a719
PA
15672017-06-19 Pedro Alves <palves@redhat.com>
1568
1569 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
1570 after gdb::unlinker.
1571
1c8e01c9
SDJ
15722017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
1573
1574 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
1575 gdb_environ to access an environment variable.
1576
ffce45d2
TP
15772017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1578
1579 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
1580 gdb_byte*.
1581
1d4fbac9
SM
15822017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1583
1584 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
1585
8465943a
SM
15862017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1587
1588 * configure: Re-generate.
1589 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
1590
3e019bdc
SM
15912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1592
1593 * configure: Re-generate.
1594 * warning.m4: Pass -Werror to compiler when checking for
1595 supported warning flags.
1596
cf0dd6f0
SM
15972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1598
1599 * Makefile.in (COMPILE.pre): Add "-x c++".
1600
6f98355c
YQ
16012017-06-16 Alan Hayward <alan.hayward@arm.com>
1602 Pedro Alves <palves@redhat.com>
1603 Yao Qi <yao.qi@linaro.org>
1604
1605 * defs.h (RequireLongest): New.
1606 (extract_integer): Declare function template.
1607 (extract_signed_integer): Remove the declaration, but define it
1608 static inline.
1609 (extract_unsigned_integer): Likewise.
1610 (store_integer): Declare function template.
1611 (store_signed_integer): Remove the declaration, but define it
1612 static inline.
1613 (store_unsigned_integer): Likewise.
1614 * findvar.c (extract_integer): New function template.
1615 (extract_signed_integer): Remove.
1616 (extract_unsigned_integer): Remove.
1617 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
1618 instantiations.
1619 (store_integer): New function template.
1620 (store_signed_integer): Remove.
1621 (store_unsigned_integer): Remove.
1622 (store_integer): Explicit instantiations.
1623 * regcache.c (regcache_raw_read_signed): Update.
1624 (regcache::raw_read): New function.
1625 (regcache::raw_read_signed): Remove.
1626 (regcache::raw_read_unsigned): Remove.
1627 (regcache_raw_read_unsigned): Update.
1628 (regcache_raw_write_unsigned): Update.
1629 (regcache::raw_write_signed): Remove.
1630 (regcache::raw_write): New function.
1631 (regcache_cooked_read_signed): Update.
1632 (regcache::raw_write_unsigned): Remove.
1633 (regcache::cooked_read_signed): Remove.
1634 (regcache_cooked_read_unsigned): Update.
1635 (regcache::cooked_read_unsigned): Remove.
1636 (regcache_cooked_write_signed): Update.
1637 (regcache_cooked_write_unsigned): Update.
1638 * regcache.h (regcache) <raw_read_signed>: Remove.
1639 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
1640 <raw_read, raw_write>: New.
1641 <cooked_read_signed, cooked_write_signed>: Remove.
1642 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
1643 <cooked_read, cooked_write>: New.
1644 * sh64-tdep.c (sh64_pseudo_register_read): Update.
1645 (sh64_pseudo_register_write): Update.
1646
a87dc45a
AK
16472017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
1648
1649 * arc-tdep.c (arc_disassembler_options): New variable.
1650 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
1651 of default_print_insn.
1652 (arc_delayed_print_insn): Set info->section when needed,
1653 use default_print_insn to retrieve a disassembler.
1654
45159d6a
SDJ
16552017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
1656
1657 PR gdb/21574
1658 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
1659 to mention $SHELL and startup-with-shell.
1660
b46c4cf0
MF
16612017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1662
1663 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
1664
6394c606
YQ
16652017-06-14 Yao Qi <yao.qi@linaro.org>
1666
1667 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
1668 default_print_insn instead of print_insn_aarch64.
1669 * arm-tdep.c (gdb_print_insn_arm): Call
1670 default_print_insn instead of print_insn_big_arm
1671 and print_insn_little_arm.
1672 * i386-tdep.c (i386_print_insn): Call default_print_insn
1673 instead of print_insn_i386.
1674 * ia64-tdep.c (ia64_print_insn): Call
1675 default_print_insn instead of print_insn_ia64.
1676 * mips-tdep.c (gdb_print_insn_mips): Call
1677 default_print_insn instead of print_insn_big_mips
1678 and print_insn_little_mips.
1679 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
1680 instead of print_insn_spu.
1681
d5722aa2
PA
16822017-06-14 Pedro Alves <palves@redhat.com>
1683
1684 * ada-lang.c: Include "common/byte-vector.h".
1685 (ada_value_primitive_packed_val): Use gdb::byte_vector.
1686 * charset.c (wchar_iterator::iterate): Resize the vector instead
1687 of reserving it.
1688 * common/byte-vector.h: Include "common/def-vector.h".
1689 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
1690 * cli/cli-dump.c: Include "common/byte-vector.h".
1691 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
1692 * common/byte-vector.h: New file.
1693 * common/def-vector.h: New file.
1694 * common/default-init-alloc.h: New file.
1695 * dwarf2loc.c: Include "common/byte-vector.h".
1696 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
1697 instead of reserving it.
1698 * dwarf2read.c: Include "common/byte-vector.h".
1699 (data_buf::m_vec): Now a gdb::byte_vector.
1700 * gdb_regex.c: Include "common/def-vector.h".
1701 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
1702 * mi/mi-main.c: Include "common/byte-vector.h".
1703 (mi_cmd_data_read_memory): Use gdb::byte_vector.
1704 * printcmd.c: Include "common/byte-vector.h".
1705 (print_scalar_formatted): Use gdb::byte_vector.
1706 * valprint.c: Include "common/byte-vector.h".
1707 (maybe_negate_by_bytes, print_decimal_chars): Use
1708 gdb::byte_vector.
1709
01ec7a27
SM
17102017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1711
1712 * darwin-nat.c: Include "nat/fork-inferior.h".
1713
848d9074
SM
17142017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1715
1716 * configure.nat: Factor out Darwin bits that are not
1717 architecture-specific. Add fork-inferior.o.
1718
3b912944
SM
17192017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1720
1721 * configure.nat: Factor out AIX bits that are not
1722 architecture-specific. Add fork-inferior.o.
1723
55acdf22
AA
17242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1725
1726 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
1727 (read_pieced_value, write_pieced_value): ...here. Reduce to
1728 wrappers that just call rw_pieced_value.
1729
f65e2044
AA
17302017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1731
1732 * dwarf2loc.c (write_pieced_value): When writing the data for a
1733 memory piece, use write_memory_with_notification instead of
1734 write_memory.
1735
23f945bf
AA
17362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1737
1738 * valops.c (read_value_memory): Change embedded_offset to
1739 represent a bit offset instead of a byte offset.
1740 * value.h (read_value_memory): Adjust comment.
1741
f236533e
AA
17422017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1743
1744 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
1745 dest_offset_bits and source_offset_bits.
1746 (write_pieced_value): Likewise.
1747
65d84b76
AA
17482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1749
1750 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
1751 given by DW_OP_bit_piece.
1752 (write_pieced_value): Likewise.
1753
242d31ab
AA
17542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1755
1756 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
1757 some other preparations to the places where sufficient information
1758 is available.
1759 (write_pieced_value): Likewise.
1760
03c8af18
AA
17612017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1762
1763 * dwarf2loc.c (bits_to_bytes): New function.
1764 (read_pieced_value): Fix offset calculations for register pieces
1765 on big-endian targets.
1766 (write_pieced_value): Likewise.
1767
840989c1
AA
17682017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1769
1770 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
1771 (write_pieced_value): Likewise.
1772
359b19bb
AA
17732017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1774
1775 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
1776 transfer the source value's least significant bits, instead of its
1777 lowest-addressed ones. Rename type_len to max_offset.
1778 (read_pieced_value): Mirror above changes to write_pieced_value as
1779 applicable.
1780
07c9ca3b
AA
17812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1782
1783 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
1784 truncate full bytes from dest_offset_bits before using it as an
1785 offset into the buffer.
1786
f1cc9874
AA
17872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1788
1789 * dwarf2loc.c (write_pieced_value): Include transfer size in
1790 byte-wise check.
1791
cdaac320
AA
17922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1793
1794 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
1795 calculation of this_size.
1796
af547a96
AA
17972017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1798
1799 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
1800 when targeting a bit-field.
1801 (write_pieced_value): Likewise.
1802
ddd7882a
AA
18032017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1804
1805 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
1806 (allocate_piece_closure): Drop addr_size parameter.
1807 (dwarf2_evaluate_loc_desc_full): Adjust call to
1808 allocate_piece_closure.
1809
e9352324
AA
18102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1811
1812 PR gdb/21226
1813 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
1814 the LSB end, independent of endianness.
1815
d5d1163e
AA
18162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1817
1818 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
1819 size capping.
1820
032bb6ea
YQ
18212017-06-13 Yao Qi <yao.qi@linaro.org>
1822
1823 * mips-linux-nat.c: Move include features/mips*-linux.c to
1824 mips-linux-tdep.c.
1825 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
1826 to mips-linux-tdep.c.
1827 * mips-linux-tdep.c: Include features/mips*-linux.c
1828 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
1829 functions.
1830 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
1831 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
1832 (tdesc_mips64_dsp_linux): Declare.
1833
f12f6bad
TT
18342017-06-12 Tom Tromey <tom@tromey.com>
1835
1836 * valprint.h (val_print_type_code_int): Remove.
1837 * valprint.c (generic_val_print_int): Always call
1838 val_print_scalar_formatted.
1839 (val_print_type_code_int): Remove.
1840 * printcmd.c (print_scalar_formatted): Handle options->format==0.
1841 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
1842 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
1843 * ada-valprint.c (ada_val_print_num): Use
1844 val_print_scalar_formatted.
1845
d9109c80
TT
18462017-06-12 Tom Tromey <tom@tromey.com>
1847
1848 * printcmd.c (print_scalar_formatted): Unify the two switches.
1849 Don't convert scalars to LONGEST.
1850
4ac0cb1c
TT
18512017-06-12 Tom Tromey <tom@tromey.com>
1852
1853 PR exp/16225:
1854 * valprint.h (print_decimal_chars): Update.
1855 * valprint.c (maybe_negate_by_bytes): New function.
1856 (print_decimal_chars): Add "is_signed" argument.
1857 * printcmd.c (print_scalar_formatted): Update.
1858
30a25466
TT
18592017-06-12 Tom Tromey <tom@tromey.com>
1860
1861 PR exp/16225:
1862 * valprint.h (print_binary_chars, print_hex_chars): Update.
1863 * valprint.c (val_print_type_code_int): Update.
1864 (print_binary_chars): Add "zero_pad" argument.
1865 (emit_octal_digit): New function.
1866 (print_octal_chars): Don't zero-pad.
1867 (print_decimal_chars): Likewise.
1868 (print_hex_chars): Add "zero_pad" argument.
1869 * sh64-tdep.c (sh64_do_fp_register): Update.
1870 * regcache.c (regcache::dump): Update.
1871 * printcmd.c (print_scalar_formatted): Update.
1872 * infcmd.c (default_print_one_register_info): Update.
1873
b3464d03
PA
18742017-06-12 Pedro Alves <palves@redhat.com>
1875 Alan Hayward <alan.hayward@arm.com>
1876
1877 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
1878 (mips_eabi_push_dummy_call): Rename local 'regsize' to
1879 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
1880 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
1881 Assert that abi_regsize bytes fit in 'ref_valbuf'.
1882
4b76cda9
PA
18832017-06-12 Pedro Alves <palves@redhat.com>
1884
1885 * dwarf2read.c (mapped_symtab::data): Now a vector of
1886 symtab_index_entry instead of vector of
1887 std::unique_ptr<symtab_index_entry>. All users adjusted to check
1888 whether an element's name is NULL instead of checking whether the
1889 element itself is NULL.
1890 (find_slot): Change return type. Adjust.
1891 (hash_expand, , add_index_entry, uniquify_cu_indices)
1892 (write_hash_table): Adjust.
1893
e8f8bcb3
PA
18942017-06-12 Pedro Alves <palves@redhat.com>
1895
1896 * dwarf2read.c (recursively_count_psymbols): New function.
1897 (write_psymtabs_to_index): Call it to compute number of psyms and
1898 pass estimate size of psyms_seen to unordered_set's ctor.
1899
70a1152b
PA
19002017-06-12 Pedro Alves <palves@redhat.com>
1901
1902 * dwarf2read.c (write_hash_table): Check if key already exists
1903 before emplacing.
1904
c2f134ac
PA
19052017-06-12 Pedro Alves <palves@redhat.com>
1906
1907 * dwarf2read.c (data_buf::append_space): Rename to...
1908 (data_buf::grow): ... this, and make private. Adjust all callers.
1909 (data_buf::append_uint): New method.
1910 (add_address_entry, write_one_signatured_type)
1911 (write_psymtabs_to_index): Use it.
1912
a81e6d4d
PA
19132017-06-12 Pedro Alves <palves@redhat.com>
1914
1915 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
1916 (file_write (FILE *, const std::vector<Elem>&)): Delete.
1917 (data_buf::file_write): Call ::fwrite directly.
1918
6fd931f2
PA
19192017-06-12 Pedro Alves <palves@redhat.com>
1920
1921 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
1922 std::vector::erase.
1923
bc8f2430
JK
19242017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1925
1926 Code cleanup: C++ify .gdb_index producer.
1927 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
1928 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
1929 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
1930 (create_strtab, add_string): Remove.
1931 (file_write, data_buf): New.
1932 (struct symtab_index_entry): Use std::vector for cu_indices.
1933 (struct mapped_symtab): Use std::vector for data.
1934 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
1935 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
1936 Remove.
1937 (find_slot): Change return type. Update it to the new data structures.
1938 (hash_expand, add_index_entry): Update it to the new data structures.
1939 (offset_type_compare): Remove.
1940 (uniquify_cu_indices): Update it to the new data structures.
1941 (c_str_view, c_str_view_hasher, vector_hasher): New.
1942 (add_indices_to_cpool): Remove.
1943 (write_hash_table): Update it to the new data structures.
1944 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
1945 (eq_psymtab_cu_index): Remove.
1946 (psym_index_map): New typedef.
1947 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
1948 reference and std::unordered_map for cu_index_htab.
1949 (add_address_entry, add_address_entry_worker, write_address_map)
1950 (write_psymbols): Update it to the new data structures.
1951 (write_obstack): Remove.
1952 (struct signatured_type_index_data): Change types_list to a data_buf
1953 reference and psyms_seen to a std::unordered_set reference.
1954 (write_one_signatured_type, recursively_write_psymbols)
1955 (write_psymtabs_to_index): Update it to the new data structures.
1956
c4dcb155
SM
19572017-06-11 Simon Marchi <simon.marchi@ericsson.com>
1958
1959 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
1960 separate-debug-file commands.
1961 * symfile.h (separate_debug_file_debug): New global.
1962 * symfile.c (separate_debug_file_debug): New global.
1963 (separate_debug_file_exists, find_separate_debug_file): Add
1964 debug output.
1965 (_initialize_symfile): Add "set debug separate-debug-file"
1966 command.
1967 * build-id.c (build_id_to_debug_bfd,
1968 find_separate_debug_file_by_buildid): Add debug output.
1969
6d45d4b4
SM
19702017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1971
1972 * gdbarch.sh (displaced_step_free_closure): Remove.
1973 * gdbarch.h, gdbarch.c: Re-generate.
1974 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
1975 displaced_step_free_closure.
1976 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
1977 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
1978 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1979 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
1980 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1981 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
1982 * arch-utils.h (simple_displaced_step_free_closure): Remove.
1983 * arch-utils.c (simple_displaced_step_free_closure): Remove.
1984 * infrun.c (displaced_step_clear): Call xfree instead of
1985 gdbarch_displaced_step_free_closure.
1986
2f91880f
SDJ
19872017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
1988
1989 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
1990 NULL".
1991
b8b6e72f
AH
19922017-06-08 Alan Hayward <alan.hayward@arm.com>
1993
1994 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
1995 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
1996 (mn10300_push_dummy_call): Likewise.
1997
5369082e
AH
19982017-06-08 Alan Hayward <alan.hayward@arm.com>
1999
2000 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
2001
ff4ca5ac
AH
20022017-06-08 Alan Hayward <alan.hayward@arm.com>
2003
2004 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
2005
aefd8b33
SDJ
20062017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2007
2008 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
2009 able to start inferiors using a shell.
2010 (New remote packets): Announce new packet "QStartupWithShell".
2011 * remote.c: Add PACKET_QStartupWithShell.
2012 (extended_remote_create_inferior): Handle new
2013 PACKET_QStartupWithShell.
2014 (remote_protocol_features) <QStartupWithShell>: New entry for
2015 PACKET_QStartupWithShell.
2016 (_initialize_remote): Call "add_packet_config_cmd" for
2017 QStartupShell.
2018
2090129c
SDJ
20192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2020 Pedro Alves <palves@redhat.com>
2021
2022 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
2023 and "nat/fork-inferior.h".
2024 * common/common-inferior.h: New file, with contents from
2025 "gdb/inferior.h".
2026 * commom/common-utils.c: Include "common-utils.h".
2027 (stringify_argv): New function.
2028 * common/common-utils.h (stringify_argv): New prototype.
2029 * configure.nat: Add "fork-inferior.o" as a dependency for
2030 "*linux*", "fbsd*" and "nbsd*" hosts.
2031 * corefile.c (get_exec_file): Update comment.
2032 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
2033 instead of "startup_inferior".
2034 (darwin_create_inferior): Call "add_thread_silent" after
2035 "fork_inferior".
2036 * fork-child.c: Cleanup unnecessary includes.
2037 (SHELL_FILE): Move to "common/common-fork-child.c".
2038 (environ): Likewise.
2039 (exec_wrapper): Initialize.
2040 (get_exec_wrapper): New function.
2041 (breakup_args): Move to "common/common-fork-child.c"; rename to
2042 "breakup_args_for_exec".
2043 (escape_bang_in_quoted_argument): Move to
2044 "common/common-fork-child.c".
2045 (saved_ui): New variable.
2046 (prefork_hook): New function.
2047 (postfork_hook): Likewise.
2048 (postfork_child_hook): Likewise.
2049 (gdb_startup_inferior): Likewise.
2050 (fork_inferior): Move to "common/common-fork-child.c". Update
2051 function to support gdbserver.
2052 (startup_inferior): Likewise.
2053 * gdbcore.h (get_exec_file): Remove declaration.
2054 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
2055 instead of "startup_inferior". Call "add_thread_silent" after
2056 "fork_inferior".
2057 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
2058 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
2059 instead of "startup_inferior". Call "add_thread_silent" after
2060 "fork_inferior".
2061 * inferior.h: Include "common-inferior.h".
2062 (trace_start_error): Move to "common/common-utils.h".
2063 (trace_start_error_with_name): Likewise.
2064 (fork_inferior): Move prototype to "nat/fork-inferior.h".
2065 (startup_inferior): Likewise.
2066 (gdb_startup_inferior): New prototype.
2067 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
2068 * nat/fork-inferior.h: New file.
2069 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
2070 instead of "startup_inferior". Call "add_thread_silent" after
2071 "fork_inferior".
2072 * target.h (target_terminal_init): Move prototype to
2073 "target/target.h".
2074 (target_terminal_inferior): Likewise.
2075 (target_terminal_ours): Likewise.
2076 * target/target.h (target_terminal_init): New prototype, moved
2077 from "target.h".
2078 (target_terminal_inferior): Likewise.
2079 (target_terminal_ours): Likewise.
2080 * utils.c (gdb_flush_out_err): New function.
2081
043a4934
SDJ
20822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2083
2084 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
2085 * common/common-gdbthread.h: New file, with parts from
2086 "gdb/gdbthread.h".
2087 * gdbthread.h: Include "common-gdbthread.h".
2088 (switch_to_thread): Moved to "common/common-gdbthread.h".
2089
15652511
SDJ
20902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2091
2092 * Makefile.in (SFILES): Add "common/job-control.c".
2093 (HFILES_NO_SRCDIR): Add "common/job-control.h".
2094 (COMMON_OBS): Add "job-control.o".
2095 * common/job-control.c: New file, with contents from
2096 "gdb/inflow.c".
2097 * common/job-control.h: New file, with contents from "terminal.h".
2098 * fork-child.c: Include "job-control.h".
2099 * inflow.c: Include "job-control.h".
2100 (gdb_setpgid): Move to "common/common-inflow.c".
2101 (_initialize_inflow): Move setting of "job_control" to
2102 "handle_job_control".
2103 * terminal.h (job_control): Moved to "common/common-terminal.h".
2104 (gdb_setpgid): Likewise.
2105 * top.c: Include "job_control.h".
2106 * utils.c: Likewise.
2107 (job_control): Moved to "job-control.c".
2108
2d7cc5c7
PA
21092017-06-07 Pedro Alves <palves@redhat.com>
2110
2111 * Makefile.in (SFILES): Add gdb_regex.c.
2112 (COMMON_OBS): Add gdb_regex.o.
2113 * ada-lang.c (ada_add_standard_exceptions)
2114 (ada_add_exceptions_from_frame, name_matches_regex)
2115 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
2116 parameter type to compiled_regex. Adjust.
2117 (ada_exceptions_list): Use compiled_regex.
2118 * break-catch-throw.c (exception_catchpoint::pattern): Now a
2119 std::unique_ptr<compiled_regex>.
2120 (exception_catchpoint::~exception_catchpoint): Remove regfree
2121 call.
2122 (check_status_exception_catchpoint): Adjust to use compiled_regex.
2123 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
2124 * breakpoint.c (solib_catchpoint::compiled): Now a
2125 std::unique_ptr<compiled_regex>.
2126 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
2127 (check_status_catch_solib): Adjust to use compiled_regex.
2128 (add_solib_catchpoint): Adjust to use compiled_regex.
2129 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
2130 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
2131 compiled_regex reference. Adjust to use it.
2132 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
2133 declaration. Include "gdb_regex.h".
2134 (apropos_cmd): Change regex parameter to compiled_regex reference.
2135 * gdb_regex.c: New file.
2136 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
2137 declarations.
2138 (class compiled_regex): New.
2139 * linux-tdep.c: Include "common/gdb_optional.h".
2140 (struct mapping_regexes): New, factored out from
2141 mapping_is_anonymous_p, and adjusted to use compiled_regex.
2142 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
2143 gdb::optional and remove cleanups. Adjust to compiled_regex.
2144 * probe.c: Include "common/gdb_optional.h".
2145 (collect_probes): Use compiled_regex and gdb::optional and remove
2146 cleanups.
2147 * skip.c: Include "common/gdb_optional.h".
2148 (skiplist_entry::compiled_function_regexp): Now a
2149 gdb::optional<compiled_regex>.
2150 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
2151 (free_skiplist_entry): Remove regfree call.
2152 (compile_skip_regexp, skip_rfunction_p): Adjust to use
2153 compiled_regex and gdb::optional.
2154 * symtab.c: Include "common/gdb_optional.h".
2155 (search_symbols): Use compiled_regex and gdb::optional.
2156 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
2157 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
2158 to gdb_regex.c.
2159
50d6adef
AH
21602017-06-07 Alan Hayward <alan.hayward@arm.com>
2161
2162 * regcache.c (regcache::save): Avoid buffer use.
2163 (regcache::dump): Likewise.
2164
4a8a33c8
AH
21652017-06-07 Alan Hayward <alan.hayward@arm.com>
2166
2167 * sh-tdep.c (sh_pseudo_register_read): Remove
2168 MAX_REGISTER_SIZE.
2169 (sh_pseudo_register_write): Likewise.
2170 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
2171 (sh64_pseudo_register_write): Likewise
2172
d1be909e
AH
21732017-06-07 Alan Hayward <alan.hayward@arm.com>
2174
2175 * aarch64-tdep.c (aarch64_store_return_value): Use
2176 V_REGISTER_SIZE.
2177 (aarch64_pseudo_read_value): Likewise.
2178 (aarch64_pseudo_write): Likewise.
2179
f4a65042
YQ
21802017-06-06 Yao Qi <yao.qi@linaro.org>
2181
2182 * regformats/regdef.h (set_register_cache): Remove the
2183 declaration.
2184
9f7fb0aa
AH
21852017-06-06 Alan Hayward <alan.hayward@arm.com>
2186
2187 * frame.c (frame_unwind_register_signed): Use
2188 frame_unwind_register_value.
2189
e1e01040
PA
21902017-06-06 Pedro Alves <palves@redhat.com>
2191
2192 PR breakpoints/21553
2193 * breakpoint.c (create_breakpoints_sal_default)
2194 (init_breakpoint_sal, create_breakpoint_sal): Use
2195 gdb::unique_xmalloc_ptr for string parameters.
2196 (create_breakpoint): Constify 'extra_string' and 'cond_string'
2197 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
2198 (base_breakpoint_create_breakpoints_sal)
2199 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
2200 (strace_marker_create_breakpoints_sal)
2201 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
2202 string parameters.
2203 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
2204 gdb::unique_xmalloc_ptr for string parameters.
2205 (create_breakpoint): Constify 'extra_string' and 'cond_string'
2206 parameters.
2207
fbe654c8
AH
22082017-06-06 Alan Hayward <alan.hayward@arm.com>
2209
2210 * alpha-tdep.c (alpha_register_to_value): Use
2211 get_frame_register_value.
2212 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
2213
ae0d01d6
AH
22142017-06-06 Alan Hayward <alan.hayward@arm.com>
2215
2216 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
2217 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
2218 (ia64_value_to_register): Likewise.
2219 (ia64_extract_return_value): Likewise.
2220 (ia64_store_return_value): Likewise.
2221 (ia64_push_dummy_call): Likewise.
2222
49cf576c
JB
22232017-06-04 Joel Brobecker <brobecker@adacore.com>
2224
2225 GDB 8.0 released.
2226
26b6a6ab
SM
22272017-06-03 Simon Marchi <simon.marchi@ericsson.com>
2228
2229 * x86-linux-nat.c (struct arch_lwp_info): Remove.
2230
22827c51
SM
22312017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
2232
2233 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
2234 parameter.
2235 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
2236
0e05cf3a
SM
22372017-06-02 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * event-loop.c (poll_timers): Unallocate timer using delete
2240 instead of xfree.
2241
c1fc2657
SM
22422017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
2243
2244 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
2245 (struct breakpoint) <~breakpoint>: New.
2246 (struct watchpoint): Inherit from breakpoint.
2247 <~watchpoint>: New.
2248 <base>: Remove.
2249 (struct tracepoint): Inherit from breakpoint.
2250 <base>: Remove.
2251 * breakpoint.c (longjmp_breakpoint_ops): Remove.
2252 (struct longjmp_breakpoint): Inherit from breakpoint.
2253 <~longjmp_breakpoint>: New.
2254 <base>: Remove.
2255 (new_breakpoint_from_type): Remove casts.
2256 (watchpoint_in_thread_scope): Remove reference to base field.
2257 (watchpoint_del_at_next_stop): Likewise.
2258 (update_watchpoint): Likewise.
2259 (watchpoint_check): Likewise.
2260 (bpstat_check_watchpoint): Likewise.
2261 (set_longjmp_breakpoint): Likewise.
2262 (struct fork_catchpoint): Inherit from breakpoint.
2263 <base>: Remove.
2264 (struct solib_catchpoint): Inherit from breakpoint.
2265 <~solib_catchpoint>: New.
2266 <base>: Remove.
2267 (dtor_catch_solib): Change to ...
2268 (solib_catchpoint::~solib_catchpoint): ... this.
2269 (breakpoint_hit_catch_solib): Remove reference to base field.
2270 (add_solib_catchpoint): Likewise.
2271 (create_fork_vfork_event_catchpoint): Likewise.
2272 (struct exec_catchpoint): Inherit from breakpoint.
2273 <~exec_catchpoint>: New.
2274 <base>: Remove.
2275 (dtor_catch_exec): Change to ...
2276 (exec_catchpoint::~exec_catchpoint): ... this.
2277 (dtor_watchpoint): Change to ...
2278 (watchpoint::~watchpoint): ... this.
2279 (watch_command_1): Remove reference to base field.
2280 (catch_exec_command_1): Likewise.
2281 (base_breakpoint_dtor): Change to ...
2282 (breakpoint::~breakpoint): ... this.
2283 (base_breakpoint_ops): Remove dtor field value.
2284 (longjmp_bkpt_dtor): Change to ...
2285 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
2286 (strace_marker_create_breakpoints_sal): Remove reference to base
2287 field.
2288 (delete_breakpoint): Don't manually call breakpoint destructor.
2289 (create_tracepoint_from_upload): Remove reference to base field.
2290 (trace_pass_set_count): Likewise.
2291 (initialize_breakpoint_ops): Don't initialize
2292 momentary_breakpoint_ops, don't set dtors.
2293 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
2294 <~ada_catchpoint>: New.
2295 <base>: Remove.
2296 (create_excep_cond_exprs): Remove reference to base field.
2297 (dtor_exception): Change to ...
2298 (ada_catchpoint::~ada_catchpoint): ... this.
2299 (dtor_catch_exception): Remove.
2300 (dtor_catch_exception_unhandled): Remove.
2301 (dtor_catch_assert): Remove.
2302 (create_ada_exception_catchpoint): Remove reference to base
2303 field.
2304 (initialize_ada_catchpoint_ops): Don't set dtors.
2305 * break-catch-sig.c (struct signal_catchpoint): Inherit from
2306 breakpoint.
2307 <~signal_catchpoint>: New.
2308 <base>: Remove.
2309 (signal_catchpoint_dtor): Change to ...
2310 (signal_catchpoint::~signal_catchpoint): ... this.
2311 (create_signal_catchpoint): Remove reference to base field.
2312 (initialize_signal_catchpoint_ops): Don't set dtor.
2313 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
2314 from breakpoint.
2315 <~syscall_catchpoint>: New.
2316 <base>: Remove.
2317 (dtor_catch_syscall): Change to ...
2318 (syscall_catchpoint::~syscall_catchpoint): ... this.
2319 (create_syscall_event_catchpoint): Remove reference to base
2320 field.
2321 (initialize_syscall_catchpoint_ops): Don't set dtor.
2322 * break-catch-throw.c (struct exception_catchpoint): Inherit
2323 from breakpoint.
2324 <~exception_catchpoint>: New.
2325 <base>: Remove.
2326 (dtor_exception_catchpoint): Change to ...
2327 (exception_catchpoint::~exception_catchpoint): ... this.
2328 (handle_gnu_v3_exceptions): Remove reference to base field.
2329 (initialize_throw_catchpoint_ops): Don't set dtor.
2330 * ctf.c (ctf_get_traceframe_address): Remove reference to base
2331 field.
2332 * remote.c (remote_get_tracepoint_status): Likewise.
2333 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
2334 * tracefile.c (tracefile_fetch_registers): Likewise.
2335 * tracepoint.c (actions_command): Likewise.
2336 (validate_actionline): Likewise.
2337 (tfind_1): Likewise.
2338 (get_traceframe_location): Likewise.
2339 (find_matching_tracepoint_location): Likewise.
2340 (parse_tracepoint_status): Likewise.
2341 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
2342
3b0871f4
SM
23432017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
2344
2345 * breakpoint.c (struct longjmp_breakpoint): New struct.
2346 (is_tracepoint_type): Change return type to bool.
2347 (is_longjmp_type): New function.
2348 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
2349 (set_raw_breakpoint_without_location): Use
2350 new_breakpoint_from_type.
2351 (set_raw_breakpoint): Likewise.
2352
a5e364af
SM
23532017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
2354
2355 * breakpoint.c (new_breakpoint_from_type): New function.
2356 (create_breakpoint_sal): Use new_breakpoint_from_type and
2357 unique_ptr.
2358 (create_breakpoint): Likewise.
2359
ae3b3f34
SM
23602017-05-31 Simon Marchi <simon.marchi@ericsson.com>
2361
2362 * memattr.c (mem_info_command): Rename to ...
2363 (info_mem_command): ... this.
2364 (mem_enable_command): Rename to ...
2365 (enable_mem_command): ... this.
2366 (mem_disable_command): Rename to ...
2367 (disable_mem_command): ... this.
2368 (mem_delete_command): Rename to ...
2369 (delete_mem_command): ... this.
2370 (_initialize_mem): Adjust function names.
2371
13ace077
MM
23722017-05-31 Markus Metzger <markus.t.metzger@intel.com>
2373
2374 * btrace.c (handle_pt_insn_events): New.
2375 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
2376 STATUS. Split into this and ...
2377 (handle_pt_insn_event_flags): ... this.
2378
c56ccc05
MM
23792017-05-31 Markus Metzger <markus.t.metzger@intel.com>
2380
2381 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
2382 and struct pt_insn.resynced.
2383 * configure: Regenerated.
2384 * config.in: Regenerated.
2385
08c3f6d2
TW
23862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2387
2388 * btrace.c (ftrace_find_call_by_number): New function.
2389 (ftrace_new_function): Store objects, not pointers.
2390 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
2391 ftrace_new_gap, ftrace_update_function,
2392 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
2393 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
2394 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
2395 btrace_ends_with_single_insn, btrace_call_get): Account for
2396 btrace_thread_info::functions now storing objects.
2397 * btrace.h (struct btrace_thread_info): Add constructor.
2398 (struct btrace_thread_info) <functions>: Make std::vector.
2399 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
2400 Initialize with default values.
2401 * record-btrace.c (record_btrace_frame_sniffer): Account for
2402 btrace_thread_info::functions now storing objects.
2403
8ffd39f2
TW
24042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2405
2406 * btrace.c: Remove typedef bfun_s.
2407 (ftrace_new_gap): Directly add gaps to the list of gaps.
2408 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
2409 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
2410 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
2411 instead of gdb VEC.
2412
4aeb0dfc
TW
24132017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2414
2415 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
2416 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
2417 with btrace_thread_info::next_segment and
2418 btrace_thread_info::prev_segment.
2419 * btrace.h: Remove struct btrace_func_link.
2420 (struct btrace_function): Replace pair of function segment pointers
2421 with pair of indices.
2422 * python/py-record-btrace.c (btpy_call_prev_sibling,
2423 btpy_call_next_sibling): Replace references to
2424 btrace_thread_info::segment with btrace_thread_info::next_segment and
2425 btrace_thread_info::prev_segment.
2426 * record-btrace.c (record_btrace_frame_this_id): Use
2427 btrace_find_call_by_number.
2428
eb8f2b9c
TW
24292017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2430
2431 * btrace.c (ftrace_new_function, ftrace_fixup_level,
2432 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
2433 btrace_insn_next, btrace_insn_prev): Remove references to
2434 btrace_thread_info::flow.
2435 * btrace.h (struct btrace_function): Remove FLOW.
2436
42bfe59e
TW
24372017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2438
2439 * btrace.c (ftrace_find_call_by_number): New function.
2440 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
2441 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
2442 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
2443 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
2444 index.
2445 * btrace.h (struct btrace_function): Turn UP into an index.
2446 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
2447 as an index.
2448 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
2449 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
2450 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
2451
b54b03bd
TW
24522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2453
2454 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
2455 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
2456 ftrace_update_function, ftrace_compute_global_level_offset,
2457 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
2458 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
2459 btrace_insn_end, btrace_is_empty): Remove references to
2460 btrace_thread_info::begin and btrace_thread_info::end.
2461 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
2462 (struct btrace_thread_info) <functions>: Adjust comment.
2463 * record-btrace.c (record_btrace_start_replaying): Remove reference to
2464 btrace_thread_info::begin.
2465
8286623c
TW
24662017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2467
2468 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
2469 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
2470 ftrace_update_function): Remove arguments that implicitly were always
2471 BTINFO->END.
2472 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
2473 Don't pass BTINFO->END.
2474
a0f1b963
TW
24752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2476
2477 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
2478 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
2479 btrace_find_insn_by_number): Replace function segment pointer with
2480 index.
2481 (btrace_insn_cmp): Simplify.
2482 * btrace.h: (struct btrace_insn_iterator) Rename index to
2483 insn_index. Replace function segment pointer with index into function
2484 segment vector.
2485 * record-btrace.c (record_btrace_call_history): Replace function
2486 segment pointer use with index.
2487 (record_btrace_frame_sniffer): Retrieve function call segment through
2488 vector.
2489 (record_btrace_set_replay): Remove defunc't safety check.
2490
f158f208
TW
24912017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2492
2493 * btrace.c (btrace_ends_with_single_insn): New function.
2494 (btrace_call_get, btrace_call_number, btrace_call_begin,
2495 btrace_call_end, btrace_call_next, btrace_call_prev,
2496 btrace_find_call_by_number): Use index into call segment vector
2497 instead of pointer.
2498 (btrace_call_cmp): Simplify.
2499 * btrace.h (struct btrace_call_iterator): Replace function call segment
2500 pointer with index into vector.
2501 * record-btrace.c (record_btrace_call_history): Use index instead of
2502 pointer.
2503
521103fd
TW
25042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2505
2506 * btrace.c (btrace_insn_begin, btrace_insn_end,
2507 btrace_find_insn_by_number): Add btinfo to iterator.
2508 * btrace.h (struct btrace_insn_iterator): Add btinfo.
2509
17b89b34
TW
25102017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2511
2512 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
2513 and save pointers directly.
2514 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
2515 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
2516 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
2517 changed signature of functions.
2518 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
2519 (btrace_fetch): Remove code that adds btrace_function pointers to
2520 vector of btrace_functions.
2521 (btrace_clear): Simplify freeing vector of btrace_functions.
2522
2b51eddc
TW
25232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2524
2525 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
2526 Replace VEC_* with std::vector functions.
2527 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
2528 (struct btrace_thread_info)<functions>: Change type to std::vector.
2529
db6be0d5
SM
25302017-05-30 Simon Marchi <simon.marchi@ericsson.com>
2531
2532 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
2533 "Removed targets and native configurations" up. Merge duplicate
2534 "New commands" sub-sections. Add "New options" sub-sections.
2535
b057297a
AH
25362017-05-26 Alan Hayward <alan.hayward@arm.com>
2537
2538 * defs.h (copy_integer_to_size): New declaration.
2539 * findvar.c (copy_integer_to_size): New function.
2540 (do_cint_test): New selftest function.
2541 (copy_integer_to_size_test): Likewise.
2542 (_initialize_findvar): Likewise.
2543 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
2544 (mips_fbsd_collect_reg): Use raw_collect_integer.
2545 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
2546 (mips64_fill_gregset): Use raw_collect_integer
2547 (mips64_fill_fpregset): Use raw_supply_integer.
2548 * regcache.c (regcache::raw_supply_integer): New function.
2549 (regcache::raw_collect_integer): Likewise.
2550 * regcache.h: (regcache::raw_supply_integer): New declaration.
2551 (regcache::raw_collect_integer): Likewise.
2552
b77b02a5
YQ
25532017-05-24 Yao Qi <yao.qi@linaro.org>
2554
2555 * Makefile.in (SFILES): Add gdbarch-selftests.c.
2556 (COMMON_OBS): Add gdbarch-selftests.o.
2557 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
2558 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
2559 * gdbarch-selftests.c: New file.
2560 * regcache.h (regcache) <~regcache>: Mark it virtual if
2561 GDB_SELF_TEST.
2562 <raw_write>: Likewise.
2563
e521e87e
YQ
25642017-05-24 Yao Qi <yao.qi@linaro.org>
2565
2566 * regcache.c (current_regcache): Change it to
2567 regcache::current_regcache.
2568 (regcache_observer_target_changed): Update.
2569 (regcache_thread_ptid_changed): Make it a regcache static
2570 method.
2571 (regcache_thread_ptid_changed): Update.
2572 (class regcache_access): New.
2573 (current_regcache_test): Update.
2574 (_initialize_regcache): Update.
2575 * regcache.h: Include forward_list.
2576 (regcache): Declare regcache_thread_ptid_changed and declare
2577 registers_changed_ptid as friend.
2578
d8e07dda
YQ
25792017-05-24 Yao Qi <yao.qi@linaro.org>
2580
2581 * i387-tdep.c (i387_register_to_value): Use register_size
2582 instead of TYPE_LENGTH.
2583 * m68k-tdep.c (m68k_register_to_value): Likewise.
2584
8c8f9122
YQ
25852017-05-24 Yao Qi <yao.qi@linaro.org>
2586
2587 * i387-tdep.c (i387_convert_register_p): Return false if type
2588 code isn't TYPE_CODE_FLT.
2589
68fce50f
YQ
25902017-05-24 Yao Qi <yao.qi@linaro.org>
2591
2592 * alpha-tdep.c (alpha_convert_register_p): Return true if type
2593 length is 4.
2594 (alpha_register_to_value): Remove type length check.
2595 (alpha_value_to_register): Likewise.
2596
88954b49
YQ
25972017-05-24 Yao Qi <yao.qi@linaro.org>
2598
2599 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
2600 TYPE_CODE_FLT.
2601
e3ec9b69
YQ
26022017-05-24 Yao Qi <yao.qi@linaro.org>
2603
2604 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
2605 TYPE_CODE_FLT or not.
2606
cdd238da
YQ
26072017-05-24 Yao Qi <yao.qi@linaro.org>
2608
2609 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
2610 * avr-tdep.c (avr_gdbarch_init): Likewise.
2611 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
2612 * cris-tdep.c (cris_gdbarch_init): Likewise.
2613 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2614 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
2615 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2616 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
2617 * mep-tdep.c (mep_gdbarch_init): Likewise.
2618 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
2619 * mips-tdep.c (mips_gdbarch_init): Likewise.
2620 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
2621 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2622 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
2623 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
2624 * v850-tdep.c (v850_gdbarch_init): Likewise.
2625
7a3929c4
YQ
26262017-05-24 Yao Qi <yao.qi@linaro.org>
2627
2628 * selftest-arch.c (tests_with_arch): Call registers_changed
2629 and reinit_frame_cache.
2630 * selftest.c (run_self_tests): Likewise.
2631
f4985dba
YQ
26322017-05-24 Yao Qi <yao.qi@linaro.org>
2633
2634 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
2635 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
2636
ab20fa4a
YQ
26372017-05-24 Yao Qi <yao.qi@linaro.org>
2638
2639 * rl78-tdep.c (rl78_gdbarch_init): Don't call
2640 set_gdbarch_print_insn.
2641
f532ab94
YQ
26422017-05-24 Yao Qi <yao.qi@linaro.org>
2643
2644 * h8300-tdep.c (h8300_gdbarch_init): Don't call
2645 set_gdbarch_print_insn.
2646
39503f82
YQ
26472017-05-24 Yao Qi <yao.qi@linaro.org>
2648
2649 * alpha-tdep.c (alpha_gdbarch_init): Don't call
2650 set_gdbarch_print_insn.
2651 * arc-tdep.c (arc_gdbarch_init): Likewise.
2652 * arch-utils.c: include dis-asm.h.
2653 (default_print_insn): New function.
2654 * arch-utils.h (default_print_insn): Declare.
2655 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
2656 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
2657 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
2658 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
2659 * frv-tdep.c (frv_gdbarch_init): Likewise.
2660 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2661 * gdbarch.sh (print_insn): Use default_print_insn.
2662 * gdbarch.c: Regenerated.
2663 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
2664 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
2665 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
2666 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
2667 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2668 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
2669 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
2670 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
2671 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
2672 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
2673 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
2674 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2675 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
2676 * mt-tdep.c (mt_gdbarch_init): Likewise.
2677 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2678 * nios2-tdep.c (nios2_print_insn): Remove.
2679 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
2680 * rx-tdep.c (rx_gdbarch_init): Likewise.
2681 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
2682 * score-tdep.c (score_print_insn): Remove.
2683 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
2684 * sh-tdep.c (sh_gdbarch_init): Likewise.
2685 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
2686 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2687 * tic6x-tdep.c (tic6x_print_insn): Remove.
2688 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
2689 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
2690 * v850-tdep.c (v850_gdbarch_init): Likewise.
2691 * vax-tdep.c (vax_gdbarch_init): Likewise.
2692 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
2693 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
2694
f7241d4f
JB
26952017-05-23 John Baldwin <jhb@FreeBSD.org>
2696
2697 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
2698 (MIPS_FP0_REGNUM): Remove.
2699 (MIPS_FSR_REGNUM): Remove.
2700 (mips_fbsd_supply_fpregs): Use mips_regnum.
2701 (mips_fbsd_supply_gregs): Likewise.
2702 (mips_fbsd_collect_fpregs): Likewise.
2703 (mips_fbsd_collect_gregs): Likewise.
2704
d489d81d
JB
27052017-05-23 John Baldwin <jhb@FreeBSD.org>
2706
2707 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
2708 (getpfpregs_supplies): New function.
2709 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
2710 getfpregs_supplies.
2711 (mips_fbsd_store_inferior_registers): Likewise.
2712
e11b3cdc
PA
27132017-05-22 Pedro Alves <palves@redhat.com>
2714
2715 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
2716 maintainer.
2717
0f068fb5
AH
27182017-05-22 Alan Hayward <alan.hayward@arm.com>
2719
2720 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
2721 (store_register): Likewise.
2722 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
2723 (get_decimal_float_return_value): Likewise.
2724 (do_ppc_sysv_return_value): Likewise.
2725 (ppc64_sysv_abi_push_integer): Likewise.
2726 (ppc64_sysv_abi_push_freg): Likewise.
2727 (ppc64_sysv_abi_return_value_base): Likewise.
2728 (ppc64_sysv_abi_return_value): Likewise.
2729 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
2730 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
2731 * rs6000-nat.c: Likewise.
2732 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
2733 (rs6000_value_to_register): Likewise.
2734 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
2735
e6cf65f2
TT
27362017-05-21 Tom Tromey <tom@tromey.com>
2737
2738 PR rust/21466:
2739 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
2740 arrays as "[T]", not "[T; ]".
2741
43cc5389
TT
27422017-05-19 Tom Tromey <tom@tromey.com>
2743
2744 PR rust/21484:
2745 * rust-lang.c (exp_descriptor_rust): New function.
2746 (rust_language_defn): Use it.
2747 * p-lang.c (pascal_language_defn): Update.
2748 * opencl-lang.c (opencl_language_defn): Update.
2749 * objc-lang.c (objc_language_defn): Update.
2750 * m2-lang.c (m2_language_defn): Update.
2751 * language.h (struct language_defn)
2752 <la_watch_location_expression>: New member.
2753 * language.c (unknown_language_defn, auto_language_defn)
2754 (local_language_defn): Update.
2755 * go-lang.c (go_language_defn): Update.
2756 * f-lang.c (f_language_defn): Update.
2757 * d-lang.c (d_language_defn): Update.
2758 * c-lang.h (c_watch_location_expression): Declare.
2759 * c-lang.c (c_watch_location_expression): New function.
2760 (c_language_defn, cplus_language_defn, asm_language_defn)
2761 (minimal_language_defn): Use it.
2762 * breakpoint.c (watch_command_1): Call
2763 la_watch_location_expression.
2764 * ada-lang.c (ada_language_defn): Update.
2765
7a6e7fcc
RO
27662017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2767
6e7e1744
RO
2768 PR tui/21482
2769 * gdb_curses.h (NOMACROS): Define.
2770 (NCURSES_NOMACROS): Define.
2771
27722017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2773
2774 PR tui/21482
7a6e7fcc
RO
2775 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
2776 arg to char *.
2777 * tui/tui-wingeneral.c (box_win): Likewise.
2778 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
2779 (tui_show_source_line): Likewise.
2780 (tui_show_exec_info_content): Likewise.
2781
1933fd8e
VM
27822017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
2783
2784 * sparc-tdep.c (sparc_structure_return_p)
2785 (sparc_arg_on_registers_p): New functions.
2786 (sparc32_store_arguments): Use them.
2787 * sparc64-tdep.c (sparc64_16_byte_align_p)
2788 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
2789 Handle TYPE_CODE_ARRAY.
2790
21873064
YQ
27912017-05-17 Yao Qi <yao.qi@linaro.org>
2792
2793 * cli/cli-decode.c (add_alias_cmd): New function.
2794 * command.h (add_alias_cmd): Declare.
2795 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
2796 instead call add_alias_cmd.
2797
2b351b19
PA
27982017-05-17 Pedro Alves <palves@redhat.com>
2799
2800 * Makefile.in (nat_extra_makefile_frag): Rename to ...
2801 (nat_makefile_frag): ... this. All references updated.
2802 * configure.ac: Likewise.
2803 * configure.nat: Likewise. Enhance comments.
2804 * configure: Regenerate.
2805
5f2ad7a3
RO
28062017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2807
2808 * procfs.c (procfs_create_inferior): Change prototype to match
2809 definition.
2810
adf3dde5
EZ
28112017-05-13 Eli Zaretskii <eliz@gnu.org>
2812
2813 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
2814 C++ compiler warning.
2815
6830f270
TT
28162017-05-12 Tom Tromey <tom@tromey.com>
2817
2818 PR rust/21483:
2819 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
2820 recurse, just call value_struct_elt directly.
2821
68f2f2e3
TT
28222017-05-12 Tom Tromey <tom@tromey.com>
2823
2824 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
2825 OP_RUST_ARRAY>: Fix.
2826
256afbc2
TT
28272017-05-12 Tom Tromey <tom@tromey.com>
2828
2829 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
2830
94bb8dfe
YQ
28312017-05-09 Yao Qi <yao.qi@linaro.org>
2832
2833 * regcache.c: Include <forward_list>.
2834 (struct regcache_list): Remove.
2835 (current_regcache): Update.
2836 (get_thread_arch_aspace_regcache): Update for std::forward_list.
2837 (regcache_thread_ptid_changed): Likewise.
2838 (registers_changed_ptid): Likewise.
2839 (current_regcache_size): Likewise.
2840
8248946c
YQ
28412017-05-09 Yao Qi <yao.qi@linaro.org>
2842
2843 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
2844 (current_regcache_size): New function.
2845 (current_regcache_test): New function.
2846 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
2847
313c5961
AH
28482017-05-08 Alan Hayward <alan.hayward@arm.com>
2849
2850 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
2851 (print_gp_register_row): Use get_frame_register_value.
2852
27bfc1d1
AH
28532017-05-08 Alan Hayward <alan.hayward@arm.com>
2854
2855 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
2856 (mips_supply_fpregset): Likewise.
2857 (mips64_supply_gregset): Likewise.
2858
146e6c5c
AH
28592017-05-08 Alan Hayward <alan.hayward@arm.com>
2860
2861 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
2862 regcache->raw_supply_zeroed.
2863
e50f25ec
SDJ
28642017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2865
2866 * configure.nat: Rearrange 'case' statements to match
2867 host before cpu.
2868
21ea5acd
SDJ
28692017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2870
2871 * Makefile.in: Remove "@host_makefile_frag@". Add variables
2872 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
2873 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
2874 "@nat_extra_makefile_frag@".
2875 (Makefile): Remove dependency on "@frags@".
2876 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
2877 (data-directory/Makefile): Likewise.
2878 * config/aarch64/linux.mh: Deleted; moved contents to
2879 "gdb/configure.nat".
2880 * config/alpha/alpha-linux.mh: Likewise.
2881 * config/alpha/nbsd.mh: Likewise.
2882 * config/arm/linux.mh: Likewise.
2883 * config/arm/nbsdelf.mh: Likewise.
2884 * config/i386/cygwin.mh: Likewise.
2885 * config/i386/cygwin64.mh: Likewise.
2886 * config/i386/darwin.mh: Likewise.
2887 * config/i386/fbsd.mh: Likewise.
2888 * config/i386/fbsd64.mh: Likewise.
2889 * config/i386/go32.mh: Likewise.
2890 * config/i386/i386gnu.mh: Likewise.
2891 * config/i386/i386sol2.mh: Likewise.
2892 * config/i386/linux.mh: Likewise.
2893 * config/i386/linux64.mh: Likewise.
2894 * config/i386/mingw.mh: Likewise.
2895 * config/i386/mingw64.mh: Likewise.
2896 * config/i386/nbsd64.mh: Likewise.
2897 * config/i386/nbsdelf.mh: Likewise.
2898 * config/i386/nto.mh: Likewise.
2899 * config/i386/obsd.mh: Likewise.
2900 * config/i386/obsd64.mh: Likewise.
2901 * config/i386/sol2-64.mh: Likewise.
2902 * config/ia64/linux.mh: Likewise.
2903 * config/m32r/linux.mh: Likewise.
2904 * config/m68k/linux.mh: Likewise.
2905 * config/m68k/nbsdelf.mh: Likewise.
2906 * config/m68k/obsd.mh: Likewise.
2907 * config/m88k/obsd.mh: Likewise.
2908 * config/mips/fbsd.mh: Likewise.
2909 * config/mips/linux.mh: Likewise.
2910 * config/mips/nbsd.mh: Likewise.
2911 * config/mips/obsd64.mh: Likewise.
2912 * config/pa/linux.mh: Likewise.
2913 * config/pa/nbsd.mh: Likewise.
2914 * config/pa/obsd.mh: Likewise.
2915 * config/powerpc/aix.mh: Likewise.
2916 * config/powerpc/fbsd.mh: Likewise.
2917 * config/powerpc/linux.mh: Likewise.
2918 * config/powerpc/nbsd.mh: Likewise.
2919 * config/powerpc/obsd.mh: Likewise.
2920 * config/powerpc/ppc64-linux.mh: Likewise.
2921 * config/powerpc/spu-linux.mh: Likewise.
2922 * config/s390/linux.mh: Likewise.
2923 * config/sh/nbsd.mh: Likewise.
2924 * config/sparc/fbsd.mh: Likewise.
2925 * config/sparc/linux.mh: Likewise.
2926 * config/sparc/linux64.mh: Likewise.
2927 * config/sparc/nbsd64.mh: Likewise.
2928 * config/sparc/nbsdelf.mh: Likewise.
2929 * config/sparc/obsd64.mh: Likewise.
2930 * config/sparc/sol2.mh: Likewise.
2931 * config/tilegx/linux.mh: Likewise.
2932 * config/vax/nbsdelf.mh: Likewise.
2933 * config/vax/obsd.mh: Likewise.
2934 * config/xtensa/linux.mh: Likewise.
2935 * config/i386/i386gnu.mn: New file, with excerpts from
2936 "config/i386/i386gnu.mh".
2937 * configure: Regenerate.
2938 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
2939 *.mh files under "gdb/config".
2940 * configure.nat: New file, with contents from the
2941 "gdb/config/*/*.mh" files.
2942
7ed1acaf
TW
29432017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
2944
2945 * btrace.c (btrace_clear): Free insn vector.
2946
e13cb306
PA
29472017-05-05 Pedro Alves <palves@redhat.com>
2948
2949 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
2950 * configure: Regenerate.
2951
5ed8105e
PA
29522017-05-04 Pedro Alves <palves@redhat.com>
2953
2954 * Makefile.in (SFILES): Add progspace-and-thread.c.
2955 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
2956 (COMMON_OBS): Add progspace-and-thread.o.
2957 * breakpoint.c: Include "progspace-and-thread.h".
2958 (update_inserted_breakpoint_locations)
2959 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
2960 Use scoped_restore_current_pspace_and_thread.
2961 (create_std_terminate_master_breakpoint): Use
2962 scoped_restore_current_program_space.
2963 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
2964 (print_breakpoint_location): Use
2965 scoped_restore_current_program_space.
2966 (bp_loc_is_permanent): Use
2967 scoped_restore_current_pspace_and_thread.
2968 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
2969 (download_tracepoint_locations): Use
2970 scoped_restore_current_pspace_and_thread.
2971 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
2972 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
2973 (enum step_over_calls_kind): Moved from inferior.h.
2974 (class scoped_restore_current_thread): New class.
2975 * gdbthread.h (make_cleanup_restore_current_thread): Delete
2976 declaration.
2977 (scoped_restore_current_thread): New class.
2978 * infcmd.c: Include "common/gdb_optional.h".
2979 (continue_1, proceed_after_attach): Use
2980 scoped_restore_current_thread.
2981 (notice_new_inferior): Use scoped_restore_current_thread.
2982 * inferior.c: Include "progspace-and-thread.h".
2983 (restore_inferior, save_current_inferior): Delete.
2984 (add_inferior_command, clone_inferior_command): Use
2985 scoped_restore_current_pspace_and_thread.
2986 * inferior.h (scoped_restore_current_inferior): New class.
2987 * infrun.c: Include "progspace-and-thread.h" and
2988 "common/gdb_optional.h".
2989 (follow_fork_inferior): Use
2990 scoped_restore_current_pspace_and_thread.
2991 (scoped_restore_exited_inferior): New class.
2992 (handle_vfork_child_exec_or_exit): Use
2993 scoped_restore_exited_inferior,
2994 scoped_restore_current_pspace_and_thread,
2995 scoped_restore_current_thread and scoped_restore.
2996 (fetch_inferior_event): Use scoped_restore_current_thread.
2997 * linespec.c (decode_line_full, decode_line_1): Use
2998 scoped_restore_current_program_space.
2999 * mi/mi-main.c: Include "progspace-and-thread.h".
3000 (exec_continue): Use scoped_restore_current_thread.
3001 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
3002 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
3003 * proc-service.c (ps_pglobal_lookup): Use
3004 scoped_restore_current_program_space.
3005 * progspace-and-thread.c: New file.
3006 * progspace-and-thread.h: New file.
3007 * progspace.c (release_program_space, clone_program_space): Use
3008 scoped_restore_current_program_space.
3009 (restore_program_space, save_current_program_space)
3010 (save_current_space_and_thread): Delete.
3011 (switch_to_program_space_and_thread): Moved to
3012 progspace-and-thread.c.
3013 * progspace.h (save_current_program_space)
3014 (save_current_space_and_thread): Delete declarations.
3015 (scoped_restore_current_program_space): New class.
3016 * remote.c (remote_btrace_maybe_reopen): Use
3017 scoped_restore_current_thread.
3018 * symtab.c: Include "progspace-and-thread.h".
3019 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
3020 * thread.c (print_thread_info_1): Use
3021 scoped_restore_current_thread.
3022 (struct current_thread_cleanup): Delete.
3023 (do_restore_current_thread_cleanup)
3024 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
3025 (scoped_restore_current_thread::~scoped_restore_current_thread):
3026 ... this new dtor.
3027 (make_cleanup_restore_current_thread): Rename/convert to ...
3028 (scoped_restore_current_thread::scoped_restore_current_thread):
3029 ... this new ctor.
3030 (thread_apply_all_command): Use scoped_restore_current_thread.
3031 (thread_apply_command): Use scoped_restore_current_thread.
3032 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
3033 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
3034
f6223dbb
PA
30352017-05-04 Pedro Alves <palves@redhat.com>
3036
3037 * thread.c (make_cleanup_restore_current_thread): Move
3038 find_thread_ptid call before the is_stopped call. Assert that the
3039 thread is found. Replace is_stopped call by checking the thread's
3040 state directly. Remove unnecessary NULL-thread check.
3041
3c3ae77e
PA
30422017-05-04 Pedro Alves <palves@redhat.com>
3043
3044 * corelow.c (thread_section_name): New class.
3045 (get_core_register_section, get_core_siginfo): Use it.
3046
45eba0ab
AA
30472017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
3048
3049 * corelow.c (sniff_core_bfd): Remove extra semicolon.
3050 (get_core_register_section): Remove xfree of NULL pointer.
3051
f81fdd35
AH
30522017-05-03 Alan Hayward <alan.hayward@arm.com>
3053
3054 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
3055 * regcache.c (regcache::raw_supply_zeroed): New function.
3056 * regcache.h (regcache::raw_supply_zeroed): New declaration.
3057
35837774
SM
30582017-05-03 Simon Marchi <simon.marchi@ericsson.com>
3059
3060 * gdbarch.sh: Remove commented out definition of
3061 TARGET_CHAR_BIT.
3062 * gdbarch.h: Re-generate.
3063
c94fee56
SDJ
30642017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3065
3066 * configure: Regenerate.
3067
d17f7b36
SM
30682017-05-02 Simon Marchi <simon.marchi@ericsson.com>
3069
3070 * solib-target.c (solib_target_relocate_section_addresses):
3071 Remove num_section_bases, num_bases, segment_bases variables.
3072
b560ebd6
SM
30732017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3074
3075 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
3076
f2f46dfc
SM
30772017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3078
3079 * solib-target.c: Include <vector>
3080 (struct lm_info_target) <~lm_info_target>: Remove.
3081 <segment_bases, section_bases>: Change type to
3082 std::vector<CORE_ADDR>.
3083 (library_list_start_segment, library_list_start_section,
3084 library_list_end_library,
3085 solib_target_relocate_section_addresses): Adjust.
3086
a0ff9e1a
SM
30872017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3088
3089 * gdbarch.sh (software_single_step): Change return type to
3090 std::vector<CORE_ADDR>.
3091 * gdbarch.c, gdbarch.h: Re-generate.
3092 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
3093 Adjust.
3094 (arm_deal_with_atomic_sequence_raw): Adjust.
3095 (thumb_get_next_pcs_raw): Adjust.
3096 (arm_get_next_pcs_raw): Adjust.
3097 (arm_get_next_pcs): Adjust.
3098 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
3099 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
3100 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
3101 (alpha_software_single_step): Adjust.
3102 * alpha-tdep.h (alpha_software_single_step): Adjust.
3103 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
3104 * arm-tdep.c (arm_software_single_step): Adjust.
3105 (arm_breakpoint_kind_from_current_state): Adjust.
3106 * arm-tdep.h (arm_software_single_step): Adjust.
3107 * breakpoint.c (insert_single_step_breakpoint): Adjust.
3108 * cris-tdep.c (cris_software_single_step): Adjust.
3109 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
3110 (micromips_deal_with_atomic_sequence): Adjust.
3111 (deal_with_atomic_sequence): Adjust.
3112 (mips_software_single_step): Adjust.
3113 * mips-tdep.h (mips_software_single_step): Adjust.
3114 * moxie-tdep.c (moxie_software_single_step): Adjust.
3115 * nios2-tdep.c (nios2_software_single_step): Adjust.
3116 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
3117 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
3118 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
3119 * s390-linux-tdep.c (s390_software_single_step): Adjust.
3120 * sparc-tdep.c (sparc_software_single_step): Adjust.
3121 * spu-tdep.c (spu_software_single_step): Adjust.
3122 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
3123
ea480a30
SM
31242017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3125
3126 * gdbarch.sh: Use semi-colon as field separator instead of colon.
3127 * gdbarch.h: Re-generate.
3128
d050f7d7
TW
31292017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3130
3131 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
3132 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
3133 * python/py-instruction.c, python/py-instruction.h: New file.
3134 * python/py-record.c: Add py-instruction.h include.
3135 (gdbpy_initialize_record): Make gdb.Instruction a super class of
3136 gdb.RecordInstruction.
3137 * python/python-internal.h: Add gdbpy_initialize_instruction
3138 declaration.
3139 * python/python.c (do_start_initialization): Add
3140 gdbpy_initialize_instruction.
3141
14f819c8
TW
31422017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3143
3144 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
3145 Remove.
3146 (btrace_func_from_recpy_func): New function.
3147 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
3148 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
3149 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
3150 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
3151 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
3152 Also, use new helper functions.
3153 (btpy_list_item): Use new helper functions.
3154 (recpy_bt_function_call_history): Use new type name.
3155 (btpy_call_getset): Remove.
3156 (gdbpy_initialize_btrace): Remove code to initialize
3157 gdb.BtraceFunctionCall.
3158 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
3159 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
3160 recpy_bt_func_prev, recpy_bt_func_next): New export.
3161 * python/py-record.c (recpy_func_type): New static object.
3162 (recpy_func_new, recpy_func_level, recpy_func_symbol,
3163 recpy_func_instructions, recpy_func_up, recpy_func_prev,
3164 recpy_func_next): New function.
3165 (recpy_element_hash, recpy_element_richcompare): Updated comment.
3166 (recpy_func_getset): New static object.
3167 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
3168 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
3169
0ed5da75
TW
31702017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3171
3172 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
3173 (btpy_object, btpy_insn_type, btpy_new): Remove.
3174 (btpy_list_object): Use gdb.RecordInstruction type instead of
3175 gdb.BtraceInstruction type.
3176 (btrace_insn_from_recpy_insn): New function.
3177 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
3178 btpy_new.
3179 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
3180 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
3181 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
3182 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
3183 instead of btpy_object.
3184 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
3185 btpy_insn_data, btpy_insn_decode): Rename to ...
3186 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
3187 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
3188 recpy_bt_insn_decode): This. Also, use new helper functions.
3189 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
3190 recpy_insn_type.
3191 (btpy_insn_getset): Remove.
3192 (gdbpy_initialize_btrace): Remove code to initialize
3193 gdb.BtraceInstruction. Use recpy_element_object.
3194 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
3195 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
3196 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
3197 * python/py-record.c (recpy_insn_type): New static object.
3198 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
3199 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
3200 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
3201 New function.
3202 (recpy_insn_getset): New static object.
3203 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
3204 * python/py-record.h (recpy_element_object): New typedef.
3205 (recpy_insn_type, recpy_insn_new): New export.
3206
913aeadd
TW
32072017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3208
3209 * py-record-btrace.c (btpy_insn_new): Removed.
3210 (btpy_insn_or_gap_new): New function.
3211 (btpy_insn_error): Removed.
3212 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
3213 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
3214 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
3215 btpy_insn_or_gap_new instead of btpy_insn_new.
3216 (btpy_insn_getset): Remove btpy_insn_error.
3217 * py-record.c (recpy_gap_type): New static object.
3218 (recpy_gap_object): New typedef.
3219 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
3220 recpy_gap_reason_string): New function.
3221 (recpy_gap_getset): New static object.
3222 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
3223 * py-record.h (recpy_gap_new): New export.
3224
a3be24ad
TW
32252017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3226
3227 * python/py-record.c (recpy_ptid): Remove.
3228 (recpy_record_getset): Remove recpy_ptid.
3229
ae20e79a
TW
32302017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3231
3232 * btrace.c (btrace_fetch): Set inferior_ptid.
3233 * python/py-record-btrace.c: Add "py-record.h" include.
3234 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
3235 recpy_bt_end, recpy_bt_instruction_history,
3236 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
3237 in gdb.Record object instead of current ptid.
3238 * python/py-record.c: Include new "py-record.h" file.
3239 (recpy_record_object): Moved to py-record.h.
3240 * python/py-record.h: New file.
3241
8d0050ea
TW
32422017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3243
3244 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
3245 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
3246 indentation.
3247
3f380b50
JB
32482017-05-01 Joel Brobecker <brobecker@adacore.com>
3249
3250 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
3251 the past maintainers section.
3252
07495424
YQ
32532017-04-28 Yao Qi <yao.qi@linaro.org>
3254
3255 * infcmd.c (get_return_value): Use regcache ctor, and remove
3256 cleanup.
3257
deb1fa3e
YQ
32582017-04-28 Yao Qi <yao.qi@linaro.org>
3259 Pedro Alves <palves@redhat.com>
3260
3261 * regcache.c (regcache::regcache): New tag dispatch ctor.
3262 (do_cooked_read): Moved above.
3263 (regcache_dup): Use the tag dispatch ctor..
3264 * regcache.h (regcache): Declare ctor, delete copy ctor and
3265 assignment operator, remove friend regcache_dup.
3266
b421c83c
YQ
32672017-04-28 Yao Qi <yao.qi@linaro.org>
3268
3269 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
3270 call method save instead of regcache_cpy.
3271 * regcache.h (struct regcache): Make regcache_dup a friend.
3272
ef79d9a3
YQ
32732017-04-28 Yao Qi <yao.qi@linaro.org>
3274
3275 * regcache.c (struct regcache): Move to regcache.h
3276 (regcache::arch): New method.
3277 (regcache_get_ptid): Update.
3278 (get_regcache_arch): Call arch method.
3279 (get_regcache_aspace): Call method aspace.
3280 (register_buffer): Change it to method.
3281 (regcache_save): Change it to regcache::save.
3282 (regcache_restore): Likewise.
3283 (regcache_cpy_no_passthrough): Remove the declaration.
3284 (regcache_cpy): Call methods restore and cpy_no_passthrough.
3285 (regcache_cpy_no_passthrough): Change it to method
3286 cpy_no_passthrough.
3287 (regcache_register_status): Change it to method
3288 get_register_status.
3289 (regcache_invalidate): Change it to method invalidate.
3290 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
3291 (regcache_raw_update): Change it to method raw_update.
3292 (regcache_raw_read): Likewise.
3293 (regcache_raw_read_signed): Likewise.
3294 (regcache_raw_read_unsigned): Likewise.
3295 (regcache_raw_write_signed): Likewise.
3296 (regcache_raw_write_unsigned): Likewise.
3297 (regcache_cooked_read): Likewise.
3298 (regcache_cooked_read_value): Likewise.
3299 (regcache_cooked_read_signed): Likewise.
3300 (regcache_cooked_read_unsigned): Likewise.
3301 (regcache_cooked_write_signed): Likewise.
3302 (regcache_cooked_write_unsigned): Likewise.
3303 (regcache_raw_set_cached_value): Likewise.
3304 (regcache_raw_write): Likewise.
3305 (regcache_cooked_write): Likewise.
3306 (regcache_xfer_part): Likewise.
3307 (regcache_raw_read_part): Likewise.
3308 (regcache_raw_write_part): Likewise.
3309 (regcache_cooked_read_part): Likewise.
3310 (regcache_cooked_write_part): Likewise.
3311 (regcache_raw_supply): Likewise.
3312 (regcache_raw_collect): Likewise.
3313 (regcache_transfer_regset): Likewise.
3314 (regcache_supply_regset): Likewise.
3315 (regcache_collect_regset): Likewise.
3316 (regcache_debug_print_register): Likewise.
3317 (enum regcache_dump_what): Move it to regcache.h.
3318 (regcache_dump): Change it to method dump.
3319 * regcache.h (enum regcache_dump_what): New.
3320 (class regcache): New.
3321 * target.c (target_fetch_registers): Call method
3322 debug_print_register.
3323 (target_store_registers): Likewise.
3324
f8fdb78e
SM
33252017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3326
3327 * windows-nat.c (struct lm_info_windows): Initialize field.
3328 (windows_make_so): Allocate lm_info_windows with new.
3329 (windows_free_so): Free lm_info_windows with delete.
3330
9ccbfd7b
SM
33312017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3332
3333 * solib-darwin.c (struct lm_info_darwin): Initialize field.
3334 (darwin_current_sos): Allocate lm_info_darwin with new, remove
3335 cleanup.
3336 (darwin_free_so): Free lm_info_darwin with delete.
3337
76e75227
SM
33382017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3339
3340 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
3341 <l_addr_p>: Change type to bool.
3342 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
3343 (svr4_free_so): Free lm_info_svr4 with delete.
3344 (svr4_copy_library_list): Replace memcpy with call to copy
3345 constructor.
3346 (library_list_start_library, svr4_default_sos): Allocate
3347 lm_info_svr4 with new.
3348
51046d9e
SM
33492017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3350
3351 * solib-target.c (struct lm_info_target): Add destructor,
3352 initialize fields.
3353 <name>: Change type to std::string.
3354 (library_list_start_library): Allocate lm_info_target with new.
3355 (solib_target_free_library_list): Free lm_info_target with
3356 delete.
3357 (solib_target_current_sos): Adapt to std::string.
3358 (solib_target_free_so): Free lm_info_target with delete.
3359
4023ae76
SM
33602017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3361
3362 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
3363 fields.
3364 (frv_current_sos): Allocate lm_info_frv with new.
3365 (frv_relocate_main_executable): Free lm_info_frv with delete,
3366 allocate with new.
3367 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
3368
af43057b
SM
33692017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3370
3371 * solib-frv.c (struct lm_info_frv): Fix indentation.
3372
b0911207
SM
33732017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3374
3375 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
3376 map field.
3377 (dsbt_current_sos): Allocate lm_info_dsbt with new.
3378 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
3379 and allocate with new.
3380 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
3381
6c401f72
SM
33822017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3383
3384 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
3385 <filename, member_name>: Change type to std::string.
3386 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
3387 (library_list_start_library): Allocate lm_info_aix with new.
3388 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
3389 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
3390 with copy constructor.
3391
d0e449a1
SM
33922017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3393
3394 * solist.h (struct lm_info): Remove.
3395 (struct lm_info_base): New class.
3396 (struct so_list) <lm_info>: Change type to lm_info_base *.
3397 * nto-tdep.c (struct lm_info): Remove.
3398 (lm_addr): Adjust.
3399 * solib-aix.c (struct lm_info): Rename to ...
3400 (struct lm_info_aix): ... this. Extend lm_info_base.
3401 (lm_info_p): Rename to ...
3402 (lm_info_aix_p): ... this, and adjust.
3403 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
3404 solib_aix_parse_libraries, library_list_start_library,
3405 solib_aix_free_library_list, solib_aix_parse_libraries,
3406 solib_aix_get_library_list,
3407 solib_aix_relocate_section_addresses, solib_aix_free_so,
3408 solib_aix_get_section_offsets,
3409 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
3410 Adjust.
3411 (struct solib_aix_inferior_data) <library_list>: Adjust.
3412 * solib-darwin.c (struct lm_info): Rename to ...
3413 (struct lm_info_darwin): ... this. Extend lm_info_base.
3414 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
3415 * solib-dsbt.c (struct lm_info): Rename to ...
3416 (struct lm_info_dsbt): ... this. Extend lm_info_base.
3417 (struct dsbt_info) <main_executable_lm_info): Adjust.
3418 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
3419 dsbt_relocate_section_addresses): Adjust.
3420 * solib-frv.c (struct lm_info): Rename to ...
3421 (struct lm_info_frv): ... this. Extend lm_info_base.
3422 (main_executable_lm_info): Adjust.
3423 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
3424 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
3425 find_canonical_descriptor_in_load_object,
3426 frv_fdpic_find_canonical_descriptor): Adjust.
3427 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
3428 to lm_info_svr4.
3429 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
3430 svr4_clear_so, svr4_copy_library_list,
3431 library_list_start_library, svr4_default_sos, svr4_read_so_list,
3432 svr4_current_sos, svr4_fetch_objfile_link_map,
3433 solist_update_incremental): Adjust.
3434 * solib-svr4.h (struct lm_info_svr4): Move here from
3435 solib-svr4.c.
3436 * solib-target.c (struct lm_info): Rename to ...
3437 (struct lm_info_target): ... this. Extend lm_info_base.
3438 (lm_info_p): Rename to ...
3439 (lm_info_target_p): ... this.
3440 (solib_target_parse_libraries, library_list_start_segment,
3441 library_list_start_section, library_list_start_library,
3442 library_list_end_library, solib_target_free_library_list,
3443 solib_target_current_sos, solib_target_free_so,
3444 solib_target_relocate_section_addresses): Adjust.
3445 * windows-nat.c (struct lm_info): Rename to ...
3446 (struct lm_info_windows): ... this. Extend lm_info_base.
3447 (windows_make_so, handle_load_dll, handle_unload_dll,
3448 windows_xfer_shared_libraries): Adjust.
3449
434a4023
SM
34502017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3451
3452 * solib-darwin.c (struct darwin_so_list): Remove.
3453 (darwin_current_sos): Allocate an so_list object instead of a
3454 darwin_so_list, separately allocate an lm_info object.
3455 (darwin_free_so): Free lm_info.
3456
428544e8
JB
34572017-04-28 John Baldwin <jhb@FreeBSD.org>
3458
3459 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
3460 with fprintf_filtered.
3461
4621115f
YQ
34622017-04-28 Yao Qi <yao.qi@linaro.org>
3463
3464 * regcache.c (regcache::regcache): New function.
3465 (regcache::~regcache): New function.
3466 (regcache_xmalloc_1): Remove.
3467 (regcache_xmalloc): Call new regcache.
3468 (regcache_xfree): Call delete regcache.
3469 (get_thread_arch_aspace_regcache): Call new regcache.
3470
339053c2
YQ
34712017-04-28 Yao Qi <yao.qi@linaro.org>
3472
3473 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
3474 lwp instead of ptid_get_lwp.
3475
7974a605
YQ
34762017-04-28 Yao Qi <yao.qi@linaro.org>
3477
3478 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
3479 lwp_info instead of getting from inferior_ptid.
3480
e15c3eb4
KS
34812017-04-27 Keith Seitz <keiths@redhat.com>
3482
3483 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
3484 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
3485 (CV_CONVERSION_BADNESS): Define.
3486 (rank_one_type): Remove overly restrictive rvalue reference
3487 rank checks.
3488 Add cv-qualifier checks and subranks for type equality.
3489 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
3490 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
3491 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
3492
72bc1d24
SM
34932017-04-27 Simon Marchi <simon.marchi@ericsson.com>
3494
3495 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
3496 count when creating the object.
3497
55bcecda
UW
34982017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
3499 Ulrich Weigand <uweigand@de.ibm.com>
3500
3501 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
3502 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
3503 is used in AIX.
3504 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
3505 (process_xcoff_symbol): Likewise.
3506 (scan_xcoff_symtab): Likewise.
3507
5c99fcf8
AH
35082017-04-26 Alan Hayward <alan.hayward@arm.com>
3509
3510 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
3511 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
3512 (ia64_access_reg): Use get_frame_register_unsigned.
3513 (ia64_access_rse_reg): Likewise.
3514 (ia64_libunwind_frame_prev_register): Likewise.
3515
b41c5a85
JW
35162017-04-26 Jiong Wang <jiong.wang@arm.com>
3517
3518 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
3519 * gdbarch.c: Regenerated.
3520 * gdbarch.h: Regenerated.
3521 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
3522 visibility external.
3523 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
3524 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
3525 (enum cfa_how_kind): Move to ...
3526 (struct dwarf2_frame_state_reg_info): Likewise.
3527 (struct dwarf2_frame_state): Likewise.
3528 * dwarf2-frame.h: ... here.
3529 (dwarf2_frame_state_alloc_regs): New declaration.
3530 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
3531 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
3532
c185f580
AH
35332017-04-26 Alan Hayward <alan.hayward@arm.com>
3534
3535 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
3536 regcache_raw_read_unsigned.
3537 (xtensa_pseudo_register_write): Likewise.
3538
19c45594
AH
35392017-04-26 Alan Hayward <alan.hayward@arm.com>
3540
3541 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
3542 (nds32_pseudo_register_write): Likewise.
3543
4658f12e
YQ
35442017-04-25 Yao Qi <yao.qi@linaro.org>
3545
3546 * regcache.c (struct regcache) <readonly_p>: Change its type
3547 to bool.
3548 (regcache_xmalloc_1): Update parameter type and callers update.
3549
d581dda8
YQ
35502017-04-25 Yao Qi <yao.qi@linaro.org>
3551
3552 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
3553 set_gdbarch_wchar_bit.
3554 * arm-tdep.c (arm_gdbarch_init): Likewise.
3555
debed3db
PA
35562017-04-25 Pedro Alves <palves@redhat.com>
3557
3558 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
3559 (BothAreRelocatable, memcopy, memmove): Don't define.
3560 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
3561 macros.
3562
b0b92aeb
PA
35632017-04-25 Pedro Alves <palves@redhat.com>
3564
3565 * common/common-defs.h: Include "common/poison.h".
3566 * common/function-view.h: (Not, Or, Requires): Move to traits.h
3567 and adjust.
3568 * common/poison.h: New file.
3569 * common/traits.h: Include <type_traits>.
3570 (Not, Or, Requires): New, moved from common/function-view.h.
3571
16c4d54a
PA
35722017-04-25 Pedro Alves <palves@redhat.com>
3573
3574 * breakpoint.h (struct breakpoint): In-class initialize all
3575 fields. Make boolean fields "bool".
3576 * breakpoint.c (init_raw_breakpoint_without_location): Remove
3577 memset call and initializations no longer necessary.
3578
b5c36682
PA
35792017-04-25 Pedro Alves <palves@redhat.com>
3580
3581 * btrace.c (pt_btrace_insn_flags): Change parameter type to
3582 reference.
3583 (pt_btrace_insn): New function.
3584 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
3585
5625a286
PA
35862017-04-25 Pedro Alves <palves@redhat.com>
3587
3588 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
3589 "base" field and inherit from "bp_location" instead. Add
3590 non-default ctor.
3591 (allocate_location_exception): Use new non-default ctor.
3592 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
3593 (init_bp_location): Convert to ...
3594 (bp_location::bp_location): ... this new ctor, and remove memset
3595 call.
3596 (base_breakpoint_allocate_location): Use the new non-default ctor.
3597 * breakpoint.h (bp_location): Now a class. Declare default and
3598 non-default ctors. In-class initialize all members.
3599 (init_bp_location): Remove declaration.
3600
23bcc18f
PA
36012017-04-25 Pedro Alves <palves@redhat.com>
3602
3603 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
3604 assignment operator.
3605
e1ba3053
YQ
36062017-04-24 Yao Qi <yao.qi@linaro.org>
3607
3608 * doublest.c (convert_doublest_to_floatformat): Call
3609 floatformat_totalsize_bytes.
3610
10f489e5
TT
36112017-04-22 Tom Tromey <tom@tromey.com>
3612
3613 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3614 ui_out_emit_list.
3615 * stack.c (print_frame): Use ui_out_emit_list.
3616 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
3617 ui_out_emit_list.
3618 * mi/mi-main.c (print_one_inferior)
3619 (mi_cmd_data_list_register_names)
3620 (mi_cmd_data_list_register_values, mi_cmd_list_features)
3621 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
3622 ui_out_emit_list.
3623 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
3624 (mi_output_solib_attribs): Use ui_out_emit_list,
3625 ui_out_emit_tuple.
3626 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
3627 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
3628 (mi_cmd_stack_list_args, list_args_or_locals): Use
3629 ui_out_emit_list.
3630 * disasm.c (do_assembly_only): Use ui_out_emit_list.
3631 * breakpoint.c (print_solib_event, output_thread_groups): Use
3632 ui_out_emit_list.
3633
0092b74d
TT
36342017-04-22 Tom Tromey <tom@tromey.com>
3635
3636 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
3637 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
3638 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
3639
a14a62dd
TT
36402017-04-22 Tom Tromey <tom@tromey.com>
3641
3642 * tracepoint.c (tvariables_info_1)
3643 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
3644
46b9c129
TT
36452017-04-22 Tom Tromey <tom@tromey.com>
3646
3647 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
3648 annotate_arg_emitter.
3649 * breakpoint.c (print_mention_watchpoint)
3650 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
3651 * annotate.h (struct annotate_arg_emitter): New.
3652
2e783024
TT
36532017-04-22 Tom Tromey <tom@tromey.com>
3654
3655 * record-btrace.c (record_btrace_insn_history)
3656 (record_btrace_insn_history_range, record_btrace_call_history)
3657 (record_btrace_call_history_range): Use ui_out_emit_tuple.
3658 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
3659 ui_out_emit_tuple.
3660 * stack.c (print_frame_info): Use ui_out_emit_tuple.
3661 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
3662 * skip.c (skip_info): Use ui_out_emit_tuple.
3663 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
3664 * progspace.c (print_program_space): Use ui_out_emit_tuple.
3665 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
3666 * osdata.c (info_osdata): Use ui_out_emit_tuple.
3667 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
3668 ui_out_emit_tuple.
3669 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
3670 (output_register, mi_cmd_data_read_memory)
3671 (mi_cmd_data_read_memory_bytes, mi_load_progress)
3672 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
3673 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
3674 Use ui_out_emit_tuple.
3675 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
3676 ui_out_emit_tuple.
3677 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
3678 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
3679 * linux-thread-db.c (info_auto_load_libthread_db): Use
3680 ui_out_emit_tuple.
3681 * inferior.c (print_inferior): Use ui_out_emit_tuple.
3682 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
3683 * disasm.c (do_mixed_source_and_assembly_deprecated)
3684 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
3685 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
3686 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
3687 * breakpoint.c (print_one_breakpoint_location)
3688 (print_one_breakpoint): Use ui_out_emit_tuple.
3689 * auto-load.c (print_script, info_auto_load_cmd): Use
3690 ui_out_emit_tuple.
3691 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
3692
9be21bb4
SM
36932017-04-21 Simon Marchi <simon.marchi@ericsson.com>
3694
3695 * thread.c (print_thread_info_1): Remove dead code.
3696
0d4c07af
JK
36972017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3698
3699 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
3700 GDB_SELF_TEST.
3701 * arm-tdep.c (selftests::arm_record_test): Likewise.
3702
4daf993d
YQ
37032017-04-21 Yao Qi <yao.qi@linaro.org>
3704
3705 * regcache.c (regcache_restore): Remove argument 2. Replace
3706 argument 3 with regcache. Get register status from
3707 src->register_status and get register contents from
3708 register_buffer (src, regnum).
3709 (regcache_cpy): Update.
3710
a6c21d4a
PA
37112017-04-19 Pedro Alves <palves@redhat.com>
3712
3713 * gdbthread.h (thread): Add missing closing parenthesis in
3714 comment.
3715
3a3fd0fd
PA
37162017-04-19 Pedro Alves <palves@redhat.com>
3717
3718 * common/refcounted-object.h: New file.
3719 * gdbthread.h: Include "common/refcounted-object.h".
3720 (thread_info): Inherit from refcounted_object and add comments.
3721 (thread_info::incref, thread_info::decref)
3722 (thread_info::m_refcount): Delete.
3723 (thread_info::deletable): Use the refcounted_object::refcount()
3724 method.
3725 * inferior.c (current_inferior_): Add comment.
3726 (set_current_inferior): Increment/decrement refcounts.
3727 (prune_inferiors, remove_inferior_command): Skip inferiors marked
3728 not-deletable instead of comparing with the current inferior.
3729 (initialize_inferiors): Increment the initial inferior's refcount.
3730 * inferior.h (struct inferior): Forward declare.
3731 Include "common/refcounted-object.h".
3732 (current_inferior, set_current_inferior): Move declaration to
3733 before struct inferior's definition, and fix comment.
3734 (inferior): Inherit from refcounted_object. Add comments.
3735 * thread.c (switch_to_thread_no_regs): Reference the thread's
3736 inferior pointer directly instead of doing a ptid lookup.
3737 (switch_to_no_thread): New function.
3738 (switch_to_thread(thread_info *)): New function, factored out
3739 from ...
3740 (switch_to_thread(ptid_t)): ... this.
3741 (restore_current_thread): Delete.
3742 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
3743 fields, and add 'inf' field.
3744 (do_restore_current_thread_cleanup): Check whether old->inf is
3745 alive instead of looking up an inferior by ptid. Use
3746 switch_to_thread and switch_to_no_thread.
3747 (restore_current_thread_cleanup_dtor): Use old->inf directly
3748 instead of lookup up an inferior by id. Decref the inferior.
3749 Don't restore 'removable'.
3750 (make_cleanup_restore_current_thread): Same the inferior pointer
3751 in old, instead of the inferior number. Incref the inferior.
3752 Don't save/clear 'removable'.
3753
9bcb1f16
PA
37542017-04-19 Pedro Alves <palves@redhat.com>
3755
3756 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3757 unittests/scoped_restore-selftests.c.
3758 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
3759 * common/scoped_restore.h (scoped_restore_base): Make "class".
3760 (scoped_restore_base::release): New public method.
3761 (scoped_restore_base::scoped_restore_base): New protected ctor.
3762 (scoped_restore_base::m_saved_var): New protected field.
3763 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
3764 scoped_restore_base base class instead of m_saved_var directly.
3765 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
3766 (scoped_restore_tmpl::scoped_restore_tmpl(const
3767 scoped_restore_tmpl<T>&)): Likewise.
3768 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
3769 method.
3770 (scoped_restore_tmpl::saved_var): New method.
3771 (scoped_restore_tmpl::m_saved_var): Delete.
3772 * inferior.h (inferior::detaching): Now a bool.
3773 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
3774 cleanup.
3775 * unittests/scoped_restore-selftests.c: New file.
3776
26fcd539
PA
37772017-04-19 Pedro Alves <palves@redhat.com>
3778
3779 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
3780 Re-sort in alphabetic order.
3781
fdd243b0
PA
37822017-04-18 Pedro Alves <palves@redhat.com>
3783
3784 * xml-support.c (obstack_xml_printf): Delete.
3785 * xml-support.h (obstack_xml_printf): Delete.
3786
4895cde2
PA
37872017-04-18 Pedro Alves <palves@redhat.com>
3788
3789 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
3790 vdebug, verror, body_text, start_element, end_element, name,
3791 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
3792 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
3793 is_xinclude>: Make private and add m_ prefix.
3794 (gdb_xml_parser::body_text): New method, based on ...
3795 (gdb_xml_body_text): ... this. Adjust.
3796 (gdb_xml_parser::vdebug): New method, based on ...
3797 (gdb_xml_debug): ... this. Adjust.
3798 (gdb_xml_parser::verror): New method, based on ...
3799 (gdb_xml_error): ... this. Adjust.
3800 (gdb_xml_parser::start_element): New method, based on ...
3801 (gdb_xml_start_element): ... this. Adjust.
3802 (gdb_xml_start_element_wrapper): Defer to
3803 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
3804 (gdb_xml_parser::end_element): New method, based on ...
3805 (gdb_xml_end_element_wrapper): ... this. Adjust.
3806 (gdb_xml_parser::~gdb_xml_parser): Adjust.
3807 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
3808 (gdb_xml_parser::use_dtd): New method, based on ...
3809 (gdb_xml_use_dtd): ... this. Adjust.
3810 (gdb_xml_parser::parse): New method, based on ...
3811 (gdb_xml_parse): ... this. Adjust.
3812 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
3813 (xinclude_start_include): Adjust to call the parser's name method.
3814 (xml_xinclude_default, xml_xinclude_start_doctype)
3815 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
3816 method.
3817 (xml_process_xincludes): Adjust to call parser methods.
3818 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
3819 declarations.
3820
bd8a901f
PA
38212017-04-18 Pedro Alves <palves@redhat.com>
3822
3823 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
3824 gdb::optional<std::string>.
3825 * xml-support.c: Include <string>.
3826 (scope_level::scope_level(scope_level &&))
3827 (scope_level::~scope_level): Delete.
3828 (scope_level::body): Now a std::string.
3829 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
3830 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
3831 parameter.
3832 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
3833 (xinclude_parsing_data::output): Now a std::string reference.
3834 (xinclude_start_include): Adjust.
3835 (xml_xinclude_default): Adjust.
3836 (xml_process_xincludes): Add 'output' parameter, and return bool.
3837 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
3838 and return bool.
3839 * xml-tdesc.c: Include <unordered_map> and <string>.
3840 (tdesc_xml_cache): Delete.
3841 (tdesc_xml_cache_s): Delete.
3842 (xml_cache): Now an std::unordered_map.
3843 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
3844 (target_fetch_description_xml): Change return type to
3845 gdb::optional<std::string>, and adjust.
3846 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
3847 (target_fetch_description_xml): Change return type to
3848 gdb::optional<std::string>.
3849
d35d1958
PA
38502017-04-18 Pedro Alves <palves@redhat.com>
3851
3852 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3853 unittests/optional-selftests.c.
3854 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
3855 * unittests/optional-selftests.c: New file.
3856 * unittests/optional/assignment/1.cc: New file.
3857 * unittests/optional/assignment/2.cc: New file.
3858 * unittests/optional/assignment/3.cc: New file.
3859 * unittests/optional/assignment/4.cc: New file.
3860 * unittests/optional/assignment/5.cc: New file.
3861 * unittests/optional/assignment/6.cc: New file.
3862 * unittests/optional/assignment/7.cc: New file.
3863 * unittests/optional/cons/copy.cc: New file.
3864 * unittests/optional/cons/default.cc: New file.
3865 * unittests/optional/cons/move.cc: New file.
3866 * unittests/optional/cons/value.cc: New file.
3867 * unittests/optional/in_place.cc: New file.
3868 * unittests/optional/observers/1.cc: New file.
3869 * unittests/optional/observers/2.cc: New file.
3870
22796e97
PA
38712017-04-18 Pedro Alves <palves@redhat.com>
3872
3873 * common/gdb_optional.h: Include common/traits.h.
3874 (in_place_t): New type.
3875 (in_place): New constexpr variable.
3876 (optional::optional): Remove member initialization of
3877 m_instantiated.
3878 (optional::optional(in_place_t...)): New constructor.
3879 (optional::~optional): Use reset.
3880 (optional::optional(const optional&)): New.
3881 (optional::optional(const optional&&)): New.
3882 (optional::optional(T &)): New.
3883 (optional::optional(T &&)): New.
3884 (operator::operator=(const optional &)): New.
3885 (operator::operator=(optional &&)): New.
3886 (operator::operator= (const T &))
3887 (operator::operator= (T &&))
3888 (operator::emplace (Args &&... args)): Return a T&. Use reset.
3889 (operator::reset): New.
3890 (operator::m_instantiated):: Add in-class initializer.
3891 * common/traits.h: Include <type_traits>.
3892 (struct And): New types.
3893
a7fc9b61
PA
38942017-04-18 Pedro Alves <palves@redhat.com>
3895
3896 * xml-support.c: Include <vector>.
3897 (scope_level::scope_level(const gdb_xml_element *))
3898 (scope_level::scope_level(scope_level&&)): New.
3899 (scope_level::~scope_level): New.
3900 (scope_level_s): Delete.
3901 (gdb_xml_parser::scopes): Now a std::vector.
3902 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
3903 Use std::vector.
3904 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
3905 scope cleanup code.
3906 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
3907 of the scopes member. Use std::vector::emplace_back.
3908
010151c9
PA
39092017-04-18 Pedro Alves <palves@redhat.com>
3910
3911 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
3912 a bool.
3913 (gdb_xml_end_element): Change type of first parameter.
3914 (gdb_xml_cleanup): Rename to ...
3915 (gdb_xml_parser::~gdb_xml_parser): ... this.
3916 (gdb_xml_create_parser_and_cleanup): Delete with ...
3917 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
3918 to this new ctor.
3919 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
3920 using gdb_xml_create_parser_and_cleanup.
3921 (xinclude_parsing_data): Add ctor/dtor.
3922 (xml_xinclude_cleanup): Delete.
3923 (xml_process_xincludes): Create a local xinclude_parsing_data
3924 instead of heap-allocating one. Create a local gdb_xml_parser
3925 instead of heap-allocating one with
3926 gdb_xml_create_parser_and_cleanup.
3927
d56060f0
JB
39282017-04-18 John Baldwin <jhb@FreeBSD.org>
3929
3930 PR threads/20743
3931 * fbsd-nat.c (resume_one_thread_cb): Remove.
3932 (resume_all_threads_cb): Remove.
3933 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
3934 iterate_over_threads.
3935
305d16a9
JB
39362017-04-17 Joel Brobecker <brobecker@adacore.com>
3937
3938 * NEWS: Create a new section for the next release branch.
3939 Rename the section of the current branch, now that it has
3940 been cut.
3941
8bb57231
JB
39422017-04-17 Joel Brobecker <brobecker@adacore.com>
3943
3944 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
3945 * version.in: Bump version to 8.0.50.DATE-git.
3946
096c92dd
SDJ
39472017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
3948
3949 PR gdb/21385
3950 * windows-nat.c (windows_create_inferior): Declare 'allargs'
3951 independently of the host, and fix build breakage on Cygwin.
3952
0550c955
PA
39532017-04-13 Pedro Alves <palves@redhat.com>
3954
3955 * inferior.c (free_inferior): Convert to ...
3956 (inferior::~inferior): ... this dtor.
3957 (inferior::inferior): New ctor, factored out from ...
3958 (add_inferior_silent): ... here. Allocate the inferior with a new
3959 expression.
3960 (delete_inferior): Call delete instead of free_inferior.
3961 * inferior.h (gdb_environ, continuation): Forward declare.
3962 (inferior): Now a class. Add in-class initialization to all
3963 members. Make boolean fields bool, except 'detaching'.
3964 (inferior::inferior): New explicit ctor.
3965 (inferior::~inferior): New.
3966
e3d60dfc
PA
39672017-04-13 Pedro Alves <palves@redhat.com>
3968
3969 * inferior.c (init_inferior_list): Delete.
3970 * inferior.h (init_inferior_list): Delete.
3971
5fd69d0a
PA
39722017-04-13 Pedro Alves <palves@redhat.com>
3973
3974 PR threads/13217
3975 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
3976 (top level): Call it twice, with different thread sets.
3977
c6609450
PA
39782017-04-13 Pedro Alves <palves@redhat.com>
3979
3980 * thread.c: Include <algorithm>.
3981 (thread_array_cleanup): Delete.
3982 (scoped_inc_dec_ref): New class.
3983 (live_threads_count): New function.
3984 (set_thread_refcount): Delete.
3985 (tp_array_compar_ascending): Now a bool.
3986 (tp_array_compar): Convert to a std::sort comparison function.
3987 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
3988 and live_threads_count.
3989
2a00d7ce
PA
39902017-04-13 Pedro Alves <palves@redhat.com>
3991
3992 * infrun.c (follow_fork_inferior): Also switch the current
3993 inferior.
3994
441d7c93
PA
39952017-04-13 Pedro Alves <palves@redhat.com>
3996
3997 * breakpoint.c (watch_command_1): Save watchpoint-frame info
3998 before calling create_internal_breakpoint.
3999
808480f6
PA
40002017-04-13 Pedro Alves <palves@redhat.com>
4001
4002 * fork-child.c (execv_argv): New class.
4003 (breakup_args): Refactored as ...
4004 (execv_argv::init_for_no_shell): .. this method of execv_argv.
4005 Copy arguments to storage and replace separators with NULL
4006 terminators in place.
4007 (escape_bang_in_quoted_argument): Adjust to return bool.
4008 (execv_argv::execv_argv): New ctor.
4009 (execv_argv::init_for_shell): New method, factored out from
4010 fork_inferior. Don't strdup strings into the vector.
4011 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
4012 Remove free_vector_argv call.
4013
ad3d022a
YQ
40142017-04-13 Yao Qi <yao.qi@linaro.org>
4015
4016 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
4017 tdep->rx_psw_type.
4018
e6ddc3bf
YQ
40192017-04-13 Yao Qi <yao.qi@linaro.org>
4020
4021 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
4022 * rx-tdep.c (rx_gdbarch_init): Likewise.
4023
bfb8cf90
PA
40242017-04-13 Pedro Alves <palves@redhat.com>
4025
4026 * breakpoint.h (struct breakpoint): Reindent.
4027
f5336ca5
PA
40282017-04-13 Pedro Alves <palves@redhat.com>
4029
4030 * breakpoint.c (bp_location): Rename to ...
4031 (bp_locations): ... this. All references updated.
4032 (bp_location_count): Rename to ...
4033 (bp_locations_count): ... this. All references updated.
4034 (bp_location_placed_address_before_address_max): Rename to ...
4035 (bp_locations_placed_address_before_address_max): ... this. All
4036 references updated.
4037 (bp_location_shadow_len_after_address_max): Rename to ...
4038 (bp_locations_shadow_len_after_address_max): ... this. All
4039 references updated.
4040 (bp_location_compare_addrs): Rename to ...
4041 (bp_locations_compare_addrs): ... this. All references updated.
4042 (bp_location_compare):Rename to ...
4043 (bp_locations_compare): ... this. All references updated.
4044 (bp_location_target_extensions_update): Rename to ...
4045 (bp_locations_target_extensions_update): ... this. All references
4046 updated.
4047
be628ab8
SDJ
40482017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4049
4050 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
4051 * common/common.m4: Check headers 'termios.h', 'termio.h' and
4052 'sgtty.h'.
4053 * common/gdb_termios.h: New file, with parts of "terminal.h".
4054 * inflow.c: Include "gdb_termios.h".
4055 * ser-unix.c: Include "gdb_termios.h".
4056 * terminal.h: Move terminal-related defines to
4057 "common/gdb_termios.h".
4058
8e9e35b1
TT
40592017-04-12 Tom Tromey <tom@tromey.com>
4060
4061 * probe.c (parse_probes): Update.
4062 * location.h (delete_event_location): Don't declare.
4063 (event_location_deleter::operator()): Update.
4064 * location.c (event_location_deleter::operator()): Rename from
4065 delete_event_location.
4066 * linespec.h (linespec_result) <location>: Change type to
4067 event_location_up.
4068 * linespec.c (canonicalize_linespec, event_location_to_sals)
4069 (decode_objc): Update.
4070 (linespec_result): Don't call delete_event_location.
4071 * breakpoint.c (create_breakpoints_sal)
4072 (bkpt_probe_create_sals_from_location)
4073 (strace_marker_create_sals_from_location): Update.
4074
16e802b9
TT
40752017-04-12 Tom Tromey <tom@tromey.com>
4076
4077 * linespec.h (struct linespec_result): Add constructor and
4078 destructor.
4079 (init_linespec_result, destroy_linespec_result)
4080 (make_cleanup_destroy_linespec_result): Don't declare.
4081 * linespec.c (init_linespec_result): Remove.
4082 (linespec_result::~linespec_result): Rename from
4083 destroy_linespec_result. Update.
4084 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
4085 Remove.
4086 * breakpoint.c (create_breakpoint, break_range_command)
4087 (decode_location_default): Update.
4088 * ax-gdb.c (agent_command_1): Update.
4089
d28cd78a
TT
40902017-04-12 Tom Tromey <tom@tromey.com>
4091
4092 * remote.c (remote_download_tracepoint): Update.
4093 * python/py-breakpoint.c (bppy_get_location): Update.
4094 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
4095 (gdbscm_breakpoint_location): Update.
4096 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
4097 * breakpoint.h (struct breakpoint) <location, location_range_end>:
4098 Change type to event_location_up.
4099 * breakpoint.c (create_overlay_event_breakpoint)
4100 (create_longjmp_master_breakpoint)
4101 (create_std_terminate_master_breakpoint)
4102 (create_exception_master_breakpoint)
4103 (breakpoint_event_location_empty_p, print_breakpoint_location)
4104 (print_one_breakpoint_location, create_thread_event_breakpoint)
4105 (init_breakpoint_sal, create_breakpoint)
4106 (print_recreate_ranged_breakpoint, break_range_command)
4107 (init_ada_exception_breakpoint, say_where): Update.
4108 (base_breakpoint_dtor): Don't call delete_event_location.
4109 (bkpt_print_recreate, tracepoint_print_recreate)
4110 (dprintf_print_recreate, update_static_tracepoint)
4111 (breakpoint_re_set_default): Update.
4112
711799d5
TT
41132017-04-12 Tom Tromey <tom@tromey.com>
4114
4115 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
4116 type of "to_do". Update.
4117 (compute_stack_depth): Use std::vector.
4118
52d214d3
TT
41192017-04-12 Tom Tromey <tom@tromey.com>
4120
4121 * printcmd.c (find_instruction_backward): Use std::vector.
4122
4c404b8b
TT
41232017-04-12 Tom Tromey <tom@tromey.com>
4124
4125 * symfile.c (objfilep): Remove typedef.
4126 (reread_symbols): Use a std::vector.
4127
156d9eab
TT
41282017-04-12 Tom Tromey <tom@tromey.com>
4129
4130 * mi/mi-main.c (exec_direction_forward): Remove.
4131 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
4132 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4133 scoped_restore.
4134 * guile/guile.c (guile_repl_command, guile_command)
4135 (gdbscm_execute_gdb_command): Use scoped_restore.
4136 * go-exp.y (go_parse): Use scoped_restore.
4137 * d-exp.y (d_parse): Use scoped_restore.
4138 * cli/cli-decode.c (cmd_func): Use scoped_restore.
4139 * c-exp.y (c_parse): Use scoped_restore.
4140
4d89769a
TT
41412017-04-12 Tom Tromey <tom@tromey.com>
4142
4143 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
4144 (mi_parse): Update return type.
4145 (mi_parse_free): Remove.
4146 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
4147 (mi_parse::~mi_parse): Rename from mi_parse_free.
4148 (mi_parse_cleanup): Remove.
4149 (mi_parse): Return a unique_ptr. Use new.
4150 * mi/mi-main.c (mi_execute_command): Update.
4151
4b217cc7
TT
41522017-04-12 Tom Tromey <tom@tromey.com>
4153
4154 * location.c (explicit_location_lex_one): Return a
4155 unique_xmalloc_ptr.
4156 (string_to_explicit_location): Update. Remove cleanups.
4157
59d3651b
TT
41582017-04-12 Tom Tromey <tom@tromey.com>
4159
4160 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
4161 (compare_value_and_voffset): Change type. Update.
4162 (compute_vtable_size): Change type of "offset_vec".
4163 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
4164 (gnuv3_get_typeid): Remove extraneous declaration.
4165
b24b0d6c
TT
41662017-04-12 Tom Tromey <tom@tromey.com>
4167
4168 * charset.h (wchar_iterator): Fix comment.
4169
80a3b8c5
TT
41702017-04-12 Tom Tromey <tom@tromey.com>
4171
4172 * charset.c (iconv_wrapper): New class.
4173 (cleanup_iconv): Remove.
4174 (convert_between_encodings): Use it.
4175
c83dd867
TT
41762017-04-12 Tom Tromey <tom@tromey.com>
4177
4178 * symfile.h (increment_reading_symtab): Update type.
4179 * symfile.c (decrement_reading_symtab): Remove.
4180 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
4181 * psymtab.c (psymtab_to_symtab): Update.
4182 * dwarf2read.c (dw2_instantiate_symtab): Update.
4183
0e8621a0
TT
41842017-04-12 Tom Tromey <tom@tromey.com>
4185
4186 * jit.c (struct jit_reader): Declare separately. Add constructor
4187 and destructor. Change type of "handle".
4188 (loaded_jit_reader): Define separately.
4189 (jit_reader_load): Update. New "new".
4190 (jit_reader_unload_command): Use "delete".
4191 * gdb-dlfcn.h (struct dlclose_deleter): New.
4192 (gdb_dlhandle_up): New typedef.
4193 (gdb_dlopen, gdb_dlsym): Update types.
4194 (gdb_dlclose): Remove.
4195 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
4196 (gdb_dlsym): Change type of "handle".
4197 (make_cleanup_dlclose): Remove.
4198 (dlclose_deleter::operator()): Rename from gdb_dlclose.
4199 * compile/compile-c-support.c (load_libcc): Update.
4200
67d89901
TT
42012017-04-12 Tom Tromey <tom@tromey.com>
4202
4203 * symtab.h (find_pcs_for_symtab_line): Change return type.
4204 * symtab.c (find_pcs_for_symtab_line): Change return type.
4205 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
4206 type of "vec". Update.
4207 (ltpy_get_pcs_for_line): Update.
4208 * linespec.c (decode_digits_ordinary): Update.
4209
93921405
TT
42102017-04-12 Tom Tromey <tom@tromey.com>
4211
4212 * tracepoint.c (actions_command): Update.
4213 * python/python.c (python_command, python_interactive_command):
4214 Update.
4215 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4216 * guile/guile.c (guile_command): Update.
4217 * defs.h (read_command_lines, read_command_lines_1): Return
4218 command_line_up.
4219 (command_lines_deleter): New struct.
4220 (command_line_up): New typedef.
4221 * compile/compile.c (compile_code_command)
4222 (compile_print_command): Update.
4223 * cli/cli-script.h (get_command_line, copy_command_lines): Return
4224 command_line_up.
4225 (make_cleanup_free_command_lines): Remove.
4226 * cli/cli-script.c (get_command_line, read_command_lines_1)
4227 (copy_command_lines): Return command_line_up.
4228 (while_command, if_command, read_command_lines, define_command)
4229 (document_command): Update.
4230 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
4231 Remove.
4232 * breakpoint.h (breakpoint_set_commands): Change type of
4233 "commands".
4234 * breakpoint.c (breakpoint_set_commands): Change type of
4235 "commands". Update.
4236 (do_map_commands_command, update_dprintf_command_list)
4237 (create_tracepoint_from_upload): Update.
4238
ffc2605c
TT
42392017-04-12 Tom Tromey <tom@tromey.com>
4240
4241 * tracepoint.c (scope_info): Update.
4242 * spu-tdep.c (spu_catch_start): Update.
4243 * python/python.c (gdbpy_decode_line): Update.
4244 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
4245 * python/py-breakpoint.c (bppy_init): Update.
4246 * probe.c (parse_probes): Update.
4247 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
4248 * location.h (event_location_deleter): New struct.
4249 (event_location_up): New typedef.
4250 (new_linespec_location, new_address_location, new_probe_location)
4251 (new_explicit_location, copy_event_location)
4252 (string_to_event_location, string_to_event_location_basic)
4253 (string_to_explicit_location): Update return type.
4254 (make_cleanup_delete_event_location): Remove.
4255 * location.c (new_linespec_location, new_address_location)
4256 (new_probe_location, new_explicit_location, copy_event_location):
4257 Return event_location_up.
4258 (delete_event_location_cleanup)
4259 (make_cleanup_delete_event_location): Remove.
4260 (string_to_explicit_location, string_to_event_location_basic)
4261 (string_to_event_location): Return event_location_up.
4262 * linespec.c (canonicalize_linespec, event_location_to_sals)
4263 (decode_line_with_current_source)
4264 (decode_line_with_last_displayed, decode_objc): Update.
4265 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
4266 * completer.c (location_completer): Update.
4267 * cli/cli-cmds.c (edit_command, list_command): Update.
4268 * breakpoint.c (create_overlay_event_breakpoint)
4269 (create_longjmp_master_breakpoint)
4270 (create_std_terminate_master_breakpoint)
4271 (create_exception_master_breakpoint)
4272 (create_thread_event_breakpoint): Update.
4273 (init_breakpoint_sal): Update. Remove some dead code.
4274 (create_breakpoint_sal): Change type of "location". Update.
4275 (create_breakpoints_sal, create_breakpoint, break_command_1)
4276 (dprintf_command, break_range_command, until_break_command)
4277 (init_ada_exception_breakpoint)
4278 (strace_marker_create_sals_from_location)
4279 (update_static_tracepoint, trace_command, ftrace_command)
4280 (strace_command, create_tracepoint_from_upload): Update.
4281 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4282 * ax-gdb.c (agent_command_1): Update.
4283
8f10c932
PA
42842017-04-12 Pedro Alves <palves@redhat.com>
4285
4286 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
4287 * configure.tgt: Handle i[34567]86-*-go32* and
4288 i[34567]86-*-msdosdjgpp*.
4289 * i386-tdep.c (i386_svr4_reg_to_regnum):
4290 Make extern.
4291 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
4292 i386-go32-tdep.c.
4293 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
4294 * i386-go32-tdep.c: New file.
4295 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
4296 declarations.
4297
0a31ccfb
SM
42982017-04-12 Simon Marchi <simon.marchi@ericsson.com>
4299
4300 * aix-thread.c (pd_status2str): Change return type to const char *.
4301
e9bb3fbb
PA
43022017-04-12 Pedro Alves <palves@redhat.com>
4303
4304 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
4305 calls to set_gdbarch_gnu_triplet_regexp.
4306
53375380
PA
43072017-04-12 Pedro Alves <palves@redhat.com>
4308
4309 PR gdb/21323
4310 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
4311 New enum value.
4312 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
4313 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
4314 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
4315 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
4316 * gdbarch.h, gdbarch.c: Regenerate.
4317 * aarch64-tdep.c (aarch64_gdbarch_init): Override
4318 gdbarch_wchar_bit and gdbarch_wchar_signed.
4319 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
4320 * arm-tdep.c (arm_gdbarch_init): Likewise.
4321 * avr-tdep.c (avr_gdbarch_init): Likewise.
4322 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
4323 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
4324 * i386-tdep.c (i386_go32_init_abi): Likewise.
4325 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4326 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4327 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4328 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4329 * sh-tdep.c (sh_gdbarch_init): Likewise.
4330 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4331 * sparc64-tdep.c (sparc64_init_abi): Likewise.
4332 * windows-tdep.c (windows_init_abi): Likewise.
4333 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
4334
53e710ac
PA
43352017-04-12 Pedro Alves <palves@redhat.com>
4336
4337 PR c++/21323
4338 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
4339 cplus_primitive_type_char32_t>: New enum values.
4340 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
4341 and cplus_primitive_type_char32_t.
4342 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
4343 32, use the archtecture's built-in type for char16_t and char32_t,
4344 respectively. Otherwise, fallback to init_integer_type as before,
4345 but make the type unsigned, and issue a complaint.
4346 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
4347
ab0538b8
AH
43482017-04-12 Alan Hayward <alan.hayward@arm.com>
4349
5e0e0422 4350 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
4351 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
4352
5430098f
SDJ
43532017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4354
4355 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
4356 'const char *'.
4357
7c5ded6a
SDJ
43582017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4359
4360 * common/common-utils.c (free_vector_argv): New function.
4361 * common/common-utils.h: Include <vector>.
4362 (free_vector_argv): New prototype.
4363 * darwin-nat.c (darwin_create_inferior): Rewrite function
4364 prototype in order to constify "exec_file" and accept a
4365 "std::string" for "allargs".
4366 * fork-child.c: Include <vector>.
4367 (breakup_args): Rewrite function, using C++.
4368 (fork_inferior): Rewrite function header, constify "exec_file_arg"
4369 and accept "std::string" for "allargs". Update the code to
4370 calculate "argv" based on "allargs". Update calls to "exec_fun"
4371 and "execvp".
4372 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
4373 order to constify "exec_file" and accept a "std::string" for
4374 "allargs".
4375 * go32-nat.c (go32_create_inferior): Likewise.
4376 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
4377 * infcmd.c (run_command_1): Constify "exec_file". Use
4378 "std::string" for inferior arguments.
4379 * inferior.h (fork_inferior): Update prototype.
4380 * linux-nat.c (linux_nat_create_inferior): Rewrite function
4381 prototype in order to constify "exec_file" and accept a
4382 "std::string" for "allargs".
4383 * nto-procfs.c (procfs_create_inferior): Likewise.
4384 * procfs.c (procfs_create_inferior): Likewise.
4385 * remote-sim.c (gdbsim_create_inferior): Likewise.
4386 * remote.c (extended_remote_run): Update code to accept
4387 "std::string" as argument.
4388 (extended_remote_create_inferior): Rewrite function prototype in
4389 order to constify "exec_file" and accept a "std::string" for
4390 "allargs".
4391 * rs6000-nat.c (super_create_inferior): Likewise.
4392 (rs6000_create_inferior): Likewise.
4393 * target.h (struct target_ops) <to_create_inferior>: Likewise.
4394 * windows-nat.c (windows_create_inferior): Likewise.
4395
ae0eee42
PA
43962017-04-11 Pedro Alves <palves@redhat.com>
4397
4398 * thread.c: Fix whitespace throughout.
4399
a6acac06
PR
44002017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
4401
4402 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
4403
64403bd1
AH
44042017-04-11 Alan Hayward <alan.hayward@arm.com>
4405
4406 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
4407
a5bef50f
SDJ
44082017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
4409
4410 PR gdb/21364
4411 * osdata.c (info_osdata): Check if 'type' is an empty string
4412 instead of NULL.
4413
9295a5a9
PA
44142017-04-10 Pedro Alves <palves@redhat.com>
4415
4416 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
4417 (ptid_to_global_thread_id, in_thread_list)
4418 (do_captured_list_thread_ids, set_resumed, set_running)
4419 (set_executing, set_stop_requested, finish_thread_state)
4420 (validate_registers_access, can_access_registers_ptid)
4421 (print_thread_info_1, switch_to_thread)
4422 (do_restore_current_thread_cleanup)
4423 (make_cleanup_restore_current_thread, thread_command)
4424 (thread_name_command): Use operator== instead of ptid_equal.
4425
996812e3
PA
44262017-04-10 Pedro Alves <palves@redhat.com>
4427
4428 * thread.c (struct current_thread_cleanup) <next>: Delete field.
4429 (current_thread_cleanup_chain): Delete.
4430 (restore_current_thread_cleanup_dtor)
4431 (make_cleanup_restore_current_thread): Remove references to
4432 current_thread_cleanup_chain.
4433
845b344f
AH
44342017-04-10 Alan Hayward <alan.hayward@arm.com>
4435
4436 * msp430-tdep.c (msp430_pseudo_register_read): Never return
4437 REG_UNKNOWN.
4438
803bdfe4
YQ
44392017-04-10 Yao Qi <yao.qi@linaro.org>
4440
4441 PR gdb/19942
4442 * gdbthread.h (thread_info::deletable): New method.
4443 (thread_info::incref): New method.
4444 (thread_info::decref): New method.
4445 (thread_info::refcount): Move it to private.
4446 * infrun.c (save_stop_context): Call inc_refcount.
4447 (release_stop_context_cleanup): Likewise.
4448 * thread.c (set_thread_exited): New function.
4449 (init_thread_list): Delete "tp" only it is deletable, otherwise
4450 call set_thread_exited.
4451 (delete_thread_1): Call set_thread_exited.
4452 (current_thread_cleanup) <inferior_pid>: Remove.
4453 <thread>: New field.
4454 (restore_current_thread_ptid_changed): Removed.
4455 (do_restore_current_thread_cleanup): Adjust.
4456 (restore_current_thread_cleanup_dtor): Don't call
4457 find_thread_ptid.
4458 (set_thread_refcount): Use dec_refcount.
4459 (make_cleanup_restore_current_thread): Adjust.
4460 (thread_apply_all_command): Call inc_refcount.
4461 (_initialize_thread): Don't call
4462 observer_attach_thread_ptid_changed.
4463
8c25b497
YQ
44642017-04-10 Yao Qi <yao.qi@linaro.org>
4465
4466 * thread.c (delete_thread_1): Hoist code on marking thread as
4467 exited.
4468
8473b447
SM
44692017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4470
4471 * windows-nat.c (windows_detach): Initialize ptid with
4472 minus_one_ptid.
4473
6670ec13
SM
44742017-04-07 Simon Marchi <simon.marchi@ericsson.com>
4475
4476 * unittests/ptid-selftests.c: Fix erroneous assert messages.
4477
ba2f91bb
AH
44782017-04-07 Alan Hayward <alan.hayward@arm.com>
4479
4480 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
4481 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
4482 (bfin_pseudo_register_write): Likewise
4483
436252de
SM
44842017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4485
4486 * common/ptid.h (struct ptid): Change to...
4487 (class ptid_t): ... this.
4488 <ptid_t>: New constructors.
4489 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
4490 matches>: New methods.
4491 <make_null, make_minus_one>: New static methods.
4492 <pid>: Rename to...
4493 <m_pid>: ...this.
4494 <lwp>: Rename to...
4495 <m_lwp>: ...this.
4496 <tid>: Rename to...
4497 <m_tid>: ...this.
4498 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
4499 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
4500 as references, move comment to class ptid_t.
4501 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
4502 ptid_t static methods.
4503 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
4504 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
4505 Take ptid arguments as references, implement using ptid_t methods.
4506 * unittests/ptid-selftests.c: New file.
4507 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4508 unittests/ptid-selftests.c.
4509 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
4510
0dedf377
TP
45112017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
4512
4513 * python/python.c (python_run_simple_file): Cast mode literal to
4514 non-const char pointer as expected by PyFile_FromString.
4515
4e9868d4
SM
45162017-04-05 Simon Marchi <simon.marchi@ericsson.com>
4517
4518 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
4519 minus_one_ptid and null_ptid.
4520
9bf2a700
PA
45212017-04-05 Pedro Alves <palves@redhat.com>
4522
4523 * warning.m4 (build_warnings): Remove -Wno-write-strings.
4524 * configure: Regenerate.
4525
a121b7c1
PA
45262017-04-05 Pedro Alves <palves@redhat.com>
4527
4528 * ada-exp.y (yyerror): Constify.
4529 * ada-lang.c (bound_name, get_selections)
4530 (ada_variant_discrim_type)
4531 (ada_variant_discrim_name, ada_value_struct_elt)
4532 (ada_lookup_struct_elt_type, is_unchecked_variant)
4533 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
4534 (catch_ada_exception_command_split)
4535 (catch_ada_assert_command_split, catch_assert_command)
4536 (ada_op_name): Constify.
4537 * ada-lang.h (ada_yyerror, get_selections)
4538 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
4539 * arc-tdep.c (arc_print_frame_cache): Constify.
4540 * arm-tdep.c (arm_skip_stub): Constify.
4541 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
4542 (gen_aggregate_elt_ref): Constify.
4543 * bcache.c (print_bcache_statistics): Constify.
4544 * bcache.h (print_bcache_statistics): Constify.
4545 * break-catch-throw.c (catch_exception_command_1):
4546 * breakpoint.c (struct ep_type_description::description):
4547 Constify.
4548 (add_solib_catchpoint): Constify.
4549 (catch_fork_command_1): Add cast.
4550 (add_catch_command): Constify.
4551 * breakpoint.h (add_catch_command, add_solib_catchpoint):
4552 Constify.
4553 * bsd-uthread.c (bsd_uthread_state): Constify.
4554 * buildsym.c (patch_subfile_names): Constify.
4555 * buildsym.h (next_symbol_text_func, patch_subfile_names):
4556 Constify.
4557 * c-exp.y (yyerror): Constify.
4558 (token::oper): Constify.
4559 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
4560 * c-varobj.c (cplus_describe_child): Constify.
4561 * charset.c (find_charset_names): Add cast.
4562 (find_charset_names): Constify array and add const_cast.
4563 * cli/cli-cmds.c (complete_command, cd_command): Constify.
4564 (edit_command): Constify.
4565 * cli/cli-decode.c (lookup_cmd): Constify.
4566 * cli/cli-dump.c (dump_memory_command, dump_value_command):
4567 Constify.
4568 (struct dump_context): Constify.
4569 (add_dump_command, restore_command): Constify.
4570 * cli/cli-script.c (get_command_line): Constify.
4571 * cli/cli-script.h (get_command_line): Constify.
4572 * cli/cli-utils.c (check_for_argument): Constify.
4573 * cli/cli-utils.h (check_for_argument): Constify.
4574 * coff-pe-read.c (struct read_pe_section_data): Constify.
4575 * command.h (lookup_cmd): Constify.
4576 * common/print-utils.c (decimal2str): Constify.
4577 * completer.c (gdb_print_filename): Constify.
4578 * corefile.c (set_gnutarget): Constify.
4579 * cp-name-parser.y (yyerror): Constify.
4580 * cp-valprint.c (cp_print_class_member): Constify.
4581 * cris-tdep.c (cris_register_name, crisv32_register_name):
4582 Constify.
4583 * d-exp.y (yyerror): Constify.
4584 (struct token::oper): Constify.
4585 * d-lang.h (d_yyerror): Constify.
4586 * dbxread.c (struct header_file_location::name): Constify.
4587 (add_old_header_file, add_new_header_file, last_function_name)
4588 (dbx_next_symbol_text, add_bincl_to_list)
4589 (find_corresponding_bincl_psymtab, set_namestring)
4590 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
4591 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
4592 * defs.h (command_line_input, print_address_symbolic)
4593 (deprecated_readline_begin_hook): Constify.
4594 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
4595 Constify.
4596 * event-top.c (handle_line_of_input): Constify and add cast.
4597 * exceptions.c (catch_errors): Constify.
4598 * exceptions.h (catch_errors): Constify.
4599 * expprint.c (print_subexp_standard, op_string, op_name)
4600 (op_name_standard, dump_raw_expression, dump_raw_expression):
4601 * expression.h (op_name, op_string, dump_raw_expression):
4602 Constify.
4603 * f-exp.y (yyerror): Constify.
4604 (struct token::oper): Constify.
4605 (struct f77_boolean_val::name): Constify.
4606 * f-lang.c (f_word_break_characters): Constify.
4607 * f-lang.h (f_yyerror): Constify.
4608 * fork-child.c (fork_inferior): Add cast.
4609 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
4610 (new_variant): Constify.
4611 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
4612 * gdbarch.c: Regenerate.
4613 * gdbcore.h (set_gnutarget): Constify.
4614 * go-exp.y (yyerror): Constify.
4615 (token::oper): Constify.
4616 * go-lang.h (go_yyerror): Constify.
4617 * go32-nat.c (go32_sysinfo): Constify.
4618 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
4619 * guile/scm-cmd.c (cmdscm_function): Constify.
4620 * guile/scm-param.c (pascm_param_value): Constify.
4621 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
4622 (h8300sx_register_name): Constify.
4623 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
4624 Constify.
4625 * ia64-tdep.c (ia64_register_names): Constify.
4626 * infcmd.c (construct_inferior_arguments): Constify.
4627 (path_command, attach_post_wait): Constify.
4628 * language.c (show_range_command, show_case_command)
4629 (unk_lang_error): Constify.
4630 * language.h (language_defn::la_error)
4631 (language_defn::la_name_of_this): Constify.
4632 * linespec.c (decode_line_2): Constify.
4633 * linux-thread-db.c (thread_db_err_str): Constify.
4634 * lm32-tdep.c (lm32_register_name): Constify.
4635 * m2-exp.y (yyerror): Constify.
4636 * m2-lang.h (m2_yyerror): Constify.
4637 * m32r-tdep.c (m32r_register_names): Constify and make static.
4638 * m68hc11-tdep.c (m68hc11_register_names): Constify.
4639 * m88k-tdep.c (m88k_register_name): Constify.
4640 * macroexp.c (appendmem): Constify.
4641 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
4642 (upgrade_type, parse_external, parse_partial_symbols)
4643 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
4644 (new_symbol): Constify.
4645 * memattr.c (mem_info_command): Constify.
4646 * mep-tdep.c (register_name_from_keyword): Constify.
4647 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
4648 Constify.
4649 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
4650 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
4651 * mi/mi-main.c (captured_mi_execute_command): Constify and add
4652 cast.
4653 (mi_execute_async_cli_command): Constify.
4654 * mips-tdep.c (mips_register_name): Constify.
4655 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
4656 (am33_register_name, am33_2_register_name)
4657 * moxie-tdep.c (moxie_register_names): Constify.
4658 * nat/linux-osdata.c (osdata_type): Constify fields.
4659 * nto-tdep.c (nto_parse_redirection): Constify.
4660 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
4661 (lookup_child_selector): Constify.
4662 (objc_methcall::name): Constify.
4663 * objc-lang.h (lookup_objc_class, lookup_child_selector)
4664 (lookup_struct_typedef): Constify.
4665 * objfiles.c (pc_in_section): Constify.
4666 * objfiles.h (pc_in_section): Constify.
4667 * p-exp.y (struct token::oper): Constify.
4668 (yyerror): Constify.
4669 * p-lang.h (pascal_yyerror): Constify.
4670 * parser-defs.h (op_name_standard): Constify.
4671 (op_print::string): Constify.
4672 (exp_descriptor::op_name): Constify.
4673 * printcmd.c (print_address_symbolic): Constify.
4674 * psymtab.c (print_partial_symbols): Constify.
4675 * python/py-breakpoint.c (stop_func): Constify.
4676 (bppy_get_expression): Constify.
4677 * python/py-cmd.c (cmdpy_completer::name): Constify.
4678 (cmdpy_function): Constify.
4679 * python/py-event.c (evpy_add_attribute)
4680 (gdbpy_initialize_event_generic): Constify.
4681 * python/py-event.h (evpy_add_attribute)
4682 (gdbpy_initialize_event_generic): Constify.
4683 * python/py-evts.c (add_new_registry): Constify.
4684 * python/py-finishbreakpoint.c (outofscope_func): Constify.
4685 * python/py-framefilter.c (get_py_iter_from_func): Constify.
4686 * python/py-inferior.c (get_buffer): Add cast.
4687 * python/py-param.c (parm_constant::name): Constify.
4688 * python/py-unwind.c (fprint_frame_id): Constify.
4689 * python/python.c (gdbpy_parameter_value): Constify.
4690 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
4691 * remote.c (memory_packet_config::name): Constify.
4692 (show_packet_config_cmd, remote_write_bytes)
4693 (remote_buffer_add_string):
4694 * reverse.c (exec_reverse_once): Constify.
4695 * rs6000-tdep.c (variant::name, variant::description): Constify.
4696 * rust-exp.y (rustyyerror): Constify.
4697 * rust-lang.c (rust_op_name): Constify.
4698 * rust-lang.h (rustyyerror): Constify.
4699 * serial.h (serial_ops::name): Constify.
4700 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
4701 (sh_sh3e_register_name, sh_sh2e_register_name)
4702 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
4703 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
4704 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
4705 (sh_sh4al_dsp_register_name): Constify.
4706 * sh64-tdep.c (sh64_register_name): Constify.
4707 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
4708 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
4709 * stabsread.c (patch_block_stabs, read_type_number)
4710 (ref_map::stabs, ref_add, process_reference)
4711 (symbol_reference_defined, define_symbol, define_symbol)
4712 (error_type, read_type, read_member_functions, read_cpp_abbrev)
4713 (read_one_struct_field, read_struct_fields, read_baseclasses)
4714 (read_tilde_fields, read_struct_type, read_array_type)
4715 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
4716 (read_huge_number, read_range_type, read_args, common_block_start)
4717 (find_name_end): Constify.
4718 * stabsread.h (common_block_start, define_symbol)
4719 (process_one_symbol, symbol_reference_defined, ref_add):
4720 * symfile.c (get_section_index, add_symbol_file_command):
4721 * symfile.h (get_section_index): Constify.
4722 * target-descriptions.c (tdesc_type::name): Constify.
4723 (tdesc_free_type): Add cast.
4724 * target.c (find_default_run_target):
4725 (add_deprecated_target_alias, find_default_run_target)
4726 (target_announce_detach): Constify.
4727 (do_option): Constify.
4728 * target.h (add_deprecated_target_alias): Constify.
4729 * thread.c (print_thread_info_1): Constify.
4730 * top.c (deprecated_readline_begin_hook, command_line_input):
4731 Constify.
4732 (init_main): Add casts.
4733 * top.h (handle_line_of_input): Constify.
4734 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
4735 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
4736 (tfind_command): Rename to ...
4737 (tfind_command_1): ... this and constify.
4738 (tfind_command): New function.
4739 (tfind_end_command, tfind_start_command): Adjust.
4740 (encode_source_string): Constify.
4741 * tracepoint.h (encode_source_string): Constify.
4742 * tui/tui-data.c (tui_partial_win_by_name): Constify.
4743 * tui/tui-data.h (tui_partial_win_by_name): Constify.
4744 * tui/tui-source.c (tui_set_source_content_nil): Constify.
4745 * tui/tui-source.h (tui_set_source_content_nil): Constify.
4746 * tui/tui-win.c (parse_scrolling_args): Constify.
4747 * tui/tui-windata.c (tui_erase_data_content): Constify.
4748 * tui/tui-windata.h (tui_erase_data_content): Constify.
4749 * tui/tui-winsource.c (tui_erase_source_content): Constify.
4750 * tui/tui.c (tui_enable): Add cast.
4751 * utils.c (defaulted_query): Constify.
4752 (init_page_info): Add cast.
4753 (puts_debug, subset_compare): Constify.
4754 * utils.h (subset_compare): Constify.
4755 * varobj.c (varobj_format_string): Constify.
4756 * varobj.h (varobj_format_string): Constify.
4757 * vax-tdep.c (vax_register_name): Constify.
4758 * windows-nat.c (windows_detach): Constify.
4759 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
4760 * xml-support.c (gdb_xml_end_element): Constify.
4761 * xml-tdesc.c (tdesc_start_reg): Constify.
4762 * xstormy16-tdep.c (xstormy16_register_name): Constify.
4763 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
4764 * xtensa-tdep.h (xtensa_register_t::name): Constify.
4765
995816ba
PA
47662017-04-05 Pedro Alves <palves@redhat.com>
4767
4768 * proc-api.c (struct trans): Constify.
4769 (procfs_note): Constify.
4770 * proc-events.c (struct trans, syscall_table):
4771 * proc-flags.c (struct trans): Constify.
4772 * proc-utils.h (procfs_note): Constify.
4773 * proc-why.c (struct trans): Constify.
4774 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
4775 (procfs_detach): Constify.
4776 * sol-thread.c (struct string_map): Constify.
4777 (td_err_string, td_state_string): Constify.
4778
3e83a920
PA
47792017-04-05 Pedro Alves <palves@redhat.com>
4780
4781 * proc-api.c (procfs_filename): Don't initialize
4782 procfs_filename.
4783 (prepare_to_trace): Assume procfs_filename is non-NULL.
4784 (_initialize_proc_api): Give procfs_filename a default value here.
4785
63160a43
PA
47862017-04-05 Pedro Alves <palves@redhat.com>
4787
4788 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
4789 'cond_string' parameter.
4790 (extract_exception_regexp): Constify 'string' parameter.
4791 (catch_exception_command_1): Constify.
4792 * breakpoint.c (init_catchpoint)
4793 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
4794 parameter.
4795 (ep_parse_optional_if_clause, catch_fork_command_1)
4796 (catch_exec_command_1): Constify.
4797 * breakpoint.h (init_catchpoint): Constify 'cond_string'
4798 parameter.
4799 (ep_parse_optional_if_clause): Constify.
4800 * cli/cli-utils.c (remove_trailing_whitespace)
4801 (check_for_argument): Constify.
4802 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
4803 non-const overload.
4804 (check_for_argument): Likewise.
4805
9b2eba3d
PA
48062017-04-05 Pedro Alves <palves@redhat.com>
4807
4808 * event-top.c (command_line_handler): Add cast to execute_command
4809 call.
4810 * record-btrace.c (cmd_record_btrace_bts_start)
4811 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
4812 (cmd_record_btrace_start): Add cast to execute_command call.
4813 * record-full.c (record_full_goto_insn):
4814 * record.c (record_start, record_stop): Add cast to
4815 execute_command_to_string calls.
4816 (cmd_record_start): Add cast to execute_command calls.
4817
2adadf51
PA
48182017-04-05 Pedro Alves <palves@redhat.com>
4819
4820 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
4821 static inline function.
4822 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
4823 array and use gdb_PyArg_ParseTupleAndKeywords.
4824 * python/py-cmd.c (cmdpy_init): Likewise.
4825 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
4826 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
4827 (infpy_search_memory): Likewise.
4828 * python/py-objfile.c (objfpy_add_separate_debug_file)
4829 (gdbpy_lookup_objfile): Likewise.
4830 * python/py-symbol.c (gdbpy_lookup_symbol)
4831 (gdbpy_lookup_global_symbol): Likewise.
4832 * python/py-type.c (gdbpy_lookup_type): Likewise.
4833 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
4834 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
4835 Likewise.
4836
0d1f4ceb
PA
48372017-04-05 Pedro Alves <palves@redhat.com>
4838
4839 * python/python-internal.h (gdb_PyGetSetDef): New type.
4840 * python/py-block.c (block_object_getset)
4841 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
4842 * python/py-event.c (event_object_getset)
4843 (finish_breakpoint_object_getset): Likewise.
4844 * python/py-inferior.c (inferior_object_getset): Likewise.
4845 * python/py-infthread.c (thread_object_getset): Likewise.
4846 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
4847 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
4848 * python/py-objfile.c (objfile_getset): Likewise.
4849 * python/py-progspace.c (pspace_getset): Likewise.
4850 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
4851 Likewise.
4852 * python/py-record.c (recpy_record_getset): Likewise.
4853 * python/py-symbol.c (symbol_object_getset): Likewise.
4854 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
4855 Likewise.
4856 * python/py-type.c (type_object_getset, field_object_getset):
4857 Likewise.
4858 * python/py-value.c (value_object_getset): Likewise.
4859
4d759979
PA
48602017-04-05 Pedro Alves <palves@redhat.com>
4861
4862 * python/python-internal.h (gdb_PyObject_CallMethod)
4863 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
4864 New functions.
4865 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
4866 (PySys_GetObject, PySys_SetPath): New macros.
4867
fdf9e36f
PA
48682017-04-05 Pedro Alves <palves@redhat.com>
4869
4870 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
4871 info_osdata_command.
4872 * osdata.c (info_osdata_command): Rename to ...
4873 (info_osdata): ... this. Constify 'type' parameter, and remove
4874 the 'from_tty' parameter. Accept NULL TYPE.
4875 (info_osdata_command): New function.
4876 * osdata.h (info_osdata_command): Remove declaration.
4877 (info_osdata): New declaration.
4878
9f33b8b7
PA
48792017-04-05 Pedro Alves <palves@redhat.com>
4880
4881 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
4882 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
4883 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
4884 parameter.
4885 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
4886 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
4887 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
4888 parameter.
4889 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
4890 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
4891 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
4892 (mi_cmd_file_list_exec_source_files)
4893 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
4894 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
4895 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
4896 parameter.
4897 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
4898 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
4899 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
4900 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
4901 (mi_cmd_stack_info_frame): Constify 'command' parameter.
4902 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
4903 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
4904 'command' parameter.
4905 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
4906 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
4907 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
4908 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
4909 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
4910 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
4911 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
4912 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
4913 (mi_cmd_var_set_update_range): Constify 'command' parameter.
4914 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
4915 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
4916 parameter.
4917 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
4918 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
4919 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
4920 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
4921 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
4922 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
4923 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
4924 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
4925 (mi_cmd_data_list_changed_registers)
4926 (mi_cmd_data_write_register_values)
4927 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
4928 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
4929 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
4930 (mi_cmd_list_features, mi_cmd_list_target_features)
4931 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
4932 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
4933 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
4934 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
4935 (mi_cmd_trace_frame_collected): Constify 'command'
4936 parameter.
4937 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
4938 'command' parameter.
4939
67cb5b2d
PA
49402017-04-05 Pedro Alves <palves@redhat.com>
4941
4942 * ada-lang.c (ada_completer_word_break_characters): Now a const
4943 array.
4944 (ada_get_gdb_completer_word_break_characters): Constify.
4945 * completer.c (gdb_completer_command_word_break_characters)
4946 (gdb_completer_file_name_break_characters)
4947 (gdb_completer_quote_characters): Now const arrays.
4948 (get_gdb_completer_quote_characters): Constify.
4949 (set_rl_completer_word_break_characters): New function.
4950 (set_gdb_completion_word_break_characters)
4951 (complete_line_internal): Use it.
4952 * completer.h (get_gdb_completer_quote_characters): Constify.
4953 (set_rl_completer_word_break_characters): Declare.
4954 * f-lang.c (f_word_break_characters): Constify.
4955 * language.c (default_word_break_characters): Constify.
4956 * language.h (language_defn::la_word_break_characters): Constify.
4957 (default_word_break_characters): Constify.
4958 * top.c (init_main): Use set_rl_completer_word_break_characters.
4959
7a114964
PA
49602017-04-05 Pedro Alves <palves@redhat.com>
4961
4962 * aix-thread.c (aix_thread_pid_to_str)
4963 (aix_thread_extra_thread_info): Constify.
4964 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
4965 * bsd-uthread.c (bsd_uthread_extra_thread_info)
4966 (bsd_uthread_pid_to_str): Constify.
4967 * corelow.c (core_pid_to_str): Constify.
4968 * darwin-nat.c (darwin_pid_to_str): Constify.
4969 * fbsd-nat.c (fbsd_pid_to_str): Constify.
4970 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
4971 Constify.
4972 * gnu-nat.c (gnu_pid_to_str): Constify.
4973 * go32-nat.c (go32_pid_to_str): Constify.
4974 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
4975 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
4976 * inferior.c (inferior_pid_to_str): Constify.
4977 * linux-nat.c (linux_nat_pid_to_str): Constify.
4978 * linux-tdep.c (linux_core_pid_to_str): Constify.
4979 * linux-thread-db.c (thread_db_pid_to_str)
4980 (thread_db_extra_thread_info): Constify.
4981 * nto-tdep.c (nto_extra_thread_info): Constify.
4982 * nto-tdep.h (nto_extra_thread_info): Constify.
4983 * obsd-nat.c (obsd_pid_to_str): Constify.
4984 * procfs.c (procfs_pid_to_str): Constify.
4985 * ravenscar-thread.c (ravenscar_extra_thread_info)
4986 (ravenscar_pid_to_str): Constify.
4987 * remote-sim.c (gdbsim_pid_to_str): Constify.
4988 * remote.c (remote_threads_extra_info, remote_pid_to_str):
4989 Constify.
4990 * sol-thread.c (solaris_pid_to_str): Constify.
4991 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
4992 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
4993 * target.c (default_pid_to_str, target_pid_to_str)
4994 (normal_pid_to_str, default_pid_to_str): Constify.
4995 * target.h (target_ops::to_pid_to_str)
4996 (target_ops::to_extra_thread_info): Constify.
4997 (target_pid_to_str, normal_pid_to_str): Constify.
4998 * windows-nat.c (windows_pid_to_str): Constify.
4999 * gdbarch.sh (core_pid_to_str): Constify.
5000 * target-delegates.c: Regenerate.
5001 * gdbarch.h, gdbarch.c: Regenerate.
5002
69bbf465
PA
50032017-04-05 Pedro Alves <palves@redhat.com>
5004
5005 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
5006 the memory of the temporary warning_pre_print override.
5007 * utils.c (warning_pre_print): Constify.
5008 * utils.h (warning_pre_print): Constify.
5009
be47f9e8
PA
50102017-04-05 Pedro Alves <palves@redhat.com>
5011
5012 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
5013 (shell_command): New function.
5014 (make_command): Use std::string.
5015 (init_cli_cmds): Register shell_command instead of shell_escape.
5016
bde6261a
PA
50172017-04-05 Pedro Alves <palves@redhat.com>
5018
5019 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
5020 * tracepoint.c (default_collect): Don't initialize.
5021
b38ef47f
PA
50222017-04-05 Pedro Alves <palves@redhat.com>
5023
5024 * macroexp.c (macro_buffer::shared): Now a bool.
5025 (init_buffer): Update.
5026 (init_shared_buffer): Constify 'addr' parameter.
5027 (substitute_args, expand, macro_expand, macro_expand_next): Remove
5028 casts.
5029
f995bbe8
PA
50302017-04-05 Pedro Alves <palves@redhat.com>
5031
5032 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
5033 * disasm.c (set_disassembler_options): Constify local.
5034 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
5035
4a596fe2
SDJ
50362017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
5037
5038 PR gdb/21352
5039 * tracefile.c (tsave_command): Fix argument parsing for '-r'
5040 option.
5041
2cad08ea
YQ
50422017-04-05 Yao Qi <yao.qi@linaro.org>
5043
5044 * frame.c (frame_unwind_register_unsigned): Call
5045 frame_unwind_register_value.
5046
55a98976
YQ
50472017-04-05 Yao Qi <yao.qi@linaro.org>
5048
5049 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
5050 Use gdb_test_multiple, and don't match anchor.
5051
4ac40124
PA
50522017-04-05 Pedro Alves <palves@redhat.com>
5053
5054 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
5055 (Write After Approval): Remove Simon Marchi.
5056
c053b654
PA
50572017-04-05 Pedro Alves <palves@redhat.com>
5058
5059 * common/gdb_optional.h (optional::optional): Make constexpr and
5060 initialize m_dummy.
5061
4c7bf4f9
JB
50622017-04-04 John Baldwin <jhb@FreeBSD.org>
5063
5064 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
5065 (amd64fbsd_jmp_buf_reg_offset): Remove.
5066 (amd64fbsd_supply_uthread): Remove function.
5067 (amd64fbsd_collect_uthread): Remove function.
5068 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
5069 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
5070 (x86_64-*-freebsd*): Remove bsd-uthread.o.
5071 (fbsd-nat.c): Update comment.
5072 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
5073 (i386fbsd_jmp_buf_reg_offset): Remove.
5074 (i386fbsd_supply_uthread): Remove function.
5075 (i386fbsd_collect_uthread): Remove function.
5076 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
5077
1e1a8bef
JB
50782017-04-04 John Baldwin <jhb@FreeBSD.org>
5079
5080 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
5081 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
5082 * NEWS: Mention that support for FreeBSD/alpha was removed.
5083 * alpha-fbsd-tdep.c: Delete file.
5084 * config/alpha/fbsd.mh: Delete file.
5085 * configure.host: Delete alpha*-*-freebsd* and
5086 alpha*-*-kfreebsd*-gnu.
5087 * configure.tgt: Delete alpha*-*-freebsd* and
5088 alpha*-*-kfreebsd*-gnu.
5089
49907934
JB
50902017-04-04 John Baldwin <jhb@FreeBSD.org>
5091
5092 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
5093 amd64bsd_store_inferior_registers): Use ptid from regcache.
5094
6f77053d
PA
50952017-04-04 Pedro Alves <palves@redhat.com>
5096
5097 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
5098 data fields, make them private and add "m_" prefixes.
5099 (lnp_state_machine::lnp_state_machine): New ctor.
5100 (record_line, check_line_address, handle_set_discriminator)
5101 (handle_set_address, handle_advance_pc, handle_special_opcode)
5102 (handle_advance_line, handle_set_file, handle_negate_stmt)
5103 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
5104 (end_sequence, advance_line): New methods.
5105 (m_gdbarch, m_record_lines_p): New fields.
5106 (lnp_reader_state): Delete.
5107 (dwarf_record_line): Rename to ...
5108 (lnp_state_machine::record_line): ... adjust.
5109 (init_lnp_state_machine): Delete.
5110 (lnp_state_machine::lnp_state_machine): New.
5111 (check_line_address): Rename to ...
5112 (lnp_state_machine::check_line_address): This.
5113 (dwarf_decode_lines_1): Remove reference to "reader_state".
5114 Adjust lnp_state_machine having a non-default ctor. Use bool.
5115 State machine internal state manipulation moved to
5116 lnp_state_machine methods.
5117
9c541725
PA
51182017-04-04 Pedro Alves <palves@redhat.com>
5119
5120 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5121 unittests/offset-type-selftests.c.
5122 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
5123 * common/offset-type.h: New file.
5124 * common/preprocessor.h: New file.
5125 * common/traits.h: New file.
5126 * common/valid-expr.h: New file.
5127 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
5128 sect_offset and cu_offset strong typedefs throughout.
5129 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
5130 typedefs throughout.
5131 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
5132 sect_offset and cu_offset strong typedefs throughout.
5133 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
5134 typedefs throughout.
5135 * gdbtypes.h: Include "common/offset-type.h".
5136 (cu_offset): Now an offset type (strong typedef) instead of a
5137 struct.
5138 (sect_offset): Likewise.
5139 (union call_site_parameter_u): Rename "param_offset" field to
5140 "param_cu_off".
5141 * unittests/offset-type-selftests.c: New file.
5142
ecfb656c
PA
51432017-04-04 Pedro Alves <palves@redhat.com>
5144
5145 * common/underlying.h: New file.
5146 * dwarf2read.c: Include "common/gdb_optional.h" and
5147 "common/underlying.h".
5148 (dir_index, file_name_index): New types.
5149 (file_entry): Use them.
5150 (file_entry::include): Use to_underlying.
5151 (line_header::add_file_name): Use dir_index.
5152 (read_formatted_entries): Use gdb::optional. Read form before
5153 writting to file_entry.
5154 (dwarf_decode_line_header): Use dir_index.
5155 (lnp_state_machine::current_file): Use to_underlying.
5156 (lnp_state_machine::file): Change type to file_name_index.
5157 (dwarf_record_line): Use to_underlying.
5158 (init_lnp_state_machine): Use file_name_index.
5159 (dwarf_decode_lines_1): Use dir_index and file_name_index.
5160
d194f1fe
PA
51612017-04-04 Pedro Alves <palves@redhat.com>
5162
5163 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
5164 operator bool, has_value and get methods.
5165
fff8551c
PA
51662017-04-04 Pedro Alves <palves@redhat.com>
5167
5168 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
5169 fields.
5170 (line_header): Initialize all data fields. Change type of
5171 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
5172 Change type of include_dirs to std::vector<const char *>. Remove
5173 num_include_dirs, include_dirs_size. Change type of file_names to
5174 std::vector<file_entry>. Remove num_file_names, file_names_size.
5175 (line_header::line_header): New.
5176 (line_header::add_include_dir, line_header::add_file_name): New
5177 methods.
5178 (line_header::include_dir_at): Remove NULL check.
5179 (line_header::file_name_at): Add const overload.
5180 (line_header_up): New unique_ptr typedef.
5181 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
5182 std::vector. Remove free_line_header call.
5183 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
5184 free_line_header call.
5185 (free_cu_line_header): Delete.
5186 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
5187 (setup_type_unit_groups): Use line_header_up instead of cleanups.
5188 Adjust to use std::vector.
5189 (free_line_header): Delete.
5190 (free_line_header_voidp): Use delete.
5191 (add_include_dir): Replace with ...
5192 (line_header::add_include_dir): ... this method. Use std::vector.
5193 (add_file_name): Replace with ...
5194 (line_header::add_file_name): ... this method. Use std::vector.
5195 (add_include_dir_stub): Delete.
5196 (read_formatted_entries): Remove memset.
5197 (dwarf_decode_line_header): Return a line_header_up instead of a
5198 raw pointer. Remove cleanup handling. Pass lambdas to
5199 read_formatted_entries. Adjust to use line_header methods.
5200 (dwarf_decode_lines_1): Adjust to use line_header methods.
5201 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
5202 use std::vector.
5203
d62a8ae2
SM
52042017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
5205
5206 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
5207 instead of struct ptid.
5208
db3a1dc7
AH
52092017-05-04 Alan Hayward <alan.hayward@arm.com>
5210
5211 * frame.c (get_frame_register_bytes): Unwind using value.
5212 (put_frame_register_bytes): Likewise.
5213
b1b45502
IB
52142017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
5215
5216 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
5217 aggregate-like.
5218
ec13808e
JK
52192017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
5220
5221 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
5222
12316564
YQ
52232017-03-29 Yao Qi <yao.qi@linaro.org>
5224
5225 * gdbthread.h (struct thread_info): Declare constructor and
5226 destructor. Add some in-class member initializers.
5227 * thread.c (free_thread): Remove.
5228 (init_thread_list): Call delete instead of free_thread.
5229 (new_thread): Call thread_info constructor.
5230 (thread_info::thread_info): New function.
5231 (thread_info::~thread_info): New function.
5232 (delete_thread_1): Call delete instead of free_thread.
5233 (make_cleanup_restore_current_thread): Move tp and frame to
5234 inner block.
5235
fe5f7374
AK
52362017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
5237
5238 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
5239 (arc_skip_prologue): Likewise.
5240 (arc_make_frame_cache): Likewise.
5241 (arc_pv_get_operand): New function.
5242 (arc_is_in_prologue): Likewise.
5243 (arc_analyze_prologue): Likewise.
5244 (arc_print_frame_cache): Likewise.
5245 (MAX_PROLOGUE_LENGTH): New constant.
5246
eea78757
AK
52472017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
5248
5249 * configure.tgt: Add arc-insn.o.
5250 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
5251 (dump_arc_instruction_command): New function.
5252 (arc_fprintf_disasm): Likewise.
5253 (arc_disassemble_info): Likewise.
5254 (arc_insn_get_operand_value): Likewise.
5255 (arc_insn_get_operand_value_signed): Likewise.
5256 (arc_insn_get_memory_base_reg): Likewise.
5257 (arc_insn_get_memory_offset): Likewise.
5258 (arc_insn_get_branch_target): Likewise.
5259 (arc_insn_dump): Likewise.
5260 (arc_insn_get_linear_next_pc): Likewise.
5261 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
5262 (arc_disassemble_info): Likewise.
5263 (arc_insn_get_branch_target): Likewise.
5264 (arc_insn_get_linear_next_pc): Likewise.
5265 * NEWS: Mention new "maint print arc arc-instruction".
5266
3be78afd
AK
52672017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
5268
5269 * arc-tdep (maintenance_print_arc_list): New variable.
5270 (maintenance_print_arc_command): New function.
5271
296ec4fa
AK
52722017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
5273
5274 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
5275 Add "limm" and "reserved".
5276 (arc_cannot_fetch_register, arc_cannot_store_register): Add
5277 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
5278 * arc-tdep.h (arc_regnum): Likewise.
5279
f74f865e
MF
52802017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5281
5282 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
5283 for THREADPTR register.
5284 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
5285 register.
5286 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
5287 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
5288 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
5289
0d0bf81a
MF
52902017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5291
5292 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
5293 registers above gdbarch_num_regs (gdbarch) as privileged in
5294 call0 ABI.
5295
0ce4291e
MF
52962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5297
5298 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
5299 for a single specified register or for all registers in
5300 a0_base..a0_base + C0_NREGS range.
5301 (supply_gregset_reg): Call regcache_raw_supply for a single
5302 specified register or for all registers in a0_base..a0_base +
5303 C0_NREGS range.
5304
c56054f9
MF
53052017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5306
5307 * arch/xtensa.h (C0_NREGS): Add definition.
5308 * xtensa-tdep.c (C0_NREGS): Remove definition.
5309
a4398628
MF
53102017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5311
5312 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
5313 Drop xtensa_default_isa initialization.
5314 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
5315
8c43009f
PA
53162017-03-27 Pedro Alves <palves@redhat.com>
5317
5318 * dwarf2read.c (file_entry) <dir_index>: Add comment.
5319 (file_entry::include_dir): New method.
5320 (line_header::include_dir_at, line_header::file_name_at): New
5321 methods.
5322 (setup_type_unit_groups, setup_type_unit_groups)
5323 (psymtab_include_file_name): Simplify using the new methods.
5324 (lnp_state_machine) <the_line_header>: New field.
5325 <file>: Add comment.
5326 (lnp_state_machine::current_file): New method.
5327 (dwarf_record_line): Simplify using the new methods.
5328 (init_lnp_state_machine): Initialize the "the_line_header" field.
5329 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
5330 Simplify using the new methods.
5331
a7e80b9e
PA
53322017-03-27 Pedro Alves <palves@redhat.com>
5333
5334 * cp-name-parser.y (make_empty): Delete.
5335 (demangler_special, nested_name, ptr_operator, array_indicator)
5336 (direct_declarator, declarator_1): Use fill_comp instead of
5337 make_empty.
5338
21047726
PA
53392017-03-27 Pedro Alves <palves@redhat.com>
5340
5341 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
5342 to ATTRIBUTE_PRINTF.
5343 * solib-target.c (library_list_start_list): Print "string" not
5344 "version".
5345 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
5346 gdb_xml_error call.
5347
d721ba37
PA
53482017-03-27 Pedro Alves <palves@redhat.com>
5349
5350 * dwarf2read.c (struct file_and_directory): New.
5351 (dwarf2_get_dwz_file): Adjust to use std::string.
5352 (dw2_get_file_names_reader): Adjust to use file_and_directory.
5353 (find_file_and_directory): Adjust to return a file_and_directory
5354 object.
5355 (read_file_scope): Adjust to use file_and_directory. Remove
5356 make_cleanup/do_cleanups calls.
5357 (open_and_init_dwp_file): Adjust to use std::string. Remove
5358 make_cleanup/do_cleanups calls.
5359 * python/python.c (do_start_initialization): Adjust to ldirname
5360 returning a std::string.
5361 * utils.c (ldirname): Now returns a std::string.
5362 * utils.h (ldirname): Change return type to std::string.
5363 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
5364 returning a std::string.
5365 * xml-tdesc.c (file_read_description_xml): Likewise.
5366
ed771251
AH
53672017-03-24 Alan Hayward <alan.hayward@arm.com>
5368
5369 * regcache.c (regcache_debug_print_register): New function.
5370 * regcache.h (regcache_debug_print_register): New declaration.
5371 * target.c (debug_print_register): Remove.
5372 (target_fetch_registers): Call regcache_debug_print_register.
5373 (target_store_registers): Likewise.
5374
568c1b9f
PB
53752017-03-24 Pádraig Brady <pbrady@fb.com>
5376
5377 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
5378 reference beyond the 'lh->include_dirs' array before accessing to
5379 it.
5380 (psymtab_include_file_name): Likewise.
5381 (dwarf_decode_lines_1): Likewise.
5382 (dwarf_decode_lines): Likewise.
5383 (file_file_name): Likewise.
5384
3e00d44f
SM
53852017-03-23 Simon Marchi <simon.marchi@ericsson.com>
5386
5387 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
5388 inferior_ptid.
5389 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
5390 ps_lsetfpregs): Likewise.
5391 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
5392 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
5393 ps_lsetfpregs): Likewise.
5394 * target.c (target_fetch_registers, target_store_registers):
5395 Remove asserts.
5396
077ae656
AH
53972017-03-23 Alan Hayward <alan.hayward@arm.com>
5398
5399 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
5400
1e2b521d
YQ
54012017-03-23 Yao Qi <yao.qi@linaro.org>
5402
5403 * aarch64-tdep.c (aarch64_process_record_test): Declare.
5404 (_initialize_aarch64_tdep): Register it.
5405 (aarch64_record_load_store): Handle PRFM instruction.
5406 (aarch64_process_record_test): New function.
5407
33877125
YQ
54082017-03-23 Yao Qi <yao.qi@linaro.org>
5409
5410 * aarch64-tdep.c (aarch64_record_load_store): Fix code
5411 indentation.
5412
a0eef940
YQ
54132017-03-23 Yao Qi <yao.qi@linaro.org>
5414
5415 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
5416
3f2a3564
PR
54172017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5418
5419 python/python.c (do_start_initialization): Fix memory leak.
5420
b67aeab0
SM
54212017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5422
5423 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
5424 using get_ptrace_pid.
5425 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
5426 inferior_ptid.
5427 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
5428 inferior_ptid instead of pid.
5429
ffdbe864
YQ
54302017-03-22 Yao Qi <yao.qi@linaro.org>
5431
5432 * aarch64-tdep.c: Wrap locally used classes in anonymous
5433 namespace.
5434 * arm-tdep.c: Likewise.
5435 * linespec.c: Likewise.
5436 * ui-out.c: Likewise.
5437
9d736fbf
JG
54382017-03-22 Jonah Graham <jonah@kichwacoders.com>
5439
5440 PR gdb/19637
5441 * python/lib/gdb/printer/bound_registers.py: Import sys.
5442
3de88e9a
SM
54432017-03-21 Simon Marchi <simon.marchi@ericsson.com>
5444
5445 * windows-nat.c (do_windows_fetch_inferior_registers): Add
5446 windows_thread_info parameter and use it instead of
5447 current_thread.
5448 (windows_fetch_inferior_registers): Don't set current_thread,
5449 pass the thread to do_windows_fetch_inferior_registers. Use
5450 ptid from regcache instead of inferior_ptid.
5451 (do_windows_store_inferior_registers): Add windows_thread_info
5452 parameter and use it instead of current_thread.
5453 (windows_store_inferior_registers): Don't set current_thread,
5454 pass the thread to do_windows_store_inferior_registers. Use
5455 ptid from regcache instead of inferior_ptid.
5456
0e7b8f61
SM
54572017-03-21 Simon Marchi <simon.marchi@ericsson.com>
5458
5459 * ser-mingw.c (ser_windows_raw): Remove reference to
5460 struct serial::current_timeout.
5461
5badf10a
IR
54622017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
5463
5464 PR tdep/20928
5465 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
5466 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
5467 (sparc64_fsr_type): Fix %fsr decoding.
5468
cee59b3f
TW
54692017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
5470
5471 * python/py-record-btrace.c (btpy_insn_data): Change return type
5472 for Python 2.
5473
639a9038
SM
54742017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
5475
5476 * spu-linux-nat.c (spu_fetch_inferior_registers,
5477 spu_store_inferior_registers): Use ptid from regcache, set and
5478 restore inferior_ptid.
5479 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
5480 Likewise.
5481
bcc0c096
SM
54822017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
5483
5484 * i386-linux-nat.c (fetch_register, store_register,
5485 i386_linux_fetch_inferior_registers,
5486 i386_linux_store_inferior_registers): Use ptid from regcache.
5487 * ia64-linux-nat.c (ia64_linux_fetch_register,
5488 ia64_linux_store_register): Likewise.
5489 * inf-ptrace.c (inf_ptrace_fetch_register,
5490 inf_ptrace_store_register): Likewise.
5491 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
5492 m32r_linux_store_inferior_registers): Likewise.
5493 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
5494 m68kbsd_store_inferior_registers): Likewise.
5495 * m68k-linux-nat.c (fetch_register, store_register,
5496 m68k_linux_fetch_inferior_registers,
5497 m68k_linux_store_inferior_registers): Likewise.
5498 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
5499 m88kbsd_store_inferior_registers): Likewise.
5500 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
5501 mips_fbsd_store_inferior_registers): Likewise.
5502 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
5503 mips64_linux_regsets_store_registers): Likewise.
5504 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
5505 mipsnbsd_store_inferior_registers): Likewise.
5506 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
5507 mips64obsd_store_inferior_registers): Likewise.
5508 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
5509 Likewise.
5510 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
5511 ppcfbsd_store_inferior_registers): Likewise.
5512 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
5513 ppc_linux_store_inferior_registers): Likewise.
5514 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
5515 ppcnbsd_store_inferior_registers): Likewise.
5516 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
5517 ppcobsd_store_registers): Likewise.
5518 * procfs.c (procfs_fetch_registers, procfs_store_registers):
5519 Likewise.
5520 * ravenscar-thread.c (ravenscar_fetch_registers,
5521 ravenscar_store_registers, ravenscar_prepare_to_store):
5522 Likewise.
5523 * record-btrace.c (record_btrace_fetch_registers,
5524 record_btrace_store_registers, record_btrace_prepare_to_store):
5525 Likewise.
5526 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
5527 Lookup inferior using ptid from regcache, instead of
5528 current_inferior.
5529 * remote.c (remote_fetch_registers, remote_store_registers): Use
5530 ptid from regcache.
5531 * rs6000-nat.c (fetch_register, store_register): Likewise.
5532 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
5533 s390_linux_store_inferior_registers): Likewise.
5534 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
5535 shnbsd_store_inferior_registers): Likewise.
5536 * sol-thread.c (sol_thread_fetch_registers,
5537 sol_thread_store_registers): Likewise.
5538 * sparc-nat.c (sparc_fetch_inferior_registers,
5539 sparc_store_inferior_registers): Likewise.
5540 * tilegx-linux-nat.c (fetch_inferior_registers,
5541 store_inferior_registers): Likewise.
5542 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
5543 vaxbsd_store_inferior_registers): Likewise.
5544 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
5545 store_xtregs): Likewise.
5546
c0f55cc6
AV
55472017-03-20 Artemiy Volkov <artemiyv@acm.org>
5548
5549 PR gdb/14441
5550 * NEWS: Mention support for rvalue references in GDB and python.
5551 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
5552 supports both lvalue and rvalue references.
5553
15c0a2a9
AV
55542017-03-20 Artemiy Volkov <artemiyv@acm.org>
5555
5556 PR gdb/14441
5557 * gdbtypes.c (rank_one_type): Implement overloading
5558 resolution rules regarding rvalue references.
5559
aa006118
AV
55602017-03-20 Artemiy Volkov <artemiyv@acm.org>
5561
5562 PR gdb/14441
5563 * aarch64-tdep.c (aarch64_type_align)
5564 (aarch64_extract_return_value, aarch64_store_return_value): Change
5565 lvalue reference type checks to general reference type checks.
5566 * amd64-tdep.c (amd64_classify): Likewise.
5567 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
5568 Likewise.
5569 * arm-tdep.c (arm_type_align, arm_extract_return_value)
5570 (arm_store_return_value): Likewise.
5571 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
5572 * c-typeprint.c (c_print_type): Likewise.
5573 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
5574 (cplus_number_of_children, cplus_describe_child): Likewise.
5575 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
5576 * completer.c (expression_completer): Likewise.
5577 * cp-support.c (make_symbol_overload_list_adl_namespace):
5578 Likewise.
5579 * darwin-nat-info.c (info_mach_region_command): Likewise.
5580 * dwarf2loc.c (entry_data_value_coerce_ref)
5581 (value_of_dwarf_reg_entry): Likewise.
5582 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
5583 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
5584 Likewise.
5585 * findvar.c (extract_typed_address, store_typed_address):
5586 Likewise.
5587 * gdbtypes.c (rank_one_type): Likewise.
5588 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
5589 * infcall.c (value_arg_coerce): Likewise.
5590 * language.c (pointer_type): Likewise.
5591 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
5592 Likewise.
5593 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
5594 * mn10300-tdep.c (mn10300_type_align): Likewise.
5595 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
5596 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
5597 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
5598 Likewise.
5599 * printcmd.c (print_formatted, x_command): Likewise.
5600 * python/py-type.c (typy_get_composite, typy_template_argument):
5601 Likewise.
5602 * python/py-value.c (valpy_referenced_value)
5603 (valpy_get_dynamic_type, value_has_field): Likewise.
5604 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
5605 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
5606 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
5607 * spu-tdep.c (spu_scalar_value_p): Likewise.
5608 * symtab.c (lookup_symbol_aux): Likewise.
5609 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
5610 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
5611 Likewise.
5612 * valops.c (value_cast_pointers, value_cast)
5613 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
5614 (value_struct_elt, value_struct_elt_bitpos)
5615 (value_find_oload_method_list, find_overload_match)
5616 (value_rtti_indirect_type): Likewise.
5617 * valprint.c (val_print_scalar_type_p, generic_val_print):
5618 Likewise.
5619 * value.c (value_actual_type, value_as_address, unpack_long)
5620 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
5621 (coerce_ref): Likewise.
5622 * varobj.c (varobj_get_value_type): Likewise.
5623
3fcf899d
AV
56242017-03-20 Artemiy Volkov <artemiyv@acm.org>
5625
5626 PR gdb/14441
5627 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
5628 table of constants.
5629 * python/lib/gdb/command/explore.py: Support exploring values
5630 of rvalue reference types.
5631 * python/lib/gdb/types.py: Implement get_basic_type() for
5632 rvalue reference types.
5633 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
5634 constant.
5635 * python/py-value.c (valpy_getitem): Add an rvalue reference
5636 check.
5637 (valpy_reference_value): Add new parameter "refcode".
5638 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
5639 New wrappers for valpy_reference_value().
5640 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
5641 (gdbpy_invoke_xmethod): Likewise.
5642
4297a3f0
AV
56432017-03-20 Artemiy Volkov <artemiyv@acm.org>
5644
5645 PR gdb/14441
5646 * dwarf2read.c (process_die, read_type_die_1): Handle the
5647 DW_TAG_rvalue_reference_type DIE.
5648 (read_tag_reference_type): Add new parameter "refcode".
5649
e1cb3213
AV
56502017-03-20 Artemiy Volkov <artemiyv@acm.org>
5651
5652 PR gdb/14441
5653 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
5654 (c_type_print_modifier, c_type_print_varspec_suffix)
5655 (c_type_print_base): Support printing rvalue reference types.
5656 * c-valprint.c (c_val_print, c_value_print): Support printing
5657 rvalue reference values.
5658
e4347c89
AV
56592017-03-20 Artemiy Volkov <artemiyv@acm.org>
5660
5661 PR gdb/14441
5662 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
5663 typename.
5664 * cp-support.c (replace_typedefs): Handle
5665 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
5666 * python/py-type.c (typy_lookup_type): Likewise.
5667
53cc15f5
AV
56682017-03-20 Artemiy Volkov <artemiyv@acm.org>
5669
5670 PR gdb/14441
5671 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
5672 * parse.c (insert_type): Change assert statement.
5673 (follow_types): Handle rvalue reference types.
5674 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
5675 constant.
5676
a65cfae5
AV
56772017-03-20 Artemiy Volkov <artemiyv@acm.org>
5678
5679 PR gdb/14441
5680 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
5681 value_ref() interface.
5682 * c-valprint.c (c_value_print): Likewise.
5683 * infcall.c (value_arg_coerce): Likewise.
5684 * python/py-value.c (valpy_reference_value): Likewise.
5685 * valops.c (value_cast, value_reinterpret_cast)
5686 (value_dynamic_cast, typecmp): Likewise.
5687 (value_ref): Parameterize by kind of return value reference type.
5688 * value.h (value_ref): Add new parameter "refcode".
5689
3b224330
AV
56902017-03-20 Artemiy Volkov <artemiyv@acm.org>
5691
5692 PR gdb/14441
5693 * dwarf2read.c (read_tag_reference_type): Use
5694 lookup_lvalue_reference_type() instead of lookup_reference_type().
5695 * eval.c (evaluate_subexp_standard): Likewise.
5696 * f-exp.y: Likewise.
5697 * gdbtypes.c (make_reference_type, lookup_reference_type):
5698 Generalize with rvalue reference types.
5699 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
5700 convenience wrappers for lookup_reference_type().
5701 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
5702 reference kind parameter.
5703 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
5704 wrappers for lookup_reference_type().
5705 * guile/scm-type.c (gdbscm_type_reference): Use
5706 lookup_lvalue_reference_type() instead of lookup_reference_type().
5707 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
5708 * parse.c (follow_types): Likewise.
5709 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
5710 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
5711 Likewise.
5712 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
5713 (gdbpy_invoke_xmethod): Likewise.
5714 * stabsread.c: Provide extra argument to make_reference_type()
5715 call.
5716 * valops.c (value_ref, value_rtti_indirect_type): Use
5717 lookup_lvalue_reference_type() instead of lookup_reference_type().
5718
f9aeb8d4
AV
57192017-03-20 Artemiy Volkov <artemiyv@acm.org>
5720
5721 PR gdb/14441
5722 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
5723 (TYPE_IS_REFERENCE): New macro.
5724 (struct type): Add rvalue_reference_type field.
5725 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
5726
51457a05
MAL
57272017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
5728
5729 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
5730 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
5731 New function definition.
5732 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
5733 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
5734 New function declaration.
5735 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
5736 * mi/mi-interp.h: New file.
5737 * solib.c (info_sharedlibrary_command): Replace for loop with
5738 ALL_SO_LIBS macro
5739 * solib.h (update_solib_list): New function declaration.
5740 (so_list_head): Move macro.
5741 * solist.h (ALL_SO_LIBS): New macro.
5742
e696b3ad
MAL
57432017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
5744
5745 * infcmd.c (post_create_inferior): Remove unused argument in
5746 call to solib_add.
5747 * remote.c (remote_start_remote): Likewise.
5748 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
5749 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
5750 (enable_break): Likewise.
5751 * solib.c (update_solib_list): Remove unused target argument
5752 and its documentation.
5753 (solib_add): Remove unused target argument. Remove unused
5754 argument in call to update_solib_list.
5755 (info_sharedlibrary_command): Remove unused argument in call
5756 to update_solib_list.
5757 (sharedlibrary_command): Remove unused argument in call to
5758 solib_add.
5759 (handle_solib_event): Likewise.
5760 (reload_shared_libraries): Likewise.
5761 * solib.h (solib_add): Remove unused target argument.
5762
dcb84eda
AA
57632017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
5764
5765 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
5766 (s390_displaced_step_fixup): Cover relative branches with the
5767 default fixup handling. This fixes lack of support for some
5768 relative branch instructions.
5769
d9cb6cdc
SM
57702017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5771
5772 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
5773 ptid from regcache.
5774
1afaf9f4
SM
57752017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5776
5777 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
5778 i386_darwin_store_inferior_registers): Use ptid from regcache.
5779
aac12e24
SM
57802017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5781
5782 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
5783 i386bsd_store_inferior_registers): Use ptid from regcache.
5784
bbe1eef1
SM
57852017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5786
5787 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
5788 hppaobsd_store_registers): Use ptid from regcache.
5789
10799020
SM
57902017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5791
5792 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
5793 hppanbsd_store_registers): Use ptid from regcache.
5794
00204cf7
SM
57952017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5796
5797 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
5798 from regcache. Use get_ptrace_pid.
5799
11a33714
SM
58002017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5801
5802 * corelow.c (get_core_register_section): Use ptid from regcache,
5803 update doc.
5804
317cd492
SM
58052017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5806
5807 * bsd-uthread.c (bsd_uthread_fetch_registers,
5808 bsd_uthread_store_registers): Use ptid from regcache, set and
5809 restore inferior_ptid.
5810
9ac8a7c2
SM
58112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5812
5813 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
5814 fetch_fp_regs, store_register, store_regs, store_fp_register,
5815 store_fp_regs): Use ptid from regcache.
5816
4ac4bb6a
SM
58172017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5818
5819 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
5820 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
5821 store_vfp_regs): Use ptid from regcache.
5822
9bcbdca8
PA
58232017-03-17 Pedro Alves <palves@redhat.com>
5824
5825 PR remote/21188
5826 * ser-base.c (ser_base_wait_for): Add comment.
5827 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
5828 version.
5829 * ser-unix.c (hardwire_raw): Remove reference to
5830 scb->current_timeout.
5831 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
5832 (hardwire_ops): Install ser_base_readchar instead of
5833 hardwire_readchar.
5834 * serial.h (struct serial) <current_timeout, timeout_remaining>:
5835 Remove fields.
5836
7503099f
JG
58372017-03-17 Jonah Graham <jonah@kichwacoders.com>
5838
5839 PR gdb/19637
5840 * python/lib/gdb/printer/bound_registers.py: Add support for
5841 Python 3.
5842
7942e96e
AA
58432017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5844
5845 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
5846 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
5847 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
5848 byte_offset to subobj_byte_offset. Fix the handling of
5849 DWARF_VALUE_STACK on big-endian targets when coming via an
5850 implicit pointer.
5851 (dwarf2_evaluate_loc_desc): Adjust call to
5852 dwarf2_evaluate_loc_desc_full.
5853 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
5854 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
5855
ba14f379
YQ
58562017-03-16 Yao Qi <yao.qi@linaro.org>
5857
5858 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
5859 and REVSH instructions.
5860
b121eeb9
YQ
58612017-03-16 Yao Qi <yao.qi@linaro.org>
5862
5863 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
5864 (arm_record_test): Declare.
5865 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
5866 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
5867 align with the manual.
5868 (thumb_record_misc): Adjust the code order to align with the
5869 manual.
5870 (thumb2_record_decode_insn_handler): Fix instruction matching.
5871 (instruction_reader_thumb): New class.
5872 (arm_record_test): New function.
5873
728a7913
YQ
58742017-03-16 Yao Qi <yao.qi@linaro.org>
5875
5876 * arm-tdep.c (abstract_memory_reader): New class.
5877 (instruction_reader): New class.
5878 (extract_arm_insn): Add argument 'reader'. Callers updated.
5879 (decode_insn): Likewise.
5880
34b43320
DE
58812017-03-16 Doug Evans <dje@google.com>
5882
a7c0469f
DE
5883 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
5884 member. Change type of TYPE member to SCM. All uses updated.
5885 (lsscm_make_lazy_string_smob): Add assert.
5886 (lsscm_make_lazy_string): Flag bad length values.
5887 (lsscm_elt_type): New function.
5888 (gdbscm_lazy_string_to_value): Rewrite to use
5889 lsscm_safe_lazy_string_to_value.
5890 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
5891 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
5892 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
5893 in incoming type.
5894 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
5895 * guile/scm-type.c (tyscm_scm_to_type): New function.
5896
58972017-03-15 Doug Evans <dje@google.com>
5898
34b43320
DE
5899 PR python/17728, python/18439, python/18779
5900 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
5901 member. Change type of TYPE member to PyObject *. All uses updated.
5902 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
5903 (gdbpy_create_lazy_string_object): Flag bad length values.
5904 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
5905 Handle typedefs in incoming type.
5906 (stpy_lazy_string_elt_type): New function.
5907 (gdbpy_extract_lazy_string): Call it.
5908 * python/py-value.c (valpy_lazy_string): Flag bad length values.
5909 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
5910 typedefs in incoming type.
5911
a3a5fecc
DE
59122017-03-16 Doug Evans <dje@google.com>
5913
5914 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
5915 * guile/scm-type.c (tyscm_scm_to_type): New function.
5916
28f1c605
JW
59172017-03-16 Jiong Wang <jiong.wang@arm.com>
5918
5919 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
5920 "ULONGEST" for "skip".
5921
87c336f6
AA
59222017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
5923
5924 PR gdb/21220
5925 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
5926 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
5927 (inf_ptrace_peek_poke): ...here. New function. Now also loop
5928 over ptrace peek/poke until end of buffer or error.
5929
cf81cf60
SM
59302017-03-14 Simon Marchi <simon.marchi@ericsson.com>
5931
5932 * parse.c (length_of_subexp): Make static.
5933 * parser-defs.h (length_of_subexp): Remove.
5934
a379284a
AA
59352017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
5936
5937 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
5938 as well.
5939
8a6200ba
PA
59402017-03-14 Pedro Alves <palves@redhat.com>
5941
5942 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
5943 (main): Use std::unique_ptr. Remove calls to
5944 cp_demangled_name_parse_free.
5945
f79ec206
SM
59462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5947
5948 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
5949 alphabsd_store_inferior_registers): Use regcache->ptid instead
5950 of inferior_ptid.
5951
edb5fb00
SM
59522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5953
5954 * aix-thread.c (aix_thread_fetch_registers,
5955 aix_thread_store_registers): Use regcache->ptid instead of
5956 inferior_ptid.
5957
55119686
SM
59582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5959
5960 * aarch64-linux-nat.c (fetch_gregs_from_thread,
5961 store_gregs_to_thread, fetch_fpregs_from_thread,
5962 store_fpregs_to_thread): Use regcache->ptid instead of
5963 inferior_ptid.
5964
6a06fbb7
SM
59652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5966
5967 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
5968 amd64_linux_fetch_inferior_registers): Use regcache->ptid
5969 instead of inferior_ptid.
5970
c6386875
SM
59712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5972
5973 * target.c (target_fetch_registers, target_store_registers): Add
5974 assert.
5975
ddaaf0fb
SM
59762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5977
5978 * regcache.h (regcache_get_ptid): New function.
5979 * regcache.c (regcache_get_ptid): New function.
5980
b9da89d1 59812017-03-13 Mark Wielaard <mark@klomp.org>
5982
5983 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
5984
5f4d1085
KS
59852017-03-10 Keith Seitz <keiths@redhat.com>
5986
5987 PR c++/8218
5988 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
5989
c65d6b55
PA
59902017-03-08 Pedro Alves <palves@redhat.com>
5991
5992 PR gdb/18360
5993 * infrun.c (start_step_over, do_target_resume, resume)
5994 (restart_threads): Assert we're not resuming a thread that is
5995 meant to be stopped.
5996 (infrun_thread_stop_requested_callback): Delete.
5997 (infrun_thread_stop_requested): If the thread is internally
5998 stopped, queue a pending stop event and clear the thread's
5999 inline-frame state.
6000 (handle_stop_requested): New function.
6001 (handle_syscall_event, handle_inferior_event_1): Use
6002 handle_stop_requested.
6003 (handle_stop_requested): New function.
6004 (handle_signal_stop): Set the thread's stop_signal here instead of
6005 at caller.
6006 (finish_step_over): Clear step over info unconditionally.
6007 (handle_signal_stop): If the user had interrupted the event
6008 thread, consider the stop a random signal.
6009 (handle_signal_stop) <signal arrived while stepping over
6010 breakpoint>: Don't restart threads here.
6011 (stop_waiting): Don't clear step-over info here.
6012
15c22686
PA
60132017-03-08 Pedro Alves <palves@redhat.com>
6014
6015 PR 21206
6016 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
6017 goes to argument 2, not 1.
6018
6e5d74e7
PA
60192017-03-08 Pedro Alves <palves@redhat.com>
6020
6021 PR cli/21218
6022 * top.c (gdb_readline_wrapper): Avoid passing NULL to
6023 display_gdb_prompt.
6024 (command_line_input): Add comment.
6025
9753a2f6
PA
60262017-03-08 Pedro Alves <palves@redhat.com>
6027
6028 PR tui/21216
6029 * tui/tui-file.c (tui_file::write): New.
6030 * tui/tui-file.h (tui_file): Override "write".
6031 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
6032 factored out from ...
6033 (tui_puts): ... here.
6034 (tui_putc): Use them.
6035 (tui_write): New function.
6036 * tui/tui-io.h (tui_write): Declare.
6037
1672e0d9
SDJ
60382017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6039
6040 * Makefile.in (SFILES): Replace "environ.c" with
6041 "common/environ.c".
6042 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
6043 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
6044 to...
6045 * common/environ.c: ... here.
6046 * environ.h: Moved to...
6047 * common/environ.h: ... here.
6048
f7bb4e3a
PB
60492017-03-07 Peter Bergner <bergner@vnet.ibm.com>
6050
6051 * gdbarch.sh (pstring_ptr): New static function.
6052 (gdbarch_disassembler_options): Use it.
6053 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
6054 not valid_disassembler_option->name.
6055 * gdbarch.c: Regenerate.
6056
e45ced6c
PB
60572017-03-07 Peter Bergner <bergner@vnet.ibm.com>
6058
6059 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
6060
5f6fd321
PA
60612017-03-07 Pedro Alves <palves@redhat.com>
6062
6063 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
6064
6dbb839a 60652017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
6066
6067 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
6068 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
6069 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 6070 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 6071
d274ecf4
SM
60722017-03-06 Simon Marchi <simon.marchi@ericsson.com>
6073
6074 * xtensa-linux-nat.c (fetch_gregs): Remove const.
6075
df97be55
SM
60762017-03-03 Simon Marchi <simon.marchi@ericsson.com>
6077
6078 * remote.c (remote_add_target_side_commands): Use range-based
6079 for loop.
6080
7d45f3df
YQ
60812017-03-03 Yao Qi <yao.qi@linaro.org>
6082
6083 PR gdb/21165
6084 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
6085 value is lazy.
6086 * valprint.c (common_val_print): Likewise.
6087
65b48a81
PB
60882017-02-28 Peter Bergner <bergner@vnet.ibm.com>
6089
6090 * NEWS: Mention new set/show disassembler-options commands.
6091 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
6092 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
6093 (prospective_options): New static variable.
6094 (gdb_disassembler::gdb_disassembler): Initialize
6095 m_di.disassembler_options.
6096 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
6097 (get_disassembler_options): New function.
6098 (set_disassembler_options): Likewise.
6099 (set_disassembler_options_sfunc): Likewise.
6100 (show_disassembler_options_sfunc): Likewise.
6101 (disassembler_options_completer): Likewise.
6102 (_initialize_disasm): Likewise.
6103 * disasm.h (get_disassembler_options): New prototype.
6104 (set_disassembler_options): Likewise.
6105 * gdbarch.sh (gdbarch_disassembler_options): New variable.
6106 (gdbarch_verify_disassembler_options): Likewise.
6107 * gdbarch.c: Regenerate.
6108 * gdbarch.h: Likewise.
6109 * arm-tdep.c (num_disassembly_options): Delete.
6110 (set_disassembly_style): Likewise.
6111 (arm_disassembler_options): New static variable.
6112 (set_disassembly_style_sfunc): Convert short style name into long
6113 option name. Call set_disassembler_options.
6114 (show_disassembly_style_sfunc): New function.
6115 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
6116 set_gdbarch_verify_disassembler_options.
6117 (_initialize_arm_tdep): Delete regnames variable and update callers.
6118 (arm_disassembler_options): Initialize.
6119 (disasm_options): New variable.
6120 (num_disassembly_options): Rename from this...
6121 (num_disassembly_styles): ...to this. Compute by scanning through
6122 disasm_options.
6123 (valid_disassembly_styles): Initialize using disasm_options.
6124 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
6125 set_arm_regname_option.
6126 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
6127 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
6128 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
6129 set_gdbarch_verify_disassembler_options.
6130 * s390-tdep.c (s390_disassembler_options): New static variable.
6131 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
6132 set_gdbarch_verify_disassembler_options.
6133
d538e36d
SM
61342017-02-27 Simon Marchi <simon.marchi@ericsson.com>
6135
6136 * remote.c (remote_add_target_side_condition): Remove "struct"
6137 keyword from range-based for loop.
6138
83621223
SM
61392017-02-27 Simon Marchi <simon.marchi@ericsson.com>
6140
6141 * remote.c (remote_add_target_side_condition): Use range-based
6142 for loop. Update comment.
6143
2123df0e
YQ
61442017-02-27 Yao Qi <yao.qi@linaro.org>
6145
6146 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
6147
8e368124
AH
61482017-02-26 Alan Hayward <alan.hayward@arm.com>
6149
6150 * regcache.c (regcache_raw_update): New function.
6151 (regcache_raw_read): Move code to regcache_raw_update.
6152 * regcache.h (regcache_raw_update): New declaration.
6153 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
6154
a49dd8dd
JK
61552017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
6156
6157 * dwarf2read.c (create_debug_type_hash_table): Initialize
6158 header.signature and header.type_offset_in_tu.
6159
34e4bae9
PA
61602017-02-24 Pedro Alves <palves@redhat.com>
6161
6162 * symtab.c (make_file_symbol_completion_list_1): Use
6163 add_symtab_completions.
6164
b0e4b369
AH
61652017-02-24 Alan Hayward <alan.hayward@arm.com>
6166
6167 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
6168
975c21ab
AH
61692017-02-24 Alan Hayward <alan.hayward@arm.com>
6170
6171 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
6172 I386_MAX_REGISTER_SIZE.
6173 (i386_pseudo_register_write): Likewise.
6174 (i386_process_record): Likewise.
6175 * i387-tdep.c (i387_supply_xsave): Likewise.
6176 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
6177 (store_register): Likewise.
6178
14bc53a8
PA
61792017-02-23 Pedro Alves <palves@redhat.com>
6180
6181 * ada-lang.c: Include "common/function-view.h".
6182 (ada_iterate_over_symbols): Adjust to use function_view as
6183 callback type.
6184 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
6185 (ada_make_symbol_completion_list): Use a lambda.
6186 (ada_exc_search_name_matches): Delete.
6187 (name_matches_regex): New.
6188 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
6189 * compile/compile-c-support.c: Include "common/function-view.h".
6190 (print_one_macro): Change prototype to accept a ui_file pointer.
6191 (write_macro_definitions): Use a lambda.
6192 * dwarf2read.c: Include "common/function-view.h".
6193 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
6194 (dw2_expand_symtabs_matching): Adjust to use function_view as
6195 callback type.
6196 * language.h: Include "common/function-view.h".
6197 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
6198 function_view as callback type.
6199 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
6200 * linespec.c: Include "common/function-view.h".
6201 (collect_info::add_symbol): New method.
6202 (struct symbol_and_data_callback, iterate_inline_only, struct
6203 symbol_matcher_data, iterate_name_matcher): Delete.
6204 (iterate_over_all_matching_symtabs): Adjust to use function_view
6205 as callback type and lambdas.
6206 (iterate_over_file_blocks): Adjust to use function_view as
6207 callback type.
6208 (decode_compound_collector): Now a class with private fields.
6209 (decode_compound_collector::release_symbols): New method.
6210 (collect_one_symbol): Rename to...
6211 (decode_compound_collector::operator()): ... this and adjust.
6212 (lookup_prefix_sym): decode_compound_collector construction bits
6213 move to decode_compound_collector ctor. Pass the
6214 decode_compound_collector object directly as callback. Remove
6215 cleanups and use decode_compound_collector::release_symbols
6216 instead.
6217 (symtab_collector): Now a class with private fields.
6218 (symtab_collector::release_symtabs): New method.
6219 (add_symtabs_to_list): Rename to...
6220 (symtab_collector::operator()): ... this and adjust.
6221 (collect_symtabs_from_filename): symtab_collector construction
6222 bits move to symtab_collector ctor. Pass the symtab_collector
6223 object directly as callback. Remove cleanups and use
6224 symtab_collector::release_symtabs instead.
6225 (collect_symbols): Delete.
6226 (add_matching_symbols_to_info): Use lambdas.
6227 * macrocmd.c (print_macro_callback): Delete.
6228 (info_macro_command): Use a lambda.
6229 (info_macros_command): Pass print_macro_definition as callable
6230 directly.
6231 (print_one_macro): Remove 'ignore' parameter.
6232 (macro_list_command): Adjust.
6233 * macrotab.c (macro_for_each_data::fn): Now a function_view.
6234 (macro_for_each_data::user_data): Delete field.
6235 (foreach_macro): Adjust to call the function_view.
6236 (macro_for_each): Adjust to use function_view as callback type.
6237 (foreach_macro_in_scope): Adjust to call the function_view.
6238 (macro_for_each_in_scope): Adjust to use function_view as callback
6239 type.
6240 * macrotab.h: Include "common/function-view.h".
6241 (macro_callback_fn): Declare a prototype instead of a pointer.
6242 Remove "user_data" parameter.
6243 (macro_for_each, macro_for_each_in_scope): Adjust to use
6244 function_view as callback type.
6245 * psymtab.c (partial_map_expand_apply)
6246 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
6247 Adjust to use function_view as callback type and to return bool.
6248 (psym_expand_symtabs_matching): Adjust to use function_view as
6249 callback types.
6250 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
6251 to use function_view as callback type and to return bool.
6252 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
6253 callback types.
6254 * symfile.c (expand_symtabs_matching): Adjust to use function_view
6255 as callback types.
6256 * symfile.h: Include "common/function-view.h".
6257 (expand_symtabs_file_matcher_ftype)
6258 (expand_symtabs_symbol_matcher_ftype)
6259 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
6260 return bool.
6261 (quick_symbol_functions::map_symtabs_matching_filename)
6262 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
6263 function_view as callback type and return bool.
6264 (expand_symtabs_matching): Adjust to use function_view as callback
6265 type.
6266 (maintenance_expand_name_matcher)
6267 (maintenance_expand_file_matcher): Delete.
6268 (maintenance_expand_symtabs): Use lambdas.
6269 * symtab.c (iterate_over_some_symtabs): Adjust to use
6270 function_view as callback types and return bool.
6271 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
6272 of a cleanup.
6273 (lookup_symtab_callback): Delete.
6274 (lookup_symtab): Use a lambda.
6275 (iterate_over_symbols): Adjust to use function_view as callback
6276 type.
6277 (struct search_symbols_data, search_symbols_file_matches)
6278 (search_symbols_name_matches): Delete.
6279 (search_symbols): Use a pair of lambdas.
6280 (struct add_name_data, add_macro_name, symbol_completion_matcher)
6281 (symtab_expansion_callback): Delete.
6282 (default_make_symbol_completion_list_break_on_1): Use lambdas.
6283 * symtab.h: Include "common/function-view.h".
6284 (iterate_over_some_symtabs): Adjust to use function_view as
6285 callback type and return bool.
6286 (iterate_over_symtabs): Adjust to use function_view as callback
6287 type.
6288 (symbol_found_callback_ftype): Remove 'data' parameter and return
6289 bool.
6290 (iterate_over_symbols): Adjust to use function_view as callback
6291 type.
6292
07e253aa
PA
62932017-02-23 Pedro Alves <palves@redhat.com>
6294
6295 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
6296 (%.o) <unittests/%.c>: New pattern.
6297 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
6298 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
6299 * common/function-view.h: New file.
6300 * unittests/function-view-selftests.c: New file.
6301 * configure: Regenerate.
6302
8eaf5320
SM
63032017-02-23 Simon Marchi <simon.marchi@ericsson.com>
6304
6305 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
6306 inferior_ptid.
6307 * go32-nat.c (go32_thread_alive): Likewise.
6308
38768751
YQ
63092017-02-23 Yao Qi <yao.qi@linaro.org>
6310
6311 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
6312 delete.
6313
0a8beaba
YQ
63142017-02-23 Yao Qi <yao.qi@linaro.org>
6315
6316 * varobj.c (varobj_clear_saved_item): Use delete instead of
6317 xfree.
6318 (update_dynamic_varobj_children): Likewise.
6319
58fdfd2c
JK
63202017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6321
6322 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
6323
1b90b139
SM
63242017-02-21 Simon Marchi <simon.marchi@ericsson.com>
6325
6326 * common/enum-flags.h (enum_flags::enum_flags): Initialize
6327 m_enum_value to 0 in default constructor.
6328
2039d74e
EBM
63292017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6330
6331 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
6332 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
6333 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
6334 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
6335 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
6336 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
6337 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
6338 IS_STORE_CONDITIONAL_INSN.
6339
7814882a
JK
63402017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6341
6342 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
6343
0ae60b63
JK
63442017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6345
6346 * NEWS (Changes since GDB 7.12): Add DWARF-5.
6347
0224619f
JK
63482017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6349
6350 * dwarf2read.c (skip_one_die, read_attribute_value)
6351 (dwarf2_const_value_attr, dump_die_shallow)
6352 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6353 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
6354
0af92d60
JK
63552017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6356
6357 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
6358 (dwarf_parse_macro_header): Accept DWARF version 5.
6359 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
6360
216f72a1
JK
63612017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6362
6363 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
6364 DW_AT_GNU_*.
6365 * common/common-exceptions.h (enum errors): Likewise.
6366 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
6367 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
6368 (dwarf_expr_context::execute_stack_op): Likewise.
6369 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
6370 Likewise.
6371 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
6372 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
6373 (show_entry_values_debug, call_site_to_target_addr)
6374 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
6375 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
6376 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
6377 (value_of_dwarf_block_entry, indirect_pieced_value)
6378 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
6379 (disassemble_dwarf_expression): Likewise.
6380 * dwarf2read.c (process_die, inherit_abstract_dies)
6381 (read_call_site_scope): Likewise.
6382 * gdbtypes.h (struct func_type, struct call_site_parameter)
6383 (struct call_site): Likewise.
6384 * stack.c (read_frame_arg): Likewise.
6385 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
6386
43988095
JK
63872017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6388
6389 * defs.h (read_unsigned_leb128): New declaration.
6390 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
6391 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
6392 (dwarf2_find_location_expression): Call also
6393 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
6394 * dwarf2loc.h (dwarf2_version): New declaration.
6395 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
6396 rnglists.
6397 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
6398 .debug_rnglists.
6399 (struct dwop_section_names): Add loclists_dwo.
6400 (dwop_section_names): Add .debug_loclists.dwo.
6401 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
6402 (struct dwarf2_per_cu_data): Add dwarf_version.
6403 (struct dwo_sections): Add loclists.
6404 (struct attr_abbrev): Add implicit_const.
6405 (read_indirect_line_string): New declaration.
6406 (read_unsigned_leb128): Delete declaration.
6407 (rcuh_kind): New definition.
6408 (read_and_check_comp_unit_head): Change parameter
6409 is_debug_types_section to section_kind.
6410 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
6411 (read_comp_unit_head): Change parameter abfd to section, add parameter
6412 section_kind. Handle DWARF-5.
6413 (error_check_comp_unit_head): Accept also DWARF version 5.
6414 (read_and_check_comp_unit_head): Change parameter
6415 is_debug_types_section to section_kind.
6416 (read_and_check_type_unit_head): Delete function.
6417 (read_abbrev_offset): Handle DWARF-5.
6418 (create_debug_type_hash_table): Add parameter section_kind. Process
6419 only DW_UT_type. Use signature and type_offset_in_tu from struct
6420 comp_unit_head.
6421 (create_debug_types_hash_table): Update create_debug_type_hash_table
6422 caller.
6423 (create_all_type_units): Call create_debug_type_hash_table.
6424 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
6425 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
6426 caller.
6427 (skip_one_die): Handle DW_FORM_implicit_const.
6428 (dwarf2_rnglists_process): New function.
6429 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
6430 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
6431 (read_attribute_value): Handle DW_FORM_implicit_const,
6432 DW_FORM_line_strp.
6433 (read_attribute): Handle DW_FORM_implicit_const.
6434 (read_indirect_string_at_offset_from): New function from
6435 read_indirect_string_at_offset.
6436 (read_indirect_string_at_offset): Call
6437 read_indirect_string_at_offset_from.
6438 (read_indirect_line_string_at_offset): New function.
6439 (read_indirect_string): New function comment.
6440 (read_indirect_line_string): New function.
6441 (read_unsigned_leb128): Make it global.
6442 (dwarf2_string_attr): Handle DWARF-5.
6443 (add_include_dir_stub, read_formatted_entries): New functions.
6444 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
6445 Handle DWARF-5.
6446 (per_cu_header_read_in): Update read_comp_unit_head caller.
6447 (dwarf2_version): New function.
6448 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
6449 rnglists.
6450 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
6451 fields.
6452
22d2f3ab
JK
64532017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6454
6455 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
6456
5f46c5a5
JK
64572017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6458
6459 * dwarf2read.c (dwarf2_ranges_process): New function from
6460 dwarf2_ranges_read.
6461 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
6462 dwarf2_ranges_process.
6463
78d4d2c5
JK
64642017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6465
6466 * dwarf2read.c (create_debug_type_hash_table): New function from
6467 create_debug_types_hash_table.
6468 (create_debug_types_hash_table): Call create_debug_type_hash_table.
6469 (create_all_type_units, open_and_init_dwo_file): Update
6470 create_debug_types_hash_table callers.
6471
1b076f25
SDJ
64722017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
6473
6474 PR gdb/16188
6475 * fork-child.c (trace_start_error): Fix thinko. va_end should
6476 refer to 'ap', not 'args'.
6477
0db8980c
SDJ
64782017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
6479 Pedro Alves <palves@redhat.com>
6480
6481 PR gdb/16188
6482 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
6483 calls succeeded.
6484 * fork-child.c (trace_start_error): New function.
6485 (trace_start_error_with_name): Likewise.
6486 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
6487 * inf-ptrace.c (inf_ptrace_me): Likewise.
6488 * inferior.h (trace_start_error): New prototype.
6489 (trace_start_error_with_name): Likewise.
6490
99e8a4f9
SDJ
64912017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
6492
6493 PR gdb/21164
6494 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
6495 NULL before using it.
6496 * symmisc.c (maintenance_print_symbols): Likewise.
6497 (maintenance_print_msymbols): Likewise.
6498
4e746bb6
TW
64992017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6500
6501 * NEWS: Add record Python bindings entry.
6502
65032017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6504
6505 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
6506 py-record-full.o.
6507 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
6508 * python/py-record-btrace.c, python/py-record-btrace.h,
6509 python/py-record-full.c, python/py-record-full.h: New file.
6510 * python/py-record.c: Add include for py-record-btrace.h and
6511 py-record-full.h.
6512 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
6513 recpy_instruction_history, recpy_function_call_history, recpy_begin,
6514 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
6515 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
6516 New definition.
6517 (gdbpy_initialize_btrace): New export.
6518 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
6519
65202017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6521
6522 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
6523 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
6524 * python/py-record.c: New file.
6525 * python/python-internal.h (gdbpy_start_recording,
6526 gdbpy_current_recording, gdpy_stop_recording,
6527 gdbpy_initialize_record): New export.
6528 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
6529 (python_GdbMethods): Add gdbpy_start_recording,
6530 gdbpy_current_recording and gdbpy_stop_recording.
6531
65322017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6533
6534 * record-btrace.c (record_btrace_record_method): New function.
6535 (init_record_btrace_ops): Initialize to_record_method.
6536 * record-full.c (record_full_record_method): New function.
6537 (init_record_full_ops, init_record_full_core_ops): Add
6538 record_full_record_method.
6539 * record.h (enum record_method): New enum.
6540 * target-debug.h (target_debug_print_enum_record_method: New define.
6541 * target-delegates.c: Regenerate.
6542 * target.c (target_record_method): New function.
6543 * target.h: Include record.h.
6544 (struct target_ops) <to_record_method>: New field.
6545 (target_record_method): New export.
6546
65472017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6548
6549 * record.h (record_start, record_stop): New export.
6550 * record.c (record_start, record_stop): New function.
6551
65522017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6553
6554 * btrace.c (btrace_fetch): Copy function call segments pointer
6555 into a vector.
6556 (btrace_clear): Clear the vector.
6557 (btrace_find_insn_by_number): Use binary search to find the correct
6558 function call segment.
6559 * btrace.h (brace_fun_p): New typedef.
6560 (struct btrace_thread_info) <functions>: New field.
6561
65622017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6563
6564 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
6565 * btrace.c (btrace_decode_error): ... here. New function.
6566 * btrace.h (btrace_decode_error): New export.
6567
65682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6569
6570 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
6571 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
6572 btrace_find_insn_by_number): Remove special case for gaps.
6573 * btrace.h (btrace_insn_get_error): New export.
6574 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
6575 * record-btrace.c (btrace_insn_history): Print number for gaps.
6576 (record_btrace_info, record_btrace_goto): Handle gaps.
6577
3f77c769
TT
65782017-02-14 Tom Tromey <tom@tromey.com>
6579
6580 PR python/13598:
6581 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
6582 event.
6583 * python/py-evts.c (gdbpy_initialize_py_events): Add
6584 before_prompt registry.
6585 * python/py-events.h (events_object) <before_prompt>: New field.
6586
4c2c7ac6
MM
65872017-02-14 Markus Metzger <markus.t.metzger@intel.com>
6588
6589 * btrace.c (ftrace_new_switch): Preserve up link and flags.
6590
5cf30ebf
LM
65912017-02-13 Luis Machado <lgustavo@codesourcery.com>
6592
6593 * symfile (_initialize_symfile): Add usage text to the load command's
6594 help text.
6595
26a06916
SM
65962017-02-10 Simon Marchi <simon.marchi@ericsson.com>
6597
6598 * utils.c (defaulted_query): Don't query on secondary UIs.
6599
0b145e37
TT
66002017-02-10 Tom Tromey <tom@tromey.com>
6601
6602 * rust-lang.c (rust_get_disr_info): Remove unused variable.
6603
2d8365c4
TT
66042017-02-10 Tom Tromey <tom@tromey.com>
6605
6606 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
6607 "cleanup" local.
6608 * python/py-type.c (typy_legacy_template_argument): Remove
6609 unnecessary "cleanup" local.
6610
2bb8f231
TT
66112017-02-10 Tom Tromey <tom@tromey.com>
6612
6613 * python/python.c (do_start_initialization): New function, from
6614 _initialize_python.
6615 (_initialize_python): Call do_start_initialization.
6616 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
6617 goto.
6618
1bdfaf42
TT
66192017-02-10 Tom Tromey <tom@tromey.com>
6620
6621 * python/py-prettyprint.c (pretty_print_one_value): Use
6622 gdbpy_ref.
6623
88b6faea
TT
66242017-02-10 Tom Tromey <tom@tromey.com>
6625
6626 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
6627 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
6628 gdbpy_ref.
6629 * python/py-type.c (field_new): Use gdbpy_ref.
6630 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
6631 gdbpy_ref.
6632 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
6633 (py_free_pspace): Likewise.
6634 (pspace_to_pspace_object): Likewise.
6635 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
6636 (py_free_objfile): Likewise.
6637 (objfile_to_objfile_object): Likewise.
6638 * python/py-inferior.c (delete_thread_object): Use
6639 gdbpy_ref.
6640 (infpy_read_memory): Likewise.
6641 (py_free_inferior): Likewise.
6642 * python/py-evtregistry.c (create_eventregistry_object): Use
6643 gdbpy_ref.
6644 * python/py-event.c (create_event_object): Use gdbpy_ref.
6645
7780f186
TT
66462017-02-10 Tom Tromey <tom@tromey.com>
6647
6648 * python/py-ref.h (gdbpy_ref_policy): Now a template.
6649 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
6650 used.
6651 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
6652 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
6653 python/py-exitedevent.c, python/py-finishbreakpoint.c,
6654 python/py-framefilter.c, python/py-function.c,
6655 python/py-inferior.c, python/py-infevents.c,
6656 python/py-linetable.c, python/py-newobjfileevent.c,
6657 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
6658 python/py-signalevent.c, python/py-stopevent.c,
6659 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
6660 python/py-unwind.c, python/py-utils.c, python/py-value.c,
6661 python/py-varobj.c, python/py-xmethods.c, python/python.c,
6662 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
6663
d4b0bb18
TT
66642017-02-10 Tom Tromey <tom@tromey.com>
6665
6666 * ui-out.h (ui_out_emit_type): New class.
6667 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
6668 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
6669 and ui_out_emit_tuple.
6670 (enumerate_locals): Likewise.
6671 (py_mi_print_variables, py_print_locals, py_print_args): Use
6672 ui_out_emit_list.
6673 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
6674 ui_out_emit_list.
6675 * common/gdb_optional.h: New file.
6676
f67f945c
MG
66772017-02-10 Martin Galvan <martingalvan@sourceware.org>
6678
6679 * MAINTAINERS (Write After Approval): Update my e-mail address.
6680
18da0c51
MG
66812017-02-10 Martin Galvan <martingalvan@sourceware.org>
6682
6683 PR gdb/21122
6684 * breakpoint.c (_initialize_breakpoint): Update the help description
6685 of the 'commands' command to indicate that it takes a list argument.
6686
62c14536
SM
66872017-02-09 Simon Marchi <simon.marchi@ericsson.com>
6688
6689 * interps.c (current_interp_set_logging): Remove "return".
6690
ff6fa247
GB
66912017-02-09 Gary Benson <gbenson@redhat.com>
6692
6693 * symtab.c (add_symtab_completions): Prevent NULL pointer
6694 dereference.
6695
a474bd8e
PA
66962017-02-08 Pedro Alves <palves@redhat.com>
6697
6698 * interps.c (interp::interp): Remove reference to quiet_p.
6699 (interp_set): Make static. Remove dead "Switching to" output
6700 code.
6701 (interp_quiet_p, interp_set_quiet): Delete.
6702 (interpreter_exec_cmd): Don't set the interpreter quiet.
6703 * interps.h (interp_quiet_p): Make static.
6704 (class interp) <quiet_p>: Remove field
6705
3d7b173c
JG
67062017-02-08 Jerome Guitton <guitton@adacore.com>
6707
604c4576
JG
6708 * cli/cli-decode.c (find_command_name_length): Make it extern.
6709 * cli/cli-decode.h (find_command_name_length): Declare.
6710 * cli/cli-script.c (command_name_equals, line_first_arg):
6711 New functions.
6712 (process_next_line): Use cli-decode to parse command names.
6713 (build_command_line): Make args a constant pointer.
6714
67152017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 6716
3d7b173c
JG
6717 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
6718 Remove case-insensitive search.
6719
1291063d
JM
67202017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
6721
6722 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
6723 at the end of the line. Avoids an ARI warning.
6724
20b477a7
LM
67252017-02-06 Luis Machado <lgustavo@codesourcery.com>
6726
6727 * NEWS: Mention support for record/replay of Intel 64 rdrand and
6728 rdseed instructions.
6729 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
6730
3f7b46f2
IR
67312017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
6732
6733 PR tdep/20936
6734 Provide and use sparc32 and sparc64 target description XML files.
6735 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
6736 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
6737 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
6738 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
6739 * features/sparc/sparc32-solaris.xml: New file.
6740 * features/sparc/sparc64-solaris.xml: New file.
6741 * features/sparc/sparc32-solaris.c: Generated.
6742 * features/sparc/sparc64-solaris.c: Generated.
6743 * sparc-tdep.h: Account for differences in target descriptions.
6744 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
6745 (sparc32_register_type): Use target provided registers.
6746 (validate_tdesc_registers): New function.
6747 (sparc32_gdbarch_init): Use tdesc_has_registers.
6748 Set pseudoregister functions.
6749 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
6750 (sparc64_register_type): Use target provided registers.
6751 (sparc64_init_abi): Set pseudoregister functions.
6752
f0fd41c1
TT
67532017-02-03 Tom Tromey <tom@tromey.com>
6754
6755 PR rust/21097:
6756 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
6757 with a single member.
6758
d6f9b0fb
PA
67592017-02-03 Pedro Alves <palves@redhat.com>
6760
6761 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
6762 (cli_interp_base::~cli_interp_base): New.
6763 (cli_interp): New struct.
6764 (as_cli_interp): Cast the interp itself to cli_interp.
6765 (cli_interpreter_pre_command_loop): Rename to ...
6766 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
6767 parameter.
6768 (cli_interpreter_init): Rename to ...
6769 (cli_interp::init): ... this. Remove 'self' parameter. Use
6770 boolean. Make extern.
6771 (cli_interpreter_resume): Rename to ...
6772 (cli_interp::resume): ... this. Remove 'data' parameter. Make
6773 extern.
6774 (cli_interpreter_suspend): Rename to ...
6775 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
6776 extern.
6777 (cli_interpreter_exec): Rename to ...
6778 (cli_interp::exec): ... this. Remove 'data' parameter. Make
6779 extern.
6780 (cli_interpreter_supports_command_editing): Rename to ...
6781 (cli_interp_base::supports_command_editing): ... this. Remove
6782 'interp' parameter. Make extern.
6783 (cli_ui_out): Rename to ...
6784 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
6785 Make extern.
6786 (cli_set_logging): Rename to ...
6787 (cli_interp_base::set_logging): ... this. Remove 'interp'
6788 parameter. Make extern.
6789 (cli_interp_procs): Delete.
6790 (cli_interp_factory): Adjust to use "new".
6791 * cli/cli-interp.h: Include "interps.h".
6792 (struct cli_interp_base): New struct.
6793 * interps.c (struct interp): Delete. Fields moved to interps.h.
6794 (interp_new): Delete.
6795 (interp::interp, interp::~interp): New.
6796 (interp_set): Use bool, and return void. Assume the interpreter
6797 has suspend, init and resume methods, and that the all return
6798 void.
6799 (set_top_level_interpreter): interp_set returns void.
6800 (interp_ui_out): Adapt.
6801 (current_interp_set_logging): Adapt.
6802 (interp_data): Delete.
6803 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
6804 (interp_exec): Adapt.
6805 (top_level_interpreter_data): Delete.
6806 * interps.h (interp_init_ftype, interp_resume_ftype)
6807 (interp_suspend_ftype, interp_exec_ftype)
6808 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
6809 (class interp): New.
6810 (interp_new): Delete.
6811 (interp_set): Now returns void. Use bool.
6812 (interp_data, top_level_interpreter_data): Delete.
6813 * mi/mi-common.h: Include interps.h.
6814 (class mi_interp): Inherit from interp. Define a ctor. Declare
6815 init, resume, suspect, exec, interp_ui_out, set_logging and
6816 pre_command_loop methods.
6817 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
6818 (mi_interpreter_init): Rename to ...
6819 (mi_interp::init): ... this. Remove the 'interp' parameter, use
6820 bool, return void and make extern. Adjust.
6821 (mi_interpreter_resume): ... Rename to ...
6822 (mi_interp::resume): ... this. Remove the 'data' parameter,
6823 return void and make extern. Adjust.
6824 (mi_interpreter_suspend): ... Rename to ...
6825 (mi_interp::suspend): ... this. Remove the 'data' parameter,
6826 return void and make extern. Adjust.
6827 (mi_interpreter_exec): ... Rename to ...
6828 (mi_interp::exec): ... this. Remove the 'data' parameter and make
6829 extern. Adjust.
6830 (mi_interpreter_pre_command_loop): ... Rename to ...
6831 (mi_interp::pre_command_loop): ... this. Remove the 'self'
6832 parameter and make extern.
6833 (mi_on_normal_stop_1): Adjust.
6834 (mi_ui_out): Rename to ...
6835 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
6836 parameter and make extern. Adjust.
6837 (mi_set_logging): Rename to ...
6838 (mi_interp::set_logging): ... this. Remove the 'interp'
6839 parameter and make extern. Adjust.
6840 (mi_interp_procs): Delete.
6841 (mi_interp_factory): Adjust to use 'new'.
6842 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
6843 (mi_print_exception, mi_execute_command, mi_load_progress):
6844 Adjust.
6845 * tui/tui-interp.c (tui_interp): New class.
6846 (as_tui_interp): Return a tui_interp pointer.
6847 (tui_on_normal_stop, tui_on_signal_received)
6848 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
6849 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
6850 to use interp::interp_ui_out.
6851 (tui_init): Rename to ...
6852 (tui_interp::init): ... this. Remove the 'self' parameter, use
6853 bool, return void and make extern. Adjust.
6854 (tui_resume): Rename to ...
6855 (tui_interp::resume): ... this. Remove the 'data' parameter,
6856 return void and make extern. Adjust.
6857 (tui_suspend): Rename to ...
6858 (tui_interp::suspend): ... this. Remove the 'data' parameter,
6859 return void and make extern. Adjust.
6860 (tui_ui_out): Rename to ...
6861 (tui_interp::interp_ui_out): ... this. Remove the 'self'
6862 parameter, and make extern. Adjust.
6863 (tui_exec): Rename to ...
6864 (tui_interp::exec): ... this. Remove the 'data' parameter and
6865 make extern.
6866 (tui_interp_procs): Delete.
6867 (tui_interp_factory): Use "new".
6868
65c40c95
TT
68692017-02-02 Tom Tromey <tom@tromey.com>
6870
6871 * rust-exp.y (ends_raw_string, space_then_number)
6872 (rust_identifier_start_p): Return bool.
6873 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
6874 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
6875 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
6876 (rust_chartype_p): Return bool.
6877 (val_print_struct, rust_print_struct_def, rust_print_type):
6878 Update.
6879 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
6880 Return bool.
6881
b50f188d
TT
68822017-02-02 Tom Tromey <tom@tromey.com>
6883
6884 * rust-lang.c: Reindent.
6885
03c85b11
TT
68862017-02-02 Tom Tromey <tom@tromey.com>
6887
6888 * rust-lang.h (rust_crate_for_block): Update.
6889 * rust-lang.c (rust_crate_for_block): Return std::string.
6890 (rust_get_disr_info): Use std:;string, not
6891 gdb::unique_xmalloc_ptr.
6892 * rust-exp.y (crate_name): Update.
6893
9b6da501
PA
68942017-02-02 Pedro Alves <palves@redhat.com>
6895
6896 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
6897 field out of gdb_disassembler_test and make it static.
6898
ec4cb20b
PA
68992017-02-02 Pedro Alves <palves@redhat.com>
6900
6901 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
6902 mi1_interp and mi_interp fields.
6903
5be5dbf0
PA
69042017-02-02 Pedro Alves <palves@redhat.com>
6905
616268b6
PA
6906 * cli/cli-interp.c (struct saved_output_files, saved_output):
6907 Moved from cli/cli-logging.c.
6908 (cli_set_logging): New function.
6909 (cli_interp_procs): Install cli_set_logging.
6910 * cli/cli-interp.h (make_logging_output, cli_set_logging):
6911 Declare.
6912 * cli/cli-logging.c (struct saved_output_files, saved_output):
6913 Moved to cli/cli-interp.c.
6914 (pop_output_files): Don't save outputs here.
6915 (make_logging_output): New function.
6916 (handle_redirections): Don't build tee nor save previous outputs
6917 here.
6918 * interps.c (current_interp_set_logging): Change prototype.
6919 Assume there's always a set_logging_proc method installed.
6920 * interps.h (interp_set_logging_ftype): Change prototype.
6921 (current_interp_set_logging): Change prototype and adjust comment.
6922 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
6923 use make_logging_output.
6924 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
69252017-02-02 Pedro Alves <palves@redhat.com>
6926
5be5dbf0
PA
6927 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
6928 from ...
6929 (set_logging_overwrite): ... here.
6930 (logging_no_redirect_file): Delete.
6931 (set_logging_redirect): Don't handle redirection on the fly.
6932 Instead warn that "logging off" / "logging on" is necessary.
6933 (pop_output_files): Delete references to logging_no_redirect_file.
6934 (show_logging_command): Always speak in terms of what will happen
6935 once logging is reenabled.
6936
c99cc448
PA
69372017-02-02 Pedro Alves <palves@redhat.com>
6938
6939 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
6940
8b172ce7
PA
69412017-02-02 Pedro Alves <palves@redhat.com>
6942
6943 * disasm.c (gdb_pretty_print_insn): Rename to ...
6944 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
6945 Remove gdbarch parameter. Adapt to clear the object's buffers
6946 instead of allocating new buffers, and to print using the object's
6947 gdb_disassembler instead of calling gdb_print_insn.
6948 (dump_insns): Use gdb_pretty_print_disassembler.
6949 * disasm.h (gdb_pretty_print_insn): Delete declaration.
6950 (gdb_pretty_print_disassembler): New class.
6951 * record-btrace.c (btrace_insn_history): Use
6952 gdb_pretty_print_disassembler.
6953
d7e74731
PA
69542017-02-02 Pedro Alves <palves@redhat.com>
6955
6956 * ada-lang.c (type_as_string): Use string_file.
6957 * ada-valprint.c (ada_print_floating): Use string_file.
6958 * ada-varobj.c (ada_varobj_scalar_image)
6959 (ada_varobj_get_value_image): Use string_file.
6960 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
6961 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
6962 * breakpoint.c (update_inserted_breakpoint_locations)
6963 (insert_breakpoint_locations, reattach_breakpoints)
6964 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
6965 (print_it_watchpoint): Use string_file.
6966 (save_breakpoints): Use stdio_file.
6967 * c-exp.y (oper): Use string_file.
6968 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
6969 tee_file.
6970 (pop_output_files): Use delete.
6971 (handle_redirections): Use stdio_file and tee_file.
6972 * cli/cli-setshow.c (do_show_command): Use string_file.
6973 * compile/compile-c-support.c (c_compute_program): Use
6974 string_file.
6975 * compile/compile-c-symbols.c (generate_vla_size): Take a
6976 'string_file &' instead of a 'ui_file *'.
6977 (generate_c_for_for_one_variable): Take a 'string_file &' instead
6978 of a 'ui_file *'. Use string_file.
6979 (generate_c_for_variable_locations): Take a 'string_file &'
6980 instead of a 'ui_file *'.
6981 * compile/compile-internal.h (generate_c_for_for_one_variable):
6982 Take a 'string_file &' instead of a 'ui_file *'.
6983 * compile/compile-loc2c.c (push, pushf, unary, binary)
6984 (print_label, pushf_register_address, pushf_register)
6985 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
6986 'ui_file *'. Adjust.
6987 * compile/compile.c (compile_to_object): Use string_file.
6988 * compile/compile.h (compile_dwarf_expr_to_c)
6989 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
6990 'ui_file *'.
6991 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
6992 (replace_typedefs_qualified_name): Use string_file and
6993 obstack_copy0.
6994 * disasm.c (gdb_pretty_print_insn): Use string_file.
6995 (gdb_disassembly): Adjust reference the null_stream global.
6996 (do_ui_file_delete): Delete.
6997 (gdb_insn_length): Use null_stream.
6998 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
6999 * dwarf2loc.c (dwarf2_compile_property_to_c)
7000 (locexpr_generate_c_location, loclist_generate_c_location): Take a
7001 'string_file &' instead of a 'ui_file *'.
7002 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
7003 * dwarf2read.c (do_ui_file_peek_last): Delete.
7004 (dwarf2_compute_name): Use string_file.
7005 * event-top.c (gdb_setup_readline): Use stdio_file.
7006 * gdbarch.sh (verify_gdbarch): Use string_file.
7007 * gdbtypes.c (safe_parse_type): Use null_stream.
7008 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
7009 string_file.
7010 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
7011 'string_file *' instead of a 'ui_file *'.
7012 (gdbscm_arch_disassemble): Use string_file.
7013 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
7014 * guile/scm-ports.c (class ioscm_file_port): Now a class that
7015 inherits from ui_file.
7016 (ioscm_file_port_delete, ioscm_file_port_rewind)
7017 (ioscm_file_port_put): Delete.
7018 (ioscm_file_port_write): Rename to ...
7019 (ioscm_file_port::write): ... this. Remove file_port_magic
7020 checks.
7021 (ioscm_file_port_new): Delete.
7022 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
7023 ui_file_up.
7024 * guile/scm-type.c (tyscm_type_name): Use string_file.
7025 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
7026 Use string_file.
7027 * infcmd.c (print_return_value_1): Use string_file.
7028 * infrun.c (print_target_wait_results): Use string_file.
7029 * language.c (add_language): Use string_file.
7030 * location.c (explicit_to_string_internal): Use string_file.
7031 * main.c (captured_main_1): Use null_file.
7032 * maint.c (maintenance_print_architecture): Use stdio_file.
7033 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
7034 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
7035 event_channel>: Change type to mi_console_file pointer.
7036 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
7037 (mi_console_file_delete): Delete.
7038 (struct mi_console_file): Delete.
7039 (mi_console_file_magic): Delete.
7040 (mi_console_file_new): Delete.
7041 (mi_console_file::mi_console_file): New.
7042 (mi_console_file_delete): Delete.
7043 (mi_console_file_fputs): Delete.
7044 (mi_console_file::write): New.
7045 (mi_console_raw_packet): Delete.
7046 (mi_console_file::flush): New.
7047 (mi_console_file_flush): Delete.
7048 (mi_console_set_raw): Rename to ...
7049 (mi_console_file::set_raw): ... this.
7050 * mi/mi-console.h (class mi_console_file): New class.
7051 (mi_console_file_new, mi_console_set_raw): Delete.
7052 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
7053 (mi_set_logging): Use delete and tee_file. Adjust.
7054 * mi/mi-main.c (output_register): Use string_file.
7055 (mi_cmd_data_evaluate_expression): Use string_file.
7056 (mi_cmd_data_read_memory): Use string_file.
7057 (mi_cmd_execute, print_variable_or_computed): Use string_file.
7058 * mi/mi-out.c (mi_ui_out::main_stream): New.
7059 (mi_ui_out::rewind): Use main_stream and
7060 string_file.
7061 (mi_ui_out::put): Use main_stream and string_file.
7062 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
7063 Allocate a 'string_file' instead.
7064 (mi_out_new): Don't allocate a mem_fileopen stream here.
7065 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
7066 (mi_ui_out::main_stream): Declare method.
7067 * printcmd.c (eval_command): Use string_file.
7068 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
7069 * python/py-arch.c (archpy_disassemble): Use string_file.
7070 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
7071 * python/py-frame.c (frapy_str): Use string_file.
7072 * python/py-framefilter.c (py_print_type, py_print_single_arg):
7073 Use string_file.
7074 * python/py-type.c (typy_str): Use string_file.
7075 * python/py-unwind.c (unwind_infopy_str): Use string_file.
7076 * python/py-value.c (valpy_str): Use string_file.
7077 * record-btrace.c (btrace_insn_history): Use string_file.
7078 * regcache.c (regcache_print): Use stdio_file.
7079 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
7080 * remote.c (escape_buffer): Use string_file.
7081 * rust-lang.c (rust_get_disr_info): Use string_file.
7082 * serial.c (serial_open_ops_1): Use stdio_file.
7083 (do_serial_close): Use delete.
7084 * stack.c (print_frame_arg): Use string_file.
7085 (print_frame_args): Remove local mem_fileopen stream, not used.
7086 (print_frame): Use string_file.
7087 * symmisc.c (maintenance_print_symbols): Use stdio_file.
7088 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
7089 Take a 'string_file *' instead of a 'ui_file *'.
7090 * top.c (new_ui): Use stdio_file and stderr_file.
7091 (free_ui): Use delete.
7092 (execute_command_to_string): Use string_file.
7093 (quit_confirm): Use string_file.
7094 * tracepoint.c (collection_list::append_exp): Use string_file.
7095 * tui/tui-disasm.c (tui_disassemble): Use string_file.
7096 * tui/tui-file.c: Don't include "ui-file.h".
7097 (enum streamtype, struct tui_stream): Delete.
7098 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
7099 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
7100 (tui_file::tui_file): New method.
7101 (tui_file_fputs): Delete.
7102 (tui_file_get_strbuf): Delete.
7103 (tui_file::puts): New method.
7104 (tui_file_adjust_strbuf): Delete.
7105 (tui_file_flush): Delete.
7106 (tui_file::flush): New method.
7107 * tui/tui-file.h: Tweak intro comment.
7108 Include ui-file.h.
7109 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
7110 (tui_file_adjust_strbuf): Delete declarations.
7111 (class tui_file): New class.
7112 * tui/tui-io.c (tui_initialize_io): Use tui_file.
7113 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
7114 (tui_register_format): Use string_stream.
7115 * tui/tui-stack.c (tui_make_status_line): Use string_file.
7116 (tui_get_function_from_frame): Use string_file.
7117 * typeprint.c (type_to_string): Use string_file.
7118 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
7119 (null_stream): New global.
7120 (ui_file_delete): Delete.
7121 (ui_file::ui_file): New.
7122 (null_file_isatty): Delete.
7123 (ui_file::~ui_file): New.
7124 (null_file_rewind): Delete.
7125 (ui_file::printf): New.
7126 (null_file_put): Delete.
7127 (null_file_flush): Delete.
7128 (ui_file::putstr): New.
7129 (null_file_write): Delete.
7130 (ui_file::putstrn): New.
7131 (null_file_read): Delete.
7132 (ui_file::putc): New.
7133 (null_file_fputs): Delete.
7134 (null_file_write_async_safe): Delete.
7135 (ui_file::vprintf): New.
7136 (null_file_delete): Delete.
7137 (null_file::write): New.
7138 (null_file_fseek): Delete.
7139 (null_file::puts): New.
7140 (ui_file_data): Delete.
7141 (null_file::write_async_safe): New.
7142 (gdb_flush, ui_file_isatty): Adjust.
7143 (ui_file_put, ui_file_rewind): Delete.
7144 (ui_file_write): Adjust.
7145 (ui_file_write_for_put): Delete.
7146 (ui_file_write_async_safe, ui_file_read): Adjust.
7147 (ui_file_fseek): Delete.
7148 (fputs_unfiltered): Adjust.
7149 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
7150 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
7151 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
7152 (set_ui_file_data): Delete.
7153 (string_file::~string_file, string_file::write)
7154 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
7155 (do_ui_file_as_string, ui_file_as_string): Delete.
7156 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
7157 (struct mem_file): Delete.
7158 (mem_file_new): Delete.
7159 (stdio_file::stdio_file): New.
7160 (mem_file_delete): Delete.
7161 (stdio_file::stdio_file): New.
7162 (mem_fileopen): Delete.
7163 (stdio_file::~stdio_file): New.
7164 (mem_file_rewind): Delete.
7165 (stdio_file::set_stream): New.
7166 (mem_file_put): Delete.
7167 (stdio_file::open): New.
7168 (mem_file_write): Delete.
7169 (stdio_file_magic, struct stdio_file): Delete.
7170 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
7171 (stdio_file::flush): New.
7172 (stdio_file_read): Rename to ...
7173 (stdio_file::read): ... this. Adjust.
7174 (stdio_file_write): Rename to ...
7175 (stdio_file::write): ... this. Adjust.
7176 (stdio_file_write_async_safe): Rename to ...
7177 (stdio_file::write_async_safe) ... this. Adjust.
7178 (stdio_file_fputs): Rename to ...
7179 (stdio_file::puts) ... this. Adjust.
7180 (stdio_file_isatty): Delete.
7181 (stdio_file_fseek): Delete.
7182 (stdio_file::isatty): New.
7183 (stderr_file_write): Rename to ...
7184 (stderr_file::write) ... this. Adjust.
7185 (stderr_file_fputs): Rename to ...
7186 (stderr_file::puts) ... this. Adjust.
7187 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
7188 (stderr_file::stderr_file): New.
7189 (tee_file_magic): Delete.
7190 (struct tee_file): Delete.
7191 (tee_file::tee_file): New.
7192 (tee_file_new): Delete.
7193 (tee_file::~tee_file): New.
7194 (tee_file_delete): Delete.
7195 (tee_file_flush): Rename to ...
7196 (tee_file::flush): ... this. Adjust.
7197 (tee_file_write): Rename to ...
7198 (tee_file::write): ... this. Adjust.
7199 (tee_file::write_async_safe): New.
7200 (tee_file_fputs): Rename to ...
7201 (tee_file::puts): ... this. Adjust.
7202 (tee_file_isatty): Rename to ...
7203 (tee_file::isatty): ... this. Adjust.
7204 * ui-file.h (struct obstack, struct ui_file): Don't
7205 forward-declare.
7206 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
7207 (ui_file_write_ftype)
7208 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
7209 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
7210 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
7211 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
7212 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
7213 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
7214 (set_ui_file_fseek): Delete.
7215 (ui_file_data, ui_file_delete, ui_file_rewind)
7216 (struct ui_file): New.
7217 (ui_file_up): New.
7218 (class null_file): New.
7219 (null_stream): Declare.
7220 (ui_file_write_for_put, ui_file_put): Delete.
7221 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
7222 Delete.
7223 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
7224 (gdb_fopen, tee_file_new): Delete.
7225 (struct string_file): New.
7226 (struct stdio_file): New.
7227 (stdio_file_up): New.
7228 (struct stderr_file): New.
7229 (class tee_file): New.
7230 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
7231 of a 'ui_file *'. Adjust.
7232 * ui-out.h (class ui_out) <field_stream>: Likewise.
7233 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
7234 (null_stream): Delete.
7235 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
7236 Adjust.
7237 * utils.h (struct ui_file): Delete forward declaration..
7238 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
7239 (error_stream): Take a 'string_file &' instead of a
7240 'ui_file *'.
7241 * varobj.c (varobj_value_get_print_value): Use string_file.
7242 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
7243 * gdbarch.c: Regenerate.
7244
187808b0
PA
72452017-02-02 Pedro Alves <palves@redhat.com>
7246
7247 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
7248 (gdb_pretty_print_insn): ... this. Now a free function. Add back
7249 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
7250 Adjust to call gdb_print_insn instead of
7251 gdb_disassembler::print_insn.
7252 (dump_insns, do_mixed_source_and_assembly_deprecated)
7253 (do_mixed_source_and_assembly, do_assembly_only): Add back a
7254 'gdbarch' parameter. Remove gdb_disassembler parameter.
7255 (gdb_disassembly): Don't allocate a gdb_disassembler here.
7256 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
7257 declaration.
7258 (gdb_pretty_print_insn): Re-add declaration.
7259 * record-btrace.c (btrace_insn_history): Don't allocate a
7260 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
7261
7a8eb317
SM
72622017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
7263
7264 * disasm.h (gdb_disassembly): Remove file_string parameter.
7265 * disasm.c (gdb_disassembly): Likewise.
7266 * cli/cli-cmds.c (print_disassembly): Adapt.
7267 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
7268 * stack.c (do_gdb_disassembly): Likewise.
7269
7346ef59
AA
72702017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
7271
7272 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
7273 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
7274 targets. And if the implicit value is longer than needed, extract
7275 the first bytes instead of the "least significant" ones.
7276
cd4007e4
MM
72772017-02-01 Markus Metzger <markus.t.metzger@intel.com>
7278
7279 * btrace.c (btrace_enable): Do not call btrace_add_pc for
7280 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
7281 (btrace_fetch): Assert can_access_registers_ptid.
7282 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
7283 validate_registers_access.
7284
cf77c34e
MM
72852017-02-01 Markus Metzger <markus.t.metzger@intel.com>
7286
7287 * gdbthread.h (can_access_registers_ptid): New.
7288 * thread.c (can_access_registers_ptid): New.
7289
be85ce7d
PA
72902017-02-01 Pedro Alves <palves@redhat.com>
7291
7292 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
7293
29b0b251
PA
72942017-01-31 Pedro Alves <palves@redhat.com>
7295
7296 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
7297 Fix typos.
7298
289b5b24
PA
72992017-01-31 Pedro Alves <palves@redhat.com>
7300
7301 * stack.c (print_frame_args): Remove local mem_fileopen stream,
7302 not used.
7303
b47413b4
PA
73042017-01-31 Pedro Alves <palves@redhat.com>
7305
7306 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
7307
60adb36c
PA
73082017-01-31 Pedro Alves <palves@redhat.com>
7309
7310 * common/scoped_restore.h
7311 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
7312 change the value's parameter type to T2.
7313 (make_scoped_restore): Likewise.
7314
2735833d
WT
73152017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7316 Richard Henderson <rth@redhat.com>
7317
7318 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
7319 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
7320 GS_BASE for older kernels.
7321 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
7322 GS_BASE for older kernels.
7323 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
7324 and GS_BASE to the offset table.
7325 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
7326 system register group.
7327 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
7328 for older kernels.
7329 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
7330 amd64 ABI.
7331 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
7332 AMD64_GSBASE_REGNUM.
7333 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
7334 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
7335 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
7336 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
7337 i386/64bit-segments.xml in those rules.
7338 * features/i386/64bit-segments.xml: New file.
7339 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
7340 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
7341 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
7342 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
7343 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
7344 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
7345 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
7346 * features/i386/amd64-avx-linux.c: Regenerated.
7347 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
7348 * features/i386/amd64-avx-mpx.c: Regenerated.
7349 * features/i386/amd64-avx512-linux.c: Regenerated.
7350 * features/i386/amd64-linux.c: Regenerated.
7351 * features/i386/amd64-mpx-linux.c: Regenerated.
7352 * features/i386/i386-avx-mpx-linux.c: Regenerated.
7353 * features/i386/i386-avx-mpx.c: Regenerated.
7354 * features/i386/x32-avx-linux.c: Regenerated.
7355 * features/i386/x32-avx512-linux.c: Regenerated.
7356 * regformats/i386/amd64-avx-linux.dat: Regenerated.
7357 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
7358 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
7359 * regformats/i386/amd64-linux.dat: Regenerated.
7360 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
7361 * regformats/i386/x32-avx-linux.dat: Regenerated.
7362 * regformats/i386/x32-avx512-linux.dat: Regenerated.
7363 * regformats/i386/x32-linux.dat: Regenerated.
7364
8884e97e
WT
73652017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7366
7367 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
7368 Set to AMD64_NUM_REGS.
7369
7005d26a
WT
73702017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7371
7372 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
7373 that checks validity of a register number.
7374
4bd2e1b2
KC
73752017-01-27 Kees Cook <keescook@google.com>
7376
7377 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
7378 fetch_fpregs if target has fpa registers.
7379 (arm_linux_store_inferior_registers): Call store_fpregs if target
7380 has fpa registers.
7381
7cf1de6c
AA
73822017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
7383
7384 * cris-tdep.c (cris_gdbarch_init): Remove check for
7385 info.byte_order and force it to BFD_ENDIAN_LITTLE.
7386
874a1c8c
AT
73872017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
7388
7389 * corelow.c (get_core_register_section): Check for regset
7390 existence before checking for REGSET_VARIABLE_SIZE.
7391
d8b49cf0
YQ
73922017-01-26 Yao Qi <yao.qi@linaro.org>
7393 Pedro Alves <palves@redhat.com>
7394
7395 PR gdb/20939
7396 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
7397 call memory_error, save memaddr instead.
7398 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
7399 negative, cal memory_error.
7400 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
7401
658ca58c
YQ
74022017-01-26 Yao Qi <yao.qi@linaro.org>
7403
7404 * disasm-selftests.c (memory_error_test): New function.
7405 (_initialize_disasm_selftests): Register memory_error_test.
7406
79843d45
YQ
74072017-01-26 Yao Qi <yao.qi@linaro.org>
7408
7409 * Makefile.in (SFILES): Add disasm-selftests.c and
7410 selftest-arch.c.
7411 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
7412 * disasm-selftests.c: New file.
7413 * selftest-arch.c: New file.
7414 * selftest-arch.h: New file.
7415
8cafda32
YQ
74162017-01-26 Yao Qi <yao.qi@linaro.org>
7417
7418 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
7419 to bfd_arch_mep. Don't return 0 if section is not
7420 found. Call print_insn_mep.
7421
e47ad6c0
YQ
74222017-01-26 Pedro Alves <palves@redhat.com>
7423 Yao Qi <yao.qi@linaro.org>
7424
7425 * arm-tdep.c: Include "disasm.h".
7426 (gdb_print_insn_arm): Update code to get gdbarch.
7427 * disasm.c (dis_asm_read_memory): Change it to
7428 gdb_disassembler::dis_asm_read_memory.
7429 (dis_asm_memory_error): Likewise.
7430 (dis_asm_print_address): Likewise.
7431 (gdb_pretty_print_insn): Change it to
7432 gdb_disassembler::pretty_print_insn.
7433 (dump_insns): Add one argument gdb_disassemlber. All
7434 callers updated.
7435 (do_mixed_source_and_assembly_deprecated): Likewise.
7436 (do_mixed_source_and_assembly): Likewise.
7437 (do_assembly_only): Likewise.
7438 (gdb_disassembler::gdb_disassembler): New.
7439 (gdb_disassembler::print_insn): New.
7440 * disasm.h (class gdb_disassembler): New.
7441 (gdb_pretty_print_insn): Remove declaration.
7442 (gdb_disassemble_info): Likewise.
7443 * guile/scm-disasm.c (class gdbscm_disassembler): New.
7444 (gdbscm_disasm_read_memory_worker): Update.
7445 (gdbscm_disasm_read_memory): Update.
7446 (gdbscm_disasm_memory_error): Remove.
7447 (gdbscm_disasm_print_address): Remove.
7448 (gdbscm_disassembler::gdbscm_disassembler): New.
7449 (gdbscm_print_insn_from_port): Update.
7450 * mips-tdep.c: Include disasm.h.
7451 (gdb_print_insn_mips): Update code to get gdbarch.
7452 * record-btrace.c (btrace_insn_history): Update.
7453 * spu-tdep.c: Include disasm.h.
7454 (struct spu_dis_asm_data): Remove.
7455 (struct spu_dis_asm_info): New.
7456 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
7457 SPU id.
7458 (gdb_print_insn_spu): Cast disassemble_info to
7459 spu_dis_asm_info.
7460
80d75874
YQ
74612017-01-26 Yao Qi <yao.qi@linaro.org>
7462
7463 * disasm.c (do_ui_file_delete): Delete.
7464 (gdb_insn_length): Move code creating stream to ...
7465 * utils.c (null_stream): ... here. New function.
7466 * utils.h (null_stream): Declare.
7467
60685cd0
SM
74682017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
7469
7470 * python/py-inferior.c (find_thread_object): Return directly
7471 from the loop. Remove "found" variable.
7472
eb1cdb62
JB
74732017-01-21 Joel Brobecker <brobecker@adacore.com>
7474
7475 GDB 7.12.1 released.
7476
b1ce6568
SM
74772017-01-20 Simon Marchi <simon.marchi@ericsson.com>
7478
7479 * python/py-function.c (fnpy_call): Reorder declarations to have
7480 the gdbpy_enter object declared first.
7481 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
7482
6f8b0407
SM
74832017-01-20 Simon Marchi <simon.marchi@ericsson.com>
7484
fec93fb1 7485 PR python/21068
6f8b0407
SM
7486 * python/python-internal.h (PyMem_RawMalloc): Define for
7487 Python < 3.4.
7488 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
7489 PyMem_RawMalloc instead of PyMem_Malloc.
7490
78cbbba8
LM
74912017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
7492 Luis Machado <lgustavo@codesourcery.com>
7493
7494 * NEWS (New commands): Mention flash-erase.
7495 (New MI commands): Mention target-flash-erase.
7496 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
7497 command.
7498 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
7499 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
7500 * target.c (flash_erase_command): New function.
7501 (initialize_targets): Add new flash-erase command.
7502 * target.h (flash_erase_command): New declaration.
7503
2132fe85
JB
75042017-01-20 Joel Brobecker <brobecker@adacore.com>
7505
7506 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
7507 HAVE_SYS_PROCFS_H is defined.
7508
d1dff226
AH
75092017-01-18 Alan Hayward <alan.hayward@arm.com>
7510
7511 * remote.c (struct cached_reg): Change data into a pointer.
7512 * (stop_reply_dtr): Free data pointers before deleting vector.
7513 (process_stop_reply): Likewise.
7514 (remote_parse_stop_reply): Allocate space for data
7515
9890e433
AH
75162017-01-18 Alan Hayward <alan.hayward@arm.com>
7517
7518 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
7519 MAX_REGISTER_SIZE.
7520 (amd64_pseudo_register_read_value): Likewise.
7521 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
7522 (store_register_using_P): Likewise.
7523 * regcache.c (regcache_xfer_part): Likewise.
7524
7a36499a
IR
75252017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
7526
7527 Split real and pseudo registers.
7528 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
7529 (sparc32_pseudo_regnum): New enum.
7530 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
7531 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
7532 (SPARC32_CP0_REGISTERS): New macro.
7533 (sparc32_pseudo_register_name): New function.
7534 (sparc32_register_name): Use sparc32_pseudo_register_name.
7535 (sparc32_pseudo_register_type): New function.
7536 (sparc32_register_type): Use sparc32_pseudo_register_type.
7537 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
7538 pseudo register numbers.
7539 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
7540 (SPARC64_CP0_REGISTERS): New macro.
7541 (sparc64_pseudo_register_name): New function.
7542 (sparc64_register_name): Use sparc64_pseudo_register_name.
7543 (sparc64_pseudo_register_type): New function.
7544 (sparc64_register_type): Use sparc64_pseudo_register_type.
7545 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
7546 pseudo register numbers.
7547 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
7548 sparc64_store_arguments): Handle pseudo register numbers.
7549
6f8976bf
YQ
75502017-01-13 Yao Qi <yao.qi@linaro.org>
7551
7552 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
7553 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
7554 output.
7555 (getpkt_or_notif_sane_1): Likewise.
7556
e4241ace
YQ
75572017-01-13 Yao Qi <yao.qi@linaro.org>
7558
7559 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
7560 of CC. Pass "-x c++-header" instead of "-x c".
7561
3015c064
SM
75622017-01-12 Simon Marchi <simon.marchi@ericsson.com>
7563
7564 * remote.c (remote_can_async_p): Update comment.
7565
fde1b17d
SM
75662017-01-12 Simon Marchi <simon.marchi@ericsson.com>
7567
7568 * linux-nat.c (linux_nat_can_async_p): Update comment.
7569
ca1ca08b
SM
75702017-01-12 Simon Marchi <simon.marchi@ericsson.com>
7571
7572 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
7573
4ad2da73
SM
75742017-01-11 Simon Marchi <simon.marchi@ericsson.com>
7575
7576 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
7577
c8b23b3f
TT
75782017-01-10 Tom Tromey <tom@tromey.com>
7579
7580 * python/py-type.c (typy_legacy_template_argument): Update.
7581 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
7582 ~demangle_parse_info): Declare new members.
7583 (cp_demangled_name_to_comp): Return unique_ptr.
7584 (cp_demangled_name_parse_free)
7585 (make_cleanup_cp_demangled_name_parse_free)
7586 (cp_new_demangle_parse_info): Remove.
7587 * cp-support.c (do_demangled_name_parse_free_cleanup)
7588 (make_cleanup_cp_demangled_name_parse_free): Remove.
7589 (inspect_type, cp_canonicalize_string_full)
7590 (cp_canonicalize_string): Update.
7591 (mangled_name_to_comp): Change return type.
7592 (cp_class_name_from_physname, method_name_from_physname)
7593 (cp_func_name, cp_remove_params): Update.
7594 * cp-name-parser.y (demangle_parse_info): New constructor, from
7595 cp_new_demangle_parse_info.
7596 (~demangle_parse_info): New destructor, from
7597 cp_demangled_name_parse_free.
7598 (cp_merge_demangle_parse_infos): Update.
7599 (cp_demangled_name_to_comp): Change return type.
7600
1ac32117
TT
76012017-01-10 Tom Tromey <tom@tromey.com>
7602
7603 * top.c (prevent_dont_repeat): Change return type.
7604 * python/python.c (execute_gdb_command): Use std::string.
7605 Update.
7606 * guile/guile.c (gdbscm_execute_gdb_command): Update.
7607 * command.h (prevent_dont_repeat): Change return type.
7608 * breakpoint.c (bpstat_do_actions_1): Update.
7609
0cf08227
TT
76102017-01-10 Tom Tromey <tom@tromey.com>
7611
7612 * value.h (scoped_value_mark::~scoped_value_mark): Call
7613 free_to_mark.
7614 (scoped_value_mark::free_to_mark): New method.
7615 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
7616 scoped_value_mark.
7617
eb115069
TT
76182017-01-10 Tom Tromey <tom@tromey.com>
7619
7620 * python/py-value.c (valpy_dereference, valpy_referenced_value)
7621 (valpy_reference_value, valpy_const_value, valpy_get_address)
7622 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
7623 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
7624 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
7625 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
7626 scoped_value_mark.
7627 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
7628 * value.h (scoped_value_mark): New class.
7629
906768f9
TT
76302017-01-10 Tom Tromey <tom@tromey.com>
7631
7632 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
7633 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
7634 * psymtab.c (discard_psymtabs_upto): Remove.
7635 (make_cleanup_discard_psymtabs): Remove.
7636 (struct psymtab_state): Remove.
7637
bef155c3
TT
76382017-01-10 Tom Tromey <tom@tromey.com>
7639
7640 * record-full.c (record_full_save_cleanups): Remove.
7641 (record_full_save): Use gdb::unlinker.
7642 * gcore.c (do_bfd_delete_cleanup): Remove.
7643 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
7644 cleanups.
7645 * dwarf2read.c (unlink_if_set): Remove.
7646 (write_psymtabs_to_index): Use gdb::unlinker.
7647 * common/gdb_unlinker.h: New file.
7648
192b62ce
TT
76492017-01-10 Tom Tromey <tom@tromey.com>
7650
7651 * windows-tdep.c (windows_xfer_shared_library): Update.
7652 * windows-nat.c (windows_make_so): Update.
7653 * utils.h (make_cleanup_bfd_unref): Remove.
7654 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
7655 * symfile.h (symfile_bfd_open)
7656 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
7657 * symfile.c (read_symbols, symbol_file_add)
7658 (separate_debug_file_exists): Update.
7659 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
7660 (generic_load, reread_symbols): Update.
7661 * symfile-mem.c (symbol_file_add_from_memory): Update.
7662 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
7663 (spu_symbol_file_add_from_memory): Update.
7664 * solist.h (struct target_so_ops) <bfd_open>: Return
7665 gdb_bfd_ref_ptr.
7666 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
7667 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
7668 gdb_bfd_ref_ptr.
7669 (solib_map_sections, reload_shared_libraries_1): Update.
7670 * solib-svr4.c (enable_break): Update.
7671 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
7672 * solib-frv.c (enable_break2): Update.
7673 * solib-dsbt.c (enable_break): Update.
7674 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
7675 gdb_bfd_ref_ptr.
7676 (darwin_solib_get_all_image_info_addr_at_init): Update.
7677 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
7678 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
7679 * record-full.c (record_full_save): Update.
7680 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
7681 * procfs.c (insert_dbx_link_bpt_in_file): Update.
7682 * minidebug.c (find_separate_debug_file_in_section): Return
7683 gdb_bfd_ref_ptr.
7684 * machoread.c (macho_add_oso_symfile): Change abfd to
7685 gdb_bfd_ref_ptr.
7686 (macho_symfile_read_all_oso): Update.
7687 (macho_check_dsym): Return gdb_bfd_ref_ptr.
7688 (macho_symfile_read): Update.
7689 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
7690 (jit_bfd_try_read_symtab): Update.
7691 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7692 (gdb_bfd_openw, gdb_bfd_openr_iovec)
7693 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
7694 gdb_bfd_ref_ptr.
7695 (gdb_bfd_ref_policy): New struct.
7696 (gdb_bfd_ref_ptr): New typedef.
7697 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7698 (gdb_bfd_openw, gdb_bfd_openr_iovec)
7699 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
7700 gdb_bfd_ref_ptr.
7701 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
7702 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
7703 (gcore_command): Update.
7704 * exec.c (exec_file_attach): Update.
7705 * elfread.c (elf_symfile_read): Update.
7706 * dwarf2read.c (dwarf2_get_dwz_file): Update.
7707 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
7708 (open_and_init_dwo_file): Update.
7709 (open_dwp_file): Return gdb_bfd_ref_ptr.
7710 (open_and_init_dwp_file): Update.
7711 * corelow.c (core_open): Update.
7712 * compile/compile-object-load.c (compile_object_load): Update.
7713 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
7714 * coffread.c (coff_symfile_read): Update.
7715 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
7716 gdb_bfd_ref_ptr. Rename.
7717 (dump_bfd_file, restore_command): Update.
7718 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
7719 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
7720 (find_separate_debug_file_by_buildid): Update.
7721
50315b21
TT
77222017-01-10 Tom Tromey <tom@tromey.com>
7723
7724 * common/gdb_ref_ptr.h: New file.
7725 * python/py-ref.h (struct gdbpy_ref_policy): New.
7726 (gdbpy_ref): Now a typedef.
7727
fc4007c9
TT
77282017-01-10 Tom Tromey <tom@tromey.com>
7729
7730 * utils.h (make_cleanup_htab_delete): Don't declare.
7731 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
7732 Remove.
7733 * linespec.c (decode_compound_collector): Add constructor,
7734 destructor.
7735 (lookup_prefix_sym): Remove cleanup.
7736 (symtab_collector): Add constructor, destructor.
7737 (collect_symtabs_from_filename): Remove cleanup.
7738 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
7739 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
7740 Use htab_up.
7741 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
7742 * dwarf2read.c (dw2_expand_symtabs_matching)
7743 (dw2_map_symbol_filenames, dwarf_decode_macros)
7744 (write_psymtabs_to_index): Use htab_up.
7745 * dwarf2loc.c (func_verify_no_selftailcall)
7746 (call_site_find_chain_1, func_verify_no_selftailcall)
7747 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
7748 std::vector, gdb::unique_xmalloc_ptr.
7749 (call_sitep): Remove typedef.
7750 (dwarf2_locexpr_baton_eval): Remove unused variable.
7751
8dbcee67
TT
77522017-01-10 Tom Tromey <tom@tromey.com>
7753
7754 * python/python-internal.h (make_cleanup_py_decref)
7755 (make_cleanup_py_xdecref): Don't declare.
7756 * python/py-utils.c (py_decref, make_cleanup_py_decref)
7757 (py_xdecref, make_cleanup_py_xdecref): Remove.
7758
13df46cc
TT
77592017-01-10 Tom Tromey <tom@tromey.com>
7760
7761 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
7762 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
7763
06fc9bf7
TT
77642017-01-10 Tom Tromey <tom@tromey.com>
7765
7766 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
7767
830a4934
TT
77682017-01-10 Tom Tromey <tom@tromey.com>
7769
7770 * python/py-utils.c (unicode_to_encoded_string)
7771 (python_string_to_target_string)
7772 (python_string_to_target_python_string)
7773 (python_string_to_host_string, gdbpy_obj_to_string)
7774 (get_addr_from_python): Use gdbpy_ref.
7775
4586d543
TT
77762017-01-10 Tom Tromey <tom@tromey.com>
7777
7778 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
7779 gdbpy_ref.
7780
59876f8f
TT
77812017-01-10 Tom Tromey <tom@tromey.com>
7782
7783 * python/python.c (eval_python_command, gdbpy_decode_line)
7784 (gdbpy_run_events, gdbpy_start_type_printers)
7785 (gdbpy_apply_type_printers): Use gdbpy_ref.
7786
97d83487
TT
77872017-01-10 Tom Tromey <tom@tromey.com>
7788
7789 * python/py-param.c (get_doc_string, compute_enum_values): Use
7790 gdbpy_ref.
7791
9205649a
TT
77922017-01-10 Tom Tromey <tom@tromey.com>
7793
7794 * python/py-inferior.c (find_thread_object, build_inferior_list):
7795 Use gdbpy_ref.
7796
74c49d45
TT
77972017-01-10 Tom Tromey <tom@tromey.com>
7798
7799 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
7800
16361ffb
TT
78012017-01-10 Tom Tromey <tom@tromey.com>
7802
7803 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
7804 gdbpy_ref.
7805
905f2cca
TT
78062017-01-10 Tom Tromey <tom@tromey.com>
7807
7808 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
7809 extra incref.
7810 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
7811 Use gdbpy_ref.
7812
64081434
TT
78132017-01-10 Tom Tromey <tom@tromey.com>
7814
7815 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
7816 gdbpy_ref.
7817
59e9e831
TT
78182017-01-10 Tom Tromey <tom@tromey.com>
7819
7820 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
7821 decref results of PyArg_ParseTupleAndKeywords.
7822
9de10f6d
TT
78232017-01-10 Tom Tromey <tom@tromey.com>
7824
7825 * python/python.c (python_run_simple_file): Use
7826 unique_xmalloc_ptr, gdbpy_ref.
7827
2bd5759d
TT
78282017-01-10 Tom Tromey <tom@tromey.com>
7829
7830 * python/py-prettyprint.c (print_stack_unless_memory_error)
7831 (print_string_repr, print_children): Use gdbpy_ref.
7832 (dummy_python_frame): New class.
7833 (dummy_python_frame::dummy_python_frame): Rename from
7834 push_dummy_python_frame.
7835 (py_restore_tstate): Remove.
7836
3b4e0e01
TT
78372017-01-10 Tom Tromey <tom@tromey.com>
7838
7839 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
7840
17a22718
TT
78412017-01-10 Tom Tromey <tom@tromey.com>
7842
7843 * python/python.c (ensure_python_env, restore_python_env):
7844 Remove.
7845 * python/python-internal.h (ensure_python_env): Don't declare.
7846 * varobj.h (varobj_ensure_python_env): Don't declare.
7847 * varobj.c (varobj_ensure_python_env): Remove.
7848
68cdc557
TT
78492017-01-10 Tom Tromey <tom@tromey.com>
7850
7851 * varobj.c (varobj_value_get_print_value): Use
7852 gdbpy_enter_varobj.
7853
1eba6383
TT
78542017-01-10 Tom Tromey <tom@tromey.com>
7855
7856 * python/py-prettyprint.c (print_string_repr, print_children):
7857 Update.
7858 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
7859 of "encoding".
7860 * varobj.c (varobj_value_get_print_value): Update.
7861 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
7862
bde7b3e3
TT
78632017-01-10 Tom Tromey <tom@tromey.com>
7864
7865 * varobj.c (varobj_get_display_hint)
7866 (dynamic_varobj_has_child_method, install_new_value_visualizer)
7867 (varobj_set_visualizer, free_variable): Use
7868 gdbpy_enter_varobj.
7869
a7785f8c
TT
78702017-01-10 Tom Tromey <tom@tromey.com>
7871
7872 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
7873 (do_finish_initialization): New function. Use gdbpy_ref.
7874 (gdbpy_finish_initialization): Use gdbpy_enter. Call
7875 do_finish_initialization.
7876
2865bfce
TT
78772017-01-10 Tom Tromey <tom@tromey.com>
7878
7879 * python/py-param.c (get_set_value, get_show_value): Use
7880 gdbpy_enter, gdbpy_ref.
7881
0e9dcc75
TT
78822017-01-10 Tom Tromey <tom@tromey.com>
7883
7884 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
7885
12a5cedd
TT
78862017-01-10 Tom Tromey <tom@tromey.com>
7887
7888 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
7889
788f2586
TT
78902017-01-10 Tom Tromey <tom@tromey.com>
7891
7892 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
7893 Use gdbpy_enter_varobj.
7894
6cd67bea
TT
78952017-01-10 Tom Tromey <tom@tromey.com>
7896
7897 * varobj.c (gdbpy_enter_varobj): New constructor.
7898 * python/python-internal.h (gdbpy_enter_varobj): New class.
7899 * python/py-varobj.c (py_varobj_get_iterator): Use
7900 gdbpy_enter_varobj.
7901
14b122bf
TT
79022017-01-10 Tom Tromey <tom@tromey.com>
7903
7904 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
7905 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
7906 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
7907 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
7908 unique_xmalloc_ptr.
7909 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
7910
bf1ca3b9
TT
79112017-01-10 Tom Tromey <tom@tromey.com>
7912
7913 * python/py-xmethods.c (invoke_match_method): Use
7914 gdbpy_ref.
7915
572a5524
TT
79162017-01-10 Tom Tromey <tom@tromey.com>
7917
7918 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
7919 gdbpy_enter, gdbpy_ref.
7920
396a78b6
TT
79212017-01-10 Tom Tromey <tom@tromey.com>
7922
7923 * python/python.c (python_interactive_command): Use gdbpy_enter.
7924
a88b13c7
TT
79252017-01-10 Tom Tromey <tom@tromey.com>
7926
7927 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
7928 gdbpy_ref.
7929
e9f0c363
TT
79302017-01-10 Tom Tromey <tom@tromey.com>
7931
7932 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
7933 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
7934
6349f452
TT
79352017-01-10 Tom Tromey <tom@tromey.com>
7936
7937 * utils.h (htab_deleter): New struct.
7938 (htab_up): New typedef.
7939 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
7940 gdbpy_enter, gdbpy_ref, htab_up.
7941
c0171de6
TT
79422017-01-10 Tom Tromey <tom@tromey.com>
7943
7944 * python/py-unwind.c (pending_frame_invalidate): Remove.
7945 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
7946
f18e226f
TT
79472017-01-10 Tom Tromey <tom@tromey.com>
7948
7949 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
7950 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
7951
c57af3f1
TT
79522017-01-10 Tom Tromey <tom@tromey.com>
7953
7954 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
7955
60e600ec
TT
79562017-01-10 Tom Tromey <tom@tromey.com>
7957
7958 * python/python.c (gdbpy_eval_from_control_command)
7959 (gdbpy_source_script, gdbpy_run_events)
7960 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
7961 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
7962 gdbpy_enter.
7963
bf7da5b0
TT
79642017-01-10 Tom Tromey <tom@tromey.com>
7965
7966 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
7967
2d38bced
TT
79682017-01-10 Tom Tromey <tom@tromey.com>
7969
7970 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
7971
07bc7329
TT
79722017-01-10 Tom Tromey <tom@tromey.com>
7973
7974 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
7975 (python_on_inferior_call_pre, python_on_inferior_call_post)
7976 (python_on_memory_change, python_on_register_change)
7977 (python_inferior_exit, python_new_objfile, add_thread_object)
7978 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
7979
6e7c365e
TT
79802017-01-10 Tom Tromey <tom@tromey.com>
7981
7982 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
7983 (bpfinishpy_handle_exit): Use gdbpy_enter.
7984
6ba0cd40
TT
79852017-01-10 Tom Tromey <tom@tromey.com>
7986
7987 * python/py-cmd.c (cmdpy_destroyer)
7988 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
7989 gdbpy_enter.
7990
de2dc875
TT
79912017-01-10 Tom Tromey <tom@tromey.com>
7992
7993 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
7994 gdbpy_enter.
7995 (gdbpy_breakpoint_has_cond): Likewise.
7996
4ecee2c4
TT
79972017-01-10 Tom Tromey <tom@tromey.com>
7998
7999 * python/python.c (gdbpy_enter): New constructor.
8000 (~gdbpy_enter): New destructor.
8001 (restore_python_env, ensure_python_env): Rewrite.
8002 * python/python-internal.h (gdbpy_enter): New class.
8003
37fce74f
TT
80042017-01-10 Tom Tromey <tom@tromey.com>
8005
8006 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
8007
53a0cca3
TT
80082017-01-10 Tom Tromey <tom@tromey.com>
8009
8010 * python/py-value.c (value_has_field, get_field_flag)
8011 (get_field_type, valpy_getitem, convert_value_from_python): Use
8012 gdbpy_ref.
8013
ff3724f5
TT
80142017-01-10 Tom Tromey <tom@tromey.com>
8015
8016 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
8017 gdbpy_ref.
8018
0700aea5
TT
80192017-01-10 Tom Tromey <tom@tromey.com>
8020
8021 * python/py-prettyprint.c (search_pp_list)
8022 (find_pretty_printer_from_objfiles)
8023 (find_pretty_printer_from_progspace)
8024 (find_pretty_printer_from_gdb, find_pretty_printer)
8025 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
8026 gdbpy_ref.
8027
1bb44c9f
TT
80282017-01-10 Tom Tromey <tom@tromey.com>
8029
8030 * python/py-param.c (call_doc_function): Use gdbpy_ref.
8031
87ce03fd
TT
80322017-01-10 Tom Tromey <tom@tromey.com>
8033
8034 * python/py-linetable.c (build_line_table_tuple_from_pcs)
8035 (ltpy_get_all_source_lines): Use gdbpy_ref.
8036
ee0a3fb8
TT
80372017-01-10 Tom Tromey <tom@tromey.com>
8038
8039 * python/py-framefilter.c (extract_sym, extract_value)
8040 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
8041 gdbpy_ref.
8042
bf2a52fa
TT
80432017-01-10 Tom Tromey <tom@tromey.com>
8044
8045 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
8046
f59fe7f8
TT
80472017-01-10 Tom Tromey <tom@tromey.com>
8048
8049 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
8050
80bd970a
TT
80512017-01-10 Tom Tromey <tom@tromey.com>
8052
8053 * python/py-function.c (convert_values_to_python, fnpy_init): Use
8054 gdbpy_ref.
8055
d1b3de2e
TT
80562017-01-10 Tom Tromey <tom@tromey.com>
8057
8058 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
8059
3bb43384
TT
80602017-01-10 Tom Tromey <tom@tromey.com>
8061
8062 * python/py-type.c (convert_field, make_fielditem, typy_fields)
8063 (typy_range): Use gdbpy_ref.
8064
abf5651e
TT
80652017-01-10 Tom Tromey <tom@tromey.com>
8066
8067 * python/py-threadevent.c (create_thread_event_object): Use
8068 gdbpy_ref.
8069 * python/py-stopevent.c (create_stop_event_object): Simplify.
8070 (emit_stop_event): Use gdbpy_ref.
8071 * python/py-signalevent.c (create_signal_event_object): Use
8072 gdbpy_ref.
8073 * python/py-newobjfileevent.c (create_new_objfile_event_object)
8074 (emit_new_objfile_event, create_clear_objfiles_event_object)
8075 (emit_clear_objfiles_event): Use gdbpy_ref.
8076 * python/py-infevents.c (create_inferior_call_event_object)
8077 (create_register_changed_event_object)
8078 (create_memory_changed_event_object, emit_inferior_call_event)
8079 (emit_memory_changed_event, emit_register_changed_event): Use
8080 gdbpy_ref.
8081 * python/py-exitedevent.c (create_exited_event_object)
8082 (emit_exited_event): Use gdbpy_ref.
8083 * python/py-event.h (evpy_emit_event): Remove
8084 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
8085 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
8086 * python/py-continueevent.c (emit_continue_event): Use
8087 gdbpy_ref.
8088 * python/py-breakpoint.c (gdbpy_breakpoint_created)
8089 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
8090 gdbpy_ref.
8091 * python/py-bpevent.c (create_breakpoint_event_object): Use
8092 gdbpy_ref.
8093
a68ff33e
TT
80942017-01-10 Tom Tromey <tom@tromey.com>
8095
8096 * python/py-ref.h: New file.
8097
7becfd03
SM
80982017-01-10 Simon Marchi <simon.marchi@ericsson.com>
8099
8100 * cli-out.c (cli_ui_out::do_redirect): Change return type to
8101 void.
8102 * cli-out.h (cli_ui_out::do_redirect): Likewise.
8103 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
8104 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
8105 * ui-out.c (ui_out::redirect): Likewise.
8106 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
8107 * cli/cli-logging.c (set_logging_redirect): Update call site of
8108 ui_out::redirect.
8109 (handle_redirections): Likewise.
8110 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
8111 * top.c (execute_command_to_string): Likewise.
8112 * utils.c (do_ui_out_redirect_pop): Likewise.
8113
df294654
SM
81142017-01-10 Simon Marchi <simon.marchi@ericsson.com>
8115
8116 * stack.c (_initialize_stack): Update "frame" command help message.
8117
f5e6296e
IB
81182017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
8119
8120 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
8121
0e2d6fa6
YQ
81222017-01-06 Yao Qi <yao.qi@linaro.org>
8123
8124 * x86-linux-nat.h: Include gdb_proc_service.h.
8125
44d6d3f9
YQ
81262017-01-06 Yao Qi <yao.qi@linaro.org>
8127
8128 * ser-base.h: Include serial.h.
8129
656731fe
YQ
81302017-01-06 Yao Qi <yao.qi@linaro.org>
8131
8132 * ppc-linux-tdep.h: Include ppc-tdep.h.
8133
1ca8f924
YQ
81342017-01-06 Yao Qi <yao.qi@linaro.org>
8135
8136 * nat/amd64-linux-siginfo.h: Include signal.h.
8137
bc3008c4
YQ
81382017-01-06 Yao Qi <yao.qi@linaro.org>
8139
8140 * nat/aarch64-linux-hw-point.h: Include break-common.h.
8141
66c80d03
YQ
81422017-01-06 Yao Qi <yao.qi@linaro.org>
8143
8144 * mi/mi-parse.h: Include mi-cmds.h.
8145
051d2dda
YQ
81462017-01-06 Yao Qi <yao.qi@linaro.org>
8147
8148 * inf-loop.c: Don't include "target.h".
8149 * inf-loop.h: Include it here.
8150
8018d34f
YQ
81512017-01-06 Yao Qi <yao.qi@linaro.org>
8152
8153 * dfp.h: Include "dboulest.h" and "expression.h".
8154
c0b8369c
YQ
81552017-01-06 Yao Qi <yao.qi@linaro.org>
8156
8157 * ax-gdb.h: Include "ax.h".
8158
ad5cba2a
YQ
81592017-01-06 Yao Qi <yao.qi@linaro.org>
8160
8161 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
8162 with nat/gdb_ptrace.h.
8163
1c33cd7f
YQ
81642017-01-05 Yao Qi <yao.qi@linaro.org>
8165
8166 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
8167 new line.
8168 (mips64_fbsd_sigframe_init): Likewise.
8169
c988ac1d
JB
81702017-01-04 John Baldwin <jhb@FreeBSD.org>
8171
8172 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
8173 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
8174
b268007c
JB
81752017-01-04 John Baldwin <jhb@FreeBSD.org>
8176
8177 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8178 * NEWS: Mention new FreeBSD/mips native configuration.
8179 * config/mips/fbsd.mh: New file.
8180 * configure.host: Add mips*-*-freebsd*.
8181 * mips-fbsd-nat.c: New file.
8182
387360da
JB
81832017-01-04 John Baldwin <jhb@FreeBSD.org>
8184
8185 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
8186 (ALLDEPFILES): Add mips-fbsd-tdep.c.
8187 * NEWS: Mention new FreeBSD/mips target.
8188 * configure.tgt: Add mips*-*-freebsd*.
8189 * mips-fbsd-tdep.c: New file.
8190 * mips-fbsd-tdep.h: New file.
8191
2aaaf250
YQ
81922017-01-04 Yao Qi <yao.qi@linaro.org>
8193
8194 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
8195 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
8196
61baf725
JB
81972017-01-01 Joel Brobecker <brobecker@adacore.com>
8198
6dbb839a 8199 Update copyright year range in all GDB files.
61baf725 8200
c113e7ff 82012017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 8202
c113e7ff 8203 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 8204
c113e7ff 8205For older changes see ChangeLog-2016.
c906108c
SS
8206\f
8207Local Variables:
8208mode: change-log
8209left-margin: 8
8210fill-column: 74
8211version-control: never
57da7796 8212coding: utf-8
c906108c 8213End: