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