Riscv ld-elf/stab failure and fake label cleanup.
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
fc35dab1
UW
12017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * core-regset.c: Remove file.
4 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
5
2400729e
UW
62017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7
8 * NEWS: Document use of GNU MPFR.
9 * README: Likewise.
10
11 * Makefile.in (LIBMPFR): Add define.
12 (CLIBS): Add $(LIBMPFR).
13 * configure.ac: Add --with-mpfr configure option.
14 * configure: Regenerate.
15 * config.in: Regenerate.
16
17 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
18 (class mpfr_float_ops): New type.
19 (mpfr_float_ops::from_target): Two new overloaded functions.
20 (mpfr_float_ops::to_target): Likewise.
21 (mpfr_float_ops::to_string): New function.
22 (mpfr_float_ops::from_string): Likewise.
23 (mpfr_float_ops::to_longest): Likewise.
24 (mpfr_float_ops::from_longest): Likewise.
25 (mpfr_float_ops::from_ulongest): Likewise.
26 (mpfr_float_ops::to_host_double): Likewise.
27 (mpfr_float_ops::from_host_double): Likewise.
28 (mpfr_float_ops::convert): Likewise.
29 (mpfr_float_ops::binop): Likewise.
30 (mpfr_float_ops::compare): Likewise.
31 (get_target_float_ops): Use mpfr_float_ops if available.
32
7a26362d
UW
332017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
34
35 * target-float.c: Do not include <math.h>.
36 Include <cmath> and <limits>.
37 (DOUBLEST): Do not define.
38 (class target_float_ops): New type.
39 (class host_float_ops): New templated type.
40 (class decimal_float_ops): New type.
41
42 (floatformat_to_doublest): Rename to ...
43 (host_float_ops<T>::from_target): ... this. Use template type T
44 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
45 (host_float_ops<T>::from_target): New overload using a type argument.
46 (floatformat_from_doublest): Rename to ...
47 (host_float_ops<T>::to_target): ... this. Use template type T
48 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
49 (host_float_ops<T>::to_target): New overload using a type argument.
50 (floatformat_printf_format): New function.
51 (struct printf_length_modifier): New templated type.
52 (floatformat_to_string): Rename to ...
53 (host_float_ops<T>::to_string): ... this. Use type instead of
54 floatformat argument. Use floatformat_printf_format and
55 printf_length_modifier. Remove special handling of invalid numbers,
56 infinities and NaN (moved to target_float_to_string).
57 (struct scanf_length_modifier): New templated type.
58 (floatformat_from_string): Rename to ...
59 (host_float_ops<T>::from_string): ... this. Use type instead of
60 floatformat argument. Use scanf_length_modifier.
61 (floatformat_to_longest): Rename to ...
62 (host_float_ops<T>::to_longest): ... this. Use type instead of
63 floatformat argument. Handle out-of-range values deterministically.
64 (floatformat_from_longest): Rename to ...
65 (host_float_ops<T>::from_longest): ... this. Use type instead of
66 floatformat argument.
67 (floatformat_from_ulongest): Rename to ...
68 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
69 floatformat argument.
70 (floatformat_to_host_double): Rename to ...
71 (host_float_ops<T>::to_host_double): ... this. Use type instead of
72 floatformat argument.
73 (floatformat_from_host_double): Rename to ...
74 (host_float_ops<T>::from_host_double): ... this. Use type instead of
75 floatformat argument.
76 (floatformat_convert): Rename to ...
77 (host_float_ops<T>::convert): ... this. Use type instead of
78 floatformat arguments. Remove handling of no-op conversions.
79 (floatformat_binop): Rename to ...
80 (host_float_ops<T>::binop): ... this. Use type instead of
81 floatformat arguments.
82 (floatformat_compare): Rename to ...
83 (host_float_ops<T>::compare): ... this. Use type instead of
84 floatformat arguments.
85
86 (match_endianness): Use type instead of length/byte_order arguments.
87 (set_decnumber_context): Likewise.
88 (decimal_from_number): Likewise. Update calls.
89 (decimal_to_number): Likewise.
90 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
91 (decimal_float_ops::to_host_double): New dummy function.
92 (decimal_float_ops::from_host_double): Likewise.
93 (decimal_to_string): Rename to ...
94 (decimal_float_ops::to_string): ... this. Use type instead of
95 length/byte_order arguments. Update calls.
96 (decimal_from_string): Rename to ...
97 (decimal_float_ops::from_string): ... this. Use type instead of
98 length/byte_order arguments. Update calls.
99 (decimal_from_longest): Rename to ...
100 (decimal_float_ops::from_longest): ... this. Use type instead of
101 length/byte_order arguments. Update calls.
102 (decimal_from_ulongest): Rename to ...
103 (decimal_float_ops::from_ulongest): ... this. Use type instead of
104 length/byte_order arguments. Update calls.
105 (decimal_to_longest): Rename to ...
106 (decimal_float_ops::to_longest): ... this. Use type instead of
107 length/byte_order arguments. Update calls.
108 (decimal_binop): Rename to ...
109 (decimal_float_ops::binop): ... this. Use type instead of
110 length/byte_order arguments. Update calls.
111 (decimal_compare): Rename to ...
112 (decimal_float_ops::compare): ... this. Use type instead of
113 length/byte_order arguments. Update calls.
114 (decimal_convert): Rename to ...
115 (decimal_float_ops::convert): ... this. Use type instead of
116 length/byte_order arguments. Update calls.
117
118 (target_float_same_category_p): New function.
119 (target_float_same_format_p): Likewise.
120 (target_float_format_length): Likewise.
121 (enum target_float_ops_kind): New type.
122 (get_target_float_ops_kind): New function.
123 (get_target_float_ops): Three new overloaded functions.
124
125 (target_float_is_zero): Update call.
126 (target_float_to_string): Add special handling of invalid numbers,
127 infinities and NaN (moved from floatformat_to_string). Use
128 target_float_ops callback.
129 (target_float_from_string): Use target_float_ops callback.
130 (target_float_to_longest): Likewise.
131 (target_float_from_longest): Likewise.
132 (target_float_from_ulongest): Likewise.
133 (target_float_to_host_double): Likewise.
134 (target_float_from_host_double): Likewise.
135 (target_float_convert): Add special case for no-op conversions.
136 Use target_float_ops callback.
137 (target_float_binop): Use target_float_ops callback.
138 (target_float_compare): Likewise.
139
a9f26f60
YQ
1402017-11-22 Yao Qi <yao.qi@linaro.org>
141
142 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
143
29f9a567
YQ
1442017-11-22 Yao Qi <yao.qi@linaro.org>
145
146 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
147 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
148
3b1b69bf
JG
1492017-11-21 Jerome Guitton <guitton@adacore.com>
150
151 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
152 with event ptid from the lower layer before doing the
153 ravenscar-specific update.
154
54aa6c67
JB
1552017-11-21 Joel Brobecker <brobecker@adacore.com>
156
157 * ravenscar-thread.c (is_ravenscar_task): Also verify that
158 the ptid's TID is nonzero.
159
cf3fbed4
JB
1602017-11-21 Joel Brobecker <brobecker@adacore.com>
161
162 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
163 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
164 Make non-static. Change return type to char *. Adjust code
165 accordingly. Rewrite the function's documentation.
166 (read_atcb): Adjust call to get_tcb_types_info accordingly.
167 * ravenscar-thread.c (ravenscar_inferior_created): Check that
168 we have enough debugging information in the runtime to support
169 Ada task debugging before we enable the ravenscar-thread layer.
170
9edcc12f
JB
1712017-11-21 Joel Brobecker <brobecker@adacore.com>
172
173 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
174 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
175 * ravenscar-thread.c: Add into comment.
176 (base_magic_null_ptid): Delete.
177 (base_ptid): Change documentation.
178 (ravenscar_active_task): Renames ravenscar_running_thread.
179 All callers updated throughout.
180 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
181 (ravenscar_task_is_currently_active): Likewise.
182 (get_base_thread_from_ravenscar_task): Ditto.
183 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
184 (ravenscar_runtime_initialized): Likewise.
185 (get_running_thread_id): Add new parameter "cpu". Adjust
186 implementation to handle this new parameter.
187 (ravenscar_fetch_registers): Small adjustment to use
188 is_ravenscar_task and ravenscar_task_is_currently_active in
189 order to decide whether to use the target beneath or this
190 module's arch_ops.
191 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
192 (ravenscar_stopped_by_sw_breakpoint): Use
193 get_base_thread_from_ravenscar_task to get the underlying
194 thread, rather than using base_ptid.
195 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
196 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
197 Likewise.
198 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
199
65d40437
JB
2002017-11-21 Joel Brobecker <brobecker@adacore.com>
201
202 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
203 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
204 (get_tcb_types_info): Set fieldnos.base_cpu.
205 (read_atcb): Set task_info->base_cpu.
206 (info_task): Print "Base CPU" info if set by runtime.
207
e02544b2
JB
2082017-11-21 Joel Brobecker <brobecker@adacore.com>
209
210 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
211 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
212 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
213 New functions.
214 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
215 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
216 to_stopped_data_address and to_core_of_thread fields of
217 ravenscar_ops.
218
ed0f4273
UW
2192017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
220
221 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
222 (struct gdbarch_tdep): New member long_double_abi.
223 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
224 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
225 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
226 format depending on long_double_abi tdep member.
227 (ppc_floatformat_for_type): Handle __ibm128 type.
228
0fc76421
SM
2292017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
230
231 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
232
e6b2f5ef
PA
2332017-11-21 Pedro Alves <palves@redhat.com>
234
235 * dwarf2read.c (mapped_index::find_name_components_bounds)
236 <completion mode, upper bound>: Use std::lower_bound instead of
237 std::upper_bound.
238 (test_mapped_index_find_name_component_bounds): Remove incorrect
239 "t1_fund" from expected symbols.
240
5c58de74
PA
2412017-11-21 Pedro Alves <palves@redhat.com>
242
243 * dwarf2read.c (mapped_index::name_components_casing): New field.
244 (mapped_index) <build_name_components,
245 find_name_components_bounds): Declare new methods.
246 (mapped_index::find_name_components_bounds)
247 (mapped_index::build_name_components): New methods, factored out
248 from dw2_expand_symtabs_matching_symbol.
249 (check_find_bounds_finds)
250 (test_mapped_index_find_name_component_bounds): New.
251 (run_test): Rename to ...
252 (test_dw2_expand_symtabs_matching_symbol): ... this.
253 (run_test): Reimplement.
254
e1ef7d7a
PA
2552017-11-21 Pedro Alves <palves@redhat.com>
256
257 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
258 (symbol_end): Use cp_ident_is_alnum.
259 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
260 * dwarf2read.c (make_sort_after_prefix_name): New function.
261 (dw2_expand_symtabs_matching_symbol): Use it.
262 (test_symbols): Add more symbols.
263 (run_test): Add tests.
264
cf724bc9
TT
2652017-11-17 Tom Tromey <tom@tromey.com>
266
267 * symtab.h (enum symbol_subclass_kind): New.
268 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
269 Remove.
270 <subclass>: New member.
271 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
272 * rust-lang.c (rust_get_trait_object_pointer): Update.
273 * dwarf2read.c (read_func_scope): Update.
274 (read_variable): Update.
275
68e745e3
TT
2762017-11-17 Tom Tromey <tom@tromey.com>
277
278 * dwarf2read.c (read_func_scope): Update.
279 * symtab.h (struct template_symbol): Derive from symbol.
280 <base>: Remove.
281
71a3c369
TT
2822017-11-17 Tom Tromey <tom@tromey.com>
283
284 * symtab.h (struct symbol) <is_rust_vtable>: New member.
285 (struct rust_vtable_symbol): New.
286 (find_symbol_at_address): Declare.
287 * symtab.c (find_symbol_at_address): New function.
288 * symfile.h (struct quick_symbol_functions)
289 <find_compunit_symtab_by_address>: New member.
290 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
291 function.
292 (debug_sym_quick_functions): Link to
293 debug_qf_find_compunit_symtab_by_address.
294 * rust-lang.c (rust_get_trait_object_pointer): New function.
295 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
296 rust_get_trait_object_pointer.
297 * psymtab.c (psym_relocate): Clear psymbol_map.
298 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
299 functions.
300 (psym_functions): Link to psym_find_compunit_symtab_by_address.
301 * objfiles.h (struct objfile) <psymbol_map>: New member.
302 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
303 (process_die) <DW_TAG_variable>: New case. Call read_variable.
304 (rust_containing_type, read_variable): New functions.
305
7468702d
SM
3062017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
307
308 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
309
37269bc9
SM
3102017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
311
312 * common/filestuff.c: Include <algorithm>.
313 (open_fds): Change type to std::vector<int>.
314 (do_mark_open_fd): Adjust.
315 (unmark_fd_no_cloexec): Adjust.
316 (do_close): Adjust.
317
5c632425
SM
3182017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
319
320 * breakpoint.c (output_thread_groups): Take an std::vector.
321 (print_one_breakpoint_location): Adjust.
322
ced9779b
JB
3232017-11-17 Joel Brobecker <brobecker@adacore.com>
324
325 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
326 (ada_evaluate_subexp_for_cast): New function.
327 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
328 ada_evaluate_subexp_for_cast.
329 (ada_evaluate_subexp) <nosideret>: Replace code by call to
330 eval_skip_value.
331 * eval.c (evaluate_var_value): Make non-static.
332 (evaluate_var_msym_value, eval_skip_value): Likewise.
333 * value.h (evaluate_var_value, evaluate_var_msym_value)
334 (eval_skip_value): Declare.
335
b7e22850
JB
3362017-11-16 Joel Brobecker <brobecker@adacore.com>
337
338 * ada-lang.c (ada_value_cast): Remove parameter "noside".
339 Update all callers.
340
9ccabccd
PA
3412017-11-16 Pedro Alves <palves@redhat.com>
342
343 * python/py-unwind.c (pyuw_sniffer): Translate
344 PyExc_KeyboardInterrupt to a GDB Quit exception.
345
d930703d
PA
3462017-11-16 Pedro Alves <palves@redhat.com>
347
348 * infrun.c (resume_cleanups): Delete.
349 (resume): No longer install a resume_cleanups cleanup nor call
350 QUIT.
351 (proceed): Pass the terminal to the inferior.
352 (keep_going_pass_signal): No longer install a resume_cleanups
353 cleanup.
354
38dc2859
PA
3552017-11-16 Pedro Alves <palves@redhat.com>
356
357 * inf-loop.c (inferior_event_handler): Don't swallow the exception
358 if the prompt is blocked.
359
688fca4f
PA
3602017-11-16 Pedro Alves <palves@redhat.com>
361
362 * breakpoint.c (insert_bp_location): Replace bp_err and
363 bp_err_message locals by a gdb_exception local.
364
e2c33ac7
PA
3652017-11-16 Pedro Alves <palves@redhat.com>
366
367 * inflow.c (scoped_ignore_sigttou): New class.
368 (child_terminal_ours_1, new_tty): Use it.
369
d7236961
UW
3702017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
371
372 * target-float.c (decimal_from_number): Add byte_order argument and
373 call match_endianness. Error if unknown floating-point type.
374 (decimal_to_number): Add byte_order argument and call match_endianness.
375 (decimal_from_longest): Update call. Do not call match_endianness.
376 (decimal_from_ulongest): Likewise.
377 (decimal_binop): Likewise.
378 (decimal_is_zero): Likewise.
379 (decimal_compare): Likewise.
380 (decimal_convert): Likewise.
381
d8ae99a7
PM
3822017-11-16 Phil Muldoon <pmuldoon@redhat.com>
383
384 * python/python.c (gdbpy_rbreak): New function.
385 * NEWS: Document Python rbreak feature.
386
c632b645
YQ
3872017-11-16 Yao Qi <yao.qi@linaro.org>
388
389 * features/tic6x-c62x.xml: Remove.
390 * features/tic6x-c64x.xml: Remove.
391 * features/tic6x-c64xp.xml: Remove.
392
a014b87a
JB
3932017-11-15 John Baldwin <jhb@FreeBSD.org>
394
395 * symtab.h: Include <array>.
396
94765011
JB
3972017-11-15 John Baldwin <jhb@FreeBSD.org>
398
399 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
400 (bsd_kvm_proc_cmd): Likewise.
401
625ad440
SM
4022017-11-15 Simon Marchi <simon.marchi@ericsson.com>
403
404 * tui/tui-win.c (window_name_completer): Replace VEC with
405 std::vector.
406
c0c11fa9
AC
4072017-11-15 Andrew Cagney <cagney@gnu.org>
408
409 * MAINTAINERS: Remove no-longer applicable entries.
410
34a7ebaf
AC
4112017-11-15 Andrew Cagney <cagney@gnu.org>
412
413 * MAINTAINERS: Move self to Past Maintainers.
414
5334ef39
YQ
4152017-11-15 Yao Qi <yao.qi@linaro.org>
416
417 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
418 * features/nios2-linux.c: Remove.
419 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
420 initialize_tdesc_nios2_linux.
421
a714b0d6
YQ
4222017-11-15 Yao Qi <yao.qi@linaro.org>
423
424 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
425 M68HC11_LAST_HARD_REG + 1.
426
92ffd475
PC
4272017-11-14 Paul Carroll <pcarroll@codesourcery.com>
428
429 PR gdb/22388
430 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
431 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
432 Return TARGET_XFER_EOF if size of returned data is 0.
433
07431908
SM
4342017-11-14 Simon Marchi <simon.marchi@ericsson.com>
435
436 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
437 memory-map-selftests.c.
438 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
439 * memory-map.c (memory_map_start_memory): Fix computation of hi
440 address.
441 * unittests/memory-map-selftests.c: New file.
442
31432a67
JB
4432017-11-09 Joel Brobecker <brobecker@adacore.com>
444
445 * ada-lang.c: Fix some typos in the general command documenting
446 how Ada expressions are being evaluated and how their result
447 is printed.
448
e793c052
TT
4492017-11-09 Tom Tromey <tom@tromey.com>
450
451 * psymtab.c (psymbol_hash): Do not hash string contents.
452 (psymbol_compare): Add comment.
453
7e8835c5
TT
4542017-11-09 Tom Tromey <tom@tromey.com>
455
456 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
457
286acbb5
JB
4582017-11-08 Joel Brobecker <brobecker@adacore.com>
459
460 * ada-exp.y (write_var_from_sym): Remove parameter
461 "orig_left_context". Update all callers.
462
b44ec619
SM
4632017-11-08 Simon Marchi <simon.marchi@ericsson.com>
464
465 * tracepoint.h (class collection_list) <stringify>: Return
466 std::vector<std::string>.
467 (encode_actions_rsp): Change parameters to
468 std::vector<std::string> *.
469 * tracepoint.c (collection_list::stringify): Return
470 std::vector<std::string> and adjust accordingly.
471 (encode_actions_rsp): Changee parameters to
472 std::vector<std::string> and adjust accordingly.
473 * remote.c (free_actions_list),
474 free_actions_list_cleanup_wrapper): Remove.
475 (remote_download_tracepoint): Adjust to std::vector.
476
2f4732b0
TT
4772017-11-08 Tom Tromey <tom@tromey.com>
478
479 * dwarf2read.c (symbolp): Remove typedef.
480 (read_func_scope): Use std::vector.
481 (process_structure_scope): Use std::vector.
482
f9d67a22
PA
4832017-11-08 Pedro Alves <palves@redhat.com>
484
485 * ada-lang.c (ada_make_symbol_completion_list): Use
486 completion_skip_symbol.
487 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
488 (symbol_is_function_or_method(symbol*)): New.
489 (add_symtab_completions): Add complete_symbol_mode parameter. Use
490 completion_skip_symbol.
491 (default_collect_symbol_completion_matches_break_on): Use
492 completion_skip_symbol. Pass down mode.
493 (collect_file_symbol_completion_matches): Pass down mode.
494 * symtab.h (symbol_is_function_or_method): New declarations.
495 (completion_skip_symbol): New template function.
496
56d87ef7
PA
4972017-11-08 Pedro Alves <palves@redhat.com>
498
499 * linespec.c (iterate_over_all_matching_symtabs): Add
500 search_domain parameter. Pass it down to expand_symtabs_matching.
501 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
502 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
503 search_domain.
504 (add_all_symbol_names_from_pspace): Add search_domain parameter.
505 Pass it down.
506 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
507 symbols.
508 (add_matching_symbols_to_info): Add search_domain parameter. Pass
509 it down.
510
1b026119
PA
5112017-11-08 Pedro Alves <palves@redhat.com>
512
513 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
514 text_len locals and don't pass them down.
515 * symtab.c (completion_list_add_name): Remove
516 sym_text/sym_text_len parameters and adjust.
517 (completion_list_add_symbol, completion_list_add_msymbol)
518 (completion_list_objc_symbol, completion_list_add_fields)
519 (add_symtab_completions): Likewise.
520 (default_collect_symbol_completion_matches_break_on)
521 (collect_file_symbol_completion_matches): Remove sym_text_len
522 local and don't pass it down.
523 * symtab.h (completion_list_add_name): Remove
524 sym_text/sym_text_len parameters.
525
c62446b1
PA
5262017-11-08 Pedro Alves <palves@redhat.com>
527
528 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
529 unittests/lookup_name_info-selftests.c.
530 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
531 * cp-support.c: Include "selftest.h".
532 (cp_remove_params_1): Rename from cp_remove_params. Add
533 'require_param' parameter, and handle it.
534 (cp_remove_params): Reimplement.
535 (cp_remove_params_if_any): New.
536 (selftests::quote): New.
537 (selftests::check_remove_params): New.
538 (selftests::test_cp_remove_params): New.
539 (_initialize_cp_support): Install
540 selftests::test_cp_remove_params.
541 * cp-support.h (cp_remove_params_if_any): Declare.
542 * dwarf2read.c :Include "selftest.h".
543 (dw2_expand_symtabs_matching_symbol): Use
544 lookup_name_info::make_ignore_params.
545 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
546 (selftests::dw2_expand_symtabs_matching::string_or_null)
547 (selftests::dw2_expand_symtabs_matching::check_match)
548 (selftests::dw2_expand_symtabs_matching::test_symbols)
549 (selftests::dw2_expand_symtabs_matching::run_test): New.
550 (_initialize_dwarf2_read): Register
551 selftests::dw2_expand_symtabs_matching::run_test.
552 * psymtab.c (psym_expand_symtabs_matching): Use
553 lookup_name_info::make_ignore_params.
554 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
555 If the lookup name wants to ignore parameters, strip them.
556 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
557 code handling '('.
558 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
559 (default_collect_symbol_completion_matches_break_on): Don't try to
560 strip parameters.
561 * symtab.h (lookup_name_info::lookup_name_info): Add
562 'ignore_parameters' parameter.
563 (lookup_name_info::ignore_parameters)
564 (lookup_name_info::make_ignore_params): New methods.
565 (lookup_name_info::m_ignore_parameters): New field.
566 * unittests/lookup_name_info-selftests.c: New file.
567
61920122
PA
5682017-11-08 Pedro Alves <palves@redhat.com>
569
570 * dwarf2read.c (dw2_expand_marked_cus)
571 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
572 (dw2_expand_symtabs_matching): Move further below.
573 (dw2_expand_marked_cus): Reindent.
574
3f563c84
PA
5752017-11-08 Pedro Alves <palves@redhat.com>
576
577 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
578 (struct name_component): New.
579 (mapped_index::name_components): New field.
580 (mapped_index::symbol_name_at): New method.
581 (dwarf2_read_index): Call mapped_index ctor.
582 (dw2_map_matching_symbols): Add comment about name_components
583 table.
584 (dw2_expand_symtabs_matching): Factor part to...
585 (dw2_expand_symtabs_matching_symbol): ... this new function.
586 Build name components table, and lookup symbols in it before
587 calling the name matcher.
588 (dw2_expand_marked_cus): New, factored out from
589 dw2_expand_symtabs_matching.
590 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
591
b5ec771e
PA
5922017-11-08 Pedro Alves <palves@redhat.com>
593
594 * ada-lang.c (ada_encode): Rename to ..
595 (ada_encode_1): ... this. Add throw_errors parameter and handle
596 it.
597 (ada_encode): Reimplement.
598 (match_name): Delete, folded into full_name.
599 (resolve_subexp): No longer pass the encoded name to
600 ada_lookup_symbol_list.
601 (should_use_wild_match): Delete.
602 (name_match_type_from_name): New.
603 (ada_lookup_simple_minsym): Use lookup_name_info and the
604 language's symbol_name_matcher_ftype.
605 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
606 (ada_add_block_renamings): Adjust to use lookup_name_info.
607 (ada_lookup_name): New.
608 (add_nonlocal_symbols, ada_add_all_symbols)
609 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
610 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
611 (ada_name_for_lookup): Delete.
612 (ada_lookup_encoded_symbol): Construct a verbatim name.
613 (wild_match): Reverse sense of return type. Use bool.
614 (full_match): Reverse sense of return type. Inline bits of old
615 match_name here.
616 (ada_add_block_symbols): Adjust to use lookup_name_info.
617 (symbol_completion_match): Delete, folded into...
618 (ada_lookup_name_info::matches): ... .this new method.
619 (symbol_completion_add): Delete.
620 (ada_collect_symbol_completion_matches): Add name_match_type
621 parameter. Adjust to use lookup_name_info and
622 completion_list_add_name.
623 (get_var_value, ada_add_global_exceptions): Adjust to use
624 lookup_name_info.
625 (ada_get_symbol_name_cmp): Delete.
626 (do_wild_match, do_full_match): New functions.
627 (ada_lookup_name_info::ada_lookup_name_info): New method.
628 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
629 functions.
630 (ada_language_defn): Install ada_get_symbol_name_matcher.
631 * ada-lex.l (processId): If name starts with '<', copy it
632 verbatim.
633 * block.c (block_iter_match_step, block_iter_match_first)
634 (block_iter_match_next, block_lookup_symbol)
635 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
636 lookup_name_info.
637 * block.h (block_iter_match_first, block_iter_match_next)
638 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
639 * c-lang.c (c_language_defn, cplus_language_defn)
640 (asm_language_defn, minimal_language_defn): Adjust comments to
641 refer to la_get_symbol_name_matcher.
642 * completer.c (complete_files_symbols)
643 (collect_explicit_location_matches, symbol_completer): Pass a
644 symbol_name_match_type down.
645 * completer.h (class completion_match, completion_match_result):
646 New classes.
647 (completion_tracker::reset_completion_match_result): New method.
648 (completion_tracker::m_completion_match_result): New field.
649 * cp-support.c (make_symbol_overload_list_block): Adjust to use
650 lookup_name_info.
651 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
652 functions.
653 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
654 * d-lang.c: Adjust comments to refer to
655 la_get_symbol_name_matcher.
656 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
657 Adjust to use lookup_name_info.
658 (dict_iter_match_first, dict_iter_match_next)
659 (iter_match_first_hashed, iter_match_next_hashed)
660 (iter_match_first_linear, iter_match_next_linear): Adjust to work
661 with a lookup_name_info.
662 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
663 Likewise.
664 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
665 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
666 (gdb_index_symbol_name_matcher): New class.
667 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
668 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
669 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
670 with a symbol_name_match_type.
671 (f_language_defn): Adjust comments to refer to
672 la_get_symbol_name_matcher.
673 * go-lang.c (go_language_defn): Adjust comments to refer to
674 la_get_symbol_name_matcher.
675 * language.c (default_symbol_name_matcher)
676 (language_get_symbol_name_matcher): New functions.
677 (unknown_language_defn, auto_language_defn): Adjust comments to
678 refer to la_get_symbol_name_matcher.
679 * language.h (symbol_name_cmp_ftype): Delete.
680 (language_defn) <la_collect_symbol_completion_matches>: Add match
681 type parameter.
682 <la_get_symbol_name_cmp>: Delete field.
683 <la_get_symbol_name_matcher>: New field.
684 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
685 (default_symbol_name_matcher, language_get_symbol_name_matcher):
686 Declare.
687 * linespec.c (iterate_over_all_matching_symtabs)
688 (iterate_over_file_blocks): Adjust to use lookup_name_info.
689 (find_methods): Add language parameter, and use lookup_name_info
690 and the language's symbol_name_matcher_ftype.
691 (linespec_complete_function): Adjust.
692 (lookup_prefix_sym): Use lookup_name_info.
693 (add_all_symbol_names_from_pspace): Adjust.
694 (find_superclass_methods): Add language parameter and pass it
695 down.
696 (find_method): Pass symbol language down.
697 (find_linespec_symbols): Don't demangle or Ada encode here.
698 (search_minsyms_for_name): Add lookup_name_info parameter.
699 (add_matching_symbols_to_info): Add name_match_type parameter.
700 Use lookup_name_info.
701 * m2-lang.c (m2_language_defn): Adjust comments to refer to
702 la_get_symbol_name_matcher.
703 * minsyms.c: Include <algorithm>.
704 (add_minsym_to_demangled_hash_table): Remove table parameter and
705 add objfile parameter. Use search_name_hash, and add language to
706 demangled languages vector.
707 (struct found_minimal_symbols): New struct.
708 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
709 New functions.
710 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
711 input names here. Use lookup_name_info instead. Lookup up
712 demangled names once for each language in the demangled names
713 vector.
714 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
715 demangled names once for each language in the demangled names
716 vector.
717 (build_minimal_symbol_hash_tables): Adjust.
718 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
719 lookup_name_info.
720 * objc-lang.c (objc_language_defn): Adjust comment to refer to
721 la_get_symbol_name_matcher.
722 * objfiles.h: Include <vector>.
723 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
724 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
725 la_get_symbol_name_matcher.
726 * p-lang.c (pascal_language_defn): Adjust comment to refer to
727 la_get_symbol_name_matcher.
728 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
729 (match_partial_symbol): Use symbol_name_match_type,
730 lookup_name_info and psymbol_name_matches.
731 (lookup_partial_symbol): Use lookup_name_info.
732 (map_block): Use symbol_name_match_type and lookup_name_info.
733 (psym_map_matching_symbols): Use symbol_name_match_type.
734 (psymbol_name_matches): New.
735 (recursively_search_psymtabs): Use lookup_name_info and
736 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
737 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
738 'kind' parameter to 'domain'.
739 * rust-lang.c (rust_language_defn): Adjust comment to refer to
740 la_get_symbol_name_matcher.
741 * symfile-debug.c (debug_qf_map_matching_symbols)
742 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
743 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
744 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
745 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
746 Adjust to use symbol_name_match_type.
747 <expand_symtabs_matching>: Adjust to use lookup_name_info.
748 (expand_symtabs_matching): Adjust to use lookup_name_info.
749 * symmisc.c (maintenance_expand_symtabs): Use
750 lookup_name_info::match_any ().
751 * symtab.c (symbol_matches_search_name): New.
752 (eq_symbol_entry): Adjust to use lookup_name_info and the
753 language's matcher.
754 (demangle_for_lookup_info::demangle_for_lookup_info): New.
755 (lookup_name_info::match_any): New.
756 (iterate_over_symbols, search_symbols): Use lookup_name_info.
757 (compare_symbol_name): Add language, lookup_name_info and
758 completion_match_result parameters, and use them.
759 (completion_list_add_name): Make extern. Add language and
760 lookup_name_info parameters. Use them.
761 (completion_list_add_symbol, completion_list_add_msymbol)
762 (completion_list_objc_symbol): Add lookup_name_info parameters and
763 adjust. Pass down language.
764 (completion_list_add_fields): Add lookup_name_info parameters and
765 adjust. Pass down language.
766 (add_symtab_completions): Add lookup_name_info parameters and
767 adjust.
768 (default_collect_symbol_completion_matches_break_on): Add
769 name_match_type parameter, and use it. Use lookup_name_info.
770 (default_collect_symbol_completion_matches)
771 (collect_symbol_completion_matches): Add name_match_type
772 parameter, and pass it down.
773 (collect_symbol_completion_matches_type): Adjust.
774 (collect_file_symbol_completion_matches): Add name_match_type
775 parameter, and use lookup_name_info.
776 * symtab.h: Include <string> and "common/gdb_optional.h".
777 (enum class symbol_name_match_type): New.
778 (class ada_lookup_name_info): New.
779 (struct demangle_for_lookup_info): New.
780 (class lookup_name_info): New.
781 (symbol_name_matcher_ftype): New.
782 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
783 (symbol_matches_search_name): Declare.
784 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
785 (default_collect_symbol_completion_matches)
786 (collect_symbol_completion_matches)
787 (collect_file_symbol_completion_matches): Add name_match_type
788 parameter.
789 (iterate_over_symbols): Use lookup_name_info.
790 (completion_list_add_name): Declare.
791 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
792 (strncmp_iw_with_mode): Now extern.
793 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
794 (strncmp_iw_with_mode): Declare.
795
5ffa0793
PA
7962017-11-08 Keith Seitz <keiths@redhat.com>
797 Pedro Alves <palves@redhat.com>
798
799 * ada-lang.c (ada_language_defn): Install
800 default_search_name_hash.
801 * buildsym.c (struct buildsym_compunit): <language>: New field.
802 (finish_block_internal): Pass language when creating dictionaries.
803 (start_buildsym_compunit, start_symtab): New language parameters.
804 Use them.
805 (restart_symtab): Pass down compilation unit's language.
806 * buildsym.h (enum language): Forward declare.
807 (start_symtab): New 'language' parameter.
808 * c-lang.c (c_language_defn, cplus_language_defn)
809 (asm_language_defn, minimal_language_defn): Install
810 default_search_name_hash.
811 * coffread.c (coff_start_symtab): Adjust.
812 * d-lang.c (d_language_defn): Install default_search_name_hash.
813 * dbxread.c (struct symloc): Add 'pst_language' field.
814 (PST_LANGUAGE): Define.
815 (start_psymtab, read_ofile_symtab): Use it.
816 (process_one_symbol): New 'language' parameter. Pass it down.
817 * dictionary.c (struct dictionary) <language>: New field.
818 (DICT_LANGUAGE): Define.
819 (dict_create_hashed, dict_create_hashed_expandable)
820 (dict_create_linear, dict_create_linear_expandable): New parameter
821 'language'. Set the dictionary's language.
822 (iter_match_first_hashed): Adjust to rename.
823 (insert_symbol_hashed): Assert we don't see mismatching
824 languages. Adjust to rename.
825 (dict_hash): Rename to ...
826 (default_search_name_hash): ... this and make extern.
827 * dictionary.h (struct language_defn): Forward declare.
828 (dict_create_hashed): New parameter 'language'.
829 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
830 * f-lang.c (f_language_defn): Install default_search_name_hash.
831 * go-lang.c (go_language_defn): Install default_search_name_hash.
832 * jit.c (finalize_symtab): Pass compunit's language to dictionary
833 creation.
834 * language.c (unknown_language_defn, auto_language_defn):
835 * language.h (language_defn::la_search_name_hash): New field.
836 (default_search_name_hash): Declare.
837 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
838 * mdebugread.c (new_block): New parameter 'language'.
839 * mdebugread.c (parse_symbol): Pass symbol language to block
840 allocation.
841 (psymtab_to_symtab_1): Pass down language.
842 (new_symtab): Pass compunit's language to block allocation.
843 * objc-lang.c (objc_language_defn): Install
844 default_search_name_hash.
845 * opencl-lang.c (opencl_language_defn):
846 * p-lang.c (pascal_language_defn): Install
847 default_search_name_hash.
848 * rust-lang.c (rust_language_defn): Install
849 default_search_name_hash.
850 * stabsread.h (enum language): Forward declare.
851 (process_one_symbol): Add 'language' parameter.
852 * symtab.c (search_name_hash): New function.
853 * symtab.h (search_name_hash): Declare.
854 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
855
2a1dde5d
PA
8562017-11-08 Pedro Alves <palves@redhat.com>
857
858 * cp-name-parser.y (main): Don't initialize extra_chars.
859
95a6b0a1
TT
8602017-11-07 Tom Tromey <tom@tromey.com>
861
862 * event-top.h (command_handler): Constify.
863 * record-full.c (cmd_record_full_start): Update.
864 * thread.c (thread_apply_all_command): Update.
865 * printcmd.c (eval_command): Update.
866 * mi/mi-main.c (mi_execute_cli_command): Update.
867 (mi_execute_async_cli_command): Update.
868 * tui/tui-stack.c (tui_update_command): Update.
869 * cli/cli-interp.c (safe_execute_command): Constify.
870 * record.c (record_start): Update.
871 (record_start, record_stop, cmd_record_start): Update.
872 * record-btrace.c (cmd_record_btrace_bts_start): Update.
873 (cmd_record_btrace_pt_start): Update.
874 (cmd_record_btrace_start): Update.
875 (cmd_record_btrace_start): Update.
876 * reverse.c (exec_reverse_once): Update.
877 * python/python.c (execute_gdb_command): Don't copy the command.
878 * event-top.c (command_line_handler): Update.
879 (command_handler): Constify.
880 * defs.h (deprecated_call_command_hook): Constify.
881 * cli/cli-script.h (execute_user_command): Constify.
882 * cli/cli-script.c (execute_user_command): Constify.
883 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
884 (enum command_control_type): Update.
885 * main.c (catch_command_errors): Remove non-const overload.
886 (catch_command_errors_ftype): Remove.
887 * python/py-cmd.c (cmdpy_function): Constify.
888 * guile/scm-cmd.c (cmdscm_function): Constify.
889 * cli/cli-dump.c (call_dump_func): Constify.
890 * cli/cli-decode.c (do_const_cfunc): Constify.
891 (do_sfunc): Constify.
892 (cmd_func): Constify.
893 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
894 * top.h (execute_command): Constify.
895 * top.c (execute_command): Constify.
896 (execute_command_to_string): Constify.
897 (deprecated_call_command_hook): Constify.
898 * command.h (cmd_func): Constify.
899 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
900
eb4c3f4a
TT
9012017-11-07 Tom Tromey <tom@tromey.com>
902
903 * ada-lang.c (catch_ada_exception_command): Constify.
904 (catch_assert_command): Constify.
905 * break-catch-throw.c (catch_catch_command, catch_throw_command)
906 (catch_rethrow_command): Constify.
907 (catch_exception_command_1): Constify.
908 * breakpoint.h (add_catch_command): Constify.
909 * break-catch-syscall.c (catch_syscall_command_1): Constify.
910 (catch_syscall_split_args): Constify.
911 * break-catch-sig.c (catch_signal_command): Constify.
912 (catch_signal_split_args): Constify.
913 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
914 cmd_const_sfunc_ftype.
915 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
916 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
917 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
918 (add_setshow_string_cmd, struct cmd_list_element)
919 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
920 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
921 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
922 Constify.
923 (set_cmd_sfunc): Constify.
924 (empty_sfunc): Constify.
925 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
926 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
927 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
928 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
929 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
930 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
931 Constify.
932 (set_cmd_sfunc): Constify.
933 (cmd_sfunc_ftype): Remove.
934 * compile/compile.c (set_compile_args): Constify.
935 * infrun.c (set_disable_randomization): Constify.
936 * infcmd.c (set_args_command, set_cwd_command): Constify.
937 * breakpoint.c (set_condition_evaluation_mode): Constify.
938 (add_catch_command): Constify.
939 (catch_fork_command_1, catch_exec_command_1)
940 (catch_load_command_1, catch_unload_command_1): Constify.
941 (catch_load_or_unload): Constify.
942 * guile/scm-param.c (pascm_set_func): Constify.
943 (add_setshow_generic): Constify.
944 * python/py-param.c (get_set_value): Constify.
945 * top.h (set_verbose): Constify.
946 * tui/tui-win.c (tui_set_var_cmd): Constify.
947 * mi/mi-main.c (set_mi_async_command): Constify.
948 * cli/cli-logging.c (set_logging_overwrite)
949 (set_logging_redirect): Constify.
950 * value.c (set_max_value_size): Constify.
951 * valprint.c (set_input_radix, set_output_radix): Constify.
952 * utils.c (set_width_command, set_height_command): Constify.
953 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
954 * tracepoint.c (set_disconnected_tracing)
955 (set_circular_trace_buffer, set_trace_buffer_size)
956 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
957 * top.c (set_history_size_command, set_verbose, set_editing)
958 (set_gdb_datadir, set_history_filename): Constify.
959 * target.c (set_targetdebug, maint_set_target_async_command)
960 (maint_set_target_non_stop_command, set_target_permissions)
961 (set_write_memory_permission): Constify.
962 (open_target): Constify.
963 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
964 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
965 * symtab.c (set_symbol_cache_size_handler): Constify.
966 * symfile.c (set_ext_lang_command): Constify.
967 * symfile-debug.c (set_debug_symfile): Constify.
968 * source.c (set_directories_command): Constify.
969 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
970 * serial.c (set_parity): Constify.
971 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
972 * remote.c (set_remote_exec_file, set_remotebreak)
973 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
974 * record.c (set_record_insn_history_size)
975 (set_record_call_history_size): Constify.
976 * record-full.c (set_record_full_insn_max_num): Constify.
977 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
978 * osabi.c (set_osabi): Constify.
979 * mips-tdep.c (set_mips64_transfers_32bit_regs)
980 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
981 * maint.c (maintenance_set_profile_cmd): Constify.
982 * linux-thread-db.c (set_libthread_db_search_path): Constify.
983 * language.c (set_language_command, set_range_command)
984 (set_case_command): Constify.
985 * infrun.c (set_non_stop, set_observer_mode)
986 (set_stop_on_solib_events, set_schedlock_func)
987 (set_exec_direction_func): Constify.
988 * infcmd.c (set_inferior_tty_command): Constify.
989 * disasm.c (set_disassembler_options_sfunc): Constify.
990 * demangle.c (set_demangling_command): Constify.
991 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
992 * cris-tdep.c (set_cris_version, set_cris_mode)
993 (set_cris_dwarf2_cfi): Constify.
994 * corefile.c (set_gnutarget_command): Constify.
995 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
996 (set_target_wide_charset_sfunc): Constify.
997 * breakpoint.c (update_dprintf_commands): Constify.
998 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
999 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1000 (set_disassembly_style_sfunc): Constify.
1001 * arch-utils.c (set_endian, set_architecture): Constify.
1002 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1003 * agent.c (set_can_use_agent): Constify.
1004
5fed81ff
TT
10052017-11-07 Tom Tromey <tom@tromey.com>
1006
1007 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1008 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1009 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1010 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1011 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1012 (parse_int_arg, show_thread_default_detach_sc_cmd)
1013 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1014 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1015 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1016 (show_task_pause_cmd, set_task_detach_sc_cmd)
1017 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1018 (set_noninvasive_cmd, set_thread_pause_cmd)
1019 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1020 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1021 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1022 * windows-nat.c (display_selectors): Constify.
1023 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1024 non-const "cfunc".
1025 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1026 (cmd_cfunc_eq): Likewise.
1027 (struct cmd_list_element): Likewise.
1028 (do_cfunc): Remove.
1029 (cli_user_command_p): Update.
1030 * command.h (add_cmd): Remove non-const overload.
1031 (cmd_cfunc_ftype): Remove typedef.
1032 (cmd_cfunc_eq): Remove non-const overload.
1033 * value.c (show_values): Constify.
1034 * thread.c (thread_apply_all_command): Constify.
1035 * symfile.c (load_command): Constify.
1036 * source.c (directory_command): Constify.
1037 * maint.c (maintenance_internal_error)
1038 (maintenance_demangler_warning, maintenance_space_display)
1039 (maintenance_print_architecture, maintenance_translate_address)
1040 (maintenance_info_selftests, maintenance_internal_warning):
1041 Constify.
1042 * breakpoint.c (disable_trace_command, enable_trace_command):
1043 Constify.
1044 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1045 Constify.
1046 (add_auto_load_safe_path): Constify.
1047 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1048 * top.h (show_commands): Constify.
1049 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1050 * sparc64-tdep.c (adi_examine_command): Constify.
1051 (adi_assign_command): Constify.
1052
1d12d88f
TT
10532017-11-07 Tom Tromey <tom@tromey.com>
1054
1055 * frame.h (info_locals_command, info_args_command): Constify.
1056 * auto-load.h (auto_load_info_scripts): Constify.
1057 * inferior.h (registers_info): Constify.
1058 * copying.c: Rebuild.
1059 * copying.awk: Constify generated commands.
1060 * auto-load.c (auto_load_info_scripts)
1061 (info_auto_load_gdb_scripts): Constify.
1062 * cli/cli-decode.c (struct cmd_list_element): Take a
1063 cmd_const_cfunc_ftype.
1064 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1065 * tui/tui-win.c (tui_all_windows_info): Constify.
1066 * python/py-auto-load.c (info_auto_load_python_scripts):
1067 Constify.
1068 * cli/cli-cmds.c (show_command): Remove non-const overload.
1069 * tracepoint.c (info_tvariables_command, info_scope_command):
1070 Constify.
1071 (info_static_tracepoint_markers_command): Constify.
1072 * thread.c (info_threads_command): Constify.
1073 (print_thread_info_1): Constify.
1074 * target.c (info_target_command): Constify.
1075 * symtab.c (info_sources_command, info_functions_command)
1076 (info_types_command): Constify.
1077 (info_variables_command): Remove non-const overload.
1078 * symfile.c (info_ext_lang_command): Constify.
1079 * stack.c (info_frame_command, info_locals_command)
1080 (info_args_command): Constify.
1081 (backtrace_command): Remove non-const overload.
1082 * source.c (info_source_command, info_line_command): Constify.
1083 * solib.c (info_sharedlibrary_command): Constify.
1084 * skip.c (info_skip_command): Constify.
1085 * ser-go32.c (info_serial_command): Constify.
1086 * reverse.c (info_bookmarks_command): Constify.
1087 * printcmd.c (info_symbol_command, info_address_command)
1088 (info_display_command): Constify.
1089 * osdata.c (info_osdata_command): Constify.
1090 * objc-lang.c (info_selectors_command, info_classes_command):
1091 Constify.
1092 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
1093 * memattr.c (info_mem_command): Constify.
1094 * macrocmd.c (info_macro_command, info_macros_command): Constify.
1095 * linux-fork.c (info_checkpoints_command): Constify.
1096 * infrun.c (info_signals_command): Constify.
1097 * inflow.c (info_terminal_command): Constify.
1098 * inferior.c (info_inferiors_command): Constify.
1099 (print_inferior): Constify.
1100 * infcmd.c (info_program_command, info_all_registers_command)
1101 (info_registers_command, info_vector_command)
1102 (info_float_command): Constify.
1103 (registers_info): Constify.
1104 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
1105 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
1106 Constify.
1107 * f-valprint.c (info_common_command): Constify.
1108 * dcache.c (info_dcache_command): Constify.
1109 (dcache_info_1): Constify.
1110 * darwin-nat-info.c (info_mach_tasks_command)
1111 (info_mach_task_command, info_mach_ports_command)
1112 (info_mach_port_command, info_mach_threads_command)
1113 (info_mach_thread_command, info_mach_regions_command)
1114 (info_mach_regions_recurse_command, info_mach_region_command)
1115 (info_mach_exceptions_command): Constify.
1116 (get_task_from_args): Constify.
1117 * cp-support.c (info_vtbl_command): Constify.
1118 * breakpoint.c (info_watchpoints_command)
1119 (info_tracepoints_command): Constify.
1120 (info_breakpoints_command): Remove non-const overload.
1121 * avr-tdep.c (avr_io_reg_read_command): Constify.
1122 * auxv.c (info_auxv_command): Constify.
1123 * ada-tasks.c (info_tasks_command): Constify.
1124 (info_task): Constify.
1125 * ada-lang.c (info_exceptions_command): Constify.
1126
0b39b52e
TT
11272017-11-07 Tom Tromey <tom@tromey.com>
1128
1129 * solib.h (no_shared_libraries): Constify.
1130 * frame.h (return_command): Constify.
1131 * cli/cli-cmds.h (quit_command): Constify.
1132 * top.h (quit_command, execute_command): Constify.
1133 * target.h (flash_erase_command): Constify.
1134 * inferior.h (set_inferior_args, attach_command): Constify.
1135 * tracepoint.h (start_tracing, stop_tracing): Constify.
1136 * breakpoint.h (break_command, tbreak_command)
1137 (hbreak_command_wrapper, thbreak_command_wrapper)
1138 (rbreak_command_wrapper, watch_command_wrapper)
1139 (awatch_command_wrapper, rwatch_command_wrapper)
1140 (get_tracepoint_by_number): Constify.
1141 * symtab.c (info_variables_command, rbreak_command)
1142 (symtab_symbol_info): Constify.
1143 (info_variables_command): Add non-const overload.
1144 * top.c (dont_repeat_command): Constify.
1145 * breakpoint.c (ignore_command, commands_command)
1146 (condition_command, tbreak_command, hbreak_command)
1147 (thbreak_command, clear_command, break_command)
1148 (info_breakpoints_command, watch_command, rwatch_command)
1149 (awatch_command, trace_command, ftrace_command, strace_command)
1150 (trace_pass_command, break_range_command, dprintf_command)
1151 (agent_printf_command, get_tracepoint_by_number)
1152 (watch_maybe_just_location, trace_pass_command): Constify.
1153 (info_breakpoints_command): Add non-const overload.
1154 * tracefile.c (tsave_command): Constify.
1155 * infcmd.c (attach_command, disconnect_command, signal_command)
1156 (queue_signal_command, stepi_command, nexti_command)
1157 (finish_command, next_command, step_command, until_command)
1158 (advance_command, jump_command, continue_command, run_command)
1159 (start_command, starti_command, interrupt_command)
1160 (run_command_1, set_inferior_args, step_1): Constify.
1161 * inferior.c (add_inferior_command, remove_inferior_command)
1162 (clone_inferior_command): Constify.
1163 * linux-fork.c (checkpoint_command, restart_command): Constify.
1164 * windows-nat.c (signal_event_command): Constify.
1165 * guile/guile.c (guile_repl_command, guile_command): Constify.
1166 * printcmd.c (x_command, display_command, printf_command)
1167 (output_command, set_command, call_command, print_command)
1168 (eval_command): Constify.
1169 (non_const_set_command): Remove.
1170 (_initialize_printcmd): Update.
1171 * source.c (forward_search_command, reverse_search_command):
1172 Constify.
1173 * jit.c (jit_reader_load_command, jit_reader_unload_command):
1174 Constify.
1175 * infrun.c (handle_command): Constify.
1176 * memattr.c (mem_command): Constify.
1177 * stack.c (return_command, up_command, up_silently_command)
1178 (down_command, down_silently_command, frame_command)
1179 (backtrace_command, func_command, backtrace_command_1): Constify.
1180 (backtrace_command): Add non-const overload.
1181 * remote-sim.c (simulator_command): Constify.
1182 * exec.c (set_section_command): Constify.
1183 * tracepoint.c (tdump_command, trace_variable_command)
1184 (tstatus_command, tstop_command, tstart_command)
1185 (end_actions_pseudocommand, while_stepping_pseudocommand)
1186 (collect_pseudocommand, teval_pseudocommand, actions_command)
1187 (start_tracing, stop_tracing): Constify.
1188 * value.c (init_if_undefined_command): Constify.
1189 * tui/tui-stack.c (tui_update_command): Constify.
1190 * tui/tui-win.c (tui_refresh_all_command)
1191 (tui_set_tab_width_command, tui_set_win_height_command)
1192 (tui_set_focus_command, tui_scroll_forward_command)
1193 (tui_scroll_backward_command, tui_scroll_left_command)
1194 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
1195 (tui_set_win_height): Constify.
1196 * tui/tui-layout.c (tui_layout_command): Constify.
1197 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
1198 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1199 (proc_untrace_sysexit_cmd): Constify.
1200 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1201 (threadset_test_cmd, threadlist_update_test_cmd)
1202 (threadalive_test): Constify.
1203 * objc-lang.c (print_object_command): Constify.
1204 * command.h (add_com): Constify.
1205 * cli/cli-dump.c (restore_command): Constify.
1206 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1207 (help_command, complete_command, shell_command, edit_command)
1208 (list_command, disassemble_command, make_command)
1209 (apropos_command, alias_command): Constify.
1210 * cli/cli-script.c (document_command, define_command)
1211 (while_command, if_command, validate_comname): Constify.
1212 * cli/cli-decode.c (struct cmd_list_element): Change type of
1213 "fun".
1214 * target.c (do_monitor_command, flash_erase_command): Constify.
1215 * regcache.c (reg_flush_command): Constify.
1216 * reverse.c (reverse_step, reverse_next, reverse_stepi)
1217 (reverse_nexti, reverse_continue, reverse_finish)
1218 (save_bookmark_command, goto_bookmark_command)
1219 (exec_reverse_once): Constify.
1220 * python/python.c (python_interactive_command, python_command):
1221 Constify.
1222 * typeprint.c (ptype_command, whatis_command, whatis_exp):
1223 Constify.
1224 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1225 * gcore.c (gcore_command): Constify.
1226
85c4be7c
TT
12272017-11-07 Tom Tromey <tom@tromey.com>
1228
1229 * printcmd.c (x_command): Call set_repeat_arguments.
1230 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1231 * top.c (repeat_arguments): New global.
1232 (set_repeat_arguments): New function.
1233 (execute_command): Handle repeat_arguments.
1234 (show_commands): Calls set_repeat_arguments.
1235 * command.h (set_repeat_arguments): Declare.
1236
022643b4
TT
12372017-11-07 Tom Tromey <tom@tromey.com>
1238
1239 * stack.c (backtrace_command): Use std::string.
1240 (backtrace_command_1): Make "count_exp" const.
1241
5614fb77
TT
12422017-11-07 Tom Tromey <tom@tromey.com>
1243
1244 * source.c (directory_switch, mod_path, add_path): Constify.
1245 * defs.h (add_path, mod_path, directory_switch): Constify.
1246 * mi/mi-cmd-env.c (env_mod_path): Constify.
1247
6be9a197
TT
12482017-11-07 Tom Tromey <tom@tromey.com>
1249
1250 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1251 (run_command_1, continue_command, step_1, jump_command)
1252 (signal_command, until_command, advance_command, finish_command)
1253 (attach_command): Update.
1254
c2252c0d
TT
12552017-11-07 Tom Tromey <tom@tromey.com>
1256
1257 * command.h (set_cmd_cfunc): Don't declare.
1258 * cli/cli-decode.c (set_cmd_cfunc): Now static.
1259
1ee870c5
TT
12602017-11-07 Tom Tromey <tom@tromey.com>
1261
1262 * stack.c (select_frame_command): Constify.
1263 * cli/cli-decode.c (add_com_suppress_notification): Constify.
1264 * command.h (add_com_suppress_notification): Constify.
1265
ee7ddd71
TT
12662017-11-07 Tom Tromey <tom@tromey.com>
1267
1268 * breakpoint.c (stop_command): Constify.
1269 * cli/cli-decode.c (struct cmd_list_element): Constify.
1270 * command.h (add_abbrev_prefix_cmd): Constify.
1271
95e95a6d
PA
12722017-11-07 Pedro Alves <palves@redhat.com>
1273
1274 * breakpoint.c (extract_bp_kind): New enum.
1275 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1276 factored out from ...
1277 (extract_bp_number_and_location): ... here.
1278 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1279
cc638e86
PA
12802017-11-07 Pedro Alves <palves@redhat.com>
1281
1282 * breakpoint.c (extract_bp_number_and_location): Change return
1283 type to void. Throw error instead of warning.
1284 (enable_disable_command): Adjust.
1285
d0fe4701
XR
12862017-11-07 Xavier Roirand <roirand@adacore.com>
1287 Pedro Alves <palves@redhat.com>
1288
1289 * breakpoint.c (map_breakpoint_number_range): New, factored out
1290 from ...
1291 (map_breakpoint_numbers): ... here.
1292 (find_location_by_number): Change parameters from string to
1293 breakpoint number and location.
1294 (extract_bp_number_and_location): New function.
1295 (enable_disable_bp_num_loc)
1296 (enable_disable_breakpoint_location_range)
1297 (enable_disable_command): New functions, factored out ...
1298 (enable_command, disable_command): ... these functions, and
1299 adjusted to support ranges.
1300 * NEWS: Document enable/disable breakpoint location range feature.
1301
635dc5b2
LM
13022017-11-06 Luis Machado <luis.machado@linaro.org>
1303
1304 * MAINTAINERS (Write After Approval): Update my e-mail address.
1305
556e5da5
PA
13062017-11-06 Pedro Alves <palves@redhat.com>
1307
1308 * gnu-nat.c (gnu_terminal_init): Delete.
1309 (gnu_target): Don't install gnu_terminal_init.
1310 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1311 (child_terminal_init): ... this function.
1312
d1928160
PA
13132017-11-06 Pedro Alves <palves@redhat.com>
1314
1315 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1316 sgtty.h.
1317 * config.in, configure: Regenerate.
1318
6aa899ce
PA
13192017-11-06 Pedro Alves <palves@redhat.com>
1320
1321 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1322 (async_init_signals): Adjust.
1323 (handle_stop_sig): Rename to ...
1324 (handle_sigtstp): ... this.
1325 (async_stop_sig): Rename to ...
1326 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1327 SIGTSTP path.
1328 * event-top.h: Move signal.h include to the top. Check SIGTSTP
1329 instead of STOP_SIGNAL thoughout.
1330 (handle_stop_sig): Rename to ...
1331 (handle_sigtstp): ... this.
1332 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1333
a94799ac
PA
13342017-11-06 Pedro Alves <palves@redhat.com>
1335
1336 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1337 longer set flags twice in row.
1338
726e1356
PA
13392017-11-06 Pedro Alves <palves@redhat.com>
1340
1341 * Makefile.in (SER_HARDWIRE): Update comment.
1342 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1343 * common/gdb_termios.h: Delete file.
1344 * common/job-control.c: Include termios.h and unistd.h instead of
1345 gdb_termios.h.
1346 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1347 check.
1348 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1349 Remove sgtty code.
1350 * configure.ac: No longer check for termio.h and sgtty.h.
1351 * configure: Regenerate.
1352 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
1353 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1354 Replace PROCESS_GROUP_TYPE references with pid_t references
1355 throughout.
1356 (gdb_getpgrp): Delete.
1357 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1358 (child_terminal_inferior): Remove comment. Remove sgtty code.
1359 (child_terminal_ours_1): Use tcgetpgrp directly instead of
1360 gdb_getpgrp. Use serial_set_tty_state instead aof
1361 serial_noflush_set_tty_state. Remove sgtty code.
1362 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
1363 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1364 (inferior_process_group): Now returns pid_t.
1365 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1366 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1367 * ser-event.c (serial_event_ops): Update.
1368 * ser-go32.c (dos_noflush_set_tty_state): Delete.
1369 (dos_ops): Update.
1370 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1371 * ser-pipe.c (pipe_ops): Update.
1372 * ser-tcp.c (tcp_ops): Update.
1373 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
1374 HAVE_TERMIOS checks.
1375 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1376 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1377 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1378 assume termios.
1379 (hardwire_noflush_set_tty_state): Delete.
1380 (hardwire_print_tty_state, hardwire_drain_output)
1381 (hardwire_flush_output, hardwire_flush_input)
1382 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1383 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1384 code, and assume termios.
1385 (hardwire_ops): Update.
1386 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1387 * serial.c (serial_noflush_set_tty_state): Delete.
1388 * serial.h (serial_noflush_set_tty_state): Delete.
1389 (serial_ops::noflush_set_tty_state): Delete.
1390
1cfb73db
UW
13912017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1392
1393 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1394 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1395 (COMMON_OBS): Remove doublest.o and dfp.o.
1396 Do not build target-float.c (instead of doublest.c)
1397 with -Wformat-nonliteral.
1398
1399 * doublest.c: Remove file.
1400 * doublest.h: Remove file.
1401 * dfp.c: Remove file.
1402 * dfp.h: Remove file.
1403
1404 * target-float.c: Do not include "doublest.h" and "dfp.h".
1405 (DOUBLEST): Move here from doublest.h.
1406 (enum float_kind): Likewise.
1407 (FLOATFORMAT_CHAR_BIT): Likewise.
1408 (FLOATFORMAT_LARGEST_BYTES): Likewise.
1409 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
1410 (floatformat_precision): Likewise.
1411 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1412 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1413 Likewise.
1414 (host_float_format, host_double_format, host_long_double_format):
1415 Likewise.
1416 (floatformat_to_string, floatformat_from_string): Likewise.
1417 (floatformat_to_doublest): Likewise. Also, inline the original
1418 convert_floatformat_to_doublest.
1419 (floatformat_from_doublest): Likewise. Also, inline the original
1420 convert_floatformat_from_doublest.
1421
1422 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1423 (MAX_DECIMAL_STRING): Move here from dfp.c.
1424 (match_endianness): Likewise.
1425 (set_decnumber_context, decimal_check_errors): Likewise.
1426 (decimal_from_number, decimal_to_number): Likewise.
1427 (decimal_to_string, decimal_from_string): Likewise. Make static.
1428 (decimal_from_longest, decimal_from_ulongest): Likewise.
1429 (decimal_to_longest): Likewise.
1430 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1431 (decimal_convert): Likewise.
1432
b07e9c46
UW
14332017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1434
1435 * doublest.c: Do not include "gdbtypes.h".
1436 (extract_typed_floating): Remove.
1437 (store_typed_floating): Remove.
1438 (convert_typed_floating): Remove.
1439 * doublest.h (struct type): Remove.
1440 (DOUBLEST_PRINT_FORMAT): Remove.
1441 (DOUBLEST_SCAN_FORMAT): Remove.
1442 (extract_typed_floating): Remove.
1443 (store_typed_floating): Remove.
1444 (convert_typed_floating): Remove.
1445
1446 * dfp.c (decimal_from_doublest): Remove.
1447 (decimal_to_doublest): Remove.
1448 * dfp.h: Do not include "doublest.h".
1449 (decimal_from_doublest): Remove.
1450 (decimal_to_doublest): Remove.
1451
1452 * value.c: Do not include "doublest.h" and "dfp.h".
1453 (value_as_double): Remove.
1454 (unpack_double): Remove.
1455 (value_from_double): Remove.
1456 (value_from_decfloat): Remove.
1457 * value.h: Do not include "doublest.h".
1458 (value_as_double): Remove.
1459 (unpack_double): Remove.
1460 (value_from_double): Remove.
1461 (value_from_decfloat): Remove.
1462
3b2ca824
UW
14632017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1464
1465 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
1466 (i386_extract_return_value): Use target_float_convert.
1467 (i386_store_return_value): Likewise.
1468 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1469 (i387_value_to_register): Likewise.
1470 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
1471 (ia64_register_to_value): Use target_float_convert.
1472 (ia64_value_to_register): Likewise.
1473 (ia64_extract_return_value): Likewise.
1474 (ia64_store_return_value): Likewise.
1475 (ia64_push_dummy_call): Likewise.
1476 * m68k-tdep.c: Include "target-float.h".
1477 (m68k_register_to_value): Use target_float_convert.
1478 (m68k_value_to_register): Likewise.
1479 (m68k_svr4_extract_return_value): Likewise.
1480 (m68k_svr4_store_return_value): Likewise.
1481 * ppc-sysv-tdep.c: Include "target-float.h".
1482 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1483 (do_ppc_sysv_return_value): Likewise.
1484 (ppc64_sysv_abi_push_freg): Likewise.
1485 (ppc64_sysv_abi_return_value_base): Likewise.
1486 * rs6000-aix-tdep.c: Include "target-float.h".
1487 (rs6000_push_dummy_call): Use target_float_convert.
1488 (rs6000_return_value): Likewise.
1489 * rs6000-lynx178-tdep.c: Include "target-float.h".
1490 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1491 (rs6000_lynx178_return_value): Likewise.
1492 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
1493 (rs6000_register_to_value): Use target_float_convert.
1494 (rs6000_value_to_register): Likewise.
1495 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
1496 (arm_extract_return_value): Use target_float_convert.
1497 (arm_store_return_value): Likewise.
1498 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
1499 (sh_register_convert_to_virtual): Use target_float_convert.
1500 (sh_register_convert_to_raw): Likewise.
1501 * sh64-tdep.c: Include "target-float.h".
1502 (sh64_extract_return_value): Use target_float_convert.
1503 (sh64_register_convert_to_virtual): Likewise.
1504 (sh64_register_convert_to_raw): Likewise. Fix argument types.
1505
14ad9311
UW
15062017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1507
1508 * target-float.c (floatformat_to_host_double): New function.
1509 (floatformat_from_host_double): Likewise.
1510 (target_float_to_host_double): Likewise.
1511 (target_float_from_host_double): Likewise.
1512 * target-float.h (target_float_to_host_double): Add prototype.
1513 (target_float_from_host_double): Likewise.
1514
1515 * guile/scm-value.c: Include "target-float.h".
1516 (gdbscm_value_to_real): Use target_float_to_host_double.
1517 Handle integer source values via value_as_long.
1518 * guile/scm-math.c: Include "target-float.h". Do not include
1519 "doublest.h", "dfp.h", and "expression.h".
1520 (vlscm_convert_typed_number): Use target_float_from_host_double.
1521 (vlscm_convert_number): Likewise.
1522
1523 * python/py-value.c (valpy_float): Use target_float_to_host_double.
1524 (convert_value_from_python): Use target_float_from_host_double.
1525
50eff16b
UW
15262017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1527
1528 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1529 (cast_from_fixed): Likewise.
1530 (ada_scaling_type): New function.
1531 (ada_delta): Return value instead of DOUBLEST. Perform target
1532 arithmetic instead of host arithmetic.
1533 (scaling_factor): Rename to ...
1534 (ada_scaling_factor) ... this. Make non-static. Return value instead
1535 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
1536 (ada_fixed_to_float): Remove.
1537 (ada_float_to_fixed): Remove.
1538 * ada-lang.h (ada_fixed_to_float): Remove.
1539 (ada_float_to_fixed): Remove.
1540 (ada_delta): Return value instead of DOUBLEST.
1541 (ada_scaling_factor): Add prototype.
1542
1543 * ada-typeprint.c: Include "target-float.h".
1544 (print_fixed_point_type): Perform target arithmetic instead of
1545 host arithmetic.
1546 * ada-valprint.c: Include "target-float.h".
1547 (ada_val_print_num): Perform target arithmetic instead of
1548 host arithmetic for fixed-point types.
1549
66c02b9e
UW
15502017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1551
1552 * target-float.c: Include <math.h>.
1553 (floatformat_binop): New function.
1554 (floatformat_compare): Likewise.
1555 (target_float_binop): Likewise.
1556 (target_float_compare): Likewise.
1557 * target-float.h: Include "expression.h".
1558 (target_float_binop): Add prototype.
1559 (target_float_compare): Likewise.
1560
1561 * valarith.c: Do not include "doublest.h" and "dfp.h".
1562 Include "common/byte-vector.h".
1563 (value_args_as_decimal): Remove, replace by ...
1564 (value_args_as_target_float): ... this function. Handle both
1565 binary and decimal target floating-point formats.
1566 (scalar_binop): Handle both binary and decimal FP using
1567 value_args_as_target_float and target_float_binop.
1568 (value_equal): Handle both binary and decimal FP using
1569 value_args_as_target_float and target_float_compare.
1570 (value_less): Likewise.
1571 (value_pos): Handle all scalar types as simple copy.
1572 (value_neg): Handle all scalar types via BINOP_SUB from 0.
1573 * dfp.c (decimal_binop): Throw error instead of internal_error
1574 when called with an unsupported operation code.
1575
f69fdf9b
UW
15762017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1577
1578 * target-float.c (target_float_to_string): New function.
1579 (target_float_from_string): New function.
1580 * target-float.h (target_float_to_string): Add prototype.
1581 (target_float_from_string): Add prototype.
1582
1583 * valprint.c: Include "target-float.h". Do not include
1584 "doublest.h" and "dfp.h".
1585 (print_floating): Use target_float_to_string.
1586 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
1587 (printf_floating): Use target_float_to_string.
1588 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
1589 (print_i387_value): Use target_float_to_string.
1590 * mips-tdep.c: Include "target-float.h".
1591 (mips_print_fp_register): Use target_float_to_string.
1592 * sh64-tdep.c: Include "target-float.h".
1593 (sh64_do_fp_register): Use target_float_to_string.
1594
1595 * parse.c: Include "target-float.h". Do not include
1596 "doublest.h" and "dfp.h".
1597 (parse_float): Use target_float_from_string.
1598 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
1599 (define_symbol): Use target_float_from_string.
1600 * gdbarch-selftests.c: Include "target-float.h".
1601 (register_to_value_test): Use target_float_from_string.
1602
70100014
UW
16032017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
1604
1605 * Makefile.c (SFILES): Add target-float.c.
1606 (HFILES_NO_SRCDIR): Add target-float.h.
1607 (COMMON_OBS): Add target-float.o.
1608 * target-float.h: New file.
1609 * target-float.c: New file.
1610
1611 * doublest.c (floatformat_classify): Fix detection of float_zero.
1612
1613 * gdbtypes.c (is_floating_type): New function.
1614 * gdbtypes.h (is_floating_type): Add prototype.
1615
1616 * value.c: Do not include "floatformat.h".
1617 (unpack_double): Use target_float_is_valid.
1618 (is_floating_value): New function.
1619 * value.h (is_floating_value): Add prototype-
1620
1621 * valarith.c: Include "target-float.h".
1622 (value_logical_not): Use target_float_is_zero.
1623
1624 * python/py-value.c: Include "target-float.h".
1625 (valpy_nonzero): Use target_float_is_zero.
1626
ab4b1c46
TT
16272017-11-04 Tom Tromey <tom@tromey.com>
1628
1629 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1630
454dafbd
TT
16312017-11-04 Tom Tromey <tom@tromey.com>
1632
1633 * breakpoint.c (set_momentary_breakpoint): Return
1634 breakpoint_up.
1635 (until_break_command): Update.
1636 (new_until_break_fsm): Change argument types to
1637 breakpoint_up.
1638 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1639 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1640 Remove.
1641 * infcmd.c (finish_forward): Update.
1642 * breakpoint.h (set_momentary_breakpoint)
1643 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1644 (make_cleanup_delete_breakpoint): Remove.
1645 (struct breakpoint_deleter): New.
1646 (breakpoint_up): New typedef.
1647 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1648 (insert_exception_resume_breakpoint): Update.
1649 (insert_exception_resume_from_probe): Update.
1650 (insert_longjmp_resume_breakpoint): Update.
1651 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1652 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1653 * infcall.c (call_function_by_hand_dummy): Update
1654
331b71e5
TT
16552017-11-04 Tom Tromey <tom@tromey.com>
1656
1657 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1658
9f584b37
TT
16592017-11-04 Tom Tromey <tom@tromey.com>
1660
1661 * linux-tdep.c (linux_core_info_proc_mappings): Use
1662 gdb::def_vector.
1663 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
1664 "size" argument.
1665 (linux_corefile_thread): Update.
1666 (linux_make_corefile_notes): Remove unused variable.
1667
779bc38e
TT
16682017-11-04 Tom Tromey <tom@tromey.com>
1669
1670 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1671 gdb::byte_vector.
1672
ed2b3126
TT
16732017-11-04 Tom Tromey <tom@tromey.com>
1674
1675 * objfiles.c (do_free_objfile_cleanup): Remove.
1676 * compile/compile-object-load.c (compile_object_load): Update.
1677 * objfiles.h (make_cleanup_free_objfile): Remove.
1678
7f6743fd
TT
16792017-11-04 Tom Tromey <tom@tromey.com>
1680
1681 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1682 (adi_read_versions): Change "tags" to "gdb_byte *".
1683 (adi_print_versions): Likewise.
1684
c80049d3
TT
16852017-11-04 Tom Tromey <tom@tromey.com>
1686
1687 * breakpoint.c
1688 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1689 from start_rbreak_breakpoints.
1690 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1691 * breakpoint.h (class scoped_rbreak_breakpoints): New.
1692 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1693 * symtab.c (do_end_rbreak_breakpoints): Remove.
1694 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1695
167b0be1
TT
16962017-11-04 Tom Tromey <tom@tromey.com>
1697
1698 * cp-namespace.c (reset_directive_searched): Remove.
1699 (cp_lookup_symbol_via_imports): Use scoped_restore.
1700 * cp-support.c (reset_directive_searched): Remove.
1701 (make_symbol_overload_list_using): Use scoped_restore.
1702 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1703 (reset_directive_searched): Remove.
1704
5eae7aea
TT
17052017-11-04 Tom Tromey <tom@tromey.com>
1706
1707 * symfile.c (find_separate_debug_file_by_debuglink): Use
1708 unique_xmalloc_ptr.
1709
c6bcad5f
TT
17102017-11-04 Tom Tromey <tom@tromey.com>
1711
1712 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1713 type of "info".
1714 (compute_stack_depth): Likewise.
1715 (do_compile_dwarf_expr_to_c): Use std::vector.
1716
20dcd8ca
TT
17172017-11-04 Tom Tromey <tom@tromey.com>
1718
1719 * compile/compile-object-load.c (link_callbacks_einfo): Use
1720 std::string.
1721
33c7c59d
TT
17222017-11-04 Tom Tromey <tom@tromey.com>
1723
1724 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1725 Use scoped_free_pendings.
1726 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1727 scoped_free_pendings.
1728 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1729 (xcoff_initial_scan): Likewise.
1730 * buildsym.c (reset_symtab_globals): Update comment.
1731 (scoped_free_pendings): Rename from really_free_pendings.
1732 (prepare_for_building): Update comment.
1733 (buildsym_init): Likewise.
1734 * buildsym.h (class scoped_free_pendings): New class.
1735 (really_free_pendings): Don't declare.
1736
67fa57cf
UW
17372017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
1738
1739 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1740 output when converting a zero value to a special byteorder format.
1741
f26ae15b
YQ
17422017-11-02 Yao Qi <yao.qi@linaro.org>
1743
1744 * frame.c (do_frame_register_read): Remove aspace.
1745 * jit.c (jit_frame_sniffer): Likwise.
1746 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1747 * regcache.c (regcache::regcache): Pass nullptr.
1748 (regcache_print): Caller updated.
1749 * regcache.h (regcache::regcache): Remove one constructor
1750 parameter aspace.
1751
6c6e9412
YQ
17522017-11-02 Yao Qi <yao.qi@linaro.org>
1753
1754 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1755
8b86c959
YQ
17562017-11-02 Yao Qi <yao.qi@linaro.org>
1757
1758 * breakpoint.c (insert_single_step_breakpoints): Update.
1759 * frame.c (struct frame_info) <aspace>: Add const.
1760 (frame_save_as_regcache): Add const.
1761 (get_frame_address_space): Return const address_space *.
1762 * frame.h (get_frame_address_space): Update declaration.
1763 * infrun.c (struct step_over_info) <aspace>: Add const.
1764 (set_step_over_info): Make aspace const.
1765 (displaced_step_prepare_throw): Change variable const.
1766 (resume): Likewise.
1767 (proceed): Likewise.
1768 (adjust_pc_after_break): Likewise.
1769 (save_waitstatus): Likewise.
1770 (handle_signal_stop): Likewise.
1771 (keep_going_pass_signal): Likewise.
1772 * jit.c (jit_frame_sniffer): Add const.
1773 * mips-tdep.c (mips_single_step_through_delay): Likewise.
1774 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1775 * record-full.c (record_full_wait_1): Likewise.
1776 * regcache.c (regcache::regcache): Change parameter to const.
1777 * regcache.h (regcache::regcache): Likewise.
1778 (regcache::aspace): Return const address_space *.
1779 (regcache) <m_aspace>: Add const.
1780
a01bda52
YQ
17812017-11-02 Yao Qi <yao.qi@linaro.org>
1782
1783 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1784 * frame.c (create_sentinel_frame): Likewise.
1785 * infrun.c (displaced_step_prepare_throw): Likewise.
1786 (resume): Likewise.
1787 (thread_still_needs_step_over_bp): Likewise.
1788 (proceed): Likewise.
1789 (do_target_wait): Likewise.
1790 (adjust_pc_after_break): Likewise.
1791 (handle_syscall_event): Likewise.
1792 (save_waitstatus): Likewise.
1793 (handle_inferior_event_1): Likewise.
1794 (handle_signal_stop): Likewise.
1795 (keep_going_pass_signal): Likewise.
1796 * linux-nat.c (status_callback): Likewise.
1797 (save_stop_reason): Likewise.
1798 (resume_stopped_resumed_lwps): Likewise.
1799 * record-full.c (record_full_exec_insn): Likewise.
1800 (record_full_wait_1): Likewise.
1801 * regcache.c (get_regcache_aspace): Remove.
1802 * regcache.h (get_regcache_aspace): Remove.
1803
d999647b
YQ
18042017-11-02 Yao Qi <yao.qi@linaro.org>
1805
1806 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1807 (init_regcache_descr): Use gdbarch_num_regs.
1808 (regcache::regcache): Likewise.
1809 (regcache::get_register_status): Likewise.
1810 (regcache::assert_raw_regnum): Likewise.
1811 (regcache::cooked_read): Likewise.
1812 (regcache::cooked_read_value): Likewise.
1813 (regcache::cooked_write): Likewise.
1814 (regcache::dump): Likewise.
1815 (regcache::num_raw_registers): New method.
1816 * regcache.h (class regcache) <num_raw_registers>: New.
1817
4e888c28
YQ
18182017-11-02 Yao Qi <yao.qi@linaro.org>
1819
1820 * regcache.c (regcache::assert_regnum): New method.
1821 (regcache::invalidate): Call assert_regnum.
1822 (regcache::raw_update): Likewise.
1823 (regcache::raw_write): Likewise.
1824 (regcache::raw_read_part): Likewise.
1825 (regcache::raw_write_part): Likewise.
1826 (regcache::raw_supply): Likewise.
1827 (regcache::raw_supply_integer): Likewise.
1828 (regcache::raw_supply_zeroed): Likewise.
1829 (regcache::raw_collect): Likewise.
1830 (regcache::raw_collect_integer): Likewise.
1831 * regcache.h (regcache::assert_regnum): Declare.
1832
2e1b49b3
YQ
18332017-11-02 Yao Qi <yao.qi@linaro.org>
1834
1835 * regcache.c (regcache::dump): Remove code.
1836
6c5218df
YQ
18372017-11-02 Yao Qi <yao.qi@linaro.org>
1838
1839 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1840 Remove.
1841 <sizeof_cooked_register_status>: Remove.
1842 (init_regcache_descr): Update.
1843 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1844 (regcache::save): Likewise.
1845 (regcache::dump): Likewise.
1846
dcc31d28
JB
18472017-11-01 James Bowman <james.bowman@ftdichip.com>
1848
1849 * ft32-tdep.c (ft32_fetch_instruction): New function.
1850 (ft32_analyze_prologue): Use ft32_fetch_instruction().
1851
3a87ae65
SM
18522017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
1853
1854 * cli/cli-script.c (execute_control_command): Rename to ...
1855 (execute_control_command_1): ... this.
1856 (execute_control_command): New function.
1857
09b847f3
SM
18582017-10-31 Simon Marchi <simon.marchi@ericsson.com>
1859
1860 * tracepoint.c (tfind_command): Remove const_cast.
1861
f871c485
MG
18622017-10-30 Mike Gulick <mgulick@mathworks.com>
1863
1864 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1865
b020ff80
SM
18662017-10-30 Simon Marchi <simon.marchi@ericsson.com>
1867
1868 * common/common-utils.h (in_inclusive_range): New function.
1869 * arm-tdep.c (arm_record_extension_space): Use
1870 in_inclusive_range.
1871 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1872 * cris-tdep.c (cris_spec_reg_applicable): Use
1873 in_inclusive_range.
1874
1b81856f
PA
18752017-10-30 Pedro Alves <palves@redhat.com>
1876 Simon Marchi <simon.marchi@ericsson.com>
1877
1878 * remote.c (remote_set_syscall_catchpoint): Build a std::string
1879 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1880
31b833b3
PA
18812017-10-30 Pedro Alves <palves@redhat.com>
1882
1883 * common/common-utils.c (string_appendf, string_vappendf): New
1884 functions.
1885 * common/common-utils.h (string_appendf, string_vappendf): New
1886 declarations.
1887 * unittests/common-utils-selftests.c (string_appendf_func)
1888 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1889 (string_vappendf_tests): New functions.
1890 (_initialize_common_utils_selftests): Register "string_appendf" and
1891 "string_vappendf tests".
1892
4a250334
PA
18932017-10-30 Pedro Alves <palves@redhat.com>
1894
1895 * unittests/common-utils-selftests.c (format_func): New typedef.
1896 (string_printf_tests, string_vprintf_tests): Tests factored out
1897 and merged to ...
1898 (test_format_func): ... this new function.
1899 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1900 test_format_func.
1901
16c5c17e
SM
19022017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1903
1904 * darwin-nat.c: Remove include of gdb.h.
1905
7ca51576
SM
19062017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1907
1908 * xtensa-xtregs.c: Fix formatting issues.
1909
c1342859
SM
19102017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1911
1912 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1913
484d8d36
MD
19142017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1915
1916 PR python/21213
1917 * python/py-infthread.c (thpy_get_inferior): Increment reference
1918 of inferior before returning it.
1919
b5540b5f
SM
19202017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1921
1922 * unittests/common-utils-selftests.c (format): Add
1923 ATTRIBUTE_PRINTF.
1924
5a9dcda1
SM
19252017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1926
1927 * xml-syscall.c (struct syscall_desc): Add constructor.
1928 <name>: Change type to std::string.
1929 (syscall_desc_up): New typedef.
1930 (syscall_desc_p): Remove typeder.
1931 (DEF_VEC_P(syscall_desc_p)): Remove.
1932 (struct syscall_group_desc): Add constructor.
1933 <name>: Change type to std::string.
1934 <syscalls>: Change type to std::vector.
1935 (syscall_group_desc_up): New typedef.
1936 (syscall_group_desc_p): Remove typedef.
1937 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1938 (struct syscalls_info) <syscalls>: Change type to std::vector of
1939 unique_ptr.
1940 <groups>: Likewise.
1941 <my_gdb_datadir>: Change type to std::string.
1942 (syscalls_info_up): New typedef.
1943 (allocate_syscalls_info): Remove.
1944 (syscalls_info_free_syscalls_desc): Remove.
1945 (syscalls_info_free_syscall_group_desc): Remove.
1946 (free_syscalls_info): Remove.
1947 (make_cleanup_free_syscalls_info): Remove.
1948 (syscall_group_create_syscall_group_desc): Adjust.
1949 (syscall_group_add_syscall): Adjust.
1950 (syscall_create_syscall_desc): Adjust.
1951 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1952 (init_syscalls_info): Adjust.
1953 (syscall_group_get_group_by_name): Adjust.
1954 (xml_get_syscall_number): Adjust.
1955 (xml_get_syscall_name): Adjust.
1956 (xml_list_of_syscalls): Adjust.
1957 (xml_list_syscalls_by_group): Adjust.
1958 (xml_list_of_groups): Adjust.
1959
45461e0d
SM
19602017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1961
1962 * probe.h: Don't include gdb_vecs.h.
1963 (DEF_VEC_P (probe_p)): Remove.
1964 (find_probes_in_objfile): Return an std::vector.
1965 * probe.c (find_probes_in_objfile): Likewise.
1966 * breakpoint.c (breakpoint_objfile_data)
1967 <longjmp_probes>: Change type to std::vector.
1968 <exception_probes>: Likewise.
1969 (free_breakpoint_probes): Don't manually free vectors.
1970 (create_longjmp_master_breakpoint): Adjust.
1971 (create_exception_master_breakpoint): Adjust.
1972 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1973 parameter type, adjust.
1974 (svr4_create_solib_event_breakpoints): Adjust.
1975
43dce439
SM
19762017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1977
1978 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1979 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1980 with new.
1981 (free_breakpoint_probes): Rename to ...
1982 (free_breakpoint_objfile_data): ... this, and call delete on
1983 bp_objfile_data..
1984
6a1b9516
SM
19852017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1986
1987 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1988 (loaded_script_ptr): Remove typedef.
1989 (DEF_VEC_P (loaded_script_ptr)): Remove.
1990 (struct collect_matching_scripts_data): Add constructor.
1991 <scripts_p>: Change type to (pointer to) std::vector.
1992 (collect_matching_scripts_data): Adjust.
1993 (sort_scripts_by_name): Make suitable for std::sort.
1994 (print_scripts): Don't sort vector, adjust to std::vector.
1995 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1996
593e3209
SM
19972017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1998
1999 * symfile.c (filename_language): Make struct, not typedef. Add
2000 constructor.
2001 <ext>: Change type to std::string.
2002 (DEF_VEC_O (filename_language)): Remove.
2003 (filename_language_table): Change type to std::vector.
2004 (add_filename_language): Adjust.
2005 (set_ext_lang_command): Adjust.
2006 (info_ext_lang_command): Adjust.
2007 (deduce_language_from_filename): Adjust.
2008 (class scoped_restore_filename_language_table): Remove.
2009 (test_filename_language): Use scoped_restore.
2010 (test_set_ext_lang_command): Use scoped_restore, adjust to
2011 std::vector change.
2012
32fa66eb
SM
20132017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2014
2015 * symfile.c: Include selftest.h.
2016 (class scoped_restore_filename_language_table): New.
2017 (test_filename_language): New test.
2018 (test_set_ext_lang_command): New test.
2019 (_initialize_symfile): Register tests.
2020
4a27f119
KS
20212017-10-27 Keith Seitz <keiths@redhat.com>
2022
2023 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2024 in the bp_location, falling back to find_pc_sect_function when
2025 needed.
2026 (add_location_to_breakpoint): Save sal->symbol.
2027 * breakpoint.h (struct bp_location) <symbol>: New field.
2028 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2029 * symtab.h (struct symtab_and_line) <symbol>: New field.
2030
a43f3893
PF
20312017-10-26 Patrick Frants <osscontribute@gmail.com>
2032
7453e6b2 2033 PR gdb/13669
a43f3893
PF
2034 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2035 to rewind obstack.
2036
23cc4e1b
PA
20372017-10-26 Pedro Alves <palves@redhat.com>
2038
2039 * remote.c (remote_async_terminal_ours_p): Delete.
2040 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2041 Remove references to 'remote_async_terminal_ours_p'.
2042
6abc18bb
YQ
20432017-10-26 Yao Qi <yao.qi@linaro.org>
2044
2045 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2046
bd522513
YQ
20472017-10-26 Yao Qi <yao.qi@linaro.org>
2048
2049 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2050 aspace const.
2051 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2052 Likewise.
2053 * breakpoint.c (bpstat_check_location): Remove cast.
2054 (breakpoint_hit_catch_fork): Make aspce const.
2055 (breakpoint_hit_catch_solib): Likewise.
2056 (breakpoint_hit_catch_exec): Likewise.
2057 (breakpoint_hit_ranged_breakpoint): Likewise.
2058 (breakpoint_hit_watchpoint): Likewise.
2059 (base_breakpoint_breakpoint_hit): Likewise.
2060 (bkpt_breakpoint_hit): Likewise.
2061 (dprintf_breakpoint_hit): Likewise.
2062 (tracepoint_breakpoint_hit): Likewise.
2063 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2064
accd0bcd
YQ
20652017-10-26 Yao Qi <yao.qi@linaro.org>
2066
2067 * breakpoint.c (breakpoint_location_address_match): Change
2068 "struct address_space *" to "const address_space".
2069 (breakpoint_location_address_range_overlap): Likewise.
2070 (breakpoint_here_p): Likewise.
2071 (breakpoint_in_range_p): Likewise.
2072 (moribund_breakpoint_here_p): Likewise.
2073 (bp_location_inserted_here_p): Likewise.
2074 (software_breakpoint_inserted_here_p): Likewise.
2075 (hardware_breakpoint_inserted_here_p): Likewise.
2076 (hardware_watchpoint_inserted_in_range): Likewise.
2077 (bpstat_check_location): Likewise.
2078 (bpstat_stop_status): Likewise.
2079 (breakpoint_address_match): Likewise.
2080 (breakpoint_address_match_range): Likewise.
2081 (breakpoint_location_address_match): Likewise.
2082 (breakpoint_location_address_range_overlap): Likewise.
2083 (insert_single_step_breakpoint): Likewise.
2084 (breakpoint_has_location_inserted_here): Likewise.
2085 (single_step_breakpoint_inserted_here_p): Likewise.
2086 (pc_at_non_inline_function): Likewise.
2087 * breakpoint.h (bpstat_stop_status): Update declaration.
2088 (breakpoint_here_p): Likewise.
2089 (breakpoint_in_range_p): Likewise.
2090 (moribund_breakpoint_here_p): Likewise.
2091 (breakpoint_inserted_here_p): Likewise.
2092 (software_breakpoint_inserted_here_p): Likewise.
2093 (hardware_breakpoint_inserted_here_p): Likewise.
2094 (breakpoint_has_location_inserted_here): Likewise.
2095 (single_step_breakpoint_inserted_here_p): Likewise.
2096 (hardware_watchpoint_inserted_in_range): Likewise.
2097 (breakpoint_address_match): Likewise.
2098 (insert_single_step_breakpoint): Likewise.
2099 (pc_at_non_inline_function): Likewise.
2100 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
2101 * record.c (record_check_stopped_by_breakpoint): Likewise.
2102 * record.h (record_check_stopped_by_breakpoint): Likewise.
2103 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
2104
ac7936df
YQ
21052017-10-25 Yao Qi <yao.qi@linaro.org>
2106
2107 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
2108 regcache->arch () instead get_regcache_arch.
2109 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
2110 Likewise.
2111 (aarch64_fbsd_store_inferior_registers): Likewise.
2112 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
2113 (store_gregs_to_thread): Likewise.
2114 (fetch_fpregs_from_thread): Likewise.
2115 (store_fpregs_to_thread): Likewise.
2116 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
2117 (aarch64_store_return_value): Likewise.
2118 (aarch64_software_single_step): Likewise.
2119 * aix-thread.c (aix_thread_wait): Likewise.
2120 (supply_reg32): Likewise.
2121 (supply_sprs64): Likewise.
2122 (supply_sprs32): Likewise.
2123 (fill_gprs64): Likewise.
2124 (fill_gprs32): Likewise.
2125 (fill_sprs64): Likewise.
2126 (fill_sprs32): Likewise.
2127 (store_regs_user_thread): Likewise.
2128 (store_regs_kernel_thread): Likewise.
2129 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
2130 (alphabsd_store_inferior_registers): Likewise.
2131 * alpha-tdep.c (alpha_extract_return_value): Likewise.
2132 (alpha_store_return_value): Likewise.
2133 (alpha_deal_with_atomic_sequence): Likewise.
2134 (alpha_next_pc): Likewise.
2135 (alpha_software_single_step): Likewise.
2136 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
2137 (amd64bsd_store_inferior_registers): Likewise.
2138 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
2139 Likewise.
2140 (amd64_linux_store_inferior_registers): Likewise.
2141 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
2142 (amd64_collect_native_gregset): Likewise.
2143 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
2144 (amd64obsd_collect_uthread): Likewise.
2145 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
2146 (amd64_collect_fpregset): Likewise.
2147 (amd64_supply_fxsave): Likewise.
2148 (amd64_supply_xsave): Likewise.
2149 (amd64_collect_fxsave): Likewise.
2150 (amd64_collect_xsave): Likewise.
2151 * arc-tdep.c (arc_write_pc): Likewise.
2152 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
2153 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
2154 (arm_fbsd_store_inferior_registers): Likewise.
2155 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
2156 (store_vfp_regs): Likewise.
2157 (arm_linux_fetch_inferior_registers): Likewise.
2158 (arm_linux_store_inferior_registers): Likewise.
2159 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
2160 (arm_linux_sigreturn_next_pc): Likewise.
2161 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
2162 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
2163 (fetch_register): Likewise.
2164 (store_register): Likewise.
2165 * arm-tdep.c (arm_is_thumb): Likewise.
2166 (displaced_in_arm_mode): Likewise.
2167 (bx_write_pc): Likewise.
2168 (arm_get_next_pcs_addr_bits_remove): Likewise.
2169 (arm_software_single_step): Likewise.
2170 (arm_extract_return_value): Likewise.
2171 (arm_store_return_value): Likewise.
2172 (arm_write_pc): Likewise.
2173 * bfin-tdep.c (bfin_extract_return_value): Likewise.
2174 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
2175 (bsd_uthread_store_registers): Likewise.
2176 * core-regset.c (fetch_core_registers): Likewise.
2177 * corelow.c (get_core_registers): Likewise.
2178 * cris-tdep.c (cris_store_return_value): Likewise.
2179 (cris_extract_return_value): Likewise.
2180 (find_step_target): Likewise.
2181 (find_step_target): Likewise.
2182 (cris_software_single_step): Likewise.
2183 * ctf.c (ctf_fetch_registers): Likewise.
2184 * darwin-nat.c (cancel_breakpoint): Likewise.
2185 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
2186 * frv-tdep.c (frv_extract_return_value): Likewise.
2187 * ft32-tdep.c (ft32_store_return_value): Likewise.
2188 (ft32_extract_return_value): Likewise.
2189 * go32-nat.c (fetch_register): Likewise.
2190 (go32_fetch_registers): Likewise.
2191 (go32_store_registers): Likewise.
2192 (store_register): Likewise.
2193 * h8300-tdep.c (h8300_extract_return_value): Likewise.
2194 (h8300_store_return_value): Likewise.
2195 * hppa-linux-nat.c (fetch_register): Likewise.
2196 (store_register): Likewise.
2197 (hppa_linux_fetch_inferior_registers): Likewise.
2198 (hppa_linux_store_inferior_registers): Likewise.
2199 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2200 (i386_darwin_store_inferior_registers): Likewise.
2201 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2202 (gnu_store_registers): Likewise.
2203 * i386-linux-nat.c (fetch_register): Likewise.
2204 (store_register): Likewise.
2205 (supply_gregset): Likewise.
2206 (fill_gregset): Likewise.
2207 (i386_linux_fetch_inferior_registers): Likewise.
2208 (i386_linux_store_inferior_registers): Likewise.
2209 (i386_linux_resume): Likewise.
2210 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2211 Likewise.
2212 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2213 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2214 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2215 (i386obsd_collect_uthread): Likewise.
2216 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2217 (i386_supply_gregset): Likewise.
2218 (i386_collect_gregset): Likewise.
2219 (i386_supply_fpregset): Likewise.
2220 (i386_collect_fpregset): Likewise.
2221 (i386_mpx_bd_base): Likewise.
2222 * i386-v4-nat.c (supply_fpregset): Likewise.
2223 (fill_fpregset): Likewise.
2224 * i387-tdep.c (i387_supply_fsave): Likewise.
2225 (i387_collect_fsave): Likewise.
2226 (i387_supply_fxsave): Likewise.
2227 (i387_collect_fxsave): Likewise.
2228 (i387_supply_xsave): Likewise.
2229 (i387_collect_xsave): Likewise.
2230 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2231 (ia64_linux_store_registers): Likewise.
2232 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2233 (ia64_extract_return_value): Likewise.
2234 (ia64_store_return_value): Likewise.
2235 (find_func_descr): Likewise.
2236 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2237 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2238 (inf_ptrace_store_registers): Likewise.
2239 * infrun.c (use_displaced_stepping): Likewise.
2240 (displaced_step_prepare_throw): Likewise.
2241 (resume): Likewise.
2242 (proceed): Likewise.
2243 (do_target_wait): Likewise.
2244 (adjust_pc_after_break): Likewise.
2245 (handle_inferior_event_1): Likewise.
2246 (handle_signal_stop): Likewise.
2247 (save_infcall_suspend_state): Likewise.
2248 (restore_infcall_suspend_state): Likewise.
2249 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2250 * jit.c (jit_frame_prev_register): Likewise.
2251 * linux-nat.c (save_stop_reason): Likewise.
2252 (linux_nat_wait_1): Likewise.
2253 (resume_stopped_resumed_lwps): Likewise.
2254 * linux-record.c (record_linux_sockaddr): Likewise.
2255 (record_linux_msghdr): Likewise.
2256 (record_linux_system_call): Likewise.
2257 * linux-tdep.c (linux_collect_thread_registers): Likewise.
2258 * lm32-tdep.c (lm32_extract_return_value): Likewise.
2259 (lm32_store_return_value): Likewise.
2260 * m32c-tdep.c (m32c_read_flg): Likewise.
2261 (m32c_pseudo_register_read): Likewise.
2262 (m32c_pseudo_register_write): Likewise.
2263 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2264 (m32r_linux_collect_gregset): Likewise.
2265 * m32r-tdep.c (m32r_store_return_value): Likewise.
2266 (m32r_extract_return_value): Likewise.
2267 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2268 (m68kbsd_collect_fpregset): Likewise.
2269 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2270 * m68k-linux-nat.c (fetch_register): Likewise.
2271 (old_fetch_inferior_registers): Likewise.
2272 (old_store_inferior_registers): Likewise.
2273 (store_regs): Likewise.
2274 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2275 (m68k_svr4_store_return_value): Likewise.
2276 * m88k-tdep.c (m88k_store_arguments): Likewise.
2277 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2278 (mi_cmd_data_write_register_values): Likewise.
2279 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2280 (mips_fbsd_store_inferior_registers): Likewise.
2281 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2282 (mips_fbsd_supply_gregs): Likewise.
2283 (mips_fbsd_collect_fpregs): Likewise.
2284 (mips_fbsd_collect_gregs): Likewise.
2285 (mips_fbsd_supply_fpregset): Likewise.
2286 (mips_fbsd_collect_fpregset): Likewise.
2287 (mips_fbsd_supply_gregset): Likewise.
2288 (mips_fbsd_collect_gregset): Likewise.
2289 * mips-linux-nat.c (supply_gregset): Likewise.
2290 (fill_gregset): Likewise.
2291 (supply_fpregset): Likewise.
2292 (fill_fpregset): Likewise.
2293 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2294 (mips_fill_gregset): Likewise.
2295 (mips_supply_fpregset): Likewise.
2296 (mips_fill_fpregset): Likewise.
2297 (mips64_supply_gregset): Likewise.
2298 (micromips_linux_sigframe_validate): Likewise.
2299 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2300 (mipsnbsd_fetch_inferior_registers): Likewise.
2301 (mipsnbsd_store_inferior_registers): Likewise.
2302 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2303 (mipsnbsd_supply_gregset): Likewise.
2304 (mipsnbsd_iterate_over_regset_sections): Likewise.
2305 (mipsnbsd_supply_reg): Likewise.
2306 (mipsnbsd_supply_fpreg): Likewise.
2307 * mips-tdep.c (mips_in_frame_stub): Likewise.
2308 (mips_dummy_id): Likewise.
2309 (is_octeon_bbit_op): Likewise.
2310 (micromips_bc1_pc): Likewise.
2311 (extended_mips16_next_pc): Likewise.
2312 (mips16_next_pc): Likewise.
2313 (deal_with_atomic_sequence): Likewise.
2314 * moxie-tdep.c (moxie_process_readu): Likewise.
2315 * nios2-tdep.c (nios2_get_next_pc): Likewise.
2316 * nto-procfs.c (procfs_store_registers): Likewise.
2317 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2318 (ppcfbsd_store_inferior_registers): Likewise.
2319 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2320 (fetch_altivec_register): Likewise.
2321 (get_spe_registers): Likewise.
2322 (fetch_spe_register): Likewise.
2323 (fetch_altivec_registers): Likewise.
2324 (fetch_all_gp_regs): Likewise.
2325 (fetch_all_fp_regs): Likewise.
2326 (store_vsx_register): Likewise.
2327 (store_altivec_register): Likewise.
2328 (set_spe_registers): Likewise.
2329 (store_spe_register): Likewise.
2330 (store_altivec_registers): Likewise.
2331 (store_all_gp_regs): Likewise.
2332 (store_all_fp_regs): Likewise.
2333 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2334 (ppc_linux_collect_gregset): Likewise.
2335 (ppc_canonicalize_syscall): Likewise.
2336 (ppc_linux_record_signal): Likewise.
2337 (ppu2spu_prev_register): Likewise.
2338 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2339 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2340 (ppcobsd_store_registers): Likewise.
2341 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2342 Likewise.
2343 (ppc_ravenscar_generic_store_registers): Likewise.
2344 * procfs.c (procfs_fetch_registers): Likewise.
2345 (procfs_store_registers): Likewise.
2346 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2347 (ravenscar_store_registers): Likewise.
2348 (ravenscar_prepare_to_store): Likewise.
2349 * record-btrace.c (record_btrace_fetch_registers): Likewise.
2350 * record-full.c (record_full_wait_1): Likewise.
2351 (record_full_registers_change): Likewise.
2352 (record_full_store_registers): Likewise.
2353 (record_full_core_fetch_registers): Likewise.
2354 (record_full_save): Likewise.
2355 (record_full_goto_insn): Likewise.
2356 * regcache.c (regcache_register_size): Likewise.
2357 (get_regcache_arch): Remove.
2358 (regcache_read_pc): Likewise.
2359 * regcache.h (get_regcache_arch): Remove.
2360 * remote-sim.c (gdbsim_fetch_register): Likewise.
2361 (gdbsim_store_register): Likewise.
2362 * remote.c (fetch_register_using_p): Likewise.
2363 (send_g_packet): Likewise.
2364 (remote_prepare_to_store): Likewise.
2365 (store_registers_using_G): Likewise.
2366 * reverse.c (save_bookmark_command): Likewise.
2367 (goto_bookmark_command): Likewise.
2368 * rs6000-aix-tdep.c (branch_dest): Likewise.
2369 * rs6000-nat.c (rs6000_ptrace64): Likewise.
2370 (fetch_register): Likewise.
2371 * rs6000-tdep.c (ppc_supply_reg): Likewise.
2372 (ppc_collect_reg): Likewise.
2373 (ppc_collect_gregset): Likewise.
2374 (ppc_collect_fpregset): Likewise.
2375 (ppc_collect_vsxregset): Likewise.
2376 (ppc_collect_vrregset): Likewise.
2377 (ppc_displaced_step_hw_singlestep): Likewise.
2378 (rs6000_pseudo_register_read): Likewise.
2379 (rs6000_pseudo_register_write): Likewise.
2380 * s390-linux-nat.c (supply_gregset): Likewise.
2381 (fill_gregset): Likewise.
2382 (s390_linux_fetch_inferior_registers): Likewise.
2383 * s390-linux-tdep.c (s390_write_pc): Likewise.
2384 (s390_software_single_step): Likewise.
2385 (s390_all_but_pc_registers_record): Likewise.
2386 (s390_linux_syscall_record): Likewise.
2387 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2388 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2389 (shnbsd_store_inferior_registers): Likewise.
2390 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2391 (sh_extract_return_value_fpu): Likewise.
2392 (sh_store_return_value_nofpu): Likewise.
2393 (sh_corefile_supply_regset): Likewise.
2394 (sh_corefile_collect_regset): Likewise.
2395 * sh64-tdep.c (sh64_extract_return_value): Likewise.
2396 (sh64_store_return_value): Likewise.
2397 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2398 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2399 (sparc_store_inferior_registers): Likewise.
2400 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2401 (sparc_ravenscar_prepare_to_store): Likewise.
2402 * sparc-tdep.c (sparc32_store_arguments): Likewise.
2403 (sparc_analyze_control_transfer): Likewise.
2404 (sparc_step_trap): Likewise.
2405 (sparc_software_single_step): Likewise.
2406 (sparc32_gdbarch_init): Likewise.
2407 (sparc_supply_rwindow): Likewise.
2408 (sparc_collect_rwindow): Likewise.
2409 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2410 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2411 (sparc64nbsd_collect_gregset): Likewise.
2412 (sparc64nbsd_supply_fpregset): Likewise.
2413 (sparc64nbsd_collect_fpregset): Likewise.
2414 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2415 (sparc64_supply_gregset): Likewise.
2416 (sparc64_collect_gregset): Likewise.
2417 (sparc64_supply_fpregset): Likewise.
2418 (sparc64_collect_fpregset): Likewise.
2419 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2420 * spu-tdep.c (spu_unwind_sp): Likewise.
2421 (spu2ppu_prev_register): Likewise.
2422 (spu_memory_remove_breakpoint): Likewise.
2423 * stack.c (return_command): Likewise.
2424 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2425 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2426 * tracefile.c (trace_save_ctf): Likewise.
2427 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2428 (do_windows_store_inferior_registers): Likewise.
2429 (windows_resume): Likewise.
2430 * xtensa-linux-nat.c (fill_gregset): Likewise.
2431 (supply_gregset_reg): Likewise.
2432 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2433 (xtensa_register_read_masked): Likewise.
2434 (xtensa_supply_gregset): Likewise.
2435 (xtensa_extract_return_value): Likewise.
2436 (xtensa_store_return_value): Likewise.
2437
edd079d9
UW
24382017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
2439
2440 * doublest.c (floatformat_from_string): New function.
2441 * doublest.h (floatformat_from_string): Add prototype.
2442
2443 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2444 (OP_FLOAT): ... this.
2445 * expression.h: Do not include "doublest.h".
2446 (union exp_element): Replace doubleconst and decfloatconst by
2447 new element floatconst.
2448 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2449 (ada_evaluate_subexp): Likewise.
2450 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2451 OP_DOUBLE and OP_DECFLOAT.
2452 * expprint.c (print_subexp_standard): Likewise.
2453 (dump_subexp_body_standard): Likewise.
2454 * breakpoint.c (watchpoint_exp_is_const): Likewise.
2455
2456 * parse.c: Include "dfp.h".
2457 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2458 (write_exp_elt_floatcst): New function.
2459 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2460 and OP_DECFLOAT.
2461 (operator_check_standard): Likewise.
2462 (parse_float): Do not accept suffix. Take type as input. Return bool.
2463 Return target format buffer instead of host DOUBLEST.
2464 Use floatformat_from_string and decimal_from_string to parse
2465 either binary or decimal floating-point types.
2466 (parse_c_float): Remove.
2467 * parser-defs.h: Do not include "doublest.h".
2468 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2469 (write_exp_elt_floatcst): Add prototype.
2470 (parse_float): Update prototype.
2471 (parse_c_float): Remove.
2472
2473 * c-exp.y: Do not include "dfp.h".
2474 (typed_val_float): Use byte buffer instead of DOUBLEST.
2475 (typed_val_decfloat): Remove.
2476 (DECFLOAT): Remove.
2477 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2478 (parse_number): Update to new parse_float interface.
2479 Parse suffixes and determine type before calling parse_float.
2480 Handle decimal and binary FP types the same way.
2481
2482 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2483 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2484 (parse_number): Update to new parse_float interface.
2485 Parse suffixes and determine type before calling parse_float.
2486
2487 * f-exp.y: Replace dval by typed_val_float.
2488 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2489 (parse_number): Use parse_float instead of atof.
2490
2491 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2492 (parse_go_float): Remove.
2493 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2494 (parse_number): Call parse_float instead of parse_go_float.
2495 Parse suffixes and determine type before calling parse_float.
2496
2497 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2498 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2499 (parse_number): Update to new parse_float interface.
2500 Parse suffixes and determine type before calling parse_float.
2501
2502 * m2-exp.y: Replace dval by byte buffer val.
2503 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2504 (parse_number): Call parse_float instead of atof.
2505
2506 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2507 (lex_number): Call parse_float instead of strtod.
2508 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2509 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2510 Use write_exp_elt_floatcst.
2511 (unit_testing): Remove static variable.
2512 (rust_type): Do not check unit_testing.
2513 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
2514
2515 * ada-exp.y (type_float, type_double): Remove.
2516 (typed_val_float): Use byte buffer instead of DOUBLEST.
2517 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2518 * ada-lex.l (processReal): Use parse_float instead of sscanf.
2519
cc628f3d
AH
25202017-10-25 Alan Hayward <alan.hayward@arm.com>
2521
2522 * aarch64-tdep.h (enum aarch64_regnum): Remove.
2523 * arch/aarch64.h: New file.
2524
09a7c6aa
UW
25252017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2526
2527 * dfp.h (decimal_from_string): Use const reference for argument.
2528 * dfp.c (decimal_from_string): Likewise.
2529
8ba0dd51
UW
25302017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2531
2532 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2533 * sh64-tdep.c (sh64_do_fp_register): Likewise.
2534 * mips-tdep.c (mips_print_fp_register): Likewise.
2535
16e812b2
UW
25362017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2537
2538 * common/format.h (enum argclass): Replace decfloat_arg by
2539 dec32float_arg, dec64float_arg, and dec128float_arg.
2540 * common/format.c (parse_format_string): Update to return
2541 new decimal float argument classes.
2542
2543 * printcmd.c (printf_decfloat): Rename to ...
2544 (printf_floating): ... this. Add argclass argument, and use it
2545 instead of parsing the format string again. Add support for
2546 binary floating-point values, using floatformat_to_string.
2547 Convert value to the target format if it doesn't already match.
2548 (ui_printf): Call printf_floating instead of printf_decfloat,
2549 also for double_arg / long_double_arg. Pass argclass.
2550
2551 * dfp.c (decimal_to_string): Add format string argument.
2552 * dfp.h (decimal_to_string): Likewise.
2553
2554 * doublest.c (floatformat_to_string): Add format string argument.
2555 * doublest.h (floatformat_to_string): Likewise.
2556
fdf0cbc2
UW
25572017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2558
2559 * doublest.c (floatformat_precision): New routine.
2560 (floatformat_to_string): Likewise.
2561 * doublest.c (floatformat_to_string): Add prototype.
2562
2563 * printcmd.c (print_scalar_formatted): Only call print_floating
2564 on floating-point types.
2565 * valprint.c: Do not include "floatformat.h".
2566 (generic_val_print_decfloat): Remove.
2567 (generic_val_print): Call generic_val_print_float for both
2568 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2569 (print_floating): Use floatformat_to_string. Handle decimal float.
2570 (print_decimal_floating): Remove, merge into floatformat_to_string.
2571 * value.h (print_decimal_floating): Remove.
2572
2573 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2574
5033013f
UW
25752017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
2576
2577 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2578
a664f67e
SM
25792017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2580
2581 * memattr.h: Don't include vec.h.
2582 (struct mem_attrib): Initialize fields.
2583 <unknown>: New static method.
2584 (struct mem_region): Add constructors, operator<, initialize
2585 fields.
2586 * memattr.c: Include algorithm.
2587 (default_mem_attrib, unknown_mem_attrib): Remove.
2588 (user_mem_region_list): New global.
2589 (target_mem_region_list, mem_region_list): Change type to
2590 std::vector<mem_region>.
2591 (mem_use_target): Now a function.
2592 (target_mem_regions_valid): Change type to bool.
2593 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2594 (require_user_regions): Adjust.
2595 (require_target_regions): Adjust.
2596 (create_mem_region): Adjust.
2597 (lookup_mem_region): Adjust.
2598 (invalidate_target_mem_regions): Adjust.
2599 (mem_clear): Rename to...
2600 (user_mem_clear): ... this, and adjust.
2601 (mem_command): Adjust.
2602 (info_mem_command): Adjust.
2603 (mem_enable, enable_mem_command, mem_disable,
2604 disable_mem_command): Adjust.
2605 (mem_delete): Adjust.
2606 (delete_mem_command): Adjust.
2607 * memory-map.h (parse_memory_map): Return an std::vector.
2608 * memory-map.c (parse_memory_map): Likewise.
2609 (struct memory_map_parsing_data): Add constructor.
2610 <memory_map>: Point to std::vector.
2611 (memory_map_start_memory): Adjust.
2612 (memory_map_end_memory): Adjust.
2613 (memory_map_end_property): Adjust.
2614 (clear_result): Remove.
2615 * remote.c (remote_memory_map): Return an std::vector.
2616 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2617 Remove.
2618 (target_debug_print_mem_region_vector): New.
2619 * target-delegates.c: Regenerate.
2620 * target.h (mem_region_vector): New typedef.
2621 (to_memory_map): Return mem_region_vector.
2622 (target_memory_map): Return an std::vector.
2623 * target.c (target_memory_map): Return an std::vector.
2624 (flash_erase_command): Adjust.
2625
6e17c565
SM
26262017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2627
2628 * memory-map.c (struct memory_map_parsing_data) <property_name>:
2629 Change type to std::string.
2630 (memory_map_start_property): Adjust.
2631 (memory_map_end_property): Adjust.
2632
cfba9872
SM
26332017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2634
2635 * infrun.h: Include common/byte-vector.h.
2636 (struct displaced_step_closure): New struct.
2637 (struct buf_displaced_step_closure): New struct.
2638 * infrun.c (displaced_step_closure::~displaced_step_closure):
2639 Provide default implementation.
2640 (displaced_step_clear): Deallocate step closure with delete.
2641 * aarch64-tdep.c (displaced_step_closure): Rename to ...
2642 (aarch64_displaced_step_closure): ... this, extend
2643 displaced_step_closure.
2644 (aarch64_displaced_step_data) <dsc>: Change type to
2645 aarch64_displaced_step_closure.
2646 (aarch64_displaced_step_copy_insn): Adjust to type change, use
2647 unique_ptr.
2648 (aarch64_displaced_step_fixup): Add cast for displaced step
2649 closure.
2650 * amd64-tdep.c (displaced_step_closure): Rename to ...
2651 (amd64_displaced_step_closure): ... this, extend
2652 displaced_step_closure.
2653 <insn_buf>: Change type to std::vector<gdb_byte>.
2654 <max_len>: Remove.
2655 (fixup_riprel): Change type of DSC parameter, adjust to type
2656 change of insn_buf.
2657 (fixup_displaced_copy): Change type of DSC parameter.
2658 (amd64_displaced_step_copy_insn): Instantiate
2659 amd64_displaced_step_closure.
2660 (amd64_displaced_step_fixup): Add cast for closure type, adjust
2661 to type change of insn_buf.
2662 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2663 parameter DSC.
2664 (arm_linux_copy_svc): Likewise.
2665 (cleanup_kernel_helper_return): Likewise.
2666 (arm_catch_kernel_helper_return): Likewise.
2667 (arm_linux_displaced_step_copy_insn): Instantiate
2668 arm_displaced_step_closure.
2669 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2670 (displaced_read_reg): Change type of parameter DSC.
2671 (branch_write_pc): Likewise.
2672 (load_write_pc): Likewise.
2673 (alu_write_pc): Likewise.
2674 (displaced_write_reg): Likewise.
2675 (arm_copy_unmodified): Likewise.
2676 (thumb_copy_unmodified_32bit): Likewise.
2677 (thumb_copy_unmodified_16bit): Likewise.
2678 (cleanup_preload): Likewise.
2679 (install_preload): Likewise.
2680 (arm_copy_preload): Likewise.
2681 (thumb2_copy_preload): Likewise.
2682 (install_preload_reg): Likewise.
2683 (arm_copy_preload_reg): Likewise.
2684 (cleanup_copro_load_store): Likewise.
2685 (install_copro_load_store): Likewise.
2686 (arm_copy_copro_load_store) Likewise.
2687 (thumb2_copy_copro_load_store): Likewise.
2688 (cleanup_branch): Likewise.
2689 (install_b_bl_blx): Likewise.
2690 (arm_copy_b_bl_blx): Likewise.
2691 (thumb2_copy_b_bl_blx): Likewise.
2692 (thumb_copy_b): Likewise.
2693 (install_bx_blx_reg): Likewise.
2694 (arm_copy_bx_blx_reg): Likewise.
2695 (thumb_copy_bx_blx_reg): Likewise.
2696 (cleanup_alu_imm): Likewise.
2697 (arm_copy_alu_imm): Likewise.
2698 (thumb2_copy_alu_imm): Likewise.
2699 (cleanup_alu_reg): Likewise.
2700 (install_alu_reg): Likewise.
2701 (arm_copy_alu_reg): Likewise.
2702 (thumb_copy_alu_reg): Likewise.
2703 (cleanup_alu_shifted_reg): Likewise.
2704 (install_alu_shifted_reg): Likewise.
2705 (arm_copy_alu_shifted_reg): Likewise.
2706 (cleanup_load): Likewise.
2707 (cleanup_store): Likewise.
2708 (arm_copy_extra_ld_st): Likewise.
2709 (install_load_store): Likewise.
2710 (thumb2_copy_load_literal): Likewise.
2711 (thumb2_copy_load_reg_imm): Likewise.
2712 (arm_copy_ldr_str_ldrb_strb): Likewise.
2713 (cleanup_block_load_all): Likewise.
2714 (cleanup_block_store_pc): Likewise.
2715 (cleanup_block_load_pc): Likewise.
2716 (arm_copy_block_xfer): Likewise.
2717 (thumb2_copy_block_xfer): Likewise.
2718 (cleanup_svc): Likewise.
2719 (install_svc): Likewise.
2720 (arm_copy_svc): Likewise.
2721 (thumb_copy_svc): Likewise.
2722 (arm_copy_undef): Likewise.
2723 (thumb_32bit_copy_undef): Likewise.
2724 (arm_copy_unpred): Likewise.
2725 (arm_decode_misc_memhint_neon): Likewise.
2726 (arm_decode_unconditional): Likewise.
2727 (arm_decode_miscellaneous): Likewise.
2728 (arm_decode_dp_misc): Likewise.
2729 (arm_decode_ld_st_word_ubyte): Likewise.
2730 (arm_decode_media): Likewise.
2731 (arm_decode_b_bl_ldmstm): Likewise.
2732 (arm_decode_ext_reg_ld_st): Likewise.
2733 (thumb2_decode_dp_shift_reg): Likewise.
2734 (thumb2_decode_ext_reg_ld_st): Likewise.
2735 (arm_decode_svc_copro): Likewise.
2736 (thumb2_decode_svc_copro): Likewise.
2737 (install_pc_relative): Likewise.
2738 (thumb_copy_pc_relative_16bit): Likewise.
2739 (thumb_decode_pc_relative_16bit): Likewise.
2740 (thumb_copy_pc_relative_32bit): Likewise.
2741 (thumb_copy_16bit_ldr_literal): Likewise.
2742 (thumb_copy_cbnz_cbz): Likewise.
2743 (thumb2_copy_table_branch): Likewise.
2744 (cleanup_pop_pc_16bit_all): Likewise.
2745 (thumb_copy_pop_pc_16bit): Likewise.
2746 (thumb_process_displaced_16bit_insn): Likewise.
2747 (decode_thumb_32bit_ld_mem_hints): Likewise.
2748 (thumb_process_displaced_32bit_insn): Likewise.
2749 (thumb_process_displaced_insn): Likewise.
2750 (arm_process_displaced_insn): Likewise.
2751 (arm_displaced_init_closure): Likewise.
2752 (arm_displaced_step_fixup): Add cast for closure.
2753 * arm-tdep.h: Include infrun.h.
2754 (displaced_step_closure): Rename to ...
2755 (arm_displaced_step_closure): ... this, extend
2756 displaced_step_closure.
2757 <u::svc::copy_svc_os>: Change type of parameter DSC.
2758 <cleanup>: Likewise.
2759 (arm_process_displaced_insn): Likewise.
2760 (arm_displaced_init_closure): Likewise.
2761 (displaced_read_reg): Likewise.
2762 (displaced_write_reg): Likewise.
2763 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2764 Adjust.
2765 * i386-tdep.h: Include infrun.h.
2766 (i386_displaced_step_closure): New typedef.
2767 * i386-tdep.c (i386_displaced_step_copy_insn): Use
2768 i386_displaced_step_closure.
2769 (i386_displaced_step_fixup): Adjust.
2770 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2771 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2772 and unique_ptr.
2773 (ppc_displaced_step_fixup): Adjust.
2774 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2775 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2776 and unique_ptr.
2777 (s390_displaced_step_fixup): Adjust.
2778
b392b304
SM
27792017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
2780
2781 * interps.h (interp_resume, interp_suspend, interp_set_temp):
2782 Remove declarations.
2783
d5833c62
TT
27842017-10-20 Tom Tromey <tom@tromey.com>
2785
2786 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2787 std::vector.
2788 (gdb_bfd_record_inclusion): Update.
2789 (bfdp): Remove typedef.
2790
06d5bbc8
TT
27912017-10-20 Tom Tromey <tom@tromey.com>
2792
2793 * gdb_bfd.c (gdb_bfd_ref): Use new.
2794 (struct gdb_bfd_data): Add constructor, destructor, and member
2795 initializers.
2796 (gdb_bfd_unref): Use delete.
2797
2712ce2e
TT
27982017-10-20 Tom Tromey <tom@tromey.com>
2799
2800 * exec.c (exec_file_attach): Use new_bfd_ref.
2801 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2802 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2803 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2804 new_bfd_ref.
2805 * gdb_bfd.h (new_bfd_ref): New function.
2806
fcc8fb2f
PA
28072017-10-20 Pedro Alves <palves@redhat.com>
2808
2809 * main.c (captured_command_loop): Add attribute noinline.
2810
4c2287b0
SM
28112017-10-19 Simon Marchi <simon.marchi@ericsson.com>
2812
2813 * interps.c (struct interp_factory): Add constructor.
2814 (interp_factory_p): Remove typedef.
2815 (DEF_VEC_P(interp_factory_p)): Remove.
2816 (interpreter_factories): Change type to std::vector.
2817 (interp_factory_register): Adjust.
2818 (interp_lookup): Adjust.
2819 (interpreter_completer): Adjust.
2820
3d415c26
TT
28212017-10-19 Tom Tromey <tom@tromey.com>
2822
2823 * break-catch-syscall.c (catch_syscall_completer): Use
2824 std::string, gdb::unique_xmalloc_ptr.
2825
395423c4
TT
28262017-10-19 Tom Tromey <tom@tromey.com>
2827
2828 * infcall.c (call_function_by_hand_dummy): Use std::string.
2829
54f70bc1
TT
28302017-10-19 Tom Tromey <tom@tromey.com>
2831
2832 * mi/mi-main.c (mi_cmd_execute): Update.
2833 * top.h (prepare_execute_command): Return scoped_value_mark.
2834 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2835 Add move constructor.
2836 * top.c (prepare_execute_command): Return scoped_value_mark.
2837 (execute_command): Update.
2838
63929e84
PA
28392017-10-19 Pedro Alves <palves@redhat.com>
2840
2841 * xml-support.c (xml_fetch_content_from_file): Check fread's
2842 return.
2843
a75868f5
PA
28442017-10-19 Pedro Alves <palves@redhat.com>
2845
2846 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2847 async.
2848 (handle_error_fd): New function.
2849 (ser_base_async): Add/delete an event loop file handler for
2850 error_fd.
2851
2edf834e
PA
28522017-10-19 Pedro Alves <palves@redhat.com>
2853
2854 * xml-support.c (xml_fetch_content_from_file): Don't read in
2855 chunks. Instead use fseek to determine the file's size, and read
2856 it in one go.
2857
c8ba13ad
KS
28582017-11-18 Keith Seitz <keiths@redhat.com>
2859
2860 * c-exp.y (oper): Canonicalize conversion operators of user-defined
2861 types.
2862 Add whitespace to front of type name.
2863
37534686
KS
28642017-10-18 Keith Seitz <keiths@redhat.com>
2865
2866 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2867 DW_AT_accessibility.
2868
28c7c158
YQ
28692017-10-18 Yao Qi <yao.qi@linaro.org>
2870
2871 * features/tic6x-c62x-linux.c: Remove.
2872
30f0b101
TT
28732017-10-17 Tom Tromey <tom@tromey.com>
2874
2875 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2876 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2877 (do_mixed_source_and_assembly): Likewise.
2878
57e12da9
TT
28792017-10-17 Tom Tromey <tom@tromey.com>
2880
2881 * regcache.c (regcache::xfer_part): Remove assertion.
2882
7b700999
PA
28832017-10-17 Pedro Alves <palves@redhat.com>
2884
2885 * xml-support.c (xml_fetch_content_from_file): Call
2886 unique_ptr::release() instead unique_ptr::get() when passing
2887 through xrealloc.
2888
d3037ba6
YQ
28892017-10-17 Yao Qi <yao.qi@linaro.org>
2890
2891 * regcache.c (regcache::xfer_part): Remove parameters read and
2892 write, add parameter is_raw. All callers are updated.
2893
83d5a34d
KS
28942017-10-16 Keith Seitz <keiths@redhat.com>
2895
2896 * c-typeprint.c (enum access_specifier): Moved here from
2897 c_type_print_base.
2898 (output_access_specifier): New function.
2899 (c_type_print_base): Consider typedefs when assessing
2900 whether access labels are needed.
2901 Use output_access_specifier as needed.
2902 Output access specifier for typedefs, if needed.
2903 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2904 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2905 fields.
2906 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2907 accessor macros.
2908
87028b87
TT
29092017-10-16 Tom Tromey <tom@tromey.com>
2910
2911 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2912 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2913 * target.c (target_fileio_read_stralloc): Update.
2914 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2915 * target.h (target_fileio_read_stralloc): Return
2916 unique_xmalloc_ptr.
2917
b7b030ad
TT
29182017-10-16 Tom Tromey <tom@tromey.com>
2919
2920 * xml-syscall.c (xml_init_syscalls_info): Update.
2921 * xml-support.c (xinclude_start_include): Update.
2922 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2923 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2924 (xml_fetch_content_from_file): Likewise.
2925 * osdata.c (get_osdata): Update.
2926 * target.h (target_read_stralloc, target_get_osdata): Return
2927 unique_xmalloc_ptr.
2928 * solib-aix.c (solib_aix_get_library_list): Update.
2929 * solib-target.c (solib_target_current_sos): Update.
2930 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2931 * xml-tdesc.c (fetch_available_features_from_target): Update.
2932 (target_fetch_description_xml): Update.
2933 (file_read_description_xml): Update.
2934 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2935 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2936 (remote_pid_to_exec_file): Update.
2937 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2938 (target_get_osdata): Likewise.
2939
b80406ac
TT
29402017-10-16 Tom Tromey <tom@tromey.com>
2941
2942 * remote.c (remote_register_number_and_offset): Use std::vector.
2943 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2944 (putpkt_binary): Use gdb::def_vector.
2945 (compare_sections_command): Use gdb::byte_vector.
2946
a90ecff8
TT
29472017-10-16 Tom Tromey <tom@tromey.com>
2948
2949 * ppc-linux-nat.c (hwdebug_insert_point): Use
2950 gdb::unique_xmalloc_ptr, XDUP.
2951
2dc0e219
TT
29522017-10-16 Tom Tromey <tom@tromey.com>
2953
2954 * probe.c (parse_probes): Use std::string.
2955 (info_probes_for_ops, enable_probes_command)
2956 (disable_probes_command): Remove cleanups.
2957
b05628f0
TT
29582017-10-16 Tom Tromey <tom@tromey.com>
2959
2960 * buildsym.c (block_compar): Remove.
2961 (end_symtab_get_static_block): Use std::vector.
2962
a79b1bc6
SM
29632017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2964
2965 * memrange.h (struct mem_range): Define operator< and operator==.
2966 (mem_range_s): Remove.
2967 (DEF_VEC_O (mem_range_s)): Remove.
2968 (normalize_mem_ranges): Change parameter type to std::vector.
2969 * memrange.c (compare_mem_ranges): Remove.
2970 (normalize_mem_ranges): Change parameter type to std::vector,
2971 adjust to vector change.
2972 * exec.c (section_table_available_memory): Return vector, remove
2973 parameter.
2974 (section_table_read_available_memory): Adjust to std::vector
2975 change.
2976 * remote.c (remote_read_bytes): Adjust to std::vector
2977 change.
2978 * tracepoint.h (traceframe_available_memory): Change parameter
2979 type to std::vector.
2980 * tracepoint.c (traceframe_available_memory): Change parameter
2981 type to std::vector, adjust.
2982 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2983 std::vector change.
2984 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2985 unittests/memrange-selftests.c.
2986 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2987 * gdb/unittests/memrange-selftests.c: New file.
2988
63f0e930
PA
29892017-10-16 Pedro Alves <palves@redhat.com>
2990
2991 * elfread.c (probe_key_free): Rename range-for variable.
2992 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2993 (find_probe_by_pc, collect_probes): Rename range-for variable.
2994
c40c7bfc
YQ
29952017-10-16 Yao Qi <yao.qi@linaro.org>
2996
2997 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2998 * features/tic6x-c62x.c: Remove.
2999 * features/tic6x-c64x-linux.c: Remove.
3000 * features/tic6x-c64x.c: Remove.
3001 * features/tic6x-c64xp-linux.c: Remove.
3002 * features/tic6x-c64xp.c: Remove.
3003 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3004 initialize_tdesc_tic6x_*_linux functions.
3005 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3006 initialize_tdesc_tic6x_* functions.
3007
df27ae6a
YQ
30082017-10-16 Yao Qi <yao.qi@linaro.org>
3009
3010 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3011 tic6x-c62x.
3012 * regformats/tic6x-c62x.dat: Remove.
3013 * regformats/tic6x-c64x.dat: Remove.
3014 * regformats/tic6x-c64xp.dat: Remove.
3015
86766165
SM
30162017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3017
3018 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3019 (the !HAVE_LIBEXPAT version).
3020
824dfcc3
SM
30212017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3022
3023 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3024 const.
3025
2098b393
SM
30262017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3027
3028 * target.h: Include tracepoint.h.
3029 (enum trace_find_type): Move to tracepoint.h.
3030 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3031 * tracepoint.h: Don't include target.h
3032 (enum trace_find_type): Move from target.h.
3033 (parse_traceframe_info): Return a unique ptr.
3034 * tracepoint.c (current_traceframe_info): Change type to unique
3035 ptr.
3036 (free_traceframe_info): Remove.
3037 (clear_traceframe_info): Don't manually free
3038 current_traceframe_info.
3039 (free_result): Remove.
3040 (parse_traceframe_info): Return a unique ptr.
3041 (get_traceframe_info): Adjust to unique ptr.
3042 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3043 * remote.c (remote_traceframe_info): Return a unique ptr.
3044 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3045 ptr.
3046 * target-debug.h (target_debug_print_traceframe_info_up): New
3047 macro.
3048 * target-delegates.c: Regenerate.
3049
4cdd21a8
SM
30502017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3051
3052 * memrange.h (struct mem_range): Add constructors.
3053 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3054 std::vector<mem_range>.
3055 * tracepoint.c (free_traceframe_info): Don't manually free
3056 vector.
3057 (traceframe_info_start_memory): Adjust to vector change.
3058 (traceframe_available_memory): Likewise.
3059 * tracefile-tfile.c (build_traceframe_info): Likewise.
3060 * ctf.c (ctf_traceframe_info): Likewise.
3061
d0d292a2
SM
30622017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3063
3064 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3065 std::vector<int>.
3066 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3067 (traceframe_info_start_tvar): Adjust to vector change.
3068 (parse_traceframe_info): Allocate with new.
3069 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3070 vector change.
3071 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3072 change.
3073 tfile_traceframe_info): Allocate with new.
3074 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3075 change.
3076
8d3c73ef
SM
30772017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3078
3079 * tracepoint.c (traceframe_info): Rename to...
3080 (current_traceframe_info): ...this.
3081 (clear_traceframe_info): Adjust.
3082 (get_traceframe_info): Adjust.
3083
b129dcac
SM
30842017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3085
3086 * nat/linux-osdata.c: Include algorithm.
3087 (compare_processes): Remove.
3088 (struct pid_pgid_entry): New struct.
3089 (linux_xfer_osdata_processgroups): Use std::vector instead of
3090 XNEWVEC.
3091
af5bf4ad
SM
30922017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3093
3094 * objfiles.h: Don't include symfile.h.
3095 (struct partial_symbol): Remove forward-declaration.
3096 (struct objfile) <global_psymbols, static_psymbols>: Change type
3097 to std::vector<partial_symbol *>.
3098 * objfiles.c (objfile::objfile): Don't memset those fields.
3099 (objfile::~objfile): Don't free those fields.
3100 * psympriv.h (struct psymbol_allocation_list): Remove
3101 forward-declaration.
3102 (add_psymbol_to_list): Change psymbol_allocation_list parameter
3103 to std::vector.
3104 (start_psymtab_common): Change parameters to std::vector.
3105 * psymtab.c: Include algorithm.
3106 (require_partial_symbols): Call shrink_to_fit.
3107 (find_pc_sect_psymbol): Adjust to vector change.
3108 (match_partial_symbol): Likewise.
3109 (lookup_partial_symbol): Likewise.
3110 (psym_relocate): Likewise.
3111 (dump_psymtab): Likewise.
3112 (recursively_search_psymtabs): Likewise.
3113 (compare_psymbols): Remove.
3114 (sort_pst_symbols): Adjust to vector change.
3115 (start_psymtab_common): Likewise.
3116 (end_psymtab_common): Likewise.
3117 (psymbol_bcache_full): De-constify return value.
3118 (add_psymbol_to_bcache): Likewise.
3119 (extend_psymbol_list): Remove.
3120 (append_psymbol_to_list): Adjust to vector change.
3121 (add_psymbol_to_list): Likewise.
3122 (init_psymbol_list): Likewise.
3123 (maintenance_info_psymtabs): Likewise.
3124 (maintenance_check_psymtabs): Likewise.
3125 * symfile.h (struct psymbol_allocation_list): Remove.
3126 * symfile.c (reread_symbols): Adjust to vector change.
3127 * dbxread.c (start_psymtab): Change type of parameters.
3128 (dbx_symfile_read): Adjust to vector change.
3129 (read_dbx_symtab): Likewise.
3130 (start_psymtab): Change type of parameters.
3131 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
3132 (create_partial_symtab): Likewise.
3133 (add_partial_symbol): Likewise.
3134 (write_one_signatured_type): Likewise.
3135 (recursively_write_psymbols): Likewise.
3136 * mdebugread.c (parse_partial_symbols): Likewise.
3137 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
3138 (scan_xcoff_symtab): Adjust to vector change.
3139 (xcoff_initial_scan): Likewise.
3140
3ec5942f
SM
31412017-10-13 Simon Marchi <simon.marchi@ericsson.com>
3142
3143 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
3144
2399fe6a
YQ
31452017-10-13 Yao Qi <yao.qi@linaro.org>
3146
3147 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
3148 Remove s390x-*-expedite, add s390x-expedite.
3149
4bf3f4a8
YQ
31502017-10-13 Yao Qi <yao.qi@linaro.org>
3151
3152 * features/s390-gs-linux64.c: Regenerated.
3153 * features/s390x-gs-linux64.c: Regenerated.
3154
9e86da07
TT
31552017-10-13 Tom Tromey <tom@tromey.com>
3156
3157 * compile/compile-object-run.c (do_module_cleanup): Use delete.
3158 * solib.c (update_solib_list, reload_shared_libraries_1): Use
3159 delete.
3160 * symfile.c (symbol_file_add_with_addrs): Use new.
3161 (symbol_file_add_separate): Update comment.
3162 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
3163 * jit.c (jit_object_close_impl): Use new.
3164 (jit_unregister_code): Use delete.
3165 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
3166 (~objfile): Rename from free_objfile.
3167 (free_objfile_separate_debug, do_free_objfile_cleanup)
3168 (free_all_objfiles, objfile_purge_solibs): Use delete.
3169 * objfiles.h (struct objfile): Add constructor and destructor.
3170 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
3171 (allocate_objfile, free_objfile): Don't declare.
3172 (struct objstats): Add initializers.
3173
c2508e90
SM
31742017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3175
3176 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
3177 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
3178 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
3179 * gdbarch.h: Regenerate.
3180 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3181 Adjust comment.
3182 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
3183 (i386_displaced_step_fixup): Adjust comment.
3184 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
3185
a900ff72
TT
31862017-10-12 Tom Tromey <tom@tromey.com>
3187
3188 * prologue-value.h (pv_area::store_would_trash): Return bool.
3189 (pv_area::find_reg): Likewise.
3190 * prologue-value.c (pv_area::store_would_trash): Return bool.
3191 (pv_area::find_reg): Likewise.
3192
f7b7ed97
TT
31932017-10-12 Tom Tromey <tom@tromey.com>
3194
3195 * s390-linux-tdep.c (s390_store, s390_load)
3196 (s390_check_for_saved, s390_analyze_prologue): Update.
3197 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
3198 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3199 * prologue-value.h (class pv_area): Move from prologue-value.c.
3200 Change names of members. Add constructor, destructor, member
3201 functions.
3202 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3203 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3204 (pv_area_fetch, pv_area_scan): Don't declare.
3205 * prologue-value.c (struct pv_area::area_entry): Now member of
3206 pv_area.
3207 (struct pv_area): Move to prologue-value.h.
3208 (pv_area::pv_area): Rename from make_pv_area.
3209 (pv_area::~pv_area): Rename from free_pv_area.
3210 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3211 (clear_entries, find_entry, overlaps, store_would_trash, store)
3212 (fetch, find_reg, scan): Now member of pv_area.
3213 Remove "area" argument. Update.
3214 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3215 Update.
3216 * mn10300-tdep.c (push_reg, check_for_saved)
3217 (mn10300_analyze_prologue): Update.
3218 * mep-tdep.c (is_arg_spill, check_for_saved)
3219 (mep_analyze_prologue): Update.
3220 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3221 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3222 (m32c_is_struct_return, m32c_analyze_prologue): Update.
3223 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3224 Update.
3225 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3226 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3227
466eecee
SM
32282017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3229
3230 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3231 * linux-nat.c (linux_nat_delete_thread): New variable.
3232 (lwp_free): Invoke linux_nat_delete_thread if set.
3233 (linux_nat_set_delete_thread): New function.
3234 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3235 thread delete callback.
3236 * arm-linux-nat.c (arm_linux_delete_thread): New function.
3237 (_initialize_arm_linux_nat): Assign thread delete callback.
3238 * s390-linux-nat.c (s390_delete_thread): New function.
3239 (_initialize_s390_nat): Assign thread delete callback.
3240 * x86-linux-nat.c (x86_linux_add_target): Likewise.
3241 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3242 function.
3243 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3244 declaration.
3245 * nat/x86-linux.c (x86_linux_delete_thread): New function.
3246 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3247
f71c8822
TT
32482017-10-09 Tom Tromey <tom@tromey.com>
3249
3250 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3251 std::string.
3252 * tui/tui-layout.c (enum tui_status): Use std::string.
3253
981a3fb3
TT
32542017-10-11 Tom Tromey <tom@tromey.com>
3255
3256 * gdbthread.h (thread_command): Constify.
3257 * inferior.h (detach_command): Constify.
3258 * top.h (set_history, show_history): Constify.
3259 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3260 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3261 * bsd-kvm.c (bsd_kvm_cmd): Constify.
3262 * printcmd.c (set_command): Constify.
3263 (non_const_set_command): New function.
3264 * dcache.c (set_dcache_command, show_dcache_command): Constify.
3265 * breakpoint.c (enable_command, disable_command, delete_command)
3266 (catch_command, tcatch_command, set_breakpoint_cmd)
3267 (show_breakpoint_cmd): Constify.
3268 * macrocmd.c (macro_command): Constify.
3269 * infcmd.c (unset_command, kill_command, detach_command)
3270 (info_proc_cmd): Constify.
3271 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3272 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3273 (info_auto_load_cmd): Constify.
3274 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3275 (unset_tdesc_cmd): Constify.
3276 * ada-lang.c (set_ada_command, show_ada_command)
3277 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3278 * guile/guile.c (set_guile_command, show_guile_command)
3279 (info_guile_command): Constify.
3280 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3281 Constify.
3282 * skip.c (skip_command): Constify.
3283 * compile/compile.c (_initialize_compile): Constify.
3284 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3285 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3286 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3287 (maint_btrace_pt_show_cmd): Constify.
3288 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3289 Constify.
3290 * python/python.c (user_show_python, user_set_python): Constify.
3291 * mips-tdep.c (set_mips_command, show_mips_command)
3292 (set_mipsfpu_command): Constify.
3293 * record-btrace.c (cmd_record_btrace_start)
3294 (cmd_set_record_btrace, cmd_show_record_btrace)
3295 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3296 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3297 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3298 Constify.
3299 * symfile.c (overlay_command): Constify.
3300 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3301 * cli/cli-logging.c (set_logging_command, show_logging_command):
3302 Constify.
3303 * cli/cli-dump.c (dump_command, append_command)
3304 (srec_dump_command, ihex_dump_command, verilog_dump_command)
3305 (tekhex_dump_command, binary_dump_command)
3306 (binary_append_command): Constify.
3307 * cli/cli-decode.c (struct cmd_list_element): Change type of
3308 "fun".
3309 * cli/cli-cmds.c (info_command, show_command, set_debug)
3310 (show_debug): Constify.
3311 (show_command): Add non-const overload.
3312 * top.c (set_history, show_history): Constify.
3313 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3314 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3315 * target.c (target_command): Constify.
3316 * sparc64-tdep.c (info_adi_command): Constify.
3317 * record-full.c (cmd_record_full_start): Constify.
3318 (set_record_full_command): Constify. Fix typo.
3319 (show_record_full_command): Constify.
3320 * thread.c (thread_command, thread_apply_command): Constify.
3321 * memattr.c (dummy_cmd): Constify.
3322 * value.c (function_command): Constify.
3323 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3324 * probe.c (info_probes_command): Constify.
3325 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3326 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3327 (show_thread_cmd, set_thread_default_cmd)
3328 (show_thread_default_cmd): Constify.
3329 (check_empty): Constify.
3330 * tracepoint.c (tfind_command): Constify.
3331 * cp-support.c (maint_cplus_command): Constify.
3332 * windows-tdep.c (info_w32_command): Constify.
3333 * record.c (cmd_record_start, set_record_command)
3334 (show_record_command, info_record_command, cmd_record_goto):
3335 Constify.
3336 * ravenscar-thread.c (set_ravenscar_command)
3337 (show_ravenscar_command): Constify.
3338 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3339 Constify.
3340 (add_internal_problem_command): Remove casts.
3341 * arc-tdep.c (maintenance_print_arc_command): Constify.
3342 * valprint.c (set_print, show_print, set_print_raw)
3343 (show_print_raw): Constify.
3344 * maint.c (maintenance_command, maintenance_info_command)
3345 (maintenance_print_command, maintenance_set_cmd)
3346 (maintenance_show_cmd, set_per_command_cmd)
3347 (show_per_command_cmd, maintenance_check_command): Constify.
3348 * language.c (set_check, show_check): Constify.
3349 * typeprint.c (show_print_type, set_print_type): Constify.
3350 * go32-nat.c (go32_info_dos_command): Constify.
3351
fdf44873
TT
33522017-10-11 Tom Tromey <tom@tromey.com>
3353
3354 * breakpoint.c (prepare_re_set_context): Remove.
3355 (breakpoint_re_set_one): Update. Don't use cleanups.
3356 (breakpoint_re_set): Use scoped_restore, std::string, and
3357 scoped_restore_current_language.
3358
81b1e71c
TT
33592017-10-11 Tom Tromey <tom@tromey.com>
3360
3361 * breakpoint.c (commands_command_1): Use std::string.
3362 (cleanup_executing_breakpoints): Remove.
3363 (bpstat_do_actions_1): Use scoped_restore.
3364 (bpstat_check_watchpoint): Use std::string.
3365 (decode_static_tracepoint_spec): Likewise.
3366 (break_range_command): Likewise.
3367 (watch_command_1): Likewise.
3368 (compare_breakpoints): Change argument types.
3369 (clear_command): Use std::vector.
3370 (cleanup_executing_breakpoints): Remove.
3371 (update_global_location_list): Use unique_xmalloc_ptr.
3372 (strace_command): Remove unused declaration.
3373
4f9d9906
JB
33742017-10-11 John Baldwin <jhb@FreeBSD.org>
3375
3376 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3377 * NEWS: Mention new FreeBSD/arm native configuration.
3378 * configure.host: Add arm*-*-freebsd*.
3379 * configure.nat: Likewise.
3380 * arm-fbsd-nat.c: New file.
3381
7176dfd2
JB
33822017-10-11 John Baldwin <jhb@FreeBSD.org>
3383
3384 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3385 (ALLDEPFILES): Add arm-fbsd-tdep.c.
3386 * NEWS: Mention new FreeBSD/arm target.
3387 * configure.tgt: Add arm*-*-freebsd*.
3388 * arm-fbsd-tdep.c: New file.
3389 * arm-fbsd-tdep.h: New file.
3390
fe220226
MR
33912017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3392
3393 * linux-tdep.c (linux_make_corefile_notes): Remove call to
3394 `gdbarch_elfcore_write_linux_prpsinfo'.
3395 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3396 method.
3397 (elf_internal_linux_prpsinfo): Remove declaration.
3398 * gdbarch.h: Regenerate.
3399 * gdbarch.c: Regenerate.
3400
a2f63b2e
MR
34012017-10-11 Maciej W. Rozycki <macro@imgtec.com>
3402
3403 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3404 `set_gdbarch_elfcore_write_linux_prpsinfo'.
3405
458ca1d0
PA
34062017-10-11 Pedro Alves <palves@redhat.com>
3407
3408 * breakpoint.c (reattach_breakpoints): Delete.
3409 * breakpoint.h (reattach_breakpoints): Delete.
3410
905014d7
SM
34112017-10-11 Simon Marchi <simon.marchi@ericsson.com>
3412
3413 * symfile.c (registered_sym_fns): Make struct, not typedef.
3414 (DEF_VEC_O (registered_sym_fns)): Remove.
3415 (symtab_fns): Change type to std::vector.
3416 (add_symtab_fns): Adjust.
3417 (find_sym_fns): Adjust.
3418
56d704da
AK
34192017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
3420
3421 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3422 * arc-tdep.h (arc_arch_is_em): New function.
3423 (arc_arch_is_hs): Likewise.
3424
7fa29be9
EB
34252017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3426
3427 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3428 parentheses in the declaration.
3429 (macro_lookup_inclusion): Likewise.
3430 (macro_lookup_definition): Likewise.
3431 * p-lang.h (pascal_builtin_types): Likewise.
3432 * tui/tui-data.c (tui_win_list): Likewise.
3433 * tui/tui-data.h (tui_win_list): Likewise.
3434 * utils.h (make_cleanup_free_section_addr_info): Likewise.
3435
d9b477e3
KB
34362017-10-11 Mark Rages <markrages@gmail.com>
3437
3438 * target-memory.c (block_boundaries): Fix for block address not
3439 aligned on block size.
3440
65630365
PA
34412017-10-10 Pedro Alves <palves@redhat.com>
3442 Tom Tromey <tom@tromey.com>
3443
3444 * breakpoint.c (struct captured_breakpoint_query_args)
3445 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3446 (print_breakpoint): New.
3447 * breakpoint.h (print_breakpoint): Declare.
3448 * common/common-exceptions.h (enum return_reason): Remove
3449 references to catch_exceptions.
3450 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3451 Delete.
3452 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3453 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3454 * gdb.h: Delete.
3455 * gdbthread.h (thread_select): Declare.
3456 * mi/mi-cmd-break.c: Don't include gdb.h.
3457 (breakpoint_notify): Use print_breakpoint.
3458 * mi/mi-cmd-catch.c: Don't include gdb.h.
3459 * mi/mi-interp.c: Don't include gdb.h.
3460 (mi_print_breakpoint_for_event): New.
3461 (mi_breakpoint_created, mi_breakpoint_modified): Use
3462 mi_print_breakpoint_for_event.
3463 * mi/mi-main.c: Don't include gdb.h.
3464 (mi_cmd_thread_select): Parse the global thread ID here. Use
3465 thread_select instead of gdb_thread_select.
3466 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3467 of using gdb_list_thread_ids.
3468 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
3469 FILEIO_ENOSYS here.
3470 (remote_fileio_request): Use TRY/CATCH instead of
3471 catch_exceptions.
3472 * symfile-mem.c (struct symbol_file_add_from_memory_args)
3473 (symbol_file_add_from_memory_wrapper): Delete.
3474 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3475 * thread.c: Don't include gdb.h.
3476 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3477 (thread_alive): Use thread_select.
3478 (do_captured_thread_select): Delete, parts salvaged as ...
3479 (thread_select): ... this new function.
3480 (gdb_thread_select): Delete.
3481
bf469271
PA
34822017-10-10 Pedro Alves <palves@redhat.com>
3483 Tom Tromey <tom@tromey.com>
3484
3485 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3486 and reverse logic.
3487 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3488 No longer macros. Instead ...
3489 (enum wp_check_result): They're now values of this new
3490 enumeration.
3491 (watchpoint_check): Change return type to wp_check_result and
3492 parameter type to bpstat.
3493 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3494 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3495 catch_errors. Reverse logic of watchpoint_check call.
3496 (breakpoint_re_set_one): Now returns void and takes a breakpoint
3497 pointer as parameter.
3498 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3499 * common/common-exceptions.c (throw_exception_sjlj): Update
3500 comments to avoid mentioning catch_errors.
3501 * exceptions.c (catch_errors): Delete.
3502 * exceptions.h: Update comments to avoid mentioning catch_errors.
3503 (catch_errors_ftype, catch_errors): Delete.
3504 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3505 (hook_stop_stub): Delete.
3506 (restore_selected_frame): Change return type to void, and
3507 parameter type to const frame_id &.
3508 (restore_infcall_control_state): Use TRY/CATCH instead of
3509 catch_errors.
3510 * main.c (captured_command_loop): Return void and remove
3511 parameter. Remove references to catch_errors.
3512 (captured_main): Use TRY/CATCH instead of catch_errors.
3513 * objc-lang.c (objc_submethod_helper_data)
3514 (find_objc_msgcall_submethod_helper): Delete.
3515 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3516 catch_errors.
3517 * record-full.c (record_full_message): Return void.
3518 (record_full_message_args, record_full_message_wrapper): Delete.
3519 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3520 instead of catch_errors.
3521 * solib-aix.c (solib_aix_open_symbol_file_object): Change
3522 parameter type to int.
3523 * solib-darwin.c (open_symbol_file_object): Ditto.
3524 * solib-dsbt.c (open_symbol_file_object): Ditto.
3525 * solib-frv.c (open_symbol_file_object): Ditto.
3526 * solib-svr4.c (open_symbol_file_object): Ditto.
3527 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3528 * solib.c (update_solib_list): Use TRY/CATCH instead of
3529 catch_errors.
3530 * solist.h (struct target_so_ops) <open_symbol_file_object>:
3531 Change type.
3532 * symmisc.c (struct print_symbol_args): Remove.
3533 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3534 (print_symbol): Change type.
3535 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3536 and remove parameters.
3537 (catch_errors): New.
3538 (get_windows_debug_event): Adjust.
3539
1a56bfa5
TT
35402017-10-09 Tom Tromey <tom@tromey.com>
3541
3542 * mi/mi-main.c (free_splay_tree): Remove.
3543 (list_available_thread_groups): Use splay_tree_up.
3544 * common/gdb_splay_tree.h: New file.
3545
0c478e2d
TT
35462017-10-09 Tom Tromey <tom@tromey.com>
3547
3548 * mi/mi-main.c (do_nothing): Remove.
3549 (list_available_thread_groups): Update.
3550
cbd2b4e3
PA
35512017-10-09 Pedro Alves <palves@redhat.com>
3552
3553 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3554 reading registers when switching context.
3555
a181c0bf
JB
35562017-10-09 John Baldwin <jhb@FreeBSD.org>
3557
3558 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3559 (fbsd_convert_siginfo): Likewise.
3560 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3561
6e66f753
SM
35622017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
3563
3564 * configure.ac (try_guile_versions): Remove guile-2.2.
3565 * configure: Regenerate.
3566
890e9790
TT
35672017-10-09 Tom Tromey <tom@tromey.com>
3568
3569 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3570 (COMPILE.pre): Use $(CXX).
3571
109483d9
PA
35722017-10-09 Pedro Alves <palves@redhat.com>
3573
3574 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3575 Use bool.
3576 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3577 * cp-support.h (cp_remove_params): Now returns a
3578 gdb::unique_xmalloc_ptr.
3579 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3580 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3581 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3582 returning a gdb::unique_xmalloc_ptr.
3583 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3584 * stack.c (find_frame_funname): Adjust to cp_remove_params
3585 returning a gdb::unique_xmalloc_ptr.
3586
791afaa2
TT
35872017-10-08 Tom Tromey <tom@tromey.com>
3588
3589 * dwarf2read.c (dwarf2_get_dwz_file): Use
3590 gdb::unique_xmalloc_ptr.
3591 (find_slot_in_mapped_hash): Likewise.
3592 (dwarf2_physname): Likewise.
3593 (create_dwo_unit_in_dwp_v1): Use std::string.
3594 (create_dwo_unit_in_dwp_v2): Likewise.
3595 (lookup_dwo_cutu): Likewise.
3596 (inherit_abstract_dies): Use std::vector.
3597 (read_array_type): Likewise.
3598 (dwarf_decode_macros): Remove unused declaration.
3599 (unsigned_int_compar): Remove.
3600 (dwarf2_build_psymtabs_hard): Use scoped_restore.
3601 (psymtabs_addrmap_cleanup): Remove.
3602
30a9c02f
TT
36032017-10-08 Tom Tromey <tom@tromey.com>
3604
3605 * frame-unwind.c (frame_unwind_try_unwinder): Update.
3606 * frame.h (frame_cleanup_after_sniffer): Declare.
3607 (frame_prepare_for_sniffer): Return void.
3608 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
3609 type of argument.
3610 (frame_prepare_for_sniffer): Return void.
3611
757325a3
TT
36122017-10-08 Tom Tromey <tom@tromey.com>
3613
3614 * utils.h (make_cleanup_value_free): Remove.
3615 * utils.c (do_value_free, struct cleanup): Remove.
3616 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3617 Use gdb_value_up.
3618 * value.h (struct value_deleter): New.
3619 (gdb_value_up): New typedef.
3620
b9c04fb2
TT
36212017-10-08 Tom Tromey <tom@tromey.com>
3622
3623 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3624 (make_cleanup_free_search_symbols): Remove.
3625 (search_symbols): Return std::vector.
3626 (symbol_search::compare_search_syms): Now member of
3627 symbol_search. Change arguments.
3628 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
3629 (symtab_symbol_info, rbreak_command): Update.
3630 * symtab.h (struct symbol_search) <next>: Remove.
3631 Add constructors.
3632 (symbol_search::operator<): New function.
3633 (symbol_search::operator==): New function.
3634 (search_symbols): Remove std::vector.
3635 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3636 (symbol_search::compare_search_syms): Declare.
3637
0d28b0a5
YQ
36382017-10-06 Yao Qi <yao.qi@linaro.org>
3639
3640 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3641 arch/aarch64-insn.o.
3642 Remove one rule.
3643 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3644
71917808
YQ
36452017-10-06 Yao Qi <yao.qi@linaro.org>
3646
3647 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3648 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3649 arch/arm-linux.o respectively.
3650 * configure.tgt: Likewise.
3651
2081b2b2
YQ
36522017-10-06 Yao Qi <yao.qi@linaro.org>
3653
3654 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3655 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3656
a1b85d28
PA
36572017-10-06 Pedro Alves <palves@redhat.com>
3658
3659 * windows-nat.c: Include <algorithm>.
3660
d97987e2
YQ
36612017-10-06 Yao Qi <yao.qi@linaro.org>
3662
3663 * configure.tgt (i386_tobjs): New variable.
3664 (amd64_tobjs): New variable.
3665 Set $cpu_obs and $os_obs.
3666
f38307f5
YQ
36672017-10-06 Yao Qi <yao.qi@linaro.org>
3668
3669 * Makefile.in (CONFIG_SRC_SUBDIR): New.
3670 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3671 (clean): Remove object files and dependency files.
3672 (distclean): Remove the directory.
3673 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3674 * configure: Re-generated.
3675 * configure.tgt: Replace amd64.o with arch/amd64.o.
3676
2f924de6
JM
36772017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
3678
3679 PR build/22188
3680 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3681 and SETEND.
3682
2fd9d7ca
PA
36832017-10-05 Pedro Alves <palves@redhat.com>
3684
3685 * linux-nat.c (linux_child_follow_fork): When following the parent
3686 and detaching the child, consult the parent thread's architecture
3687 instead of the child's.
3688
d13b8493
UW
36892017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3690
3691 * ax.h: Do not include "doublest.h".
3692 (union agent_val): Remove.
3693
3b4b2f16
UW
36942017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3695
3696 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3697 (decimal_to_string): Return std::string object.
3698 (decimal_from_string): Accept std::string object. Return bool.
3699 (decimal_from_integral, decimal_from_doublest): Remove.
3700 (decimal_from_longest): Add prototype.
3701 (decimal_from_ulongest): Likewise.
3702 (decimal_to_longest): Likewise.
3703 (decimal_from_doublest): Likewise.
3704 * dfp.c: Do not include "gdbtypes.h" or "value.h".
3705 (MAX_DECIMAL_STRING): Move here.
3706 (decimal_to_string): Return std::string object.
3707 (decimal_from_string): Accept std::string object. Return bool.
3708 (decimal_from_integral): Remove, replace by ...
3709 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3710 (decimal_to_longest): New function.
3711 (decimal_from_floating): Remove, replace by ...
3712 (decimal_from_doublest): ... this new function.
3713 (decimal_to_doublest): Update to new decimal_to_string interface.
3714
3715 * value.c (unpack_long): Use decimal_to_longest.
3716 * valops.c (value_cast): Use decimal_from_doublest instead of
3717 decimal_from_floating. Use decimal_from_[u]longest isntead of
3718 decimal_from_integral.
3719 * valarith.c (value_args_as_decimal): Likewise.
3720 * valprint.c (print_decimal_floating): Update to new
3721 decimal_to_string interface.
3722 * printcmd.c (printf_decfloat): Likewise.
3723 * c-exp.y (parse_number): Update to new decimal_from_string interface.
3724
1841ee5d
UW
37252017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
3726
3727 * doublest.h: Do not include "floatformat.h". Remove stale comments.
3728 * gdbtypes.c: Include "floatformat.h".
3729 * value.c: Likewise.
3730 * m68k-tdep.c: Likewise.
3731
3732 * findvar.c: Do not include "floatformat.h".
3733 * amd64-darwin-tdep.c: Likewise.
3734 * arm-linux-tdep.c: Likewise.
3735 * i386-darwin-tdep.c: Likewise.
3736 * i387-tdep.c: Likewise.
3737 * m68k-linux-tdep.c: Likewise.
3738 * mep-tdep.c: Likewise.
3739 * mips-tdep.c: Likewise.
3740 * nios2-tdep.c: Likewise.
3741 * s390-linux-tdep.c: Likewise.
3742 * sparc-obsd-tdep.c: Likewise.
3743 * sparc-tdep.c: Likewise.
3744 * sparc64-tdep.c: Likewise.
3745 * spu-tdep.c: Likewise.
3746 * tic6x-tdep.c: Likewise.
3747 * tilegx-tdep.c: Likewise.
3748 * vax-tdep.c: Likewise.
3749 * xstormy16-tdep.c: Likewise.
3750 * xtensa-tdep.c: Likewise.
3751
3752 * top.c: Do not include "doublest.h".
3753 * aarch64-tdep.c: Likewise.
3754 * alpha-tdep.c: Likewise.
3755 * arm-linux-tdep.c: Likewise.
3756 * m68k-linux-tdep.c: Likewise.
3757 * tilegx-tdep.c: Likewise.
3758 * xstormy16-tdep.c: Likewise.
3759
a80a6471
JB
37602017-10-05 John Baldwin <jhb@FreeBSD.org>
3761
3762 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3763 (mipsn32_fbsd_sigframe): Define.
3764 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3765 for FreeBSD/mipsn32.
3766
12c4bd7f
JB
37672017-10-05 John Baldwin <jhb@FreeBSD.org>
3768
3769 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3770 AT_HWCAP.
3771
c91933e9
TG
37722017-10-05 Tristan Gingold <tgingold@free.fr>
3773
3774 * MAINTAINERS (Misc): Update my email address.
3775
5cd63fda
PA
37762017-10-04 Pedro Alves <palves@redhat.com>
3777
3778 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
3779 it instead of target_gdbarch.
3780 (get_remote_state, get_remote_packet_size): Adjust
3781 get_remote_arch_state calls, passing down target_gdbarch
3782 explicitly.
3783 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3784 'gdbarch' and use it instead of target_gdbarch.
3785 (get_memory_packet_size): Adjust get_remote_arch_state calls,
3786 passing down target_gdbarch explicitly.
3787 (struct stop_reply) <arch>: New field.
3788 (remote_parse_stop_reply): Use the stopped thread's architecture,
3789 not the current inferior's. Save the architecture in the
3790 stop_reply.
3791 (process_stop_reply): Use the stop reply's architecture.
3792 (process_g_packet, remote_fetch_registers)
3793 (remote_prepare_to_store, store_registers_using_G)
3794 (remote_store_registers): Adjust get_remote_arch_state calls,
3795 using the regcache's architecture.
3796 (remote_get_trace_status): Adjust get_remote_arch_state calls,
3797 passing down target_gdbarch explicitly.
3798 * spu-multiarch.c (spu_thread_architecture): Defer to the target
3799 beneath instead of calling target_gdbarch.
3800 * target.c (default_thread_architecture): Use the specified
3801 inferior's architecture, instead of the current inferior's
3802 architecture (via target_gdbarch).
3803
ed4227b7
PA
38042017-10-04 Pedro Alves <palves@redhat.com>
3805
3806 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3807 case.
3808 (regcache_print): Handle !target_has_registers here instead.
3809
55b11ddf
PA
38102017-10-04 Pedro Alves <palves@redhat.com>
3811
3812 * frame.c (create_test_frame): Delete.
3813 * frame.h (create_test_frame): Delete.
3814 * gdbarch-selftests.c: Include gdbthread.h and target.h.
3815 (class regcache_test): Delete.
3816 (test_target_has_registers, test_target_has_stack)
3817 (test_target_has_memory, test_target_prepare_to_store)
3818 (test_target_store_registers): New functions.
3819 (test_target_ops): New class.
3820 (register_to_value_test): Error out if there's already a
3821 process_stratum (or higher) target pushed. Create a fuller mock
3822 environment, with mock target_ops, inferior, address space, thread
3823 and inferior_ptid.
3824 * progspace.c (struct address_space): Move to ...
3825 * progspace.h (struct address_space): ... here.
3826 * regcache.h (regcache::~regcache, regcache::raw_write)
3827 [GDB_SELF_TEST]: No longer virtual.
3828
4c71c105
SM
38292017-10-04 Simon Marchi <simon.marchi@ericsson.com>
3830
3831 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3832
73dcd72d
PA
38332017-10-04 Pedro Alves <palves@redhat.com>
3834
3835 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3836 out of 'between TRY and CATCH'.
3837
44704526
PA
38382017-10-04 Pedro Alves <palves@redhat.com>
3839
3840 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3841 * common/common-exceptions.h (TRY): Open an outermost scope.
3842 Expand intro comment.
3843 (CATCH): Reindent.
3844 (END_CATCH): Close the outermost scope.
3845 * completer.c (complete_line_internal): Add missing END_CATCH.
3846
bc3b087d
SDJ
38472017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3848
3849 * NEWS (Changes since GDB 8.0): Add entry about new
3850 'set-cwd-on-gdbserver' feature.
3851 (New remote packets): Add entry for QSetWorkingDir.
3852 * common/common-inferior.h (set_inferior_cwd): New prototype.
3853 * infcmd.c (set_inferior_cwd): Remove "static".
3854 (show_cwd_command): Expand text to include remote debugging.
3855 * remote.c: Add PACKET_QSetWorkingDir.
3856 (remote_protocol_features) <QSetWorkingDir>: New entry for
3857 PACKET_QSetWorkingDir.
3858 (extended_remote_set_inferior_cwd): New function.
3859 (extended_remote_create_inferior): Call
3860 "extended_remote_set_inferior_cwd".
3861 (_initialize_remote): Call "add_packet_config_cmd" for
3862 QSetWorkingDir.
3863
d092c5a2
SDJ
38642017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3865
3866 * NEWS (New commands): Mention "set/show cwd".
3867 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3868 "cd" command's help text.
3869 * common/common-inferior.h (get_inferior_cwd): New prototype.
3870 * infcmd.c (inferior_cwd_scratch): New global variable.
3871 (set_inferior_cwd): New function.
3872 (get_inferior_cwd): Likewise.
3873 (set_cwd_command): Likewise.
3874 (show_cwd_command): Likewise.
3875 (_initialize_infcmd): Add "set/show cwd" commands.
3876 * inferior.h (class inferior) <cwd>: New field.
3877 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3878 (fork_inferior): Change inferior's cwd before its execution.
3879 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3880 to CreateProcess.
3881
7da0a886
SDJ
38822017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3883
3884 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3885 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3886 (COMMON_OBS): Add gdb_tilde_expand.o.
3887 * common/gdb_tilde_expand.c: New file.
3888 * common/gdb_tilde_expand.h: Likewise.
3889
db8dd160
MR
38902017-10-03 Maciej W. Rozycki <macro@imgtec.com>
3891
3892 * gdbarch.sh (objfile): Remove duplicate declaration.
3893 * gdbarch.h: Regenerate.
3894
f8bfbf22
TT
38952017-10-03 Tom Tromey <tom@tromey.com>
3896
3897 * utils.c (internal_vproblem): Use string_vprintf.
3898
5178ed48
TT
38992017-10-03 Tom Tromey <tom@tromey.com>
3900
3901 * printcmd.c (info_symbol_command): Use std::string.
3902
8cff8730
TT
39032017-10-03 Tom Tromey <tom@tromey.com>
3904
3905 * top.c (gdb_safe_append_history): Use std::string.
3906
895b8f30
TT
39072017-10-03 Tom Tromey <tom@tromey.com>
3908
3909 * event-top.c (stdin_event_handler): Update.
3910 * main.c (captured_main_1): Update.
3911 * top.h (make_delete_ui_cleanup): Remove.
3912 (struct ui): Add constructor and destructor.
3913 (new_ui, delete_ui): Remove.
3914 * top.c (make_delete_ui_cleanup): Remove.
3915 (new_ui_command): Use std::unique_ptr.
3916 (delete_ui_cleanup): Remove.
3917 (ui::ui): Rename from new_ui. Update.
3918 (free_ui): Remove.
3919 (ui::~ui): Rename from delete_ui. Update.
3920
0efef640
TT
39212017-10-03 Tom Tromey <tom@tromey.com>
3922
3923 * symfile.c (load_progress): Use gdb::byte_vector.
3924
245ad7d3
TT
39252017-10-03 Tom Tromey <tom@tromey.com>
3926
3927 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3928 declaration.
3929 * printcmd.c (x_command): Remove unused declaration.
3930 * symfile.c (symbol_file_command): Remove unused declaration.
3931
e05550d7
TT
39322017-10-03 Tom Tromey <tom@tromey.com>
3933
3934 * utils.c (internal_vproblem): Use std::string.
3935 (defaulted_query): Likewise.
3936
b95de2b7
TT
39372017-10-03 Tom Tromey <tom@tromey.com>
3938
3939 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3940 * top.c (execute_command_to_string): Update.
3941 * utils.c (make_cleanup_restore_page_info): Remove.
3942 (do_restore_page_info_cleanup): Remove.
3943 (set_batch_flag_and_restore_page_info):
3944 New.
3945 (make_cleanup_restore_page_info): Remove.
3946 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3947 (~set_batch_flag_and_restore_page_info): New
3948 (make_cleanup_restore_uinteger): Remove.
3949 (make_cleanup_restore_integer): Remove.
3950 (struct restore_integer_closure): Remove.
3951 (restore_integer): Remove.
3952 * utils.h (struct set_batch_flag_and_restore_page_info): New
3953 class.
3954 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3955 (make_cleanup_restore_page_info): Remove.
3956 (make_cleanup_restore_uinteger) Remove.
3957 (make_cleanup_restore_integer) Remove.
3958
07036511
TT
39592017-10-03 Tom Tromey <tom@tromey.com>
3960
3961 * record-full.h (record_full_gdb_operation_disable_set): Return
3962 scoped_restore_tmpl<int>.
3963 * infrun.c (adjust_pc_after_break): Update.
3964 (handle_signal_stop): Update.
3965 * record-full.c (record_full_gdb_operation_disable_set): Return
3966 scoped_restore_tmpl<int>.
3967 (record_full_wait_1, record_full_insert_breakpoint)
3968 (record_full_remove_breakpoint, record_full_save)
3969 (record_full_goto_insn): Update.
3970
45320ffa
TT
39712017-10-02 Tom Tromey <tom@tromey.com>
3972
3973 PR rust/22236:
3974 * rust-lang.c (rust_val_print_str): New function.
3975 (val_print_struct): Call it.
3976 (rust_subscript): Preserve name of slice type.
3977
b3e3859b
TT
39782017-10-02 Tom Tromey <tom@tromey.com>
3979
3980 * rust-lang.c (rust_subscript): Handle slices in
3981 EVAL_AVOID_SIDE_EFFECTS case.
3982
01af5e0d
TT
39832017-10-02 Tom Tromey <tom@tromey.com>
3984
3985 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3986
888e3ddb
TT
39872017-10-02 Tom Tromey <tom@tromey.com>
3988
3989 * rust-lang.h (rust_slice_type): Add "extern".
3990
cc536b21
PA
39912017-10-02 Tom Tromey <tom@tromey.com>
3992 Pedro Alves <palves@redhat.com>
3993
3994 * ada-lang.h (ada_exc_info::operator<): Make const.
3995 (ada_exc_info::operator==): Make const.
3996 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3997 Make const.
3998
386c8614
TT
39992017-09-29 Tom Tromey <tom@tromey.com>
4000
4001 * target.c (read_whatever_is_readable): Change type of "result".
4002 Update.
4003 (free_memory_read_result_vector): Remove.
4004 (read_memory_robust): Change return type. Update.
4005 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4006 bin2hex, std::string.
4007 * target.h (memory_read_result_s): Remove typedef.
4008 (free_memory_read_result_vector): Remove.
4009 (read_memory_robust): Return std::vector.
4010
789c4b5e
TT
40112017-09-29 Tom Tromey <tom@tromey.com>
4012
4013 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4014
ab816a27
TT
40152017-09-29 Tom Tromey <tom@tromey.com>
4016
4017 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4018 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4019 operator< and operator==.
4020 (ada_exceptions_list): Return a std::vector.
4021 * ada-lang.c (ada_exc_info::operator<): Rename from
4022 compare_ada_exception_info.
4023 (ada_exc_info::operator==): New.
4024 (sort_remove_dups_ada_exceptions_list): Change type of
4025 "exceptions".
4026 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4027 (ada_add_global_exceptions): Likewise.
4028 (ada_exceptions_list_1): Return a std::vector.
4029 (ada_exceptions_list): Likewise.
4030
52f9abe4
TT
40312017-09-29 Tom Tromey <tom@tromey.com>
4032
4033 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4034 'std::set *'.
4035 (print_one_inferior): Update.
4036 (free_vector_of_ints): Remove.
4037 (list_available_thread_groups): Change "ids" to std::set.
4038 (mi_cmd_list_thread_groups): Update.
4039 (struct collect_cores_data) <core>: Now a std::set.
4040 (collect_cores): Update.
4041 (unique): Remove.
4042 (print_one_inferior): Update.
4043
dcd5ddcc
TT
40442017-09-29 Tom Tromey <tom@tromey.com>
4045
4046 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4047 (mi_execute_async_cli_command): Likewise.
4048 (mi_cmd_trace_frame_collected): Use field_fmt.
4049
45d288cc
TT
40502017-09-29 Tom Tromey <tom@tromey.com>
4051
4052 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4053 gdb::byte_vector.
4054
6afe2f4a
TT
40552017-09-29 Tom Tromey <tom@tromey.com>
4056
4057 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4058
9813429a
TT
40592017-09-29 Tom Tromey <tom@tromey.com>
4060
4061 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4062
2d6960b4
TT
40632017-09-29 Tom Tromey <tom@tromey.com>
4064
4065 * varobj.h (varobj_gen_name): Return std::string.
4066 * varobj.c (varobj_gen_name): Return std::string.
4067 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4068 (mi_cmd_var_delete): Don't copy "name".
4069
784c453a
TT
40702017-09-29 Tom Tromey <tom@tromey.com>
4071
4072 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4073 (mi_cmd_break_insert_1): Update.
4074
a9bc57b9
TT
40752017-09-29 Tom Tromey <tom@tromey.com>
4076
4077 * target.h (make_scoped_defer_target_commit_resume): Update.
4078 * target.c (make_scoped_defer_target_commit_resume): Rename from
4079 make_cleanup_defer_target_commit_resume. Return a
4080 scoped_restore.
4081 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4082
9754d8c4
TT
40832017-09-29 Tom Tromey <tom@tromey.com>
4084
4085 * main.c (captured_main_1): Remove unused declaration.
4086 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
4087
99ef965c
TT
40882017-09-29 Tom Tromey <tom@tromey.com>
4089
4090 * symtab.c (search_symbols): Remove unused outer cleanup.
4091 (make_source_files_completion_list): Remove unused declaration.
4092
42518ba7
TT
40932017-09-29 Tom Tromey <tom@tromey.com>
4094
4095 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
4096
726b2169
TT
40972017-09-29 Tom Tromey <tom@tromey.com>
4098
4099 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
4100 gdb::byte_vector.
4101
55b06432
TT
41022017-09-29 Tom Tromey <tom@tromey.com>
4103
4104 * complaints.c (vcomplaint): Use std::string.
4105
8abcee91
TT
41062017-09-29 Tom Tromey <tom@tromey.com>
4107
4108 * tracepoint.c (trace_variable_command): Use std::string.
4109 (encode_actions_1): Remove unused declarations.
4110 (create_tsv_from_upload): Use std::string.
4111
6ad94bc7
TT
41122017-09-29 Tom Tromey <tom@tromey.com>
4113
4114 * cp-support.c (gdb_demangle): Use std::string.
4115
2003f3d8
TT
41162017-09-29 Tom Tromey <tom@tromey.com>
4117
4118 * stack.c (parse_frame_specification): Use std::string
4119 (info_frame_command): Use gdb::unique_xmalloc_ptr.
4120
8f8accb5
TT
41212017-09-29 Tom Tromey <tom@tromey.com>
4122
4123 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
4124
200aa7b1
TT
41252017-09-29 Tom Tromey <tom@tromey.com>
4126
4127 * utils.c (vfprintf_maybe_filtered): Use std::string.
4128 (vfprintf_unfiltered): Likewise.
4129
606aae8a
TT
41302017-09-29 Tom Tromey <tom@tromey.com>
4131
4132 * event-top.c (top_level_prompt): Return std::string.
4133 (display_gdb_prompt): Update.
4134
bd413795
TT
41352017-09-29 Tom Tromey <tom@tromey.com>
4136
4137 * unittests/common-utils-selftests.c (format): New function.
4138 (string_vprintf_tests): New function.
4139 (_initialize_common_utils_selftests): Register new tests.
4140 * common/common-utils.c (string_vprintf): New function.
4141 * common/common-utils.h (string_vprintf): Declare.
4142
256642e8
PA
41432017-09-29 Pedro Alves <palves@redhat.com>
4144
4145 * common/rsp-low.c (unpack_varlen_hex): Constify.
4146 * common/rsp-low.h (unpack_varlen_hex): Constify.
4147 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
4148 Constify.
4149 * remote.c (remote_set_permissions, read_ptid)
4150 (remote_current_thread, remote_get_threads_with_qthreadinfo)
4151 (remote_static_tracepoint_marker_at)
4152 (remote_static_tracepoint_markers_by_strid)
4153 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
4154 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
4155 (parse_tracepoint_definition, parse_tsv_definition)
4156 (parse_static_tracepoint_marker_definition): Constify.
4157 * tracepoint.h (parse_static_tracepoint_marker_definition)
4158 (parse_trace_status, parse_tracepoint_status)
4159 (parse_tracepoint_definition, parse_tsv_definition): Constify.
4160
b6bb3468
PA
41612017-09-29 Pedro Alves <palves@redhat.com>
4162
4163 * remote.c (target_buf, target_buf_size): Delete.
4164 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
4165 Use the connection's packet buffer instead.
4166 All callers adjusted.
4167 (_initialize_remote): Remove references to target_buf and
4168 target_buf_size.
4169
b2f8eb7a
PA
41702017-09-28 Pedro Alves <palves@redhat.com>
4171
4172 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4173 unittests/common-utils-selftests.c.
4174 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
4175 (COMMON_OBS): Remove utils-selftests.o.
4176 * utils-selftests.c: Move to ...
4177 * unittests/common-utils-selftests.c: ... here and rename self
4178 test to "string_printf".
4179
08302ed2
DE
41802017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
4181
4182 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
4183 having NULL cus or tus.
4184
96a5a1d3
UW
41852017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4186
4187 * arm-tdep.c: (convert_from_extended): Remove.
4188 (convert_to_extended): Likewise.
4189 (arm_extract_return_value): Use convert_typed_floating.
4190 (arm_store_return_value): Likewise.
4191
4192 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4193 * sh-tdep.c: Do not include "floatformat.h".
4194 (sh_littlebyte_bigword_type): New function.
4195 (sh_register_convert_to_virtual): Use convert_typed_floating.
4196 (sh_register_convert_to_raw): Likewise.
4197 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
4198 (sh64_littlebyte_bigword_type): New function.
4199 (sh64_extract_return_value): Use convert_typed_floating.
4200 (sh64_register_convert_to_virtual): Likewise.
4201 (sh64_register_convert_to_raw): Likewise.
4202
0db7851f
UW
42032017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4204
4205 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4206 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4207
4208 * gdbtypes.h (union type_specific): Make field floatformat hold
4209 just a single struct floatformat, not an array.
4210 (floatformat_from_type): Move here.
4211 * gdbtypes.c (floatformat_from_type): Move here. Update to
4212 changed TYPE_FLOATFORMAT definition.
4213 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4214 (recursive_dump_type): Likewise.
4215 (init_float_type): Install correct floatformat for byte order.
4216 (arch_float_type): Likewise.
4217
77b7c781
UW
42182017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
4219
4220 * gdbtypes.c (init_type): Change incoming argument from
4221 length-in-bytes to length-in-bits. Assert length is a
4222 multiple of TARGET_CHAR_BITS.
4223 (arch_type, arch_flags_type): Likewise.
4224 (init_integer_type): Update call to init_type.
4225 (init_character_type): Likewise.
4226 (init_boolean_type): Likewise.
4227 (init_float_type): Likewise.
4228 (init_decfloat_type): Likewise.
4229 (init_complex_type): Likewise.
4230 (init_pointer_type): Likewise.
4231 (objfile_type): Likewise.
4232 (arch_integer_type): Update call to arch_type.
4233 (arch_character_type): Likewise.
4234 (arch_boolean_type): Likewise.
4235 (arch_float_type): Likewise.
4236 (arch_decfloat_type): Likewise.
4237 (arch_complex_type): Likewise.
4238 (arch_pointer_type): Likewise.
4239 (gdbtypes_post_init): Likewise.
4240
4241 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4242 (read_base_type): Likewise.
4243 * mdebugread.c (basic_type): Likewise.
4244 * stabsread.c (dbx_init_float_type): Likewise.
4245 (rs6000_builtin_type): Likewise.
4246 (read_range_type): Likewise. Also, fix call to init_integer_type
4247 with erroneous length argument.
4248
4249 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4250 * d-lang.c (build_d_types): Likewise.
4251 * f-lang.c (build_fortran_types): Likewise.
4252 * go-lang.c (build_go_types): Likewise.
4253 * opencl-lang.c (build_opencl_types): Likewise.
4254 * jit.c (finalize_symtab): Likewise.
4255 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4256 (build_std_type_info_type): Likewise.
4257 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
4258 update call to arch_flags_type.
4259
4260 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4261 arch_type.
4262 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4263 * windows-tdep.c (windows_get_tlb_type): Likewise.
4264
4265 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4266 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4267 * m32c-tdep.c (make_types): Likewise.
4268 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4269 (rl78_psw_type): Update call to arch_flags_type.
4270 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4271 * rx-tdep.c (rx_psw_type): Likewise.
4272 (rx_fpsw_type): Likewise.
4273 * sparc-tdep.c (sparc_psr_type): Likewise.
4274 (sparc_fsr_type): Likewise.
4275 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4276 (sparc64_ccr_type): Likewise.
4277 (sparc64_fsr_type): Likewise.
4278 (sparc64_fprs_type): Likewise.
4279
f21b4d5c
TT
42802017-09-27 Tom Tromey <tom@tromey.com>
4281
4282 * findcmd.c (find_command): Constify.
4283
643c2ffa
TT
42842017-09-27 Tom Tromey <tom@tromey.com>
4285
4286 * ada-tasks.c (task_command_1, task_command): Constify.
4287
510e5e56
TT
42882017-09-27 Tom Tromey <tom@tromey.com>
4289
4290 * symtab.c (maintenance_print_symbol_cache)
4291 (maintenance_flush_symbol_cache)
4292 (maintenance_print_symbol_cache_statistics): Constify.
4293
e503b191
TT
42942017-09-27 Tom Tromey <tom@tromey.com>
4295
4296 * inferior.c (detach_inferior_command, kill_inferior_command)
4297 (inferior_command): Constify.
4298
4e001312
TT
42992017-09-27 Tom Tromey <tom@tromey.com>
4300
4301 * regcache.c (regcache_print, maintenance_print_registers)
4302 (maintenance_print_raw_registers)
4303 (maintenance_print_cooked_registers)
4304 (maintenance_print_register_groups)
4305 (maintenance_print_remote_registers): Constify.
4306
77763700
TT
43072017-09-27 Tom Tromey <tom@tromey.com>
4308
4309 * printcmd.c (map_display_numbers, undisplay_command)
4310 (enable_disable_display_command, enable_display_command)
4311 (disable_display_command): Constify.
4312
4495129a
TT
43132017-09-27 Tom Tromey <tom@tromey.com>
4314
4315 * breakpoint.h (delete_command): Don't declare.
4316 * breakpoint.c (delete_command, enable_once_command)
4317 (enable_count_command, enable_delete_command, breakpoint_1)
4318 (maintenance_info_breakpoints, stopin_command, stopat_command)
4319 (delete_command, delete_trace_command, save_breakpoints)
4320 (save_breakpoints_command, save_tracepoints_command): Constify.
4321
3088cf40
TT
43222017-09-27 Tom Tromey <tom@tromey.com>
4323
4324 * macrocmd.c (macro_expand_command, macro_expand_once_command)
4325 (skip_ws, extract_identifier, macro_define_command)
4326 (macro_undef_command, macro_list_command): Constify.
4327
69f476a3
TT
43282017-09-27 Tom Tromey <tom@tromey.com>
4329
4330 * infcmd.c (environment_info, set_environment_command)
4331 (unset_environment_command, path_info, info_proc_cmd_1)
4332 (info_proc_cmd_mappings, info_proc_cmd_stat)
4333 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4334 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4335
c4a3e68e
TT
43362017-09-27 Tom Tromey <tom@tromey.com>
4337
4338 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4339 Constify.
4340
c9d31bd6
TT
43412017-09-27 Tom Tromey <tom@tromey.com>
4342
4343 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4344
1f3f85eb
TT
43452017-09-27 Tom Tromey <tom@tromey.com>
4346
4347 * demangle.c (demangle_command): Constify.
4348
9c504b5d
TT
43492017-09-27 Tom Tromey <tom@tromey.com>
4350
4351 * progspace.c (maintenance_info_program_spaces_command):
4352 Constify.
4353
6663cf91
TT
43542017-09-27 Tom Tromey <tom@tromey.com>
4355
4356 * compile/compile.c (check_raw_argument, compile_file_command)
4357 (compile_code_command, compile_print_command): Constify.
4358
34e5fa26
TT
43592017-09-27 Tom Tromey <tom@tromey.com>
4360
4361 * reggroups.c (maintenance_print_reggroups): Constify.
4362
8384c356
TT
43632017-09-27 Tom Tromey <tom@tromey.com>
4364
4365 * dwarf2read.c (save_gdb_index_command): Constify.
4366
884beb0c
TT
43672017-09-27 Tom Tromey <tom@tromey.com>
4368
4369 * stap-probe.c (info_probes_stap_command): Constify.
4370
e0b2930c
TT
43712017-09-27 Tom Tromey <tom@tromey.com>
4372
4373 * fork-child.c (unset_exec_wrapper_command): Constify.
4374
f938677d
TT
43752017-09-27 Tom Tromey <tom@tromey.com>
4376
4377 * btrace.c (get_uint, get_context_size, no_chunk)
4378 (maint_btrace_packet_history_cmd)
4379 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4380 (maint_info_btrace_cmd): Constify.
4381
8949cb87
TT
43822017-09-27 Tom Tromey <tom@tromey.com>
4383
4384 * reverse.c (delete_bookmark_command): Constify.
4385
ac88e2de
TT
43862017-09-27 Tom Tromey <tom@tromey.com>
4387
4388 * remote.c (set_memory_packet_size)
4389 (set_memory_write_packet_size, show_memory_write_packet_size)
4390 (set_memory_read_packet_size, show_memory_read_packet_size)
4391 (compare_sections_command, packet_command, remote_put_command)
4392 (remote_get_command, remote_delete_command): Constify.
4393
bd4c9dfe
TT
43942017-09-27 Tom Tromey <tom@tromey.com>
4395
4396 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4397 (set_mipsfpu_double_command, set_mipsfpu_none_command)
4398 (set_mipsfpu_auto_command): Constify.
4399
5e93d4c6
TT
44002017-09-27 Tom Tromey <tom@tromey.com>
4401
4402 * cli/cli-cmds.h (cd_command): Constify.
4403 * cli/cli-cmds.c (cd_command): Constify.
4404
fc41a75b
TT
44052017-09-27 Tom Tromey <tom@tromey.com>
4406
4407 * thread.c (thread_name_command, thread_find_command): Constify.
4408
67810076
TT
44092017-09-27 Tom Tromey <tom@tromey.com>
4410
4411 * probe.c (enable_probes_command, disable_probes_command):
4412 Constify.
4413
1d8b34a7
TT
44142017-09-27 Tom Tromey <tom@tromey.com>
4415
4416 * symfile.c (symbol_file_command): Constify.
4417 * gdbcore.h (deprecated_file_changed_hook): Constify.
4418 * exec.c (deprecated_file_changed_hook, exec_file_command)
4419 (file_command): Constify.
4420 * defs.h (symbol_file_command): Constify.
4421
442019e1
TT
44222017-09-27 Tom Tromey <tom@tromey.com>
4423
4424 * remote-fileio.c (set_system_call_allowed)
4425 (show_system_call_allowed): Constify.
4426
2983f7cb
TT
44272017-09-27 Tom Tromey <tom@tromey.com>
4428
4429 * tracepoint.c (delete_trace_variable_command)
4430 (tfind_end_command, tfind_start_command, tfind_pc_command)
4431 (tfind_tracepoint_command, tfind_line_command)
4432 (tfind_range_command, tfind_outside_command): Constify.
4433
4fd41b24
TT
44342017-09-27 Tom Tromey <tom@tromey.com>
4435
4436 * ax-gdb.c (maint_agent_printf_command, agent_command)
4437 (agent_eval_command): Constify.
4438
f2fc3015
TT
44392017-09-27 Tom Tromey <tom@tromey.com>
4440
4441 * tracepoint.c (info_scope_command): Constify.
4442 * python/python.c (gdbpy_decode_line): Constify.
4443 * python/py-breakpoint.c (bppy_init): Constify.
4444 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4445 * location.h: (new_linespec_location)
4446 (string_to_event_location_basic, string_to_event_location):
4447 Constify.
4448 * location.c (new_linespec_location)
4449 (string_to_event_location_basic, string_to_event_location):
4450 Constify.
4451 * linespec.h (decode_line_with_current_source)
4452 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4453 * linespec.c (linespec_lex_to_end)
4454 (decode_line_with_current_source)
4455 (decode_line_with_last_displayed): Constify.
4456 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4457 Constify.
4458 * cli/cli-cmds.c (edit_command, list_command): Constify.
4459 * breakpoint.h (until_break_command, watch_command_wrapper)
4460 (awatch_command_wrapper, rwatch_command_wrapper)
4461 (init_ada_exception_breakpoint): Constify.
4462 * breakpoint.c (break_command_1, dprintf_command)
4463 (break_range_command, watch_command_wrapper)
4464 (rwatch_command_wrapper, awatch_command_wrapper)
4465 (until_break_command, init_ada_exception_breakpoint)
4466 (strace_marker_create_sals_from_location, trace_command)
4467 (ftrace_command, strace_command, struct tracepoint): Constify.
4468 * ax-gdb.c (agent_command_1): Constify.
4469 * ada-lang.c (ada_exception_sal): Constify.
4470
8c2f95f4
TT
44712017-09-27 Tom Tromey <tom@tromey.com>
4472
4473 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4474 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4475 (get_context_size, no_chunk, get_insn_history_modifiers)
4476 (cmd_record_insn_history, get_call_history_modifiers)
4477 (cmd_record_call_history): Constify.
4478
a0d65762
TT
44792017-09-27 Tom Tromey <tom@tromey.com>
4480
4481 * source.c (show_substitute_path_command)
4482 (unset_substitute_path_command, set_substitute_path_command):
4483 Constify.
4484
58971144
TT
44852017-09-27 Tom Tromey <tom@tromey.com>
4486
4487 * typeprint.c (maintenance_print_type): Constify.
4488 * maint.c (maintenance_dump_me, maintenance_demangle)
4489 (maintenance_time_display, maintenance_info_sections)
4490 (maintenance_print_statistics, maintenance_deprecate)
4491 (maintenance_undeprecate): Constify.
4492 (maintenance_do_deprecate): Constify. Use std::string.
4493 (maintenance_selftest): Constify.
4494 * gdbtypes.h (maintenance_print_type): Constify.
4495
c482f52c
TT
44962017-09-27 Tom Tromey <tom@tromey.com>
4497
4498 * hppa-tdep.c (unwind_command): Constify.
4499
e100df1a
TT
45002017-09-27 Tom Tromey <tom@tromey.com>
4501
4502 * target-descriptions.c (unset_tdesc_filename_cmd)
4503 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4504 Constify.
4505
31d56ade
TT
45062017-09-27 Tom Tromey <tom@tromey.com>
4507
4508 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4509
b961da0b
TT
45102017-09-27 Tom Tromey <tom@tromey.com>
4511
4512 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4513
e2d8ae16
TT
45142017-09-27 Tom Tromey <tom@tromey.com>
4515
4516 * tui/tui-regs.c (tui_reg_command): Constify.
4517
863779b0
TT
45182017-09-27 Tom Tromey <tom@tromey.com>
4519
4520 * skip.c (skip_file_command, skip_function_command)
4521 (skip_enable_command, skip_disable_command, skip_delete_command):
4522 Constify.
4523
cdb34d4a
TT
45242017-09-27 Tom Tromey <tom@tromey.com>
4525
4526 * record-btrace.c (cmd_record_btrace_bts_start)
4527 (cmd_record_btrace_pt_start): Constify.
4528
e99c83e7
TT
45292017-09-27 Tom Tromey <tom@tromey.com>
4530
4531 * symmisc.c (maintenance_print_symbols)
4532 (maintenance_print_msymbols, maintenance_print_objfiles)
4533 (maintenance_info_symtabs, maintenance_check_symtabs)
4534 (maintenance_expand_symtabs, maintenance_info_line_tables):
4535 Constify.
4536
32faf971
TT
45372017-09-27 Tom Tromey <tom@tromey.com>
4538
4539 * top.c (new_ui_command): Constify.
4540
2cf311eb
TT
45412017-09-27 Tom Tromey <tom@tromey.com>
4542
4543 * symfile.c (add_symbol_file_command)
4544 (remove_symbol_file_command, list_overlays_command)
4545 (map_overlay_command, unmap_overlay_command)
4546 (overlay_auto_command, overlay_manual_command)
4547 (overlay_off_command, overlay_load_command): Constify.
4548
e6738699
TT
45492017-09-27 Tom Tromey <tom@tromey.com>
4550
4551 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4552 (info_spu_mailbox_command, info_spu_dma_command)
4553 (info_spu_proxydma_command): Constify.
4554
aa360cd5
TT
45552017-09-27 Tom Tromey <tom@tromey.com>
4556
4557 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4558
898241a5
TT
45592017-09-27 Tom Tromey <tom@tromey.com>
4560
4561 * cli/cli-script.c (user_defined_command): Constify.
4562
2d0ac106
TT
45632017-09-27 Tom Tromey <tom@tromey.com>
4564
4565 * cli/cli-dump.c (dump_memory_command, dump_value_command)
4566 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4567 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4568 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4569 (dump_binary_value, append_binary_memory, append_binary_value):
4570 Constify.
4571 (struct dump_context) <func>: Constify.
4572 (add_dump_command): Update.
4573
dede02ce
TT
45742017-09-27 Tom Tromey <tom@tromey.com>
4575
4576 * cli/cli-cmds.c (show_version, show_configuration)
4577 (source_command, show_user): Constify.
4578
d3cb6b99
TT
45792017-09-27 Tom Tromey <tom@tromey.com>
4580
4581 * target.c (maintenance_print_target_stack): Constify.
4582
1970a12f
TT
45832017-09-27 Tom Tromey <tom@tromey.com>
4584
4585 * interps.c (interpreter_exec_cmd): Constify.
4586
41243651
TT
45872017-09-27 Tom Tromey <tom@tromey.com>
4588
4589 * record-full.c (cmd_record_full_restore): Constify.
4590
4465d9db
TT
45912017-09-27 Tom Tromey <tom@tromey.com>
4592
4593 * memattr.c (enable_mem_command, disable_mem_command)
4594 (delete_mem_command): Constify.
4595
ad25e423
TT
45962017-09-27 Tom Tromey <tom@tromey.com>
4597
4598 * value.c (show_convenience): Constify.
4599
d64097b1
TT
46002017-09-27 Tom Tromey <tom@tromey.com>
4601
4602 * gdbcore.h (core_file_command): Update.
4603 * corefile.c (core_file_command): Constify.
4604
4d4589ef
TT
46052017-09-27 Tom Tromey <tom@tromey.com>
4606
4607 * user-regs.c (maintenance_print_user_registers): Constify.
4608
32a7bf17
TT
46092017-09-27 Tom Tromey <tom@tromey.com>
4610
4611 * cp-namespace.c (maintenance_cplus_namespace): Constify.
4612
4a475551
TT
46132017-09-27 Tom Tromey <tom@tromey.com>
4614
4615 * cp-support.c (first_component_command): Constify.
4616
990b9f9f
TT
46172017-09-27 Tom Tromey <tom@tromey.com>
4618
4619 * psymtab.c (maintenance_print_psymbols)
4620 (maintenance_info_psymtabs, maintenance_check_psymtabs):
4621 Constify.
4622
c281872e
TT
46232017-09-27 Tom Tromey <tom@tromey.com>
4624
4625 * windows-tdep.c (display_tib): Constify.
4626
5b64bf74
TT
46272017-09-27 Tom Tromey <tom@tromey.com>
4628
4629 * linux-fork.c (delete_checkpoint_command)
4630 (detach_checkpoint_command): Constify.
4631
4ada038f
TT
46322017-09-27 Tom Tromey <tom@tromey.com>
4633
4634 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4635
57f5a81b
TT
46362017-09-27 Tom Tromey <tom@tromey.com>
4637
4638 * arc-tdep.c (dump_arc_instruction_command): Constify.
4639
b0a8e6c4
TT
46402017-09-27 Tom Tromey <tom@tromey.com>
4641
4642 * valprint.c (set_radix, show_radix): Constify.
4643
8d97dc1c
TT
46442017-09-27 Tom Tromey <tom@tromey.com>
4645
4646 * dtrace-probe.c (info_probes_dtrace_command): Constify.
4647
eb7c454d
TT
46482017-09-27 Tom Tromey <tom@tromey.com>
4649
4650 * command.h (not_just_help_class_command): Update.
4651 * cli/cli-decode.h (not_just_help_class_command): Update.
4652 * cli/cli-decode.c (not_just_help_class_command): Constify.
4653
e4e33335
TT
46542017-09-27 Tom Tromey <tom@tromey.com>
4655
4656 * gdb_bfd.c (maintenance_info_bfds): Constify.
4657
0450cc4c
TT
46582017-09-27 Tom Tromey <tom@tromey.com>
4659
4660 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4661 overloads.
4662 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
4663 (do_const_cfunc): New function.
4664 (cmd_cfunc_eq): New overload.
4665 (cli_user_command_p): Check do_const_cfunc.
4666 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4667 const_cfunc.
4668 * command.h (add_cmd): Add const overload and no-function
4669 overload.
4670 (set_cmd_cfunc): Add const overload.
4671 (cmd_const_cfunc_ftype): Declare.
4672 (cmd_cfunc_eq): Add const overload.
4673 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4674 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4675 overload.
4676
a9bbfbd8
TT
46772017-09-27 Tom Tromey <tom@tromey.com>
4678
4679 * macroexp.c (get_next_token_for_substitution): New function.
4680 (substitute_args): Call it. Check for __VA_OPT__.
4681
5230b05a
WT
46822017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4683 Pedro Alves <palves@redhat.com>
4684
4685 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4686 producer_is_icc_lt_14.
4687 (producer_is_icc_lt_14): New function.
4688 (check_producer): Add code for checking version of ICC.
4689 (producer_is_icc): Move to producer.c.
4690 (read_structure_type): Restrict ICC workaround to ICC<14.
4691 * producer.c: Include selftest.h.
4692 (producer_is_icc, producer_parsing_tests, _initialize_producer):
4693 New functions.
4694 * producer.h (producer_is_icc): New declaration.
4695
b32b108a
WT
46962017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
4697
4698 * Makefile.in (SFILES): Add producer.c.
4699 (COMMON_OBS): Add producer.o
4700 * amd64-tdep.c (producer.h): Add new include.
4701 * dwarf2read.c (producer.h): Add new include.
4702 * producer.c: New file.
4703 * producer.h: New file.
4704 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4705 producer.c.
4706 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4707 producer.h.
4708
5007d765
MK
47092017-09-26 Matthias Klose <doko@ubuntu.com>
4710
4711 * configure.ac: Search ncursesw before ncurses.
4712 Check ncursesw/ncurses.h before ncurses/ncurses.h.
4713 * gdb_curses.h: Include <ncursesw/ncurses.h>
4714 * config.in, configure: Regenerate.
4715
281c4447
RO
47162017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4717
4718 PR gdb/22185
4719 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4720 obsolete.
4721 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4722 Remove i386sol2 support.
4723 * configure.nat <i386sol2>: Remove.
4724 <sol2-64>: Fold into ...
4725 <sol2>: ... this.
4726 Move common settings to default section.
4727 Add sol-thread.o.
4728 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4729 x86_64-*-solaris2.1[0-9]*>: Rename to ...
4730 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4731 <i[34567]86-*-solaris*>: Remove.
4732 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4733
4734 * configure.ac: Remove wctype in libw check.
4735 (_MSE_INT_H): Don't define on Solaris 7-9.
4736 <solaris*>: Remove libthread_db.so.1 check.
4737 * configure: Regenerate.
4738 * config.in: Regenerate.
4739
4740 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4741 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4742 (gdb_ps_size_t): Remove.
4743 Use base types in users.
4744 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4745
4746 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4747
39b06c20
RO
47482017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4749
4750 PR build/22206
4751 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4752 (adi_is_addr_mapped): Likewise.
4753 (PSR_ICC): Don't redefine.
4754 (PSR_IMPL): Likewise.
4755
6c3e20f1
TT
47562017-09-25 Tom Tromey <tom@tromey.com>
4757
4758 * regcache.c (regcache::dump): Use string_printf.
4759
b292235f
TT
47602017-09-25 Tom Tromey <tom@tromey.com>
4761
4762 * regcache.c (class regcache_invalidator): New.
4763 (struct register_to_invalidate): Remove.
4764 (make_cleanup_regcache_invalidate): Remove.
4765 (regcache::raw_write): Use regcache_invalidator.
4766
9ac86b52
TT
47672017-09-25 Tom Tromey <tom@tromey.com>
4768
4769 * spu-tdep.c (spu2ppu_sniffer): Update.
4770 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4771 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4772 Remove.
4773 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4774 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4775 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4776 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4777 (frame_pop): Update.
4778
c0e383c6
TT
47792017-09-25 Tom Tromey <tom@tromey.com>
4780
4781 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4782 * regcache.h (regcache_xfree): Don't declare.
4783 * regcache.c (regcache_xfree): Remove.
4784 (do_regcache_xfree): Use delete.
4785 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4786 * linux-fork.c (free_fork): Use delete.
4787 (fork_save_infrun_state): Likewise.
4788 * jit.c (jit_dealloc_cache): Use delete.
4789 * infrun.c (discard_infcall_suspend_state): Use delete.
4790
791199cc
TT
47912017-09-25 Tom Tromey <tom@tromey.com>
4792
4793 * regcache.h (regcache_xmalloc): Don't declare.
4794 (regcache_raw_set_cached_value): Update comment.
4795 * regcache.c (regcache_xmalloc): Remove.
4796 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4797 * jit.c (jit_frame_sniffer): Use new.
4798 * frame.c (frame_save_as_regcache): Use new.
4799
289e23aa
AA
48002017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4801
4802 * NEWS: Advertise support for guarded-storage registers on IBM z.
4803
1b63490c
AA
48042017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4805
4806 * s390-linux-nat.c (have_regset_gs): New static variable.
4807 (s390_linux_fetch_inferior_registers): Handle guarded-storage
4808 control block and guarded-storage broadcast control regsets.
4809 (s390_read_description): Detect whether the target has
4810 guarded-storage support, return appropriate tdesc.
4811 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4812 (features/s390x-gs-linux64.c): Likewise.
4813 (struct gdbarch_tdep) <have_gs>: New field.
4814 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4815 (s390_gsbc_regset): New variables.
4816 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4817 and s390_gsbc_regset, if applicable.
4818 (s390_core_read_description): Check whether core file was from a
4819 target with guarded-storage support; include appropriate regsets.
4820 (s390_gdbarch_init): Add registers for guarded-storage support.
4821 (_initialize_s390_tdep): Initialize new target descriptions that
4822 include registers for guarded-storage support.
4823 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4824 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4825 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4826 (S390_NUM_REGS): Adjust macro definition.
4827 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4828 (tdesc_s390x_gs_linux64): New declarations.
4829
96235dc1
AA
48302017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4831
4832 * features/s390-gs-linux64.xml: New file.
4833 * features/s390-gs.xml: New file.
4834 * features/s390-gsbc.xml: New file.
4835 * features/s390x-gs-linux64.xml: New file.
4836 * features/Makefile (WHICH): Add s390-gs-linux64 and
4837 s390x-gs-linux64.
4838 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4839 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4840 * features/s390-gs-linux64.c: New generated file.
4841 * features/s390x-gs-linux64.c: New file.
4842 * regformats/s390-gs-linux64.dat: New file.
4843 * regformats/s390x-gs-linux64.dat: New file.
4844
b4a7c699
TT
48452017-09-23 Tom Tromey <tom@tromey.com>
4846
4847 * defs.h (make_cleanup_override_quit_handler): Don't declare.
4848
c2f97536
TT
48492017-09-22 Tom Tromey <tom@tromey.com>
4850
4851 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4852 type to scoped_restore_tmpl.
4853 <scoped_input_handler>: Initialize m_quit_handler directly.
4854
43573013
SDJ
48552017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4856
4857 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4858 (cd_command): Likewise. Free "current_directory" before
4859 assigning to it.
4860 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4861 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4862 * top.c (gdb_dirbuf): Remove global declaration.
4863 * top.h (gdb_dirbuf): Likewise.
4864
6ec2e0f5
SDJ
48652017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
4866
4867 * gnulib/aclocal.m4: Regenerate.
4868 * gnulib/config.in: Regenerate.
4869 * gnulib/configure: Regenerate.
4870 * gnulib/import/Makefile.am: Regenerate.
4871 * gnulib/import/Makefile.in: Regenerate.
4872 * gnulib/import/assure.h: New file.
4873 * gnulib/import/at-func.c: Likewise
4874 * gnulib/import/chdir-long.c: New file.
4875 * gnulib/import/chdir-long.h: New file.
4876 * gnulib/import/cloexec.c: New file.
4877 * gnulib/import/cloexec.h: New file.
4878 * gnulib/import/close.c: New file.
4879 * gnulib/import/closedir.c: New file.
4880 * gnulib/import/dirent-private.h: New file.
4881 * gnulib/import/dup-safer.c: New file.
4882 * gnulib/import/dup.c: New file.
4883 * gnulib/import/dup2.c: New file.
4884 * gnulib/import/error.c: New file.
4885 * gnulib/import/error.h: New file.
4886 * gnulib/import/exitfail.c: New file.
4887 * gnulib/import/exitfail.h: New file.
4888 * gnulib/import/fchdir.c: New file.
4889 * gnulib/import/fcntl.c: New file.
4890 * gnulib/import/fcntl.in.h: New file.
4891 * gnulib/import/fd-hook.c: New file.
4892 * gnulib/import/fd-hook.h: New file.
4893 * gnulib/import/fd-safer.c: New file.
4894 * gnulib/import/fdopendir.c: New file.
4895 * gnulib/import/filename.h: New file.
4896 * gnulib/import/filenamecat-lgpl.c: New file.
4897 * gnulib/import/filenamecat.h: New file.
4898 * gnulib/import/fstat.c: New file.
4899 * gnulib/import/fstatat.c: New file.
4900 * gnulib/import/getcwd-lgpl.c: New file.
4901 * gnulib/import/getcwd.c: New file.
4902 * gnulib/import/getdtablesize.c: New file.
4903 * gnulib/import/getlogin_r.c: New file.
4904 * gnulib/import/getprogname.c: New file.
4905 * gnulib/import/getprogname.h: New file.
4906 * gnulib/import/gettext.h: New file.
4907 * gnulib/import/glob-libc.h: New file.
4908 * gnulib/import/glob.c: New file.
4909 * gnulib/import/glob.in.h: New file.
4910 * gnulib/import/intprops.h: New file.
4911 * gnulib/import/m4/chdir-long.m4: New file.
4912 * gnulib/import/m4/close.m4: New file.
4913 * gnulib/import/m4/closedir.m4: New file.
4914 * gnulib/import/m4/d-ino.m4: New file.
4915 * gnulib/import/m4/d-type.m4: New file.
4916 * gnulib/import/m4/dup.m4: New file.
4917 * gnulib/import/m4/dup2.m4: New file.
4918 * gnulib/import/m4/error.m4: New file.
4919 * gnulib/import/m4/fchdir.m4: New file.
4920 * gnulib/import/m4/fcntl.m4: New file.
4921 * gnulib/import/m4/fcntl_h.m4: New file.
4922 * gnulib/import/m4/fdopendir.m4: New file.
4923 * gnulib/import/m4/filenamecat.m4: New file.
4924 * gnulib/import/m4/fstat.m4: New file.
4925 * gnulib/import/m4/fstatat.m4: New file.
4926 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4927 * gnulib/import/m4/getcwd-path-max.m4: New file.
4928 * gnulib/import/m4/getcwd.m4: New file.
4929 * gnulib/import/m4/getdtablesize.m4: New file.
4930 * gnulib/import/m4/getlogin_r.m4: New file.
4931 * gnulib/import/m4/getprogname.m4: New file.
4932 * gnulib/import/m4/glob.m4: New file.
4933 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4934 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4935 * gnulib/import/m4/mempcpy.m4: New file.
4936 * gnulib/import/m4/memrchr.m4: New file.
4937 * gnulib/import/m4/mode_t.m4: New file.
4938 * gnulib/import/m4/msvc-inval.m4: New file.
4939 * gnulib/import/m4/msvc-nothrow.m4: New file.
4940 * gnulib/import/m4/open.m4: New file.
4941 * gnulib/import/m4/openat.m4: New file.
4942 * gnulib/import/m4/opendir.m4: New file.
4943 * gnulib/import/m4/readdir.m4: New file.
4944 * gnulib/import/m4/realloc.m4: New file.
4945 * gnulib/import/m4/rewinddir.m4: New file.
4946 * gnulib/import/m4/save-cwd.m4: New file.
4947 * gnulib/import/m4/strdup.m4: New file.
4948 * gnulib/import/m4/strerror.m4: New file.
4949 * gnulib/import/m4/unistd-safer.m4: New file.
4950 * gnulib/import/mempcpy.c: New file.
4951 * gnulib/import/memrchr.c: New file.
4952 * gnulib/import/msvc-inval.c: New file.
4953 * gnulib/import/msvc-inval.h: New file.
4954 * gnulib/import/msvc-nothrow.c: New file.
4955 * gnulib/import/msvc-nothrow.h: New file.
4956 * gnulib/import/open.c: New file.
4957 * gnulib/import/openat-die.c: New file.
4958 * gnulib/import/openat-priv.h: New file.
4959 * gnulib/import/openat-proc.c: New file.
4960 * gnulib/import/openat.c: New file.
4961 * gnulib/import/openat.h: New file.
4962 * gnulib/import/opendir.c: New file.
4963 * gnulib/import/pipe-safer.c: New file.
4964 * gnulib/import/readdir.c: New file.
4965 * gnulib/import/realloc.c: New file.
4966 * gnulib/import/rewinddir.c: New file.
4967 * gnulib/import/save-cwd.c: New file.
4968 * gnulib/import/save-cwd.h: New file.
4969 * gnulib/import/strdup.c: New file.
4970 * gnulib/import/strerror-override.c: New file.
4971 * gnulib/import/strerror-override.h: New file.
4972 * gnulib/import/strerror.c: New file.
4973 * gnulib/import/unistd--.h: New file.
4974 * gnulib/import/unistd-safer.h: New file.
4975 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4976 "getcwd" and "glob".
4977 * ser-tcp.c: Undefine "close" before redefining it.
4978
432ae719
SM
49792017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4980
4981 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4982 get rid of res_val.
4983
4fa7574e
RO
49842017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4985
4986 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4987 <sol2,sparc>: Likewise.
4988 <sol2-64,i386>: Likewise.
4989
4990 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4991 -Wdeprecated-declarations on *-*-solaris*.
4992 * configure: Regenerate.
4993
4994 * procfs.c: Include "nat/inferior.h".
4995 (procfs_info_proc): Fix typo.
4996
f6327dcb
KB
49972017-09-21 Kevin Buettner <kevinb@redhat.com>
4998
4999 * remote.c (vector): Include.
5000 (struct private_thread_info): Add field, thread_handle.
5001 (free_private_thread_info): Deallocate storage associated with
5002 thread handle.
5003 (get_private_info_thread): Initialize `thread_handle' field.
5004 (struct thread_item): Add field, thread_handle.
5005 (clear_threads_listing_context): Deallocate storage associated
5006 with thread handle.
5007 (start_thread): Add support for "handle" attribute.
5008 (thread_attributes): Add "handle".
5009 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5010 field.
5011 (remote_update_thread_list): Update thread_handle.
5012 (remote_thread_handle_to_thread_info): New function.
5013 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5014
fbbe5337
KB
50152017-09-21 Kevin Buettner <kevinb@redhat.com>
5016
5017 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5018 function.
5019 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5020 * python/python-internal.h (thread_object_type): Declare.
5021
e04ee09e
KB
50222017-09-21 Kevin Buettner <kevinb@redhat.com>
5023
5024 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5025 (target_thread_handle_to_thread_info): Declare.
5026 * target.c (target_thread_handle_to_thread_info): New function.
5027 * target-delegates.c: Regenerate.
5028 * gdbthread.h (find_thread_by_handle): Declare.
5029 * thread.c (find_thread_by_handle): New function.
5030 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5031 function.
5032 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5033
1e5b66ed
SM
50342017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5035
5036 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5037
ebe48ba0
SM
50382017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5039
5040 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5041
0a0bf5dc
YQ
50422017-09-21 Yao Qi <yao.qi@linaro.org>
5043
5044 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5045 to gdb_target_obs.
5046
d1b0a7bf
TT
50472017-09-20 Tom Tromey <tom@tromey.com>
5048
5049 * breakpoint.c (struct counted_command_line): Remove.
5050 (breakpoint_commands): Update.
5051 (alloc_counted_command_line, incref_counted_command_line)
5052 (decref_counted_command_line, do_cleanup_counted_command_line)
5053 (make_cleanup_decref_counted_command_line): Remove.
5054 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5055 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5056 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5057 (save_breakpoints): Update.
5058 * breakpoint.h (counted_command_line): Now a typedef to
5059 shared_ptr.
5060 (struct breakpoint) <commands>: Now a counted_command_line.
5061 (struct bpstats) <command>: Likewise.
5062
48649e1b
TT
50632017-09-20 Tom Tromey <tom@tromey.com>
5064
5065 * breakpoint.c (struct commands_info, do_map_commands_command):
5066 Remove.
5067 (commands_command_1): Update.
5068 (iterate_over_related_breakpoints): Take a function_view.
5069 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5070 (delete_command): Update.
5071 (map_breakpoint_numbers): Take a function_view.
5072 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5073 (disable_command): Update.
5074 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5075 (enable_command): Update.
5076 (struct disp_data, do_enable_breakpoint_disp)
5077 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5078 (do_map_enable_delete_breakpoint): Remove.
5079 (enable_once_command, enable_count_command, enable_delete_command)
5080 (delete_trace_variable_command): Update.
5081
04afa70c
TT
50822017-09-20 Tom Tromey <tom@tromey.com>
5083
5084 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
5085 (bpstat_clear): Use delete.
5086 (bpstats): New constructors.
5087 (bpstat_copy, bpstat_stop_status): Use new.
5088 (dprintf_after_condition_true): Update.
5089 * breakpoint.h (bpstats::bpstats): Add constructors.
5090 (bpstats::~bpstats): Add destructor.
5091
c83833f4
PA
50922017-09-20 Pedro Alves <palves@redhat.com>
5093
5094 * eval.c (make_params): Delete, refactored as ...
5095 (class fake_method): ... this new type's ctor.
5096 (fake_method::~fake_method): New.
5097 (evaluate_subexp_standard): Use 'fake_method'.
5098
223ffa71
TT
50992017-09-20 Tom Tromey <tom@tromey.com>
5100
5101 * windows-nat.c (get_windows_debug_event, windows_wait)
5102 (do_initial_windows_stuff, windows_attach): Update.
5103 * utils.c (vwarning, internal_vproblem): Update.
5104 (ui_unregister_input_event_handler_cleanup)
5105 (prepare_to_handle_input): Remove.
5106 (class scoped_input_handler): New.
5107 (defaulted_query, prompt_for_continue): Update.
5108 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
5109 Update.
5110 * top.c (undo_terminal_modifications_before_exit): Update.
5111 * target/target.h (target_terminal_init, target_terminal_inferior)
5112 (target_terminal_ours): Don't declare.
5113 (class target_terminal): New.
5114 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
5115 (target_terminal_ours_for_output)
5116 (make_cleanup_restore_target_terminal): Don't declare.
5117 (target_terminal_info): Remove.
5118 * target.c (enum terminal_state, terminal_state): Remove.
5119 (target_terminal::terminal_state): Define.
5120 (target_terminal::init): Rename from target_terminal_init.
5121 (target_terminal::inferior): Rename from
5122 target_terminal_inferior.
5123 (target_terminal::ours): Rename from target_terminal_ours.
5124 (target_terminal::ours_for_output): Rename from
5125 target_terminal_ours_for_output.
5126 (target_terminal::info): New method.
5127 (cleanup_restore_target_terminal)
5128 (make_cleanup_restore_target_terminal): Remove.
5129 * solib.c (handle_solib_event): Update.
5130 * remote.c (remote_serial_quit_handler): Update.
5131 (remote_terminal_inferior, remote_wait_as): Update.
5132 * record-full.c (record_full_wait_1): Update.
5133 * nto-procfs.c (procfs_create_inferior): Update.
5134 * nat/fork-inferior.c (startup_inferior): Update.
5135 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
5136 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
5137 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
5138 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
5139 (mi_breakpoint_created, mi_breakpoint_deleted)
5140 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
5141 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5142 (mi_user_selected_context_changed, report_initial_inferior):
5143 Update.
5144 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
5145 (linux_nat_terminal_inferior): Update.
5146 * infrun.c (follow_fork_inferior)
5147 (handle_vfork_child_exec_or_exit, do_target_resume)
5148 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
5149 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
5150 Update.
5151 * inflow.c (child_terminal_init, info_terminal_command): Update.
5152 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
5153 (attach_command): Update.
5154 * infcall.c (call_thread_fsm_should_stop): Update.
5155 * gnu-nat.c (gnu_attach): Update.
5156 * extension.c (struct active_ext_lang_state)
5157 (restore_active_ext_lang): Update.
5158 * exceptions.c (print_flush): Update.
5159 * event-top.c (async_enable_stdin, default_quit_handler): Update.
5160 (struct quit_handler_cleanup_data, restore_quit_handler)
5161 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
5162 Remove.
5163 * cp-support.c (gdb_demangle): Update.
5164 * breakpoint.c (update_inserted_breakpoint_locations)
5165 (insert_breakpoint_locations, handle_jit_event)
5166 (disable_breakpoints_in_unloaded_shlib): Update.
5167 * annotate.c (annotate_breakpoints_invalid)
5168 (annotate_frames_invalid): Update.
5169
013af3fc
TT
51702017-09-20 Tom Tromey <tom@tromey.com>
5171
5172 * main.c (catch_command_errors): Rename from
5173 catch_command_errors_const.
5174 (captured_main_1): Update.
5175
06871ae8
PA
51762017-09-20 Pedro Alves <palves@redhat.com>
5177
5178 * cli/cli-cmds.c (list_command): Use print_sal_location.
5179 (print_sal_location): New function.
5180 (ambiguous_line_spec): Use print_sal_location.
5181 * linespec.c (symbol_to_sal): Record the symbol in the sal.
5182 * symtab.c (find_function_start_sal): Likewise.
5183 * symtab.h (symtab_and_line::symbol): New field.
5184
e5f25bc5
PA
51852017-09-20 Pedro Alves <palves@redhat.com>
5186
5187 * linespec.c (minsym_found): Handle non-text minsyms.
5188 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
5189
1b7fa39e
WT
51902017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5191
5192 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
5193 backslash.
5194
37dd0825
WT
51952017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5196
5197 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
5198 vmovups instead vmovaps.
5199 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5200
4e5a4f58
JB
52012017-09-19 John Baldwin <jhb@FreeBSD.org>
5202
5203 * NEWS (Changes since GDB 8.0): Add starti.
5204 * infcmd.c (enum run_break): New.
5205 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5206 case.
5207 (run_command): Use enum run_how.
5208 (start_command): Likewise.
5209 (starti_command): New function.
5210 (RUN_ARGS_HELP): New macro.
5211 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5212 commands. Add starti command.
5213
aa70c9f1
YQ
52142017-09-19 Yao Qi <yao.qi@linaro.org>
5215
5216 * Makefile.in (monitor.o): Remove the rule.
5217
d6541620
YQ
52182017-09-19 Yao Qi <yao.qi@linaro.org>
5219
5220 * annotate.h (struct annotate_arg_emitter): Use
5221 DISABLE_COPY_AND_ASSIGN.
5222 * common/refcounted-object.h (refcounted_object): Likewise.
5223 * completer.h (struct completion_result): Likewise.
5224 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5225 * filename-seen-cache.h (filename_seen_cache): Likewise.
5226 * gdbcore.h (thread_section_name): Likewise.
5227 * gdb_regex.h (compiled_regex): Likewise.
5228 * gdbthread.h (scoped_restore_current_thread): Likewise.
5229 * inferior.h (scoped_restore_current_inferior): Likewise.
5230 * jit.c (jit_reader): Likewise.
5231 * linespec.h (struct linespec_result): Likewise.
5232 * mi/mi-parse.h (struct mi_parse): Likewise.
5233 * nat/fork-inferior.c (execv_argv): Likewise.
5234 * progspace.h (scoped_restore_current_program_space): Likewise.
5235 * python/python-internal.h (class gdbpy_enter): Likewise.
5236 * regcache.h (regcache): Likewise.
5237 * target-descriptions.c (struct tdesc_reg): Likewise.
5238 (struct tdesc_type): Likewise.
5239 (struct tdesc_feature): Likewise.
5240 * ui-out.h (ui_out_emit_type): Likewise.
5241
0615127c
SM
52422017-09-18 Simon Marchi <simon.marchi@ericsson.com>
5243
5244 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5245 label abort_expression.
5246
5e187554
SM
52472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5248
5249 * common/buffer.c (buffer_xml_printf): Adjust.
5250 * common/xml-utils.c (xml_escape_text): Change return type to
5251 std::string, update code accordingly.
5252 * common/xml-utils.h (xml_escape_text): Change return type to
5253 std::string.
5254 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5255 * windows-tdep.c (windows_xfer_shared_library): Adjust.
5256 * unittests/xml-utils-selftests.c (test_xml_escape_text):
5257 Adjust.
5258
c3d7b541
SM
52592017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5260
5261 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5262 (SUBDIR_UNITTESTS_OBS): Add new object file.
5263 * unittests/xml-utils-selftests.c: New file.
5264
1526853e
SM
52652017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5266
5267 * common/selftest.h (selftest): New struct/interface.
5268 (register_test): Add name parameter, add new overload.
5269 (run_tests): Add filter parameter.
5270 (for_each_selftest_ftype): New typedef.
5271 (for_each_selftest): New declaration.
5272 * common/selftest.c (tests): Change type to
5273 map<string, unique_ptr<selftest>>.
5274 (simple_selftest): New struct.
5275 (register_test): New function.
5276 (register_test): Add name parameter and use it.
5277 (run_tests): Add filter parameter and use it. Add prints.
5278 Adjust to vector -> map change.
5279 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5280 registering selftests.
5281 * arm-tdep.c (_initialize_arm_tdep): Likewise.
5282 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5283 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5284 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5285 * findvar.c (_initialize_findvar): Likewise.
5286 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5287 * maint.c (maintenance_selftest): Update call to run_tests.
5288 (maintenance_info_selftests): New function.
5289 (_initialize_maint_cmds): Register "maintenance info selftests"
5290 command. Update "maintenance selftest" doc.
5291 * regcache.c (_initialize_regcache): Add names when registering
5292 selftests.
5293 * rust-exp.y (_initialize_rust_exp): Likewise.
5294 * selftest-arch.c (gdbarch_selftest): New struct.
5295 (gdbarch_tests): Remove.
5296 (register_test_foreach_arch): Add name parameter. Call
5297 register_test.
5298 (tests_with_arch): Remove, move most content to
5299 gdbarch_selftest::operator().
5300 (_initialize_selftests_foreach_arch): Remove.
5301 * selftest-arch.h (register_test_foreach_arch): Add name
5302 parameter.
5303 (run_tests_with_arch): New declaration.
5304 * utils-selftests.c (_initialize_utils_selftests): Add names
5305 when registering selftests.
5306 * utils.c (_initialize_utils): Likewise.
5307 * unittests/array-view-selftests.c
5308 (_initialize_array_view_selftests): Likewise.
5309 * unittests/environ-selftests.c (_initialize_environ_selftests):
5310 Likewise.
5311 * unittests/function-view-selftests.c
5312 (_initialize_function_view_selftests): Likewise.
5313 * unittests/offset-type-selftests.c
5314 (_initialize_offset_type_selftests): Likewise.
5315 * unittests/optional-selftests.c
5316 (_initialize_optional_selftests): Likewise.
5317 * unittests/scoped_restore-selftests.c
5318 (_initialize_scoped_restore_selftests): Likewise.
5319 * NEWS: Document "maintenance selftest" and "maint info
5320 selftests".
5321
5846367a
SM
53222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5323
5324 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5325 scoped_restore.
5326
bd77e8ff
SM
53272017-09-16 Simon Marchi <simon.marchi@ericsson.com>
5328
5329 * mi/mi-main.c (mi_load_progress): Make uiout variable
5330 a unique_ptr.
5331
26a67918
PA
53322017-09-15 Pedro Alves <palves@redhat.com>
5333
5334 * compile/compile-c-types.c (convert_enum, convert_int)
5335 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5336
3f8a7804
SM
53372017-09-15 Simon Marchi <simon.marchi@ericsson.com>
5338
5339 * dwarf2read.c (copy_string): Remove.
5340 (parse_macro_definition): Replace copy_string with savestring.
5341
8d200706
YQ
53422017-09-15 Yao Qi <yao.qi@linaro.org>
5343
5344 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5345 gdb_target_obs.
5346 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5347 Likewise.
5348 (i[34567]86-*-linux*): Likewise.
5349
d185219d
SM
53502017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5351
5352 * dwarf2expr.h (dwarf_stack_value): Add constructor.
5353 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5354 <stack>: Change type to std::vector.
5355 <stack_len, stack_allocated>: Remove.
5356 <grow_stack>: Remove.
5357 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5358 (dwarf_expr_context::~dwarf_expr_context): Remove.
5359 (dwarf_expr_context::grow_stack): Remove.
5360 (dwarf_expr_context::push): Adjust.
5361 (dwarf_expr_context::pop): Adjust.
5362 (dwarf_expr_context::fetch): Adjust.
5363 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5364 (dwarf_expr_context::stack_empty_p): Adjust.
5365 (dwarf_expr_context::execute_stack_op): Adjust.
5366
eccd80d6
SM
53672017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5368
5369 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5370 return type to bool.
5371 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5372
69009882
SM
53732017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5374
5375 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5376 Change type to bool.
5377 (dwarf_stack_value) <in_stack_memory>: Likewise.
5378 (dwarf_expr_context) <push_address>: Change parameter type to
5379 bool.
5380 <fetch_in_stack_memory>: Change return type to bool.
5381 <push>: Change parameter type to bool.
5382 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5383 to bool.
5384 (dwarf_expr_context::push_address): Likewise.
5385 (dwarf_expr_context::fetch_in_stack_memory): Change return type
5386 to bool.
5387 (dwarf_expr_context::execute_stack_op): Adjust.
5388 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5389
1e467161
SM
53902017-09-14 Simon Marchi <simon.marchi@ericsson.com>
5391
5392 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5393 (struct dwarf_expr_context) <n_pieces>: Remove.
5394 <pieces>: Change type to std::vector.
5395 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5396 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5397 pieces.
5398 (dwarf_expr_context::add_piece): Adjust.
5399 * dwarf2loc.c (struct piece_closure): Initialize fields.
5400 <n_pieces>: Remove.
5401 <pieces>: Change type to std::vector.
5402 (allocate_piece_closure): Adjust, change parameter to
5403 std::vector rvalue and std::move it to piece_closure.
5404 (rw_pieced_value): Adjust.
5405 (check_pieced_synthetic_pointer): Adjust.
5406 (indirect_synthetic_pointer): Adjust.
5407 (coerce_pieced_ref): Adjust.
5408 (free_pieced_value_closure): Adjust. Use delete to free
5409 piece_closure.
5410 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
5411 to allocate_piece_closure.
5412 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5413
0782db84
SM
54142017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5415
5416 * probe.h (probe_ops_cp): Remove typedef.
5417 (DEF_VEC_P (probe_ops_cp)): Remove.
5418 (all_probe_ops): Change type to std::vector.
5419 * probe.c (info_probes_for_ops): Adjust to vector change.
5420 (probe_linespec_to_ops): Likewise.
5421 (all_probe_ops): Change type to std::vector.
5422 (_initialize_probe): Adjust to vector change.
5423 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5424 * elfread.c (elf_get_probes): Likewise.
5425 * stap-probe.c (_initialize_stap_probe): Likewise.
5426
1eac6bea
SM
54272017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5428
5429 * probe.h (struct bound_probe): Define constructors.
5430 * probe.c (bound_probe_s): Remove typedef.
5431 (DEF_VEC_O (bound_probe_s)): Remove VEC.
5432 (collect_probes): Change return type to std::vector, remove
5433 cleanup.
5434 (compare_probes): Return bool, change parameter type. Change
5435 semantic to "less than".
5436 (gen_ui_out_table_header_info): Change parameter to std::vector
5437 and update.
5438 (exists_probe_with_pops): Likewise.
5439 (info_probes_for_ops): Update to std::vector change.
5440 (enable_probes_command): Likewise.
5441 (disable_probes_command): Likewise.
5442
aaa63a31
SM
54432017-09-12 Simon Marchi <simon.marchi@ericsson.com>
5444
5445 * probe.h (struct probe_ops) <get_probes>: Change parameter from
5446 vec to std::vector.
5447 * probe.c (parse_probes_in_pspace): Update.
5448 (find_probes_in_objfile): Update.
5449 (find_probe_by_pc): Update.
5450 (collect_probes): Update.
5451 (probe_any_get_probes): Update.
5452 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5453 return type to reference to std::vector.
5454 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5455 std::vector and update.
5456 (dtrace_process_dof): Likewise.
5457 (dtrace_get_probes): Likewise.
5458 * elfread.c (elf_get_probes): Change return type to std::vector,
5459 store an std::vector in bfd_data.
5460 (probe_key_free): Update to std::vector.
5461 * stap-probe.c (handle_stap_probe): Change parameter to
5462 std::vector and update.
5463 (stap_get_probes): Likewise.
5464 * symfile-debug.c (debug_sym_get_probes): Change return type to
5465 std::vector and update.
5466
cb85b21b
TT
54672017-09-11 Tom Tromey <tom@tromey.com>
5468
5469 * breakpoint.c (program_breakpoint_here_p): Update.
5470 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5471 from make_show_memory_breakpoints_cleanup. Return a
5472 scoped_restore_tmpl<int>.
5473 (restore_show_memory_breakpoints): Remove.
5474 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5475 * mem-break.c (memory_validate_breakpoint): Update.
5476 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5477 (ia64_memory_remove_breakpoint): Update.
5478 (ia64_breakpoint_from_pc): Update.
5479 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5480 from make_show_memory_breakpoints_cleanup.
5481
8fbc99ef
TT
54822017-09-11 Tom Tromey <tom@tromey.com>
5483
5484 * d-namespace.c (d_lookup_symbol): Use std::string.
5485 (find_symbol_in_baseclass): Likewise.
5486
50feb4bd
TT
54872017-09-11 Tom Tromey <tom@tromey.com>
5488
5489 * ctf.c (ctf_start): Use std::string.
5490
c6dc63a1
TT
54912017-09-11 Tom Tromey <tom@tromey.com>
5492
5493 * ada-lang.c (is_known_support_routine): Update.
5494 (ada_unhandled_exception_name_addr_from_raise): Update.
5495 * guile/scm-frame.c (gdbscm_frame_name): Update.
5496 * python/py-frame.c (frapy_name): Update.
5497 (frapy_function): Update.
5498 * stack.h (find_frame_funname): Update.
5499 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5500 (print_frame): Update.
5501
d6b9b80f
TT
55022017-09-11 Tom Tromey <tom@tromey.com>
5503
5504 * findcmd.c (put_bits): Take a gdb::byte_vector.
5505 (parse_find_args): Return gdb::byte_vector. "args" now const.
5506 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
5507 cleanups.
5508 (find_command): Update.
5509
a9921622
TT
55102017-09-11 Tom Tromey <tom@tromey.com>
5511
5512 * cli/cli-script.c (class scoped_restore_hook_in): New.
5513 (clear_hook_in_cleanup): Remove.
5514 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5515 scoped_restore_hook_in.
5516
be0d7abb
TT
55172017-09-11 Tom Tromey <tom@tromey.com>
5518
5519 * cli/cli-script.c (restore_interp): Remove.
5520 (read_command_lines): Use scoped_restore_interp.
5521 * interps.c (scoped_restore_interp::set_temp): Rename from
5522 interp_set_temp.
5523 * interps.h (class scoped_restore_interp): New.
5524 (interp_set_temp): Remove.
5525
00f675ff
TT
55262017-09-11 Tom Tromey <tom@tromey.com>
5527
5528 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5529 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5530 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5531 scoped_restore.
5532 (mi_cmd_break_insert_1): Update.
5533 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5534 scoped_restore.
5535
cb791d59
TT
55362017-09-11 Tom Tromey <tom@tromey.com>
5537
5538 * demangle.c (demangle_command): Update.
5539 * breakpoint.c (disable_command): Update.
5540 (enable_command): Update.
5541 (find_location_by_number): Make "number" const. Use
5542 get_number_trailer.
5543 * cli/cli-utils.c (extract_arg): Return std::string.
5544 * probe.c (parse_probe_linespec): Update. Change types.
5545 (collect_probes): Take string arguments.
5546 (parse_probe_linespec): Likewise.
5547 (info_probes_for_ops): Update.
5548 (enable_probes_command): Update.
5549 (disable_probes_command): Update.
5550 * break-catch-sig.c (catch_signal_split_args): Update.
5551 * mi/mi-parse.c (mi_parse): Update.
5552
2039bd9f
TT
55532017-09-11 Tom Tromey <tom@tromey.com>
5554
5555 * language.h (language_enum): Make argument const.
5556 * language.c (language_enum): Make argument const.
5557
f1735a53
TT
55582017-09-11 Tom Tromey <tom@tromey.com>
5559
5560 * common/common-utils.h (skip_to_space): Remove macro, redeclare
5561 as function.
5562 (skip_to_space): Rename from skip_to_space_const.
5563 * common/common-utils.c (skip_to_space): New function.
5564 (skip_to_space): Rename from skip_to_space_const.
5565 * cli/cli-utils.h (get_number): Rename from get_number_const.
5566 (extract_arg): Rename from extract_arg_const.
5567 * cli/cli-utils.c (get_number): Rename from get_number_const.
5568 (extract_arg): Rename from extract_arg_const.
5569 (number_or_range_parser::get_number): Use ::get_number.
5570 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5571 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5572 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5573 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5574 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5575 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5576 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5577 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5578
7d221d74
TT
55792017-09-11 Tom Tromey <tom@tromey.com>
5580
5581 * python/python.c (do_start_initialization): Use
5582 py-event-types.def to initialize types.
5583 Define all object type structures.
5584 * python/python-internal.h: Don't declare event initialization
5585 functions.
5586 * python/py-threadevent.c (thread_event_object_type): Don't
5587 define.
5588 * python/py-stopevent.c (stop_event_object_type): Don't define.
5589 * python/py-signalevent.c (signal_event_object_type): Don't
5590 declare or define.
5591 * python/py-newobjfileevent.c (new_objfile_event_object_type)
5592 (clear_objfiles_event_object_type): Don't declare or define.
5593 * python/py-infevents.c (inferior_call_pre_event_object_type)
5594 (inferior_call_post_event_object_type)
5595 (register_changed_event_object_type)
5596 (memory_changed_event_object_type): Don't declare or define.
5597 * python/py-inferior.c (new_thread_event_object_type)
5598 (new_inferior_event_object_type)
5599 (inferior_deleted_event_object_type): Don't declare or define.
5600 * python/py-exitedevent.c (exited_event_object_type): Don't
5601 declare or define.
5602 * python/py-evts.c (gdbpy_initialize_py_events): Use
5603 py-all-events.def.
5604 * python/py-events.h (thread_event_object_type): Don't declare.
5605 (events_object): Use py-all-events.def.
5606 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
5607 py-event-types.def.
5608 * python/py-event-types.def: New file.
5609 * python/py-continueevent.c (create_continue_event_object): Don't
5610 declare or define.
5611 * python/py-bpevent.c (breakpoint_event_object_type): Don't
5612 declare or define.
5613 * python/py-all-events.def: New file.
5614
35c61a1d
TT
56152017-09-11 Tom Tromey <tom@tromey.com>
5616
5617 * python/py-threadevent.c (create_thread_event_object): Return
5618 gdbpy_ref.
5619 * python/py-stopevent.h (create_stop_event_object)
5620 (create_breakpoint_event_object, create_signal_event_object):
5621 Update.
5622 * python/py-stopevent.c (create_stop_event_object): Return
5623 gdbpy_ref.
5624 (emit_stop_event): Update.
5625 * python/py-signalevent.c (create_signal_event_object): Return
5626 gdbpy_ref.
5627 * python/py-infevents.c (create_inferior_call_event_object):
5628 Update.
5629 * python/py-event.h (create_event_object)
5630 (create_thread_event_object): Update.
5631 * python/py-event.c (create_event_object): Return gdbpy_ref.
5632 * python/py-continueevent.c: Return gdbpy_ref.
5633 * python/py-bpevent.c (create_breakpoint_event_object): Return
5634 gdbpy_ref.
5635
7c96f8c1
TT
56362017-09-11 Tom Tromey <tom@tromey.com>
5637
5638 PR python/15622:
5639 * NEWS: Add entry.
5640 * python/python.c (do_start_initialization): Initialize new event
5641 types.
5642 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5643 (gdbpy_initialize_inferior_deleted_event)
5644 (gdbpy_initialize_new_thread_event): Declare.
5645 * python/py-threadevent.c (create_thread_event_object): Add option
5646 "thread" parameter.
5647 * python/py-inferior.c (new_thread_event_object_type)
5648 (new_inferior_event_object_type)
5649 (inferior_deleted_event_object_type): Declare.
5650 (python_new_inferior, python_inferior_deleted): New functions.
5651 (add_thread_object): Emit new_thread event.
5652 (gdbpy_initialize_inferior): Attach new functions to corresponding
5653 observers.
5654 (new_thread, new_inferior, inferior_deleted): Define new event
5655 types.
5656 * python/py-evts.c (gdbpy_initialize_py_events): Add new
5657 registries.
5658 * python/py-events.h (events_object) <new_inferior,
5659 inferior_deleted, new_thread>: New fields.
5660 * python/py-event.h (create_thread_event_breakpoint): Add optional
5661 "thread" parameter.
5662
72542b8e
AB
56632017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
5664
5665 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5666 check current_ui instead.
5667 (internal_vproblem): Likewise.
5668
0d64823e
SM
56692017-09-09 Simon Marchi <simon.marchi@ericsson.com>
5670
5671 * thread.c (print_thread_info_1): Remove unnecessary calls to
5672 uiout->is_mi_like_p.
5673
eb1e02fd
TT
56742017-09-09 Tom Tromey <tom@tromey.com>
5675
5676 * namespace.h (add_using_directive): Update.
5677 * namespace.c (add_using_directive): Change type of excludes to
5678 std::vector.
5679 * dwarf2read.c (read_import_statement): Use std::vector.
5680 (read_namespace): Update.
5681 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5682
0fc21fd8
TT
56832017-09-09 Tom Tromey <tom@tromey.com>
5684
5685 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5686
49663d05
TT
56872017-09-09 Tom Tromey <tom@tromey.com>
5688
5689 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5690
0b868b60
TT
56912017-09-09 Tom Tromey <tom@tromey.com>
5692
5693 * stack.c (func_command): Use gdb::def_vector.
5694
c0470d48
TT
56952017-09-09 Tom Tromey <tom@tromey.com>
5696
5697 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5698 ui_out_emit_list, ui_out_emit_tuple.
5699 (mi_cmd_var_update): Likewise.
5700
ca5909c7
TT
57012017-09-09 Tom Tromey <tom@tromey.com>
5702
5703 * mi/mi-interp.c (mi_user_selected_context_changed): Use
5704 ui_out_redirect_pop.
5705 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5706 ui_out_redirect_pop.
5707 * utils.c (do_ui_out_redirect_pop)
5708 (make_cleanup_ui_out_redirect_pop): Remove.
5709 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5710 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5711 * ui-out.h (ui_out_redirect_pop): New class.
5712
e6a2252a
TT
57132017-09-09 Tom Tromey <tom@tromey.com>
5714
5715 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5716 (list_available_thread_groups, mi_cmd_list_thread_groups)
5717 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5718 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5719 Likewise.
5720
393702cd
TT
57212017-09-09 Tom Tromey <tom@tromey.com>
5722
5723 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5724 ui_out_emit_tuple.
5725
76f9c9cf
TT
57262017-09-09 Tom Tromey <tom@tromey.com>
5727
5728 * target.c (flash_erase_command): Use ui_out_emit_tuple.
5729 * stack.c (print_frame): Use ui_out_emit_tuple.
5730 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5731 (info_spu_mailbox_command, info_spu_dma_command)
5732 (info_spu_proxydma_command): Likewise.
5733 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5734 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5735 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5736 ui_out_emit_tuple.
5737 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5738
dc9fe180
TT
57392017-09-09 Tom Tromey <tom@tromey.com>
5740
5741 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5742 (class ui_out_emit_table): Update comment.
5743 * ui-out.c (do_cleanup_table_end)
5744 (make_cleanup_ui_out_table_begin_end): Remove.
5745 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5746 (info_spu_dma_cmdlist): Likewise.
5747 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5748 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5749 ui_out_emit_table.
5750
f8cc3da6
TT
57512017-09-09 Tom Tromey <tom@tromey.com>
5752
5753 * thread.c (print_thread_info_1): Use ui_out_emit_table,
5754 ui_out_emit_list, gdb::optional.
5755
481695ed
JB
57562017-09-09 John Baldwin <jhb@FreeBSD.org>
5757
5758 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5759 prototype.
5760 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5761 prototype.
5762 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5763 prototype.
5764 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5765 * ada-exp.y: Remove _initialize_ada_exp prototype.
5766 * ada-lang.c: Remove _initialize_ada_language prototype.
5767 * ada-tasks.c: Remove _initialize_tasks prototype.
5768 * addrmap.c: Remove _initialize_addrmap prototype.
5769 * agent.c: Remove _initialize_agent prototype.
5770 * aix-thread.c: Remove _initialize_aix_thread prototype.
5771 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5772 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5773 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5774 prototype.
5775 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5776 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5777 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5778 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5779 prototype.
5780 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5781 prototype.
5782 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5783 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5784 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5785 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5786 prototype.
5787 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5788 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5789 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5790 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5791 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5792 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5793 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5794 prototype.
5795 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5796 prototype.
5797 * annotate.c: Remove _initialize_annotate prototype.
5798 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5799 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5800 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5801 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5802 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5803 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5804 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5805 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5806 prototype.
5807 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5808 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5809 * auto-load.c: Remove _initialize_auto_load prototype.
5810 * auxv.c: Remove _initialize_auxv prototype.
5811 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5812 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5813 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5814 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5815 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5816 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5817 prototype.
5818 * break-catch-throw.c: Remove _initialize_break_catch_throw
5819 prototype.
5820 * breakpoint.c: Remove _initialize_breakpoint prototype.
5821 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5822 * btrace.c: Remove _initialize_btrace prototype.
5823 * charset.c: Remove _initialize_charset prototype.
5824 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5825 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5826 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5827 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5828 * cli/cli-script.c: Remove _initialize_cli_script prototype.
5829 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5830 * coffread.c: Remove _initialize_coffread prototype.
5831 * compile/compile.c: Remove _initialize_compile prototype.
5832 * complaints.c: Remove _initialize_complaints prototype.
5833 * completer.c: Remove _initialize_completer prototype.
5834 * copying.awk: Remove _initialize_copying prototype.
5835 * copying.c: Regenerate.
5836 * core-regset.c: Remove _initialize_core_regset prototype.
5837 * corefile.c: Remove _initialize_core prototype.
5838 * corelow.c: Remove _initialize_corelow prototype.
5839 * cp-abi.c: Remove _initialize_cp_abi prototype.
5840 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5841 * cp-support.c: Remove _initialize_cp_support prototype.
5842 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5843 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5844 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5845 * ctf.c: Remove _initialize_ctf prototype.
5846 * d-lang.c: Remove _initialize_d_language prototype.
5847 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5848 prototype.
5849 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5850 * dbxread.c: Remove _initialize_dbxread prototype.
5851 * dcache.c: Remove _initialize_dcache prototype.
5852 * demangle.c: Remove _initialize_demangler prototype.
5853 * disasm-selftests.c: Remove _initialize_disasm_selftests
5854 prototype.
5855 * disasm.c: Remove _initialize_disasm prototype.
5856 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5857 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5858 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5859 prototype.
5860 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5861 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5862 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5863 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5864 * elfread.c: Remove _initialize_elfread prototype.
5865 * exec.c: Remove _initialize_exec prototype.
5866 * extension.c: Remove _initialize_extension prototype.
5867 * f-lang.c: Remove _initialize_f_language prototype.
5868 * f-valprint.c: Remove _initialize_f_valprint prototype.
5869 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5870 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5871 * filesystem.c: Remove _initialize_filesystem prototype.
5872 * findcmd.c: Remove _initialize_mem_search prototype.
5873 * fork-child.c: Remove _initialize_fork_child prototype.
5874 * frame-base.c: Remove _initialize_frame_base prototype.
5875 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5876 * frame.c: Remove _initialize_frame prototype.
5877 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5878 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5879 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5880 * gcore.c: Remove _initialize_gcore prototype.
5881 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5882 * gdbarch.c: Regenerate.
5883 * gdbarch.sh: Remove _initialize_gdbarch prototype.
5884 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5885 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5886 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5887 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5888 * go-lang.c: Remove _initialize_go_language prototype.
5889 * go32-nat.c: Remove _initialize_go32_nat prototype.
5890 * guile/guile.c: Remove _initialize_guile prototype.
5891 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5892 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5893 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5894 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5895 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5896 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5897 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5898 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5899 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5900 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5901 prototype.
5902 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5903 prototype.
5904 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5905 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5906 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5907 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5908 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5909 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5910 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5911 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5912 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5913 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5914 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5915 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5916 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5917 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5918 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5919 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5920 prototype.
5921 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5922 prototype.
5923 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5924 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5925 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5926 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5927 * infcall.c: Remove _initialize_infcall prototype.
5928 * infcmd.c: Remove _initialize_infcmd prototype.
5929 * inferior.c: Remove _initialize_inferiors prototype.
5930 * inflow.c: Remove _initialize_inflow prototype.
5931 * infrun.c: Remove _initialize_infrun prototype.
5932 * interps.c: Remove _initialize_interpreter prototype.
5933 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5934 * jit.c: Remove _initialize_jit prototype.
5935 * language.c: Remove _initialize_language prototype.
5936 * linux-fork.c: Remove _initialize_linux_fork prototype.
5937 * linux-nat.c: Remove _initialize_linux_nat prototype.
5938 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5939 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5940 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5941 * m2-lang.c: Remove _initialize_m2_language prototype.
5942 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5943 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5944 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5945 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5946 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5947 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5948 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5949 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5950 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5951 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5952 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5953 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5954 * machoread.c: Remove _initialize_machoread prototype.
5955 * macrocmd.c: Remove _initialize_macrocmd prototype.
5956 * macroscope.c: Remove _initialize_macroscope prototype.
5957 * maint.c: Remove _initialize_maint_cmds prototype.
5958 * mdebugread.c: Remove _initialize_mdebugread prototype.
5959 * memattr.c: Remove _initialize_mem prototype.
5960 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5961 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5962 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5963 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5964 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5965 * microblaze-linux-tdep.c: Remove
5966 _initialize_microblaze_linux_tdep prototype.
5967 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5968 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5969 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5970 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5971 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5972 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5973 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5974 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5975 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5976 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5977 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5978 prototype.
5979 * mipsread.c: Remove _initialize_mipsread prototype.
5980 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5981 prototype.
5982 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5983 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5984 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5985 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5986 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5987 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5988 prototype.
5989 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5990 * nto-procfs.c: Remove _initialize_procfs prototype.
5991 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5992 * objc-lang.c: Remove _initialize_objc_language prototype.
5993 * objfiles.c: Remove _initialize_objfiles prototype.
5994 * observer.c: Remove observer_test_first_notification_function,
5995 observer_test_second_notification_function,
5996 observer_test_third_notification_function, and
5997 _initialize_observer prototypes.
5998 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5999 * osabi.c: Remove _initialize_gdb_osabi prototype.
6000 * osdata.c: Remove _initialize_osdata prototype.
6001 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6002 * parse.c: Remove _initialize_parse prototype.
6003 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6004 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6005 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6006 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6007 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6008 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6009 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6010 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6011 * printcmd.c: Remove _initialize_printcmd prototype.
6012 * probe.c: Remove _initialize_probe prototype.
6013 * proc-api.c: Remove _initialize_proc_api prototype.
6014 * proc-events.c: Remove _initialize_proc_events prototype.
6015 * proc-service.c: Remove _initialize_proc_service prototype.
6016 * procfs.c: Remove _initialize_procfs prototype.
6017 * psymtab.c: Remove _initialize_psymtab prototype.
6018 * python/python.c: Remove _initialize_python prototype.
6019 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6020 * record-btrace.c: Remove _initialize_record_btrace prototype.
6021 * record-full.c: Remove _initialize_record_full prototype.
6022 * record.c: Remove _initialize_record prototype.
6023 * regcache.c: Remove _initialize_regcache prototype.
6024 * reggroups.c: Remove _initialize_reggroup prototype.
6025 * remote-notif.c: Remove _initialize_notif prototype.
6026 * remote-sim.c: Remove _initialize_remote_sim prototype.
6027 * remote.c: Remove _initialize_remote prototype.
6028 * reverse.c: Remove _initialize_reverse prototype.
6029 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6030 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6031 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6032 prototype.
6033 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6034 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6035 * rust-exp.y: Remove _initialize_rust_exp prototype.
6036 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6037 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6038 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6039 * score-tdep.c: Remove _initialize_score_tdep prototype.
6040 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6041 prototype.
6042 * ser-go32.c: Remove _initialize_ser_dos prototype.
6043 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6044 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6045 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6046 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6047 * serial.c: Remove _initialize_serial prototype.
6048 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6049 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6050 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6051 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6052 * skip.c: Remove _initialize_step_skip prototype.
6053 * sol-thread.c: Remove _initialize_sol_thread prototype.
6054 * solib-aix.c: Remove _initialize_solib_aix prototype.
6055 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6056 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6057 * solib-frv.c: Remove _initialize_frv_solib prototype.
6058 * solib-spu.c: Remove _initialize_spu_solib prototype.
6059 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6060 * solib-target.c: Remove _initialize_solib_target prototype.
6061 * solib.c: Remove _initialize_solib prototype.
6062 * source.c: Remove _initialize_source prototype.
6063 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6064 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6065 prototype.
6066 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6067 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6068 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6069 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6070 prototype.
6071 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6072 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6073 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6074 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6075 prototype.
6076 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6077 prototype.
6078 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6079 prototype.
6080 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6081 prototype.
6082 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6083 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
6084 prototype.
6085 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
6086 prototype.
6087 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
6088 prototype.
6089 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
6090 prototype.
6091 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
6092 prototype.
6093 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
6094 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
6095 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
6096 * stabsread.c: Remove _initialize_stabsread prototype.
6097 * stack.c: Remove _initialize_stack prototype.
6098 * stap-probe.c: Remove _initialize_stap_probe prototype.
6099 * std-regs.c: Remove _initialize_frame_reg prototype.
6100 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
6101 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
6102 * symfile.c: Remove _initialize_symfile prototype.
6103 * symmisc.c: Remove _initialize_symmisc prototype.
6104 * symtab.c: Remove _initialize_symtab prototype.
6105 * target-dcache.c: Remove _initialize_target_dcache prototype.
6106 * target-descriptions.c: Remove _initialize_target_descriptions
6107 prototype.
6108 * thread.c: Remove _initialize_thread prototype.
6109 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
6110 prototype.
6111 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
6112 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
6113 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
6114 prototype.
6115 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
6116 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
6117 * tracefile.c: Remove _initialize_tracefile prototype.
6118 * tracepoint.c: Remove _initialize_tracepoint prototype.
6119 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
6120 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
6121 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
6122 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
6123 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
6124 * tui/tui-win.c: Remove _initialize_tui_win prototype.
6125 * tui/tui.c: Remove _initialize_tui prototype.
6126 * typeprint.c: Remove _initialize_typeprint prototype.
6127 * user-regs.c: Remove _initialize_user_regs prototype.
6128 * utils.c: Remove _initialize_utils prototype.
6129 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
6130 * valarith.c: Remove _initialize_valarith prototype.
6131 * valops.c: Remove _initialize_valops prototype.
6132 * valprint.c: Remove _initialize_valprint prototype.
6133 * value.c: Remove _initialize_values prototype.
6134 * varobj.c: Remove _initialize_varobj prototype.
6135 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
6136 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
6137 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
6138 * windows-nat.c: Remove _initialize_windows_nat,
6139 _initialize_check_for_gdb_ini, and _initialize_loadable
6140 prototypes.
6141 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
6142 * xcoffread.c: Remove _initialize_xcoffread prototype.
6143 * xml-support.c: Remove _initialize_xml_support prototype.
6144 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
6145 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
6146 prototype.
6147 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
6148 prototype.
6149 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
6150
a611b5cb
KS
61512017-09-08 Keith Seitz <keiths@redhat.com>
6152
6153 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
6154 field.
6155
469412dd
CW
61562017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
6157
6158 * f-valprint.c (f_val_print): Remove check for one byte
6159 sized integers. Remove printing of character type.
6160
a5ad232b
FP
61612017-09-08 Frank Penczek <frank.penczek@intel.com>
6162 Christoph Weinmann <christoph.t.weinmann@intel.com>
6163 Bernhard Heckel <bernhard.heckel@intel.com>
6164
6165 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
6166 to maintain proper indentation when printing pointers/refs.
6167
e5014227
JB
61682017-09-07 Joel Brobecker <brobecker@adacore.com>
6169
6170 GDB 8.0.1 released.
6171
63c99141
JB
61722017-09-07 Joel Brobecker <brobecker@adacore.com>
6173
6174 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
6175
69c1e056
TT
61762017-09-05 Tom Tromey <tom@tromey.com>
6177
6178 * parse.c (funcall_chain): Now a std::vector.
6179 (start_arglist, end_arglist): Simplify.
6180 (free_funcalls): Remove.
6181 (parse_exp_in_context_1): Remove cleanup.
6182
fef704bf
TT
61832017-09-05 Tom Tromey <tom@tromey.com>
6184
6185 * go-exp.y (go_parse): Don't create a cleanup.
6186
5613c585
TT
61872017-09-05 Tom Tromey <tom@tromey.com>
6188
6189 * d-exp.y (PrimaryExpression): Use std::string.
6190 (d_parse): Don't create a cleanup.
6191
eae49211
TT
61922017-09-05 Tom Tromey <tom@tromey.com>
6193
6194 * utils.c (do_clear_parser_state): Remove.
6195 (make_cleanup_clear_parser_state): Remove.
6196 * p-exp.y (pascal_parse): Use scoped_restore.
6197 * m2-exp.y (m2_parse): Use scoped_restore.
6198 * f-exp.y (f_parse): Use scoped_restore.
6199 * d-exp.y (d_parse): Use scoped_restore.
6200 * c-exp.y (c_parse): Use scoped_restore.
6201 * ada-exp.y (ada_parse): Use scoped_restore.
6202 * utils.h (make_cleanup_clear_parser_state): Remove.
6203
73b9be8b
KS
62042017-09-06 Keith Seitz <keiths@redhat.com>
6205
6206 * dwarf2read.c (dw2_linkage_name_attr): New function.
6207 (dw2_linkage_name): New function.
6208 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6209 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6210 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6211
a102602b
KR
62122017-09-06 Kamil Rytarowski <n54@gmx.com>
6213
6214 * config/djgpp/djconfig.sh: Correct shell portability issue.
6215
28ad437d
KR
62162017-09-06 Kamil Rytarowski <n54@gmx.com>
6217
6218 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6219
351787dd
JB
62202017-09-06 John Baldwin <jhb@FreeBSD.org>
6221
6222 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6223 * NEWS: Mention new FreeBSD/mips native configuration.
6224 * configure.host: Add aarch64*-*-freebsd*.
6225 * configure.nat: Likewise.
6226 * aarch64-fbsd-nat.c: New file.
6227
c0f84956
JB
62282017-09-06 John Baldwin <jhb@FreeBSD.org>
6229
6230 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6231 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6232 * NEWS: Mention new FreeBSD/aarch64 target.
6233 * configure.tgt: Add aarch64*-*-freebsd*.
6234 * aarch64-fbsd-tdep.c: New file.
6235 * aarch64-fbsd-tdep.h: New file.
6236
7610297a
KR
62372017-09-06 Kamil Rytarowski <n54@gmx.com>
6238
6239 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6240
fbd1b771
JK
62412017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6242
6243 * parse.c (find_minsym_type_and_address): Don't relocate addresses
6244 of TLS symbols.
6245
5ca79eae
PW
62462017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6247
6248 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6249 call.
6250
bf93d7ba
SM
62512017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6252
6253 * infrun.c (follow_exec): Call add_thread after
6254 target_find_description.
6255
1bb7c059
SM
62562017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6257
6258 * infrun.c (handle_inferior_event_1): When exec'ing, read
6259 stop_pc after follow_exec.
6260
fc809827
SM
62612017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6262
6263 * remote.c (process_g_packet): Update error message.
6264
d2fcdd85
YQ
62652017-09-05 Yao Qi <yao.qi@linaro.org>
6266
6267 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6268 targets.
6269
e69570ee
PA
62702017-09-05 Pedro Alves <palves@redhat.com>
6271
6272 * eval.c (eval_call, evaluate_funcall): New functions, factored
6273 out from ...
6274 (evaluate_subexp_standard): ... this.
6275
22916b07
YQ
62762017-09-05 Yao Qi <yao.qi@linaro.org>
6277
6278 * amd64-tdep.c (amd64_target_description): Create target
6279 descriptions.
6280 (_initialize_amd64_tdep): Don't call functions
6281 initialize_tdesc_amd64_*. Add self tests.
6282 * arch/amd64.c (amd64_create_target_description): Add parameter
6283 is_linux. Call set_tdesc_osabi if is_linux is true.
6284 * arch/amd64.h (amd64_create_target_description): Update the
6285 declaration.
6286 * arch/i386.c (i386_create_target_description): Add parameter
6287 is_linux. Call set_tdesc_osabi if is_linux is true.
6288 * arch/i386.h (i386_create_target_description): Update
6289 declaration.
6290 * configure.tgt: Add i386.o to gdb_target_obs.
6291 * features/Makefile (XMLTOC): Remove i386/*.xml.
6292 * features/i386/amd64-avx-avx512.c: Remove.
6293 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6294 * features/i386/amd64-avx-mpx.c: Remove.
6295 * features/i386/amd64-avx.c: Remove.
6296 * features/i386/amd64-mpx.c: Remove.
6297 * features/i386/amd64.c: Remove.
6298 * features/i386/i386-avx-avx512.c: Remove.
6299 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6300 * features/i386/i386-avx-mpx.c: Remove.
6301 * features/i386/i386-avx.c: Remove.
6302 * features/i386/i386-mmx.c: Remove.
6303 * features/i386/i386-mpx.c: Remove.
6304 * features/i386/i386.c: Remove.
6305 * i386-tdep.c: Don't include features/i386/i386*.c., include
6306 target-descriptions.h and arch/i386.h.
6307 (i386_target_description): Create target descriptions.
6308 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6309 functions. Do self tests.
6310
0854b7b1
YQ
63112017-09-05 Yao Qi <yao.qi@linaro.org>
6312
6313 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6314 * features/i386/amd64-avx-avx512-linux.c: Removed.
6315 * features/i386/amd64-avx-linux.c: Removed.
6316 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6317 * features/i386/amd64-avx-mpx-linux.c: Removed.
6318 * features/i386/amd64-linux.c: Removed.
6319 * features/i386/amd64-mpx-linux.c: Removed.
6320 * features/i386/x32-avx-avx512-linux.c: Removed.
6321 * features/i386/x32-avx-linux.c: Removed.
6322 * features/i386/x32-linux.c: Removed.
6323
b4570e4b
YQ
63242017-09-05 Yao Qi <yao.qi@linaro.org>
6325
6326 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
6327 features/i386/*.c.
6328 (amd64_linux_read_description): Call
6329 amd64_create_target_description.
6330 * arch/amd64.c: New file.
6331 * arch/amd64.h: New file.
6332 * configure.tgt (x86_64-*-linux*): Append amd64.o.
6333 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6334
6c73f67f
YQ
63352017-09-05 Yao Qi <yao.qi@linaro.org>
6336
6337 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6338 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
6339 (amd64_linux_read_description): Create target descriptions.
6340 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6341 functions. Add unit tests.
6342 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6343 x32-core.xml.
6344 * features/i386/64bit-avx.c: Generated.
6345 * features/i386/64bit-avx512.c: Generated.
6346 * features/i386/64bit-core.c: Generated.
6347 * features/i386/64bit-linux.c: Generated.
6348 * features/i386/64bit-mpx.c: Generated.
6349 * features/i386/64bit-pkeys.c: Generated.
6350 * features/i386/64bit-segments.c: Generated.
6351 * features/i386/64bit-sse.c: Generated.
6352 * features/i386/x32-core.c: Generated.
6353 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6354 c files for amd64-linux and x32-linux.
6355
9d3d478b
YQ
63562017-09-05 Yao Qi <yao.qi@linaro.org>
6357
6358 * amd64-linux-tdep.c (amd64_linux_read_description): New
6359 function.
6360 (amd64_linux_core_read_description): Call
6361 amd64_linux_read_description.
6362 (amd64_linux_init_abi): Likewise.
6363 (amd64_x32_linux_init_abi): Likewise.
6364 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6365 * x86-linux-nat.c (x86_linux_read_description): Call
6366 amd64_linux_read_description.
6367
b9f1d50f
YQ
63682017-09-05 Yao Qi <yao.qi@linaro.org>
6369
6370 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6371 comments.
6372
188c9e6d
YQ
63732017-09-05 Yao Qi <yao.qi@linaro.org>
6374
6375 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6376 * features/i386/i386-avx-avx512-linux.c: Remove.
6377 * features/i386/i386-avx-linux.c: Remove.
6378 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6379 * features/i386/i386-avx-mpx-linux.c: Remove.
6380 * features/i386/i386-linux.c: Remove.
6381 * features/i386/i386-mmx-linux.c: Remove.
6382 * features/i386/i386-mpx-linux.c: Remove.
6383
5f035c07
YQ
63842017-09-05 Yao Qi <yao.qi@linaro.org>
6385
6386 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6387 (SFILES): Add arch/i386.c.
6388 (HFILES_NO_SRCDIR): Add arch/i386.h.
6389 * arch/i386.c: New file.
6390 * arch/i386.h: New file.
6391 * arch/tdesc.h (allocate_target_description): Declare.
6392 (set_tdesc_architecture): Declare.
6393 (set_tdesc_osabi): Declare.
6394 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6395 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6396 include arch/i386.h.
6397 (i386_linux_read_description): Remove code and call
6398 i386_create_target_description.
6399 (set_tdesc_architecture): New function.
6400 (set_tdesc_osabi): New function.
6401 * target-descriptions.h (allocate_target_description): Remove.
6402
0abe8a89
YQ
64032017-09-05 Yao Qi <yao.qi@linaro.org>
6404
6405 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6406 * target-descriptions.c (tdesc_create_feature): Likewise, and
6407 adjust code.
6408 * features/i386/32bit-avx.c: Re-generated.
6409 * features/i386/32bit-avx512.c: Re-generated.
6410 * features/i386/32bit-core.c: Re-generated.
6411 * features/i386/32bit-linux.c: Re-generated.
6412 * features/i386/32bit-mpx.c: Re-generated.
6413 * features/i386/32bit-pkeys.c: Re-generated.
6414 * features/i386/32bit-sse.c: Re-generated.
6415
0a188386
YQ
64162017-09-05 Yao Qi <yao.qi@linaro.org>
6417
6418 * regformats/regdef.h (struct reg): Override operator == and !=.
6419
f49ff000
YQ
64202017-09-05 Yao Qi <yao.qi@linaro.org>
6421
6422 * arch/tdesc.h: New file.
6423 * regformats/regdat.sh: Generate code using tdesc_create_reg.
6424 * target-descriptions.c: Update comments.
6425 * target-descriptions.h: Include "arch/tdesc.h". Remove the
6426 declarations.
6427 * features/i386/32bit-avx.c: Re-generated.
6428 * features/i386/32bit-avx512.c: Re-generated.
6429 * features/i386/32bit-core.c: Re-generated.
6430 * features/i386/32bit-linux.c: Re-generated.
6431 * features/i386/32bit-mpx.c: Re-generated.
6432 * features/i386/32bit-pkeys.c: Re-generated.
6433 * features/i386/32bit-sse.c: Re-generated.
6434
f7000548
YQ
64352017-09-05 Yao Qi <yao.qi@linaro.org>
6436
6437 * regformats/regdat.sh: Update generated code.
6438
c9a5e2a5
YQ
64392017-09-05 Yao Qi <yao.qi@linaro.org>
6440
6441 * regformats/regdat.sh: Adjust code order.
6442
d6b687ac
SM
64432017-09-05 Simon Marchi <simon.marchi@ericsson.com>
6444
6445 * expprint.c (dump_subexp_body_standard): Use constant format
6446 string in fprintf_filtered call.
6447
a379bfd0
JB
64482017-09-04 John Baldwin <jhb@FreeBSD.org>
6449
6450 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6451 NetBSD/i386.
6452 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6453
f7efc967
JB
64542017-09-04 John Baldwin <jhb@FreeBSD.org>
6455
6456 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6457
c49fbc6c
JB
64582017-09-04 John Baldwin <jhb@FreeBSD.org>
6459
6460 * bsd-kvm.o: Define _KMEMUSER.
6461 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6462 * configure: Regenerate.
6463
26562e73
JB
64642017-09-04 John Baldwin <jhb@FreeBSD.org>
6465
6466 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6467 * i386-fbsd-nat.c: Likewise.
6468
31cf1487
JB
64692017-09-04 John Baldwin <jhb@FreeBSD.org>
6470
6471 * unittests/array-view-selftests.c: Add include of <array>.
6472
5b9f8a7c
JB
64732017-09-04 John Baldwin <jhb@FreeBSD.org>
6474
6475 * spu-tdep.c (flush_ea_cache): Add missing argument to
6476 call_function_by_hand.
6477
d69cf9b2
PA
64782017-09-04 Pedro Alves <palves@redhat.com>
6479
6480 * NEWS (Safer support for debugging with no debug info): New.
6481
3693fdb3
PA
64822017-09-04 Pedro Alves <palves@redhat.com>
6483
6484 * c-exp.y (function_method, function_method_void): Add current
6485 instance flags to TYPE_INSTANCE.
6486 * dwarf2read.c (check_modifier): New.
6487 (compute_delayed_physnames): Assert that only C++ adds delayed
6488 physnames. Mark fn_fields as const/volatile depending on
6489 physname.
6490 * eval.c (make_params): New type_instance_flags parameter. Use
6491 it as the new type's instance flags.
6492 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6493 flags element and pass it to make_params.
6494 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6495 instance flags element.
6496 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6497 * gdbtypes.h: Include "enum-flags.h".
6498 (type_instance_flags): New enum-flags type.
6499 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6500 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6501 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6502 (follow_type_instance_flags): New function.
6503 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6504 * parser-defs.h (follow_type_instance_flags): Declare.
6505 * valops.c (value_struct_elt_for_reference): const/volatile must
6506 match too.
6507
e68cb8e0
PA
65082017-09-04 Pedro Alves <palves@redhat.com>
6509
6510 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6511 function/method scopes; lookup the nested name as a function local
6512 static variable.
6513
858be34c
PA
65142017-09-04 Pedro Alves <palves@redhat.com>
6515
6516 (%type <voidval>): Add function_method.
6517 * c-exp.y (exp): New production for calls with no arguments.
6518 (function_method, function_method_void_or_typelist): New
6519 productions.
6520 (exp): New production for "method()::static_var".
6521 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6522 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6523 Handle OP_FUNC_STATIC_VAR.
6524 * parse.c (operator_length_standard):
6525 Handle OP_FUNC_STATIC_VAR.
6526
dd5901a6
PA
65272017-09-04 Pedro Alves <palves@redhat.com>
6528
6529 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6530 handling.
6531 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6532 Ditto.
6533 * parse.c (operator_length_standard, operator_check_standard):
6534 Ditto.
6535 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6536
46a4882b
PA
65372017-09-04 Pedro Alves <palves@redhat.com>
6538
6539 * ax-gdb.c: Include "typeprint.h".
6540 (gen_expr_for_cast): New function.
6541 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6542 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6543 type is unknown.
6544 * dwarf2read.c (new_symbol_full): Fallback to int instead of
6545 nodebug_data_symbol.
6546 * eval.c: Include "typeprint.h".
6547 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6548 Error out if symbol has unknown type.
6549 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6550 evaluate_subexp_for_cast.
6551 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6552 OP_VAR_MSYM_VALUE.
6553 (evaluate_subexp_for_cast): New function.
6554 * gdbtypes.c (init_nodebug_var_type): New function.
6555 (objfile_type): Use it to initialize types of variables with no
6556 debug info.
6557 * typeprint.c (error_unknown_type): New.
6558 * typeprint.h (error_unknown_type): New declaration.
6559 * compile/compile-c-types.c (convert_type_basic): Handle
6560 TYPE_CODE_ERROR; warn and fallback to int for variables with
6561 unknown type.
6562
fe13dfec
PA
65632017-09-04 Pedro Alves <palves@redhat.com>
6564
6565 * eval.c (evaluate_var_value): New function, factored out from ...
6566 (evaluate_subexp_standard): ... here.
6567
d008ee21
PA
65682017-09-04 Pedro Alves <palves@redhat.com>
6569
6570 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6571 Remove useless assignments to 'op'.
6572
827d0c51
PA
65732017-09-04 Pedro Alves <palves@redhat.com>
6574
6575 * eval.c (eval_skip_value): New function.
6576 (evaluate_subexp_standard): Use it.
6577
2c5a2be1
PA
65782017-09-04 Pedro Alves <palves@redhat.com>
6579
6580 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6581 function name from symbol/minsym and pass it to
6582 error_call_unknown_return_type.
6583
74ea4be4
PA
65842017-09-04 Pedro Alves <palves@redhat.com>
6585
6586 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6587 * ax-gdb.c (gen_msym_var_ref): New function.
6588 (gen_expr): Handle OP_VAR_MSYM_VALUE.
6589 * eval.c (evaluate_var_msym_value): New function.
6590 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6591 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6592 to call_function_by_hand.
6593 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6594 Handle OP_VAR_MSYM_VALUE.
6595 (union exp_element) <msymbol>: New field.
6596 * minsyms.h (struct type): Forward declare.
6597 (find_minsym_type_and_address): Declare.
6598 * parse.c (write_exp_elt_msym): New function.
6599 (write_exp_msymbol): Delete, refactored as ...
6600 (find_minsym_type_and_address): ... this new function.
6601 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6602 (operator_length_standard, operator_check_standard): Handle
6603 OP_VAR_MSYM_VALUE.
6604 * std-operator.def (OP_VAR_MSYM_VALUE): New.
6605
7022349d
PA
66062017-09-04 Pedro Alves <palves@redhat.com>
6607
6608 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6609 TYPE_GNU_IFUNC specially here. Throw error if return type is
6610 unknown.
6611 * ada-typeprint.c (print_func_type): Handle functions with unknown
6612 return type.
6613 * c-typeprint.c (c_type_print_base): Handle functions and methods
6614 with unknown return type.
6615 * compile/compile-c-symbols.c (convert_symbol_bmsym)
6616 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6617 * compile/compile-c-types.c: Include "objfiles.h".
6618 (convert_func): For functions with unknown return type, warn and
6619 default to int.
6620 * compile/compile-object-run.c (compile_object_run): Adjust call
6621 to call_function_by_hand_dummy.
6622 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6623 call_function_by_hand.
6624 * eval.c (evaluate_subexp_standard): Adjust calls to
6625 call_function_by_hand. Handle functions and methods with unknown
6626 return type. Pass expect_type to call_function_by_hand.
6627 * f-typeprint.c (f_type_print_base): Handle functions with unknown
6628 return type.
6629 * gcore.c (call_target_sbrk): Adjust call to
6630 call_function_by_hand.
6631 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6632 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
6633 an integer address type instead of nodebug.
6634 * guile/scm-value.c (gdbscm_value_call): Adjust call to
6635 call_function_by_hand.
6636 * infcall.c (error_call_unknown_return_type): New function.
6637 (call_function_by_hand): New "default_return_type" parameter.
6638 Pass it down.
6639 (call_function_by_hand_dummy): New "default_return_type"
6640 parameter. Use it instead of defaulting to int. If there's no
6641 default and the return type is unknown, throw an error. If
6642 there's a default return type, and the called function has no
6643 debug info, then assume the function is prototyped.
6644 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6645 New "default_return_type" parameter.
6646 (error_call_unknown_return_type): New declaration.
6647 * linux-fork.c (call_lseek): Cast return type of lseek.
6648 (inferior_call_waitpid, checkpoint_command): Adjust calls to
6649 call_function_by_hand.
6650 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6651 calls to call_function_by_hand.
6652 * m2-typeprint.c (m2_procedure): Handle functions with unknown
6653 return type.
6654 * objc-lang.c (lookup_objc_class, lookup_child_selector)
6655 (value_nsstring, print_object_command): Adjust calls to
6656 call_function_by_hand.
6657 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6658 functions with unknown return type.
6659 (pascal_type_print_func_varspec_suffix): New function.
6660 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6661 TYPE_CODE_METHOD>: Use it.
6662 * python/py-value.c (valpy_call): Adjust call to
6663 call_function_by_hand.
6664 * rust-lang.c (rust_evaluate_funcall): Adjust call to
6665 call_function_by_hand.
6666 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6667 call_function_by_hand.
6668 * valops.c (value_allocate_space_in_inferior): Adjust call to
6669 call_function_by_hand.
6670 * typeprint.c (type_print_unknown_return_type): New function.
6671 * typeprint.h (type_print_unknown_return_type): New declaration.
6672
54990598
PA
66732017-09-04 Pedro Alves <palves@redhat.com>
6674
6675 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6676 types with more than one parameter as prototyped.
6677
9a24775b
PA
66782017-09-04 Pedro Alves <palves@redhat.com>
6679
6680 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6681 (disassemble_command): Use gdb_disassembly_flags instead of bare
6682 int.
6683 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6684 (dump_insns, do_mixed_source_and_assembly_deprecated)
6685 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6686 Use gdb_disassembly_flags instead of bare int.
6687 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6688 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6689 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6690 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
6691 (enum gdb_disassembly_flag): ... values of this new enumeration.
6692 (gdb_disassembly_flags): Define.
6693 (gdb_disassembly)
6694 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6695 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6696 gdb_disassembly_flags instead of bare int.
6697 * record-btrace.c (btrace_insn_history)
6698 (record_btrace_insn_history, record_btrace_insn_history_range)
6699 (record_btrace_insn_history_from): Use gdb_disassembly_flags
6700 instead of bare int.
6701 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6702 Use gdb_disassembly_flags instead of bare int.
6703 * target-debug.h (target_debug_print_gdb_disassembly_flags):
6704 Define.
6705 * target-delegates.c: Regenerate.
6706 * target.c (target_insn_history, target_insn_history_from)
6707 (target_insn_history_range): Use gdb_disassembly_flags instead of
6708 bare int.
6709 * target.h: Include "disasm.h".
6710 (struct target_ops) <to_insn_history, to_insn_history_from,
6711 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6712 int.
6713 (target_insn_history, target_insn_history_from)
6714 (target_insn_history_range): Use gdb_disassembly_flags instead of
6715 bare int.
6716
80a65e9b
SM
67172017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6718
6719 * cli/cli-script.c (build_command_line): For if/while commands,
6720 check whether args is empty.
6721
6b66338c
SM
67222017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6723
6724 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
6725 (enum command_control_type): Likewise.
6726 (struct command_line): Likewise.
6727 (free_command_lines): Likewise.
6728 (struct command_lines_deleter): Likewise.
6729 (command_line_up): Likewise.
6730 (read_command_lines): Likewise.
6731 (read_command_lines_1): Likewise.
6732 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6733 (enum command_control_type): Likewise.
6734 (struct command_line): Likewise.
6735 (free_command_lines): Likewise.
6736 (struct command_lines_deleter): Likewise.
6737 (command_line_up): Likewise.
6738 (read_command_lines): Likewise.
6739 (read_command_lines_1): Likewise.
6740 * breakpoint.h: Include cli/cli-script.h.
6741 * extension-priv.h: Likewise.
6742 * gdbcmd.h: Likewise.
6743
51abb421
PA
67442017-09-04 Pedro Alves <palves@redhat.com>
6745
6746 * ada-lang.c (is_known_support_routine): Move sal declaration to
6747 where it is initialized.
6748 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6749 (parse_breakpoint_sals, decode_static_tracepoint_spec)
6750 (clear_command, update_static_tracepoint): Remove init_sal
6751 references. Move declarations closer to initializations.
6752 * cli/cli-cmds.c (list_command): Move sal declarations closer to
6753 initializations.
6754 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6755 references. Move sal declarations closer to initializations.
6756 * frame.c (find_frame_sal): Return a symtab_and_line via function
6757 return instead of output parameter. Remove init_sal references.
6758 * frame.h (find_frame_sal): Return a symtab_and_line via function
6759 return instead of output parameter.
6760 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6761 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6762 instead of memset.
6763 (gdbscm_find_pc_line): Remove init_sal reference.
6764 * infcall.c (call_function_by_hand_dummy): Remove init_sal
6765 references. Move declarations closer to initializations.
6766 * infcmd.c (set_step_frame): Update. Move declarations closer to
6767 initializations.
6768 (finish_backward): Remove init_sal references. Move declarations
6769 closer to initializations.
6770 * infrun.c (process_event_stop_test, handle_step_into_function)
6771 (insert_hp_step_resume_breakpoint_at_frame)
6772 (insert_step_resume_breakpoint_at_caller): Likewise.
6773 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6774 (symbol_to_sal): Likewise.
6775 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6776 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6777 to its initialization.
6778 * reverse.c (save_bookmark_command): Use new/delete. Remove
6779 init_sal references. Move declarations closer to initializations.
6780 * source.c (get_current_source_symtab_and_line): Remove brace
6781 initialization.
6782 (set_current_source_symtab_and_line): Now takes the sal by const
6783 reference. Remove brace initialization.
6784 (line_info): Remove init_sal reference.
6785 * source.h (set_current_source_symtab_and_line): Now takes a
6786 symtab_and_line via const reference.
6787 * stack.c (set_current_sal_from_frame): Adjust.
6788 (print_frame_info): Adjust.
6789 (get_last_displayed_sal): Return the sal via function return
6790 instead of via output parameter. Simplify.
6791 (frame_info): Adjust.
6792 * stack.h (get_last_displayed_sal): Return the sal via function
6793 return instead of via output parameter.
6794 * symtab.c (init_sal): Delete.
6795 (find_pc_sect_line): Remove init_sal references. Move
6796 declarations closer to initializations.
6797 (find_function_start_sal): Remove init_sal references. Move
6798 declarations closer to initializations.
6799 * symtab.h (struct symtab_and_line): In-class initialize all
6800 fields.
6801 * tracepoint.c (set_traceframe_context)
6802 (print_one_static_tracepoint_marker): Remove init_sal references.
6803 Move declarations closer to initializations.
6804 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6805 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
6806 declarations closer to initializations.
6807 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6808 init_sal references. Adjust.
6809
6c5b2ebe
PA
68102017-09-04 Pedro Alves <palves@redhat.com>
6811
6812 * ax-gdb.c (agent_command_1): Use range-for.
6813 * break-catch-throw.c (re_set_exception_catchpoint): Update.
6814 * breakpoint.c: Include "common/array-view.h".
6815 (init_breakpoint_sal, create_breakpoint_sal): Change sals
6816 parameter from struct symtabs_and_lines to
6817 array_view<symtab_and_line>. Adjust. Use range-for. Update.
6818 (breakpoint_sals_to_pc): Change sals parameter from struct
6819 symtabs_and_lines to std::vector reference.
6820 (check_fast_tracepoint_sals): Change sals parameter from struct
6821 symtabs_and_lines to std::array_view. Use range-for.
6822 (decode_static_tracepoint_spec): Return a std::vector instead of
6823 symtabs_and_lines. Update.
6824 (create_breakpoint): Update.
6825 (break_range_command, until_break_command, clear_command): Update.
6826 (base_breakpoint_decode_location, bkpt_decode_location)
6827 (bkpt_probe_create_sals_from_location)
6828 (bkpt_probe_decode_location, tracepoint_decode_location)
6829 (tracepoint_probe_decode_location)
6830 (strace_marker_create_sals_from_location): Return a std::vector
6831 instead of symtabs_and_lines.
6832 (strace_marker_create_breakpoints_sal): Update.
6833 (strace_marker_decode_location): Return a std::vector instead of
6834 symtabs_and_lines. Update.
6835 (update_breakpoint_locations): Change struct symtabs_and_lines
6836 parameters to gdb::array_view. Adjust.
6837 (location_to_sals): Return a std::vector instead of
6838 symtabs_and_lines. Update.
6839 (breakpoint_re_set_default): Use std::vector instead of struct
6840 symtabs_and_lines.
6841 (decode_location_default): Return a std::vector instead of
6842 symtabs_and_lines. Update.
6843 * breakpoint.h: Include "common/array-view.h".
6844 (struct breakpoint_ops) <decode_location>: Now returns a
6845 std::vector instead of returning a symtabs_and_lines via output
6846 parameter.
6847 (update_breakpoint_locations): Change sals parameters to use
6848 gdb::array_view.
6849 * cli/cli-cmds.c (edit_command, list_command): Update to use
6850 std::vector and gdb::array_view.
6851 (ambiguous_line_spec): Adjust to use gdb::array_view and
6852 range-for.
6853 (compare_symtabs): Rename to ...
6854 (cmp_symtabs): ... this. Change parameters to symtab_and_line
6855 const reference and adjust.
6856 (filter_sals): Rewrite using std::vector and standard algorithms.
6857 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6858 (jump_command): Update to use std::vector.
6859 * linespec.c (struct linespec_state) <canonical_names>: Update
6860 comment.
6861 (add_sal_to_sals_basic): Delete.
6862 (add_sal_to_sals, filter_results, convert_results_to_lsals)
6863 (decode_line_2, create_sals_line_offset)
6864 (convert_address_location_to_sals, convert_linespec_to_sals)
6865 (convert_explicit_location_to_sals, parse_linespec)
6866 (event_location_to_sals, decode_line_full, decode_line_1)
6867 (decode_line_with_current_source)
6868 (decode_line_with_last_displayed, decode_objc)
6869 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6870 (linespec_result::~linespec_result): Adjust to use std::vector
6871 instead of symtabs_and_lines.
6872 * linespec.h (linespec_sals::sals): Now a std::vector.
6873 (struct linespec_result): Use std::vector, bool, and in-class
6874 initialization.
6875 (decode_line_1, decode_line_with_current_source)
6876 (decode_line_with_last_displayed): Return std::vector.
6877 * macrocmd.c (info_macros_command): Use std::vector.
6878 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6879 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6880 std::vector.
6881 * probe.h (parse_probes): Return a std::vector.
6882 * python/python.c (gdbpy_decode_line): Use std::vector and
6883 gdb::array_view.
6884 * source.c (select_source_symtab, line_info): Use std::vector.
6885 * stack.c (func_command): Use std::vector.
6886 * symtab.h (struct symtabs_and_lines): Delete.
6887 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6888
7c44b49c
PA
68892017-09-04 Pedro Alves <palves@redhat.com>
6890
6891 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6892 unittests/array-view-selftests.c.
6893 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6894 * common/array-view.h: New file.
6895 * unittests/array-view-selftests.c: New file.
6896
e439fa14
PA
68972017-09-04 Pedro Alves <palves@redhat.com>
6898
6899 * cli/cli-cmds.c (edit_command): Pass message to
6900 ambiguous_line_spec.
6901 (list_command): Pass message to ambiguous_line_spec. Say
6902 "first"/"last" instead of "start" and "end" to be consistent with
6903 the manual.
6904 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6905 them to print formatted message.
6906
7525b645
PA
69072017-09-04 Pedro Alves <palves@redhat.com>
6908
6909 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6910 ftrace_update_insns by reference instead of pointer.
6911
badc0020
YQ
69122017-09-04 Yao Qi <yao.qi@linaro.org>
6913
6914 * i386-go32-tdep.c: Include x86-xstate.h.
6915 (i386_go32_init_abi): Call i386_target_description.
6916 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6917 if xcr0 is X86_XSTATE_X87_MASK.
6918 * i386-tdep.h (tdesc_i386): Remove the declaration.
6919 (tdesc_i386_mmx): Likewise.
6920
d78bdb54
YQ
69212017-09-04 Yao Qi <yao.qi@linaro.org>
6922
6923 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6924 X86_XSTATE_SSE_MASK instead of 0.
6925
ca1fa5ee
YQ
69262017-09-04 Yao Qi <yao.qi@linaro.org>
6927
6928 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6929 i386_target_description.
6930 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6931 i386_target_description.
6932 * i386-tdep.c (i386_gdbarch_init): Likewise.
6933
2434b019
YQ
69342017-09-04 Yao Qi <yao.qi@linaro.org>
6935
6936 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6937 (x86_darwin_init_abi_64): Call amd64_target_description.
6938 * amd64-dicos-tdep.c: Likewise.
6939 * amd64-fbsd-nat.c: Likewise.
6940 * amd64-fbsd-tdep.c: Likewise.
6941 * amd64-nbsd-tdep.c: Likewise.
6942 * amd64-obsd-tdep.c: Likewise.
6943 * amd64-sol2-tdep.c: Likewise.
6944 * amd64-windows-tdep.c: Likewise.
6945 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6946
0860c437
SM
69472017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6948
6949 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6950 (btrace_function) <insn>: Change type to use std::vector.
6951 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6952 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6953 ftrace_update_insns, ftrace_compute_global_level_offset,
6954 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6955 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6956 change to std::vector.
6957 (ftrace_update_insns): Adjust to change to std::vector, change
6958 type of INSN parameter.
6959 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6960 * record-btrace.c (btrace_call_history_insn_range,
6961 btrace_compute_src_line_range,
6962 record_btrace_frame_prev_register): Adjust to change to
6963 std::vector.
6964 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6965 to change to std::vector.
6966
0638b7f9
TT
69672017-09-03 Tom Tromey <tom@tromey.com>
6968
6969 * corefile.c (reopen_exec_file): Use std::string.
6970
8f84fb0e
TT
69712017-09-03 Tom Tromey <tom@tromey.com>
6972
6973 * compile/compile.c (compile_register_name_mangled): Return
6974 std::string.
6975 * compile/compile-loc2c.c (pushf_register_address): Update.
6976 (pushf_register): Update.
6977 * compile/compile-c-types.c (convert_array): Update.
6978 * compile/compile-c-symbols.c (generate_vla_size): Update.
6979 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6980 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6981 (convert_one_symbol): Update.
6982 (generate_c_for_for_one_variable): Update.
6983 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6984 std::string.
6985 (generate_register_struct): Update.
6986 * compile/compile-internal.h (c_get_range_decl_name): Return a
6987 std::string.
6988 (compile_register_name_mangled): Return std::string.
6989
18e9961f
TT
69902017-09-03 Tom Tromey <tom@tromey.com>
6991
6992 * utils.c (perror_string): Return a std::string.
6993 (throw_perror_with_name, perror_warning_with_name): Update.
6994
45343786
TT
69952017-09-03 Tom Tromey <tom@tromey.com>
6996
6997 * demangle.c (demangle_command): Use std::string,
6998 unique_xmalloc_ptr.
6999
b57af503
TT
70002017-09-03 Tom Tromey <tom@tromey.com>
7001
7002 * cli/cli-setshow.c (do_set_command): Use std::string.
7003
6eecf35f
TT
70042017-09-03 Tom Tromey <tom@tromey.com>
7005
7006 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7007
56496dd4
TT
70082017-09-03 Tom Tromey <tom@tromey.com>
7009
7010 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7011
e91a1fa7
TT
70122017-09-03 Tom Tromey <tom@tromey.com>
7013
7014 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7015 gdb::unique_xmalloc_ptr.
7016
7ffd83d7
TT
70172017-09-03 Tom Tromey <tom@tromey.com>
7018
7019 * thread.c (print_thread_info_1): Use string_printf.
7020 (thread_apply_command, thread_apply_all_command): Use
7021 std::string.
7022
1ccbe998
TT
70232017-09-03 Tom Tromey <tom@tromey.com>
7024
7025 * valprint.c (val_print_string): Update.
7026 * gdbcore.h (memory_error_message): Return std::string.
7027 * corefile.c (memory_error_message): Return std::string.
7028 (memory_error): Update.
7029 * breakpoint.c (insert_bp_location): Update.
7030
23fdd69e
SM
70312017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7032
7033 * target/waitstatus.h (target_waitstatus_to_string): Change
7034 return type to std::string.
7035 * target/waitstatus.c (target_waitstatus_to_string): Return
7036 std::string.
7037 * target.h (target_waitstatus_to_string): Remove declaration.
7038 * infrun.c (resume, clear_proceed_status_thread,
7039 print_target_wait_results, do_target_wait, save_waitstatus,
7040 stop_all_threads): Adjust.
7041 * record-btrace.c (record_btrace_wait): Adjust.
7042 * target-debug.h
7043 (target_debug_print_struct_target_waitstatus_p): Adjust.
7044
5c811d30
JK
70452017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7046
7047 PR gdb/22046
7048 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7049 detection.
7050
0a2dde4a
SDJ
70512017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7052
7053 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7054 for setting/unsetting environment variables on the remote target.
7055 (New remote packets): Add entries for QEnvironmentHexEncoded,
7056 QEnvironmentUnset and QEnvironmentReset.
7057 * common/environ.c (gdb_environ::operator=): Extend method to
7058 handle m_user_set_env_list and m_user_unset_env_list.
7059 (gdb_environ::clear): Likewise.
7060 (match_var_in_string): Change type of first parameter from 'char
7061 *' to 'const char *'.
7062 (gdb_environ::set): Extend method to handle
7063 m_user_set_env_list and m_user_unset_env_list.
7064 (gdb_environ::unset): Likewise.
7065 (gdb_environ::clear_user_set_env): New method.
7066 (gdb_environ::user_set_envp): Likewise.
7067 (gdb_environ::user_unset_envp): Likewise.
7068 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7069 m_user_unset_env_list on move constructor/assignment.
7070 (unset): Add new default parameter 'update_unset_list = true'.
7071 (clear_user_set_env): New method.
7072 (user_set_envp): Likewise.
7073 (user_unset_envp): Likewise.
7074 (m_user_set_env_list): New std::set.
7075 (m_user_unset_env_list): Likewise.
7076 * common/rsp-low.c (hex2str): New function.
7077 (bin2hex): New overload for bin2hex function.
7078 * common/rsp-low.c (hex2str): New prototype.
7079 (str2hex): New overload prototype.
7080 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7081 QEnvironmentUnset and QEnvironmentReset.
7082 (remote_protocol_features): Add QEnvironmentHexEncoded,
7083 QEnvironmentUnset and QEnvironmentReset packets.
7084 (send_environment_packet): New function.
7085 (extended_remote_environment_support): Likewise.
7086 (extended_remote_create_inferior): Call
7087 extended_remote_environment_support.
7088 (_initialize_remote): Add QEnvironmentHexEncoded,
7089 QEnvironmentUnset and QEnvironmentReset packet configs.
7090 * unittests/environ-selftests.c (gdb_selftest_env_var):
7091 New variable.
7092 (test_vector_initialization): New function.
7093 (test_init_from_host_environ): Likewise.
7094 (test_reinit_from_host_environ): Likewise.
7095 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
7096 Likewise.
7097 (test_unset_set_empty_vector): Likewise.
7098 (test_vector_clear): Likewise.
7099 (test_std_move): Likewise.
7100 (test_move_constructor):
7101 (test_self_move): Likewise.
7102 (test_set_unset_reset): Likewise.
7103 (run_tests): Rewrite in terms of the functions above.
7104
654670a4
WP
71052017-08-31 Weimin Pan <weimin.pan@oracle.com>
7106
7107 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
7108 (adi_available): Use a temp variable of type CORE_ADDR as argument
7109 3 when calling target_auxv_search.
7110 (adi_normalize_address): Use masks and xor operators to calculate
7111 normalized address.
7112 (adi_read_versions, adi_write_versions, adi_print_versions)
7113 (do_examine, do_assign): Use paddress.
7114
7755ddb7
JB
71152017-08-29 John Baldwin <jhb@FreeBSD.org>
7116
7117 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
7118 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
7119 out of loop and add supply of FIR.
7120 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
7121 add collect of FIR.
7122
fd437cbc
SM
71232017-08-28 Simon Marchi <simon.marchi@ericsson.com>
7124
3804a343 7125 PR gdb/21827
fd437cbc
SM
7126 * cli/cli-script.c (define_command): Don't convert command name
7127 to lower case.
7128
988f6b3d
JB
71292017-08-25 Joel Brobecker <brobecker@adacore.com>
7130
7131 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
7132 Update all callers accordingly. Remove all code blocks handling
7133 the case where DISPP is not NULL.
7134
663c44ac
JK
71352017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7136
7137 PR symtab/22003
7138 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
7139 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7140 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
7141
f1902523
JK
71422017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7143
7144 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
7145 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
7146 (read_comp_units_from_section): New parameter abbrev_section, use
7147 read_and_check_comp_unit_head, allocate signatured_type if needed.
7148 (create_all_comp_units): Update read_comp_units_from_section caller.
7149
87215ad1
SDJ
71502017-08-23 Pedro Alves <palves@redhat.com>
7151
7152 PR remote/21852
7153 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
7154 to null_ptid and switch to thread without reading the registers
7155 after adding the inferior.
7156
6e41ddec
JK
71572017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7158
7159 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
7160 compile-gcc.
7161 * compile/compile.c (compile_gcc, show_compile_gcc): New.
7162 (compile_to_object): Implement compile_gcc.
7163 (_initialize_compile): Install "set compile-gcc". Initialize
7164 compile_gcc.
7165
e68c32d5
JK
71662017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7167
7168 * compile/compile.c (compile_to_object): Conditionally call
7169 set_verbose. Conditionally call compile or compile_v0.
7170
58afddc6
WP
71712017-08-07 Weimin Pan <weimin.pan@oracle.com>
7172
7173 * sparc64-tdep.h: (adi_normalize_address): New export.
7174 * sparc-nat.h: (open_adi_tag_fd): New export.
7175 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
7176 * sparc64-linux-tdep.c:
7177 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
7178 (sparc64_linux_handle_segmentation_fault): New function.
7179 (sparc64_linux_init_abi): Register
7180 sparc64_linux_handle_segmentation_fault
7181 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
7182 (sparc64_addr_bits_remove): New function.
7183 (sparc64_init_abi): Register sparc64_addr_bits_remove.
7184 (MAX_PROC_NAME_SIZE): New macro.
7185 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
7186 (sparc64adilist): New variable.
7187 (adi_proc_list): New variable.
7188 (find_adi_info): New function.
7189 (add_adi_info): New function.
7190 (get_adi_info_proc): New function.
7191 (get_adi_info): New function.
7192 (info_adi_command): New function.
7193 (read_maps_entry): New function.
7194 (adi_available): New function.
7195 (adi_normalize_address): New function.
7196 (adi_align_address): New function.
7197 (adi_convert_byte_count): New function.
7198 (adi_tag_fd): New function.
7199 (adi_is_addr_mapped): New function.
7200 (adi_read_versions): New function.
7201 (adi_write_versions): New function.
7202 (adi_print_versions): New function.
7203 (do_examine): New function.
7204 (do_assign): New function.
7205 (adi_examine_command): New function.
7206 (adi_assign_command): New function.
7207 (_initialize_sparc64_adi_tdep): New function.
7208
11db9430
SM
72092017-08-22 Simon Marchi <simon.marchi@ericsson.com>
7210
7211 * breakpoint.c (breakpoints_info): Rename to ...
7212 (info_breakpoints_command): ... this.
7213 (watchpoints_info): Rename to ...
7214 (info_watchpoints_command): ... this.
7215 (tracepoints_info): Rename to ...
7216 (info_tracepoints_command): ... this.
7217 (_initialize_breakpoint): Adjust.
7218 * dcache.c (dcache_info): Rename to ...
7219 (info_display_command): ... this.
7220 (_initialize_dcache): Adjust.
7221 * frame.h (args_info): Rename to ...
7222 (info_args_command): ... this.
7223 (locals_info): Rename to ...
7224 (info_locals_command): ... this.
7225 * infcmd.c (nofp_registers_info): Rename to ...
7226 (info_registers_command): ... this.
7227 (float_info): Rename to ...
7228 (info_float_command): ... this.
7229 (program_info): Rename to ...
7230 (info_program_command): ... this.
7231 (all_registers_info): Rename to ...
7232 (info_all_registers_command): ... this.
7233 (vector_info): Rename to ...
7234 (info_vector_command): ... this.
7235 (float_info): Rename to ...
7236 (info_float_command): ... this.
7237 (_initialize_infcmd): Adjust.
7238 * inferior.h (term_info): Rename to ...
7239 (info_terminal_command): ... this.
7240 * inflow.c (term_info): Rename to ...
7241 (info_terminal_command): ... this.
7242 (_initialize_inflow): Adjust.
7243 * infrun.c (signals_info): Rename to ...
7244 (info_signals_command): ... this.
7245 (_initialize_infrun): Adjust.
7246 * objc-lang.c (classes_info): Rename to ...
7247 (info_classes_command): ... this.
7248 (selectors_info): Rename to ...
7249 (info_selectors_command): ... this.
7250 (_initialize_objc_language): Adjust.
7251 * printcmd.c (sym_info): Rename to ...
7252 (info_symbol_command): ... this.
7253 (address_info): Rename to ...
7254 (info_address_command): ... this.
7255 (display_info): Rename to ...
7256 (info_display_command): ... this.
7257 (_initialize_printcmd): Adjust.
7258 * reverse.c (bookmarks_info): Rename to ...
7259 (info_breakpoints_command): ... this.
7260 (_initialize_reverse): Adjust.
7261 * ser-go32.c (dos_info): Rename to ...
7262 (info_serial_command): ... this.
7263 (_initialize_ser_dos): Adjust.
7264 * skip.c (skip_info): Rename to ...
7265 (info_skip_command): ... this.
7266 (_initialize_step_skip): Adjust.
7267 * source.c (line_info): Rename to ...
7268 (info_line_command): ... this.
7269 (source_info): Rename to ...
7270 (info_source_command)
7271 * stack.c (frame_info): Rename to ...
7272 (info_frame_command): ... this.
7273 (locals_info): Rename to ...
7274 (info_locals_command): ... this.
7275 (args_info): Rename to ...
7276 (info_args_command): ... this.
7277 (_initialize_stack): Adjust.
7278 * symtab.c (sources_info): Rename to ...
7279 (info_sources_command): ... this.
7280 (variables_info): Rename to ...
7281 (info_variables_command): ... this.
7282 (functions_info): Rename to ...
7283 (info_functions_command): ... this.
7284 (types_info): Rename to ...
7285 (info_types_command): ... this.
7286 (_initialize_symtab): Adjust.
7287 * target.c (target_info): Rename to ...
7288 (info_target_command): ... this.
7289 (initialize_targets): Adjust.
7290 * tracepoint.c (tvariables_info): Rename to ...
7291 (info_tvariables_command): ... this.
7292 (scope_info): Rename to ...
7293 (info_scope_command): ... this.
7294 (trace_dump_actions): Adjust.
7295 (_initialize_tracepoint): Adjust.
7296
b270e6f9
TT
72972017-08-22 Tom Tromey <tom@tromey.com>
7298
7299 * breakpoint.h (install_breakpoint): Update.
7300 * breakpoint.c (add_solib_catchpoint): Update.
7301 (install_breakpoint): Change argument to a std::unique_ptr.
7302 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7303 (create_breakpoint_sal, create_breakpoint): Update.
7304 (watch_command_1, catch_exec_command_1)
7305 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7306 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7307 Return the breakpoint.
7308 (set_raw_breakpoint_without_location, set_raw_breakpoint)
7309 (new_single_step_breakpoint): Update.
7310 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7311 std::unique_ptr.
7312 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7313 std::unique_ptr.
7314 * break-catch-sig.c (create_signal_catchpoint): Use
7315 std::unique_ptr.
7316 * ada-lang.c (create_ada_exception_catchpoint): Use
7317 std::unique_ptr.
7318
36bd8eaa
TT
73192017-08-22 Tom Tromey <tom@tromey.com>
7320
7321 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7322
56f37645
TT
73232017-08-22 Tom Tromey <tom@tromey.com>
7324
7325 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7326 (lookup_partial_symbol): Update.
7327
0b581c69
TT
73282017-08-22 Tom Tromey <tom@tromey.com>
7329
7330 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7331 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7332 (find_and_open_source, symtab_to_fullname): Update.
7333 * psymtab.c (psymtab_to_fullname): Update.
7334
14278e1f
TT
73352017-08-22 Tom Tromey <tom@tromey.com>
7336
7337 * exec.c (exec_file_attach): Update.
7338 * linux-thread-db.c (try_thread_db_load): Update.
7339 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7340 * utils.c (gdb_realpath): Change return type.
7341 (gdb_realpath_keepfile): Update.
7342 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7343 (_initialize_utils): Register the new self test.
7344 * source.c (openp): Update.
7345 (find_and_open_source): Update.
7346 * nto-tdep.c (nto_find_and_open_solib): Update.
7347 * main.c (set_gdb_data_directory): Update.
7348 (captured_main_1): Update.
7349 * dwarf2read.c (dwarf2_get_dwz_file): Update
7350 (dw2_map_symbol_filenames): Update.
7351 * auto-load.c (auto_load_safe_path_vec_update): Update.
7352 (filename_is_in_auto_load_safe_path_vec): Change type of
7353 "filename_realp".
7354 (auto_load_objfile_script): Update.
7355 (file_is_auto_load_safe): Update. Use std::string.
7356 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7357
4971c9a7
TT
73582017-08-22 Tom Tromey <tom@tromey.com>
7359
7360 * utils.c (gdb_realpath_keepfile): Return a
7361 gdb::unique_xmalloc_ptr.
7362 * exec.c (exec_file_attach): Update.
7363 * utils.h (gdb_realpath_keepfile): Return a
7364 gdb::unique_xmalloc_ptr.
7365
e3e41d58
TT
73662017-08-22 Tom Tromey <tom@tromey.com>
7367
7368 * compile/compile.c (compile_file_command): Use
7369 gdb::unique_xmalloc_ptr, std::string.
7370 * utils.c (gdb_abspath): Change return type.
7371 * source.c (openp): Update.
7372 * objfiles.c (allocate_objfile): Update.
7373 * main.c (set_gdb_data_directory): Update.
7374 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7375
0d999a6e
ZZ
73762017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
7377
7378 * cli-cmds.c (list_commands): List actual code around more than
7379 one location.
7380
329d5e7e
JB
73812017-08-21 John Baldwin <jhb@FreeBSD.org>
7382
7383 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7384
bf223d3e
PA
73852017-08-21 Pedro Alves <palves@redhat.com>
7386
7387 PR gdb/19487
7388 * c-exp.y (variable production): Handle function aliases.
7389 * minsyms.c (msymbol_is_text): New function.
7390 * minsyms.h (msymbol_is_text): Declare.
7391 * symtab.c (find_function_alias_target): New function.
7392 * symtab.h (find_function_alias_target): Declare.
7393
c973d0aa
PA
73942017-08-21 Pedro Alves <palves@redhat.com>
7395
7396 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7397 typedefs.
7398 * typeprint.c (whatis_exp): If handling "whatis", and expression
7399 is OP_TYPE, strip one typedef level. Otherwise don't strip
7400 typedefs here.
7401 * valops.c (value_cast): Save "to" type before resolving
7402 stubs/typedefs. Use that type as resulting value's type.
7403
2989a365
TT
74042017-08-18 Tom Tromey <tom@tromey.com>
7405 Pedro Alves <palves@redhat.com>
7406
7407 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7408 * sol-thread.c (sol_thread_resume, sol_thread_wait)
7409 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7410 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7411 * proc-service.c (ps_xfer_memory): Use scoped_restore.
7412 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7413 (linux_get_siginfo_data): Add "thread" argument. Use
7414 scoped_restore.
7415 * linux-nat.c (linux_child_follow_fork)
7416 (check_stopped_by_watchpoint): Use scoped_restore.
7417 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7418 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7419 (restore_inferior_ptid, save_inferior_ptid): Remove.
7420 * btrace.c (btrace_fetch): Use scoped_restore.
7421 * bsd-uthread.c (bsd_uthread_fetch_registers)
7422 (bsd_uthread_store_registers): Use scoped_restore.
7423 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7424 scoped_restore.
7425 * aix-thread.c (aix_thread_resume, aix_thread_wait)
7426 (aix_thread_xfer_partial): Use scoped_restore.
7427 * inferior.h (save_inferior_ptid): Remove.
7428
e60eb288
YQ
74292017-08-18 Yao Qi <yao.qi@linaro.org>
7430
7431 PR tdep/21818
7432 * arm-tdep.c (gdb_print_insn_arm): Mark
7433 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7434
6d580b63
YQ
74352017-08-18 Yao Qi <yao.qi@linaro.org>
7436
7437 * NEWS: Mention GDBserver's new option "--selftest".
7438 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7439 * selftest.c: Move it to common/selftest.c.
7440 * selftest.h: Move it to common/selftest.h.
7441 * selftest-arch.c (reset): New function.
7442 (tests_with_arch): Call reset.
7443
86dcbf50
YQ
74442017-08-18 Yao Qi <yao.qi@linaro.org>
7445
7446 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
7447 instead of exception_fprintf and printf_filtered.
7448
7649770c
YQ
74492017-08-18 Yao Qi <yao.qi@linaro.org>
7450
7451 * selftest.c (register_self_test): Rename it to
7452 selftests::register_test.
7453 (run_self_tests): selftest::run_tests.
7454 * selftest.h: Update declarations.
7455 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7456 selftests::register_test_foreach_arch.
7457 * selftest-arch.h: Update declaration.
7458 * aarch64-tdep.c: Update.
7459 * arm-tdep.c: Likewise.
7460 * disasm-selftests.c: Likewise.
7461 * dwarf2loc.c: Likewise.
7462 * dwarf2-frame.c: Likewise.
7463 * findvar.c: Likewise.
7464 * gdbarch-selftests.c: Likewise.
7465 * maint.c (maintenance_selftest): Likewise.
7466 * regcache.c: Likewise.
7467 * rust-exp.y: Likewise.
7468 * selftest-arch.c: Likewise.
7469 * unittests/environ-selftests.c: Likewise.
7470 * unittests/function-view-selftests.c: Likewise.
7471 * unittests/offset-type-selftests.c: Likewise.
7472 * unittests/optional-selftests.c: Likewise.
7473 * unittests/scoped_restore-selftests.c: Likewise.
7474 * utils-selftests.c: Likewise.
7475
b0cba12e
PA
74762017-08-17 Pedro Alves <palves@redhat.com>
7477
7478 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7479 local.
7480
4c8aa72d
PA
74812017-08-17 Pedro Alves <palves@redhat.com>
7482
7483 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7484 field.
7485 (reset_die_in_process): Delete, replaced by ...
7486 (process_die_scope): ... this new class. Make it responsible for
7487 freeing cu->line_header too.
7488 (process_die): Use process_die_scope.
7489 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7490 cu->line_header_die_owner. Don't release the line header if it's
7491 owned by the CU.
7492 (setup_type_unit_groups): Make the CU/DIE own the line header.
7493 Don't release the line header here.
7494
ba713918
AL
74952017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
7496
7497 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7498
44d0fb3a
RK
74992017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
7500
7501 * NEWS: Mention new shortcuts for nexti and stepi in TUI
7502 Single-Key mode
7503
a5afdb16
RK
75042017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
7505
7506 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7507 mode command list.
7508
47613aeb
SH
75092017-08-15 Stafford Horne <shorne@gmail.com>
7510
7511 * MAINTAINERS (Write After Approval): Add Stafford Horne.
7512
9c3cc999
SH
75132017-08-15 Stafford Horne <shorne@gmail.com>
7514
7515 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7516
206726fb
SDJ
75172017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
7518
7519 PR gdb/21954
7520 * infcmd.c (unset_environment_command): Use the 'clear' method on
7521 the environment instead of resetting it.
7522
0335ac6d
JB
75232017-08-15 John Baldwin <jhb@FreeBSD.org>
7524
7525 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7526 platforms.
7527
d3abe1c8
TT
75282017-08-14 Tom Tromey <tom@tromey.com>
7529
7530 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7531 (print_binary_chars): Likewise.
7532 (BITS_IN_BYTES): Remove.
7533
d6382fff
TT
75342017-08-14 Tom Tromey <tom@tromey.com>
7535
7536 PR gdb/21675
7537 * valprint.c (LOW_ZERO): Change value to 034.
7538 (print_octal_chars): Add static_asserts for octal constants.
7539 * printcmd.c (print_scalar_formatted): Add 'd' case.
7540
f978cb06
TT
75412017-08-11 Tom Tromey <tom@tromey.com>
7542
7543 * symfile.c (add_symbol_file_command): Use std::vector.
7544
2f5404b3
TT
75452017-08-14 Tom Tromey <tom@tromey.com>
7546
7547 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7548 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7549 std::move.
7550 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7551
de7985c3
PA
75522017-08-11 Pedro Alves <palves@redhat.com>
7553
7554 * infrun.c (process_event_stop_test): Adjust
7555 function_name_is_marked_for_skip call.
7556 * skip.c: Include <list>.
7557 (skiplist_entry): Make it a class with private fields, and
7558 getters/setters.
7559 (skiplist_entry_chain): Delete.
7560 (skiplist_entries): New.
7561 (skiplist_entry_count): Delete.
7562 (highest_skiplist_entry_num): New.
7563 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7564 (add_skiplist_entry): Delete.
7565 (skiplist_entry::skiplist_entry): New.
7566 (skiplist_entry::add_entry): New.
7567 (skip_file_command, skip_function): Adjust.
7568 (compile_skip_regexp): Delete.
7569 (skip_command): Don't compile regexp here. Adjust to use
7570 skiplist_entry::add_entry.
7571 (skip_info): Adjust to use range-for and getters.
7572 (skip_enable_command, skip_disable_command): Adjust to use
7573 range-for and setters.
7574 (skip_delete_command): Adjust to use std::list.
7575 (add_skiplist_entry): Delete.
7576 (skip_file_p): Delete, refactored as ...
7577 (skiplist_entry::do_skip_file_p): ... this new method.
7578 (skip_gfile_p): Delete, refactored as ...
7579 (skiplist_entry::do_gskip_file_p): ... this new method.
7580 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7581 (skiplist_entry::skip_function_p): ... this new method.
7582 (function_name_is_marked_for_skip): Now returns bool, and takes
7583 the function sal by const reference. Adjust to use range-for and
7584 skiplist_entry methods.
7585 (_initialize_step_skip): Remove references to
7586 skiplist_entry_chain, skiplist_entry_count.
7587 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7588 takes the function sal by const reference.
7589
be7d3cd5
YQ
75902017-08-11 Yao Qi <yao.qi@linaro.org>
7591
7592 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7593 (dwarf2_frame_cache): Remove reset_cache_cleanup.
7594 (dwarf2_frame_cache):
7595 * frame-unwind.c (frame_unwind_try_unwinder): Catch
7596 RETURN_MASK_ALL and set *this_case to NULL.
7597 * frame-unwind.h: Update comments.
7598
1c90d9f0
YQ
75992017-08-11 Yao Qi <yao.qi@linaro.org>
7600
7601 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7602 (dwarf2_frame_state_copy_regs): Remove.
7603 (dwarf2_frame_state_free_regs): Remove.
7604 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7605 (dwarf2_restore_rule): Call method .alloc_regs instead of
7606 dwarf2_frame_state_alloc_regs.
7607 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
7608 constructor. Call std::move.
7609 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7610 (dwarf2_frame_cache): Likewise.
7611
7612 [GDB_SELF_TEST]: Include selftest.h and
7613 selftest-arch.h.
7614 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7615 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7616 execute_cfa_program_test.
7617
7618 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7619 copy ctor, assignment operator, move assignment.
7620 <alloc_regs>: New method.
7621 <swap>: New method.
7622 (struct dwarf2_frame_state): Delete dtor.
7623 (dwarf2_frame_state_alloc_regs): Remove declaration.
7624 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7625 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7626
afe37d6b
YQ
76272017-08-11 Yao Qi <yao.qi@linaro.org>
7628
7629 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7630 (dwarf2_frame_state::dwarf2_frame_state): New.
7631 (dwarf2_frame_state::~dwarf2_frame_state): New.
7632 (dwarf2_fetch_cfa_info): Update.
7633 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
7634 rather than a pointer. Update code.
7635 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7636 dtor.
7637 <data_align, code_align, retaddr_column>: Change them to const.
7638 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7639 to bool.
7640
b348037f
YQ
76412017-08-11 Yao Qi <yao.qi@linaro.org>
7642
7643 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7644 <loc.exp>: New field.
7645 * dwarf2-frame.c (execute_cfa_program): Update.
7646 (dwarf2_frame_prev_register): Update.
7647
e7c9de26
PA
76482017-08-10 Pedro Alves <palves@redhat.com>
7649
7650 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7651
e8c6b620
JB
76522017-08-09 John Baldwin <jhb@FreeBSD.org>
7653
7654 * fbsd-nat.c (struct fbsd_fork_info): Remove.
7655 (fbsd_pending_children): Use std::list.
7656 (fbsd_remember_child): Likewise.
7657 (fbsd_is_child_pending): Likewise.
7658 (fbsd_pending_vfork_done): Use std::forward_list.
7659 (fbsd_add_vfork_done): Likewise.
7660 (fbsd_is_vfork_done_pending): Likewise.
7661 (fbsd_next_vfork_done): Likewise.
7662
e4a26669
JB
76632017-08-09 John Baldwin <jhb@FreeBSD.org>
7664
7665 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7666 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7667 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7668 for `mapfilename'.
7669 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 7670 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 7671
142311d3
JB
76722017-08-09 John Baldwin <jhb@FreeBSD.org>
7673
7674 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7675 "filestuff.h".
7676 (fbsd_find_memory_regions): Fix `mapfile' initialization.
7677
42fa2e0e
TT
76782017-08-09 Tom Tromey <tom@tromey.com>
7679
7680 * skip.c (skiplist_entry): New constructor.
7681 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7682 (skiplist_entry::file_is_glob): Now bool.
7683 (skiplist_entry::file, skiplist_entry::function): Now
7684 std::string.
7685 (make_skip_entry): Return a unique_ptr. Use new.
7686 (free_skiplist_entry, free_skiplist_entry_cleanup)
7687 (make_free_skiplist_entry_cleanup): Remove.
7688 (skip_command, skip_disable_command, add_skiplist_entry)
7689 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7690 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7691 (function_name_is_marked_for_skip): Update.
7692 (skip_delete_command): Update. Use delete.
7693
cd3af38d
JW
76942017-08-09 Jiong Wang <jiong.wang@arm.com>
7695
7696 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7697 (aarch64_linux_core_read_description): New function.
7698 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7699
29592bde
PA
77002017-08-09 Pedro Alves <palves@redhat.com>
7701
7702 * cp-name-parser.y (cp_comp_to_string): Return a
7703 gdb::unique_xmalloc_ptr<char>.
7704 * cp-support.c (replace_typedefs_qualified_name)
7705 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7706 (cp_canonicalize_string_full): Use op= instead of explicit
7707 convertion.
7708 (cp_class_name_from_physname, method_name_from_physname)
7709 (cp_func_name, cp_remove_params): Adjust to use
7710 gdb::unique_xmalloc_ptr<char>.
7711 * cp-support.h (cp_comp_to_string): Return a
7712 gdb::unique_xmalloc_ptr<char>.
7713 * python/py-type.c (typy_lookup_type): Adjust to use
7714 gdb::unique_xmalloc_ptr<char>.
7715
b3340438
L
77162017-08-09 H.J. Lu <hongjiu.lu@intel.com>
7717
7718 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7719
e88e8651
YQ
77202017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
7721 Yao Qi <yao.qi@linaro.org>
7722
7723 * cp-support.c (cp_canonicalize_string_full): Use
7724 gdb::unique_xmalloc_ptr<char>.
7725 (cp_canonicalize_string): Likewise.
7726
f5a29eb0
YQ
77272017-08-09 Yao Qi <yao.qi@linaro.org>
7728
7729 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7730 * regformats/i386/amd64-avx-avx512.dat: Remove.
7731 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7732 * regformats/i386/amd64-avx-mpx.dat:Remove.
7733 * regformats/i386/amd64-avx.dat: Remove.
7734 * regformats/i386/amd64-mpx.dat: Remove.
7735 * regformats/i386/i386-avx-avx512.dat: Remove.
7736 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7737 * regformats/i386/i386-avx-mpx.dat: Remove.
7738 * regformats/i386/i386-mmx.dat: Remove.
7739 * regformats/i386/i386-mpx.dat: Remove.
7740
57757c2f
YQ
77412017-08-09 Yao Qi <yao.qi@linaro.org>
7742
7743 * amd64-tdep.h (tdesc_x32): Remove the declaration.
7744 * amd64-tdep.c: Don't include features/i386/x32*.c.
7745 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7746 functions.
7747 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7748 and i386/x32-avx-avx512.
7749 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7750 and i386/x32.xml.
7751 * features/i386/x32-avx-avx512.c: Removed.
7752 * features/i386/x32-avx-avx512.xml: Removed.
7753 * features/i386/x32-avx.c: Removed.
7754 * features/i386/x32-avx.xml: Removed.
7755 * features/i386/x32.c: Removed.
7756 * features/i386/x32.xml: Removed.
7757 * regformats/i386/x32-avx-avx512.dat: Removed.
7758 * regformats/i386/x32-avx.dat: Removed.
7759 * regformats/i386/x32.dat: Removed.
7760
ba7b109b
MR
77612017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7762
7763 PR breakpoints/21886
7764 * mem-break.c (default_memory_insert_breakpoint): Use
7765 `->placed_address' rather than `->reqstd_address' for the
7766 breakpoint location.
7767
e347efc3
MR
77682017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7769
7770 * arch-utils.c (default_print_insn): Remove arch/mach/endian
7771 assertions.
7772
0dba2a6c
MR
77732017-08-07 Maciej W. Rozycki <macro@imgtec.com>
7774
7775 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7776 a union of `tdep_info', `tdesc_data' and `id'.
7777 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7778 rather than `info.tdep_info'.
7779 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7780 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7781 * i386-tdep.c (i386_gdbarch_init): Likewise.
7782 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7783 * mips-tdep.c (mips_gdbarch_init): Likewise.
7784 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7785 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7786 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7787 `info.tdep_info'.
7788 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7789 `info.tdep_info'.
7790 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7791 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7792 `info.tdep_info'.
7793 * spu-tdep.c (spu_gdbarch_init): Likewise.
7794 * gdbarch.h: Regenerate.
7795
16eb6b2d
LS
77962017-08-07 Leszek Swirski <leszeks@google.com>
7797
7b005726 7798 PR symtab/20899
16eb6b2d
LS
7799 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7800
74cbb09e
SM
78012017-08-07 Simon Marchi <simon.marchi@ericsson.com>
7802
7803 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7804 (gdbsim_open): Rename gdb_argv args object to argv.
7805
ee0c3293
TT
78062017-08-05 Tom Tromey <tom@tromey.com>
7807
7808 * compile/compile-object-load.c (compile_object_load): Use
7809 gdb::unique_xmalloc_ptr.
7810 * cli/cli-dump.c (scan_filename): Rename from
7811 scan_filename_with_cleanup. Change return type.
7812 (scan_expression): Rename from scan_expression_with_cleanup.
7813 Change return type.
7814 (dump_memory_to_file, dump_value_to_file, restore_command):
7815 Use gdb::unique_xmalloc_ptr. Update.
7816 * cli/cli-cmds.c (find_and_open_script): Use
7817 gdb::unique_xmalloc_ptr.
7818 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7819 * symmisc.c (maintenance_print_symbols)
7820 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7821 * symfile.c (symfile_bfd_open, generic_load)
7822 (add_symbol_file_command, remove_symbol_file_command): Use
7823 gdb::unique_xmalloc_ptr.
7824 * source.c (openp): Use gdb::unique_xmalloc_ptr.
7825 * psymtab.c (maintenance_print_psymbols): Use
7826 gdb::unique_xmalloc_ptr.
7827 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7828 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7829 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7830 (reload_shared_libraries_1): Likewise.
7831
3232fabd
TT
78322017-08-05 Tom Tromey <tom@tromey.com>
7833
7834 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7835 (rust_op_vector, rust_set_vector): New typedefs.
7836 (current_parser): New global.
7837 (work_obstack): Change to pointer type. Update all users.
7838 (rust_ast, pstate): Remove globals.
7839 (struct rust_parser): New.
7840 (%union) <params, field_inits>: Change type.
7841 (start, tuple_expr, unit_expr, struct_expr_list, literal)
7842 (field_expr, expr_list, maybe_expr_list, type_list): Update.
7843 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7844 (convert_params_to_types, convert_params_to_expression): Change
7845 type of "params".
7846 (ast_string): Change type of "fields".
7847 (rust_parse): Make a rust_parser. Remove cleanups.
7848 (rust_lex_tests): Make and install an auto_obstack.
7849
f02fd774
YQ
78502017-08-04 Yao Qi <yao.qi@linaro.org>
7851
7852 * configure.srv (ipa_x32_linux_regobj): New.
7853 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7854 instead of X86_TDESC_AVX512.
7855 (initialize_low_tracepoint): Call
7856 init_registers_x32_avx_avx512_linux.
7857
91975afd
YQ
78582017-08-04 Yao Qi <yao.qi@linaro.org>
7859
7860 * utils.h (gdb_argv): Add namespace std for nullptr_t.
7861
2331fa3a
RK
78622017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
7863
7864 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7865
744e4fe1
TT
78662017-08-03 Tom Tromey <tom@tromey.com>
7867
7868 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7869 Remove.
7870 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7871
1c034b67
TT
78722017-08-03 Tom Tromey <tom@tromey.com>
7873
7874 * python/py-param.c (compute_enum_values): Use gdb_argv.
7875
773a1edc
TT
78762017-08-03 Tom Tromey <tom@tromey.com>
7877
7878 * utils.h (struct gdb_argv_deleter): New.
7879 (gdb_argv): New class.
7880 * utils.c (gdb_argv::reset): New method.
7881 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7882 * tracefile.c (tsave_command): Use gdb_argv.
7883 * top.c (new_ui_command): Use gdb_argv.
7884 * symmisc.c (maintenance_print_symbols)
7885 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7886 * symfile.c (symbol_file_command, generic_load)
7887 (remove_symbol_file_command): Use gdb_argv.
7888 * stack.c (backtrace_command): Use gdb_argv.
7889 * source.c (add_path, show_substitute_path_command)
7890 (unset_substitute_path_command, set_substitute_path_command):
7891 Use gdb_argv.
7892 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
7893 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7894 * remote.c (extended_remote_run, remote_put_command)
7895 (remote_get_command, remote_delete_command): Use gdb_argv.
7896 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7897 (gdbsim_open): Use gdb_argv.
7898 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7899 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7900 * procfs.c (procfs_info_proc): Use gdb_argv.
7901 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7902 * infrun.c (handle_command): Use gdb_argv.
7903 * inferior.c (add_inferior_command, clone_inferior_command):
7904 Use gdb_argv.
7905 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7906 * exec.c (exec_file_command): Use gdb_argv.
7907 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7908 * compile/compile.c (build_argc_argv): Use gdb_argv.
7909
0d50bde3
TT
79102017-08-03 Tom Tromey <tom@tromey.com>
7911
7912 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7913
7f968c89
TT
79142017-08-03 Tom Tromey <tom@tromey.com>
7915
7916 * python/python.c (compute_python_string): Return std::string.
7917 (gdbpy_eval_from_control_command): Update.
7918 (do_start_initialization): Use std::string.
7919 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7920 xstrprintf.
7921 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7922 xstrprintf.
7923
3c9ebddd
TT
79242017-08-03 Tom Tromey <tom@tromey.com>
7925
7926 * top.h (do_restore_instream_cleanup): Remove.
7927 * top.c (do_restore_instream_cleanup): Remove.
7928 (read_command_file): Use scoped_restore.
7929 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7930
b51b225e
TT
79312017-08-03 Tom Tromey <tom@tromey.com>
7932
7933 * cli/cli-script.c (execute_user_command)
7934 (execute_control_command): Use scoped_restore.
7935
ac991630
TT
79362017-08-03 Tom Tromey <tom@tromey.com>
7937
7938 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7939 (execute_user_command): Remove user_call_depth; use
7940 user_args_stack's size instead.
7941
898e0c8e
TT
79422017-08-03 Tom Tromey <tom@tromey.com>
7943
7944 * top.h (in_user_command): Remove.
7945 * top.c (in_user_command): Remove.
7946 * cli/cli-script.c (do_restore_user_call_depth)
7947 (execute_user_command): Update.
7948
26fcd5d7
TT
79492017-08-03 Tom Tromey <tom@tromey.com>
7950
7951 * valops.c (search_struct_method): Use gdb::byte_vector.
7952 * valarith.c (value_concat): Use std::vector.
7953 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7954 (simple_search_memory): Likewise.
7955 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7956 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7957 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7958 * elfread.c (elf_rel_plt_read): Use std::string.
7959 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7960 * cli/cli-dump.c (restore_section_callback): Use
7961 gdb::byte_vector.
7962
7c218e6c
TT
79632017-08-03 Tom Tromey <tom@tromey.com>
7964
7965 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7966
31b68d4a
TT
79672017-08-03 Tom Tromey <tom@tromey.com>
7968
7969 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7970 (tui_register_format): Use scoped_restore.
7971
2ec845e7
TT
79722017-08-03 Tom Tromey <tom@tromey.com>
7973
7974 * reverse.c (exec_direction_default): Remove.
7975 (exec_reverse_once): Use scoped_restore.
7976 * remote.c (restore_remote_timeout): Remove.
7977 (remote_flash_erase, remote_flash_write, remote_flash_done)
7978 (readchar, remote_serial_write): Use scoped_restore.
7979 * cli/cli-script.c (struct source_cleanup_lines_args)
7980 (source_cleanup_lines): Remove.
7981 (script_from_file): Use scoped_restore.
7982 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7983 (source_command): Use scoped_restore.
7984
b3bc8453
TT
79852017-08-03 Tom Tromey <tom@tromey.com>
7986
7987 * utils.h (make_cleanup_free_so): Remove.
7988 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7989 * solist.h (struct so_deleter): New.
7990 (so_list_up): New typedef.
7991 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7992
e3ad2841
TT
79932017-08-03 Tom Tromey <tom@tromey.com>
7994
7995 * utils.h (make_cleanup_restore_current_language): Remove.
7996 * utils.c (do_restore_current_language)
7997 (make_cleanup_restore_current_language): Remove.
7998 * parse.c (parse_exp_in_context_1)
7999 (parse_expression_with_language): Use
8000 scoped_restore_current_language.
8001 * mi/mi-main.c (mi_cmd_execute): Use
8002 scoped_restore_current_language.
8003 * language.h (scoped_restore_current_language): New class.
8004
b80cf838
TT
80052017-08-03 Tom Tromey <tom@tromey.com>
8006
8007 * compile/compile.c (cleanup_unlink_file): Remove.
8008 (compile_to_object): Use gdb::unlinker.
8009 (eval_compile_command): Likewise.
8010
fad0444a
TT
80112017-08-03 Tom Tromey <tom@tromey.com>
8012
8013 * utils.h (make_cleanup_fclose): Remove.
8014 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8015
6e7bc05c
TT
80162017-08-03 Tom Tromey <tom@tromey.com>
8017
8018 * top.c (open_terminal_stream): Return gdb_file_up.
8019 (new_ui_command): Update.
8020
4a45905b
TT
80212017-08-03 Tom Tromey <tom@tromey.com>
8022
8023 * source.c (print_source_lines_base, forward_search_command)
8024 (reverse_search_command): Use gdb_file_up.
8025
7cd06d6e
TT
80262017-08-03 Tom Tromey <tom@tromey.com>
8027
8028 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8029
ed166945
TT
80302017-08-03 Tom Tromey <tom@tromey.com>
8031
8032 * cli/cli-cmds.c (find_and_open_script): Change return type.
8033 Remove "streamp" and "full_path" parameters.
8034 (source_script_with_search): Update.
8035 * auto-load.c (source_script_file): Update.
8036 * cli/cli-cmds.h (find_and_open_script): Change type.
8037 (open_script): New struct.
8038
d419f42d
TT
80392017-08-03 Tom Tromey <tom@tromey.com>
8040
8041 * xml-support.c (xml_fetch_content_from_file): Update.
8042 * ui-file.c (stdio_file::open): Update.
8043 * tracefile-tfile.c (tfile_start): Update.
8044 * remote.c (remote_file_put, remote_file_get): Update.
8045 * nat/linux-procfs.c (linux_proc_get_int)
8046 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8047 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8048 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8049 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8050 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8051 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8052 * linux-nat.c (linux_proc_pending_signals): Update.
8053 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8054 (file_closer): Remove.
8055 * compile/compile.c (compile_to_object): Update.
8056 * common/filestuff.h (struct gdb_file_deleter): New.
8057 (gdb_file_up): New typedef.
8058 (gdb_fopen_cloexec): Change return type.
8059 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8060 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8061 (dump_binary_file, restore_binary_file): Update.
8062 * auto-load.c (auto_load_objfile_script_1): Update.
8063
4a2b031d
TT
80642017-08-03 Tom Tromey <tom@tromey.com>
8065
8066 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8067 (info_static_tracepoint_markers_command): Likewise.
8068 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8069 * skip.c (skip_info): Use ui_out_emit_table.
8070 * progspace.c (print_program_space): Use ui_out_emit_table.
8071 * osdata.c (info_osdata): Use ui_out_emit_table.
8072 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8073 ui_out_emit_table.
8074 * linux-thread-db.c (info_auto_load_libthread_db): Use
8075 ui_out_emit_table.
8076 * inferior.c (print_inferior): Use ui_out_emit_table.
8077 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8078 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8079 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8080 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8081 * ui-out.h (class ui_out_emit_table): New.
8082
a4f320fd
MR
80832017-08-02 Maciej W. Rozycki <macro@imgtec.com>
8084
8085 * mips-tdep.c (mips_fpu_type_str): New function.
8086 (mips_dump_tdep): Call it.
8087
a2f1f308
MR
80882017-08-01 Maciej W. Rozycki <macro@imgtec.com>
8089
8090 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
8091 `->mips_fpu_type'.
8092
7e5ed83b
XR
80932017-07-31 Xavier Roirand <roirand@adacore.com>
8094
8095 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
8096
4c9dc811
XR
80972017-07-27 Xavier Roirand <roirand@adacore.com>
8098
8099 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
8100
27d41eac
YQ
81012017-07-26 Yao Qi <yao.qi@linaro.org>
8102
8103 * cli/cli-cmds.c (maintenancechecklist): New variable.
8104 * gdbcmd.h (maintenancechecklist): Declare it.
8105 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
8106 Call i386_linux_read_description with different masks.
8107 * maint.c (maintenance_check_command): New function.
8108 (_initialize_maint_cmds): Call add_prefix_cmd.
8109 * target-descriptions.c (tdesc_reg): override operator != and ==.
8110 (tdesc_type): Likewise.
8111 (tdesc_feature): Likewise.
8112 (target_desc): Likewise.
8113 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
8114 (maintenance_check_xml_descriptions): New function.
8115 (_initialize_target_descriptions) Add command "xml-descriptions".
8116 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
8117
ea03d0d3
YQ
81182017-07-26 Yao Qi <yao.qi@linaro.org>
8119
8120 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
8121 Include features/i386/32bit-*.c.
8122 (i386_linux_read_description): Generate target description if it
8123 doesn't exist.
8124 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
8125 functions.
8126 * features/i386/32bit-linux.c: Re-generated.
8127 * features/i386/32bit-sse.c: Likewise.
8128 * target-descriptions.c (print_c_feature::visit): Print code to
8129 set register number if needed.
8130 (print_c_feature) <m_next_regnum>: New field.
8131
25aa13e5
YQ
81322017-07-26 Yao Qi <yao.qi@linaro.org>
8133
8134 * features/Makefile (CFILES): Rename with TDESC_CFILES.
8135 (FEATURE_XMLFILES): New.
8136 (FEATURE_CFILES): New.
8137 New rules.
8138 (clean-cfiles): Remove generated c files.
8139 * features/i386/32bit-avx.c: Generated.
8140 * features/i386/32bit-avx512.c: Generated.
8141 * features/i386/32bit-core.c: Generated.
8142 * features/i386/32bit-linux.c: Generated.
8143 * features/i386/32bit-mpx.c: Generated.
8144 * features/i386/32bit-pkeys.c: Generated.
8145 * features/i386/32bit-sse.c: Generated.
8146 * target-descriptions.c: Include algorithm.
8147 (tdesc_element_visitor): Add method visit_end.
8148 (print_c_tdesc): Implement visit_end.
8149 (print_c_tdesc:: m_filename_after_features): Move it to
8150 protected.
8151 (print_c_feature): New class.
8152 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
8153 name starts with "i386/32bit-".
8154
6eb1e6a8
YQ
81552017-07-26 Yao Qi <yao.qi@linaro.org>
8156
8157 * target-descriptions.c (tdesc_element_visitor): New class.
8158 (tdesc_element): New class.
8159 (tdesc_reg): Inherit from tdesc_element.
8160 (tdesc_reg::accept): New function.
8161 (tdesc_type): Inherit from tdesc_element.
8162 (tdesc_type::accept): New function.
8163 (tdesc_feature): Inherit from tdesc_element.
8164 (tdesc_feature::accept): New function.
8165 (target_desc): Inherit from tdesc_element.
8166 (target_desc::target_desc): New.
8167 (target_desc::~target_desc): New.
8168 (target_desc::accept): New.
8169 (allocate_target_description): Use new.
8170 (free_target_description): Use delete.
8171 (print_c_tdesc): New class.
8172 (maint_print_c_tdesc_cmd): Adjust.
8173
8174 * features/aarch64.c: Re-generated.
8175 * features/arc-arcompact.c: Re-generated.
8176 * features/arc-v2.c: Re-generated.
8177 * features/arm/arm-with-iwmmxt.c: Re-generated.
8178 * features/arm/arm-with-m.c: Re-generated.
8179 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
8180 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
8181 * features/arm/arm-with-neon.c: Re-generated.
8182 * features/arm/arm-with-vfpv2.c: Re-generated.
8183 * features/arm/arm-with-vfpv3.c: Re-generated.
8184 * features/i386/amd64-avx-avx512.c: Re-generated.
8185 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8186 * features/i386/amd64-avx.c: Re-generated.
8187 * features/i386/amd64-avx-linux.c: Re-generated.
8188 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
8189 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8190 * features/i386/amd64-avx-mpx.c: Re-generated.
8191 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
8192 * features/i386/amd64.c: Re-generated.
8193 * features/i386/amd64-linux.c: Re-generated.
8194 * features/i386/amd64-mpx.c: Re-generated.
8195 * features/i386/amd64-mpx-linux.c: Re-generated.
8196 * features/i386/i386-avx-avx512.c: Re-generated.
8197 * features/i386/i386-avx-avx512-linux.c: Re-generated.
8198 * features/i386/i386-avx.c: Re-generated.
8199 * features/i386/i386-avx-linux.c: Re-generated.
8200 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8201 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8202 * features/i386/i386-avx-mpx.c: Re-generated.
8203 * features/i386/i386-avx-mpx-linux.c: Re-generated.
8204 * features/i386/i386.c: Re-generated.
8205 * features/i386/i386-linux.c: Re-generated.
8206 * features/i386/i386-mmx.c: Re-generated.
8207 * features/i386/i386-mmx-linux.c: Re-generated.
8208 * features/i386/i386-mpx.c: Re-generated.
8209 * features/i386/i386-mpx-linux.c: Re-generated.
8210 * features/i386/x32-avx-avx512.c: Re-generated.
8211 * features/i386/x32-avx-avx512-linux.c: Re-generated.
8212 * features/i386/x32-avx.c: Re-generated.
8213 * features/i386/x32-avx-linux.c: Re-generated.
8214 * features/i386/x32.c: Re-generated.
8215 * features/i386/x32-linux.c: Re-generated.
8216 * features/microblaze.c: Re-generated.
8217 * features/microblaze-with-stack-protect.c: Re-generated.
8218 * features/mips64-dsp-linux.c: Re-generated.
8219 * features/mips64-linux.c: Re-generated.
8220 * features/mips-dsp-linux.c: Re-generated.
8221 * features/mips-linux.c: Re-generated.
8222 * features/nds32.c: Re-generated.
8223 * features/nios2.c: Re-generated.
8224 * features/nios2-linux.c: Re-generated.
8225 * features/rs6000/powerpc-32.c: Re-generated.
8226 * features/rs6000/powerpc-32l.c: Re-generated.
8227 * features/rs6000/powerpc-403.c: Re-generated.
8228 * features/rs6000/powerpc-403gc.c : Re-generated.
8229 * features/rs6000/powerpc-405.c: Re-generated.
8230 * features/rs6000/powerpc-505.c: Re-generated.
8231 * features/rs6000/powerpc-601.c: Re-generated.
8232 * features/rs6000/powerpc-602.c: Re-generated.
8233 * features/rs6000/powerpc-603.c: Re-generated.
8234 * features/rs6000/powerpc-604.c: Re-generated.
8235 * features/rs6000/powerpc-64.c: Re-generated.
8236 * features/rs6000/powerpc-64l.c: Re-generated.
8237 * features/rs6000/powerpc-7400.c: Re-generated.
8238 * features/rs6000/powerpc-750.c: Re-generated.
8239 * features/rs6000/powerpc-860.c: Re-generated.
8240 * features/rs6000/powerpc-altivec32.c: Re-generated.
8241 * features/rs6000/powerpc-altivec32l.c: Re-generated.
8242 * features/rs6000/powerpc-altivec64.c: Re-generated.
8243 * features/rs6000/powerpc-altivec64l.c: Re-generated.
8244 * features/rs6000/powerpc-cell32l.c: Re-generated.
8245 * features/rs6000/powerpc-cell64l.c: Re-generated.
8246 * features/rs6000/powerpc-e500.c: Re-generated.
8247 * features/rs6000/powerpc-e500l.c: Re-generated.
8248 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8249 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8250 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8251 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8252 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8253 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8254 * features/rs6000/powerpc-vsx32.c: Re-generated.
8255 * features/rs6000/powerpc-vsx32l.c: Re-generated.
8256 * features/rs6000/powerpc-vsx64.c: Re-generated.
8257 * features/rs6000/powerpc-vsx64l.c: Re-generated.
8258 * features/rs6000/rs6000.c: Re-generated.
8259 * features/s390-linux32.c: Re-generated.
8260 * features/s390-linux32v1.c: Re-generated.
8261 * features/s390-linux32v2.c: Re-generated.
8262 * features/s390-linux64.c: Re-generated.
8263 * features/s390-linux64v1.c: Re-generated.
8264 * features/s390-linux64v2.c: Re-generated.
8265 * features/s390-te-linux64.c: Re-generated.
8266 * features/s390-tevx-linux64.c: Re-generated.
8267 * features/s390-vx-linux64.c: Re-generated.
8268 * features/s390x-linux64.c: Re-generated.
8269 * features/s390x-linux64v1.c: Re-generated.
8270 * features/s390x-linux64v2.c: Re-generated.
8271 * features/s390x-te-linux64.c: Re-generated.
8272 * features/s390x-tevx-linux64.c: Re-generated.
8273 * features/s390x-vx-linux64.c: Re-generated.
8274 * features/sparc/sparc32-solaris.c: Re-generated.
8275 * features/sparc/sparc64-solaris.c: Re-generated.
8276 * features/tic6x-c62x.c: Re-generated.
8277 * features/tic6x-c62x-linux.c: Re-generated.
8278 * features/tic6x-c64x.c: Re-generated.
8279 * features/tic6x-c64x-linux.c: Re-generated.
8280 * features/tic6x-c64xp.c: Re-generated.
8281 * features/tic6x-c64xp-linux.c: Re-generated.
8282
35b4818d
YQ
82832017-07-26 Yao Qi <yao.qi@linaro.org>
8284
8285 * i386-linux-tdep.c (i386_linux_read_description): New function.
8286 (i386_linux_core_read_description): Call
8287 i386_linux_read_description.
8288 * i386-linux-tdep.h (i386_linux_read_description): Declare.
8289 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8290 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8291 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8292 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8293 * x86-linux-nat.c (x86_linux_read_description): Call
8294 i386_linux_read_description.
8295
8e2141c6
YQ
82962017-07-26 Yao Qi <yao.qi@linaro.org>
8297
8298 * NEWS: Mention it.
8299 * features/Makefile (%.c: %.xml): Pass the xml file name to
8300 command "maint print c-tdesc".
8301 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8302 name from 'arg'.
8303
b468ff4c
YQ
83042017-07-26 Yao Qi <yao.qi@linaro.org>
8305
8306 * target-descriptions.c (target_desc): Add ctor and dtor. Do
8307 in-class initialization.
8308 (tdesc_create_feature): Call new instead of XCNEW.
8309 (free_target_description): Ue delete.
8310
b9c0e1b4
JB
83112017-07-25 John Baldwin <jhb@FreeBSD.org>
8312
8313 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8314
a04b5337
YQ
83152017-07-25 Yao Qi <yao.qi@linaro.org>
8316
8317 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8318 constant.
8319 (amd64_x32_init_abi): Likewise.
8320 * amd64-tdep.h (amd64_init_abi): Update declaration.
8321 (amd64_x32_init_abi): Likewise.
8322
02ad7fc2
YQ
83232017-07-25 Yao Qi <yao.qi@linaro.org>
8324
8325 PR tdep/21717
8326 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8327 condition for FPSCR.
8328 (arm_linux_store_inferior_registers): Likewise.
8329
b6f48cb0
TT
83302017-07-22 Tom Tromey <tom@tromey.com>
8331
8332 * break-catch-syscall.c (struct catch_syscall_inferior_data)
8333 <syscalls_counts>: Now a std::vector.
8334 (get_catch_syscall_inferior_data): Use "new".
8335 (catch_syscall_inferior_data_cleanup): Use "delete".
8336 (insert_catch_syscall, remove_catch_syscall)
8337 (clear_syscall_counts): Update.
8338
e12c9b7a
TT
83392017-07-22 Tom Tromey <tom@tromey.com>
8340
8341 * break-catch-syscall.c (syscall_catchpoint)
8342 <syscalls_to_be_caught>: Now a std::vector<int>
8343 (~syscall_catchpoint): Remove.
8344 (insert_catch_syscall, remove_catch_syscall)
8345 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8346 (print_mention_catch_syscall, print_recreate_catch_syscall):
8347 Update.
8348 (create_syscall_event_catchpoint): Change type of "filter"
8349 parameter.
8350 (catch_syscall_split_args): Return a std::vector.
8351 (catch_syscall_command_1, catching_syscall_number_1): Update.
8352
4fa8aeac
TT
83532017-07-22 Tom Tromey <tom@tromey.com>
8354
8355 * break-catch-throw.c (struct exception_catchpoint)
8356 <exception_rx>: Now a std::string.
8357 (~exception_catchpoint): Remove.
8358 (print_one_detail_exception_catchpoint): Update.
8359 (handle_gnu_v3_exceptions): Change type of except_rx.
8360 (extract_exception_regexp): Return a std::string.
8361 (catch_exception_command_1): Update.
8362
f746a154
TT
83632017-07-22 Tom Tromey <tom@tromey.com>
8364
8365 * break-catch-sig.c (gdb_signal_type): Remove typedef.
8366 (struct signal_catchpoint) <signals_to_be_caught>: Now a
8367 std::vector.
8368 <catch_all>: Now a bool.
8369 (~signal_catchpoint): Remove.
8370 (signal_catchpoint_insert_location)
8371 (signal_catchpoint_remove_location)
8372 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8373 (signal_catchpoint_print_mention)
8374 (signal_catchpoint_print_recreate)
8375 (signal_catchpoint_explains_signal): Update.
8376 (create_signal_catchpoint): Change type of "filter" and
8377 "catch_all".
8378 (catch_signal_split_args): Return a std::vector. Change type of
8379 "catch_all".
8380 (catch_signal_command): Update.
8381
47e77640
PA
83822017-07-20 Pedro Alves <palves@redhat.com>
8383
8384 * ada-lang.c (ada_language_defn): Make extern.
8385 (_initialize_ada_language): Remove add_language call.
8386 * c-lang.c (c_language_defn, cplus_language_defn)
8387 (asm_language_defn, minimal_language_defn): Make extern.
8388 (_initialize_c_language): Delete.
8389 * completer.c (compare_cstrings): Delete, moved to utils.h.
8390 * d-lang.c (d_language_defn): Make extern.
8391 (_initialize_d_language): Remove add_language calls.
8392 * defs.h (enum language): Add comment.
8393 * f-lang.c (f_language_defn): Make extern.
8394 (_initialize_f_language): Remove add_language call.
8395 * go-lang.c (go_language_defn): Make extern.
8396 (_initialize_go_language): Remove add_language call.
8397 * language.c: Include <algorithm>.
8398 (languages): Redefine as const array.
8399 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8400 (set_language_command): Handle "local". Use for-range loop.
8401 (set_language): Remove loop.
8402 (language_enum): Rewrite.
8403 (language_def, language_str): Remove loops.
8404 (add_language): Delete.
8405 (add_set_language_command): New, based on add_languages.
8406 (skip_language_trampoline): Adjust.
8407 (local_language_defn): Delete.
8408 (language_gdbarch_post_init): Adjust.
8409 (_initialize_language): Remove add_language calls. Call
8410 add_set_language_command.
8411 * language.h (add_language): Delete.
8412 (auto_language_defn)
8413 (unknown_language_defn, minimal_language_defn, ada_language_defn)
8414 (asm_language_defn, c_language_defn, cplus_language_defn)
8415 (d_language_defn, f_language_defn, go_language_defn)
8416 (m2_language_defn, objc_language_defn, opencl_language_defn)
8417 (pascal_language_defn, rust_language_defn): Declare.
8418 * m2-lang.c (m2_language_defn): Make extern.
8419 (_initialize_m2_language): Remove add_language call.
8420 * objc-lang.c (objc_language_defn): Make extern.
8421 (_initialize_objc_language): Remove add_language call.
8422 * opencl-lang.c (opencl_language_defn): Make extern.
8423 (_initialize_opencl_language): Remove add_language call.
8424 * p-lang.c (pascal_language_defn): Make extern.
8425 (_initialize_pascal_language): Delete.
8426 * rust-lang.c (rust_language_defn): Make extern.
8427 (_initialize_rust_language): Delete.
8428 * utils.h (compare_cstrings): New static inline function.
8429
edb0c9cb
PA
84302017-07-20 Pedro Alves <palves@redhat.com>
8431
8432 * ada-lang.c (ada_to_fixed_type_1): Adjust.
8433 (get_var_value): Constify parameters.
8434 (get_int_var_value): Change prototype.
8435 (to_fixed_range_type): Adjust.
8436 * ada-lang.h (get_int_var_value): Change prototype.
8437
a778f165
PA
84382017-07-20 Pedro Alves <palves@redhat.com>
8439
8440 * dwarf2read.c (dw2_lookup_symbol): Use
8441 SYMBOL_MATCHES_SEARCH_NAME.
8442 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8443
42edd901
PA
84442017-07-20 Pedro Alves <palves@redhat.com>
8445
8446 * block.c (block_iter_name_step, block_iter_name_first)
8447 (block_iter_name_next): Delete.
8448 (block_lookup_symbol_primary): Adjust to use
8449 dict_iter_match_first/dict_iter_match_next.
8450 * block.h (block_iter_name_first, block_iter_name_next): Delete
8451 declarations.
8452 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8453 dict_iter_match_first/dict_iter_match_next.
8454
cf325299
PA
84552017-07-20 Pedro Alves <palves@redhat.com>
8456
8457 * cp-support.c (cp_find_first_component_aux): Add missing case for
8458 end of string.
8459
c5ed0576
DB
84602017-07-18 David Blaikie <dblaikie@gmail.com>
8461
8462 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8463 of dwo_cu's dwo_file.
8464
27841e76
YQ
84652017-07-18 Yao Qi <yao.qi@linaro.org>
8466
8467 * remote.c (store_registers_using_G): Remove one line comment.
8468
cfb7e58b
YQ
84692017-07-18 Yao Qi <yao.qi@linaro.org>
8470
8471 * regcache.c (regcache_cpy): Simplify it.
8472 (regcache::cpy_no_passthrough): Remove it.
8473 * regcache.h (cpy_no_passthrough): Remove it.
8474 (regcache_dup, regcache_cpy): Update comments.
8475
386535dd
PA
84762017-07-18 Pedro Alves <palves@redhat.com>
8477
8478 * remote-sim.c (sim_command_completer): Adjust to work with a
8479 completion_tracker instead of a VEC.
8480
c45ec17c
PA
84812017-07-17 Pedro Alves <palves@redhat.com>
8482
8483 * completer.c (complete_source_filenames): New function.
8484 (complete_address_and_linespec_locations): New function.
8485 (location_completer): Use complete_address_and_linespec_locations.
8486 (completion_tracker::build_completion_result): Honor the tracker's
8487 request to suppress append.
8488 * completer.h (completion_tracker::suppress_append_ws)
8489 (completion_tracker::set_suppress_append_ws): New methods.
8490 (completion_tracker::m_suppress_append_ws): New field.
8491 (complete_source_filenames): New declaration.
8492 * linespec.c (linespec_complete_what): New.
8493 (struct ls_parser) <complete_what, completion_word,
8494 completion_quote_char, completion_quote_end, completion_tracker>:
8495 New fields.
8496 (string_find_incomplete_keyword_at_end): New.
8497 (linespec_lexer_lex_string): Record quote char. If in completion
8498 mode, don't throw.
8499 (linespec_lexer_consume_token): Advance the completion word point.
8500 (linespec_lexer_peek_token): Save/restore completion info.
8501 (save_stream_and_consume_token): New.
8502 (set_completion_after_number): New.
8503 (linespec_parse_basic): Set what to complete next depending on
8504 token. Handle function and label completions specially.
8505 (parse_linespec): Disable objc shortcut in completion mode. Set
8506 what to complete next depending on token type. Skip keyword if in
8507 completion mode.
8508 (complete_linespec_component, linespec_complete): New.
8509 * linespec.h (linespec_complete): Declare.
8510
be966d42
PA
85112017-07-17 Pedro Alves <palves@redhat.com>
8512
8513 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8514 Handle 'operator<' / 'operator<<'.
8515
a2459270
PA
85162017-07-17 Pedro Alves <palves@redhat.com>
8517
8518 * completer.c (collect_explicit_location_matches): Handle
8519 MATCH_LABEL.
8520 (convert_explicit_location_to_linespec): New, factored out from
8521 ...
8522 (convert_explicit_location_to_sals): ... this.
8523 (complete_label): New.
8524 (linespec_complete_label, find_label_symbols_in_block): New.
8525 (find_label_symbols): Add completion_mode parameter and adjust to
8526 call find_label_symbols_in_block.
8527 * linespec.h (linespec_complete_label): Declare.
8528
c6756f62
PA
85292017-07-17 Pedro Alves <palves@redhat.com>
8530
8531 * ada-lang.c (ada_collect_symbol_completion_matches): Add
8532 complete_symbol_mode parameter.
8533 * cli/cli-cmds.c (complete_command): Get the completion result out
8534 of the handle_brkchars tracker if used a custom word point.
8535 * completer.c: Include "linespec.h".
8536 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8537 (advance_to_expression_complete_word_point): New.
8538 (completion_tracker::completes_to_completion_word): New.
8539 (complete_files_symbols): Pass down
8540 complete_symbol_mode::EXPRESSION.
8541 (explicit_options, probe_options): New.
8542 (collect_explicit_location_matches): Complete on the
8543 explictit_loc->foo instead of word. Use
8544 linespec_complete_function. Handle MATCH_LINE. Handle offering
8545 keyword and options completions.
8546 (backup_text_ptr): Delete.
8547 (skip_keyword): New.
8548 (complete_explicit_location): Remove 'word' parameter. Add
8549 language, quoted_arg_start and quoted_arg_end parameters.
8550 Rewrite, parsing left to right.
8551 (location_completer): Rewrite.
8552 (location_completer_handle_brkchars): New function.
8553 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8554 (enum complete_line_internal_reason): Adjust comments.
8555 (completion_tracker::discard_completions): New.
8556 (completer_handle_brkchars_func_for_completer): Handle
8557 location_completer.
8558 (gdb_custom_word_point_brkchars)
8559 (gdb_org_rl_basic_quote_characters): New.
8560 (gdb_completion_word_break_characters_throw)
8561 (completion_find_completion_word): Handle trackers that use a
8562 custom word point.
8563 (completion_tracker::advance_custom_word_point_by): New.
8564 (completion_tracker::build_completion_result): Don't rely on
8565 readline appending the quote char.
8566 (gdb_rl_attempted_completion_function_throw): Handle trackers that
8567 use a custom word point.
8568 (gdb_rl_attempted_completion_function): Restore
8569 rl_basic_quote_characters.
8570 * completer.h (class completion_tracker): Extend intro comment.
8571 (completion_tracker::set_quote_char)
8572 (completion_tracker::quote_char)
8573 (completion_tracker::set_use_custom_word_point)
8574 (completion_tracker::use_custom_word_point)
8575 (completion_tracker::custom_word_point)
8576 (completion_tracker::set_custom_word_point)
8577 (completion_tracker::advance_custom_word_point_by)
8578 (completion_tracker::completes_to_completion_word)
8579 (completion_tracker::discard_completions): New methods.
8580 (completion_tracker::m_quote_char)
8581 (completion_tracker::m_use_custom_word_point)
8582 (completion_tracker::m_custom_word_point): New fields.
8583 (advance_to_expression_complete_word_point): Declare.
8584 * f-lang.c (f_collect_symbol_completion_matches): Add
8585 complete_symbol_mode parameter.
8586 * language.h (struct language_defn)
8587 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8588 parameter.
8589 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
8590 (linespec_complete_function): New function.
8591 (linespec_lexer_lex_keyword): Adjust.
8592 * linespec.h (linespec_keywords, linespec_complete_function): New
8593 declarations.
8594 * location.c (find_end_quote): New function.
8595 (explicit_location_lex_one): Add explicit_completion_info
8596 parameter. Save quoting info. Don't throw if being called for
8597 completion. Don't handle Ada operators here.
8598 (is_cp_operator, skip_op_false_positives, first_of)
8599 (explicit_location_lex_one_function): New function.
8600 (string_to_explicit_location): Replace 'dont_throw' parameter with
8601 an explicit_completion_info pointer parameter. Handle it. Don't
8602 use explicit_location_lex_one to lex function names. Use
8603 explicit_location_lex_one_function instead.
8604 * location.h (struct explicit_completion_info): New.
8605 (string_to_explicit_location): Replace 'dont_throw' parameter with
8606 an explicit_completion_info pointer parameter.
8607 * symtab.c (default_collect_symbol_completion_matches_break_on):
8608 Add complete_symbol_mode parameter. Handle LINESPEC mode.
8609 (default_collect_symbol_completion_matches)
8610 (collect_symbol_completion_matches): Add complete_symbol_mode
8611 parameter.
8612 (collect_symbol_completion_matches_type): Pass down
8613 complete_symbol_mode::EXPRESSION.
8614 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8615 parameter. Handle LINESPEC mode.
8616 * symtab.h (complete_symbol_mode): New.
8617 (default_collect_symbol_completion_matches_break_on)
8618 (default_collect_symbol_completion_matches)
8619 (collect_symbol_completion_matches)
8620 (collect_file_symbol_completion_matches): Add complete_symbol_mode
8621 parameter.
8622
1d550c82
PA
86232017-07-17 Pedro Alves <palves@redhat.com>
8624
8625 * utils.c (enum class strncmp_iw_mode): New.
8626 (strcmp_iw): Rename to ...
8627 (strncmp_iw_with_mode): ... this. Add string2_len and mode
8628 parameters. Handle them.
8629 (strncmp_iw): New.
8630 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8631 * utils.h (strncmp_iw): Declare.
8632 (strcmp_iw): Move describing comments here.
8633
8090b426
PA
86342017-07-17 Pedro Alves <palves@redhat.com>
8635
8636 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8637 CP_OPERATOR_STR.
8638 * c-typeprint.c (is_type_conversion_operator): Use
8639 CP_OPERATOR_STR.
8640 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8641 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8642 CP_OPERATOR_LEN.
8643 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8644 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8645 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8646 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8647 CP_OPERATOR_STR.
8648 * location.c: Include "cp-support.h".
8649 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8650 CP_OPERATOR_STR.
8651 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8652 CP_OPERATOR_LEN.
8653
6a2c1b87
PA
86542017-07-17 Pedro Alves <palves@redhat.com>
8655
8656 * cli/cli-cmds.c (complete_command): Use a completion tracker
8657 along with completion_find_completion_word for handle_brkchars
8658 phase.
8659 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8660 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8661 (struct gdb_rl_completion_word_info): New.
8662 (gdb_rl_find_completion_word): New.
8663 (completion_find_completion_word): New.
8664 * completer.h (completion_find_completion_word): Declare.
8665
eb3ff9a5
PA
86662017-07-17 Pedro Alves <palves@redhat.com>
8667
8668 * ada-lang.c (symbol_completion_match): Adjust comments.
8669 (symbol_completion_add): Replace vector parameter with
8670 completion_tracker parameter. Use it.
8671 (ada_make_symbol_completion_list): Rename to...
8672 (ada_collect_symbol_completion_matches): ... this. Add
8673 completion_tracker parameter and use it.
8674 (ada_language_defn): Adjust.
8675 * break-catch-syscall.c (catch_syscall_completer): Adjust
8676 prototype and work with completion_tracker instead of VEC.
8677 * breakpoint.c (condition_completer): Adjust prototype and work
8678 with completion_tracker instead of VEC.
8679 * c-lang.c (c_language_defn, cplus_language_defn)
8680 (asm_language_defn, minimal_language_defn): Adjust to renames.
8681 * cli/cli-cmds.c (complete_command): Rework using
8682 completion_tracker. Catch exceptions when completing.
8683 * cli/cli-decode.c (integer_unlimited_completer)
8684 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8685 with completion_tracker instead of VEC.
8686 * command.h (struct completion_tracker): Forward declare.
8687 (completer_ftype, completer_handle_brkchars_ftype): Change
8688 types.
8689 (complete_on_cmdlist, complete_on_enum): Adjust.
8690 * completer.c: Include <algorithm>.
8691 (struct gdb_completer_state): New.
8692 (current_completion): New global.
8693 (readline_line_completion_function): Delete.
8694 (noop_completer, filename_completer)
8695 (filename_completer_handle_brkchars, complete_files_symbols)
8696 (linespec_location_completer): Adjust to work with a
8697 completion_tracker instead of a VEC.
8698 (string_or_empty): New.
8699 (collect_explicit_location_matches): Adjust to work with a
8700 completion_tracker instead of a VEC.
8701 (explicit_location_completer): Rename to ...
8702 (complete_explicit_location): ... this and adjust to work with a
8703 completion_tracker instead of a VEC.
8704 (location_completer): Adjust to work with a completion_tracker
8705 instead of a VEC.
8706 (add_struct_fields): Adjust to work with a completion_list instead
8707 of VEC.
8708 (expression_completer): Rename to ...
8709 (complete_expression): ... this and adjust to work with a
8710 completion_tracker instead of a VEC. Use complete_files_symbols.
8711 (expression_completer): Reimplement on top of complete_expression.
8712 (symbol_completer): Adjust to work with a completion_tracker
8713 instead of a VEC.
8714 (enum complete_line_internal_reason): Add describing comments.
8715 (complete_line_internal_normal_command): Adjust to work with a
8716 completion_tracker instead of a VEC.
8717 (complete_line_internal): Rename to ...
8718 (complete_line_internal_1): ... this and adjust to work with a
8719 completion_tracker instead of a VEC. Assert TEXT is NULL in the
8720 handle_brkchars phase.
8721 (new_completion_tracker): Delete.
8722 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8723 complete_line_internal_1.
8724 (free_completion_tracker): Delete.
8725 (INITIAL_COMPLETION_HTAB_SIZE): New.
8726 (completion_tracker::completion_tracker)
8727 (completion_tracker::~completion_tracker): New.
8728 (maybe_add_completion): Delete.
8729 (completion_tracker::maybe_add_completion)
8730 (completion_tracker::add_completion)
8731 (completion_tracker::add_completions): New.
8732 (throw_max_completions_reached_error): Delete.
8733 (complete_line): Adjust to work with a completion_tracker instead
8734 of a VEC. Don't create a completion_tracker_t or check for max
8735 completions here.
8736 (command_completer, command_completer_handle_brkchars)
8737 (signal_completer, reg_or_group_completer_1)
8738 (reg_or_group_completer, default_completer_handle_brkchars):
8739 Adjust to work with a completion_tracker.
8740 (gdb_completion_word_break_characters_throw): New.
8741 (gdb_completion_word_break_characters): Reimplement.
8742 (line_completion_function): Delete.
8743 (completion_tracker::recompute_lowest_common_denominator)
8744 (expand_preserving_ws)
8745 (completion_tracker::build_completion_result)
8746 (completion_result::completion_result)
8747 (completion_result::completion_result)
8748 (completion_result::~completion_result)
8749 (completion_result::completion_result)
8750 (completion_result::release_match_list, compare_cstrings)
8751 (completion_result::sort_match_list)
8752 (completion_result::reset_match_list)
8753 (gdb_rl_attempted_completion_function_throw)
8754 (gdb_rl_attempted_completion_function): New.
8755 * completer.h (completion_list, struct completion_result)
8756 (class completion_tracker): New.
8757 (complete_line): Add completion_tracker parameter.
8758 (readline_line_completion_function): Delete.
8759 (gdb_rl_attempted_completion_function): New.
8760 (noop_completer, filename_completer, expression_completer)
8761 (location_completer, symbol_completer, command_completer)
8762 (signal_completer, reg_or_group_completer): Update prototypes.
8763 (completion_tracker_t, new_completion_tracker)
8764 (make_cleanup_free_completion_tracker): Delete.
8765 (enum maybe_add_completion_enum): Delete.
8766 (maybe_add_completion): Delete.
8767 (throw_max_completions_reached_error): Delete.
8768 * corefile.c (complete_set_gnutarget): Adjust to work with a
8769 completion_tracker instead of a VEC.
8770 * cp-abi.c (cp_abi_completer): Adjust to work with a
8771 completion_tracker instead of a VEC.
8772 * d-lang.c (d_language_defn): Adjust.
8773 * disasm.c (disassembler_options_completer): Adjust to work with a
8774 completion_tracker instead of a VEC.
8775 * f-lang.c (f_make_symbol_completion_list): Rename to ...
8776 (f_collect_symbol_completion_matches): ... this. Adjust to work
8777 with a completion_tracker instead of a VEC.
8778 (f_language_defn): Adjust.
8779 * go-lang.c (go_language_defn): Adjust.
8780 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8781 Adjust to work with a completion_tracker instead of a VEC.
8782 * infrun.c (handle_completer): Likewise.
8783 * interps.c (interpreter_completer): Likewise.
8784 * interps.h (interpreter_completer): Likewise.
8785 * language.c (unknown_language_defn, auto_language_defn)
8786 (local_language_defn): Adjust.
8787 * language.h (language_defn::la_make_symbol_completion_list):
8788 Rename to ...
8789 (language_defn::la_collect_symbol_completion_matches): ... this
8790 and adjust to work with a completion_tracker instead of a VEC.
8791 * m2-lang.c (m2_language_defn): Adjust.
8792 * objc-lang.c (objc_language_defn): Adjust.
8793 * opencl-lang.c (opencl_language_defn): Adjust.
8794 * p-lang.c (pascal_language_defn): Adjust.
8795 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8796 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8797 with a completion_tracker.
8798 * rust-lang.c (rust_language_defn): Adjust.
8799 * symtab.c (free_completion_list, do_free_completion_list)
8800 (return_val, completion_tracker): Delete.
8801 (completion_list_add_name, completion_list_add_symbol)
8802 (completion_list_add_msymbol, completion_list_objc_symbol)
8803 (completion_list_add_fields, add_symtab_completions): Add
8804 completion_tracker parameter and use it.
8805 (default_make_symbol_completion_list_break_on_1): Rename to...
8806 (default_collect_symbol_completion_matches_break_on): ... this.
8807 Add completion_tracker parameter and use it instead of allocating
8808 a completion tracker here.
8809 (default_make_symbol_completion_list_break_on): Delete old
8810 implementation.
8811 (default_make_symbol_completion_list): Delete.
8812 (default_collect_symbol_completion_matches): New.
8813 (make_symbol_completion_list): Delete.
8814 (collect_symbol_completion_matches): New.
8815 (make_symbol_completion_type): Rename to ...
8816 (collect_symbol_completion_matches_type): ... this. Add
8817 completion_tracker parameter and use it instead of VEC.
8818 (make_file_symbol_completion_list_1): Rename to...
8819 (collect_file_symbol_completion_matches): ... this. Add
8820 completion_tracker parameter and use it instead of VEC.
8821 (make_file_symbol_completion_list): Delete.
8822 (add_filename_to_list): Use completion_list instead of a VEC.
8823 (add_partial_filename_data::list): Now a completion_list.
8824 (make_source_files_completion_list): Work with a completion_list
8825 instead of a VEC.
8826 * symtab.h: Include "completer.h".
8827 (default_make_symbol_completion_list_break_on)
8828 (default_make_symbol_completion_list, make_symbol_completion_list)
8829 (make_symbol_completion_type, make_file_symbol_completion_list)
8830 (make_source_files_completion_list): Delete.
8831 (default_collect_symbol_completion_matches_break_on)
8832 (default_collect_symbol_completion_matches)
8833 (collect_symbol_completion_matches)
8834 (collect_symbol_completion_matches_type)
8835 (collect_file_symbol_completion_matches)
8836 (make_source_files_completion_list): New.
8837 * top.c (init_main): Don't install a rl_completion_entry_function
8838 hook. Install a rl_attempted_completion_function hook instead.
8839 * tui/tui-layout.c (layout_completer): Adjust to work with a
8840 completion_tracker.
8841 * tui/tui-regs.c (tui_reggroup_completer):
8842 * tui/tui-win.c (window_name_completer, focus_completer)
8843 (winheight_completer): Adjust to work with a completion_tracker.
8844 * value.c: Include "completer.h".
8845 (complete_internalvar): Adjust to work with a completion_tracker.
8846 * value.h (complete_internalvar): Likewise.
8847
6e1dbf8c
PA
88482017-07-17 Pedro Alves <palves@redhat.com>
8849
8850 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8851 renames.
8852 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8853 comments to completer_ftype's declaration.
8854 <completer_handle_brkchars>: Change type to
8855 completer_handle_brkchars_ftype.
8856 * command.h (completer_ftype): Add describing comment and give
8857 names to parameters.
8858 (completer_ftype_void): Rename to ...
8859 (completer_handle_brkchars_ftype) ... this. Add describing comment.
8860 (set_cmd_completer_handle_brkchars): Adjust.
8861 * completer.c (filename_completer_handle_brkchars): New function.
8862 (complete_line_internal_normal_command): New function, factored
8863 out from ...
8864 (complete_line_internal): ... here.
8865 (command_completer_handle_brkchars)
8866 (default_completer_handle_brkchars)
8867 (completer_handle_brkchars_func_for_completer): New functions.
8868 * completer.h (set_gdb_completion_word_break_characters): Delete
8869 declaration.
8870 (completer_handle_brkchars_func_for_completer): New declaration.
8871 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8872 completer_handle_brkchars_func_for_completer.
8873
78b13106
PA
88742017-07-17 Pedro Alves <palves@redhat.com>
8875
8876 * completer.c (symbol_completer): New function, based on
8877 make_symbol_completion_list_fn.
8878 * completer.h (symbol_completer): New declaration.
8879 * guile/scm-cmd.c (cmdscm_completers): Adjust.
8880 * python/py-cmd.c (completers): Adjust.
8881 * symtab.c (make_symbol_completion_list_fn): Delete.
8882 * symtab.h (make_symbol_completion_list_fn): Delete.
8883 * cli/cli-decode.c (add_cmd): Adjust.
8884
bbf2f4df
PA
88852017-07-17 Pedro Alves <palves@redhat.com>
8886
8887 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8888 * dwarf2read.c: Include "filename-seen-cache.h".
8889 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8890 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8891 * filename-seen-cache.c: New file.
8892 * filename-seen-cache.h: New file.
8893 * symtab.c: Include "filename-seen-cache.h".
8894 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8895 (create_filename_seen_cache, clear_filename_seen_cache)
8896 (delete_filename_seen_cache, filename_seen): Delete, parts moved
8897 to filename-seen-cache.h/filename-seen-cache.c.
8898 (output_source_filename, sources_info)
8899 (maybe_add_partial_symtab_filename)
8900 (make_source_files_completion_list): Adjust to use
8901 filename_seen_cache.
8902
330cdd98
PA
89032017-07-17 Pedro Alves <palves@redhat.com>
8904
8905 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8906 fields.
8907 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8908 dwarf2_debug_sections*)): New.
8909 (dwarf2_per_objfile::dwarf2_per_objfile(const
8910 dwarf2_per_objfile&)): Declare as deleted.
8911 (dwarf2_per_objfile::operator=): Declare as deleted.
8912 (dwarf2_per_objfile::dwarf2_per_objfile)
8913 (dwarf2_per_objfile::~dwarf2_per_objfile)
8914 (dwarf2_per_objfile::free_cached_comp_units): New.
8915 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8916 ctor. Call dwarf2_per_objfile's ctor manually.
8917 (dwarf2_locate_sections): Deleted/refactored as ...
8918 (dwarf2_per_objfile::locate_sections): ... this new method.
8919 (free_cached_comp_units): Defer to
8920 dwarf2_per_objfile::free_cached_comp_units.
8921 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8922
8880f2a9
TT
89232017-07-14 Tom Tromey <tom@tromey.com>
8924
8925 PR rust/21764:
8926 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8927 parameter.
8928 <UNOP_SIZEOF>: Split into separate case.
8929 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8930
65547233
TT
89312017-07-14 Tom Tromey <tom@tromey.com>
8932
8933 PR rust/21763:
8934 * symtab.c (symbol_matches_domain): Add language_rust to special
8935 case.
8936 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8937 treat LOC_TYPEDEF symbols as variables.
8938
8f14146e
PA
89392017-07-14 Pedro Alves <palves@redhat.com>
8940
8941 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8942 symtabs matching all symtabs with SRCFILE as file name instead of
8943 only considering the first hit, with lookup_symtab.
8944
2347965c
SM
89452017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8946
8947 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8948 operator_name parameters.
8949 (gen_expr): Update function call.
8950
40f4af28
SM
89512017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8952
8953 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8954 parameter.
8955 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8956 Likewise.
8957 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8958 parameter, use agent_expr::gdbarch instead, update function
8959 calls.
8960 (locexpr_tracepoint_var_ref): Likewise.
8961 (loclist_tracepoint_var_ref): Likewise.
8962 * ax-gdb.c (gen_trace_static_fields): Likewise.
8963 (gen_traced_pop): Likewise.
8964 (gen_frame_args_address): Likewise.
8965 (gen_frame_locals_address): Likewise.
8966 (gen_var_ref): Likewise.
8967 (gen_struct_ref_recursive): Likewise.
8968 (gen_static_field): Likewise.
8969 (gen_maybe_namespace_elt): Likewise.
8970 (gen_expr): Likewise.
8971 (gen_trace_for_var): Likewise.
8972 (gen_trace_for_expr): Likewise.
8973 (gen_trace_for_return_address): Likewise.
8974
053f8057
SM
89752017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8976
8977 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8978 parameter.
8979 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8980
6661ad48
SM
89812017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8982
8983 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8984 from ax, update calls.
8985 (gen_usual_arithmetic): Likewise.
8986 (gen_integral_promotions): Likewise.
8987 (gen_bitfield_ref): Likewise.
8988 (gen_primitive_field): Likewise.
8989 (gen_struct_ref_recursive): Likewise.
8990 (gen_struct_ref): Likewise.
8991 (gen_maybe_namespace_elt): Likewise.
8992 (gen_struct_elt_for_reference): Likewise.
8993 (gen_namespace_elt): Likewise.
8994 (gen_aggregate_elt_ref): Likewise.
8995 (gen_expr): Get gdbarch from ax, update calls.
8996 (gen_expr_binop_rest): Likewise.
8997
c55a47e7
PA
89982017-07-13 Pedro Alves <palves@redhat.com>
8999
9000 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9001 as default tdesc.
9002 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9003 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9004 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9005 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9006 tdep.
9007 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9008 Get final tdesc from the tdep.
9009 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9010 default tdesc.
9011 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9012 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9013 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9014 Use it as default tdesc.
9015 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9016 down to amd_init_abi. No longer handle fallback tdesc here.
9017 * amd64-tdep.h (tdesc_x32): Declare.
9018 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9019 parameter.
9020 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9021 as default tdesc.
9022
55efceab
AA
90232017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9024
9025 * s390-linux-tdep.c (s390_process_record): Add support for
9026 instructions new in arch12.
9027
0aa37b65
JB
90282017-07-11 John Baldwin <jhb@FreeBSD.org>
9029
9030 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9031 PT_GETFSBASE and PT_GETGSBASE.
9032 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9033 PT_SETGSBASE.
9034
48aeef91
JB
90352017-07-11 John Baldwin <jhb@FreeBSD.org>
9036
9037 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9038 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9039 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9040 those rules.
9041 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9042 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9043 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9044 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9045 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9046 * features/i386/amd64.xml: Add 64bit-segments.xml.
9047 * features/i386/amd64-avx-avx512.c: Regenerated.
9048 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9049 * features/i386/amd64-avx-mpx.c: Regenerated.
9050 * features/i386/amd64-avx.c: Regenerated.
9051 * features/i386/amd64-mpx.c: Regenerated.
9052 * features/i386/amd64.c: Regenerated.
9053 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9054 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9055 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9056 * regformats/i386/amd64-avx.dat: Regenerated.
9057 * regformats/i386/amd64-mpx.dat: Regenerated.
9058 * regformats/i386/amd64.dat: Regenerated.
9059
77c501bc
YQ
90602017-07-10 Yao Qi <yao.qi@linaro.org>
9061
9062 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9063 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9064
6dc8d757
AK
90652017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9066
9067 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9068 unsetenv.
9069 * gnulib/aclocal.m4: Regenerate.
9070 * gnulib/config.in: Regenerate.
9071 * gnulib/configure: Regenerate.
9072 * gnulib/import/Makefile.am: Regenerate.
9073 * gnulib/import/Makefile.in: Regenerate.
9074 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9075 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9076 * gnulib/import/m4/environ.m4: New file.
9077 * gnulib/import/m4/setenv.m4: New file.
9078 * gnulib/import/setenv.c: New file.
9079 * gnulib/import/unsetenv.c: New file.
9080
266934d1
SM
90812017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9082
9083 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9084 address when op is DW_OP_addr.
9085
03278692
TT
90862017-07-09 Tom Tromey <tom@tromey.com>
9087
9088 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
9089 check and apply to outer type.
9090
4b654465
JB
90912017-07-07 John Baldwin <jhb@FreeBSD.org>
9092
9093 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
9094 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
9095 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
9096 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
9097
2af9fc44
JB
90982017-07-07 John Baldwin <jhb@FreeBSD.org>
9099
9100 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
9101
382b69bb
JB
91022017-07-07 John Baldwin <jhb@FreeBSD.org>
9103
9104 * corelow.c (get_core_siginfo): Remove.
9105 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
9106 instead of get_core_siginfo.
9107 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
9108 * gdbarch.h: Re-generate.
9109 * gdbarch.c: Re-generate.
9110 * linux-tdep.c (linux_core_xfer_siginfo): New.
9111 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
9112
6e5eab33
JB
91132017-07-07 John Baldwin <jhb@FreeBSD.org>
9114
9115 * corelow.c (thread_section_name): Move to ...
9116 * gdbcore.h (thread_section_name): ... here.
9117
929edea9
JB
91182017-07-07 John Baldwin <jhb@FreeBSD.org>
9119
9120 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
9121 (struct siginfo32): New.
9122 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
9123 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
9124 via ptrace(PT_LWPINFO).
9125
762c974a
JB
91262017-07-07 John Baldwin <jhb@FreeBSD.org>
9127
9128 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
9129 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
9130 (fbsd_get_siginfo_type): New.
9131 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
9132 (_initialize_fbsd_tdep): New.
9133
33c5cd75
DB
91342017-07-06 David Blaikie <dblaikie@gmail.com>
9135
9136 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
9137 a singular dwo_unit*) to support multiple CUs in the same way that
9138 multiple TUs are supported.
9139 (create_cus_hash_table): Replace create_dwo_cu with a function for
9140 parsing multiple CUs from a DWO file.
9141 (open_and_init_dwo_file): Use create_cus_hash_table rather than
9142 create_dwo_cu.
9143 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
9144 htab_find, rather than comparing the signature to a singleton CU in
9145 the dwo_file.
9146
8455d262
PA
91472017-07-06 Pedro Alves <palves@redhat.com>
9148
9149 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
9150
4da3eb35
PA
91512017-07-04 Pedro Alves <palves@redhat.com>
9152
9153 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
9154 * gdbtypes.h (TYPE_STATIC): Delete.
9155 (struct fn_field) <is_public, is_abstract, is_static, is_final,
9156 is_synchronized, is_native>: Delete.
9157 <dummy>: Bump.
9158 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
9159 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
9160 (TYPE_FN_FIELD_ABSTRACT): Delete.
9161
5bfd255c
SM
91622017-07-03 Simon Marchi <simon.marchi@ericsson.com>
9163
9164 * buffer.h (buffer_finish): Fix spelling mistakes.
9165
25c54127
EZ
91662017-07-01 Eli Zaretskii <eliz@gnu.org>
9167
9168 * .dir-locals.el: Automatically switch to C-style comments in
9169 versions of Emacs that support the feature.
9170
dc4bde35
SDJ
91712017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9172 Pedro Alves <palves@redhat.com>
9173
9174 PR cli/21688
9175 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
9176 (process_next_line): New variable 'inline_cmd'.
9177 Adjust 'if' clauses for "python", "compile" and "guile" to use
9178 'command_name_equals' and check for '!inline_cmd'.
9179
51ed89aa
SDJ
91802017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
9181
9182 PR cli/21688
9183 * cli/cli-script.c (command_name_equals_not_inline): New function.
9184 (process_next_line): Adjust 'if' clauses for "python", "compile"
9185 and "guile" to use command_name_equals_not_inline.
9186
eb17d413
PA
91872017-06-29 Pedro Alves <palves@redhat.com>
9188
9189 * completer.c (expression_completer): Call
9190 linespec_location_completer instead of location_completer.
9191
195bcdd5
PA
91922017-06-29 Pedro Alves <palves@redhat.com>
9193
9194 * completer.c (expression_completer): Remove code that recomputes
9195 'text' from 'word'.
9196
adc764e7
YQ
91972017-06-29 Yao Qi <yao.qi@linaro.org>
9198
9199 * regformats/regdat.sh: Generate code with
9200 "ifndef IN_PROCESS_AGENT".
9201
6e75794e
PA
92022017-06-28 Pedro Alves <palves@redhat.com>
9203
9204 * command.h: Include "common/scoped_restore.h".
9205
bc491f2e
YQ
92062017-06-28 Yao Qi <yao.qi@linaro.org>
9207
9208 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9209 instead of obstack_grow.
9210
41664b45
DG
92112017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
9212
9213 PR gdb/21337
9214 * symfile.c (reread_symbols): Call objfiles_changed just before
9215 read_symbols.
9216
6da67eb1
PA
92172017-06-27 Pedro Alves <palves@redhat.com>
9218
9219 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9220 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9221 (completion_list_add_symbol, completion_list_add_msymbol):
9222 ... these new functions.
9223 (add_symtab_completions)
9224 (default_make_symbol_completion_list_break_on_1): Adjust.
9225
23732b1e
PA
92262017-06-27 Pedro Alves <palves@redhat.com>
9227
9228 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9229 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
9230 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9231 dtor.
9232 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
9233 'storage_obstack' field an auto_obstack. In-class initialize all
9234 non-bitfield fields. Make minsyms_read bool.
9235 * symfile.c (read_symbols): Adjust.
9236
a4d1e79a
AH
92372017-06-27 Alan Hayward <alan.hayward@arm.com>
9238
9239 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9240 (gdbsim_store_register): Likewise.
9241
8268c778
PA
92422017-06-27 Pedro Alves <palves@redhat.com>
9243
9244 * c-exp.y (name_obstack): Now an auto_obstack.
9245 (yylex): Use auto_obstack::clear.
9246 (c_parse): Use auto_obstack::clear instead of reinitializing and
9247 freeing the obstack.
9248 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9249 * d-exp.y (name_obstack): Now an auto_obstack.
9250 (yylex): Use auto_obstack::clear.
9251 (d_parse): Use auto_obstack::clear instead of reinitializing and
9252 freeing the obstack.
9253 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9254 auto_obstack.
9255 * dwarf2read.c (create_addrmap_from_index)
9256 (dwarf2_build_psymtabs_hard)
9257 (update_enumeration_type_from_children): Likewise.
9258 * gdb_obstack.h (auto_obstack): New type.
9259 * go-exp.y (name_obstack): Now an auto_obstack.
9260 (build_packaged_name): Use auto_obstack::clear.
9261 (go_parse): Use auto_obstack::clear instead of reinitializing and
9262 freeing the obstack.
9263 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9264 auto_obstack.
9265 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9266 * rust-exp.y (work_obstack): Now an auto_obstack.
9267 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9268 reinitializing and freeing the obstack.
9269 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9270 (host_char_to_target): Use auto_obstack.
9271 * utils.h (make_cleanup_obstack_free): Delete declaration.
9272 * valprint.c (generic_emit_char, generic_printstr): Use
9273 auto_obstack.
9274
db665f42
SM
92752017-06-27 Simon Marchi <simon.marchi@ericsson.com>
9276
9277 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9278 thread.
9279 (darwin_init_thread_list): Don't update dummy thread.
9280 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9281
873c0814
SM
92822017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9283
9284 * record-full.c (netorder16): Remove.
9285
8b5a7a6e
SM
92862017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9287
9288 * common/diagnostics.h: Define macros for GCC.
9289 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9290 * common/vec.h: Include diagnostics.h.
9291 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9292 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9293 warning.
9294
d1435379
SM
92952017-06-26 Simon Marchi <simon.marchi@ericsson.com>
9296
9297 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9298 New macro.
9299 * ada-lex.l: Ignore deprecated register warnings.
9300
cc75e0fd
SM
93012017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9302
9303 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9304 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9305
07809eaf
SM
93062017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9307
9308 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9309 its own line.
9310
f076f034
SM
93112017-06-25 Simon Marchi <simon.marchi@ericsson.com>
9312
9313 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9314
0dd5cbc5
AH
93152017-06-23 Alan Hayward <alan.hayward@arm.com>
9316
9317 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9318 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9319 (xtensa_register_read_masked): Likewise.
9320
d4c6ce5b
SDJ
93212017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
9322
9323 * common/environ.c (gdb_environ::unset): Update comment.
9324
16892a03
AH
93252017-06-22 Alan Hayward <alan.hayward@arm.com>
9326
9327 * python/py-unwind.c (pyuw_sniffer): Allocate space for
9328 registers.
9329
d7dcbefc
AH
93302017-06-22 Alan Hayward <alan.hayward@arm.com>
9331
9332 * record-full.c (record_full_exec_insn): Use byte_vector.
9333
b30ff123
YQ
93342017-06-22 Yao Qi <yao.qi@linaro.org>
9335
9336 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9337 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9338
4fa847d7
AH
93392017-06-22 Alan Hayward <alan.hayward@arm.com>
9340
9341 * remote.c (cached_reg): Move from here...
9342 * regcache.h (cached_reg): ...to here.
9343 * python/py-unwind.c (struct reg_info): Remove.
9344 (cached_frame_info): Use cached_reg_t.
9345 (pyuw_prev_register): Likewise.
9346 (pyuw_sniffer): Use cached_reg_t and allocate registers.
9347 (pyuw_dealloc_cache): Free all registers.
9348
f4906a9a
PA
93492017-06-22 Pedro Alves <palves@redhat.com>
9350 Simon Marchi <simon.marchi@ericsson.com>
9351
9352 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9353 warning.
9354 * common/diagnostics.h: New file.
9355
b45a1208
PA
93562017-06-22 Pedro Alves <palves@redhat.com>
9357
9358 * common/agent.h: Add include guards.
9359
e4da2c61
SM
93602017-06-21 Simon Marchi <simon.marchi@ericsson.com>
9361
9362 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9363 talk about addressable units instead of bytes.
9364
96160d60
SDJ
93652017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9366
9367 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9368 of '::const_iterator'.
9369
9a6c7d9c
SDJ
93702017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
9371
9372 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9373 'unittests/environ-selftests.c'.
9374 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9375 * charset.c (find_charset_names): Declare object 'iconv_env'.
9376 Update code to use 'iconv_env' object. Remove call to
9377 'free_environ'.
9378 * common/environ.c: Include <utility>.
9379 (make_environ): Delete function.
9380 (free_environ): Delete function.
9381 (gdb_environ::clear): New function.
9382 (gdb_environ::operator=): New function.
9383 (gdb_environ::get): Likewise.
9384 (environ_vector): Delete function.
9385 (set_in_environ): Delete function.
9386 (gdb_environ::set): New function.
9387 (unset_in_environ): Delete function.
9388 (gdb_environ::unset): New function.
9389 (gdb_environ::envp): Likewise.
9390 * common/environ.h: Include <vector>.
9391 (struct gdb_environ): Delete; transform into...
9392 (class gdb_environ): ... this class.
9393 (free_environ): Delete prototype.
9394 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9395 environ_vector): Likewise.
9396 * infcmd.c (run_command_1): Update code to call
9397 'envp' from 'gdb_environ' class.
9398 (environment_info): Update code to call methods from 'gdb_environ'
9399 class.
9400 (unset_environment_command): Likewise.
9401 (path_info): Likewise.
9402 (path_command): Likewise.
9403 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9404 (inferior::inferior): Initialize 'environment' using the host's
9405 information.
9406 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9407 Include "environ.h".
9408 (class inferior) <environment>: Change type from 'struct
9409 gdb_environ' to 'gdb_environ'.
9410 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9411 methods from 'gdb_environ' class.
9412 * solib.c (solib_find_1): Likewise
9413 * unittests/environ-selftests.c: New file.
9414
75c554cf
YQ
94152017-06-20 Yao Qi <yao.qi@linaro.org>
9416
9417 * features/i386/i386-linux.xml: Exchange the order of including
9418 32bit-linux.xml and 32bit-sse.xml.
9419 * features/i386/i386-linux.c: Regenerated.
9420
72ddacb7
YQ
94212017-06-20 Yao Qi <yao.qi@linaro.org>
9422
9423 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9424 Delete copy ctor and assignment operator.
9425 (tdesc_type): Likewise.
9426 (tdesc_feature): Likewise.
9427 (tdesc_free_reg): Remove.
9428 (tdesc_create_reg): Use new.
9429 (tdesc_free_type): Remove.
9430 (tdesc_create_vector): Use new.
9431 (tdesc_create_union): Likewise.
9432 (tdesc_create_flags): Likewise.
9433 (tdesc_create_enum): Likewise.
9434 (tdesc_free_feature): Delete.
9435 (free_target_description): Use delete.
9436
325c9fd4
JB
94372017-06-19 John Baldwin <jhb@FreeBSD.org>
9438
9439 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9440 registers.
9441
16b7a719
PA
94422017-06-19 Pedro Alves <palves@redhat.com>
9443
9444 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9445 after gdb::unlinker.
9446
1c8e01c9
SDJ
94472017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
9448
9449 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9450 gdb_environ to access an environment variable.
9451
ffce45d2
TP
94522017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9453
9454 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9455 gdb_byte*.
9456
1d4fbac9
SM
94572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9458
9459 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9460
8465943a
SM
94612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9462
9463 * configure: Re-generate.
9464 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9465
3e019bdc
SM
94662017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9467
9468 * configure: Re-generate.
9469 * warning.m4: Pass -Werror to compiler when checking for
9470 supported warning flags.
9471
cf0dd6f0
SM
94722017-06-17 Simon Marchi <simon.marchi@ericsson.com>
9473
9474 * Makefile.in (COMPILE.pre): Add "-x c++".
9475
6f98355c
YQ
94762017-06-16 Alan Hayward <alan.hayward@arm.com>
9477 Pedro Alves <palves@redhat.com>
9478 Yao Qi <yao.qi@linaro.org>
9479
9480 * defs.h (RequireLongest): New.
9481 (extract_integer): Declare function template.
9482 (extract_signed_integer): Remove the declaration, but define it
9483 static inline.
9484 (extract_unsigned_integer): Likewise.
9485 (store_integer): Declare function template.
9486 (store_signed_integer): Remove the declaration, but define it
9487 static inline.
9488 (store_unsigned_integer): Likewise.
9489 * findvar.c (extract_integer): New function template.
9490 (extract_signed_integer): Remove.
9491 (extract_unsigned_integer): Remove.
9492 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9493 instantiations.
9494 (store_integer): New function template.
9495 (store_signed_integer): Remove.
9496 (store_unsigned_integer): Remove.
9497 (store_integer): Explicit instantiations.
9498 * regcache.c (regcache_raw_read_signed): Update.
9499 (regcache::raw_read): New function.
9500 (regcache::raw_read_signed): Remove.
9501 (regcache::raw_read_unsigned): Remove.
9502 (regcache_raw_read_unsigned): Update.
9503 (regcache_raw_write_unsigned): Update.
9504 (regcache::raw_write_signed): Remove.
9505 (regcache::raw_write): New function.
9506 (regcache_cooked_read_signed): Update.
9507 (regcache::raw_write_unsigned): Remove.
9508 (regcache::cooked_read_signed): Remove.
9509 (regcache_cooked_read_unsigned): Update.
9510 (regcache::cooked_read_unsigned): Remove.
9511 (regcache_cooked_write_signed): Update.
9512 (regcache_cooked_write_unsigned): Update.
9513 * regcache.h (regcache) <raw_read_signed>: Remove.
9514 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9515 <raw_read, raw_write>: New.
9516 <cooked_read_signed, cooked_write_signed>: Remove.
9517 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9518 <cooked_read, cooked_write>: New.
9519 * sh64-tdep.c (sh64_pseudo_register_read): Update.
9520 (sh64_pseudo_register_write): Update.
9521
a87dc45a
AK
95222017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
9523
9524 * arc-tdep.c (arc_disassembler_options): New variable.
9525 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9526 of default_print_insn.
9527 (arc_delayed_print_insn): Set info->section when needed,
9528 use default_print_insn to retrieve a disassembler.
9529
45159d6a
SDJ
95302017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
9531
9532 PR gdb/21574
9533 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9534 to mention $SHELL and startup-with-shell.
9535
b46c4cf0
MF
95362017-06-14 Max Filippov <jcmvbkbc@gmail.com>
9537
9538 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9539
6394c606
YQ
95402017-06-14 Yao Qi <yao.qi@linaro.org>
9541
9542 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9543 default_print_insn instead of print_insn_aarch64.
9544 * arm-tdep.c (gdb_print_insn_arm): Call
9545 default_print_insn instead of print_insn_big_arm
9546 and print_insn_little_arm.
9547 * i386-tdep.c (i386_print_insn): Call default_print_insn
9548 instead of print_insn_i386.
9549 * ia64-tdep.c (ia64_print_insn): Call
9550 default_print_insn instead of print_insn_ia64.
9551 * mips-tdep.c (gdb_print_insn_mips): Call
9552 default_print_insn instead of print_insn_big_mips
9553 and print_insn_little_mips.
9554 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9555 instead of print_insn_spu.
9556
d5722aa2
PA
95572017-06-14 Pedro Alves <palves@redhat.com>
9558
9559 * ada-lang.c: Include "common/byte-vector.h".
9560 (ada_value_primitive_packed_val): Use gdb::byte_vector.
9561 * charset.c (wchar_iterator::iterate): Resize the vector instead
9562 of reserving it.
9563 * common/byte-vector.h: Include "common/def-vector.h".
9564 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9565 * cli/cli-dump.c: Include "common/byte-vector.h".
9566 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9567 * common/byte-vector.h: New file.
9568 * common/def-vector.h: New file.
9569 * common/default-init-alloc.h: New file.
9570 * dwarf2loc.c: Include "common/byte-vector.h".
9571 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9572 instead of reserving it.
9573 * dwarf2read.c: Include "common/byte-vector.h".
9574 (data_buf::m_vec): Now a gdb::byte_vector.
9575 * gdb_regex.c: Include "common/def-vector.h".
9576 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9577 * mi/mi-main.c: Include "common/byte-vector.h".
9578 (mi_cmd_data_read_memory): Use gdb::byte_vector.
9579 * printcmd.c: Include "common/byte-vector.h".
9580 (print_scalar_formatted): Use gdb::byte_vector.
9581 * valprint.c: Include "common/byte-vector.h".
9582 (maybe_negate_by_bytes, print_decimal_chars): Use
9583 gdb::byte_vector.
9584
01ec7a27
SM
95852017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9586
9587 * darwin-nat.c: Include "nat/fork-inferior.h".
9588
848d9074
SM
95892017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9590
9591 * configure.nat: Factor out Darwin bits that are not
9592 architecture-specific. Add fork-inferior.o.
9593
3b912944
SM
95942017-06-13 Simon Marchi <simon.marchi@ericsson.com>
9595
9596 * configure.nat: Factor out AIX bits that are not
9597 architecture-specific. Add fork-inferior.o.
9598
55acdf22
AA
95992017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9600
9601 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
9602 (read_pieced_value, write_pieced_value): ...here. Reduce to
9603 wrappers that just call rw_pieced_value.
9604
f65e2044
AA
96052017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9606
9607 * dwarf2loc.c (write_pieced_value): When writing the data for a
9608 memory piece, use write_memory_with_notification instead of
9609 write_memory.
9610
23f945bf
AA
96112017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9612
9613 * valops.c (read_value_memory): Change embedded_offset to
9614 represent a bit offset instead of a byte offset.
9615 * value.h (read_value_memory): Adjust comment.
9616
f236533e
AA
96172017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9618
9619 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9620 dest_offset_bits and source_offset_bits.
9621 (write_pieced_value): Likewise.
9622
65d84b76
AA
96232017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9624
9625 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9626 given by DW_OP_bit_piece.
9627 (write_pieced_value): Likewise.
9628
242d31ab
AA
96292017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9630
9631 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9632 some other preparations to the places where sufficient information
9633 is available.
9634 (write_pieced_value): Likewise.
9635
03c8af18
AA
96362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9637
9638 * dwarf2loc.c (bits_to_bytes): New function.
9639 (read_pieced_value): Fix offset calculations for register pieces
9640 on big-endian targets.
9641 (write_pieced_value): Likewise.
9642
840989c1
AA
96432017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9644
9645 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9646 (write_pieced_value): Likewise.
9647
359b19bb
AA
96482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9649
9650 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9651 transfer the source value's least significant bits, instead of its
9652 lowest-addressed ones. Rename type_len to max_offset.
9653 (read_pieced_value): Mirror above changes to write_pieced_value as
9654 applicable.
9655
07c9ca3b
AA
96562017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9657
9658 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9659 truncate full bytes from dest_offset_bits before using it as an
9660 offset into the buffer.
9661
f1cc9874
AA
96622017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9663
9664 * dwarf2loc.c (write_pieced_value): Include transfer size in
9665 byte-wise check.
9666
cdaac320
AA
96672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9668
9669 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9670 calculation of this_size.
9671
af547a96
AA
96722017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9673
9674 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9675 when targeting a bit-field.
9676 (write_pieced_value): Likewise.
9677
ddd7882a
AA
96782017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9679
9680 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9681 (allocate_piece_closure): Drop addr_size parameter.
9682 (dwarf2_evaluate_loc_desc_full): Adjust call to
9683 allocate_piece_closure.
9684
e9352324
AA
96852017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9686
9687 PR gdb/21226
9688 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9689 the LSB end, independent of endianness.
9690
d5d1163e
AA
96912017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9692
9693 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9694 size capping.
9695
032bb6ea
YQ
96962017-06-13 Yao Qi <yao.qi@linaro.org>
9697
9698 * mips-linux-nat.c: Move include features/mips*-linux.c to
9699 mips-linux-tdep.c.
9700 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9701 to mips-linux-tdep.c.
9702 * mips-linux-tdep.c: Include features/mips*-linux.c
9703 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9704 functions.
9705 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9706 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9707 (tdesc_mips64_dsp_linux): Declare.
9708
f12f6bad
TT
97092017-06-12 Tom Tromey <tom@tromey.com>
9710
9711 * valprint.h (val_print_type_code_int): Remove.
9712 * valprint.c (generic_val_print_int): Always call
9713 val_print_scalar_formatted.
9714 (val_print_type_code_int): Remove.
9715 * printcmd.c (print_scalar_formatted): Handle options->format==0.
9716 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9717 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9718 * ada-valprint.c (ada_val_print_num): Use
9719 val_print_scalar_formatted.
9720
d9109c80
TT
97212017-06-12 Tom Tromey <tom@tromey.com>
9722
9723 * printcmd.c (print_scalar_formatted): Unify the two switches.
9724 Don't convert scalars to LONGEST.
9725
4ac0cb1c
TT
97262017-06-12 Tom Tromey <tom@tromey.com>
9727
9728 PR exp/16225:
9729 * valprint.h (print_decimal_chars): Update.
9730 * valprint.c (maybe_negate_by_bytes): New function.
9731 (print_decimal_chars): Add "is_signed" argument.
9732 * printcmd.c (print_scalar_formatted): Update.
9733
30a25466
TT
97342017-06-12 Tom Tromey <tom@tromey.com>
9735
9736 PR exp/16225:
9737 * valprint.h (print_binary_chars, print_hex_chars): Update.
9738 * valprint.c (val_print_type_code_int): Update.
9739 (print_binary_chars): Add "zero_pad" argument.
9740 (emit_octal_digit): New function.
9741 (print_octal_chars): Don't zero-pad.
9742 (print_decimal_chars): Likewise.
9743 (print_hex_chars): Add "zero_pad" argument.
9744 * sh64-tdep.c (sh64_do_fp_register): Update.
9745 * regcache.c (regcache::dump): Update.
9746 * printcmd.c (print_scalar_formatted): Update.
9747 * infcmd.c (default_print_one_register_info): Update.
9748
b3464d03
PA
97492017-06-12 Pedro Alves <palves@redhat.com>
9750 Alan Hayward <alan.hayward@arm.com>
9751
9752 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9753 (mips_eabi_push_dummy_call): Rename local 'regsize' to
9754 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
9755 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9756 Assert that abi_regsize bytes fit in 'ref_valbuf'.
9757
4b76cda9
PA
97582017-06-12 Pedro Alves <palves@redhat.com>
9759
9760 * dwarf2read.c (mapped_symtab::data): Now a vector of
9761 symtab_index_entry instead of vector of
9762 std::unique_ptr<symtab_index_entry>. All users adjusted to check
9763 whether an element's name is NULL instead of checking whether the
9764 element itself is NULL.
9765 (find_slot): Change return type. Adjust.
9766 (hash_expand, , add_index_entry, uniquify_cu_indices)
9767 (write_hash_table): Adjust.
9768
e8f8bcb3
PA
97692017-06-12 Pedro Alves <palves@redhat.com>
9770
9771 * dwarf2read.c (recursively_count_psymbols): New function.
9772 (write_psymtabs_to_index): Call it to compute number of psyms and
9773 pass estimate size of psyms_seen to unordered_set's ctor.
9774
70a1152b
PA
97752017-06-12 Pedro Alves <palves@redhat.com>
9776
9777 * dwarf2read.c (write_hash_table): Check if key already exists
9778 before emplacing.
9779
c2f134ac
PA
97802017-06-12 Pedro Alves <palves@redhat.com>
9781
9782 * dwarf2read.c (data_buf::append_space): Rename to...
9783 (data_buf::grow): ... this, and make private. Adjust all callers.
9784 (data_buf::append_uint): New method.
9785 (add_address_entry, write_one_signatured_type)
9786 (write_psymtabs_to_index): Use it.
9787
a81e6d4d
PA
97882017-06-12 Pedro Alves <palves@redhat.com>
9789
9790 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9791 (file_write (FILE *, const std::vector<Elem>&)): Delete.
9792 (data_buf::file_write): Call ::fwrite directly.
9793
6fd931f2
PA
97942017-06-12 Pedro Alves <palves@redhat.com>
9795
9796 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9797 std::vector::erase.
9798
bc8f2430
JK
97992017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
9800
9801 Code cleanup: C++ify .gdb_index producer.
9802 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9803 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9804 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9805 (create_strtab, add_string): Remove.
9806 (file_write, data_buf): New.
9807 (struct symtab_index_entry): Use std::vector for cu_indices.
9808 (struct mapped_symtab): Use std::vector for data.
9809 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9810 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9811 Remove.
9812 (find_slot): Change return type. Update it to the new data structures.
9813 (hash_expand, add_index_entry): Update it to the new data structures.
9814 (offset_type_compare): Remove.
9815 (uniquify_cu_indices): Update it to the new data structures.
9816 (c_str_view, c_str_view_hasher, vector_hasher): New.
9817 (add_indices_to_cpool): Remove.
9818 (write_hash_table): Update it to the new data structures.
9819 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9820 (eq_psymtab_cu_index): Remove.
9821 (psym_index_map): New typedef.
9822 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9823 reference and std::unordered_map for cu_index_htab.
9824 (add_address_entry, add_address_entry_worker, write_address_map)
9825 (write_psymbols): Update it to the new data structures.
9826 (write_obstack): Remove.
9827 (struct signatured_type_index_data): Change types_list to a data_buf
9828 reference and psyms_seen to a std::unordered_set reference.
9829 (write_one_signatured_type, recursively_write_psymbols)
9830 (write_psymtabs_to_index): Update it to the new data structures.
9831
c4dcb155
SM
98322017-06-11 Simon Marchi <simon.marchi@ericsson.com>
9833
9834 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9835 separate-debug-file commands.
9836 * symfile.h (separate_debug_file_debug): New global.
9837 * symfile.c (separate_debug_file_debug): New global.
9838 (separate_debug_file_exists, find_separate_debug_file): Add
9839 debug output.
9840 (_initialize_symfile): Add "set debug separate-debug-file"
9841 command.
9842 * build-id.c (build_id_to_debug_bfd,
9843 find_separate_debug_file_by_buildid): Add debug output.
9844
6d45d4b4
SM
98452017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
9846
9847 * gdbarch.sh (displaced_step_free_closure): Remove.
9848 * gdbarch.h, gdbarch.c: Re-generate.
9849 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9850 displaced_step_free_closure.
9851 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9852 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9853 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9854 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9855 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9856 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9857 * arch-utils.h (simple_displaced_step_free_closure): Remove.
9858 * arch-utils.c (simple_displaced_step_free_closure): Remove.
9859 * infrun.c (displaced_step_clear): Call xfree instead of
9860 gdbarch_displaced_step_free_closure.
9861
2f91880f
SDJ
98622017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
9863
9864 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9865 NULL".
9866
b8b6e72f
AH
98672017-06-08 Alan Hayward <alan.hayward@arm.com>
9868
9869 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9870 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9871 (mn10300_push_dummy_call): Likewise.
9872
5369082e
AH
98732017-06-08 Alan Hayward <alan.hayward@arm.com>
9874
9875 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9876
ff4ca5ac
AH
98772017-06-08 Alan Hayward <alan.hayward@arm.com>
9878
9879 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9880
aefd8b33
SDJ
98812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9882
9883 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9884 able to start inferiors using a shell.
9885 (New remote packets): Announce new packet "QStartupWithShell".
9886 * remote.c: Add PACKET_QStartupWithShell.
9887 (extended_remote_create_inferior): Handle new
9888 PACKET_QStartupWithShell.
9889 (remote_protocol_features) <QStartupWithShell>: New entry for
9890 PACKET_QStartupWithShell.
9891 (_initialize_remote): Call "add_packet_config_cmd" for
9892 QStartupShell.
9893
2090129c
SDJ
98942017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9895 Pedro Alves <palves@redhat.com>
9896
9897 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9898 and "nat/fork-inferior.h".
9899 * common/common-inferior.h: New file, with contents from
9900 "gdb/inferior.h".
9901 * commom/common-utils.c: Include "common-utils.h".
9902 (stringify_argv): New function.
9903 * common/common-utils.h (stringify_argv): New prototype.
9904 * configure.nat: Add "fork-inferior.o" as a dependency for
9905 "*linux*", "fbsd*" and "nbsd*" hosts.
9906 * corefile.c (get_exec_file): Update comment.
9907 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9908 instead of "startup_inferior".
9909 (darwin_create_inferior): Call "add_thread_silent" after
9910 "fork_inferior".
9911 * fork-child.c: Cleanup unnecessary includes.
9912 (SHELL_FILE): Move to "common/common-fork-child.c".
9913 (environ): Likewise.
9914 (exec_wrapper): Initialize.
9915 (get_exec_wrapper): New function.
9916 (breakup_args): Move to "common/common-fork-child.c"; rename to
9917 "breakup_args_for_exec".
9918 (escape_bang_in_quoted_argument): Move to
9919 "common/common-fork-child.c".
9920 (saved_ui): New variable.
9921 (prefork_hook): New function.
9922 (postfork_hook): Likewise.
9923 (postfork_child_hook): Likewise.
9924 (gdb_startup_inferior): Likewise.
9925 (fork_inferior): Move to "common/common-fork-child.c". Update
9926 function to support gdbserver.
9927 (startup_inferior): Likewise.
9928 * gdbcore.h (get_exec_file): Remove declaration.
9929 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9930 instead of "startup_inferior". Call "add_thread_silent" after
9931 "fork_inferior".
9932 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9933 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9934 instead of "startup_inferior". Call "add_thread_silent" after
9935 "fork_inferior".
9936 * inferior.h: Include "common-inferior.h".
9937 (trace_start_error): Move to "common/common-utils.h".
9938 (trace_start_error_with_name): Likewise.
9939 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9940 (startup_inferior): Likewise.
9941 (gdb_startup_inferior): New prototype.
9942 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9943 * nat/fork-inferior.h: New file.
9944 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9945 instead of "startup_inferior". Call "add_thread_silent" after
9946 "fork_inferior".
9947 * target.h (target_terminal_init): Move prototype to
9948 "target/target.h".
9949 (target_terminal_inferior): Likewise.
9950 (target_terminal_ours): Likewise.
9951 * target/target.h (target_terminal_init): New prototype, moved
9952 from "target.h".
9953 (target_terminal_inferior): Likewise.
9954 (target_terminal_ours): Likewise.
9955 * utils.c (gdb_flush_out_err): New function.
9956
043a4934
SDJ
99572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9958
9959 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9960 * common/common-gdbthread.h: New file, with parts from
9961 "gdb/gdbthread.h".
9962 * gdbthread.h: Include "common-gdbthread.h".
9963 (switch_to_thread): Moved to "common/common-gdbthread.h".
9964
15652511
SDJ
99652017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9966
9967 * Makefile.in (SFILES): Add "common/job-control.c".
9968 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9969 (COMMON_OBS): Add "job-control.o".
9970 * common/job-control.c: New file, with contents from
9971 "gdb/inflow.c".
9972 * common/job-control.h: New file, with contents from "terminal.h".
9973 * fork-child.c: Include "job-control.h".
9974 * inflow.c: Include "job-control.h".
9975 (gdb_setpgid): Move to "common/common-inflow.c".
9976 (_initialize_inflow): Move setting of "job_control" to
9977 "handle_job_control".
9978 * terminal.h (job_control): Moved to "common/common-terminal.h".
9979 (gdb_setpgid): Likewise.
9980 * top.c: Include "job_control.h".
9981 * utils.c: Likewise.
9982 (job_control): Moved to "job-control.c".
9983
2d7cc5c7
PA
99842017-06-07 Pedro Alves <palves@redhat.com>
9985
9986 * Makefile.in (SFILES): Add gdb_regex.c.
9987 (COMMON_OBS): Add gdb_regex.o.
9988 * ada-lang.c (ada_add_standard_exceptions)
9989 (ada_add_exceptions_from_frame, name_matches_regex)
9990 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9991 parameter type to compiled_regex. Adjust.
9992 (ada_exceptions_list): Use compiled_regex.
9993 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9994 std::unique_ptr<compiled_regex>.
9995 (exception_catchpoint::~exception_catchpoint): Remove regfree
9996 call.
9997 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9998 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9999 * breakpoint.c (solib_catchpoint::compiled): Now a
10000 std::unique_ptr<compiled_regex>.
10001 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10002 (check_status_catch_solib): Adjust to use compiled_regex.
10003 (add_solib_catchpoint): Adjust to use compiled_regex.
10004 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10005 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10006 compiled_regex reference. Adjust to use it.
10007 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10008 declaration. Include "gdb_regex.h".
10009 (apropos_cmd): Change regex parameter to compiled_regex reference.
10010 * gdb_regex.c: New file.
10011 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10012 declarations.
10013 (class compiled_regex): New.
10014 * linux-tdep.c: Include "common/gdb_optional.h".
10015 (struct mapping_regexes): New, factored out from
10016 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10017 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10018 gdb::optional and remove cleanups. Adjust to compiled_regex.
10019 * probe.c: Include "common/gdb_optional.h".
10020 (collect_probes): Use compiled_regex and gdb::optional and remove
10021 cleanups.
10022 * skip.c: Include "common/gdb_optional.h".
10023 (skiplist_entry::compiled_function_regexp): Now a
10024 gdb::optional<compiled_regex>.
10025 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10026 (free_skiplist_entry): Remove regfree call.
10027 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10028 compiled_regex and gdb::optional.
10029 * symtab.c: Include "common/gdb_optional.h".
10030 (search_symbols): Use compiled_regex and gdb::optional.
10031 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10032 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10033 to gdb_regex.c.
10034
50d6adef
AH
100352017-06-07 Alan Hayward <alan.hayward@arm.com>
10036
10037 * regcache.c (regcache::save): Avoid buffer use.
10038 (regcache::dump): Likewise.
10039
4a8a33c8
AH
100402017-06-07 Alan Hayward <alan.hayward@arm.com>
10041
10042 * sh-tdep.c (sh_pseudo_register_read): Remove
10043 MAX_REGISTER_SIZE.
10044 (sh_pseudo_register_write): Likewise.
10045 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10046 (sh64_pseudo_register_write): Likewise
10047
d1be909e
AH
100482017-06-07 Alan Hayward <alan.hayward@arm.com>
10049
10050 * aarch64-tdep.c (aarch64_store_return_value): Use
10051 V_REGISTER_SIZE.
10052 (aarch64_pseudo_read_value): Likewise.
10053 (aarch64_pseudo_write): Likewise.
10054
f4a65042
YQ
100552017-06-06 Yao Qi <yao.qi@linaro.org>
10056
10057 * regformats/regdef.h (set_register_cache): Remove the
10058 declaration.
10059
9f7fb0aa
AH
100602017-06-06 Alan Hayward <alan.hayward@arm.com>
10061
10062 * frame.c (frame_unwind_register_signed): Use
10063 frame_unwind_register_value.
10064
e1e01040
PA
100652017-06-06 Pedro Alves <palves@redhat.com>
10066
10067 PR breakpoints/21553
10068 * breakpoint.c (create_breakpoints_sal_default)
10069 (init_breakpoint_sal, create_breakpoint_sal): Use
10070 gdb::unique_xmalloc_ptr for string parameters.
10071 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10072 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10073 (base_breakpoint_create_breakpoints_sal)
10074 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10075 (strace_marker_create_breakpoints_sal)
10076 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10077 string parameters.
10078 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10079 gdb::unique_xmalloc_ptr for string parameters.
10080 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10081 parameters.
10082
fbe654c8
AH
100832017-06-06 Alan Hayward <alan.hayward@arm.com>
10084
10085 * alpha-tdep.c (alpha_register_to_value): Use
10086 get_frame_register_value.
10087 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
10088
ae0d01d6
AH
100892017-06-06 Alan Hayward <alan.hayward@arm.com>
10090
10091 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
10092 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
10093 (ia64_value_to_register): Likewise.
10094 (ia64_extract_return_value): Likewise.
10095 (ia64_store_return_value): Likewise.
10096 (ia64_push_dummy_call): Likewise.
10097
49cf576c
JB
100982017-06-04 Joel Brobecker <brobecker@adacore.com>
10099
10100 GDB 8.0 released.
10101
26b6a6ab
SM
101022017-06-03 Simon Marchi <simon.marchi@ericsson.com>
10103
10104 * x86-linux-nat.c (struct arch_lwp_info): Remove.
10105
22827c51
SM
101062017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
10107
10108 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
10109 parameter.
10110 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
10111
0e05cf3a
SM
101122017-06-02 Simon Marchi <simon.marchi@ericsson.com>
10113
10114 * event-loop.c (poll_timers): Unallocate timer using delete
10115 instead of xfree.
10116
c1fc2657
SM
101172017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10118
10119 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
10120 (struct breakpoint) <~breakpoint>: New.
10121 (struct watchpoint): Inherit from breakpoint.
10122 <~watchpoint>: New.
10123 <base>: Remove.
10124 (struct tracepoint): Inherit from breakpoint.
10125 <base>: Remove.
10126 * breakpoint.c (longjmp_breakpoint_ops): Remove.
10127 (struct longjmp_breakpoint): Inherit from breakpoint.
10128 <~longjmp_breakpoint>: New.
10129 <base>: Remove.
10130 (new_breakpoint_from_type): Remove casts.
10131 (watchpoint_in_thread_scope): Remove reference to base field.
10132 (watchpoint_del_at_next_stop): Likewise.
10133 (update_watchpoint): Likewise.
10134 (watchpoint_check): Likewise.
10135 (bpstat_check_watchpoint): Likewise.
10136 (set_longjmp_breakpoint): Likewise.
10137 (struct fork_catchpoint): Inherit from breakpoint.
10138 <base>: Remove.
10139 (struct solib_catchpoint): Inherit from breakpoint.
10140 <~solib_catchpoint>: New.
10141 <base>: Remove.
10142 (dtor_catch_solib): Change to ...
10143 (solib_catchpoint::~solib_catchpoint): ... this.
10144 (breakpoint_hit_catch_solib): Remove reference to base field.
10145 (add_solib_catchpoint): Likewise.
10146 (create_fork_vfork_event_catchpoint): Likewise.
10147 (struct exec_catchpoint): Inherit from breakpoint.
10148 <~exec_catchpoint>: New.
10149 <base>: Remove.
10150 (dtor_catch_exec): Change to ...
10151 (exec_catchpoint::~exec_catchpoint): ... this.
10152 (dtor_watchpoint): Change to ...
10153 (watchpoint::~watchpoint): ... this.
10154 (watch_command_1): Remove reference to base field.
10155 (catch_exec_command_1): Likewise.
10156 (base_breakpoint_dtor): Change to ...
10157 (breakpoint::~breakpoint): ... this.
10158 (base_breakpoint_ops): Remove dtor field value.
10159 (longjmp_bkpt_dtor): Change to ...
10160 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
10161 (strace_marker_create_breakpoints_sal): Remove reference to base
10162 field.
10163 (delete_breakpoint): Don't manually call breakpoint destructor.
10164 (create_tracepoint_from_upload): Remove reference to base field.
10165 (trace_pass_set_count): Likewise.
10166 (initialize_breakpoint_ops): Don't initialize
10167 momentary_breakpoint_ops, don't set dtors.
10168 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
10169 <~ada_catchpoint>: New.
10170 <base>: Remove.
10171 (create_excep_cond_exprs): Remove reference to base field.
10172 (dtor_exception): Change to ...
10173 (ada_catchpoint::~ada_catchpoint): ... this.
10174 (dtor_catch_exception): Remove.
10175 (dtor_catch_exception_unhandled): Remove.
10176 (dtor_catch_assert): Remove.
10177 (create_ada_exception_catchpoint): Remove reference to base
10178 field.
10179 (initialize_ada_catchpoint_ops): Don't set dtors.
10180 * break-catch-sig.c (struct signal_catchpoint): Inherit from
10181 breakpoint.
10182 <~signal_catchpoint>: New.
10183 <base>: Remove.
10184 (signal_catchpoint_dtor): Change to ...
10185 (signal_catchpoint::~signal_catchpoint): ... this.
10186 (create_signal_catchpoint): Remove reference to base field.
10187 (initialize_signal_catchpoint_ops): Don't set dtor.
10188 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
10189 from breakpoint.
10190 <~syscall_catchpoint>: New.
10191 <base>: Remove.
10192 (dtor_catch_syscall): Change to ...
10193 (syscall_catchpoint::~syscall_catchpoint): ... this.
10194 (create_syscall_event_catchpoint): Remove reference to base
10195 field.
10196 (initialize_syscall_catchpoint_ops): Don't set dtor.
10197 * break-catch-throw.c (struct exception_catchpoint): Inherit
10198 from breakpoint.
10199 <~exception_catchpoint>: New.
10200 <base>: Remove.
10201 (dtor_exception_catchpoint): Change to ...
10202 (exception_catchpoint::~exception_catchpoint): ... this.
10203 (handle_gnu_v3_exceptions): Remove reference to base field.
10204 (initialize_throw_catchpoint_ops): Don't set dtor.
10205 * ctf.c (ctf_get_traceframe_address): Remove reference to base
10206 field.
10207 * remote.c (remote_get_tracepoint_status): Likewise.
10208 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10209 * tracefile.c (tracefile_fetch_registers): Likewise.
10210 * tracepoint.c (actions_command): Likewise.
10211 (validate_actionline): Likewise.
10212 (tfind_1): Likewise.
10213 (get_traceframe_location): Likewise.
10214 (find_matching_tracepoint_location): Likewise.
10215 (parse_tracepoint_status): Likewise.
10216 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10217
3b0871f4
SM
102182017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10219
10220 * breakpoint.c (struct longjmp_breakpoint): New struct.
10221 (is_tracepoint_type): Change return type to bool.
10222 (is_longjmp_type): New function.
10223 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10224 (set_raw_breakpoint_without_location): Use
10225 new_breakpoint_from_type.
10226 (set_raw_breakpoint): Likewise.
10227
a5e364af
SM
102282017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
10229
10230 * breakpoint.c (new_breakpoint_from_type): New function.
10231 (create_breakpoint_sal): Use new_breakpoint_from_type and
10232 unique_ptr.
10233 (create_breakpoint): Likewise.
10234
ae3b3f34
SM
102352017-05-31 Simon Marchi <simon.marchi@ericsson.com>
10236
10237 * memattr.c (mem_info_command): Rename to ...
10238 (info_mem_command): ... this.
10239 (mem_enable_command): Rename to ...
10240 (enable_mem_command): ... this.
10241 (mem_disable_command): Rename to ...
10242 (disable_mem_command): ... this.
10243 (mem_delete_command): Rename to ...
10244 (delete_mem_command): ... this.
10245 (_initialize_mem): Adjust function names.
10246
13ace077
MM
102472017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10248
10249 * btrace.c (handle_pt_insn_events): New.
10250 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
10251 STATUS. Split into this and ...
10252 (handle_pt_insn_event_flags): ... this.
10253
c56ccc05
MM
102542017-05-31 Markus Metzger <markus.t.metzger@intel.com>
10255
10256 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10257 and struct pt_insn.resynced.
10258 * configure: Regenerated.
10259 * config.in: Regenerated.
10260
08c3f6d2
TW
102612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10262
10263 * btrace.c (ftrace_find_call_by_number): New function.
10264 (ftrace_new_function): Store objects, not pointers.
10265 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10266 ftrace_new_gap, ftrace_update_function,
10267 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10268 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10269 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10270 btrace_ends_with_single_insn, btrace_call_get): Account for
10271 btrace_thread_info::functions now storing objects.
10272 * btrace.h (struct btrace_thread_info): Add constructor.
10273 (struct btrace_thread_info) <functions>: Make std::vector.
10274 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10275 Initialize with default values.
10276 * record-btrace.c (record_btrace_frame_sniffer): Account for
10277 btrace_thread_info::functions now storing objects.
10278
8ffd39f2
TW
102792017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10280
10281 * btrace.c: Remove typedef bfun_s.
10282 (ftrace_new_gap): Directly add gaps to the list of gaps.
10283 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10284 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10285 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10286 instead of gdb VEC.
10287
4aeb0dfc
TW
102882017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10289
10290 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10291 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10292 with btrace_thread_info::next_segment and
10293 btrace_thread_info::prev_segment.
10294 * btrace.h: Remove struct btrace_func_link.
10295 (struct btrace_function): Replace pair of function segment pointers
10296 with pair of indices.
10297 * python/py-record-btrace.c (btpy_call_prev_sibling,
10298 btpy_call_next_sibling): Replace references to
10299 btrace_thread_info::segment with btrace_thread_info::next_segment and
10300 btrace_thread_info::prev_segment.
10301 * record-btrace.c (record_btrace_frame_this_id): Use
10302 btrace_find_call_by_number.
10303
eb8f2b9c
TW
103042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10305
10306 * btrace.c (ftrace_new_function, ftrace_fixup_level,
10307 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10308 btrace_insn_next, btrace_insn_prev): Remove references to
10309 btrace_thread_info::flow.
10310 * btrace.h (struct btrace_function): Remove FLOW.
10311
42bfe59e
TW
103122017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10313
10314 * btrace.c (ftrace_find_call_by_number): New function.
10315 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10316 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10317 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10318 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10319 index.
10320 * btrace.h (struct btrace_function): Turn UP into an index.
10321 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10322 as an index.
10323 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10324 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10325 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10326
b54b03bd
TW
103272017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10328
10329 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10330 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10331 ftrace_update_function, ftrace_compute_global_level_offset,
10332 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10333 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10334 btrace_insn_end, btrace_is_empty): Remove references to
10335 btrace_thread_info::begin and btrace_thread_info::end.
10336 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10337 (struct btrace_thread_info) <functions>: Adjust comment.
10338 * record-btrace.c (record_btrace_start_replaying): Remove reference to
10339 btrace_thread_info::begin.
10340
8286623c
TW
103412017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10342
10343 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10344 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10345 ftrace_update_function): Remove arguments that implicitly were always
10346 BTINFO->END.
10347 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10348 Don't pass BTINFO->END.
10349
a0f1b963
TW
103502017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10351
10352 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10353 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10354 btrace_find_insn_by_number): Replace function segment pointer with
10355 index.
10356 (btrace_insn_cmp): Simplify.
10357 * btrace.h: (struct btrace_insn_iterator) Rename index to
10358 insn_index. Replace function segment pointer with index into function
10359 segment vector.
10360 * record-btrace.c (record_btrace_call_history): Replace function
10361 segment pointer use with index.
10362 (record_btrace_frame_sniffer): Retrieve function call segment through
10363 vector.
10364 (record_btrace_set_replay): Remove defunc't safety check.
10365
f158f208
TW
103662017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10367
10368 * btrace.c (btrace_ends_with_single_insn): New function.
10369 (btrace_call_get, btrace_call_number, btrace_call_begin,
10370 btrace_call_end, btrace_call_next, btrace_call_prev,
10371 btrace_find_call_by_number): Use index into call segment vector
10372 instead of pointer.
10373 (btrace_call_cmp): Simplify.
10374 * btrace.h (struct btrace_call_iterator): Replace function call segment
10375 pointer with index into vector.
10376 * record-btrace.c (record_btrace_call_history): Use index instead of
10377 pointer.
10378
521103fd
TW
103792017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10380
10381 * btrace.c (btrace_insn_begin, btrace_insn_end,
10382 btrace_find_insn_by_number): Add btinfo to iterator.
10383 * btrace.h (struct btrace_insn_iterator): Add btinfo.
10384
17b89b34
TW
103852017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10386
10387 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10388 and save pointers directly.
10389 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10390 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10391 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
10392 changed signature of functions.
10393 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10394 (btrace_fetch): Remove code that adds btrace_function pointers to
10395 vector of btrace_functions.
10396 (btrace_clear): Simplify freeing vector of btrace_functions.
10397
2b51eddc
TW
103982017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
10399
10400 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10401 Replace VEC_* with std::vector functions.
10402 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10403 (struct btrace_thread_info)<functions>: Change type to std::vector.
10404
db6be0d5
SM
104052017-05-30 Simon Marchi <simon.marchi@ericsson.com>
10406
10407 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
10408 "Removed targets and native configurations" up. Merge duplicate
10409 "New commands" sub-sections. Add "New options" sub-sections.
10410
b057297a
AH
104112017-05-26 Alan Hayward <alan.hayward@arm.com>
10412
10413 * defs.h (copy_integer_to_size): New declaration.
10414 * findvar.c (copy_integer_to_size): New function.
10415 (do_cint_test): New selftest function.
10416 (copy_integer_to_size_test): Likewise.
10417 (_initialize_findvar): Likewise.
10418 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10419 (mips_fbsd_collect_reg): Use raw_collect_integer.
10420 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10421 (mips64_fill_gregset): Use raw_collect_integer
10422 (mips64_fill_fpregset): Use raw_supply_integer.
10423 * regcache.c (regcache::raw_supply_integer): New function.
10424 (regcache::raw_collect_integer): Likewise.
10425 * regcache.h: (regcache::raw_supply_integer): New declaration.
10426 (regcache::raw_collect_integer): Likewise.
10427
b77b02a5
YQ
104282017-05-24 Yao Qi <yao.qi@linaro.org>
10429
10430 * Makefile.in (SFILES): Add gdbarch-selftests.c.
10431 (COMMON_OBS): Add gdbarch-selftests.o.
10432 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10433 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10434 * gdbarch-selftests.c: New file.
10435 * regcache.h (regcache) <~regcache>: Mark it virtual if
10436 GDB_SELF_TEST.
10437 <raw_write>: Likewise.
10438
e521e87e
YQ
104392017-05-24 Yao Qi <yao.qi@linaro.org>
10440
10441 * regcache.c (current_regcache): Change it to
10442 regcache::current_regcache.
10443 (regcache_observer_target_changed): Update.
10444 (regcache_thread_ptid_changed): Make it a regcache static
10445 method.
10446 (regcache_thread_ptid_changed): Update.
10447 (class regcache_access): New.
10448 (current_regcache_test): Update.
10449 (_initialize_regcache): Update.
10450 * regcache.h: Include forward_list.
10451 (regcache): Declare regcache_thread_ptid_changed and declare
10452 registers_changed_ptid as friend.
10453
d8e07dda
YQ
104542017-05-24 Yao Qi <yao.qi@linaro.org>
10455
10456 * i387-tdep.c (i387_register_to_value): Use register_size
10457 instead of TYPE_LENGTH.
10458 * m68k-tdep.c (m68k_register_to_value): Likewise.
10459
8c8f9122
YQ
104602017-05-24 Yao Qi <yao.qi@linaro.org>
10461
10462 * i387-tdep.c (i387_convert_register_p): Return false if type
10463 code isn't TYPE_CODE_FLT.
10464
68fce50f
YQ
104652017-05-24 Yao Qi <yao.qi@linaro.org>
10466
10467 * alpha-tdep.c (alpha_convert_register_p): Return true if type
10468 length is 4.
10469 (alpha_register_to_value): Remove type length check.
10470 (alpha_value_to_register): Likewise.
10471
88954b49
YQ
104722017-05-24 Yao Qi <yao.qi@linaro.org>
10473
10474 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10475 TYPE_CODE_FLT.
10476
e3ec9b69
YQ
104772017-05-24 Yao Qi <yao.qi@linaro.org>
10478
10479 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10480 TYPE_CODE_FLT or not.
10481
cdd238da
YQ
104822017-05-24 Yao Qi <yao.qi@linaro.org>
10483
10484 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10485 * avr-tdep.c (avr_gdbarch_init): Likewise.
10486 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10487 * cris-tdep.c (cris_gdbarch_init): Likewise.
10488 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10489 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10490 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10491 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10492 * mep-tdep.c (mep_gdbarch_init): Likewise.
10493 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10494 * mips-tdep.c (mips_gdbarch_init): Likewise.
10495 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10496 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10497 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10498 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10499 * v850-tdep.c (v850_gdbarch_init): Likewise.
10500
7a3929c4
YQ
105012017-05-24 Yao Qi <yao.qi@linaro.org>
10502
10503 * selftest-arch.c (tests_with_arch): Call registers_changed
10504 and reinit_frame_cache.
10505 * selftest.c (run_self_tests): Likewise.
10506
f4985dba
YQ
105072017-05-24 Yao Qi <yao.qi@linaro.org>
10508
10509 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10510 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10511
ab20fa4a
YQ
105122017-05-24 Yao Qi <yao.qi@linaro.org>
10513
10514 * rl78-tdep.c (rl78_gdbarch_init): Don't call
10515 set_gdbarch_print_insn.
10516
f532ab94
YQ
105172017-05-24 Yao Qi <yao.qi@linaro.org>
10518
10519 * h8300-tdep.c (h8300_gdbarch_init): Don't call
10520 set_gdbarch_print_insn.
10521
39503f82
YQ
105222017-05-24 Yao Qi <yao.qi@linaro.org>
10523
10524 * alpha-tdep.c (alpha_gdbarch_init): Don't call
10525 set_gdbarch_print_insn.
10526 * arc-tdep.c (arc_gdbarch_init): Likewise.
10527 * arch-utils.c: include dis-asm.h.
10528 (default_print_insn): New function.
10529 * arch-utils.h (default_print_insn): Declare.
10530 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10531 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10532 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10533 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10534 * frv-tdep.c (frv_gdbarch_init): Likewise.
10535 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10536 * gdbarch.sh (print_insn): Use default_print_insn.
10537 * gdbarch.c: Regenerated.
10538 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10539 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10540 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10541 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10542 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10543 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10544 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10545 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10546 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10547 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10548 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10549 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10550 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10551 * mt-tdep.c (mt_gdbarch_init): Likewise.
10552 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10553 * nios2-tdep.c (nios2_print_insn): Remove.
10554 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10555 * rx-tdep.c (rx_gdbarch_init): Likewise.
10556 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10557 * score-tdep.c (score_print_insn): Remove.
10558 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10559 * sh-tdep.c (sh_gdbarch_init): Likewise.
10560 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10561 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10562 * tic6x-tdep.c (tic6x_print_insn): Remove.
10563 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10564 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10565 * v850-tdep.c (v850_gdbarch_init): Likewise.
10566 * vax-tdep.c (vax_gdbarch_init): Likewise.
10567 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10568 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10569
f7241d4f
JB
105702017-05-23 John Baldwin <jhb@FreeBSD.org>
10571
10572 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10573 (MIPS_FP0_REGNUM): Remove.
10574 (MIPS_FSR_REGNUM): Remove.
10575 (mips_fbsd_supply_fpregs): Use mips_regnum.
10576 (mips_fbsd_supply_gregs): Likewise.
10577 (mips_fbsd_collect_fpregs): Likewise.
10578 (mips_fbsd_collect_gregs): Likewise.
10579
d489d81d
JB
105802017-05-23 John Baldwin <jhb@FreeBSD.org>
10581
10582 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10583 (getpfpregs_supplies): New function.
10584 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10585 getfpregs_supplies.
10586 (mips_fbsd_store_inferior_registers): Likewise.
10587
e11b3cdc
PA
105882017-05-22 Pedro Alves <palves@redhat.com>
10589
10590 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10591 maintainer.
10592
0f068fb5
AH
105932017-05-22 Alan Hayward <alan.hayward@arm.com>
10594
10595 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10596 (store_register): Likewise.
10597 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10598 (get_decimal_float_return_value): Likewise.
10599 (do_ppc_sysv_return_value): Likewise.
10600 (ppc64_sysv_abi_push_integer): Likewise.
10601 (ppc64_sysv_abi_push_freg): Likewise.
10602 (ppc64_sysv_abi_return_value_base): Likewise.
10603 (ppc64_sysv_abi_return_value): Likewise.
10604 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10605 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10606 * rs6000-nat.c: Likewise.
10607 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10608 (rs6000_value_to_register): Likewise.
10609 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10610
e6cf65f2
TT
106112017-05-21 Tom Tromey <tom@tromey.com>
10612
10613 PR rust/21466:
10614 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10615 arrays as "[T]", not "[T; ]".
10616
43cc5389
TT
106172017-05-19 Tom Tromey <tom@tromey.com>
10618
10619 PR rust/21484:
10620 * rust-lang.c (exp_descriptor_rust): New function.
10621 (rust_language_defn): Use it.
10622 * p-lang.c (pascal_language_defn): Update.
10623 * opencl-lang.c (opencl_language_defn): Update.
10624 * objc-lang.c (objc_language_defn): Update.
10625 * m2-lang.c (m2_language_defn): Update.
10626 * language.h (struct language_defn)
10627 <la_watch_location_expression>: New member.
10628 * language.c (unknown_language_defn, auto_language_defn)
10629 (local_language_defn): Update.
10630 * go-lang.c (go_language_defn): Update.
10631 * f-lang.c (f_language_defn): Update.
10632 * d-lang.c (d_language_defn): Update.
10633 * c-lang.h (c_watch_location_expression): Declare.
10634 * c-lang.c (c_watch_location_expression): New function.
10635 (c_language_defn, cplus_language_defn, asm_language_defn)
10636 (minimal_language_defn): Use it.
10637 * breakpoint.c (watch_command_1): Call
10638 la_watch_location_expression.
10639 * ada-lang.c (ada_language_defn): Update.
10640
7a6e7fcc
RO
106412017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10642
6e7e1744
RO
10643 PR tui/21482
10644 * gdb_curses.h (NOMACROS): Define.
10645 (NCURSES_NOMACROS): Define.
10646
106472017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10648
10649 PR tui/21482
7a6e7fcc
RO
10650 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10651 arg to char *.
10652 * tui/tui-wingeneral.c (box_win): Likewise.
10653 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10654 (tui_show_source_line): Likewise.
10655 (tui_show_exec_info_content): Likewise.
10656
1933fd8e
VM
106572017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10658
10659 * sparc-tdep.c (sparc_structure_return_p)
10660 (sparc_arg_on_registers_p): New functions.
10661 (sparc32_store_arguments): Use them.
10662 * sparc64-tdep.c (sparc64_16_byte_align_p)
10663 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10664 Handle TYPE_CODE_ARRAY.
10665
21873064
YQ
106662017-05-17 Yao Qi <yao.qi@linaro.org>
10667
10668 * cli/cli-decode.c (add_alias_cmd): New function.
10669 * command.h (add_alias_cmd): Declare.
10670 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10671 instead call add_alias_cmd.
10672
2b351b19
PA
106732017-05-17 Pedro Alves <palves@redhat.com>
10674
10675 * Makefile.in (nat_extra_makefile_frag): Rename to ...
10676 (nat_makefile_frag): ... this. All references updated.
10677 * configure.ac: Likewise.
10678 * configure.nat: Likewise. Enhance comments.
10679 * configure: Regenerate.
10680
5f2ad7a3
RO
106812017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10682
10683 * procfs.c (procfs_create_inferior): Change prototype to match
10684 definition.
10685
adf3dde5
EZ
106862017-05-13 Eli Zaretskii <eliz@gnu.org>
10687
10688 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10689 C++ compiler warning.
10690
6830f270
TT
106912017-05-12 Tom Tromey <tom@tromey.com>
10692
10693 PR rust/21483:
10694 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10695 recurse, just call value_struct_elt directly.
10696
68f2f2e3
TT
106972017-05-12 Tom Tromey <tom@tromey.com>
10698
10699 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10700 OP_RUST_ARRAY>: Fix.
10701
256afbc2
TT
107022017-05-12 Tom Tromey <tom@tromey.com>
10703
10704 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10705
94bb8dfe
YQ
107062017-05-09 Yao Qi <yao.qi@linaro.org>
10707
10708 * regcache.c: Include <forward_list>.
10709 (struct regcache_list): Remove.
10710 (current_regcache): Update.
10711 (get_thread_arch_aspace_regcache): Update for std::forward_list.
10712 (regcache_thread_ptid_changed): Likewise.
10713 (registers_changed_ptid): Likewise.
10714 (current_regcache_size): Likewise.
10715
8248946c
YQ
107162017-05-09 Yao Qi <yao.qi@linaro.org>
10717
10718 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10719 (current_regcache_size): New function.
10720 (current_regcache_test): New function.
10721 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10722
313c5961
AH
107232017-05-08 Alan Hayward <alan.hayward@arm.com>
10724
10725 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10726 (print_gp_register_row): Use get_frame_register_value.
10727
27bfc1d1
AH
107282017-05-08 Alan Hayward <alan.hayward@arm.com>
10729
10730 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10731 (mips_supply_fpregset): Likewise.
10732 (mips64_supply_gregset): Likewise.
10733
146e6c5c
AH
107342017-05-08 Alan Hayward <alan.hayward@arm.com>
10735
10736 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
10737 regcache->raw_supply_zeroed.
10738
e50f25ec
SDJ
107392017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10740
10741 * configure.nat: Rearrange 'case' statements to match
10742 host before cpu.
10743
21ea5acd
SDJ
107442017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
10745
10746 * Makefile.in: Remove "@host_makefile_frag@". Add variables
10747 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10748 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
10749 "@nat_extra_makefile_frag@".
10750 (Makefile): Remove dependency on "@frags@".
10751 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10752 (data-directory/Makefile): Likewise.
10753 * config/aarch64/linux.mh: Deleted; moved contents to
10754 "gdb/configure.nat".
10755 * config/alpha/alpha-linux.mh: Likewise.
10756 * config/alpha/nbsd.mh: Likewise.
10757 * config/arm/linux.mh: Likewise.
10758 * config/arm/nbsdelf.mh: Likewise.
10759 * config/i386/cygwin.mh: Likewise.
10760 * config/i386/cygwin64.mh: Likewise.
10761 * config/i386/darwin.mh: Likewise.
10762 * config/i386/fbsd.mh: Likewise.
10763 * config/i386/fbsd64.mh: Likewise.
10764 * config/i386/go32.mh: Likewise.
10765 * config/i386/i386gnu.mh: Likewise.
10766 * config/i386/i386sol2.mh: Likewise.
10767 * config/i386/linux.mh: Likewise.
10768 * config/i386/linux64.mh: Likewise.
10769 * config/i386/mingw.mh: Likewise.
10770 * config/i386/mingw64.mh: Likewise.
10771 * config/i386/nbsd64.mh: Likewise.
10772 * config/i386/nbsdelf.mh: Likewise.
10773 * config/i386/nto.mh: Likewise.
10774 * config/i386/obsd.mh: Likewise.
10775 * config/i386/obsd64.mh: Likewise.
10776 * config/i386/sol2-64.mh: Likewise.
10777 * config/ia64/linux.mh: Likewise.
10778 * config/m32r/linux.mh: Likewise.
10779 * config/m68k/linux.mh: Likewise.
10780 * config/m68k/nbsdelf.mh: Likewise.
10781 * config/m68k/obsd.mh: Likewise.
10782 * config/m88k/obsd.mh: Likewise.
10783 * config/mips/fbsd.mh: Likewise.
10784 * config/mips/linux.mh: Likewise.
10785 * config/mips/nbsd.mh: Likewise.
10786 * config/mips/obsd64.mh: Likewise.
10787 * config/pa/linux.mh: Likewise.
10788 * config/pa/nbsd.mh: Likewise.
10789 * config/pa/obsd.mh: Likewise.
10790 * config/powerpc/aix.mh: Likewise.
10791 * config/powerpc/fbsd.mh: Likewise.
10792 * config/powerpc/linux.mh: Likewise.
10793 * config/powerpc/nbsd.mh: Likewise.
10794 * config/powerpc/obsd.mh: Likewise.
10795 * config/powerpc/ppc64-linux.mh: Likewise.
10796 * config/powerpc/spu-linux.mh: Likewise.
10797 * config/s390/linux.mh: Likewise.
10798 * config/sh/nbsd.mh: Likewise.
10799 * config/sparc/fbsd.mh: Likewise.
10800 * config/sparc/linux.mh: Likewise.
10801 * config/sparc/linux64.mh: Likewise.
10802 * config/sparc/nbsd64.mh: Likewise.
10803 * config/sparc/nbsdelf.mh: Likewise.
10804 * config/sparc/obsd64.mh: Likewise.
10805 * config/sparc/sol2.mh: Likewise.
10806 * config/tilegx/linux.mh: Likewise.
10807 * config/vax/nbsdelf.mh: Likewise.
10808 * config/vax/obsd.mh: Likewise.
10809 * config/xtensa/linux.mh: Likewise.
10810 * config/i386/i386gnu.mn: New file, with excerpts from
10811 "config/i386/i386gnu.mh".
10812 * configure: Regenerate.
10813 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10814 *.mh files under "gdb/config".
10815 * configure.nat: New file, with contents from the
10816 "gdb/config/*/*.mh" files.
10817
7ed1acaf
TW
108182017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
10819
10820 * btrace.c (btrace_clear): Free insn vector.
10821
e13cb306
PA
108222017-05-05 Pedro Alves <palves@redhat.com>
10823
10824 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10825 * configure: Regenerate.
10826
5ed8105e
PA
108272017-05-04 Pedro Alves <palves@redhat.com>
10828
10829 * Makefile.in (SFILES): Add progspace-and-thread.c.
10830 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10831 (COMMON_OBS): Add progspace-and-thread.o.
10832 * breakpoint.c: Include "progspace-and-thread.h".
10833 (update_inserted_breakpoint_locations)
10834 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10835 Use scoped_restore_current_pspace_and_thread.
10836 (create_std_terminate_master_breakpoint): Use
10837 scoped_restore_current_program_space.
10838 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10839 (print_breakpoint_location): Use
10840 scoped_restore_current_program_space.
10841 (bp_loc_is_permanent): Use
10842 scoped_restore_current_pspace_and_thread.
10843 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10844 (download_tracepoint_locations): Use
10845 scoped_restore_current_pspace_and_thread.
10846 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10847 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10848 (enum step_over_calls_kind): Moved from inferior.h.
10849 (class scoped_restore_current_thread): New class.
10850 * gdbthread.h (make_cleanup_restore_current_thread): Delete
10851 declaration.
10852 (scoped_restore_current_thread): New class.
10853 * infcmd.c: Include "common/gdb_optional.h".
10854 (continue_1, proceed_after_attach): Use
10855 scoped_restore_current_thread.
10856 (notice_new_inferior): Use scoped_restore_current_thread.
10857 * inferior.c: Include "progspace-and-thread.h".
10858 (restore_inferior, save_current_inferior): Delete.
10859 (add_inferior_command, clone_inferior_command): Use
10860 scoped_restore_current_pspace_and_thread.
10861 * inferior.h (scoped_restore_current_inferior): New class.
10862 * infrun.c: Include "progspace-and-thread.h" and
10863 "common/gdb_optional.h".
10864 (follow_fork_inferior): Use
10865 scoped_restore_current_pspace_and_thread.
10866 (scoped_restore_exited_inferior): New class.
10867 (handle_vfork_child_exec_or_exit): Use
10868 scoped_restore_exited_inferior,
10869 scoped_restore_current_pspace_and_thread,
10870 scoped_restore_current_thread and scoped_restore.
10871 (fetch_inferior_event): Use scoped_restore_current_thread.
10872 * linespec.c (decode_line_full, decode_line_1): Use
10873 scoped_restore_current_program_space.
10874 * mi/mi-main.c: Include "progspace-and-thread.h".
10875 (exec_continue): Use scoped_restore_current_thread.
10876 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10877 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10878 * proc-service.c (ps_pglobal_lookup): Use
10879 scoped_restore_current_program_space.
10880 * progspace-and-thread.c: New file.
10881 * progspace-and-thread.h: New file.
10882 * progspace.c (release_program_space, clone_program_space): Use
10883 scoped_restore_current_program_space.
10884 (restore_program_space, save_current_program_space)
10885 (save_current_space_and_thread): Delete.
10886 (switch_to_program_space_and_thread): Moved to
10887 progspace-and-thread.c.
10888 * progspace.h (save_current_program_space)
10889 (save_current_space_and_thread): Delete declarations.
10890 (scoped_restore_current_program_space): New class.
10891 * remote.c (remote_btrace_maybe_reopen): Use
10892 scoped_restore_current_thread.
10893 * symtab.c: Include "progspace-and-thread.h".
10894 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10895 * thread.c (print_thread_info_1): Use
10896 scoped_restore_current_thread.
10897 (struct current_thread_cleanup): Delete.
10898 (do_restore_current_thread_cleanup)
10899 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10900 (scoped_restore_current_thread::~scoped_restore_current_thread):
10901 ... this new dtor.
10902 (make_cleanup_restore_current_thread): Rename/convert to ...
10903 (scoped_restore_current_thread::scoped_restore_current_thread):
10904 ... this new ctor.
10905 (thread_apply_all_command): Use scoped_restore_current_thread.
10906 (thread_apply_command): Use scoped_restore_current_thread.
10907 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10908 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10909
f6223dbb
PA
109102017-05-04 Pedro Alves <palves@redhat.com>
10911
10912 * thread.c (make_cleanup_restore_current_thread): Move
10913 find_thread_ptid call before the is_stopped call. Assert that the
10914 thread is found. Replace is_stopped call by checking the thread's
10915 state directly. Remove unnecessary NULL-thread check.
10916
3c3ae77e
PA
109172017-05-04 Pedro Alves <palves@redhat.com>
10918
10919 * corelow.c (thread_section_name): New class.
10920 (get_core_register_section, get_core_siginfo): Use it.
10921
45eba0ab
AA
109222017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10923
10924 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10925 (get_core_register_section): Remove xfree of NULL pointer.
10926
f81fdd35
AH
109272017-05-03 Alan Hayward <alan.hayward@arm.com>
10928
10929 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10930 * regcache.c (regcache::raw_supply_zeroed): New function.
10931 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10932
35837774
SM
109332017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10934
10935 * gdbarch.sh: Remove commented out definition of
10936 TARGET_CHAR_BIT.
10937 * gdbarch.h: Re-generate.
10938
c94fee56
SDJ
109392017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10940
10941 * configure: Regenerate.
10942
d17f7b36
SM
109432017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10944
10945 * solib-target.c (solib_target_relocate_section_addresses):
10946 Remove num_section_bases, num_bases, segment_bases variables.
10947
b560ebd6
SM
109482017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10949
10950 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10951
f2f46dfc
SM
109522017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10953
10954 * solib-target.c: Include <vector>
10955 (struct lm_info_target) <~lm_info_target>: Remove.
10956 <segment_bases, section_bases>: Change type to
10957 std::vector<CORE_ADDR>.
10958 (library_list_start_segment, library_list_start_section,
10959 library_list_end_library,
10960 solib_target_relocate_section_addresses): Adjust.
10961
a0ff9e1a
SM
109622017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10963
10964 * gdbarch.sh (software_single_step): Change return type to
10965 std::vector<CORE_ADDR>.
10966 * gdbarch.c, gdbarch.h: Re-generate.
10967 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10968 Adjust.
10969 (arm_deal_with_atomic_sequence_raw): Adjust.
10970 (thumb_get_next_pcs_raw): Adjust.
10971 (arm_get_next_pcs_raw): Adjust.
10972 (arm_get_next_pcs): Adjust.
10973 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10974 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10975 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10976 (alpha_software_single_step): Adjust.
10977 * alpha-tdep.h (alpha_software_single_step): Adjust.
10978 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10979 * arm-tdep.c (arm_software_single_step): Adjust.
10980 (arm_breakpoint_kind_from_current_state): Adjust.
10981 * arm-tdep.h (arm_software_single_step): Adjust.
10982 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10983 * cris-tdep.c (cris_software_single_step): Adjust.
10984 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10985 (micromips_deal_with_atomic_sequence): Adjust.
10986 (deal_with_atomic_sequence): Adjust.
10987 (mips_software_single_step): Adjust.
10988 * mips-tdep.h (mips_software_single_step): Adjust.
10989 * moxie-tdep.c (moxie_software_single_step): Adjust.
10990 * nios2-tdep.c (nios2_software_single_step): Adjust.
10991 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10992 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10993 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10994 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10995 * sparc-tdep.c (sparc_software_single_step): Adjust.
10996 * spu-tdep.c (spu_software_single_step): Adjust.
10997 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10998
ea480a30
SM
109992017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11000
11001 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11002 * gdbarch.h: Re-generate.
11003
d050f7d7
TW
110042017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11005
11006 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11007 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11008 * python/py-instruction.c, python/py-instruction.h: New file.
11009 * python/py-record.c: Add py-instruction.h include.
11010 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11011 gdb.RecordInstruction.
11012 * python/python-internal.h: Add gdbpy_initialize_instruction
11013 declaration.
11014 * python/python.c (do_start_initialization): Add
11015 gdbpy_initialize_instruction.
11016
14f819c8
TW
110172017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11018
11019 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11020 Remove.
11021 (btrace_func_from_recpy_func): New function.
11022 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11023 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11024 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11025 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11026 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11027 Also, use new helper functions.
11028 (btpy_list_item): Use new helper functions.
11029 (recpy_bt_function_call_history): Use new type name.
11030 (btpy_call_getset): Remove.
11031 (gdbpy_initialize_btrace): Remove code to initialize
11032 gdb.BtraceFunctionCall.
11033 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11034 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11035 recpy_bt_func_prev, recpy_bt_func_next): New export.
11036 * python/py-record.c (recpy_func_type): New static object.
11037 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11038 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11039 recpy_func_next): New function.
11040 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11041 (recpy_func_getset): New static object.
11042 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11043 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11044
0ed5da75
TW
110452017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11046
11047 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11048 (btpy_object, btpy_insn_type, btpy_new): Remove.
11049 (btpy_list_object): Use gdb.RecordInstruction type instead of
11050 gdb.BtraceInstruction type.
11051 (btrace_insn_from_recpy_insn): New function.
11052 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11053 btpy_new.
11054 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11055 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11056 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11057 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11058 instead of btpy_object.
11059 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11060 btpy_insn_data, btpy_insn_decode): Rename to ...
11061 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11062 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11063 recpy_bt_insn_decode): This. Also, use new helper functions.
11064 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11065 recpy_insn_type.
11066 (btpy_insn_getset): Remove.
11067 (gdbpy_initialize_btrace): Remove code to initialize
11068 gdb.BtraceInstruction. Use recpy_element_object.
11069 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11070 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11071 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11072 * python/py-record.c (recpy_insn_type): New static object.
11073 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11074 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11075 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11076 New function.
11077 (recpy_insn_getset): New static object.
11078 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11079 * python/py-record.h (recpy_element_object): New typedef.
11080 (recpy_insn_type, recpy_insn_new): New export.
11081
913aeadd
TW
110822017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11083
11084 * py-record-btrace.c (btpy_insn_new): Removed.
11085 (btpy_insn_or_gap_new): New function.
11086 (btpy_insn_error): Removed.
11087 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11088 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
11089 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
11090 btpy_insn_or_gap_new instead of btpy_insn_new.
11091 (btpy_insn_getset): Remove btpy_insn_error.
11092 * py-record.c (recpy_gap_type): New static object.
11093 (recpy_gap_object): New typedef.
11094 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
11095 recpy_gap_reason_string): New function.
11096 (recpy_gap_getset): New static object.
11097 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
11098 * py-record.h (recpy_gap_new): New export.
11099
a3be24ad
TW
111002017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11101
11102 * python/py-record.c (recpy_ptid): Remove.
11103 (recpy_record_getset): Remove recpy_ptid.
11104
ae20e79a
TW
111052017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11106
11107 * btrace.c (btrace_fetch): Set inferior_ptid.
11108 * python/py-record-btrace.c: Add "py-record.h" include.
11109 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
11110 recpy_bt_end, recpy_bt_instruction_history,
11111 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
11112 in gdb.Record object instead of current ptid.
11113 * python/py-record.c: Include new "py-record.h" file.
11114 (recpy_record_object): Moved to py-record.h.
11115 * python/py-record.h: New file.
11116
8d0050ea
TW
111172017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11118
11119 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
11120 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
11121 indentation.
11122
3f380b50
JB
111232017-05-01 Joel Brobecker <brobecker@adacore.com>
11124
11125 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
11126 the past maintainers section.
11127
07495424
YQ
111282017-04-28 Yao Qi <yao.qi@linaro.org>
11129
11130 * infcmd.c (get_return_value): Use regcache ctor, and remove
11131 cleanup.
11132
deb1fa3e
YQ
111332017-04-28 Yao Qi <yao.qi@linaro.org>
11134 Pedro Alves <palves@redhat.com>
11135
11136 * regcache.c (regcache::regcache): New tag dispatch ctor.
11137 (do_cooked_read): Moved above.
11138 (regcache_dup): Use the tag dispatch ctor..
11139 * regcache.h (regcache): Declare ctor, delete copy ctor and
11140 assignment operator, remove friend regcache_dup.
11141
b421c83c
YQ
111422017-04-28 Yao Qi <yao.qi@linaro.org>
11143
11144 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
11145 call method save instead of regcache_cpy.
11146 * regcache.h (struct regcache): Make regcache_dup a friend.
11147
ef79d9a3
YQ
111482017-04-28 Yao Qi <yao.qi@linaro.org>
11149
11150 * regcache.c (struct regcache): Move to regcache.h
11151 (regcache::arch): New method.
11152 (regcache_get_ptid): Update.
11153 (get_regcache_arch): Call arch method.
11154 (get_regcache_aspace): Call method aspace.
11155 (register_buffer): Change it to method.
11156 (regcache_save): Change it to regcache::save.
11157 (regcache_restore): Likewise.
11158 (regcache_cpy_no_passthrough): Remove the declaration.
11159 (regcache_cpy): Call methods restore and cpy_no_passthrough.
11160 (regcache_cpy_no_passthrough): Change it to method
11161 cpy_no_passthrough.
11162 (regcache_register_status): Change it to method
11163 get_register_status.
11164 (regcache_invalidate): Change it to method invalidate.
11165 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
11166 (regcache_raw_update): Change it to method raw_update.
11167 (regcache_raw_read): Likewise.
11168 (regcache_raw_read_signed): Likewise.
11169 (regcache_raw_read_unsigned): Likewise.
11170 (regcache_raw_write_signed): Likewise.
11171 (regcache_raw_write_unsigned): Likewise.
11172 (regcache_cooked_read): Likewise.
11173 (regcache_cooked_read_value): Likewise.
11174 (regcache_cooked_read_signed): Likewise.
11175 (regcache_cooked_read_unsigned): Likewise.
11176 (regcache_cooked_write_signed): Likewise.
11177 (regcache_cooked_write_unsigned): Likewise.
11178 (regcache_raw_set_cached_value): Likewise.
11179 (regcache_raw_write): Likewise.
11180 (regcache_cooked_write): Likewise.
11181 (regcache_xfer_part): Likewise.
11182 (regcache_raw_read_part): Likewise.
11183 (regcache_raw_write_part): Likewise.
11184 (regcache_cooked_read_part): Likewise.
11185 (regcache_cooked_write_part): Likewise.
11186 (regcache_raw_supply): Likewise.
11187 (regcache_raw_collect): Likewise.
11188 (regcache_transfer_regset): Likewise.
11189 (regcache_supply_regset): Likewise.
11190 (regcache_collect_regset): Likewise.
11191 (regcache_debug_print_register): Likewise.
11192 (enum regcache_dump_what): Move it to regcache.h.
11193 (regcache_dump): Change it to method dump.
11194 * regcache.h (enum regcache_dump_what): New.
11195 (class regcache): New.
11196 * target.c (target_fetch_registers): Call method
11197 debug_print_register.
11198 (target_store_registers): Likewise.
11199
f8fdb78e
SM
112002017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11201
11202 * windows-nat.c (struct lm_info_windows): Initialize field.
11203 (windows_make_so): Allocate lm_info_windows with new.
11204 (windows_free_so): Free lm_info_windows with delete.
11205
9ccbfd7b
SM
112062017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11207
11208 * solib-darwin.c (struct lm_info_darwin): Initialize field.
11209 (darwin_current_sos): Allocate lm_info_darwin with new, remove
11210 cleanup.
11211 (darwin_free_so): Free lm_info_darwin with delete.
11212
76e75227
SM
112132017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11214
11215 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11216 <l_addr_p>: Change type to bool.
11217 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11218 (svr4_free_so): Free lm_info_svr4 with delete.
11219 (svr4_copy_library_list): Replace memcpy with call to copy
11220 constructor.
11221 (library_list_start_library, svr4_default_sos): Allocate
11222 lm_info_svr4 with new.
11223
51046d9e
SM
112242017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11225
11226 * solib-target.c (struct lm_info_target): Add destructor,
11227 initialize fields.
11228 <name>: Change type to std::string.
11229 (library_list_start_library): Allocate lm_info_target with new.
11230 (solib_target_free_library_list): Free lm_info_target with
11231 delete.
11232 (solib_target_current_sos): Adapt to std::string.
11233 (solib_target_free_so): Free lm_info_target with delete.
11234
4023ae76
SM
112352017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11236
11237 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11238 fields.
11239 (frv_current_sos): Allocate lm_info_frv with new.
11240 (frv_relocate_main_executable): Free lm_info_frv with delete,
11241 allocate with new.
11242 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11243
af43057b
SM
112442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11245
11246 * solib-frv.c (struct lm_info_frv): Fix indentation.
11247
b0911207
SM
112482017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11249
11250 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11251 map field.
11252 (dsbt_current_sos): Allocate lm_info_dsbt with new.
11253 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11254 and allocate with new.
11255 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11256
6c401f72
SM
112572017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11258
11259 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11260 <filename, member_name>: Change type to std::string.
11261 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11262 (library_list_start_library): Allocate lm_info_aix with new.
11263 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11264 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11265 with copy constructor.
11266
d0e449a1
SM
112672017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11268
11269 * solist.h (struct lm_info): Remove.
11270 (struct lm_info_base): New class.
11271 (struct so_list) <lm_info>: Change type to lm_info_base *.
11272 * nto-tdep.c (struct lm_info): Remove.
11273 (lm_addr): Adjust.
11274 * solib-aix.c (struct lm_info): Rename to ...
11275 (struct lm_info_aix): ... this. Extend lm_info_base.
11276 (lm_info_p): Rename to ...
11277 (lm_info_aix_p): ... this, and adjust.
11278 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11279 solib_aix_parse_libraries, library_list_start_library,
11280 solib_aix_free_library_list, solib_aix_parse_libraries,
11281 solib_aix_get_library_list,
11282 solib_aix_relocate_section_addresses, solib_aix_free_so,
11283 solib_aix_get_section_offsets,
11284 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11285 Adjust.
11286 (struct solib_aix_inferior_data) <library_list>: Adjust.
11287 * solib-darwin.c (struct lm_info): Rename to ...
11288 (struct lm_info_darwin): ... this. Extend lm_info_base.
11289 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11290 * solib-dsbt.c (struct lm_info): Rename to ...
11291 (struct lm_info_dsbt): ... this. Extend lm_info_base.
11292 (struct dsbt_info) <main_executable_lm_info): Adjust.
11293 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11294 dsbt_relocate_section_addresses): Adjust.
11295 * solib-frv.c (struct lm_info): Rename to ...
11296 (struct lm_info_frv): ... this. Extend lm_info_base.
11297 (main_executable_lm_info): Adjust.
11298 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11299 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11300 find_canonical_descriptor_in_load_object,
11301 frv_fdpic_find_canonical_descriptor): Adjust.
11302 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11303 to lm_info_svr4.
11304 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11305 svr4_clear_so, svr4_copy_library_list,
11306 library_list_start_library, svr4_default_sos, svr4_read_so_list,
11307 svr4_current_sos, svr4_fetch_objfile_link_map,
11308 solist_update_incremental): Adjust.
11309 * solib-svr4.h (struct lm_info_svr4): Move here from
11310 solib-svr4.c.
11311 * solib-target.c (struct lm_info): Rename to ...
11312 (struct lm_info_target): ... this. Extend lm_info_base.
11313 (lm_info_p): Rename to ...
11314 (lm_info_target_p): ... this.
11315 (solib_target_parse_libraries, library_list_start_segment,
11316 library_list_start_section, library_list_start_library,
11317 library_list_end_library, solib_target_free_library_list,
11318 solib_target_current_sos, solib_target_free_so,
11319 solib_target_relocate_section_addresses): Adjust.
11320 * windows-nat.c (struct lm_info): Rename to ...
11321 (struct lm_info_windows): ... this. Extend lm_info_base.
11322 (windows_make_so, handle_load_dll, handle_unload_dll,
11323 windows_xfer_shared_libraries): Adjust.
11324
434a4023
SM
113252017-04-28 Simon Marchi <simon.marchi@ericsson.com>
11326
11327 * solib-darwin.c (struct darwin_so_list): Remove.
11328 (darwin_current_sos): Allocate an so_list object instead of a
11329 darwin_so_list, separately allocate an lm_info object.
11330 (darwin_free_so): Free lm_info.
11331
428544e8
JB
113322017-04-28 John Baldwin <jhb@FreeBSD.org>
11333
11334 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11335 with fprintf_filtered.
11336
4621115f
YQ
113372017-04-28 Yao Qi <yao.qi@linaro.org>
11338
11339 * regcache.c (regcache::regcache): New function.
11340 (regcache::~regcache): New function.
11341 (regcache_xmalloc_1): Remove.
11342 (regcache_xmalloc): Call new regcache.
11343 (regcache_xfree): Call delete regcache.
11344 (get_thread_arch_aspace_regcache): Call new regcache.
11345
339053c2
YQ
113462017-04-28 Yao Qi <yao.qi@linaro.org>
11347
11348 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11349 lwp instead of ptid_get_lwp.
11350
7974a605
YQ
113512017-04-28 Yao Qi <yao.qi@linaro.org>
11352
11353 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11354 lwp_info instead of getting from inferior_ptid.
11355
e15c3eb4
KS
113562017-04-27 Keith Seitz <keiths@redhat.com>
11357
11358 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11359 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11360 (CV_CONVERSION_BADNESS): Define.
11361 (rank_one_type): Remove overly restrictive rvalue reference
11362 rank checks.
11363 Add cv-qualifier checks and subranks for type equality.
11364 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11365 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11366 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11367
72bc1d24
SM
113682017-04-27 Simon Marchi <simon.marchi@ericsson.com>
11369
11370 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11371 count when creating the object.
11372
55bcecda
UW
113732017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
11374 Ulrich Weigand <uweigand@de.ibm.com>
11375
11376 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11377 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11378 is used in AIX.
11379 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11380 (process_xcoff_symbol): Likewise.
11381 (scan_xcoff_symtab): Likewise.
11382
5c99fcf8
AH
113832017-04-26 Alan Hayward <alan.hayward@arm.com>
11384
11385 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11386 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11387 (ia64_access_reg): Use get_frame_register_unsigned.
11388 (ia64_access_rse_reg): Likewise.
11389 (ia64_libunwind_frame_prev_register): Likewise.
11390
b41c5a85
JW
113912017-04-26 Jiong Wang <jiong.wang@arm.com>
11392
11393 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11394 * gdbarch.c: Regenerated.
11395 * gdbarch.h: Regenerated.
11396 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11397 visibility external.
11398 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11399 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11400 (enum cfa_how_kind): Move to ...
11401 (struct dwarf2_frame_state_reg_info): Likewise.
11402 (struct dwarf2_frame_state): Likewise.
11403 * dwarf2-frame.h: ... here.
11404 (dwarf2_frame_state_alloc_regs): New declaration.
11405 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11406 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11407
c185f580
AH
114082017-04-26 Alan Hayward <alan.hayward@arm.com>
11409
11410 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11411 regcache_raw_read_unsigned.
11412 (xtensa_pseudo_register_write): Likewise.
11413
19c45594
AH
114142017-04-26 Alan Hayward <alan.hayward@arm.com>
11415
11416 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11417 (nds32_pseudo_register_write): Likewise.
11418
4658f12e
YQ
114192017-04-25 Yao Qi <yao.qi@linaro.org>
11420
11421 * regcache.c (struct regcache) <readonly_p>: Change its type
11422 to bool.
11423 (regcache_xmalloc_1): Update parameter type and callers update.
11424
d581dda8
YQ
114252017-04-25 Yao Qi <yao.qi@linaro.org>
11426
11427 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11428 set_gdbarch_wchar_bit.
11429 * arm-tdep.c (arm_gdbarch_init): Likewise.
11430
debed3db
PA
114312017-04-25 Pedro Alves <palves@redhat.com>
11432
11433 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11434 (BothAreRelocatable, memcopy, memmove): Don't define.
11435 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11436 macros.
11437
b0b92aeb
PA
114382017-04-25 Pedro Alves <palves@redhat.com>
11439
11440 * common/common-defs.h: Include "common/poison.h".
11441 * common/function-view.h: (Not, Or, Requires): Move to traits.h
11442 and adjust.
11443 * common/poison.h: New file.
11444 * common/traits.h: Include <type_traits>.
11445 (Not, Or, Requires): New, moved from common/function-view.h.
11446
16c4d54a
PA
114472017-04-25 Pedro Alves <palves@redhat.com>
11448
11449 * breakpoint.h (struct breakpoint): In-class initialize all
11450 fields. Make boolean fields "bool".
11451 * breakpoint.c (init_raw_breakpoint_without_location): Remove
11452 memset call and initializations no longer necessary.
11453
b5c36682
PA
114542017-04-25 Pedro Alves <palves@redhat.com>
11455
11456 * btrace.c (pt_btrace_insn_flags): Change parameter type to
11457 reference.
11458 (pt_btrace_insn): New function.
11459 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11460
5625a286
PA
114612017-04-25 Pedro Alves <palves@redhat.com>
11462
11463 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
11464 "base" field and inherit from "bp_location" instead. Add
11465 non-default ctor.
11466 (allocate_location_exception): Use new non-default ctor.
11467 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11468 (init_bp_location): Convert to ...
11469 (bp_location::bp_location): ... this new ctor, and remove memset
11470 call.
11471 (base_breakpoint_allocate_location): Use the new non-default ctor.
11472 * breakpoint.h (bp_location): Now a class. Declare default and
11473 non-default ctors. In-class initialize all members.
11474 (init_bp_location): Remove declaration.
11475
23bcc18f
PA
114762017-04-25 Pedro Alves <palves@redhat.com>
11477
11478 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11479 assignment operator.
11480
e1ba3053
YQ
114812017-04-24 Yao Qi <yao.qi@linaro.org>
11482
11483 * doublest.c (convert_doublest_to_floatformat): Call
11484 floatformat_totalsize_bytes.
11485
10f489e5
TT
114862017-04-22 Tom Tromey <tom@tromey.com>
11487
11488 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11489 ui_out_emit_list.
11490 * stack.c (print_frame): Use ui_out_emit_list.
11491 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11492 ui_out_emit_list.
11493 * mi/mi-main.c (print_one_inferior)
11494 (mi_cmd_data_list_register_names)
11495 (mi_cmd_data_list_register_values, mi_cmd_list_features)
11496 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11497 ui_out_emit_list.
11498 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11499 (mi_output_solib_attribs): Use ui_out_emit_list,
11500 ui_out_emit_tuple.
11501 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11502 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11503 (mi_cmd_stack_list_args, list_args_or_locals): Use
11504 ui_out_emit_list.
11505 * disasm.c (do_assembly_only): Use ui_out_emit_list.
11506 * breakpoint.c (print_solib_event, output_thread_groups): Use
11507 ui_out_emit_list.
11508
0092b74d
TT
115092017-04-22 Tom Tromey <tom@tromey.com>
11510
11511 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11512 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11513 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11514
a14a62dd
TT
115152017-04-22 Tom Tromey <tom@tromey.com>
11516
11517 * tracepoint.c (tvariables_info_1)
11518 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11519
46b9c129
TT
115202017-04-22 Tom Tromey <tom@tromey.com>
11521
11522 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11523 annotate_arg_emitter.
11524 * breakpoint.c (print_mention_watchpoint)
11525 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11526 * annotate.h (struct annotate_arg_emitter): New.
11527
2e783024
TT
115282017-04-22 Tom Tromey <tom@tromey.com>
11529
11530 * record-btrace.c (record_btrace_insn_history)
11531 (record_btrace_insn_history_range, record_btrace_call_history)
11532 (record_btrace_call_history_range): Use ui_out_emit_tuple.
11533 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11534 ui_out_emit_tuple.
11535 * stack.c (print_frame_info): Use ui_out_emit_tuple.
11536 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11537 * skip.c (skip_info): Use ui_out_emit_tuple.
11538 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11539 * progspace.c (print_program_space): Use ui_out_emit_tuple.
11540 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11541 * osdata.c (info_osdata): Use ui_out_emit_tuple.
11542 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11543 ui_out_emit_tuple.
11544 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11545 (output_register, mi_cmd_data_read_memory)
11546 (mi_cmd_data_read_memory_bytes, mi_load_progress)
11547 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11548 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11549 Use ui_out_emit_tuple.
11550 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11551 ui_out_emit_tuple.
11552 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11553 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11554 * linux-thread-db.c (info_auto_load_libthread_db): Use
11555 ui_out_emit_tuple.
11556 * inferior.c (print_inferior): Use ui_out_emit_tuple.
11557 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11558 * disasm.c (do_mixed_source_and_assembly_deprecated)
11559 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11560 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11561 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11562 * breakpoint.c (print_one_breakpoint_location)
11563 (print_one_breakpoint): Use ui_out_emit_tuple.
11564 * auto-load.c (print_script, info_auto_load_cmd): Use
11565 ui_out_emit_tuple.
11566 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11567
9be21bb4
SM
115682017-04-21 Simon Marchi <simon.marchi@ericsson.com>
11569
11570 * thread.c (print_thread_info_1): Remove dead code.
11571
0d4c07af
JK
115722017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11573
11574 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11575 GDB_SELF_TEST.
11576 * arm-tdep.c (selftests::arm_record_test): Likewise.
11577
4daf993d
YQ
115782017-04-21 Yao Qi <yao.qi@linaro.org>
11579
11580 * regcache.c (regcache_restore): Remove argument 2. Replace
11581 argument 3 with regcache. Get register status from
11582 src->register_status and get register contents from
11583 register_buffer (src, regnum).
11584 (regcache_cpy): Update.
11585
a6c21d4a
PA
115862017-04-19 Pedro Alves <palves@redhat.com>
11587
11588 * gdbthread.h (thread): Add missing closing parenthesis in
11589 comment.
11590
3a3fd0fd
PA
115912017-04-19 Pedro Alves <palves@redhat.com>
11592
11593 * common/refcounted-object.h: New file.
11594 * gdbthread.h: Include "common/refcounted-object.h".
11595 (thread_info): Inherit from refcounted_object and add comments.
11596 (thread_info::incref, thread_info::decref)
11597 (thread_info::m_refcount): Delete.
11598 (thread_info::deletable): Use the refcounted_object::refcount()
11599 method.
11600 * inferior.c (current_inferior_): Add comment.
11601 (set_current_inferior): Increment/decrement refcounts.
11602 (prune_inferiors, remove_inferior_command): Skip inferiors marked
11603 not-deletable instead of comparing with the current inferior.
11604 (initialize_inferiors): Increment the initial inferior's refcount.
11605 * inferior.h (struct inferior): Forward declare.
11606 Include "common/refcounted-object.h".
11607 (current_inferior, set_current_inferior): Move declaration to
11608 before struct inferior's definition, and fix comment.
11609 (inferior): Inherit from refcounted_object. Add comments.
11610 * thread.c (switch_to_thread_no_regs): Reference the thread's
11611 inferior pointer directly instead of doing a ptid lookup.
11612 (switch_to_no_thread): New function.
11613 (switch_to_thread(thread_info *)): New function, factored out
11614 from ...
11615 (switch_to_thread(ptid_t)): ... this.
11616 (restore_current_thread): Delete.
11617 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11618 fields, and add 'inf' field.
11619 (do_restore_current_thread_cleanup): Check whether old->inf is
11620 alive instead of looking up an inferior by ptid. Use
11621 switch_to_thread and switch_to_no_thread.
11622 (restore_current_thread_cleanup_dtor): Use old->inf directly
11623 instead of lookup up an inferior by id. Decref the inferior.
11624 Don't restore 'removable'.
11625 (make_cleanup_restore_current_thread): Same the inferior pointer
11626 in old, instead of the inferior number. Incref the inferior.
11627 Don't save/clear 'removable'.
11628
9bcb1f16
PA
116292017-04-19 Pedro Alves <palves@redhat.com>
11630
11631 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11632 unittests/scoped_restore-selftests.c.
11633 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11634 * common/scoped_restore.h (scoped_restore_base): Make "class".
11635 (scoped_restore_base::release): New public method.
11636 (scoped_restore_base::scoped_restore_base): New protected ctor.
11637 (scoped_restore_base::m_saved_var): New protected field.
11638 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11639 scoped_restore_base base class instead of m_saved_var directly.
11640 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11641 (scoped_restore_tmpl::scoped_restore_tmpl(const
11642 scoped_restore_tmpl<T>&)): Likewise.
11643 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11644 method.
11645 (scoped_restore_tmpl::saved_var): New method.
11646 (scoped_restore_tmpl::m_saved_var): Delete.
11647 * inferior.h (inferior::detaching): Now a bool.
11648 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11649 cleanup.
11650 * unittests/scoped_restore-selftests.c: New file.
11651
26fcd539
PA
116522017-04-19 Pedro Alves <palves@redhat.com>
11653
11654 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11655 Re-sort in alphabetic order.
11656
fdd243b0
PA
116572017-04-18 Pedro Alves <palves@redhat.com>
11658
11659 * xml-support.c (obstack_xml_printf): Delete.
11660 * xml-support.h (obstack_xml_printf): Delete.
11661
4895cde2
PA
116622017-04-18 Pedro Alves <palves@redhat.com>
11663
11664 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11665 vdebug, verror, body_text, start_element, end_element, name,
11666 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11667 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11668 is_xinclude>: Make private and add m_ prefix.
11669 (gdb_xml_parser::body_text): New method, based on ...
11670 (gdb_xml_body_text): ... this. Adjust.
11671 (gdb_xml_parser::vdebug): New method, based on ...
11672 (gdb_xml_debug): ... this. Adjust.
11673 (gdb_xml_parser::verror): New method, based on ...
11674 (gdb_xml_error): ... this. Adjust.
11675 (gdb_xml_parser::start_element): New method, based on ...
11676 (gdb_xml_start_element): ... this. Adjust.
11677 (gdb_xml_start_element_wrapper): Defer to
11678 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11679 (gdb_xml_parser::end_element): New method, based on ...
11680 (gdb_xml_end_element_wrapper): ... this. Adjust.
11681 (gdb_xml_parser::~gdb_xml_parser): Adjust.
11682 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11683 (gdb_xml_parser::use_dtd): New method, based on ...
11684 (gdb_xml_use_dtd): ... this. Adjust.
11685 (gdb_xml_parser::parse): New method, based on ...
11686 (gdb_xml_parse): ... this. Adjust.
11687 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11688 (xinclude_start_include): Adjust to call the parser's name method.
11689 (xml_xinclude_default, xml_xinclude_start_doctype)
11690 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11691 method.
11692 (xml_process_xincludes): Adjust to call parser methods.
11693 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11694 declarations.
11695
bd8a901f
PA
116962017-04-18 Pedro Alves <palves@redhat.com>
11697
11698 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11699 gdb::optional<std::string>.
11700 * xml-support.c: Include <string>.
11701 (scope_level::scope_level(scope_level &&))
11702 (scope_level::~scope_level): Delete.
11703 (scope_level::body): Now a std::string.
11704 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11705 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11706 parameter.
11707 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11708 (xinclude_parsing_data::output): Now a std::string reference.
11709 (xinclude_start_include): Adjust.
11710 (xml_xinclude_default): Adjust.
11711 (xml_process_xincludes): Add 'output' parameter, and return bool.
11712 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11713 and return bool.
11714 * xml-tdesc.c: Include <unordered_map> and <string>.
11715 (tdesc_xml_cache): Delete.
11716 (tdesc_xml_cache_s): Delete.
11717 (xml_cache): Now an std::unordered_map.
11718 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11719 (target_fetch_description_xml): Change return type to
11720 gdb::optional<std::string>, and adjust.
11721 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11722 (target_fetch_description_xml): Change return type to
11723 gdb::optional<std::string>.
11724
d35d1958
PA
117252017-04-18 Pedro Alves <palves@redhat.com>
11726
11727 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11728 unittests/optional-selftests.c.
11729 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11730 * unittests/optional-selftests.c: New file.
11731 * unittests/optional/assignment/1.cc: New file.
11732 * unittests/optional/assignment/2.cc: New file.
11733 * unittests/optional/assignment/3.cc: New file.
11734 * unittests/optional/assignment/4.cc: New file.
11735 * unittests/optional/assignment/5.cc: New file.
11736 * unittests/optional/assignment/6.cc: New file.
11737 * unittests/optional/assignment/7.cc: New file.
11738 * unittests/optional/cons/copy.cc: New file.
11739 * unittests/optional/cons/default.cc: New file.
11740 * unittests/optional/cons/move.cc: New file.
11741 * unittests/optional/cons/value.cc: New file.
11742 * unittests/optional/in_place.cc: New file.
11743 * unittests/optional/observers/1.cc: New file.
11744 * unittests/optional/observers/2.cc: New file.
11745
22796e97
PA
117462017-04-18 Pedro Alves <palves@redhat.com>
11747
11748 * common/gdb_optional.h: Include common/traits.h.
11749 (in_place_t): New type.
11750 (in_place): New constexpr variable.
11751 (optional::optional): Remove member initialization of
11752 m_instantiated.
11753 (optional::optional(in_place_t...)): New constructor.
11754 (optional::~optional): Use reset.
11755 (optional::optional(const optional&)): New.
11756 (optional::optional(const optional&&)): New.
11757 (optional::optional(T &)): New.
11758 (optional::optional(T &&)): New.
11759 (operator::operator=(const optional &)): New.
11760 (operator::operator=(optional &&)): New.
11761 (operator::operator= (const T &))
11762 (operator::operator= (T &&))
11763 (operator::emplace (Args &&... args)): Return a T&. Use reset.
11764 (operator::reset): New.
11765 (operator::m_instantiated):: Add in-class initializer.
11766 * common/traits.h: Include <type_traits>.
11767 (struct And): New types.
11768
a7fc9b61
PA
117692017-04-18 Pedro Alves <palves@redhat.com>
11770
11771 * xml-support.c: Include <vector>.
11772 (scope_level::scope_level(const gdb_xml_element *))
11773 (scope_level::scope_level(scope_level&&)): New.
11774 (scope_level::~scope_level): New.
11775 (scope_level_s): Delete.
11776 (gdb_xml_parser::scopes): Now a std::vector.
11777 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11778 Use std::vector.
11779 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11780 scope cleanup code.
11781 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11782 of the scopes member. Use std::vector::emplace_back.
11783
010151c9
PA
117842017-04-18 Pedro Alves <palves@redhat.com>
11785
11786 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
11787 a bool.
11788 (gdb_xml_end_element): Change type of first parameter.
11789 (gdb_xml_cleanup): Rename to ...
11790 (gdb_xml_parser::~gdb_xml_parser): ... this.
11791 (gdb_xml_create_parser_and_cleanup): Delete with ...
11792 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11793 to this new ctor.
11794 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11795 using gdb_xml_create_parser_and_cleanup.
11796 (xinclude_parsing_data): Add ctor/dtor.
11797 (xml_xinclude_cleanup): Delete.
11798 (xml_process_xincludes): Create a local xinclude_parsing_data
11799 instead of heap-allocating one. Create a local gdb_xml_parser
11800 instead of heap-allocating one with
11801 gdb_xml_create_parser_and_cleanup.
11802
d56060f0
JB
118032017-04-18 John Baldwin <jhb@FreeBSD.org>
11804
11805 PR threads/20743
11806 * fbsd-nat.c (resume_one_thread_cb): Remove.
11807 (resume_all_threads_cb): Remove.
11808 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11809 iterate_over_threads.
11810
305d16a9
JB
118112017-04-17 Joel Brobecker <brobecker@adacore.com>
11812
11813 * NEWS: Create a new section for the next release branch.
11814 Rename the section of the current branch, now that it has
11815 been cut.
11816
8bb57231
JB
118172017-04-17 Joel Brobecker <brobecker@adacore.com>
11818
11819 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11820 * version.in: Bump version to 8.0.50.DATE-git.
11821
096c92dd
SDJ
118222017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
11823
11824 PR gdb/21385
11825 * windows-nat.c (windows_create_inferior): Declare 'allargs'
11826 independently of the host, and fix build breakage on Cygwin.
11827
0550c955
PA
118282017-04-13 Pedro Alves <palves@redhat.com>
11829
11830 * inferior.c (free_inferior): Convert to ...
11831 (inferior::~inferior): ... this dtor.
11832 (inferior::inferior): New ctor, factored out from ...
11833 (add_inferior_silent): ... here. Allocate the inferior with a new
11834 expression.
11835 (delete_inferior): Call delete instead of free_inferior.
11836 * inferior.h (gdb_environ, continuation): Forward declare.
11837 (inferior): Now a class. Add in-class initialization to all
11838 members. Make boolean fields bool, except 'detaching'.
11839 (inferior::inferior): New explicit ctor.
11840 (inferior::~inferior): New.
11841
e3d60dfc
PA
118422017-04-13 Pedro Alves <palves@redhat.com>
11843
11844 * inferior.c (init_inferior_list): Delete.
11845 * inferior.h (init_inferior_list): Delete.
11846
5fd69d0a
PA
118472017-04-13 Pedro Alves <palves@redhat.com>
11848
11849 PR threads/13217
11850 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11851 (top level): Call it twice, with different thread sets.
11852
c6609450
PA
118532017-04-13 Pedro Alves <palves@redhat.com>
11854
11855 * thread.c: Include <algorithm>.
11856 (thread_array_cleanup): Delete.
11857 (scoped_inc_dec_ref): New class.
11858 (live_threads_count): New function.
11859 (set_thread_refcount): Delete.
11860 (tp_array_compar_ascending): Now a bool.
11861 (tp_array_compar): Convert to a std::sort comparison function.
11862 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11863 and live_threads_count.
11864
2a00d7ce
PA
118652017-04-13 Pedro Alves <palves@redhat.com>
11866
11867 * infrun.c (follow_fork_inferior): Also switch the current
11868 inferior.
11869
441d7c93
PA
118702017-04-13 Pedro Alves <palves@redhat.com>
11871
11872 * breakpoint.c (watch_command_1): Save watchpoint-frame info
11873 before calling create_internal_breakpoint.
11874
808480f6
PA
118752017-04-13 Pedro Alves <palves@redhat.com>
11876
11877 * fork-child.c (execv_argv): New class.
11878 (breakup_args): Refactored as ...
11879 (execv_argv::init_for_no_shell): .. this method of execv_argv.
11880 Copy arguments to storage and replace separators with NULL
11881 terminators in place.
11882 (escape_bang_in_quoted_argument): Adjust to return bool.
11883 (execv_argv::execv_argv): New ctor.
11884 (execv_argv::init_for_shell): New method, factored out from
11885 fork_inferior. Don't strdup strings into the vector.
11886 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
11887 Remove free_vector_argv call.
11888
ad3d022a
YQ
118892017-04-13 Yao Qi <yao.qi@linaro.org>
11890
11891 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11892 tdep->rx_psw_type.
11893
e6ddc3bf
YQ
118942017-04-13 Yao Qi <yao.qi@linaro.org>
11895
11896 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11897 * rx-tdep.c (rx_gdbarch_init): Likewise.
11898
bfb8cf90
PA
118992017-04-13 Pedro Alves <palves@redhat.com>
11900
11901 * breakpoint.h (struct breakpoint): Reindent.
11902
f5336ca5
PA
119032017-04-13 Pedro Alves <palves@redhat.com>
11904
11905 * breakpoint.c (bp_location): Rename to ...
11906 (bp_locations): ... this. All references updated.
11907 (bp_location_count): Rename to ...
11908 (bp_locations_count): ... this. All references updated.
11909 (bp_location_placed_address_before_address_max): Rename to ...
11910 (bp_locations_placed_address_before_address_max): ... this. All
11911 references updated.
11912 (bp_location_shadow_len_after_address_max): Rename to ...
11913 (bp_locations_shadow_len_after_address_max): ... this. All
11914 references updated.
11915 (bp_location_compare_addrs): Rename to ...
11916 (bp_locations_compare_addrs): ... this. All references updated.
11917 (bp_location_compare):Rename to ...
11918 (bp_locations_compare): ... this. All references updated.
11919 (bp_location_target_extensions_update): Rename to ...
11920 (bp_locations_target_extensions_update): ... this. All references
11921 updated.
11922
be628ab8
SDJ
119232017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11924
11925 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11926 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11927 'sgtty.h'.
11928 * common/gdb_termios.h: New file, with parts of "terminal.h".
11929 * inflow.c: Include "gdb_termios.h".
11930 * ser-unix.c: Include "gdb_termios.h".
11931 * terminal.h: Move terminal-related defines to
11932 "common/gdb_termios.h".
11933
8e9e35b1
TT
119342017-04-12 Tom Tromey <tom@tromey.com>
11935
11936 * probe.c (parse_probes): Update.
11937 * location.h (delete_event_location): Don't declare.
11938 (event_location_deleter::operator()): Update.
11939 * location.c (event_location_deleter::operator()): Rename from
11940 delete_event_location.
11941 * linespec.h (linespec_result) <location>: Change type to
11942 event_location_up.
11943 * linespec.c (canonicalize_linespec, event_location_to_sals)
11944 (decode_objc): Update.
11945 (linespec_result): Don't call delete_event_location.
11946 * breakpoint.c (create_breakpoints_sal)
11947 (bkpt_probe_create_sals_from_location)
11948 (strace_marker_create_sals_from_location): Update.
11949
16e802b9
TT
119502017-04-12 Tom Tromey <tom@tromey.com>
11951
11952 * linespec.h (struct linespec_result): Add constructor and
11953 destructor.
11954 (init_linespec_result, destroy_linespec_result)
11955 (make_cleanup_destroy_linespec_result): Don't declare.
11956 * linespec.c (init_linespec_result): Remove.
11957 (linespec_result::~linespec_result): Rename from
11958 destroy_linespec_result. Update.
11959 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11960 Remove.
11961 * breakpoint.c (create_breakpoint, break_range_command)
11962 (decode_location_default): Update.
11963 * ax-gdb.c (agent_command_1): Update.
11964
d28cd78a
TT
119652017-04-12 Tom Tromey <tom@tromey.com>
11966
11967 * remote.c (remote_download_tracepoint): Update.
11968 * python/py-breakpoint.c (bppy_get_location): Update.
11969 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11970 (gdbscm_breakpoint_location): Update.
11971 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11972 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11973 Change type to event_location_up.
11974 * breakpoint.c (create_overlay_event_breakpoint)
11975 (create_longjmp_master_breakpoint)
11976 (create_std_terminate_master_breakpoint)
11977 (create_exception_master_breakpoint)
11978 (breakpoint_event_location_empty_p, print_breakpoint_location)
11979 (print_one_breakpoint_location, create_thread_event_breakpoint)
11980 (init_breakpoint_sal, create_breakpoint)
11981 (print_recreate_ranged_breakpoint, break_range_command)
11982 (init_ada_exception_breakpoint, say_where): Update.
11983 (base_breakpoint_dtor): Don't call delete_event_location.
11984 (bkpt_print_recreate, tracepoint_print_recreate)
11985 (dprintf_print_recreate, update_static_tracepoint)
11986 (breakpoint_re_set_default): Update.
11987
711799d5
TT
119882017-04-12 Tom Tromey <tom@tromey.com>
11989
11990 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11991 type of "to_do". Update.
11992 (compute_stack_depth): Use std::vector.
11993
52d214d3
TT
119942017-04-12 Tom Tromey <tom@tromey.com>
11995
11996 * printcmd.c (find_instruction_backward): Use std::vector.
11997
4c404b8b
TT
119982017-04-12 Tom Tromey <tom@tromey.com>
11999
12000 * symfile.c (objfilep): Remove typedef.
12001 (reread_symbols): Use a std::vector.
12002
156d9eab
TT
120032017-04-12 Tom Tromey <tom@tromey.com>
12004
12005 * mi/mi-main.c (exec_direction_forward): Remove.
12006 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12007 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12008 scoped_restore.
12009 * guile/guile.c (guile_repl_command, guile_command)
12010 (gdbscm_execute_gdb_command): Use scoped_restore.
12011 * go-exp.y (go_parse): Use scoped_restore.
12012 * d-exp.y (d_parse): Use scoped_restore.
12013 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12014 * c-exp.y (c_parse): Use scoped_restore.
12015
4d89769a
TT
120162017-04-12 Tom Tromey <tom@tromey.com>
12017
12018 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12019 (mi_parse): Update return type.
12020 (mi_parse_free): Remove.
12021 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12022 (mi_parse::~mi_parse): Rename from mi_parse_free.
12023 (mi_parse_cleanup): Remove.
12024 (mi_parse): Return a unique_ptr. Use new.
12025 * mi/mi-main.c (mi_execute_command): Update.
12026
4b217cc7
TT
120272017-04-12 Tom Tromey <tom@tromey.com>
12028
12029 * location.c (explicit_location_lex_one): Return a
12030 unique_xmalloc_ptr.
12031 (string_to_explicit_location): Update. Remove cleanups.
12032
59d3651b
TT
120332017-04-12 Tom Tromey <tom@tromey.com>
12034
12035 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12036 (compare_value_and_voffset): Change type. Update.
12037 (compute_vtable_size): Change type of "offset_vec".
12038 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12039 (gnuv3_get_typeid): Remove extraneous declaration.
12040
b24b0d6c
TT
120412017-04-12 Tom Tromey <tom@tromey.com>
12042
12043 * charset.h (wchar_iterator): Fix comment.
12044
80a3b8c5
TT
120452017-04-12 Tom Tromey <tom@tromey.com>
12046
12047 * charset.c (iconv_wrapper): New class.
12048 (cleanup_iconv): Remove.
12049 (convert_between_encodings): Use it.
12050
c83dd867
TT
120512017-04-12 Tom Tromey <tom@tromey.com>
12052
12053 * symfile.h (increment_reading_symtab): Update type.
12054 * symfile.c (decrement_reading_symtab): Remove.
12055 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12056 * psymtab.c (psymtab_to_symtab): Update.
12057 * dwarf2read.c (dw2_instantiate_symtab): Update.
12058
0e8621a0
TT
120592017-04-12 Tom Tromey <tom@tromey.com>
12060
12061 * jit.c (struct jit_reader): Declare separately. Add constructor
12062 and destructor. Change type of "handle".
12063 (loaded_jit_reader): Define separately.
12064 (jit_reader_load): Update. New "new".
12065 (jit_reader_unload_command): Use "delete".
12066 * gdb-dlfcn.h (struct dlclose_deleter): New.
12067 (gdb_dlhandle_up): New typedef.
12068 (gdb_dlopen, gdb_dlsym): Update types.
12069 (gdb_dlclose): Remove.
12070 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12071 (gdb_dlsym): Change type of "handle".
12072 (make_cleanup_dlclose): Remove.
12073 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12074 * compile/compile-c-support.c (load_libcc): Update.
12075
67d89901
TT
120762017-04-12 Tom Tromey <tom@tromey.com>
12077
12078 * symtab.h (find_pcs_for_symtab_line): Change return type.
12079 * symtab.c (find_pcs_for_symtab_line): Change return type.
12080 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12081 type of "vec". Update.
12082 (ltpy_get_pcs_for_line): Update.
12083 * linespec.c (decode_digits_ordinary): Update.
12084
93921405
TT
120852017-04-12 Tom Tromey <tom@tromey.com>
12086
12087 * tracepoint.c (actions_command): Update.
12088 * python/python.c (python_command, python_interactive_command):
12089 Update.
12090 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
12091 * guile/guile.c (guile_command): Update.
12092 * defs.h (read_command_lines, read_command_lines_1): Return
12093 command_line_up.
12094 (command_lines_deleter): New struct.
12095 (command_line_up): New typedef.
12096 * compile/compile.c (compile_code_command)
12097 (compile_print_command): Update.
12098 * cli/cli-script.h (get_command_line, copy_command_lines): Return
12099 command_line_up.
12100 (make_cleanup_free_command_lines): Remove.
12101 * cli/cli-script.c (get_command_line, read_command_lines_1)
12102 (copy_command_lines): Return command_line_up.
12103 (while_command, if_command, read_command_lines, define_command)
12104 (document_command): Update.
12105 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
12106 Remove.
12107 * breakpoint.h (breakpoint_set_commands): Change type of
12108 "commands".
12109 * breakpoint.c (breakpoint_set_commands): Change type of
12110 "commands". Update.
12111 (do_map_commands_command, update_dprintf_command_list)
12112 (create_tracepoint_from_upload): Update.
12113
ffc2605c
TT
121142017-04-12 Tom Tromey <tom@tromey.com>
12115
12116 * tracepoint.c (scope_info): Update.
12117 * spu-tdep.c (spu_catch_start): Update.
12118 * python/python.c (gdbpy_decode_line): Update.
12119 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
12120 * python/py-breakpoint.c (bppy_init): Update.
12121 * probe.c (parse_probes): Update.
12122 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
12123 * location.h (event_location_deleter): New struct.
12124 (event_location_up): New typedef.
12125 (new_linespec_location, new_address_location, new_probe_location)
12126 (new_explicit_location, copy_event_location)
12127 (string_to_event_location, string_to_event_location_basic)
12128 (string_to_explicit_location): Update return type.
12129 (make_cleanup_delete_event_location): Remove.
12130 * location.c (new_linespec_location, new_address_location)
12131 (new_probe_location, new_explicit_location, copy_event_location):
12132 Return event_location_up.
12133 (delete_event_location_cleanup)
12134 (make_cleanup_delete_event_location): Remove.
12135 (string_to_explicit_location, string_to_event_location_basic)
12136 (string_to_event_location): Return event_location_up.
12137 * linespec.c (canonicalize_linespec, event_location_to_sals)
12138 (decode_line_with_current_source)
12139 (decode_line_with_last_displayed, decode_objc): Update.
12140 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
12141 * completer.c (location_completer): Update.
12142 * cli/cli-cmds.c (edit_command, list_command): Update.
12143 * breakpoint.c (create_overlay_event_breakpoint)
12144 (create_longjmp_master_breakpoint)
12145 (create_std_terminate_master_breakpoint)
12146 (create_exception_master_breakpoint)
12147 (create_thread_event_breakpoint): Update.
12148 (init_breakpoint_sal): Update. Remove some dead code.
12149 (create_breakpoint_sal): Change type of "location". Update.
12150 (create_breakpoints_sal, create_breakpoint, break_command_1)
12151 (dprintf_command, break_range_command, until_break_command)
12152 (init_ada_exception_breakpoint)
12153 (strace_marker_create_sals_from_location)
12154 (update_static_tracepoint, trace_command, ftrace_command)
12155 (strace_command, create_tracepoint_from_upload): Update.
12156 * break-catch-throw.c (re_set_exception_catchpoint): Update.
12157 * ax-gdb.c (agent_command_1): Update.
12158
8f10c932
PA
121592017-04-12 Pedro Alves <palves@redhat.com>
12160
12161 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
12162 * configure.tgt: Handle i[34567]86-*-go32* and
12163 i[34567]86-*-msdosdjgpp*.
12164 * i386-tdep.c (i386_svr4_reg_to_regnum):
12165 Make extern.
12166 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
12167 i386-go32-tdep.c.
12168 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
12169 * i386-go32-tdep.c: New file.
12170 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
12171 declarations.
12172
0a31ccfb
SM
121732017-04-12 Simon Marchi <simon.marchi@ericsson.com>
12174
12175 * aix-thread.c (pd_status2str): Change return type to const char *.
12176
e9bb3fbb
PA
121772017-04-12 Pedro Alves <palves@redhat.com>
12178
12179 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
12180 calls to set_gdbarch_gnu_triplet_regexp.
12181
53375380
PA
121822017-04-12 Pedro Alves <palves@redhat.com>
12183
12184 PR gdb/21323
12185 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
12186 New enum value.
12187 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
12188 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
12189 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
12190 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
12191 * gdbarch.h, gdbarch.c: Regenerate.
12192 * aarch64-tdep.c (aarch64_gdbarch_init): Override
12193 gdbarch_wchar_bit and gdbarch_wchar_signed.
12194 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
12195 * arm-tdep.c (arm_gdbarch_init): Likewise.
12196 * avr-tdep.c (avr_gdbarch_init): Likewise.
12197 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
12198 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12199 * i386-tdep.c (i386_go32_init_abi): Likewise.
12200 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12201 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12202 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12203 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12204 * sh-tdep.c (sh_gdbarch_init): Likewise.
12205 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12206 * sparc64-tdep.c (sparc64_init_abi): Likewise.
12207 * windows-tdep.c (windows_init_abi): Likewise.
12208 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12209
53e710ac
PA
122102017-04-12 Pedro Alves <palves@redhat.com>
12211
12212 PR c++/21323
12213 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12214 cplus_primitive_type_char32_t>: New enum values.
12215 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12216 and cplus_primitive_type_char32_t.
12217 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12218 32, use the archtecture's built-in type for char16_t and char32_t,
12219 respectively. Otherwise, fallback to init_integer_type as before,
12220 but make the type unsigned, and issue a complaint.
12221 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12222
ab0538b8
AH
122232017-04-12 Alan Hayward <alan.hayward@arm.com>
12224
5e0e0422 12225 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
12226 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12227
5430098f
SDJ
122282017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12229
12230 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12231 'const char *'.
12232
7c5ded6a
SDJ
122332017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12234
12235 * common/common-utils.c (free_vector_argv): New function.
12236 * common/common-utils.h: Include <vector>.
12237 (free_vector_argv): New prototype.
12238 * darwin-nat.c (darwin_create_inferior): Rewrite function
12239 prototype in order to constify "exec_file" and accept a
12240 "std::string" for "allargs".
12241 * fork-child.c: Include <vector>.
12242 (breakup_args): Rewrite function, using C++.
12243 (fork_inferior): Rewrite function header, constify "exec_file_arg"
12244 and accept "std::string" for "allargs". Update the code to
12245 calculate "argv" based on "allargs". Update calls to "exec_fun"
12246 and "execvp".
12247 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12248 order to constify "exec_file" and accept a "std::string" for
12249 "allargs".
12250 * go32-nat.c (go32_create_inferior): Likewise.
12251 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12252 * infcmd.c (run_command_1): Constify "exec_file". Use
12253 "std::string" for inferior arguments.
12254 * inferior.h (fork_inferior): Update prototype.
12255 * linux-nat.c (linux_nat_create_inferior): Rewrite function
12256 prototype in order to constify "exec_file" and accept a
12257 "std::string" for "allargs".
12258 * nto-procfs.c (procfs_create_inferior): Likewise.
12259 * procfs.c (procfs_create_inferior): Likewise.
12260 * remote-sim.c (gdbsim_create_inferior): Likewise.
12261 * remote.c (extended_remote_run): Update code to accept
12262 "std::string" as argument.
12263 (extended_remote_create_inferior): Rewrite function prototype in
12264 order to constify "exec_file" and accept a "std::string" for
12265 "allargs".
12266 * rs6000-nat.c (super_create_inferior): Likewise.
12267 (rs6000_create_inferior): Likewise.
12268 * target.h (struct target_ops) <to_create_inferior>: Likewise.
12269 * windows-nat.c (windows_create_inferior): Likewise.
12270
ae0eee42
PA
122712017-04-11 Pedro Alves <palves@redhat.com>
12272
12273 * thread.c: Fix whitespace throughout.
12274
a6acac06
PR
122752017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
12276
12277 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12278
64403bd1
AH
122792017-04-11 Alan Hayward <alan.hayward@arm.com>
12280
12281 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12282
a5bef50f
SDJ
122832017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
12284
12285 PR gdb/21364
12286 * osdata.c (info_osdata): Check if 'type' is an empty string
12287 instead of NULL.
12288
9295a5a9
PA
122892017-04-10 Pedro Alves <palves@redhat.com>
12290
12291 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12292 (ptid_to_global_thread_id, in_thread_list)
12293 (do_captured_list_thread_ids, set_resumed, set_running)
12294 (set_executing, set_stop_requested, finish_thread_state)
12295 (validate_registers_access, can_access_registers_ptid)
12296 (print_thread_info_1, switch_to_thread)
12297 (do_restore_current_thread_cleanup)
12298 (make_cleanup_restore_current_thread, thread_command)
12299 (thread_name_command): Use operator== instead of ptid_equal.
12300
996812e3
PA
123012017-04-10 Pedro Alves <palves@redhat.com>
12302
12303 * thread.c (struct current_thread_cleanup) <next>: Delete field.
12304 (current_thread_cleanup_chain): Delete.
12305 (restore_current_thread_cleanup_dtor)
12306 (make_cleanup_restore_current_thread): Remove references to
12307 current_thread_cleanup_chain.
12308
845b344f
AH
123092017-04-10 Alan Hayward <alan.hayward@arm.com>
12310
12311 * msp430-tdep.c (msp430_pseudo_register_read): Never return
12312 REG_UNKNOWN.
12313
803bdfe4
YQ
123142017-04-10 Yao Qi <yao.qi@linaro.org>
12315
12316 PR gdb/19942
12317 * gdbthread.h (thread_info::deletable): New method.
12318 (thread_info::incref): New method.
12319 (thread_info::decref): New method.
12320 (thread_info::refcount): Move it to private.
12321 * infrun.c (save_stop_context): Call inc_refcount.
12322 (release_stop_context_cleanup): Likewise.
12323 * thread.c (set_thread_exited): New function.
12324 (init_thread_list): Delete "tp" only it is deletable, otherwise
12325 call set_thread_exited.
12326 (delete_thread_1): Call set_thread_exited.
12327 (current_thread_cleanup) <inferior_pid>: Remove.
12328 <thread>: New field.
12329 (restore_current_thread_ptid_changed): Removed.
12330 (do_restore_current_thread_cleanup): Adjust.
12331 (restore_current_thread_cleanup_dtor): Don't call
12332 find_thread_ptid.
12333 (set_thread_refcount): Use dec_refcount.
12334 (make_cleanup_restore_current_thread): Adjust.
12335 (thread_apply_all_command): Call inc_refcount.
12336 (_initialize_thread): Don't call
12337 observer_attach_thread_ptid_changed.
12338
8c25b497
YQ
123392017-04-10 Yao Qi <yao.qi@linaro.org>
12340
12341 * thread.c (delete_thread_1): Hoist code on marking thread as
12342 exited.
12343
8473b447
SM
123442017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
12345
12346 * windows-nat.c (windows_detach): Initialize ptid with
12347 minus_one_ptid.
12348
6670ec13
SM
123492017-04-07 Simon Marchi <simon.marchi@ericsson.com>
12350
12351 * unittests/ptid-selftests.c: Fix erroneous assert messages.
12352
ba2f91bb
AH
123532017-04-07 Alan Hayward <alan.hayward@arm.com>
12354
12355 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12356 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12357 (bfin_pseudo_register_write): Likewise
12358
436252de
SM
123592017-04-06 Simon Marchi <simon.marchi@ericsson.com>
12360
12361 * common/ptid.h (struct ptid): Change to...
12362 (class ptid_t): ... this.
12363 <ptid_t>: New constructors.
12364 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12365 matches>: New methods.
12366 <make_null, make_minus_one>: New static methods.
12367 <pid>: Rename to...
12368 <m_pid>: ...this.
12369 <lwp>: Rename to...
12370 <m_lwp>: ...this.
12371 <tid>: Rename to...
12372 <m_tid>: ...this.
12373 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12374 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12375 as references, move comment to class ptid_t.
12376 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12377 ptid_t static methods.
12378 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12379 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12380 Take ptid arguments as references, implement using ptid_t methods.
12381 * unittests/ptid-selftests.c: New file.
12382 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12383 unittests/ptid-selftests.c.
12384 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12385
0dedf377
TP
123862017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
12387
12388 * python/python.c (python_run_simple_file): Cast mode literal to
12389 non-const char pointer as expected by PyFile_FromString.
12390
4e9868d4
SM
123912017-04-05 Simon Marchi <simon.marchi@ericsson.com>
12392
12393 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12394 minus_one_ptid and null_ptid.
12395
9bf2a700
PA
123962017-04-05 Pedro Alves <palves@redhat.com>
12397
12398 * warning.m4 (build_warnings): Remove -Wno-write-strings.
12399 * configure: Regenerate.
12400
a121b7c1
PA
124012017-04-05 Pedro Alves <palves@redhat.com>
12402
12403 * ada-exp.y (yyerror): Constify.
12404 * ada-lang.c (bound_name, get_selections)
12405 (ada_variant_discrim_type)
12406 (ada_variant_discrim_name, ada_value_struct_elt)
12407 (ada_lookup_struct_elt_type, is_unchecked_variant)
12408 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12409 (catch_ada_exception_command_split)
12410 (catch_ada_assert_command_split, catch_assert_command)
12411 (ada_op_name): Constify.
12412 * ada-lang.h (ada_yyerror, get_selections)
12413 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12414 * arc-tdep.c (arc_print_frame_cache): Constify.
12415 * arm-tdep.c (arm_skip_stub): Constify.
12416 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12417 (gen_aggregate_elt_ref): Constify.
12418 * bcache.c (print_bcache_statistics): Constify.
12419 * bcache.h (print_bcache_statistics): Constify.
12420 * break-catch-throw.c (catch_exception_command_1):
12421 * breakpoint.c (struct ep_type_description::description):
12422 Constify.
12423 (add_solib_catchpoint): Constify.
12424 (catch_fork_command_1): Add cast.
12425 (add_catch_command): Constify.
12426 * breakpoint.h (add_catch_command, add_solib_catchpoint):
12427 Constify.
12428 * bsd-uthread.c (bsd_uthread_state): Constify.
12429 * buildsym.c (patch_subfile_names): Constify.
12430 * buildsym.h (next_symbol_text_func, patch_subfile_names):
12431 Constify.
12432 * c-exp.y (yyerror): Constify.
12433 (token::oper): Constify.
12434 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12435 * c-varobj.c (cplus_describe_child): Constify.
12436 * charset.c (find_charset_names): Add cast.
12437 (find_charset_names): Constify array and add const_cast.
12438 * cli/cli-cmds.c (complete_command, cd_command): Constify.
12439 (edit_command): Constify.
12440 * cli/cli-decode.c (lookup_cmd): Constify.
12441 * cli/cli-dump.c (dump_memory_command, dump_value_command):
12442 Constify.
12443 (struct dump_context): Constify.
12444 (add_dump_command, restore_command): Constify.
12445 * cli/cli-script.c (get_command_line): Constify.
12446 * cli/cli-script.h (get_command_line): Constify.
12447 * cli/cli-utils.c (check_for_argument): Constify.
12448 * cli/cli-utils.h (check_for_argument): Constify.
12449 * coff-pe-read.c (struct read_pe_section_data): Constify.
12450 * command.h (lookup_cmd): Constify.
12451 * common/print-utils.c (decimal2str): Constify.
12452 * completer.c (gdb_print_filename): Constify.
12453 * corefile.c (set_gnutarget): Constify.
12454 * cp-name-parser.y (yyerror): Constify.
12455 * cp-valprint.c (cp_print_class_member): Constify.
12456 * cris-tdep.c (cris_register_name, crisv32_register_name):
12457 Constify.
12458 * d-exp.y (yyerror): Constify.
12459 (struct token::oper): Constify.
12460 * d-lang.h (d_yyerror): Constify.
12461 * dbxread.c (struct header_file_location::name): Constify.
12462 (add_old_header_file, add_new_header_file, last_function_name)
12463 (dbx_next_symbol_text, add_bincl_to_list)
12464 (find_corresponding_bincl_psymtab, set_namestring)
12465 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12466 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12467 * defs.h (command_line_input, print_address_symbolic)
12468 (deprecated_readline_begin_hook): Constify.
12469 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12470 Constify.
12471 * event-top.c (handle_line_of_input): Constify and add cast.
12472 * exceptions.c (catch_errors): Constify.
12473 * exceptions.h (catch_errors): Constify.
12474 * expprint.c (print_subexp_standard, op_string, op_name)
12475 (op_name_standard, dump_raw_expression, dump_raw_expression):
12476 * expression.h (op_name, op_string, dump_raw_expression):
12477 Constify.
12478 * f-exp.y (yyerror): Constify.
12479 (struct token::oper): Constify.
12480 (struct f77_boolean_val::name): Constify.
12481 * f-lang.c (f_word_break_characters): Constify.
12482 * f-lang.h (f_yyerror): Constify.
12483 * fork-child.c (fork_inferior): Add cast.
12484 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12485 (new_variant): Constify.
12486 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12487 * gdbarch.c: Regenerate.
12488 * gdbcore.h (set_gnutarget): Constify.
12489 * go-exp.y (yyerror): Constify.
12490 (token::oper): Constify.
12491 * go-lang.h (go_yyerror): Constify.
12492 * go32-nat.c (go32_sysinfo): Constify.
12493 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12494 * guile/scm-cmd.c (cmdscm_function): Constify.
12495 * guile/scm-param.c (pascm_param_value): Constify.
12496 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12497 (h8300sx_register_name): Constify.
12498 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12499 Constify.
12500 * ia64-tdep.c (ia64_register_names): Constify.
12501 * infcmd.c (construct_inferior_arguments): Constify.
12502 (path_command, attach_post_wait): Constify.
12503 * language.c (show_range_command, show_case_command)
12504 (unk_lang_error): Constify.
12505 * language.h (language_defn::la_error)
12506 (language_defn::la_name_of_this): Constify.
12507 * linespec.c (decode_line_2): Constify.
12508 * linux-thread-db.c (thread_db_err_str): Constify.
12509 * lm32-tdep.c (lm32_register_name): Constify.
12510 * m2-exp.y (yyerror): Constify.
12511 * m2-lang.h (m2_yyerror): Constify.
12512 * m32r-tdep.c (m32r_register_names): Constify and make static.
12513 * m68hc11-tdep.c (m68hc11_register_names): Constify.
12514 * m88k-tdep.c (m88k_register_name): Constify.
12515 * macroexp.c (appendmem): Constify.
12516 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12517 (upgrade_type, parse_external, parse_partial_symbols)
12518 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12519 (new_symbol): Constify.
12520 * memattr.c (mem_info_command): Constify.
12521 * mep-tdep.c (register_name_from_keyword): Constify.
12522 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12523 Constify.
12524 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12525 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12526 * mi/mi-main.c (captured_mi_execute_command): Constify and add
12527 cast.
12528 (mi_execute_async_cli_command): Constify.
12529 * mips-tdep.c (mips_register_name): Constify.
12530 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12531 (am33_register_name, am33_2_register_name)
12532 * moxie-tdep.c (moxie_register_names): Constify.
12533 * nat/linux-osdata.c (osdata_type): Constify fields.
12534 * nto-tdep.c (nto_parse_redirection): Constify.
12535 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12536 (lookup_child_selector): Constify.
12537 (objc_methcall::name): Constify.
12538 * objc-lang.h (lookup_objc_class, lookup_child_selector)
12539 (lookup_struct_typedef): Constify.
12540 * objfiles.c (pc_in_section): Constify.
12541 * objfiles.h (pc_in_section): Constify.
12542 * p-exp.y (struct token::oper): Constify.
12543 (yyerror): Constify.
12544 * p-lang.h (pascal_yyerror): Constify.
12545 * parser-defs.h (op_name_standard): Constify.
12546 (op_print::string): Constify.
12547 (exp_descriptor::op_name): Constify.
12548 * printcmd.c (print_address_symbolic): Constify.
12549 * psymtab.c (print_partial_symbols): Constify.
12550 * python/py-breakpoint.c (stop_func): Constify.
12551 (bppy_get_expression): Constify.
12552 * python/py-cmd.c (cmdpy_completer::name): Constify.
12553 (cmdpy_function): Constify.
12554 * python/py-event.c (evpy_add_attribute)
12555 (gdbpy_initialize_event_generic): Constify.
12556 * python/py-event.h (evpy_add_attribute)
12557 (gdbpy_initialize_event_generic): Constify.
12558 * python/py-evts.c (add_new_registry): Constify.
12559 * python/py-finishbreakpoint.c (outofscope_func): Constify.
12560 * python/py-framefilter.c (get_py_iter_from_func): Constify.
12561 * python/py-inferior.c (get_buffer): Add cast.
12562 * python/py-param.c (parm_constant::name): Constify.
12563 * python/py-unwind.c (fprint_frame_id): Constify.
12564 * python/python.c (gdbpy_parameter_value): Constify.
12565 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12566 * remote.c (memory_packet_config::name): Constify.
12567 (show_packet_config_cmd, remote_write_bytes)
12568 (remote_buffer_add_string):
12569 * reverse.c (exec_reverse_once): Constify.
12570 * rs6000-tdep.c (variant::name, variant::description): Constify.
12571 * rust-exp.y (rustyyerror): Constify.
12572 * rust-lang.c (rust_op_name): Constify.
12573 * rust-lang.h (rustyyerror): Constify.
12574 * serial.h (serial_ops::name): Constify.
12575 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12576 (sh_sh3e_register_name, sh_sh2e_register_name)
12577 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12578 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12579 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12580 (sh_sh4al_dsp_register_name): Constify.
12581 * sh64-tdep.c (sh64_register_name): Constify.
12582 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12583 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12584 * stabsread.c (patch_block_stabs, read_type_number)
12585 (ref_map::stabs, ref_add, process_reference)
12586 (symbol_reference_defined, define_symbol, define_symbol)
12587 (error_type, read_type, read_member_functions, read_cpp_abbrev)
12588 (read_one_struct_field, read_struct_fields, read_baseclasses)
12589 (read_tilde_fields, read_struct_type, read_array_type)
12590 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12591 (read_huge_number, read_range_type, read_args, common_block_start)
12592 (find_name_end): Constify.
12593 * stabsread.h (common_block_start, define_symbol)
12594 (process_one_symbol, symbol_reference_defined, ref_add):
12595 * symfile.c (get_section_index, add_symbol_file_command):
12596 * symfile.h (get_section_index): Constify.
12597 * target-descriptions.c (tdesc_type::name): Constify.
12598 (tdesc_free_type): Add cast.
12599 * target.c (find_default_run_target):
12600 (add_deprecated_target_alias, find_default_run_target)
12601 (target_announce_detach): Constify.
12602 (do_option): Constify.
12603 * target.h (add_deprecated_target_alias): Constify.
12604 * thread.c (print_thread_info_1): Constify.
12605 * top.c (deprecated_readline_begin_hook, command_line_input):
12606 Constify.
12607 (init_main): Add casts.
12608 * top.h (handle_line_of_input): Constify.
12609 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12610 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12611 (tfind_command): Rename to ...
12612 (tfind_command_1): ... this and constify.
12613 (tfind_command): New function.
12614 (tfind_end_command, tfind_start_command): Adjust.
12615 (encode_source_string): Constify.
12616 * tracepoint.h (encode_source_string): Constify.
12617 * tui/tui-data.c (tui_partial_win_by_name): Constify.
12618 * tui/tui-data.h (tui_partial_win_by_name): Constify.
12619 * tui/tui-source.c (tui_set_source_content_nil): Constify.
12620 * tui/tui-source.h (tui_set_source_content_nil): Constify.
12621 * tui/tui-win.c (parse_scrolling_args): Constify.
12622 * tui/tui-windata.c (tui_erase_data_content): Constify.
12623 * tui/tui-windata.h (tui_erase_data_content): Constify.
12624 * tui/tui-winsource.c (tui_erase_source_content): Constify.
12625 * tui/tui.c (tui_enable): Add cast.
12626 * utils.c (defaulted_query): Constify.
12627 (init_page_info): Add cast.
12628 (puts_debug, subset_compare): Constify.
12629 * utils.h (subset_compare): Constify.
12630 * varobj.c (varobj_format_string): Constify.
12631 * varobj.h (varobj_format_string): Constify.
12632 * vax-tdep.c (vax_register_name): Constify.
12633 * windows-nat.c (windows_detach): Constify.
12634 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12635 * xml-support.c (gdb_xml_end_element): Constify.
12636 * xml-tdesc.c (tdesc_start_reg): Constify.
12637 * xstormy16-tdep.c (xstormy16_register_name): Constify.
12638 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12639 * xtensa-tdep.h (xtensa_register_t::name): Constify.
12640
995816ba
PA
126412017-04-05 Pedro Alves <palves@redhat.com>
12642
12643 * proc-api.c (struct trans): Constify.
12644 (procfs_note): Constify.
12645 * proc-events.c (struct trans, syscall_table):
12646 * proc-flags.c (struct trans): Constify.
12647 * proc-utils.h (procfs_note): Constify.
12648 * proc-why.c (struct trans): Constify.
12649 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12650 (procfs_detach): Constify.
12651 * sol-thread.c (struct string_map): Constify.
12652 (td_err_string, td_state_string): Constify.
12653
3e83a920
PA
126542017-04-05 Pedro Alves <palves@redhat.com>
12655
12656 * proc-api.c (procfs_filename): Don't initialize
12657 procfs_filename.
12658 (prepare_to_trace): Assume procfs_filename is non-NULL.
12659 (_initialize_proc_api): Give procfs_filename a default value here.
12660
63160a43
PA
126612017-04-05 Pedro Alves <palves@redhat.com>
12662
12663 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12664 'cond_string' parameter.
12665 (extract_exception_regexp): Constify 'string' parameter.
12666 (catch_exception_command_1): Constify.
12667 * breakpoint.c (init_catchpoint)
12668 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12669 parameter.
12670 (ep_parse_optional_if_clause, catch_fork_command_1)
12671 (catch_exec_command_1): Constify.
12672 * breakpoint.h (init_catchpoint): Constify 'cond_string'
12673 parameter.
12674 (ep_parse_optional_if_clause): Constify.
12675 * cli/cli-utils.c (remove_trailing_whitespace)
12676 (check_for_argument): Constify.
12677 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12678 non-const overload.
12679 (check_for_argument): Likewise.
12680
9b2eba3d
PA
126812017-04-05 Pedro Alves <palves@redhat.com>
12682
12683 * event-top.c (command_line_handler): Add cast to execute_command
12684 call.
12685 * record-btrace.c (cmd_record_btrace_bts_start)
12686 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12687 (cmd_record_btrace_start): Add cast to execute_command call.
12688 * record-full.c (record_full_goto_insn):
12689 * record.c (record_start, record_stop): Add cast to
12690 execute_command_to_string calls.
12691 (cmd_record_start): Add cast to execute_command calls.
12692
2adadf51
PA
126932017-04-05 Pedro Alves <palves@redhat.com>
12694
12695 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12696 static inline function.
12697 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12698 array and use gdb_PyArg_ParseTupleAndKeywords.
12699 * python/py-cmd.c (cmdpy_init): Likewise.
12700 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12701 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12702 (infpy_search_memory): Likewise.
12703 * python/py-objfile.c (objfpy_add_separate_debug_file)
12704 (gdbpy_lookup_objfile): Likewise.
12705 * python/py-symbol.c (gdbpy_lookup_symbol)
12706 (gdbpy_lookup_global_symbol): Likewise.
12707 * python/py-type.c (gdbpy_lookup_type): Likewise.
12708 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12709 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12710 Likewise.
12711
0d1f4ceb
PA
127122017-04-05 Pedro Alves <palves@redhat.com>
12713
12714 * python/python-internal.h (gdb_PyGetSetDef): New type.
12715 * python/py-block.c (block_object_getset)
12716 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12717 * python/py-event.c (event_object_getset)
12718 (finish_breakpoint_object_getset): Likewise.
12719 * python/py-inferior.c (inferior_object_getset): Likewise.
12720 * python/py-infthread.c (thread_object_getset): Likewise.
12721 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12722 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12723 * python/py-objfile.c (objfile_getset): Likewise.
12724 * python/py-progspace.c (pspace_getset): Likewise.
12725 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12726 Likewise.
12727 * python/py-record.c (recpy_record_getset): Likewise.
12728 * python/py-symbol.c (symbol_object_getset): Likewise.
12729 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12730 Likewise.
12731 * python/py-type.c (type_object_getset, field_object_getset):
12732 Likewise.
12733 * python/py-value.c (value_object_getset): Likewise.
12734
4d759979
PA
127352017-04-05 Pedro Alves <palves@redhat.com>
12736
12737 * python/python-internal.h (gdb_PyObject_CallMethod)
12738 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12739 New functions.
12740 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12741 (PySys_GetObject, PySys_SetPath): New macros.
12742
fdf9e36f
PA
127432017-04-05 Pedro Alves <palves@redhat.com>
12744
12745 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12746 info_osdata_command.
12747 * osdata.c (info_osdata_command): Rename to ...
12748 (info_osdata): ... this. Constify 'type' parameter, and remove
12749 the 'from_tty' parameter. Accept NULL TYPE.
12750 (info_osdata_command): New function.
12751 * osdata.h (info_osdata_command): Remove declaration.
12752 (info_osdata): New declaration.
12753
9f33b8b7
PA
127542017-04-05 Pedro Alves <palves@redhat.com>
12755
12756 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12757 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12758 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12759 parameter.
12760 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12761 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12762 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12763 parameter.
12764 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12765 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12766 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12767 (mi_cmd_file_list_exec_source_files)
12768 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12769 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12770 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12771 parameter.
12772 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12773 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12774 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12775 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12776 (mi_cmd_stack_info_frame): Constify 'command' parameter.
12777 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12778 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12779 'command' parameter.
12780 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12781 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12782 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12783 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12784 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12785 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12786 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12787 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12788 (mi_cmd_var_set_update_range): Constify 'command' parameter.
12789 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12790 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12791 parameter.
12792 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12793 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12794 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12795 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12796 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12797 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12798 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12799 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12800 (mi_cmd_data_list_changed_registers)
12801 (mi_cmd_data_write_register_values)
12802 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12803 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12804 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12805 (mi_cmd_list_features, mi_cmd_list_target_features)
12806 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12807 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12808 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12809 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12810 (mi_cmd_trace_frame_collected): Constify 'command'
12811 parameter.
12812 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12813 'command' parameter.
12814
67cb5b2d
PA
128152017-04-05 Pedro Alves <palves@redhat.com>
12816
12817 * ada-lang.c (ada_completer_word_break_characters): Now a const
12818 array.
12819 (ada_get_gdb_completer_word_break_characters): Constify.
12820 * completer.c (gdb_completer_command_word_break_characters)
12821 (gdb_completer_file_name_break_characters)
12822 (gdb_completer_quote_characters): Now const arrays.
12823 (get_gdb_completer_quote_characters): Constify.
12824 (set_rl_completer_word_break_characters): New function.
12825 (set_gdb_completion_word_break_characters)
12826 (complete_line_internal): Use it.
12827 * completer.h (get_gdb_completer_quote_characters): Constify.
12828 (set_rl_completer_word_break_characters): Declare.
12829 * f-lang.c (f_word_break_characters): Constify.
12830 * language.c (default_word_break_characters): Constify.
12831 * language.h (language_defn::la_word_break_characters): Constify.
12832 (default_word_break_characters): Constify.
12833 * top.c (init_main): Use set_rl_completer_word_break_characters.
12834
7a114964
PA
128352017-04-05 Pedro Alves <palves@redhat.com>
12836
12837 * aix-thread.c (aix_thread_pid_to_str)
12838 (aix_thread_extra_thread_info): Constify.
12839 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12840 * bsd-uthread.c (bsd_uthread_extra_thread_info)
12841 (bsd_uthread_pid_to_str): Constify.
12842 * corelow.c (core_pid_to_str): Constify.
12843 * darwin-nat.c (darwin_pid_to_str): Constify.
12844 * fbsd-nat.c (fbsd_pid_to_str): Constify.
12845 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12846 Constify.
12847 * gnu-nat.c (gnu_pid_to_str): Constify.
12848 * go32-nat.c (go32_pid_to_str): Constify.
12849 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12850 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12851 * inferior.c (inferior_pid_to_str): Constify.
12852 * linux-nat.c (linux_nat_pid_to_str): Constify.
12853 * linux-tdep.c (linux_core_pid_to_str): Constify.
12854 * linux-thread-db.c (thread_db_pid_to_str)
12855 (thread_db_extra_thread_info): Constify.
12856 * nto-tdep.c (nto_extra_thread_info): Constify.
12857 * nto-tdep.h (nto_extra_thread_info): Constify.
12858 * obsd-nat.c (obsd_pid_to_str): Constify.
12859 * procfs.c (procfs_pid_to_str): Constify.
12860 * ravenscar-thread.c (ravenscar_extra_thread_info)
12861 (ravenscar_pid_to_str): Constify.
12862 * remote-sim.c (gdbsim_pid_to_str): Constify.
12863 * remote.c (remote_threads_extra_info, remote_pid_to_str):
12864 Constify.
12865 * sol-thread.c (solaris_pid_to_str): Constify.
12866 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12867 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12868 * target.c (default_pid_to_str, target_pid_to_str)
12869 (normal_pid_to_str, default_pid_to_str): Constify.
12870 * target.h (target_ops::to_pid_to_str)
12871 (target_ops::to_extra_thread_info): Constify.
12872 (target_pid_to_str, normal_pid_to_str): Constify.
12873 * windows-nat.c (windows_pid_to_str): Constify.
12874 * gdbarch.sh (core_pid_to_str): Constify.
12875 * target-delegates.c: Regenerate.
12876 * gdbarch.h, gdbarch.c: Regenerate.
12877
69bbf465
PA
128782017-04-05 Pedro Alves <palves@redhat.com>
12879
12880 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12881 the memory of the temporary warning_pre_print override.
12882 * utils.c (warning_pre_print): Constify.
12883 * utils.h (warning_pre_print): Constify.
12884
be47f9e8
PA
128852017-04-05 Pedro Alves <palves@redhat.com>
12886
12887 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12888 (shell_command): New function.
12889 (make_command): Use std::string.
12890 (init_cli_cmds): Register shell_command instead of shell_escape.
12891
bde6261a
PA
128922017-04-05 Pedro Alves <palves@redhat.com>
12893
12894 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12895 * tracepoint.c (default_collect): Don't initialize.
12896
b38ef47f
PA
128972017-04-05 Pedro Alves <palves@redhat.com>
12898
12899 * macroexp.c (macro_buffer::shared): Now a bool.
12900 (init_buffer): Update.
12901 (init_shared_buffer): Constify 'addr' parameter.
12902 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12903 casts.
12904
f995bbe8
PA
129052017-04-05 Pedro Alves <palves@redhat.com>
12906
12907 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12908 * disasm.c (set_disassembler_options): Constify local.
12909 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12910
4a596fe2
SDJ
129112017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12912
12913 PR gdb/21352
12914 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12915 option.
12916
2cad08ea
YQ
129172017-04-05 Yao Qi <yao.qi@linaro.org>
12918
12919 * frame.c (frame_unwind_register_unsigned): Call
12920 frame_unwind_register_value.
12921
55a98976
YQ
129222017-04-05 Yao Qi <yao.qi@linaro.org>
12923
12924 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12925 Use gdb_test_multiple, and don't match anchor.
12926
4ac40124
PA
129272017-04-05 Pedro Alves <palves@redhat.com>
12928
12929 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12930 (Write After Approval): Remove Simon Marchi.
12931
c053b654
PA
129322017-04-05 Pedro Alves <palves@redhat.com>
12933
12934 * common/gdb_optional.h (optional::optional): Make constexpr and
12935 initialize m_dummy.
12936
4c7bf4f9
JB
129372017-04-04 John Baldwin <jhb@FreeBSD.org>
12938
12939 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12940 (amd64fbsd_jmp_buf_reg_offset): Remove.
12941 (amd64fbsd_supply_uthread): Remove function.
12942 (amd64fbsd_collect_uthread): Remove function.
12943 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12944 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12945 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12946 (fbsd-nat.c): Update comment.
12947 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12948 (i386fbsd_jmp_buf_reg_offset): Remove.
12949 (i386fbsd_supply_uthread): Remove function.
12950 (i386fbsd_collect_uthread): Remove function.
12951 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12952
1e1a8bef
JB
129532017-04-04 John Baldwin <jhb@FreeBSD.org>
12954
12955 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12956 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12957 * NEWS: Mention that support for FreeBSD/alpha was removed.
12958 * alpha-fbsd-tdep.c: Delete file.
12959 * config/alpha/fbsd.mh: Delete file.
12960 * configure.host: Delete alpha*-*-freebsd* and
12961 alpha*-*-kfreebsd*-gnu.
12962 * configure.tgt: Delete alpha*-*-freebsd* and
12963 alpha*-*-kfreebsd*-gnu.
12964
49907934
JB
129652017-04-04 John Baldwin <jhb@FreeBSD.org>
12966
12967 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12968 amd64bsd_store_inferior_registers): Use ptid from regcache.
12969
6f77053d
PA
129702017-04-04 Pedro Alves <palves@redhat.com>
12971
12972 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12973 data fields, make them private and add "m_" prefixes.
12974 (lnp_state_machine::lnp_state_machine): New ctor.
12975 (record_line, check_line_address, handle_set_discriminator)
12976 (handle_set_address, handle_advance_pc, handle_special_opcode)
12977 (handle_advance_line, handle_set_file, handle_negate_stmt)
12978 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12979 (end_sequence, advance_line): New methods.
12980 (m_gdbarch, m_record_lines_p): New fields.
12981 (lnp_reader_state): Delete.
12982 (dwarf_record_line): Rename to ...
12983 (lnp_state_machine::record_line): ... adjust.
12984 (init_lnp_state_machine): Delete.
12985 (lnp_state_machine::lnp_state_machine): New.
12986 (check_line_address): Rename to ...
12987 (lnp_state_machine::check_line_address): This.
12988 (dwarf_decode_lines_1): Remove reference to "reader_state".
12989 Adjust lnp_state_machine having a non-default ctor. Use bool.
12990 State machine internal state manipulation moved to
12991 lnp_state_machine methods.
12992
9c541725
PA
129932017-04-04 Pedro Alves <palves@redhat.com>
12994
12995 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12996 unittests/offset-type-selftests.c.
12997 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12998 * common/offset-type.h: New file.
12999 * common/preprocessor.h: New file.
13000 * common/traits.h: New file.
13001 * common/valid-expr.h: New file.
13002 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13003 sect_offset and cu_offset strong typedefs throughout.
13004 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13005 typedefs throughout.
13006 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13007 sect_offset and cu_offset strong typedefs throughout.
13008 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13009 typedefs throughout.
13010 * gdbtypes.h: Include "common/offset-type.h".
13011 (cu_offset): Now an offset type (strong typedef) instead of a
13012 struct.
13013 (sect_offset): Likewise.
13014 (union call_site_parameter_u): Rename "param_offset" field to
13015 "param_cu_off".
13016 * unittests/offset-type-selftests.c: New file.
13017
ecfb656c
PA
130182017-04-04 Pedro Alves <palves@redhat.com>
13019
13020 * common/underlying.h: New file.
13021 * dwarf2read.c: Include "common/gdb_optional.h" and
13022 "common/underlying.h".
13023 (dir_index, file_name_index): New types.
13024 (file_entry): Use them.
13025 (file_entry::include): Use to_underlying.
13026 (line_header::add_file_name): Use dir_index.
13027 (read_formatted_entries): Use gdb::optional. Read form before
13028 writting to file_entry.
13029 (dwarf_decode_line_header): Use dir_index.
13030 (lnp_state_machine::current_file): Use to_underlying.
13031 (lnp_state_machine::file): Change type to file_name_index.
13032 (dwarf_record_line): Use to_underlying.
13033 (init_lnp_state_machine): Use file_name_index.
13034 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13035
d194f1fe
PA
130362017-04-04 Pedro Alves <palves@redhat.com>
13037
13038 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13039 operator bool, has_value and get methods.
13040
fff8551c
PA
130412017-04-04 Pedro Alves <palves@redhat.com>
13042
13043 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13044 fields.
13045 (line_header): Initialize all data fields. Change type of
13046 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13047 Change type of include_dirs to std::vector<const char *>. Remove
13048 num_include_dirs, include_dirs_size. Change type of file_names to
13049 std::vector<file_entry>. Remove num_file_names, file_names_size.
13050 (line_header::line_header): New.
13051 (line_header::add_include_dir, line_header::add_file_name): New
13052 methods.
13053 (line_header::include_dir_at): Remove NULL check.
13054 (line_header::file_name_at): Add const overload.
13055 (line_header_up): New unique_ptr typedef.
13056 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13057 std::vector. Remove free_line_header call.
13058 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13059 free_line_header call.
13060 (free_cu_line_header): Delete.
13061 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13062 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13063 Adjust to use std::vector.
13064 (free_line_header): Delete.
13065 (free_line_header_voidp): Use delete.
13066 (add_include_dir): Replace with ...
13067 (line_header::add_include_dir): ... this method. Use std::vector.
13068 (add_file_name): Replace with ...
13069 (line_header::add_file_name): ... this method. Use std::vector.
13070 (add_include_dir_stub): Delete.
13071 (read_formatted_entries): Remove memset.
13072 (dwarf_decode_line_header): Return a line_header_up instead of a
13073 raw pointer. Remove cleanup handling. Pass lambdas to
13074 read_formatted_entries. Adjust to use line_header methods.
13075 (dwarf_decode_lines_1): Adjust to use line_header methods.
13076 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13077 use std::vector.
13078
d62a8ae2
SM
130792017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13080
13081 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13082 instead of struct ptid.
13083
db3a1dc7
AH
130842017-05-04 Alan Hayward <alan.hayward@arm.com>
13085
13086 * frame.c (get_frame_register_bytes): Unwind using value.
13087 (put_frame_register_bytes): Likewise.
13088
b1b45502
IB
130892017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
13090
13091 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
13092 aggregate-like.
13093
ec13808e
JK
130942017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
13095
13096 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
13097
12316564
YQ
130982017-03-29 Yao Qi <yao.qi@linaro.org>
13099
13100 * gdbthread.h (struct thread_info): Declare constructor and
13101 destructor. Add some in-class member initializers.
13102 * thread.c (free_thread): Remove.
13103 (init_thread_list): Call delete instead of free_thread.
13104 (new_thread): Call thread_info constructor.
13105 (thread_info::thread_info): New function.
13106 (thread_info::~thread_info): New function.
13107 (delete_thread_1): Call delete instead of free_thread.
13108 (make_cleanup_restore_current_thread): Move tp and frame to
13109 inner block.
13110
fe5f7374
AK
131112017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13112
13113 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
13114 (arc_skip_prologue): Likewise.
13115 (arc_make_frame_cache): Likewise.
13116 (arc_pv_get_operand): New function.
13117 (arc_is_in_prologue): Likewise.
13118 (arc_analyze_prologue): Likewise.
13119 (arc_print_frame_cache): Likewise.
13120 (MAX_PROLOGUE_LENGTH): New constant.
13121
eea78757
AK
131222017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13123
13124 * configure.tgt: Add arc-insn.o.
13125 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
13126 (dump_arc_instruction_command): New function.
13127 (arc_fprintf_disasm): Likewise.
13128 (arc_disassemble_info): Likewise.
13129 (arc_insn_get_operand_value): Likewise.
13130 (arc_insn_get_operand_value_signed): Likewise.
13131 (arc_insn_get_memory_base_reg): Likewise.
13132 (arc_insn_get_memory_offset): Likewise.
13133 (arc_insn_get_branch_target): Likewise.
13134 (arc_insn_dump): Likewise.
13135 (arc_insn_get_linear_next_pc): Likewise.
13136 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
13137 (arc_disassemble_info): Likewise.
13138 (arc_insn_get_branch_target): Likewise.
13139 (arc_insn_get_linear_next_pc): Likewise.
13140 * NEWS: Mention new "maint print arc arc-instruction".
13141
3be78afd
AK
131422017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13143
13144 * arc-tdep (maintenance_print_arc_list): New variable.
13145 (maintenance_print_arc_command): New function.
13146
296ec4fa
AK
131472017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
13148
13149 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
13150 Add "limm" and "reserved".
13151 (arc_cannot_fetch_register, arc_cannot_store_register): Add
13152 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
13153 * arc-tdep.h (arc_regnum): Likewise.
13154
f74f865e
MF
131552017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13156
13157 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13158 for THREADPTR register.
13159 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
13160 register.
13161 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
13162 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
13163 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
13164
0d0bf81a
MF
131652017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13166
13167 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
13168 registers above gdbarch_num_regs (gdbarch) as privileged in
13169 call0 ABI.
13170
0ce4291e
MF
131712017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13172
13173 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
13174 for a single specified register or for all registers in
13175 a0_base..a0_base + C0_NREGS range.
13176 (supply_gregset_reg): Call regcache_raw_supply for a single
13177 specified register or for all registers in a0_base..a0_base +
13178 C0_NREGS range.
13179
c56054f9
MF
131802017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13181
13182 * arch/xtensa.h (C0_NREGS): Add definition.
13183 * xtensa-tdep.c (C0_NREGS): Remove definition.
13184
a4398628
MF
131852017-03-27 Max Filippov <jcmvbkbc@gmail.com>
13186
13187 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
13188 Drop xtensa_default_isa initialization.
13189 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
13190
8c43009f
PA
131912017-03-27 Pedro Alves <palves@redhat.com>
13192
13193 * dwarf2read.c (file_entry) <dir_index>: Add comment.
13194 (file_entry::include_dir): New method.
13195 (line_header::include_dir_at, line_header::file_name_at): New
13196 methods.
13197 (setup_type_unit_groups, setup_type_unit_groups)
13198 (psymtab_include_file_name): Simplify using the new methods.
13199 (lnp_state_machine) <the_line_header>: New field.
13200 <file>: Add comment.
13201 (lnp_state_machine::current_file): New method.
13202 (dwarf_record_line): Simplify using the new methods.
13203 (init_lnp_state_machine): Initialize the "the_line_header" field.
13204 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13205 Simplify using the new methods.
13206
a7e80b9e
PA
132072017-03-27 Pedro Alves <palves@redhat.com>
13208
13209 * cp-name-parser.y (make_empty): Delete.
13210 (demangler_special, nested_name, ptr_operator, array_indicator)
13211 (direct_declarator, declarator_1): Use fill_comp instead of
13212 make_empty.
13213
21047726
PA
132142017-03-27 Pedro Alves <palves@redhat.com>
13215
13216 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13217 to ATTRIBUTE_PRINTF.
13218 * solib-target.c (library_list_start_list): Print "string" not
13219 "version".
13220 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13221 gdb_xml_error call.
13222
d721ba37
PA
132232017-03-27 Pedro Alves <palves@redhat.com>
13224
13225 * dwarf2read.c (struct file_and_directory): New.
13226 (dwarf2_get_dwz_file): Adjust to use std::string.
13227 (dw2_get_file_names_reader): Adjust to use file_and_directory.
13228 (find_file_and_directory): Adjust to return a file_and_directory
13229 object.
13230 (read_file_scope): Adjust to use file_and_directory. Remove
13231 make_cleanup/do_cleanups calls.
13232 (open_and_init_dwp_file): Adjust to use std::string. Remove
13233 make_cleanup/do_cleanups calls.
13234 * python/python.c (do_start_initialization): Adjust to ldirname
13235 returning a std::string.
13236 * utils.c (ldirname): Now returns a std::string.
13237 * utils.h (ldirname): Change return type to std::string.
13238 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13239 returning a std::string.
13240 * xml-tdesc.c (file_read_description_xml): Likewise.
13241
ed771251
AH
132422017-03-24 Alan Hayward <alan.hayward@arm.com>
13243
13244 * regcache.c (regcache_debug_print_register): New function.
13245 * regcache.h (regcache_debug_print_register): New declaration.
13246 * target.c (debug_print_register): Remove.
13247 (target_fetch_registers): Call regcache_debug_print_register.
13248 (target_store_registers): Likewise.
13249
568c1b9f
PB
132502017-03-24 Pádraig Brady <pbrady@fb.com>
13251
13252 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13253 reference beyond the 'lh->include_dirs' array before accessing to
13254 it.
13255 (psymtab_include_file_name): Likewise.
13256 (dwarf_decode_lines_1): Likewise.
13257 (dwarf_decode_lines): Likewise.
13258 (file_file_name): Likewise.
13259
3e00d44f
SM
132602017-03-23 Simon Marchi <simon.marchi@ericsson.com>
13261
13262 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13263 inferior_ptid.
13264 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13265 ps_lsetfpregs): Likewise.
13266 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13267 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13268 ps_lsetfpregs): Likewise.
13269 * target.c (target_fetch_registers, target_store_registers):
13270 Remove asserts.
13271
077ae656
AH
132722017-03-23 Alan Hayward <alan.hayward@arm.com>
13273
13274 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13275
1e2b521d
YQ
132762017-03-23 Yao Qi <yao.qi@linaro.org>
13277
13278 * aarch64-tdep.c (aarch64_process_record_test): Declare.
13279 (_initialize_aarch64_tdep): Register it.
13280 (aarch64_record_load_store): Handle PRFM instruction.
13281 (aarch64_process_record_test): New function.
13282
33877125
YQ
132832017-03-23 Yao Qi <yao.qi@linaro.org>
13284
13285 * aarch64-tdep.c (aarch64_record_load_store): Fix code
13286 indentation.
13287
a0eef940
YQ
132882017-03-23 Yao Qi <yao.qi@linaro.org>
13289
13290 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13291
3f2a3564
PR
132922017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
13293
13294 python/python.c (do_start_initialization): Fix memory leak.
13295
b67aeab0
SM
132962017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
13297
13298 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13299 using get_ptrace_pid.
13300 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13301 inferior_ptid.
13302 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13303 inferior_ptid instead of pid.
13304
ffdbe864
YQ
133052017-03-22 Yao Qi <yao.qi@linaro.org>
13306
13307 * aarch64-tdep.c: Wrap locally used classes in anonymous
13308 namespace.
13309 * arm-tdep.c: Likewise.
13310 * linespec.c: Likewise.
13311 * ui-out.c: Likewise.
13312
9d736fbf
JG
133132017-03-22 Jonah Graham <jonah@kichwacoders.com>
13314
13315 PR gdb/19637
13316 * python/lib/gdb/printer/bound_registers.py: Import sys.
13317
3de88e9a
SM
133182017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13319
13320 * windows-nat.c (do_windows_fetch_inferior_registers): Add
13321 windows_thread_info parameter and use it instead of
13322 current_thread.
13323 (windows_fetch_inferior_registers): Don't set current_thread,
13324 pass the thread to do_windows_fetch_inferior_registers. Use
13325 ptid from regcache instead of inferior_ptid.
13326 (do_windows_store_inferior_registers): Add windows_thread_info
13327 parameter and use it instead of current_thread.
13328 (windows_store_inferior_registers): Don't set current_thread,
13329 pass the thread to do_windows_store_inferior_registers. Use
13330 ptid from regcache instead of inferior_ptid.
13331
0e7b8f61
SM
133322017-03-21 Simon Marchi <simon.marchi@ericsson.com>
13333
13334 * ser-mingw.c (ser_windows_raw): Remove reference to
13335 struct serial::current_timeout.
13336
5badf10a
IR
133372017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
13338
13339 PR tdep/20928
13340 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13341 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13342 (sparc64_fsr_type): Fix %fsr decoding.
13343
cee59b3f
TW
133442017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
13345
13346 * python/py-record-btrace.c (btpy_insn_data): Change return type
13347 for Python 2.
13348
639a9038
SM
133492017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13350
13351 * spu-linux-nat.c (spu_fetch_inferior_registers,
13352 spu_store_inferior_registers): Use ptid from regcache, set and
13353 restore inferior_ptid.
13354 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13355 Likewise.
13356
bcc0c096
SM
133572017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
13358
13359 * i386-linux-nat.c (fetch_register, store_register,
13360 i386_linux_fetch_inferior_registers,
13361 i386_linux_store_inferior_registers): Use ptid from regcache.
13362 * ia64-linux-nat.c (ia64_linux_fetch_register,
13363 ia64_linux_store_register): Likewise.
13364 * inf-ptrace.c (inf_ptrace_fetch_register,
13365 inf_ptrace_store_register): Likewise.
13366 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13367 m32r_linux_store_inferior_registers): Likewise.
13368 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13369 m68kbsd_store_inferior_registers): Likewise.
13370 * m68k-linux-nat.c (fetch_register, store_register,
13371 m68k_linux_fetch_inferior_registers,
13372 m68k_linux_store_inferior_registers): Likewise.
13373 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13374 m88kbsd_store_inferior_registers): Likewise.
13375 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13376 mips_fbsd_store_inferior_registers): Likewise.
13377 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13378 mips64_linux_regsets_store_registers): Likewise.
13379 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13380 mipsnbsd_store_inferior_registers): Likewise.
13381 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13382 mips64obsd_store_inferior_registers): Likewise.
13383 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13384 Likewise.
13385 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13386 ppcfbsd_store_inferior_registers): Likewise.
13387 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13388 ppc_linux_store_inferior_registers): Likewise.
13389 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13390 ppcnbsd_store_inferior_registers): Likewise.
13391 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13392 ppcobsd_store_registers): Likewise.
13393 * procfs.c (procfs_fetch_registers, procfs_store_registers):
13394 Likewise.
13395 * ravenscar-thread.c (ravenscar_fetch_registers,
13396 ravenscar_store_registers, ravenscar_prepare_to_store):
13397 Likewise.
13398 * record-btrace.c (record_btrace_fetch_registers,
13399 record_btrace_store_registers, record_btrace_prepare_to_store):
13400 Likewise.
13401 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13402 Lookup inferior using ptid from regcache, instead of
13403 current_inferior.
13404 * remote.c (remote_fetch_registers, remote_store_registers): Use
13405 ptid from regcache.
13406 * rs6000-nat.c (fetch_register, store_register): Likewise.
13407 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13408 s390_linux_store_inferior_registers): Likewise.
13409 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13410 shnbsd_store_inferior_registers): Likewise.
13411 * sol-thread.c (sol_thread_fetch_registers,
13412 sol_thread_store_registers): Likewise.
13413 * sparc-nat.c (sparc_fetch_inferior_registers,
13414 sparc_store_inferior_registers): Likewise.
13415 * tilegx-linux-nat.c (fetch_inferior_registers,
13416 store_inferior_registers): Likewise.
13417 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13418 vaxbsd_store_inferior_registers): Likewise.
13419 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13420 store_xtregs): Likewise.
13421
c0f55cc6
AV
134222017-03-20 Artemiy Volkov <artemiyv@acm.org>
13423
13424 PR gdb/14441
13425 * NEWS: Mention support for rvalue references in GDB and python.
13426 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13427 supports both lvalue and rvalue references.
13428
15c0a2a9
AV
134292017-03-20 Artemiy Volkov <artemiyv@acm.org>
13430
13431 PR gdb/14441
13432 * gdbtypes.c (rank_one_type): Implement overloading
13433 resolution rules regarding rvalue references.
13434
aa006118
AV
134352017-03-20 Artemiy Volkov <artemiyv@acm.org>
13436
13437 PR gdb/14441
13438 * aarch64-tdep.c (aarch64_type_align)
13439 (aarch64_extract_return_value, aarch64_store_return_value): Change
13440 lvalue reference type checks to general reference type checks.
13441 * amd64-tdep.c (amd64_classify): Likewise.
13442 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13443 Likewise.
13444 * arm-tdep.c (arm_type_align, arm_extract_return_value)
13445 (arm_store_return_value): Likewise.
13446 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13447 * c-typeprint.c (c_print_type): Likewise.
13448 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13449 (cplus_number_of_children, cplus_describe_child): Likewise.
13450 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13451 * completer.c (expression_completer): Likewise.
13452 * cp-support.c (make_symbol_overload_list_adl_namespace):
13453 Likewise.
13454 * darwin-nat-info.c (info_mach_region_command): Likewise.
13455 * dwarf2loc.c (entry_data_value_coerce_ref)
13456 (value_of_dwarf_reg_entry): Likewise.
13457 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13458 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13459 Likewise.
13460 * findvar.c (extract_typed_address, store_typed_address):
13461 Likewise.
13462 * gdbtypes.c (rank_one_type): Likewise.
13463 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13464 * infcall.c (value_arg_coerce): Likewise.
13465 * language.c (pointer_type): Likewise.
13466 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13467 Likewise.
13468 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13469 * mn10300-tdep.c (mn10300_type_align): Likewise.
13470 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13471 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13472 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13473 Likewise.
13474 * printcmd.c (print_formatted, x_command): Likewise.
13475 * python/py-type.c (typy_get_composite, typy_template_argument):
13476 Likewise.
13477 * python/py-value.c (valpy_referenced_value)
13478 (valpy_get_dynamic_type, value_has_field): Likewise.
13479 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13480 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13481 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13482 * spu-tdep.c (spu_scalar_value_p): Likewise.
13483 * symtab.c (lookup_symbol_aux): Likewise.
13484 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13485 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13486 Likewise.
13487 * valops.c (value_cast_pointers, value_cast)
13488 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13489 (value_struct_elt, value_struct_elt_bitpos)
13490 (value_find_oload_method_list, find_overload_match)
13491 (value_rtti_indirect_type): Likewise.
13492 * valprint.c (val_print_scalar_type_p, generic_val_print):
13493 Likewise.
13494 * value.c (value_actual_type, value_as_address, unpack_long)
13495 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13496 (coerce_ref): Likewise.
13497 * varobj.c (varobj_get_value_type): Likewise.
13498
3fcf899d
AV
134992017-03-20 Artemiy Volkov <artemiyv@acm.org>
13500
13501 PR gdb/14441
13502 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13503 table of constants.
13504 * python/lib/gdb/command/explore.py: Support exploring values
13505 of rvalue reference types.
13506 * python/lib/gdb/types.py: Implement get_basic_type() for
13507 rvalue reference types.
13508 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13509 constant.
13510 * python/py-value.c (valpy_getitem): Add an rvalue reference
13511 check.
13512 (valpy_reference_value): Add new parameter "refcode".
13513 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13514 New wrappers for valpy_reference_value().
13515 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13516 (gdbpy_invoke_xmethod): Likewise.
13517
4297a3f0
AV
135182017-03-20 Artemiy Volkov <artemiyv@acm.org>
13519
13520 PR gdb/14441
13521 * dwarf2read.c (process_die, read_type_die_1): Handle the
13522 DW_TAG_rvalue_reference_type DIE.
13523 (read_tag_reference_type): Add new parameter "refcode".
13524
e1cb3213
AV
135252017-03-20 Artemiy Volkov <artemiyv@acm.org>
13526
13527 PR gdb/14441
13528 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13529 (c_type_print_modifier, c_type_print_varspec_suffix)
13530 (c_type_print_base): Support printing rvalue reference types.
13531 * c-valprint.c (c_val_print, c_value_print): Support printing
13532 rvalue reference values.
13533
e4347c89
AV
135342017-03-20 Artemiy Volkov <artemiyv@acm.org>
13535
13536 PR gdb/14441
13537 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13538 typename.
13539 * cp-support.c (replace_typedefs): Handle
13540 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13541 * python/py-type.c (typy_lookup_type): Likewise.
13542
53cc15f5
AV
135432017-03-20 Artemiy Volkov <artemiyv@acm.org>
13544
13545 PR gdb/14441
13546 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13547 * parse.c (insert_type): Change assert statement.
13548 (follow_types): Handle rvalue reference types.
13549 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13550 constant.
13551
a65cfae5
AV
135522017-03-20 Artemiy Volkov <artemiyv@acm.org>
13553
13554 PR gdb/14441
13555 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13556 value_ref() interface.
13557 * c-valprint.c (c_value_print): Likewise.
13558 * infcall.c (value_arg_coerce): Likewise.
13559 * python/py-value.c (valpy_reference_value): Likewise.
13560 * valops.c (value_cast, value_reinterpret_cast)
13561 (value_dynamic_cast, typecmp): Likewise.
13562 (value_ref): Parameterize by kind of return value reference type.
13563 * value.h (value_ref): Add new parameter "refcode".
13564
3b224330
AV
135652017-03-20 Artemiy Volkov <artemiyv@acm.org>
13566
13567 PR gdb/14441
13568 * dwarf2read.c (read_tag_reference_type): Use
13569 lookup_lvalue_reference_type() instead of lookup_reference_type().
13570 * eval.c (evaluate_subexp_standard): Likewise.
13571 * f-exp.y: Likewise.
13572 * gdbtypes.c (make_reference_type, lookup_reference_type):
13573 Generalize with rvalue reference types.
13574 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13575 convenience wrappers for lookup_reference_type().
13576 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13577 reference kind parameter.
13578 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13579 wrappers for lookup_reference_type().
13580 * guile/scm-type.c (gdbscm_type_reference): Use
13581 lookup_lvalue_reference_type() instead of lookup_reference_type().
13582 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13583 * parse.c (follow_types): Likewise.
13584 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13585 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13586 Likewise.
13587 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13588 (gdbpy_invoke_xmethod): Likewise.
13589 * stabsread.c: Provide extra argument to make_reference_type()
13590 call.
13591 * valops.c (value_ref, value_rtti_indirect_type): Use
13592 lookup_lvalue_reference_type() instead of lookup_reference_type().
13593
f9aeb8d4
AV
135942017-03-20 Artemiy Volkov <artemiyv@acm.org>
13595
13596 PR gdb/14441
13597 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13598 (TYPE_IS_REFERENCE): New macro.
13599 (struct type): Add rvalue_reference_type field.
13600 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13601
51457a05
MAL
136022017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13603
13604 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13605 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13606 New function definition.
13607 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13608 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13609 New function declaration.
13610 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13611 * mi/mi-interp.h: New file.
13612 * solib.c (info_sharedlibrary_command): Replace for loop with
13613 ALL_SO_LIBS macro
13614 * solib.h (update_solib_list): New function declaration.
13615 (so_list_head): Move macro.
13616 * solist.h (ALL_SO_LIBS): New macro.
13617
e696b3ad
MAL
136182017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
13619
13620 * infcmd.c (post_create_inferior): Remove unused argument in
13621 call to solib_add.
13622 * remote.c (remote_start_remote): Likewise.
13623 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13624 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13625 (enable_break): Likewise.
13626 * solib.c (update_solib_list): Remove unused target argument
13627 and its documentation.
13628 (solib_add): Remove unused target argument. Remove unused
13629 argument in call to update_solib_list.
13630 (info_sharedlibrary_command): Remove unused argument in call
13631 to update_solib_list.
13632 (sharedlibrary_command): Remove unused argument in call to
13633 solib_add.
13634 (handle_solib_event): Likewise.
13635 (reload_shared_libraries): Likewise.
13636 * solib.h (solib_add): Remove unused target argument.
13637
dcb84eda
AA
136382017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
13639
13640 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13641 (s390_displaced_step_fixup): Cover relative branches with the
13642 default fixup handling. This fixes lack of support for some
13643 relative branch instructions.
13644
d9cb6cdc
SM
136452017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13646
13647 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13648 ptid from regcache.
13649
1afaf9f4
SM
136502017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13651
13652 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13653 i386_darwin_store_inferior_registers): Use ptid from regcache.
13654
aac12e24
SM
136552017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13656
13657 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13658 i386bsd_store_inferior_registers): Use ptid from regcache.
13659
bbe1eef1
SM
136602017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13661
13662 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13663 hppaobsd_store_registers): Use ptid from regcache.
13664
10799020
SM
136652017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13666
13667 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13668 hppanbsd_store_registers): Use ptid from regcache.
13669
00204cf7
SM
136702017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13671
13672 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13673 from regcache. Use get_ptrace_pid.
13674
11a33714
SM
136752017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13676
13677 * corelow.c (get_core_register_section): Use ptid from regcache,
13678 update doc.
13679
317cd492
SM
136802017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13681
13682 * bsd-uthread.c (bsd_uthread_fetch_registers,
13683 bsd_uthread_store_registers): Use ptid from regcache, set and
13684 restore inferior_ptid.
13685
9ac8a7c2
SM
136862017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13687
13688 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13689 fetch_fp_regs, store_register, store_regs, store_fp_register,
13690 store_fp_regs): Use ptid from regcache.
13691
4ac4bb6a
SM
136922017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
13693
13694 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13695 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13696 store_vfp_regs): Use ptid from regcache.
13697
9bcbdca8
PA
136982017-03-17 Pedro Alves <palves@redhat.com>
13699
13700 PR remote/21188
13701 * ser-base.c (ser_base_wait_for): Add comment.
13702 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13703 version.
13704 * ser-unix.c (hardwire_raw): Remove reference to
13705 scb->current_timeout.
13706 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13707 (hardwire_ops): Install ser_base_readchar instead of
13708 hardwire_readchar.
13709 * serial.h (struct serial) <current_timeout, timeout_remaining>:
13710 Remove fields.
13711
7503099f
JG
137122017-03-17 Jonah Graham <jonah@kichwacoders.com>
13713
13714 PR gdb/19637
13715 * python/lib/gdb/printer/bound_registers.py: Add support for
13716 Python 3.
13717
7942e96e
AA
137182017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
13719
13720 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13721 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13722 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13723 byte_offset to subobj_byte_offset. Fix the handling of
13724 DWARF_VALUE_STACK on big-endian targets when coming via an
13725 implicit pointer.
13726 (dwarf2_evaluate_loc_desc): Adjust call to
13727 dwarf2_evaluate_loc_desc_full.
13728 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13729 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13730
ba14f379
YQ
137312017-03-16 Yao Qi <yao.qi@linaro.org>
13732
13733 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13734 and REVSH instructions.
13735
b121eeb9
YQ
137362017-03-16 Yao Qi <yao.qi@linaro.org>
13737
13738 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13739 (arm_record_test): Declare.
13740 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13741 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13742 align with the manual.
13743 (thumb_record_misc): Adjust the code order to align with the
13744 manual.
13745 (thumb2_record_decode_insn_handler): Fix instruction matching.
13746 (instruction_reader_thumb): New class.
13747 (arm_record_test): New function.
13748
728a7913
YQ
137492017-03-16 Yao Qi <yao.qi@linaro.org>
13750
13751 * arm-tdep.c (abstract_memory_reader): New class.
13752 (instruction_reader): New class.
13753 (extract_arm_insn): Add argument 'reader'. Callers updated.
13754 (decode_insn): Likewise.
13755
34b43320
DE
137562017-03-16 Doug Evans <dje@google.com>
13757
a7c0469f
DE
13758 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13759 member. Change type of TYPE member to SCM. All uses updated.
13760 (lsscm_make_lazy_string_smob): Add assert.
13761 (lsscm_make_lazy_string): Flag bad length values.
13762 (lsscm_elt_type): New function.
13763 (gdbscm_lazy_string_to_value): Rewrite to use
13764 lsscm_safe_lazy_string_to_value.
13765 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13766 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13767 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
13768 in incoming type.
13769 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13770 * guile/scm-type.c (tyscm_scm_to_type): New function.
13771
137722017-03-15 Doug Evans <dje@google.com>
13773
34b43320
DE
13774 PR python/17728, python/18439, python/18779
13775 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13776 member. Change type of TYPE member to PyObject *. All uses updated.
13777 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13778 (gdbpy_create_lazy_string_object): Flag bad length values.
13779 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13780 Handle typedefs in incoming type.
13781 (stpy_lazy_string_elt_type): New function.
13782 (gdbpy_extract_lazy_string): Call it.
13783 * python/py-value.c (valpy_lazy_string): Flag bad length values.
13784 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
13785 typedefs in incoming type.
13786
a3a5fecc
DE
137872017-03-16 Doug Evans <dje@google.com>
13788
13789 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13790 * guile/scm-type.c (tyscm_scm_to_type): New function.
13791
28f1c605
JW
137922017-03-16 Jiong Wang <jiong.wang@arm.com>
13793
13794 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13795 "ULONGEST" for "skip".
13796
87c336f6
AA
137972017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13798
13799 PR gdb/21220
13800 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13801 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13802 (inf_ptrace_peek_poke): ...here. New function. Now also loop
13803 over ptrace peek/poke until end of buffer or error.
13804
cf81cf60
SM
138052017-03-14 Simon Marchi <simon.marchi@ericsson.com>
13806
13807 * parse.c (length_of_subexp): Make static.
13808 * parser-defs.h (length_of_subexp): Remove.
13809
a379284a
AA
138102017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
13811
13812 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13813 as well.
13814
8a6200ba
PA
138152017-03-14 Pedro Alves <palves@redhat.com>
13816
13817 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13818 (main): Use std::unique_ptr. Remove calls to
13819 cp_demangled_name_parse_free.
13820
f79ec206
SM
138212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13822
13823 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13824 alphabsd_store_inferior_registers): Use regcache->ptid instead
13825 of inferior_ptid.
13826
edb5fb00
SM
138272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13828
13829 * aix-thread.c (aix_thread_fetch_registers,
13830 aix_thread_store_registers): Use regcache->ptid instead of
13831 inferior_ptid.
13832
55119686
SM
138332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13834
13835 * aarch64-linux-nat.c (fetch_gregs_from_thread,
13836 store_gregs_to_thread, fetch_fpregs_from_thread,
13837 store_fpregs_to_thread): Use regcache->ptid instead of
13838 inferior_ptid.
13839
6a06fbb7
SM
138402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13841
13842 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13843 amd64_linux_fetch_inferior_registers): Use regcache->ptid
13844 instead of inferior_ptid.
13845
c6386875
SM
138462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13847
13848 * target.c (target_fetch_registers, target_store_registers): Add
13849 assert.
13850
ddaaf0fb
SM
138512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
13852
13853 * regcache.h (regcache_get_ptid): New function.
13854 * regcache.c (regcache_get_ptid): New function.
13855
b9da89d1 138562017-03-13 Mark Wielaard <mark@klomp.org>
13857
13858 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13859
5f4d1085
KS
138602017-03-10 Keith Seitz <keiths@redhat.com>
13861
13862 PR c++/8218
13863 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13864
c65d6b55
PA
138652017-03-08 Pedro Alves <palves@redhat.com>
13866
13867 PR gdb/18360
13868 * infrun.c (start_step_over, do_target_resume, resume)
13869 (restart_threads): Assert we're not resuming a thread that is
13870 meant to be stopped.
13871 (infrun_thread_stop_requested_callback): Delete.
13872 (infrun_thread_stop_requested): If the thread is internally
13873 stopped, queue a pending stop event and clear the thread's
13874 inline-frame state.
13875 (handle_stop_requested): New function.
13876 (handle_syscall_event, handle_inferior_event_1): Use
13877 handle_stop_requested.
13878 (handle_stop_requested): New function.
13879 (handle_signal_stop): Set the thread's stop_signal here instead of
13880 at caller.
13881 (finish_step_over): Clear step over info unconditionally.
13882 (handle_signal_stop): If the user had interrupted the event
13883 thread, consider the stop a random signal.
13884 (handle_signal_stop) <signal arrived while stepping over
13885 breakpoint>: Don't restart threads here.
13886 (stop_waiting): Don't clear step-over info here.
13887
15c22686
PA
138882017-03-08 Pedro Alves <palves@redhat.com>
13889
13890 PR 21206
13891 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13892 goes to argument 2, not 1.
13893
6e5d74e7
PA
138942017-03-08 Pedro Alves <palves@redhat.com>
13895
13896 PR cli/21218
13897 * top.c (gdb_readline_wrapper): Avoid passing NULL to
13898 display_gdb_prompt.
13899 (command_line_input): Add comment.
13900
9753a2f6
PA
139012017-03-08 Pedro Alves <palves@redhat.com>
13902
13903 PR tui/21216
13904 * tui/tui-file.c (tui_file::write): New.
13905 * tui/tui-file.h (tui_file): Override "write".
13906 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13907 factored out from ...
13908 (tui_puts): ... here.
13909 (tui_putc): Use them.
13910 (tui_write): New function.
13911 * tui/tui-io.h (tui_write): Declare.
13912
1672e0d9
SDJ
139132017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13914
13915 * Makefile.in (SFILES): Replace "environ.c" with
13916 "common/environ.c".
13917 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13918 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13919 to...
13920 * common/environ.c: ... here.
13921 * environ.h: Moved to...
13922 * common/environ.h: ... here.
13923
f7bb4e3a
PB
139242017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13925
13926 * gdbarch.sh (pstring_ptr): New static function.
13927 (gdbarch_disassembler_options): Use it.
13928 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13929 not valid_disassembler_option->name.
13930 * gdbarch.c: Regenerate.
13931
e45ced6c
PB
139322017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13933
13934 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13935
5f6fd321
PA
139362017-03-07 Pedro Alves <palves@redhat.com>
13937
13938 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13939
6dbb839a 139402017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
13941
13942 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13943 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13944 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 13945 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 13946
d274ecf4
SM
139472017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13948
13949 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13950
df97be55
SM
139512017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13952
13953 * remote.c (remote_add_target_side_commands): Use range-based
13954 for loop.
13955
7d45f3df
YQ
139562017-03-03 Yao Qi <yao.qi@linaro.org>
13957
13958 PR gdb/21165
13959 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13960 value is lazy.
13961 * valprint.c (common_val_print): Likewise.
13962
65b48a81
PB
139632017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13964
13965 * NEWS: Mention new set/show disassembler-options commands.
13966 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13967 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13968 (prospective_options): New static variable.
13969 (gdb_disassembler::gdb_disassembler): Initialize
13970 m_di.disassembler_options.
13971 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13972 (get_disassembler_options): New function.
13973 (set_disassembler_options): Likewise.
13974 (set_disassembler_options_sfunc): Likewise.
13975 (show_disassembler_options_sfunc): Likewise.
13976 (disassembler_options_completer): Likewise.
13977 (_initialize_disasm): Likewise.
13978 * disasm.h (get_disassembler_options): New prototype.
13979 (set_disassembler_options): Likewise.
13980 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13981 (gdbarch_verify_disassembler_options): Likewise.
13982 * gdbarch.c: Regenerate.
13983 * gdbarch.h: Likewise.
13984 * arm-tdep.c (num_disassembly_options): Delete.
13985 (set_disassembly_style): Likewise.
13986 (arm_disassembler_options): New static variable.
13987 (set_disassembly_style_sfunc): Convert short style name into long
13988 option name. Call set_disassembler_options.
13989 (show_disassembly_style_sfunc): New function.
13990 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13991 set_gdbarch_verify_disassembler_options.
13992 (_initialize_arm_tdep): Delete regnames variable and update callers.
13993 (arm_disassembler_options): Initialize.
13994 (disasm_options): New variable.
13995 (num_disassembly_options): Rename from this...
13996 (num_disassembly_styles): ...to this. Compute by scanning through
13997 disasm_options.
13998 (valid_disassembly_styles): Initialize using disasm_options.
13999 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14000 set_arm_regname_option.
14001 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14002 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14003 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14004 set_gdbarch_verify_disassembler_options.
14005 * s390-tdep.c (s390_disassembler_options): New static variable.
14006 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14007 set_gdbarch_verify_disassembler_options.
14008
d538e36d
SM
140092017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14010
14011 * remote.c (remote_add_target_side_condition): Remove "struct"
14012 keyword from range-based for loop.
14013
83621223
SM
140142017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14015
14016 * remote.c (remote_add_target_side_condition): Use range-based
14017 for loop. Update comment.
14018
2123df0e
YQ
140192017-02-27 Yao Qi <yao.qi@linaro.org>
14020
14021 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14022
8e368124
AH
140232017-02-26 Alan Hayward <alan.hayward@arm.com>
14024
14025 * regcache.c (regcache_raw_update): New function.
14026 (regcache_raw_read): Move code to regcache_raw_update.
14027 * regcache.h (regcache_raw_update): New declaration.
14028 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14029
a49dd8dd
JK
140302017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14031
14032 * dwarf2read.c (create_debug_type_hash_table): Initialize
14033 header.signature and header.type_offset_in_tu.
14034
34e4bae9
PA
140352017-02-24 Pedro Alves <palves@redhat.com>
14036
14037 * symtab.c (make_file_symbol_completion_list_1): Use
14038 add_symtab_completions.
14039
b0e4b369
AH
140402017-02-24 Alan Hayward <alan.hayward@arm.com>
14041
14042 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14043
975c21ab
AH
140442017-02-24 Alan Hayward <alan.hayward@arm.com>
14045
14046 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14047 I386_MAX_REGISTER_SIZE.
14048 (i386_pseudo_register_write): Likewise.
14049 (i386_process_record): Likewise.
14050 * i387-tdep.c (i387_supply_xsave): Likewise.
14051 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14052 (store_register): Likewise.
14053
14bc53a8
PA
140542017-02-23 Pedro Alves <palves@redhat.com>
14055
14056 * ada-lang.c: Include "common/function-view.h".
14057 (ada_iterate_over_symbols): Adjust to use function_view as
14058 callback type.
14059 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14060 (ada_make_symbol_completion_list): Use a lambda.
14061 (ada_exc_search_name_matches): Delete.
14062 (name_matches_regex): New.
14063 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14064 * compile/compile-c-support.c: Include "common/function-view.h".
14065 (print_one_macro): Change prototype to accept a ui_file pointer.
14066 (write_macro_definitions): Use a lambda.
14067 * dwarf2read.c: Include "common/function-view.h".
14068 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14069 (dw2_expand_symtabs_matching): Adjust to use function_view as
14070 callback type.
14071 * language.h: Include "common/function-view.h".
14072 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14073 function_view as callback type.
14074 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14075 * linespec.c: Include "common/function-view.h".
14076 (collect_info::add_symbol): New method.
14077 (struct symbol_and_data_callback, iterate_inline_only, struct
14078 symbol_matcher_data, iterate_name_matcher): Delete.
14079 (iterate_over_all_matching_symtabs): Adjust to use function_view
14080 as callback type and lambdas.
14081 (iterate_over_file_blocks): Adjust to use function_view as
14082 callback type.
14083 (decode_compound_collector): Now a class with private fields.
14084 (decode_compound_collector::release_symbols): New method.
14085 (collect_one_symbol): Rename to...
14086 (decode_compound_collector::operator()): ... this and adjust.
14087 (lookup_prefix_sym): decode_compound_collector construction bits
14088 move to decode_compound_collector ctor. Pass the
14089 decode_compound_collector object directly as callback. Remove
14090 cleanups and use decode_compound_collector::release_symbols
14091 instead.
14092 (symtab_collector): Now a class with private fields.
14093 (symtab_collector::release_symtabs): New method.
14094 (add_symtabs_to_list): Rename to...
14095 (symtab_collector::operator()): ... this and adjust.
14096 (collect_symtabs_from_filename): symtab_collector construction
14097 bits move to symtab_collector ctor. Pass the symtab_collector
14098 object directly as callback. Remove cleanups and use
14099 symtab_collector::release_symtabs instead.
14100 (collect_symbols): Delete.
14101 (add_matching_symbols_to_info): Use lambdas.
14102 * macrocmd.c (print_macro_callback): Delete.
14103 (info_macro_command): Use a lambda.
14104 (info_macros_command): Pass print_macro_definition as callable
14105 directly.
14106 (print_one_macro): Remove 'ignore' parameter.
14107 (macro_list_command): Adjust.
14108 * macrotab.c (macro_for_each_data::fn): Now a function_view.
14109 (macro_for_each_data::user_data): Delete field.
14110 (foreach_macro): Adjust to call the function_view.
14111 (macro_for_each): Adjust to use function_view as callback type.
14112 (foreach_macro_in_scope): Adjust to call the function_view.
14113 (macro_for_each_in_scope): Adjust to use function_view as callback
14114 type.
14115 * macrotab.h: Include "common/function-view.h".
14116 (macro_callback_fn): Declare a prototype instead of a pointer.
14117 Remove "user_data" parameter.
14118 (macro_for_each, macro_for_each_in_scope): Adjust to use
14119 function_view as callback type.
14120 * psymtab.c (partial_map_expand_apply)
14121 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
14122 Adjust to use function_view as callback type and to return bool.
14123 (psym_expand_symtabs_matching): Adjust to use function_view as
14124 callback types.
14125 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
14126 to use function_view as callback type and to return bool.
14127 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
14128 callback types.
14129 * symfile.c (expand_symtabs_matching): Adjust to use function_view
14130 as callback types.
14131 * symfile.h: Include "common/function-view.h".
14132 (expand_symtabs_file_matcher_ftype)
14133 (expand_symtabs_symbol_matcher_ftype)
14134 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
14135 return bool.
14136 (quick_symbol_functions::map_symtabs_matching_filename)
14137 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
14138 function_view as callback type and return bool.
14139 (expand_symtabs_matching): Adjust to use function_view as callback
14140 type.
14141 (maintenance_expand_name_matcher)
14142 (maintenance_expand_file_matcher): Delete.
14143 (maintenance_expand_symtabs): Use lambdas.
14144 * symtab.c (iterate_over_some_symtabs): Adjust to use
14145 function_view as callback types and return bool.
14146 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
14147 of a cleanup.
14148 (lookup_symtab_callback): Delete.
14149 (lookup_symtab): Use a lambda.
14150 (iterate_over_symbols): Adjust to use function_view as callback
14151 type.
14152 (struct search_symbols_data, search_symbols_file_matches)
14153 (search_symbols_name_matches): Delete.
14154 (search_symbols): Use a pair of lambdas.
14155 (struct add_name_data, add_macro_name, symbol_completion_matcher)
14156 (symtab_expansion_callback): Delete.
14157 (default_make_symbol_completion_list_break_on_1): Use lambdas.
14158 * symtab.h: Include "common/function-view.h".
14159 (iterate_over_some_symtabs): Adjust to use function_view as
14160 callback type and return bool.
14161 (iterate_over_symtabs): Adjust to use function_view as callback
14162 type.
14163 (symbol_found_callback_ftype): Remove 'data' parameter and return
14164 bool.
14165 (iterate_over_symbols): Adjust to use function_view as callback
14166 type.
14167
07e253aa
PA
141682017-02-23 Pedro Alves <palves@redhat.com>
14169
14170 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
14171 (%.o) <unittests/%.c>: New pattern.
14172 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
14173 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
14174 * common/function-view.h: New file.
14175 * unittests/function-view-selftests.c: New file.
14176 * configure: Regenerate.
14177
8eaf5320
SM
141782017-02-23 Simon Marchi <simon.marchi@ericsson.com>
14179
14180 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
14181 inferior_ptid.
14182 * go32-nat.c (go32_thread_alive): Likewise.
14183
38768751
YQ
141842017-02-23 Yao Qi <yao.qi@linaro.org>
14185
14186 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
14187 delete.
14188
0a8beaba
YQ
141892017-02-23 Yao Qi <yao.qi@linaro.org>
14190
14191 * varobj.c (varobj_clear_saved_item): Use delete instead of
14192 xfree.
14193 (update_dynamic_varobj_children): Likewise.
14194
58fdfd2c
JK
141952017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14196
14197 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
14198
1b90b139
SM
141992017-02-21 Simon Marchi <simon.marchi@ericsson.com>
14200
14201 * common/enum-flags.h (enum_flags::enum_flags): Initialize
14202 m_enum_value to 0 in default constructor.
14203
2039d74e
EBM
142042017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
14205
14206 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14207 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14208 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14209 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14210 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14211 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14212 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14213 IS_STORE_CONDITIONAL_INSN.
14214
7814882a
JK
142152017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14216
14217 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14218
0ae60b63
JK
142192017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14220
14221 * NEWS (Changes since GDB 7.12): Add DWARF-5.
14222
0224619f
JK
142232017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14224
14225 * dwarf2read.c (skip_one_die, read_attribute_value)
14226 (dwarf2_const_value_attr, dump_die_shallow)
14227 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14228 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14229
0af92d60
JK
142302017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14231
14232 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14233 (dwarf_parse_macro_header): Accept DWARF version 5.
14234 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14235
216f72a1
JK
142362017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14237
14238 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14239 DW_AT_GNU_*.
14240 * common/common-exceptions.h (enum errors): Likewise.
14241 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14242 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14243 (dwarf_expr_context::execute_stack_op): Likewise.
14244 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14245 Likewise.
14246 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14247 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14248 (show_entry_values_debug, call_site_to_target_addr)
14249 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14250 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14251 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14252 (value_of_dwarf_block_entry, indirect_pieced_value)
14253 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14254 (disassemble_dwarf_expression): Likewise.
14255 * dwarf2read.c (process_die, inherit_abstract_dies)
14256 (read_call_site_scope): Likewise.
14257 * gdbtypes.h (struct func_type, struct call_site_parameter)
14258 (struct call_site): Likewise.
14259 * stack.c (read_frame_arg): Likewise.
14260 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14261
43988095
JK
142622017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14263
14264 * defs.h (read_unsigned_leb128): New declaration.
14265 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14266 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14267 (dwarf2_find_location_expression): Call also
14268 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
14269 * dwarf2loc.h (dwarf2_version): New declaration.
14270 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14271 rnglists.
14272 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14273 .debug_rnglists.
14274 (struct dwop_section_names): Add loclists_dwo.
14275 (dwop_section_names): Add .debug_loclists.dwo.
14276 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14277 (struct dwarf2_per_cu_data): Add dwarf_version.
14278 (struct dwo_sections): Add loclists.
14279 (struct attr_abbrev): Add implicit_const.
14280 (read_indirect_line_string): New declaration.
14281 (read_unsigned_leb128): Delete declaration.
14282 (rcuh_kind): New definition.
14283 (read_and_check_comp_unit_head): Change parameter
14284 is_debug_types_section to section_kind.
14285 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14286 (read_comp_unit_head): Change parameter abfd to section, add parameter
14287 section_kind. Handle DWARF-5.
14288 (error_check_comp_unit_head): Accept also DWARF version 5.
14289 (read_and_check_comp_unit_head): Change parameter
14290 is_debug_types_section to section_kind.
14291 (read_and_check_type_unit_head): Delete function.
14292 (read_abbrev_offset): Handle DWARF-5.
14293 (create_debug_type_hash_table): Add parameter section_kind. Process
14294 only DW_UT_type. Use signature and type_offset_in_tu from struct
14295 comp_unit_head.
14296 (create_debug_types_hash_table): Update create_debug_type_hash_table
14297 caller.
14298 (create_all_type_units): Call create_debug_type_hash_table.
14299 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14300 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14301 caller.
14302 (skip_one_die): Handle DW_FORM_implicit_const.
14303 (dwarf2_rnglists_process): New function.
14304 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14305 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14306 (read_attribute_value): Handle DW_FORM_implicit_const,
14307 DW_FORM_line_strp.
14308 (read_attribute): Handle DW_FORM_implicit_const.
14309 (read_indirect_string_at_offset_from): New function from
14310 read_indirect_string_at_offset.
14311 (read_indirect_string_at_offset): Call
14312 read_indirect_string_at_offset_from.
14313 (read_indirect_line_string_at_offset): New function.
14314 (read_indirect_string): New function comment.
14315 (read_indirect_line_string): New function.
14316 (read_unsigned_leb128): Make it global.
14317 (dwarf2_string_attr): Handle DWARF-5.
14318 (add_include_dir_stub, read_formatted_entries): New functions.
14319 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14320 Handle DWARF-5.
14321 (per_cu_header_read_in): Update read_comp_unit_head caller.
14322 (dwarf2_version): New function.
14323 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14324 rnglists.
14325 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14326 fields.
14327
22d2f3ab
JK
143282017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14329
14330 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14331
5f46c5a5
JK
143322017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14333
14334 * dwarf2read.c (dwarf2_ranges_process): New function from
14335 dwarf2_ranges_read.
14336 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14337 dwarf2_ranges_process.
14338
78d4d2c5
JK
143392017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
14340
14341 * dwarf2read.c (create_debug_type_hash_table): New function from
14342 create_debug_types_hash_table.
14343 (create_debug_types_hash_table): Call create_debug_type_hash_table.
14344 (create_all_type_units, open_and_init_dwo_file): Update
14345 create_debug_types_hash_table callers.
14346
1b076f25
SDJ
143472017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14348
14349 PR gdb/16188
14350 * fork-child.c (trace_start_error): Fix thinko. va_end should
14351 refer to 'ap', not 'args'.
14352
0db8980c
SDJ
143532017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
14354 Pedro Alves <palves@redhat.com>
14355
14356 PR gdb/16188
14357 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14358 calls succeeded.
14359 * fork-child.c (trace_start_error): New function.
14360 (trace_start_error_with_name): Likewise.
14361 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14362 * inf-ptrace.c (inf_ptrace_me): Likewise.
14363 * inferior.h (trace_start_error): New prototype.
14364 (trace_start_error_with_name): Likewise.
14365
99e8a4f9
SDJ
143662017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
14367
14368 PR gdb/21164
14369 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14370 NULL before using it.
14371 * symmisc.c (maintenance_print_symbols): Likewise.
14372 (maintenance_print_msymbols): Likewise.
14373
4e746bb6
TW
143742017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14375
14376 * NEWS: Add record Python bindings entry.
14377
143782017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14379
14380 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14381 py-record-full.o.
14382 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14383 * python/py-record-btrace.c, python/py-record-btrace.h,
14384 python/py-record-full.c, python/py-record-full.h: New file.
14385 * python/py-record.c: Add include for py-record-btrace.h and
14386 py-record-full.h.
14387 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14388 recpy_instruction_history, recpy_function_call_history, recpy_begin,
14389 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14390 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14391 New definition.
14392 (gdbpy_initialize_btrace): New export.
14393 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14394
143952017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14396
14397 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14398 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14399 * python/py-record.c: New file.
14400 * python/python-internal.h (gdbpy_start_recording,
14401 gdbpy_current_recording, gdpy_stop_recording,
14402 gdbpy_initialize_record): New export.
14403 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14404 (python_GdbMethods): Add gdbpy_start_recording,
14405 gdbpy_current_recording and gdbpy_stop_recording.
14406
144072017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14408
14409 * record-btrace.c (record_btrace_record_method): New function.
14410 (init_record_btrace_ops): Initialize to_record_method.
14411 * record-full.c (record_full_record_method): New function.
14412 (init_record_full_ops, init_record_full_core_ops): Add
14413 record_full_record_method.
14414 * record.h (enum record_method): New enum.
14415 * target-debug.h (target_debug_print_enum_record_method: New define.
14416 * target-delegates.c: Regenerate.
14417 * target.c (target_record_method): New function.
14418 * target.h: Include record.h.
14419 (struct target_ops) <to_record_method>: New field.
14420 (target_record_method): New export.
14421
144222017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14423
14424 * record.h (record_start, record_stop): New export.
14425 * record.c (record_start, record_stop): New function.
14426
144272017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14428
14429 * btrace.c (btrace_fetch): Copy function call segments pointer
14430 into a vector.
14431 (btrace_clear): Clear the vector.
14432 (btrace_find_insn_by_number): Use binary search to find the correct
14433 function call segment.
14434 * btrace.h (brace_fun_p): New typedef.
14435 (struct btrace_thread_info) <functions>: New field.
14436
144372017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14438
14439 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14440 * btrace.c (btrace_decode_error): ... here. New function.
14441 * btrace.h (btrace_decode_error): New export.
14442
144432017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
14444
14445 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14446 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14447 btrace_find_insn_by_number): Remove special case for gaps.
14448 * btrace.h (btrace_insn_get_error): New export.
14449 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14450 * record-btrace.c (btrace_insn_history): Print number for gaps.
14451 (record_btrace_info, record_btrace_goto): Handle gaps.
14452
3f77c769
TT
144532017-02-14 Tom Tromey <tom@tromey.com>
14454
14455 PR python/13598:
14456 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14457 event.
14458 * python/py-evts.c (gdbpy_initialize_py_events): Add
14459 before_prompt registry.
14460 * python/py-events.h (events_object) <before_prompt>: New field.
14461
4c2c7ac6
MM
144622017-02-14 Markus Metzger <markus.t.metzger@intel.com>
14463
14464 * btrace.c (ftrace_new_switch): Preserve up link and flags.
14465
5cf30ebf
LM
144662017-02-13 Luis Machado <lgustavo@codesourcery.com>
14467
14468 * symfile (_initialize_symfile): Add usage text to the load command's
14469 help text.
14470
26a06916
SM
144712017-02-10 Simon Marchi <simon.marchi@ericsson.com>
14472
14473 * utils.c (defaulted_query): Don't query on secondary UIs.
14474
0b145e37
TT
144752017-02-10 Tom Tromey <tom@tromey.com>
14476
14477 * rust-lang.c (rust_get_disr_info): Remove unused variable.
14478
2d8365c4
TT
144792017-02-10 Tom Tromey <tom@tromey.com>
14480
14481 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14482 "cleanup" local.
14483 * python/py-type.c (typy_legacy_template_argument): Remove
14484 unnecessary "cleanup" local.
14485
2bb8f231
TT
144862017-02-10 Tom Tromey <tom@tromey.com>
14487
14488 * python/python.c (do_start_initialization): New function, from
14489 _initialize_python.
14490 (_initialize_python): Call do_start_initialization.
14491 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14492 goto.
14493
1bdfaf42
TT
144942017-02-10 Tom Tromey <tom@tromey.com>
14495
14496 * python/py-prettyprint.c (pretty_print_one_value): Use
14497 gdbpy_ref.
14498
88b6faea
TT
144992017-02-10 Tom Tromey <tom@tromey.com>
14500
14501 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14502 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14503 gdbpy_ref.
14504 * python/py-type.c (field_new): Use gdbpy_ref.
14505 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14506 gdbpy_ref.
14507 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14508 (py_free_pspace): Likewise.
14509 (pspace_to_pspace_object): Likewise.
14510 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14511 (py_free_objfile): Likewise.
14512 (objfile_to_objfile_object): Likewise.
14513 * python/py-inferior.c (delete_thread_object): Use
14514 gdbpy_ref.
14515 (infpy_read_memory): Likewise.
14516 (py_free_inferior): Likewise.
14517 * python/py-evtregistry.c (create_eventregistry_object): Use
14518 gdbpy_ref.
14519 * python/py-event.c (create_event_object): Use gdbpy_ref.
14520
7780f186
TT
145212017-02-10 Tom Tromey <tom@tromey.com>
14522
14523 * python/py-ref.h (gdbpy_ref_policy): Now a template.
14524 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14525 used.
14526 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14527 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14528 python/py-exitedevent.c, python/py-finishbreakpoint.c,
14529 python/py-framefilter.c, python/py-function.c,
14530 python/py-inferior.c, python/py-infevents.c,
14531 python/py-linetable.c, python/py-newobjfileevent.c,
14532 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14533 python/py-signalevent.c, python/py-stopevent.c,
14534 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14535 python/py-unwind.c, python/py-utils.c, python/py-value.c,
14536 python/py-varobj.c, python/py-xmethods.c, python/python.c,
14537 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14538
d4b0bb18
TT
145392017-02-10 Tom Tromey <tom@tromey.com>
14540
14541 * ui-out.h (ui_out_emit_type): New class.
14542 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14543 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14544 and ui_out_emit_tuple.
14545 (enumerate_locals): Likewise.
14546 (py_mi_print_variables, py_print_locals, py_print_args): Use
14547 ui_out_emit_list.
14548 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14549 ui_out_emit_list.
14550 * common/gdb_optional.h: New file.
14551
f67f945c
MG
145522017-02-10 Martin Galvan <martingalvan@sourceware.org>
14553
14554 * MAINTAINERS (Write After Approval): Update my e-mail address.
14555
18da0c51
MG
145562017-02-10 Martin Galvan <martingalvan@sourceware.org>
14557
14558 PR gdb/21122
14559 * breakpoint.c (_initialize_breakpoint): Update the help description
14560 of the 'commands' command to indicate that it takes a list argument.
14561
62c14536
SM
145622017-02-09 Simon Marchi <simon.marchi@ericsson.com>
14563
14564 * interps.c (current_interp_set_logging): Remove "return".
14565
ff6fa247
GB
145662017-02-09 Gary Benson <gbenson@redhat.com>
14567
14568 * symtab.c (add_symtab_completions): Prevent NULL pointer
14569 dereference.
14570
a474bd8e
PA
145712017-02-08 Pedro Alves <palves@redhat.com>
14572
14573 * interps.c (interp::interp): Remove reference to quiet_p.
14574 (interp_set): Make static. Remove dead "Switching to" output
14575 code.
14576 (interp_quiet_p, interp_set_quiet): Delete.
14577 (interpreter_exec_cmd): Don't set the interpreter quiet.
14578 * interps.h (interp_quiet_p): Make static.
14579 (class interp) <quiet_p>: Remove field
14580
3d7b173c
JG
145812017-02-08 Jerome Guitton <guitton@adacore.com>
14582
604c4576
JG
14583 * cli/cli-decode.c (find_command_name_length): Make it extern.
14584 * cli/cli-decode.h (find_command_name_length): Declare.
14585 * cli/cli-script.c (command_name_equals, line_first_arg):
14586 New functions.
14587 (process_next_line): Use cli-decode to parse command names.
14588 (build_command_line): Make args a constant pointer.
14589
145902017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 14591
3d7b173c
JG
14592 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14593 Remove case-insensitive search.
14594
1291063d
JM
145952017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
14596
14597 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14598 at the end of the line. Avoids an ARI warning.
14599
20b477a7
LM
146002017-02-06 Luis Machado <lgustavo@codesourcery.com>
14601
14602 * NEWS: Mention support for record/replay of Intel 64 rdrand and
14603 rdseed instructions.
14604 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14605
3f7b46f2
IR
146062017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
14607
14608 PR tdep/20936
14609 Provide and use sparc32 and sparc64 target description XML files.
14610 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14611 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14612 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14613 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14614 * features/sparc/sparc32-solaris.xml: New file.
14615 * features/sparc/sparc64-solaris.xml: New file.
14616 * features/sparc/sparc32-solaris.c: Generated.
14617 * features/sparc/sparc64-solaris.c: Generated.
14618 * sparc-tdep.h: Account for differences in target descriptions.
14619 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14620 (sparc32_register_type): Use target provided registers.
14621 (validate_tdesc_registers): New function.
14622 (sparc32_gdbarch_init): Use tdesc_has_registers.
14623 Set pseudoregister functions.
14624 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14625 (sparc64_register_type): Use target provided registers.
14626 (sparc64_init_abi): Set pseudoregister functions.
14627
f0fd41c1
TT
146282017-02-03 Tom Tromey <tom@tromey.com>
14629
14630 PR rust/21097:
14631 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14632 with a single member.
14633
d6f9b0fb
PA
146342017-02-03 Pedro Alves <palves@redhat.com>
14635
14636 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14637 (cli_interp_base::~cli_interp_base): New.
14638 (cli_interp): New struct.
14639 (as_cli_interp): Cast the interp itself to cli_interp.
14640 (cli_interpreter_pre_command_loop): Rename to ...
14641 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
14642 parameter.
14643 (cli_interpreter_init): Rename to ...
14644 (cli_interp::init): ... this. Remove 'self' parameter. Use
14645 boolean. Make extern.
14646 (cli_interpreter_resume): Rename to ...
14647 (cli_interp::resume): ... this. Remove 'data' parameter. Make
14648 extern.
14649 (cli_interpreter_suspend): Rename to ...
14650 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
14651 extern.
14652 (cli_interpreter_exec): Rename to ...
14653 (cli_interp::exec): ... this. Remove 'data' parameter. Make
14654 extern.
14655 (cli_interpreter_supports_command_editing): Rename to ...
14656 (cli_interp_base::supports_command_editing): ... this. Remove
14657 'interp' parameter. Make extern.
14658 (cli_ui_out): Rename to ...
14659 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
14660 Make extern.
14661 (cli_set_logging): Rename to ...
14662 (cli_interp_base::set_logging): ... this. Remove 'interp'
14663 parameter. Make extern.
14664 (cli_interp_procs): Delete.
14665 (cli_interp_factory): Adjust to use "new".
14666 * cli/cli-interp.h: Include "interps.h".
14667 (struct cli_interp_base): New struct.
14668 * interps.c (struct interp): Delete. Fields moved to interps.h.
14669 (interp_new): Delete.
14670 (interp::interp, interp::~interp): New.
14671 (interp_set): Use bool, and return void. Assume the interpreter
14672 has suspend, init and resume methods, and that the all return
14673 void.
14674 (set_top_level_interpreter): interp_set returns void.
14675 (interp_ui_out): Adapt.
14676 (current_interp_set_logging): Adapt.
14677 (interp_data): Delete.
14678 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14679 (interp_exec): Adapt.
14680 (top_level_interpreter_data): Delete.
14681 * interps.h (interp_init_ftype, interp_resume_ftype)
14682 (interp_suspend_ftype, interp_exec_ftype)
14683 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14684 (class interp): New.
14685 (interp_new): Delete.
14686 (interp_set): Now returns void. Use bool.
14687 (interp_data, top_level_interpreter_data): Delete.
14688 * mi/mi-common.h: Include interps.h.
14689 (class mi_interp): Inherit from interp. Define a ctor. Declare
14690 init, resume, suspect, exec, interp_ui_out, set_logging and
14691 pre_command_loop methods.
14692 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14693 (mi_interpreter_init): Rename to ...
14694 (mi_interp::init): ... this. Remove the 'interp' parameter, use
14695 bool, return void and make extern. Adjust.
14696 (mi_interpreter_resume): ... Rename to ...
14697 (mi_interp::resume): ... this. Remove the 'data' parameter,
14698 return void and make extern. Adjust.
14699 (mi_interpreter_suspend): ... Rename to ...
14700 (mi_interp::suspend): ... this. Remove the 'data' parameter,
14701 return void and make extern. Adjust.
14702 (mi_interpreter_exec): ... Rename to ...
14703 (mi_interp::exec): ... this. Remove the 'data' parameter and make
14704 extern. Adjust.
14705 (mi_interpreter_pre_command_loop): ... Rename to ...
14706 (mi_interp::pre_command_loop): ... this. Remove the 'self'
14707 parameter and make extern.
14708 (mi_on_normal_stop_1): Adjust.
14709 (mi_ui_out): Rename to ...
14710 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
14711 parameter and make extern. Adjust.
14712 (mi_set_logging): Rename to ...
14713 (mi_interp::set_logging): ... this. Remove the 'interp'
14714 parameter and make extern. Adjust.
14715 (mi_interp_procs): Delete.
14716 (mi_interp_factory): Adjust to use 'new'.
14717 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14718 (mi_print_exception, mi_execute_command, mi_load_progress):
14719 Adjust.
14720 * tui/tui-interp.c (tui_interp): New class.
14721 (as_tui_interp): Return a tui_interp pointer.
14722 (tui_on_normal_stop, tui_on_signal_received)
14723 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14724 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14725 to use interp::interp_ui_out.
14726 (tui_init): Rename to ...
14727 (tui_interp::init): ... this. Remove the 'self' parameter, use
14728 bool, return void and make extern. Adjust.
14729 (tui_resume): Rename to ...
14730 (tui_interp::resume): ... this. Remove the 'data' parameter,
14731 return void and make extern. Adjust.
14732 (tui_suspend): Rename to ...
14733 (tui_interp::suspend): ... this. Remove the 'data' parameter,
14734 return void and make extern. Adjust.
14735 (tui_ui_out): Rename to ...
14736 (tui_interp::interp_ui_out): ... this. Remove the 'self'
14737 parameter, and make extern. Adjust.
14738 (tui_exec): Rename to ...
14739 (tui_interp::exec): ... this. Remove the 'data' parameter and
14740 make extern.
14741 (tui_interp_procs): Delete.
14742 (tui_interp_factory): Use "new".
14743
65c40c95
TT
147442017-02-02 Tom Tromey <tom@tromey.com>
14745
14746 * rust-exp.y (ends_raw_string, space_then_number)
14747 (rust_identifier_start_p): Return bool.
14748 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14749 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14750 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14751 (rust_chartype_p): Return bool.
14752 (val_print_struct, rust_print_struct_def, rust_print_type):
14753 Update.
14754 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14755 Return bool.
14756
b50f188d
TT
147572017-02-02 Tom Tromey <tom@tromey.com>
14758
14759 * rust-lang.c: Reindent.
14760
03c85b11
TT
147612017-02-02 Tom Tromey <tom@tromey.com>
14762
14763 * rust-lang.h (rust_crate_for_block): Update.
14764 * rust-lang.c (rust_crate_for_block): Return std::string.
14765 (rust_get_disr_info): Use std:;string, not
14766 gdb::unique_xmalloc_ptr.
14767 * rust-exp.y (crate_name): Update.
14768
9b6da501
PA
147692017-02-02 Pedro Alves <palves@redhat.com>
14770
14771 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14772 field out of gdb_disassembler_test and make it static.
14773
ec4cb20b
PA
147742017-02-02 Pedro Alves <palves@redhat.com>
14775
14776 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14777 mi1_interp and mi_interp fields.
14778
5be5dbf0
PA
147792017-02-02 Pedro Alves <palves@redhat.com>
14780
616268b6
PA
14781 * cli/cli-interp.c (struct saved_output_files, saved_output):
14782 Moved from cli/cli-logging.c.
14783 (cli_set_logging): New function.
14784 (cli_interp_procs): Install cli_set_logging.
14785 * cli/cli-interp.h (make_logging_output, cli_set_logging):
14786 Declare.
14787 * cli/cli-logging.c (struct saved_output_files, saved_output):
14788 Moved to cli/cli-interp.c.
14789 (pop_output_files): Don't save outputs here.
14790 (make_logging_output): New function.
14791 (handle_redirections): Don't build tee nor save previous outputs
14792 here.
14793 * interps.c (current_interp_set_logging): Change prototype.
14794 Assume there's always a set_logging_proc method installed.
14795 * interps.h (interp_set_logging_ftype): Change prototype.
14796 (current_interp_set_logging): Change prototype and adjust comment.
14797 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
14798 use make_logging_output.
14799 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
148002017-02-02 Pedro Alves <palves@redhat.com>
14801
5be5dbf0
PA
14802 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14803 from ...
14804 (set_logging_overwrite): ... here.
14805 (logging_no_redirect_file): Delete.
14806 (set_logging_redirect): Don't handle redirection on the fly.
14807 Instead warn that "logging off" / "logging on" is necessary.
14808 (pop_output_files): Delete references to logging_no_redirect_file.
14809 (show_logging_command): Always speak in terms of what will happen
14810 once logging is reenabled.
14811
c99cc448
PA
148122017-02-02 Pedro Alves <palves@redhat.com>
14813
14814 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14815
8b172ce7
PA
148162017-02-02 Pedro Alves <palves@redhat.com>
14817
14818 * disasm.c (gdb_pretty_print_insn): Rename to ...
14819 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14820 Remove gdbarch parameter. Adapt to clear the object's buffers
14821 instead of allocating new buffers, and to print using the object's
14822 gdb_disassembler instead of calling gdb_print_insn.
14823 (dump_insns): Use gdb_pretty_print_disassembler.
14824 * disasm.h (gdb_pretty_print_insn): Delete declaration.
14825 (gdb_pretty_print_disassembler): New class.
14826 * record-btrace.c (btrace_insn_history): Use
14827 gdb_pretty_print_disassembler.
14828
d7e74731
PA
148292017-02-02 Pedro Alves <palves@redhat.com>
14830
14831 * ada-lang.c (type_as_string): Use string_file.
14832 * ada-valprint.c (ada_print_floating): Use string_file.
14833 * ada-varobj.c (ada_varobj_scalar_image)
14834 (ada_varobj_get_value_image): Use string_file.
14835 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14836 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14837 * breakpoint.c (update_inserted_breakpoint_locations)
14838 (insert_breakpoint_locations, reattach_breakpoints)
14839 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14840 (print_it_watchpoint): Use string_file.
14841 (save_breakpoints): Use stdio_file.
14842 * c-exp.y (oper): Use string_file.
14843 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14844 tee_file.
14845 (pop_output_files): Use delete.
14846 (handle_redirections): Use stdio_file and tee_file.
14847 * cli/cli-setshow.c (do_show_command): Use string_file.
14848 * compile/compile-c-support.c (c_compute_program): Use
14849 string_file.
14850 * compile/compile-c-symbols.c (generate_vla_size): Take a
14851 'string_file &' instead of a 'ui_file *'.
14852 (generate_c_for_for_one_variable): Take a 'string_file &' instead
14853 of a 'ui_file *'. Use string_file.
14854 (generate_c_for_variable_locations): Take a 'string_file &'
14855 instead of a 'ui_file *'.
14856 * compile/compile-internal.h (generate_c_for_for_one_variable):
14857 Take a 'string_file &' instead of a 'ui_file *'.
14858 * compile/compile-loc2c.c (push, pushf, unary, binary)
14859 (print_label, pushf_register_address, pushf_register)
14860 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14861 'ui_file *'. Adjust.
14862 * compile/compile.c (compile_to_object): Use string_file.
14863 * compile/compile.h (compile_dwarf_expr_to_c)
14864 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14865 'ui_file *'.
14866 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14867 (replace_typedefs_qualified_name): Use string_file and
14868 obstack_copy0.
14869 * disasm.c (gdb_pretty_print_insn): Use string_file.
14870 (gdb_disassembly): Adjust reference the null_stream global.
14871 (do_ui_file_delete): Delete.
14872 (gdb_insn_length): Use null_stream.
14873 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14874 * dwarf2loc.c (dwarf2_compile_property_to_c)
14875 (locexpr_generate_c_location, loclist_generate_c_location): Take a
14876 'string_file &' instead of a 'ui_file *'.
14877 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14878 * dwarf2read.c (do_ui_file_peek_last): Delete.
14879 (dwarf2_compute_name): Use string_file.
14880 * event-top.c (gdb_setup_readline): Use stdio_file.
14881 * gdbarch.sh (verify_gdbarch): Use string_file.
14882 * gdbtypes.c (safe_parse_type): Use null_stream.
14883 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14884 string_file.
14885 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14886 'string_file *' instead of a 'ui_file *'.
14887 (gdbscm_arch_disassemble): Use string_file.
14888 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14889 * guile/scm-ports.c (class ioscm_file_port): Now a class that
14890 inherits from ui_file.
14891 (ioscm_file_port_delete, ioscm_file_port_rewind)
14892 (ioscm_file_port_put): Delete.
14893 (ioscm_file_port_write): Rename to ...
14894 (ioscm_file_port::write): ... this. Remove file_port_magic
14895 checks.
14896 (ioscm_file_port_new): Delete.
14897 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14898 ui_file_up.
14899 * guile/scm-type.c (tyscm_type_name): Use string_file.
14900 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14901 Use string_file.
14902 * infcmd.c (print_return_value_1): Use string_file.
14903 * infrun.c (print_target_wait_results): Use string_file.
14904 * language.c (add_language): Use string_file.
14905 * location.c (explicit_to_string_internal): Use string_file.
14906 * main.c (captured_main_1): Use null_file.
14907 * maint.c (maintenance_print_architecture): Use stdio_file.
14908 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14909 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14910 event_channel>: Change type to mi_console_file pointer.
14911 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14912 (mi_console_file_delete): Delete.
14913 (struct mi_console_file): Delete.
14914 (mi_console_file_magic): Delete.
14915 (mi_console_file_new): Delete.
14916 (mi_console_file::mi_console_file): New.
14917 (mi_console_file_delete): Delete.
14918 (mi_console_file_fputs): Delete.
14919 (mi_console_file::write): New.
14920 (mi_console_raw_packet): Delete.
14921 (mi_console_file::flush): New.
14922 (mi_console_file_flush): Delete.
14923 (mi_console_set_raw): Rename to ...
14924 (mi_console_file::set_raw): ... this.
14925 * mi/mi-console.h (class mi_console_file): New class.
14926 (mi_console_file_new, mi_console_set_raw): Delete.
14927 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14928 (mi_set_logging): Use delete and tee_file. Adjust.
14929 * mi/mi-main.c (output_register): Use string_file.
14930 (mi_cmd_data_evaluate_expression): Use string_file.
14931 (mi_cmd_data_read_memory): Use string_file.
14932 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14933 * mi/mi-out.c (mi_ui_out::main_stream): New.
14934 (mi_ui_out::rewind): Use main_stream and
14935 string_file.
14936 (mi_ui_out::put): Use main_stream and string_file.
14937 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14938 Allocate a 'string_file' instead.
14939 (mi_out_new): Don't allocate a mem_fileopen stream here.
14940 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14941 (mi_ui_out::main_stream): Declare method.
14942 * printcmd.c (eval_command): Use string_file.
14943 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14944 * python/py-arch.c (archpy_disassemble): Use string_file.
14945 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14946 * python/py-frame.c (frapy_str): Use string_file.
14947 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14948 Use string_file.
14949 * python/py-type.c (typy_str): Use string_file.
14950 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14951 * python/py-value.c (valpy_str): Use string_file.
14952 * record-btrace.c (btrace_insn_history): Use string_file.
14953 * regcache.c (regcache_print): Use stdio_file.
14954 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14955 * remote.c (escape_buffer): Use string_file.
14956 * rust-lang.c (rust_get_disr_info): Use string_file.
14957 * serial.c (serial_open_ops_1): Use stdio_file.
14958 (do_serial_close): Use delete.
14959 * stack.c (print_frame_arg): Use string_file.
14960 (print_frame_args): Remove local mem_fileopen stream, not used.
14961 (print_frame): Use string_file.
14962 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14963 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14964 Take a 'string_file *' instead of a 'ui_file *'.
14965 * top.c (new_ui): Use stdio_file and stderr_file.
14966 (free_ui): Use delete.
14967 (execute_command_to_string): Use string_file.
14968 (quit_confirm): Use string_file.
14969 * tracepoint.c (collection_list::append_exp): Use string_file.
14970 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14971 * tui/tui-file.c: Don't include "ui-file.h".
14972 (enum streamtype, struct tui_stream): Delete.
14973 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14974 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14975 (tui_file::tui_file): New method.
14976 (tui_file_fputs): Delete.
14977 (tui_file_get_strbuf): Delete.
14978 (tui_file::puts): New method.
14979 (tui_file_adjust_strbuf): Delete.
14980 (tui_file_flush): Delete.
14981 (tui_file::flush): New method.
14982 * tui/tui-file.h: Tweak intro comment.
14983 Include ui-file.h.
14984 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14985 (tui_file_adjust_strbuf): Delete declarations.
14986 (class tui_file): New class.
14987 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14988 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14989 (tui_register_format): Use string_stream.
14990 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14991 (tui_get_function_from_frame): Use string_file.
14992 * typeprint.c (type_to_string): Use string_file.
14993 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14994 (null_stream): New global.
14995 (ui_file_delete): Delete.
14996 (ui_file::ui_file): New.
14997 (null_file_isatty): Delete.
14998 (ui_file::~ui_file): New.
14999 (null_file_rewind): Delete.
15000 (ui_file::printf): New.
15001 (null_file_put): Delete.
15002 (null_file_flush): Delete.
15003 (ui_file::putstr): New.
15004 (null_file_write): Delete.
15005 (ui_file::putstrn): New.
15006 (null_file_read): Delete.
15007 (ui_file::putc): New.
15008 (null_file_fputs): Delete.
15009 (null_file_write_async_safe): Delete.
15010 (ui_file::vprintf): New.
15011 (null_file_delete): Delete.
15012 (null_file::write): New.
15013 (null_file_fseek): Delete.
15014 (null_file::puts): New.
15015 (ui_file_data): Delete.
15016 (null_file::write_async_safe): New.
15017 (gdb_flush, ui_file_isatty): Adjust.
15018 (ui_file_put, ui_file_rewind): Delete.
15019 (ui_file_write): Adjust.
15020 (ui_file_write_for_put): Delete.
15021 (ui_file_write_async_safe, ui_file_read): Adjust.
15022 (ui_file_fseek): Delete.
15023 (fputs_unfiltered): Adjust.
15024 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15025 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15026 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15027 (set_ui_file_data): Delete.
15028 (string_file::~string_file, string_file::write)
15029 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15030 (do_ui_file_as_string, ui_file_as_string): Delete.
15031 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15032 (struct mem_file): Delete.
15033 (mem_file_new): Delete.
15034 (stdio_file::stdio_file): New.
15035 (mem_file_delete): Delete.
15036 (stdio_file::stdio_file): New.
15037 (mem_fileopen): Delete.
15038 (stdio_file::~stdio_file): New.
15039 (mem_file_rewind): Delete.
15040 (stdio_file::set_stream): New.
15041 (mem_file_put): Delete.
15042 (stdio_file::open): New.
15043 (mem_file_write): Delete.
15044 (stdio_file_magic, struct stdio_file): Delete.
15045 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15046 (stdio_file::flush): New.
15047 (stdio_file_read): Rename to ...
15048 (stdio_file::read): ... this. Adjust.
15049 (stdio_file_write): Rename to ...
15050 (stdio_file::write): ... this. Adjust.
15051 (stdio_file_write_async_safe): Rename to ...
15052 (stdio_file::write_async_safe) ... this. Adjust.
15053 (stdio_file_fputs): Rename to ...
15054 (stdio_file::puts) ... this. Adjust.
15055 (stdio_file_isatty): Delete.
15056 (stdio_file_fseek): Delete.
15057 (stdio_file::isatty): New.
15058 (stderr_file_write): Rename to ...
15059 (stderr_file::write) ... this. Adjust.
15060 (stderr_file_fputs): Rename to ...
15061 (stderr_file::puts) ... this. Adjust.
15062 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15063 (stderr_file::stderr_file): New.
15064 (tee_file_magic): Delete.
15065 (struct tee_file): Delete.
15066 (tee_file::tee_file): New.
15067 (tee_file_new): Delete.
15068 (tee_file::~tee_file): New.
15069 (tee_file_delete): Delete.
15070 (tee_file_flush): Rename to ...
15071 (tee_file::flush): ... this. Adjust.
15072 (tee_file_write): Rename to ...
15073 (tee_file::write): ... this. Adjust.
15074 (tee_file::write_async_safe): New.
15075 (tee_file_fputs): Rename to ...
15076 (tee_file::puts): ... this. Adjust.
15077 (tee_file_isatty): Rename to ...
15078 (tee_file::isatty): ... this. Adjust.
15079 * ui-file.h (struct obstack, struct ui_file): Don't
15080 forward-declare.
15081 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15082 (ui_file_write_ftype)
15083 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15084 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
15085 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
15086 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
15087 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
15088 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
15089 (set_ui_file_fseek): Delete.
15090 (ui_file_data, ui_file_delete, ui_file_rewind)
15091 (struct ui_file): New.
15092 (ui_file_up): New.
15093 (class null_file): New.
15094 (null_stream): Declare.
15095 (ui_file_write_for_put, ui_file_put): Delete.
15096 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
15097 Delete.
15098 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
15099 (gdb_fopen, tee_file_new): Delete.
15100 (struct string_file): New.
15101 (struct stdio_file): New.
15102 (stdio_file_up): New.
15103 (struct stderr_file): New.
15104 (class tee_file): New.
15105 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
15106 of a 'ui_file *'. Adjust.
15107 * ui-out.h (class ui_out) <field_stream>: Likewise.
15108 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
15109 (null_stream): Delete.
15110 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
15111 Adjust.
15112 * utils.h (struct ui_file): Delete forward declaration..
15113 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
15114 (error_stream): Take a 'string_file &' instead of a
15115 'ui_file *'.
15116 * varobj.c (varobj_value_get_print_value): Use string_file.
15117 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
15118 * gdbarch.c: Regenerate.
15119
187808b0
PA
151202017-02-02 Pedro Alves <palves@redhat.com>
15121
15122 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
15123 (gdb_pretty_print_insn): ... this. Now a free function. Add back
15124 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
15125 Adjust to call gdb_print_insn instead of
15126 gdb_disassembler::print_insn.
15127 (dump_insns, do_mixed_source_and_assembly_deprecated)
15128 (do_mixed_source_and_assembly, do_assembly_only): Add back a
15129 'gdbarch' parameter. Remove gdb_disassembler parameter.
15130 (gdb_disassembly): Don't allocate a gdb_disassembler here.
15131 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
15132 declaration.
15133 (gdb_pretty_print_insn): Re-add declaration.
15134 * record-btrace.c (btrace_insn_history): Don't allocate a
15135 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
15136
7a8eb317
SM
151372017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
15138
15139 * disasm.h (gdb_disassembly): Remove file_string parameter.
15140 * disasm.c (gdb_disassembly): Likewise.
15141 * cli/cli-cmds.c (print_disassembly): Adapt.
15142 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
15143 * stack.c (do_gdb_disassembly): Likewise.
15144
7346ef59
AA
151452017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
15146
15147 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
15148 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
15149 targets. And if the implicit value is longer than needed, extract
15150 the first bytes instead of the "least significant" ones.
15151
cd4007e4
MM
151522017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15153
15154 * btrace.c (btrace_enable): Do not call btrace_add_pc for
15155 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
15156 (btrace_fetch): Assert can_access_registers_ptid.
15157 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
15158 validate_registers_access.
15159
cf77c34e
MM
151602017-02-01 Markus Metzger <markus.t.metzger@intel.com>
15161
15162 * gdbthread.h (can_access_registers_ptid): New.
15163 * thread.c (can_access_registers_ptid): New.
15164
be85ce7d
PA
151652017-02-01 Pedro Alves <palves@redhat.com>
15166
15167 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
15168
29b0b251
PA
151692017-01-31 Pedro Alves <palves@redhat.com>
15170
15171 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
15172 Fix typos.
15173
289b5b24
PA
151742017-01-31 Pedro Alves <palves@redhat.com>
15175
15176 * stack.c (print_frame_args): Remove local mem_fileopen stream,
15177 not used.
15178
b47413b4
PA
151792017-01-31 Pedro Alves <palves@redhat.com>
15180
15181 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
15182
60adb36c
PA
151832017-01-31 Pedro Alves <palves@redhat.com>
15184
15185 * common/scoped_restore.h
15186 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
15187 change the value's parameter type to T2.
15188 (make_scoped_restore): Likewise.
15189
2735833d
WT
151902017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15191 Richard Henderson <rth@redhat.com>
15192
15193 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
15194 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
15195 GS_BASE for older kernels.
15196 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
15197 GS_BASE for older kernels.
15198 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15199 and GS_BASE to the offset table.
15200 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15201 system register group.
15202 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15203 for older kernels.
15204 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15205 amd64 ABI.
15206 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15207 AMD64_GSBASE_REGNUM.
15208 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15209 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15210 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15211 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15212 i386/64bit-segments.xml in those rules.
15213 * features/i386/64bit-segments.xml: New file.
15214 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15215 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15216 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15217 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15218 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15219 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15220 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15221 * features/i386/amd64-avx-linux.c: Regenerated.
15222 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15223 * features/i386/amd64-avx-mpx.c: Regenerated.
15224 * features/i386/amd64-avx512-linux.c: Regenerated.
15225 * features/i386/amd64-linux.c: Regenerated.
15226 * features/i386/amd64-mpx-linux.c: Regenerated.
15227 * features/i386/i386-avx-mpx-linux.c: Regenerated.
15228 * features/i386/i386-avx-mpx.c: Regenerated.
15229 * features/i386/x32-avx-linux.c: Regenerated.
15230 * features/i386/x32-avx512-linux.c: Regenerated.
15231 * regformats/i386/amd64-avx-linux.dat: Regenerated.
15232 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15233 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15234 * regformats/i386/amd64-linux.dat: Regenerated.
15235 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15236 * regformats/i386/x32-avx-linux.dat: Regenerated.
15237 * regformats/i386/x32-avx512-linux.dat: Regenerated.
15238 * regformats/i386/x32-linux.dat: Regenerated.
15239
8884e97e
WT
152402017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15241
15242 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15243 Set to AMD64_NUM_REGS.
15244
7005d26a
WT
152452017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
15246
15247 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15248 that checks validity of a register number.
15249
4bd2e1b2
KC
152502017-01-27 Kees Cook <keescook@google.com>
15251
15252 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15253 fetch_fpregs if target has fpa registers.
15254 (arm_linux_store_inferior_registers): Call store_fpregs if target
15255 has fpa registers.
15256
7cf1de6c
AA
152572017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
15258
15259 * cris-tdep.c (cris_gdbarch_init): Remove check for
15260 info.byte_order and force it to BFD_ENDIAN_LITTLE.
15261
874a1c8c
AT
152622017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
15263
15264 * corelow.c (get_core_register_section): Check for regset
15265 existence before checking for REGSET_VARIABLE_SIZE.
15266
d8b49cf0
YQ
152672017-01-26 Yao Qi <yao.qi@linaro.org>
15268 Pedro Alves <palves@redhat.com>
15269
15270 PR gdb/20939
15271 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15272 call memory_error, save memaddr instead.
15273 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15274 negative, cal memory_error.
15275 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15276
658ca58c
YQ
152772017-01-26 Yao Qi <yao.qi@linaro.org>
15278
15279 * disasm-selftests.c (memory_error_test): New function.
15280 (_initialize_disasm_selftests): Register memory_error_test.
15281
79843d45
YQ
152822017-01-26 Yao Qi <yao.qi@linaro.org>
15283
15284 * Makefile.in (SFILES): Add disasm-selftests.c and
15285 selftest-arch.c.
15286 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15287 * disasm-selftests.c: New file.
15288 * selftest-arch.c: New file.
15289 * selftest-arch.h: New file.
15290
8cafda32
YQ
152912017-01-26 Yao Qi <yao.qi@linaro.org>
15292
15293 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15294 to bfd_arch_mep. Don't return 0 if section is not
15295 found. Call print_insn_mep.
15296
e47ad6c0
YQ
152972017-01-26 Pedro Alves <palves@redhat.com>
15298 Yao Qi <yao.qi@linaro.org>
15299
15300 * arm-tdep.c: Include "disasm.h".
15301 (gdb_print_insn_arm): Update code to get gdbarch.
15302 * disasm.c (dis_asm_read_memory): Change it to
15303 gdb_disassembler::dis_asm_read_memory.
15304 (dis_asm_memory_error): Likewise.
15305 (dis_asm_print_address): Likewise.
15306 (gdb_pretty_print_insn): Change it to
15307 gdb_disassembler::pretty_print_insn.
15308 (dump_insns): Add one argument gdb_disassemlber. All
15309 callers updated.
15310 (do_mixed_source_and_assembly_deprecated): Likewise.
15311 (do_mixed_source_and_assembly): Likewise.
15312 (do_assembly_only): Likewise.
15313 (gdb_disassembler::gdb_disassembler): New.
15314 (gdb_disassembler::print_insn): New.
15315 * disasm.h (class gdb_disassembler): New.
15316 (gdb_pretty_print_insn): Remove declaration.
15317 (gdb_disassemble_info): Likewise.
15318 * guile/scm-disasm.c (class gdbscm_disassembler): New.
15319 (gdbscm_disasm_read_memory_worker): Update.
15320 (gdbscm_disasm_read_memory): Update.
15321 (gdbscm_disasm_memory_error): Remove.
15322 (gdbscm_disasm_print_address): Remove.
15323 (gdbscm_disassembler::gdbscm_disassembler): New.
15324 (gdbscm_print_insn_from_port): Update.
15325 * mips-tdep.c: Include disasm.h.
15326 (gdb_print_insn_mips): Update code to get gdbarch.
15327 * record-btrace.c (btrace_insn_history): Update.
15328 * spu-tdep.c: Include disasm.h.
15329 (struct spu_dis_asm_data): Remove.
15330 (struct spu_dis_asm_info): New.
15331 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15332 SPU id.
15333 (gdb_print_insn_spu): Cast disassemble_info to
15334 spu_dis_asm_info.
15335
80d75874
YQ
153362017-01-26 Yao Qi <yao.qi@linaro.org>
15337
15338 * disasm.c (do_ui_file_delete): Delete.
15339 (gdb_insn_length): Move code creating stream to ...
15340 * utils.c (null_stream): ... here. New function.
15341 * utils.h (null_stream): Declare.
15342
60685cd0
SM
153432017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
15344
15345 * python/py-inferior.c (find_thread_object): Return directly
15346 from the loop. Remove "found" variable.
15347
eb1cdb62
JB
153482017-01-21 Joel Brobecker <brobecker@adacore.com>
15349
15350 GDB 7.12.1 released.
15351
b1ce6568
SM
153522017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15353
15354 * python/py-function.c (fnpy_call): Reorder declarations to have
15355 the gdbpy_enter object declared first.
15356 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15357
6f8b0407
SM
153582017-01-20 Simon Marchi <simon.marchi@ericsson.com>
15359
fec93fb1 15360 PR python/21068
6f8b0407
SM
15361 * python/python-internal.h (PyMem_RawMalloc): Define for
15362 Python < 3.4.
15363 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15364 PyMem_RawMalloc instead of PyMem_Malloc.
15365
78cbbba8
LM
153662017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
15367 Luis Machado <lgustavo@codesourcery.com>
15368
15369 * NEWS (New commands): Mention flash-erase.
15370 (New MI commands): Mention target-flash-erase.
15371 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15372 command.
15373 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15374 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15375 * target.c (flash_erase_command): New function.
15376 (initialize_targets): Add new flash-erase command.
15377 * target.h (flash_erase_command): New declaration.
15378
2132fe85
JB
153792017-01-20 Joel Brobecker <brobecker@adacore.com>
15380
15381 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15382 HAVE_SYS_PROCFS_H is defined.
15383
d1dff226
AH
153842017-01-18 Alan Hayward <alan.hayward@arm.com>
15385
15386 * remote.c (struct cached_reg): Change data into a pointer.
15387 * (stop_reply_dtr): Free data pointers before deleting vector.
15388 (process_stop_reply): Likewise.
15389 (remote_parse_stop_reply): Allocate space for data
15390
9890e433
AH
153912017-01-18 Alan Hayward <alan.hayward@arm.com>
15392
15393 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15394 MAX_REGISTER_SIZE.
15395 (amd64_pseudo_register_read_value): Likewise.
15396 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15397 (store_register_using_P): Likewise.
15398 * regcache.c (regcache_xfer_part): Likewise.
15399
7a36499a
IR
154002017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
15401
15402 Split real and pseudo registers.
15403 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15404 (sparc32_pseudo_regnum): New enum.
15405 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15406 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15407 (SPARC32_CP0_REGISTERS): New macro.
15408 (sparc32_pseudo_register_name): New function.
15409 (sparc32_register_name): Use sparc32_pseudo_register_name.
15410 (sparc32_pseudo_register_type): New function.
15411 (sparc32_register_type): Use sparc32_pseudo_register_type.
15412 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15413 pseudo register numbers.
15414 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15415 (SPARC64_CP0_REGISTERS): New macro.
15416 (sparc64_pseudo_register_name): New function.
15417 (sparc64_register_name): Use sparc64_pseudo_register_name.
15418 (sparc64_pseudo_register_type): New function.
15419 (sparc64_register_type): Use sparc64_pseudo_register_type.
15420 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15421 pseudo register numbers.
15422 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15423 sparc64_store_arguments): Handle pseudo register numbers.
15424
6f8976bf
YQ
154252017-01-13 Yao Qi <yao.qi@linaro.org>
15426
15427 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15428 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15429 output.
15430 (getpkt_or_notif_sane_1): Likewise.
15431
e4241ace
YQ
154322017-01-13 Yao Qi <yao.qi@linaro.org>
15433
15434 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15435 of CC. Pass "-x c++-header" instead of "-x c".
15436
3015c064
SM
154372017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15438
15439 * remote.c (remote_can_async_p): Update comment.
15440
fde1b17d
SM
154412017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15442
15443 * linux-nat.c (linux_nat_can_async_p): Update comment.
15444
ca1ca08b
SM
154452017-01-12 Simon Marchi <simon.marchi@ericsson.com>
15446
15447 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15448
4ad2da73
SM
154492017-01-11 Simon Marchi <simon.marchi@ericsson.com>
15450
15451 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15452
c8b23b3f
TT
154532017-01-10 Tom Tromey <tom@tromey.com>
15454
15455 * python/py-type.c (typy_legacy_template_argument): Update.
15456 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15457 ~demangle_parse_info): Declare new members.
15458 (cp_demangled_name_to_comp): Return unique_ptr.
15459 (cp_demangled_name_parse_free)
15460 (make_cleanup_cp_demangled_name_parse_free)
15461 (cp_new_demangle_parse_info): Remove.
15462 * cp-support.c (do_demangled_name_parse_free_cleanup)
15463 (make_cleanup_cp_demangled_name_parse_free): Remove.
15464 (inspect_type, cp_canonicalize_string_full)
15465 (cp_canonicalize_string): Update.
15466 (mangled_name_to_comp): Change return type.
15467 (cp_class_name_from_physname, method_name_from_physname)
15468 (cp_func_name, cp_remove_params): Update.
15469 * cp-name-parser.y (demangle_parse_info): New constructor, from
15470 cp_new_demangle_parse_info.
15471 (~demangle_parse_info): New destructor, from
15472 cp_demangled_name_parse_free.
15473 (cp_merge_demangle_parse_infos): Update.
15474 (cp_demangled_name_to_comp): Change return type.
15475
1ac32117
TT
154762017-01-10 Tom Tromey <tom@tromey.com>
15477
15478 * top.c (prevent_dont_repeat): Change return type.
15479 * python/python.c (execute_gdb_command): Use std::string.
15480 Update.
15481 * guile/guile.c (gdbscm_execute_gdb_command): Update.
15482 * command.h (prevent_dont_repeat): Change return type.
15483 * breakpoint.c (bpstat_do_actions_1): Update.
15484
0cf08227
TT
154852017-01-10 Tom Tromey <tom@tromey.com>
15486
15487 * value.h (scoped_value_mark::~scoped_value_mark): Call
15488 free_to_mark.
15489 (scoped_value_mark::free_to_mark): New method.
15490 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15491 scoped_value_mark.
15492
eb115069
TT
154932017-01-10 Tom Tromey <tom@tromey.com>
15494
15495 * python/py-value.c (valpy_dereference, valpy_referenced_value)
15496 (valpy_reference_value, valpy_const_value, valpy_get_address)
15497 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15498 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15499 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15500 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15501 scoped_value_mark.
15502 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15503 * value.h (scoped_value_mark): New class.
15504
906768f9
TT
155052017-01-10 Tom Tromey <tom@tromey.com>
15506
15507 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15508 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15509 * psymtab.c (discard_psymtabs_upto): Remove.
15510 (make_cleanup_discard_psymtabs): Remove.
15511 (struct psymtab_state): Remove.
15512
bef155c3
TT
155132017-01-10 Tom Tromey <tom@tromey.com>
15514
15515 * record-full.c (record_full_save_cleanups): Remove.
15516 (record_full_save): Use gdb::unlinker.
15517 * gcore.c (do_bfd_delete_cleanup): Remove.
15518 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
15519 cleanups.
15520 * dwarf2read.c (unlink_if_set): Remove.
15521 (write_psymtabs_to_index): Use gdb::unlinker.
15522 * common/gdb_unlinker.h: New file.
15523
192b62ce
TT
155242017-01-10 Tom Tromey <tom@tromey.com>
15525
15526 * windows-tdep.c (windows_xfer_shared_library): Update.
15527 * windows-nat.c (windows_make_so): Update.
15528 * utils.h (make_cleanup_bfd_unref): Remove.
15529 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15530 * symfile.h (symfile_bfd_open)
15531 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15532 * symfile.c (read_symbols, symbol_file_add)
15533 (separate_debug_file_exists): Update.
15534 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15535 (generic_load, reread_symbols): Update.
15536 * symfile-mem.c (symbol_file_add_from_memory): Update.
15537 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15538 (spu_symbol_file_add_from_memory): Update.
15539 * solist.h (struct target_so_ops) <bfd_open>: Return
15540 gdb_bfd_ref_ptr.
15541 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15542 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15543 gdb_bfd_ref_ptr.
15544 (solib_map_sections, reload_shared_libraries_1): Update.
15545 * solib-svr4.c (enable_break): Update.
15546 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15547 * solib-frv.c (enable_break2): Update.
15548 * solib-dsbt.c (enable_break): Update.
15549 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15550 gdb_bfd_ref_ptr.
15551 (darwin_solib_get_all_image_info_addr_at_init): Update.
15552 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15553 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15554 * record-full.c (record_full_save): Update.
15555 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15556 * procfs.c (insert_dbx_link_bpt_in_file): Update.
15557 * minidebug.c (find_separate_debug_file_in_section): Return
15558 gdb_bfd_ref_ptr.
15559 * machoread.c (macho_add_oso_symfile): Change abfd to
15560 gdb_bfd_ref_ptr.
15561 (macho_symfile_read_all_oso): Update.
15562 (macho_check_dsym): Return gdb_bfd_ref_ptr.
15563 (macho_symfile_read): Update.
15564 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15565 (jit_bfd_try_read_symtab): Update.
15566 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15567 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15568 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15569 gdb_bfd_ref_ptr.
15570 (gdb_bfd_ref_policy): New struct.
15571 (gdb_bfd_ref_ptr): New typedef.
15572 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15573 (gdb_bfd_openw, gdb_bfd_openr_iovec)
15574 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15575 gdb_bfd_ref_ptr.
15576 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15577 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15578 (gcore_command): Update.
15579 * exec.c (exec_file_attach): Update.
15580 * elfread.c (elf_symfile_read): Update.
15581 * dwarf2read.c (dwarf2_get_dwz_file): Update.
15582 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15583 (open_and_init_dwo_file): Update.
15584 (open_dwp_file): Return gdb_bfd_ref_ptr.
15585 (open_and_init_dwp_file): Update.
15586 * corelow.c (core_open): Update.
15587 * compile/compile-object-load.c (compile_object_load): Update.
15588 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15589 * coffread.c (coff_symfile_read): Update.
15590 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15591 gdb_bfd_ref_ptr. Rename.
15592 (dump_bfd_file, restore_command): Update.
15593 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15594 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15595 (find_separate_debug_file_by_buildid): Update.
15596
50315b21
TT
155972017-01-10 Tom Tromey <tom@tromey.com>
15598
15599 * common/gdb_ref_ptr.h: New file.
15600 * python/py-ref.h (struct gdbpy_ref_policy): New.
15601 (gdbpy_ref): Now a typedef.
15602
fc4007c9
TT
156032017-01-10 Tom Tromey <tom@tromey.com>
15604
15605 * utils.h (make_cleanup_htab_delete): Don't declare.
15606 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15607 Remove.
15608 * linespec.c (decode_compound_collector): Add constructor,
15609 destructor.
15610 (lookup_prefix_sym): Remove cleanup.
15611 (symtab_collector): Add constructor, destructor.
15612 (collect_symtabs_from_filename): Remove cleanup.
15613 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15614 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15615 Use htab_up.
15616 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15617 * dwarf2read.c (dw2_expand_symtabs_matching)
15618 (dw2_map_symbol_filenames, dwarf_decode_macros)
15619 (write_psymtabs_to_index): Use htab_up.
15620 * dwarf2loc.c (func_verify_no_selftailcall)
15621 (call_site_find_chain_1, func_verify_no_selftailcall)
15622 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15623 std::vector, gdb::unique_xmalloc_ptr.
15624 (call_sitep): Remove typedef.
15625 (dwarf2_locexpr_baton_eval): Remove unused variable.
15626
8dbcee67
TT
156272017-01-10 Tom Tromey <tom@tromey.com>
15628
15629 * python/python-internal.h (make_cleanup_py_decref)
15630 (make_cleanup_py_xdecref): Don't declare.
15631 * python/py-utils.c (py_decref, make_cleanup_py_decref)
15632 (py_xdecref, make_cleanup_py_xdecref): Remove.
15633
13df46cc
TT
156342017-01-10 Tom Tromey <tom@tromey.com>
15635
15636 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15637 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15638
06fc9bf7
TT
156392017-01-10 Tom Tromey <tom@tromey.com>
15640
15641 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15642
830a4934
TT
156432017-01-10 Tom Tromey <tom@tromey.com>
15644
15645 * python/py-utils.c (unicode_to_encoded_string)
15646 (python_string_to_target_string)
15647 (python_string_to_target_python_string)
15648 (python_string_to_host_string, gdbpy_obj_to_string)
15649 (get_addr_from_python): Use gdbpy_ref.
15650
4586d543
TT
156512017-01-10 Tom Tromey <tom@tromey.com>
15652
15653 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15654 gdbpy_ref.
15655
59876f8f
TT
156562017-01-10 Tom Tromey <tom@tromey.com>
15657
15658 * python/python.c (eval_python_command, gdbpy_decode_line)
15659 (gdbpy_run_events, gdbpy_start_type_printers)
15660 (gdbpy_apply_type_printers): Use gdbpy_ref.
15661
97d83487
TT
156622017-01-10 Tom Tromey <tom@tromey.com>
15663
15664 * python/py-param.c (get_doc_string, compute_enum_values): Use
15665 gdbpy_ref.
15666
9205649a
TT
156672017-01-10 Tom Tromey <tom@tromey.com>
15668
15669 * python/py-inferior.c (find_thread_object, build_inferior_list):
15670 Use gdbpy_ref.
15671
74c49d45
TT
156722017-01-10 Tom Tromey <tom@tromey.com>
15673
15674 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15675
16361ffb
TT
156762017-01-10 Tom Tromey <tom@tromey.com>
15677
15678 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15679 gdbpy_ref.
15680
905f2cca
TT
156812017-01-10 Tom Tromey <tom@tromey.com>
15682
15683 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
15684 extra incref.
15685 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15686 Use gdbpy_ref.
15687
64081434
TT
156882017-01-10 Tom Tromey <tom@tromey.com>
15689
15690 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15691 gdbpy_ref.
15692
59e9e831
TT
156932017-01-10 Tom Tromey <tom@tromey.com>
15694
15695 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
15696 decref results of PyArg_ParseTupleAndKeywords.
15697
9de10f6d
TT
156982017-01-10 Tom Tromey <tom@tromey.com>
15699
15700 * python/python.c (python_run_simple_file): Use
15701 unique_xmalloc_ptr, gdbpy_ref.
15702
2bd5759d
TT
157032017-01-10 Tom Tromey <tom@tromey.com>
15704
15705 * python/py-prettyprint.c (print_stack_unless_memory_error)
15706 (print_string_repr, print_children): Use gdbpy_ref.
15707 (dummy_python_frame): New class.
15708 (dummy_python_frame::dummy_python_frame): Rename from
15709 push_dummy_python_frame.
15710 (py_restore_tstate): Remove.
15711
3b4e0e01
TT
157122017-01-10 Tom Tromey <tom@tromey.com>
15713
15714 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15715
17a22718
TT
157162017-01-10 Tom Tromey <tom@tromey.com>
15717
15718 * python/python.c (ensure_python_env, restore_python_env):
15719 Remove.
15720 * python/python-internal.h (ensure_python_env): Don't declare.
15721 * varobj.h (varobj_ensure_python_env): Don't declare.
15722 * varobj.c (varobj_ensure_python_env): Remove.
15723
68cdc557
TT
157242017-01-10 Tom Tromey <tom@tromey.com>
15725
15726 * varobj.c (varobj_value_get_print_value): Use
15727 gdbpy_enter_varobj.
15728
1eba6383
TT
157292017-01-10 Tom Tromey <tom@tromey.com>
15730
15731 * python/py-prettyprint.c (print_string_repr, print_children):
15732 Update.
15733 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15734 of "encoding".
15735 * varobj.c (varobj_value_get_print_value): Update.
15736 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15737
bde7b3e3
TT
157382017-01-10 Tom Tromey <tom@tromey.com>
15739
15740 * varobj.c (varobj_get_display_hint)
15741 (dynamic_varobj_has_child_method, install_new_value_visualizer)
15742 (varobj_set_visualizer, free_variable): Use
15743 gdbpy_enter_varobj.
15744
a7785f8c
TT
157452017-01-10 Tom Tromey <tom@tromey.com>
15746
15747 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15748 (do_finish_initialization): New function. Use gdbpy_ref.
15749 (gdbpy_finish_initialization): Use gdbpy_enter. Call
15750 do_finish_initialization.
15751
2865bfce
TT
157522017-01-10 Tom Tromey <tom@tromey.com>
15753
15754 * python/py-param.c (get_set_value, get_show_value): Use
15755 gdbpy_enter, gdbpy_ref.
15756
0e9dcc75
TT
157572017-01-10 Tom Tromey <tom@tromey.com>
15758
15759 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15760
12a5cedd
TT
157612017-01-10 Tom Tromey <tom@tromey.com>
15762
15763 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15764
788f2586
TT
157652017-01-10 Tom Tromey <tom@tromey.com>
15766
15767 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15768 Use gdbpy_enter_varobj.
15769
6cd67bea
TT
157702017-01-10 Tom Tromey <tom@tromey.com>
15771
15772 * varobj.c (gdbpy_enter_varobj): New constructor.
15773 * python/python-internal.h (gdbpy_enter_varobj): New class.
15774 * python/py-varobj.c (py_varobj_get_iterator): Use
15775 gdbpy_enter_varobj.
15776
14b122bf
TT
157772017-01-10 Tom Tromey <tom@tromey.com>
15778
15779 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15780 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15781 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15782 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15783 unique_xmalloc_ptr.
15784 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15785
bf1ca3b9
TT
157862017-01-10 Tom Tromey <tom@tromey.com>
15787
15788 * python/py-xmethods.c (invoke_match_method): Use
15789 gdbpy_ref.
15790
572a5524
TT
157912017-01-10 Tom Tromey <tom@tromey.com>
15792
15793 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15794 gdbpy_enter, gdbpy_ref.
15795
396a78b6
TT
157962017-01-10 Tom Tromey <tom@tromey.com>
15797
15798 * python/python.c (python_interactive_command): Use gdbpy_enter.
15799
a88b13c7
TT
158002017-01-10 Tom Tromey <tom@tromey.com>
15801
15802 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15803 gdbpy_ref.
15804
e9f0c363
TT
158052017-01-10 Tom Tromey <tom@tromey.com>
15806
15807 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15808 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15809
6349f452
TT
158102017-01-10 Tom Tromey <tom@tromey.com>
15811
15812 * utils.h (htab_deleter): New struct.
15813 (htab_up): New typedef.
15814 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15815 gdbpy_enter, gdbpy_ref, htab_up.
15816
c0171de6
TT
158172017-01-10 Tom Tromey <tom@tromey.com>
15818
15819 * python/py-unwind.c (pending_frame_invalidate): Remove.
15820 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15821
f18e226f
TT
158222017-01-10 Tom Tromey <tom@tromey.com>
15823
15824 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15825 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15826
c57af3f1
TT
158272017-01-10 Tom Tromey <tom@tromey.com>
15828
15829 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15830
60e600ec
TT
158312017-01-10 Tom Tromey <tom@tromey.com>
15832
15833 * python/python.c (gdbpy_eval_from_control_command)
15834 (gdbpy_source_script, gdbpy_run_events)
15835 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15836 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15837 gdbpy_enter.
15838
bf7da5b0
TT
158392017-01-10 Tom Tromey <tom@tromey.com>
15840
15841 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15842
2d38bced
TT
158432017-01-10 Tom Tromey <tom@tromey.com>
15844
15845 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15846
07bc7329
TT
158472017-01-10 Tom Tromey <tom@tromey.com>
15848
15849 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15850 (python_on_inferior_call_pre, python_on_inferior_call_post)
15851 (python_on_memory_change, python_on_register_change)
15852 (python_inferior_exit, python_new_objfile, add_thread_object)
15853 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15854
6e7c365e
TT
158552017-01-10 Tom Tromey <tom@tromey.com>
15856
15857 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15858 (bpfinishpy_handle_exit): Use gdbpy_enter.
15859
6ba0cd40
TT
158602017-01-10 Tom Tromey <tom@tromey.com>
15861
15862 * python/py-cmd.c (cmdpy_destroyer)
15863 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15864 gdbpy_enter.
15865
de2dc875
TT
158662017-01-10 Tom Tromey <tom@tromey.com>
15867
15868 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15869 gdbpy_enter.
15870 (gdbpy_breakpoint_has_cond): Likewise.
15871
4ecee2c4
TT
158722017-01-10 Tom Tromey <tom@tromey.com>
15873
15874 * python/python.c (gdbpy_enter): New constructor.
15875 (~gdbpy_enter): New destructor.
15876 (restore_python_env, ensure_python_env): Rewrite.
15877 * python/python-internal.h (gdbpy_enter): New class.
15878
37fce74f
TT
158792017-01-10 Tom Tromey <tom@tromey.com>
15880
15881 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15882
53a0cca3
TT
158832017-01-10 Tom Tromey <tom@tromey.com>
15884
15885 * python/py-value.c (value_has_field, get_field_flag)
15886 (get_field_type, valpy_getitem, convert_value_from_python): Use
15887 gdbpy_ref.
15888
ff3724f5
TT
158892017-01-10 Tom Tromey <tom@tromey.com>
15890
15891 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15892 gdbpy_ref.
15893
0700aea5
TT
158942017-01-10 Tom Tromey <tom@tromey.com>
15895
15896 * python/py-prettyprint.c (search_pp_list)
15897 (find_pretty_printer_from_objfiles)
15898 (find_pretty_printer_from_progspace)
15899 (find_pretty_printer_from_gdb, find_pretty_printer)
15900 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15901 gdbpy_ref.
15902
1bb44c9f
TT
159032017-01-10 Tom Tromey <tom@tromey.com>
15904
15905 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15906
87ce03fd
TT
159072017-01-10 Tom Tromey <tom@tromey.com>
15908
15909 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15910 (ltpy_get_all_source_lines): Use gdbpy_ref.
15911
ee0a3fb8
TT
159122017-01-10 Tom Tromey <tom@tromey.com>
15913
15914 * python/py-framefilter.c (extract_sym, extract_value)
15915 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15916 gdbpy_ref.
15917
bf2a52fa
TT
159182017-01-10 Tom Tromey <tom@tromey.com>
15919
15920 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15921
f59fe7f8
TT
159222017-01-10 Tom Tromey <tom@tromey.com>
15923
15924 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15925
80bd970a
TT
159262017-01-10 Tom Tromey <tom@tromey.com>
15927
15928 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15929 gdbpy_ref.
15930
d1b3de2e
TT
159312017-01-10 Tom Tromey <tom@tromey.com>
15932
15933 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15934
3bb43384
TT
159352017-01-10 Tom Tromey <tom@tromey.com>
15936
15937 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15938 (typy_range): Use gdbpy_ref.
15939
abf5651e
TT
159402017-01-10 Tom Tromey <tom@tromey.com>
15941
15942 * python/py-threadevent.c (create_thread_event_object): Use
15943 gdbpy_ref.
15944 * python/py-stopevent.c (create_stop_event_object): Simplify.
15945 (emit_stop_event): Use gdbpy_ref.
15946 * python/py-signalevent.c (create_signal_event_object): Use
15947 gdbpy_ref.
15948 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15949 (emit_new_objfile_event, create_clear_objfiles_event_object)
15950 (emit_clear_objfiles_event): Use gdbpy_ref.
15951 * python/py-infevents.c (create_inferior_call_event_object)
15952 (create_register_changed_event_object)
15953 (create_memory_changed_event_object, emit_inferior_call_event)
15954 (emit_memory_changed_event, emit_register_changed_event): Use
15955 gdbpy_ref.
15956 * python/py-exitedevent.c (create_exited_event_object)
15957 (emit_exited_event): Use gdbpy_ref.
15958 * python/py-event.h (evpy_emit_event): Remove
15959 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15960 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15961 * python/py-continueevent.c (emit_continue_event): Use
15962 gdbpy_ref.
15963 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15964 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15965 gdbpy_ref.
15966 * python/py-bpevent.c (create_breakpoint_event_object): Use
15967 gdbpy_ref.
15968
a68ff33e
TT
159692017-01-10 Tom Tromey <tom@tromey.com>
15970
15971 * python/py-ref.h: New file.
15972
7becfd03
SM
159732017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15974
15975 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15976 void.
15977 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15978 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15979 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15980 * ui-out.c (ui_out::redirect): Likewise.
15981 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15982 * cli/cli-logging.c (set_logging_redirect): Update call site of
15983 ui_out::redirect.
15984 (handle_redirections): Likewise.
15985 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15986 * top.c (execute_command_to_string): Likewise.
15987 * utils.c (do_ui_out_redirect_pop): Likewise.
15988
df294654
SM
159892017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15990
15991 * stack.c (_initialize_stack): Update "frame" command help message.
15992
f5e6296e
IB
159932017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15994
15995 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15996
0e2d6fa6
YQ
159972017-01-06 Yao Qi <yao.qi@linaro.org>
15998
15999 * x86-linux-nat.h: Include gdb_proc_service.h.
16000
44d6d3f9
YQ
160012017-01-06 Yao Qi <yao.qi@linaro.org>
16002
16003 * ser-base.h: Include serial.h.
16004
656731fe
YQ
160052017-01-06 Yao Qi <yao.qi@linaro.org>
16006
16007 * ppc-linux-tdep.h: Include ppc-tdep.h.
16008
1ca8f924
YQ
160092017-01-06 Yao Qi <yao.qi@linaro.org>
16010
16011 * nat/amd64-linux-siginfo.h: Include signal.h.
16012
bc3008c4
YQ
160132017-01-06 Yao Qi <yao.qi@linaro.org>
16014
16015 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16016
66c80d03
YQ
160172017-01-06 Yao Qi <yao.qi@linaro.org>
16018
16019 * mi/mi-parse.h: Include mi-cmds.h.
16020
051d2dda
YQ
160212017-01-06 Yao Qi <yao.qi@linaro.org>
16022
16023 * inf-loop.c: Don't include "target.h".
16024 * inf-loop.h: Include it here.
16025
8018d34f
YQ
160262017-01-06 Yao Qi <yao.qi@linaro.org>
16027
16028 * dfp.h: Include "dboulest.h" and "expression.h".
16029
c0b8369c
YQ
160302017-01-06 Yao Qi <yao.qi@linaro.org>
16031
16032 * ax-gdb.h: Include "ax.h".
16033
ad5cba2a
YQ
160342017-01-06 Yao Qi <yao.qi@linaro.org>
16035
16036 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16037 with nat/gdb_ptrace.h.
16038
1c33cd7f
YQ
160392017-01-05 Yao Qi <yao.qi@linaro.org>
16040
16041 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16042 new line.
16043 (mips64_fbsd_sigframe_init): Likewise.
16044
c988ac1d
JB
160452017-01-04 John Baldwin <jhb@FreeBSD.org>
16046
16047 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16048 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16049
b268007c
JB
160502017-01-04 John Baldwin <jhb@FreeBSD.org>
16051
16052 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16053 * NEWS: Mention new FreeBSD/mips native configuration.
16054 * config/mips/fbsd.mh: New file.
16055 * configure.host: Add mips*-*-freebsd*.
16056 * mips-fbsd-nat.c: New file.
16057
387360da
JB
160582017-01-04 John Baldwin <jhb@FreeBSD.org>
16059
16060 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16061 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16062 * NEWS: Mention new FreeBSD/mips target.
16063 * configure.tgt: Add mips*-*-freebsd*.
16064 * mips-fbsd-tdep.c: New file.
16065 * mips-fbsd-tdep.h: New file.
16066
2aaaf250
YQ
160672017-01-04 Yao Qi <yao.qi@linaro.org>
16068
16069 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16070 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16071
61baf725
JB
160722017-01-01 Joel Brobecker <brobecker@adacore.com>
16073
6dbb839a 16074 Update copyright year range in all GDB files.
61baf725 16075
c113e7ff 160762017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 16077
c113e7ff 16078 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 16079
c113e7ff 16080For older changes see ChangeLog-2016.
c906108c
SS
16081\f
16082Local Variables:
16083mode: change-log
16084left-margin: 8
16085fill-column: 74
16086version-control: never
57da7796 16087coding: utf-8
c906108c 16088End:
This page took 3.014459 seconds and 4 git commands to generate.