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